@almadar/ui 5.49.0 → 5.49.1
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 +1586 -1596
- package/dist/avl/index.js +437 -447
- package/dist/components/index.cjs +1259 -1436
- package/dist/components/index.js +259 -436
- package/dist/providers/index.cjs +1262 -1572
- package/dist/providers/index.js +274 -584
- package/dist/runtime/index.cjs +1451 -1461
- package/dist/runtime/index.js +417 -427
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React90 from 'react';
|
|
3
|
+
import React90__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
4
4
|
import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -9,8 +9,8 @@ import { useTranslate, useEventBus as useEventBus$1 } from '@almadar/ui/hooks';
|
|
|
9
9
|
import * as LucideIcons2 from 'lucide-react';
|
|
10
10
|
import { Loader2, X, Code, FileText, WrapText, Check, Copy, Lightbulb, CheckCircle, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, RotateCcw, Play, Terminal, XCircle, AlertTriangle, Trash2, Link2, ZoomOut, ZoomIn, Download, Menu as Menu$1, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, ArrowLeft, HelpCircle, PauseCircle, Search, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Minus, Eraser, TrendingUp, TrendingDown, AlertCircle, Circle, Clock, CheckCircle2, Bug, Send, ChevronUp, ChevronDown, Wrench, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
|
+
import { UISlotProvider, useUISlots, useTheme } from '@almadar/ui/context';
|
|
12
13
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
13
|
-
import { UISlotProvider, useUISlots } from '@almadar/ui/context';
|
|
14
14
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
15
15
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
16
16
|
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js';
|
|
@@ -3470,7 +3470,7 @@ var init_Box = __esm({
|
|
|
3470
3470
|
fixed: "fixed",
|
|
3471
3471
|
sticky: "sticky"
|
|
3472
3472
|
};
|
|
3473
|
-
Box =
|
|
3473
|
+
Box = React90__default.forwardRef(
|
|
3474
3474
|
({
|
|
3475
3475
|
padding,
|
|
3476
3476
|
paddingX,
|
|
@@ -3520,7 +3520,7 @@ var init_Box = __esm({
|
|
|
3520
3520
|
onMouseLeave?.(e);
|
|
3521
3521
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
3522
3522
|
const isClickable = action || onClick;
|
|
3523
|
-
return
|
|
3523
|
+
return React90__default.createElement(
|
|
3524
3524
|
Component2,
|
|
3525
3525
|
{
|
|
3526
3526
|
ref,
|
|
@@ -4110,7 +4110,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4110
4110
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4111
4111
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4112
4112
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
4113
|
-
return /* @__PURE__ */ jsxs(
|
|
4113
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
4114
4114
|
/* @__PURE__ */ jsx(
|
|
4115
4115
|
AvlState,
|
|
4116
4116
|
{
|
|
@@ -4485,7 +4485,7 @@ function loadLib(key, importer) {
|
|
|
4485
4485
|
return p2;
|
|
4486
4486
|
}
|
|
4487
4487
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
4488
|
-
const Lazy =
|
|
4488
|
+
const Lazy = React90__default.lazy(async () => {
|
|
4489
4489
|
const lib = await loadLib(libKey, importer);
|
|
4490
4490
|
const Comp = pick(lib);
|
|
4491
4491
|
if (!Comp) {
|
|
@@ -4495,7 +4495,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
4495
4495
|
return { default: Comp };
|
|
4496
4496
|
});
|
|
4497
4497
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
4498
|
-
|
|
4498
|
+
React90__default.Suspense,
|
|
4499
4499
|
{
|
|
4500
4500
|
fallback: /* @__PURE__ */ jsx(
|
|
4501
4501
|
"span",
|
|
@@ -5221,7 +5221,7 @@ var init_Icon = __esm({
|
|
|
5221
5221
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5222
5222
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5223
5223
|
const family = useIconFamily();
|
|
5224
|
-
const RenderedComponent =
|
|
5224
|
+
const RenderedComponent = React90__default.useMemo(() => {
|
|
5225
5225
|
if (directIcon) return null;
|
|
5226
5226
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5227
5227
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5280,7 +5280,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5280
5280
|
const IconComp = value;
|
|
5281
5281
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5282
5282
|
}
|
|
5283
|
-
if (
|
|
5283
|
+
if (React90__default.isValidElement(value)) {
|
|
5284
5284
|
return value;
|
|
5285
5285
|
}
|
|
5286
5286
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5356,7 +5356,7 @@ var init_Button = __esm({
|
|
|
5356
5356
|
md: "h-icon-default w-icon-default",
|
|
5357
5357
|
lg: "h-icon-default w-icon-default"
|
|
5358
5358
|
};
|
|
5359
|
-
Button =
|
|
5359
|
+
Button = React90__default.forwardRef(
|
|
5360
5360
|
({
|
|
5361
5361
|
className,
|
|
5362
5362
|
variant = "primary",
|
|
@@ -5421,7 +5421,7 @@ var Dialog;
|
|
|
5421
5421
|
var init_Dialog = __esm({
|
|
5422
5422
|
"components/core/atoms/Dialog.tsx"() {
|
|
5423
5423
|
init_cn();
|
|
5424
|
-
Dialog =
|
|
5424
|
+
Dialog = React90__default.forwardRef(
|
|
5425
5425
|
({
|
|
5426
5426
|
role = "dialog",
|
|
5427
5427
|
"aria-modal": ariaModal = true,
|
|
@@ -5916,7 +5916,7 @@ var init_Badge = __esm({
|
|
|
5916
5916
|
md: "px-2.5 py-1 text-sm",
|
|
5917
5917
|
lg: "px-3 py-1.5 text-base"
|
|
5918
5918
|
};
|
|
5919
|
-
Badge =
|
|
5919
|
+
Badge = React90__default.forwardRef(
|
|
5920
5920
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5921
5921
|
const iconSizes3 = {
|
|
5922
5922
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6252,7 +6252,7 @@ var init_SvgFlow = __esm({
|
|
|
6252
6252
|
width = 100,
|
|
6253
6253
|
height = 100
|
|
6254
6254
|
}) => {
|
|
6255
|
-
const markerId =
|
|
6255
|
+
const markerId = React90__default.useMemo(() => {
|
|
6256
6256
|
flowIdCounter += 1;
|
|
6257
6257
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6258
6258
|
}, []);
|
|
@@ -6845,7 +6845,7 @@ var init_SvgRing = __esm({
|
|
|
6845
6845
|
width = 100,
|
|
6846
6846
|
height = 100
|
|
6847
6847
|
}) => {
|
|
6848
|
-
const gradientId =
|
|
6848
|
+
const gradientId = React90__default.useMemo(() => {
|
|
6849
6849
|
ringIdCounter += 1;
|
|
6850
6850
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6851
6851
|
}, []);
|
|
@@ -7026,7 +7026,7 @@ var init_Input = __esm({
|
|
|
7026
7026
|
init_cn();
|
|
7027
7027
|
init_Icon();
|
|
7028
7028
|
init_useEventBus();
|
|
7029
|
-
Input =
|
|
7029
|
+
Input = React90__default.forwardRef(
|
|
7030
7030
|
({
|
|
7031
7031
|
className,
|
|
7032
7032
|
inputType,
|
|
@@ -7186,7 +7186,7 @@ var Label;
|
|
|
7186
7186
|
var init_Label = __esm({
|
|
7187
7187
|
"components/core/atoms/Label.tsx"() {
|
|
7188
7188
|
init_cn();
|
|
7189
|
-
Label =
|
|
7189
|
+
Label = React90__default.forwardRef(
|
|
7190
7190
|
({ className, required, children, ...props }, ref) => {
|
|
7191
7191
|
return /* @__PURE__ */ jsxs(
|
|
7192
7192
|
"label",
|
|
@@ -7213,7 +7213,7 @@ var init_Textarea = __esm({
|
|
|
7213
7213
|
"components/core/atoms/Textarea.tsx"() {
|
|
7214
7214
|
init_cn();
|
|
7215
7215
|
init_useEventBus();
|
|
7216
|
-
Textarea =
|
|
7216
|
+
Textarea = React90__default.forwardRef(
|
|
7217
7217
|
({ className, error, onChange, ...props }, ref) => {
|
|
7218
7218
|
const eventBus = useEventBus();
|
|
7219
7219
|
const handleChange = (e) => {
|
|
@@ -7452,7 +7452,7 @@ var init_Select = __esm({
|
|
|
7452
7452
|
init_cn();
|
|
7453
7453
|
init_Icon();
|
|
7454
7454
|
init_useEventBus();
|
|
7455
|
-
Select =
|
|
7455
|
+
Select = React90__default.forwardRef(
|
|
7456
7456
|
(props, _ref) => {
|
|
7457
7457
|
const { multiple, searchable, clearable } = props;
|
|
7458
7458
|
if (multiple || searchable || clearable) {
|
|
@@ -7469,7 +7469,7 @@ var init_Checkbox = __esm({
|
|
|
7469
7469
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7470
7470
|
init_cn();
|
|
7471
7471
|
init_useEventBus();
|
|
7472
|
-
Checkbox =
|
|
7472
|
+
Checkbox = React90__default.forwardRef(
|
|
7473
7473
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7474
7474
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7475
7475
|
const eventBus = useEventBus();
|
|
@@ -7523,7 +7523,7 @@ var init_Spinner = __esm({
|
|
|
7523
7523
|
md: "h-6 w-6",
|
|
7524
7524
|
lg: "h-8 w-8"
|
|
7525
7525
|
};
|
|
7526
|
-
Spinner =
|
|
7526
|
+
Spinner = React90__default.forwardRef(
|
|
7527
7527
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7528
7528
|
if (overlay) {
|
|
7529
7529
|
return /* @__PURE__ */ jsx(
|
|
@@ -7613,7 +7613,7 @@ var init_Card = __esm({
|
|
|
7613
7613
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7614
7614
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7615
7615
|
};
|
|
7616
|
-
Card =
|
|
7616
|
+
Card = React90__default.forwardRef(
|
|
7617
7617
|
({
|
|
7618
7618
|
className,
|
|
7619
7619
|
variant = "bordered",
|
|
@@ -7661,9 +7661,9 @@ var init_Card = __esm({
|
|
|
7661
7661
|
}
|
|
7662
7662
|
);
|
|
7663
7663
|
Card.displayName = "Card";
|
|
7664
|
-
CardHeader =
|
|
7664
|
+
CardHeader = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7665
7665
|
CardHeader.displayName = "CardHeader";
|
|
7666
|
-
CardTitle =
|
|
7666
|
+
CardTitle = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7667
7667
|
"h3",
|
|
7668
7668
|
{
|
|
7669
7669
|
ref,
|
|
@@ -7676,11 +7676,11 @@ var init_Card = __esm({
|
|
|
7676
7676
|
}
|
|
7677
7677
|
));
|
|
7678
7678
|
CardTitle.displayName = "CardTitle";
|
|
7679
|
-
CardContent =
|
|
7679
|
+
CardContent = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7680
7680
|
CardContent.displayName = "CardContent";
|
|
7681
7681
|
CardBody = CardContent;
|
|
7682
7682
|
CardBody.displayName = "CardBody";
|
|
7683
|
-
CardFooter =
|
|
7683
|
+
CardFooter = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7684
7684
|
"div",
|
|
7685
7685
|
{
|
|
7686
7686
|
ref,
|
|
@@ -7735,7 +7735,7 @@ var init_FilterPill = __esm({
|
|
|
7735
7735
|
md: "w-3.5 h-3.5",
|
|
7736
7736
|
lg: "w-4 h-4"
|
|
7737
7737
|
};
|
|
7738
|
-
FilterPill =
|
|
7738
|
+
FilterPill = React90__default.forwardRef(
|
|
7739
7739
|
({
|
|
7740
7740
|
className,
|
|
7741
7741
|
variant = "default",
|
|
@@ -7864,8 +7864,8 @@ var init_Avatar = __esm({
|
|
|
7864
7864
|
actionPayload
|
|
7865
7865
|
}) => {
|
|
7866
7866
|
const eventBus = useEventBus();
|
|
7867
|
-
const [imgFailed, setImgFailed] =
|
|
7868
|
-
|
|
7867
|
+
const [imgFailed, setImgFailed] = React90__default.useState(false);
|
|
7868
|
+
React90__default.useEffect(() => {
|
|
7869
7869
|
setImgFailed(false);
|
|
7870
7870
|
}, [src]);
|
|
7871
7871
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -8250,7 +8250,7 @@ var init_Radio = __esm({
|
|
|
8250
8250
|
md: "w-2.5 h-2.5",
|
|
8251
8251
|
lg: "w-3 h-3"
|
|
8252
8252
|
};
|
|
8253
|
-
Radio =
|
|
8253
|
+
Radio = React90__default.forwardRef(
|
|
8254
8254
|
({
|
|
8255
8255
|
label,
|
|
8256
8256
|
helperText,
|
|
@@ -8267,12 +8267,12 @@ var init_Radio = __esm({
|
|
|
8267
8267
|
onChange,
|
|
8268
8268
|
...props
|
|
8269
8269
|
}, ref) => {
|
|
8270
|
-
const reactId =
|
|
8270
|
+
const reactId = React90__default.useId();
|
|
8271
8271
|
const baseId = id || `radio-${reactId}`;
|
|
8272
8272
|
const hasError = !!error;
|
|
8273
8273
|
const eventBus = useEventBus();
|
|
8274
|
-
const [selected, setSelected] =
|
|
8275
|
-
|
|
8274
|
+
const [selected, setSelected] = React90__default.useState(value);
|
|
8275
|
+
React90__default.useEffect(() => {
|
|
8276
8276
|
if (value !== void 0) setSelected(value);
|
|
8277
8277
|
}, [value]);
|
|
8278
8278
|
const pick = (next, e) => {
|
|
@@ -8454,7 +8454,7 @@ var init_Switch = __esm({
|
|
|
8454
8454
|
"components/core/atoms/Switch.tsx"() {
|
|
8455
8455
|
"use client";
|
|
8456
8456
|
init_cn();
|
|
8457
|
-
Switch =
|
|
8457
|
+
Switch = React90.forwardRef(
|
|
8458
8458
|
({
|
|
8459
8459
|
checked,
|
|
8460
8460
|
defaultChecked = false,
|
|
@@ -8465,10 +8465,10 @@ var init_Switch = __esm({
|
|
|
8465
8465
|
name,
|
|
8466
8466
|
className
|
|
8467
8467
|
}, ref) => {
|
|
8468
|
-
const [isChecked, setIsChecked] =
|
|
8468
|
+
const [isChecked, setIsChecked] = React90.useState(
|
|
8469
8469
|
checked !== void 0 ? checked : defaultChecked
|
|
8470
8470
|
);
|
|
8471
|
-
|
|
8471
|
+
React90.useEffect(() => {
|
|
8472
8472
|
if (checked !== void 0) {
|
|
8473
8473
|
setIsChecked(checked);
|
|
8474
8474
|
}
|
|
@@ -8637,188 +8637,12 @@ var init_TextHighlight = __esm({
|
|
|
8637
8637
|
TextHighlight.displayName = "TextHighlight";
|
|
8638
8638
|
}
|
|
8639
8639
|
});
|
|
8640
|
-
function useTheme() {
|
|
8641
|
-
const context = useContext(ThemeContext);
|
|
8642
|
-
if (context === void 0) {
|
|
8643
|
-
return {
|
|
8644
|
-
theme: "wireframe",
|
|
8645
|
-
mode: "light",
|
|
8646
|
-
resolvedMode: "light",
|
|
8647
|
-
setTheme: () => {
|
|
8648
|
-
},
|
|
8649
|
-
setMode: () => {
|
|
8650
|
-
},
|
|
8651
|
-
toggleMode: () => {
|
|
8652
|
-
},
|
|
8653
|
-
availableThemes: BUILT_IN_THEMES,
|
|
8654
|
-
appliedTheme: "wireframe-light"
|
|
8655
|
-
};
|
|
8656
|
-
}
|
|
8657
|
-
return context;
|
|
8658
|
-
}
|
|
8659
|
-
var BUILT_IN_THEMES, ThemeContext;
|
|
8660
|
-
var init_ThemeContext = __esm({
|
|
8661
|
-
"context/ThemeContext.tsx"() {
|
|
8662
|
-
"use client";
|
|
8663
|
-
createLogger("almadar:ui:theme");
|
|
8664
|
-
BUILT_IN_THEMES = [
|
|
8665
|
-
{
|
|
8666
|
-
name: "wireframe",
|
|
8667
|
-
displayName: "Wireframe",
|
|
8668
|
-
hasLightMode: true,
|
|
8669
|
-
hasDarkMode: true
|
|
8670
|
-
},
|
|
8671
|
-
{
|
|
8672
|
-
name: "minimalist",
|
|
8673
|
-
displayName: "Minimalist",
|
|
8674
|
-
hasLightMode: true,
|
|
8675
|
-
hasDarkMode: true
|
|
8676
|
-
},
|
|
8677
|
-
{
|
|
8678
|
-
name: "almadar",
|
|
8679
|
-
displayName: "Almadar",
|
|
8680
|
-
hasLightMode: true,
|
|
8681
|
-
hasDarkMode: true
|
|
8682
|
-
},
|
|
8683
|
-
{
|
|
8684
|
-
name: "trait-wars",
|
|
8685
|
-
displayName: "Trait Wars",
|
|
8686
|
-
hasLightMode: false,
|
|
8687
|
-
hasDarkMode: true
|
|
8688
|
-
},
|
|
8689
|
-
// Extended themes
|
|
8690
|
-
{
|
|
8691
|
-
name: "ocean",
|
|
8692
|
-
displayName: "Ocean",
|
|
8693
|
-
hasLightMode: true,
|
|
8694
|
-
hasDarkMode: true
|
|
8695
|
-
},
|
|
8696
|
-
{
|
|
8697
|
-
name: "forest",
|
|
8698
|
-
displayName: "Forest",
|
|
8699
|
-
hasLightMode: true,
|
|
8700
|
-
hasDarkMode: true
|
|
8701
|
-
},
|
|
8702
|
-
{
|
|
8703
|
-
name: "sunset",
|
|
8704
|
-
displayName: "Sunset",
|
|
8705
|
-
hasLightMode: true,
|
|
8706
|
-
hasDarkMode: true
|
|
8707
|
-
},
|
|
8708
|
-
{
|
|
8709
|
-
name: "lavender",
|
|
8710
|
-
displayName: "Lavender",
|
|
8711
|
-
hasLightMode: true,
|
|
8712
|
-
hasDarkMode: true
|
|
8713
|
-
},
|
|
8714
|
-
{
|
|
8715
|
-
name: "rose",
|
|
8716
|
-
displayName: "Rose",
|
|
8717
|
-
hasLightMode: true,
|
|
8718
|
-
hasDarkMode: true
|
|
8719
|
-
},
|
|
8720
|
-
{
|
|
8721
|
-
name: "slate",
|
|
8722
|
-
displayName: "Slate",
|
|
8723
|
-
hasLightMode: true,
|
|
8724
|
-
hasDarkMode: true
|
|
8725
|
-
},
|
|
8726
|
-
{
|
|
8727
|
-
name: "ember",
|
|
8728
|
-
displayName: "Ember",
|
|
8729
|
-
hasLightMode: true,
|
|
8730
|
-
hasDarkMode: true
|
|
8731
|
-
},
|
|
8732
|
-
{
|
|
8733
|
-
name: "midnight",
|
|
8734
|
-
displayName: "Midnight",
|
|
8735
|
-
hasLightMode: true,
|
|
8736
|
-
hasDarkMode: true
|
|
8737
|
-
},
|
|
8738
|
-
{
|
|
8739
|
-
name: "sand",
|
|
8740
|
-
displayName: "Sand",
|
|
8741
|
-
hasLightMode: true,
|
|
8742
|
-
hasDarkMode: true
|
|
8743
|
-
},
|
|
8744
|
-
{
|
|
8745
|
-
name: "neon",
|
|
8746
|
-
displayName: "Neon",
|
|
8747
|
-
hasLightMode: true,
|
|
8748
|
-
hasDarkMode: true
|
|
8749
|
-
},
|
|
8750
|
-
{
|
|
8751
|
-
name: "arctic",
|
|
8752
|
-
displayName: "Arctic",
|
|
8753
|
-
hasLightMode: true,
|
|
8754
|
-
hasDarkMode: true
|
|
8755
|
-
},
|
|
8756
|
-
{
|
|
8757
|
-
name: "copper",
|
|
8758
|
-
displayName: "Copper",
|
|
8759
|
-
hasLightMode: true,
|
|
8760
|
-
hasDarkMode: true
|
|
8761
|
-
},
|
|
8762
|
-
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
8763
|
-
{
|
|
8764
|
-
name: "prism",
|
|
8765
|
-
displayName: "Prism",
|
|
8766
|
-
hasLightMode: true,
|
|
8767
|
-
hasDarkMode: true
|
|
8768
|
-
},
|
|
8769
|
-
{
|
|
8770
|
-
name: "gazette",
|
|
8771
|
-
displayName: "Gazette",
|
|
8772
|
-
hasLightMode: true,
|
|
8773
|
-
hasDarkMode: true
|
|
8774
|
-
},
|
|
8775
|
-
{
|
|
8776
|
-
name: "terminal",
|
|
8777
|
-
displayName: "Terminal",
|
|
8778
|
-
hasLightMode: true,
|
|
8779
|
-
hasDarkMode: true
|
|
8780
|
-
},
|
|
8781
|
-
{
|
|
8782
|
-
name: "atelier",
|
|
8783
|
-
displayName: "Atelier",
|
|
8784
|
-
hasLightMode: true,
|
|
8785
|
-
hasDarkMode: true
|
|
8786
|
-
},
|
|
8787
|
-
{
|
|
8788
|
-
name: "kiosk",
|
|
8789
|
-
displayName: "Kiosk",
|
|
8790
|
-
hasLightMode: true,
|
|
8791
|
-
hasDarkMode: true
|
|
8792
|
-
},
|
|
8793
|
-
{
|
|
8794
|
-
name: "linear-clean",
|
|
8795
|
-
displayName: "Linear Clean",
|
|
8796
|
-
hasLightMode: true,
|
|
8797
|
-
hasDarkMode: true
|
|
8798
|
-
},
|
|
8799
|
-
{
|
|
8800
|
-
name: "notion-editorial",
|
|
8801
|
-
displayName: "Notion Editorial",
|
|
8802
|
-
hasLightMode: true,
|
|
8803
|
-
hasDarkMode: true
|
|
8804
|
-
},
|
|
8805
|
-
{
|
|
8806
|
-
name: "bloomberg-dense",
|
|
8807
|
-
displayName: "Bloomberg Dense",
|
|
8808
|
-
hasLightMode: true,
|
|
8809
|
-
hasDarkMode: true
|
|
8810
|
-
}
|
|
8811
|
-
];
|
|
8812
|
-
ThemeContext = createContext(void 0);
|
|
8813
|
-
}
|
|
8814
|
-
});
|
|
8815
8640
|
var sizeClasses5, iconSizes2, ThemeToggle;
|
|
8816
8641
|
var init_ThemeToggle = __esm({
|
|
8817
8642
|
"components/core/atoms/ThemeToggle.tsx"() {
|
|
8818
8643
|
"use client";
|
|
8819
8644
|
init_Icon();
|
|
8820
8645
|
init_cn();
|
|
8821
|
-
init_ThemeContext();
|
|
8822
8646
|
sizeClasses5 = {
|
|
8823
8647
|
sm: "p-1.5",
|
|
8824
8648
|
md: "p-2",
|
|
@@ -8913,7 +8737,7 @@ var Aside;
|
|
|
8913
8737
|
var init_Aside = __esm({
|
|
8914
8738
|
"components/core/atoms/Aside.tsx"() {
|
|
8915
8739
|
init_cn();
|
|
8916
|
-
Aside =
|
|
8740
|
+
Aside = React90__default.forwardRef(
|
|
8917
8741
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8918
8742
|
);
|
|
8919
8743
|
Aside.displayName = "Aside";
|
|
@@ -8991,8 +8815,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8991
8815
|
className
|
|
8992
8816
|
}) => {
|
|
8993
8817
|
const { t } = useTranslate();
|
|
8994
|
-
const [isVisible, setIsVisible] =
|
|
8995
|
-
const timeoutRef =
|
|
8818
|
+
const [isVisible, setIsVisible] = React90__default.useState(false);
|
|
8819
|
+
const timeoutRef = React90__default.useRef(null);
|
|
8996
8820
|
const handleMouseEnter = () => {
|
|
8997
8821
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8998
8822
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -9001,7 +8825,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9001
8825
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
9002
8826
|
setIsVisible(false);
|
|
9003
8827
|
};
|
|
9004
|
-
|
|
8828
|
+
React90__default.useEffect(() => {
|
|
9005
8829
|
return () => {
|
|
9006
8830
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
9007
8831
|
};
|
|
@@ -9211,7 +9035,7 @@ var init_StatusDot = __esm({
|
|
|
9211
9035
|
md: "w-2.5 h-2.5",
|
|
9212
9036
|
lg: "w-3 h-3"
|
|
9213
9037
|
};
|
|
9214
|
-
StatusDot =
|
|
9038
|
+
StatusDot = React90__default.forwardRef(
|
|
9215
9039
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9216
9040
|
return /* @__PURE__ */ jsx(
|
|
9217
9041
|
"span",
|
|
@@ -9265,7 +9089,7 @@ var init_TrendIndicator = __esm({
|
|
|
9265
9089
|
down: "trending-down",
|
|
9266
9090
|
flat: "arrow-right"
|
|
9267
9091
|
};
|
|
9268
|
-
TrendIndicator =
|
|
9092
|
+
TrendIndicator = React90__default.forwardRef(
|
|
9269
9093
|
({
|
|
9270
9094
|
className,
|
|
9271
9095
|
value,
|
|
@@ -9332,7 +9156,7 @@ var init_RangeSlider = __esm({
|
|
|
9332
9156
|
md: "w-4 h-4",
|
|
9333
9157
|
lg: "w-5 h-5"
|
|
9334
9158
|
};
|
|
9335
|
-
RangeSlider =
|
|
9159
|
+
RangeSlider = React90__default.forwardRef(
|
|
9336
9160
|
({
|
|
9337
9161
|
className,
|
|
9338
9162
|
min = 0,
|
|
@@ -9840,7 +9664,7 @@ var init_ContentSection = __esm({
|
|
|
9840
9664
|
md: "py-16",
|
|
9841
9665
|
lg: "py-24"
|
|
9842
9666
|
};
|
|
9843
|
-
ContentSection =
|
|
9667
|
+
ContentSection = React90__default.forwardRef(
|
|
9844
9668
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9845
9669
|
return /* @__PURE__ */ jsx(
|
|
9846
9670
|
Box,
|
|
@@ -10374,7 +10198,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10374
10198
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10375
10199
|
"none": {}
|
|
10376
10200
|
};
|
|
10377
|
-
AnimatedReveal =
|
|
10201
|
+
AnimatedReveal = React90__default.forwardRef(
|
|
10378
10202
|
({
|
|
10379
10203
|
trigger = "scroll",
|
|
10380
10204
|
animation = "fade-up",
|
|
@@ -10534,7 +10358,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10534
10358
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10535
10359
|
"use client";
|
|
10536
10360
|
init_cn();
|
|
10537
|
-
AnimatedGraphic =
|
|
10361
|
+
AnimatedGraphic = React90__default.forwardRef(
|
|
10538
10362
|
({
|
|
10539
10363
|
src,
|
|
10540
10364
|
svgContent,
|
|
@@ -10557,7 +10381,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10557
10381
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10558
10382
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10559
10383
|
const prevAnimateRef = useRef(animate);
|
|
10560
|
-
const setRef =
|
|
10384
|
+
const setRef = React90__default.useCallback(
|
|
10561
10385
|
(node) => {
|
|
10562
10386
|
containerRef.current = node;
|
|
10563
10387
|
if (typeof ref === "function") ref(node);
|
|
@@ -10783,9 +10607,9 @@ function ScoreDisplay({
|
|
|
10783
10607
|
...rest
|
|
10784
10608
|
}) {
|
|
10785
10609
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
10786
|
-
const [displayValue, setDisplayValue] =
|
|
10787
|
-
const [isAnimating, setIsAnimating] =
|
|
10788
|
-
|
|
10610
|
+
const [displayValue, setDisplayValue] = React90.useState(resolvedValue);
|
|
10611
|
+
const [isAnimating, setIsAnimating] = React90.useState(false);
|
|
10612
|
+
React90.useEffect(() => {
|
|
10789
10613
|
if (!animated || displayValue === resolvedValue) {
|
|
10790
10614
|
setDisplayValue(resolvedValue);
|
|
10791
10615
|
return;
|
|
@@ -10868,9 +10692,9 @@ function ControlButton({
|
|
|
10868
10692
|
className
|
|
10869
10693
|
}) {
|
|
10870
10694
|
const eventBus = useEventBus();
|
|
10871
|
-
const [isPressed, setIsPressed] =
|
|
10695
|
+
const [isPressed, setIsPressed] = React90.useState(false);
|
|
10872
10696
|
const actualPressed = pressed ?? isPressed;
|
|
10873
|
-
const handlePointerDown =
|
|
10697
|
+
const handlePointerDown = React90.useCallback(
|
|
10874
10698
|
(e) => {
|
|
10875
10699
|
e.preventDefault();
|
|
10876
10700
|
if (disabled) return;
|
|
@@ -10880,7 +10704,7 @@ function ControlButton({
|
|
|
10880
10704
|
},
|
|
10881
10705
|
[disabled, pressEvent, eventBus, onPress]
|
|
10882
10706
|
);
|
|
10883
|
-
const handlePointerUp =
|
|
10707
|
+
const handlePointerUp = React90.useCallback(
|
|
10884
10708
|
(e) => {
|
|
10885
10709
|
e.preventDefault();
|
|
10886
10710
|
if (disabled) return;
|
|
@@ -10890,7 +10714,7 @@ function ControlButton({
|
|
|
10890
10714
|
},
|
|
10891
10715
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10892
10716
|
);
|
|
10893
|
-
const handlePointerLeave =
|
|
10717
|
+
const handlePointerLeave = React90.useCallback(
|
|
10894
10718
|
(e) => {
|
|
10895
10719
|
if (isPressed) {
|
|
10896
10720
|
setIsPressed(false);
|
|
@@ -11468,8 +11292,8 @@ function XPBar({
|
|
|
11468
11292
|
}) {
|
|
11469
11293
|
const sizes = sizeMap9[size];
|
|
11470
11294
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
11471
|
-
const [fillWidth, setFillWidth] =
|
|
11472
|
-
|
|
11295
|
+
const [fillWidth, setFillWidth] = React90.useState(animated ? 0 : percentage);
|
|
11296
|
+
React90.useEffect(() => {
|
|
11473
11297
|
if (!animated) {
|
|
11474
11298
|
setFillWidth(percentage);
|
|
11475
11299
|
return;
|
|
@@ -11957,9 +11781,9 @@ function MiniMap({
|
|
|
11957
11781
|
viewportRect = DEFAULT_VIEWPORT,
|
|
11958
11782
|
className
|
|
11959
11783
|
}) {
|
|
11960
|
-
const canvasRef =
|
|
11961
|
-
const frameRef =
|
|
11962
|
-
|
|
11784
|
+
const canvasRef = React90.useRef(null);
|
|
11785
|
+
const frameRef = React90.useRef(0);
|
|
11786
|
+
React90.useEffect(() => {
|
|
11963
11787
|
const canvas = canvasRef.current;
|
|
11964
11788
|
if (!canvas) return;
|
|
11965
11789
|
const ctx = canvas.getContext("2d");
|
|
@@ -12148,7 +11972,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12148
11972
|
}
|
|
12149
11973
|
);
|
|
12150
11974
|
};
|
|
12151
|
-
ErrorBoundary = class extends
|
|
11975
|
+
ErrorBoundary = class extends React90__default.Component {
|
|
12152
11976
|
constructor(props) {
|
|
12153
11977
|
super(props);
|
|
12154
11978
|
__publicField(this, "reset", () => {
|
|
@@ -13183,8 +13007,8 @@ function ActionButtons({
|
|
|
13183
13007
|
disabled
|
|
13184
13008
|
}) {
|
|
13185
13009
|
const eventBus = useEventBus();
|
|
13186
|
-
const [activeButtons, setActiveButtons] =
|
|
13187
|
-
const handlePress =
|
|
13010
|
+
const [activeButtons, setActiveButtons] = React90.useState(/* @__PURE__ */ new Set());
|
|
13011
|
+
const handlePress = React90.useCallback(
|
|
13188
13012
|
(id) => {
|
|
13189
13013
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
13190
13014
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13192,7 +13016,7 @@ function ActionButtons({
|
|
|
13192
13016
|
},
|
|
13193
13017
|
[actionEvent, eventBus, onAction]
|
|
13194
13018
|
);
|
|
13195
|
-
const handleRelease =
|
|
13019
|
+
const handleRelease = React90.useCallback(
|
|
13196
13020
|
(id) => {
|
|
13197
13021
|
setActiveButtons((prev) => {
|
|
13198
13022
|
const next = new Set(prev);
|
|
@@ -14104,7 +13928,7 @@ function recordTransition(trace) {
|
|
|
14104
13928
|
...trace,
|
|
14105
13929
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
14106
13930
|
};
|
|
14107
|
-
|
|
13931
|
+
log4.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
|
|
14108
13932
|
getState().transitions.push(entry);
|
|
14109
13933
|
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
14110
13934
|
getState().transitions.shift();
|
|
@@ -14203,7 +14027,7 @@ function getTraitSnapshots() {
|
|
|
14203
14027
|
try {
|
|
14204
14028
|
snapshots.push(getter());
|
|
14205
14029
|
} catch (err) {
|
|
14206
|
-
|
|
14030
|
+
log4.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
|
|
14207
14031
|
}
|
|
14208
14032
|
}
|
|
14209
14033
|
return snapshots;
|
|
@@ -14302,10 +14126,10 @@ function updateAssetStatus(url, status) {
|
|
|
14302
14126
|
window.__orbitalVerification.assetStatus[url] = status;
|
|
14303
14127
|
}
|
|
14304
14128
|
}
|
|
14305
|
-
var
|
|
14129
|
+
var log4, MAX_TRANSITIONS;
|
|
14306
14130
|
var init_verificationRegistry = __esm({
|
|
14307
14131
|
"lib/verificationRegistry.ts"() {
|
|
14308
|
-
|
|
14132
|
+
log4 = createLogger("almadar:bridge");
|
|
14309
14133
|
MAX_TRANSITIONS = 500;
|
|
14310
14134
|
exposeOnWindow();
|
|
14311
14135
|
}
|
|
@@ -16038,7 +15862,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
16038
15862
|
}
|
|
16039
15863
|
return diff;
|
|
16040
15864
|
}
|
|
16041
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle,
|
|
15865
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
16042
15866
|
var init_CodeBlock = __esm({
|
|
16043
15867
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
16044
15868
|
init_cn();
|
|
@@ -16121,7 +15945,7 @@ var init_CodeBlock = __esm({
|
|
|
16121
15945
|
"lolo-op-async": { color: ORB_COLORS.dark.async }
|
|
16122
15946
|
};
|
|
16123
15947
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
16124
|
-
|
|
15948
|
+
log5 = createLogger("almadar:ui:markdown-code");
|
|
16125
15949
|
CODE_LANGUAGES = [
|
|
16126
15950
|
"text",
|
|
16127
15951
|
"json",
|
|
@@ -16160,7 +15984,7 @@ var init_CodeBlock = __esm({
|
|
|
16160
15984
|
};
|
|
16161
15985
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16162
15986
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16163
|
-
CodeBlock =
|
|
15987
|
+
CodeBlock = React90__default.memo(
|
|
16164
15988
|
({
|
|
16165
15989
|
code: rawCode,
|
|
16166
15990
|
language = "text",
|
|
@@ -16385,7 +16209,7 @@ var init_CodeBlock = __esm({
|
|
|
16385
16209
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
|
|
16386
16210
|
setTimeout(() => setCopied(false), 2e3);
|
|
16387
16211
|
} catch (err) {
|
|
16388
|
-
|
|
16212
|
+
log5.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
|
|
16389
16213
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
|
|
16390
16214
|
}
|
|
16391
16215
|
};
|
|
@@ -16747,7 +16571,7 @@ var init_MarkdownContent = __esm({
|
|
|
16747
16571
|
init_Box();
|
|
16748
16572
|
init_CodeBlock();
|
|
16749
16573
|
init_cn();
|
|
16750
|
-
MarkdownContent =
|
|
16574
|
+
MarkdownContent = React90__default.memo(
|
|
16751
16575
|
({ content, direction = "ltr", className }) => {
|
|
16752
16576
|
const { t: _t } = useTranslate();
|
|
16753
16577
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -18064,7 +17888,7 @@ var init_StateMachineView = __esm({
|
|
|
18064
17888
|
style: { top: title ? 30 : 0 },
|
|
18065
17889
|
children: [
|
|
18066
17890
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
18067
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
17891
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React90__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
18068
17892
|
StateNode,
|
|
18069
17893
|
{
|
|
18070
17894
|
state,
|
|
@@ -20266,14 +20090,14 @@ function useSafeEventBus2() {
|
|
|
20266
20090
|
} };
|
|
20267
20091
|
}
|
|
20268
20092
|
}
|
|
20269
|
-
var
|
|
20093
|
+
var log6, lookStyles4, ButtonGroup;
|
|
20270
20094
|
var init_ButtonGroup = __esm({
|
|
20271
20095
|
"components/core/molecules/ButtonGroup.tsx"() {
|
|
20272
20096
|
"use client";
|
|
20273
20097
|
init_cn();
|
|
20274
20098
|
init_atoms2();
|
|
20275
20099
|
init_useEventBus();
|
|
20276
|
-
|
|
20100
|
+
log6 = createLogger("almadar:ui:button-group");
|
|
20277
20101
|
lookStyles4 = {
|
|
20278
20102
|
"right-aligned-buttons": "",
|
|
20279
20103
|
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
@@ -20354,7 +20178,7 @@ var init_ButtonGroup = __esm({
|
|
|
20354
20178
|
{
|
|
20355
20179
|
variant: "ghost",
|
|
20356
20180
|
onClick: () => {
|
|
20357
|
-
|
|
20181
|
+
log6.debug("Filter clicked", { field: filter.field });
|
|
20358
20182
|
},
|
|
20359
20183
|
children: filter.label
|
|
20360
20184
|
},
|
|
@@ -24605,7 +24429,7 @@ function CraftingRecipe({
|
|
|
24605
24429
|
className
|
|
24606
24430
|
}) {
|
|
24607
24431
|
const eventBus = useEventBus();
|
|
24608
|
-
const handleCraft =
|
|
24432
|
+
const handleCraft = React90.useCallback(() => {
|
|
24609
24433
|
onCraft?.();
|
|
24610
24434
|
if (craftEvent) {
|
|
24611
24435
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -24622,7 +24446,7 @@ function CraftingRecipe({
|
|
|
24622
24446
|
children: [
|
|
24623
24447
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
24624
24448
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
24625
|
-
return /* @__PURE__ */ jsxs(
|
|
24449
|
+
return /* @__PURE__ */ jsxs(React90.Fragment, { children: [
|
|
24626
24450
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
24627
24451
|
ItemSlot,
|
|
24628
24452
|
{
|
|
@@ -24694,8 +24518,8 @@ function DPad({
|
|
|
24694
24518
|
}) {
|
|
24695
24519
|
const eventBus = useEventBus();
|
|
24696
24520
|
const sizes = sizeMap15[size];
|
|
24697
|
-
const [activeDirections, setActiveDirections] =
|
|
24698
|
-
const handlePress =
|
|
24521
|
+
const [activeDirections, setActiveDirections] = React90.useState(/* @__PURE__ */ new Set());
|
|
24522
|
+
const handlePress = React90.useCallback(
|
|
24699
24523
|
(direction) => {
|
|
24700
24524
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
24701
24525
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -24703,7 +24527,7 @@ function DPad({
|
|
|
24703
24527
|
},
|
|
24704
24528
|
[directionEvent, eventBus, onDirection]
|
|
24705
24529
|
);
|
|
24706
|
-
const handleRelease =
|
|
24530
|
+
const handleRelease = React90.useCallback(
|
|
24707
24531
|
(direction) => {
|
|
24708
24532
|
setActiveDirections((prev) => {
|
|
24709
24533
|
const next = new Set(prev);
|
|
@@ -25510,8 +25334,8 @@ var init_Menu = __esm({
|
|
|
25510
25334
|
"bottom-end": "bottom-start"
|
|
25511
25335
|
};
|
|
25512
25336
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25513
|
-
const triggerChild =
|
|
25514
|
-
const triggerElement =
|
|
25337
|
+
const triggerChild = React90__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
25338
|
+
const triggerElement = React90__default.cloneElement(
|
|
25515
25339
|
triggerChild,
|
|
25516
25340
|
{
|
|
25517
25341
|
ref: triggerRef,
|
|
@@ -25645,14 +25469,14 @@ function useDataDnd(args) {
|
|
|
25645
25469
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25646
25470
|
const enabled = isZone || Boolean(dndRoot);
|
|
25647
25471
|
const eventBus = useEventBus();
|
|
25648
|
-
const parentRoot =
|
|
25472
|
+
const parentRoot = React90__default.useContext(RootCtx);
|
|
25649
25473
|
const isRoot = enabled && parentRoot === null;
|
|
25650
|
-
const zoneId =
|
|
25474
|
+
const zoneId = React90__default.useId();
|
|
25651
25475
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25652
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25653
|
-
const optimisticOrdersRef =
|
|
25476
|
+
const [optimisticOrders, setOptimisticOrders] = React90__default.useState(() => /* @__PURE__ */ new Map());
|
|
25477
|
+
const optimisticOrdersRef = React90__default.useRef(optimisticOrders);
|
|
25654
25478
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25655
|
-
const clearOptimisticOrder =
|
|
25479
|
+
const clearOptimisticOrder = React90__default.useCallback((group) => {
|
|
25656
25480
|
setOptimisticOrders((prev) => {
|
|
25657
25481
|
if (!prev.has(group)) return prev;
|
|
25658
25482
|
const next = new Map(prev);
|
|
@@ -25677,7 +25501,7 @@ function useDataDnd(args) {
|
|
|
25677
25501
|
const raw = it[dndItemIdField];
|
|
25678
25502
|
return String(raw ?? `__idx_${idx}`);
|
|
25679
25503
|
}).join("|");
|
|
25680
|
-
const itemIds =
|
|
25504
|
+
const itemIds = React90__default.useMemo(
|
|
25681
25505
|
() => orderedItems.map((it, idx) => {
|
|
25682
25506
|
const raw = it[dndItemIdField];
|
|
25683
25507
|
return raw ?? `__idx_${idx}`;
|
|
@@ -25685,7 +25509,7 @@ function useDataDnd(args) {
|
|
|
25685
25509
|
[itemIdsSignature]
|
|
25686
25510
|
);
|
|
25687
25511
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
25688
|
-
|
|
25512
|
+
React90__default.useEffect(() => {
|
|
25689
25513
|
const root = isRoot ? null : parentRoot;
|
|
25690
25514
|
if (root) {
|
|
25691
25515
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25693,20 +25517,20 @@ function useDataDnd(args) {
|
|
|
25693
25517
|
clearOptimisticOrder(ownGroup);
|
|
25694
25518
|
}
|
|
25695
25519
|
}, [itemsContentSig, ownGroup]);
|
|
25696
|
-
const zonesRef =
|
|
25697
|
-
const registerZone =
|
|
25520
|
+
const zonesRef = React90__default.useRef(/* @__PURE__ */ new Map());
|
|
25521
|
+
const registerZone = React90__default.useCallback((zoneId2, meta2) => {
|
|
25698
25522
|
zonesRef.current.set(zoneId2, meta2);
|
|
25699
25523
|
}, []);
|
|
25700
|
-
const unregisterZone =
|
|
25524
|
+
const unregisterZone = React90__default.useCallback((zoneId2) => {
|
|
25701
25525
|
zonesRef.current.delete(zoneId2);
|
|
25702
25526
|
}, []);
|
|
25703
|
-
const [activeDrag, setActiveDrag] =
|
|
25704
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25705
|
-
const meta =
|
|
25527
|
+
const [activeDrag, setActiveDrag] = React90__default.useState(null);
|
|
25528
|
+
const [overZoneGroup, setOverZoneGroup] = React90__default.useState(null);
|
|
25529
|
+
const meta = React90__default.useMemo(
|
|
25706
25530
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25707
25531
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25708
25532
|
);
|
|
25709
|
-
|
|
25533
|
+
React90__default.useEffect(() => {
|
|
25710
25534
|
const target = isRoot ? null : parentRoot;
|
|
25711
25535
|
if (!target) {
|
|
25712
25536
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25725,7 +25549,7 @@ function useDataDnd(args) {
|
|
|
25725
25549
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25726
25550
|
const sensors = useAlmadarDndSensors(true);
|
|
25727
25551
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25728
|
-
const findZoneByItem =
|
|
25552
|
+
const findZoneByItem = React90__default.useCallback(
|
|
25729
25553
|
(id) => {
|
|
25730
25554
|
for (const z of zonesRef.current.values()) {
|
|
25731
25555
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25734,7 +25558,7 @@ function useDataDnd(args) {
|
|
|
25734
25558
|
},
|
|
25735
25559
|
[]
|
|
25736
25560
|
);
|
|
25737
|
-
|
|
25561
|
+
React90__default.useCallback(
|
|
25738
25562
|
(group) => {
|
|
25739
25563
|
for (const z of zonesRef.current.values()) {
|
|
25740
25564
|
if (z.group === group) return z;
|
|
@@ -25743,7 +25567,7 @@ function useDataDnd(args) {
|
|
|
25743
25567
|
},
|
|
25744
25568
|
[]
|
|
25745
25569
|
);
|
|
25746
|
-
const handleDragEnd =
|
|
25570
|
+
const handleDragEnd = React90__default.useCallback(
|
|
25747
25571
|
(event) => {
|
|
25748
25572
|
const { active, over } = event;
|
|
25749
25573
|
const activeIdStr = String(active.id);
|
|
@@ -25834,8 +25658,8 @@ function useDataDnd(args) {
|
|
|
25834
25658
|
},
|
|
25835
25659
|
[eventBus]
|
|
25836
25660
|
);
|
|
25837
|
-
const sortableData =
|
|
25838
|
-
const SortableItem =
|
|
25661
|
+
const sortableData = React90__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25662
|
+
const SortableItem = React90__default.useCallback(
|
|
25839
25663
|
({ id, children }) => {
|
|
25840
25664
|
const {
|
|
25841
25665
|
attributes,
|
|
@@ -25875,7 +25699,7 @@ function useDataDnd(args) {
|
|
|
25875
25699
|
id: droppableId,
|
|
25876
25700
|
data: sortableData
|
|
25877
25701
|
});
|
|
25878
|
-
const ctx =
|
|
25702
|
+
const ctx = React90__default.useContext(RootCtx);
|
|
25879
25703
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25880
25704
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25881
25705
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25890,7 +25714,7 @@ function useDataDnd(args) {
|
|
|
25890
25714
|
showForeignPlaceholder,
|
|
25891
25715
|
ctxAvailable: ctx != null
|
|
25892
25716
|
});
|
|
25893
|
-
|
|
25717
|
+
React90__default.useEffect(() => {
|
|
25894
25718
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25895
25719
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25896
25720
|
return /* @__PURE__ */ jsx(
|
|
@@ -25904,11 +25728,11 @@ function useDataDnd(args) {
|
|
|
25904
25728
|
}
|
|
25905
25729
|
);
|
|
25906
25730
|
};
|
|
25907
|
-
const rootContextValue =
|
|
25731
|
+
const rootContextValue = React90__default.useMemo(
|
|
25908
25732
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25909
25733
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25910
25734
|
);
|
|
25911
|
-
const handleDragStart =
|
|
25735
|
+
const handleDragStart = React90__default.useCallback((event) => {
|
|
25912
25736
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25913
25737
|
const rect = event.active.rect.current.initial;
|
|
25914
25738
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25927,7 +25751,7 @@ function useDataDnd(args) {
|
|
|
25927
25751
|
isRoot
|
|
25928
25752
|
});
|
|
25929
25753
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25930
|
-
const handleDragOver =
|
|
25754
|
+
const handleDragOver = React90__default.useCallback((event) => {
|
|
25931
25755
|
const { active, over } = event;
|
|
25932
25756
|
const overData = over?.data?.current;
|
|
25933
25757
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25997,7 +25821,7 @@ function useDataDnd(args) {
|
|
|
25997
25821
|
return next;
|
|
25998
25822
|
});
|
|
25999
25823
|
}, []);
|
|
26000
|
-
const handleDragCancel =
|
|
25824
|
+
const handleDragCancel = React90__default.useCallback((event) => {
|
|
26001
25825
|
setActiveDrag(null);
|
|
26002
25826
|
setOverZoneGroup(null);
|
|
26003
25827
|
dndLog.warn("dragCancel", {
|
|
@@ -26005,12 +25829,12 @@ function useDataDnd(args) {
|
|
|
26005
25829
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
26006
25830
|
});
|
|
26007
25831
|
}, []);
|
|
26008
|
-
const handleDragEndWithCleanup =
|
|
25832
|
+
const handleDragEndWithCleanup = React90__default.useCallback((event) => {
|
|
26009
25833
|
handleDragEnd(event);
|
|
26010
25834
|
setActiveDrag(null);
|
|
26011
25835
|
setOverZoneGroup(null);
|
|
26012
25836
|
}, [handleDragEnd]);
|
|
26013
|
-
const wrapContainer =
|
|
25837
|
+
const wrapContainer = React90__default.useCallback(
|
|
26014
25838
|
(children) => {
|
|
26015
25839
|
if (!enabled) return children;
|
|
26016
25840
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -26064,7 +25888,7 @@ var init_useDataDnd = __esm({
|
|
|
26064
25888
|
init_useAlmadarDndCollision();
|
|
26065
25889
|
init_Box();
|
|
26066
25890
|
dndLog = createLogger("almadar:ui:dnd");
|
|
26067
|
-
RootCtx =
|
|
25891
|
+
RootCtx = React90__default.createContext(null);
|
|
26068
25892
|
}
|
|
26069
25893
|
});
|
|
26070
25894
|
function renderIconInput(icon, props) {
|
|
@@ -26590,7 +26414,7 @@ function DataList({
|
|
|
26590
26414
|
}) {
|
|
26591
26415
|
const eventBus = useEventBus();
|
|
26592
26416
|
const { t } = useTranslate();
|
|
26593
|
-
const [visibleCount, setVisibleCount] =
|
|
26417
|
+
const [visibleCount, setVisibleCount] = React90__default.useState(pageSize || Infinity);
|
|
26594
26418
|
const fieldDefs = fields ?? columns ?? [];
|
|
26595
26419
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26596
26420
|
const dnd = useDataDnd({
|
|
@@ -26609,7 +26433,7 @@ function DataList({
|
|
|
26609
26433
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26610
26434
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26611
26435
|
const hasRenderProp = typeof children === "function";
|
|
26612
|
-
|
|
26436
|
+
React90__default.useEffect(() => {
|
|
26613
26437
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26614
26438
|
const childrenTypeOf = typeof children;
|
|
26615
26439
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26714,7 +26538,7 @@ function DataList({
|
|
|
26714
26538
|
const items2 = data.map((item) => item);
|
|
26715
26539
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
26716
26540
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
26717
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26541
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
26718
26542
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26719
26543
|
group.items.map((itemData, index) => {
|
|
26720
26544
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26855,7 +26679,7 @@ function DataList({
|
|
|
26855
26679
|
className
|
|
26856
26680
|
),
|
|
26857
26681
|
children: [
|
|
26858
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26682
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
26859
26683
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26860
26684
|
group.items.map(
|
|
26861
26685
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -27771,7 +27595,7 @@ var init_Grid = __esm({
|
|
|
27771
27595
|
as: Component2 = "div"
|
|
27772
27596
|
}) => {
|
|
27773
27597
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
27774
|
-
return
|
|
27598
|
+
return React90__default.createElement(
|
|
27775
27599
|
Component2,
|
|
27776
27600
|
{
|
|
27777
27601
|
className: cn(
|
|
@@ -27959,8 +27783,8 @@ var init_Popover = __esm({
|
|
|
27959
27783
|
onMouseEnter: handleOpen,
|
|
27960
27784
|
onMouseLeave: handleClose
|
|
27961
27785
|
};
|
|
27962
|
-
const childElement =
|
|
27963
|
-
const triggerElement =
|
|
27786
|
+
const childElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27787
|
+
const triggerElement = React90__default.cloneElement(
|
|
27964
27788
|
childElement,
|
|
27965
27789
|
{
|
|
27966
27790
|
ref: triggerRef,
|
|
@@ -28016,9 +27840,9 @@ function debug(...args) {
|
|
|
28016
27840
|
const [first, ...rest] = args;
|
|
28017
27841
|
const message = typeof first === "string" ? first : "<debug>";
|
|
28018
27842
|
if (rest.length === 0 && typeof first === "string") {
|
|
28019
|
-
|
|
27843
|
+
log7.debug(message);
|
|
28020
27844
|
} else {
|
|
28021
|
-
|
|
27845
|
+
log7.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
|
|
28022
27846
|
}
|
|
28023
27847
|
}
|
|
28024
27848
|
function debugGroup(label) {
|
|
@@ -28046,11 +27870,11 @@ function toLogMetaValue(v) {
|
|
|
28046
27870
|
}
|
|
28047
27871
|
return String(v);
|
|
28048
27872
|
}
|
|
28049
|
-
var NAMESPACE,
|
|
27873
|
+
var NAMESPACE, log7;
|
|
28050
27874
|
var init_debug = __esm({
|
|
28051
27875
|
"lib/debug.ts"() {
|
|
28052
27876
|
NAMESPACE = "almadar:ui:debug";
|
|
28053
|
-
|
|
27877
|
+
log7 = createLogger(NAMESPACE);
|
|
28054
27878
|
createLogger("almadar:ui:debug:input");
|
|
28055
27879
|
createLogger("almadar:ui:debug:collision");
|
|
28056
27880
|
createLogger("almadar:ui:debug:physics");
|
|
@@ -28550,8 +28374,8 @@ var init_Tooltip = __esm({
|
|
|
28550
28374
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28551
28375
|
};
|
|
28552
28376
|
}, []);
|
|
28553
|
-
const triggerElement =
|
|
28554
|
-
const trigger =
|
|
28377
|
+
const triggerElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28378
|
+
const trigger = React90__default.cloneElement(triggerElement, {
|
|
28555
28379
|
ref: triggerRef,
|
|
28556
28380
|
onMouseEnter: handleMouseEnter,
|
|
28557
28381
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28637,7 +28461,7 @@ var init_WizardProgress = __esm({
|
|
|
28637
28461
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28638
28462
|
const isActive = index === currentStep;
|
|
28639
28463
|
const isCompleted = index < currentStep;
|
|
28640
|
-
return /* @__PURE__ */ jsxs(
|
|
28464
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
28641
28465
|
/* @__PURE__ */ jsx(
|
|
28642
28466
|
"button",
|
|
28643
28467
|
{
|
|
@@ -29701,7 +29525,7 @@ function InventoryGrid({
|
|
|
29701
29525
|
const eventBus = useEventBus();
|
|
29702
29526
|
const slotCount = totalSlots ?? items.length;
|
|
29703
29527
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
29704
|
-
const handleSelect =
|
|
29528
|
+
const handleSelect = React90.useCallback(
|
|
29705
29529
|
(id) => {
|
|
29706
29530
|
onSelect?.(id);
|
|
29707
29531
|
if (selectEvent) {
|
|
@@ -29935,31 +29759,31 @@ function GameCanvas2D({
|
|
|
29935
29759
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
29936
29760
|
className
|
|
29937
29761
|
}) {
|
|
29938
|
-
const canvasRef =
|
|
29939
|
-
const rafRef =
|
|
29940
|
-
const frameRef =
|
|
29941
|
-
const lastTimeRef =
|
|
29942
|
-
const imageCache =
|
|
29762
|
+
const canvasRef = React90.useRef(null);
|
|
29763
|
+
const rafRef = React90.useRef(0);
|
|
29764
|
+
const frameRef = React90.useRef(0);
|
|
29765
|
+
const lastTimeRef = React90.useRef(0);
|
|
29766
|
+
const imageCache = React90.useRef(/* @__PURE__ */ new Map());
|
|
29943
29767
|
const emit = useEmitEvent();
|
|
29944
|
-
const onDrawRef =
|
|
29768
|
+
const onDrawRef = React90.useRef(onDraw);
|
|
29945
29769
|
onDrawRef.current = onDraw;
|
|
29946
|
-
const onTickRef =
|
|
29770
|
+
const onTickRef = React90.useRef(onTick);
|
|
29947
29771
|
onTickRef.current = onTick;
|
|
29948
|
-
const tickEventRef =
|
|
29772
|
+
const tickEventRef = React90.useRef(tickEvent);
|
|
29949
29773
|
tickEventRef.current = tickEvent;
|
|
29950
|
-
const drawEventRef =
|
|
29774
|
+
const drawEventRef = React90.useRef(drawEvent);
|
|
29951
29775
|
drawEventRef.current = drawEvent;
|
|
29952
|
-
const emitRef =
|
|
29776
|
+
const emitRef = React90.useRef(emit);
|
|
29953
29777
|
emitRef.current = emit;
|
|
29954
|
-
const assetBaseUrlRef =
|
|
29778
|
+
const assetBaseUrlRef = React90.useRef(assetBaseUrl);
|
|
29955
29779
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
29956
|
-
const backgroundImageRef =
|
|
29780
|
+
const backgroundImageRef = React90.useRef(backgroundImage);
|
|
29957
29781
|
backgroundImageRef.current = backgroundImage;
|
|
29958
|
-
const widthRef =
|
|
29782
|
+
const widthRef = React90.useRef(width);
|
|
29959
29783
|
widthRef.current = width;
|
|
29960
|
-
const heightRef =
|
|
29784
|
+
const heightRef = React90.useRef(height);
|
|
29961
29785
|
heightRef.current = height;
|
|
29962
|
-
const loadImage =
|
|
29786
|
+
const loadImage = React90.useCallback((url) => {
|
|
29963
29787
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
29964
29788
|
const cached = imageCache.current.get(fullUrl);
|
|
29965
29789
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -29971,7 +29795,7 @@ function GameCanvas2D({
|
|
|
29971
29795
|
}
|
|
29972
29796
|
return null;
|
|
29973
29797
|
}, []);
|
|
29974
|
-
|
|
29798
|
+
React90.useEffect(() => {
|
|
29975
29799
|
const canvas = canvasRef.current;
|
|
29976
29800
|
if (!canvas) return;
|
|
29977
29801
|
const ctx = canvas.getContext("2d");
|
|
@@ -30283,7 +30107,7 @@ function TurnPanel({
|
|
|
30283
30107
|
className
|
|
30284
30108
|
}) {
|
|
30285
30109
|
const eventBus = useEventBus();
|
|
30286
|
-
const handleAction =
|
|
30110
|
+
const handleAction = React90.useCallback(
|
|
30287
30111
|
(event) => {
|
|
30288
30112
|
if (event) {
|
|
30289
30113
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -30452,7 +30276,7 @@ function UnitCommandBar({
|
|
|
30452
30276
|
className
|
|
30453
30277
|
}) {
|
|
30454
30278
|
const eventBus = useEventBus();
|
|
30455
|
-
const handleCommand =
|
|
30279
|
+
const handleCommand = React90.useCallback(
|
|
30456
30280
|
(event) => {
|
|
30457
30281
|
if (event) {
|
|
30458
30282
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -30966,7 +30790,7 @@ function GameMenu({
|
|
|
30966
30790
|
} catch {
|
|
30967
30791
|
}
|
|
30968
30792
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
30969
|
-
const handleOptionClick =
|
|
30793
|
+
const handleOptionClick = React90.useCallback(
|
|
30970
30794
|
(option) => {
|
|
30971
30795
|
if (option.event && eventBus) {
|
|
30972
30796
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -31085,7 +30909,7 @@ function GameOverScreen({
|
|
|
31085
30909
|
} catch {
|
|
31086
30910
|
}
|
|
31087
30911
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
31088
|
-
const handleActionClick =
|
|
30912
|
+
const handleActionClick = React90.useCallback(
|
|
31089
30913
|
(action) => {
|
|
31090
30914
|
if (action.event && eventBus) {
|
|
31091
30915
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -31974,7 +31798,7 @@ var init_MapView = __esm({
|
|
|
31974
31798
|
shadowSize: [41, 41]
|
|
31975
31799
|
});
|
|
31976
31800
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
31977
|
-
const { useEffect: useEffect84, useRef: useRef76, useCallback: useCallback124, useState: useState120 } =
|
|
31801
|
+
const { useEffect: useEffect84, useRef: useRef76, useCallback: useCallback124, useState: useState120 } = React90__default;
|
|
31978
31802
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
31979
31803
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
31980
31804
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -32880,8 +32704,8 @@ function TableView({
|
|
|
32880
32704
|
}) {
|
|
32881
32705
|
const eventBus = useEventBus();
|
|
32882
32706
|
const { t } = useTranslate();
|
|
32883
|
-
const [visibleCount, setVisibleCount] =
|
|
32884
|
-
const [localSelected, setLocalSelected] =
|
|
32707
|
+
const [visibleCount, setVisibleCount] = React90__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
32708
|
+
const [localSelected, setLocalSelected] = React90__default.useState(/* @__PURE__ */ new Set());
|
|
32885
32709
|
const colDefs = columns ?? fields ?? [];
|
|
32886
32710
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
32887
32711
|
const dnd = useDataDnd({
|
|
@@ -33076,12 +32900,12 @@ function TableView({
|
|
|
33076
32900
|
]
|
|
33077
32901
|
}
|
|
33078
32902
|
);
|
|
33079
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
32903
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React90__default.Fragment, { children: rowInner }, id);
|
|
33080
32904
|
};
|
|
33081
32905
|
const items = data.map((row) => row);
|
|
33082
32906
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
33083
32907
|
let runningIndex = 0;
|
|
33084
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
32908
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
33085
32909
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
33086
32910
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
33087
32911
|
] }, gi)) });
|
|
@@ -34438,7 +34262,7 @@ var init_StepFlow = __esm({
|
|
|
34438
34262
|
className
|
|
34439
34263
|
}) => {
|
|
34440
34264
|
if (orientation === "vertical") {
|
|
34441
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
34265
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React90__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
34442
34266
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
34443
34267
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34444
34268
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -34449,7 +34273,7 @@ var init_StepFlow = __esm({
|
|
|
34449
34273
|
] })
|
|
34450
34274
|
] }) }, index)) });
|
|
34451
34275
|
}
|
|
34452
|
-
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(
|
|
34276
|
+
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(React90__default.Fragment, { children: [
|
|
34453
34277
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
34454
34278
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
34455
34279
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -35434,7 +35258,7 @@ var init_LikertScale = __esm({
|
|
|
35434
35258
|
md: "text-base",
|
|
35435
35259
|
lg: "text-lg"
|
|
35436
35260
|
};
|
|
35437
|
-
LikertScale =
|
|
35261
|
+
LikertScale = React90__default.forwardRef(
|
|
35438
35262
|
({
|
|
35439
35263
|
question,
|
|
35440
35264
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -35446,7 +35270,7 @@ var init_LikertScale = __esm({
|
|
|
35446
35270
|
variant = "radios",
|
|
35447
35271
|
className
|
|
35448
35272
|
}, ref) => {
|
|
35449
|
-
const groupId =
|
|
35273
|
+
const groupId = React90__default.useId();
|
|
35450
35274
|
const eventBus = useEventBus();
|
|
35451
35275
|
const handleSelect = useCallback(
|
|
35452
35276
|
(next) => {
|
|
@@ -37728,7 +37552,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
37728
37552
|
"aria-label": t("aria.breadcrumb"),
|
|
37729
37553
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
37730
37554
|
const isLast = idx === items.length - 1;
|
|
37731
|
-
return /* @__PURE__ */ jsxs(
|
|
37555
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
37732
37556
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
37733
37557
|
Icon,
|
|
37734
37558
|
{
|
|
@@ -38392,7 +38216,7 @@ var init_PageHeader = __esm({
|
|
|
38392
38216
|
info: "bg-info/10 text-info"
|
|
38393
38217
|
};
|
|
38394
38218
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38395
|
-
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(
|
|
38219
|
+
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(React90__default.Fragment, { children: [
|
|
38396
38220
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38397
38221
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38398
38222
|
"a",
|
|
@@ -39121,7 +38945,7 @@ var init_WizardContainer = __esm({
|
|
|
39121
38945
|
const isCompleted = index < currentStep;
|
|
39122
38946
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39123
38947
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39124
|
-
return /* @__PURE__ */ jsxs(
|
|
38948
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
39125
38949
|
/* @__PURE__ */ jsx(
|
|
39126
38950
|
Button,
|
|
39127
38951
|
{
|
|
@@ -41456,7 +41280,7 @@ var init_DetailPanel = __esm({
|
|
|
41456
41280
|
}
|
|
41457
41281
|
});
|
|
41458
41282
|
function extractTitle(children) {
|
|
41459
|
-
if (!
|
|
41283
|
+
if (!React90__default.isValidElement(children)) return void 0;
|
|
41460
41284
|
const props = children.props;
|
|
41461
41285
|
if (typeof props.title === "string") {
|
|
41462
41286
|
return props.title;
|
|
@@ -41511,7 +41335,7 @@ function LinearView({
|
|
|
41511
41335
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
41512
41336
|
const isDone = i < currentIdx;
|
|
41513
41337
|
const isCurrent = i === currentIdx;
|
|
41514
|
-
return /* @__PURE__ */ jsxs(
|
|
41338
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
41515
41339
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41516
41340
|
Typography,
|
|
41517
41341
|
{
|
|
@@ -42461,12 +42285,12 @@ var init_Form = __esm({
|
|
|
42461
42285
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
42462
42286
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
42463
42287
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
42464
|
-
const normalizedInitialData =
|
|
42288
|
+
const normalizedInitialData = React90__default.useMemo(() => {
|
|
42465
42289
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
42466
42290
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
42467
42291
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
42468
42292
|
}, [entity, initialData]);
|
|
42469
|
-
const entityDerivedFields =
|
|
42293
|
+
const entityDerivedFields = React90__default.useMemo(() => {
|
|
42470
42294
|
if (fields && fields.length > 0) return void 0;
|
|
42471
42295
|
if (!resolvedEntity) return void 0;
|
|
42472
42296
|
return resolvedEntity.fields.map(
|
|
@@ -42486,16 +42310,16 @@ var init_Form = __esm({
|
|
|
42486
42310
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
42487
42311
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
42488
42312
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
42489
|
-
const [formData, setFormData] =
|
|
42313
|
+
const [formData, setFormData] = React90__default.useState(
|
|
42490
42314
|
normalizedInitialData
|
|
42491
42315
|
);
|
|
42492
|
-
const [collapsedSections, setCollapsedSections] =
|
|
42316
|
+
const [collapsedSections, setCollapsedSections] = React90__default.useState(
|
|
42493
42317
|
/* @__PURE__ */ new Set()
|
|
42494
42318
|
);
|
|
42495
|
-
const [submitError, setSubmitError] =
|
|
42496
|
-
const formRef =
|
|
42319
|
+
const [submitError, setSubmitError] = React90__default.useState(null);
|
|
42320
|
+
const formRef = React90__default.useRef(null);
|
|
42497
42321
|
const formMode = props.mode;
|
|
42498
|
-
const mountedRef =
|
|
42322
|
+
const mountedRef = React90__default.useRef(false);
|
|
42499
42323
|
if (!mountedRef.current) {
|
|
42500
42324
|
mountedRef.current = true;
|
|
42501
42325
|
debug("forms", "mount", {
|
|
@@ -42508,7 +42332,7 @@ var init_Form = __esm({
|
|
|
42508
42332
|
});
|
|
42509
42333
|
}
|
|
42510
42334
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
42511
|
-
const evalContext =
|
|
42335
|
+
const evalContext = React90__default.useMemo(
|
|
42512
42336
|
() => ({
|
|
42513
42337
|
formValues: formData,
|
|
42514
42338
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -42517,7 +42341,7 @@ var init_Form = __esm({
|
|
|
42517
42341
|
}),
|
|
42518
42342
|
[formData, externalContext]
|
|
42519
42343
|
);
|
|
42520
|
-
|
|
42344
|
+
React90__default.useEffect(() => {
|
|
42521
42345
|
debug("forms", "initialData-sync", {
|
|
42522
42346
|
mode: formMode,
|
|
42523
42347
|
normalizedInitialData,
|
|
@@ -42528,7 +42352,7 @@ var init_Form = __esm({
|
|
|
42528
42352
|
setFormData(normalizedInitialData);
|
|
42529
42353
|
}
|
|
42530
42354
|
}, [normalizedInitialData]);
|
|
42531
|
-
const processCalculations =
|
|
42355
|
+
const processCalculations = React90__default.useCallback(
|
|
42532
42356
|
(changedFieldId, newFormData) => {
|
|
42533
42357
|
if (!hiddenCalculations.length) return;
|
|
42534
42358
|
const context = {
|
|
@@ -42553,7 +42377,7 @@ var init_Form = __esm({
|
|
|
42553
42377
|
},
|
|
42554
42378
|
[hiddenCalculations, externalContext, eventBus]
|
|
42555
42379
|
);
|
|
42556
|
-
const checkViolations =
|
|
42380
|
+
const checkViolations = React90__default.useCallback(
|
|
42557
42381
|
(changedFieldId, newFormData) => {
|
|
42558
42382
|
if (!violationTriggers.length) return;
|
|
42559
42383
|
const context = {
|
|
@@ -42591,7 +42415,7 @@ var init_Form = __esm({
|
|
|
42591
42415
|
processCalculations(name, newFormData);
|
|
42592
42416
|
checkViolations(name, newFormData);
|
|
42593
42417
|
};
|
|
42594
|
-
const isFieldVisible =
|
|
42418
|
+
const isFieldVisible = React90__default.useCallback(
|
|
42595
42419
|
(fieldName) => {
|
|
42596
42420
|
const condition = conditionalFields[fieldName];
|
|
42597
42421
|
if (!condition) return true;
|
|
@@ -42599,7 +42423,7 @@ var init_Form = __esm({
|
|
|
42599
42423
|
},
|
|
42600
42424
|
[conditionalFields, evalContext]
|
|
42601
42425
|
);
|
|
42602
|
-
const isSectionVisible =
|
|
42426
|
+
const isSectionVisible = React90__default.useCallback(
|
|
42603
42427
|
(section) => {
|
|
42604
42428
|
if (!section.condition) return true;
|
|
42605
42429
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -42675,7 +42499,7 @@ var init_Form = __esm({
|
|
|
42675
42499
|
eventBus.emit(`UI:${onCancel}`);
|
|
42676
42500
|
}
|
|
42677
42501
|
};
|
|
42678
|
-
const renderField =
|
|
42502
|
+
const renderField = React90__default.useCallback(
|
|
42679
42503
|
(field) => {
|
|
42680
42504
|
const fieldName = field.name || field.field;
|
|
42681
42505
|
if (!fieldName) return null;
|
|
@@ -42696,7 +42520,7 @@ var init_Form = __esm({
|
|
|
42696
42520
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
42697
42521
|
);
|
|
42698
42522
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
42699
|
-
const normalizedFields =
|
|
42523
|
+
const normalizedFields = React90__default.useMemo(() => {
|
|
42700
42524
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
42701
42525
|
return effectiveFields.map((field) => {
|
|
42702
42526
|
if (typeof field === "string") {
|
|
@@ -42719,7 +42543,7 @@ var init_Form = __esm({
|
|
|
42719
42543
|
return field;
|
|
42720
42544
|
});
|
|
42721
42545
|
}, [effectiveFields, resolvedEntity]);
|
|
42722
|
-
const schemaFields =
|
|
42546
|
+
const schemaFields = React90__default.useMemo(() => {
|
|
42723
42547
|
if (normalizedFields.length === 0) return null;
|
|
42724
42548
|
if (isDebugEnabled()) {
|
|
42725
42549
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -42729,7 +42553,7 @@ var init_Form = __esm({
|
|
|
42729
42553
|
}
|
|
42730
42554
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
42731
42555
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
42732
|
-
const sectionElements =
|
|
42556
|
+
const sectionElements = React90__default.useMemo(() => {
|
|
42733
42557
|
if (!sections || sections.length === 0) return null;
|
|
42734
42558
|
return sections.map((section) => {
|
|
42735
42559
|
if (!isSectionVisible(section)) {
|
|
@@ -43899,11 +43723,11 @@ var init_Canvas3DErrorBoundary = __esm({
|
|
|
43899
43723
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.css"() {
|
|
43900
43724
|
}
|
|
43901
43725
|
});
|
|
43902
|
-
var
|
|
43726
|
+
var log8, Canvas3DErrorBoundary;
|
|
43903
43727
|
var init_Canvas3DErrorBoundary2 = __esm({
|
|
43904
43728
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.tsx"() {
|
|
43905
43729
|
init_Canvas3DErrorBoundary();
|
|
43906
|
-
|
|
43730
|
+
log8 = createLogger("almadar:ui:game:canvas3d:error-boundary");
|
|
43907
43731
|
Canvas3DErrorBoundary = class extends Component {
|
|
43908
43732
|
constructor(props) {
|
|
43909
43733
|
super(props);
|
|
@@ -43931,8 +43755,8 @@ var init_Canvas3DErrorBoundary2 = __esm({
|
|
|
43931
43755
|
componentDidCatch(error, errorInfo) {
|
|
43932
43756
|
this.setState({ errorInfo });
|
|
43933
43757
|
this.props.onError?.(error, errorInfo);
|
|
43934
|
-
|
|
43935
|
-
|
|
43758
|
+
log8.error("Error caught", { error });
|
|
43759
|
+
log8.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
|
|
43936
43760
|
}
|
|
43937
43761
|
render() {
|
|
43938
43762
|
if (this.state.hasError) {
|
|
@@ -43995,7 +43819,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
43995
43819
|
setState({ model: null, isLoading: false, error: null });
|
|
43996
43820
|
return;
|
|
43997
43821
|
}
|
|
43998
|
-
|
|
43822
|
+
log9.debug("Loading", { url });
|
|
43999
43823
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
44000
43824
|
const assetRoot = resourceBasePath || detectAssetRoot2(url);
|
|
44001
43825
|
const loader = new GLTFLoader$1();
|
|
@@ -44003,7 +43827,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
44003
43827
|
loader.load(
|
|
44004
43828
|
url,
|
|
44005
43829
|
(gltf) => {
|
|
44006
|
-
|
|
43830
|
+
log9.debug("Loaded", { url });
|
|
44007
43831
|
setState({
|
|
44008
43832
|
model: gltf.scene,
|
|
44009
43833
|
isLoading: false,
|
|
@@ -44012,7 +43836,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
44012
43836
|
},
|
|
44013
43837
|
void 0,
|
|
44014
43838
|
(err) => {
|
|
44015
|
-
|
|
43839
|
+
log9.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
|
|
44016
43840
|
setState({
|
|
44017
43841
|
model: null,
|
|
44018
43842
|
isLoading: false,
|
|
@@ -44128,11 +43952,11 @@ function ModelLoader({
|
|
|
44128
43952
|
}
|
|
44129
43953
|
);
|
|
44130
43954
|
}
|
|
44131
|
-
var
|
|
43955
|
+
var log9;
|
|
44132
43956
|
var init_ModelLoader = __esm({
|
|
44133
43957
|
"components/game/molecules/three/components/ModelLoader.tsx"() {
|
|
44134
43958
|
"use client";
|
|
44135
|
-
|
|
43959
|
+
log9 = createLogger("almadar:ui:game:model-loader");
|
|
44136
43960
|
}
|
|
44137
43961
|
});
|
|
44138
43962
|
|
|
@@ -45566,7 +45390,7 @@ var init_List = __esm({
|
|
|
45566
45390
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
45567
45391
|
return [];
|
|
45568
45392
|
}, [entity]);
|
|
45569
|
-
const getItemActions =
|
|
45393
|
+
const getItemActions = React90__default.useCallback(
|
|
45570
45394
|
(item) => {
|
|
45571
45395
|
if (!itemActions) return [];
|
|
45572
45396
|
if (typeof itemActions === "function") {
|
|
@@ -46042,7 +45866,7 @@ var init_MediaGallery = __esm({
|
|
|
46042
45866
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
46043
45867
|
);
|
|
46044
45868
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46045
|
-
const items =
|
|
45869
|
+
const items = React90__default.useMemo(() => {
|
|
46046
45870
|
if (propItems) return propItems;
|
|
46047
45871
|
if (entityData.length === 0) return [];
|
|
46048
45872
|
return entityData.map((record, idx) => ({
|
|
@@ -46203,7 +46027,7 @@ var init_MediaGallery = __esm({
|
|
|
46203
46027
|
}
|
|
46204
46028
|
});
|
|
46205
46029
|
function extractTitle2(children) {
|
|
46206
|
-
if (!
|
|
46030
|
+
if (!React90__default.isValidElement(children)) return void 0;
|
|
46207
46031
|
const props = children.props;
|
|
46208
46032
|
if (typeof props.title === "string") {
|
|
46209
46033
|
return props.title;
|
|
@@ -47227,7 +47051,7 @@ var init_debugRegistry = __esm({
|
|
|
47227
47051
|
}
|
|
47228
47052
|
});
|
|
47229
47053
|
function useDebugData() {
|
|
47230
|
-
const [data, setData] =
|
|
47054
|
+
const [data, setData] = React90.useState(() => ({
|
|
47231
47055
|
traits: [],
|
|
47232
47056
|
ticks: [],
|
|
47233
47057
|
guards: [],
|
|
@@ -47241,7 +47065,7 @@ function useDebugData() {
|
|
|
47241
47065
|
},
|
|
47242
47066
|
lastUpdate: Date.now()
|
|
47243
47067
|
}));
|
|
47244
|
-
|
|
47068
|
+
React90.useEffect(() => {
|
|
47245
47069
|
const updateData = () => {
|
|
47246
47070
|
setData({
|
|
47247
47071
|
traits: getAllTraits(),
|
|
@@ -47350,12 +47174,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
47350
47174
|
return positions;
|
|
47351
47175
|
}
|
|
47352
47176
|
function WalkMinimap() {
|
|
47353
|
-
const [walkStep, setWalkStep] =
|
|
47354
|
-
const [traits2, setTraits] =
|
|
47355
|
-
const [coveredEdges, setCoveredEdges] =
|
|
47356
|
-
const [completedTraits, setCompletedTraits] =
|
|
47357
|
-
const prevTraitRef =
|
|
47358
|
-
|
|
47177
|
+
const [walkStep, setWalkStep] = React90.useState(null);
|
|
47178
|
+
const [traits2, setTraits] = React90.useState([]);
|
|
47179
|
+
const [coveredEdges, setCoveredEdges] = React90.useState([]);
|
|
47180
|
+
const [completedTraits, setCompletedTraits] = React90.useState(/* @__PURE__ */ new Set());
|
|
47181
|
+
const prevTraitRef = React90.useRef(null);
|
|
47182
|
+
React90.useEffect(() => {
|
|
47359
47183
|
const interval = setInterval(() => {
|
|
47360
47184
|
const w = window;
|
|
47361
47185
|
const step = w.__orbitalWalkStep;
|
|
@@ -47791,15 +47615,15 @@ var init_EntitiesTab = __esm({
|
|
|
47791
47615
|
});
|
|
47792
47616
|
function EventFlowTab({ events: events2 }) {
|
|
47793
47617
|
const { t } = useTranslate();
|
|
47794
|
-
const [filter, setFilter] =
|
|
47795
|
-
const containerRef =
|
|
47796
|
-
const [autoScroll, setAutoScroll] =
|
|
47797
|
-
|
|
47618
|
+
const [filter, setFilter] = React90.useState("all");
|
|
47619
|
+
const containerRef = React90.useRef(null);
|
|
47620
|
+
const [autoScroll, setAutoScroll] = React90.useState(true);
|
|
47621
|
+
React90.useEffect(() => {
|
|
47798
47622
|
if (autoScroll && containerRef.current) {
|
|
47799
47623
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47800
47624
|
}
|
|
47801
47625
|
}, [events2.length, autoScroll]);
|
|
47802
|
-
const filteredEvents =
|
|
47626
|
+
const filteredEvents = React90.useMemo(() => {
|
|
47803
47627
|
if (filter === "all") return events2;
|
|
47804
47628
|
return events2.filter((e) => e.type === filter);
|
|
47805
47629
|
}, [events2, filter]);
|
|
@@ -47915,7 +47739,7 @@ var init_EventFlowTab = __esm({
|
|
|
47915
47739
|
});
|
|
47916
47740
|
function GuardsPanel({ guards }) {
|
|
47917
47741
|
const { t } = useTranslate();
|
|
47918
|
-
const [filter, setFilter] =
|
|
47742
|
+
const [filter, setFilter] = React90.useState("all");
|
|
47919
47743
|
if (guards.length === 0) {
|
|
47920
47744
|
return /* @__PURE__ */ jsx(
|
|
47921
47745
|
EmptyState,
|
|
@@ -47928,7 +47752,7 @@ function GuardsPanel({ guards }) {
|
|
|
47928
47752
|
}
|
|
47929
47753
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47930
47754
|
const failedCount = guards.length - passedCount;
|
|
47931
|
-
const filteredGuards =
|
|
47755
|
+
const filteredGuards = React90.useMemo(() => {
|
|
47932
47756
|
if (filter === "all") return guards;
|
|
47933
47757
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47934
47758
|
return guards.filter((g) => !g.result);
|
|
@@ -48091,10 +47915,10 @@ function EffectBadge({ effect }) {
|
|
|
48091
47915
|
}
|
|
48092
47916
|
function TransitionTimeline({ transitions }) {
|
|
48093
47917
|
const { t } = useTranslate();
|
|
48094
|
-
const containerRef =
|
|
48095
|
-
const [autoScroll, setAutoScroll] =
|
|
48096
|
-
const [expandedId, setExpandedId] =
|
|
48097
|
-
|
|
47918
|
+
const containerRef = React90.useRef(null);
|
|
47919
|
+
const [autoScroll, setAutoScroll] = React90.useState(true);
|
|
47920
|
+
const [expandedId, setExpandedId] = React90.useState(null);
|
|
47921
|
+
React90.useEffect(() => {
|
|
48098
47922
|
if (autoScroll && containerRef.current) {
|
|
48099
47923
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
48100
47924
|
}
|
|
@@ -48374,9 +48198,9 @@ function getAllEvents(traits2) {
|
|
|
48374
48198
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
48375
48199
|
const eventBus = useEventBus();
|
|
48376
48200
|
const { t } = useTranslate();
|
|
48377
|
-
const [log15, setLog] =
|
|
48378
|
-
const prevStatesRef =
|
|
48379
|
-
|
|
48201
|
+
const [log15, setLog] = React90.useState([]);
|
|
48202
|
+
const prevStatesRef = React90.useRef(/* @__PURE__ */ new Map());
|
|
48203
|
+
React90.useEffect(() => {
|
|
48380
48204
|
for (const trait of traits2) {
|
|
48381
48205
|
const prev = prevStatesRef.current.get(trait.id);
|
|
48382
48206
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48545,10 +48369,10 @@ function VerifyModePanel({
|
|
|
48545
48369
|
localCount
|
|
48546
48370
|
}) {
|
|
48547
48371
|
const { t } = useTranslate();
|
|
48548
|
-
const [expanded, setExpanded] =
|
|
48549
|
-
const scrollRef =
|
|
48550
|
-
const prevCountRef =
|
|
48551
|
-
|
|
48372
|
+
const [expanded, setExpanded] = React90.useState(true);
|
|
48373
|
+
const scrollRef = React90.useRef(null);
|
|
48374
|
+
const prevCountRef = React90.useRef(0);
|
|
48375
|
+
React90.useEffect(() => {
|
|
48552
48376
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48553
48377
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48554
48378
|
}
|
|
@@ -48605,10 +48429,10 @@ function RuntimeDebugger({
|
|
|
48605
48429
|
schema
|
|
48606
48430
|
}) {
|
|
48607
48431
|
const { t } = useTranslate();
|
|
48608
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48609
|
-
const [isVisible, setIsVisible] =
|
|
48432
|
+
const [isCollapsed, setIsCollapsed] = React90.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48433
|
+
const [isVisible, setIsVisible] = React90.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48610
48434
|
const debugData = useDebugData();
|
|
48611
|
-
|
|
48435
|
+
React90.useEffect(() => {
|
|
48612
48436
|
if (mode === "inline") return;
|
|
48613
48437
|
return onDebugToggle((enabled) => {
|
|
48614
48438
|
setIsVisible(enabled);
|
|
@@ -48617,7 +48441,7 @@ function RuntimeDebugger({
|
|
|
48617
48441
|
}
|
|
48618
48442
|
});
|
|
48619
48443
|
}, [mode]);
|
|
48620
|
-
|
|
48444
|
+
React90.useEffect(() => {
|
|
48621
48445
|
if (mode === "inline") return;
|
|
48622
48446
|
const handleKeyDown = (e) => {
|
|
48623
48447
|
if (e.key === "`" && isVisible) {
|
|
@@ -49177,7 +49001,7 @@ function SequenceBar({
|
|
|
49177
49001
|
onSlotRemove(index);
|
|
49178
49002
|
}, [onSlotRemove, playing]);
|
|
49179
49003
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
49180
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
49004
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
49181
49005
|
i > 0 && /* @__PURE__ */ jsx(
|
|
49182
49006
|
Typography,
|
|
49183
49007
|
{
|
|
@@ -50066,7 +49890,7 @@ var init_StatCard = __esm({
|
|
|
50066
49890
|
const labelToUse = propLabel ?? propTitle;
|
|
50067
49891
|
const eventBus = useEventBus();
|
|
50068
49892
|
const { t } = useTranslate();
|
|
50069
|
-
const handleActionClick =
|
|
49893
|
+
const handleActionClick = React90__default.useCallback(() => {
|
|
50070
49894
|
if (action?.event) {
|
|
50071
49895
|
eventBus.emit(`UI:${action.event}`, {});
|
|
50072
49896
|
}
|
|
@@ -50077,7 +49901,7 @@ var init_StatCard = __esm({
|
|
|
50077
49901
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
50078
49902
|
const isLoading = externalLoading ?? false;
|
|
50079
49903
|
const error = externalError;
|
|
50080
|
-
const computeMetricValue =
|
|
49904
|
+
const computeMetricValue = React90__default.useCallback(
|
|
50081
49905
|
(metric, items) => {
|
|
50082
49906
|
if (metric.value !== void 0) {
|
|
50083
49907
|
return metric.value;
|
|
@@ -50116,7 +49940,7 @@ var init_StatCard = __esm({
|
|
|
50116
49940
|
},
|
|
50117
49941
|
[]
|
|
50118
49942
|
);
|
|
50119
|
-
const schemaStats =
|
|
49943
|
+
const schemaStats = React90__default.useMemo(() => {
|
|
50120
49944
|
if (!metrics || metrics.length === 0) return null;
|
|
50121
49945
|
return metrics.map((metric) => ({
|
|
50122
49946
|
label: metric.label,
|
|
@@ -50124,7 +49948,7 @@ var init_StatCard = __esm({
|
|
|
50124
49948
|
format: metric.format
|
|
50125
49949
|
}));
|
|
50126
49950
|
}, [metrics, data, computeMetricValue]);
|
|
50127
|
-
const calculatedTrend =
|
|
49951
|
+
const calculatedTrend = React90__default.useMemo(() => {
|
|
50128
49952
|
if (manualTrend !== void 0) return manualTrend;
|
|
50129
49953
|
if (previousValue === void 0 || currentValue === void 0)
|
|
50130
49954
|
return void 0;
|
|
@@ -51090,7 +50914,7 @@ var init_Timeline = __esm({
|
|
|
51090
50914
|
}) => {
|
|
51091
50915
|
const { t } = useTranslate();
|
|
51092
50916
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
51093
|
-
const items =
|
|
50917
|
+
const items = React90__default.useMemo(() => {
|
|
51094
50918
|
if (propItems) return propItems;
|
|
51095
50919
|
if (entityData.length === 0) return [];
|
|
51096
50920
|
return entityData.map((record, idx) => {
|
|
@@ -51197,7 +51021,7 @@ var init_Timeline = __esm({
|
|
|
51197
51021
|
}
|
|
51198
51022
|
});
|
|
51199
51023
|
function extractToastProps(children) {
|
|
51200
|
-
if (!
|
|
51024
|
+
if (!React90__default.isValidElement(children)) {
|
|
51201
51025
|
if (typeof children === "string") {
|
|
51202
51026
|
return { message: children };
|
|
51203
51027
|
}
|
|
@@ -51235,7 +51059,7 @@ var init_ToastSlot = __esm({
|
|
|
51235
51059
|
eventBus.emit("UI:CLOSE");
|
|
51236
51060
|
};
|
|
51237
51061
|
if (!isVisible) return null;
|
|
51238
|
-
const isCustomContent =
|
|
51062
|
+
const isCustomContent = React90__default.isValidElement(children) && !message;
|
|
51239
51063
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
51240
51064
|
Toast,
|
|
51241
51065
|
{
|
|
@@ -52104,7 +51928,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
52104
51928
|
}
|
|
52105
51929
|
});
|
|
52106
51930
|
function lazyThree(name, loader) {
|
|
52107
|
-
const Lazy =
|
|
51931
|
+
const Lazy = React90__default.lazy(
|
|
52108
51932
|
() => loader().then((m) => {
|
|
52109
51933
|
const Resolved = m[name];
|
|
52110
51934
|
if (!Resolved) {
|
|
@@ -52116,13 +51940,13 @@ function lazyThree(name, loader) {
|
|
|
52116
51940
|
})
|
|
52117
51941
|
);
|
|
52118
51942
|
function ThreeWrapper(props) {
|
|
52119
|
-
return
|
|
51943
|
+
return React90__default.createElement(
|
|
52120
51944
|
ThreeBoundary,
|
|
52121
51945
|
{ name },
|
|
52122
|
-
|
|
52123
|
-
|
|
51946
|
+
React90__default.createElement(
|
|
51947
|
+
React90__default.Suspense,
|
|
52124
51948
|
{ fallback: null },
|
|
52125
|
-
|
|
51949
|
+
React90__default.createElement(Lazy, props)
|
|
52126
51950
|
)
|
|
52127
51951
|
);
|
|
52128
51952
|
}
|
|
@@ -52420,7 +52244,7 @@ var init_component_registry_generated = __esm({
|
|
|
52420
52244
|
init_WorldMapBoard();
|
|
52421
52245
|
init_WorldMapTemplate();
|
|
52422
52246
|
init_XPBar();
|
|
52423
|
-
ThreeBoundary = class extends
|
|
52247
|
+
ThreeBoundary = class extends React90__default.Component {
|
|
52424
52248
|
constructor() {
|
|
52425
52249
|
super(...arguments);
|
|
52426
52250
|
__publicField(this, "state", { failed: false });
|
|
@@ -52430,7 +52254,7 @@ var init_component_registry_generated = __esm({
|
|
|
52430
52254
|
}
|
|
52431
52255
|
render() {
|
|
52432
52256
|
if (this.state.failed) {
|
|
52433
|
-
return
|
|
52257
|
+
return React90__default.createElement(
|
|
52434
52258
|
"div",
|
|
52435
52259
|
{
|
|
52436
52260
|
"data-testid": "three-unavailable",
|
|
@@ -52771,7 +52595,7 @@ function SuspenseConfigProvider({
|
|
|
52771
52595
|
config,
|
|
52772
52596
|
children
|
|
52773
52597
|
}) {
|
|
52774
|
-
return
|
|
52598
|
+
return React90__default.createElement(
|
|
52775
52599
|
SuspenseConfigContext.Provider,
|
|
52776
52600
|
{ value: config },
|
|
52777
52601
|
children
|
|
@@ -53261,7 +53085,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53261
53085
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53262
53086
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53263
53087
|
}
|
|
53264
|
-
return /* @__PURE__ */ jsx(
|
|
53088
|
+
return /* @__PURE__ */ jsx(React90__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53265
53089
|
}
|
|
53266
53090
|
if (!child || typeof child !== "object") return null;
|
|
53267
53091
|
const childId = `${parentId}-${index}`;
|
|
@@ -53301,14 +53125,14 @@ function isPatternConfig(value) {
|
|
|
53301
53125
|
if (value === null || value === void 0) return false;
|
|
53302
53126
|
if (typeof value !== "object") return false;
|
|
53303
53127
|
if (Array.isArray(value)) return false;
|
|
53304
|
-
if (
|
|
53128
|
+
if (React90__default.isValidElement(value)) return false;
|
|
53305
53129
|
if (value instanceof Date) return false;
|
|
53306
53130
|
if (typeof value === "function") return false;
|
|
53307
53131
|
const record = value;
|
|
53308
53132
|
return "type" in record && typeof record.type === "string";
|
|
53309
53133
|
}
|
|
53310
53134
|
function isPlainConfigObject(value) {
|
|
53311
|
-
if (
|
|
53135
|
+
if (React90__default.isValidElement(value)) return false;
|
|
53312
53136
|
if (value instanceof Date) return false;
|
|
53313
53137
|
const proto = Object.getPrototypeOf(value);
|
|
53314
53138
|
return proto === Object.prototype || proto === null;
|
|
@@ -53815,7 +53639,7 @@ var AvlTransition = ({
|
|
|
53815
53639
|
opacity = 1,
|
|
53816
53640
|
className
|
|
53817
53641
|
}) => {
|
|
53818
|
-
const ids =
|
|
53642
|
+
const ids = React90__default.useMemo(() => {
|
|
53819
53643
|
avlTransitionId += 1;
|
|
53820
53644
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
53821
53645
|
}, []);
|
|
@@ -54376,7 +54200,7 @@ var AvlStateMachine = ({
|
|
|
54376
54200
|
color = "var(--color-primary)",
|
|
54377
54201
|
animated = false
|
|
54378
54202
|
}) => {
|
|
54379
|
-
const ids =
|
|
54203
|
+
const ids = React90__default.useMemo(() => {
|
|
54380
54204
|
avlSmId += 1;
|
|
54381
54205
|
const base = `avl-sm-${avlSmId}`;
|
|
54382
54206
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -54575,7 +54399,7 @@ var AvlOrbitalUnit = ({
|
|
|
54575
54399
|
color = "var(--color-primary)",
|
|
54576
54400
|
animated = false
|
|
54577
54401
|
}) => {
|
|
54578
|
-
const ids =
|
|
54402
|
+
const ids = React90__default.useMemo(() => {
|
|
54579
54403
|
avlOuId += 1;
|
|
54580
54404
|
const base = `avl-ou-${avlOuId}`;
|
|
54581
54405
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -54671,7 +54495,7 @@ var AvlClosedCircuit = ({
|
|
|
54671
54495
|
color = "var(--color-primary)",
|
|
54672
54496
|
animated = false
|
|
54673
54497
|
}) => {
|
|
54674
|
-
const ids =
|
|
54498
|
+
const ids = React90__default.useMemo(() => {
|
|
54675
54499
|
avlCcId += 1;
|
|
54676
54500
|
const base = `avl-cc-${avlCcId}`;
|
|
54677
54501
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -54826,7 +54650,7 @@ var AvlEmitListen = ({
|
|
|
54826
54650
|
color = "var(--color-primary)",
|
|
54827
54651
|
animated = false
|
|
54828
54652
|
}) => {
|
|
54829
|
-
const ids =
|
|
54653
|
+
const ids = React90__default.useMemo(() => {
|
|
54830
54654
|
avlElId += 1;
|
|
54831
54655
|
const base = `avl-el-${avlElId}`;
|
|
54832
54656
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -55100,7 +54924,7 @@ function renderNode(node, color, glowId) {
|
|
|
55100
54924
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
55101
54925
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
55102
54926
|
const nc = nodeColor(node.type, color);
|
|
55103
|
-
return /* @__PURE__ */ jsxs(
|
|
54927
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
55104
54928
|
node.children.map((child, i) => {
|
|
55105
54929
|
const childR = Math.max(
|
|
55106
54930
|
child.type === "operator" ? 20 : 16,
|
|
@@ -55157,7 +54981,7 @@ var AvlExprTree = ({
|
|
|
55157
54981
|
className,
|
|
55158
54982
|
color = "var(--color-primary)"
|
|
55159
54983
|
}) => {
|
|
55160
|
-
const ids =
|
|
54984
|
+
const ids = React90__default.useMemo(() => {
|
|
55161
54985
|
avlEtId += 1;
|
|
55162
54986
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
55163
54987
|
}, []);
|
|
@@ -55981,7 +55805,7 @@ var SystemNode = ({ data }) => {
|
|
|
55981
55805
|
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) => {
|
|
55982
55806
|
const tc = transitionCounts[s.name] ?? 0;
|
|
55983
55807
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
55984
|
-
return /* @__PURE__ */ jsxs(
|
|
55808
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
55985
55809
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
55986
55810
|
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 })
|
|
55987
55811
|
] }, s.name);
|
|
@@ -57133,7 +56957,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
57133
56957
|
if (Array.isArray(body)) {
|
|
57134
56958
|
return body.map((b) => recur(b));
|
|
57135
56959
|
}
|
|
57136
|
-
if (body !== null && typeof body === "object" && !
|
|
56960
|
+
if (body !== null && typeof body === "object" && !React90__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
57137
56961
|
const out = {};
|
|
57138
56962
|
for (const [k, v] of Object.entries(body)) {
|
|
57139
56963
|
out[k] = recur(v);
|
|
@@ -57152,7 +56976,7 @@ function getSlotContentRenderer2() {
|
|
|
57152
56976
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
57153
56977
|
return (item, index) => {
|
|
57154
56978
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
57155
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
56979
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React90__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
57156
56980
|
return null;
|
|
57157
56981
|
}
|
|
57158
56982
|
const record = resolvedBody;
|
|
@@ -57171,7 +56995,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
57171
56995
|
props: childProps,
|
|
57172
56996
|
priority: 0
|
|
57173
56997
|
};
|
|
57174
|
-
return
|
|
56998
|
+
return React90__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
57175
56999
|
};
|
|
57176
57000
|
}
|
|
57177
57001
|
function convertNode(node, callerKey) {
|
|
@@ -57190,7 +57014,7 @@ function convertNode(node, callerKey) {
|
|
|
57190
57014
|
});
|
|
57191
57015
|
return anyChanged ? mapped : node;
|
|
57192
57016
|
}
|
|
57193
|
-
if (typeof node === "object" && !
|
|
57017
|
+
if (typeof node === "object" && !React90__default.isValidElement(node) && !(node instanceof Date)) {
|
|
57194
57018
|
return convertObjectProps(node);
|
|
57195
57019
|
}
|
|
57196
57020
|
return node;
|
|
@@ -57217,7 +57041,7 @@ function convertObjectProps(props) {
|
|
|
57217
57041
|
function convertFnFormLambdasInProps(props) {
|
|
57218
57042
|
return convertObjectProps(props);
|
|
57219
57043
|
}
|
|
57220
|
-
var
|
|
57044
|
+
var log10 = createLogger("almadar:ui:effects:client-handlers");
|
|
57221
57045
|
function createClientEffectHandlers(options) {
|
|
57222
57046
|
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
57223
57047
|
return {
|
|
@@ -57226,10 +57050,10 @@ function createClientEffectHandlers(options) {
|
|
|
57226
57050
|
eventBus.emit(prefixedEvent, payload);
|
|
57227
57051
|
},
|
|
57228
57052
|
persist: async () => {
|
|
57229
|
-
|
|
57053
|
+
log10.warn("persist is server-side only, ignored on client");
|
|
57230
57054
|
},
|
|
57231
57055
|
set: () => {
|
|
57232
|
-
|
|
57056
|
+
log10.warn("set is server-side only, ignored on client");
|
|
57233
57057
|
},
|
|
57234
57058
|
callService: async (service, action, params) => {
|
|
57235
57059
|
if (callService) return callService(service, action, params);
|
|
@@ -57258,10 +57082,10 @@ function createClientEffectHandlers(options) {
|
|
|
57258
57082
|
slotSetter.addPattern(slot, pattern, props);
|
|
57259
57083
|
},
|
|
57260
57084
|
navigate: navigate ?? ((path) => {
|
|
57261
|
-
|
|
57085
|
+
log10.warn("No navigate handler, ignoring", { path });
|
|
57262
57086
|
}),
|
|
57263
57087
|
notify: notify ?? ((msg, type) => {
|
|
57264
|
-
|
|
57088
|
+
log10.debug("notify", { type, message: msg });
|
|
57265
57089
|
})
|
|
57266
57090
|
};
|
|
57267
57091
|
}
|
|
@@ -58185,9 +58009,175 @@ function ServerBridgeProvider({
|
|
|
58185
58009
|
}, [schema, registerSchema, unregisterSchema]);
|
|
58186
58010
|
return /* @__PURE__ */ jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
58187
58011
|
}
|
|
58188
|
-
|
|
58189
|
-
|
|
58190
|
-
|
|
58012
|
+
createLogger("almadar:ui:theme");
|
|
58013
|
+
var BUILT_IN_THEMES = [
|
|
58014
|
+
{
|
|
58015
|
+
name: "wireframe",
|
|
58016
|
+
displayName: "Wireframe",
|
|
58017
|
+
hasLightMode: true,
|
|
58018
|
+
hasDarkMode: true
|
|
58019
|
+
},
|
|
58020
|
+
{
|
|
58021
|
+
name: "minimalist",
|
|
58022
|
+
displayName: "Minimalist",
|
|
58023
|
+
hasLightMode: true,
|
|
58024
|
+
hasDarkMode: true
|
|
58025
|
+
},
|
|
58026
|
+
{
|
|
58027
|
+
name: "almadar",
|
|
58028
|
+
displayName: "Almadar",
|
|
58029
|
+
hasLightMode: true,
|
|
58030
|
+
hasDarkMode: true
|
|
58031
|
+
},
|
|
58032
|
+
{
|
|
58033
|
+
name: "trait-wars",
|
|
58034
|
+
displayName: "Trait Wars",
|
|
58035
|
+
hasLightMode: false,
|
|
58036
|
+
hasDarkMode: true
|
|
58037
|
+
},
|
|
58038
|
+
// Extended themes
|
|
58039
|
+
{
|
|
58040
|
+
name: "ocean",
|
|
58041
|
+
displayName: "Ocean",
|
|
58042
|
+
hasLightMode: true,
|
|
58043
|
+
hasDarkMode: true
|
|
58044
|
+
},
|
|
58045
|
+
{
|
|
58046
|
+
name: "forest",
|
|
58047
|
+
displayName: "Forest",
|
|
58048
|
+
hasLightMode: true,
|
|
58049
|
+
hasDarkMode: true
|
|
58050
|
+
},
|
|
58051
|
+
{
|
|
58052
|
+
name: "sunset",
|
|
58053
|
+
displayName: "Sunset",
|
|
58054
|
+
hasLightMode: true,
|
|
58055
|
+
hasDarkMode: true
|
|
58056
|
+
},
|
|
58057
|
+
{
|
|
58058
|
+
name: "lavender",
|
|
58059
|
+
displayName: "Lavender",
|
|
58060
|
+
hasLightMode: true,
|
|
58061
|
+
hasDarkMode: true
|
|
58062
|
+
},
|
|
58063
|
+
{
|
|
58064
|
+
name: "rose",
|
|
58065
|
+
displayName: "Rose",
|
|
58066
|
+
hasLightMode: true,
|
|
58067
|
+
hasDarkMode: true
|
|
58068
|
+
},
|
|
58069
|
+
{
|
|
58070
|
+
name: "slate",
|
|
58071
|
+
displayName: "Slate",
|
|
58072
|
+
hasLightMode: true,
|
|
58073
|
+
hasDarkMode: true
|
|
58074
|
+
},
|
|
58075
|
+
{
|
|
58076
|
+
name: "ember",
|
|
58077
|
+
displayName: "Ember",
|
|
58078
|
+
hasLightMode: true,
|
|
58079
|
+
hasDarkMode: true
|
|
58080
|
+
},
|
|
58081
|
+
{
|
|
58082
|
+
name: "midnight",
|
|
58083
|
+
displayName: "Midnight",
|
|
58084
|
+
hasLightMode: true,
|
|
58085
|
+
hasDarkMode: true
|
|
58086
|
+
},
|
|
58087
|
+
{
|
|
58088
|
+
name: "sand",
|
|
58089
|
+
displayName: "Sand",
|
|
58090
|
+
hasLightMode: true,
|
|
58091
|
+
hasDarkMode: true
|
|
58092
|
+
},
|
|
58093
|
+
{
|
|
58094
|
+
name: "neon",
|
|
58095
|
+
displayName: "Neon",
|
|
58096
|
+
hasLightMode: true,
|
|
58097
|
+
hasDarkMode: true
|
|
58098
|
+
},
|
|
58099
|
+
{
|
|
58100
|
+
name: "arctic",
|
|
58101
|
+
displayName: "Arctic",
|
|
58102
|
+
hasLightMode: true,
|
|
58103
|
+
hasDarkMode: true
|
|
58104
|
+
},
|
|
58105
|
+
{
|
|
58106
|
+
name: "copper",
|
|
58107
|
+
displayName: "Copper",
|
|
58108
|
+
hasLightMode: true,
|
|
58109
|
+
hasDarkMode: true
|
|
58110
|
+
},
|
|
58111
|
+
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
58112
|
+
{
|
|
58113
|
+
name: "prism",
|
|
58114
|
+
displayName: "Prism",
|
|
58115
|
+
hasLightMode: true,
|
|
58116
|
+
hasDarkMode: true
|
|
58117
|
+
},
|
|
58118
|
+
{
|
|
58119
|
+
name: "gazette",
|
|
58120
|
+
displayName: "Gazette",
|
|
58121
|
+
hasLightMode: true,
|
|
58122
|
+
hasDarkMode: true
|
|
58123
|
+
},
|
|
58124
|
+
{
|
|
58125
|
+
name: "terminal",
|
|
58126
|
+
displayName: "Terminal",
|
|
58127
|
+
hasLightMode: true,
|
|
58128
|
+
hasDarkMode: true
|
|
58129
|
+
},
|
|
58130
|
+
{
|
|
58131
|
+
name: "atelier",
|
|
58132
|
+
displayName: "Atelier",
|
|
58133
|
+
hasLightMode: true,
|
|
58134
|
+
hasDarkMode: true
|
|
58135
|
+
},
|
|
58136
|
+
{
|
|
58137
|
+
name: "kiosk",
|
|
58138
|
+
displayName: "Kiosk",
|
|
58139
|
+
hasLightMode: true,
|
|
58140
|
+
hasDarkMode: true
|
|
58141
|
+
},
|
|
58142
|
+
{
|
|
58143
|
+
name: "linear-clean",
|
|
58144
|
+
displayName: "Linear Clean",
|
|
58145
|
+
hasLightMode: true,
|
|
58146
|
+
hasDarkMode: true
|
|
58147
|
+
},
|
|
58148
|
+
{
|
|
58149
|
+
name: "notion-editorial",
|
|
58150
|
+
displayName: "Notion Editorial",
|
|
58151
|
+
hasLightMode: true,
|
|
58152
|
+
hasDarkMode: true
|
|
58153
|
+
},
|
|
58154
|
+
{
|
|
58155
|
+
name: "bloomberg-dense",
|
|
58156
|
+
displayName: "Bloomberg Dense",
|
|
58157
|
+
hasLightMode: true,
|
|
58158
|
+
hasDarkMode: true
|
|
58159
|
+
}
|
|
58160
|
+
];
|
|
58161
|
+
var ThemeContext = createContext(void 0);
|
|
58162
|
+
function useTheme2() {
|
|
58163
|
+
const context = useContext(ThemeContext);
|
|
58164
|
+
if (context === void 0) {
|
|
58165
|
+
return {
|
|
58166
|
+
theme: "wireframe",
|
|
58167
|
+
mode: "light",
|
|
58168
|
+
resolvedMode: "light",
|
|
58169
|
+
setTheme: () => {
|
|
58170
|
+
},
|
|
58171
|
+
setMode: () => {
|
|
58172
|
+
},
|
|
58173
|
+
toggleMode: () => {
|
|
58174
|
+
},
|
|
58175
|
+
availableThemes: BUILT_IN_THEMES,
|
|
58176
|
+
appliedTheme: "wireframe-light"
|
|
58177
|
+
};
|
|
58178
|
+
}
|
|
58179
|
+
return context;
|
|
58180
|
+
}
|
|
58191
58181
|
|
|
58192
58182
|
// context/themeTokens.ts
|
|
58193
58183
|
function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
@@ -58406,7 +58396,7 @@ function resolveThemeForRuntime(theme) {
|
|
|
58406
58396
|
}
|
|
58407
58397
|
function OrbitalThemeProvider({ theme, children }) {
|
|
58408
58398
|
const resolved = resolveThemeForRuntime(theme);
|
|
58409
|
-
const { resolvedMode } =
|
|
58399
|
+
const { resolvedMode } = useTheme2();
|
|
58410
58400
|
if (!resolved) {
|
|
58411
58401
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
58412
58402
|
}
|
|
@@ -59203,8 +59193,8 @@ function CanvasDndProvider({
|
|
|
59203
59193
|
}) {
|
|
59204
59194
|
const eventBus = useEventBus();
|
|
59205
59195
|
const sensors = useAlmadarDndSensors(false);
|
|
59206
|
-
const [activePayload, setActivePayload] =
|
|
59207
|
-
const handleDragStart =
|
|
59196
|
+
const [activePayload, setActivePayload] = React90__default.useState(null);
|
|
59197
|
+
const handleDragStart = React90__default.useCallback((e) => {
|
|
59208
59198
|
const data = e.active.data.current;
|
|
59209
59199
|
const payload = data?.payload;
|
|
59210
59200
|
if (payload) {
|
|
@@ -59215,7 +59205,7 @@ function CanvasDndProvider({
|
|
|
59215
59205
|
log13.warn("dragStart:missing-payload", { id: e.active.id });
|
|
59216
59206
|
}
|
|
59217
59207
|
}, [eventBus]);
|
|
59218
|
-
const handleDragEnd =
|
|
59208
|
+
const handleDragEnd = React90__default.useCallback((e) => {
|
|
59219
59209
|
setActivePayload(null);
|
|
59220
59210
|
const activeData = e.active.data.current;
|
|
59221
59211
|
const payload = activeData?.payload;
|
|
@@ -59244,7 +59234,7 @@ function CanvasDndProvider({
|
|
|
59244
59234
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59245
59235
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59246
59236
|
}, [eventBus, onDrop]);
|
|
59247
|
-
const handleDragCancel =
|
|
59237
|
+
const handleDragCancel = React90__default.useCallback(() => {
|
|
59248
59238
|
setActivePayload(null);
|
|
59249
59239
|
log13.info("dragCancel");
|
|
59250
59240
|
}, []);
|
|
@@ -59998,7 +59988,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
59998
59988
|
}
|
|
59999
59989
|
);
|
|
60000
59990
|
};
|
|
60001
|
-
var OrbPreviewNode =
|
|
59991
|
+
var OrbPreviewNode = React90__default.memo(OrbPreviewNodeInner);
|
|
60002
59992
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
60003
59993
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
60004
59994
|
type: typeof OrbPreviewNode,
|
|
@@ -60103,7 +60093,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
60103
60093
|
) })
|
|
60104
60094
|
] });
|
|
60105
60095
|
};
|
|
60106
|
-
var EventFlowEdge =
|
|
60096
|
+
var EventFlowEdge = React90__default.memo(EventFlowEdgeInner);
|
|
60107
60097
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
60108
60098
|
|
|
60109
60099
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -60250,7 +60240,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
60250
60240
|
}
|
|
60251
60241
|
);
|
|
60252
60242
|
};
|
|
60253
|
-
var BehaviorComposeNode =
|
|
60243
|
+
var BehaviorComposeNode = React90__default.memo(BehaviorComposeNodeInner);
|
|
60254
60244
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
60255
60245
|
|
|
60256
60246
|
// components/avl/molecules/avl-behavior-compose-converter.ts
|
|
@@ -61262,7 +61252,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
61262
61252
|
}
|
|
61263
61253
|
);
|
|
61264
61254
|
};
|
|
61265
|
-
var TraitCardNode =
|
|
61255
|
+
var TraitCardNode = React90__default.memo(TraitCardNodeInner);
|
|
61266
61256
|
TraitCardNode.displayName = "TraitCardNode";
|
|
61267
61257
|
|
|
61268
61258
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -61335,7 +61325,7 @@ function FlowCanvasInner({
|
|
|
61335
61325
|
initialOrbital
|
|
61336
61326
|
);
|
|
61337
61327
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
61338
|
-
const screenSizeUserOverrideRef =
|
|
61328
|
+
const screenSizeUserOverrideRef = React90__default.useRef(false);
|
|
61339
61329
|
const [screenSize, setScreenSize] = useState(
|
|
61340
61330
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
61341
61331
|
);
|
|
@@ -61719,7 +61709,7 @@ var ZoomBreadcrumb = ({
|
|
|
61719
61709
|
if (eventName && band === "detail") {
|
|
61720
61710
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
61721
61711
|
}
|
|
61722
|
-
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-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
61712
|
+
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-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
61723
61713
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
61724
61714
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
61725
61715
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -62060,7 +62050,7 @@ var EventWireOverlay = ({
|
|
|
62060
62050
|
containerW,
|
|
62061
62051
|
containerH
|
|
62062
62052
|
}) => {
|
|
62063
|
-
const ids =
|
|
62053
|
+
const ids = React90__default.useMemo(() => {
|
|
62064
62054
|
avlOczWireId += 1;
|
|
62065
62055
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
62066
62056
|
}, []);
|
|
@@ -62427,7 +62417,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
62427
62417
|
borderRadius: 6,
|
|
62428
62418
|
border: `1px solid ${color}`
|
|
62429
62419
|
},
|
|
62430
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
62420
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
62431
62421
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
62432
62422
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
62433
62423
|
Box,
|