@almadar/ui 4.6.6 → 4.6.10
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 +1461 -1330
- package/dist/avl/index.js +385 -254
- package/dist/components/index.cjs +1124 -1059
- package/dist/components/index.js +225 -160
- package/dist/lib/index.cjs +19 -14
- package/dist/lib/index.js +19 -14
- package/dist/providers/EventBusProvider.d.ts +0 -21
- package/dist/providers/index.cjs +1023 -915
- package/dist/providers/index.js +272 -164
- package/dist/runtime/index.cjs +178 -87
- package/dist/runtime/index.js +179 -88
- package/dist/runtime/ui/SlotsContext.d.ts +3 -0
- package/package.json +2 -2
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 React127 from 'react';
|
|
4
|
+
import React127__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';
|
|
@@ -2886,6 +2886,24 @@ var init_logger = __esm({
|
|
|
2886
2886
|
DEBUG_FILTER = (envGet("ALMADAR_DEBUG") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
2887
2887
|
}
|
|
2888
2888
|
});
|
|
2889
|
+
function captureSubscriberTag(listener) {
|
|
2890
|
+
const fnName = listener.name;
|
|
2891
|
+
if (typeof fnName === "string" && fnName.length > 0 && fnName !== "listener") {
|
|
2892
|
+
return fnName;
|
|
2893
|
+
}
|
|
2894
|
+
const stack = new Error().stack ?? "";
|
|
2895
|
+
const lines = stack.split("\n");
|
|
2896
|
+
for (const raw of lines.slice(2)) {
|
|
2897
|
+
const line = raw.trim();
|
|
2898
|
+
if (!line) continue;
|
|
2899
|
+
if (line.includes("EventBusProvider") || line.includes("useEventBus")) continue;
|
|
2900
|
+
if (line.includes("captureSubscriberTag")) continue;
|
|
2901
|
+
const match = line.match(/([^/\\)]+\.(?:tsx?|jsx?))(?::(\d+))?/);
|
|
2902
|
+
if (match) return match[2] ? `${match[1]}:${match[2]}` : match[1];
|
|
2903
|
+
return line.slice(0, 120);
|
|
2904
|
+
}
|
|
2905
|
+
return "unknown";
|
|
2906
|
+
}
|
|
2889
2907
|
function EventBusProvider({ children, debug: debug2 = false }) {
|
|
2890
2908
|
const listenersRef = useRef(/* @__PURE__ */ new Map());
|
|
2891
2909
|
const anyListenersRef = useRef(/* @__PURE__ */ new Set());
|
|
@@ -2926,7 +2944,14 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2926
2944
|
}
|
|
2927
2945
|
if (listeners6) {
|
|
2928
2946
|
const listenersCopy = Array.from(listeners6);
|
|
2929
|
-
for (
|
|
2947
|
+
for (let i = 0; i < listenersCopy.length; i++) {
|
|
2948
|
+
const listener = listenersCopy[i];
|
|
2949
|
+
busLog.debug("emit:listener", {
|
|
2950
|
+
type,
|
|
2951
|
+
kind: "specific",
|
|
2952
|
+
index: i,
|
|
2953
|
+
tag: listenerTags.get(listener) ?? "untagged"
|
|
2954
|
+
});
|
|
2930
2955
|
try {
|
|
2931
2956
|
listener(event);
|
|
2932
2957
|
} catch (error) {
|
|
@@ -2935,7 +2960,14 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2935
2960
|
}
|
|
2936
2961
|
}
|
|
2937
2962
|
const anyListeners = Array.from(anyListenersRef.current);
|
|
2938
|
-
for (
|
|
2963
|
+
for (let i = 0; i < anyListeners.length; i++) {
|
|
2964
|
+
const listener = anyListeners[i];
|
|
2965
|
+
busLog.debug("emit:listener", {
|
|
2966
|
+
type,
|
|
2967
|
+
kind: "onAny",
|
|
2968
|
+
index: i,
|
|
2969
|
+
tag: listenerTags.get(listener) ?? "untagged"
|
|
2970
|
+
});
|
|
2939
2971
|
try {
|
|
2940
2972
|
listener(event);
|
|
2941
2973
|
} catch (error) {
|
|
@@ -2949,7 +2981,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2949
2981
|
}
|
|
2950
2982
|
const listeners6 = listenersRef.current.get(type);
|
|
2951
2983
|
listeners6.add(listener);
|
|
2952
|
-
|
|
2984
|
+
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
2985
|
+
subLog.debug("subscribe", { type, totalListeners: listeners6.size, tag: listenerTags.get(listener) });
|
|
2953
2986
|
if (debug2) {
|
|
2954
2987
|
console.log(`[EventBus] Subscribed to '${type}', total: ${listeners6.size}`);
|
|
2955
2988
|
}
|
|
@@ -2976,7 +3009,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2976
3009
|
}, []);
|
|
2977
3010
|
const onAny = useCallback((listener) => {
|
|
2978
3011
|
anyListenersRef.current.add(listener);
|
|
2979
|
-
|
|
3012
|
+
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
3013
|
+
subLog.debug("subscribe:any", { totalAnyListeners: anyListenersRef.current.size, tag: listenerTags.get(listener) });
|
|
2980
3014
|
if (debug2) {
|
|
2981
3015
|
console.log(`[EventBus] onAny subscribed, total: ${anyListenersRef.current.size}`);
|
|
2982
3016
|
}
|
|
@@ -3007,7 +3041,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
3007
3041
|
}, [contextValue]);
|
|
3008
3042
|
return /* @__PURE__ */ jsx(EventBusContext.Provider, { value: contextValue, children });
|
|
3009
3043
|
}
|
|
3010
|
-
var busLog, subLog, EventBusContext;
|
|
3044
|
+
var busLog, subLog, EventBusContext, listenerTags;
|
|
3011
3045
|
var init_EventBusProvider = __esm({
|
|
3012
3046
|
"providers/EventBusProvider.tsx"() {
|
|
3013
3047
|
"use client";
|
|
@@ -3016,6 +3050,7 @@ var init_EventBusProvider = __esm({
|
|
|
3016
3050
|
busLog = createLogger("almadar:eventbus");
|
|
3017
3051
|
subLog = createLogger("almadar:eventbus:subscribe");
|
|
3018
3052
|
EventBusContext = createContext(null);
|
|
3053
|
+
listenerTags = /* @__PURE__ */ new WeakMap();
|
|
3019
3054
|
}
|
|
3020
3055
|
});
|
|
3021
3056
|
|
|
@@ -3252,7 +3287,7 @@ var init_Box = __esm({
|
|
|
3252
3287
|
fixed: "fixed",
|
|
3253
3288
|
sticky: "sticky"
|
|
3254
3289
|
};
|
|
3255
|
-
Box =
|
|
3290
|
+
Box = React127__default.forwardRef(
|
|
3256
3291
|
({
|
|
3257
3292
|
padding,
|
|
3258
3293
|
paddingX,
|
|
@@ -4954,7 +4989,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
4954
4989
|
const IconComp = value;
|
|
4955
4990
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
4956
4991
|
}
|
|
4957
|
-
if (
|
|
4992
|
+
if (React127__default.isValidElement(value)) {
|
|
4958
4993
|
return value;
|
|
4959
4994
|
}
|
|
4960
4995
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5030,7 +5065,7 @@ var init_Button = __esm({
|
|
|
5030
5065
|
md: "h-4 w-4",
|
|
5031
5066
|
lg: "h-5 w-5"
|
|
5032
5067
|
};
|
|
5033
|
-
Button =
|
|
5068
|
+
Button = React127__default.forwardRef(
|
|
5034
5069
|
({
|
|
5035
5070
|
className,
|
|
5036
5071
|
variant = "primary",
|
|
@@ -5133,7 +5168,7 @@ var init_Badge = __esm({
|
|
|
5133
5168
|
md: "px-2.5 py-1 text-sm",
|
|
5134
5169
|
lg: "px-3 py-1.5 text-base"
|
|
5135
5170
|
};
|
|
5136
|
-
Badge =
|
|
5171
|
+
Badge = React127__default.forwardRef(
|
|
5137
5172
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
5138
5173
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
5139
5174
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -5270,11 +5305,110 @@ var init_Toast = __esm({
|
|
|
5270
5305
|
Toast.displayName = "Toast";
|
|
5271
5306
|
}
|
|
5272
5307
|
});
|
|
5308
|
+
function refId(obj) {
|
|
5309
|
+
if (obj === null || obj === void 0 || typeof obj !== "object") return null;
|
|
5310
|
+
const existing = refIds.get(obj);
|
|
5311
|
+
if (existing !== void 0) return existing;
|
|
5312
|
+
const id = nextRefId++;
|
|
5313
|
+
refIds.set(obj, id);
|
|
5314
|
+
return id;
|
|
5315
|
+
}
|
|
5316
|
+
function slotEntriesInOrder(slot) {
|
|
5317
|
+
if (!slot) return [];
|
|
5318
|
+
const out = [];
|
|
5319
|
+
for (const [sourceKey, entry] of Object.entries(slot)) {
|
|
5320
|
+
if (entry.patterns.length > 0) {
|
|
5321
|
+
out.push({ sourceKey, entry });
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5324
|
+
return out;
|
|
5325
|
+
}
|
|
5326
|
+
function SlotsProvider({ children }) {
|
|
5327
|
+
const [slots, setSlots] = useState({});
|
|
5328
|
+
const setSlotPatterns = useCallback((slot, patterns, source) => {
|
|
5329
|
+
const sourceKey = source?.trait ?? DEFAULT_SOURCE_KEY2;
|
|
5330
|
+
const entityProp = patterns[0]?.pattern && typeof patterns[0].pattern === "object" ? patterns[0].pattern.entity : void 0;
|
|
5331
|
+
slotLog.debug("setSlotPatterns", {
|
|
5332
|
+
slot,
|
|
5333
|
+
sourceKey,
|
|
5334
|
+
patternCount: patterns.length,
|
|
5335
|
+
firstPatternType: patterns[0]?.pattern && typeof patterns[0].pattern === "object" ? patterns[0].pattern.type : void 0,
|
|
5336
|
+
entityRefId: refId(entityProp)
|
|
5337
|
+
});
|
|
5338
|
+
setSlots((prev) => {
|
|
5339
|
+
const prevSlot = prev[slot] ?? {};
|
|
5340
|
+
return {
|
|
5341
|
+
...prev,
|
|
5342
|
+
[slot]: {
|
|
5343
|
+
...prevSlot,
|
|
5344
|
+
[sourceKey]: { patterns, source }
|
|
5345
|
+
}
|
|
5346
|
+
};
|
|
5347
|
+
});
|
|
5348
|
+
}, []);
|
|
5349
|
+
const clearSlot = useCallback((slot) => {
|
|
5350
|
+
setSlots((prev) => {
|
|
5351
|
+
const existing = prev[slot];
|
|
5352
|
+
if (existing && Object.keys(existing).length === 0) {
|
|
5353
|
+
return prev;
|
|
5354
|
+
}
|
|
5355
|
+
return { ...prev, [slot]: {} };
|
|
5356
|
+
});
|
|
5357
|
+
}, []);
|
|
5358
|
+
const clearSlotForSource = useCallback((slot, sourceTrait) => {
|
|
5359
|
+
setSlots((prev) => {
|
|
5360
|
+
const existing = prev[slot];
|
|
5361
|
+
if (!existing || !(sourceTrait in existing)) return prev;
|
|
5362
|
+
const next = { ...existing };
|
|
5363
|
+
delete next[sourceTrait];
|
|
5364
|
+
return { ...prev, [slot]: next };
|
|
5365
|
+
});
|
|
5366
|
+
}, []);
|
|
5367
|
+
const clearAllSlots = useCallback(() => {
|
|
5368
|
+
setSlots({});
|
|
5369
|
+
}, []);
|
|
5370
|
+
const actionsRef = useRef({
|
|
5371
|
+
setSlotPatterns,
|
|
5372
|
+
clearSlot,
|
|
5373
|
+
clearSlotForSource,
|
|
5374
|
+
clearAllSlots
|
|
5375
|
+
});
|
|
5376
|
+
actionsRef.current = { setSlotPatterns, clearSlot, clearSlotForSource, clearAllSlots };
|
|
5377
|
+
const [stableActions] = useState(() => ({
|
|
5378
|
+
setSlotPatterns: (...args) => actionsRef.current.setSlotPatterns(...args),
|
|
5379
|
+
clearSlot: (...args) => actionsRef.current.clearSlot(...args),
|
|
5380
|
+
clearSlotForSource: (...args) => actionsRef.current.clearSlotForSource(...args),
|
|
5381
|
+
clearAllSlots: () => actionsRef.current.clearAllSlots()
|
|
5382
|
+
}));
|
|
5383
|
+
return /* @__PURE__ */ jsx(SlotsActionsContext.Provider, { value: stableActions, children: /* @__PURE__ */ jsx(SlotsStateContext.Provider, { value: slots, children }) });
|
|
5384
|
+
}
|
|
5385
|
+
function useSlots() {
|
|
5386
|
+
return useContext(SlotsStateContext);
|
|
5387
|
+
}
|
|
5388
|
+
function useSlotsActions() {
|
|
5389
|
+
const actions = useContext(SlotsActionsContext);
|
|
5390
|
+
if (!actions) {
|
|
5391
|
+
throw new Error("useSlotsActions must be used within a SlotsProvider");
|
|
5392
|
+
}
|
|
5393
|
+
return actions;
|
|
5394
|
+
}
|
|
5395
|
+
var slotLog, refIds, nextRefId, DEFAULT_SOURCE_KEY2, SlotsStateContext, SlotsActionsContext;
|
|
5396
|
+
var init_SlotsContext = __esm({
|
|
5397
|
+
"runtime/ui/SlotsContext.tsx"() {
|
|
5398
|
+
init_logger();
|
|
5399
|
+
slotLog = createLogger("almadar:ui:slot-render");
|
|
5400
|
+
refIds = /* @__PURE__ */ new WeakMap();
|
|
5401
|
+
nextRefId = 1;
|
|
5402
|
+
DEFAULT_SOURCE_KEY2 = "__default__";
|
|
5403
|
+
SlotsStateContext = createContext({});
|
|
5404
|
+
SlotsActionsContext = createContext(null);
|
|
5405
|
+
}
|
|
5406
|
+
});
|
|
5273
5407
|
var Input;
|
|
5274
5408
|
var init_Input = __esm({
|
|
5275
5409
|
"components/atoms/Input.tsx"() {
|
|
5276
5410
|
init_cn();
|
|
5277
|
-
Input =
|
|
5411
|
+
Input = React127__default.forwardRef(
|
|
5278
5412
|
({
|
|
5279
5413
|
className,
|
|
5280
5414
|
inputType,
|
|
@@ -5392,7 +5526,7 @@ var Label;
|
|
|
5392
5526
|
var init_Label = __esm({
|
|
5393
5527
|
"components/atoms/Label.tsx"() {
|
|
5394
5528
|
init_cn();
|
|
5395
|
-
Label =
|
|
5529
|
+
Label = React127__default.forwardRef(
|
|
5396
5530
|
({ className, required, children, ...props }, ref) => {
|
|
5397
5531
|
return /* @__PURE__ */ jsxs(
|
|
5398
5532
|
"label",
|
|
@@ -5418,7 +5552,7 @@ var Textarea;
|
|
|
5418
5552
|
var init_Textarea = __esm({
|
|
5419
5553
|
"components/atoms/Textarea.tsx"() {
|
|
5420
5554
|
init_cn();
|
|
5421
|
-
Textarea =
|
|
5555
|
+
Textarea = React127__default.forwardRef(
|
|
5422
5556
|
({ className, error, ...props }, ref) => {
|
|
5423
5557
|
return /* @__PURE__ */ jsx(
|
|
5424
5558
|
"textarea",
|
|
@@ -5447,7 +5581,7 @@ var Select;
|
|
|
5447
5581
|
var init_Select = __esm({
|
|
5448
5582
|
"components/atoms/Select.tsx"() {
|
|
5449
5583
|
init_cn();
|
|
5450
|
-
Select =
|
|
5584
|
+
Select = React127__default.forwardRef(
|
|
5451
5585
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
5452
5586
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5453
5587
|
/* @__PURE__ */ jsxs(
|
|
@@ -5489,7 +5623,7 @@ var Checkbox;
|
|
|
5489
5623
|
var init_Checkbox = __esm({
|
|
5490
5624
|
"components/atoms/Checkbox.tsx"() {
|
|
5491
5625
|
init_cn();
|
|
5492
|
-
Checkbox =
|
|
5626
|
+
Checkbox = React127__default.forwardRef(
|
|
5493
5627
|
({ className, label, id, ...props }, ref) => {
|
|
5494
5628
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
5495
5629
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -5571,7 +5705,7 @@ var init_Card = __esm({
|
|
|
5571
5705
|
md: "shadow",
|
|
5572
5706
|
lg: "shadow-lg"
|
|
5573
5707
|
};
|
|
5574
|
-
Card =
|
|
5708
|
+
Card = React127__default.forwardRef(
|
|
5575
5709
|
({
|
|
5576
5710
|
className,
|
|
5577
5711
|
variant = "bordered",
|
|
@@ -5607,9 +5741,9 @@ var init_Card = __esm({
|
|
|
5607
5741
|
}
|
|
5608
5742
|
);
|
|
5609
5743
|
Card.displayName = "Card";
|
|
5610
|
-
CardHeader =
|
|
5744
|
+
CardHeader = React127__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
5611
5745
|
CardHeader.displayName = "CardHeader";
|
|
5612
|
-
CardTitle =
|
|
5746
|
+
CardTitle = React127__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5613
5747
|
"h3",
|
|
5614
5748
|
{
|
|
5615
5749
|
ref,
|
|
@@ -5622,11 +5756,11 @@ var init_Card = __esm({
|
|
|
5622
5756
|
}
|
|
5623
5757
|
));
|
|
5624
5758
|
CardTitle.displayName = "CardTitle";
|
|
5625
|
-
CardContent =
|
|
5759
|
+
CardContent = React127__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
5626
5760
|
CardContent.displayName = "CardContent";
|
|
5627
5761
|
CardBody = CardContent;
|
|
5628
5762
|
CardBody.displayName = "CardBody";
|
|
5629
|
-
CardFooter =
|
|
5763
|
+
CardFooter = React127__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5630
5764
|
"div",
|
|
5631
5765
|
{
|
|
5632
5766
|
ref,
|
|
@@ -5647,7 +5781,7 @@ var init_Spinner = __esm({
|
|
|
5647
5781
|
md: "h-6 w-6",
|
|
5648
5782
|
lg: "h-8 w-8"
|
|
5649
5783
|
};
|
|
5650
|
-
Spinner =
|
|
5784
|
+
Spinner = React127__default.forwardRef(
|
|
5651
5785
|
({ className, size = "md", ...props }, ref) => {
|
|
5652
5786
|
return /* @__PURE__ */ jsx(
|
|
5653
5787
|
"div",
|
|
@@ -6095,7 +6229,7 @@ var Radio;
|
|
|
6095
6229
|
var init_Radio = __esm({
|
|
6096
6230
|
"components/atoms/Radio.tsx"() {
|
|
6097
6231
|
init_cn();
|
|
6098
|
-
Radio =
|
|
6232
|
+
Radio = React127__default.forwardRef(
|
|
6099
6233
|
({
|
|
6100
6234
|
label,
|
|
6101
6235
|
helperText,
|
|
@@ -6206,7 +6340,7 @@ var init_Switch = __esm({
|
|
|
6206
6340
|
"components/atoms/Switch.tsx"() {
|
|
6207
6341
|
"use client";
|
|
6208
6342
|
init_cn();
|
|
6209
|
-
Switch =
|
|
6343
|
+
Switch = React127.forwardRef(
|
|
6210
6344
|
({
|
|
6211
6345
|
checked,
|
|
6212
6346
|
defaultChecked = false,
|
|
@@ -6217,10 +6351,10 @@ var init_Switch = __esm({
|
|
|
6217
6351
|
name,
|
|
6218
6352
|
className
|
|
6219
6353
|
}, ref) => {
|
|
6220
|
-
const [isChecked, setIsChecked] =
|
|
6354
|
+
const [isChecked, setIsChecked] = React127.useState(
|
|
6221
6355
|
checked !== void 0 ? checked : defaultChecked
|
|
6222
6356
|
);
|
|
6223
|
-
|
|
6357
|
+
React127.useEffect(() => {
|
|
6224
6358
|
if (checked !== void 0) {
|
|
6225
6359
|
setIsChecked(checked);
|
|
6226
6360
|
}
|
|
@@ -6560,8 +6694,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6560
6694
|
position = "top",
|
|
6561
6695
|
className
|
|
6562
6696
|
}) => {
|
|
6563
|
-
const [isVisible, setIsVisible] =
|
|
6564
|
-
const timeoutRef =
|
|
6697
|
+
const [isVisible, setIsVisible] = React127__default.useState(false);
|
|
6698
|
+
const timeoutRef = React127__default.useRef(null);
|
|
6565
6699
|
const handleMouseEnter = () => {
|
|
6566
6700
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6567
6701
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -6570,7 +6704,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6570
6704
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6571
6705
|
setIsVisible(false);
|
|
6572
6706
|
};
|
|
6573
|
-
|
|
6707
|
+
React127__default.useEffect(() => {
|
|
6574
6708
|
return () => {
|
|
6575
6709
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6576
6710
|
};
|
|
@@ -6780,7 +6914,7 @@ var init_StatusDot = __esm({
|
|
|
6780
6914
|
md: "w-2.5 h-2.5",
|
|
6781
6915
|
lg: "w-3 h-3"
|
|
6782
6916
|
};
|
|
6783
|
-
StatusDot =
|
|
6917
|
+
StatusDot = React127__default.forwardRef(
|
|
6784
6918
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
6785
6919
|
return /* @__PURE__ */ jsx(
|
|
6786
6920
|
"span",
|
|
@@ -6833,7 +6967,7 @@ var init_TrendIndicator = __esm({
|
|
|
6833
6967
|
down: TrendingDown,
|
|
6834
6968
|
flat: ArrowRight
|
|
6835
6969
|
};
|
|
6836
|
-
TrendIndicator =
|
|
6970
|
+
TrendIndicator = React127__default.forwardRef(
|
|
6837
6971
|
({
|
|
6838
6972
|
className,
|
|
6839
6973
|
value,
|
|
@@ -6900,7 +7034,7 @@ var init_RangeSlider = __esm({
|
|
|
6900
7034
|
md: "w-4 h-4",
|
|
6901
7035
|
lg: "w-5 h-5"
|
|
6902
7036
|
};
|
|
6903
|
-
RangeSlider =
|
|
7037
|
+
RangeSlider = React127__default.forwardRef(
|
|
6904
7038
|
({
|
|
6905
7039
|
className,
|
|
6906
7040
|
min = 0,
|
|
@@ -7496,7 +7630,7 @@ var init_ContentSection = __esm({
|
|
|
7496
7630
|
md: "py-16",
|
|
7497
7631
|
lg: "py-24"
|
|
7498
7632
|
};
|
|
7499
|
-
ContentSection =
|
|
7633
|
+
ContentSection = React127__default.forwardRef(
|
|
7500
7634
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
7501
7635
|
return /* @__PURE__ */ jsx(
|
|
7502
7636
|
Box,
|
|
@@ -8030,7 +8164,7 @@ var init_AnimatedReveal = __esm({
|
|
|
8030
8164
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
8031
8165
|
"none": {}
|
|
8032
8166
|
};
|
|
8033
|
-
AnimatedReveal =
|
|
8167
|
+
AnimatedReveal = React127__default.forwardRef(
|
|
8034
8168
|
({
|
|
8035
8169
|
trigger = "scroll",
|
|
8036
8170
|
animation = "fade-up",
|
|
@@ -8190,7 +8324,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8190
8324
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
8191
8325
|
"use client";
|
|
8192
8326
|
init_cn();
|
|
8193
|
-
AnimatedGraphic =
|
|
8327
|
+
AnimatedGraphic = React127__default.forwardRef(
|
|
8194
8328
|
({
|
|
8195
8329
|
src,
|
|
8196
8330
|
svgContent,
|
|
@@ -8213,7 +8347,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8213
8347
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
8214
8348
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
8215
8349
|
const prevAnimateRef = useRef(animate);
|
|
8216
|
-
const setRef =
|
|
8350
|
+
const setRef = React127__default.useCallback(
|
|
8217
8351
|
(node) => {
|
|
8218
8352
|
containerRef.current = node;
|
|
8219
8353
|
if (typeof ref === "function") ref(node);
|
|
@@ -8432,9 +8566,9 @@ function ScoreDisplay({
|
|
|
8432
8566
|
...rest
|
|
8433
8567
|
}) {
|
|
8434
8568
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
8435
|
-
const [displayValue, setDisplayValue] =
|
|
8436
|
-
const [isAnimating, setIsAnimating] =
|
|
8437
|
-
|
|
8569
|
+
const [displayValue, setDisplayValue] = React127.useState(resolvedValue);
|
|
8570
|
+
const [isAnimating, setIsAnimating] = React127.useState(false);
|
|
8571
|
+
React127.useEffect(() => {
|
|
8438
8572
|
if (!animated || displayValue === resolvedValue) {
|
|
8439
8573
|
setDisplayValue(resolvedValue);
|
|
8440
8574
|
return;
|
|
@@ -8504,9 +8638,9 @@ function ControlButton({
|
|
|
8504
8638
|
className
|
|
8505
8639
|
}) {
|
|
8506
8640
|
const eventBus = useEventBus();
|
|
8507
|
-
const [isPressed, setIsPressed] =
|
|
8641
|
+
const [isPressed, setIsPressed] = React127.useState(false);
|
|
8508
8642
|
const actualPressed = pressed ?? isPressed;
|
|
8509
|
-
const handlePointerDown =
|
|
8643
|
+
const handlePointerDown = React127.useCallback(
|
|
8510
8644
|
(e) => {
|
|
8511
8645
|
e.preventDefault();
|
|
8512
8646
|
if (disabled) return;
|
|
@@ -8516,7 +8650,7 @@ function ControlButton({
|
|
|
8516
8650
|
},
|
|
8517
8651
|
[disabled, pressEvent, eventBus, onPress]
|
|
8518
8652
|
);
|
|
8519
|
-
const handlePointerUp =
|
|
8653
|
+
const handlePointerUp = React127.useCallback(
|
|
8520
8654
|
(e) => {
|
|
8521
8655
|
e.preventDefault();
|
|
8522
8656
|
if (disabled) return;
|
|
@@ -8526,7 +8660,7 @@ function ControlButton({
|
|
|
8526
8660
|
},
|
|
8527
8661
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8528
8662
|
);
|
|
8529
|
-
const handlePointerLeave =
|
|
8663
|
+
const handlePointerLeave = React127.useCallback(
|
|
8530
8664
|
(e) => {
|
|
8531
8665
|
if (isPressed) {
|
|
8532
8666
|
setIsPressed(false);
|
|
@@ -9424,9 +9558,9 @@ function MiniMap({
|
|
|
9424
9558
|
viewportRect,
|
|
9425
9559
|
className
|
|
9426
9560
|
}) {
|
|
9427
|
-
const canvasRef =
|
|
9428
|
-
const frameRef =
|
|
9429
|
-
|
|
9561
|
+
const canvasRef = React127.useRef(null);
|
|
9562
|
+
const frameRef = React127.useRef(0);
|
|
9563
|
+
React127.useEffect(() => {
|
|
9430
9564
|
const canvas = canvasRef.current;
|
|
9431
9565
|
if (!canvas) return;
|
|
9432
9566
|
const ctx = canvas.getContext("2d");
|
|
@@ -9765,7 +9899,7 @@ var init_ErrorBoundary = __esm({
|
|
|
9765
9899
|
"use client";
|
|
9766
9900
|
init_cn();
|
|
9767
9901
|
init_ErrorState();
|
|
9768
|
-
ErrorBoundary = class extends
|
|
9902
|
+
ErrorBoundary = class extends React127__default.Component {
|
|
9769
9903
|
constructor(props) {
|
|
9770
9904
|
super(props);
|
|
9771
9905
|
__publicField(this, "reset", () => {
|
|
@@ -10238,8 +10372,8 @@ var init_Tooltip = __esm({
|
|
|
10238
10372
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
10239
10373
|
};
|
|
10240
10374
|
}, []);
|
|
10241
|
-
const triggerElement =
|
|
10242
|
-
const trigger =
|
|
10375
|
+
const triggerElement = React127__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10376
|
+
const trigger = React127__default.cloneElement(triggerElement, {
|
|
10243
10377
|
ref: triggerRef,
|
|
10244
10378
|
onMouseEnter: handleMouseEnter,
|
|
10245
10379
|
onMouseLeave: handleMouseLeave,
|
|
@@ -10360,8 +10494,8 @@ var init_Popover = __esm({
|
|
|
10360
10494
|
onMouseEnter: handleOpen,
|
|
10361
10495
|
onMouseLeave: handleClose
|
|
10362
10496
|
};
|
|
10363
|
-
const childElement =
|
|
10364
|
-
const triggerElement =
|
|
10497
|
+
const childElement = React127__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10498
|
+
const triggerElement = React127__default.cloneElement(
|
|
10365
10499
|
childElement,
|
|
10366
10500
|
{
|
|
10367
10501
|
ref: triggerRef,
|
|
@@ -10478,8 +10612,8 @@ var init_Menu = __esm({
|
|
|
10478
10612
|
"bottom-start": "top-full left-0 mt-2",
|
|
10479
10613
|
"bottom-end": "top-full right-0 mt-2"
|
|
10480
10614
|
};
|
|
10481
|
-
const triggerChild =
|
|
10482
|
-
const triggerElement =
|
|
10615
|
+
const triggerChild = React127__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
10616
|
+
const triggerElement = React127__default.cloneElement(
|
|
10483
10617
|
triggerChild,
|
|
10484
10618
|
{
|
|
10485
10619
|
ref: triggerRef,
|
|
@@ -10998,7 +11132,7 @@ var init_MapView = __esm({
|
|
|
10998
11132
|
shadowSize: [41, 41]
|
|
10999
11133
|
});
|
|
11000
11134
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
11001
|
-
const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState125 } =
|
|
11135
|
+
const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState125 } = React127__default;
|
|
11002
11136
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
11003
11137
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
11004
11138
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -11229,7 +11363,7 @@ function InputPattern({
|
|
|
11229
11363
|
fieldName
|
|
11230
11364
|
}) {
|
|
11231
11365
|
const { emit } = useEventBus();
|
|
11232
|
-
const [localValue, setLocalValue] =
|
|
11366
|
+
const [localValue, setLocalValue] = React127__default.useState(value);
|
|
11233
11367
|
const handleChange = (e) => {
|
|
11234
11368
|
setLocalValue(e.target.value);
|
|
11235
11369
|
if (onChange) {
|
|
@@ -11267,7 +11401,7 @@ function TextareaPattern({
|
|
|
11267
11401
|
fieldName
|
|
11268
11402
|
}) {
|
|
11269
11403
|
const { emit } = useEventBus();
|
|
11270
|
-
const [localValue, setLocalValue] =
|
|
11404
|
+
const [localValue, setLocalValue] = React127__default.useState(value);
|
|
11271
11405
|
const handleChange = (e) => {
|
|
11272
11406
|
setLocalValue(e.target.value);
|
|
11273
11407
|
if (onChange) {
|
|
@@ -11299,7 +11433,7 @@ function SelectPattern({
|
|
|
11299
11433
|
fieldName
|
|
11300
11434
|
}) {
|
|
11301
11435
|
const { emit } = useEventBus();
|
|
11302
|
-
const [localValue, setLocalValue] =
|
|
11436
|
+
const [localValue, setLocalValue] = React127__default.useState(value);
|
|
11303
11437
|
const handleChange = (e) => {
|
|
11304
11438
|
setLocalValue(e.target.value);
|
|
11305
11439
|
if (onChange) {
|
|
@@ -11328,7 +11462,7 @@ function CheckboxPattern({
|
|
|
11328
11462
|
className
|
|
11329
11463
|
}) {
|
|
11330
11464
|
const { emit } = useEventBus();
|
|
11331
|
-
const [localChecked, setLocalChecked] =
|
|
11465
|
+
const [localChecked, setLocalChecked] = React127__default.useState(checked);
|
|
11332
11466
|
const handleChange = (e) => {
|
|
11333
11467
|
setLocalChecked(e.target.checked);
|
|
11334
11468
|
if (onChange) {
|
|
@@ -11559,8 +11693,8 @@ function ActionButtons({
|
|
|
11559
11693
|
disabled
|
|
11560
11694
|
}) {
|
|
11561
11695
|
const eventBus = useEventBus();
|
|
11562
|
-
const [activeButtons, setActiveButtons] =
|
|
11563
|
-
const handlePress =
|
|
11696
|
+
const [activeButtons, setActiveButtons] = React127.useState(/* @__PURE__ */ new Set());
|
|
11697
|
+
const handlePress = React127.useCallback(
|
|
11564
11698
|
(id) => {
|
|
11565
11699
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
11566
11700
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11568,7 +11702,7 @@ function ActionButtons({
|
|
|
11568
11702
|
},
|
|
11569
11703
|
[actionEvent, eventBus, onAction]
|
|
11570
11704
|
);
|
|
11571
|
-
const handleRelease =
|
|
11705
|
+
const handleRelease = React127.useCallback(
|
|
11572
11706
|
(id) => {
|
|
11573
11707
|
setActiveButtons((prev) => {
|
|
11574
11708
|
const next = new Set(prev);
|
|
@@ -12154,7 +12288,7 @@ function bindEventBus(eventBus) {
|
|
|
12154
12288
|
eventLog.length = 0;
|
|
12155
12289
|
};
|
|
12156
12290
|
if (eventBus.onAny) {
|
|
12157
|
-
|
|
12291
|
+
const verificationRegistryEventLogger = (event) => {
|
|
12158
12292
|
if (eventLog.length < 200) {
|
|
12159
12293
|
eventLog.push({
|
|
12160
12294
|
type: event.type,
|
|
@@ -12162,7 +12296,11 @@ function bindEventBus(eventBus) {
|
|
|
12162
12296
|
timestamp: Date.now()
|
|
12163
12297
|
});
|
|
12164
12298
|
}
|
|
12299
|
+
};
|
|
12300
|
+
Object.defineProperty(verificationRegistryEventLogger, "name", {
|
|
12301
|
+
value: "verificationRegistry:eventLog"
|
|
12165
12302
|
});
|
|
12303
|
+
eventBus.onAny(verificationRegistryEventLogger);
|
|
12166
12304
|
}
|
|
12167
12305
|
}
|
|
12168
12306
|
}
|
|
@@ -13632,7 +13770,7 @@ var init_MarkdownContent = __esm({
|
|
|
13632
13770
|
init_Box();
|
|
13633
13771
|
init_useTranslate();
|
|
13634
13772
|
init_cn();
|
|
13635
|
-
MarkdownContent =
|
|
13773
|
+
MarkdownContent = React127__default.memo(
|
|
13636
13774
|
({ content, direction, className }) => {
|
|
13637
13775
|
const { t: _t } = useTranslate();
|
|
13638
13776
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13849,7 +13987,7 @@ var init_CodeBlock = __esm({
|
|
|
13849
13987
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
13850
13988
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13851
13989
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13852
|
-
CodeBlock =
|
|
13990
|
+
CodeBlock = React127__default.memo(
|
|
13853
13991
|
({
|
|
13854
13992
|
code: rawCode,
|
|
13855
13993
|
language = "text",
|
|
@@ -15158,7 +15296,7 @@ var init_StateMachineView = __esm({
|
|
|
15158
15296
|
style: { top: title ? 30 : 0 },
|
|
15159
15297
|
children: [
|
|
15160
15298
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15161
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15299
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React127__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15162
15300
|
StateNode,
|
|
15163
15301
|
{
|
|
15164
15302
|
state,
|
|
@@ -20941,7 +21079,7 @@ function CraftingRecipe({
|
|
|
20941
21079
|
className
|
|
20942
21080
|
}) {
|
|
20943
21081
|
const eventBus = useEventBus();
|
|
20944
|
-
const handleCraft =
|
|
21082
|
+
const handleCraft = React127.useCallback(() => {
|
|
20945
21083
|
onCraft?.();
|
|
20946
21084
|
if (craftEvent) {
|
|
20947
21085
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20958,7 +21096,7 @@ function CraftingRecipe({
|
|
|
20958
21096
|
children: [
|
|
20959
21097
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20960
21098
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20961
|
-
return /* @__PURE__ */ jsxs(
|
|
21099
|
+
return /* @__PURE__ */ jsxs(React127.Fragment, { children: [
|
|
20962
21100
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20963
21101
|
ItemSlot,
|
|
20964
21102
|
{
|
|
@@ -21252,8 +21390,8 @@ function DPad({
|
|
|
21252
21390
|
}) {
|
|
21253
21391
|
const eventBus = useEventBus();
|
|
21254
21392
|
const sizes = sizeMap15[size];
|
|
21255
|
-
const [activeDirections, setActiveDirections] =
|
|
21256
|
-
const handlePress =
|
|
21393
|
+
const [activeDirections, setActiveDirections] = React127.useState(/* @__PURE__ */ new Set());
|
|
21394
|
+
const handlePress = React127.useCallback(
|
|
21257
21395
|
(direction) => {
|
|
21258
21396
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21259
21397
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21261,7 +21399,7 @@ function DPad({
|
|
|
21261
21399
|
},
|
|
21262
21400
|
[directionEvent, eventBus, onDirection]
|
|
21263
21401
|
);
|
|
21264
|
-
const handleRelease =
|
|
21402
|
+
const handleRelease = React127.useCallback(
|
|
21265
21403
|
(direction) => {
|
|
21266
21404
|
setActiveDirections((prev) => {
|
|
21267
21405
|
const next = new Set(prev);
|
|
@@ -22140,7 +22278,7 @@ function DataList({
|
|
|
22140
22278
|
}) {
|
|
22141
22279
|
const eventBus = useEventBus();
|
|
22142
22280
|
const { t } = useTranslate();
|
|
22143
|
-
const [visibleCount, setVisibleCount] =
|
|
22281
|
+
const [visibleCount, setVisibleCount] = React127__default.useState(pageSize || Infinity);
|
|
22144
22282
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
22145
22283
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22146
22284
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -22181,7 +22319,7 @@ function DataList({
|
|
|
22181
22319
|
const items2 = data.map((item) => item);
|
|
22182
22320
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22183
22321
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
22184
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22322
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
22185
22323
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22186
22324
|
group.items.map((itemData, index) => {
|
|
22187
22325
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22373,7 +22511,7 @@ function DataList({
|
|
|
22373
22511
|
className
|
|
22374
22512
|
),
|
|
22375
22513
|
children: [
|
|
22376
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22514
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
22377
22515
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22378
22516
|
group.items.map(
|
|
22379
22517
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23181,20 +23319,21 @@ var init_InputGroup = __esm({
|
|
|
23181
23319
|
|
|
23182
23320
|
// lib/debug.ts
|
|
23183
23321
|
function isDebugEnabled() {
|
|
23184
|
-
return
|
|
23322
|
+
if (DEBUG_ENABLED) return true;
|
|
23323
|
+
return typeof window !== "undefined" && window.__ALMADAR_DEBUG_VERIFY__ === true;
|
|
23185
23324
|
}
|
|
23186
23325
|
function debug(...args) {
|
|
23187
|
-
if (
|
|
23326
|
+
if (isDebugEnabled()) {
|
|
23188
23327
|
console.log("[DEBUG]", ...args);
|
|
23189
23328
|
}
|
|
23190
23329
|
}
|
|
23191
23330
|
function debugGroup(label) {
|
|
23192
|
-
if (
|
|
23331
|
+
if (isDebugEnabled()) {
|
|
23193
23332
|
console.group(`[DEBUG] ${label}`);
|
|
23194
23333
|
}
|
|
23195
23334
|
}
|
|
23196
23335
|
function debugGroupEnd() {
|
|
23197
|
-
if (
|
|
23336
|
+
if (isDebugEnabled()) {
|
|
23198
23337
|
console.groupEnd();
|
|
23199
23338
|
}
|
|
23200
23339
|
}
|
|
@@ -23645,7 +23784,7 @@ var init_WizardProgress = __esm({
|
|
|
23645
23784
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23646
23785
|
const isActive = index === currentStep;
|
|
23647
23786
|
const isCompleted = index < currentStep;
|
|
23648
|
-
return /* @__PURE__ */ jsxs(
|
|
23787
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
23649
23788
|
/* @__PURE__ */ jsx(
|
|
23650
23789
|
"button",
|
|
23651
23790
|
{
|
|
@@ -24556,7 +24695,7 @@ function InventoryGrid({
|
|
|
24556
24695
|
const eventBus = useEventBus();
|
|
24557
24696
|
const slotCount = totalSlots ?? items.length;
|
|
24558
24697
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24559
|
-
const handleSelect =
|
|
24698
|
+
const handleSelect = React127.useCallback(
|
|
24560
24699
|
(id) => {
|
|
24561
24700
|
onSelect?.(id);
|
|
24562
24701
|
if (selectEvent) {
|
|
@@ -24769,15 +24908,15 @@ function GameCanvas2D({
|
|
|
24769
24908
|
fps = 60,
|
|
24770
24909
|
className
|
|
24771
24910
|
}) {
|
|
24772
|
-
const canvasRef =
|
|
24773
|
-
const rafRef =
|
|
24774
|
-
const frameRef =
|
|
24775
|
-
const lastTimeRef =
|
|
24776
|
-
const onDrawRef =
|
|
24911
|
+
const canvasRef = React127.useRef(null);
|
|
24912
|
+
const rafRef = React127.useRef(0);
|
|
24913
|
+
const frameRef = React127.useRef(0);
|
|
24914
|
+
const lastTimeRef = React127.useRef(0);
|
|
24915
|
+
const onDrawRef = React127.useRef(onDraw);
|
|
24777
24916
|
onDrawRef.current = onDraw;
|
|
24778
|
-
const onTickRef =
|
|
24917
|
+
const onTickRef = React127.useRef(onTick);
|
|
24779
24918
|
onTickRef.current = onTick;
|
|
24780
|
-
|
|
24919
|
+
React127.useEffect(() => {
|
|
24781
24920
|
const canvas = canvasRef.current;
|
|
24782
24921
|
if (!canvas) return;
|
|
24783
24922
|
const ctx = canvas.getContext("2d");
|
|
@@ -25066,7 +25205,7 @@ function TurnPanel({
|
|
|
25066
25205
|
className
|
|
25067
25206
|
}) {
|
|
25068
25207
|
const eventBus = useEventBus();
|
|
25069
|
-
const handleAction =
|
|
25208
|
+
const handleAction = React127.useCallback(
|
|
25070
25209
|
(event) => {
|
|
25071
25210
|
if (event) {
|
|
25072
25211
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25212,7 +25351,7 @@ function UnitCommandBar({
|
|
|
25212
25351
|
className
|
|
25213
25352
|
}) {
|
|
25214
25353
|
const eventBus = useEventBus();
|
|
25215
|
-
const handleCommand =
|
|
25354
|
+
const handleCommand = React127.useCallback(
|
|
25216
25355
|
(event) => {
|
|
25217
25356
|
if (event) {
|
|
25218
25357
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25697,7 +25836,7 @@ function GameMenu({
|
|
|
25697
25836
|
} catch {
|
|
25698
25837
|
}
|
|
25699
25838
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25700
|
-
const handleOptionClick =
|
|
25839
|
+
const handleOptionClick = React127.useCallback(
|
|
25701
25840
|
(option) => {
|
|
25702
25841
|
if (option.event && eventBus) {
|
|
25703
25842
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25811,7 +25950,7 @@ function GameOverScreen({
|
|
|
25811
25950
|
} catch {
|
|
25812
25951
|
}
|
|
25813
25952
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25814
|
-
const handleActionClick =
|
|
25953
|
+
const handleActionClick = React127.useCallback(
|
|
25815
25954
|
(action) => {
|
|
25816
25955
|
if (action.event && eventBus) {
|
|
25817
25956
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28915,7 +29054,7 @@ var init_StepFlow = __esm({
|
|
|
28915
29054
|
className
|
|
28916
29055
|
}) => {
|
|
28917
29056
|
if (orientation === "vertical") {
|
|
28918
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29057
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React127__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
28919
29058
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
28920
29059
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28921
29060
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -28926,7 +29065,7 @@ var init_StepFlow = __esm({
|
|
|
28926
29065
|
] })
|
|
28927
29066
|
] }) }, index)) });
|
|
28928
29067
|
}
|
|
28929
|
-
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(
|
|
29068
|
+
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(React127__default.Fragment, { children: [
|
|
28930
29069
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
28931
29070
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28932
29071
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31040,7 +31179,7 @@ var init_DocumentViewer = __esm({
|
|
|
31040
31179
|
}
|
|
31041
31180
|
});
|
|
31042
31181
|
function extractTitle(children) {
|
|
31043
|
-
if (!
|
|
31182
|
+
if (!React127__default.isValidElement(children)) return void 0;
|
|
31044
31183
|
const props = children.props;
|
|
31045
31184
|
if (typeof props.title === "string") {
|
|
31046
31185
|
return props.title;
|
|
@@ -31095,7 +31234,7 @@ function LinearView({
|
|
|
31095
31234
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
31096
31235
|
const isDone = i < currentIdx;
|
|
31097
31236
|
const isCurrent = i === currentIdx;
|
|
31098
|
-
return /* @__PURE__ */ jsxs(
|
|
31237
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
31099
31238
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31100
31239
|
Typography,
|
|
31101
31240
|
{
|
|
@@ -31845,7 +31984,14 @@ var init_Form = __esm({
|
|
|
31845
31984
|
// Schema-based props
|
|
31846
31985
|
entity,
|
|
31847
31986
|
fields,
|
|
31848
|
-
|
|
31987
|
+
// No `= {}` default: a fresh `{}` evaluated inline on every render
|
|
31988
|
+
// would change the prop reference every tick and bust the useMemo
|
|
31989
|
+
// cache below (`[entity, initialData]` deps), reigniting the
|
|
31990
|
+
// setFormData useEffect on every keystroke and producing an
|
|
31991
|
+
// infinite re-render loop with stuck form inputs. The memo and
|
|
31992
|
+
// submit handler both handle `undefined` already via the
|
|
31993
|
+
// `typeof initialData === 'object'` guard.
|
|
31994
|
+
initialData,
|
|
31849
31995
|
isLoading = false,
|
|
31850
31996
|
error,
|
|
31851
31997
|
submitLabel,
|
|
@@ -31872,10 +32018,12 @@ var init_Form = __esm({
|
|
|
31872
32018
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
31873
32019
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
31874
32020
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
31875
|
-
const
|
|
31876
|
-
|
|
31877
|
-
|
|
31878
|
-
|
|
32021
|
+
const normalizedInitialData = React127__default.useMemo(() => {
|
|
32022
|
+
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
32023
|
+
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
32024
|
+
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
32025
|
+
}, [entity, initialData]);
|
|
32026
|
+
const entityDerivedFields = React127__default.useMemo(() => {
|
|
31879
32027
|
if (fields && fields.length > 0) return void 0;
|
|
31880
32028
|
if (!resolvedEntity) return void 0;
|
|
31881
32029
|
return resolvedEntity.fields.map(
|
|
@@ -31894,14 +32042,27 @@ var init_Form = __esm({
|
|
|
31894
32042
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
31895
32043
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
31896
32044
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
31897
|
-
const [formData, setFormData] =
|
|
32045
|
+
const [formData, setFormData] = React127__default.useState(
|
|
31898
32046
|
normalizedInitialData
|
|
31899
32047
|
);
|
|
31900
|
-
const [collapsedSections, setCollapsedSections] =
|
|
32048
|
+
const [collapsedSections, setCollapsedSections] = React127__default.useState(
|
|
31901
32049
|
/* @__PURE__ */ new Set()
|
|
31902
32050
|
);
|
|
32051
|
+
const formMode = props.mode;
|
|
32052
|
+
const mountedRef = React127__default.useRef(false);
|
|
32053
|
+
if (!mountedRef.current) {
|
|
32054
|
+
mountedRef.current = true;
|
|
32055
|
+
debug("forms", "mount", {
|
|
32056
|
+
mode: formMode,
|
|
32057
|
+
submitEvent,
|
|
32058
|
+
cancelEvent,
|
|
32059
|
+
fieldNames: (fields ?? []).map((f3) => f3.name ?? f3.field).filter(Boolean),
|
|
32060
|
+
initialDataKeys: Object.keys(normalizedInitialData),
|
|
32061
|
+
initialData: normalizedInitialData
|
|
32062
|
+
});
|
|
32063
|
+
}
|
|
31903
32064
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
31904
|
-
const evalContext =
|
|
32065
|
+
const evalContext = React127__default.useMemo(
|
|
31905
32066
|
() => ({
|
|
31906
32067
|
formValues: formData,
|
|
31907
32068
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -31910,12 +32071,18 @@ var init_Form = __esm({
|
|
|
31910
32071
|
}),
|
|
31911
32072
|
[formData, externalContext]
|
|
31912
32073
|
);
|
|
31913
|
-
|
|
32074
|
+
React127__default.useEffect(() => {
|
|
32075
|
+
debug("forms", "initialData-sync", {
|
|
32076
|
+
mode: formMode,
|
|
32077
|
+
normalizedInitialData,
|
|
32078
|
+
prevFormData: formData,
|
|
32079
|
+
willSet: Object.keys(normalizedInitialData).length > 0
|
|
32080
|
+
});
|
|
31914
32081
|
if (Object.keys(normalizedInitialData).length > 0) {
|
|
31915
32082
|
setFormData(normalizedInitialData);
|
|
31916
32083
|
}
|
|
31917
32084
|
}, [normalizedInitialData]);
|
|
31918
|
-
const processCalculations =
|
|
32085
|
+
const processCalculations = React127__default.useCallback(
|
|
31919
32086
|
(changedFieldId, newFormData) => {
|
|
31920
32087
|
if (!hiddenCalculations.length) return;
|
|
31921
32088
|
const context = {
|
|
@@ -31940,7 +32107,7 @@ var init_Form = __esm({
|
|
|
31940
32107
|
},
|
|
31941
32108
|
[hiddenCalculations, externalContext, eventBus]
|
|
31942
32109
|
);
|
|
31943
|
-
const checkViolations =
|
|
32110
|
+
const checkViolations = React127__default.useCallback(
|
|
31944
32111
|
(changedFieldId, newFormData) => {
|
|
31945
32112
|
if (!violationTriggers.length) return;
|
|
31946
32113
|
const context = {
|
|
@@ -31967,6 +32134,7 @@ var init_Form = __esm({
|
|
|
31967
32134
|
);
|
|
31968
32135
|
const handleChange = (name, value) => {
|
|
31969
32136
|
const newFormData = { ...formData, [name]: value };
|
|
32137
|
+
debug("forms", "field-change", { mode: formMode, name, value, prevFormData: formData, newFormData });
|
|
31970
32138
|
setFormData(newFormData);
|
|
31971
32139
|
eventBus.emit("UI:FIELD_CHANGED", {
|
|
31972
32140
|
fieldId: name,
|
|
@@ -31977,7 +32145,7 @@ var init_Form = __esm({
|
|
|
31977
32145
|
processCalculations(name, newFormData);
|
|
31978
32146
|
checkViolations(name, newFormData);
|
|
31979
32147
|
};
|
|
31980
|
-
const isFieldVisible =
|
|
32148
|
+
const isFieldVisible = React127__default.useCallback(
|
|
31981
32149
|
(fieldName) => {
|
|
31982
32150
|
const condition = conditionalFields[fieldName];
|
|
31983
32151
|
if (!condition) return true;
|
|
@@ -31985,7 +32153,7 @@ var init_Form = __esm({
|
|
|
31985
32153
|
},
|
|
31986
32154
|
[conditionalFields, evalContext]
|
|
31987
32155
|
);
|
|
31988
|
-
const isSectionVisible =
|
|
32156
|
+
const isSectionVisible = React127__default.useCallback(
|
|
31989
32157
|
(section) => {
|
|
31990
32158
|
if (!section.condition) return true;
|
|
31991
32159
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -32005,11 +32173,18 @@ var init_Form = __esm({
|
|
|
32005
32173
|
};
|
|
32006
32174
|
const handleSubmit = (e) => {
|
|
32007
32175
|
e.preventDefault();
|
|
32176
|
+
debug("forms", "submit-enter", {
|
|
32177
|
+
mode: formMode,
|
|
32178
|
+
submitEvent,
|
|
32179
|
+
formData,
|
|
32180
|
+
normalizedInitialData
|
|
32181
|
+
});
|
|
32008
32182
|
const mergedData = {
|
|
32009
32183
|
...normalizedInitialData,
|
|
32010
32184
|
...formData
|
|
32011
32185
|
};
|
|
32012
32186
|
const payload = { data: mergedData };
|
|
32187
|
+
debug("forms", "submit-emit", { mode: formMode, submitEvent: `UI:${submitEvent}`, payloadData: payload.data });
|
|
32013
32188
|
eventBus.emit(`UI:${submitEvent}`, payload);
|
|
32014
32189
|
if (onSubmit) {
|
|
32015
32190
|
eventBus.emit(`UI:${onSubmit}`, payload);
|
|
@@ -32022,7 +32197,7 @@ var init_Form = __esm({
|
|
|
32022
32197
|
eventBus.emit(`UI:${onCancel}`);
|
|
32023
32198
|
}
|
|
32024
32199
|
};
|
|
32025
|
-
const renderField =
|
|
32200
|
+
const renderField = React127__default.useCallback(
|
|
32026
32201
|
(field) => {
|
|
32027
32202
|
const fieldName = field.name || field.field;
|
|
32028
32203
|
if (!fieldName) return null;
|
|
@@ -32043,7 +32218,7 @@ var init_Form = __esm({
|
|
|
32043
32218
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
32044
32219
|
);
|
|
32045
32220
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
32046
|
-
const normalizedFields =
|
|
32221
|
+
const normalizedFields = React127__default.useMemo(() => {
|
|
32047
32222
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
32048
32223
|
return effectiveFields.map((field) => {
|
|
32049
32224
|
if (typeof field === "string") {
|
|
@@ -32065,7 +32240,7 @@ var init_Form = __esm({
|
|
|
32065
32240
|
return field;
|
|
32066
32241
|
});
|
|
32067
32242
|
}, [effectiveFields, resolvedEntity]);
|
|
32068
|
-
const schemaFields =
|
|
32243
|
+
const schemaFields = React127__default.useMemo(() => {
|
|
32069
32244
|
if (normalizedFields.length === 0) return null;
|
|
32070
32245
|
if (isDebugEnabled()) {
|
|
32071
32246
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -32075,7 +32250,7 @@ var init_Form = __esm({
|
|
|
32075
32250
|
}
|
|
32076
32251
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
32077
32252
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
32078
|
-
const sectionElements =
|
|
32253
|
+
const sectionElements = React127__default.useMemo(() => {
|
|
32079
32254
|
if (!sections || sections.length === 0) return null;
|
|
32080
32255
|
return sections.map((section) => {
|
|
32081
32256
|
if (!isSectionVisible(section)) {
|
|
@@ -33599,7 +33774,7 @@ var init_List = __esm({
|
|
|
33599
33774
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
33600
33775
|
return [];
|
|
33601
33776
|
}, [entity]);
|
|
33602
|
-
const getItemActions =
|
|
33777
|
+
const getItemActions = React127__default.useCallback(
|
|
33603
33778
|
(item) => {
|
|
33604
33779
|
if (!itemActions) return [];
|
|
33605
33780
|
if (typeof itemActions === "function") {
|
|
@@ -34036,7 +34211,7 @@ var init_MediaGallery = __esm({
|
|
|
34036
34211
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
34037
34212
|
);
|
|
34038
34213
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
34039
|
-
const items =
|
|
34214
|
+
const items = React127__default.useMemo(() => {
|
|
34040
34215
|
if (propItems) return propItems;
|
|
34041
34216
|
if (entityData.length === 0) return [];
|
|
34042
34217
|
return entityData.map((record, idx) => ({
|
|
@@ -34200,7 +34375,7 @@ var init_MediaGallery = __esm({
|
|
|
34200
34375
|
}
|
|
34201
34376
|
});
|
|
34202
34377
|
function extractTitle2(children) {
|
|
34203
|
-
if (!
|
|
34378
|
+
if (!React127__default.isValidElement(children)) return void 0;
|
|
34204
34379
|
const props = children.props;
|
|
34205
34380
|
if (typeof props.title === "string") {
|
|
34206
34381
|
return props.title;
|
|
@@ -34913,7 +35088,7 @@ var init_PageHeader = __esm({
|
|
|
34913
35088
|
info: "bg-info/10 text-info"
|
|
34914
35089
|
};
|
|
34915
35090
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34916
|
-
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(
|
|
35091
|
+
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(React127__default.Fragment, { children: [
|
|
34917
35092
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34918
35093
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34919
35094
|
"a",
|
|
@@ -35106,7 +35281,7 @@ var init_debugRegistry = __esm({
|
|
|
35106
35281
|
}
|
|
35107
35282
|
});
|
|
35108
35283
|
function useDebugData() {
|
|
35109
|
-
const [data, setData] =
|
|
35284
|
+
const [data, setData] = React127.useState(() => ({
|
|
35110
35285
|
traits: [],
|
|
35111
35286
|
ticks: [],
|
|
35112
35287
|
guards: [],
|
|
@@ -35120,7 +35295,7 @@ function useDebugData() {
|
|
|
35120
35295
|
},
|
|
35121
35296
|
lastUpdate: Date.now()
|
|
35122
35297
|
}));
|
|
35123
|
-
|
|
35298
|
+
React127.useEffect(() => {
|
|
35124
35299
|
const updateData = () => {
|
|
35125
35300
|
setData({
|
|
35126
35301
|
traits: getAllTraits(),
|
|
@@ -35229,12 +35404,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
35229
35404
|
return positions;
|
|
35230
35405
|
}
|
|
35231
35406
|
function WalkMinimap() {
|
|
35232
|
-
const [walkStep, setWalkStep] =
|
|
35233
|
-
const [traits2, setTraits] =
|
|
35234
|
-
const [coveredEdges, setCoveredEdges] =
|
|
35235
|
-
const [completedTraits, setCompletedTraits] =
|
|
35236
|
-
const prevTraitRef =
|
|
35237
|
-
|
|
35407
|
+
const [walkStep, setWalkStep] = React127.useState(null);
|
|
35408
|
+
const [traits2, setTraits] = React127.useState([]);
|
|
35409
|
+
const [coveredEdges, setCoveredEdges] = React127.useState([]);
|
|
35410
|
+
const [completedTraits, setCompletedTraits] = React127.useState(/* @__PURE__ */ new Set());
|
|
35411
|
+
const prevTraitRef = React127.useRef(null);
|
|
35412
|
+
React127.useEffect(() => {
|
|
35238
35413
|
const interval = setInterval(() => {
|
|
35239
35414
|
const w = window;
|
|
35240
35415
|
const step = w.__orbitalWalkStep;
|
|
@@ -35681,15 +35856,15 @@ var init_EntitiesTab = __esm({
|
|
|
35681
35856
|
}
|
|
35682
35857
|
});
|
|
35683
35858
|
function EventFlowTab({ events: events2 }) {
|
|
35684
|
-
const [filter, setFilter] =
|
|
35685
|
-
const containerRef =
|
|
35686
|
-
const [autoScroll, setAutoScroll] =
|
|
35687
|
-
|
|
35859
|
+
const [filter, setFilter] = React127.useState("all");
|
|
35860
|
+
const containerRef = React127.useRef(null);
|
|
35861
|
+
const [autoScroll, setAutoScroll] = React127.useState(true);
|
|
35862
|
+
React127.useEffect(() => {
|
|
35688
35863
|
if (autoScroll && containerRef.current) {
|
|
35689
35864
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35690
35865
|
}
|
|
35691
35866
|
}, [events2.length, autoScroll]);
|
|
35692
|
-
const filteredEvents =
|
|
35867
|
+
const filteredEvents = React127.useMemo(() => {
|
|
35693
35868
|
if (filter === "all") return events2;
|
|
35694
35869
|
return events2.filter((e) => e.type === filter);
|
|
35695
35870
|
}, [events2, filter]);
|
|
@@ -35808,7 +35983,7 @@ var init_EventFlowTab = __esm({
|
|
|
35808
35983
|
}
|
|
35809
35984
|
});
|
|
35810
35985
|
function GuardsPanel({ guards }) {
|
|
35811
|
-
const [filter, setFilter] =
|
|
35986
|
+
const [filter, setFilter] = React127.useState("all");
|
|
35812
35987
|
if (guards.length === 0) {
|
|
35813
35988
|
return /* @__PURE__ */ jsx(
|
|
35814
35989
|
EmptyState,
|
|
@@ -35821,7 +35996,7 @@ function GuardsPanel({ guards }) {
|
|
|
35821
35996
|
}
|
|
35822
35997
|
const passedCount = guards.filter((g) => g.result).length;
|
|
35823
35998
|
const failedCount = guards.length - passedCount;
|
|
35824
|
-
const filteredGuards =
|
|
35999
|
+
const filteredGuards = React127.useMemo(() => {
|
|
35825
36000
|
if (filter === "all") return guards;
|
|
35826
36001
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
35827
36002
|
return guards.filter((g) => !g.result);
|
|
@@ -35982,10 +36157,10 @@ function EffectBadge({ effect }) {
|
|
|
35982
36157
|
] });
|
|
35983
36158
|
}
|
|
35984
36159
|
function TransitionTimeline({ transitions }) {
|
|
35985
|
-
const containerRef =
|
|
35986
|
-
const [autoScroll, setAutoScroll] =
|
|
35987
|
-
const [expandedId, setExpandedId] =
|
|
35988
|
-
|
|
36160
|
+
const containerRef = React127.useRef(null);
|
|
36161
|
+
const [autoScroll, setAutoScroll] = React127.useState(true);
|
|
36162
|
+
const [expandedId, setExpandedId] = React127.useState(null);
|
|
36163
|
+
React127.useEffect(() => {
|
|
35989
36164
|
if (autoScroll && containerRef.current) {
|
|
35990
36165
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35991
36166
|
}
|
|
@@ -36271,9 +36446,9 @@ function getAllEvents(traits2) {
|
|
|
36271
36446
|
}
|
|
36272
36447
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
36273
36448
|
const eventBus = useEventBus();
|
|
36274
|
-
const [log4, setLog] =
|
|
36275
|
-
const prevStatesRef =
|
|
36276
|
-
|
|
36449
|
+
const [log4, setLog] = React127.useState([]);
|
|
36450
|
+
const prevStatesRef = React127.useRef(/* @__PURE__ */ new Map());
|
|
36451
|
+
React127.useEffect(() => {
|
|
36277
36452
|
for (const trait of traits2) {
|
|
36278
36453
|
const prev = prevStatesRef.current.get(trait.id);
|
|
36279
36454
|
if (prev && prev !== trait.currentState) {
|
|
@@ -36443,10 +36618,10 @@ function VerifyModePanel({
|
|
|
36443
36618
|
serverCount,
|
|
36444
36619
|
localCount
|
|
36445
36620
|
}) {
|
|
36446
|
-
const [expanded, setExpanded] =
|
|
36447
|
-
const scrollRef =
|
|
36448
|
-
const prevCountRef =
|
|
36449
|
-
|
|
36621
|
+
const [expanded, setExpanded] = React127.useState(true);
|
|
36622
|
+
const scrollRef = React127.useRef(null);
|
|
36623
|
+
const prevCountRef = React127.useRef(0);
|
|
36624
|
+
React127.useEffect(() => {
|
|
36450
36625
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
36451
36626
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
36452
36627
|
}
|
|
@@ -36512,10 +36687,10 @@ function RuntimeDebugger({
|
|
|
36512
36687
|
defaultTab,
|
|
36513
36688
|
schema
|
|
36514
36689
|
}) {
|
|
36515
|
-
const [isCollapsed, setIsCollapsed] =
|
|
36516
|
-
const [isVisible, setIsVisible] =
|
|
36690
|
+
const [isCollapsed, setIsCollapsed] = React127.useState(mode === "verify" ? true : defaultCollapsed);
|
|
36691
|
+
const [isVisible, setIsVisible] = React127.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
36517
36692
|
const debugData = useDebugData();
|
|
36518
|
-
|
|
36693
|
+
React127.useEffect(() => {
|
|
36519
36694
|
if (mode === "inline") return;
|
|
36520
36695
|
return onDebugToggle((enabled) => {
|
|
36521
36696
|
setIsVisible(enabled);
|
|
@@ -36524,7 +36699,7 @@ function RuntimeDebugger({
|
|
|
36524
36699
|
}
|
|
36525
36700
|
});
|
|
36526
36701
|
}, [mode]);
|
|
36527
|
-
|
|
36702
|
+
React127.useEffect(() => {
|
|
36528
36703
|
if (mode === "inline") return;
|
|
36529
36704
|
const handleKeyDown = (e) => {
|
|
36530
36705
|
if (e.key === "`" && isVisible) {
|
|
@@ -37073,7 +37248,7 @@ function SequenceBar({
|
|
|
37073
37248
|
onSlotRemove(index);
|
|
37074
37249
|
}, [onSlotRemove, playing]);
|
|
37075
37250
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
37076
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
37251
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
37077
37252
|
i > 0 && /* @__PURE__ */ jsx(
|
|
37078
37253
|
Typography,
|
|
37079
37254
|
{
|
|
@@ -38418,7 +38593,7 @@ var init_StatCard2 = __esm({
|
|
|
38418
38593
|
const labelToUse = propLabel ?? propTitle;
|
|
38419
38594
|
const eventBus = useEventBus();
|
|
38420
38595
|
const { t } = useTranslate();
|
|
38421
|
-
const handleActionClick =
|
|
38596
|
+
const handleActionClick = React127__default.useCallback(() => {
|
|
38422
38597
|
if (action?.event) {
|
|
38423
38598
|
eventBus.emit(`UI:${action.event}`, {});
|
|
38424
38599
|
}
|
|
@@ -38429,7 +38604,7 @@ var init_StatCard2 = __esm({
|
|
|
38429
38604
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38430
38605
|
const isLoading = externalLoading ?? false;
|
|
38431
38606
|
const error = externalError;
|
|
38432
|
-
const computeMetricValue =
|
|
38607
|
+
const computeMetricValue = React127__default.useCallback(
|
|
38433
38608
|
(metric, items) => {
|
|
38434
38609
|
if (metric.value !== void 0) {
|
|
38435
38610
|
return metric.value;
|
|
@@ -38468,7 +38643,7 @@ var init_StatCard2 = __esm({
|
|
|
38468
38643
|
},
|
|
38469
38644
|
[]
|
|
38470
38645
|
);
|
|
38471
|
-
const schemaStats =
|
|
38646
|
+
const schemaStats = React127__default.useMemo(() => {
|
|
38472
38647
|
if (!metrics || metrics.length === 0) return null;
|
|
38473
38648
|
return metrics.map((metric) => ({
|
|
38474
38649
|
label: metric.label,
|
|
@@ -38476,7 +38651,7 @@ var init_StatCard2 = __esm({
|
|
|
38476
38651
|
format: metric.format
|
|
38477
38652
|
}));
|
|
38478
38653
|
}, [metrics, data, computeMetricValue]);
|
|
38479
|
-
const calculatedTrend =
|
|
38654
|
+
const calculatedTrend = React127__default.useMemo(() => {
|
|
38480
38655
|
if (manualTrend !== void 0) return manualTrend;
|
|
38481
38656
|
if (previousValue === void 0 || currentValue === void 0)
|
|
38482
38657
|
return void 0;
|
|
@@ -39460,7 +39635,7 @@ var init_Timeline = __esm({
|
|
|
39460
39635
|
}) => {
|
|
39461
39636
|
const { t } = useTranslate();
|
|
39462
39637
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39463
|
-
const items =
|
|
39638
|
+
const items = React127__default.useMemo(() => {
|
|
39464
39639
|
if (propItems) return propItems;
|
|
39465
39640
|
if (entityData.length === 0) return [];
|
|
39466
39641
|
return entityData.map((record, idx) => {
|
|
@@ -39567,7 +39742,7 @@ var init_Timeline = __esm({
|
|
|
39567
39742
|
}
|
|
39568
39743
|
});
|
|
39569
39744
|
function extractToastProps(children) {
|
|
39570
|
-
if (!
|
|
39745
|
+
if (!React127__default.isValidElement(children)) {
|
|
39571
39746
|
if (typeof children === "string") {
|
|
39572
39747
|
return { message: children };
|
|
39573
39748
|
}
|
|
@@ -39605,7 +39780,7 @@ var init_ToastSlot = __esm({
|
|
|
39605
39780
|
eventBus.emit("UI:CLOSE");
|
|
39606
39781
|
};
|
|
39607
39782
|
if (!isVisible) return null;
|
|
39608
|
-
const isCustomContent =
|
|
39783
|
+
const isCustomContent = React127__default.isValidElement(children) && !message;
|
|
39609
39784
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
39610
39785
|
Toast,
|
|
39611
39786
|
{
|
|
@@ -39874,7 +40049,7 @@ var init_WizardContainer = __esm({
|
|
|
39874
40049
|
const isCompleted = index < currentStep;
|
|
39875
40050
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39876
40051
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39877
|
-
return /* @__PURE__ */ jsxs(
|
|
40052
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
39878
40053
|
/* @__PURE__ */ jsx(
|
|
39879
40054
|
Button,
|
|
39880
40055
|
{
|
|
@@ -42063,7 +42238,7 @@ function UnitRenderer({
|
|
|
42063
42238
|
onAnimationStateChange,
|
|
42064
42239
|
animationSpeed = 1
|
|
42065
42240
|
}) {
|
|
42066
|
-
const handleUnitClick =
|
|
42241
|
+
const handleUnitClick = React127__default.useCallback(
|
|
42067
42242
|
(unit) => {
|
|
42068
42243
|
onUnitClick?.(unit);
|
|
42069
42244
|
},
|
|
@@ -45257,7 +45432,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45257
45432
|
const handleTraitClick = useCallback((name) => {
|
|
45258
45433
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
45259
45434
|
}, []);
|
|
45260
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
45435
|
+
const [highlightedTrait, setHighlightedTrait] = React127__default.useState(null);
|
|
45261
45436
|
const handleTransitionClick = useCallback((index) => {
|
|
45262
45437
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
45263
45438
|
}, []);
|
|
@@ -45344,7 +45519,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45344
45519
|
gap: "xs",
|
|
45345
45520
|
align: "center",
|
|
45346
45521
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
45347
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
45522
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
45348
45523
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
45349
45524
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
45350
45525
|
Box,
|
|
@@ -45722,12 +45897,12 @@ var init_three = __esm({
|
|
|
45722
45897
|
}
|
|
45723
45898
|
});
|
|
45724
45899
|
function lazyThree(name, loader) {
|
|
45725
|
-
const Lazy =
|
|
45900
|
+
const Lazy = React127__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45726
45901
|
function ThreeWrapper(props) {
|
|
45727
|
-
return
|
|
45728
|
-
|
|
45902
|
+
return React127__default.createElement(
|
|
45903
|
+
React127__default.Suspense,
|
|
45729
45904
|
{ fallback: null },
|
|
45730
|
-
|
|
45905
|
+
React127__default.createElement(Lazy, props)
|
|
45731
45906
|
);
|
|
45732
45907
|
}
|
|
45733
45908
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46215,7 +46390,7 @@ function SuspenseConfigProvider({
|
|
|
46215
46390
|
config,
|
|
46216
46391
|
children
|
|
46217
46392
|
}) {
|
|
46218
|
-
return
|
|
46393
|
+
return React127__default.createElement(
|
|
46219
46394
|
SuspenseConfigContext.Provider,
|
|
46220
46395
|
{ value: config },
|
|
46221
46396
|
children
|
|
@@ -46679,7 +46854,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46679
46854
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46680
46855
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46681
46856
|
}
|
|
46682
|
-
return /* @__PURE__ */ jsx(
|
|
46857
|
+
return /* @__PURE__ */ jsx(React127__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46683
46858
|
}
|
|
46684
46859
|
if (!child || typeof child !== "object") return null;
|
|
46685
46860
|
const childId = `${parentId}-${index}`;
|
|
@@ -46741,6 +46916,14 @@ function SlotContentRenderer({
|
|
|
46741
46916
|
patternPath
|
|
46742
46917
|
}) {
|
|
46743
46918
|
const entityProp = content.props.entity;
|
|
46919
|
+
if (content.pattern === "form-section") {
|
|
46920
|
+
slotLog.debug("SlotContentRenderer:form-section-render", {
|
|
46921
|
+
contentId: content.id,
|
|
46922
|
+
sourceTrait: content.sourceTrait,
|
|
46923
|
+
entityRefId: refId(entityProp),
|
|
46924
|
+
entityIsObject: entityProp !== null && typeof entityProp === "object" && !Array.isArray(entityProp)
|
|
46925
|
+
});
|
|
46926
|
+
}
|
|
46744
46927
|
if (typeof entityProp === "string" && entityProp.length > 0) {
|
|
46745
46928
|
if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production") {
|
|
46746
46929
|
throw new Error(
|
|
@@ -46885,6 +47068,7 @@ var init_UISlotRenderer = __esm({
|
|
|
46885
47068
|
init_Box();
|
|
46886
47069
|
init_Typography();
|
|
46887
47070
|
init_useEventBus();
|
|
47071
|
+
init_SlotsContext();
|
|
46888
47072
|
init_cn();
|
|
46889
47073
|
init_ErrorBoundary();
|
|
46890
47074
|
init_Skeleton();
|
|
@@ -47311,7 +47495,7 @@ var AvlTransition = ({
|
|
|
47311
47495
|
opacity = 1,
|
|
47312
47496
|
className
|
|
47313
47497
|
}) => {
|
|
47314
|
-
const ids =
|
|
47498
|
+
const ids = React127__default.useMemo(() => {
|
|
47315
47499
|
avlTransitionId += 1;
|
|
47316
47500
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47317
47501
|
}, []);
|
|
@@ -48076,7 +48260,7 @@ var AvlStateMachine = ({
|
|
|
48076
48260
|
color = "var(--color-primary)",
|
|
48077
48261
|
animated = false
|
|
48078
48262
|
}) => {
|
|
48079
|
-
const ids =
|
|
48263
|
+
const ids = React127__default.useMemo(() => {
|
|
48080
48264
|
avlSmId += 1;
|
|
48081
48265
|
const base = `avl-sm-${avlSmId}`;
|
|
48082
48266
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48271,7 +48455,7 @@ var AvlOrbitalUnit = ({
|
|
|
48271
48455
|
color = "var(--color-primary)",
|
|
48272
48456
|
animated = false
|
|
48273
48457
|
}) => {
|
|
48274
|
-
const ids =
|
|
48458
|
+
const ids = React127__default.useMemo(() => {
|
|
48275
48459
|
avlOuId += 1;
|
|
48276
48460
|
const base = `avl-ou-${avlOuId}`;
|
|
48277
48461
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48363,7 +48547,7 @@ var AvlClosedCircuit = ({
|
|
|
48363
48547
|
color = "var(--color-primary)",
|
|
48364
48548
|
animated = false
|
|
48365
48549
|
}) => {
|
|
48366
|
-
const ids =
|
|
48550
|
+
const ids = React127__default.useMemo(() => {
|
|
48367
48551
|
avlCcId += 1;
|
|
48368
48552
|
const base = `avl-cc-${avlCcId}`;
|
|
48369
48553
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48516,7 +48700,7 @@ var AvlEmitListen = ({
|
|
|
48516
48700
|
color = "var(--color-primary)",
|
|
48517
48701
|
animated = false
|
|
48518
48702
|
}) => {
|
|
48519
|
-
const ids =
|
|
48703
|
+
const ids = React127__default.useMemo(() => {
|
|
48520
48704
|
avlElId += 1;
|
|
48521
48705
|
const base = `avl-el-${avlElId}`;
|
|
48522
48706
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -48789,7 +48973,7 @@ function renderNode(node, color, glowId) {
|
|
|
48789
48973
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
48790
48974
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
48791
48975
|
const nc = nodeColor(node.type, color);
|
|
48792
|
-
return /* @__PURE__ */ jsxs(
|
|
48976
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
48793
48977
|
node.children.map((child, i) => {
|
|
48794
48978
|
const childR = Math.max(
|
|
48795
48979
|
child.type === "operator" ? 20 : 16,
|
|
@@ -48846,7 +49030,7 @@ var AvlExprTree = ({
|
|
|
48846
49030
|
className,
|
|
48847
49031
|
color = "var(--color-primary)"
|
|
48848
49032
|
}) => {
|
|
48849
|
-
const ids =
|
|
49033
|
+
const ids = React127__default.useMemo(() => {
|
|
48850
49034
|
avlEtId += 1;
|
|
48851
49035
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
48852
49036
|
}, []);
|
|
@@ -49820,7 +50004,7 @@ var SystemNode = ({ data }) => {
|
|
|
49820
50004
|
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) => {
|
|
49821
50005
|
const tc = transitionCounts[s.name] ?? 0;
|
|
49822
50006
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
49823
|
-
return /* @__PURE__ */ jsxs(
|
|
50007
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
49824
50008
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
49825
50009
|
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 })
|
|
49826
50010
|
] }, s.name);
|
|
@@ -49860,7 +50044,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
49860
50044
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
49861
50045
|
const tc = transitionCounts[s.name] ?? 0;
|
|
49862
50046
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
49863
|
-
return /* @__PURE__ */ jsxs(
|
|
50047
|
+
return /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
49864
50048
|
/* @__PURE__ */ jsx(
|
|
49865
50049
|
AvlState,
|
|
49866
50050
|
{
|
|
@@ -50958,7 +51142,7 @@ function VerificationProvider({
|
|
|
50958
51142
|
useEffect(() => {
|
|
50959
51143
|
if (!isEnabled) return;
|
|
50960
51144
|
if (!eventBus.onAny) return;
|
|
50961
|
-
const
|
|
51145
|
+
const verificationProviderLifecycleListener = (evt) => {
|
|
50962
51146
|
const parsed = parseLifecycleEvent(evt.type);
|
|
50963
51147
|
if (!parsed) return;
|
|
50964
51148
|
log3.debug("lifecycle:event", { kind: parsed.kind, traitName: parsed.traitName, event: parsed.event, type: evt.type });
|
|
@@ -51048,7 +51232,11 @@ function VerificationProvider({
|
|
|
51048
51232
|
});
|
|
51049
51233
|
log3.warn("transition:error", { trait: parsed.traitName, event: parsed.event, from: fromState, error: errorMsg });
|
|
51050
51234
|
}
|
|
51235
|
+
};
|
|
51236
|
+
Object.defineProperty(verificationProviderLifecycleListener, "name", {
|
|
51237
|
+
value: "VerificationProvider:lifecycle"
|
|
51051
51238
|
});
|
|
51239
|
+
const unsub = eventBus.onAny(verificationProviderLifecycleListener);
|
|
51052
51240
|
registerCheck(
|
|
51053
51241
|
"verification-provider",
|
|
51054
51242
|
"VerificationProvider active (compiled path)",
|
|
@@ -51267,7 +51455,13 @@ function useTraitStateMachine(traitBindings, slotsActions, options) {
|
|
|
51267
51455
|
const { entities } = useEntitySchema();
|
|
51268
51456
|
const manager = useMemo(() => {
|
|
51269
51457
|
const traitDefs = traitBindings.map(toTraitDefinition);
|
|
51270
|
-
|
|
51458
|
+
const m = new StateMachineManager(traitDefs);
|
|
51459
|
+
for (const binding of traitBindings) {
|
|
51460
|
+
if (binding.config !== void 0) {
|
|
51461
|
+
m.setTraitConfig(binding.trait.name, binding.config);
|
|
51462
|
+
}
|
|
51463
|
+
}
|
|
51464
|
+
return m;
|
|
51271
51465
|
}, [traitBindings]);
|
|
51272
51466
|
const [traitStates, setTraitStates] = useState(() => {
|
|
51273
51467
|
return manager.getAllStates();
|
|
@@ -51799,82 +51993,9 @@ function useTraitStateMachine(traitBindings, slotsActions, options) {
|
|
|
51799
51993
|
canHandleEvent
|
|
51800
51994
|
};
|
|
51801
51995
|
}
|
|
51802
|
-
var DEFAULT_SOURCE_KEY2 = "__default__";
|
|
51803
|
-
function slotEntriesInOrder(slot) {
|
|
51804
|
-
if (!slot) return [];
|
|
51805
|
-
const out = [];
|
|
51806
|
-
for (const [sourceKey, entry] of Object.entries(slot)) {
|
|
51807
|
-
if (entry.patterns.length > 0) {
|
|
51808
|
-
out.push({ sourceKey, entry });
|
|
51809
|
-
}
|
|
51810
|
-
}
|
|
51811
|
-
return out;
|
|
51812
|
-
}
|
|
51813
|
-
var SlotsStateContext = createContext({});
|
|
51814
|
-
var SlotsActionsContext = createContext(null);
|
|
51815
|
-
function SlotsProvider({ children }) {
|
|
51816
|
-
const [slots, setSlots] = useState({});
|
|
51817
|
-
const setSlotPatterns = useCallback((slot, patterns, source) => {
|
|
51818
|
-
const sourceKey = source?.trait ?? DEFAULT_SOURCE_KEY2;
|
|
51819
|
-
setSlots((prev) => {
|
|
51820
|
-
const prevSlot = prev[slot] ?? {};
|
|
51821
|
-
return {
|
|
51822
|
-
...prev,
|
|
51823
|
-
[slot]: {
|
|
51824
|
-
...prevSlot,
|
|
51825
|
-
[sourceKey]: { patterns, source }
|
|
51826
|
-
}
|
|
51827
|
-
};
|
|
51828
|
-
});
|
|
51829
|
-
}, []);
|
|
51830
|
-
const clearSlot = useCallback((slot) => {
|
|
51831
|
-
setSlots((prev) => {
|
|
51832
|
-
const existing = prev[slot];
|
|
51833
|
-
if (existing && Object.keys(existing).length === 0) {
|
|
51834
|
-
return prev;
|
|
51835
|
-
}
|
|
51836
|
-
return { ...prev, [slot]: {} };
|
|
51837
|
-
});
|
|
51838
|
-
}, []);
|
|
51839
|
-
const clearSlotForSource = useCallback((slot, sourceTrait) => {
|
|
51840
|
-
setSlots((prev) => {
|
|
51841
|
-
const existing = prev[slot];
|
|
51842
|
-
if (!existing || !(sourceTrait in existing)) return prev;
|
|
51843
|
-
const next = { ...existing };
|
|
51844
|
-
delete next[sourceTrait];
|
|
51845
|
-
return { ...prev, [slot]: next };
|
|
51846
|
-
});
|
|
51847
|
-
}, []);
|
|
51848
|
-
const clearAllSlots = useCallback(() => {
|
|
51849
|
-
setSlots({});
|
|
51850
|
-
}, []);
|
|
51851
|
-
const actionsRef = useRef({
|
|
51852
|
-
setSlotPatterns,
|
|
51853
|
-
clearSlot,
|
|
51854
|
-
clearSlotForSource,
|
|
51855
|
-
clearAllSlots
|
|
51856
|
-
});
|
|
51857
|
-
actionsRef.current = { setSlotPatterns, clearSlot, clearSlotForSource, clearAllSlots };
|
|
51858
|
-
const [stableActions] = useState(() => ({
|
|
51859
|
-
setSlotPatterns: (...args) => actionsRef.current.setSlotPatterns(...args),
|
|
51860
|
-
clearSlot: (...args) => actionsRef.current.clearSlot(...args),
|
|
51861
|
-
clearSlotForSource: (...args) => actionsRef.current.clearSlotForSource(...args),
|
|
51862
|
-
clearAllSlots: () => actionsRef.current.clearAllSlots()
|
|
51863
|
-
}));
|
|
51864
|
-
return /* @__PURE__ */ jsx(SlotsActionsContext.Provider, { value: stableActions, children: /* @__PURE__ */ jsx(SlotsStateContext.Provider, { value: slots, children }) });
|
|
51865
|
-
}
|
|
51866
|
-
function useSlots() {
|
|
51867
|
-
return useContext(SlotsStateContext);
|
|
51868
|
-
}
|
|
51869
|
-
function useSlotsActions() {
|
|
51870
|
-
const actions = useContext(SlotsActionsContext);
|
|
51871
|
-
if (!actions) {
|
|
51872
|
-
throw new Error("useSlotsActions must be used within a SlotsProvider");
|
|
51873
|
-
}
|
|
51874
|
-
return actions;
|
|
51875
|
-
}
|
|
51876
51996
|
|
|
51877
51997
|
// runtime/OrbPreview.tsx
|
|
51998
|
+
init_SlotsContext();
|
|
51878
51999
|
init_EntitySchemaContext();
|
|
51879
52000
|
|
|
51880
52001
|
// runtime/ServerBridge.tsx
|
|
@@ -52094,6 +52215,10 @@ function SlotBridge() {
|
|
|
52094
52215
|
const slots = useSlots();
|
|
52095
52216
|
const { render, clear } = useUISlots();
|
|
52096
52217
|
useEffect(() => {
|
|
52218
|
+
slotLog.debug("SlotBridge:effect-fired", {
|
|
52219
|
+
slotCount: Object.keys(slots).length,
|
|
52220
|
+
slots: Object.keys(slots)
|
|
52221
|
+
});
|
|
52097
52222
|
for (const [slotName, slotState] of Object.entries(slots)) {
|
|
52098
52223
|
const entries = slotEntriesInOrder(slotState);
|
|
52099
52224
|
if (entries.length === 0) {
|
|
@@ -52115,6 +52240,12 @@ function SlotBridge() {
|
|
|
52115
52240
|
const only = children[0];
|
|
52116
52241
|
const { type, children: nested, ...rest } = only;
|
|
52117
52242
|
const lastEntry = entries[entries.length - 1];
|
|
52243
|
+
slotLog.debug("SlotBridge:render-single", {
|
|
52244
|
+
slot: slotName,
|
|
52245
|
+
patternType: type,
|
|
52246
|
+
entityRefId: refId(rest.entity),
|
|
52247
|
+
sourceTrait: lastEntry.entry.source?.trait
|
|
52248
|
+
});
|
|
52118
52249
|
render({
|
|
52119
52250
|
target: slotName,
|
|
52120
52251
|
pattern: type,
|
|
@@ -52769,7 +52900,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
52769
52900
|
}
|
|
52770
52901
|
);
|
|
52771
52902
|
};
|
|
52772
|
-
var OrbPreviewNode =
|
|
52903
|
+
var OrbPreviewNode = React127__default.memo(OrbPreviewNodeInner);
|
|
52773
52904
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
52774
52905
|
var EventFlowEdgeInner = (props) => {
|
|
52775
52906
|
const {
|
|
@@ -52846,7 +52977,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
52846
52977
|
) })
|
|
52847
52978
|
] });
|
|
52848
52979
|
};
|
|
52849
|
-
var EventFlowEdge =
|
|
52980
|
+
var EventFlowEdge = React127__default.memo(EventFlowEdgeInner);
|
|
52850
52981
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
52851
52982
|
|
|
52852
52983
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -52985,7 +53116,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
52985
53116
|
}
|
|
52986
53117
|
);
|
|
52987
53118
|
};
|
|
52988
|
-
var BehaviorComposeNode =
|
|
53119
|
+
var BehaviorComposeNode = React127__default.memo(BehaviorComposeNodeInner);
|
|
52989
53120
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
52990
53121
|
|
|
52991
53122
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -53925,7 +54056,7 @@ var ZoomBreadcrumb = ({
|
|
|
53925
54056
|
if (eventName && band === "detail") {
|
|
53926
54057
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
53927
54058
|
}
|
|
53928
|
-
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(
|
|
54059
|
+
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(React127__default.Fragment, { children: [
|
|
53929
54060
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
53930
54061
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
53931
54062
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54384,7 +54515,7 @@ var EventWireOverlay = ({
|
|
|
54384
54515
|
containerW,
|
|
54385
54516
|
containerH
|
|
54386
54517
|
}) => {
|
|
54387
|
-
const ids =
|
|
54518
|
+
const ids = React127__default.useMemo(() => {
|
|
54388
54519
|
avlOczWireId += 1;
|
|
54389
54520
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54390
54521
|
}, []);
|
|
@@ -54702,7 +54833,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54702
54833
|
borderRadius: 6,
|
|
54703
54834
|
border: `1px solid ${color}`
|
|
54704
54835
|
},
|
|
54705
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
54836
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React127__default.Fragment, { children: [
|
|
54706
54837
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54707
54838
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54708
54839
|
Box,
|