@almadar/ui 4.7.0 → 4.9.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 +1342 -1287
- package/dist/avl/index.js +249 -194
- package/dist/components/index.cjs +35 -12
- package/dist/components/index.js +37 -14
- package/dist/components/molecules/DataGrid.d.ts +1 -3
- package/dist/components/molecules/DataList.d.ts +1 -3
- package/dist/components/organisms/game/three/index.cjs +17 -1
- package/dist/components/organisms/game/three/index.js +18 -2
- package/dist/docs/index.cjs +54 -34
- package/dist/docs/index.js +32 -12
- package/dist/hooks/index.cjs +17 -1
- package/dist/hooks/index.js +18 -2
- package/dist/marketing/index.cjs +66 -46
- package/dist/marketing/index.js +37 -17
- package/dist/providers/TraitScopeProvider.d.ts +43 -0
- package/dist/providers/index.cjs +49 -12
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +50 -15
- package/dist/runtime/EntitySchemaContext.d.ts +16 -1
- package/dist/runtime/index.cjs +63 -28
- package/dist/runtime/index.js +65 -30
- 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 { Html, RoundedBox, OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles } from '@react-three/drei';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React128 from 'react';
|
|
4
|
+
import React128__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, Settings, 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';
|
|
@@ -3053,6 +3053,24 @@ var init_EventBusProvider = __esm({
|
|
|
3053
3053
|
listenerTags = /* @__PURE__ */ new WeakMap();
|
|
3054
3054
|
}
|
|
3055
3055
|
});
|
|
3056
|
+
function TraitScopeProvider({
|
|
3057
|
+
orbital,
|
|
3058
|
+
trait,
|
|
3059
|
+
children
|
|
3060
|
+
}) {
|
|
3061
|
+
const value = useMemo(() => ({ orbital, trait }), [orbital, trait]);
|
|
3062
|
+
return /* @__PURE__ */ jsx(TraitScopeContext.Provider, { value, children });
|
|
3063
|
+
}
|
|
3064
|
+
function useTraitScope() {
|
|
3065
|
+
return useContext(TraitScopeContext);
|
|
3066
|
+
}
|
|
3067
|
+
var TraitScopeContext;
|
|
3068
|
+
var init_TraitScopeProvider = __esm({
|
|
3069
|
+
"providers/TraitScopeProvider.tsx"() {
|
|
3070
|
+
"use client";
|
|
3071
|
+
TraitScopeContext = createContext(null);
|
|
3072
|
+
}
|
|
3073
|
+
});
|
|
3056
3074
|
|
|
3057
3075
|
// hooks/useEventBus.ts
|
|
3058
3076
|
var useEventBus_exports = {};
|
|
@@ -3078,7 +3096,23 @@ function getGlobalEventBus() {
|
|
|
3078
3096
|
}
|
|
3079
3097
|
function useEventBus() {
|
|
3080
3098
|
const context = useContext(EventBusContext);
|
|
3081
|
-
|
|
3099
|
+
const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
3100
|
+
const scope = useTraitScope();
|
|
3101
|
+
return useMemo(() => {
|
|
3102
|
+
if (!scope) return baseBus;
|
|
3103
|
+
return {
|
|
3104
|
+
...baseBus,
|
|
3105
|
+
emit: (type, payload, source) => {
|
|
3106
|
+
if (typeof type === "string" && type.startsWith("UI:")) {
|
|
3107
|
+
const tail = type.slice(3);
|
|
3108
|
+
const qualified = tail.includes(".") ? type : `UI:${scope.orbital}.${scope.trait}.${tail}`;
|
|
3109
|
+
baseBus.emit(qualified, payload, source);
|
|
3110
|
+
return;
|
|
3111
|
+
}
|
|
3112
|
+
baseBus.emit(type, payload, source);
|
|
3113
|
+
}
|
|
3114
|
+
};
|
|
3115
|
+
}, [baseBus, scope]);
|
|
3082
3116
|
}
|
|
3083
3117
|
function useEventListener(event, handler) {
|
|
3084
3118
|
const eventBus = useEventBus();
|
|
@@ -3108,6 +3142,7 @@ var init_useEventBus = __esm({
|
|
|
3108
3142
|
"hooks/useEventBus.ts"() {
|
|
3109
3143
|
"use client";
|
|
3110
3144
|
init_EventBusProvider();
|
|
3145
|
+
init_TraitScopeProvider();
|
|
3111
3146
|
init_logger();
|
|
3112
3147
|
log = createLogger("almadar:eventbus");
|
|
3113
3148
|
subLog2 = createLogger("almadar:eventbus:subscribe");
|
|
@@ -3287,7 +3322,7 @@ var init_Box = __esm({
|
|
|
3287
3322
|
fixed: "fixed",
|
|
3288
3323
|
sticky: "sticky"
|
|
3289
3324
|
};
|
|
3290
|
-
Box =
|
|
3325
|
+
Box = React128__default.forwardRef(
|
|
3291
3326
|
({
|
|
3292
3327
|
padding,
|
|
3293
3328
|
paddingX,
|
|
@@ -4084,6 +4119,7 @@ var init_ThemeContext = __esm({
|
|
|
4084
4119
|
function EntitySchemaProvider({
|
|
4085
4120
|
entities,
|
|
4086
4121
|
traitLinkedEntities,
|
|
4122
|
+
orbitalsByTrait,
|
|
4087
4123
|
children
|
|
4088
4124
|
}) {
|
|
4089
4125
|
const entitiesMap = useMemo(() => {
|
|
@@ -4096,12 +4132,16 @@ function EntitySchemaProvider({
|
|
|
4096
4132
|
const linkedMap = useMemo(() => {
|
|
4097
4133
|
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
4098
4134
|
}, [traitLinkedEntities]);
|
|
4135
|
+
const orbitalsMap = useMemo(() => {
|
|
4136
|
+
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
4137
|
+
}, [orbitalsByTrait]);
|
|
4099
4138
|
const contextValue = useMemo(
|
|
4100
4139
|
() => ({
|
|
4101
4140
|
entities: entitiesMap,
|
|
4102
|
-
traitLinkedEntities: linkedMap
|
|
4141
|
+
traitLinkedEntities: linkedMap,
|
|
4142
|
+
orbitalsByTrait: orbitalsMap
|
|
4103
4143
|
}),
|
|
4104
|
-
[entitiesMap, linkedMap]
|
|
4144
|
+
[entitiesMap, linkedMap, orbitalsMap]
|
|
4105
4145
|
);
|
|
4106
4146
|
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
4107
4147
|
}
|
|
@@ -4989,7 +5029,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
4989
5029
|
const IconComp = value;
|
|
4990
5030
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
4991
5031
|
}
|
|
4992
|
-
if (
|
|
5032
|
+
if (React128__default.isValidElement(value)) {
|
|
4993
5033
|
return value;
|
|
4994
5034
|
}
|
|
4995
5035
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5065,7 +5105,7 @@ var init_Button = __esm({
|
|
|
5065
5105
|
md: "h-4 w-4",
|
|
5066
5106
|
lg: "h-5 w-5"
|
|
5067
5107
|
};
|
|
5068
|
-
Button =
|
|
5108
|
+
Button = React128__default.forwardRef(
|
|
5069
5109
|
({
|
|
5070
5110
|
className,
|
|
5071
5111
|
variant = "primary",
|
|
@@ -5168,7 +5208,7 @@ var init_Badge = __esm({
|
|
|
5168
5208
|
md: "px-2.5 py-1 text-sm",
|
|
5169
5209
|
lg: "px-3 py-1.5 text-base"
|
|
5170
5210
|
};
|
|
5171
|
-
Badge =
|
|
5211
|
+
Badge = React128__default.forwardRef(
|
|
5172
5212
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
5173
5213
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
5174
5214
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -5420,7 +5460,7 @@ var Input;
|
|
|
5420
5460
|
var init_Input = __esm({
|
|
5421
5461
|
"components/atoms/Input.tsx"() {
|
|
5422
5462
|
init_cn();
|
|
5423
|
-
Input =
|
|
5463
|
+
Input = React128__default.forwardRef(
|
|
5424
5464
|
({
|
|
5425
5465
|
className,
|
|
5426
5466
|
inputType,
|
|
@@ -5538,7 +5578,7 @@ var Label;
|
|
|
5538
5578
|
var init_Label = __esm({
|
|
5539
5579
|
"components/atoms/Label.tsx"() {
|
|
5540
5580
|
init_cn();
|
|
5541
|
-
Label =
|
|
5581
|
+
Label = React128__default.forwardRef(
|
|
5542
5582
|
({ className, required, children, ...props }, ref) => {
|
|
5543
5583
|
return /* @__PURE__ */ jsxs(
|
|
5544
5584
|
"label",
|
|
@@ -5564,7 +5604,7 @@ var Textarea;
|
|
|
5564
5604
|
var init_Textarea = __esm({
|
|
5565
5605
|
"components/atoms/Textarea.tsx"() {
|
|
5566
5606
|
init_cn();
|
|
5567
|
-
Textarea =
|
|
5607
|
+
Textarea = React128__default.forwardRef(
|
|
5568
5608
|
({ className, error, ...props }, ref) => {
|
|
5569
5609
|
return /* @__PURE__ */ jsx(
|
|
5570
5610
|
"textarea",
|
|
@@ -5593,7 +5633,7 @@ var Select;
|
|
|
5593
5633
|
var init_Select = __esm({
|
|
5594
5634
|
"components/atoms/Select.tsx"() {
|
|
5595
5635
|
init_cn();
|
|
5596
|
-
Select =
|
|
5636
|
+
Select = React128__default.forwardRef(
|
|
5597
5637
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
5598
5638
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5599
5639
|
/* @__PURE__ */ jsxs(
|
|
@@ -5635,7 +5675,7 @@ var Checkbox;
|
|
|
5635
5675
|
var init_Checkbox = __esm({
|
|
5636
5676
|
"components/atoms/Checkbox.tsx"() {
|
|
5637
5677
|
init_cn();
|
|
5638
|
-
Checkbox =
|
|
5678
|
+
Checkbox = React128__default.forwardRef(
|
|
5639
5679
|
({ className, label, id, ...props }, ref) => {
|
|
5640
5680
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
5641
5681
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -5717,7 +5757,7 @@ var init_Card = __esm({
|
|
|
5717
5757
|
md: "shadow",
|
|
5718
5758
|
lg: "shadow-lg"
|
|
5719
5759
|
};
|
|
5720
|
-
Card =
|
|
5760
|
+
Card = React128__default.forwardRef(
|
|
5721
5761
|
({
|
|
5722
5762
|
className,
|
|
5723
5763
|
variant = "bordered",
|
|
@@ -5753,9 +5793,9 @@ var init_Card = __esm({
|
|
|
5753
5793
|
}
|
|
5754
5794
|
);
|
|
5755
5795
|
Card.displayName = "Card";
|
|
5756
|
-
CardHeader =
|
|
5796
|
+
CardHeader = React128__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
5757
5797
|
CardHeader.displayName = "CardHeader";
|
|
5758
|
-
CardTitle =
|
|
5798
|
+
CardTitle = React128__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5759
5799
|
"h3",
|
|
5760
5800
|
{
|
|
5761
5801
|
ref,
|
|
@@ -5768,11 +5808,11 @@ var init_Card = __esm({
|
|
|
5768
5808
|
}
|
|
5769
5809
|
));
|
|
5770
5810
|
CardTitle.displayName = "CardTitle";
|
|
5771
|
-
CardContent =
|
|
5811
|
+
CardContent = React128__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
5772
5812
|
CardContent.displayName = "CardContent";
|
|
5773
5813
|
CardBody = CardContent;
|
|
5774
5814
|
CardBody.displayName = "CardBody";
|
|
5775
|
-
CardFooter =
|
|
5815
|
+
CardFooter = React128__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5776
5816
|
"div",
|
|
5777
5817
|
{
|
|
5778
5818
|
ref,
|
|
@@ -5793,7 +5833,7 @@ var init_Spinner = __esm({
|
|
|
5793
5833
|
md: "h-6 w-6",
|
|
5794
5834
|
lg: "h-8 w-8"
|
|
5795
5835
|
};
|
|
5796
|
-
Spinner =
|
|
5836
|
+
Spinner = React128__default.forwardRef(
|
|
5797
5837
|
({ className, size = "md", ...props }, ref) => {
|
|
5798
5838
|
return /* @__PURE__ */ jsx(
|
|
5799
5839
|
"div",
|
|
@@ -6241,7 +6281,7 @@ var Radio;
|
|
|
6241
6281
|
var init_Radio = __esm({
|
|
6242
6282
|
"components/atoms/Radio.tsx"() {
|
|
6243
6283
|
init_cn();
|
|
6244
|
-
Radio =
|
|
6284
|
+
Radio = React128__default.forwardRef(
|
|
6245
6285
|
({
|
|
6246
6286
|
label,
|
|
6247
6287
|
helperText,
|
|
@@ -6352,7 +6392,7 @@ var init_Switch = __esm({
|
|
|
6352
6392
|
"components/atoms/Switch.tsx"() {
|
|
6353
6393
|
"use client";
|
|
6354
6394
|
init_cn();
|
|
6355
|
-
Switch =
|
|
6395
|
+
Switch = React128.forwardRef(
|
|
6356
6396
|
({
|
|
6357
6397
|
checked,
|
|
6358
6398
|
defaultChecked = false,
|
|
@@ -6363,10 +6403,10 @@ var init_Switch = __esm({
|
|
|
6363
6403
|
name,
|
|
6364
6404
|
className
|
|
6365
6405
|
}, ref) => {
|
|
6366
|
-
const [isChecked, setIsChecked] =
|
|
6406
|
+
const [isChecked, setIsChecked] = React128.useState(
|
|
6367
6407
|
checked !== void 0 ? checked : defaultChecked
|
|
6368
6408
|
);
|
|
6369
|
-
|
|
6409
|
+
React128.useEffect(() => {
|
|
6370
6410
|
if (checked !== void 0) {
|
|
6371
6411
|
setIsChecked(checked);
|
|
6372
6412
|
}
|
|
@@ -6706,8 +6746,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6706
6746
|
position = "top",
|
|
6707
6747
|
className
|
|
6708
6748
|
}) => {
|
|
6709
|
-
const [isVisible, setIsVisible] =
|
|
6710
|
-
const timeoutRef =
|
|
6749
|
+
const [isVisible, setIsVisible] = React128__default.useState(false);
|
|
6750
|
+
const timeoutRef = React128__default.useRef(null);
|
|
6711
6751
|
const handleMouseEnter = () => {
|
|
6712
6752
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6713
6753
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -6716,7 +6756,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6716
6756
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6717
6757
|
setIsVisible(false);
|
|
6718
6758
|
};
|
|
6719
|
-
|
|
6759
|
+
React128__default.useEffect(() => {
|
|
6720
6760
|
return () => {
|
|
6721
6761
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6722
6762
|
};
|
|
@@ -6926,7 +6966,7 @@ var init_StatusDot = __esm({
|
|
|
6926
6966
|
md: "w-2.5 h-2.5",
|
|
6927
6967
|
lg: "w-3 h-3"
|
|
6928
6968
|
};
|
|
6929
|
-
StatusDot =
|
|
6969
|
+
StatusDot = React128__default.forwardRef(
|
|
6930
6970
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
6931
6971
|
return /* @__PURE__ */ jsx(
|
|
6932
6972
|
"span",
|
|
@@ -6979,7 +7019,7 @@ var init_TrendIndicator = __esm({
|
|
|
6979
7019
|
down: TrendingDown,
|
|
6980
7020
|
flat: ArrowRight
|
|
6981
7021
|
};
|
|
6982
|
-
TrendIndicator =
|
|
7022
|
+
TrendIndicator = React128__default.forwardRef(
|
|
6983
7023
|
({
|
|
6984
7024
|
className,
|
|
6985
7025
|
value,
|
|
@@ -7046,7 +7086,7 @@ var init_RangeSlider = __esm({
|
|
|
7046
7086
|
md: "w-4 h-4",
|
|
7047
7087
|
lg: "w-5 h-5"
|
|
7048
7088
|
};
|
|
7049
|
-
RangeSlider =
|
|
7089
|
+
RangeSlider = React128__default.forwardRef(
|
|
7050
7090
|
({
|
|
7051
7091
|
className,
|
|
7052
7092
|
min = 0,
|
|
@@ -7642,7 +7682,7 @@ var init_ContentSection = __esm({
|
|
|
7642
7682
|
md: "py-16",
|
|
7643
7683
|
lg: "py-24"
|
|
7644
7684
|
};
|
|
7645
|
-
ContentSection =
|
|
7685
|
+
ContentSection = React128__default.forwardRef(
|
|
7646
7686
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
7647
7687
|
return /* @__PURE__ */ jsx(
|
|
7648
7688
|
Box,
|
|
@@ -8176,7 +8216,7 @@ var init_AnimatedReveal = __esm({
|
|
|
8176
8216
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
8177
8217
|
"none": {}
|
|
8178
8218
|
};
|
|
8179
|
-
AnimatedReveal =
|
|
8219
|
+
AnimatedReveal = React128__default.forwardRef(
|
|
8180
8220
|
({
|
|
8181
8221
|
trigger = "scroll",
|
|
8182
8222
|
animation = "fade-up",
|
|
@@ -8336,7 +8376,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8336
8376
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
8337
8377
|
"use client";
|
|
8338
8378
|
init_cn();
|
|
8339
|
-
AnimatedGraphic =
|
|
8379
|
+
AnimatedGraphic = React128__default.forwardRef(
|
|
8340
8380
|
({
|
|
8341
8381
|
src,
|
|
8342
8382
|
svgContent,
|
|
@@ -8359,7 +8399,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8359
8399
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
8360
8400
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
8361
8401
|
const prevAnimateRef = useRef(animate);
|
|
8362
|
-
const setRef =
|
|
8402
|
+
const setRef = React128__default.useCallback(
|
|
8363
8403
|
(node) => {
|
|
8364
8404
|
containerRef.current = node;
|
|
8365
8405
|
if (typeof ref === "function") ref(node);
|
|
@@ -8578,9 +8618,9 @@ function ScoreDisplay({
|
|
|
8578
8618
|
...rest
|
|
8579
8619
|
}) {
|
|
8580
8620
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
8581
|
-
const [displayValue, setDisplayValue] =
|
|
8582
|
-
const [isAnimating, setIsAnimating] =
|
|
8583
|
-
|
|
8621
|
+
const [displayValue, setDisplayValue] = React128.useState(resolvedValue);
|
|
8622
|
+
const [isAnimating, setIsAnimating] = React128.useState(false);
|
|
8623
|
+
React128.useEffect(() => {
|
|
8584
8624
|
if (!animated || displayValue === resolvedValue) {
|
|
8585
8625
|
setDisplayValue(resolvedValue);
|
|
8586
8626
|
return;
|
|
@@ -8650,9 +8690,9 @@ function ControlButton({
|
|
|
8650
8690
|
className
|
|
8651
8691
|
}) {
|
|
8652
8692
|
const eventBus = useEventBus();
|
|
8653
|
-
const [isPressed, setIsPressed] =
|
|
8693
|
+
const [isPressed, setIsPressed] = React128.useState(false);
|
|
8654
8694
|
const actualPressed = pressed ?? isPressed;
|
|
8655
|
-
const handlePointerDown =
|
|
8695
|
+
const handlePointerDown = React128.useCallback(
|
|
8656
8696
|
(e) => {
|
|
8657
8697
|
e.preventDefault();
|
|
8658
8698
|
if (disabled) return;
|
|
@@ -8662,7 +8702,7 @@ function ControlButton({
|
|
|
8662
8702
|
},
|
|
8663
8703
|
[disabled, pressEvent, eventBus, onPress]
|
|
8664
8704
|
);
|
|
8665
|
-
const handlePointerUp =
|
|
8705
|
+
const handlePointerUp = React128.useCallback(
|
|
8666
8706
|
(e) => {
|
|
8667
8707
|
e.preventDefault();
|
|
8668
8708
|
if (disabled) return;
|
|
@@ -8672,7 +8712,7 @@ function ControlButton({
|
|
|
8672
8712
|
},
|
|
8673
8713
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8674
8714
|
);
|
|
8675
|
-
const handlePointerLeave =
|
|
8715
|
+
const handlePointerLeave = React128.useCallback(
|
|
8676
8716
|
(e) => {
|
|
8677
8717
|
if (isPressed) {
|
|
8678
8718
|
setIsPressed(false);
|
|
@@ -9570,9 +9610,9 @@ function MiniMap({
|
|
|
9570
9610
|
viewportRect,
|
|
9571
9611
|
className
|
|
9572
9612
|
}) {
|
|
9573
|
-
const canvasRef =
|
|
9574
|
-
const frameRef =
|
|
9575
|
-
|
|
9613
|
+
const canvasRef = React128.useRef(null);
|
|
9614
|
+
const frameRef = React128.useRef(0);
|
|
9615
|
+
React128.useEffect(() => {
|
|
9576
9616
|
const canvas = canvasRef.current;
|
|
9577
9617
|
if (!canvas) return;
|
|
9578
9618
|
const ctx = canvas.getContext("2d");
|
|
@@ -9911,7 +9951,7 @@ var init_ErrorBoundary = __esm({
|
|
|
9911
9951
|
"use client";
|
|
9912
9952
|
init_cn();
|
|
9913
9953
|
init_ErrorState();
|
|
9914
|
-
ErrorBoundary = class extends
|
|
9954
|
+
ErrorBoundary = class extends React128__default.Component {
|
|
9915
9955
|
constructor(props) {
|
|
9916
9956
|
super(props);
|
|
9917
9957
|
__publicField(this, "reset", () => {
|
|
@@ -10384,8 +10424,8 @@ var init_Tooltip = __esm({
|
|
|
10384
10424
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
10385
10425
|
};
|
|
10386
10426
|
}, []);
|
|
10387
|
-
const triggerElement =
|
|
10388
|
-
const trigger =
|
|
10427
|
+
const triggerElement = React128__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10428
|
+
const trigger = React128__default.cloneElement(triggerElement, {
|
|
10389
10429
|
ref: triggerRef,
|
|
10390
10430
|
onMouseEnter: handleMouseEnter,
|
|
10391
10431
|
onMouseLeave: handleMouseLeave,
|
|
@@ -10506,8 +10546,8 @@ var init_Popover = __esm({
|
|
|
10506
10546
|
onMouseEnter: handleOpen,
|
|
10507
10547
|
onMouseLeave: handleClose
|
|
10508
10548
|
};
|
|
10509
|
-
const childElement =
|
|
10510
|
-
const triggerElement =
|
|
10549
|
+
const childElement = React128__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10550
|
+
const triggerElement = React128__default.cloneElement(
|
|
10511
10551
|
childElement,
|
|
10512
10552
|
{
|
|
10513
10553
|
ref: triggerRef,
|
|
@@ -10624,8 +10664,8 @@ var init_Menu = __esm({
|
|
|
10624
10664
|
"bottom-start": "top-full left-0 mt-2",
|
|
10625
10665
|
"bottom-end": "top-full right-0 mt-2"
|
|
10626
10666
|
};
|
|
10627
|
-
const triggerChild =
|
|
10628
|
-
const triggerElement =
|
|
10667
|
+
const triggerChild = React128__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
10668
|
+
const triggerElement = React128__default.cloneElement(
|
|
10629
10669
|
triggerChild,
|
|
10630
10670
|
{
|
|
10631
10671
|
ref: triggerRef,
|
|
@@ -11144,7 +11184,7 @@ var init_MapView = __esm({
|
|
|
11144
11184
|
shadowSize: [41, 41]
|
|
11145
11185
|
});
|
|
11146
11186
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
11147
|
-
const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState124 } =
|
|
11187
|
+
const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState124 } = React128__default;
|
|
11148
11188
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
11149
11189
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
11150
11190
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -11375,7 +11415,7 @@ function InputPattern({
|
|
|
11375
11415
|
fieldName
|
|
11376
11416
|
}) {
|
|
11377
11417
|
const { emit } = useEventBus();
|
|
11378
|
-
const [localValue, setLocalValue] =
|
|
11418
|
+
const [localValue, setLocalValue] = React128__default.useState(value);
|
|
11379
11419
|
const handleChange = (e) => {
|
|
11380
11420
|
setLocalValue(e.target.value);
|
|
11381
11421
|
if (onChange) {
|
|
@@ -11413,7 +11453,7 @@ function TextareaPattern({
|
|
|
11413
11453
|
fieldName
|
|
11414
11454
|
}) {
|
|
11415
11455
|
const { emit } = useEventBus();
|
|
11416
|
-
const [localValue, setLocalValue] =
|
|
11456
|
+
const [localValue, setLocalValue] = React128__default.useState(value);
|
|
11417
11457
|
const handleChange = (e) => {
|
|
11418
11458
|
setLocalValue(e.target.value);
|
|
11419
11459
|
if (onChange) {
|
|
@@ -11445,7 +11485,7 @@ function SelectPattern({
|
|
|
11445
11485
|
fieldName
|
|
11446
11486
|
}) {
|
|
11447
11487
|
const { emit } = useEventBus();
|
|
11448
|
-
const [localValue, setLocalValue] =
|
|
11488
|
+
const [localValue, setLocalValue] = React128__default.useState(value);
|
|
11449
11489
|
const handleChange = (e) => {
|
|
11450
11490
|
setLocalValue(e.target.value);
|
|
11451
11491
|
if (onChange) {
|
|
@@ -11474,7 +11514,7 @@ function CheckboxPattern({
|
|
|
11474
11514
|
className
|
|
11475
11515
|
}) {
|
|
11476
11516
|
const { emit } = useEventBus();
|
|
11477
|
-
const [localChecked, setLocalChecked] =
|
|
11517
|
+
const [localChecked, setLocalChecked] = React128__default.useState(checked);
|
|
11478
11518
|
const handleChange = (e) => {
|
|
11479
11519
|
setLocalChecked(e.target.checked);
|
|
11480
11520
|
if (onChange) {
|
|
@@ -11705,8 +11745,8 @@ function ActionButtons({
|
|
|
11705
11745
|
disabled
|
|
11706
11746
|
}) {
|
|
11707
11747
|
const eventBus = useEventBus();
|
|
11708
|
-
const [activeButtons, setActiveButtons] =
|
|
11709
|
-
const handlePress =
|
|
11748
|
+
const [activeButtons, setActiveButtons] = React128.useState(/* @__PURE__ */ new Set());
|
|
11749
|
+
const handlePress = React128.useCallback(
|
|
11710
11750
|
(id) => {
|
|
11711
11751
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
11712
11752
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11714,7 +11754,7 @@ function ActionButtons({
|
|
|
11714
11754
|
},
|
|
11715
11755
|
[actionEvent, eventBus, onAction]
|
|
11716
11756
|
);
|
|
11717
|
-
const handleRelease =
|
|
11757
|
+
const handleRelease = React128.useCallback(
|
|
11718
11758
|
(id) => {
|
|
11719
11759
|
setActiveButtons((prev) => {
|
|
11720
11760
|
const next = new Set(prev);
|
|
@@ -13782,7 +13822,7 @@ var init_MarkdownContent = __esm({
|
|
|
13782
13822
|
init_Box();
|
|
13783
13823
|
init_useTranslate();
|
|
13784
13824
|
init_cn();
|
|
13785
|
-
MarkdownContent =
|
|
13825
|
+
MarkdownContent = React128__default.memo(
|
|
13786
13826
|
({ content, direction, className }) => {
|
|
13787
13827
|
const { t: _t } = useTranslate();
|
|
13788
13828
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13999,7 +14039,7 @@ var init_CodeBlock = __esm({
|
|
|
13999
14039
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
14000
14040
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
14001
14041
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
14002
|
-
CodeBlock =
|
|
14042
|
+
CodeBlock = React128__default.memo(
|
|
14003
14043
|
({
|
|
14004
14044
|
code: rawCode,
|
|
14005
14045
|
language = "text",
|
|
@@ -15308,7 +15348,7 @@ var init_StateMachineView = __esm({
|
|
|
15308
15348
|
style: { top: title ? 30 : 0 },
|
|
15309
15349
|
children: [
|
|
15310
15350
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15311
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15351
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React128__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15312
15352
|
StateNode,
|
|
15313
15353
|
{
|
|
15314
15354
|
state,
|
|
@@ -21091,7 +21131,7 @@ function CraftingRecipe({
|
|
|
21091
21131
|
className
|
|
21092
21132
|
}) {
|
|
21093
21133
|
const eventBus = useEventBus();
|
|
21094
|
-
const handleCraft =
|
|
21134
|
+
const handleCraft = React128.useCallback(() => {
|
|
21095
21135
|
onCraft?.();
|
|
21096
21136
|
if (craftEvent) {
|
|
21097
21137
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21108,7 +21148,7 @@ function CraftingRecipe({
|
|
|
21108
21148
|
children: [
|
|
21109
21149
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21110
21150
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21111
|
-
return /* @__PURE__ */ jsxs(
|
|
21151
|
+
return /* @__PURE__ */ jsxs(React128.Fragment, { children: [
|
|
21112
21152
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21113
21153
|
ItemSlot,
|
|
21114
21154
|
{
|
|
@@ -21402,8 +21442,8 @@ function DPad({
|
|
|
21402
21442
|
}) {
|
|
21403
21443
|
const eventBus = useEventBus();
|
|
21404
21444
|
const sizes = sizeMap15[size];
|
|
21405
|
-
const [activeDirections, setActiveDirections] =
|
|
21406
|
-
const handlePress =
|
|
21445
|
+
const [activeDirections, setActiveDirections] = React128.useState(/* @__PURE__ */ new Set());
|
|
21446
|
+
const handlePress = React128.useCallback(
|
|
21407
21447
|
(direction) => {
|
|
21408
21448
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21409
21449
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21411,7 +21451,7 @@ function DPad({
|
|
|
21411
21451
|
},
|
|
21412
21452
|
[directionEvent, eventBus, onDirection]
|
|
21413
21453
|
);
|
|
21414
|
-
const handleRelease =
|
|
21454
|
+
const handleRelease = React128.useCallback(
|
|
21415
21455
|
(direction) => {
|
|
21416
21456
|
setActiveDirections((prev) => {
|
|
21417
21457
|
const next = new Set(prev);
|
|
@@ -21896,8 +21936,7 @@ function formatValue(value, format) {
|
|
|
21896
21936
|
}
|
|
21897
21937
|
function DataGrid({
|
|
21898
21938
|
entity,
|
|
21899
|
-
fields
|
|
21900
|
-
columns: columnsProp,
|
|
21939
|
+
fields,
|
|
21901
21940
|
itemActions,
|
|
21902
21941
|
cols,
|
|
21903
21942
|
gap = "md",
|
|
@@ -21918,7 +21957,6 @@ function DataGrid({
|
|
|
21918
21957
|
const { t } = useTranslate();
|
|
21919
21958
|
const [selectedIds, setSelectedIds] = useState(/* @__PURE__ */ new Set());
|
|
21920
21959
|
const [visibleCount, setVisibleCount] = useState(pageSize || Infinity);
|
|
21921
|
-
const fields = fieldsProp ?? columnsProp ?? [];
|
|
21922
21960
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21923
21961
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21924
21962
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
@@ -22261,8 +22299,7 @@ function groupData(items, field) {
|
|
|
22261
22299
|
}
|
|
22262
22300
|
function DataList({
|
|
22263
22301
|
entity,
|
|
22264
|
-
fields
|
|
22265
|
-
columns: columnsProp,
|
|
22302
|
+
fields,
|
|
22266
22303
|
itemActions,
|
|
22267
22304
|
gap = "none",
|
|
22268
22305
|
variant = "default",
|
|
@@ -22290,8 +22327,7 @@ function DataList({
|
|
|
22290
22327
|
}) {
|
|
22291
22328
|
const eventBus = useEventBus();
|
|
22292
22329
|
const { t } = useTranslate();
|
|
22293
|
-
const [visibleCount, setVisibleCount] =
|
|
22294
|
-
const fields = fieldsProp ?? columnsProp ?? [];
|
|
22330
|
+
const [visibleCount, setVisibleCount] = React128__default.useState(pageSize || Infinity);
|
|
22295
22331
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22296
22332
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22297
22333
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
@@ -22331,7 +22367,7 @@ function DataList({
|
|
|
22331
22367
|
const items2 = data.map((item) => item);
|
|
22332
22368
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22333
22369
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
22334
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22370
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
22335
22371
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22336
22372
|
group.items.map((itemData, index) => {
|
|
22337
22373
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22523,7 +22559,7 @@ function DataList({
|
|
|
22523
22559
|
className
|
|
22524
22560
|
),
|
|
22525
22561
|
children: [
|
|
22526
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22562
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
22527
22563
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22528
22564
|
group.items.map(
|
|
22529
22565
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23796,7 +23832,7 @@ var init_WizardProgress = __esm({
|
|
|
23796
23832
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23797
23833
|
const isActive = index === currentStep;
|
|
23798
23834
|
const isCompleted = index < currentStep;
|
|
23799
|
-
return /* @__PURE__ */ jsxs(
|
|
23835
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
23800
23836
|
/* @__PURE__ */ jsx(
|
|
23801
23837
|
"button",
|
|
23802
23838
|
{
|
|
@@ -24707,7 +24743,7 @@ function InventoryGrid({
|
|
|
24707
24743
|
const eventBus = useEventBus();
|
|
24708
24744
|
const slotCount = totalSlots ?? items.length;
|
|
24709
24745
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24710
|
-
const handleSelect =
|
|
24746
|
+
const handleSelect = React128.useCallback(
|
|
24711
24747
|
(id) => {
|
|
24712
24748
|
onSelect?.(id);
|
|
24713
24749
|
if (selectEvent) {
|
|
@@ -24920,15 +24956,15 @@ function GameCanvas2D({
|
|
|
24920
24956
|
fps = 60,
|
|
24921
24957
|
className
|
|
24922
24958
|
}) {
|
|
24923
|
-
const canvasRef =
|
|
24924
|
-
const rafRef =
|
|
24925
|
-
const frameRef =
|
|
24926
|
-
const lastTimeRef =
|
|
24927
|
-
const onDrawRef =
|
|
24959
|
+
const canvasRef = React128.useRef(null);
|
|
24960
|
+
const rafRef = React128.useRef(0);
|
|
24961
|
+
const frameRef = React128.useRef(0);
|
|
24962
|
+
const lastTimeRef = React128.useRef(0);
|
|
24963
|
+
const onDrawRef = React128.useRef(onDraw);
|
|
24928
24964
|
onDrawRef.current = onDraw;
|
|
24929
|
-
const onTickRef =
|
|
24965
|
+
const onTickRef = React128.useRef(onTick);
|
|
24930
24966
|
onTickRef.current = onTick;
|
|
24931
|
-
|
|
24967
|
+
React128.useEffect(() => {
|
|
24932
24968
|
const canvas = canvasRef.current;
|
|
24933
24969
|
if (!canvas) return;
|
|
24934
24970
|
const ctx = canvas.getContext("2d");
|
|
@@ -25217,7 +25253,7 @@ function TurnPanel({
|
|
|
25217
25253
|
className
|
|
25218
25254
|
}) {
|
|
25219
25255
|
const eventBus = useEventBus();
|
|
25220
|
-
const handleAction =
|
|
25256
|
+
const handleAction = React128.useCallback(
|
|
25221
25257
|
(event) => {
|
|
25222
25258
|
if (event) {
|
|
25223
25259
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25363,7 +25399,7 @@ function UnitCommandBar({
|
|
|
25363
25399
|
className
|
|
25364
25400
|
}) {
|
|
25365
25401
|
const eventBus = useEventBus();
|
|
25366
|
-
const handleCommand =
|
|
25402
|
+
const handleCommand = React128.useCallback(
|
|
25367
25403
|
(event) => {
|
|
25368
25404
|
if (event) {
|
|
25369
25405
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25848,7 +25884,7 @@ function GameMenu({
|
|
|
25848
25884
|
} catch {
|
|
25849
25885
|
}
|
|
25850
25886
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25851
|
-
const handleOptionClick =
|
|
25887
|
+
const handleOptionClick = React128.useCallback(
|
|
25852
25888
|
(option) => {
|
|
25853
25889
|
if (option.event && eventBus) {
|
|
25854
25890
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25962,7 +25998,7 @@ function GameOverScreen({
|
|
|
25962
25998
|
} catch {
|
|
25963
25999
|
}
|
|
25964
26000
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25965
|
-
const handleActionClick =
|
|
26001
|
+
const handleActionClick = React128.useCallback(
|
|
25966
26002
|
(action) => {
|
|
25967
26003
|
if (action.event && eventBus) {
|
|
25968
26004
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29066,7 +29102,7 @@ var init_StepFlow = __esm({
|
|
|
29066
29102
|
className
|
|
29067
29103
|
}) => {
|
|
29068
29104
|
if (orientation === "vertical") {
|
|
29069
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29105
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React128__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29070
29106
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29071
29107
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29072
29108
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29077,7 +29113,7 @@ var init_StepFlow = __esm({
|
|
|
29077
29113
|
] })
|
|
29078
29114
|
] }) }, index)) });
|
|
29079
29115
|
}
|
|
29080
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
29116
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
29081
29117
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29082
29118
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29083
29119
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31191,7 +31227,7 @@ var init_DocumentViewer = __esm({
|
|
|
31191
31227
|
}
|
|
31192
31228
|
});
|
|
31193
31229
|
function extractTitle(children) {
|
|
31194
|
-
if (!
|
|
31230
|
+
if (!React128__default.isValidElement(children)) return void 0;
|
|
31195
31231
|
const props = children.props;
|
|
31196
31232
|
if (typeof props.title === "string") {
|
|
31197
31233
|
return props.title;
|
|
@@ -31246,7 +31282,7 @@ function LinearView({
|
|
|
31246
31282
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
31247
31283
|
const isDone = i < currentIdx;
|
|
31248
31284
|
const isCurrent = i === currentIdx;
|
|
31249
|
-
return /* @__PURE__ */ jsxs(
|
|
31285
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
31250
31286
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31251
31287
|
Typography,
|
|
31252
31288
|
{
|
|
@@ -32030,12 +32066,12 @@ var init_Form = __esm({
|
|
|
32030
32066
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
32031
32067
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
32032
32068
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
32033
|
-
const normalizedInitialData =
|
|
32069
|
+
const normalizedInitialData = React128__default.useMemo(() => {
|
|
32034
32070
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
32035
32071
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
32036
32072
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
32037
32073
|
}, [entity, initialData]);
|
|
32038
|
-
const entityDerivedFields =
|
|
32074
|
+
const entityDerivedFields = React128__default.useMemo(() => {
|
|
32039
32075
|
if (fields && fields.length > 0) return void 0;
|
|
32040
32076
|
if (!resolvedEntity) return void 0;
|
|
32041
32077
|
return resolvedEntity.fields.map(
|
|
@@ -32054,14 +32090,14 @@ var init_Form = __esm({
|
|
|
32054
32090
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
32055
32091
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
32056
32092
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
32057
|
-
const [formData, setFormData] =
|
|
32093
|
+
const [formData, setFormData] = React128__default.useState(
|
|
32058
32094
|
normalizedInitialData
|
|
32059
32095
|
);
|
|
32060
|
-
const [collapsedSections, setCollapsedSections] =
|
|
32096
|
+
const [collapsedSections, setCollapsedSections] = React128__default.useState(
|
|
32061
32097
|
/* @__PURE__ */ new Set()
|
|
32062
32098
|
);
|
|
32063
32099
|
const formMode = props.mode;
|
|
32064
|
-
const mountedRef =
|
|
32100
|
+
const mountedRef = React128__default.useRef(false);
|
|
32065
32101
|
if (!mountedRef.current) {
|
|
32066
32102
|
mountedRef.current = true;
|
|
32067
32103
|
debug("forms", "mount", {
|
|
@@ -32074,7 +32110,7 @@ var init_Form = __esm({
|
|
|
32074
32110
|
});
|
|
32075
32111
|
}
|
|
32076
32112
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
32077
|
-
const evalContext =
|
|
32113
|
+
const evalContext = React128__default.useMemo(
|
|
32078
32114
|
() => ({
|
|
32079
32115
|
formValues: formData,
|
|
32080
32116
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -32083,7 +32119,7 @@ var init_Form = __esm({
|
|
|
32083
32119
|
}),
|
|
32084
32120
|
[formData, externalContext]
|
|
32085
32121
|
);
|
|
32086
|
-
|
|
32122
|
+
React128__default.useEffect(() => {
|
|
32087
32123
|
debug("forms", "initialData-sync", {
|
|
32088
32124
|
mode: formMode,
|
|
32089
32125
|
normalizedInitialData,
|
|
@@ -32094,7 +32130,7 @@ var init_Form = __esm({
|
|
|
32094
32130
|
setFormData(normalizedInitialData);
|
|
32095
32131
|
}
|
|
32096
32132
|
}, [normalizedInitialData]);
|
|
32097
|
-
const processCalculations =
|
|
32133
|
+
const processCalculations = React128__default.useCallback(
|
|
32098
32134
|
(changedFieldId, newFormData) => {
|
|
32099
32135
|
if (!hiddenCalculations.length) return;
|
|
32100
32136
|
const context = {
|
|
@@ -32119,7 +32155,7 @@ var init_Form = __esm({
|
|
|
32119
32155
|
},
|
|
32120
32156
|
[hiddenCalculations, externalContext, eventBus]
|
|
32121
32157
|
);
|
|
32122
|
-
const checkViolations =
|
|
32158
|
+
const checkViolations = React128__default.useCallback(
|
|
32123
32159
|
(changedFieldId, newFormData) => {
|
|
32124
32160
|
if (!violationTriggers.length) return;
|
|
32125
32161
|
const context = {
|
|
@@ -32157,7 +32193,7 @@ var init_Form = __esm({
|
|
|
32157
32193
|
processCalculations(name, newFormData);
|
|
32158
32194
|
checkViolations(name, newFormData);
|
|
32159
32195
|
};
|
|
32160
|
-
const isFieldVisible =
|
|
32196
|
+
const isFieldVisible = React128__default.useCallback(
|
|
32161
32197
|
(fieldName) => {
|
|
32162
32198
|
const condition = conditionalFields[fieldName];
|
|
32163
32199
|
if (!condition) return true;
|
|
@@ -32165,7 +32201,7 @@ var init_Form = __esm({
|
|
|
32165
32201
|
},
|
|
32166
32202
|
[conditionalFields, evalContext]
|
|
32167
32203
|
);
|
|
32168
|
-
const isSectionVisible =
|
|
32204
|
+
const isSectionVisible = React128__default.useCallback(
|
|
32169
32205
|
(section) => {
|
|
32170
32206
|
if (!section.condition) return true;
|
|
32171
32207
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -32209,7 +32245,7 @@ var init_Form = __esm({
|
|
|
32209
32245
|
eventBus.emit(`UI:${onCancel}`);
|
|
32210
32246
|
}
|
|
32211
32247
|
};
|
|
32212
|
-
const renderField =
|
|
32248
|
+
const renderField = React128__default.useCallback(
|
|
32213
32249
|
(field) => {
|
|
32214
32250
|
const fieldName = field.name || field.field;
|
|
32215
32251
|
if (!fieldName) return null;
|
|
@@ -32230,7 +32266,7 @@ var init_Form = __esm({
|
|
|
32230
32266
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
32231
32267
|
);
|
|
32232
32268
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
32233
|
-
const normalizedFields =
|
|
32269
|
+
const normalizedFields = React128__default.useMemo(() => {
|
|
32234
32270
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
32235
32271
|
return effectiveFields.map((field) => {
|
|
32236
32272
|
if (typeof field === "string") {
|
|
@@ -32252,7 +32288,7 @@ var init_Form = __esm({
|
|
|
32252
32288
|
return field;
|
|
32253
32289
|
});
|
|
32254
32290
|
}, [effectiveFields, resolvedEntity]);
|
|
32255
|
-
const schemaFields =
|
|
32291
|
+
const schemaFields = React128__default.useMemo(() => {
|
|
32256
32292
|
if (normalizedFields.length === 0) return null;
|
|
32257
32293
|
if (isDebugEnabled()) {
|
|
32258
32294
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -32262,7 +32298,7 @@ var init_Form = __esm({
|
|
|
32262
32298
|
}
|
|
32263
32299
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
32264
32300
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
32265
|
-
const sectionElements =
|
|
32301
|
+
const sectionElements = React128__default.useMemo(() => {
|
|
32266
32302
|
if (!sections || sections.length === 0) return null;
|
|
32267
32303
|
return sections.map((section) => {
|
|
32268
32304
|
if (!isSectionVisible(section)) {
|
|
@@ -33786,7 +33822,7 @@ var init_List = __esm({
|
|
|
33786
33822
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
33787
33823
|
return [];
|
|
33788
33824
|
}, [entity]);
|
|
33789
|
-
const getItemActions =
|
|
33825
|
+
const getItemActions = React128__default.useCallback(
|
|
33790
33826
|
(item) => {
|
|
33791
33827
|
if (!itemActions) return [];
|
|
33792
33828
|
if (typeof itemActions === "function") {
|
|
@@ -34223,7 +34259,7 @@ var init_MediaGallery = __esm({
|
|
|
34223
34259
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
34224
34260
|
);
|
|
34225
34261
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
34226
|
-
const items =
|
|
34262
|
+
const items = React128__default.useMemo(() => {
|
|
34227
34263
|
if (propItems) return propItems;
|
|
34228
34264
|
if (entityData.length === 0) return [];
|
|
34229
34265
|
return entityData.map((record, idx) => ({
|
|
@@ -34387,7 +34423,7 @@ var init_MediaGallery = __esm({
|
|
|
34387
34423
|
}
|
|
34388
34424
|
});
|
|
34389
34425
|
function extractTitle2(children) {
|
|
34390
|
-
if (!
|
|
34426
|
+
if (!React128__default.isValidElement(children)) return void 0;
|
|
34391
34427
|
const props = children.props;
|
|
34392
34428
|
if (typeof props.title === "string") {
|
|
34393
34429
|
return props.title;
|
|
@@ -35100,7 +35136,7 @@ var init_PageHeader = __esm({
|
|
|
35100
35136
|
info: "bg-info/10 text-info"
|
|
35101
35137
|
};
|
|
35102
35138
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35103
|
-
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(
|
|
35139
|
+
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(React128__default.Fragment, { children: [
|
|
35104
35140
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35105
35141
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35106
35142
|
"a",
|
|
@@ -35293,7 +35329,7 @@ var init_debugRegistry = __esm({
|
|
|
35293
35329
|
}
|
|
35294
35330
|
});
|
|
35295
35331
|
function useDebugData() {
|
|
35296
|
-
const [data, setData] =
|
|
35332
|
+
const [data, setData] = React128.useState(() => ({
|
|
35297
35333
|
traits: [],
|
|
35298
35334
|
ticks: [],
|
|
35299
35335
|
guards: [],
|
|
@@ -35307,7 +35343,7 @@ function useDebugData() {
|
|
|
35307
35343
|
},
|
|
35308
35344
|
lastUpdate: Date.now()
|
|
35309
35345
|
}));
|
|
35310
|
-
|
|
35346
|
+
React128.useEffect(() => {
|
|
35311
35347
|
const updateData = () => {
|
|
35312
35348
|
setData({
|
|
35313
35349
|
traits: getAllTraits(),
|
|
@@ -35416,12 +35452,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
35416
35452
|
return positions;
|
|
35417
35453
|
}
|
|
35418
35454
|
function WalkMinimap() {
|
|
35419
|
-
const [walkStep, setWalkStep] =
|
|
35420
|
-
const [traits2, setTraits] =
|
|
35421
|
-
const [coveredEdges, setCoveredEdges] =
|
|
35422
|
-
const [completedTraits, setCompletedTraits] =
|
|
35423
|
-
const prevTraitRef =
|
|
35424
|
-
|
|
35455
|
+
const [walkStep, setWalkStep] = React128.useState(null);
|
|
35456
|
+
const [traits2, setTraits] = React128.useState([]);
|
|
35457
|
+
const [coveredEdges, setCoveredEdges] = React128.useState([]);
|
|
35458
|
+
const [completedTraits, setCompletedTraits] = React128.useState(/* @__PURE__ */ new Set());
|
|
35459
|
+
const prevTraitRef = React128.useRef(null);
|
|
35460
|
+
React128.useEffect(() => {
|
|
35425
35461
|
const interval = setInterval(() => {
|
|
35426
35462
|
const w = window;
|
|
35427
35463
|
const step = w.__orbitalWalkStep;
|
|
@@ -35868,15 +35904,15 @@ var init_EntitiesTab = __esm({
|
|
|
35868
35904
|
}
|
|
35869
35905
|
});
|
|
35870
35906
|
function EventFlowTab({ events: events2 }) {
|
|
35871
|
-
const [filter, setFilter] =
|
|
35872
|
-
const containerRef =
|
|
35873
|
-
const [autoScroll, setAutoScroll] =
|
|
35874
|
-
|
|
35907
|
+
const [filter, setFilter] = React128.useState("all");
|
|
35908
|
+
const containerRef = React128.useRef(null);
|
|
35909
|
+
const [autoScroll, setAutoScroll] = React128.useState(true);
|
|
35910
|
+
React128.useEffect(() => {
|
|
35875
35911
|
if (autoScroll && containerRef.current) {
|
|
35876
35912
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35877
35913
|
}
|
|
35878
35914
|
}, [events2.length, autoScroll]);
|
|
35879
|
-
const filteredEvents =
|
|
35915
|
+
const filteredEvents = React128.useMemo(() => {
|
|
35880
35916
|
if (filter === "all") return events2;
|
|
35881
35917
|
return events2.filter((e) => e.type === filter);
|
|
35882
35918
|
}, [events2, filter]);
|
|
@@ -35995,7 +36031,7 @@ var init_EventFlowTab = __esm({
|
|
|
35995
36031
|
}
|
|
35996
36032
|
});
|
|
35997
36033
|
function GuardsPanel({ guards }) {
|
|
35998
|
-
const [filter, setFilter] =
|
|
36034
|
+
const [filter, setFilter] = React128.useState("all");
|
|
35999
36035
|
if (guards.length === 0) {
|
|
36000
36036
|
return /* @__PURE__ */ jsx(
|
|
36001
36037
|
EmptyState,
|
|
@@ -36008,7 +36044,7 @@ function GuardsPanel({ guards }) {
|
|
|
36008
36044
|
}
|
|
36009
36045
|
const passedCount = guards.filter((g) => g.result).length;
|
|
36010
36046
|
const failedCount = guards.length - passedCount;
|
|
36011
|
-
const filteredGuards =
|
|
36047
|
+
const filteredGuards = React128.useMemo(() => {
|
|
36012
36048
|
if (filter === "all") return guards;
|
|
36013
36049
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
36014
36050
|
return guards.filter((g) => !g.result);
|
|
@@ -36169,10 +36205,10 @@ function EffectBadge({ effect }) {
|
|
|
36169
36205
|
] });
|
|
36170
36206
|
}
|
|
36171
36207
|
function TransitionTimeline({ transitions }) {
|
|
36172
|
-
const containerRef =
|
|
36173
|
-
const [autoScroll, setAutoScroll] =
|
|
36174
|
-
const [expandedId, setExpandedId] =
|
|
36175
|
-
|
|
36208
|
+
const containerRef = React128.useRef(null);
|
|
36209
|
+
const [autoScroll, setAutoScroll] = React128.useState(true);
|
|
36210
|
+
const [expandedId, setExpandedId] = React128.useState(null);
|
|
36211
|
+
React128.useEffect(() => {
|
|
36176
36212
|
if (autoScroll && containerRef.current) {
|
|
36177
36213
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
36178
36214
|
}
|
|
@@ -36458,9 +36494,9 @@ function getAllEvents(traits2) {
|
|
|
36458
36494
|
}
|
|
36459
36495
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
36460
36496
|
const eventBus = useEventBus();
|
|
36461
|
-
const [log4, setLog] =
|
|
36462
|
-
const prevStatesRef =
|
|
36463
|
-
|
|
36497
|
+
const [log4, setLog] = React128.useState([]);
|
|
36498
|
+
const prevStatesRef = React128.useRef(/* @__PURE__ */ new Map());
|
|
36499
|
+
React128.useEffect(() => {
|
|
36464
36500
|
for (const trait of traits2) {
|
|
36465
36501
|
const prev = prevStatesRef.current.get(trait.id);
|
|
36466
36502
|
if (prev && prev !== trait.currentState) {
|
|
@@ -36630,10 +36666,10 @@ function VerifyModePanel({
|
|
|
36630
36666
|
serverCount,
|
|
36631
36667
|
localCount
|
|
36632
36668
|
}) {
|
|
36633
|
-
const [expanded, setExpanded] =
|
|
36634
|
-
const scrollRef =
|
|
36635
|
-
const prevCountRef =
|
|
36636
|
-
|
|
36669
|
+
const [expanded, setExpanded] = React128.useState(true);
|
|
36670
|
+
const scrollRef = React128.useRef(null);
|
|
36671
|
+
const prevCountRef = React128.useRef(0);
|
|
36672
|
+
React128.useEffect(() => {
|
|
36637
36673
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
36638
36674
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
36639
36675
|
}
|
|
@@ -36699,10 +36735,10 @@ function RuntimeDebugger({
|
|
|
36699
36735
|
defaultTab,
|
|
36700
36736
|
schema
|
|
36701
36737
|
}) {
|
|
36702
|
-
const [isCollapsed, setIsCollapsed] =
|
|
36703
|
-
const [isVisible, setIsVisible] =
|
|
36738
|
+
const [isCollapsed, setIsCollapsed] = React128.useState(mode === "verify" ? true : defaultCollapsed);
|
|
36739
|
+
const [isVisible, setIsVisible] = React128.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
36704
36740
|
const debugData = useDebugData();
|
|
36705
|
-
|
|
36741
|
+
React128.useEffect(() => {
|
|
36706
36742
|
if (mode === "inline") return;
|
|
36707
36743
|
return onDebugToggle((enabled) => {
|
|
36708
36744
|
setIsVisible(enabled);
|
|
@@ -36711,7 +36747,7 @@ function RuntimeDebugger({
|
|
|
36711
36747
|
}
|
|
36712
36748
|
});
|
|
36713
36749
|
}, [mode]);
|
|
36714
|
-
|
|
36750
|
+
React128.useEffect(() => {
|
|
36715
36751
|
if (mode === "inline") return;
|
|
36716
36752
|
const handleKeyDown = (e) => {
|
|
36717
36753
|
if (e.key === "`" && isVisible) {
|
|
@@ -37260,7 +37296,7 @@ function SequenceBar({
|
|
|
37260
37296
|
onSlotRemove(index);
|
|
37261
37297
|
}, [onSlotRemove, playing]);
|
|
37262
37298
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
37263
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
37299
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
37264
37300
|
i > 0 && /* @__PURE__ */ jsx(
|
|
37265
37301
|
Typography,
|
|
37266
37302
|
{
|
|
@@ -38605,7 +38641,7 @@ var init_StatCard2 = __esm({
|
|
|
38605
38641
|
const labelToUse = propLabel ?? propTitle;
|
|
38606
38642
|
const eventBus = useEventBus();
|
|
38607
38643
|
const { t } = useTranslate();
|
|
38608
|
-
const handleActionClick =
|
|
38644
|
+
const handleActionClick = React128__default.useCallback(() => {
|
|
38609
38645
|
if (action?.event) {
|
|
38610
38646
|
eventBus.emit(`UI:${action.event}`, {});
|
|
38611
38647
|
}
|
|
@@ -38616,7 +38652,7 @@ var init_StatCard2 = __esm({
|
|
|
38616
38652
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38617
38653
|
const isLoading = externalLoading ?? false;
|
|
38618
38654
|
const error = externalError;
|
|
38619
|
-
const computeMetricValue =
|
|
38655
|
+
const computeMetricValue = React128__default.useCallback(
|
|
38620
38656
|
(metric, items) => {
|
|
38621
38657
|
if (metric.value !== void 0) {
|
|
38622
38658
|
return metric.value;
|
|
@@ -38655,7 +38691,7 @@ var init_StatCard2 = __esm({
|
|
|
38655
38691
|
},
|
|
38656
38692
|
[]
|
|
38657
38693
|
);
|
|
38658
|
-
const schemaStats =
|
|
38694
|
+
const schemaStats = React128__default.useMemo(() => {
|
|
38659
38695
|
if (!metrics || metrics.length === 0) return null;
|
|
38660
38696
|
return metrics.map((metric) => ({
|
|
38661
38697
|
label: metric.label,
|
|
@@ -38663,7 +38699,7 @@ var init_StatCard2 = __esm({
|
|
|
38663
38699
|
format: metric.format
|
|
38664
38700
|
}));
|
|
38665
38701
|
}, [metrics, data, computeMetricValue]);
|
|
38666
|
-
const calculatedTrend =
|
|
38702
|
+
const calculatedTrend = React128__default.useMemo(() => {
|
|
38667
38703
|
if (manualTrend !== void 0) return manualTrend;
|
|
38668
38704
|
if (previousValue === void 0 || currentValue === void 0)
|
|
38669
38705
|
return void 0;
|
|
@@ -39647,7 +39683,7 @@ var init_Timeline = __esm({
|
|
|
39647
39683
|
}) => {
|
|
39648
39684
|
const { t } = useTranslate();
|
|
39649
39685
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39650
|
-
const items =
|
|
39686
|
+
const items = React128__default.useMemo(() => {
|
|
39651
39687
|
if (propItems) return propItems;
|
|
39652
39688
|
if (entityData.length === 0) return [];
|
|
39653
39689
|
return entityData.map((record, idx) => {
|
|
@@ -39754,7 +39790,7 @@ var init_Timeline = __esm({
|
|
|
39754
39790
|
}
|
|
39755
39791
|
});
|
|
39756
39792
|
function extractToastProps(children) {
|
|
39757
|
-
if (!
|
|
39793
|
+
if (!React128__default.isValidElement(children)) {
|
|
39758
39794
|
if (typeof children === "string") {
|
|
39759
39795
|
return { message: children };
|
|
39760
39796
|
}
|
|
@@ -39792,7 +39828,7 @@ var init_ToastSlot = __esm({
|
|
|
39792
39828
|
eventBus.emit("UI:CLOSE");
|
|
39793
39829
|
};
|
|
39794
39830
|
if (!isVisible) return null;
|
|
39795
|
-
const isCustomContent =
|
|
39831
|
+
const isCustomContent = React128__default.isValidElement(children) && !message;
|
|
39796
39832
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
39797
39833
|
Toast,
|
|
39798
39834
|
{
|
|
@@ -40061,7 +40097,7 @@ var init_WizardContainer = __esm({
|
|
|
40061
40097
|
const isCompleted = index < currentStep;
|
|
40062
40098
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
40063
40099
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
40064
|
-
return /* @__PURE__ */ jsxs(
|
|
40100
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
40065
40101
|
/* @__PURE__ */ jsx(
|
|
40066
40102
|
Button,
|
|
40067
40103
|
{
|
|
@@ -42250,7 +42286,7 @@ function UnitRenderer({
|
|
|
42250
42286
|
onAnimationStateChange,
|
|
42251
42287
|
animationSpeed = 1
|
|
42252
42288
|
}) {
|
|
42253
|
-
const handleUnitClick =
|
|
42289
|
+
const handleUnitClick = React128__default.useCallback(
|
|
42254
42290
|
(unit) => {
|
|
42255
42291
|
onUnitClick?.(unit);
|
|
42256
42292
|
},
|
|
@@ -45444,7 +45480,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45444
45480
|
const handleTraitClick = useCallback((name) => {
|
|
45445
45481
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
45446
45482
|
}, []);
|
|
45447
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
45483
|
+
const [highlightedTrait, setHighlightedTrait] = React128__default.useState(null);
|
|
45448
45484
|
const handleTransitionClick = useCallback((index) => {
|
|
45449
45485
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
45450
45486
|
}, []);
|
|
@@ -45531,7 +45567,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45531
45567
|
gap: "xs",
|
|
45532
45568
|
align: "center",
|
|
45533
45569
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
45534
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
45570
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
45535
45571
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
45536
45572
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
45537
45573
|
Box,
|
|
@@ -45909,12 +45945,12 @@ var init_three = __esm({
|
|
|
45909
45945
|
}
|
|
45910
45946
|
});
|
|
45911
45947
|
function lazyThree(name, loader) {
|
|
45912
|
-
const Lazy =
|
|
45948
|
+
const Lazy = React128__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45913
45949
|
function ThreeWrapper(props) {
|
|
45914
|
-
return
|
|
45915
|
-
|
|
45950
|
+
return React128__default.createElement(
|
|
45951
|
+
React128__default.Suspense,
|
|
45916
45952
|
{ fallback: null },
|
|
45917
|
-
|
|
45953
|
+
React128__default.createElement(Lazy, props)
|
|
45918
45954
|
);
|
|
45919
45955
|
}
|
|
45920
45956
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46402,7 +46438,7 @@ function SuspenseConfigProvider({
|
|
|
46402
46438
|
config,
|
|
46403
46439
|
children
|
|
46404
46440
|
}) {
|
|
46405
|
-
return
|
|
46441
|
+
return React128__default.createElement(
|
|
46406
46442
|
SuspenseConfigContext.Provider,
|
|
46407
46443
|
{ value: config },
|
|
46408
46444
|
children
|
|
@@ -46588,6 +46624,17 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46588
46624
|
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
46589
46625
|
}
|
|
46590
46626
|
}
|
|
46627
|
+
function MaybeTraitScope({
|
|
46628
|
+
sourceTrait,
|
|
46629
|
+
children
|
|
46630
|
+
}) {
|
|
46631
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
46632
|
+
const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
|
|
46633
|
+
if (sourceTrait !== void 0 && orbital !== void 0) {
|
|
46634
|
+
return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: sourceTrait, children });
|
|
46635
|
+
}
|
|
46636
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
46637
|
+
}
|
|
46591
46638
|
function UISlotComponent({
|
|
46592
46639
|
slot,
|
|
46593
46640
|
portal = false,
|
|
@@ -46615,11 +46662,11 @@ function UISlotComponent({
|
|
|
46615
46662
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46616
46663
|
"data-pattern": pattern,
|
|
46617
46664
|
"data-source-trait": sourceTrait,
|
|
46618
|
-
children
|
|
46665
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children })
|
|
46619
46666
|
}
|
|
46620
46667
|
);
|
|
46621
46668
|
}
|
|
46622
|
-
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children });
|
|
46669
|
+
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children }) });
|
|
46623
46670
|
}
|
|
46624
46671
|
return /* @__PURE__ */ jsx(
|
|
46625
46672
|
Box,
|
|
@@ -46628,7 +46675,7 @@ function UISlotComponent({
|
|
|
46628
46675
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46629
46676
|
"data-pattern": pattern,
|
|
46630
46677
|
"data-source-trait": sourceTrait,
|
|
46631
|
-
children
|
|
46678
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children })
|
|
46632
46679
|
}
|
|
46633
46680
|
);
|
|
46634
46681
|
}
|
|
@@ -46674,7 +46721,7 @@ function UISlotComponent({
|
|
|
46674
46721
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46675
46722
|
"data-pattern": content.pattern,
|
|
46676
46723
|
"data-source-trait": content.sourceTrait,
|
|
46677
|
-
children: wrappedContent
|
|
46724
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: content.sourceTrait, children: wrappedContent })
|
|
46678
46725
|
}
|
|
46679
46726
|
);
|
|
46680
46727
|
}
|
|
@@ -46782,7 +46829,7 @@ function SlotPortal({
|
|
|
46782
46829
|
});
|
|
46783
46830
|
if (!portalRoot) return null;
|
|
46784
46831
|
const slotId = `slot-${slot}`;
|
|
46785
|
-
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
46832
|
+
const slotContent = /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: content.sourceTrait, children: /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss }) });
|
|
46786
46833
|
let wrapper;
|
|
46787
46834
|
switch (slot) {
|
|
46788
46835
|
case "modal":
|
|
@@ -46866,7 +46913,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46866
46913
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46867
46914
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46868
46915
|
}
|
|
46869
|
-
return /* @__PURE__ */ jsx(
|
|
46916
|
+
return /* @__PURE__ */ jsx(React128__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46870
46917
|
}
|
|
46871
46918
|
if (!child || typeof child !== "object") return null;
|
|
46872
46919
|
const childId = `${parentId}-${index}`;
|
|
@@ -47073,6 +47120,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47073
47120
|
"components/organisms/UISlotRenderer.tsx"() {
|
|
47074
47121
|
"use client";
|
|
47075
47122
|
init_EntitySchemaContext();
|
|
47123
|
+
init_TraitScopeProvider();
|
|
47076
47124
|
init_UISlotContext();
|
|
47077
47125
|
init_Modal();
|
|
47078
47126
|
init_Drawer();
|
|
@@ -47507,7 +47555,7 @@ var AvlTransition = ({
|
|
|
47507
47555
|
opacity = 1,
|
|
47508
47556
|
className
|
|
47509
47557
|
}) => {
|
|
47510
|
-
const ids =
|
|
47558
|
+
const ids = React128__default.useMemo(() => {
|
|
47511
47559
|
avlTransitionId += 1;
|
|
47512
47560
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47513
47561
|
}, []);
|
|
@@ -48272,7 +48320,7 @@ var AvlStateMachine = ({
|
|
|
48272
48320
|
color = "var(--color-primary)",
|
|
48273
48321
|
animated = false
|
|
48274
48322
|
}) => {
|
|
48275
|
-
const ids =
|
|
48323
|
+
const ids = React128__default.useMemo(() => {
|
|
48276
48324
|
avlSmId += 1;
|
|
48277
48325
|
const base = `avl-sm-${avlSmId}`;
|
|
48278
48326
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48467,7 +48515,7 @@ var AvlOrbitalUnit = ({
|
|
|
48467
48515
|
color = "var(--color-primary)",
|
|
48468
48516
|
animated = false
|
|
48469
48517
|
}) => {
|
|
48470
|
-
const ids =
|
|
48518
|
+
const ids = React128__default.useMemo(() => {
|
|
48471
48519
|
avlOuId += 1;
|
|
48472
48520
|
const base = `avl-ou-${avlOuId}`;
|
|
48473
48521
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48559,7 +48607,7 @@ var AvlClosedCircuit = ({
|
|
|
48559
48607
|
color = "var(--color-primary)",
|
|
48560
48608
|
animated = false
|
|
48561
48609
|
}) => {
|
|
48562
|
-
const ids =
|
|
48610
|
+
const ids = React128__default.useMemo(() => {
|
|
48563
48611
|
avlCcId += 1;
|
|
48564
48612
|
const base = `avl-cc-${avlCcId}`;
|
|
48565
48613
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48712,7 +48760,7 @@ var AvlEmitListen = ({
|
|
|
48712
48760
|
color = "var(--color-primary)",
|
|
48713
48761
|
animated = false
|
|
48714
48762
|
}) => {
|
|
48715
|
-
const ids =
|
|
48763
|
+
const ids = React128__default.useMemo(() => {
|
|
48716
48764
|
avlElId += 1;
|
|
48717
48765
|
const base = `avl-el-${avlElId}`;
|
|
48718
48766
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -48985,7 +49033,7 @@ function renderNode(node, color, glowId) {
|
|
|
48985
49033
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
48986
49034
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
48987
49035
|
const nc = nodeColor(node.type, color);
|
|
48988
|
-
return /* @__PURE__ */ jsxs(
|
|
49036
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
48989
49037
|
node.children.map((child, i) => {
|
|
48990
49038
|
const childR = Math.max(
|
|
48991
49039
|
child.type === "operator" ? 20 : 16,
|
|
@@ -49042,7 +49090,7 @@ var AvlExprTree = ({
|
|
|
49042
49090
|
className,
|
|
49043
49091
|
color = "var(--color-primary)"
|
|
49044
49092
|
}) => {
|
|
49045
|
-
const ids =
|
|
49093
|
+
const ids = React128__default.useMemo(() => {
|
|
49046
49094
|
avlEtId += 1;
|
|
49047
49095
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
49048
49096
|
}, []);
|
|
@@ -50016,7 +50064,7 @@ var SystemNode = ({ data }) => {
|
|
|
50016
50064
|
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) => {
|
|
50017
50065
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50018
50066
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
50019
|
-
return /* @__PURE__ */ jsxs(
|
|
50067
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
50020
50068
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
50021
50069
|
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 })
|
|
50022
50070
|
] }, s.name);
|
|
@@ -50056,7 +50104,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
50056
50104
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
50057
50105
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50058
50106
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
50059
|
-
return /* @__PURE__ */ jsxs(
|
|
50107
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
50060
50108
|
/* @__PURE__ */ jsx(
|
|
50061
50109
|
AvlState,
|
|
50062
50110
|
{
|
|
@@ -52458,6 +52506,24 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
52458
52506
|
}
|
|
52459
52507
|
return map;
|
|
52460
52508
|
}, [schema]);
|
|
52509
|
+
const traitLinkedEntitiesMap = useMemo(() => {
|
|
52510
|
+
const map = /* @__PURE__ */ new Map();
|
|
52511
|
+
if (ir) {
|
|
52512
|
+
for (const page of ir.pages.values()) {
|
|
52513
|
+
for (const binding of page.traits) {
|
|
52514
|
+
if (binding.linkedEntity) {
|
|
52515
|
+
map.set(binding.trait.name, binding.linkedEntity);
|
|
52516
|
+
}
|
|
52517
|
+
}
|
|
52518
|
+
}
|
|
52519
|
+
}
|
|
52520
|
+
return map;
|
|
52521
|
+
}, [ir]);
|
|
52522
|
+
const orbitalsByTraitMap = useMemo(
|
|
52523
|
+
() => new Map(Object.entries(orbitalsByTrait)),
|
|
52524
|
+
[orbitalsByTrait]
|
|
52525
|
+
);
|
|
52526
|
+
const entitiesArray = useMemo(() => Array.from(allEntities.values()), [allEntities]);
|
|
52461
52527
|
const pageOrbitalNames = useMemo(() => {
|
|
52462
52528
|
const set = /* @__PURE__ */ new Set();
|
|
52463
52529
|
for (const binding of allPageTraits) {
|
|
@@ -52501,20 +52567,9 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
52501
52567
|
const inner = /* @__PURE__ */ jsx(VerificationProvider, { enabled: true, children: /* @__PURE__ */ jsx(SlotsProvider, { children: /* @__PURE__ */ jsxs(
|
|
52502
52568
|
EntitySchemaProvider,
|
|
52503
52569
|
{
|
|
52504
|
-
entities:
|
|
52505
|
-
traitLinkedEntities:
|
|
52506
|
-
|
|
52507
|
-
if (ir) {
|
|
52508
|
-
for (const page of ir.pages.values()) {
|
|
52509
|
-
for (const binding of page.traits) {
|
|
52510
|
-
if (binding.linkedEntity) {
|
|
52511
|
-
map.set(binding.trait.name, binding.linkedEntity);
|
|
52512
|
-
}
|
|
52513
|
-
}
|
|
52514
|
-
}
|
|
52515
|
-
}
|
|
52516
|
-
return map;
|
|
52517
|
-
})(),
|
|
52570
|
+
entities: entitiesArray,
|
|
52571
|
+
traitLinkedEntities: traitLinkedEntitiesMap,
|
|
52572
|
+
orbitalsByTrait: orbitalsByTraitMap,
|
|
52518
52573
|
children: [
|
|
52519
52574
|
/* @__PURE__ */ jsx(
|
|
52520
52575
|
TraitInitializer,
|
|
@@ -53036,7 +53091,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
53036
53091
|
}
|
|
53037
53092
|
);
|
|
53038
53093
|
};
|
|
53039
|
-
var OrbPreviewNode =
|
|
53094
|
+
var OrbPreviewNode = React128__default.memo(OrbPreviewNodeInner);
|
|
53040
53095
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
53041
53096
|
var EventFlowEdgeInner = (props) => {
|
|
53042
53097
|
const {
|
|
@@ -53113,7 +53168,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
53113
53168
|
) })
|
|
53114
53169
|
] });
|
|
53115
53170
|
};
|
|
53116
|
-
var EventFlowEdge =
|
|
53171
|
+
var EventFlowEdge = React128__default.memo(EventFlowEdgeInner);
|
|
53117
53172
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
53118
53173
|
|
|
53119
53174
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -53252,7 +53307,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
53252
53307
|
}
|
|
53253
53308
|
);
|
|
53254
53309
|
};
|
|
53255
|
-
var BehaviorComposeNode =
|
|
53310
|
+
var BehaviorComposeNode = React128__default.memo(BehaviorComposeNodeInner);
|
|
53256
53311
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
53257
53312
|
|
|
53258
53313
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -54192,7 +54247,7 @@ var ZoomBreadcrumb = ({
|
|
|
54192
54247
|
if (eventName && band === "detail") {
|
|
54193
54248
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
54194
54249
|
}
|
|
54195
|
-
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(
|
|
54250
|
+
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(React128__default.Fragment, { children: [
|
|
54196
54251
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
54197
54252
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
54198
54253
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54651,7 +54706,7 @@ var EventWireOverlay = ({
|
|
|
54651
54706
|
containerW,
|
|
54652
54707
|
containerH
|
|
54653
54708
|
}) => {
|
|
54654
|
-
const ids =
|
|
54709
|
+
const ids = React128__default.useMemo(() => {
|
|
54655
54710
|
avlOczWireId += 1;
|
|
54656
54711
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54657
54712
|
}, []);
|
|
@@ -54969,7 +55024,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54969
55024
|
borderRadius: 6,
|
|
54970
55025
|
border: `1px solid ${color}`
|
|
54971
55026
|
},
|
|
54972
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
55027
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
54973
55028
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54974
55029
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54975
55030
|
Box,
|