@almadar/ui 4.8.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 +1340 -1281
- package/dist/avl/index.js +247 -188
- package/dist/components/index.cjs +33 -6
- package/dist/components/index.js +35 -8
- 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 +47 -6
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +48 -9
- package/dist/runtime/EntitySchemaContext.d.ts +16 -1
- package/dist/runtime/index.cjs +61 -22
- package/dist/runtime/index.js +63 -24
- 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);
|
|
@@ -22287,7 +22327,7 @@ function DataList({
|
|
|
22287
22327
|
}) {
|
|
22288
22328
|
const eventBus = useEventBus();
|
|
22289
22329
|
const { t } = useTranslate();
|
|
22290
|
-
const [visibleCount, setVisibleCount] =
|
|
22330
|
+
const [visibleCount, setVisibleCount] = React128__default.useState(pageSize || Infinity);
|
|
22291
22331
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22292
22332
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22293
22333
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
@@ -22327,7 +22367,7 @@ function DataList({
|
|
|
22327
22367
|
const items2 = data.map((item) => item);
|
|
22328
22368
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22329
22369
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
22330
|
-
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: [
|
|
22331
22371
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22332
22372
|
group.items.map((itemData, index) => {
|
|
22333
22373
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22519,7 +22559,7 @@ function DataList({
|
|
|
22519
22559
|
className
|
|
22520
22560
|
),
|
|
22521
22561
|
children: [
|
|
22522
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22562
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
22523
22563
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22524
22564
|
group.items.map(
|
|
22525
22565
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23792,7 +23832,7 @@ var init_WizardProgress = __esm({
|
|
|
23792
23832
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23793
23833
|
const isActive = index === currentStep;
|
|
23794
23834
|
const isCompleted = index < currentStep;
|
|
23795
|
-
return /* @__PURE__ */ jsxs(
|
|
23835
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
23796
23836
|
/* @__PURE__ */ jsx(
|
|
23797
23837
|
"button",
|
|
23798
23838
|
{
|
|
@@ -24703,7 +24743,7 @@ function InventoryGrid({
|
|
|
24703
24743
|
const eventBus = useEventBus();
|
|
24704
24744
|
const slotCount = totalSlots ?? items.length;
|
|
24705
24745
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24706
|
-
const handleSelect =
|
|
24746
|
+
const handleSelect = React128.useCallback(
|
|
24707
24747
|
(id) => {
|
|
24708
24748
|
onSelect?.(id);
|
|
24709
24749
|
if (selectEvent) {
|
|
@@ -24916,15 +24956,15 @@ function GameCanvas2D({
|
|
|
24916
24956
|
fps = 60,
|
|
24917
24957
|
className
|
|
24918
24958
|
}) {
|
|
24919
|
-
const canvasRef =
|
|
24920
|
-
const rafRef =
|
|
24921
|
-
const frameRef =
|
|
24922
|
-
const lastTimeRef =
|
|
24923
|
-
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);
|
|
24924
24964
|
onDrawRef.current = onDraw;
|
|
24925
|
-
const onTickRef =
|
|
24965
|
+
const onTickRef = React128.useRef(onTick);
|
|
24926
24966
|
onTickRef.current = onTick;
|
|
24927
|
-
|
|
24967
|
+
React128.useEffect(() => {
|
|
24928
24968
|
const canvas = canvasRef.current;
|
|
24929
24969
|
if (!canvas) return;
|
|
24930
24970
|
const ctx = canvas.getContext("2d");
|
|
@@ -25213,7 +25253,7 @@ function TurnPanel({
|
|
|
25213
25253
|
className
|
|
25214
25254
|
}) {
|
|
25215
25255
|
const eventBus = useEventBus();
|
|
25216
|
-
const handleAction =
|
|
25256
|
+
const handleAction = React128.useCallback(
|
|
25217
25257
|
(event) => {
|
|
25218
25258
|
if (event) {
|
|
25219
25259
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25359,7 +25399,7 @@ function UnitCommandBar({
|
|
|
25359
25399
|
className
|
|
25360
25400
|
}) {
|
|
25361
25401
|
const eventBus = useEventBus();
|
|
25362
|
-
const handleCommand =
|
|
25402
|
+
const handleCommand = React128.useCallback(
|
|
25363
25403
|
(event) => {
|
|
25364
25404
|
if (event) {
|
|
25365
25405
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25844,7 +25884,7 @@ function GameMenu({
|
|
|
25844
25884
|
} catch {
|
|
25845
25885
|
}
|
|
25846
25886
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25847
|
-
const handleOptionClick =
|
|
25887
|
+
const handleOptionClick = React128.useCallback(
|
|
25848
25888
|
(option) => {
|
|
25849
25889
|
if (option.event && eventBus) {
|
|
25850
25890
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25958,7 +25998,7 @@ function GameOverScreen({
|
|
|
25958
25998
|
} catch {
|
|
25959
25999
|
}
|
|
25960
26000
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25961
|
-
const handleActionClick =
|
|
26001
|
+
const handleActionClick = React128.useCallback(
|
|
25962
26002
|
(action) => {
|
|
25963
26003
|
if (action.event && eventBus) {
|
|
25964
26004
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29062,7 +29102,7 @@ var init_StepFlow = __esm({
|
|
|
29062
29102
|
className
|
|
29063
29103
|
}) => {
|
|
29064
29104
|
if (orientation === "vertical") {
|
|
29065
|
-
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: [
|
|
29066
29106
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29067
29107
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29068
29108
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29073,7 +29113,7 @@ var init_StepFlow = __esm({
|
|
|
29073
29113
|
] })
|
|
29074
29114
|
] }) }, index)) });
|
|
29075
29115
|
}
|
|
29076
|
-
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: [
|
|
29077
29117
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29078
29118
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29079
29119
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31187,7 +31227,7 @@ var init_DocumentViewer = __esm({
|
|
|
31187
31227
|
}
|
|
31188
31228
|
});
|
|
31189
31229
|
function extractTitle(children) {
|
|
31190
|
-
if (!
|
|
31230
|
+
if (!React128__default.isValidElement(children)) return void 0;
|
|
31191
31231
|
const props = children.props;
|
|
31192
31232
|
if (typeof props.title === "string") {
|
|
31193
31233
|
return props.title;
|
|
@@ -31242,7 +31282,7 @@ function LinearView({
|
|
|
31242
31282
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
31243
31283
|
const isDone = i < currentIdx;
|
|
31244
31284
|
const isCurrent = i === currentIdx;
|
|
31245
|
-
return /* @__PURE__ */ jsxs(
|
|
31285
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
31246
31286
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31247
31287
|
Typography,
|
|
31248
31288
|
{
|
|
@@ -32026,12 +32066,12 @@ var init_Form = __esm({
|
|
|
32026
32066
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
32027
32067
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
32028
32068
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
32029
|
-
const normalizedInitialData =
|
|
32069
|
+
const normalizedInitialData = React128__default.useMemo(() => {
|
|
32030
32070
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
32031
32071
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
32032
32072
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
32033
32073
|
}, [entity, initialData]);
|
|
32034
|
-
const entityDerivedFields =
|
|
32074
|
+
const entityDerivedFields = React128__default.useMemo(() => {
|
|
32035
32075
|
if (fields && fields.length > 0) return void 0;
|
|
32036
32076
|
if (!resolvedEntity) return void 0;
|
|
32037
32077
|
return resolvedEntity.fields.map(
|
|
@@ -32050,14 +32090,14 @@ var init_Form = __esm({
|
|
|
32050
32090
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
32051
32091
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
32052
32092
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
32053
|
-
const [formData, setFormData] =
|
|
32093
|
+
const [formData, setFormData] = React128__default.useState(
|
|
32054
32094
|
normalizedInitialData
|
|
32055
32095
|
);
|
|
32056
|
-
const [collapsedSections, setCollapsedSections] =
|
|
32096
|
+
const [collapsedSections, setCollapsedSections] = React128__default.useState(
|
|
32057
32097
|
/* @__PURE__ */ new Set()
|
|
32058
32098
|
);
|
|
32059
32099
|
const formMode = props.mode;
|
|
32060
|
-
const mountedRef =
|
|
32100
|
+
const mountedRef = React128__default.useRef(false);
|
|
32061
32101
|
if (!mountedRef.current) {
|
|
32062
32102
|
mountedRef.current = true;
|
|
32063
32103
|
debug("forms", "mount", {
|
|
@@ -32070,7 +32110,7 @@ var init_Form = __esm({
|
|
|
32070
32110
|
});
|
|
32071
32111
|
}
|
|
32072
32112
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
32073
|
-
const evalContext =
|
|
32113
|
+
const evalContext = React128__default.useMemo(
|
|
32074
32114
|
() => ({
|
|
32075
32115
|
formValues: formData,
|
|
32076
32116
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -32079,7 +32119,7 @@ var init_Form = __esm({
|
|
|
32079
32119
|
}),
|
|
32080
32120
|
[formData, externalContext]
|
|
32081
32121
|
);
|
|
32082
|
-
|
|
32122
|
+
React128__default.useEffect(() => {
|
|
32083
32123
|
debug("forms", "initialData-sync", {
|
|
32084
32124
|
mode: formMode,
|
|
32085
32125
|
normalizedInitialData,
|
|
@@ -32090,7 +32130,7 @@ var init_Form = __esm({
|
|
|
32090
32130
|
setFormData(normalizedInitialData);
|
|
32091
32131
|
}
|
|
32092
32132
|
}, [normalizedInitialData]);
|
|
32093
|
-
const processCalculations =
|
|
32133
|
+
const processCalculations = React128__default.useCallback(
|
|
32094
32134
|
(changedFieldId, newFormData) => {
|
|
32095
32135
|
if (!hiddenCalculations.length) return;
|
|
32096
32136
|
const context = {
|
|
@@ -32115,7 +32155,7 @@ var init_Form = __esm({
|
|
|
32115
32155
|
},
|
|
32116
32156
|
[hiddenCalculations, externalContext, eventBus]
|
|
32117
32157
|
);
|
|
32118
|
-
const checkViolations =
|
|
32158
|
+
const checkViolations = React128__default.useCallback(
|
|
32119
32159
|
(changedFieldId, newFormData) => {
|
|
32120
32160
|
if (!violationTriggers.length) return;
|
|
32121
32161
|
const context = {
|
|
@@ -32153,7 +32193,7 @@ var init_Form = __esm({
|
|
|
32153
32193
|
processCalculations(name, newFormData);
|
|
32154
32194
|
checkViolations(name, newFormData);
|
|
32155
32195
|
};
|
|
32156
|
-
const isFieldVisible =
|
|
32196
|
+
const isFieldVisible = React128__default.useCallback(
|
|
32157
32197
|
(fieldName) => {
|
|
32158
32198
|
const condition = conditionalFields[fieldName];
|
|
32159
32199
|
if (!condition) return true;
|
|
@@ -32161,7 +32201,7 @@ var init_Form = __esm({
|
|
|
32161
32201
|
},
|
|
32162
32202
|
[conditionalFields, evalContext]
|
|
32163
32203
|
);
|
|
32164
|
-
const isSectionVisible =
|
|
32204
|
+
const isSectionVisible = React128__default.useCallback(
|
|
32165
32205
|
(section) => {
|
|
32166
32206
|
if (!section.condition) return true;
|
|
32167
32207
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -32205,7 +32245,7 @@ var init_Form = __esm({
|
|
|
32205
32245
|
eventBus.emit(`UI:${onCancel}`);
|
|
32206
32246
|
}
|
|
32207
32247
|
};
|
|
32208
|
-
const renderField =
|
|
32248
|
+
const renderField = React128__default.useCallback(
|
|
32209
32249
|
(field) => {
|
|
32210
32250
|
const fieldName = field.name || field.field;
|
|
32211
32251
|
if (!fieldName) return null;
|
|
@@ -32226,7 +32266,7 @@ var init_Form = __esm({
|
|
|
32226
32266
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
32227
32267
|
);
|
|
32228
32268
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
32229
|
-
const normalizedFields =
|
|
32269
|
+
const normalizedFields = React128__default.useMemo(() => {
|
|
32230
32270
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
32231
32271
|
return effectiveFields.map((field) => {
|
|
32232
32272
|
if (typeof field === "string") {
|
|
@@ -32248,7 +32288,7 @@ var init_Form = __esm({
|
|
|
32248
32288
|
return field;
|
|
32249
32289
|
});
|
|
32250
32290
|
}, [effectiveFields, resolvedEntity]);
|
|
32251
|
-
const schemaFields =
|
|
32291
|
+
const schemaFields = React128__default.useMemo(() => {
|
|
32252
32292
|
if (normalizedFields.length === 0) return null;
|
|
32253
32293
|
if (isDebugEnabled()) {
|
|
32254
32294
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -32258,7 +32298,7 @@ var init_Form = __esm({
|
|
|
32258
32298
|
}
|
|
32259
32299
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
32260
32300
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
32261
|
-
const sectionElements =
|
|
32301
|
+
const sectionElements = React128__default.useMemo(() => {
|
|
32262
32302
|
if (!sections || sections.length === 0) return null;
|
|
32263
32303
|
return sections.map((section) => {
|
|
32264
32304
|
if (!isSectionVisible(section)) {
|
|
@@ -33782,7 +33822,7 @@ var init_List = __esm({
|
|
|
33782
33822
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
33783
33823
|
return [];
|
|
33784
33824
|
}, [entity]);
|
|
33785
|
-
const getItemActions =
|
|
33825
|
+
const getItemActions = React128__default.useCallback(
|
|
33786
33826
|
(item) => {
|
|
33787
33827
|
if (!itemActions) return [];
|
|
33788
33828
|
if (typeof itemActions === "function") {
|
|
@@ -34219,7 +34259,7 @@ var init_MediaGallery = __esm({
|
|
|
34219
34259
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
34220
34260
|
);
|
|
34221
34261
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
34222
|
-
const items =
|
|
34262
|
+
const items = React128__default.useMemo(() => {
|
|
34223
34263
|
if (propItems) return propItems;
|
|
34224
34264
|
if (entityData.length === 0) return [];
|
|
34225
34265
|
return entityData.map((record, idx) => ({
|
|
@@ -34383,7 +34423,7 @@ var init_MediaGallery = __esm({
|
|
|
34383
34423
|
}
|
|
34384
34424
|
});
|
|
34385
34425
|
function extractTitle2(children) {
|
|
34386
|
-
if (!
|
|
34426
|
+
if (!React128__default.isValidElement(children)) return void 0;
|
|
34387
34427
|
const props = children.props;
|
|
34388
34428
|
if (typeof props.title === "string") {
|
|
34389
34429
|
return props.title;
|
|
@@ -35096,7 +35136,7 @@ var init_PageHeader = __esm({
|
|
|
35096
35136
|
info: "bg-info/10 text-info"
|
|
35097
35137
|
};
|
|
35098
35138
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35099
|
-
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: [
|
|
35100
35140
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35101
35141
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35102
35142
|
"a",
|
|
@@ -35289,7 +35329,7 @@ var init_debugRegistry = __esm({
|
|
|
35289
35329
|
}
|
|
35290
35330
|
});
|
|
35291
35331
|
function useDebugData() {
|
|
35292
|
-
const [data, setData] =
|
|
35332
|
+
const [data, setData] = React128.useState(() => ({
|
|
35293
35333
|
traits: [],
|
|
35294
35334
|
ticks: [],
|
|
35295
35335
|
guards: [],
|
|
@@ -35303,7 +35343,7 @@ function useDebugData() {
|
|
|
35303
35343
|
},
|
|
35304
35344
|
lastUpdate: Date.now()
|
|
35305
35345
|
}));
|
|
35306
|
-
|
|
35346
|
+
React128.useEffect(() => {
|
|
35307
35347
|
const updateData = () => {
|
|
35308
35348
|
setData({
|
|
35309
35349
|
traits: getAllTraits(),
|
|
@@ -35412,12 +35452,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
35412
35452
|
return positions;
|
|
35413
35453
|
}
|
|
35414
35454
|
function WalkMinimap() {
|
|
35415
|
-
const [walkStep, setWalkStep] =
|
|
35416
|
-
const [traits2, setTraits] =
|
|
35417
|
-
const [coveredEdges, setCoveredEdges] =
|
|
35418
|
-
const [completedTraits, setCompletedTraits] =
|
|
35419
|
-
const prevTraitRef =
|
|
35420
|
-
|
|
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(() => {
|
|
35421
35461
|
const interval = setInterval(() => {
|
|
35422
35462
|
const w = window;
|
|
35423
35463
|
const step = w.__orbitalWalkStep;
|
|
@@ -35864,15 +35904,15 @@ var init_EntitiesTab = __esm({
|
|
|
35864
35904
|
}
|
|
35865
35905
|
});
|
|
35866
35906
|
function EventFlowTab({ events: events2 }) {
|
|
35867
|
-
const [filter, setFilter] =
|
|
35868
|
-
const containerRef =
|
|
35869
|
-
const [autoScroll, setAutoScroll] =
|
|
35870
|
-
|
|
35907
|
+
const [filter, setFilter] = React128.useState("all");
|
|
35908
|
+
const containerRef = React128.useRef(null);
|
|
35909
|
+
const [autoScroll, setAutoScroll] = React128.useState(true);
|
|
35910
|
+
React128.useEffect(() => {
|
|
35871
35911
|
if (autoScroll && containerRef.current) {
|
|
35872
35912
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35873
35913
|
}
|
|
35874
35914
|
}, [events2.length, autoScroll]);
|
|
35875
|
-
const filteredEvents =
|
|
35915
|
+
const filteredEvents = React128.useMemo(() => {
|
|
35876
35916
|
if (filter === "all") return events2;
|
|
35877
35917
|
return events2.filter((e) => e.type === filter);
|
|
35878
35918
|
}, [events2, filter]);
|
|
@@ -35991,7 +36031,7 @@ var init_EventFlowTab = __esm({
|
|
|
35991
36031
|
}
|
|
35992
36032
|
});
|
|
35993
36033
|
function GuardsPanel({ guards }) {
|
|
35994
|
-
const [filter, setFilter] =
|
|
36034
|
+
const [filter, setFilter] = React128.useState("all");
|
|
35995
36035
|
if (guards.length === 0) {
|
|
35996
36036
|
return /* @__PURE__ */ jsx(
|
|
35997
36037
|
EmptyState,
|
|
@@ -36004,7 +36044,7 @@ function GuardsPanel({ guards }) {
|
|
|
36004
36044
|
}
|
|
36005
36045
|
const passedCount = guards.filter((g) => g.result).length;
|
|
36006
36046
|
const failedCount = guards.length - passedCount;
|
|
36007
|
-
const filteredGuards =
|
|
36047
|
+
const filteredGuards = React128.useMemo(() => {
|
|
36008
36048
|
if (filter === "all") return guards;
|
|
36009
36049
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
36010
36050
|
return guards.filter((g) => !g.result);
|
|
@@ -36165,10 +36205,10 @@ function EffectBadge({ effect }) {
|
|
|
36165
36205
|
] });
|
|
36166
36206
|
}
|
|
36167
36207
|
function TransitionTimeline({ transitions }) {
|
|
36168
|
-
const containerRef =
|
|
36169
|
-
const [autoScroll, setAutoScroll] =
|
|
36170
|
-
const [expandedId, setExpandedId] =
|
|
36171
|
-
|
|
36208
|
+
const containerRef = React128.useRef(null);
|
|
36209
|
+
const [autoScroll, setAutoScroll] = React128.useState(true);
|
|
36210
|
+
const [expandedId, setExpandedId] = React128.useState(null);
|
|
36211
|
+
React128.useEffect(() => {
|
|
36172
36212
|
if (autoScroll && containerRef.current) {
|
|
36173
36213
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
36174
36214
|
}
|
|
@@ -36454,9 +36494,9 @@ function getAllEvents(traits2) {
|
|
|
36454
36494
|
}
|
|
36455
36495
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
36456
36496
|
const eventBus = useEventBus();
|
|
36457
|
-
const [log4, setLog] =
|
|
36458
|
-
const prevStatesRef =
|
|
36459
|
-
|
|
36497
|
+
const [log4, setLog] = React128.useState([]);
|
|
36498
|
+
const prevStatesRef = React128.useRef(/* @__PURE__ */ new Map());
|
|
36499
|
+
React128.useEffect(() => {
|
|
36460
36500
|
for (const trait of traits2) {
|
|
36461
36501
|
const prev = prevStatesRef.current.get(trait.id);
|
|
36462
36502
|
if (prev && prev !== trait.currentState) {
|
|
@@ -36626,10 +36666,10 @@ function VerifyModePanel({
|
|
|
36626
36666
|
serverCount,
|
|
36627
36667
|
localCount
|
|
36628
36668
|
}) {
|
|
36629
|
-
const [expanded, setExpanded] =
|
|
36630
|
-
const scrollRef =
|
|
36631
|
-
const prevCountRef =
|
|
36632
|
-
|
|
36669
|
+
const [expanded, setExpanded] = React128.useState(true);
|
|
36670
|
+
const scrollRef = React128.useRef(null);
|
|
36671
|
+
const prevCountRef = React128.useRef(0);
|
|
36672
|
+
React128.useEffect(() => {
|
|
36633
36673
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
36634
36674
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
36635
36675
|
}
|
|
@@ -36695,10 +36735,10 @@ function RuntimeDebugger({
|
|
|
36695
36735
|
defaultTab,
|
|
36696
36736
|
schema
|
|
36697
36737
|
}) {
|
|
36698
|
-
const [isCollapsed, setIsCollapsed] =
|
|
36699
|
-
const [isVisible, setIsVisible] =
|
|
36738
|
+
const [isCollapsed, setIsCollapsed] = React128.useState(mode === "verify" ? true : defaultCollapsed);
|
|
36739
|
+
const [isVisible, setIsVisible] = React128.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
36700
36740
|
const debugData = useDebugData();
|
|
36701
|
-
|
|
36741
|
+
React128.useEffect(() => {
|
|
36702
36742
|
if (mode === "inline") return;
|
|
36703
36743
|
return onDebugToggle((enabled) => {
|
|
36704
36744
|
setIsVisible(enabled);
|
|
@@ -36707,7 +36747,7 @@ function RuntimeDebugger({
|
|
|
36707
36747
|
}
|
|
36708
36748
|
});
|
|
36709
36749
|
}, [mode]);
|
|
36710
|
-
|
|
36750
|
+
React128.useEffect(() => {
|
|
36711
36751
|
if (mode === "inline") return;
|
|
36712
36752
|
const handleKeyDown = (e) => {
|
|
36713
36753
|
if (e.key === "`" && isVisible) {
|
|
@@ -37256,7 +37296,7 @@ function SequenceBar({
|
|
|
37256
37296
|
onSlotRemove(index);
|
|
37257
37297
|
}, [onSlotRemove, playing]);
|
|
37258
37298
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
37259
|
-
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: [
|
|
37260
37300
|
i > 0 && /* @__PURE__ */ jsx(
|
|
37261
37301
|
Typography,
|
|
37262
37302
|
{
|
|
@@ -38601,7 +38641,7 @@ var init_StatCard2 = __esm({
|
|
|
38601
38641
|
const labelToUse = propLabel ?? propTitle;
|
|
38602
38642
|
const eventBus = useEventBus();
|
|
38603
38643
|
const { t } = useTranslate();
|
|
38604
|
-
const handleActionClick =
|
|
38644
|
+
const handleActionClick = React128__default.useCallback(() => {
|
|
38605
38645
|
if (action?.event) {
|
|
38606
38646
|
eventBus.emit(`UI:${action.event}`, {});
|
|
38607
38647
|
}
|
|
@@ -38612,7 +38652,7 @@ var init_StatCard2 = __esm({
|
|
|
38612
38652
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38613
38653
|
const isLoading = externalLoading ?? false;
|
|
38614
38654
|
const error = externalError;
|
|
38615
|
-
const computeMetricValue =
|
|
38655
|
+
const computeMetricValue = React128__default.useCallback(
|
|
38616
38656
|
(metric, items) => {
|
|
38617
38657
|
if (metric.value !== void 0) {
|
|
38618
38658
|
return metric.value;
|
|
@@ -38651,7 +38691,7 @@ var init_StatCard2 = __esm({
|
|
|
38651
38691
|
},
|
|
38652
38692
|
[]
|
|
38653
38693
|
);
|
|
38654
|
-
const schemaStats =
|
|
38694
|
+
const schemaStats = React128__default.useMemo(() => {
|
|
38655
38695
|
if (!metrics || metrics.length === 0) return null;
|
|
38656
38696
|
return metrics.map((metric) => ({
|
|
38657
38697
|
label: metric.label,
|
|
@@ -38659,7 +38699,7 @@ var init_StatCard2 = __esm({
|
|
|
38659
38699
|
format: metric.format
|
|
38660
38700
|
}));
|
|
38661
38701
|
}, [metrics, data, computeMetricValue]);
|
|
38662
|
-
const calculatedTrend =
|
|
38702
|
+
const calculatedTrend = React128__default.useMemo(() => {
|
|
38663
38703
|
if (manualTrend !== void 0) return manualTrend;
|
|
38664
38704
|
if (previousValue === void 0 || currentValue === void 0)
|
|
38665
38705
|
return void 0;
|
|
@@ -39643,7 +39683,7 @@ var init_Timeline = __esm({
|
|
|
39643
39683
|
}) => {
|
|
39644
39684
|
const { t } = useTranslate();
|
|
39645
39685
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39646
|
-
const items =
|
|
39686
|
+
const items = React128__default.useMemo(() => {
|
|
39647
39687
|
if (propItems) return propItems;
|
|
39648
39688
|
if (entityData.length === 0) return [];
|
|
39649
39689
|
return entityData.map((record, idx) => {
|
|
@@ -39750,7 +39790,7 @@ var init_Timeline = __esm({
|
|
|
39750
39790
|
}
|
|
39751
39791
|
});
|
|
39752
39792
|
function extractToastProps(children) {
|
|
39753
|
-
if (!
|
|
39793
|
+
if (!React128__default.isValidElement(children)) {
|
|
39754
39794
|
if (typeof children === "string") {
|
|
39755
39795
|
return { message: children };
|
|
39756
39796
|
}
|
|
@@ -39788,7 +39828,7 @@ var init_ToastSlot = __esm({
|
|
|
39788
39828
|
eventBus.emit("UI:CLOSE");
|
|
39789
39829
|
};
|
|
39790
39830
|
if (!isVisible) return null;
|
|
39791
|
-
const isCustomContent =
|
|
39831
|
+
const isCustomContent = React128__default.isValidElement(children) && !message;
|
|
39792
39832
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
39793
39833
|
Toast,
|
|
39794
39834
|
{
|
|
@@ -40057,7 +40097,7 @@ var init_WizardContainer = __esm({
|
|
|
40057
40097
|
const isCompleted = index < currentStep;
|
|
40058
40098
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
40059
40099
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
40060
|
-
return /* @__PURE__ */ jsxs(
|
|
40100
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
40061
40101
|
/* @__PURE__ */ jsx(
|
|
40062
40102
|
Button,
|
|
40063
40103
|
{
|
|
@@ -42246,7 +42286,7 @@ function UnitRenderer({
|
|
|
42246
42286
|
onAnimationStateChange,
|
|
42247
42287
|
animationSpeed = 1
|
|
42248
42288
|
}) {
|
|
42249
|
-
const handleUnitClick =
|
|
42289
|
+
const handleUnitClick = React128__default.useCallback(
|
|
42250
42290
|
(unit) => {
|
|
42251
42291
|
onUnitClick?.(unit);
|
|
42252
42292
|
},
|
|
@@ -45440,7 +45480,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45440
45480
|
const handleTraitClick = useCallback((name) => {
|
|
45441
45481
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
45442
45482
|
}, []);
|
|
45443
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
45483
|
+
const [highlightedTrait, setHighlightedTrait] = React128__default.useState(null);
|
|
45444
45484
|
const handleTransitionClick = useCallback((index) => {
|
|
45445
45485
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
45446
45486
|
}, []);
|
|
@@ -45527,7 +45567,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45527
45567
|
gap: "xs",
|
|
45528
45568
|
align: "center",
|
|
45529
45569
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
45530
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
45570
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
45531
45571
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
45532
45572
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
45533
45573
|
Box,
|
|
@@ -45905,12 +45945,12 @@ var init_three = __esm({
|
|
|
45905
45945
|
}
|
|
45906
45946
|
});
|
|
45907
45947
|
function lazyThree(name, loader) {
|
|
45908
|
-
const Lazy =
|
|
45948
|
+
const Lazy = React128__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45909
45949
|
function ThreeWrapper(props) {
|
|
45910
|
-
return
|
|
45911
|
-
|
|
45950
|
+
return React128__default.createElement(
|
|
45951
|
+
React128__default.Suspense,
|
|
45912
45952
|
{ fallback: null },
|
|
45913
|
-
|
|
45953
|
+
React128__default.createElement(Lazy, props)
|
|
45914
45954
|
);
|
|
45915
45955
|
}
|
|
45916
45956
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46398,7 +46438,7 @@ function SuspenseConfigProvider({
|
|
|
46398
46438
|
config,
|
|
46399
46439
|
children
|
|
46400
46440
|
}) {
|
|
46401
|
-
return
|
|
46441
|
+
return React128__default.createElement(
|
|
46402
46442
|
SuspenseConfigContext.Provider,
|
|
46403
46443
|
{ value: config },
|
|
46404
46444
|
children
|
|
@@ -46584,6 +46624,17 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
46584
46624
|
return /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent });
|
|
46585
46625
|
}
|
|
46586
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
|
+
}
|
|
46587
46638
|
function UISlotComponent({
|
|
46588
46639
|
slot,
|
|
46589
46640
|
portal = false,
|
|
@@ -46611,11 +46662,11 @@ function UISlotComponent({
|
|
|
46611
46662
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46612
46663
|
"data-pattern": pattern,
|
|
46613
46664
|
"data-source-trait": sourceTrait,
|
|
46614
|
-
children
|
|
46665
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children })
|
|
46615
46666
|
}
|
|
46616
46667
|
);
|
|
46617
46668
|
}
|
|
46618
|
-
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children });
|
|
46669
|
+
return /* @__PURE__ */ jsx(CompiledPortal, { slot, className, pattern, sourceTrait, children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children }) });
|
|
46619
46670
|
}
|
|
46620
46671
|
return /* @__PURE__ */ jsx(
|
|
46621
46672
|
Box,
|
|
@@ -46624,7 +46675,7 @@ function UISlotComponent({
|
|
|
46624
46675
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46625
46676
|
"data-pattern": pattern,
|
|
46626
46677
|
"data-source-trait": sourceTrait,
|
|
46627
|
-
children
|
|
46678
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait, children })
|
|
46628
46679
|
}
|
|
46629
46680
|
);
|
|
46630
46681
|
}
|
|
@@ -46670,7 +46721,7 @@ function UISlotComponent({
|
|
|
46670
46721
|
className: cn("ui-slot", `ui-slot-${slot}`, className),
|
|
46671
46722
|
"data-pattern": content.pattern,
|
|
46672
46723
|
"data-source-trait": content.sourceTrait,
|
|
46673
|
-
children: wrappedContent
|
|
46724
|
+
children: /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: content.sourceTrait, children: wrappedContent })
|
|
46674
46725
|
}
|
|
46675
46726
|
);
|
|
46676
46727
|
}
|
|
@@ -46778,7 +46829,7 @@ function SlotPortal({
|
|
|
46778
46829
|
});
|
|
46779
46830
|
if (!portalRoot) return null;
|
|
46780
46831
|
const slotId = `slot-${slot}`;
|
|
46781
|
-
const slotContent = /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss });
|
|
46832
|
+
const slotContent = /* @__PURE__ */ jsx(MaybeTraitScope, { sourceTrait: content.sourceTrait, children: /* @__PURE__ */ jsx(SlotContentRenderer, { content, onDismiss }) });
|
|
46782
46833
|
let wrapper;
|
|
46783
46834
|
switch (slot) {
|
|
46784
46835
|
case "modal":
|
|
@@ -46862,7 +46913,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46862
46913
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46863
46914
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46864
46915
|
}
|
|
46865
|
-
return /* @__PURE__ */ jsx(
|
|
46916
|
+
return /* @__PURE__ */ jsx(React128__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46866
46917
|
}
|
|
46867
46918
|
if (!child || typeof child !== "object") return null;
|
|
46868
46919
|
const childId = `${parentId}-${index}`;
|
|
@@ -47069,6 +47120,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47069
47120
|
"components/organisms/UISlotRenderer.tsx"() {
|
|
47070
47121
|
"use client";
|
|
47071
47122
|
init_EntitySchemaContext();
|
|
47123
|
+
init_TraitScopeProvider();
|
|
47072
47124
|
init_UISlotContext();
|
|
47073
47125
|
init_Modal();
|
|
47074
47126
|
init_Drawer();
|
|
@@ -47503,7 +47555,7 @@ var AvlTransition = ({
|
|
|
47503
47555
|
opacity = 1,
|
|
47504
47556
|
className
|
|
47505
47557
|
}) => {
|
|
47506
|
-
const ids =
|
|
47558
|
+
const ids = React128__default.useMemo(() => {
|
|
47507
47559
|
avlTransitionId += 1;
|
|
47508
47560
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47509
47561
|
}, []);
|
|
@@ -48268,7 +48320,7 @@ var AvlStateMachine = ({
|
|
|
48268
48320
|
color = "var(--color-primary)",
|
|
48269
48321
|
animated = false
|
|
48270
48322
|
}) => {
|
|
48271
|
-
const ids =
|
|
48323
|
+
const ids = React128__default.useMemo(() => {
|
|
48272
48324
|
avlSmId += 1;
|
|
48273
48325
|
const base = `avl-sm-${avlSmId}`;
|
|
48274
48326
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48463,7 +48515,7 @@ var AvlOrbitalUnit = ({
|
|
|
48463
48515
|
color = "var(--color-primary)",
|
|
48464
48516
|
animated = false
|
|
48465
48517
|
}) => {
|
|
48466
|
-
const ids =
|
|
48518
|
+
const ids = React128__default.useMemo(() => {
|
|
48467
48519
|
avlOuId += 1;
|
|
48468
48520
|
const base = `avl-ou-${avlOuId}`;
|
|
48469
48521
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48555,7 +48607,7 @@ var AvlClosedCircuit = ({
|
|
|
48555
48607
|
color = "var(--color-primary)",
|
|
48556
48608
|
animated = false
|
|
48557
48609
|
}) => {
|
|
48558
|
-
const ids =
|
|
48610
|
+
const ids = React128__default.useMemo(() => {
|
|
48559
48611
|
avlCcId += 1;
|
|
48560
48612
|
const base = `avl-cc-${avlCcId}`;
|
|
48561
48613
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48708,7 +48760,7 @@ var AvlEmitListen = ({
|
|
|
48708
48760
|
color = "var(--color-primary)",
|
|
48709
48761
|
animated = false
|
|
48710
48762
|
}) => {
|
|
48711
|
-
const ids =
|
|
48763
|
+
const ids = React128__default.useMemo(() => {
|
|
48712
48764
|
avlElId += 1;
|
|
48713
48765
|
const base = `avl-el-${avlElId}`;
|
|
48714
48766
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -48981,7 +49033,7 @@ function renderNode(node, color, glowId) {
|
|
|
48981
49033
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
48982
49034
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
48983
49035
|
const nc = nodeColor(node.type, color);
|
|
48984
|
-
return /* @__PURE__ */ jsxs(
|
|
49036
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
48985
49037
|
node.children.map((child, i) => {
|
|
48986
49038
|
const childR = Math.max(
|
|
48987
49039
|
child.type === "operator" ? 20 : 16,
|
|
@@ -49038,7 +49090,7 @@ var AvlExprTree = ({
|
|
|
49038
49090
|
className,
|
|
49039
49091
|
color = "var(--color-primary)"
|
|
49040
49092
|
}) => {
|
|
49041
|
-
const ids =
|
|
49093
|
+
const ids = React128__default.useMemo(() => {
|
|
49042
49094
|
avlEtId += 1;
|
|
49043
49095
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
49044
49096
|
}, []);
|
|
@@ -50012,7 +50064,7 @@ var SystemNode = ({ data }) => {
|
|
|
50012
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) => {
|
|
50013
50065
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50014
50066
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
50015
|
-
return /* @__PURE__ */ jsxs(
|
|
50067
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
50016
50068
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
50017
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 })
|
|
50018
50070
|
] }, s.name);
|
|
@@ -50052,7 +50104,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
50052
50104
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
50053
50105
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50054
50106
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
50055
|
-
return /* @__PURE__ */ jsxs(
|
|
50107
|
+
return /* @__PURE__ */ jsxs(React128__default.Fragment, { children: [
|
|
50056
50108
|
/* @__PURE__ */ jsx(
|
|
50057
50109
|
AvlState,
|
|
50058
50110
|
{
|
|
@@ -52454,6 +52506,24 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
52454
52506
|
}
|
|
52455
52507
|
return map;
|
|
52456
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]);
|
|
52457
52527
|
const pageOrbitalNames = useMemo(() => {
|
|
52458
52528
|
const set = /* @__PURE__ */ new Set();
|
|
52459
52529
|
for (const binding of allPageTraits) {
|
|
@@ -52497,20 +52567,9 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
52497
52567
|
const inner = /* @__PURE__ */ jsx(VerificationProvider, { enabled: true, children: /* @__PURE__ */ jsx(SlotsProvider, { children: /* @__PURE__ */ jsxs(
|
|
52498
52568
|
EntitySchemaProvider,
|
|
52499
52569
|
{
|
|
52500
|
-
entities:
|
|
52501
|
-
traitLinkedEntities:
|
|
52502
|
-
|
|
52503
|
-
if (ir) {
|
|
52504
|
-
for (const page of ir.pages.values()) {
|
|
52505
|
-
for (const binding of page.traits) {
|
|
52506
|
-
if (binding.linkedEntity) {
|
|
52507
|
-
map.set(binding.trait.name, binding.linkedEntity);
|
|
52508
|
-
}
|
|
52509
|
-
}
|
|
52510
|
-
}
|
|
52511
|
-
}
|
|
52512
|
-
return map;
|
|
52513
|
-
})(),
|
|
52570
|
+
entities: entitiesArray,
|
|
52571
|
+
traitLinkedEntities: traitLinkedEntitiesMap,
|
|
52572
|
+
orbitalsByTrait: orbitalsByTraitMap,
|
|
52514
52573
|
children: [
|
|
52515
52574
|
/* @__PURE__ */ jsx(
|
|
52516
52575
|
TraitInitializer,
|
|
@@ -53032,7 +53091,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
53032
53091
|
}
|
|
53033
53092
|
);
|
|
53034
53093
|
};
|
|
53035
|
-
var OrbPreviewNode =
|
|
53094
|
+
var OrbPreviewNode = React128__default.memo(OrbPreviewNodeInner);
|
|
53036
53095
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
53037
53096
|
var EventFlowEdgeInner = (props) => {
|
|
53038
53097
|
const {
|
|
@@ -53109,7 +53168,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
53109
53168
|
) })
|
|
53110
53169
|
] });
|
|
53111
53170
|
};
|
|
53112
|
-
var EventFlowEdge =
|
|
53171
|
+
var EventFlowEdge = React128__default.memo(EventFlowEdgeInner);
|
|
53113
53172
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
53114
53173
|
|
|
53115
53174
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -53248,7 +53307,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
53248
53307
|
}
|
|
53249
53308
|
);
|
|
53250
53309
|
};
|
|
53251
|
-
var BehaviorComposeNode =
|
|
53310
|
+
var BehaviorComposeNode = React128__default.memo(BehaviorComposeNodeInner);
|
|
53252
53311
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
53253
53312
|
|
|
53254
53313
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -54188,7 +54247,7 @@ var ZoomBreadcrumb = ({
|
|
|
54188
54247
|
if (eventName && band === "detail") {
|
|
54189
54248
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
54190
54249
|
}
|
|
54191
|
-
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: [
|
|
54192
54251
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
54193
54252
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
54194
54253
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54647,7 +54706,7 @@ var EventWireOverlay = ({
|
|
|
54647
54706
|
containerW,
|
|
54648
54707
|
containerH
|
|
54649
54708
|
}) => {
|
|
54650
|
-
const ids =
|
|
54709
|
+
const ids = React128__default.useMemo(() => {
|
|
54651
54710
|
avlOczWireId += 1;
|
|
54652
54711
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54653
54712
|
}, []);
|
|
@@ -54965,7 +55024,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54965
55024
|
borderRadius: 6,
|
|
54966
55025
|
border: `1px solid ${color}`
|
|
54967
55026
|
},
|
|
54968
|
-
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: [
|
|
54969
55028
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54970
55029
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54971
55030
|
Box,
|