@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/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React76 from 'react';
|
|
3
|
+
import React76__default, { useContext, useMemo, useRef, useEffect, useCallback, useState, Suspense, lazy, createContext, useLayoutEffect, useId, forwardRef, useImperativeHandle, useSyncExternalStore, Component } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -9,6 +9,7 @@ import * as LucideIcons2 from 'lucide-react';
|
|
|
9
9
|
import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, CheckCircle, XCircle, Wrench, RotateCcw, Send, Play, Terminal, Search, ChevronUp, ChevronDown, MoreHorizontal, Bug, Package, Calendar, Pencil, Eye, Image as Image$1, Upload, ZoomIn, ArrowRight, TrendingUp, TrendingDown, Minus, AlertCircle, Circle, Clock, CheckCircle2, Pause, SkipForward, Code, FileText, WrapText, Check, Copy, HelpCircle, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, GitBranch, Plus, Trash, ArrowLeft, Menu as Menu$1, AlertTriangle, Trash2, Eraser, ZoomOut, Download, Lightbulb, PauseCircle, Link2, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
10
10
|
import { useTranslate } from '@almadar/ui/hooks';
|
|
11
11
|
export * from '@almadar/ui/hooks';
|
|
12
|
+
import { useUISlots, useTheme } from '@almadar/ui/context';
|
|
12
13
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
13
14
|
import { createPortal } from 'react-dom';
|
|
14
15
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
@@ -47,7 +48,6 @@ import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
|
47
48
|
import { GLTFLoader as GLTFLoader$1 } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
48
49
|
import { Canvas, useThree } from '@react-three/fiber';
|
|
49
50
|
import { Grid as Grid$1, OrbitControls } from '@react-three/drei';
|
|
50
|
-
import { useUISlots } from '@almadar/ui/context';
|
|
51
51
|
import { getPatternDefinition as getPatternDefinition$1, getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
|
|
52
52
|
|
|
53
53
|
var __defProp = Object.defineProperty;
|
|
@@ -233,7 +233,7 @@ var init_SvgFlow = __esm({
|
|
|
233
233
|
width = 100,
|
|
234
234
|
height = 100
|
|
235
235
|
}) => {
|
|
236
|
-
const markerId =
|
|
236
|
+
const markerId = React76__default.useMemo(() => {
|
|
237
237
|
flowIdCounter += 1;
|
|
238
238
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
239
239
|
}, []);
|
|
@@ -826,7 +826,7 @@ var init_SvgRing = __esm({
|
|
|
826
826
|
width = 100,
|
|
827
827
|
height = 100
|
|
828
828
|
}) => {
|
|
829
|
-
const gradientId =
|
|
829
|
+
const gradientId = React76__default.useMemo(() => {
|
|
830
830
|
ringIdCounter += 1;
|
|
831
831
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
832
832
|
}, []);
|
|
@@ -1238,7 +1238,7 @@ function loadLib(key, importer) {
|
|
|
1238
1238
|
return p2;
|
|
1239
1239
|
}
|
|
1240
1240
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
1241
|
-
const Lazy =
|
|
1241
|
+
const Lazy = React76__default.lazy(async () => {
|
|
1242
1242
|
const lib = await loadLib(libKey, importer);
|
|
1243
1243
|
const Comp = pick(lib);
|
|
1244
1244
|
if (!Comp) {
|
|
@@ -1248,7 +1248,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
1248
1248
|
return { default: Comp };
|
|
1249
1249
|
});
|
|
1250
1250
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
1251
|
-
|
|
1251
|
+
React76__default.Suspense,
|
|
1252
1252
|
{
|
|
1253
1253
|
fallback: /* @__PURE__ */ jsx(
|
|
1254
1254
|
"span",
|
|
@@ -1974,7 +1974,7 @@ var init_Icon = __esm({
|
|
|
1974
1974
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1975
1975
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1976
1976
|
const family = useIconFamily();
|
|
1977
|
-
const RenderedComponent =
|
|
1977
|
+
const RenderedComponent = React76__default.useMemo(() => {
|
|
1978
1978
|
if (directIcon) return null;
|
|
1979
1979
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1980
1980
|
}, [directIcon, effectiveName, family]);
|
|
@@ -2033,7 +2033,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2033
2033
|
const IconComp = value;
|
|
2034
2034
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
2035
2035
|
}
|
|
2036
|
-
if (
|
|
2036
|
+
if (React76__default.isValidElement(value)) {
|
|
2037
2037
|
return value;
|
|
2038
2038
|
}
|
|
2039
2039
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -2109,7 +2109,7 @@ var init_Button = __esm({
|
|
|
2109
2109
|
md: "h-icon-default w-icon-default",
|
|
2110
2110
|
lg: "h-icon-default w-icon-default"
|
|
2111
2111
|
};
|
|
2112
|
-
Button =
|
|
2112
|
+
Button = React76__default.forwardRef(
|
|
2113
2113
|
({
|
|
2114
2114
|
className,
|
|
2115
2115
|
variant = "primary",
|
|
@@ -2176,7 +2176,7 @@ var init_Input = __esm({
|
|
|
2176
2176
|
init_cn();
|
|
2177
2177
|
init_Icon();
|
|
2178
2178
|
init_useEventBus();
|
|
2179
|
-
Input =
|
|
2179
|
+
Input = React76__default.forwardRef(
|
|
2180
2180
|
({
|
|
2181
2181
|
className,
|
|
2182
2182
|
inputType,
|
|
@@ -2336,7 +2336,7 @@ var Label;
|
|
|
2336
2336
|
var init_Label = __esm({
|
|
2337
2337
|
"components/core/atoms/Label.tsx"() {
|
|
2338
2338
|
init_cn();
|
|
2339
|
-
Label =
|
|
2339
|
+
Label = React76__default.forwardRef(
|
|
2340
2340
|
({ className, required, children, ...props }, ref) => {
|
|
2341
2341
|
return /* @__PURE__ */ jsxs(
|
|
2342
2342
|
"label",
|
|
@@ -2363,7 +2363,7 @@ var init_Textarea = __esm({
|
|
|
2363
2363
|
"components/core/atoms/Textarea.tsx"() {
|
|
2364
2364
|
init_cn();
|
|
2365
2365
|
init_useEventBus();
|
|
2366
|
-
Textarea =
|
|
2366
|
+
Textarea = React76__default.forwardRef(
|
|
2367
2367
|
({ className, error, onChange, ...props }, ref) => {
|
|
2368
2368
|
const eventBus = useEventBus();
|
|
2369
2369
|
const handleChange = (e) => {
|
|
@@ -2602,7 +2602,7 @@ var init_Select = __esm({
|
|
|
2602
2602
|
init_cn();
|
|
2603
2603
|
init_Icon();
|
|
2604
2604
|
init_useEventBus();
|
|
2605
|
-
Select =
|
|
2605
|
+
Select = React76__default.forwardRef(
|
|
2606
2606
|
(props, _ref) => {
|
|
2607
2607
|
const { multiple, searchable, clearable } = props;
|
|
2608
2608
|
if (multiple || searchable || clearable) {
|
|
@@ -2619,7 +2619,7 @@ var init_Checkbox = __esm({
|
|
|
2619
2619
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2620
2620
|
init_cn();
|
|
2621
2621
|
init_useEventBus();
|
|
2622
|
-
Checkbox =
|
|
2622
|
+
Checkbox = React76__default.forwardRef(
|
|
2623
2623
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
2624
2624
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2625
2625
|
const eventBus = useEventBus();
|
|
@@ -2673,7 +2673,7 @@ var init_Spinner = __esm({
|
|
|
2673
2673
|
md: "h-6 w-6",
|
|
2674
2674
|
lg: "h-8 w-8"
|
|
2675
2675
|
};
|
|
2676
|
-
Spinner =
|
|
2676
|
+
Spinner = React76__default.forwardRef(
|
|
2677
2677
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
2678
2678
|
if (overlay) {
|
|
2679
2679
|
return /* @__PURE__ */ jsx(
|
|
@@ -2763,7 +2763,7 @@ var init_Card = __esm({
|
|
|
2763
2763
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2764
2764
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2765
2765
|
};
|
|
2766
|
-
Card =
|
|
2766
|
+
Card = React76__default.forwardRef(
|
|
2767
2767
|
({
|
|
2768
2768
|
className,
|
|
2769
2769
|
variant = "bordered",
|
|
@@ -2811,9 +2811,9 @@ var init_Card = __esm({
|
|
|
2811
2811
|
}
|
|
2812
2812
|
);
|
|
2813
2813
|
Card.displayName = "Card";
|
|
2814
|
-
CardHeader =
|
|
2814
|
+
CardHeader = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2815
2815
|
CardHeader.displayName = "CardHeader";
|
|
2816
|
-
CardTitle =
|
|
2816
|
+
CardTitle = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2817
2817
|
"h3",
|
|
2818
2818
|
{
|
|
2819
2819
|
ref,
|
|
@@ -2826,11 +2826,11 @@ var init_Card = __esm({
|
|
|
2826
2826
|
}
|
|
2827
2827
|
));
|
|
2828
2828
|
CardTitle.displayName = "CardTitle";
|
|
2829
|
-
CardContent =
|
|
2829
|
+
CardContent = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2830
2830
|
CardContent.displayName = "CardContent";
|
|
2831
2831
|
CardBody = CardContent;
|
|
2832
2832
|
CardBody.displayName = "CardBody";
|
|
2833
|
-
CardFooter =
|
|
2833
|
+
CardFooter = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2834
2834
|
"div",
|
|
2835
2835
|
{
|
|
2836
2836
|
ref,
|
|
@@ -2883,7 +2883,7 @@ var init_Badge = __esm({
|
|
|
2883
2883
|
md: "px-2.5 py-1 text-sm",
|
|
2884
2884
|
lg: "px-3 py-1.5 text-base"
|
|
2885
2885
|
};
|
|
2886
|
-
Badge =
|
|
2886
|
+
Badge = React76__default.forwardRef(
|
|
2887
2887
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2888
2888
|
const iconSizes3 = {
|
|
2889
2889
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2976,7 +2976,7 @@ var init_FilterPill = __esm({
|
|
|
2976
2976
|
md: "w-3.5 h-3.5",
|
|
2977
2977
|
lg: "w-4 h-4"
|
|
2978
2978
|
};
|
|
2979
|
-
FilterPill =
|
|
2979
|
+
FilterPill = React76__default.forwardRef(
|
|
2980
2980
|
({
|
|
2981
2981
|
className,
|
|
2982
2982
|
variant = "default",
|
|
@@ -3105,8 +3105,8 @@ var init_Avatar = __esm({
|
|
|
3105
3105
|
actionPayload
|
|
3106
3106
|
}) => {
|
|
3107
3107
|
const eventBus = useEventBus();
|
|
3108
|
-
const [imgFailed, setImgFailed] =
|
|
3109
|
-
|
|
3108
|
+
const [imgFailed, setImgFailed] = React76__default.useState(false);
|
|
3109
|
+
React76__default.useEffect(() => {
|
|
3110
3110
|
setImgFailed(false);
|
|
3111
3111
|
}, [src]);
|
|
3112
3112
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3310,7 +3310,7 @@ var init_Box = __esm({
|
|
|
3310
3310
|
fixed: "fixed",
|
|
3311
3311
|
sticky: "sticky"
|
|
3312
3312
|
};
|
|
3313
|
-
Box =
|
|
3313
|
+
Box = React76__default.forwardRef(
|
|
3314
3314
|
({
|
|
3315
3315
|
padding,
|
|
3316
3316
|
paddingX,
|
|
@@ -3360,7 +3360,7 @@ var init_Box = __esm({
|
|
|
3360
3360
|
onMouseLeave?.(e);
|
|
3361
3361
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
3362
3362
|
const isClickable = action || onClick;
|
|
3363
|
-
return
|
|
3363
|
+
return React76__default.createElement(
|
|
3364
3364
|
Component2,
|
|
3365
3365
|
{
|
|
3366
3366
|
ref,
|
|
@@ -3685,7 +3685,7 @@ var init_Radio = __esm({
|
|
|
3685
3685
|
md: "w-2.5 h-2.5",
|
|
3686
3686
|
lg: "w-3 h-3"
|
|
3687
3687
|
};
|
|
3688
|
-
Radio =
|
|
3688
|
+
Radio = React76__default.forwardRef(
|
|
3689
3689
|
({
|
|
3690
3690
|
label,
|
|
3691
3691
|
helperText,
|
|
@@ -3702,12 +3702,12 @@ var init_Radio = __esm({
|
|
|
3702
3702
|
onChange,
|
|
3703
3703
|
...props
|
|
3704
3704
|
}, ref) => {
|
|
3705
|
-
const reactId =
|
|
3705
|
+
const reactId = React76__default.useId();
|
|
3706
3706
|
const baseId = id || `radio-${reactId}`;
|
|
3707
3707
|
const hasError = !!error;
|
|
3708
3708
|
const eventBus = useEventBus();
|
|
3709
|
-
const [selected, setSelected] =
|
|
3710
|
-
|
|
3709
|
+
const [selected, setSelected] = React76__default.useState(value);
|
|
3710
|
+
React76__default.useEffect(() => {
|
|
3711
3711
|
if (value !== void 0) setSelected(value);
|
|
3712
3712
|
}, [value]);
|
|
3713
3713
|
const pick = (next, e) => {
|
|
@@ -3889,7 +3889,7 @@ var init_Switch = __esm({
|
|
|
3889
3889
|
"components/core/atoms/Switch.tsx"() {
|
|
3890
3890
|
"use client";
|
|
3891
3891
|
init_cn();
|
|
3892
|
-
Switch =
|
|
3892
|
+
Switch = React76.forwardRef(
|
|
3893
3893
|
({
|
|
3894
3894
|
checked,
|
|
3895
3895
|
defaultChecked = false,
|
|
@@ -3900,10 +3900,10 @@ var init_Switch = __esm({
|
|
|
3900
3900
|
name,
|
|
3901
3901
|
className
|
|
3902
3902
|
}, ref) => {
|
|
3903
|
-
const [isChecked, setIsChecked] =
|
|
3903
|
+
const [isChecked, setIsChecked] = React76.useState(
|
|
3904
3904
|
checked !== void 0 ? checked : defaultChecked
|
|
3905
3905
|
);
|
|
3906
|
-
|
|
3906
|
+
React76.useEffect(() => {
|
|
3907
3907
|
if (checked !== void 0) {
|
|
3908
3908
|
setIsChecked(checked);
|
|
3909
3909
|
}
|
|
@@ -4277,188 +4277,12 @@ var init_Typography = __esm({
|
|
|
4277
4277
|
Typography.displayName = "Typography";
|
|
4278
4278
|
}
|
|
4279
4279
|
});
|
|
4280
|
-
function useTheme() {
|
|
4281
|
-
const context = useContext(ThemeContext);
|
|
4282
|
-
if (context === void 0) {
|
|
4283
|
-
return {
|
|
4284
|
-
theme: "wireframe",
|
|
4285
|
-
mode: "light",
|
|
4286
|
-
resolvedMode: "light",
|
|
4287
|
-
setTheme: () => {
|
|
4288
|
-
},
|
|
4289
|
-
setMode: () => {
|
|
4290
|
-
},
|
|
4291
|
-
toggleMode: () => {
|
|
4292
|
-
},
|
|
4293
|
-
availableThemes: BUILT_IN_THEMES,
|
|
4294
|
-
appliedTheme: "wireframe-light"
|
|
4295
|
-
};
|
|
4296
|
-
}
|
|
4297
|
-
return context;
|
|
4298
|
-
}
|
|
4299
|
-
var BUILT_IN_THEMES, ThemeContext;
|
|
4300
|
-
var init_ThemeContext = __esm({
|
|
4301
|
-
"context/ThemeContext.tsx"() {
|
|
4302
|
-
"use client";
|
|
4303
|
-
createLogger("almadar:ui:theme");
|
|
4304
|
-
BUILT_IN_THEMES = [
|
|
4305
|
-
{
|
|
4306
|
-
name: "wireframe",
|
|
4307
|
-
displayName: "Wireframe",
|
|
4308
|
-
hasLightMode: true,
|
|
4309
|
-
hasDarkMode: true
|
|
4310
|
-
},
|
|
4311
|
-
{
|
|
4312
|
-
name: "minimalist",
|
|
4313
|
-
displayName: "Minimalist",
|
|
4314
|
-
hasLightMode: true,
|
|
4315
|
-
hasDarkMode: true
|
|
4316
|
-
},
|
|
4317
|
-
{
|
|
4318
|
-
name: "almadar",
|
|
4319
|
-
displayName: "Almadar",
|
|
4320
|
-
hasLightMode: true,
|
|
4321
|
-
hasDarkMode: true
|
|
4322
|
-
},
|
|
4323
|
-
{
|
|
4324
|
-
name: "trait-wars",
|
|
4325
|
-
displayName: "Trait Wars",
|
|
4326
|
-
hasLightMode: false,
|
|
4327
|
-
hasDarkMode: true
|
|
4328
|
-
},
|
|
4329
|
-
// Extended themes
|
|
4330
|
-
{
|
|
4331
|
-
name: "ocean",
|
|
4332
|
-
displayName: "Ocean",
|
|
4333
|
-
hasLightMode: true,
|
|
4334
|
-
hasDarkMode: true
|
|
4335
|
-
},
|
|
4336
|
-
{
|
|
4337
|
-
name: "forest",
|
|
4338
|
-
displayName: "Forest",
|
|
4339
|
-
hasLightMode: true,
|
|
4340
|
-
hasDarkMode: true
|
|
4341
|
-
},
|
|
4342
|
-
{
|
|
4343
|
-
name: "sunset",
|
|
4344
|
-
displayName: "Sunset",
|
|
4345
|
-
hasLightMode: true,
|
|
4346
|
-
hasDarkMode: true
|
|
4347
|
-
},
|
|
4348
|
-
{
|
|
4349
|
-
name: "lavender",
|
|
4350
|
-
displayName: "Lavender",
|
|
4351
|
-
hasLightMode: true,
|
|
4352
|
-
hasDarkMode: true
|
|
4353
|
-
},
|
|
4354
|
-
{
|
|
4355
|
-
name: "rose",
|
|
4356
|
-
displayName: "Rose",
|
|
4357
|
-
hasLightMode: true,
|
|
4358
|
-
hasDarkMode: true
|
|
4359
|
-
},
|
|
4360
|
-
{
|
|
4361
|
-
name: "slate",
|
|
4362
|
-
displayName: "Slate",
|
|
4363
|
-
hasLightMode: true,
|
|
4364
|
-
hasDarkMode: true
|
|
4365
|
-
},
|
|
4366
|
-
{
|
|
4367
|
-
name: "ember",
|
|
4368
|
-
displayName: "Ember",
|
|
4369
|
-
hasLightMode: true,
|
|
4370
|
-
hasDarkMode: true
|
|
4371
|
-
},
|
|
4372
|
-
{
|
|
4373
|
-
name: "midnight",
|
|
4374
|
-
displayName: "Midnight",
|
|
4375
|
-
hasLightMode: true,
|
|
4376
|
-
hasDarkMode: true
|
|
4377
|
-
},
|
|
4378
|
-
{
|
|
4379
|
-
name: "sand",
|
|
4380
|
-
displayName: "Sand",
|
|
4381
|
-
hasLightMode: true,
|
|
4382
|
-
hasDarkMode: true
|
|
4383
|
-
},
|
|
4384
|
-
{
|
|
4385
|
-
name: "neon",
|
|
4386
|
-
displayName: "Neon",
|
|
4387
|
-
hasLightMode: true,
|
|
4388
|
-
hasDarkMode: true
|
|
4389
|
-
},
|
|
4390
|
-
{
|
|
4391
|
-
name: "arctic",
|
|
4392
|
-
displayName: "Arctic",
|
|
4393
|
-
hasLightMode: true,
|
|
4394
|
-
hasDarkMode: true
|
|
4395
|
-
},
|
|
4396
|
-
{
|
|
4397
|
-
name: "copper",
|
|
4398
|
-
displayName: "Copper",
|
|
4399
|
-
hasLightMode: true,
|
|
4400
|
-
hasDarkMode: true
|
|
4401
|
-
},
|
|
4402
|
-
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
4403
|
-
{
|
|
4404
|
-
name: "prism",
|
|
4405
|
-
displayName: "Prism",
|
|
4406
|
-
hasLightMode: true,
|
|
4407
|
-
hasDarkMode: true
|
|
4408
|
-
},
|
|
4409
|
-
{
|
|
4410
|
-
name: "gazette",
|
|
4411
|
-
displayName: "Gazette",
|
|
4412
|
-
hasLightMode: true,
|
|
4413
|
-
hasDarkMode: true
|
|
4414
|
-
},
|
|
4415
|
-
{
|
|
4416
|
-
name: "terminal",
|
|
4417
|
-
displayName: "Terminal",
|
|
4418
|
-
hasLightMode: true,
|
|
4419
|
-
hasDarkMode: true
|
|
4420
|
-
},
|
|
4421
|
-
{
|
|
4422
|
-
name: "atelier",
|
|
4423
|
-
displayName: "Atelier",
|
|
4424
|
-
hasLightMode: true,
|
|
4425
|
-
hasDarkMode: true
|
|
4426
|
-
},
|
|
4427
|
-
{
|
|
4428
|
-
name: "kiosk",
|
|
4429
|
-
displayName: "Kiosk",
|
|
4430
|
-
hasLightMode: true,
|
|
4431
|
-
hasDarkMode: true
|
|
4432
|
-
},
|
|
4433
|
-
{
|
|
4434
|
-
name: "linear-clean",
|
|
4435
|
-
displayName: "Linear Clean",
|
|
4436
|
-
hasLightMode: true,
|
|
4437
|
-
hasDarkMode: true
|
|
4438
|
-
},
|
|
4439
|
-
{
|
|
4440
|
-
name: "notion-editorial",
|
|
4441
|
-
displayName: "Notion Editorial",
|
|
4442
|
-
hasLightMode: true,
|
|
4443
|
-
hasDarkMode: true
|
|
4444
|
-
},
|
|
4445
|
-
{
|
|
4446
|
-
name: "bloomberg-dense",
|
|
4447
|
-
displayName: "Bloomberg Dense",
|
|
4448
|
-
hasLightMode: true,
|
|
4449
|
-
hasDarkMode: true
|
|
4450
|
-
}
|
|
4451
|
-
];
|
|
4452
|
-
ThemeContext = createContext(void 0);
|
|
4453
|
-
}
|
|
4454
|
-
});
|
|
4455
4280
|
var sizeClasses4, iconSizes2, ThemeToggle;
|
|
4456
4281
|
var init_ThemeToggle = __esm({
|
|
4457
4282
|
"components/core/atoms/ThemeToggle.tsx"() {
|
|
4458
4283
|
"use client";
|
|
4459
4284
|
init_Icon();
|
|
4460
4285
|
init_cn();
|
|
4461
|
-
init_ThemeContext();
|
|
4462
4286
|
sizeClasses4 = {
|
|
4463
4287
|
sm: "p-1.5",
|
|
4464
4288
|
md: "p-2",
|
|
@@ -4521,7 +4345,6 @@ var THEME_LABELS, ThemeSelector;
|
|
|
4521
4345
|
var init_ThemeSelector = __esm({
|
|
4522
4346
|
"components/core/atoms/ThemeSelector.tsx"() {
|
|
4523
4347
|
"use client";
|
|
4524
|
-
init_ThemeContext();
|
|
4525
4348
|
THEME_LABELS = {
|
|
4526
4349
|
wireframe: {
|
|
4527
4350
|
label: "Wireframe",
|
|
@@ -4732,7 +4555,7 @@ var Dialog;
|
|
|
4732
4555
|
var init_Dialog = __esm({
|
|
4733
4556
|
"components/core/atoms/Dialog.tsx"() {
|
|
4734
4557
|
init_cn();
|
|
4735
|
-
Dialog =
|
|
4558
|
+
Dialog = React76__default.forwardRef(
|
|
4736
4559
|
({
|
|
4737
4560
|
role = "dialog",
|
|
4738
4561
|
"aria-modal": ariaModal = true,
|
|
@@ -4758,7 +4581,7 @@ var Aside;
|
|
|
4758
4581
|
var init_Aside = __esm({
|
|
4759
4582
|
"components/core/atoms/Aside.tsx"() {
|
|
4760
4583
|
init_cn();
|
|
4761
|
-
Aside =
|
|
4584
|
+
Aside = React76__default.forwardRef(
|
|
4762
4585
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4763
4586
|
);
|
|
4764
4587
|
Aside.displayName = "Aside";
|
|
@@ -4836,8 +4659,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4836
4659
|
className
|
|
4837
4660
|
}) => {
|
|
4838
4661
|
const { t } = useTranslate();
|
|
4839
|
-
const [isVisible, setIsVisible] =
|
|
4840
|
-
const timeoutRef =
|
|
4662
|
+
const [isVisible, setIsVisible] = React76__default.useState(false);
|
|
4663
|
+
const timeoutRef = React76__default.useRef(null);
|
|
4841
4664
|
const handleMouseEnter = () => {
|
|
4842
4665
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4843
4666
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4846,7 +4669,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4846
4669
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4847
4670
|
setIsVisible(false);
|
|
4848
4671
|
};
|
|
4849
|
-
|
|
4672
|
+
React76__default.useEffect(() => {
|
|
4850
4673
|
return () => {
|
|
4851
4674
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4852
4675
|
};
|
|
@@ -5056,7 +4879,7 @@ var init_StatusDot = __esm({
|
|
|
5056
4879
|
md: "w-2.5 h-2.5",
|
|
5057
4880
|
lg: "w-3 h-3"
|
|
5058
4881
|
};
|
|
5059
|
-
StatusDot =
|
|
4882
|
+
StatusDot = React76__default.forwardRef(
|
|
5060
4883
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5061
4884
|
return /* @__PURE__ */ jsx(
|
|
5062
4885
|
"span",
|
|
@@ -5110,7 +4933,7 @@ var init_TrendIndicator = __esm({
|
|
|
5110
4933
|
down: "trending-down",
|
|
5111
4934
|
flat: "arrow-right"
|
|
5112
4935
|
};
|
|
5113
|
-
TrendIndicator =
|
|
4936
|
+
TrendIndicator = React76__default.forwardRef(
|
|
5114
4937
|
({
|
|
5115
4938
|
className,
|
|
5116
4939
|
value,
|
|
@@ -5177,7 +5000,7 @@ var init_RangeSlider = __esm({
|
|
|
5177
5000
|
md: "w-4 h-4",
|
|
5178
5001
|
lg: "w-5 h-5"
|
|
5179
5002
|
};
|
|
5180
|
-
RangeSlider =
|
|
5003
|
+
RangeSlider = React76__default.forwardRef(
|
|
5181
5004
|
({
|
|
5182
5005
|
className,
|
|
5183
5006
|
min = 0,
|
|
@@ -5773,7 +5596,7 @@ var init_ContentSection = __esm({
|
|
|
5773
5596
|
md: "py-16",
|
|
5774
5597
|
lg: "py-24"
|
|
5775
5598
|
};
|
|
5776
|
-
ContentSection =
|
|
5599
|
+
ContentSection = React76__default.forwardRef(
|
|
5777
5600
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5778
5601
|
return /* @__PURE__ */ jsx(
|
|
5779
5602
|
Box,
|
|
@@ -6307,7 +6130,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6307
6130
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6308
6131
|
"none": {}
|
|
6309
6132
|
};
|
|
6310
|
-
AnimatedReveal =
|
|
6133
|
+
AnimatedReveal = React76__default.forwardRef(
|
|
6311
6134
|
({
|
|
6312
6135
|
trigger = "scroll",
|
|
6313
6136
|
animation = "fade-up",
|
|
@@ -6467,7 +6290,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6467
6290
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6468
6291
|
"use client";
|
|
6469
6292
|
init_cn();
|
|
6470
|
-
AnimatedGraphic =
|
|
6293
|
+
AnimatedGraphic = React76__default.forwardRef(
|
|
6471
6294
|
({
|
|
6472
6295
|
src,
|
|
6473
6296
|
svgContent,
|
|
@@ -6490,7 +6313,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6490
6313
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6491
6314
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6492
6315
|
const prevAnimateRef = useRef(animate);
|
|
6493
|
-
const setRef =
|
|
6316
|
+
const setRef = React76__default.useCallback(
|
|
6494
6317
|
(node) => {
|
|
6495
6318
|
containerRef.current = node;
|
|
6496
6319
|
if (typeof ref === "function") ref(node);
|
|
@@ -7172,7 +6995,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7172
6995
|
}
|
|
7173
6996
|
);
|
|
7174
6997
|
};
|
|
7175
|
-
ErrorBoundary = class extends
|
|
6998
|
+
ErrorBoundary = class extends React76__default.Component {
|
|
7176
6999
|
constructor(props) {
|
|
7177
7000
|
super(props);
|
|
7178
7001
|
__publicField(this, "reset", () => {
|
|
@@ -8292,9 +8115,9 @@ function ControlButton({
|
|
|
8292
8115
|
className
|
|
8293
8116
|
}) {
|
|
8294
8117
|
const eventBus = useEventBus();
|
|
8295
|
-
const [isPressed, setIsPressed] =
|
|
8118
|
+
const [isPressed, setIsPressed] = React76.useState(false);
|
|
8296
8119
|
const actualPressed = pressed ?? isPressed;
|
|
8297
|
-
const handlePointerDown =
|
|
8120
|
+
const handlePointerDown = React76.useCallback(
|
|
8298
8121
|
(e) => {
|
|
8299
8122
|
e.preventDefault();
|
|
8300
8123
|
if (disabled) return;
|
|
@@ -8304,7 +8127,7 @@ function ControlButton({
|
|
|
8304
8127
|
},
|
|
8305
8128
|
[disabled, pressEvent, eventBus, onPress]
|
|
8306
8129
|
);
|
|
8307
|
-
const handlePointerUp =
|
|
8130
|
+
const handlePointerUp = React76.useCallback(
|
|
8308
8131
|
(e) => {
|
|
8309
8132
|
e.preventDefault();
|
|
8310
8133
|
if (disabled) return;
|
|
@@ -8314,7 +8137,7 @@ function ControlButton({
|
|
|
8314
8137
|
},
|
|
8315
8138
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8316
8139
|
);
|
|
8317
|
-
const handlePointerLeave =
|
|
8140
|
+
const handlePointerLeave = React76.useCallback(
|
|
8318
8141
|
(e) => {
|
|
8319
8142
|
if (isPressed) {
|
|
8320
8143
|
setIsPressed(false);
|
|
@@ -8402,8 +8225,8 @@ function ActionButtons({
|
|
|
8402
8225
|
disabled
|
|
8403
8226
|
}) {
|
|
8404
8227
|
const eventBus = useEventBus();
|
|
8405
|
-
const [activeButtons, setActiveButtons] =
|
|
8406
|
-
const handlePress =
|
|
8228
|
+
const [activeButtons, setActiveButtons] = React76.useState(/* @__PURE__ */ new Set());
|
|
8229
|
+
const handlePress = React76.useCallback(
|
|
8407
8230
|
(id) => {
|
|
8408
8231
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
8409
8232
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8411,7 +8234,7 @@ function ActionButtons({
|
|
|
8411
8234
|
},
|
|
8412
8235
|
[actionEvent, eventBus, onAction]
|
|
8413
8236
|
);
|
|
8414
|
-
const handleRelease =
|
|
8237
|
+
const handleRelease = React76.useCallback(
|
|
8415
8238
|
(id) => {
|
|
8416
8239
|
setActiveButtons((prev) => {
|
|
8417
8240
|
const next = new Set(prev);
|
|
@@ -9342,7 +9165,7 @@ function getTraitSnapshots() {
|
|
|
9342
9165
|
try {
|
|
9343
9166
|
snapshots.push(getter());
|
|
9344
9167
|
} catch (err) {
|
|
9345
|
-
|
|
9168
|
+
log3.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
|
|
9346
9169
|
}
|
|
9347
9170
|
}
|
|
9348
9171
|
return snapshots;
|
|
@@ -9420,10 +9243,10 @@ function updateAssetStatus(url, status) {
|
|
|
9420
9243
|
window.__orbitalVerification.assetStatus[url] = status;
|
|
9421
9244
|
}
|
|
9422
9245
|
}
|
|
9423
|
-
var
|
|
9246
|
+
var log3;
|
|
9424
9247
|
var init_verificationRegistry = __esm({
|
|
9425
9248
|
"lib/verificationRegistry.ts"() {
|
|
9426
|
-
|
|
9249
|
+
log3 = createLogger("almadar:bridge");
|
|
9427
9250
|
exposeOnWindow();
|
|
9428
9251
|
}
|
|
9429
9252
|
});
|
|
@@ -11554,7 +11377,7 @@ var init_avl_elk_layout = __esm({
|
|
|
11554
11377
|
elk = new ELK();
|
|
11555
11378
|
}
|
|
11556
11379
|
});
|
|
11557
|
-
var
|
|
11380
|
+
var log4, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
11558
11381
|
var init_BehaviorView = __esm({
|
|
11559
11382
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
11560
11383
|
"use client";
|
|
@@ -11563,7 +11386,7 @@ var init_BehaviorView = __esm({
|
|
|
11563
11386
|
init_AvlSwimLane();
|
|
11564
11387
|
init_types();
|
|
11565
11388
|
init_avl_elk_layout();
|
|
11566
|
-
|
|
11389
|
+
log4 = createLogger("almadar:ui:avl:behavior-view");
|
|
11567
11390
|
SWIM_GUTTER = 120;
|
|
11568
11391
|
CENTER_W = 360;
|
|
11569
11392
|
BehaviorView = ({ data }) => {
|
|
@@ -11574,7 +11397,7 @@ var init_BehaviorView = __esm({
|
|
|
11574
11397
|
const dataKey = useMemo(() => JSON.stringify(traitData), [traitData]);
|
|
11575
11398
|
useEffect(() => {
|
|
11576
11399
|
if (!traitData) return;
|
|
11577
|
-
computeTraitLayout(traitData).then(setLayout).catch((err) =>
|
|
11400
|
+
computeTraitLayout(traitData).then(setLayout).catch((err) => log4.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
11578
11401
|
}, [dataKey]);
|
|
11579
11402
|
if (!traitData) {
|
|
11580
11403
|
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") });
|
|
@@ -11985,7 +11808,7 @@ function generateDiff(oldVal, newVal) {
|
|
|
11985
11808
|
}
|
|
11986
11809
|
return diff;
|
|
11987
11810
|
}
|
|
11988
|
-
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle,
|
|
11811
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log5, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
11989
11812
|
var init_CodeBlock = __esm({
|
|
11990
11813
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
11991
11814
|
init_cn();
|
|
@@ -12068,7 +11891,7 @@ var init_CodeBlock = __esm({
|
|
|
12068
11891
|
"lolo-op-async": { color: ORB_COLORS.dark.async }
|
|
12069
11892
|
};
|
|
12070
11893
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
12071
|
-
|
|
11894
|
+
log5 = createLogger("almadar:ui:markdown-code");
|
|
12072
11895
|
CODE_LANGUAGES = [
|
|
12073
11896
|
"text",
|
|
12074
11897
|
"json",
|
|
@@ -12107,7 +11930,7 @@ var init_CodeBlock = __esm({
|
|
|
12107
11930
|
};
|
|
12108
11931
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12109
11932
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12110
|
-
CodeBlock =
|
|
11933
|
+
CodeBlock = React76__default.memo(
|
|
12111
11934
|
({
|
|
12112
11935
|
code: rawCode,
|
|
12113
11936
|
language = "text",
|
|
@@ -12332,7 +12155,7 @@ var init_CodeBlock = __esm({
|
|
|
12332
12155
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
|
|
12333
12156
|
setTimeout(() => setCopied(false), 2e3);
|
|
12334
12157
|
} catch (err) {
|
|
12335
|
-
|
|
12158
|
+
log5.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
|
|
12336
12159
|
eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
|
|
12337
12160
|
}
|
|
12338
12161
|
};
|
|
@@ -12694,7 +12517,7 @@ var init_MarkdownContent = __esm({
|
|
|
12694
12517
|
init_Box();
|
|
12695
12518
|
init_CodeBlock();
|
|
12696
12519
|
init_cn();
|
|
12697
|
-
MarkdownContent =
|
|
12520
|
+
MarkdownContent = React76__default.memo(
|
|
12698
12521
|
({ content, direction = "ltr", className }) => {
|
|
12699
12522
|
const { t: _t } = useTranslate();
|
|
12700
12523
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14011,7 +13834,7 @@ var init_StateMachineView = __esm({
|
|
|
14011
13834
|
style: { top: title ? 30 : 0 },
|
|
14012
13835
|
children: [
|
|
14013
13836
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14014
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
13837
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React76__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14015
13838
|
StateNode,
|
|
14016
13839
|
{
|
|
14017
13840
|
state,
|
|
@@ -16213,14 +16036,14 @@ function useSafeEventBus2() {
|
|
|
16213
16036
|
} };
|
|
16214
16037
|
}
|
|
16215
16038
|
}
|
|
16216
|
-
var
|
|
16039
|
+
var log6, lookStyles4, ButtonGroup;
|
|
16217
16040
|
var init_ButtonGroup = __esm({
|
|
16218
16041
|
"components/core/molecules/ButtonGroup.tsx"() {
|
|
16219
16042
|
"use client";
|
|
16220
16043
|
init_cn();
|
|
16221
16044
|
init_atoms2();
|
|
16222
16045
|
init_useEventBus();
|
|
16223
|
-
|
|
16046
|
+
log6 = createLogger("almadar:ui:button-group");
|
|
16224
16047
|
lookStyles4 = {
|
|
16225
16048
|
"right-aligned-buttons": "",
|
|
16226
16049
|
"floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
|
|
@@ -16301,7 +16124,7 @@ var init_ButtonGroup = __esm({
|
|
|
16301
16124
|
{
|
|
16302
16125
|
variant: "ghost",
|
|
16303
16126
|
onClick: () => {
|
|
16304
|
-
|
|
16127
|
+
log6.debug("Filter clicked", { field: filter.field });
|
|
16305
16128
|
},
|
|
16306
16129
|
children: filter.label
|
|
16307
16130
|
},
|
|
@@ -20762,7 +20585,7 @@ function CraftingRecipe({
|
|
|
20762
20585
|
className
|
|
20763
20586
|
}) {
|
|
20764
20587
|
const eventBus = useEventBus();
|
|
20765
|
-
const handleCraft =
|
|
20588
|
+
const handleCraft = React76.useCallback(() => {
|
|
20766
20589
|
onCraft?.();
|
|
20767
20590
|
if (craftEvent) {
|
|
20768
20591
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20779,7 +20602,7 @@ function CraftingRecipe({
|
|
|
20779
20602
|
children: [
|
|
20780
20603
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20781
20604
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20782
|
-
return /* @__PURE__ */ jsxs(
|
|
20605
|
+
return /* @__PURE__ */ jsxs(React76.Fragment, { children: [
|
|
20783
20606
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20784
20607
|
ItemSlot,
|
|
20785
20608
|
{
|
|
@@ -20851,8 +20674,8 @@ function DPad({
|
|
|
20851
20674
|
}) {
|
|
20852
20675
|
const eventBus = useEventBus();
|
|
20853
20676
|
const sizes = sizeMap6[size];
|
|
20854
|
-
const [activeDirections, setActiveDirections] =
|
|
20855
|
-
const handlePress =
|
|
20677
|
+
const [activeDirections, setActiveDirections] = React76.useState(/* @__PURE__ */ new Set());
|
|
20678
|
+
const handlePress = React76.useCallback(
|
|
20856
20679
|
(direction) => {
|
|
20857
20680
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
20858
20681
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -20860,7 +20683,7 @@ function DPad({
|
|
|
20860
20683
|
},
|
|
20861
20684
|
[directionEvent, eventBus, onDirection]
|
|
20862
20685
|
);
|
|
20863
|
-
const handleRelease =
|
|
20686
|
+
const handleRelease = React76.useCallback(
|
|
20864
20687
|
(direction) => {
|
|
20865
20688
|
setActiveDirections((prev) => {
|
|
20866
20689
|
const next = new Set(prev);
|
|
@@ -21731,8 +21554,8 @@ var init_Menu = __esm({
|
|
|
21731
21554
|
"bottom-end": "bottom-start"
|
|
21732
21555
|
};
|
|
21733
21556
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
21734
|
-
const triggerChild =
|
|
21735
|
-
const triggerElement =
|
|
21557
|
+
const triggerChild = React76__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
21558
|
+
const triggerElement = React76__default.cloneElement(
|
|
21736
21559
|
triggerChild,
|
|
21737
21560
|
{
|
|
21738
21561
|
ref: triggerRef,
|
|
@@ -21866,14 +21689,14 @@ function useDataDnd(args) {
|
|
|
21866
21689
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21867
21690
|
const enabled = isZone || Boolean(dndRoot);
|
|
21868
21691
|
const eventBus = useEventBus();
|
|
21869
|
-
const parentRoot =
|
|
21692
|
+
const parentRoot = React76__default.useContext(RootCtx);
|
|
21870
21693
|
const isRoot = enabled && parentRoot === null;
|
|
21871
|
-
const zoneId =
|
|
21694
|
+
const zoneId = React76__default.useId();
|
|
21872
21695
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
21873
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
21874
|
-
const optimisticOrdersRef =
|
|
21696
|
+
const [optimisticOrders, setOptimisticOrders] = React76__default.useState(() => /* @__PURE__ */ new Map());
|
|
21697
|
+
const optimisticOrdersRef = React76__default.useRef(optimisticOrders);
|
|
21875
21698
|
optimisticOrdersRef.current = optimisticOrders;
|
|
21876
|
-
const clearOptimisticOrder =
|
|
21699
|
+
const clearOptimisticOrder = React76__default.useCallback((group) => {
|
|
21877
21700
|
setOptimisticOrders((prev) => {
|
|
21878
21701
|
if (!prev.has(group)) return prev;
|
|
21879
21702
|
const next = new Map(prev);
|
|
@@ -21898,7 +21721,7 @@ function useDataDnd(args) {
|
|
|
21898
21721
|
const raw = it[dndItemIdField];
|
|
21899
21722
|
return String(raw ?? `__idx_${idx}`);
|
|
21900
21723
|
}).join("|");
|
|
21901
|
-
const itemIds =
|
|
21724
|
+
const itemIds = React76__default.useMemo(
|
|
21902
21725
|
() => orderedItems.map((it, idx) => {
|
|
21903
21726
|
const raw = it[dndItemIdField];
|
|
21904
21727
|
return raw ?? `__idx_${idx}`;
|
|
@@ -21906,7 +21729,7 @@ function useDataDnd(args) {
|
|
|
21906
21729
|
[itemIdsSignature]
|
|
21907
21730
|
);
|
|
21908
21731
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
21909
|
-
|
|
21732
|
+
React76__default.useEffect(() => {
|
|
21910
21733
|
const root = isRoot ? null : parentRoot;
|
|
21911
21734
|
if (root) {
|
|
21912
21735
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -21914,20 +21737,20 @@ function useDataDnd(args) {
|
|
|
21914
21737
|
clearOptimisticOrder(ownGroup);
|
|
21915
21738
|
}
|
|
21916
21739
|
}, [itemsContentSig, ownGroup]);
|
|
21917
|
-
const zonesRef =
|
|
21918
|
-
const registerZone =
|
|
21740
|
+
const zonesRef = React76__default.useRef(/* @__PURE__ */ new Map());
|
|
21741
|
+
const registerZone = React76__default.useCallback((zoneId2, meta2) => {
|
|
21919
21742
|
zonesRef.current.set(zoneId2, meta2);
|
|
21920
21743
|
}, []);
|
|
21921
|
-
const unregisterZone =
|
|
21744
|
+
const unregisterZone = React76__default.useCallback((zoneId2) => {
|
|
21922
21745
|
zonesRef.current.delete(zoneId2);
|
|
21923
21746
|
}, []);
|
|
21924
|
-
const [activeDrag, setActiveDrag] =
|
|
21925
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
21926
|
-
const meta =
|
|
21747
|
+
const [activeDrag, setActiveDrag] = React76__default.useState(null);
|
|
21748
|
+
const [overZoneGroup, setOverZoneGroup] = React76__default.useState(null);
|
|
21749
|
+
const meta = React76__default.useMemo(
|
|
21927
21750
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
21928
21751
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
21929
21752
|
);
|
|
21930
|
-
|
|
21753
|
+
React76__default.useEffect(() => {
|
|
21931
21754
|
const target = isRoot ? null : parentRoot;
|
|
21932
21755
|
if (!target) {
|
|
21933
21756
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -21946,7 +21769,7 @@ function useDataDnd(args) {
|
|
|
21946
21769
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
21947
21770
|
const sensors = useAlmadarDndSensors(true);
|
|
21948
21771
|
const collisionDetection = almadarDndCollisionDetection;
|
|
21949
|
-
const findZoneByItem =
|
|
21772
|
+
const findZoneByItem = React76__default.useCallback(
|
|
21950
21773
|
(id) => {
|
|
21951
21774
|
for (const z of zonesRef.current.values()) {
|
|
21952
21775
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -21955,7 +21778,7 @@ function useDataDnd(args) {
|
|
|
21955
21778
|
},
|
|
21956
21779
|
[]
|
|
21957
21780
|
);
|
|
21958
|
-
|
|
21781
|
+
React76__default.useCallback(
|
|
21959
21782
|
(group) => {
|
|
21960
21783
|
for (const z of zonesRef.current.values()) {
|
|
21961
21784
|
if (z.group === group) return z;
|
|
@@ -21964,7 +21787,7 @@ function useDataDnd(args) {
|
|
|
21964
21787
|
},
|
|
21965
21788
|
[]
|
|
21966
21789
|
);
|
|
21967
|
-
const handleDragEnd =
|
|
21790
|
+
const handleDragEnd = React76__default.useCallback(
|
|
21968
21791
|
(event) => {
|
|
21969
21792
|
const { active, over } = event;
|
|
21970
21793
|
const activeIdStr = String(active.id);
|
|
@@ -22055,8 +21878,8 @@ function useDataDnd(args) {
|
|
|
22055
21878
|
},
|
|
22056
21879
|
[eventBus]
|
|
22057
21880
|
);
|
|
22058
|
-
const sortableData =
|
|
22059
|
-
const SortableItem =
|
|
21881
|
+
const sortableData = React76__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
21882
|
+
const SortableItem = React76__default.useCallback(
|
|
22060
21883
|
({ id, children }) => {
|
|
22061
21884
|
const {
|
|
22062
21885
|
attributes,
|
|
@@ -22096,7 +21919,7 @@ function useDataDnd(args) {
|
|
|
22096
21919
|
id: droppableId,
|
|
22097
21920
|
data: sortableData
|
|
22098
21921
|
});
|
|
22099
|
-
const ctx =
|
|
21922
|
+
const ctx = React76__default.useContext(RootCtx);
|
|
22100
21923
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22101
21924
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22102
21925
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22111,7 +21934,7 @@ function useDataDnd(args) {
|
|
|
22111
21934
|
showForeignPlaceholder,
|
|
22112
21935
|
ctxAvailable: ctx != null
|
|
22113
21936
|
});
|
|
22114
|
-
|
|
21937
|
+
React76__default.useEffect(() => {
|
|
22115
21938
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22116
21939
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22117
21940
|
return /* @__PURE__ */ jsx(
|
|
@@ -22125,11 +21948,11 @@ function useDataDnd(args) {
|
|
|
22125
21948
|
}
|
|
22126
21949
|
);
|
|
22127
21950
|
};
|
|
22128
|
-
const rootContextValue =
|
|
21951
|
+
const rootContextValue = React76__default.useMemo(
|
|
22129
21952
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22130
21953
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22131
21954
|
);
|
|
22132
|
-
const handleDragStart =
|
|
21955
|
+
const handleDragStart = React76__default.useCallback((event) => {
|
|
22133
21956
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22134
21957
|
const rect = event.active.rect.current.initial;
|
|
22135
21958
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22148,7 +21971,7 @@ function useDataDnd(args) {
|
|
|
22148
21971
|
isRoot
|
|
22149
21972
|
});
|
|
22150
21973
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22151
|
-
const handleDragOver =
|
|
21974
|
+
const handleDragOver = React76__default.useCallback((event) => {
|
|
22152
21975
|
const { active, over } = event;
|
|
22153
21976
|
const overData = over?.data?.current;
|
|
22154
21977
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22218,7 +22041,7 @@ function useDataDnd(args) {
|
|
|
22218
22041
|
return next;
|
|
22219
22042
|
});
|
|
22220
22043
|
}, []);
|
|
22221
|
-
const handleDragCancel =
|
|
22044
|
+
const handleDragCancel = React76__default.useCallback((event) => {
|
|
22222
22045
|
setActiveDrag(null);
|
|
22223
22046
|
setOverZoneGroup(null);
|
|
22224
22047
|
dndLog.warn("dragCancel", {
|
|
@@ -22226,12 +22049,12 @@ function useDataDnd(args) {
|
|
|
22226
22049
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22227
22050
|
});
|
|
22228
22051
|
}, []);
|
|
22229
|
-
const handleDragEndWithCleanup =
|
|
22052
|
+
const handleDragEndWithCleanup = React76__default.useCallback((event) => {
|
|
22230
22053
|
handleDragEnd(event);
|
|
22231
22054
|
setActiveDrag(null);
|
|
22232
22055
|
setOverZoneGroup(null);
|
|
22233
22056
|
}, [handleDragEnd]);
|
|
22234
|
-
const wrapContainer =
|
|
22057
|
+
const wrapContainer = React76__default.useCallback(
|
|
22235
22058
|
(children) => {
|
|
22236
22059
|
if (!enabled) return children;
|
|
22237
22060
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22285,7 +22108,7 @@ var init_useDataDnd = __esm({
|
|
|
22285
22108
|
init_useAlmadarDndCollision();
|
|
22286
22109
|
init_Box();
|
|
22287
22110
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22288
|
-
RootCtx =
|
|
22111
|
+
RootCtx = React76__default.createContext(null);
|
|
22289
22112
|
}
|
|
22290
22113
|
});
|
|
22291
22114
|
function renderIconInput(icon, props) {
|
|
@@ -22811,7 +22634,7 @@ function DataList({
|
|
|
22811
22634
|
}) {
|
|
22812
22635
|
const eventBus = useEventBus();
|
|
22813
22636
|
const { t } = useTranslate();
|
|
22814
|
-
const [visibleCount, setVisibleCount] =
|
|
22637
|
+
const [visibleCount, setVisibleCount] = React76__default.useState(pageSize || Infinity);
|
|
22815
22638
|
const fieldDefs = fields ?? columns ?? [];
|
|
22816
22639
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22817
22640
|
const dnd = useDataDnd({
|
|
@@ -22830,7 +22653,7 @@ function DataList({
|
|
|
22830
22653
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22831
22654
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22832
22655
|
const hasRenderProp = typeof children === "function";
|
|
22833
|
-
|
|
22656
|
+
React76__default.useEffect(() => {
|
|
22834
22657
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22835
22658
|
const childrenTypeOf = typeof children;
|
|
22836
22659
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -22935,7 +22758,7 @@ function DataList({
|
|
|
22935
22758
|
const items2 = data.map((item) => item);
|
|
22936
22759
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22937
22760
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
22938
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22761
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
22939
22762
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22940
22763
|
group.items.map((itemData, index) => {
|
|
22941
22764
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23076,7 +22899,7 @@ function DataList({
|
|
|
23076
22899
|
className
|
|
23077
22900
|
),
|
|
23078
22901
|
children: [
|
|
23079
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22902
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
23080
22903
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23081
22904
|
group.items.map(
|
|
23082
22905
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23183,8 +23006,8 @@ function ScalarControl({
|
|
|
23183
23006
|
}
|
|
23184
23007
|
const numeric = typeof value === "number";
|
|
23185
23008
|
const initial = value === null ? "" : String(value);
|
|
23186
|
-
const [draft, setDraft] =
|
|
23187
|
-
|
|
23009
|
+
const [draft, setDraft] = React76__default.useState(initial);
|
|
23010
|
+
React76__default.useEffect(() => setDraft(initial), [initial]);
|
|
23188
23011
|
const commit = () => {
|
|
23189
23012
|
if (numeric) {
|
|
23190
23013
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -23252,8 +23075,8 @@ function Row({
|
|
|
23252
23075
|
onRemove,
|
|
23253
23076
|
readonly
|
|
23254
23077
|
}) {
|
|
23255
|
-
const [keyDraft, setKeyDraft] =
|
|
23256
|
-
|
|
23078
|
+
const [keyDraft, setKeyDraft] = React76__default.useState(rowKey);
|
|
23079
|
+
React76__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
|
|
23257
23080
|
const container = isObj(value) || isArr(value);
|
|
23258
23081
|
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
|
|
23259
23082
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
|
|
@@ -23296,7 +23119,7 @@ function ContainerNode({
|
|
|
23296
23119
|
depth,
|
|
23297
23120
|
readonly
|
|
23298
23121
|
}) {
|
|
23299
|
-
const [open, setOpen] =
|
|
23122
|
+
const [open, setOpen] = React76__default.useState(depth < 2);
|
|
23300
23123
|
const array = isArr(value);
|
|
23301
23124
|
const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
|
|
23302
23125
|
const setObjValue = (key, next) => {
|
|
@@ -23438,7 +23261,7 @@ var init_FormSection = __esm({
|
|
|
23438
23261
|
columns = 1,
|
|
23439
23262
|
className
|
|
23440
23263
|
}) => {
|
|
23441
|
-
const [collapsed, setCollapsed] =
|
|
23264
|
+
const [collapsed, setCollapsed] = React76__default.useState(defaultCollapsed);
|
|
23442
23265
|
const { t } = useTranslate();
|
|
23443
23266
|
const eventBus = useEventBus();
|
|
23444
23267
|
const gridClass = {
|
|
@@ -23446,7 +23269,7 @@ var init_FormSection = __esm({
|
|
|
23446
23269
|
2: "grid-cols-1 md:grid-cols-2",
|
|
23447
23270
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
23448
23271
|
}[columns];
|
|
23449
|
-
|
|
23272
|
+
React76__default.useCallback(() => {
|
|
23450
23273
|
if (collapsible) {
|
|
23451
23274
|
setCollapsed((prev) => !prev);
|
|
23452
23275
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -23854,8 +23677,8 @@ function TextLikeControl({
|
|
|
23854
23677
|
onCommit
|
|
23855
23678
|
}) {
|
|
23856
23679
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
23857
|
-
const [draft, setDraft] =
|
|
23858
|
-
|
|
23680
|
+
const [draft, setDraft] = React76__default.useState(initial);
|
|
23681
|
+
React76__default.useEffect(() => setDraft(initial), [initial]);
|
|
23859
23682
|
const commit = () => {
|
|
23860
23683
|
if (numeric) {
|
|
23861
23684
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -24021,14 +23844,14 @@ var init_NodeSlotEditor = __esm({
|
|
|
24021
23844
|
isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
|
|
24022
23845
|
NodeSlotEditor = ({ value, onChange, className }) => {
|
|
24023
23846
|
const { type, props, wasArray } = normalize(value);
|
|
24024
|
-
const patterns =
|
|
23847
|
+
const patterns = React76__default.useMemo(() => {
|
|
24025
23848
|
try {
|
|
24026
23849
|
return [...getKnownPatterns()].sort();
|
|
24027
23850
|
} catch {
|
|
24028
23851
|
return [];
|
|
24029
23852
|
}
|
|
24030
23853
|
}, []);
|
|
24031
|
-
const options =
|
|
23854
|
+
const options = React76__default.useMemo(
|
|
24032
23855
|
() => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p2) => ({ value: p2, label: p2 }))],
|
|
24033
23856
|
[patterns]
|
|
24034
23857
|
);
|
|
@@ -24040,7 +23863,7 @@ var init_NodeSlotEditor = __esm({
|
|
|
24040
23863
|
const pattern = { type: nextType, ...nextProps };
|
|
24041
23864
|
onChange(wasArray || value === void 0 ? [pattern] : pattern);
|
|
24042
23865
|
};
|
|
24043
|
-
const schemaEntries =
|
|
23866
|
+
const schemaEntries = React76__default.useMemo(() => {
|
|
24044
23867
|
if (!type) return [];
|
|
24045
23868
|
const def = getPatternDefinition(type);
|
|
24046
23869
|
if (!def?.propsSchema) return [];
|
|
@@ -24934,7 +24757,7 @@ var init_Grid = __esm({
|
|
|
24934
24757
|
as: Component2 = "div"
|
|
24935
24758
|
}) => {
|
|
24936
24759
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
24937
|
-
return
|
|
24760
|
+
return React76__default.createElement(
|
|
24938
24761
|
Component2,
|
|
24939
24762
|
{
|
|
24940
24763
|
className: cn(
|
|
@@ -25122,8 +24945,8 @@ var init_Popover = __esm({
|
|
|
25122
24945
|
onMouseEnter: handleOpen,
|
|
25123
24946
|
onMouseLeave: handleClose
|
|
25124
24947
|
};
|
|
25125
|
-
const childElement =
|
|
25126
|
-
const triggerElement =
|
|
24948
|
+
const childElement = React76__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24949
|
+
const triggerElement = React76__default.cloneElement(
|
|
25127
24950
|
childElement,
|
|
25128
24951
|
{
|
|
25129
24952
|
ref: triggerRef,
|
|
@@ -25429,9 +25252,9 @@ function debug(...args) {
|
|
|
25429
25252
|
const [first, ...rest] = args;
|
|
25430
25253
|
const message = typeof first === "string" ? first : "<debug>";
|
|
25431
25254
|
if (rest.length === 0 && typeof first === "string") {
|
|
25432
|
-
|
|
25255
|
+
log7.debug(message);
|
|
25433
25256
|
} else {
|
|
25434
|
-
|
|
25257
|
+
log7.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
|
|
25435
25258
|
}
|
|
25436
25259
|
}
|
|
25437
25260
|
function debugGroup(label) {
|
|
@@ -25459,11 +25282,11 @@ function toLogMetaValue(v) {
|
|
|
25459
25282
|
}
|
|
25460
25283
|
return String(v);
|
|
25461
25284
|
}
|
|
25462
|
-
var NAMESPACE,
|
|
25285
|
+
var NAMESPACE, log7;
|
|
25463
25286
|
var init_debug = __esm({
|
|
25464
25287
|
"lib/debug.ts"() {
|
|
25465
25288
|
NAMESPACE = "almadar:ui:debug";
|
|
25466
|
-
|
|
25289
|
+
log7 = createLogger(NAMESPACE);
|
|
25467
25290
|
createLogger("almadar:ui:debug:input");
|
|
25468
25291
|
createLogger("almadar:ui:debug:collision");
|
|
25469
25292
|
createLogger("almadar:ui:debug:physics");
|
|
@@ -25963,8 +25786,8 @@ var init_Tooltip = __esm({
|
|
|
25963
25786
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25964
25787
|
};
|
|
25965
25788
|
}, []);
|
|
25966
|
-
const triggerElement =
|
|
25967
|
-
const trigger =
|
|
25789
|
+
const triggerElement = React76__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25790
|
+
const trigger = React76__default.cloneElement(triggerElement, {
|
|
25968
25791
|
ref: triggerRef,
|
|
25969
25792
|
onMouseEnter: handleMouseEnter,
|
|
25970
25793
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26050,7 +25873,7 @@ var init_WizardProgress = __esm({
|
|
|
26050
25873
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26051
25874
|
const isActive = index === currentStep;
|
|
26052
25875
|
const isCompleted = index < currentStep;
|
|
26053
|
-
return /* @__PURE__ */ jsxs(
|
|
25876
|
+
return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
26054
25877
|
/* @__PURE__ */ jsx(
|
|
26055
25878
|
"button",
|
|
26056
25879
|
{
|
|
@@ -27095,9 +26918,9 @@ function ScoreDisplay({
|
|
|
27095
26918
|
...rest
|
|
27096
26919
|
}) {
|
|
27097
26920
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
27098
|
-
const [displayValue, setDisplayValue] =
|
|
27099
|
-
const [isAnimating, setIsAnimating] =
|
|
27100
|
-
|
|
26921
|
+
const [displayValue, setDisplayValue] = React76.useState(resolvedValue);
|
|
26922
|
+
const [isAnimating, setIsAnimating] = React76.useState(false);
|
|
26923
|
+
React76.useEffect(() => {
|
|
27101
26924
|
if (!animated || displayValue === resolvedValue) {
|
|
27102
26925
|
setDisplayValue(resolvedValue);
|
|
27103
26926
|
return;
|
|
@@ -27268,7 +27091,7 @@ function InventoryGrid({
|
|
|
27268
27091
|
const eventBus = useEventBus();
|
|
27269
27092
|
const slotCount = totalSlots ?? items.length;
|
|
27270
27093
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
27271
|
-
const handleSelect =
|
|
27094
|
+
const handleSelect = React76.useCallback(
|
|
27272
27095
|
(id) => {
|
|
27273
27096
|
onSelect?.(id);
|
|
27274
27097
|
if (selectEvent) {
|
|
@@ -27584,31 +27407,31 @@ function GameCanvas2D({
|
|
|
27584
27407
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
27585
27408
|
className
|
|
27586
27409
|
}) {
|
|
27587
|
-
const canvasRef =
|
|
27588
|
-
const rafRef =
|
|
27589
|
-
const frameRef =
|
|
27590
|
-
const lastTimeRef =
|
|
27591
|
-
const imageCache =
|
|
27410
|
+
const canvasRef = React76.useRef(null);
|
|
27411
|
+
const rafRef = React76.useRef(0);
|
|
27412
|
+
const frameRef = React76.useRef(0);
|
|
27413
|
+
const lastTimeRef = React76.useRef(0);
|
|
27414
|
+
const imageCache = React76.useRef(/* @__PURE__ */ new Map());
|
|
27592
27415
|
const emit = useEmitEvent();
|
|
27593
|
-
const onDrawRef =
|
|
27416
|
+
const onDrawRef = React76.useRef(onDraw);
|
|
27594
27417
|
onDrawRef.current = onDraw;
|
|
27595
|
-
const onTickRef =
|
|
27418
|
+
const onTickRef = React76.useRef(onTick);
|
|
27596
27419
|
onTickRef.current = onTick;
|
|
27597
|
-
const tickEventRef =
|
|
27420
|
+
const tickEventRef = React76.useRef(tickEvent);
|
|
27598
27421
|
tickEventRef.current = tickEvent;
|
|
27599
|
-
const drawEventRef =
|
|
27422
|
+
const drawEventRef = React76.useRef(drawEvent);
|
|
27600
27423
|
drawEventRef.current = drawEvent;
|
|
27601
|
-
const emitRef =
|
|
27424
|
+
const emitRef = React76.useRef(emit);
|
|
27602
27425
|
emitRef.current = emit;
|
|
27603
|
-
const assetBaseUrlRef =
|
|
27426
|
+
const assetBaseUrlRef = React76.useRef(assetBaseUrl);
|
|
27604
27427
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
27605
|
-
const backgroundImageRef =
|
|
27428
|
+
const backgroundImageRef = React76.useRef(backgroundImage);
|
|
27606
27429
|
backgroundImageRef.current = backgroundImage;
|
|
27607
|
-
const widthRef =
|
|
27430
|
+
const widthRef = React76.useRef(width);
|
|
27608
27431
|
widthRef.current = width;
|
|
27609
|
-
const heightRef =
|
|
27432
|
+
const heightRef = React76.useRef(height);
|
|
27610
27433
|
heightRef.current = height;
|
|
27611
|
-
const loadImage =
|
|
27434
|
+
const loadImage = React76.useCallback((url) => {
|
|
27612
27435
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
27613
27436
|
const cached = imageCache.current.get(fullUrl);
|
|
27614
27437
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -27620,7 +27443,7 @@ function GameCanvas2D({
|
|
|
27620
27443
|
}
|
|
27621
27444
|
return null;
|
|
27622
27445
|
}, []);
|
|
27623
|
-
|
|
27446
|
+
React76.useEffect(() => {
|
|
27624
27447
|
const canvas = canvasRef.current;
|
|
27625
27448
|
if (!canvas) return;
|
|
27626
27449
|
const ctx = canvas.getContext("2d");
|
|
@@ -27996,7 +27819,7 @@ function TurnPanel({
|
|
|
27996
27819
|
className
|
|
27997
27820
|
}) {
|
|
27998
27821
|
const eventBus = useEventBus();
|
|
27999
|
-
const handleAction =
|
|
27822
|
+
const handleAction = React76.useCallback(
|
|
28000
27823
|
(event) => {
|
|
28001
27824
|
if (event) {
|
|
28002
27825
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28165,7 +27988,7 @@ function UnitCommandBar({
|
|
|
28165
27988
|
className
|
|
28166
27989
|
}) {
|
|
28167
27990
|
const eventBus = useEventBus();
|
|
28168
|
-
const handleCommand =
|
|
27991
|
+
const handleCommand = React76.useCallback(
|
|
28169
27992
|
(event) => {
|
|
28170
27993
|
if (event) {
|
|
28171
27994
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -28679,7 +28502,7 @@ function GameMenu({
|
|
|
28679
28502
|
} catch {
|
|
28680
28503
|
}
|
|
28681
28504
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
28682
|
-
const handleOptionClick =
|
|
28505
|
+
const handleOptionClick = React76.useCallback(
|
|
28683
28506
|
(option) => {
|
|
28684
28507
|
if (option.event && eventBus) {
|
|
28685
28508
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -28798,7 +28621,7 @@ function GameOverScreen({
|
|
|
28798
28621
|
} catch {
|
|
28799
28622
|
}
|
|
28800
28623
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
28801
|
-
const handleActionClick =
|
|
28624
|
+
const handleActionClick = React76.useCallback(
|
|
28802
28625
|
(action) => {
|
|
28803
28626
|
if (action.event && eventBus) {
|
|
28804
28627
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29709,13 +29532,13 @@ var init_MapView = __esm({
|
|
|
29709
29532
|
shadowSize: [41, 41]
|
|
29710
29533
|
});
|
|
29711
29534
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29712
|
-
const { useEffect:
|
|
29535
|
+
const { useEffect: useEffect79, useRef: useRef77, useCallback: useCallback119, useState: useState109 } = React76__default;
|
|
29713
29536
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29714
29537
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29715
29538
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
29716
29539
|
const map = useMap();
|
|
29717
29540
|
const prevRef = useRef77({ centerLat, centerLng, zoom });
|
|
29718
|
-
|
|
29541
|
+
useEffect79(() => {
|
|
29719
29542
|
const prev = prevRef.current;
|
|
29720
29543
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
29721
29544
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -29726,7 +29549,7 @@ var init_MapView = __esm({
|
|
|
29726
29549
|
}
|
|
29727
29550
|
function MapClickHandler({ onMapClick }) {
|
|
29728
29551
|
const map = useMap();
|
|
29729
|
-
|
|
29552
|
+
useEffect79(() => {
|
|
29730
29553
|
if (!onMapClick) return;
|
|
29731
29554
|
const handler = (e) => {
|
|
29732
29555
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -29754,8 +29577,8 @@ var init_MapView = __esm({
|
|
|
29754
29577
|
showAttribution = true
|
|
29755
29578
|
}) {
|
|
29756
29579
|
const eventBus = useEventBus3();
|
|
29757
|
-
const [clickedPosition, setClickedPosition] =
|
|
29758
|
-
const handleMapClick =
|
|
29580
|
+
const [clickedPosition, setClickedPosition] = useState109(null);
|
|
29581
|
+
const handleMapClick = useCallback119((lat, lng) => {
|
|
29759
29582
|
if (showClickedPin) {
|
|
29760
29583
|
setClickedPosition({ lat, lng });
|
|
29761
29584
|
}
|
|
@@ -29764,7 +29587,7 @@ var init_MapView = __esm({
|
|
|
29764
29587
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
29765
29588
|
}
|
|
29766
29589
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
29767
|
-
const handleMarkerClick =
|
|
29590
|
+
const handleMarkerClick = useCallback119((marker) => {
|
|
29768
29591
|
onMarkerClick?.(marker);
|
|
29769
29592
|
if (markerClickEvent) {
|
|
29770
29593
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -30615,8 +30438,8 @@ function TableView({
|
|
|
30615
30438
|
}) {
|
|
30616
30439
|
const eventBus = useEventBus();
|
|
30617
30440
|
const { t } = useTranslate();
|
|
30618
|
-
const [visibleCount, setVisibleCount] =
|
|
30619
|
-
const [localSelected, setLocalSelected] =
|
|
30441
|
+
const [visibleCount, setVisibleCount] = React76__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
30442
|
+
const [localSelected, setLocalSelected] = React76__default.useState(/* @__PURE__ */ new Set());
|
|
30620
30443
|
const colDefs = columns ?? fields ?? [];
|
|
30621
30444
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
30622
30445
|
const dnd = useDataDnd({
|
|
@@ -30811,12 +30634,12 @@ function TableView({
|
|
|
30811
30634
|
]
|
|
30812
30635
|
}
|
|
30813
30636
|
);
|
|
30814
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30637
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React76__default.Fragment, { children: rowInner }, id);
|
|
30815
30638
|
};
|
|
30816
30639
|
const items = data.map((row) => row);
|
|
30817
30640
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
30818
30641
|
let runningIndex = 0;
|
|
30819
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30642
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
30820
30643
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
30821
30644
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
30822
30645
|
] }, gi)) });
|
|
@@ -32173,7 +31996,7 @@ var init_StepFlow = __esm({
|
|
|
32173
31996
|
className
|
|
32174
31997
|
}) => {
|
|
32175
31998
|
if (orientation === "vertical") {
|
|
32176
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31999
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React76__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32177
32000
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32178
32001
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32179
32002
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32184,7 +32007,7 @@ var init_StepFlow = __esm({
|
|
|
32184
32007
|
] })
|
|
32185
32008
|
] }) }, index)) });
|
|
32186
32009
|
}
|
|
32187
|
-
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(
|
|
32010
|
+
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(React76__default.Fragment, { children: [
|
|
32188
32011
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32189
32012
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32190
32013
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33169,7 +32992,7 @@ var init_LikertScale = __esm({
|
|
|
33169
32992
|
md: "text-base",
|
|
33170
32993
|
lg: "text-lg"
|
|
33171
32994
|
};
|
|
33172
|
-
LikertScale =
|
|
32995
|
+
LikertScale = React76__default.forwardRef(
|
|
33173
32996
|
({
|
|
33174
32997
|
question,
|
|
33175
32998
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33181,7 +33004,7 @@ var init_LikertScale = __esm({
|
|
|
33181
33004
|
variant = "radios",
|
|
33182
33005
|
className
|
|
33183
33006
|
}, ref) => {
|
|
33184
|
-
const groupId =
|
|
33007
|
+
const groupId = React76__default.useId();
|
|
33185
33008
|
const eventBus = useEventBus();
|
|
33186
33009
|
const handleSelect = useCallback(
|
|
33187
33010
|
(next) => {
|
|
@@ -35463,7 +35286,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
35463
35286
|
"aria-label": t("aria.breadcrumb"),
|
|
35464
35287
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
35465
35288
|
const isLast = idx === items.length - 1;
|
|
35466
|
-
return /* @__PURE__ */ jsxs(
|
|
35289
|
+
return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
35467
35290
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35468
35291
|
Icon,
|
|
35469
35292
|
{
|
|
@@ -36332,7 +36155,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36332
36155
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
36333
36156
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36334
36157
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
36335
|
-
return /* @__PURE__ */ jsxs(
|
|
36158
|
+
return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
36336
36159
|
/* @__PURE__ */ jsx(
|
|
36337
36160
|
AvlState,
|
|
36338
36161
|
{
|
|
@@ -36536,7 +36359,7 @@ var init_PageHeader = __esm({
|
|
|
36536
36359
|
info: "bg-info/10 text-info"
|
|
36537
36360
|
};
|
|
36538
36361
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
36539
|
-
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(
|
|
36362
|
+
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(React76__default.Fragment, { children: [
|
|
36540
36363
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
36541
36364
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
36542
36365
|
"a",
|
|
@@ -37265,7 +37088,7 @@ var init_WizardContainer = __esm({
|
|
|
37265
37088
|
const isCompleted = index < currentStep;
|
|
37266
37089
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37267
37090
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37268
|
-
return /* @__PURE__ */ jsxs(
|
|
37091
|
+
return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
37269
37092
|
/* @__PURE__ */ jsx(
|
|
37270
37093
|
Button,
|
|
37271
37094
|
{
|
|
@@ -39850,7 +39673,7 @@ var init_DialogueBubble = __esm({
|
|
|
39850
39673
|
}
|
|
39851
39674
|
});
|
|
39852
39675
|
function extractTitle(children) {
|
|
39853
|
-
if (!
|
|
39676
|
+
if (!React76__default.isValidElement(children)) return void 0;
|
|
39854
39677
|
const props = children.props;
|
|
39855
39678
|
if (typeof props.title === "string") {
|
|
39856
39679
|
return props.title;
|
|
@@ -39975,7 +39798,7 @@ function LinearView({
|
|
|
39975
39798
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
39976
39799
|
const isDone = i < currentIdx;
|
|
39977
39800
|
const isCurrent = i === currentIdx;
|
|
39978
|
-
return /* @__PURE__ */ jsxs(
|
|
39801
|
+
return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
39979
39802
|
i > 0 && /* @__PURE__ */ jsx(
|
|
39980
39803
|
Typography,
|
|
39981
39804
|
{
|
|
@@ -40925,12 +40748,12 @@ var init_Form = __esm({
|
|
|
40925
40748
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
40926
40749
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
40927
40750
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
40928
|
-
const normalizedInitialData =
|
|
40751
|
+
const normalizedInitialData = React76__default.useMemo(() => {
|
|
40929
40752
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
40930
40753
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
40931
40754
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
40932
40755
|
}, [entity, initialData]);
|
|
40933
|
-
const entityDerivedFields =
|
|
40756
|
+
const entityDerivedFields = React76__default.useMemo(() => {
|
|
40934
40757
|
if (fields && fields.length > 0) return void 0;
|
|
40935
40758
|
if (!resolvedEntity) return void 0;
|
|
40936
40759
|
return resolvedEntity.fields.map(
|
|
@@ -40950,16 +40773,16 @@ var init_Form = __esm({
|
|
|
40950
40773
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
40951
40774
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
40952
40775
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
40953
|
-
const [formData, setFormData] =
|
|
40776
|
+
const [formData, setFormData] = React76__default.useState(
|
|
40954
40777
|
normalizedInitialData
|
|
40955
40778
|
);
|
|
40956
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40779
|
+
const [collapsedSections, setCollapsedSections] = React76__default.useState(
|
|
40957
40780
|
/* @__PURE__ */ new Set()
|
|
40958
40781
|
);
|
|
40959
|
-
const [submitError, setSubmitError] =
|
|
40960
|
-
const formRef =
|
|
40782
|
+
const [submitError, setSubmitError] = React76__default.useState(null);
|
|
40783
|
+
const formRef = React76__default.useRef(null);
|
|
40961
40784
|
const formMode = props.mode;
|
|
40962
|
-
const mountedRef =
|
|
40785
|
+
const mountedRef = React76__default.useRef(false);
|
|
40963
40786
|
if (!mountedRef.current) {
|
|
40964
40787
|
mountedRef.current = true;
|
|
40965
40788
|
debug("forms", "mount", {
|
|
@@ -40972,7 +40795,7 @@ var init_Form = __esm({
|
|
|
40972
40795
|
});
|
|
40973
40796
|
}
|
|
40974
40797
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40975
|
-
const evalContext =
|
|
40798
|
+
const evalContext = React76__default.useMemo(
|
|
40976
40799
|
() => ({
|
|
40977
40800
|
formValues: formData,
|
|
40978
40801
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40981,7 +40804,7 @@ var init_Form = __esm({
|
|
|
40981
40804
|
}),
|
|
40982
40805
|
[formData, externalContext]
|
|
40983
40806
|
);
|
|
40984
|
-
|
|
40807
|
+
React76__default.useEffect(() => {
|
|
40985
40808
|
debug("forms", "initialData-sync", {
|
|
40986
40809
|
mode: formMode,
|
|
40987
40810
|
normalizedInitialData,
|
|
@@ -40992,7 +40815,7 @@ var init_Form = __esm({
|
|
|
40992
40815
|
setFormData(normalizedInitialData);
|
|
40993
40816
|
}
|
|
40994
40817
|
}, [normalizedInitialData]);
|
|
40995
|
-
const processCalculations =
|
|
40818
|
+
const processCalculations = React76__default.useCallback(
|
|
40996
40819
|
(changedFieldId, newFormData) => {
|
|
40997
40820
|
if (!hiddenCalculations.length) return;
|
|
40998
40821
|
const context = {
|
|
@@ -41017,7 +40840,7 @@ var init_Form = __esm({
|
|
|
41017
40840
|
},
|
|
41018
40841
|
[hiddenCalculations, externalContext, eventBus]
|
|
41019
40842
|
);
|
|
41020
|
-
const checkViolations =
|
|
40843
|
+
const checkViolations = React76__default.useCallback(
|
|
41021
40844
|
(changedFieldId, newFormData) => {
|
|
41022
40845
|
if (!violationTriggers.length) return;
|
|
41023
40846
|
const context = {
|
|
@@ -41055,7 +40878,7 @@ var init_Form = __esm({
|
|
|
41055
40878
|
processCalculations(name, newFormData);
|
|
41056
40879
|
checkViolations(name, newFormData);
|
|
41057
40880
|
};
|
|
41058
|
-
const isFieldVisible =
|
|
40881
|
+
const isFieldVisible = React76__default.useCallback(
|
|
41059
40882
|
(fieldName) => {
|
|
41060
40883
|
const condition = conditionalFields[fieldName];
|
|
41061
40884
|
if (!condition) return true;
|
|
@@ -41063,7 +40886,7 @@ var init_Form = __esm({
|
|
|
41063
40886
|
},
|
|
41064
40887
|
[conditionalFields, evalContext]
|
|
41065
40888
|
);
|
|
41066
|
-
const isSectionVisible =
|
|
40889
|
+
const isSectionVisible = React76__default.useCallback(
|
|
41067
40890
|
(section) => {
|
|
41068
40891
|
if (!section.condition) return true;
|
|
41069
40892
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41139,7 +40962,7 @@ var init_Form = __esm({
|
|
|
41139
40962
|
eventBus.emit(`UI:${onCancel}`);
|
|
41140
40963
|
}
|
|
41141
40964
|
};
|
|
41142
|
-
const renderField =
|
|
40965
|
+
const renderField = React76__default.useCallback(
|
|
41143
40966
|
(field) => {
|
|
41144
40967
|
const fieldName = field.name || field.field;
|
|
41145
40968
|
if (!fieldName) return null;
|
|
@@ -41160,7 +40983,7 @@ var init_Form = __esm({
|
|
|
41160
40983
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41161
40984
|
);
|
|
41162
40985
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41163
|
-
const normalizedFields =
|
|
40986
|
+
const normalizedFields = React76__default.useMemo(() => {
|
|
41164
40987
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41165
40988
|
return effectiveFields.map((field) => {
|
|
41166
40989
|
if (typeof field === "string") {
|
|
@@ -41183,7 +41006,7 @@ var init_Form = __esm({
|
|
|
41183
41006
|
return field;
|
|
41184
41007
|
});
|
|
41185
41008
|
}, [effectiveFields, resolvedEntity]);
|
|
41186
|
-
const schemaFields =
|
|
41009
|
+
const schemaFields = React76__default.useMemo(() => {
|
|
41187
41010
|
if (normalizedFields.length === 0) return null;
|
|
41188
41011
|
if (isDebugEnabled()) {
|
|
41189
41012
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41193,7 +41016,7 @@ var init_Form = __esm({
|
|
|
41193
41016
|
}
|
|
41194
41017
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41195
41018
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41196
|
-
const sectionElements =
|
|
41019
|
+
const sectionElements = React76__default.useMemo(() => {
|
|
41197
41020
|
if (!sections || sections.length === 0) return null;
|
|
41198
41021
|
return sections.map((section) => {
|
|
41199
41022
|
if (!isSectionVisible(section)) {
|
|
@@ -42370,11 +42193,11 @@ var init_Canvas3DErrorBoundary = __esm({
|
|
|
42370
42193
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.css"() {
|
|
42371
42194
|
}
|
|
42372
42195
|
});
|
|
42373
|
-
var
|
|
42196
|
+
var log8, Canvas3DErrorBoundary;
|
|
42374
42197
|
var init_Canvas3DErrorBoundary2 = __esm({
|
|
42375
42198
|
"components/game/molecules/three/components/Canvas3DErrorBoundary.tsx"() {
|
|
42376
42199
|
init_Canvas3DErrorBoundary();
|
|
42377
|
-
|
|
42200
|
+
log8 = createLogger("almadar:ui:game:canvas3d:error-boundary");
|
|
42378
42201
|
Canvas3DErrorBoundary = class extends Component {
|
|
42379
42202
|
constructor(props) {
|
|
42380
42203
|
super(props);
|
|
@@ -42402,8 +42225,8 @@ var init_Canvas3DErrorBoundary2 = __esm({
|
|
|
42402
42225
|
componentDidCatch(error, errorInfo) {
|
|
42403
42226
|
this.setState({ errorInfo });
|
|
42404
42227
|
this.props.onError?.(error, errorInfo);
|
|
42405
|
-
|
|
42406
|
-
|
|
42228
|
+
log8.error("Error caught", { error });
|
|
42229
|
+
log8.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
|
|
42407
42230
|
}
|
|
42408
42231
|
render() {
|
|
42409
42232
|
if (this.state.hasError) {
|
|
@@ -42466,7 +42289,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
42466
42289
|
setState({ model: null, isLoading: false, error: null });
|
|
42467
42290
|
return;
|
|
42468
42291
|
}
|
|
42469
|
-
|
|
42292
|
+
log9.debug("Loading", { url });
|
|
42470
42293
|
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
42471
42294
|
const assetRoot = resourceBasePath || detectAssetRoot2(url);
|
|
42472
42295
|
const loader = new GLTFLoader$1();
|
|
@@ -42474,7 +42297,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
42474
42297
|
loader.load(
|
|
42475
42298
|
url,
|
|
42476
42299
|
(gltf) => {
|
|
42477
|
-
|
|
42300
|
+
log9.debug("Loaded", { url });
|
|
42478
42301
|
setState({
|
|
42479
42302
|
model: gltf.scene,
|
|
42480
42303
|
isLoading: false,
|
|
@@ -42483,7 +42306,7 @@ function useGLTFModel(url, resourceBasePath) {
|
|
|
42483
42306
|
},
|
|
42484
42307
|
void 0,
|
|
42485
42308
|
(err) => {
|
|
42486
|
-
|
|
42309
|
+
log9.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
|
|
42487
42310
|
setState({
|
|
42488
42311
|
model: null,
|
|
42489
42312
|
isLoading: false,
|
|
@@ -42599,11 +42422,11 @@ function ModelLoader({
|
|
|
42599
42422
|
}
|
|
42600
42423
|
);
|
|
42601
42424
|
}
|
|
42602
|
-
var
|
|
42425
|
+
var log9;
|
|
42603
42426
|
var init_ModelLoader = __esm({
|
|
42604
42427
|
"components/game/molecules/three/components/ModelLoader.tsx"() {
|
|
42605
42428
|
"use client";
|
|
42606
|
-
|
|
42429
|
+
log9 = createLogger("almadar:ui:game:model-loader");
|
|
42607
42430
|
}
|
|
42608
42431
|
});
|
|
42609
42432
|
|
|
@@ -44037,7 +43860,7 @@ var init_List = __esm({
|
|
|
44037
43860
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44038
43861
|
return [];
|
|
44039
43862
|
}, [entity]);
|
|
44040
|
-
const getItemActions =
|
|
43863
|
+
const getItemActions = React76__default.useCallback(
|
|
44041
43864
|
(item) => {
|
|
44042
43865
|
if (!itemActions) return [];
|
|
44043
43866
|
if (typeof itemActions === "function") {
|
|
@@ -44513,7 +44336,7 @@ var init_MediaGallery = __esm({
|
|
|
44513
44336
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
44514
44337
|
);
|
|
44515
44338
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44516
|
-
const items =
|
|
44339
|
+
const items = React76__default.useMemo(() => {
|
|
44517
44340
|
if (propItems) return propItems;
|
|
44518
44341
|
if (entityData.length === 0) return [];
|
|
44519
44342
|
return entityData.map((record, idx) => ({
|
|
@@ -44683,9 +44506,9 @@ function MiniMap({
|
|
|
44683
44506
|
viewportRect = DEFAULT_VIEWPORT,
|
|
44684
44507
|
className
|
|
44685
44508
|
}) {
|
|
44686
|
-
const canvasRef =
|
|
44687
|
-
const frameRef =
|
|
44688
|
-
|
|
44509
|
+
const canvasRef = React76.useRef(null);
|
|
44510
|
+
const frameRef = React76.useRef(0);
|
|
44511
|
+
React76.useEffect(() => {
|
|
44689
44512
|
const canvas = canvasRef.current;
|
|
44690
44513
|
if (!canvas) return;
|
|
44691
44514
|
const ctx = canvas.getContext("2d");
|
|
@@ -44782,7 +44605,7 @@ var init_MiniMap = __esm({
|
|
|
44782
44605
|
}
|
|
44783
44606
|
});
|
|
44784
44607
|
function extractTitle2(children) {
|
|
44785
|
-
if (!
|
|
44608
|
+
if (!React76__default.isValidElement(children)) return void 0;
|
|
44786
44609
|
const props = children.props;
|
|
44787
44610
|
if (typeof props.title === "string") {
|
|
44788
44611
|
return props.title;
|
|
@@ -45853,7 +45676,7 @@ var init_debugRegistry = __esm({
|
|
|
45853
45676
|
}
|
|
45854
45677
|
});
|
|
45855
45678
|
function useDebugData() {
|
|
45856
|
-
const [data, setData] =
|
|
45679
|
+
const [data, setData] = React76.useState(() => ({
|
|
45857
45680
|
traits: [],
|
|
45858
45681
|
ticks: [],
|
|
45859
45682
|
guards: [],
|
|
@@ -45867,7 +45690,7 @@ function useDebugData() {
|
|
|
45867
45690
|
},
|
|
45868
45691
|
lastUpdate: Date.now()
|
|
45869
45692
|
}));
|
|
45870
|
-
|
|
45693
|
+
React76.useEffect(() => {
|
|
45871
45694
|
const updateData = () => {
|
|
45872
45695
|
setData({
|
|
45873
45696
|
traits: getAllTraits(),
|
|
@@ -45976,12 +45799,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
45976
45799
|
return positions;
|
|
45977
45800
|
}
|
|
45978
45801
|
function WalkMinimap() {
|
|
45979
|
-
const [walkStep, setWalkStep] =
|
|
45980
|
-
const [traits2, setTraits] =
|
|
45981
|
-
const [coveredEdges, setCoveredEdges] =
|
|
45982
|
-
const [completedTraits, setCompletedTraits] =
|
|
45983
|
-
const prevTraitRef =
|
|
45984
|
-
|
|
45802
|
+
const [walkStep, setWalkStep] = React76.useState(null);
|
|
45803
|
+
const [traits2, setTraits] = React76.useState([]);
|
|
45804
|
+
const [coveredEdges, setCoveredEdges] = React76.useState([]);
|
|
45805
|
+
const [completedTraits, setCompletedTraits] = React76.useState(/* @__PURE__ */ new Set());
|
|
45806
|
+
const prevTraitRef = React76.useRef(null);
|
|
45807
|
+
React76.useEffect(() => {
|
|
45985
45808
|
const interval = setInterval(() => {
|
|
45986
45809
|
const w = window;
|
|
45987
45810
|
const step = w.__orbitalWalkStep;
|
|
@@ -46417,15 +46240,15 @@ var init_EntitiesTab = __esm({
|
|
|
46417
46240
|
});
|
|
46418
46241
|
function EventFlowTab({ events: events2 }) {
|
|
46419
46242
|
const { t } = useTranslate();
|
|
46420
|
-
const [filter, setFilter] =
|
|
46421
|
-
const containerRef =
|
|
46422
|
-
const [autoScroll, setAutoScroll] =
|
|
46423
|
-
|
|
46243
|
+
const [filter, setFilter] = React76.useState("all");
|
|
46244
|
+
const containerRef = React76.useRef(null);
|
|
46245
|
+
const [autoScroll, setAutoScroll] = React76.useState(true);
|
|
46246
|
+
React76.useEffect(() => {
|
|
46424
46247
|
if (autoScroll && containerRef.current) {
|
|
46425
46248
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46426
46249
|
}
|
|
46427
46250
|
}, [events2.length, autoScroll]);
|
|
46428
|
-
const filteredEvents =
|
|
46251
|
+
const filteredEvents = React76.useMemo(() => {
|
|
46429
46252
|
if (filter === "all") return events2;
|
|
46430
46253
|
return events2.filter((e) => e.type === filter);
|
|
46431
46254
|
}, [events2, filter]);
|
|
@@ -46541,7 +46364,7 @@ var init_EventFlowTab = __esm({
|
|
|
46541
46364
|
});
|
|
46542
46365
|
function GuardsPanel({ guards }) {
|
|
46543
46366
|
const { t } = useTranslate();
|
|
46544
|
-
const [filter, setFilter] =
|
|
46367
|
+
const [filter, setFilter] = React76.useState("all");
|
|
46545
46368
|
if (guards.length === 0) {
|
|
46546
46369
|
return /* @__PURE__ */ jsx(
|
|
46547
46370
|
EmptyState,
|
|
@@ -46554,7 +46377,7 @@ function GuardsPanel({ guards }) {
|
|
|
46554
46377
|
}
|
|
46555
46378
|
const passedCount = guards.filter((g) => g.result).length;
|
|
46556
46379
|
const failedCount = guards.length - passedCount;
|
|
46557
|
-
const filteredGuards =
|
|
46380
|
+
const filteredGuards = React76.useMemo(() => {
|
|
46558
46381
|
if (filter === "all") return guards;
|
|
46559
46382
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
46560
46383
|
return guards.filter((g) => !g.result);
|
|
@@ -46717,10 +46540,10 @@ function EffectBadge({ effect }) {
|
|
|
46717
46540
|
}
|
|
46718
46541
|
function TransitionTimeline({ transitions }) {
|
|
46719
46542
|
const { t } = useTranslate();
|
|
46720
|
-
const containerRef =
|
|
46721
|
-
const [autoScroll, setAutoScroll] =
|
|
46722
|
-
const [expandedId, setExpandedId] =
|
|
46723
|
-
|
|
46543
|
+
const containerRef = React76.useRef(null);
|
|
46544
|
+
const [autoScroll, setAutoScroll] = React76.useState(true);
|
|
46545
|
+
const [expandedId, setExpandedId] = React76.useState(null);
|
|
46546
|
+
React76.useEffect(() => {
|
|
46724
46547
|
if (autoScroll && containerRef.current) {
|
|
46725
46548
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46726
46549
|
}
|
|
@@ -47000,9 +46823,9 @@ function getAllEvents(traits2) {
|
|
|
47000
46823
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47001
46824
|
const eventBus = useEventBus();
|
|
47002
46825
|
const { t } = useTranslate();
|
|
47003
|
-
const [
|
|
47004
|
-
const prevStatesRef =
|
|
47005
|
-
|
|
46826
|
+
const [log10, setLog] = React76.useState([]);
|
|
46827
|
+
const prevStatesRef = React76.useRef(/* @__PURE__ */ new Map());
|
|
46828
|
+
React76.useEffect(() => {
|
|
47006
46829
|
for (const trait of traits2) {
|
|
47007
46830
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47008
46831
|
if (prev && prev !== trait.currentState) {
|
|
@@ -47064,9 +46887,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
47064
46887
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
47065
46888
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
47066
46889
|
] }),
|
|
47067
|
-
|
|
46890
|
+
log10.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
47068
46891
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
47069
|
-
/* @__PURE__ */ jsx(Stack, { gap: "xs", children:
|
|
46892
|
+
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log10.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
47070
46893
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
47071
46894
|
" ",
|
|
47072
46895
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -47171,10 +46994,10 @@ function VerifyModePanel({
|
|
|
47171
46994
|
localCount
|
|
47172
46995
|
}) {
|
|
47173
46996
|
const { t } = useTranslate();
|
|
47174
|
-
const [expanded, setExpanded] =
|
|
47175
|
-
const scrollRef =
|
|
47176
|
-
const prevCountRef =
|
|
47177
|
-
|
|
46997
|
+
const [expanded, setExpanded] = React76.useState(true);
|
|
46998
|
+
const scrollRef = React76.useRef(null);
|
|
46999
|
+
const prevCountRef = React76.useRef(0);
|
|
47000
|
+
React76.useEffect(() => {
|
|
47178
47001
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
47179
47002
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
47180
47003
|
}
|
|
@@ -47231,10 +47054,10 @@ function RuntimeDebugger({
|
|
|
47231
47054
|
schema
|
|
47232
47055
|
}) {
|
|
47233
47056
|
const { t } = useTranslate();
|
|
47234
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47235
|
-
const [isVisible, setIsVisible] =
|
|
47057
|
+
const [isCollapsed, setIsCollapsed] = React76.useState(mode === "verify" ? true : defaultCollapsed);
|
|
47058
|
+
const [isVisible, setIsVisible] = React76.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47236
47059
|
const debugData = useDebugData();
|
|
47237
|
-
|
|
47060
|
+
React76.useEffect(() => {
|
|
47238
47061
|
if (mode === "inline") return;
|
|
47239
47062
|
return onDebugToggle((enabled) => {
|
|
47240
47063
|
setIsVisible(enabled);
|
|
@@ -47243,7 +47066,7 @@ function RuntimeDebugger({
|
|
|
47243
47066
|
}
|
|
47244
47067
|
});
|
|
47245
47068
|
}, [mode]);
|
|
47246
|
-
|
|
47069
|
+
React76.useEffect(() => {
|
|
47247
47070
|
if (mode === "inline") return;
|
|
47248
47071
|
const handleKeyDown = (e) => {
|
|
47249
47072
|
if (e.key === "`" && isVisible) {
|
|
@@ -47803,7 +47626,7 @@ function SequenceBar({
|
|
|
47803
47626
|
onSlotRemove(index);
|
|
47804
47627
|
}, [onSlotRemove, playing]);
|
|
47805
47628
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
47806
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
47629
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
|
|
47807
47630
|
i > 0 && /* @__PURE__ */ jsx(
|
|
47808
47631
|
Typography,
|
|
47809
47632
|
{
|
|
@@ -48803,7 +48626,7 @@ var init_StatCard = __esm({
|
|
|
48803
48626
|
const labelToUse = propLabel ?? propTitle;
|
|
48804
48627
|
const eventBus = useEventBus();
|
|
48805
48628
|
const { t } = useTranslate();
|
|
48806
|
-
const handleActionClick =
|
|
48629
|
+
const handleActionClick = React76__default.useCallback(() => {
|
|
48807
48630
|
if (action?.event) {
|
|
48808
48631
|
eventBus.emit(`UI:${action.event}`, {});
|
|
48809
48632
|
}
|
|
@@ -48814,7 +48637,7 @@ var init_StatCard = __esm({
|
|
|
48814
48637
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
48815
48638
|
const isLoading = externalLoading ?? false;
|
|
48816
48639
|
const error = externalError;
|
|
48817
|
-
const computeMetricValue =
|
|
48640
|
+
const computeMetricValue = React76__default.useCallback(
|
|
48818
48641
|
(metric, items) => {
|
|
48819
48642
|
if (metric.value !== void 0) {
|
|
48820
48643
|
return metric.value;
|
|
@@ -48853,7 +48676,7 @@ var init_StatCard = __esm({
|
|
|
48853
48676
|
},
|
|
48854
48677
|
[]
|
|
48855
48678
|
);
|
|
48856
|
-
const schemaStats =
|
|
48679
|
+
const schemaStats = React76__default.useMemo(() => {
|
|
48857
48680
|
if (!metrics || metrics.length === 0) return null;
|
|
48858
48681
|
return metrics.map((metric) => ({
|
|
48859
48682
|
label: metric.label,
|
|
@@ -48861,7 +48684,7 @@ var init_StatCard = __esm({
|
|
|
48861
48684
|
format: metric.format
|
|
48862
48685
|
}));
|
|
48863
48686
|
}, [metrics, data, computeMetricValue]);
|
|
48864
|
-
const calculatedTrend =
|
|
48687
|
+
const calculatedTrend = React76__default.useMemo(() => {
|
|
48865
48688
|
if (manualTrend !== void 0) return manualTrend;
|
|
48866
48689
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
48867
48690
|
return void 0;
|
|
@@ -49911,7 +49734,7 @@ var init_Timeline = __esm({
|
|
|
49911
49734
|
}) => {
|
|
49912
49735
|
const { t } = useTranslate();
|
|
49913
49736
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
49914
|
-
const items =
|
|
49737
|
+
const items = React76__default.useMemo(() => {
|
|
49915
49738
|
if (propItems) return propItems;
|
|
49916
49739
|
if (entityData.length === 0) return [];
|
|
49917
49740
|
return entityData.map((record, idx) => {
|
|
@@ -50068,7 +49891,7 @@ var init_TimerDisplay = __esm({
|
|
|
50068
49891
|
}
|
|
50069
49892
|
});
|
|
50070
49893
|
function extractToastProps(children) {
|
|
50071
|
-
if (!
|
|
49894
|
+
if (!React76__default.isValidElement(children)) {
|
|
50072
49895
|
if (typeof children === "string") {
|
|
50073
49896
|
return { message: children };
|
|
50074
49897
|
}
|
|
@@ -50106,7 +49929,7 @@ var init_ToastSlot = __esm({
|
|
|
50106
49929
|
eventBus.emit("UI:CLOSE");
|
|
50107
49930
|
};
|
|
50108
49931
|
if (!isVisible) return null;
|
|
50109
|
-
const isCustomContent =
|
|
49932
|
+
const isCustomContent = React76__default.isValidElement(children) && !message;
|
|
50110
49933
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50111
49934
|
Toast,
|
|
50112
49935
|
{
|
|
@@ -50985,8 +50808,8 @@ function XPBar({
|
|
|
50985
50808
|
}) {
|
|
50986
50809
|
const sizes = sizeMap18[size];
|
|
50987
50810
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
50988
|
-
const [fillWidth, setFillWidth] =
|
|
50989
|
-
|
|
50811
|
+
const [fillWidth, setFillWidth] = React76.useState(animated ? 0 : percentage);
|
|
50812
|
+
React76.useEffect(() => {
|
|
50990
50813
|
if (!animated) {
|
|
50991
50814
|
setFillWidth(percentage);
|
|
50992
50815
|
return;
|
|
@@ -51059,7 +50882,7 @@ var init_XPBar = __esm({
|
|
|
51059
50882
|
}
|
|
51060
50883
|
});
|
|
51061
50884
|
function lazyThree(name, loader) {
|
|
51062
|
-
const Lazy =
|
|
50885
|
+
const Lazy = React76__default.lazy(
|
|
51063
50886
|
() => loader().then((m) => {
|
|
51064
50887
|
const Resolved = m[name];
|
|
51065
50888
|
if (!Resolved) {
|
|
@@ -51071,13 +50894,13 @@ function lazyThree(name, loader) {
|
|
|
51071
50894
|
})
|
|
51072
50895
|
);
|
|
51073
50896
|
function ThreeWrapper(props) {
|
|
51074
|
-
return
|
|
50897
|
+
return React76__default.createElement(
|
|
51075
50898
|
ThreeBoundary,
|
|
51076
50899
|
{ name },
|
|
51077
|
-
|
|
51078
|
-
|
|
50900
|
+
React76__default.createElement(
|
|
50901
|
+
React76__default.Suspense,
|
|
51079
50902
|
{ fallback: null },
|
|
51080
|
-
|
|
50903
|
+
React76__default.createElement(Lazy, props)
|
|
51081
50904
|
)
|
|
51082
50905
|
);
|
|
51083
50906
|
}
|
|
@@ -51375,7 +51198,7 @@ var init_component_registry_generated = __esm({
|
|
|
51375
51198
|
init_WorldMapBoard();
|
|
51376
51199
|
init_WorldMapTemplate();
|
|
51377
51200
|
init_XPBar();
|
|
51378
|
-
ThreeBoundary = class extends
|
|
51201
|
+
ThreeBoundary = class extends React76__default.Component {
|
|
51379
51202
|
constructor() {
|
|
51380
51203
|
super(...arguments);
|
|
51381
51204
|
__publicField(this, "state", { failed: false });
|
|
@@ -51385,7 +51208,7 @@ var init_component_registry_generated = __esm({
|
|
|
51385
51208
|
}
|
|
51386
51209
|
render() {
|
|
51387
51210
|
if (this.state.failed) {
|
|
51388
|
-
return
|
|
51211
|
+
return React76__default.createElement(
|
|
51389
51212
|
"div",
|
|
51390
51213
|
{
|
|
51391
51214
|
"data-testid": "three-unavailable",
|
|
@@ -51726,7 +51549,7 @@ function SuspenseConfigProvider({
|
|
|
51726
51549
|
config,
|
|
51727
51550
|
children
|
|
51728
51551
|
}) {
|
|
51729
|
-
return
|
|
51552
|
+
return React76__default.createElement(
|
|
51730
51553
|
SuspenseConfigContext.Provider,
|
|
51731
51554
|
{ value: config },
|
|
51732
51555
|
children
|
|
@@ -52216,7 +52039,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
52216
52039
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
52217
52040
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
52218
52041
|
}
|
|
52219
|
-
return /* @__PURE__ */ jsx(
|
|
52042
|
+
return /* @__PURE__ */ jsx(React76__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
52220
52043
|
}
|
|
52221
52044
|
if (!child || typeof child !== "object") return null;
|
|
52222
52045
|
const childId = `${parentId}-${index}`;
|
|
@@ -52256,14 +52079,14 @@ function isPatternConfig(value) {
|
|
|
52256
52079
|
if (value === null || value === void 0) return false;
|
|
52257
52080
|
if (typeof value !== "object") return false;
|
|
52258
52081
|
if (Array.isArray(value)) return false;
|
|
52259
|
-
if (
|
|
52082
|
+
if (React76__default.isValidElement(value)) return false;
|
|
52260
52083
|
if (value instanceof Date) return false;
|
|
52261
52084
|
if (typeof value === "function") return false;
|
|
52262
52085
|
const record = value;
|
|
52263
52086
|
return "type" in record && typeof record.type === "string";
|
|
52264
52087
|
}
|
|
52265
52088
|
function isPlainConfigObject(value) {
|
|
52266
|
-
if (
|
|
52089
|
+
if (React76__default.isValidElement(value)) return false;
|
|
52267
52090
|
if (value instanceof Date) return false;
|
|
52268
52091
|
const proto = Object.getPrototypeOf(value);
|
|
52269
52092
|
return proto === Object.prototype || proto === null;
|