@almadar/ui 5.135.0 → 5.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TraitProvider-Ch79cUcb.d.cts → EntityBindingContext-CD9ZoXb4.d.cts} +30 -2
- package/dist/{TraitProvider-Ch79cUcb.d.ts → EntityBindingContext-CD9ZoXb4.d.ts} +30 -2
- package/dist/avl/index.cjs +1897 -1350
- package/dist/avl/index.js +959 -412
- package/dist/{cn-CZq0uJLA.d.ts → cn-CCaph5o9.d.ts} +1 -1
- package/dist/{cn-B8GXqrtp.d.cts → cn-CL0kdshO.d.cts} +1 -1
- package/dist/components/index.cjs +1558 -1224
- package/dist/components/index.d.cts +89 -12
- package/dist/components/index.d.ts +89 -12
- package/dist/components/index.js +614 -280
- package/dist/lib/drawable/three/index.cjs +1 -0
- package/dist/lib/drawable/three/index.d.cts +1 -1
- package/dist/lib/drawable/three/index.d.ts +1 -1
- package/dist/lib/drawable/three/index.js +1 -0
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/marketing/index.cjs +1 -0
- package/dist/marketing/index.js +1 -0
- package/dist/{paintDispatch-Bl2sfRFb.d.cts → paintDispatch-DXygiK7M.d.cts} +2 -2
- package/dist/{paintDispatch-Bl2sfRFb.d.ts → paintDispatch-DXygiK7M.d.ts} +2 -2
- package/dist/providers/index.cjs +1664 -1129
- package/dist/providers/index.d.cts +3 -3
- package/dist/providers/index.d.ts +3 -3
- package/dist/providers/index.js +812 -279
- package/dist/runtime/index.cjs +1758 -1211
- package/dist/runtime/index.d.cts +5 -2
- package/dist/runtime/index.d.ts +5 -2
- package/dist/runtime/index.js +939 -392
- package/package.json +6 -5
package/dist/components/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React75 from 'react';
|
|
3
|
+
import React75__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, Suspense, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, TraitScopeProvider } from '@almadar/ui/providers';
|
|
6
|
+
import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
7
7
|
export { GameAudioContext, GameAudioProvider, useGameAudioContext } from '@almadar/ui/providers';
|
|
8
8
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
9
9
|
import * as LucideIcons2 from 'lucide-react';
|
|
@@ -11,6 +11,8 @@ import { X, List, Printer, ChevronRight, ChevronLeft, RotateCcw, Play, Terminal,
|
|
|
11
11
|
import { useTranslate } from '@almadar/ui/hooks';
|
|
12
12
|
import { useUISlots, useTheme } from '@almadar/ui/context';
|
|
13
13
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
14
|
+
import { createContextFromBindings, interpolateValue } from '@almadar/runtime';
|
|
15
|
+
import { mergeEntityFrame, isInlineTrait, isRenderBindingMarker } from '@almadar/core';
|
|
14
16
|
import { createPortal } from 'react-dom';
|
|
15
17
|
import { wrapCallbackForEvent } from '@almadar/runtime/ui';
|
|
16
18
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
@@ -68,10 +70,10 @@ import ReactMarkdown from 'react-markdown';
|
|
|
68
70
|
import remarkGfm from 'remark-gfm';
|
|
69
71
|
import remarkMath from 'remark-math';
|
|
70
72
|
import rehypeKatex from 'rehype-katex';
|
|
71
|
-
import { mergeEntityFrame, isInlineTrait } from '@almadar/core';
|
|
72
73
|
import { DndContext, useSensors, useSensor, PointerSensor, KeyboardSensor, useDroppable, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
73
74
|
import { useSortable, arrayMove, sortableKeyboardCoordinates, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
74
75
|
import { CSS } from '@dnd-kit/utilities';
|
|
76
|
+
import { ordered, lib } from 'emojilib';
|
|
75
77
|
import { useNodeId, ReactFlowProvider, Handle, Position } from '@xyflow/react';
|
|
76
78
|
import { forceSimulation, forceLink, forceManyBody, forceCollide, forceX, forceY } from 'd3-force';
|
|
77
79
|
import { isDrawHostPattern, getPatternDefinition as getPatternDefinition$1, getComponentForPattern as getComponentForPattern$1 } from '@almadar/core/patterns';
|
|
@@ -260,7 +262,7 @@ var init_SvgFlow = __esm({
|
|
|
260
262
|
width = 100,
|
|
261
263
|
height = 100
|
|
262
264
|
}) => {
|
|
263
|
-
const markerId =
|
|
265
|
+
const markerId = React75__default.useMemo(() => {
|
|
264
266
|
flowIdCounter += 1;
|
|
265
267
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
266
268
|
}, []);
|
|
@@ -853,7 +855,7 @@ var init_SvgRing = __esm({
|
|
|
853
855
|
width = 100,
|
|
854
856
|
height = 100
|
|
855
857
|
}) => {
|
|
856
|
-
const gradientId =
|
|
858
|
+
const gradientId = React75__default.useMemo(() => {
|
|
857
859
|
ringIdCounter += 1;
|
|
858
860
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
859
861
|
}, []);
|
|
@@ -1395,7 +1397,7 @@ var init_Icon = __esm({
|
|
|
1395
1397
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1396
1398
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1397
1399
|
const family = useIconFamily();
|
|
1398
|
-
const RenderedComponent =
|
|
1400
|
+
const RenderedComponent = React75__default.useMemo(() => {
|
|
1399
1401
|
if (directIcon) return null;
|
|
1400
1402
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1401
1403
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1457,9 +1459,13 @@ function getAtlas(url, onReady) {
|
|
|
1457
1459
|
onReady();
|
|
1458
1460
|
}).catch(() => {
|
|
1459
1461
|
atlasCache.set(url, null);
|
|
1462
|
+
onReady();
|
|
1460
1463
|
});
|
|
1461
1464
|
return void 0;
|
|
1462
1465
|
}
|
|
1466
|
+
function atlasFailed(url) {
|
|
1467
|
+
return atlasCache.get(url) === null;
|
|
1468
|
+
}
|
|
1463
1469
|
function subRectFor(atlas, sprite) {
|
|
1464
1470
|
if (isTilesheet(atlas)) {
|
|
1465
1471
|
let col;
|
|
@@ -1515,7 +1521,7 @@ var init_atlasSlice = __esm({
|
|
|
1515
1521
|
}
|
|
1516
1522
|
});
|
|
1517
1523
|
function useAtlasSliceDataUrl(asset) {
|
|
1518
|
-
const [, bump] =
|
|
1524
|
+
const [, bump] = React75.useReducer((x) => x + 1, 0);
|
|
1519
1525
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1520
1526
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1521
1527
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1578,13 +1584,13 @@ function AtlasImage({
|
|
|
1578
1584
|
style,
|
|
1579
1585
|
"aria-hidden": ariaHidden
|
|
1580
1586
|
}) {
|
|
1581
|
-
const [, bump] =
|
|
1582
|
-
const canvasRef =
|
|
1587
|
+
const [, bump] = React75.useReducer((x) => x + 1, 0);
|
|
1588
|
+
const canvasRef = React75.useRef(null);
|
|
1583
1589
|
const sliced = isAtlasAsset(asset);
|
|
1584
1590
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1585
1591
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1586
1592
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1587
|
-
|
|
1593
|
+
React75.useEffect(() => {
|
|
1588
1594
|
const canvas = canvasRef.current;
|
|
1589
1595
|
if (!canvas || !img || !rect) return;
|
|
1590
1596
|
canvas.width = rect.sw;
|
|
@@ -1660,7 +1666,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1660
1666
|
const IconComp = value;
|
|
1661
1667
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1662
1668
|
}
|
|
1663
|
-
if (
|
|
1669
|
+
if (React75__default.isValidElement(value)) {
|
|
1664
1670
|
return value;
|
|
1665
1671
|
}
|
|
1666
1672
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1737,7 +1743,7 @@ var init_Button = __esm({
|
|
|
1737
1743
|
md: "h-icon-default w-icon-default",
|
|
1738
1744
|
lg: "h-icon-default w-icon-default"
|
|
1739
1745
|
};
|
|
1740
|
-
Button =
|
|
1746
|
+
Button = React75__default.forwardRef(
|
|
1741
1747
|
({
|
|
1742
1748
|
className,
|
|
1743
1749
|
variant = "primary",
|
|
@@ -1809,7 +1815,7 @@ var init_Input = __esm({
|
|
|
1809
1815
|
init_cn();
|
|
1810
1816
|
init_Icon();
|
|
1811
1817
|
init_useEventBus();
|
|
1812
|
-
Input =
|
|
1818
|
+
Input = React75__default.forwardRef(
|
|
1813
1819
|
({
|
|
1814
1820
|
className,
|
|
1815
1821
|
inputType,
|
|
@@ -1832,6 +1838,20 @@ var init_Input = __esm({
|
|
|
1832
1838
|
const { t } = useTranslate();
|
|
1833
1839
|
const eventBus = useEventBus();
|
|
1834
1840
|
const type = inputType || htmlType || "text";
|
|
1841
|
+
const isDeclarative = typeof onChange === "string";
|
|
1842
|
+
const [localValue, setLocalValue] = React75__default.useState(value);
|
|
1843
|
+
const pendingEchoRef = React75__default.useRef(/* @__PURE__ */ new Set());
|
|
1844
|
+
React75__default.useEffect(() => {
|
|
1845
|
+
if (!isDeclarative) return;
|
|
1846
|
+
const incoming = value == null ? "" : String(value);
|
|
1847
|
+
if (pendingEchoRef.current.has(incoming)) {
|
|
1848
|
+
pendingEchoRef.current.delete(incoming);
|
|
1849
|
+
return;
|
|
1850
|
+
}
|
|
1851
|
+
pendingEchoRef.current.clear();
|
|
1852
|
+
setLocalValue(value);
|
|
1853
|
+
}, [value, isDeclarative]);
|
|
1854
|
+
const displayValue = isDeclarative ? localValue : value;
|
|
1835
1855
|
const resolveIconNode = (i, cls) => {
|
|
1836
1856
|
if (!i) return null;
|
|
1837
1857
|
if (typeof i === "string") return /* @__PURE__ */ jsx(Icon, { name: i, className: cls });
|
|
@@ -1841,7 +1861,7 @@ var init_Input = __esm({
|
|
|
1841
1861
|
const iconCls = "h-icon-default w-icon-default";
|
|
1842
1862
|
const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
|
|
1843
1863
|
const resolvedLeftIcon = (leftIcon ? resolveIconNode(leftIcon, iconCls) : null) || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: iconCls });
|
|
1844
|
-
const showClearButton = clearable &&
|
|
1864
|
+
const showClearButton = clearable && displayValue && String(displayValue).length > 0;
|
|
1845
1865
|
const isMultiline = type === "textarea";
|
|
1846
1866
|
const baseClassName = cn(
|
|
1847
1867
|
"block w-full rounded-sm transition-all duration-fast",
|
|
@@ -1860,6 +1880,10 @@ var init_Input = __esm({
|
|
|
1860
1880
|
if (typeof onChange === "string") {
|
|
1861
1881
|
const target = e.target;
|
|
1862
1882
|
const payload = type === "checkbox" ? { checked: target.checked } : { value: target.value };
|
|
1883
|
+
if (type !== "checkbox") {
|
|
1884
|
+
pendingEchoRef.current.add(target.value);
|
|
1885
|
+
setLocalValue(target.value);
|
|
1886
|
+
}
|
|
1863
1887
|
eventBus.emit(`UI:${onChange}`, payload);
|
|
1864
1888
|
} else {
|
|
1865
1889
|
onChange?.(e);
|
|
@@ -1890,7 +1914,7 @@ var init_Input = __esm({
|
|
|
1890
1914
|
"select",
|
|
1891
1915
|
{
|
|
1892
1916
|
ref,
|
|
1893
|
-
value,
|
|
1917
|
+
value: displayValue,
|
|
1894
1918
|
onChange: handleChange,
|
|
1895
1919
|
className: cn(baseClassName, "appearance-none pr-10", className),
|
|
1896
1920
|
...props,
|
|
@@ -1910,7 +1934,7 @@ var init_Input = __esm({
|
|
|
1910
1934
|
"textarea",
|
|
1911
1935
|
{
|
|
1912
1936
|
ref,
|
|
1913
|
-
value,
|
|
1937
|
+
value: displayValue,
|
|
1914
1938
|
onChange: handleChange,
|
|
1915
1939
|
rows: rows2,
|
|
1916
1940
|
className: baseClassName,
|
|
@@ -1949,7 +1973,7 @@ var init_Input = __esm({
|
|
|
1949
1973
|
{
|
|
1950
1974
|
ref,
|
|
1951
1975
|
type,
|
|
1952
|
-
value,
|
|
1976
|
+
value: displayValue,
|
|
1953
1977
|
onChange: handleChange,
|
|
1954
1978
|
onKeyDown: handleKeyDown,
|
|
1955
1979
|
className: baseClassName,
|
|
@@ -1977,7 +2001,7 @@ var Label;
|
|
|
1977
2001
|
var init_Label = __esm({
|
|
1978
2002
|
"components/core/atoms/Label.tsx"() {
|
|
1979
2003
|
init_cn();
|
|
1980
|
-
Label =
|
|
2004
|
+
Label = React75__default.forwardRef(
|
|
1981
2005
|
({ className, required, children, ...props }, ref) => {
|
|
1982
2006
|
return /* @__PURE__ */ jsxs(
|
|
1983
2007
|
"label",
|
|
@@ -2004,7 +2028,7 @@ var init_Textarea = __esm({
|
|
|
2004
2028
|
"components/core/atoms/Textarea.tsx"() {
|
|
2005
2029
|
init_cn();
|
|
2006
2030
|
init_useEventBus();
|
|
2007
|
-
Textarea =
|
|
2031
|
+
Textarea = React75__default.forwardRef(
|
|
2008
2032
|
({ className, error, onChange, ...props }, ref) => {
|
|
2009
2033
|
const eventBus = useEventBus();
|
|
2010
2034
|
const handleChange = (e) => {
|
|
@@ -2243,7 +2267,7 @@ var init_Select = __esm({
|
|
|
2243
2267
|
init_cn();
|
|
2244
2268
|
init_Icon();
|
|
2245
2269
|
init_useEventBus();
|
|
2246
|
-
Select =
|
|
2270
|
+
Select = React75__default.forwardRef(
|
|
2247
2271
|
(props, _ref) => {
|
|
2248
2272
|
const { multiple, searchable, clearable } = props;
|
|
2249
2273
|
if (multiple || searchable || clearable) {
|
|
@@ -2260,7 +2284,7 @@ var init_Checkbox = __esm({
|
|
|
2260
2284
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2261
2285
|
init_cn();
|
|
2262
2286
|
init_useEventBus();
|
|
2263
|
-
Checkbox =
|
|
2287
|
+
Checkbox = React75__default.forwardRef(
|
|
2264
2288
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
2265
2289
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2266
2290
|
const eventBus = useEventBus();
|
|
@@ -2314,7 +2338,7 @@ var init_Spinner = __esm({
|
|
|
2314
2338
|
md: "h-6 w-6",
|
|
2315
2339
|
lg: "h-8 w-8"
|
|
2316
2340
|
};
|
|
2317
|
-
Spinner =
|
|
2341
|
+
Spinner = React75__default.forwardRef(
|
|
2318
2342
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
2319
2343
|
if (overlay) {
|
|
2320
2344
|
return /* @__PURE__ */ jsx(
|
|
@@ -2404,7 +2428,7 @@ var init_Card = __esm({
|
|
|
2404
2428
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2405
2429
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2406
2430
|
};
|
|
2407
|
-
Card =
|
|
2431
|
+
Card = React75__default.forwardRef(
|
|
2408
2432
|
({
|
|
2409
2433
|
className,
|
|
2410
2434
|
variant = "bordered",
|
|
@@ -2453,9 +2477,9 @@ var init_Card = __esm({
|
|
|
2453
2477
|
}
|
|
2454
2478
|
);
|
|
2455
2479
|
Card.displayName = "Card";
|
|
2456
|
-
CardHeader =
|
|
2480
|
+
CardHeader = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2457
2481
|
CardHeader.displayName = "CardHeader";
|
|
2458
|
-
CardTitle =
|
|
2482
|
+
CardTitle = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2459
2483
|
"h3",
|
|
2460
2484
|
{
|
|
2461
2485
|
ref,
|
|
@@ -2468,11 +2492,11 @@ var init_Card = __esm({
|
|
|
2468
2492
|
}
|
|
2469
2493
|
));
|
|
2470
2494
|
CardTitle.displayName = "CardTitle";
|
|
2471
|
-
CardContent =
|
|
2495
|
+
CardContent = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2472
2496
|
CardContent.displayName = "CardContent";
|
|
2473
2497
|
CardBody = CardContent;
|
|
2474
2498
|
CardBody.displayName = "CardBody";
|
|
2475
|
-
CardFooter =
|
|
2499
|
+
CardFooter = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2476
2500
|
"div",
|
|
2477
2501
|
{
|
|
2478
2502
|
ref,
|
|
@@ -2526,7 +2550,7 @@ var init_Badge = __esm({
|
|
|
2526
2550
|
md: "px-2.5 py-1 text-sm",
|
|
2527
2551
|
lg: "px-3 py-1.5 text-base"
|
|
2528
2552
|
};
|
|
2529
|
-
Badge =
|
|
2553
|
+
Badge = React75__default.forwardRef(
|
|
2530
2554
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2531
2555
|
const iconSizes3 = {
|
|
2532
2556
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2654,7 +2678,7 @@ var init_FilterPill = __esm({
|
|
|
2654
2678
|
md: "w-3.5 h-3.5",
|
|
2655
2679
|
lg: "w-4 h-4"
|
|
2656
2680
|
};
|
|
2657
|
-
FilterPill =
|
|
2681
|
+
FilterPill = React75__default.forwardRef(
|
|
2658
2682
|
({
|
|
2659
2683
|
className,
|
|
2660
2684
|
variant = "default",
|
|
@@ -2783,8 +2807,8 @@ var init_Avatar = __esm({
|
|
|
2783
2807
|
actionPayload
|
|
2784
2808
|
}) => {
|
|
2785
2809
|
const eventBus = useEventBus();
|
|
2786
|
-
const [imgFailed, setImgFailed] =
|
|
2787
|
-
|
|
2810
|
+
const [imgFailed, setImgFailed] = React75__default.useState(false);
|
|
2811
|
+
React75__default.useEffect(() => {
|
|
2788
2812
|
setImgFailed(false);
|
|
2789
2813
|
}, [src]);
|
|
2790
2814
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3036,7 +3060,7 @@ var init_Box = __esm({
|
|
|
3036
3060
|
fixed: "fixed",
|
|
3037
3061
|
sticky: "sticky"
|
|
3038
3062
|
};
|
|
3039
|
-
Box =
|
|
3063
|
+
Box = React75__default.forwardRef(
|
|
3040
3064
|
({
|
|
3041
3065
|
padding,
|
|
3042
3066
|
paddingX,
|
|
@@ -3101,7 +3125,7 @@ var init_Box = __esm({
|
|
|
3101
3125
|
onPointerDown?.(e);
|
|
3102
3126
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3103
3127
|
const isClickable = action || onClick;
|
|
3104
|
-
return
|
|
3128
|
+
return React75__default.createElement(
|
|
3105
3129
|
Component,
|
|
3106
3130
|
{
|
|
3107
3131
|
ref,
|
|
@@ -3155,7 +3179,7 @@ var init_Center = __esm({
|
|
|
3155
3179
|
as: Component = "div"
|
|
3156
3180
|
}) => {
|
|
3157
3181
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3158
|
-
return
|
|
3182
|
+
return React75__default.createElement(Component, {
|
|
3159
3183
|
className: cn(
|
|
3160
3184
|
inline ? "inline-flex" : "flex",
|
|
3161
3185
|
horizontal && "justify-center",
|
|
@@ -3423,7 +3447,7 @@ var init_Radio = __esm({
|
|
|
3423
3447
|
md: "w-2.5 h-2.5",
|
|
3424
3448
|
lg: "w-3 h-3"
|
|
3425
3449
|
};
|
|
3426
|
-
Radio =
|
|
3450
|
+
Radio = React75__default.forwardRef(
|
|
3427
3451
|
({
|
|
3428
3452
|
label,
|
|
3429
3453
|
helperText,
|
|
@@ -3440,12 +3464,12 @@ var init_Radio = __esm({
|
|
|
3440
3464
|
onChange,
|
|
3441
3465
|
...props
|
|
3442
3466
|
}, ref) => {
|
|
3443
|
-
const reactId =
|
|
3467
|
+
const reactId = React75__default.useId();
|
|
3444
3468
|
const baseId = id || `radio-${reactId}`;
|
|
3445
3469
|
const hasError = !!error;
|
|
3446
3470
|
const eventBus = useEventBus();
|
|
3447
|
-
const [selected, setSelected] =
|
|
3448
|
-
|
|
3471
|
+
const [selected, setSelected] = React75__default.useState(value);
|
|
3472
|
+
React75__default.useEffect(() => {
|
|
3449
3473
|
if (value !== void 0) setSelected(value);
|
|
3450
3474
|
}, [value]);
|
|
3451
3475
|
const pick = (next, e) => {
|
|
@@ -3627,7 +3651,7 @@ var init_Switch = __esm({
|
|
|
3627
3651
|
"components/core/atoms/Switch.tsx"() {
|
|
3628
3652
|
"use client";
|
|
3629
3653
|
init_cn();
|
|
3630
|
-
Switch =
|
|
3654
|
+
Switch = React75.forwardRef(
|
|
3631
3655
|
({
|
|
3632
3656
|
checked,
|
|
3633
3657
|
defaultChecked = false,
|
|
@@ -3638,10 +3662,10 @@ var init_Switch = __esm({
|
|
|
3638
3662
|
name,
|
|
3639
3663
|
className
|
|
3640
3664
|
}, ref) => {
|
|
3641
|
-
const [isChecked, setIsChecked] =
|
|
3665
|
+
const [isChecked, setIsChecked] = React75.useState(
|
|
3642
3666
|
checked !== void 0 ? checked : defaultChecked
|
|
3643
3667
|
);
|
|
3644
|
-
|
|
3668
|
+
React75.useEffect(() => {
|
|
3645
3669
|
if (checked !== void 0) {
|
|
3646
3670
|
setIsChecked(checked);
|
|
3647
3671
|
}
|
|
@@ -3804,7 +3828,7 @@ var init_Stack = __esm({
|
|
|
3804
3828
|
};
|
|
3805
3829
|
const isHorizontal = direction === "horizontal";
|
|
3806
3830
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
3807
|
-
return
|
|
3831
|
+
return React75__default.createElement(
|
|
3808
3832
|
Component,
|
|
3809
3833
|
{
|
|
3810
3834
|
className: cn(
|
|
@@ -4093,7 +4117,7 @@ var init_Typography = __esm({
|
|
|
4093
4117
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
4094
4118
|
body = formatValue(body, format);
|
|
4095
4119
|
}
|
|
4096
|
-
return
|
|
4120
|
+
return React75__default.createElement(
|
|
4097
4121
|
Component,
|
|
4098
4122
|
{
|
|
4099
4123
|
id,
|
|
@@ -4327,7 +4351,7 @@ var Dialog;
|
|
|
4327
4351
|
var init_Dialog = __esm({
|
|
4328
4352
|
"components/core/atoms/Dialog.tsx"() {
|
|
4329
4353
|
init_cn();
|
|
4330
|
-
Dialog =
|
|
4354
|
+
Dialog = React75__default.forwardRef(
|
|
4331
4355
|
({
|
|
4332
4356
|
role = "dialog",
|
|
4333
4357
|
"aria-modal": ariaModal = true,
|
|
@@ -4353,7 +4377,7 @@ var Aside;
|
|
|
4353
4377
|
var init_Aside = __esm({
|
|
4354
4378
|
"components/core/atoms/Aside.tsx"() {
|
|
4355
4379
|
init_cn();
|
|
4356
|
-
Aside =
|
|
4380
|
+
Aside = React75__default.forwardRef(
|
|
4357
4381
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4358
4382
|
);
|
|
4359
4383
|
Aside.displayName = "Aside";
|
|
@@ -4432,9 +4456,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4432
4456
|
className
|
|
4433
4457
|
}) => {
|
|
4434
4458
|
const { t } = useTranslate();
|
|
4435
|
-
const [isVisible, setIsVisible] =
|
|
4436
|
-
const timeoutRef =
|
|
4437
|
-
const triggerRef =
|
|
4459
|
+
const [isVisible, setIsVisible] = React75__default.useState(false);
|
|
4460
|
+
const timeoutRef = React75__default.useRef(null);
|
|
4461
|
+
const triggerRef = React75__default.useRef(null);
|
|
4438
4462
|
const handleMouseEnter = () => {
|
|
4439
4463
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4440
4464
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4445,7 +4469,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4445
4469
|
};
|
|
4446
4470
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4447
4471
|
const open = isVisible || revealed;
|
|
4448
|
-
|
|
4472
|
+
React75__default.useEffect(() => {
|
|
4449
4473
|
return () => {
|
|
4450
4474
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4451
4475
|
};
|
|
@@ -4655,7 +4679,7 @@ var init_StatusDot = __esm({
|
|
|
4655
4679
|
md: "w-2.5 h-2.5",
|
|
4656
4680
|
lg: "w-3 h-3"
|
|
4657
4681
|
};
|
|
4658
|
-
StatusDot =
|
|
4682
|
+
StatusDot = React75__default.forwardRef(
|
|
4659
4683
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4660
4684
|
return /* @__PURE__ */ jsx(
|
|
4661
4685
|
"span",
|
|
@@ -4709,7 +4733,7 @@ var init_TrendIndicator = __esm({
|
|
|
4709
4733
|
down: "trending-down",
|
|
4710
4734
|
flat: "arrow-right"
|
|
4711
4735
|
};
|
|
4712
|
-
TrendIndicator =
|
|
4736
|
+
TrendIndicator = React75__default.forwardRef(
|
|
4713
4737
|
({
|
|
4714
4738
|
className,
|
|
4715
4739
|
value,
|
|
@@ -4778,7 +4802,7 @@ var init_RangeSlider = __esm({
|
|
|
4778
4802
|
md: "w-4 h-4",
|
|
4779
4803
|
lg: "w-5 h-5"
|
|
4780
4804
|
};
|
|
4781
|
-
RangeSlider =
|
|
4805
|
+
RangeSlider = React75__default.forwardRef(
|
|
4782
4806
|
({
|
|
4783
4807
|
className,
|
|
4784
4808
|
min = 0,
|
|
@@ -5389,7 +5413,7 @@ var init_ContentSection = __esm({
|
|
|
5389
5413
|
md: "py-16",
|
|
5390
5414
|
lg: "py-24"
|
|
5391
5415
|
};
|
|
5392
|
-
ContentSection =
|
|
5416
|
+
ContentSection = React75__default.forwardRef(
|
|
5393
5417
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5394
5418
|
return /* @__PURE__ */ jsx(
|
|
5395
5419
|
Box,
|
|
@@ -5923,7 +5947,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5923
5947
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5924
5948
|
"none": {}
|
|
5925
5949
|
};
|
|
5926
|
-
AnimatedReveal =
|
|
5950
|
+
AnimatedReveal = React75__default.forwardRef(
|
|
5927
5951
|
({
|
|
5928
5952
|
trigger = "scroll",
|
|
5929
5953
|
animation = "fade-up",
|
|
@@ -6083,7 +6107,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6083
6107
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6084
6108
|
"use client";
|
|
6085
6109
|
init_cn();
|
|
6086
|
-
AnimatedGraphic =
|
|
6110
|
+
AnimatedGraphic = React75__default.forwardRef(
|
|
6087
6111
|
({
|
|
6088
6112
|
src,
|
|
6089
6113
|
svgContent,
|
|
@@ -6106,7 +6130,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6106
6130
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6107
6131
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6108
6132
|
const prevAnimateRef = useRef(animate);
|
|
6109
|
-
const setRef =
|
|
6133
|
+
const setRef = React75__default.useCallback(
|
|
6110
6134
|
(node) => {
|
|
6111
6135
|
containerRef.current = node;
|
|
6112
6136
|
if (typeof ref === "function") ref(node);
|
|
@@ -6195,6 +6219,75 @@ var init_AnimatedGraphic = __esm({
|
|
|
6195
6219
|
AnimatedGraphic.displayName = "AnimatedGraphic";
|
|
6196
6220
|
}
|
|
6197
6221
|
});
|
|
6222
|
+
function resolveMarkerExpression(expression, entity, config, state) {
|
|
6223
|
+
const ctx = createContextFromBindings({
|
|
6224
|
+
entity,
|
|
6225
|
+
payload: {},
|
|
6226
|
+
state,
|
|
6227
|
+
...config !== void 0 ? { config } : {}
|
|
6228
|
+
});
|
|
6229
|
+
return interpolateValue(expression, ctx);
|
|
6230
|
+
}
|
|
6231
|
+
function isPlainObject(value) {
|
|
6232
|
+
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
6233
|
+
if (Array.isArray(value)) return false;
|
|
6234
|
+
if (React75__default.isValidElement(value)) return false;
|
|
6235
|
+
if (value instanceof Date) return false;
|
|
6236
|
+
if (typeof value === "function") return false;
|
|
6237
|
+
return true;
|
|
6238
|
+
}
|
|
6239
|
+
function walkValue(value, scopeTrait, entity, config, state) {
|
|
6240
|
+
if (isRenderBindingMarker(value)) {
|
|
6241
|
+
return { resolved: resolveMarkerExpression(value.expression, entity, config, state), changed: true };
|
|
6242
|
+
}
|
|
6243
|
+
if (Array.isArray(value)) {
|
|
6244
|
+
const out = [];
|
|
6245
|
+
let changed = false;
|
|
6246
|
+
for (const item of value) {
|
|
6247
|
+
const element = item;
|
|
6248
|
+
const wasMarker = isRenderBindingMarker(element);
|
|
6249
|
+
const { resolved, changed: itemChanged } = walkValue(element, scopeTrait, entity, config, state);
|
|
6250
|
+
if (wasMarker && Array.isArray(resolved)) {
|
|
6251
|
+
out.push(...resolved);
|
|
6252
|
+
changed = true;
|
|
6253
|
+
continue;
|
|
6254
|
+
}
|
|
6255
|
+
out.push(resolved);
|
|
6256
|
+
if (itemChanged) changed = true;
|
|
6257
|
+
}
|
|
6258
|
+
return changed ? { resolved: out, changed: true } : { resolved: value, changed: false };
|
|
6259
|
+
}
|
|
6260
|
+
if (isPlainObject(value)) {
|
|
6261
|
+
const sourceTrait = value._sourceTrait;
|
|
6262
|
+
if (typeof sourceTrait === "string" && sourceTrait !== scopeTrait) {
|
|
6263
|
+
return { resolved: value, changed: false };
|
|
6264
|
+
}
|
|
6265
|
+
const out = {};
|
|
6266
|
+
let changed = false;
|
|
6267
|
+
for (const [key, item] of Object.entries(value)) {
|
|
6268
|
+
const { resolved, changed: itemChanged } = walkValue(item, scopeTrait, entity, config, state);
|
|
6269
|
+
out[key] = resolved;
|
|
6270
|
+
if (itemChanged) changed = true;
|
|
6271
|
+
}
|
|
6272
|
+
return changed ? { resolved: out, changed: true } : { resolved: value, changed: false };
|
|
6273
|
+
}
|
|
6274
|
+
return { resolved: value, changed: false };
|
|
6275
|
+
}
|
|
6276
|
+
function resolveRenderBindingMarkers(props, scopeTrait, entity, config, state) {
|
|
6277
|
+
const out = {};
|
|
6278
|
+
let changed = false;
|
|
6279
|
+
for (const [key, value] of Object.entries(props)) {
|
|
6280
|
+
const { resolved, changed: propChanged } = walkValue(value, scopeTrait, entity, config, state);
|
|
6281
|
+
out[key] = resolved;
|
|
6282
|
+
if (propChanged) changed = true;
|
|
6283
|
+
}
|
|
6284
|
+
return changed ? out : props;
|
|
6285
|
+
}
|
|
6286
|
+
var init_resolve_render_bindings = __esm({
|
|
6287
|
+
"lib/resolve-render-bindings.ts"() {
|
|
6288
|
+
"use client";
|
|
6289
|
+
}
|
|
6290
|
+
});
|
|
6198
6291
|
var sizeClasses6, minWidthClasses, lookStyles2, Modal;
|
|
6199
6292
|
var init_Modal = __esm({
|
|
6200
6293
|
"components/core/molecules/Modal.tsx"() {
|
|
@@ -6782,7 +6875,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6782
6875
|
}
|
|
6783
6876
|
);
|
|
6784
6877
|
};
|
|
6785
|
-
ErrorBoundary = class extends
|
|
6878
|
+
ErrorBoundary = class extends React75__default.Component {
|
|
6786
6879
|
constructor(props) {
|
|
6787
6880
|
super(props);
|
|
6788
6881
|
__publicField(this, "reset", () => {
|
|
@@ -7065,7 +7158,7 @@ var init_Container = __esm({
|
|
|
7065
7158
|
as: Component = "div"
|
|
7066
7159
|
}) => {
|
|
7067
7160
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
7068
|
-
return
|
|
7161
|
+
return React75__default.createElement(
|
|
7069
7162
|
Component,
|
|
7070
7163
|
{
|
|
7071
7164
|
className: cn(
|
|
@@ -10429,7 +10522,7 @@ var init_CodeBlock = __esm({
|
|
|
10429
10522
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
10430
10523
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
10431
10524
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
10432
|
-
CodeBlock =
|
|
10525
|
+
CodeBlock = React75__default.memo(
|
|
10433
10526
|
({
|
|
10434
10527
|
code: rawCode,
|
|
10435
10528
|
language = "text",
|
|
@@ -11017,7 +11110,7 @@ var init_MarkdownContent = __esm({
|
|
|
11017
11110
|
init_Box();
|
|
11018
11111
|
init_CodeBlock();
|
|
11019
11112
|
init_cn();
|
|
11020
|
-
MarkdownContent =
|
|
11113
|
+
MarkdownContent = React75__default.memo(
|
|
11021
11114
|
({ content, direction = "ltr", className }) => {
|
|
11022
11115
|
const { t: _t } = useTranslate();
|
|
11023
11116
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -12344,7 +12437,7 @@ var init_StateMachineView = __esm({
|
|
|
12344
12437
|
style: { top: title ? 30 : 0 },
|
|
12345
12438
|
children: [
|
|
12346
12439
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
12347
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
12440
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React75__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
12348
12441
|
StateNode,
|
|
12349
12442
|
{
|
|
12350
12443
|
state,
|
|
@@ -14921,12 +15014,13 @@ function MiniMap({
|
|
|
14921
15014
|
tileAssets,
|
|
14922
15015
|
unitAssets
|
|
14923
15016
|
}) {
|
|
14924
|
-
const canvasRef =
|
|
14925
|
-
const imgCacheRef =
|
|
15017
|
+
const canvasRef = React75.useRef(null);
|
|
15018
|
+
const imgCacheRef = React75.useRef(/* @__PURE__ */ new Map());
|
|
14926
15019
|
function loadImg(url) {
|
|
14927
15020
|
const cached = imgCacheRef.current.get(url);
|
|
14928
15021
|
if (cached) return cached.complete ? cached : null;
|
|
14929
15022
|
const img = new Image();
|
|
15023
|
+
img.crossOrigin = "anonymous";
|
|
14930
15024
|
img.src = url;
|
|
14931
15025
|
img.onload = () => {
|
|
14932
15026
|
const canvas = canvasRef.current;
|
|
@@ -14937,7 +15031,7 @@ function MiniMap({
|
|
|
14937
15031
|
imgCacheRef.current.set(url, img);
|
|
14938
15032
|
return null;
|
|
14939
15033
|
}
|
|
14940
|
-
|
|
15034
|
+
React75.useEffect(() => {
|
|
14941
15035
|
const canvas = canvasRef.current;
|
|
14942
15036
|
if (!canvas) return;
|
|
14943
15037
|
const ctx = canvas.getContext("2d");
|
|
@@ -15287,7 +15381,7 @@ function useCamera(initial) {
|
|
|
15287
15381
|
const handleWheel = useCallback((e, drawFn) => {
|
|
15288
15382
|
e.preventDefault();
|
|
15289
15383
|
const zoomDelta = e.deltaY > 0 ? 0.9 : 1.1;
|
|
15290
|
-
cameraRef.current.zoom = Math.max(
|
|
15384
|
+
cameraRef.current.zoom = Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, cameraRef.current.zoom * zoomDelta));
|
|
15291
15385
|
drawFn?.();
|
|
15292
15386
|
}, []);
|
|
15293
15387
|
const handlePointerDown = useCallback((e) => {
|
|
@@ -15308,7 +15402,7 @@ function useCamera(initial) {
|
|
|
15308
15402
|
const zoomAtPoint = useCallback((factor, centerX, centerY, viewportSize, drawFn) => {
|
|
15309
15403
|
const cam = cameraRef.current;
|
|
15310
15404
|
const oldZoom = cam.zoom;
|
|
15311
|
-
const newZoom = Math.max(
|
|
15405
|
+
const newZoom = Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, oldZoom * factor));
|
|
15312
15406
|
if (newZoom === oldZoom) {
|
|
15313
15407
|
drawFn?.();
|
|
15314
15408
|
return;
|
|
@@ -15360,9 +15454,12 @@ function useCamera(initial) {
|
|
|
15360
15454
|
lerpToTarget
|
|
15361
15455
|
};
|
|
15362
15456
|
}
|
|
15457
|
+
var MIN_ZOOM, MAX_ZOOM;
|
|
15363
15458
|
var init_useCamera = __esm({
|
|
15364
15459
|
"hooks/useCamera.ts"() {
|
|
15365
15460
|
"use client";
|
|
15461
|
+
MIN_ZOOM = 0.05;
|
|
15462
|
+
MAX_ZOOM = 10;
|
|
15366
15463
|
}
|
|
15367
15464
|
});
|
|
15368
15465
|
function localPoint(canvas, clientX, clientY) {
|
|
@@ -15483,6 +15580,7 @@ function getOrLoadImage(url, onReady) {
|
|
|
15483
15580
|
return null;
|
|
15484
15581
|
}
|
|
15485
15582
|
const img = new Image();
|
|
15583
|
+
img.crossOrigin = "anonymous";
|
|
15486
15584
|
const entry = { img, status: "pending", onReady };
|
|
15487
15585
|
cache.set(url, entry);
|
|
15488
15586
|
updateAssetStatus(url, "pending");
|
|
@@ -15494,10 +15592,14 @@ function getOrLoadImage(url, onReady) {
|
|
|
15494
15592
|
img.onerror = () => {
|
|
15495
15593
|
entry.status = "failed";
|
|
15496
15594
|
updateAssetStatus(url, "failed");
|
|
15595
|
+
entry.onReady?.();
|
|
15497
15596
|
};
|
|
15498
15597
|
img.src = url;
|
|
15499
15598
|
return null;
|
|
15500
15599
|
}
|
|
15600
|
+
function getImageStatus(url) {
|
|
15601
|
+
return cache.get(url)?.status;
|
|
15602
|
+
}
|
|
15501
15603
|
var cache;
|
|
15502
15604
|
var init_imageCache = __esm({
|
|
15503
15605
|
"lib/imageCache.ts"() {
|
|
@@ -15635,39 +15737,39 @@ var init_webPainter2d = __esm({
|
|
|
15635
15737
|
});
|
|
15636
15738
|
|
|
15637
15739
|
// lib/isometric.ts
|
|
15638
|
-
function isoToScreen(tileX, tileY,
|
|
15639
|
-
const
|
|
15640
|
-
const
|
|
15740
|
+
function isoToScreen(tileX, tileY, cellWidth, baseOffsetX, layout = "isometric") {
|
|
15741
|
+
const w = cellWidth;
|
|
15742
|
+
const fh = cellWidth / 2;
|
|
15641
15743
|
if (layout === "hex") {
|
|
15642
|
-
const screenX2 = tileX *
|
|
15643
|
-
const screenY2 = tileY * (
|
|
15744
|
+
const screenX2 = tileX * w + (tileY & 1) * (w / 2) + baseOffsetX;
|
|
15745
|
+
const screenY2 = tileY * (fh * 0.75);
|
|
15644
15746
|
return { x: screenX2, y: screenY2 };
|
|
15645
15747
|
}
|
|
15646
15748
|
if (layout === "flat") {
|
|
15647
|
-
const screenX2 = tileX *
|
|
15648
|
-
const screenY2 = tileY *
|
|
15749
|
+
const screenX2 = tileX * w + baseOffsetX;
|
|
15750
|
+
const screenY2 = tileY * w;
|
|
15649
15751
|
return { x: screenX2, y: screenY2 };
|
|
15650
15752
|
}
|
|
15651
|
-
const screenX = (tileX - tileY) * (
|
|
15652
|
-
const screenY = (tileX + tileY) * (
|
|
15753
|
+
const screenX = (tileX - tileY) * (w / 2) + baseOffsetX;
|
|
15754
|
+
const screenY = (tileX + tileY) * (fh / 2);
|
|
15653
15755
|
return { x: screenX, y: screenY };
|
|
15654
15756
|
}
|
|
15655
|
-
function screenToIso(screenX, screenY,
|
|
15656
|
-
const
|
|
15657
|
-
const
|
|
15757
|
+
function screenToIso(screenX, screenY, cellWidth, baseOffsetX, layout = "isometric") {
|
|
15758
|
+
const w = cellWidth;
|
|
15759
|
+
const fh = cellWidth / 2;
|
|
15658
15760
|
if (layout === "hex") {
|
|
15659
|
-
const row = Math.round(screenY / (
|
|
15660
|
-
const col = Math.round((screenX - (row & 1) * (
|
|
15761
|
+
const row = Math.round(screenY / (fh * 0.75));
|
|
15762
|
+
const col = Math.round((screenX - (row & 1) * (w / 2) - baseOffsetX) / w);
|
|
15661
15763
|
return { x: col, y: row };
|
|
15662
15764
|
}
|
|
15663
15765
|
if (layout === "flat") {
|
|
15664
|
-
const col = Math.round((screenX - baseOffsetX) /
|
|
15665
|
-
const row = Math.round(screenY /
|
|
15766
|
+
const col = Math.round((screenX - baseOffsetX) / w);
|
|
15767
|
+
const row = Math.round(screenY / w);
|
|
15666
15768
|
return { x: col, y: row };
|
|
15667
15769
|
}
|
|
15668
15770
|
const adjustedX = screenX - baseOffsetX;
|
|
15669
|
-
const tileX = (adjustedX / (
|
|
15670
|
-
const tileY = (screenY / (
|
|
15771
|
+
const tileX = (adjustedX / (w / 2) + screenY / (fh / 2)) / 2;
|
|
15772
|
+
const tileY = (screenY / (fh / 2) - adjustedX / (w / 2)) / 2;
|
|
15671
15773
|
return { x: Math.round(tileX), y: Math.round(tileY) };
|
|
15672
15774
|
}
|
|
15673
15775
|
var TILE_WIDTH, TILE_HEIGHT, FLOOR_HEIGHT, DIAMOND_TOP_Y, FEATURE_COLORS, BACKGROUND_FALLBACK_COLOR, MINIMAP_TERRAIN_COLORS;
|
|
@@ -15698,12 +15800,13 @@ var init_isometric = __esm({
|
|
|
15698
15800
|
|
|
15699
15801
|
// lib/drawable/projector.ts
|
|
15700
15802
|
function create2DProjector(opts) {
|
|
15701
|
-
const {
|
|
15702
|
-
const
|
|
15703
|
-
const
|
|
15704
|
-
const
|
|
15803
|
+
const { baseOffsetX, layout } = opts;
|
|
15804
|
+
const tw = opts.tileWidth ?? TILE_WIDTH;
|
|
15805
|
+
const tileWidth = layout === "free" ? 1 : tw;
|
|
15806
|
+
const floorHeight = layout === "free" ? 1 : tw / 2;
|
|
15807
|
+
const diamondTopY = layout === "free" ? 0 : opts.diamondTopY ?? tw * (DIAMOND_TOP_Y / TILE_WIDTH);
|
|
15705
15808
|
const squareGrid = layout === "flat" || layout === "free";
|
|
15706
|
-
const project = (pos) => layout === "free" ? { x: pos.x, y: pos.y } : isoToScreen(pos.x, pos.y,
|
|
15809
|
+
const project = (pos) => layout === "free" ? { x: pos.x, y: pos.y } : isoToScreen(pos.x, pos.y, tw, baseOffsetX, layout);
|
|
15707
15810
|
const anchorPoint = (pos, anchor) => {
|
|
15708
15811
|
const base = project(pos);
|
|
15709
15812
|
if (anchor === "top-left") return base;
|
|
@@ -15734,7 +15837,7 @@ function create2DProjector(opts) {
|
|
|
15734
15837
|
{ x: base.x, y: topY + floorHeight / 2 }
|
|
15735
15838
|
];
|
|
15736
15839
|
};
|
|
15737
|
-
return { project, anchorPoint, cellPath, tileWidth, floorHeight, diamondTopY,
|
|
15840
|
+
return { project, anchorPoint, cellPath, tileWidth, floorHeight, diamondTopY, squareGrid, worldPixelDirect: layout === "free" };
|
|
15738
15841
|
}
|
|
15739
15842
|
var init_projector = __esm({
|
|
15740
15843
|
"lib/drawable/projector.ts"() {
|
|
@@ -15750,32 +15853,67 @@ var init_contract = __esm({
|
|
|
15750
15853
|
"lib/drawable/contract.ts"() {
|
|
15751
15854
|
}
|
|
15752
15855
|
});
|
|
15753
|
-
|
|
15754
|
-
|
|
15856
|
+
function warnMissingOnce(reason, node) {
|
|
15857
|
+
const key = `${reason}:${node.asset.url}:${String(node.asset.atlas)}:${String(node.asset.sprite)}`;
|
|
15858
|
+
if (loggedMissing.has(key)) return;
|
|
15859
|
+
loggedMissing.add(key);
|
|
15860
|
+
spriteLog.warn("draw-sprite asset unresolvable \u2014 painting fallback square", { reason, url: node.asset.url, atlas: node.asset.atlas, sprite: node.asset.sprite });
|
|
15861
|
+
}
|
|
15862
|
+
function paintFallbackSquare(painter, node, dctx, reason) {
|
|
15863
|
+
warnMissingOnce(reason, node);
|
|
15864
|
+
const tw = dctx.projector.tileWidth;
|
|
15865
|
+
const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
|
|
15866
|
+
const w = node.width !== void 0 ? node.width * tw : natural;
|
|
15867
|
+
const h = node.height !== void 0 ? node.height * tw : natural;
|
|
15868
|
+
const anchor = node.anchor ?? "top-left";
|
|
15869
|
+
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
15870
|
+
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
15871
|
+
const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
|
|
15872
|
+
painter.save();
|
|
15873
|
+
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
15874
|
+
painter.fillRect(dx, dy, w, h, "#9b8f7f");
|
|
15875
|
+
painter.strokeRect(dx, dy, w, h, "#5e564b", Math.max(1, tw / 32));
|
|
15876
|
+
painter.restore();
|
|
15877
|
+
}
|
|
15755
15878
|
function DrawSprite(_props) {
|
|
15756
15879
|
return null;
|
|
15757
15880
|
}
|
|
15758
|
-
var paintSprite;
|
|
15881
|
+
var spriteLog, loggedMissing, FALLBACK_WORLD_PX, paintSprite;
|
|
15759
15882
|
var init_DrawSprite = __esm({
|
|
15760
15883
|
"components/game/atoms/DrawSprite.tsx"() {
|
|
15761
15884
|
"use client";
|
|
15762
15885
|
init_atlasSlice();
|
|
15886
|
+
init_imageCache();
|
|
15763
15887
|
init_contract();
|
|
15888
|
+
spriteLog = createLogger("almadar:ui:draw-sprite");
|
|
15889
|
+
loggedMissing = /* @__PURE__ */ new Set();
|
|
15890
|
+
FALLBACK_WORLD_PX = 32;
|
|
15764
15891
|
paintSprite = (painter, node, dctx) => {
|
|
15765
15892
|
if (!node.asset?.url || !isValidScenePos(node.position)) return;
|
|
15766
15893
|
const tex = painter.resolveTexture(node.asset.url);
|
|
15767
|
-
if (!tex)
|
|
15894
|
+
if (!tex) {
|
|
15895
|
+
if (getImageStatus(node.asset.url) === "failed") paintFallbackSquare(painter, node, dctx, "texture-failed");
|
|
15896
|
+
return;
|
|
15897
|
+
}
|
|
15768
15898
|
let src = typeof node.frame === "object" ? node.frame : void 0;
|
|
15769
15899
|
if (!src && isAtlasAsset(node.asset)) {
|
|
15770
15900
|
const atlas = getAtlas(node.asset.atlas, dctx.invalidate);
|
|
15771
|
-
if (!atlas)
|
|
15901
|
+
if (!atlas) {
|
|
15902
|
+
if (atlasFailed(node.asset.atlas)) paintFallbackSquare(painter, node, dctx, "atlas-failed");
|
|
15903
|
+
return;
|
|
15904
|
+
}
|
|
15772
15905
|
const r = subRectFor(atlas, node.asset.sprite);
|
|
15773
|
-
if (!r)
|
|
15906
|
+
if (!r) {
|
|
15907
|
+
paintFallbackSquare(painter, node, dctx, "sprite-missing");
|
|
15908
|
+
return;
|
|
15909
|
+
}
|
|
15774
15910
|
src = { x: r.sx, y: r.sy, w: r.sw, h: r.sh };
|
|
15775
15911
|
}
|
|
15776
15912
|
const tw = dctx.projector.tileWidth;
|
|
15777
|
-
const
|
|
15778
|
-
const
|
|
15913
|
+
const fallbackW = dctx.projector.worldPixelDirect ? src ? src.w : tex.width : tw;
|
|
15914
|
+
const fallbackH = dctx.projector.worldPixelDirect ? src ? src.h : tex.height : tw;
|
|
15915
|
+
const w = node.width !== void 0 ? node.width * tw : fallbackW;
|
|
15916
|
+
const h = node.height !== void 0 ? node.height * tw : fallbackH;
|
|
15779
15917
|
const anchor = node.anchor ?? "top-left";
|
|
15780
15918
|
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
15781
15919
|
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
@@ -16041,6 +16179,8 @@ function Canvas2D({
|
|
|
16041
16179
|
keyUpMap,
|
|
16042
16180
|
camera = "pan-zoom",
|
|
16043
16181
|
scale = 0.4,
|
|
16182
|
+
tileWidth,
|
|
16183
|
+
fit = false,
|
|
16044
16184
|
showMinimap = true,
|
|
16045
16185
|
followTarget,
|
|
16046
16186
|
cameraPos,
|
|
@@ -16083,9 +16223,32 @@ function Canvas2D({
|
|
|
16083
16223
|
observer2.observe(el);
|
|
16084
16224
|
return () => observer2.disconnect();
|
|
16085
16225
|
}, []);
|
|
16086
|
-
const
|
|
16087
|
-
const
|
|
16088
|
-
const
|
|
16226
|
+
const [atlasVersion, setAtlasVersion] = useState(0);
|
|
16227
|
+
const bumpAtlas = useCallback(() => setAtlasVersion((v) => v + 1), []);
|
|
16228
|
+
const detectedTileWidth = useMemo(() => {
|
|
16229
|
+
for (const n of drawables ?? []) {
|
|
16230
|
+
const refs = [];
|
|
16231
|
+
if (n.type === "draw-sprite") refs.push(n.asset);
|
|
16232
|
+
else if (n.type === "draw-sprite-layer") for (const it of n.items) refs.push(it.asset);
|
|
16233
|
+
for (const a of refs) {
|
|
16234
|
+
if (a && isAtlasAsset(a) && a.atlas) {
|
|
16235
|
+
const atlas = getAtlas(a.atlas, bumpAtlas);
|
|
16236
|
+
if (atlas) {
|
|
16237
|
+
if ("tileWidth" in atlas) return atlas.tileWidth;
|
|
16238
|
+
if ("subTextures" in atlas) {
|
|
16239
|
+
const first = Object.values(atlas.subTextures)[0];
|
|
16240
|
+
if (first && typeof first.width === "number") return first.width;
|
|
16241
|
+
}
|
|
16242
|
+
}
|
|
16243
|
+
}
|
|
16244
|
+
}
|
|
16245
|
+
}
|
|
16246
|
+
return void 0;
|
|
16247
|
+
}, [drawables, atlasVersion]);
|
|
16248
|
+
const nativeTileW = tileWidth ?? detectedTileWidth ?? TILE_WIDTH;
|
|
16249
|
+
const scaledTileWidth = nativeTileW;
|
|
16250
|
+
const scaledFloorHeight = nativeTileW / 2;
|
|
16251
|
+
const scaledDiamondTopY = nativeTileW * (DIAMOND_TOP_Y / TILE_WIDTH);
|
|
16089
16252
|
const drawnItems = useMemo(() => collectDrawnItems(drawables ?? []), [drawables]);
|
|
16090
16253
|
const scenePositions = useMemo(() => drawnItems.map((i) => i.pos), [drawnItems]);
|
|
16091
16254
|
const hitIndex = useMemo(() => buildHitIndex(drawnItems), [drawnItems]);
|
|
@@ -16103,14 +16266,36 @@ function Canvas2D({
|
|
|
16103
16266
|
if (isFree || projection === "flat" || projection === "side") return 0;
|
|
16104
16267
|
return (gridExtent.height - 1) * (scaledTileWidth / 2);
|
|
16105
16268
|
}, [isFree, projection, gridExtent.height, scaledTileWidth]);
|
|
16269
|
+
const effectiveZoom = useMemo(() => {
|
|
16270
|
+
if (isFree || projection === "side") return scale;
|
|
16271
|
+
if (!fit) {
|
|
16272
|
+
const z2 = TILE_WIDTH * scale * scale / nativeTileW;
|
|
16273
|
+
return Number.isFinite(z2) && z2 > 0 ? z2 : scale;
|
|
16274
|
+
}
|
|
16275
|
+
if (!viewportSize.width || gridExtent.width < 2 || gridExtent.height < 2) return scale;
|
|
16276
|
+
let boardW;
|
|
16277
|
+
let boardH;
|
|
16278
|
+
if (projection === "flat") {
|
|
16279
|
+
boardW = gridExtent.width * nativeTileW;
|
|
16280
|
+
boardH = gridExtent.height * nativeTileW;
|
|
16281
|
+
} else if (projection === "hex") {
|
|
16282
|
+
boardW = (gridExtent.width + 0.5) * nativeTileW;
|
|
16283
|
+
boardH = gridExtent.height * (nativeTileW / 2) * 0.75 + nativeTileW / 2;
|
|
16284
|
+
} else {
|
|
16285
|
+
boardW = (gridExtent.width + gridExtent.height) * (nativeTileW / 2);
|
|
16286
|
+
boardH = (gridExtent.width + gridExtent.height) * (nativeTileW / 4);
|
|
16287
|
+
}
|
|
16288
|
+
const z = Math.min(viewportSize.width * 0.85 / boardW, viewportSize.height * 0.85 / boardH);
|
|
16289
|
+
return Number.isFinite(z) && z > 0 ? z : scale;
|
|
16290
|
+
}, [isFree, projection, fit, viewportSize, gridExtent, nativeTileW, scale]);
|
|
16106
16291
|
const projector = useMemo(
|
|
16107
|
-
() => create2DProjector({
|
|
16108
|
-
[
|
|
16292
|
+
() => create2DProjector({ tileWidth: nativeTileW, baseOffsetX, layout }),
|
|
16293
|
+
[nativeTileW, baseOffsetX, layout]
|
|
16109
16294
|
);
|
|
16110
16295
|
const unproject = useCallback((screenX, screenY) => {
|
|
16111
16296
|
if (projection === "free" || projection === "side") return { x: Math.round(screenX), y: Math.round(screenY) };
|
|
16112
|
-
return screenToIso(screenX, screenY,
|
|
16113
|
-
}, [projection,
|
|
16297
|
+
return screenToIso(screenX, screenY, nativeTileW, baseOffsetX, projection);
|
|
16298
|
+
}, [projection, nativeTileW, baseOffsetX]);
|
|
16114
16299
|
const bgUrls = useMemo(() => backgroundImage ? [backgroundImage.url] : [], [backgroundImage]);
|
|
16115
16300
|
const { getImage, pendingCount: _imagePendingCount } = useImageCache(bgUrls);
|
|
16116
16301
|
useEffect(() => {
|
|
@@ -16137,9 +16322,7 @@ function Canvas2D({
|
|
|
16137
16322
|
zoomAtPoint,
|
|
16138
16323
|
screenToWorld,
|
|
16139
16324
|
lerpToTarget
|
|
16140
|
-
} = useCamera({ zoom:
|
|
16141
|
-
const [atlasVersion, setAtlasVersion] = useState(0);
|
|
16142
|
-
const bumpAtlas = useCallback(() => setAtlasVersion((v) => v + 1), []);
|
|
16325
|
+
} = useCamera({ zoom: effectiveZoom });
|
|
16143
16326
|
const miniMapTiles = useMemo(() => {
|
|
16144
16327
|
if (!showMinimap) return [];
|
|
16145
16328
|
const color = MINIMAP_TERRAIN_COLORS.default;
|
|
@@ -16214,6 +16397,13 @@ function Canvas2D({
|
|
|
16214
16397
|
useEffect(() => {
|
|
16215
16398
|
draw();
|
|
16216
16399
|
}, [_imagePendingCount, draw]);
|
|
16400
|
+
const userZoomedRef = useRef(false);
|
|
16401
|
+
useEffect(() => {
|
|
16402
|
+
if (userZoomedRef.current) return;
|
|
16403
|
+
if (cameraRef.current.zoom === effectiveZoom) return;
|
|
16404
|
+
cameraRef.current.zoom = effectiveZoom;
|
|
16405
|
+
draw();
|
|
16406
|
+
}, [effectiveZoom, cameraRef, draw]);
|
|
16217
16407
|
useEffect(() => {
|
|
16218
16408
|
draw();
|
|
16219
16409
|
}, [atlasVersion, draw]);
|
|
@@ -16270,7 +16460,9 @@ function Canvas2D({
|
|
|
16270
16460
|
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
16271
16461
|
}, [handleMouseLeave, tileLeaveEvent, eventBus]);
|
|
16272
16462
|
const applyZoom = useCallback((factor, centerX, centerY) => {
|
|
16273
|
-
if (enableCamera)
|
|
16463
|
+
if (!enableCamera) return;
|
|
16464
|
+
userZoomedRef.current = true;
|
|
16465
|
+
zoomAtPoint(factor, centerX, centerY, viewportSize, () => draw());
|
|
16274
16466
|
}, [enableCamera, zoomAtPoint, viewportSize, draw]);
|
|
16275
16467
|
const applyPanDelta = useCallback((dx, dy) => {
|
|
16276
16468
|
if (enableCamera) panBy(dx, dy, () => draw());
|
|
@@ -16455,6 +16647,8 @@ function Canvas({
|
|
|
16455
16647
|
isLoading,
|
|
16456
16648
|
unitScale,
|
|
16457
16649
|
showMinimap,
|
|
16650
|
+
fit,
|
|
16651
|
+
tileWidth,
|
|
16458
16652
|
backgroundImage,
|
|
16459
16653
|
backgroundColor,
|
|
16460
16654
|
worldWidth,
|
|
@@ -16512,6 +16706,8 @@ function Canvas({
|
|
|
16512
16706
|
projection,
|
|
16513
16707
|
camera: to2DCamera(camera?.mode),
|
|
16514
16708
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
16709
|
+
...fit !== void 0 ? { fit } : {},
|
|
16710
|
+
...tileWidth !== void 0 ? { tileWidth } : {},
|
|
16515
16711
|
...camera?.target !== void 0 ? { followTarget: camera.target } : {},
|
|
16516
16712
|
...camera?.pos !== void 0 ? { cameraPos: camera.pos } : {},
|
|
16517
16713
|
showMinimap,
|
|
@@ -18805,9 +19001,9 @@ function ControlButton({
|
|
|
18805
19001
|
className
|
|
18806
19002
|
}) {
|
|
18807
19003
|
const eventBus = useEventBus();
|
|
18808
|
-
const [isPressed, setIsPressed] =
|
|
19004
|
+
const [isPressed, setIsPressed] = React75.useState(false);
|
|
18809
19005
|
const actualPressed = pressed ?? isPressed;
|
|
18810
|
-
const handlePointerDown =
|
|
19006
|
+
const handlePointerDown = React75.useCallback(
|
|
18811
19007
|
(e) => {
|
|
18812
19008
|
e.preventDefault();
|
|
18813
19009
|
if (disabled) return;
|
|
@@ -18817,7 +19013,7 @@ function ControlButton({
|
|
|
18817
19013
|
},
|
|
18818
19014
|
[disabled, pressEvent, eventBus, onPress]
|
|
18819
19015
|
);
|
|
18820
|
-
const handlePointerUp =
|
|
19016
|
+
const handlePointerUp = React75.useCallback(
|
|
18821
19017
|
(e) => {
|
|
18822
19018
|
e.preventDefault();
|
|
18823
19019
|
if (disabled) return;
|
|
@@ -18827,7 +19023,7 @@ function ControlButton({
|
|
|
18827
19023
|
},
|
|
18828
19024
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
18829
19025
|
);
|
|
18830
|
-
const handlePointerLeave =
|
|
19026
|
+
const handlePointerLeave = React75.useCallback(
|
|
18831
19027
|
(e) => {
|
|
18832
19028
|
if (isPressed) {
|
|
18833
19029
|
setIsPressed(false);
|
|
@@ -18915,8 +19111,8 @@ function ControlGrid({
|
|
|
18915
19111
|
className
|
|
18916
19112
|
}) {
|
|
18917
19113
|
const eventBus = useEventBus();
|
|
18918
|
-
const [active, setActive] =
|
|
18919
|
-
const handlePress =
|
|
19114
|
+
const [active, setActive] = React75.useState(/* @__PURE__ */ new Set());
|
|
19115
|
+
const handlePress = React75.useCallback(
|
|
18920
19116
|
(id) => {
|
|
18921
19117
|
setActive((prev) => new Set(prev).add(id));
|
|
18922
19118
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -18930,7 +19126,7 @@ function ControlGrid({
|
|
|
18930
19126
|
},
|
|
18931
19127
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
18932
19128
|
);
|
|
18933
|
-
const handleRelease =
|
|
19129
|
+
const handleRelease = React75.useCallback(
|
|
18934
19130
|
(id) => {
|
|
18935
19131
|
setActive((prev) => {
|
|
18936
19132
|
const next = new Set(prev);
|
|
@@ -20168,8 +20364,8 @@ var init_Menu = __esm({
|
|
|
20168
20364
|
"bottom-end": "bottom-start"
|
|
20169
20365
|
};
|
|
20170
20366
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
20171
|
-
const triggerChild =
|
|
20172
|
-
const triggerElement =
|
|
20367
|
+
const triggerChild = React75__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
20368
|
+
const triggerElement = React75__default.cloneElement(
|
|
20173
20369
|
triggerChild,
|
|
20174
20370
|
{
|
|
20175
20371
|
ref: triggerRef,
|
|
@@ -20264,14 +20460,14 @@ function useDataDnd(args) {
|
|
|
20264
20460
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
20265
20461
|
const enabled = isZone || Boolean(dndRoot);
|
|
20266
20462
|
const eventBus = useEventBus();
|
|
20267
|
-
const parentRoot =
|
|
20463
|
+
const parentRoot = React75__default.useContext(RootCtx);
|
|
20268
20464
|
const isRoot = enabled && parentRoot === null;
|
|
20269
|
-
const zoneId =
|
|
20465
|
+
const zoneId = React75__default.useId();
|
|
20270
20466
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
20271
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
20272
|
-
const optimisticOrdersRef =
|
|
20467
|
+
const [optimisticOrders, setOptimisticOrders] = React75__default.useState(() => /* @__PURE__ */ new Map());
|
|
20468
|
+
const optimisticOrdersRef = React75__default.useRef(optimisticOrders);
|
|
20273
20469
|
optimisticOrdersRef.current = optimisticOrders;
|
|
20274
|
-
const clearOptimisticOrder =
|
|
20470
|
+
const clearOptimisticOrder = React75__default.useCallback((group) => {
|
|
20275
20471
|
setOptimisticOrders((prev) => {
|
|
20276
20472
|
if (!prev.has(group)) return prev;
|
|
20277
20473
|
const next = new Map(prev);
|
|
@@ -20296,7 +20492,7 @@ function useDataDnd(args) {
|
|
|
20296
20492
|
const raw = it[dndItemIdField];
|
|
20297
20493
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
20298
20494
|
}).join("|");
|
|
20299
|
-
const itemIds =
|
|
20495
|
+
const itemIds = React75__default.useMemo(
|
|
20300
20496
|
() => orderedItems.map((it, idx) => {
|
|
20301
20497
|
const raw = it[dndItemIdField];
|
|
20302
20498
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -20307,7 +20503,7 @@ function useDataDnd(args) {
|
|
|
20307
20503
|
const raw = it[dndItemIdField];
|
|
20308
20504
|
return raw != null ? String(raw) : `__${idx}`;
|
|
20309
20505
|
}).join("|");
|
|
20310
|
-
|
|
20506
|
+
React75__default.useEffect(() => {
|
|
20311
20507
|
const root = isRoot ? null : parentRoot;
|
|
20312
20508
|
if (root) {
|
|
20313
20509
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -20315,20 +20511,20 @@ function useDataDnd(args) {
|
|
|
20315
20511
|
clearOptimisticOrder(ownGroup);
|
|
20316
20512
|
}
|
|
20317
20513
|
}, [itemsContentSig, ownGroup]);
|
|
20318
|
-
const zonesRef =
|
|
20319
|
-
const registerZone =
|
|
20514
|
+
const zonesRef = React75__default.useRef(/* @__PURE__ */ new Map());
|
|
20515
|
+
const registerZone = React75__default.useCallback((zoneId2, meta2) => {
|
|
20320
20516
|
zonesRef.current.set(zoneId2, meta2);
|
|
20321
20517
|
}, []);
|
|
20322
|
-
const unregisterZone =
|
|
20518
|
+
const unregisterZone = React75__default.useCallback((zoneId2) => {
|
|
20323
20519
|
zonesRef.current.delete(zoneId2);
|
|
20324
20520
|
}, []);
|
|
20325
|
-
const [activeDrag, setActiveDrag] =
|
|
20326
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
20327
|
-
const meta =
|
|
20521
|
+
const [activeDrag, setActiveDrag] = React75__default.useState(null);
|
|
20522
|
+
const [overZoneGroup, setOverZoneGroup] = React75__default.useState(null);
|
|
20523
|
+
const meta = React75__default.useMemo(
|
|
20328
20524
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
20329
20525
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
20330
20526
|
);
|
|
20331
|
-
|
|
20527
|
+
React75__default.useEffect(() => {
|
|
20332
20528
|
const target = isRoot ? null : parentRoot;
|
|
20333
20529
|
if (!target) {
|
|
20334
20530
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -20347,7 +20543,7 @@ function useDataDnd(args) {
|
|
|
20347
20543
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
20348
20544
|
const sensors = useAlmadarDndSensors(true);
|
|
20349
20545
|
const collisionDetection = almadarDndCollisionDetection;
|
|
20350
|
-
const findZoneByItem =
|
|
20546
|
+
const findZoneByItem = React75__default.useCallback(
|
|
20351
20547
|
(id) => {
|
|
20352
20548
|
for (const z of zonesRef.current.values()) {
|
|
20353
20549
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -20356,7 +20552,7 @@ function useDataDnd(args) {
|
|
|
20356
20552
|
},
|
|
20357
20553
|
[]
|
|
20358
20554
|
);
|
|
20359
|
-
|
|
20555
|
+
React75__default.useCallback(
|
|
20360
20556
|
(group) => {
|
|
20361
20557
|
for (const z of zonesRef.current.values()) {
|
|
20362
20558
|
if (z.group === group) return z;
|
|
@@ -20365,7 +20561,7 @@ function useDataDnd(args) {
|
|
|
20365
20561
|
},
|
|
20366
20562
|
[]
|
|
20367
20563
|
);
|
|
20368
|
-
const handleDragEnd =
|
|
20564
|
+
const handleDragEnd = React75__default.useCallback(
|
|
20369
20565
|
(event) => {
|
|
20370
20566
|
const { active, over } = event;
|
|
20371
20567
|
const activeIdStr = String(active.id);
|
|
@@ -20456,8 +20652,8 @@ function useDataDnd(args) {
|
|
|
20456
20652
|
},
|
|
20457
20653
|
[eventBus]
|
|
20458
20654
|
);
|
|
20459
|
-
const sortableData =
|
|
20460
|
-
const SortableItem =
|
|
20655
|
+
const sortableData = React75__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
20656
|
+
const SortableItem = React75__default.useCallback(
|
|
20461
20657
|
({ id, children }) => {
|
|
20462
20658
|
const {
|
|
20463
20659
|
attributes,
|
|
@@ -20497,7 +20693,7 @@ function useDataDnd(args) {
|
|
|
20497
20693
|
id: droppableId,
|
|
20498
20694
|
data: sortableData
|
|
20499
20695
|
});
|
|
20500
|
-
const ctx =
|
|
20696
|
+
const ctx = React75__default.useContext(RootCtx);
|
|
20501
20697
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
20502
20698
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
20503
20699
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -20512,7 +20708,7 @@ function useDataDnd(args) {
|
|
|
20512
20708
|
showForeignPlaceholder,
|
|
20513
20709
|
ctxAvailable: ctx != null
|
|
20514
20710
|
});
|
|
20515
|
-
|
|
20711
|
+
React75__default.useEffect(() => {
|
|
20516
20712
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
20517
20713
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
20518
20714
|
return /* @__PURE__ */ jsx(
|
|
@@ -20526,11 +20722,11 @@ function useDataDnd(args) {
|
|
|
20526
20722
|
}
|
|
20527
20723
|
);
|
|
20528
20724
|
};
|
|
20529
|
-
const rootContextValue =
|
|
20725
|
+
const rootContextValue = React75__default.useMemo(
|
|
20530
20726
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
20531
20727
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
20532
20728
|
);
|
|
20533
|
-
const handleDragStart =
|
|
20729
|
+
const handleDragStart = React75__default.useCallback((event) => {
|
|
20534
20730
|
const sourceZone = findZoneByItem(event.active.id);
|
|
20535
20731
|
const rect = event.active.rect.current.initial;
|
|
20536
20732
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -20549,7 +20745,7 @@ function useDataDnd(args) {
|
|
|
20549
20745
|
isRoot
|
|
20550
20746
|
});
|
|
20551
20747
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
20552
|
-
const handleDragOver =
|
|
20748
|
+
const handleDragOver = React75__default.useCallback((event) => {
|
|
20553
20749
|
const { active, over } = event;
|
|
20554
20750
|
const overData = over?.data?.current;
|
|
20555
20751
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -20619,7 +20815,7 @@ function useDataDnd(args) {
|
|
|
20619
20815
|
return next;
|
|
20620
20816
|
});
|
|
20621
20817
|
}, []);
|
|
20622
|
-
const handleDragCancel =
|
|
20818
|
+
const handleDragCancel = React75__default.useCallback((event) => {
|
|
20623
20819
|
setActiveDrag(null);
|
|
20624
20820
|
setOverZoneGroup(null);
|
|
20625
20821
|
dndLog.warn("dragCancel", {
|
|
@@ -20627,12 +20823,12 @@ function useDataDnd(args) {
|
|
|
20627
20823
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
20628
20824
|
});
|
|
20629
20825
|
}, []);
|
|
20630
|
-
const handleDragEndWithCleanup =
|
|
20826
|
+
const handleDragEndWithCleanup = React75__default.useCallback((event) => {
|
|
20631
20827
|
handleDragEnd(event);
|
|
20632
20828
|
setActiveDrag(null);
|
|
20633
20829
|
setOverZoneGroup(null);
|
|
20634
20830
|
}, [handleDragEnd]);
|
|
20635
|
-
const wrapContainer =
|
|
20831
|
+
const wrapContainer = React75__default.useCallback(
|
|
20636
20832
|
(children) => {
|
|
20637
20833
|
if (!enabled) return children;
|
|
20638
20834
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -20686,7 +20882,7 @@ var init_useDataDnd = __esm({
|
|
|
20686
20882
|
init_useAlmadarDndCollision();
|
|
20687
20883
|
init_Box();
|
|
20688
20884
|
dndLog = createLogger("almadar:ui:dnd");
|
|
20689
|
-
RootCtx =
|
|
20885
|
+
RootCtx = React75__default.createContext(null);
|
|
20690
20886
|
}
|
|
20691
20887
|
});
|
|
20692
20888
|
function renderIconInput(icon, props) {
|
|
@@ -21228,7 +21424,7 @@ function DataList({
|
|
|
21228
21424
|
}) {
|
|
21229
21425
|
const eventBus = useEventBus();
|
|
21230
21426
|
const { t } = useTranslate();
|
|
21231
|
-
const [visibleCount, setVisibleCount] =
|
|
21427
|
+
const [visibleCount, setVisibleCount] = React75__default.useState(pageSize || Infinity);
|
|
21232
21428
|
const fieldDefs = fields ?? columns ?? [];
|
|
21233
21429
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21234
21430
|
const dnd = useDataDnd({
|
|
@@ -21244,14 +21440,14 @@ function DataList({
|
|
|
21244
21440
|
dndRoot
|
|
21245
21441
|
});
|
|
21246
21442
|
const orderedData = dnd.orderedItems;
|
|
21247
|
-
const allData =
|
|
21443
|
+
const allData = React75__default.useMemo(
|
|
21248
21444
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
21249
21445
|
[orderedData, sortBy, sortDirection]
|
|
21250
21446
|
);
|
|
21251
21447
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21252
21448
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21253
21449
|
const hasRenderProp = typeof children === "function";
|
|
21254
|
-
|
|
21450
|
+
React75__default.useEffect(() => {
|
|
21255
21451
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21256
21452
|
const childrenTypeOf = typeof children;
|
|
21257
21453
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21366,7 +21562,7 @@ function DataList({
|
|
|
21366
21562
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
21367
21563
|
};
|
|
21368
21564
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
21369
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21565
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
21370
21566
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21371
21567
|
group.items.map((itemData, index) => {
|
|
21372
21568
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -21402,7 +21598,11 @@ function DataList({
|
|
|
21402
21598
|
metaFields.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "mt-1 flex-wrap", children: metaFields.map((f3) => {
|
|
21403
21599
|
const v = getNestedValue(itemData, f3.name);
|
|
21404
21600
|
if (v === void 0 || v === null || v === "") return null;
|
|
21405
|
-
return f3.variant === "badge" ?
|
|
21601
|
+
return f3.variant === "badge" ? (
|
|
21602
|
+
// `format` applies here too — a boolean field badged
|
|
21603
|
+
// without it renders the raw "false" instead of "No".
|
|
21604
|
+
/* @__PURE__ */ jsx(Badge, { variant: statusVariant3(String(v)), children: formatValue2(v, f3.format) }, f3.name)
|
|
21605
|
+
) : /* @__PURE__ */ jsx(
|
|
21406
21606
|
Typography,
|
|
21407
21607
|
{
|
|
21408
21608
|
variant: "caption",
|
|
@@ -21514,7 +21714,7 @@ function DataList({
|
|
|
21514
21714
|
if (val === void 0 || val === null) return null;
|
|
21515
21715
|
return /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
21516
21716
|
field.icon && renderIconInput2(field.icon, { size: "xs" }),
|
|
21517
|
-
/* @__PURE__ */ jsx(Badge, { variant: statusVariant3(String(val)), children:
|
|
21717
|
+
/* @__PURE__ */ jsx(Badge, { variant: statusVariant3(String(val)), children: formatValue2(val, field.format) })
|
|
21518
21718
|
] }, field.name);
|
|
21519
21719
|
})
|
|
21520
21720
|
] }),
|
|
@@ -21561,7 +21761,7 @@ function DataList({
|
|
|
21561
21761
|
className
|
|
21562
21762
|
),
|
|
21563
21763
|
children: [
|
|
21564
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
21764
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
21565
21765
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
21566
21766
|
group.items.map(
|
|
21567
21767
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -21670,8 +21870,8 @@ function ScalarControl({
|
|
|
21670
21870
|
}
|
|
21671
21871
|
const numeric = typeof value === "number";
|
|
21672
21872
|
const initial = value === null ? "" : String(value);
|
|
21673
|
-
const [draft, setDraft] =
|
|
21674
|
-
|
|
21873
|
+
const [draft, setDraft] = React75__default.useState(initial);
|
|
21874
|
+
React75__default.useEffect(() => setDraft(initial), [initial]);
|
|
21675
21875
|
const commit = () => {
|
|
21676
21876
|
if (numeric) {
|
|
21677
21877
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -21739,8 +21939,8 @@ function Row({
|
|
|
21739
21939
|
onRemove,
|
|
21740
21940
|
readonly
|
|
21741
21941
|
}) {
|
|
21742
|
-
const [keyDraft, setKeyDraft] =
|
|
21743
|
-
|
|
21942
|
+
const [keyDraft, setKeyDraft] = React75__default.useState(rowKey);
|
|
21943
|
+
React75__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
|
|
21744
21944
|
const container = isObj(value) || isArr(value);
|
|
21745
21945
|
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
|
|
21746
21946
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
|
|
@@ -21783,7 +21983,7 @@ function ContainerNode({
|
|
|
21783
21983
|
depth,
|
|
21784
21984
|
readonly
|
|
21785
21985
|
}) {
|
|
21786
|
-
const [open, setOpen] =
|
|
21986
|
+
const [open, setOpen] = React75__default.useState(depth < 2);
|
|
21787
21987
|
const array = isArr(value);
|
|
21788
21988
|
const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
|
|
21789
21989
|
const setObjValue = (key, next) => {
|
|
@@ -21925,7 +22125,7 @@ var init_FormSection = __esm({
|
|
|
21925
22125
|
columns = 1,
|
|
21926
22126
|
className
|
|
21927
22127
|
}) => {
|
|
21928
|
-
const [collapsed, setCollapsed] =
|
|
22128
|
+
const [collapsed, setCollapsed] = React75__default.useState(defaultCollapsed);
|
|
21929
22129
|
const { t } = useTranslate();
|
|
21930
22130
|
const eventBus = useEventBus();
|
|
21931
22131
|
const gridClass = {
|
|
@@ -21933,7 +22133,7 @@ var init_FormSection = __esm({
|
|
|
21933
22133
|
2: "grid-cols-1 md:grid-cols-2",
|
|
21934
22134
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
21935
22135
|
}[columns];
|
|
21936
|
-
|
|
22136
|
+
React75__default.useCallback(() => {
|
|
21937
22137
|
if (collapsible) {
|
|
21938
22138
|
setCollapsed((prev) => !prev);
|
|
21939
22139
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -22065,7 +22265,7 @@ var init_GridPicker = __esm({
|
|
|
22065
22265
|
const needle = search.trim().toLowerCase();
|
|
22066
22266
|
return items.filter((item) => {
|
|
22067
22267
|
const matchesCategory = activeCategory === ALL_CATEGORY || item.category === activeCategory;
|
|
22068
|
-
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle);
|
|
22268
|
+
const matchesSearch = needle === "" || item.label.toLowerCase().includes(needle) || item.keywords !== void 0 && item.keywords.some((k) => k.toLowerCase().includes(needle));
|
|
22069
22269
|
return matchesCategory && matchesSearch;
|
|
22070
22270
|
});
|
|
22071
22271
|
}, [items, search, activeCategory]);
|
|
@@ -22341,8 +22541,8 @@ function TextLikeControl({
|
|
|
22341
22541
|
onCommit
|
|
22342
22542
|
}) {
|
|
22343
22543
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
22344
|
-
const [draft, setDraft] =
|
|
22345
|
-
|
|
22544
|
+
const [draft, setDraft] = React75__default.useState(initial);
|
|
22545
|
+
React75__default.useEffect(() => setDraft(initial), [initial]);
|
|
22346
22546
|
const commit = () => {
|
|
22347
22547
|
if (numeric) {
|
|
22348
22548
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -22527,14 +22727,14 @@ var init_NodeSlotEditor = __esm({
|
|
|
22527
22727
|
isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
|
|
22528
22728
|
NodeSlotEditor = ({ value, onChange, className }) => {
|
|
22529
22729
|
const { type, props, wasArray } = normalize(value);
|
|
22530
|
-
const patterns =
|
|
22730
|
+
const patterns = React75__default.useMemo(() => {
|
|
22531
22731
|
try {
|
|
22532
22732
|
return [...getKnownPatterns()].sort();
|
|
22533
22733
|
} catch {
|
|
22534
22734
|
return [];
|
|
22535
22735
|
}
|
|
22536
22736
|
}, []);
|
|
22537
|
-
const options =
|
|
22737
|
+
const options = React75__default.useMemo(
|
|
22538
22738
|
() => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
|
|
22539
22739
|
[patterns]
|
|
22540
22740
|
);
|
|
@@ -22546,7 +22746,7 @@ var init_NodeSlotEditor = __esm({
|
|
|
22546
22746
|
const pattern = { type: nextType, ...nextProps };
|
|
22547
22747
|
onChange(wasArray || value === void 0 ? [pattern] : pattern);
|
|
22548
22748
|
};
|
|
22549
|
-
const schemaEntries =
|
|
22749
|
+
const schemaEntries = React75__default.useMemo(() => {
|
|
22550
22750
|
if (!type) return [];
|
|
22551
22751
|
const def = getPatternDefinition(type);
|
|
22552
22752
|
if (!def?.propsSchema) return [];
|
|
@@ -23367,7 +23567,7 @@ var init_Flex = __esm({
|
|
|
23367
23567
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
23368
23568
|
}
|
|
23369
23569
|
}
|
|
23370
|
-
return
|
|
23570
|
+
return React75__default.createElement(Component, {
|
|
23371
23571
|
className: cn(
|
|
23372
23572
|
inline ? "inline-flex" : "flex",
|
|
23373
23573
|
directionStyles[direction],
|
|
@@ -23486,7 +23686,7 @@ var init_Grid = __esm({
|
|
|
23486
23686
|
as: Component = "div"
|
|
23487
23687
|
}) => {
|
|
23488
23688
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
23489
|
-
return
|
|
23689
|
+
return React75__default.createElement(
|
|
23490
23690
|
Component,
|
|
23491
23691
|
{
|
|
23492
23692
|
className: cn(
|
|
@@ -23623,9 +23823,16 @@ var init_Popover = __esm({
|
|
|
23623
23823
|
position = "bottom",
|
|
23624
23824
|
trigger = "click",
|
|
23625
23825
|
showArrow = true,
|
|
23826
|
+
open,
|
|
23827
|
+
onOpenChange,
|
|
23626
23828
|
className
|
|
23627
23829
|
}) => {
|
|
23628
|
-
const [
|
|
23830
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
|
|
23831
|
+
const isOpen = open !== void 0 ? open : uncontrolledOpen;
|
|
23832
|
+
const setIsOpen = (next) => {
|
|
23833
|
+
if (open === void 0) setUncontrolledOpen(next);
|
|
23834
|
+
onOpenChange?.(next);
|
|
23835
|
+
};
|
|
23629
23836
|
const [triggerRect, setTriggerRect] = useState(null);
|
|
23630
23837
|
const [popoverWidth, setPopoverWidth] = useState(0);
|
|
23631
23838
|
const triggerRef = useRef(null);
|
|
@@ -23658,6 +23865,23 @@ var init_Popover = __esm({
|
|
|
23658
23865
|
updatePosition();
|
|
23659
23866
|
}
|
|
23660
23867
|
}, [isOpen]);
|
|
23868
|
+
useEffect(() => {
|
|
23869
|
+
if (!isOpen) return;
|
|
23870
|
+
let raf = 0;
|
|
23871
|
+
let lastTop = Number.NaN;
|
|
23872
|
+
let lastLeft = Number.NaN;
|
|
23873
|
+
const track = () => {
|
|
23874
|
+
const rect = triggerRef.current?.getBoundingClientRect();
|
|
23875
|
+
if (rect && (rect.top !== lastTop || rect.left !== lastLeft)) {
|
|
23876
|
+
lastTop = rect.top;
|
|
23877
|
+
lastLeft = rect.left;
|
|
23878
|
+
updatePosition();
|
|
23879
|
+
}
|
|
23880
|
+
raf = requestAnimationFrame(track);
|
|
23881
|
+
};
|
|
23882
|
+
raf = requestAnimationFrame(track);
|
|
23883
|
+
return () => cancelAnimationFrame(raf);
|
|
23884
|
+
}, [isOpen]);
|
|
23661
23885
|
useEffect(() => {
|
|
23662
23886
|
if (!mounted) setPopoverWidth(0);
|
|
23663
23887
|
}, [mounted]);
|
|
@@ -23694,9 +23918,9 @@ var init_Popover = __esm({
|
|
|
23694
23918
|
onMouseLeave: handleClose,
|
|
23695
23919
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
23696
23920
|
};
|
|
23697
|
-
const childElement =
|
|
23921
|
+
const childElement = React75__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
23698
23922
|
const childPointerDown = childElement.props.onPointerDown;
|
|
23699
|
-
const triggerElement =
|
|
23923
|
+
const triggerElement = React75__default.cloneElement(
|
|
23700
23924
|
childElement,
|
|
23701
23925
|
{
|
|
23702
23926
|
ref: triggerRef,
|
|
@@ -24555,9 +24779,9 @@ var init_Tooltip = __esm({
|
|
|
24555
24779
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
24556
24780
|
};
|
|
24557
24781
|
}, []);
|
|
24558
|
-
const triggerElement =
|
|
24782
|
+
const triggerElement = React75__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24559
24783
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
24560
|
-
const trigger =
|
|
24784
|
+
const trigger = React75__default.cloneElement(triggerElement, {
|
|
24561
24785
|
ref: triggerRef,
|
|
24562
24786
|
onMouseEnter: handleMouseEnter,
|
|
24563
24787
|
onMouseLeave: handleMouseLeave,
|
|
@@ -24647,7 +24871,7 @@ var init_WizardProgress = __esm({
|
|
|
24647
24871
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24648
24872
|
const isActive = index === currentStep;
|
|
24649
24873
|
const isCompleted = index < currentStep;
|
|
24650
|
-
return /* @__PURE__ */ jsxs(
|
|
24874
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
24651
24875
|
/* @__PURE__ */ jsx(
|
|
24652
24876
|
"button",
|
|
24653
24877
|
{
|
|
@@ -25256,6 +25480,80 @@ var init_FlipCard = __esm({
|
|
|
25256
25480
|
FlipCard.displayName = "FlipCard";
|
|
25257
25481
|
}
|
|
25258
25482
|
});
|
|
25483
|
+
var EMOJI_ITEMS, EmojiPicker;
|
|
25484
|
+
var init_EmojiPicker = __esm({
|
|
25485
|
+
"components/core/molecules/EmojiPicker.tsx"() {
|
|
25486
|
+
"use client";
|
|
25487
|
+
init_useEventBus();
|
|
25488
|
+
init_Button();
|
|
25489
|
+
init_GridPicker();
|
|
25490
|
+
init_Popover();
|
|
25491
|
+
EMOJI_ITEMS = (() => {
|
|
25492
|
+
const items = [];
|
|
25493
|
+
for (const name of ordered) {
|
|
25494
|
+
const entry = lib[name];
|
|
25495
|
+
if (entry === void 0 || entry.char === null || entry.char === "") continue;
|
|
25496
|
+
items.push({
|
|
25497
|
+
id: entry.char,
|
|
25498
|
+
label: name.replace(/_/g, " "),
|
|
25499
|
+
category: entry.category.replace(/_/g, " "),
|
|
25500
|
+
keywords: entry.keywords
|
|
25501
|
+
});
|
|
25502
|
+
}
|
|
25503
|
+
return items;
|
|
25504
|
+
})();
|
|
25505
|
+
EmojiPicker = ({
|
|
25506
|
+
pickEvent,
|
|
25507
|
+
position = "top",
|
|
25508
|
+
triggerIcon = "smile",
|
|
25509
|
+
triggerLabel = "Add emoji",
|
|
25510
|
+
className
|
|
25511
|
+
}) => {
|
|
25512
|
+
const eventBus = useEventBus();
|
|
25513
|
+
const [open, setOpen] = useState(false);
|
|
25514
|
+
const handlePick = (glyph) => {
|
|
25515
|
+
if (pickEvent !== void 0) {
|
|
25516
|
+
const payload = { emoji: glyph };
|
|
25517
|
+
eventBus.emit(`UI:${pickEvent}`, payload);
|
|
25518
|
+
}
|
|
25519
|
+
setOpen(false);
|
|
25520
|
+
};
|
|
25521
|
+
return /* @__PURE__ */ jsx(
|
|
25522
|
+
Popover,
|
|
25523
|
+
{
|
|
25524
|
+
position,
|
|
25525
|
+
trigger: "click",
|
|
25526
|
+
showArrow: false,
|
|
25527
|
+
open,
|
|
25528
|
+
onOpenChange: setOpen,
|
|
25529
|
+
content: /* @__PURE__ */ jsx(
|
|
25530
|
+
GridPicker,
|
|
25531
|
+
{
|
|
25532
|
+
items: EMOJI_ITEMS,
|
|
25533
|
+
onChange: handlePick,
|
|
25534
|
+
searchPlaceholder: "Search emoji\u2026",
|
|
25535
|
+
renderThumbnail: (item) => /* @__PURE__ */ jsx("span", { className: "text-xl leading-none", "aria-hidden": "true", children: item.id }),
|
|
25536
|
+
cellSize: 32,
|
|
25537
|
+
className: "w-80"
|
|
25538
|
+
}
|
|
25539
|
+
),
|
|
25540
|
+
children: /* @__PURE__ */ jsx(
|
|
25541
|
+
Button,
|
|
25542
|
+
{
|
|
25543
|
+
variant: "ghost",
|
|
25544
|
+
icon: triggerIcon,
|
|
25545
|
+
"aria-label": triggerLabel,
|
|
25546
|
+
title: triggerLabel,
|
|
25547
|
+
className,
|
|
25548
|
+
"data-testid": "emoji-picker-trigger"
|
|
25549
|
+
}
|
|
25550
|
+
)
|
|
25551
|
+
}
|
|
25552
|
+
);
|
|
25553
|
+
};
|
|
25554
|
+
EmojiPicker.displayName = "EmojiPicker";
|
|
25555
|
+
}
|
|
25556
|
+
});
|
|
25259
25557
|
function toISODate(d) {
|
|
25260
25558
|
return d.toISOString().slice(0, 10);
|
|
25261
25559
|
}
|
|
@@ -26384,7 +26682,7 @@ function GameMenu({
|
|
|
26384
26682
|
}) {
|
|
26385
26683
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
26386
26684
|
const eventBus = useEventBus();
|
|
26387
|
-
const handleOptionClick =
|
|
26685
|
+
const handleOptionClick = React75.useCallback(
|
|
26388
26686
|
(option) => {
|
|
26389
26687
|
if (option.event) {
|
|
26390
26688
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26620,7 +26918,7 @@ function StateGraph({
|
|
|
26620
26918
|
}) {
|
|
26621
26919
|
const eventBus = useEventBus();
|
|
26622
26920
|
const nodes = states ?? [];
|
|
26623
|
-
const positions =
|
|
26921
|
+
const positions = React75.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
26624
26922
|
return /* @__PURE__ */ jsxs(
|
|
26625
26923
|
Box,
|
|
26626
26924
|
{
|
|
@@ -27157,7 +27455,7 @@ function LinearView({
|
|
|
27157
27455
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
27158
27456
|
const isDone = i < currentIdx;
|
|
27159
27457
|
const isCurrent = i === currentIdx;
|
|
27160
|
-
return /* @__PURE__ */ jsxs(
|
|
27458
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
27161
27459
|
i > 0 && /* @__PURE__ */ jsx(
|
|
27162
27460
|
Typography,
|
|
27163
27461
|
{
|
|
@@ -27790,7 +28088,7 @@ function SequenceBar({
|
|
|
27790
28088
|
else onSlotRemove?.(index);
|
|
27791
28089
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
27792
28090
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
27793
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
28091
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
27794
28092
|
i > 0 && /* @__PURE__ */ jsx(
|
|
27795
28093
|
Typography,
|
|
27796
28094
|
{
|
|
@@ -28770,7 +29068,7 @@ var init_MapView = __esm({
|
|
|
28770
29068
|
shadowSize: [41, 41]
|
|
28771
29069
|
});
|
|
28772
29070
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
28773
|
-
const { useEffect: useEffect65, useRef: useRef63, useCallback: useCallback106, useState:
|
|
29071
|
+
const { useEffect: useEffect65, useRef: useRef63, useCallback: useCallback106, useState: useState103 } = React75__default;
|
|
28774
29072
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
28775
29073
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
28776
29074
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -28815,7 +29113,7 @@ var init_MapView = __esm({
|
|
|
28815
29113
|
showAttribution = true
|
|
28816
29114
|
}) {
|
|
28817
29115
|
const eventBus = useEventBus2();
|
|
28818
|
-
const [clickedPosition, setClickedPosition] =
|
|
29116
|
+
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
28819
29117
|
const handleMapClick = useCallback106((lat, lng) => {
|
|
28820
29118
|
if (showClickedPin) {
|
|
28821
29119
|
setClickedPosition({ lat, lng });
|
|
@@ -29660,6 +29958,7 @@ function TableView({
|
|
|
29660
29958
|
fields,
|
|
29661
29959
|
itemActions,
|
|
29662
29960
|
maxInlineActions,
|
|
29961
|
+
itemClickEvent,
|
|
29663
29962
|
selectable = false,
|
|
29664
29963
|
selectEvent,
|
|
29665
29964
|
selectedIds,
|
|
@@ -29687,8 +29986,8 @@ function TableView({
|
|
|
29687
29986
|
}) {
|
|
29688
29987
|
const eventBus = useEventBus();
|
|
29689
29988
|
const { t } = useTranslate();
|
|
29690
|
-
const [visibleCount, setVisibleCount] =
|
|
29691
|
-
const [localSelected, setLocalSelected] =
|
|
29989
|
+
const [visibleCount, setVisibleCount] = React75__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29990
|
+
const [localSelected, setLocalSelected] = React75__default.useState(/* @__PURE__ */ new Set());
|
|
29692
29991
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
29693
29992
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
29694
29993
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -29704,13 +30003,13 @@ function TableView({
|
|
|
29704
30003
|
dndItemIdField,
|
|
29705
30004
|
dndRoot
|
|
29706
30005
|
});
|
|
29707
|
-
const
|
|
29708
|
-
const data = pageSize > 0 ?
|
|
29709
|
-
const hasMore = pageSize > 0 && visibleCount <
|
|
30006
|
+
const ordered2 = dnd.orderedItems;
|
|
30007
|
+
const data = pageSize > 0 ? ordered2.slice(0, visibleCount) : ordered2;
|
|
30008
|
+
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
29710
30009
|
const hasRenderProp = typeof children === "function";
|
|
29711
30010
|
const idField = dndItemIdField ?? "id";
|
|
29712
30011
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
29713
|
-
|
|
30012
|
+
React75__default.useEffect(() => {
|
|
29714
30013
|
tableViewLog.debug("render", {
|
|
29715
30014
|
rowCount: data.length,
|
|
29716
30015
|
colCount: colDefs.length,
|
|
@@ -29759,7 +30058,15 @@ function TableView({
|
|
|
29759
30058
|
};
|
|
29760
30059
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
29761
30060
|
};
|
|
29762
|
-
const
|
|
30061
|
+
const handleRowClick = (row) => () => {
|
|
30062
|
+
if (!itemClickEvent) return;
|
|
30063
|
+
const payload = {
|
|
30064
|
+
id: row.id,
|
|
30065
|
+
row
|
|
30066
|
+
};
|
|
30067
|
+
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
30068
|
+
};
|
|
30069
|
+
const colFloors = React75__default.useMemo(
|
|
29763
30070
|
() => colDefs.map((col) => {
|
|
29764
30071
|
const longest = data.reduce((widest, row) => {
|
|
29765
30072
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -29835,10 +30142,12 @@ function TableView({
|
|
|
29835
30142
|
role: "row",
|
|
29836
30143
|
"data-entity-row": true,
|
|
29837
30144
|
"data-entity-id": id,
|
|
30145
|
+
onClick: itemClickEvent ? handleRowClick(row) : void 0,
|
|
29838
30146
|
style: !hasRenderProp ? { gridTemplateColumns } : void 0,
|
|
29839
30147
|
className: cn(
|
|
29840
30148
|
"group items-center gap-3 transition-colors duration-fast",
|
|
29841
30149
|
hasRenderProp ? "flex" : "grid",
|
|
30150
|
+
itemClickEvent && "cursor-pointer",
|
|
29842
30151
|
lk.rowPad,
|
|
29843
30152
|
lk.divider && "border-b border-[var(--color-border)]",
|
|
29844
30153
|
lk.striped && index % 2 === 1 && "bg-[var(--color-surface-subtle)]",
|
|
@@ -29846,7 +30155,7 @@ function TableView({
|
|
|
29846
30155
|
look === "bordered" && "[&>*]:border-r [&>*]:border-[var(--color-border)] [&>*:last-child]:border-r-0"
|
|
29847
30156
|
),
|
|
29848
30157
|
children: [
|
|
29849
|
-
selectable && /* @__PURE__ */ jsx(Box, { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
30158
|
+
selectable && /* @__PURE__ */ jsx(Box, { className: "flex items-center", onClick: itemClickEvent ? (e) => e.stopPropagation() : void 0, children: /* @__PURE__ */ jsx(
|
|
29850
30159
|
Checkbox,
|
|
29851
30160
|
{
|
|
29852
30161
|
checked: selected.has(id),
|
|
@@ -29871,6 +30180,7 @@ function TableView({
|
|
|
29871
30180
|
HStack,
|
|
29872
30181
|
{
|
|
29873
30182
|
gap: "xs",
|
|
30183
|
+
onClick: itemClickEvent ? (e) => e.stopPropagation() : void 0,
|
|
29874
30184
|
className: cn(
|
|
29875
30185
|
// Pinned: the fixed column tracks routinely overflow the caller's
|
|
29876
30186
|
// scroll container, which used to leave the actions off-screen.
|
|
@@ -29918,12 +30228,12 @@ function TableView({
|
|
|
29918
30228
|
]
|
|
29919
30229
|
}
|
|
29920
30230
|
);
|
|
29921
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30231
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React75__default.Fragment, { children: rowInner }, id);
|
|
29922
30232
|
};
|
|
29923
30233
|
const items = Array.from(data);
|
|
29924
30234
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29925
30235
|
let runningIndex = 0;
|
|
29926
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30236
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
29927
30237
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29928
30238
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29929
30239
|
] }, gi)) });
|
|
@@ -29940,7 +30250,7 @@ function TableView({
|
|
|
29940
30250
|
/* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs", className: "mr-1" }),
|
|
29941
30251
|
t("common.showMore"),
|
|
29942
30252
|
" (",
|
|
29943
|
-
t("common.remaining", { count:
|
|
30253
|
+
t("common.remaining", { count: ordered2.length - visibleCount }),
|
|
29944
30254
|
")"
|
|
29945
30255
|
] }) })
|
|
29946
30256
|
]
|
|
@@ -31286,7 +31596,7 @@ var init_StepFlow = __esm({
|
|
|
31286
31596
|
className
|
|
31287
31597
|
}) => {
|
|
31288
31598
|
if (orientation === "vertical") {
|
|
31289
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
31599
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React75__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
31290
31600
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31291
31601
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31292
31602
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31297,7 +31607,7 @@ var init_StepFlow = __esm({
|
|
|
31297
31607
|
] })
|
|
31298
31608
|
] }) }, index)) });
|
|
31299
31609
|
}
|
|
31300
|
-
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(
|
|
31610
|
+
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(React75__default.Fragment, { children: [
|
|
31301
31611
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31302
31612
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31303
31613
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32287,7 +32597,7 @@ var init_LikertScale = __esm({
|
|
|
32287
32597
|
md: "text-base",
|
|
32288
32598
|
lg: "text-lg"
|
|
32289
32599
|
};
|
|
32290
|
-
LikertScale =
|
|
32600
|
+
LikertScale = React75__default.forwardRef(
|
|
32291
32601
|
({
|
|
32292
32602
|
question,
|
|
32293
32603
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32299,7 +32609,7 @@ var init_LikertScale = __esm({
|
|
|
32299
32609
|
variant = "radios",
|
|
32300
32610
|
className
|
|
32301
32611
|
}, ref) => {
|
|
32302
|
-
const groupId =
|
|
32612
|
+
const groupId = React75__default.useId();
|
|
32303
32613
|
const eventBus = useEventBus();
|
|
32304
32614
|
const handleSelect = useCallback(
|
|
32305
32615
|
(next) => {
|
|
@@ -34588,7 +34898,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
34588
34898
|
"aria-label": t("aria.breadcrumb"),
|
|
34589
34899
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
34590
34900
|
const isLast = idx === items.length - 1;
|
|
34591
|
-
return /* @__PURE__ */ jsxs(
|
|
34901
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
34592
34902
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
34593
34903
|
Icon,
|
|
34594
34904
|
{
|
|
@@ -35457,7 +35767,7 @@ var init_MiniStateMachine = __esm({
|
|
|
35457
35767
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
35458
35768
|
const tc = transitionCounts[s.name] ?? 0;
|
|
35459
35769
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
35460
|
-
return /* @__PURE__ */ jsxs(
|
|
35770
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
35461
35771
|
/* @__PURE__ */ jsx(
|
|
35462
35772
|
AvlState,
|
|
35463
35773
|
{
|
|
@@ -35661,7 +35971,7 @@ var init_PageHeader = __esm({
|
|
|
35661
35971
|
info: "bg-info/10 text-info"
|
|
35662
35972
|
};
|
|
35663
35973
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
35664
|
-
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(
|
|
35974
|
+
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(React75__default.Fragment, { children: [
|
|
35665
35975
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
35666
35976
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
35667
35977
|
"a",
|
|
@@ -36019,7 +36329,7 @@ var init_Section = __esm({
|
|
|
36019
36329
|
as: Component = "section"
|
|
36020
36330
|
}) => {
|
|
36021
36331
|
const hasHeader = title || description || action;
|
|
36022
|
-
return
|
|
36332
|
+
return React75__default.createElement(
|
|
36023
36333
|
Component,
|
|
36024
36334
|
{
|
|
36025
36335
|
className: cn(
|
|
@@ -36393,7 +36703,7 @@ var init_WizardContainer = __esm({
|
|
|
36393
36703
|
const isCompleted = index < currentStep;
|
|
36394
36704
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36395
36705
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36396
|
-
return /* @__PURE__ */ jsxs(
|
|
36706
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
36397
36707
|
/* @__PURE__ */ jsx(
|
|
36398
36708
|
Button,
|
|
36399
36709
|
{
|
|
@@ -38180,7 +38490,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
38180
38490
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
38181
38491
|
const summary = fieldSummary(unit);
|
|
38182
38492
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
38183
|
-
return /* @__PURE__ */ jsxs(
|
|
38493
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
38184
38494
|
/* @__PURE__ */ jsxs(
|
|
38185
38495
|
Box,
|
|
38186
38496
|
{
|
|
@@ -38277,7 +38587,7 @@ var init_ImportProgress = __esm({
|
|
|
38277
38587
|
PIPELINE.map((key, index) => {
|
|
38278
38588
|
const isComplete = index < currentIndex;
|
|
38279
38589
|
const isActive = index === currentIndex;
|
|
38280
|
-
return /* @__PURE__ */ jsxs(
|
|
38590
|
+
return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
|
|
38281
38591
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
38282
38592
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
38283
38593
|
/* @__PURE__ */ jsx(
|
|
@@ -38543,6 +38853,7 @@ var init_molecules2 = __esm({
|
|
|
38543
38853
|
init_GridPicker();
|
|
38544
38854
|
init_AssetPicker();
|
|
38545
38855
|
init_IconPicker();
|
|
38856
|
+
init_EmojiPicker();
|
|
38546
38857
|
init_DateRangePicker();
|
|
38547
38858
|
init_DateRangeSelector();
|
|
38548
38859
|
init_ChartLegend();
|
|
@@ -39611,7 +39922,7 @@ var init_DrawGroup = __esm({
|
|
|
39611
39922
|
}
|
|
39612
39923
|
});
|
|
39613
39924
|
function extractTitle(children) {
|
|
39614
|
-
if (!
|
|
39925
|
+
if (!React75__default.isValidElement(children)) return void 0;
|
|
39615
39926
|
const props = children.props;
|
|
39616
39927
|
if (typeof props.title === "string") {
|
|
39617
39928
|
return props.title;
|
|
@@ -39961,12 +40272,12 @@ var init_Form = __esm({
|
|
|
39961
40272
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
39962
40273
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
39963
40274
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
39964
|
-
const normalizedInitialData =
|
|
40275
|
+
const normalizedInitialData = React75__default.useMemo(() => {
|
|
39965
40276
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
39966
40277
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
39967
40278
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
39968
40279
|
}, [entity, initialData]);
|
|
39969
|
-
const entityDerivedFields =
|
|
40280
|
+
const entityDerivedFields = React75__default.useMemo(() => {
|
|
39970
40281
|
if (fields && fields.length > 0) return void 0;
|
|
39971
40282
|
if (!resolvedEntity) return void 0;
|
|
39972
40283
|
return resolvedEntity.fields.map(
|
|
@@ -39987,16 +40298,16 @@ var init_Form = __esm({
|
|
|
39987
40298
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
39988
40299
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
39989
40300
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
39990
|
-
const [formData, setFormData] =
|
|
40301
|
+
const [formData, setFormData] = React75__default.useState(
|
|
39991
40302
|
normalizedInitialData
|
|
39992
40303
|
);
|
|
39993
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40304
|
+
const [collapsedSections, setCollapsedSections] = React75__default.useState(
|
|
39994
40305
|
/* @__PURE__ */ new Set()
|
|
39995
40306
|
);
|
|
39996
|
-
const [submitError, setSubmitError] =
|
|
39997
|
-
const formRef =
|
|
40307
|
+
const [submitError, setSubmitError] = React75__default.useState(null);
|
|
40308
|
+
const formRef = React75__default.useRef(null);
|
|
39998
40309
|
const formMode = props.mode;
|
|
39999
|
-
const mountedRef =
|
|
40310
|
+
const mountedRef = React75__default.useRef(false);
|
|
40000
40311
|
if (!mountedRef.current) {
|
|
40001
40312
|
mountedRef.current = true;
|
|
40002
40313
|
debug("forms", "mount", {
|
|
@@ -40009,7 +40320,7 @@ var init_Form = __esm({
|
|
|
40009
40320
|
});
|
|
40010
40321
|
}
|
|
40011
40322
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40012
|
-
const evalContext =
|
|
40323
|
+
const evalContext = React75__default.useMemo(
|
|
40013
40324
|
() => ({
|
|
40014
40325
|
formValues: formData,
|
|
40015
40326
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40018,7 +40329,7 @@ var init_Form = __esm({
|
|
|
40018
40329
|
}),
|
|
40019
40330
|
[formData, externalContext]
|
|
40020
40331
|
);
|
|
40021
|
-
|
|
40332
|
+
React75__default.useEffect(() => {
|
|
40022
40333
|
debug("forms", "initialData-sync", {
|
|
40023
40334
|
mode: formMode,
|
|
40024
40335
|
normalizedInitialData,
|
|
@@ -40029,7 +40340,7 @@ var init_Form = __esm({
|
|
|
40029
40340
|
setFormData(normalizedInitialData);
|
|
40030
40341
|
}
|
|
40031
40342
|
}, [normalizedInitialData]);
|
|
40032
|
-
const processCalculations =
|
|
40343
|
+
const processCalculations = React75__default.useCallback(
|
|
40033
40344
|
(changedFieldId, newFormData) => {
|
|
40034
40345
|
if (!hiddenCalculations.length) return;
|
|
40035
40346
|
const context = {
|
|
@@ -40054,7 +40365,7 @@ var init_Form = __esm({
|
|
|
40054
40365
|
},
|
|
40055
40366
|
[hiddenCalculations, externalContext, eventBus]
|
|
40056
40367
|
);
|
|
40057
|
-
const checkViolations =
|
|
40368
|
+
const checkViolations = React75__default.useCallback(
|
|
40058
40369
|
(changedFieldId, newFormData) => {
|
|
40059
40370
|
if (!violationTriggers.length) return;
|
|
40060
40371
|
const context = {
|
|
@@ -40092,7 +40403,7 @@ var init_Form = __esm({
|
|
|
40092
40403
|
processCalculations(name, newFormData);
|
|
40093
40404
|
checkViolations(name, newFormData);
|
|
40094
40405
|
};
|
|
40095
|
-
const isFieldVisible =
|
|
40406
|
+
const isFieldVisible = React75__default.useCallback(
|
|
40096
40407
|
(fieldName) => {
|
|
40097
40408
|
const condition = conditionalFields[fieldName];
|
|
40098
40409
|
if (!condition) return true;
|
|
@@ -40100,7 +40411,7 @@ var init_Form = __esm({
|
|
|
40100
40411
|
},
|
|
40101
40412
|
[conditionalFields, evalContext]
|
|
40102
40413
|
);
|
|
40103
|
-
const isSectionVisible =
|
|
40414
|
+
const isSectionVisible = React75__default.useCallback(
|
|
40104
40415
|
(section) => {
|
|
40105
40416
|
if (!section.condition) return true;
|
|
40106
40417
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -40176,7 +40487,7 @@ var init_Form = __esm({
|
|
|
40176
40487
|
eventBus.emit(`UI:${onCancel}`);
|
|
40177
40488
|
}
|
|
40178
40489
|
};
|
|
40179
|
-
const renderField =
|
|
40490
|
+
const renderField = React75__default.useCallback(
|
|
40180
40491
|
(field) => {
|
|
40181
40492
|
const fieldName = field.name || field.field;
|
|
40182
40493
|
if (!fieldName) return null;
|
|
@@ -40197,7 +40508,7 @@ var init_Form = __esm({
|
|
|
40197
40508
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
40198
40509
|
);
|
|
40199
40510
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
40200
|
-
const normalizedFields =
|
|
40511
|
+
const normalizedFields = React75__default.useMemo(() => {
|
|
40201
40512
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
40202
40513
|
return effectiveFields.map((field) => {
|
|
40203
40514
|
if (typeof field === "string") {
|
|
@@ -40221,7 +40532,7 @@ var init_Form = __esm({
|
|
|
40221
40532
|
return field;
|
|
40222
40533
|
});
|
|
40223
40534
|
}, [effectiveFields, resolvedEntity]);
|
|
40224
|
-
const schemaFields =
|
|
40535
|
+
const schemaFields = React75__default.useMemo(() => {
|
|
40225
40536
|
if (normalizedFields.length === 0) return null;
|
|
40226
40537
|
if (isDebugEnabled()) {
|
|
40227
40538
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -40231,7 +40542,7 @@ var init_Form = __esm({
|
|
|
40231
40542
|
}
|
|
40232
40543
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
40233
40544
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
40234
|
-
const sectionElements =
|
|
40545
|
+
const sectionElements = React75__default.useMemo(() => {
|
|
40235
40546
|
if (!sections || sections.length === 0) return null;
|
|
40236
40547
|
return sections.map((section) => {
|
|
40237
40548
|
if (!isSectionVisible(section)) {
|
|
@@ -40957,7 +41268,7 @@ var init_List = __esm({
|
|
|
40957
41268
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
40958
41269
|
return [];
|
|
40959
41270
|
}, [entity]);
|
|
40960
|
-
const getItemActions =
|
|
41271
|
+
const getItemActions = React75__default.useCallback(
|
|
40961
41272
|
(item) => {
|
|
40962
41273
|
if (!itemActions) return [];
|
|
40963
41274
|
if (typeof itemActions === "function") {
|
|
@@ -41438,7 +41749,7 @@ var init_MediaGallery = __esm({
|
|
|
41438
41749
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41439
41750
|
);
|
|
41440
41751
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41441
|
-
const items =
|
|
41752
|
+
const items = React75__default.useMemo(() => {
|
|
41442
41753
|
if (propItems && propItems.length > 0) return propItems;
|
|
41443
41754
|
if (entityData.length === 0) return [];
|
|
41444
41755
|
return entityData.map((record, idx) => {
|
|
@@ -41603,7 +41914,7 @@ var init_MediaGallery = __esm({
|
|
|
41603
41914
|
}
|
|
41604
41915
|
});
|
|
41605
41916
|
function extractTitle2(children) {
|
|
41606
|
-
if (!
|
|
41917
|
+
if (!React75__default.isValidElement(children)) return void 0;
|
|
41607
41918
|
const props = children.props;
|
|
41608
41919
|
if (typeof props.title === "string") {
|
|
41609
41920
|
return props.title;
|
|
@@ -41858,7 +42169,7 @@ var init_debugRegistry = __esm({
|
|
|
41858
42169
|
}
|
|
41859
42170
|
});
|
|
41860
42171
|
function useDebugData() {
|
|
41861
|
-
const [data, setData] =
|
|
42172
|
+
const [data, setData] = React75.useState(() => ({
|
|
41862
42173
|
traits: [],
|
|
41863
42174
|
ticks: [],
|
|
41864
42175
|
guards: [],
|
|
@@ -41872,7 +42183,7 @@ function useDebugData() {
|
|
|
41872
42183
|
},
|
|
41873
42184
|
lastUpdate: Date.now()
|
|
41874
42185
|
}));
|
|
41875
|
-
|
|
42186
|
+
React75.useEffect(() => {
|
|
41876
42187
|
const updateData = () => {
|
|
41877
42188
|
setData({
|
|
41878
42189
|
traits: getAllTraits(),
|
|
@@ -41981,12 +42292,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
41981
42292
|
return positions;
|
|
41982
42293
|
}
|
|
41983
42294
|
function WalkMinimap() {
|
|
41984
|
-
const [walkStep, setWalkStep] =
|
|
41985
|
-
const [traits2, setTraits] =
|
|
41986
|
-
const [coveredEdges, setCoveredEdges] =
|
|
41987
|
-
const [completedTraits, setCompletedTraits] =
|
|
41988
|
-
const prevTraitRef =
|
|
41989
|
-
|
|
42295
|
+
const [walkStep, setWalkStep] = React75.useState(null);
|
|
42296
|
+
const [traits2, setTraits] = React75.useState([]);
|
|
42297
|
+
const [coveredEdges, setCoveredEdges] = React75.useState([]);
|
|
42298
|
+
const [completedTraits, setCompletedTraits] = React75.useState(/* @__PURE__ */ new Set());
|
|
42299
|
+
const prevTraitRef = React75.useRef(null);
|
|
42300
|
+
React75.useEffect(() => {
|
|
41990
42301
|
const interval = setInterval(() => {
|
|
41991
42302
|
const w = window;
|
|
41992
42303
|
const step = w.__orbitalWalkStep;
|
|
@@ -42422,15 +42733,15 @@ var init_EntitiesTab = __esm({
|
|
|
42422
42733
|
});
|
|
42423
42734
|
function EventFlowTab({ events: events2 }) {
|
|
42424
42735
|
const { t } = useTranslate();
|
|
42425
|
-
const [filter, setFilter] =
|
|
42426
|
-
const containerRef =
|
|
42427
|
-
const [autoScroll, setAutoScroll] =
|
|
42428
|
-
|
|
42736
|
+
const [filter, setFilter] = React75.useState("all");
|
|
42737
|
+
const containerRef = React75.useRef(null);
|
|
42738
|
+
const [autoScroll, setAutoScroll] = React75.useState(true);
|
|
42739
|
+
React75.useEffect(() => {
|
|
42429
42740
|
if (autoScroll && containerRef.current) {
|
|
42430
42741
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42431
42742
|
}
|
|
42432
42743
|
}, [events2.length, autoScroll]);
|
|
42433
|
-
const filteredEvents =
|
|
42744
|
+
const filteredEvents = React75.useMemo(() => {
|
|
42434
42745
|
if (filter === "all") return events2;
|
|
42435
42746
|
return events2.filter((e) => e.type === filter);
|
|
42436
42747
|
}, [events2, filter]);
|
|
@@ -42546,7 +42857,7 @@ var init_EventFlowTab = __esm({
|
|
|
42546
42857
|
});
|
|
42547
42858
|
function GuardsPanel({ guards }) {
|
|
42548
42859
|
const { t } = useTranslate();
|
|
42549
|
-
const [filter, setFilter] =
|
|
42860
|
+
const [filter, setFilter] = React75.useState("all");
|
|
42550
42861
|
if (guards.length === 0) {
|
|
42551
42862
|
return /* @__PURE__ */ jsx(
|
|
42552
42863
|
EmptyState,
|
|
@@ -42559,7 +42870,7 @@ function GuardsPanel({ guards }) {
|
|
|
42559
42870
|
}
|
|
42560
42871
|
const passedCount = guards.filter((g) => g.result).length;
|
|
42561
42872
|
const failedCount = guards.length - passedCount;
|
|
42562
|
-
const filteredGuards =
|
|
42873
|
+
const filteredGuards = React75.useMemo(() => {
|
|
42563
42874
|
if (filter === "all") return guards;
|
|
42564
42875
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
42565
42876
|
return guards.filter((g) => !g.result);
|
|
@@ -42722,10 +43033,10 @@ function EffectBadge({ effect }) {
|
|
|
42722
43033
|
}
|
|
42723
43034
|
function TransitionTimeline({ transitions }) {
|
|
42724
43035
|
const { t } = useTranslate();
|
|
42725
|
-
const containerRef =
|
|
42726
|
-
const [autoScroll, setAutoScroll] =
|
|
42727
|
-
const [expandedId, setExpandedId] =
|
|
42728
|
-
|
|
43036
|
+
const containerRef = React75.useRef(null);
|
|
43037
|
+
const [autoScroll, setAutoScroll] = React75.useState(true);
|
|
43038
|
+
const [expandedId, setExpandedId] = React75.useState(null);
|
|
43039
|
+
React75.useEffect(() => {
|
|
42729
43040
|
if (autoScroll && containerRef.current) {
|
|
42730
43041
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
42731
43042
|
}
|
|
@@ -43005,9 +43316,9 @@ function getAllEvents(traits2) {
|
|
|
43005
43316
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43006
43317
|
const eventBus = useEventBus();
|
|
43007
43318
|
const { t } = useTranslate();
|
|
43008
|
-
const [log19, setLog] =
|
|
43009
|
-
const prevStatesRef =
|
|
43010
|
-
|
|
43319
|
+
const [log19, setLog] = React75.useState([]);
|
|
43320
|
+
const prevStatesRef = React75.useRef(/* @__PURE__ */ new Map());
|
|
43321
|
+
React75.useEffect(() => {
|
|
43011
43322
|
for (const trait of traits2) {
|
|
43012
43323
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43013
43324
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43176,10 +43487,10 @@ function VerifyModePanel({
|
|
|
43176
43487
|
localCount
|
|
43177
43488
|
}) {
|
|
43178
43489
|
const { t } = useTranslate();
|
|
43179
|
-
const [expanded, setExpanded] =
|
|
43180
|
-
const scrollRef =
|
|
43181
|
-
const prevCountRef =
|
|
43182
|
-
|
|
43490
|
+
const [expanded, setExpanded] = React75.useState(true);
|
|
43491
|
+
const scrollRef = React75.useRef(null);
|
|
43492
|
+
const prevCountRef = React75.useRef(0);
|
|
43493
|
+
React75.useEffect(() => {
|
|
43183
43494
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43184
43495
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43185
43496
|
}
|
|
@@ -43236,10 +43547,10 @@ function RuntimeDebugger({
|
|
|
43236
43547
|
schema
|
|
43237
43548
|
}) {
|
|
43238
43549
|
const { t } = useTranslate();
|
|
43239
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43240
|
-
const [isVisible, setIsVisible] =
|
|
43550
|
+
const [isCollapsed, setIsCollapsed] = React75.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43551
|
+
const [isVisible, setIsVisible] = React75.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43241
43552
|
const debugData = useDebugData();
|
|
43242
|
-
|
|
43553
|
+
React75.useEffect(() => {
|
|
43243
43554
|
if (mode === "inline") return;
|
|
43244
43555
|
return onDebugToggle((enabled) => {
|
|
43245
43556
|
setIsVisible(enabled);
|
|
@@ -43248,7 +43559,7 @@ function RuntimeDebugger({
|
|
|
43248
43559
|
}
|
|
43249
43560
|
});
|
|
43250
43561
|
}, [mode]);
|
|
43251
|
-
|
|
43562
|
+
React75.useEffect(() => {
|
|
43252
43563
|
if (mode === "inline") return;
|
|
43253
43564
|
const handleKeyDown = (e) => {
|
|
43254
43565
|
if (e.key === "`" && isVisible) {
|
|
@@ -43768,7 +44079,7 @@ var init_StatCard = __esm({
|
|
|
43768
44079
|
const labelToUse = propLabel ?? propTitle;
|
|
43769
44080
|
const eventBus = useEventBus();
|
|
43770
44081
|
const { t } = useTranslate();
|
|
43771
|
-
const handleActionClick =
|
|
44082
|
+
const handleActionClick = React75__default.useCallback(() => {
|
|
43772
44083
|
if (action?.event) {
|
|
43773
44084
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43774
44085
|
}
|
|
@@ -43779,7 +44090,7 @@ var init_StatCard = __esm({
|
|
|
43779
44090
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43780
44091
|
const isLoading = externalLoading ?? false;
|
|
43781
44092
|
const error = externalError;
|
|
43782
|
-
const computeMetricValue =
|
|
44093
|
+
const computeMetricValue = React75__default.useCallback(
|
|
43783
44094
|
(metric, items) => {
|
|
43784
44095
|
if (metric.value !== void 0) {
|
|
43785
44096
|
return metric.value;
|
|
@@ -43818,7 +44129,7 @@ var init_StatCard = __esm({
|
|
|
43818
44129
|
},
|
|
43819
44130
|
[]
|
|
43820
44131
|
);
|
|
43821
|
-
const schemaStats =
|
|
44132
|
+
const schemaStats = React75__default.useMemo(() => {
|
|
43822
44133
|
if (!metrics || metrics.length === 0) return null;
|
|
43823
44134
|
return metrics.map((metric) => ({
|
|
43824
44135
|
label: metric.label,
|
|
@@ -43826,7 +44137,7 @@ var init_StatCard = __esm({
|
|
|
43826
44137
|
format: metric.format
|
|
43827
44138
|
}));
|
|
43828
44139
|
}, [metrics, data, computeMetricValue]);
|
|
43829
|
-
const calculatedTrend =
|
|
44140
|
+
const calculatedTrend = React75__default.useMemo(() => {
|
|
43830
44141
|
if (manualTrend !== void 0) return manualTrend;
|
|
43831
44142
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
43832
44143
|
return void 0;
|
|
@@ -44466,8 +44777,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
44466
44777
|
] });
|
|
44467
44778
|
};
|
|
44468
44779
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
44469
|
-
const endRef =
|
|
44470
|
-
|
|
44780
|
+
const endRef = React75__default.useRef(null);
|
|
44781
|
+
React75__default.useEffect(() => {
|
|
44471
44782
|
if (!autoScroll) return;
|
|
44472
44783
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
44473
44784
|
}, [activities.length, autoScroll]);
|
|
@@ -44561,7 +44872,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
44561
44872
|
};
|
|
44562
44873
|
SubagentRichCard = ({ subagent }) => {
|
|
44563
44874
|
const { t } = useTranslate();
|
|
44564
|
-
const activities =
|
|
44875
|
+
const activities = React75__default.useMemo(
|
|
44565
44876
|
() => subagentMessagesToActivities(subagent.messages),
|
|
44566
44877
|
[subagent.messages]
|
|
44567
44878
|
);
|
|
@@ -44638,8 +44949,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
44638
44949
|
] });
|
|
44639
44950
|
};
|
|
44640
44951
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
44641
|
-
const endRef =
|
|
44642
|
-
|
|
44952
|
+
const endRef = React75__default.useRef(null);
|
|
44953
|
+
React75__default.useEffect(() => {
|
|
44643
44954
|
if (!autoScroll) return;
|
|
44644
44955
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
44645
44956
|
}, [messages.length, autoScroll]);
|
|
@@ -45074,7 +45385,7 @@ var init_Timeline = __esm({
|
|
|
45074
45385
|
}) => {
|
|
45075
45386
|
const { t } = useTranslate();
|
|
45076
45387
|
const entityData = entity ?? [];
|
|
45077
|
-
const items =
|
|
45388
|
+
const items = React75__default.useMemo(() => {
|
|
45078
45389
|
if (propItems) return propItems;
|
|
45079
45390
|
if (entityData.length === 0) return [];
|
|
45080
45391
|
return entityData.map((record, idx) => {
|
|
@@ -45176,7 +45487,7 @@ var init_Timeline = __esm({
|
|
|
45176
45487
|
}
|
|
45177
45488
|
});
|
|
45178
45489
|
function extractToastProps(children) {
|
|
45179
|
-
if (!
|
|
45490
|
+
if (!React75__default.isValidElement(children)) {
|
|
45180
45491
|
if (typeof children === "string") {
|
|
45181
45492
|
return { message: children };
|
|
45182
45493
|
}
|
|
@@ -45218,7 +45529,7 @@ var init_ToastSlot = __esm({
|
|
|
45218
45529
|
eventBus.emit(`${prefix}CLOSE`);
|
|
45219
45530
|
};
|
|
45220
45531
|
if (!isVisible) return null;
|
|
45221
|
-
const isCustomContent =
|
|
45532
|
+
const isCustomContent = React75__default.isValidElement(children) && !message;
|
|
45222
45533
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
45223
45534
|
Toast,
|
|
45224
45535
|
{
|
|
@@ -45323,6 +45634,7 @@ var init_component_registry_generated = __esm({
|
|
|
45323
45634
|
init_Drawer();
|
|
45324
45635
|
init_DrawerSlot();
|
|
45325
45636
|
init_EdgeDecoration();
|
|
45637
|
+
init_EmojiPicker();
|
|
45326
45638
|
init_EmptyState();
|
|
45327
45639
|
init_ErrorBoundary();
|
|
45328
45640
|
init_ErrorState();
|
|
@@ -45590,6 +45902,7 @@ var init_component_registry_generated = __esm({
|
|
|
45590
45902
|
"Drawer": Drawer,
|
|
45591
45903
|
"DrawerSlot": DrawerSlot,
|
|
45592
45904
|
"EdgeDecoration": EdgeDecoration,
|
|
45905
|
+
"EmojiPicker": EmojiPicker,
|
|
45593
45906
|
"EmptyState": EmptyState,
|
|
45594
45907
|
"ErrorBoundary": ErrorBoundary,
|
|
45595
45908
|
"ErrorState": ErrorState,
|
|
@@ -45789,7 +46102,7 @@ function SuspenseConfigProvider({
|
|
|
45789
46102
|
config,
|
|
45790
46103
|
children
|
|
45791
46104
|
}) {
|
|
45792
|
-
return
|
|
46105
|
+
return React75__default.createElement(
|
|
45793
46106
|
SuspenseConfigContext.Provider,
|
|
45794
46107
|
{ value: config },
|
|
45795
46108
|
children
|
|
@@ -45831,7 +46144,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
45831
46144
|
}
|
|
45832
46145
|
return { name: field, label: humanizeFieldName(field) };
|
|
45833
46146
|
}
|
|
45834
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
46147
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React75__default.isValidElement(field) && !(field instanceof Date)) {
|
|
45835
46148
|
const obj = field;
|
|
45836
46149
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
45837
46150
|
if (!fieldName) return field;
|
|
@@ -46017,7 +46330,19 @@ function UISlotComponent({
|
|
|
46017
46330
|
const suspenseConfig = useContext(SuspenseConfigContext);
|
|
46018
46331
|
const contained = useContext(SlotContainedContext);
|
|
46019
46332
|
const schemaCtx = useEntitySchemaOptional();
|
|
46020
|
-
const
|
|
46333
|
+
const rawContent = slots[slot];
|
|
46334
|
+
const binding = useEntityBindingSnapshot(rawContent?.sourceTrait);
|
|
46335
|
+
const content = useMemo(() => {
|
|
46336
|
+
if (!rawContent) return rawContent;
|
|
46337
|
+
const resolvedProps = resolveRenderBindingMarkers(
|
|
46338
|
+
rawContent.props,
|
|
46339
|
+
rawContent.sourceTrait,
|
|
46340
|
+
binding.entity,
|
|
46341
|
+
binding.config,
|
|
46342
|
+
binding.state
|
|
46343
|
+
);
|
|
46344
|
+
return resolvedProps === rawContent.props ? rawContent : { ...rawContent, props: resolvedProps };
|
|
46345
|
+
}, [rawContent, binding.entity, binding.config, binding.state]);
|
|
46021
46346
|
if (children !== void 0) {
|
|
46022
46347
|
if (pattern === "clear") {
|
|
46023
46348
|
return null;
|
|
@@ -46291,7 +46616,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46291
46616
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46292
46617
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46293
46618
|
}
|
|
46294
|
-
return /* @__PURE__ */ jsx(
|
|
46619
|
+
return /* @__PURE__ */ jsx(React75__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46295
46620
|
}
|
|
46296
46621
|
if (!child || typeof child !== "object") return null;
|
|
46297
46622
|
const childId = `${parentId}-${index}`;
|
|
@@ -46348,19 +46673,20 @@ function isPatternConfig(value) {
|
|
|
46348
46673
|
if (value === null || value === void 0) return false;
|
|
46349
46674
|
if (typeof value !== "object") return false;
|
|
46350
46675
|
if (Array.isArray(value)) return false;
|
|
46351
|
-
if (
|
|
46676
|
+
if (React75__default.isValidElement(value)) return false;
|
|
46352
46677
|
if (value instanceof Date) return false;
|
|
46353
46678
|
if (typeof value === "function") return false;
|
|
46354
46679
|
const record = value;
|
|
46355
46680
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
46356
46681
|
}
|
|
46357
46682
|
function isPlainConfigObject(value) {
|
|
46358
|
-
if (
|
|
46683
|
+
if (React75__default.isValidElement(value)) return false;
|
|
46359
46684
|
if (value instanceof Date) return false;
|
|
46360
46685
|
const proto = Object.getPrototypeOf(value);
|
|
46361
46686
|
return proto === Object.prototype || proto === null;
|
|
46362
46687
|
}
|
|
46363
46688
|
function substituteTraitRefsDeep(value, pathKey) {
|
|
46689
|
+
if (isRenderBindingMarker(value)) return value;
|
|
46364
46690
|
if (typeof value === "string") {
|
|
46365
46691
|
const match = TRAIT_BINDING_RE.exec(value);
|
|
46366
46692
|
if (match) {
|
|
@@ -46433,7 +46759,14 @@ function SlotContentRenderer({
|
|
|
46433
46759
|
onDismiss,
|
|
46434
46760
|
patternPath
|
|
46435
46761
|
}) {
|
|
46436
|
-
const
|
|
46762
|
+
const ambientScope = useTraitScope();
|
|
46763
|
+
const bindingTrait = content.sourceTrait ?? ambientScope?.trait;
|
|
46764
|
+
const binding = useEntityBindingSnapshot(bindingTrait);
|
|
46765
|
+
const liveProps = useMemo(
|
|
46766
|
+
() => resolveRenderBindingMarkers(content.props, bindingTrait, binding.entity, binding.config, binding.state),
|
|
46767
|
+
[content.props, bindingTrait, binding.entity, binding.config, binding.state]
|
|
46768
|
+
);
|
|
46769
|
+
const entityProp = liveProps.entity;
|
|
46437
46770
|
if (content.pattern === "form-section") {
|
|
46438
46771
|
slotLog.debug("SlotContentRenderer:form-section-render", {
|
|
46439
46772
|
contentId: content.id,
|
|
@@ -46464,7 +46797,7 @@ function SlotContentRenderer({
|
|
|
46464
46797
|
const orbitalName = schemaCtx && content.sourceTrait !== void 0 ? schemaCtx.orbitalsByTrait.get(content.sourceTrait) : void 0;
|
|
46465
46798
|
const PatternComponent = getComponentForPattern(content.pattern);
|
|
46466
46799
|
if (PatternComponent) {
|
|
46467
|
-
const childrenConfig =
|
|
46800
|
+
const childrenConfig = liveProps.children;
|
|
46468
46801
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
46469
46802
|
const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
|
|
46470
46803
|
const isDrawHost = isDrawHostPattern(content.pattern);
|
|
@@ -46475,15 +46808,15 @@ function SlotContentRenderer({
|
|
|
46475
46808
|
fromState: content.fromState,
|
|
46476
46809
|
entity: content.entity
|
|
46477
46810
|
}) : void 0;
|
|
46478
|
-
const incomingChildren =
|
|
46811
|
+
const incomingChildren = liveProps.children;
|
|
46479
46812
|
const childrenIsRenderFn = typeof incomingChildren === "function";
|
|
46480
|
-
const { children: _childrenConfig, ...restPropsNoChildren } =
|
|
46813
|
+
const { children: _childrenConfig, ...restPropsNoChildren } = liveProps;
|
|
46481
46814
|
const restProps = childrenIsRenderFn ? { ...restPropsNoChildren, children: incomingChildren } : restPropsNoChildren;
|
|
46482
46815
|
const nodeSlotOverrides = {};
|
|
46483
46816
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
46484
46817
|
const slotVal = restProps[slotKey];
|
|
46485
46818
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
46486
|
-
if (
|
|
46819
|
+
if (React75__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
46487
46820
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
46488
46821
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
46489
46822
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -46537,7 +46870,7 @@ function SlotContentRenderer({
|
|
|
46537
46870
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
46538
46871
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
46539
46872
|
const sample = resolvedItems[0];
|
|
46540
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
46873
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React75__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
46541
46874
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
46542
46875
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
46543
46876
|
}
|
|
@@ -46586,7 +46919,7 @@ function SlotContentRenderer({
|
|
|
46586
46919
|
"data-orb-path": patternPath ?? "root",
|
|
46587
46920
|
"data-orb-pattern": content.pattern,
|
|
46588
46921
|
"data-orb-orbital": orbitalName,
|
|
46589
|
-
children:
|
|
46922
|
+
children: liveProps.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
46590
46923
|
"Unknown pattern: ",
|
|
46591
46924
|
content.pattern,
|
|
46592
46925
|
content.sourceTrait && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "ml-2", children: [
|
|
@@ -46658,6 +46991,7 @@ var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext,
|
|
|
46658
46991
|
var init_UISlotRenderer = __esm({
|
|
46659
46992
|
"components/core/organisms/UISlotRenderer.tsx"() {
|
|
46660
46993
|
"use client";
|
|
46994
|
+
init_resolve_render_bindings();
|
|
46661
46995
|
init_Modal();
|
|
46662
46996
|
init_Drawer();
|
|
46663
46997
|
init_Toast();
|
|
@@ -49194,4 +49528,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
49194
49528
|
});
|
|
49195
49529
|
}
|
|
49196
49530
|
|
|
49197
|
-
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate114 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|
|
49531
|
+
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmojiPicker, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichBlockEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate114 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|