@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/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React81 from 'react';
|
|
2
|
+
import React81__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -9,8 +9,8 @@ import * as LucideIcons2 from 'lucide-react';
|
|
|
9
9
|
import { Loader2, X, Lightbulb, CheckCircle, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Check, Copy, 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';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import { useTranslate, useEventBus as useEventBus$1 } from '@almadar/ui/hooks';
|
|
12
|
+
import { useUISlots, UISlotProvider, useTheme } from '@almadar/ui/context';
|
|
12
13
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
13
|
-
import { useUISlots, UISlotProvider } from '@almadar/ui/context';
|
|
14
14
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
15
15
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
16
16
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
@@ -396,7 +396,7 @@ var init_Box = __esm({
|
|
|
396
396
|
fixed: "fixed",
|
|
397
397
|
sticky: "sticky"
|
|
398
398
|
};
|
|
399
|
-
Box =
|
|
399
|
+
Box = React81__default.forwardRef(
|
|
400
400
|
({
|
|
401
401
|
padding,
|
|
402
402
|
paddingX,
|
|
@@ -446,7 +446,7 @@ var init_Box = __esm({
|
|
|
446
446
|
onMouseLeave?.(e);
|
|
447
447
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
448
448
|
const isClickable = action || onClick;
|
|
449
|
-
return
|
|
449
|
+
return React81__default.createElement(
|
|
450
450
|
Component2,
|
|
451
451
|
{
|
|
452
452
|
ref,
|
|
@@ -541,7 +541,7 @@ function loadLib(key, importer) {
|
|
|
541
541
|
return p2;
|
|
542
542
|
}
|
|
543
543
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
544
|
-
const Lazy =
|
|
544
|
+
const Lazy = React81__default.lazy(async () => {
|
|
545
545
|
const lib = await loadLib(libKey, importer);
|
|
546
546
|
const Comp = pick(lib);
|
|
547
547
|
if (!Comp) {
|
|
@@ -551,7 +551,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
551
551
|
return { default: Comp };
|
|
552
552
|
});
|
|
553
553
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
554
|
-
|
|
554
|
+
React81__default.Suspense,
|
|
555
555
|
{
|
|
556
556
|
fallback: /* @__PURE__ */ jsx(
|
|
557
557
|
"span",
|
|
@@ -1277,7 +1277,7 @@ var init_Icon = __esm({
|
|
|
1277
1277
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1278
1278
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1279
1279
|
const family = useIconFamily();
|
|
1280
|
-
const RenderedComponent =
|
|
1280
|
+
const RenderedComponent = React81__default.useMemo(() => {
|
|
1281
1281
|
if (directIcon) return null;
|
|
1282
1282
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1283
1283
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1336,7 +1336,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1336
1336
|
const IconComp = value;
|
|
1337
1337
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1338
1338
|
}
|
|
1339
|
-
if (
|
|
1339
|
+
if (React81__default.isValidElement(value)) {
|
|
1340
1340
|
return value;
|
|
1341
1341
|
}
|
|
1342
1342
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1412,7 +1412,7 @@ var init_Button = __esm({
|
|
|
1412
1412
|
md: "h-icon-default w-icon-default",
|
|
1413
1413
|
lg: "h-icon-default w-icon-default"
|
|
1414
1414
|
};
|
|
1415
|
-
Button =
|
|
1415
|
+
Button = React81__default.forwardRef(
|
|
1416
1416
|
({
|
|
1417
1417
|
className,
|
|
1418
1418
|
variant = "primary",
|
|
@@ -1477,7 +1477,7 @@ var Dialog;
|
|
|
1477
1477
|
var init_Dialog = __esm({
|
|
1478
1478
|
"components/core/atoms/Dialog.tsx"() {
|
|
1479
1479
|
init_cn();
|
|
1480
|
-
Dialog =
|
|
1480
|
+
Dialog = React81__default.forwardRef(
|
|
1481
1481
|
({
|
|
1482
1482
|
role = "dialog",
|
|
1483
1483
|
"aria-modal": ariaModal = true,
|
|
@@ -2091,7 +2091,7 @@ var init_Badge = __esm({
|
|
|
2091
2091
|
md: "px-2.5 py-1 text-sm",
|
|
2092
2092
|
lg: "px-3 py-1.5 text-base"
|
|
2093
2093
|
};
|
|
2094
|
-
Badge =
|
|
2094
|
+
Badge = React81__default.forwardRef(
|
|
2095
2095
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2096
2096
|
const iconSizes3 = {
|
|
2097
2097
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2427,7 +2427,7 @@ var init_SvgFlow = __esm({
|
|
|
2427
2427
|
width = 100,
|
|
2428
2428
|
height = 100
|
|
2429
2429
|
}) => {
|
|
2430
|
-
const markerId =
|
|
2430
|
+
const markerId = React81__default.useMemo(() => {
|
|
2431
2431
|
flowIdCounter += 1;
|
|
2432
2432
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2433
2433
|
}, []);
|
|
@@ -3020,7 +3020,7 @@ var init_SvgRing = __esm({
|
|
|
3020
3020
|
width = 100,
|
|
3021
3021
|
height = 100
|
|
3022
3022
|
}) => {
|
|
3023
|
-
const gradientId =
|
|
3023
|
+
const gradientId = React81__default.useMemo(() => {
|
|
3024
3024
|
ringIdCounter += 1;
|
|
3025
3025
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3026
3026
|
}, []);
|
|
@@ -3201,7 +3201,7 @@ var init_Input = __esm({
|
|
|
3201
3201
|
init_cn();
|
|
3202
3202
|
init_Icon();
|
|
3203
3203
|
init_useEventBus();
|
|
3204
|
-
Input =
|
|
3204
|
+
Input = React81__default.forwardRef(
|
|
3205
3205
|
({
|
|
3206
3206
|
className,
|
|
3207
3207
|
inputType,
|
|
@@ -3361,7 +3361,7 @@ var Label;
|
|
|
3361
3361
|
var init_Label = __esm({
|
|
3362
3362
|
"components/core/atoms/Label.tsx"() {
|
|
3363
3363
|
init_cn();
|
|
3364
|
-
Label =
|
|
3364
|
+
Label = React81__default.forwardRef(
|
|
3365
3365
|
({ className, required, children, ...props }, ref) => {
|
|
3366
3366
|
return /* @__PURE__ */ jsxs(
|
|
3367
3367
|
"label",
|
|
@@ -3388,7 +3388,7 @@ var init_Textarea = __esm({
|
|
|
3388
3388
|
"components/core/atoms/Textarea.tsx"() {
|
|
3389
3389
|
init_cn();
|
|
3390
3390
|
init_useEventBus();
|
|
3391
|
-
Textarea =
|
|
3391
|
+
Textarea = React81__default.forwardRef(
|
|
3392
3392
|
({ className, error, onChange, ...props }, ref) => {
|
|
3393
3393
|
const eventBus = useEventBus();
|
|
3394
3394
|
const handleChange = (e) => {
|
|
@@ -3627,7 +3627,7 @@ var init_Select = __esm({
|
|
|
3627
3627
|
init_cn();
|
|
3628
3628
|
init_Icon();
|
|
3629
3629
|
init_useEventBus();
|
|
3630
|
-
Select =
|
|
3630
|
+
Select = React81__default.forwardRef(
|
|
3631
3631
|
(props, _ref) => {
|
|
3632
3632
|
const { multiple, searchable, clearable } = props;
|
|
3633
3633
|
if (multiple || searchable || clearable) {
|
|
@@ -3644,7 +3644,7 @@ var init_Checkbox = __esm({
|
|
|
3644
3644
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3645
3645
|
init_cn();
|
|
3646
3646
|
init_useEventBus();
|
|
3647
|
-
Checkbox =
|
|
3647
|
+
Checkbox = React81__default.forwardRef(
|
|
3648
3648
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3649
3649
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3650
3650
|
const eventBus = useEventBus();
|
|
@@ -3698,7 +3698,7 @@ var init_Spinner = __esm({
|
|
|
3698
3698
|
md: "h-6 w-6",
|
|
3699
3699
|
lg: "h-8 w-8"
|
|
3700
3700
|
};
|
|
3701
|
-
Spinner =
|
|
3701
|
+
Spinner = React81__default.forwardRef(
|
|
3702
3702
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3703
3703
|
if (overlay) {
|
|
3704
3704
|
return /* @__PURE__ */ jsx(
|
|
@@ -3788,7 +3788,7 @@ var init_Card = __esm({
|
|
|
3788
3788
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3789
3789
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3790
3790
|
};
|
|
3791
|
-
Card =
|
|
3791
|
+
Card = React81__default.forwardRef(
|
|
3792
3792
|
({
|
|
3793
3793
|
className,
|
|
3794
3794
|
variant = "bordered",
|
|
@@ -3836,9 +3836,9 @@ var init_Card = __esm({
|
|
|
3836
3836
|
}
|
|
3837
3837
|
);
|
|
3838
3838
|
Card.displayName = "Card";
|
|
3839
|
-
CardHeader =
|
|
3839
|
+
CardHeader = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3840
3840
|
CardHeader.displayName = "CardHeader";
|
|
3841
|
-
CardTitle =
|
|
3841
|
+
CardTitle = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3842
3842
|
"h3",
|
|
3843
3843
|
{
|
|
3844
3844
|
ref,
|
|
@@ -3851,11 +3851,11 @@ var init_Card = __esm({
|
|
|
3851
3851
|
}
|
|
3852
3852
|
));
|
|
3853
3853
|
CardTitle.displayName = "CardTitle";
|
|
3854
|
-
CardContent =
|
|
3854
|
+
CardContent = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3855
3855
|
CardContent.displayName = "CardContent";
|
|
3856
3856
|
CardBody = CardContent;
|
|
3857
3857
|
CardBody.displayName = "CardBody";
|
|
3858
|
-
CardFooter =
|
|
3858
|
+
CardFooter = React81__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3859
3859
|
"div",
|
|
3860
3860
|
{
|
|
3861
3861
|
ref,
|
|
@@ -3910,7 +3910,7 @@ var init_FilterPill = __esm({
|
|
|
3910
3910
|
md: "w-3.5 h-3.5",
|
|
3911
3911
|
lg: "w-4 h-4"
|
|
3912
3912
|
};
|
|
3913
|
-
FilterPill =
|
|
3913
|
+
FilterPill = React81__default.forwardRef(
|
|
3914
3914
|
({
|
|
3915
3915
|
className,
|
|
3916
3916
|
variant = "default",
|
|
@@ -4039,8 +4039,8 @@ var init_Avatar = __esm({
|
|
|
4039
4039
|
actionPayload
|
|
4040
4040
|
}) => {
|
|
4041
4041
|
const eventBus = useEventBus();
|
|
4042
|
-
const [imgFailed, setImgFailed] =
|
|
4043
|
-
|
|
4042
|
+
const [imgFailed, setImgFailed] = React81__default.useState(false);
|
|
4043
|
+
React81__default.useEffect(() => {
|
|
4044
4044
|
setImgFailed(false);
|
|
4045
4045
|
}, [src]);
|
|
4046
4046
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4425,7 +4425,7 @@ var init_Radio = __esm({
|
|
|
4425
4425
|
md: "w-2.5 h-2.5",
|
|
4426
4426
|
lg: "w-3 h-3"
|
|
4427
4427
|
};
|
|
4428
|
-
Radio =
|
|
4428
|
+
Radio = React81__default.forwardRef(
|
|
4429
4429
|
({
|
|
4430
4430
|
label,
|
|
4431
4431
|
helperText,
|
|
@@ -4442,12 +4442,12 @@ var init_Radio = __esm({
|
|
|
4442
4442
|
onChange,
|
|
4443
4443
|
...props
|
|
4444
4444
|
}, ref) => {
|
|
4445
|
-
const reactId =
|
|
4445
|
+
const reactId = React81__default.useId();
|
|
4446
4446
|
const baseId = id || `radio-${reactId}`;
|
|
4447
4447
|
const hasError = !!error;
|
|
4448
4448
|
const eventBus = useEventBus();
|
|
4449
|
-
const [selected, setSelected] =
|
|
4450
|
-
|
|
4449
|
+
const [selected, setSelected] = React81__default.useState(value);
|
|
4450
|
+
React81__default.useEffect(() => {
|
|
4451
4451
|
if (value !== void 0) setSelected(value);
|
|
4452
4452
|
}, [value]);
|
|
4453
4453
|
const pick = (next, e) => {
|
|
@@ -4629,7 +4629,7 @@ var init_Switch = __esm({
|
|
|
4629
4629
|
"components/core/atoms/Switch.tsx"() {
|
|
4630
4630
|
"use client";
|
|
4631
4631
|
init_cn();
|
|
4632
|
-
Switch =
|
|
4632
|
+
Switch = React81.forwardRef(
|
|
4633
4633
|
({
|
|
4634
4634
|
checked,
|
|
4635
4635
|
defaultChecked = false,
|
|
@@ -4640,10 +4640,10 @@ var init_Switch = __esm({
|
|
|
4640
4640
|
name,
|
|
4641
4641
|
className
|
|
4642
4642
|
}, ref) => {
|
|
4643
|
-
const [isChecked, setIsChecked] =
|
|
4643
|
+
const [isChecked, setIsChecked] = React81.useState(
|
|
4644
4644
|
checked !== void 0 ? checked : defaultChecked
|
|
4645
4645
|
);
|
|
4646
|
-
|
|
4646
|
+
React81.useEffect(() => {
|
|
4647
4647
|
if (checked !== void 0) {
|
|
4648
4648
|
setIsChecked(checked);
|
|
4649
4649
|
}
|
|
@@ -4898,188 +4898,12 @@ var init_TextHighlight = __esm({
|
|
|
4898
4898
|
TextHighlight.displayName = "TextHighlight";
|
|
4899
4899
|
}
|
|
4900
4900
|
});
|
|
4901
|
-
function useTheme() {
|
|
4902
|
-
const context = useContext(ThemeContext);
|
|
4903
|
-
if (context === void 0) {
|
|
4904
|
-
return {
|
|
4905
|
-
theme: "wireframe",
|
|
4906
|
-
mode: "light",
|
|
4907
|
-
resolvedMode: "light",
|
|
4908
|
-
setTheme: () => {
|
|
4909
|
-
},
|
|
4910
|
-
setMode: () => {
|
|
4911
|
-
},
|
|
4912
|
-
toggleMode: () => {
|
|
4913
|
-
},
|
|
4914
|
-
availableThemes: BUILT_IN_THEMES,
|
|
4915
|
-
appliedTheme: "wireframe-light"
|
|
4916
|
-
};
|
|
4917
|
-
}
|
|
4918
|
-
return context;
|
|
4919
|
-
}
|
|
4920
|
-
var BUILT_IN_THEMES, ThemeContext;
|
|
4921
|
-
var init_ThemeContext = __esm({
|
|
4922
|
-
"context/ThemeContext.tsx"() {
|
|
4923
|
-
"use client";
|
|
4924
|
-
createLogger("almadar:ui:theme");
|
|
4925
|
-
BUILT_IN_THEMES = [
|
|
4926
|
-
{
|
|
4927
|
-
name: "wireframe",
|
|
4928
|
-
displayName: "Wireframe",
|
|
4929
|
-
hasLightMode: true,
|
|
4930
|
-
hasDarkMode: true
|
|
4931
|
-
},
|
|
4932
|
-
{
|
|
4933
|
-
name: "minimalist",
|
|
4934
|
-
displayName: "Minimalist",
|
|
4935
|
-
hasLightMode: true,
|
|
4936
|
-
hasDarkMode: true
|
|
4937
|
-
},
|
|
4938
|
-
{
|
|
4939
|
-
name: "almadar",
|
|
4940
|
-
displayName: "Almadar",
|
|
4941
|
-
hasLightMode: true,
|
|
4942
|
-
hasDarkMode: true
|
|
4943
|
-
},
|
|
4944
|
-
{
|
|
4945
|
-
name: "trait-wars",
|
|
4946
|
-
displayName: "Trait Wars",
|
|
4947
|
-
hasLightMode: false,
|
|
4948
|
-
hasDarkMode: true
|
|
4949
|
-
},
|
|
4950
|
-
// Extended themes
|
|
4951
|
-
{
|
|
4952
|
-
name: "ocean",
|
|
4953
|
-
displayName: "Ocean",
|
|
4954
|
-
hasLightMode: true,
|
|
4955
|
-
hasDarkMode: true
|
|
4956
|
-
},
|
|
4957
|
-
{
|
|
4958
|
-
name: "forest",
|
|
4959
|
-
displayName: "Forest",
|
|
4960
|
-
hasLightMode: true,
|
|
4961
|
-
hasDarkMode: true
|
|
4962
|
-
},
|
|
4963
|
-
{
|
|
4964
|
-
name: "sunset",
|
|
4965
|
-
displayName: "Sunset",
|
|
4966
|
-
hasLightMode: true,
|
|
4967
|
-
hasDarkMode: true
|
|
4968
|
-
},
|
|
4969
|
-
{
|
|
4970
|
-
name: "lavender",
|
|
4971
|
-
displayName: "Lavender",
|
|
4972
|
-
hasLightMode: true,
|
|
4973
|
-
hasDarkMode: true
|
|
4974
|
-
},
|
|
4975
|
-
{
|
|
4976
|
-
name: "rose",
|
|
4977
|
-
displayName: "Rose",
|
|
4978
|
-
hasLightMode: true,
|
|
4979
|
-
hasDarkMode: true
|
|
4980
|
-
},
|
|
4981
|
-
{
|
|
4982
|
-
name: "slate",
|
|
4983
|
-
displayName: "Slate",
|
|
4984
|
-
hasLightMode: true,
|
|
4985
|
-
hasDarkMode: true
|
|
4986
|
-
},
|
|
4987
|
-
{
|
|
4988
|
-
name: "ember",
|
|
4989
|
-
displayName: "Ember",
|
|
4990
|
-
hasLightMode: true,
|
|
4991
|
-
hasDarkMode: true
|
|
4992
|
-
},
|
|
4993
|
-
{
|
|
4994
|
-
name: "midnight",
|
|
4995
|
-
displayName: "Midnight",
|
|
4996
|
-
hasLightMode: true,
|
|
4997
|
-
hasDarkMode: true
|
|
4998
|
-
},
|
|
4999
|
-
{
|
|
5000
|
-
name: "sand",
|
|
5001
|
-
displayName: "Sand",
|
|
5002
|
-
hasLightMode: true,
|
|
5003
|
-
hasDarkMode: true
|
|
5004
|
-
},
|
|
5005
|
-
{
|
|
5006
|
-
name: "neon",
|
|
5007
|
-
displayName: "Neon",
|
|
5008
|
-
hasLightMode: true,
|
|
5009
|
-
hasDarkMode: true
|
|
5010
|
-
},
|
|
5011
|
-
{
|
|
5012
|
-
name: "arctic",
|
|
5013
|
-
displayName: "Arctic",
|
|
5014
|
-
hasLightMode: true,
|
|
5015
|
-
hasDarkMode: true
|
|
5016
|
-
},
|
|
5017
|
-
{
|
|
5018
|
-
name: "copper",
|
|
5019
|
-
displayName: "Copper",
|
|
5020
|
-
hasLightMode: true,
|
|
5021
|
-
hasDarkMode: true
|
|
5022
|
-
},
|
|
5023
|
-
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
5024
|
-
{
|
|
5025
|
-
name: "prism",
|
|
5026
|
-
displayName: "Prism",
|
|
5027
|
-
hasLightMode: true,
|
|
5028
|
-
hasDarkMode: true
|
|
5029
|
-
},
|
|
5030
|
-
{
|
|
5031
|
-
name: "gazette",
|
|
5032
|
-
displayName: "Gazette",
|
|
5033
|
-
hasLightMode: true,
|
|
5034
|
-
hasDarkMode: true
|
|
5035
|
-
},
|
|
5036
|
-
{
|
|
5037
|
-
name: "terminal",
|
|
5038
|
-
displayName: "Terminal",
|
|
5039
|
-
hasLightMode: true,
|
|
5040
|
-
hasDarkMode: true
|
|
5041
|
-
},
|
|
5042
|
-
{
|
|
5043
|
-
name: "atelier",
|
|
5044
|
-
displayName: "Atelier",
|
|
5045
|
-
hasLightMode: true,
|
|
5046
|
-
hasDarkMode: true
|
|
5047
|
-
},
|
|
5048
|
-
{
|
|
5049
|
-
name: "kiosk",
|
|
5050
|
-
displayName: "Kiosk",
|
|
5051
|
-
hasLightMode: true,
|
|
5052
|
-
hasDarkMode: true
|
|
5053
|
-
},
|
|
5054
|
-
{
|
|
5055
|
-
name: "linear-clean",
|
|
5056
|
-
displayName: "Linear Clean",
|
|
5057
|
-
hasLightMode: true,
|
|
5058
|
-
hasDarkMode: true
|
|
5059
|
-
},
|
|
5060
|
-
{
|
|
5061
|
-
name: "notion-editorial",
|
|
5062
|
-
displayName: "Notion Editorial",
|
|
5063
|
-
hasLightMode: true,
|
|
5064
|
-
hasDarkMode: true
|
|
5065
|
-
},
|
|
5066
|
-
{
|
|
5067
|
-
name: "bloomberg-dense",
|
|
5068
|
-
displayName: "Bloomberg Dense",
|
|
5069
|
-
hasLightMode: true,
|
|
5070
|
-
hasDarkMode: true
|
|
5071
|
-
}
|
|
5072
|
-
];
|
|
5073
|
-
ThemeContext = createContext(void 0);
|
|
5074
|
-
}
|
|
5075
|
-
});
|
|
5076
4901
|
var sizeClasses5, iconSizes2, ThemeToggle;
|
|
5077
4902
|
var init_ThemeToggle = __esm({
|
|
5078
4903
|
"components/core/atoms/ThemeToggle.tsx"() {
|
|
5079
4904
|
"use client";
|
|
5080
4905
|
init_Icon();
|
|
5081
4906
|
init_cn();
|
|
5082
|
-
init_ThemeContext();
|
|
5083
4907
|
sizeClasses5 = {
|
|
5084
4908
|
sm: "p-1.5",
|
|
5085
4909
|
md: "p-2",
|
|
@@ -5174,7 +4998,7 @@ var Aside;
|
|
|
5174
4998
|
var init_Aside = __esm({
|
|
5175
4999
|
"components/core/atoms/Aside.tsx"() {
|
|
5176
5000
|
init_cn();
|
|
5177
|
-
Aside =
|
|
5001
|
+
Aside = React81__default.forwardRef(
|
|
5178
5002
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5179
5003
|
);
|
|
5180
5004
|
Aside.displayName = "Aside";
|
|
@@ -5252,8 +5076,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5252
5076
|
className
|
|
5253
5077
|
}) => {
|
|
5254
5078
|
const { t } = useTranslate();
|
|
5255
|
-
const [isVisible, setIsVisible] =
|
|
5256
|
-
const timeoutRef =
|
|
5079
|
+
const [isVisible, setIsVisible] = React81__default.useState(false);
|
|
5080
|
+
const timeoutRef = React81__default.useRef(null);
|
|
5257
5081
|
const handleMouseEnter = () => {
|
|
5258
5082
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5259
5083
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5262,7 +5086,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5262
5086
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5263
5087
|
setIsVisible(false);
|
|
5264
5088
|
};
|
|
5265
|
-
|
|
5089
|
+
React81__default.useEffect(() => {
|
|
5266
5090
|
return () => {
|
|
5267
5091
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5268
5092
|
};
|
|
@@ -5472,7 +5296,7 @@ var init_StatusDot = __esm({
|
|
|
5472
5296
|
md: "w-2.5 h-2.5",
|
|
5473
5297
|
lg: "w-3 h-3"
|
|
5474
5298
|
};
|
|
5475
|
-
StatusDot =
|
|
5299
|
+
StatusDot = React81__default.forwardRef(
|
|
5476
5300
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5477
5301
|
return /* @__PURE__ */ jsx(
|
|
5478
5302
|
"span",
|
|
@@ -5526,7 +5350,7 @@ var init_TrendIndicator = __esm({
|
|
|
5526
5350
|
down: "trending-down",
|
|
5527
5351
|
flat: "arrow-right"
|
|
5528
5352
|
};
|
|
5529
|
-
TrendIndicator =
|
|
5353
|
+
TrendIndicator = React81__default.forwardRef(
|
|
5530
5354
|
({
|
|
5531
5355
|
className,
|
|
5532
5356
|
value,
|
|
@@ -5593,7 +5417,7 @@ var init_RangeSlider = __esm({
|
|
|
5593
5417
|
md: "w-4 h-4",
|
|
5594
5418
|
lg: "w-5 h-5"
|
|
5595
5419
|
};
|
|
5596
|
-
RangeSlider =
|
|
5420
|
+
RangeSlider = React81__default.forwardRef(
|
|
5597
5421
|
({
|
|
5598
5422
|
className,
|
|
5599
5423
|
min = 0,
|
|
@@ -6101,7 +5925,7 @@ var init_ContentSection = __esm({
|
|
|
6101
5925
|
md: "py-16",
|
|
6102
5926
|
lg: "py-24"
|
|
6103
5927
|
};
|
|
6104
|
-
ContentSection =
|
|
5928
|
+
ContentSection = React81__default.forwardRef(
|
|
6105
5929
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6106
5930
|
return /* @__PURE__ */ jsx(
|
|
6107
5931
|
Box,
|
|
@@ -6635,7 +6459,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6635
6459
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6636
6460
|
"none": {}
|
|
6637
6461
|
};
|
|
6638
|
-
AnimatedReveal =
|
|
6462
|
+
AnimatedReveal = React81__default.forwardRef(
|
|
6639
6463
|
({
|
|
6640
6464
|
trigger = "scroll",
|
|
6641
6465
|
animation = "fade-up",
|
|
@@ -6795,7 +6619,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6795
6619
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6796
6620
|
"use client";
|
|
6797
6621
|
init_cn();
|
|
6798
|
-
AnimatedGraphic =
|
|
6622
|
+
AnimatedGraphic = React81__default.forwardRef(
|
|
6799
6623
|
({
|
|
6800
6624
|
src,
|
|
6801
6625
|
svgContent,
|
|
@@ -6818,7 +6642,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6818
6642
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6819
6643
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6820
6644
|
const prevAnimateRef = useRef(animate);
|
|
6821
|
-
const setRef =
|
|
6645
|
+
const setRef = React81__default.useCallback(
|
|
6822
6646
|
(node) => {
|
|
6823
6647
|
containerRef.current = node;
|
|
6824
6648
|
if (typeof ref === "function") ref(node);
|
|
@@ -7044,9 +6868,9 @@ function ScoreDisplay({
|
|
|
7044
6868
|
...rest
|
|
7045
6869
|
}) {
|
|
7046
6870
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
7047
|
-
const [displayValue, setDisplayValue] =
|
|
7048
|
-
const [isAnimating, setIsAnimating] =
|
|
7049
|
-
|
|
6871
|
+
const [displayValue, setDisplayValue] = React81.useState(resolvedValue);
|
|
6872
|
+
const [isAnimating, setIsAnimating] = React81.useState(false);
|
|
6873
|
+
React81.useEffect(() => {
|
|
7050
6874
|
if (!animated || displayValue === resolvedValue) {
|
|
7051
6875
|
setDisplayValue(resolvedValue);
|
|
7052
6876
|
return;
|
|
@@ -7129,9 +6953,9 @@ function ControlButton({
|
|
|
7129
6953
|
className
|
|
7130
6954
|
}) {
|
|
7131
6955
|
const eventBus = useEventBus();
|
|
7132
|
-
const [isPressed, setIsPressed] =
|
|
6956
|
+
const [isPressed, setIsPressed] = React81.useState(false);
|
|
7133
6957
|
const actualPressed = pressed ?? isPressed;
|
|
7134
|
-
const handlePointerDown =
|
|
6958
|
+
const handlePointerDown = React81.useCallback(
|
|
7135
6959
|
(e) => {
|
|
7136
6960
|
e.preventDefault();
|
|
7137
6961
|
if (disabled) return;
|
|
@@ -7141,7 +6965,7 @@ function ControlButton({
|
|
|
7141
6965
|
},
|
|
7142
6966
|
[disabled, pressEvent, eventBus, onPress]
|
|
7143
6967
|
);
|
|
7144
|
-
const handlePointerUp =
|
|
6968
|
+
const handlePointerUp = React81.useCallback(
|
|
7145
6969
|
(e) => {
|
|
7146
6970
|
e.preventDefault();
|
|
7147
6971
|
if (disabled) return;
|
|
@@ -7151,7 +6975,7 @@ function ControlButton({
|
|
|
7151
6975
|
},
|
|
7152
6976
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7153
6977
|
);
|
|
7154
|
-
const handlePointerLeave =
|
|
6978
|
+
const handlePointerLeave = React81.useCallback(
|
|
7155
6979
|
(e) => {
|
|
7156
6980
|
if (isPressed) {
|
|
7157
6981
|
setIsPressed(false);
|
|
@@ -7729,8 +7553,8 @@ function XPBar({
|
|
|
7729
7553
|
}) {
|
|
7730
7554
|
const sizes = sizeMap9[size];
|
|
7731
7555
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7732
|
-
const [fillWidth, setFillWidth] =
|
|
7733
|
-
|
|
7556
|
+
const [fillWidth, setFillWidth] = React81.useState(animated ? 0 : percentage);
|
|
7557
|
+
React81.useEffect(() => {
|
|
7734
7558
|
if (!animated) {
|
|
7735
7559
|
setFillWidth(percentage);
|
|
7736
7560
|
return;
|
|
@@ -8218,9 +8042,9 @@ function MiniMap({
|
|
|
8218
8042
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8219
8043
|
className
|
|
8220
8044
|
}) {
|
|
8221
|
-
const canvasRef =
|
|
8222
|
-
const frameRef =
|
|
8223
|
-
|
|
8045
|
+
const canvasRef = React81.useRef(null);
|
|
8046
|
+
const frameRef = React81.useRef(0);
|
|
8047
|
+
React81.useEffect(() => {
|
|
8224
8048
|
const canvas = canvasRef.current;
|
|
8225
8049
|
if (!canvas) return;
|
|
8226
8050
|
const ctx = canvas.getContext("2d");
|
|
@@ -8409,7 +8233,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8409
8233
|
}
|
|
8410
8234
|
);
|
|
8411
8235
|
};
|
|
8412
|
-
ErrorBoundary = class extends
|
|
8236
|
+
ErrorBoundary = class extends React81__default.Component {
|
|
8413
8237
|
constructor(props) {
|
|
8414
8238
|
super(props);
|
|
8415
8239
|
__publicField(this, "reset", () => {
|
|
@@ -9444,8 +9268,8 @@ function ActionButtons({
|
|
|
9444
9268
|
disabled
|
|
9445
9269
|
}) {
|
|
9446
9270
|
const eventBus = useEventBus();
|
|
9447
|
-
const [activeButtons, setActiveButtons] =
|
|
9448
|
-
const handlePress =
|
|
9271
|
+
const [activeButtons, setActiveButtons] = React81.useState(/* @__PURE__ */ new Set());
|
|
9272
|
+
const handlePress = React81.useCallback(
|
|
9449
9273
|
(id) => {
|
|
9450
9274
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9451
9275
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9453,7 +9277,7 @@ function ActionButtons({
|
|
|
9453
9277
|
},
|
|
9454
9278
|
[actionEvent, eventBus, onAction]
|
|
9455
9279
|
);
|
|
9456
|
-
const handleRelease =
|
|
9280
|
+
const handleRelease = React81.useCallback(
|
|
9457
9281
|
(id) => {
|
|
9458
9282
|
setActiveButtons((prev) => {
|
|
9459
9283
|
const next = new Set(prev);
|
|
@@ -10365,7 +10189,7 @@ function recordTransition(trace) {
|
|
|
10365
10189
|
...trace,
|
|
10366
10190
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
10367
10191
|
};
|
|
10368
|
-
|
|
10192
|
+
log4.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
|
|
10369
10193
|
getState().transitions.push(entry);
|
|
10370
10194
|
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
10371
10195
|
getState().transitions.shift();
|
|
@@ -10464,7 +10288,7 @@ function getTraitSnapshots() {
|
|
|
10464
10288
|
try {
|
|
10465
10289
|
snapshots.push(getter());
|
|
10466
10290
|
} catch (err) {
|
|
10467
|
-
|
|
10291
|
+
log4.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
|
|
10468
10292
|
}
|
|
10469
10293
|
}
|
|
10470
10294
|
return snapshots;
|
|
@@ -10563,10 +10387,10 @@ function updateAssetStatus(url, status) {
|
|
|
10563
10387
|
window.__orbitalVerification.assetStatus[url] = status;
|
|
10564
10388
|
}
|
|
10565
10389
|
}
|
|
10566
|
-
var
|
|
10390
|
+
var log4, MAX_TRANSITIONS;
|
|
10567
10391
|
var init_verificationRegistry = __esm({
|
|
10568
10392
|
"lib/verificationRegistry.ts"() {
|
|
10569
|
-
|
|
10393
|
+
log4 = createLogger("almadar:bridge");
|
|
10570
10394
|
MAX_TRANSITIONS = 500;
|
|
10571
10395
|
exposeOnWindow();
|
|
10572
10396
|
}
|
|
@@ -12697,7 +12521,7 @@ var init_avl_elk_layout = __esm({
|
|
|
12697
12521
|
elk = new ELK();
|
|
12698
12522
|
}
|
|
12699
12523
|
});
|
|
12700
|
-
var
|
|
12524
|
+
var log5, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
12701
12525
|
var init_BehaviorView = __esm({
|
|
12702
12526
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12703
12527
|
"use client";
|
|
@@ -12706,7 +12530,7 @@ var init_BehaviorView = __esm({
|
|
|
12706
12530
|
init_AvlSwimLane();
|
|
12707
12531
|
init_types();
|
|
12708
12532
|
init_avl_elk_layout();
|
|
12709
|
-
|
|
12533
|
+
log5 = createLogger("almadar:ui:avl:behavior-view");
|
|
12710
12534
|
SWIM_GUTTER = 120;
|
|
12711
12535
|
CENTER_W = 360;
|
|
12712
12536
|
BehaviorView = ({ data }) => {
|
|
@@ -12717,7 +12541,7 @@ var init_BehaviorView = __esm({
|
|
|
12717
12541
|
const dataKey = useMemo(() => JSON.stringify(traitData), [traitData]);
|
|
12718
12542
|
useEffect(() => {
|
|
12719
12543
|
if (!traitData) return;
|
|
12720
|
-
computeTraitLayout(traitData).then(setLayout).catch((err) =>
|
|
12544
|
+
computeTraitLayout(traitData).then(setLayout).catch((err) => log5.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
12721
12545
|
}, [dataKey]);
|
|
12722
12546
|
if (!traitData) {
|
|
12723
12547
|
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
@@ -13128,7 +12952,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
13128
12952
|
}
|
|
13129
12953
|
return diff;
|
|
13130
12954
|
}
|
|
13131
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle,
|
|
12955
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
13132
12956
|
var init_CodeBlock = __esm({
|
|
13133
12957
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
13134
12958
|
init_cn();
|
|
@@ -13211,7 +13035,7 @@ var init_CodeBlock = __esm({
|
|
|
13211
13035
|
"lolo-op-async": { color: ORB_COLORS.dark.async }
|
|
13212
13036
|
};
|
|
13213
13037
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
13214
|
-
|
|
13038
|
+
log6 = createLogger("almadar:ui:markdown-code");
|
|
13215
13039
|
CODE_LANGUAGES = [
|
|
13216
13040
|
"text",
|
|
13217
13041
|
"json",
|
|
@@ -13250,7 +13074,7 @@ var init_CodeBlock = __esm({
|
|
|
13250
13074
|
};
|
|
13251
13075
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13252
13076
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13253
|
-
CodeBlock =
|
|
13077
|
+
CodeBlock = React81__default.memo(
|
|
13254
13078
|
({
|
|
13255
13079
|
code: rawCode,
|
|
13256
13080
|
language = "text",
|
|
@@ -13475,7 +13299,7 @@ var init_CodeBlock = __esm({
|
|
|
13475
13299
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
|
|
13476
13300
|
setTimeout(() => setCopied(false), 2e3);
|
|
13477
13301
|
} catch (err) {
|
|
13478
|
-
|
|
13302
|
+
log6.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
|
|
13479
13303
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
|
|
13480
13304
|
}
|
|
13481
13305
|
};
|
|
@@ -13837,7 +13661,7 @@ var init_MarkdownContent = __esm({
|
|
|
13837
13661
|
init_Box();
|
|
13838
13662
|
init_CodeBlock();
|
|
13839
13663
|
init_cn();
|
|
13840
|
-
MarkdownContent =
|
|
13664
|
+
MarkdownContent = React81__default.memo(
|
|
13841
13665
|
({ content, direction = "ltr", className }) => {
|
|
13842
13666
|
const { t: _t } = useTranslate();
|
|
13843
13667
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -15154,7 +14978,7 @@ var init_StateMachineView = __esm({
|
|
|
15154
14978
|
style: { top: title ? 30 : 0 },
|
|
15155
14979
|
children: [
|
|
15156
14980
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15157
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14981
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React81__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15158
14982
|
StateNode,
|
|
15159
14983
|
{
|
|
15160
14984
|
state,
|
|
@@ -17356,14 +17180,14 @@ function useSafeEventBus2() {
|
|
|
17356
17180
|
} };
|
|
17357
17181
|
}
|
|
17358
17182
|
}
|
|
17359
|
-
var
|
|
17183
|
+
var log7, lookStyles4, ButtonGroup;
|
|
17360
17184
|
var init_ButtonGroup = __esm({
|
|
17361
17185
|
"components/core/molecules/ButtonGroup.tsx"() {
|
|
17362
17186
|
"use client";
|
|
17363
17187
|
init_cn();
|
|
17364
17188
|
init_atoms2();
|
|
17365
17189
|
init_useEventBus();
|
|
17366
|
-
|
|
17190
|
+
log7 = createLogger("almadar:ui:button-group");
|
|
17367
17191
|
lookStyles4 = {
|
|
17368
17192
|
"right-aligned-buttons": "",
|
|
17369
17193
|
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
@@ -17444,7 +17268,7 @@ var init_ButtonGroup = __esm({
|
|
|
17444
17268
|
{
|
|
17445
17269
|
variant: "ghost",
|
|
17446
17270
|
onClick: () => {
|
|
17447
|
-
|
|
17271
|
+
log7.debug("Filter clicked", { field: filter.field });
|
|
17448
17272
|
},
|
|
17449
17273
|
children: filter.label
|
|
17450
17274
|
},
|
|
@@ -21695,7 +21519,7 @@ function CraftingRecipe({
|
|
|
21695
21519
|
className
|
|
21696
21520
|
}) {
|
|
21697
21521
|
const eventBus = useEventBus();
|
|
21698
|
-
const handleCraft =
|
|
21522
|
+
const handleCraft = React81.useCallback(() => {
|
|
21699
21523
|
onCraft?.();
|
|
21700
21524
|
if (craftEvent) {
|
|
21701
21525
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21712,7 +21536,7 @@ function CraftingRecipe({
|
|
|
21712
21536
|
children: [
|
|
21713
21537
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21714
21538
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21715
|
-
return /* @__PURE__ */ jsxs(
|
|
21539
|
+
return /* @__PURE__ */ jsxs(React81.Fragment, { children: [
|
|
21716
21540
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21717
21541
|
ItemSlot,
|
|
21718
21542
|
{
|
|
@@ -21784,8 +21608,8 @@ function DPad({
|
|
|
21784
21608
|
}) {
|
|
21785
21609
|
const eventBus = useEventBus();
|
|
21786
21610
|
const sizes = sizeMap15[size];
|
|
21787
|
-
const [activeDirections, setActiveDirections] =
|
|
21788
|
-
const handlePress =
|
|
21611
|
+
const [activeDirections, setActiveDirections] = React81.useState(/* @__PURE__ */ new Set());
|
|
21612
|
+
const handlePress = React81.useCallback(
|
|
21789
21613
|
(direction) => {
|
|
21790
21614
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21791
21615
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21793,7 +21617,7 @@ function DPad({
|
|
|
21793
21617
|
},
|
|
21794
21618
|
[directionEvent, eventBus, onDirection]
|
|
21795
21619
|
);
|
|
21796
|
-
const handleRelease =
|
|
21620
|
+
const handleRelease = React81.useCallback(
|
|
21797
21621
|
(direction) => {
|
|
21798
21622
|
setActiveDirections((prev) => {
|
|
21799
21623
|
const next = new Set(prev);
|
|
@@ -22600,8 +22424,8 @@ var init_Menu = __esm({
|
|
|
22600
22424
|
"bottom-end": "bottom-start"
|
|
22601
22425
|
};
|
|
22602
22426
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22603
|
-
const triggerChild =
|
|
22604
|
-
const triggerElement =
|
|
22427
|
+
const triggerChild = React81__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22428
|
+
const triggerElement = React81__default.cloneElement(
|
|
22605
22429
|
triggerChild,
|
|
22606
22430
|
{
|
|
22607
22431
|
ref: triggerRef,
|
|
@@ -22735,14 +22559,14 @@ function useDataDnd(args) {
|
|
|
22735
22559
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22736
22560
|
const enabled = isZone || Boolean(dndRoot);
|
|
22737
22561
|
const eventBus = useEventBus();
|
|
22738
|
-
const parentRoot =
|
|
22562
|
+
const parentRoot = React81__default.useContext(RootCtx);
|
|
22739
22563
|
const isRoot = enabled && parentRoot === null;
|
|
22740
|
-
const zoneId =
|
|
22564
|
+
const zoneId = React81__default.useId();
|
|
22741
22565
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22742
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22743
|
-
const optimisticOrdersRef =
|
|
22566
|
+
const [optimisticOrders, setOptimisticOrders] = React81__default.useState(() => /* @__PURE__ */ new Map());
|
|
22567
|
+
const optimisticOrdersRef = React81__default.useRef(optimisticOrders);
|
|
22744
22568
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22745
|
-
const clearOptimisticOrder =
|
|
22569
|
+
const clearOptimisticOrder = React81__default.useCallback((group) => {
|
|
22746
22570
|
setOptimisticOrders((prev) => {
|
|
22747
22571
|
if (!prev.has(group)) return prev;
|
|
22748
22572
|
const next = new Map(prev);
|
|
@@ -22767,7 +22591,7 @@ function useDataDnd(args) {
|
|
|
22767
22591
|
const raw = it[dndItemIdField];
|
|
22768
22592
|
return String(raw ?? `__idx_${idx}`);
|
|
22769
22593
|
}).join("|");
|
|
22770
|
-
const itemIds =
|
|
22594
|
+
const itemIds = React81__default.useMemo(
|
|
22771
22595
|
() => orderedItems.map((it, idx) => {
|
|
22772
22596
|
const raw = it[dndItemIdField];
|
|
22773
22597
|
return raw ?? `__idx_${idx}`;
|
|
@@ -22775,7 +22599,7 @@ function useDataDnd(args) {
|
|
|
22775
22599
|
[itemIdsSignature]
|
|
22776
22600
|
);
|
|
22777
22601
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
22778
|
-
|
|
22602
|
+
React81__default.useEffect(() => {
|
|
22779
22603
|
const root = isRoot ? null : parentRoot;
|
|
22780
22604
|
if (root) {
|
|
22781
22605
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22783,20 +22607,20 @@ function useDataDnd(args) {
|
|
|
22783
22607
|
clearOptimisticOrder(ownGroup);
|
|
22784
22608
|
}
|
|
22785
22609
|
}, [itemsContentSig, ownGroup]);
|
|
22786
|
-
const zonesRef =
|
|
22787
|
-
const registerZone =
|
|
22610
|
+
const zonesRef = React81__default.useRef(/* @__PURE__ */ new Map());
|
|
22611
|
+
const registerZone = React81__default.useCallback((zoneId2, meta2) => {
|
|
22788
22612
|
zonesRef.current.set(zoneId2, meta2);
|
|
22789
22613
|
}, []);
|
|
22790
|
-
const unregisterZone =
|
|
22614
|
+
const unregisterZone = React81__default.useCallback((zoneId2) => {
|
|
22791
22615
|
zonesRef.current.delete(zoneId2);
|
|
22792
22616
|
}, []);
|
|
22793
|
-
const [activeDrag, setActiveDrag] =
|
|
22794
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22795
|
-
const meta =
|
|
22617
|
+
const [activeDrag, setActiveDrag] = React81__default.useState(null);
|
|
22618
|
+
const [overZoneGroup, setOverZoneGroup] = React81__default.useState(null);
|
|
22619
|
+
const meta = React81__default.useMemo(
|
|
22796
22620
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22797
22621
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22798
22622
|
);
|
|
22799
|
-
|
|
22623
|
+
React81__default.useEffect(() => {
|
|
22800
22624
|
const target = isRoot ? null : parentRoot;
|
|
22801
22625
|
if (!target) {
|
|
22802
22626
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22815,7 +22639,7 @@ function useDataDnd(args) {
|
|
|
22815
22639
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22816
22640
|
const sensors = useAlmadarDndSensors(true);
|
|
22817
22641
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22818
|
-
const findZoneByItem =
|
|
22642
|
+
const findZoneByItem = React81__default.useCallback(
|
|
22819
22643
|
(id) => {
|
|
22820
22644
|
for (const z of zonesRef.current.values()) {
|
|
22821
22645
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22824,7 +22648,7 @@ function useDataDnd(args) {
|
|
|
22824
22648
|
},
|
|
22825
22649
|
[]
|
|
22826
22650
|
);
|
|
22827
|
-
|
|
22651
|
+
React81__default.useCallback(
|
|
22828
22652
|
(group) => {
|
|
22829
22653
|
for (const z of zonesRef.current.values()) {
|
|
22830
22654
|
if (z.group === group) return z;
|
|
@@ -22833,7 +22657,7 @@ function useDataDnd(args) {
|
|
|
22833
22657
|
},
|
|
22834
22658
|
[]
|
|
22835
22659
|
);
|
|
22836
|
-
const handleDragEnd =
|
|
22660
|
+
const handleDragEnd = React81__default.useCallback(
|
|
22837
22661
|
(event) => {
|
|
22838
22662
|
const { active, over } = event;
|
|
22839
22663
|
const activeIdStr = String(active.id);
|
|
@@ -22924,8 +22748,8 @@ function useDataDnd(args) {
|
|
|
22924
22748
|
},
|
|
22925
22749
|
[eventBus]
|
|
22926
22750
|
);
|
|
22927
|
-
const sortableData =
|
|
22928
|
-
const SortableItem =
|
|
22751
|
+
const sortableData = React81__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22752
|
+
const SortableItem = React81__default.useCallback(
|
|
22929
22753
|
({ id, children }) => {
|
|
22930
22754
|
const {
|
|
22931
22755
|
attributes,
|
|
@@ -22965,7 +22789,7 @@ function useDataDnd(args) {
|
|
|
22965
22789
|
id: droppableId,
|
|
22966
22790
|
data: sortableData
|
|
22967
22791
|
});
|
|
22968
|
-
const ctx =
|
|
22792
|
+
const ctx = React81__default.useContext(RootCtx);
|
|
22969
22793
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22970
22794
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22971
22795
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22980,7 +22804,7 @@ function useDataDnd(args) {
|
|
|
22980
22804
|
showForeignPlaceholder,
|
|
22981
22805
|
ctxAvailable: ctx != null
|
|
22982
22806
|
});
|
|
22983
|
-
|
|
22807
|
+
React81__default.useEffect(() => {
|
|
22984
22808
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22985
22809
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22986
22810
|
return /* @__PURE__ */ jsx(
|
|
@@ -22994,11 +22818,11 @@ function useDataDnd(args) {
|
|
|
22994
22818
|
}
|
|
22995
22819
|
);
|
|
22996
22820
|
};
|
|
22997
|
-
const rootContextValue =
|
|
22821
|
+
const rootContextValue = React81__default.useMemo(
|
|
22998
22822
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22999
22823
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23000
22824
|
);
|
|
23001
|
-
const handleDragStart =
|
|
22825
|
+
const handleDragStart = React81__default.useCallback((event) => {
|
|
23002
22826
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23003
22827
|
const rect = event.active.rect.current.initial;
|
|
23004
22828
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23017,7 +22841,7 @@ function useDataDnd(args) {
|
|
|
23017
22841
|
isRoot
|
|
23018
22842
|
});
|
|
23019
22843
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23020
|
-
const handleDragOver =
|
|
22844
|
+
const handleDragOver = React81__default.useCallback((event) => {
|
|
23021
22845
|
const { active, over } = event;
|
|
23022
22846
|
const overData = over?.data?.current;
|
|
23023
22847
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23087,7 +22911,7 @@ function useDataDnd(args) {
|
|
|
23087
22911
|
return next;
|
|
23088
22912
|
});
|
|
23089
22913
|
}, []);
|
|
23090
|
-
const handleDragCancel =
|
|
22914
|
+
const handleDragCancel = React81__default.useCallback((event) => {
|
|
23091
22915
|
setActiveDrag(null);
|
|
23092
22916
|
setOverZoneGroup(null);
|
|
23093
22917
|
dndLog.warn("dragCancel", {
|
|
@@ -23095,12 +22919,12 @@ function useDataDnd(args) {
|
|
|
23095
22919
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23096
22920
|
});
|
|
23097
22921
|
}, []);
|
|
23098
|
-
const handleDragEndWithCleanup =
|
|
22922
|
+
const handleDragEndWithCleanup = React81__default.useCallback((event) => {
|
|
23099
22923
|
handleDragEnd(event);
|
|
23100
22924
|
setActiveDrag(null);
|
|
23101
22925
|
setOverZoneGroup(null);
|
|
23102
22926
|
}, [handleDragEnd]);
|
|
23103
|
-
const wrapContainer =
|
|
22927
|
+
const wrapContainer = React81__default.useCallback(
|
|
23104
22928
|
(children) => {
|
|
23105
22929
|
if (!enabled) return children;
|
|
23106
22930
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23154,7 +22978,7 @@ var init_useDataDnd = __esm({
|
|
|
23154
22978
|
init_useAlmadarDndCollision();
|
|
23155
22979
|
init_Box();
|
|
23156
22980
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23157
|
-
RootCtx =
|
|
22981
|
+
RootCtx = React81__default.createContext(null);
|
|
23158
22982
|
}
|
|
23159
22983
|
});
|
|
23160
22984
|
function renderIconInput(icon, props) {
|
|
@@ -23680,7 +23504,7 @@ function DataList({
|
|
|
23680
23504
|
}) {
|
|
23681
23505
|
const eventBus = useEventBus();
|
|
23682
23506
|
const { t } = useTranslate();
|
|
23683
|
-
const [visibleCount, setVisibleCount] =
|
|
23507
|
+
const [visibleCount, setVisibleCount] = React81__default.useState(pageSize || Infinity);
|
|
23684
23508
|
const fieldDefs = fields ?? columns ?? [];
|
|
23685
23509
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23686
23510
|
const dnd = useDataDnd({
|
|
@@ -23699,7 +23523,7 @@ function DataList({
|
|
|
23699
23523
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23700
23524
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23701
23525
|
const hasRenderProp = typeof children === "function";
|
|
23702
|
-
|
|
23526
|
+
React81__default.useEffect(() => {
|
|
23703
23527
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23704
23528
|
const childrenTypeOf = typeof children;
|
|
23705
23529
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23804,7 +23628,7 @@ function DataList({
|
|
|
23804
23628
|
const items2 = data.map((item) => item);
|
|
23805
23629
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
23806
23630
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
23807
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23631
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
23808
23632
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23809
23633
|
group.items.map((itemData, index) => {
|
|
23810
23634
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23945,7 +23769,7 @@ function DataList({
|
|
|
23945
23769
|
className
|
|
23946
23770
|
),
|
|
23947
23771
|
children: [
|
|
23948
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23772
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
23949
23773
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23950
23774
|
group.items.map(
|
|
23951
23775
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24861,7 +24685,7 @@ var init_Grid = __esm({
|
|
|
24861
24685
|
as: Component2 = "div"
|
|
24862
24686
|
}) => {
|
|
24863
24687
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
24864
|
-
return
|
|
24688
|
+
return React81__default.createElement(
|
|
24865
24689
|
Component2,
|
|
24866
24690
|
{
|
|
24867
24691
|
className: cn(
|
|
@@ -25049,8 +24873,8 @@ var init_Popover = __esm({
|
|
|
25049
24873
|
onMouseEnter: handleOpen,
|
|
25050
24874
|
onMouseLeave: handleClose
|
|
25051
24875
|
};
|
|
25052
|
-
const childElement =
|
|
25053
|
-
const triggerElement =
|
|
24876
|
+
const childElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24877
|
+
const triggerElement = React81__default.cloneElement(
|
|
25054
24878
|
childElement,
|
|
25055
24879
|
{
|
|
25056
24880
|
ref: triggerRef,
|
|
@@ -25106,9 +24930,9 @@ function debug(...args) {
|
|
|
25106
24930
|
const [first, ...rest] = args;
|
|
25107
24931
|
const message = typeof first === "string" ? first : "<debug>";
|
|
25108
24932
|
if (rest.length === 0 && typeof first === "string") {
|
|
25109
|
-
|
|
24933
|
+
log8.debug(message);
|
|
25110
24934
|
} else {
|
|
25111
|
-
|
|
24935
|
+
log8.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
|
|
25112
24936
|
}
|
|
25113
24937
|
}
|
|
25114
24938
|
function debugGroup(label) {
|
|
@@ -25136,11 +24960,11 @@ function toLogMetaValue(v) {
|
|
|
25136
24960
|
}
|
|
25137
24961
|
return String(v);
|
|
25138
24962
|
}
|
|
25139
|
-
var NAMESPACE,
|
|
24963
|
+
var NAMESPACE, log8;
|
|
25140
24964
|
var init_debug = __esm({
|
|
25141
24965
|
"lib/debug.ts"() {
|
|
25142
24966
|
NAMESPACE = "almadar:ui:debug";
|
|
25143
|
-
|
|
24967
|
+
log8 = createLogger(NAMESPACE);
|
|
25144
24968
|
createLogger("almadar:ui:debug:input");
|
|
25145
24969
|
createLogger("almadar:ui:debug:collision");
|
|
25146
24970
|
createLogger("almadar:ui:debug:physics");
|
|
@@ -25640,8 +25464,8 @@ var init_Tooltip = __esm({
|
|
|
25640
25464
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25641
25465
|
};
|
|
25642
25466
|
}, []);
|
|
25643
|
-
const triggerElement =
|
|
25644
|
-
const trigger =
|
|
25467
|
+
const triggerElement = React81__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25468
|
+
const trigger = React81__default.cloneElement(triggerElement, {
|
|
25645
25469
|
ref: triggerRef,
|
|
25646
25470
|
onMouseEnter: handleMouseEnter,
|
|
25647
25471
|
onMouseLeave: handleMouseLeave,
|
|
@@ -25727,7 +25551,7 @@ var init_WizardProgress = __esm({
|
|
|
25727
25551
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25728
25552
|
const isActive = index === currentStep;
|
|
25729
25553
|
const isCompleted = index < currentStep;
|
|
25730
|
-
return /* @__PURE__ */ jsxs(
|
|
25554
|
+
return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
25731
25555
|
/* @__PURE__ */ jsx(
|
|
25732
25556
|
"button",
|
|
25733
25557
|
{
|
|
@@ -26791,7 +26615,7 @@ function InventoryGrid({
|
|
|
26791
26615
|
const eventBus = useEventBus();
|
|
26792
26616
|
const slotCount = totalSlots ?? items.length;
|
|
26793
26617
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
26794
|
-
const handleSelect =
|
|
26618
|
+
const handleSelect = React81.useCallback(
|
|
26795
26619
|
(id) => {
|
|
26796
26620
|
onSelect?.(id);
|
|
26797
26621
|
if (selectEvent) {
|
|
@@ -27025,31 +26849,31 @@ function GameCanvas2D({
|
|
|
27025
26849
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
27026
26850
|
className
|
|
27027
26851
|
}) {
|
|
27028
|
-
const canvasRef =
|
|
27029
|
-
const rafRef =
|
|
27030
|
-
const frameRef =
|
|
27031
|
-
const lastTimeRef =
|
|
27032
|
-
const imageCache =
|
|
26852
|
+
const canvasRef = React81.useRef(null);
|
|
26853
|
+
const rafRef = React81.useRef(0);
|
|
26854
|
+
const frameRef = React81.useRef(0);
|
|
26855
|
+
const lastTimeRef = React81.useRef(0);
|
|
26856
|
+
const imageCache = React81.useRef(/* @__PURE__ */ new Map());
|
|
27033
26857
|
const emit = useEmitEvent();
|
|
27034
|
-
const onDrawRef =
|
|
26858
|
+
const onDrawRef = React81.useRef(onDraw);
|
|
27035
26859
|
onDrawRef.current = onDraw;
|
|
27036
|
-
const onTickRef =
|
|
26860
|
+
const onTickRef = React81.useRef(onTick);
|
|
27037
26861
|
onTickRef.current = onTick;
|
|
27038
|
-
const tickEventRef =
|
|
26862
|
+
const tickEventRef = React81.useRef(tickEvent);
|
|
27039
26863
|
tickEventRef.current = tickEvent;
|
|
27040
|
-
const drawEventRef =
|
|
26864
|
+
const drawEventRef = React81.useRef(drawEvent);
|
|
27041
26865
|
drawEventRef.current = drawEvent;
|
|
27042
|
-
const emitRef =
|
|
26866
|
+
const emitRef = React81.useRef(emit);
|
|
27043
26867
|
emitRef.current = emit;
|
|
27044
|
-
const assetBaseUrlRef =
|
|
26868
|
+
const assetBaseUrlRef = React81.useRef(assetBaseUrl);
|
|
27045
26869
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
27046
|
-
const backgroundImageRef =
|
|
26870
|
+
const backgroundImageRef = React81.useRef(backgroundImage);
|
|
27047
26871
|
backgroundImageRef.current = backgroundImage;
|
|
27048
|
-
const widthRef =
|
|
26872
|
+
const widthRef = React81.useRef(width);
|
|
27049
26873
|
widthRef.current = width;
|
|
27050
|
-
const heightRef =
|
|
26874
|
+
const heightRef = React81.useRef(height);
|
|
27051
26875
|
heightRef.current = height;
|
|
27052
|
-
const loadImage =
|
|
26876
|
+
const loadImage = React81.useCallback((url) => {
|
|
27053
26877
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
27054
26878
|
const cached = imageCache.current.get(fullUrl);
|
|
27055
26879
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -27061,7 +26885,7 @@ function GameCanvas2D({
|
|
|
27061
26885
|
}
|
|
27062
26886
|
return null;
|
|
27063
26887
|
}, []);
|
|
27064
|
-
|
|
26888
|
+
React81.useEffect(() => {
|
|
27065
26889
|
const canvas = canvasRef.current;
|
|
27066
26890
|
if (!canvas) return;
|
|
27067
26891
|
const ctx = canvas.getContext("2d");
|
|
@@ -27373,7 +27197,7 @@ function TurnPanel({
|
|
|
27373
27197
|
className
|
|
27374
27198
|
}) {
|
|
27375
27199
|
const eventBus = useEventBus();
|
|
27376
|
-
const handleAction =
|
|
27200
|
+
const handleAction = React81.useCallback(
|
|
27377
27201
|
(event) => {
|
|
27378
27202
|
if (event) {
|
|
27379
27203
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -27542,7 +27366,7 @@ function UnitCommandBar({
|
|
|
27542
27366
|
className
|
|
27543
27367
|
}) {
|
|
27544
27368
|
const eventBus = useEventBus();
|
|
27545
|
-
const handleCommand =
|
|
27369
|
+
const handleCommand = React81.useCallback(
|
|
27546
27370
|
(event) => {
|
|
27547
27371
|
if (event) {
|
|
27548
27372
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -28056,7 +27880,7 @@ function GameMenu({
|
|
|
28056
27880
|
} catch {
|
|
28057
27881
|
}
|
|
28058
27882
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
28059
|
-
const handleOptionClick =
|
|
27883
|
+
const handleOptionClick = React81.useCallback(
|
|
28060
27884
|
(option) => {
|
|
28061
27885
|
if (option.event && eventBus) {
|
|
28062
27886
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -28175,7 +27999,7 @@ function GameOverScreen({
|
|
|
28175
27999
|
} catch {
|
|
28176
28000
|
}
|
|
28177
28001
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
28178
|
-
const handleActionClick =
|
|
28002
|
+
const handleActionClick = React81.useCallback(
|
|
28179
28003
|
(action) => {
|
|
28180
28004
|
if (action.event && eventBus) {
|
|
28181
28005
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29064,7 +28888,7 @@ var init_MapView = __esm({
|
|
|
29064
28888
|
shadowSize: [41, 41]
|
|
29065
28889
|
});
|
|
29066
28890
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29067
|
-
const { useEffect: useEffect80, useRef: useRef74, useCallback: useCallback118, useState: useState112 } =
|
|
28891
|
+
const { useEffect: useEffect80, useRef: useRef74, useCallback: useCallback118, useState: useState112 } = React81__default;
|
|
29068
28892
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29069
28893
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29070
28894
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -29970,8 +29794,8 @@ function TableView({
|
|
|
29970
29794
|
}) {
|
|
29971
29795
|
const eventBus = useEventBus();
|
|
29972
29796
|
const { t } = useTranslate();
|
|
29973
|
-
const [visibleCount, setVisibleCount] =
|
|
29974
|
-
const [localSelected, setLocalSelected] =
|
|
29797
|
+
const [visibleCount, setVisibleCount] = React81__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29798
|
+
const [localSelected, setLocalSelected] = React81__default.useState(/* @__PURE__ */ new Set());
|
|
29975
29799
|
const colDefs = columns ?? fields ?? [];
|
|
29976
29800
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29977
29801
|
const dnd = useDataDnd({
|
|
@@ -30166,12 +29990,12 @@ function TableView({
|
|
|
30166
29990
|
]
|
|
30167
29991
|
}
|
|
30168
29992
|
);
|
|
30169
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29993
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React81__default.Fragment, { children: rowInner }, id);
|
|
30170
29994
|
};
|
|
30171
29995
|
const items = data.map((row) => row);
|
|
30172
29996
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
30173
29997
|
let runningIndex = 0;
|
|
30174
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29998
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
30175
29999
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
30176
30000
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
30177
30001
|
] }, gi)) });
|
|
@@ -31528,7 +31352,7 @@ var init_StepFlow = __esm({
|
|
|
31528
31352
|
className
|
|
31529
31353
|
}) => {
|
|
31530
31354
|
if (orientation === "vertical") {
|
|
31531
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31355
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React81__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
31532
31356
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31533
31357
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31534
31358
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31539,7 +31363,7 @@ var init_StepFlow = __esm({
|
|
|
31539
31363
|
] })
|
|
31540
31364
|
] }) }, index)) });
|
|
31541
31365
|
}
|
|
31542
|
-
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(
|
|
31366
|
+
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(React81__default.Fragment, { children: [
|
|
31543
31367
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31544
31368
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31545
31369
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32524,7 +32348,7 @@ var init_LikertScale = __esm({
|
|
|
32524
32348
|
md: "text-base",
|
|
32525
32349
|
lg: "text-lg"
|
|
32526
32350
|
};
|
|
32527
|
-
LikertScale =
|
|
32351
|
+
LikertScale = React81__default.forwardRef(
|
|
32528
32352
|
({
|
|
32529
32353
|
question,
|
|
32530
32354
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32536,7 +32360,7 @@ var init_LikertScale = __esm({
|
|
|
32536
32360
|
variant = "radios",
|
|
32537
32361
|
className
|
|
32538
32362
|
}, ref) => {
|
|
32539
|
-
const groupId =
|
|
32363
|
+
const groupId = React81__default.useId();
|
|
32540
32364
|
const eventBus = useEventBus();
|
|
32541
32365
|
const handleSelect = useCallback(
|
|
32542
32366
|
(next) => {
|
|
@@ -34818,7 +34642,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34818
34642
|
"aria-label": t("aria.breadcrumb"),
|
|
34819
34643
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34820
34644
|
const isLast = idx === items.length - 1;
|
|
34821
|
-
return /* @__PURE__ */ jsxs(
|
|
34645
|
+
return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
34822
34646
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
34823
34647
|
Icon,
|
|
34824
34648
|
{
|
|
@@ -35687,7 +35511,7 @@ var init_MiniStateMachine = __esm({
|
|
|
35687
35511
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
35688
35512
|
const tc = transitionCounts[s.name] ?? 0;
|
|
35689
35513
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
35690
|
-
return /* @__PURE__ */ jsxs(
|
|
35514
|
+
return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
35691
35515
|
/* @__PURE__ */ jsx(
|
|
35692
35516
|
AvlState,
|
|
35693
35517
|
{
|
|
@@ -35891,7 +35715,7 @@ var init_PageHeader = __esm({
|
|
|
35891
35715
|
info: "bg-info/10 text-info"
|
|
35892
35716
|
};
|
|
35893
35717
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35894
|
-
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(
|
|
35718
|
+
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(React81__default.Fragment, { children: [
|
|
35895
35719
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35896
35720
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35897
35721
|
"a",
|
|
@@ -36620,7 +36444,7 @@ var init_WizardContainer = __esm({
|
|
|
36620
36444
|
const isCompleted = index < currentStep;
|
|
36621
36445
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36622
36446
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36623
|
-
return /* @__PURE__ */ jsxs(
|
|
36447
|
+
return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
36624
36448
|
/* @__PURE__ */ jsx(
|
|
36625
36449
|
Button,
|
|
36626
36450
|
{
|
|
@@ -38955,7 +38779,7 @@ var init_DetailPanel = __esm({
|
|
|
38955
38779
|
}
|
|
38956
38780
|
});
|
|
38957
38781
|
function extractTitle(children) {
|
|
38958
|
-
if (!
|
|
38782
|
+
if (!React81__default.isValidElement(children)) return void 0;
|
|
38959
38783
|
const props = children.props;
|
|
38960
38784
|
if (typeof props.title === "string") {
|
|
38961
38785
|
return props.title;
|
|
@@ -39010,7 +38834,7 @@ function LinearView({
|
|
|
39010
38834
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
39011
38835
|
const isDone = i < currentIdx;
|
|
39012
38836
|
const isCurrent = i === currentIdx;
|
|
39013
|
-
return /* @__PURE__ */ jsxs(
|
|
38837
|
+
return /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
39014
38838
|
i > 0 && /* @__PURE__ */ jsx(
|
|
39015
38839
|
Typography,
|
|
39016
38840
|
{
|
|
@@ -39960,12 +39784,12 @@ var init_Form = __esm({
|
|
|
39960
39784
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39961
39785
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39962
39786
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39963
|
-
const normalizedInitialData =
|
|
39787
|
+
const normalizedInitialData = React81__default.useMemo(() => {
|
|
39964
39788
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39965
39789
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39966
39790
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39967
39791
|
}, [entity, initialData]);
|
|
39968
|
-
const entityDerivedFields =
|
|
39792
|
+
const entityDerivedFields = React81__default.useMemo(() => {
|
|
39969
39793
|
if (fields && fields.length > 0) return void 0;
|
|
39970
39794
|
if (!resolvedEntity) return void 0;
|
|
39971
39795
|
return resolvedEntity.fields.map(
|
|
@@ -39985,16 +39809,16 @@ var init_Form = __esm({
|
|
|
39985
39809
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39986
39810
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39987
39811
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39988
|
-
const [formData, setFormData] =
|
|
39812
|
+
const [formData, setFormData] = React81__default.useState(
|
|
39989
39813
|
normalizedInitialData
|
|
39990
39814
|
);
|
|
39991
|
-
const [collapsedSections, setCollapsedSections] =
|
|
39815
|
+
const [collapsedSections, setCollapsedSections] = React81__default.useState(
|
|
39992
39816
|
/* @__PURE__ */ new Set()
|
|
39993
39817
|
);
|
|
39994
|
-
const [submitError, setSubmitError] =
|
|
39995
|
-
const formRef =
|
|
39818
|
+
const [submitError, setSubmitError] = React81__default.useState(null);
|
|
39819
|
+
const formRef = React81__default.useRef(null);
|
|
39996
39820
|
const formMode = props.mode;
|
|
39997
|
-
const mountedRef =
|
|
39821
|
+
const mountedRef = React81__default.useRef(false);
|
|
39998
39822
|
if (!mountedRef.current) {
|
|
39999
39823
|
mountedRef.current = true;
|
|
40000
39824
|
debug("forms", "mount", {
|
|
@@ -40007,7 +39831,7 @@ var init_Form = __esm({
|
|
|
40007
39831
|
});
|
|
40008
39832
|
}
|
|
40009
39833
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40010
|
-
const evalContext =
|
|
39834
|
+
const evalContext = React81__default.useMemo(
|
|
40011
39835
|
() => ({
|
|
40012
39836
|
formValues: formData,
|
|
40013
39837
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40016,7 +39840,7 @@ var init_Form = __esm({
|
|
|
40016
39840
|
}),
|
|
40017
39841
|
[formData, externalContext]
|
|
40018
39842
|
);
|
|
40019
|
-
|
|
39843
|
+
React81__default.useEffect(() => {
|
|
40020
39844
|
debug("forms", "initialData-sync", {
|
|
40021
39845
|
mode: formMode,
|
|
40022
39846
|
normalizedInitialData,
|
|
@@ -40027,7 +39851,7 @@ var init_Form = __esm({
|
|
|
40027
39851
|
setFormData(normalizedInitialData);
|
|
40028
39852
|
}
|
|
40029
39853
|
}, [normalizedInitialData]);
|
|
40030
|
-
const processCalculations =
|
|
39854
|
+
const processCalculations = React81__default.useCallback(
|
|
40031
39855
|
(changedFieldId, newFormData) => {
|
|
40032
39856
|
if (!hiddenCalculations.length) return;
|
|
40033
39857
|
const context = {
|
|
@@ -40052,7 +39876,7 @@ var init_Form = __esm({
|
|
|
40052
39876
|
},
|
|
40053
39877
|
[hiddenCalculations, externalContext, eventBus]
|
|
40054
39878
|
);
|
|
40055
|
-
const checkViolations =
|
|
39879
|
+
const checkViolations = React81__default.useCallback(
|
|
40056
39880
|
(changedFieldId, newFormData) => {
|
|
40057
39881
|
if (!violationTriggers.length) return;
|
|
40058
39882
|
const context = {
|
|
@@ -40090,7 +39914,7 @@ var init_Form = __esm({
|
|
|
40090
39914
|
processCalculations(name, newFormData);
|
|
40091
39915
|
checkViolations(name, newFormData);
|
|
40092
39916
|
};
|
|
40093
|
-
const isFieldVisible =
|
|
39917
|
+
const isFieldVisible = React81__default.useCallback(
|
|
40094
39918
|
(fieldName) => {
|
|
40095
39919
|
const condition = conditionalFields[fieldName];
|
|
40096
39920
|
if (!condition) return true;
|
|
@@ -40098,7 +39922,7 @@ var init_Form = __esm({
|
|
|
40098
39922
|
},
|
|
40099
39923
|
[conditionalFields, evalContext]
|
|
40100
39924
|
);
|
|
40101
|
-
const isSectionVisible =
|
|
39925
|
+
const isSectionVisible = React81__default.useCallback(
|
|
40102
39926
|
(section) => {
|
|
40103
39927
|
if (!section.condition) return true;
|
|
40104
39928
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -40174,7 +39998,7 @@ var init_Form = __esm({
|
|
|
40174
39998
|
eventBus.emit(`UI:${onCancel}`);
|
|
40175
39999
|
}
|
|
40176
40000
|
};
|
|
40177
|
-
const renderField =
|
|
40001
|
+
const renderField = React81__default.useCallback(
|
|
40178
40002
|
(field) => {
|
|
40179
40003
|
const fieldName = field.name || field.field;
|
|
40180
40004
|
if (!fieldName) return null;
|
|
@@ -40195,7 +40019,7 @@ var init_Form = __esm({
|
|
|
40195
40019
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
40196
40020
|
);
|
|
40197
40021
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
40198
|
-
const normalizedFields =
|
|
40022
|
+
const normalizedFields = React81__default.useMemo(() => {
|
|
40199
40023
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
40200
40024
|
return effectiveFields.map((field) => {
|
|
40201
40025
|
if (typeof field === "string") {
|
|
@@ -40218,7 +40042,7 @@ var init_Form = __esm({
|
|
|
40218
40042
|
return field;
|
|
40219
40043
|
});
|
|
40220
40044
|
}, [effectiveFields, resolvedEntity]);
|
|
40221
|
-
const schemaFields =
|
|
40045
|
+
const schemaFields = React81__default.useMemo(() => {
|
|
40222
40046
|
if (normalizedFields.length === 0) return null;
|
|
40223
40047
|
if (isDebugEnabled()) {
|
|
40224
40048
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -40228,7 +40052,7 @@ var init_Form = __esm({
|
|
|
40228
40052
|
}
|
|
40229
40053
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
40230
40054
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
40231
|
-
const sectionElements =
|
|
40055
|
+
const sectionElements = React81__default.useMemo(() => {
|
|
40232
40056
|
if (!sections || sections.length === 0) return null;
|
|
40233
40057
|
return sections.map((section) => {
|
|
40234
40058
|
if (!isSectionVisible(section)) {
|
|
@@ -41398,11 +41222,11 @@ var init_Canvas3DErrorBoundary = __esm({
|
|
|
41398
41222
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.css"() {
|
|
41399
41223
|
}
|
|
41400
41224
|
});
|
|
41401
|
-
var
|
|
41225
|
+
var log9, Canvas3DErrorBoundary;
|
|
41402
41226
|
var init_Canvas3DErrorBoundary2 = __esm({
|
|
41403
41227
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.tsx"() {
|
|
41404
41228
|
init_Canvas3DErrorBoundary();
|
|
41405
|
-
|
|
41229
|
+
log9 = createLogger("almadar:ui:game:canvas3d:error-boundary");
|
|
41406
41230
|
Canvas3DErrorBoundary = class extends Component {
|
|
41407
41231
|
constructor(props) {
|
|
41408
41232
|
super(props);
|
|
@@ -41430,8 +41254,8 @@ var init_Canvas3DErrorBoundary2 = __esm({
|
|
|
41430
41254
|
componentDidCatch(error, errorInfo) {
|
|
41431
41255
|
this.setState({ errorInfo });
|
|
41432
41256
|
this.props.onError?.(error, errorInfo);
|
|
41433
|
-
|
|
41434
|
-
|
|
41257
|
+
log9.error("Error caught", { error });
|
|
41258
|
+
log9.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
|
|
41435
41259
|
}
|
|
41436
41260
|
render() {
|
|
41437
41261
|
if (this.state.hasError) {
|
|
@@ -41494,7 +41318,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41494
41318
|
setState({ model: null, isLoading: false, error: null });
|
|
41495
41319
|
return;
|
|
41496
41320
|
}
|
|
41497
|
-
|
|
41321
|
+
log10.debug("Loading", { url });
|
|
41498
41322
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
41499
41323
|
const assetRoot = resourceBasePath || detectAssetRoot2(url);
|
|
41500
41324
|
const loader = new GLTFLoader$1();
|
|
@@ -41502,7 +41326,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41502
41326
|
loader.load(
|
|
41503
41327
|
url,
|
|
41504
41328
|
(gltf) => {
|
|
41505
|
-
|
|
41329
|
+
log10.debug("Loaded", { url });
|
|
41506
41330
|
setState({
|
|
41507
41331
|
model: gltf.scene,
|
|
41508
41332
|
isLoading: false,
|
|
@@ -41511,7 +41335,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
41511
41335
|
},
|
|
41512
41336
|
void 0,
|
|
41513
41337
|
(err) => {
|
|
41514
|
-
|
|
41338
|
+
log10.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
|
|
41515
41339
|
setState({
|
|
41516
41340
|
model: null,
|
|
41517
41341
|
isLoading: false,
|
|
@@ -41627,11 +41451,11 @@ function ModelLoader({
|
|
|
41627
41451
|
}
|
|
41628
41452
|
);
|
|
41629
41453
|
}
|
|
41630
|
-
var
|
|
41454
|
+
var log10;
|
|
41631
41455
|
var init_ModelLoader = __esm({
|
|
41632
41456
|
"components/game/molecules/three/components/ModelLoader.tsx"() {
|
|
41633
41457
|
"use client";
|
|
41634
|
-
|
|
41458
|
+
log10 = createLogger("almadar:ui:game:model-loader");
|
|
41635
41459
|
}
|
|
41636
41460
|
});
|
|
41637
41461
|
|
|
@@ -43065,7 +42889,7 @@ var init_List = __esm({
|
|
|
43065
42889
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
43066
42890
|
return [];
|
|
43067
42891
|
}, [entity]);
|
|
43068
|
-
const getItemActions =
|
|
42892
|
+
const getItemActions = React81__default.useCallback(
|
|
43069
42893
|
(item) => {
|
|
43070
42894
|
if (!itemActions) return [];
|
|
43071
42895
|
if (typeof itemActions === "function") {
|
|
@@ -43541,7 +43365,7 @@ var init_MediaGallery = __esm({
|
|
|
43541
43365
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
43542
43366
|
);
|
|
43543
43367
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43544
|
-
const items =
|
|
43368
|
+
const items = React81__default.useMemo(() => {
|
|
43545
43369
|
if (propItems) return propItems;
|
|
43546
43370
|
if (entityData.length === 0) return [];
|
|
43547
43371
|
return entityData.map((record, idx) => ({
|
|
@@ -43702,7 +43526,7 @@ var init_MediaGallery = __esm({
|
|
|
43702
43526
|
}
|
|
43703
43527
|
});
|
|
43704
43528
|
function extractTitle2(children) {
|
|
43705
|
-
if (!
|
|
43529
|
+
if (!React81__default.isValidElement(children)) return void 0;
|
|
43706
43530
|
const props = children.props;
|
|
43707
43531
|
if (typeof props.title === "string") {
|
|
43708
43532
|
return props.title;
|
|
@@ -44726,7 +44550,7 @@ var init_debugRegistry = __esm({
|
|
|
44726
44550
|
}
|
|
44727
44551
|
});
|
|
44728
44552
|
function useDebugData() {
|
|
44729
|
-
const [data, setData] =
|
|
44553
|
+
const [data, setData] = React81.useState(() => ({
|
|
44730
44554
|
traits: [],
|
|
44731
44555
|
ticks: [],
|
|
44732
44556
|
guards: [],
|
|
@@ -44740,7 +44564,7 @@ function useDebugData() {
|
|
|
44740
44564
|
},
|
|
44741
44565
|
lastUpdate: Date.now()
|
|
44742
44566
|
}));
|
|
44743
|
-
|
|
44567
|
+
React81.useEffect(() => {
|
|
44744
44568
|
const updateData = () => {
|
|
44745
44569
|
setData({
|
|
44746
44570
|
traits: getAllTraits(),
|
|
@@ -44849,12 +44673,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
44849
44673
|
return positions;
|
|
44850
44674
|
}
|
|
44851
44675
|
function WalkMinimap() {
|
|
44852
|
-
const [walkStep, setWalkStep] =
|
|
44853
|
-
const [traits2, setTraits] =
|
|
44854
|
-
const [coveredEdges, setCoveredEdges] =
|
|
44855
|
-
const [completedTraits, setCompletedTraits] =
|
|
44856
|
-
const prevTraitRef =
|
|
44857
|
-
|
|
44676
|
+
const [walkStep, setWalkStep] = React81.useState(null);
|
|
44677
|
+
const [traits2, setTraits] = React81.useState([]);
|
|
44678
|
+
const [coveredEdges, setCoveredEdges] = React81.useState([]);
|
|
44679
|
+
const [completedTraits, setCompletedTraits] = React81.useState(/* @__PURE__ */ new Set());
|
|
44680
|
+
const prevTraitRef = React81.useRef(null);
|
|
44681
|
+
React81.useEffect(() => {
|
|
44858
44682
|
const interval = setInterval(() => {
|
|
44859
44683
|
const w = window;
|
|
44860
44684
|
const step = w.__orbitalWalkStep;
|
|
@@ -45290,15 +45114,15 @@ var init_EntitiesTab = __esm({
|
|
|
45290
45114
|
});
|
|
45291
45115
|
function EventFlowTab({ events: events2 }) {
|
|
45292
45116
|
const { t } = useTranslate();
|
|
45293
|
-
const [filter, setFilter] =
|
|
45294
|
-
const containerRef =
|
|
45295
|
-
const [autoScroll, setAutoScroll] =
|
|
45296
|
-
|
|
45117
|
+
const [filter, setFilter] = React81.useState("all");
|
|
45118
|
+
const containerRef = React81.useRef(null);
|
|
45119
|
+
const [autoScroll, setAutoScroll] = React81.useState(true);
|
|
45120
|
+
React81.useEffect(() => {
|
|
45297
45121
|
if (autoScroll && containerRef.current) {
|
|
45298
45122
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
45299
45123
|
}
|
|
45300
45124
|
}, [events2.length, autoScroll]);
|
|
45301
|
-
const filteredEvents =
|
|
45125
|
+
const filteredEvents = React81.useMemo(() => {
|
|
45302
45126
|
if (filter === "all") return events2;
|
|
45303
45127
|
return events2.filter((e) => e.type === filter);
|
|
45304
45128
|
}, [events2, filter]);
|
|
@@ -45414,7 +45238,7 @@ var init_EventFlowTab = __esm({
|
|
|
45414
45238
|
});
|
|
45415
45239
|
function GuardsPanel({ guards }) {
|
|
45416
45240
|
const { t } = useTranslate();
|
|
45417
|
-
const [filter, setFilter] =
|
|
45241
|
+
const [filter, setFilter] = React81.useState("all");
|
|
45418
45242
|
if (guards.length === 0) {
|
|
45419
45243
|
return /* @__PURE__ */ jsx(
|
|
45420
45244
|
EmptyState,
|
|
@@ -45427,7 +45251,7 @@ function GuardsPanel({ guards }) {
|
|
|
45427
45251
|
}
|
|
45428
45252
|
const passedCount = guards.filter((g) => g.result).length;
|
|
45429
45253
|
const failedCount = guards.length - passedCount;
|
|
45430
|
-
const filteredGuards =
|
|
45254
|
+
const filteredGuards = React81.useMemo(() => {
|
|
45431
45255
|
if (filter === "all") return guards;
|
|
45432
45256
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
45433
45257
|
return guards.filter((g) => !g.result);
|
|
@@ -45590,10 +45414,10 @@ function EffectBadge({ effect }) {
|
|
|
45590
45414
|
}
|
|
45591
45415
|
function TransitionTimeline({ transitions }) {
|
|
45592
45416
|
const { t } = useTranslate();
|
|
45593
|
-
const containerRef =
|
|
45594
|
-
const [autoScroll, setAutoScroll] =
|
|
45595
|
-
const [expandedId, setExpandedId] =
|
|
45596
|
-
|
|
45417
|
+
const containerRef = React81.useRef(null);
|
|
45418
|
+
const [autoScroll, setAutoScroll] = React81.useState(true);
|
|
45419
|
+
const [expandedId, setExpandedId] = React81.useState(null);
|
|
45420
|
+
React81.useEffect(() => {
|
|
45597
45421
|
if (autoScroll && containerRef.current) {
|
|
45598
45422
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
45599
45423
|
}
|
|
@@ -45873,9 +45697,9 @@ function getAllEvents(traits2) {
|
|
|
45873
45697
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
45874
45698
|
const eventBus = useEventBus();
|
|
45875
45699
|
const { t } = useTranslate();
|
|
45876
|
-
const [log14, setLog] =
|
|
45877
|
-
const prevStatesRef =
|
|
45878
|
-
|
|
45700
|
+
const [log14, setLog] = React81.useState([]);
|
|
45701
|
+
const prevStatesRef = React81.useRef(/* @__PURE__ */ new Map());
|
|
45702
|
+
React81.useEffect(() => {
|
|
45879
45703
|
for (const trait of traits2) {
|
|
45880
45704
|
const prev = prevStatesRef.current.get(trait.id);
|
|
45881
45705
|
if (prev && prev !== trait.currentState) {
|
|
@@ -46044,10 +45868,10 @@ function VerifyModePanel({
|
|
|
46044
45868
|
localCount
|
|
46045
45869
|
}) {
|
|
46046
45870
|
const { t } = useTranslate();
|
|
46047
|
-
const [expanded, setExpanded] =
|
|
46048
|
-
const scrollRef =
|
|
46049
|
-
const prevCountRef =
|
|
46050
|
-
|
|
45871
|
+
const [expanded, setExpanded] = React81.useState(true);
|
|
45872
|
+
const scrollRef = React81.useRef(null);
|
|
45873
|
+
const prevCountRef = React81.useRef(0);
|
|
45874
|
+
React81.useEffect(() => {
|
|
46051
45875
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
46052
45876
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
46053
45877
|
}
|
|
@@ -46104,10 +45928,10 @@ function RuntimeDebugger({
|
|
|
46104
45928
|
schema
|
|
46105
45929
|
}) {
|
|
46106
45930
|
const { t } = useTranslate();
|
|
46107
|
-
const [isCollapsed, setIsCollapsed] =
|
|
46108
|
-
const [isVisible, setIsVisible] =
|
|
45931
|
+
const [isCollapsed, setIsCollapsed] = React81.useState(mode === "verify" ? true : defaultCollapsed);
|
|
45932
|
+
const [isVisible, setIsVisible] = React81.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
46109
45933
|
const debugData = useDebugData();
|
|
46110
|
-
|
|
45934
|
+
React81.useEffect(() => {
|
|
46111
45935
|
if (mode === "inline") return;
|
|
46112
45936
|
return onDebugToggle((enabled) => {
|
|
46113
45937
|
setIsVisible(enabled);
|
|
@@ -46116,7 +45940,7 @@ function RuntimeDebugger({
|
|
|
46116
45940
|
}
|
|
46117
45941
|
});
|
|
46118
45942
|
}, [mode]);
|
|
46119
|
-
|
|
45943
|
+
React81.useEffect(() => {
|
|
46120
45944
|
if (mode === "inline") return;
|
|
46121
45945
|
const handleKeyDown = (e) => {
|
|
46122
45946
|
if (e.key === "`" && isVisible) {
|
|
@@ -46676,7 +46500,7 @@ function SequenceBar({
|
|
|
46676
46500
|
onSlotRemove(index);
|
|
46677
46501
|
}, [onSlotRemove, playing]);
|
|
46678
46502
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
46679
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
46503
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React81__default.Fragment, { children: [
|
|
46680
46504
|
i > 0 && /* @__PURE__ */ jsx(
|
|
46681
46505
|
Typography,
|
|
46682
46506
|
{
|
|
@@ -47565,7 +47389,7 @@ var init_StatCard = __esm({
|
|
|
47565
47389
|
const labelToUse = propLabel ?? propTitle;
|
|
47566
47390
|
const eventBus = useEventBus();
|
|
47567
47391
|
const { t } = useTranslate();
|
|
47568
|
-
const handleActionClick =
|
|
47392
|
+
const handleActionClick = React81__default.useCallback(() => {
|
|
47569
47393
|
if (action?.event) {
|
|
47570
47394
|
eventBus.emit(`UI:${action.event}`, {});
|
|
47571
47395
|
}
|
|
@@ -47576,7 +47400,7 @@ var init_StatCard = __esm({
|
|
|
47576
47400
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
47577
47401
|
const isLoading = externalLoading ?? false;
|
|
47578
47402
|
const error = externalError;
|
|
47579
|
-
const computeMetricValue =
|
|
47403
|
+
const computeMetricValue = React81__default.useCallback(
|
|
47580
47404
|
(metric, items) => {
|
|
47581
47405
|
if (metric.value !== void 0) {
|
|
47582
47406
|
return metric.value;
|
|
@@ -47615,7 +47439,7 @@ var init_StatCard = __esm({
|
|
|
47615
47439
|
},
|
|
47616
47440
|
[]
|
|
47617
47441
|
);
|
|
47618
|
-
const schemaStats =
|
|
47442
|
+
const schemaStats = React81__default.useMemo(() => {
|
|
47619
47443
|
if (!metrics || metrics.length === 0) return null;
|
|
47620
47444
|
return metrics.map((metric) => ({
|
|
47621
47445
|
label: metric.label,
|
|
@@ -47623,7 +47447,7 @@ var init_StatCard = __esm({
|
|
|
47623
47447
|
format: metric.format
|
|
47624
47448
|
}));
|
|
47625
47449
|
}, [metrics, data, computeMetricValue]);
|
|
47626
|
-
const calculatedTrend =
|
|
47450
|
+
const calculatedTrend = React81__default.useMemo(() => {
|
|
47627
47451
|
if (manualTrend !== void 0) return manualTrend;
|
|
47628
47452
|
if (previousValue === void 0 || currentValue === void 0)
|
|
47629
47453
|
return void 0;
|
|
@@ -48589,7 +48413,7 @@ var init_Timeline = __esm({
|
|
|
48589
48413
|
}) => {
|
|
48590
48414
|
const { t } = useTranslate();
|
|
48591
48415
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
48592
|
-
const items =
|
|
48416
|
+
const items = React81__default.useMemo(() => {
|
|
48593
48417
|
if (propItems) return propItems;
|
|
48594
48418
|
if (entityData.length === 0) return [];
|
|
48595
48419
|
return entityData.map((record, idx) => {
|
|
@@ -48696,7 +48520,7 @@ var init_Timeline = __esm({
|
|
|
48696
48520
|
}
|
|
48697
48521
|
});
|
|
48698
48522
|
function extractToastProps(children) {
|
|
48699
|
-
if (!
|
|
48523
|
+
if (!React81__default.isValidElement(children)) {
|
|
48700
48524
|
if (typeof children === "string") {
|
|
48701
48525
|
return { message: children };
|
|
48702
48526
|
}
|
|
@@ -48734,7 +48558,7 @@ var init_ToastSlot = __esm({
|
|
|
48734
48558
|
eventBus.emit("UI:CLOSE");
|
|
48735
48559
|
};
|
|
48736
48560
|
if (!isVisible) return null;
|
|
48737
|
-
const isCustomContent =
|
|
48561
|
+
const isCustomContent = React81__default.isValidElement(children) && !message;
|
|
48738
48562
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
48739
48563
|
Toast,
|
|
48740
48564
|
{
|
|
@@ -49603,7 +49427,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
49603
49427
|
}
|
|
49604
49428
|
});
|
|
49605
49429
|
function lazyThree(name, loader) {
|
|
49606
|
-
const Lazy =
|
|
49430
|
+
const Lazy = React81__default.lazy(
|
|
49607
49431
|
() => loader().then((m) => {
|
|
49608
49432
|
const Resolved = m[name];
|
|
49609
49433
|
if (!Resolved) {
|
|
@@ -49615,13 +49439,13 @@ function lazyThree(name, loader) {
|
|
|
49615
49439
|
})
|
|
49616
49440
|
);
|
|
49617
49441
|
function ThreeWrapper(props) {
|
|
49618
|
-
return
|
|
49442
|
+
return React81__default.createElement(
|
|
49619
49443
|
ThreeBoundary,
|
|
49620
49444
|
{ name },
|
|
49621
|
-
|
|
49622
|
-
|
|
49445
|
+
React81__default.createElement(
|
|
49446
|
+
React81__default.Suspense,
|
|
49623
49447
|
{ fallback: null },
|
|
49624
|
-
|
|
49448
|
+
React81__default.createElement(Lazy, props)
|
|
49625
49449
|
)
|
|
49626
49450
|
);
|
|
49627
49451
|
}
|
|
@@ -49919,7 +49743,7 @@ var init_component_registry_generated = __esm({
|
|
|
49919
49743
|
init_WorldMapBoard();
|
|
49920
49744
|
init_WorldMapTemplate();
|
|
49921
49745
|
init_XPBar();
|
|
49922
|
-
ThreeBoundary = class extends
|
|
49746
|
+
ThreeBoundary = class extends React81__default.Component {
|
|
49923
49747
|
constructor() {
|
|
49924
49748
|
super(...arguments);
|
|
49925
49749
|
__publicField(this, "state", { failed: false });
|
|
@@ -49929,7 +49753,7 @@ var init_component_registry_generated = __esm({
|
|
|
49929
49753
|
}
|
|
49930
49754
|
render() {
|
|
49931
49755
|
if (this.state.failed) {
|
|
49932
|
-
return
|
|
49756
|
+
return React81__default.createElement(
|
|
49933
49757
|
"div",
|
|
49934
49758
|
{
|
|
49935
49759
|
"data-testid": "three-unavailable",
|
|
@@ -50270,7 +50094,7 @@ function SuspenseConfigProvider({
|
|
|
50270
50094
|
config,
|
|
50271
50095
|
children
|
|
50272
50096
|
}) {
|
|
50273
|
-
return
|
|
50097
|
+
return React81__default.createElement(
|
|
50274
50098
|
SuspenseConfigContext.Provider,
|
|
50275
50099
|
{ value: config },
|
|
50276
50100
|
children
|
|
@@ -50760,7 +50584,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
50760
50584
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
50761
50585
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
50762
50586
|
}
|
|
50763
|
-
return /* @__PURE__ */ jsx(
|
|
50587
|
+
return /* @__PURE__ */ jsx(React81__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
50764
50588
|
}
|
|
50765
50589
|
if (!child || typeof child !== "object") return null;
|
|
50766
50590
|
const childId = `${parentId}-${index}`;
|
|
@@ -50800,14 +50624,14 @@ function isPatternConfig(value) {
|
|
|
50800
50624
|
if (value === null || value === void 0) return false;
|
|
50801
50625
|
if (typeof value !== "object") return false;
|
|
50802
50626
|
if (Array.isArray(value)) return false;
|
|
50803
|
-
if (
|
|
50627
|
+
if (React81__default.isValidElement(value)) return false;
|
|
50804
50628
|
if (value instanceof Date) return false;
|
|
50805
50629
|
if (typeof value === "function") return false;
|
|
50806
50630
|
const record = value;
|
|
50807
50631
|
return "type" in record && typeof record.type === "string";
|
|
50808
50632
|
}
|
|
50809
50633
|
function isPlainConfigObject(value) {
|
|
50810
|
-
if (
|
|
50634
|
+
if (React81__default.isValidElement(value)) return false;
|
|
50811
50635
|
if (value instanceof Date) return false;
|
|
50812
50636
|
const proto = Object.getPrototypeOf(value);
|
|
50813
50637
|
return proto === Object.prototype || proto === null;
|
|
@@ -51235,7 +51059,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
51235
51059
|
if (Array.isArray(body)) {
|
|
51236
51060
|
return body.map((b) => recur(b));
|
|
51237
51061
|
}
|
|
51238
|
-
if (body !== null && typeof body === "object" && !
|
|
51062
|
+
if (body !== null && typeof body === "object" && !React81__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
51239
51063
|
const out = {};
|
|
51240
51064
|
for (const [k, v] of Object.entries(body)) {
|
|
51241
51065
|
out[k] = recur(v);
|
|
@@ -51254,7 +51078,7 @@ function getSlotContentRenderer2() {
|
|
|
51254
51078
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
51255
51079
|
return (item, index) => {
|
|
51256
51080
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
51257
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
51081
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React81__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
51258
51082
|
return null;
|
|
51259
51083
|
}
|
|
51260
51084
|
const record = resolvedBody;
|
|
@@ -51273,7 +51097,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
51273
51097
|
props: childProps,
|
|
51274
51098
|
priority: 0
|
|
51275
51099
|
};
|
|
51276
|
-
return
|
|
51100
|
+
return React81__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
51277
51101
|
};
|
|
51278
51102
|
}
|
|
51279
51103
|
function convertNode(node, callerKey) {
|
|
@@ -51292,7 +51116,7 @@ function convertNode(node, callerKey) {
|
|
|
51292
51116
|
});
|
|
51293
51117
|
return anyChanged ? mapped : node;
|
|
51294
51118
|
}
|
|
51295
|
-
if (typeof node === "object" && !
|
|
51119
|
+
if (typeof node === "object" && !React81__default.isValidElement(node) && !(node instanceof Date)) {
|
|
51296
51120
|
return convertObjectProps(node);
|
|
51297
51121
|
}
|
|
51298
51122
|
return node;
|
|
@@ -52126,7 +51950,7 @@ function clearSchemaCache() {
|
|
|
52126
51950
|
|
|
52127
51951
|
// runtime/index.ts
|
|
52128
51952
|
init_EntitySchemaContext();
|
|
52129
|
-
var
|
|
51953
|
+
var log11 = createLogger("almadar:ui:trait-provider");
|
|
52130
51954
|
var TraitContext = createContext(null);
|
|
52131
51955
|
function TraitProvider({
|
|
52132
51956
|
traits: traitBindings,
|
|
@@ -52143,7 +51967,7 @@ function TraitProvider({
|
|
|
52143
51967
|
currentState: stateName,
|
|
52144
51968
|
availableEvents: trait.transitions.filter((t) => t.from === stateName).map((t) => t.event),
|
|
52145
51969
|
dispatch: (eventKey, payload) => {
|
|
52146
|
-
|
|
51970
|
+
log11.debug("Dispatch", () => ({
|
|
52147
51971
|
trait: trait.name,
|
|
52148
51972
|
event: eventKey,
|
|
52149
51973
|
payloadKeys: payload ? Object.keys(payload) : []
|
|
@@ -52486,9 +52310,175 @@ function ServerBridgeProvider({
|
|
|
52486
52310
|
}, [schema, registerSchema, unregisterSchema]);
|
|
52487
52311
|
return /* @__PURE__ */ jsx(ServerBridgeContext.Provider, { value: { connected, sendEvent }, children });
|
|
52488
52312
|
}
|
|
52489
|
-
|
|
52490
|
-
|
|
52491
|
-
|
|
52313
|
+
createLogger("almadar:ui:theme");
|
|
52314
|
+
var BUILT_IN_THEMES = [
|
|
52315
|
+
{
|
|
52316
|
+
name: "wireframe",
|
|
52317
|
+
displayName: "Wireframe",
|
|
52318
|
+
hasLightMode: true,
|
|
52319
|
+
hasDarkMode: true
|
|
52320
|
+
},
|
|
52321
|
+
{
|
|
52322
|
+
name: "minimalist",
|
|
52323
|
+
displayName: "Minimalist",
|
|
52324
|
+
hasLightMode: true,
|
|
52325
|
+
hasDarkMode: true
|
|
52326
|
+
},
|
|
52327
|
+
{
|
|
52328
|
+
name: "almadar",
|
|
52329
|
+
displayName: "Almadar",
|
|
52330
|
+
hasLightMode: true,
|
|
52331
|
+
hasDarkMode: true
|
|
52332
|
+
},
|
|
52333
|
+
{
|
|
52334
|
+
name: "trait-wars",
|
|
52335
|
+
displayName: "Trait Wars",
|
|
52336
|
+
hasLightMode: false,
|
|
52337
|
+
hasDarkMode: true
|
|
52338
|
+
},
|
|
52339
|
+
// Extended themes
|
|
52340
|
+
{
|
|
52341
|
+
name: "ocean",
|
|
52342
|
+
displayName: "Ocean",
|
|
52343
|
+
hasLightMode: true,
|
|
52344
|
+
hasDarkMode: true
|
|
52345
|
+
},
|
|
52346
|
+
{
|
|
52347
|
+
name: "forest",
|
|
52348
|
+
displayName: "Forest",
|
|
52349
|
+
hasLightMode: true,
|
|
52350
|
+
hasDarkMode: true
|
|
52351
|
+
},
|
|
52352
|
+
{
|
|
52353
|
+
name: "sunset",
|
|
52354
|
+
displayName: "Sunset",
|
|
52355
|
+
hasLightMode: true,
|
|
52356
|
+
hasDarkMode: true
|
|
52357
|
+
},
|
|
52358
|
+
{
|
|
52359
|
+
name: "lavender",
|
|
52360
|
+
displayName: "Lavender",
|
|
52361
|
+
hasLightMode: true,
|
|
52362
|
+
hasDarkMode: true
|
|
52363
|
+
},
|
|
52364
|
+
{
|
|
52365
|
+
name: "rose",
|
|
52366
|
+
displayName: "Rose",
|
|
52367
|
+
hasLightMode: true,
|
|
52368
|
+
hasDarkMode: true
|
|
52369
|
+
},
|
|
52370
|
+
{
|
|
52371
|
+
name: "slate",
|
|
52372
|
+
displayName: "Slate",
|
|
52373
|
+
hasLightMode: true,
|
|
52374
|
+
hasDarkMode: true
|
|
52375
|
+
},
|
|
52376
|
+
{
|
|
52377
|
+
name: "ember",
|
|
52378
|
+
displayName: "Ember",
|
|
52379
|
+
hasLightMode: true,
|
|
52380
|
+
hasDarkMode: true
|
|
52381
|
+
},
|
|
52382
|
+
{
|
|
52383
|
+
name: "midnight",
|
|
52384
|
+
displayName: "Midnight",
|
|
52385
|
+
hasLightMode: true,
|
|
52386
|
+
hasDarkMode: true
|
|
52387
|
+
},
|
|
52388
|
+
{
|
|
52389
|
+
name: "sand",
|
|
52390
|
+
displayName: "Sand",
|
|
52391
|
+
hasLightMode: true,
|
|
52392
|
+
hasDarkMode: true
|
|
52393
|
+
},
|
|
52394
|
+
{
|
|
52395
|
+
name: "neon",
|
|
52396
|
+
displayName: "Neon",
|
|
52397
|
+
hasLightMode: true,
|
|
52398
|
+
hasDarkMode: true
|
|
52399
|
+
},
|
|
52400
|
+
{
|
|
52401
|
+
name: "arctic",
|
|
52402
|
+
displayName: "Arctic",
|
|
52403
|
+
hasLightMode: true,
|
|
52404
|
+
hasDarkMode: true
|
|
52405
|
+
},
|
|
52406
|
+
{
|
|
52407
|
+
name: "copper",
|
|
52408
|
+
displayName: "Copper",
|
|
52409
|
+
hasLightMode: true,
|
|
52410
|
+
hasDarkMode: true
|
|
52411
|
+
},
|
|
52412
|
+
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
52413
|
+
{
|
|
52414
|
+
name: "prism",
|
|
52415
|
+
displayName: "Prism",
|
|
52416
|
+
hasLightMode: true,
|
|
52417
|
+
hasDarkMode: true
|
|
52418
|
+
},
|
|
52419
|
+
{
|
|
52420
|
+
name: "gazette",
|
|
52421
|
+
displayName: "Gazette",
|
|
52422
|
+
hasLightMode: true,
|
|
52423
|
+
hasDarkMode: true
|
|
52424
|
+
},
|
|
52425
|
+
{
|
|
52426
|
+
name: "terminal",
|
|
52427
|
+
displayName: "Terminal",
|
|
52428
|
+
hasLightMode: true,
|
|
52429
|
+
hasDarkMode: true
|
|
52430
|
+
},
|
|
52431
|
+
{
|
|
52432
|
+
name: "atelier",
|
|
52433
|
+
displayName: "Atelier",
|
|
52434
|
+
hasLightMode: true,
|
|
52435
|
+
hasDarkMode: true
|
|
52436
|
+
},
|
|
52437
|
+
{
|
|
52438
|
+
name: "kiosk",
|
|
52439
|
+
displayName: "Kiosk",
|
|
52440
|
+
hasLightMode: true,
|
|
52441
|
+
hasDarkMode: true
|
|
52442
|
+
},
|
|
52443
|
+
{
|
|
52444
|
+
name: "linear-clean",
|
|
52445
|
+
displayName: "Linear Clean",
|
|
52446
|
+
hasLightMode: true,
|
|
52447
|
+
hasDarkMode: true
|
|
52448
|
+
},
|
|
52449
|
+
{
|
|
52450
|
+
name: "notion-editorial",
|
|
52451
|
+
displayName: "Notion Editorial",
|
|
52452
|
+
hasLightMode: true,
|
|
52453
|
+
hasDarkMode: true
|
|
52454
|
+
},
|
|
52455
|
+
{
|
|
52456
|
+
name: "bloomberg-dense",
|
|
52457
|
+
displayName: "Bloomberg Dense",
|
|
52458
|
+
hasLightMode: true,
|
|
52459
|
+
hasDarkMode: true
|
|
52460
|
+
}
|
|
52461
|
+
];
|
|
52462
|
+
var ThemeContext = createContext(void 0);
|
|
52463
|
+
function useTheme2() {
|
|
52464
|
+
const context = useContext(ThemeContext);
|
|
52465
|
+
if (context === void 0) {
|
|
52466
|
+
return {
|
|
52467
|
+
theme: "wireframe",
|
|
52468
|
+
mode: "light",
|
|
52469
|
+
resolvedMode: "light",
|
|
52470
|
+
setTheme: () => {
|
|
52471
|
+
},
|
|
52472
|
+
setMode: () => {
|
|
52473
|
+
},
|
|
52474
|
+
toggleMode: () => {
|
|
52475
|
+
},
|
|
52476
|
+
availableThemes: BUILT_IN_THEMES,
|
|
52477
|
+
appliedTheme: "wireframe-light"
|
|
52478
|
+
};
|
|
52479
|
+
}
|
|
52480
|
+
return context;
|
|
52481
|
+
}
|
|
52492
52482
|
|
|
52493
52483
|
// context/themeTokens.ts
|
|
52494
52484
|
function themeTokensToCssVars(tokens, mode = "light", darkVariant) {
|
|
@@ -52707,7 +52697,7 @@ function resolveThemeForRuntime(theme) {
|
|
|
52707
52697
|
}
|
|
52708
52698
|
function OrbitalThemeProvider({ theme, children }) {
|
|
52709
52699
|
const resolved = resolveThemeForRuntime(theme);
|
|
52710
|
-
const { resolvedMode } =
|
|
52700
|
+
const { resolvedMode } = useTheme2();
|
|
52711
52701
|
if (!resolved) {
|
|
52712
52702
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
52713
52703
|
}
|