@almadar/ui 5.134.0 → 5.135.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/avl/index.cjs +1262 -1419
- package/dist/avl/index.js +317 -474
- package/dist/{cn-D3H9UzCW.d.cts → cn-B8GXqrtp.d.cts} +1 -1
- package/dist/{cn-Dm0VrLRG.d.ts → cn-CZq0uJLA.d.ts} +1 -1
- package/dist/components/index.cjs +93 -260
- package/dist/components/index.d.cts +20 -194
- package/dist/components/index.d.ts +20 -194
- package/dist/components/index.js +94 -256
- package/dist/lib/drawable/three/index.cjs +15 -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 +15 -0
- package/dist/lib/index.cjs +28 -0
- package/dist/lib/index.d.cts +21 -3
- package/dist/lib/index.d.ts +21 -3
- package/dist/lib/index.js +27 -1
- package/dist/{paintDispatch-BXJgISot.d.cts → paintDispatch-Bl2sfRFb.d.cts} +37 -8
- package/dist/{paintDispatch-BXJgISot.d.ts → paintDispatch-Bl2sfRFb.d.ts} +37 -8
- package/dist/providers/index.cjs +1144 -1301
- package/dist/providers/index.js +293 -450
- package/dist/runtime/index.cjs +1123 -1280
- package/dist/runtime/index.js +297 -454
- package/package.json +4 -4
package/dist/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React91 from 'react';
|
|
3
|
+
import React91__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { getAllPages, matchPathAmong, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -3162,6 +3162,32 @@ function formatValue(value, format) {
|
|
|
3162
3162
|
return String(value);
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
|
+
function compareCellValues(a, b) {
|
|
3166
|
+
const aEmpty = a === null || a === void 0 || a === "";
|
|
3167
|
+
const bEmpty = b === null || b === void 0 || b === "";
|
|
3168
|
+
if (aEmpty || bEmpty) return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
|
|
3169
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
3170
|
+
if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
|
|
3171
|
+
const aNum = Number(a);
|
|
3172
|
+
const bNum = Number(b);
|
|
3173
|
+
if (Number.isFinite(aNum) && Number.isFinite(bNum)) return aNum - bNum;
|
|
3174
|
+
const aTime = dateLikeTime(a);
|
|
3175
|
+
const bTime = dateLikeTime(b);
|
|
3176
|
+
if (aTime !== null && bTime !== null) return aTime - bTime;
|
|
3177
|
+
return String(a).localeCompare(String(b));
|
|
3178
|
+
}
|
|
3179
|
+
function dateLikeTime(value) {
|
|
3180
|
+
if (value instanceof Date) return value.getTime();
|
|
3181
|
+
const text = String(value);
|
|
3182
|
+
if (!/\d/.test(text) || !/[-/:T]/.test(text)) return null;
|
|
3183
|
+
const time = Date.parse(text);
|
|
3184
|
+
return Number.isNaN(time) ? null : time;
|
|
3185
|
+
}
|
|
3186
|
+
function sortRows(rows, field, direction = "asc") {
|
|
3187
|
+
if (!field) return rows;
|
|
3188
|
+
const dir = direction === "desc" ? -1 : 1;
|
|
3189
|
+
return [...rows].sort((a, b) => dir * compareCellValues(a?.[field], b?.[field]));
|
|
3190
|
+
}
|
|
3165
3191
|
var init_format = __esm({
|
|
3166
3192
|
"lib/format.ts"() {
|
|
3167
3193
|
}
|
|
@@ -3274,7 +3300,7 @@ var init_Typography = __esm({
|
|
|
3274
3300
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
3275
3301
|
body = formatValue(body, format);
|
|
3276
3302
|
}
|
|
3277
|
-
return
|
|
3303
|
+
return React91__default.createElement(
|
|
3278
3304
|
Component,
|
|
3279
3305
|
{
|
|
3280
3306
|
id,
|
|
@@ -3620,7 +3646,7 @@ var init_Box = __esm({
|
|
|
3620
3646
|
fixed: "fixed",
|
|
3621
3647
|
sticky: "sticky"
|
|
3622
3648
|
};
|
|
3623
|
-
Box =
|
|
3649
|
+
Box = React91__default.forwardRef(
|
|
3624
3650
|
({
|
|
3625
3651
|
padding,
|
|
3626
3652
|
paddingX,
|
|
@@ -3685,7 +3711,7 @@ var init_Box = __esm({
|
|
|
3685
3711
|
onPointerDown?.(e);
|
|
3686
3712
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3687
3713
|
const isClickable = action || onClick;
|
|
3688
|
-
return
|
|
3714
|
+
return React91__default.createElement(
|
|
3689
3715
|
Component,
|
|
3690
3716
|
{
|
|
3691
3717
|
ref,
|
|
@@ -3781,7 +3807,7 @@ var init_Stack = __esm({
|
|
|
3781
3807
|
};
|
|
3782
3808
|
const isHorizontal = direction === "horizontal";
|
|
3783
3809
|
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";
|
|
3784
|
-
return
|
|
3810
|
+
return React91__default.createElement(
|
|
3785
3811
|
Component,
|
|
3786
3812
|
{
|
|
3787
3813
|
className: cn(
|
|
@@ -4273,7 +4299,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4273
4299
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4274
4300
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4275
4301
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4276
|
-
return /* @__PURE__ */ jsxs(
|
|
4302
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
4277
4303
|
/* @__PURE__ */ jsx(
|
|
4278
4304
|
AvlState,
|
|
4279
4305
|
{
|
|
@@ -4724,7 +4750,7 @@ var init_Icon = __esm({
|
|
|
4724
4750
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
4725
4751
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
4726
4752
|
const family = useIconFamily();
|
|
4727
|
-
const RenderedComponent =
|
|
4753
|
+
const RenderedComponent = React91__default.useMemo(() => {
|
|
4728
4754
|
if (directIcon) return null;
|
|
4729
4755
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
4730
4756
|
}, [directIcon, effectiveName, family]);
|
|
@@ -4844,7 +4870,7 @@ var init_atlasSlice = __esm({
|
|
|
4844
4870
|
}
|
|
4845
4871
|
});
|
|
4846
4872
|
function useAtlasSliceDataUrl(asset) {
|
|
4847
|
-
const [, bump] =
|
|
4873
|
+
const [, bump] = React91.useReducer((x) => x + 1, 0);
|
|
4848
4874
|
if (!isAtlasAsset(asset)) return void 0;
|
|
4849
4875
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
4850
4876
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -4907,13 +4933,13 @@ function AtlasImage({
|
|
|
4907
4933
|
style,
|
|
4908
4934
|
"aria-hidden": ariaHidden
|
|
4909
4935
|
}) {
|
|
4910
|
-
const [, bump] =
|
|
4911
|
-
const canvasRef =
|
|
4936
|
+
const [, bump] = React91.useReducer((x) => x + 1, 0);
|
|
4937
|
+
const canvasRef = React91.useRef(null);
|
|
4912
4938
|
const sliced = isAtlasAsset(asset);
|
|
4913
4939
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
4914
4940
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
4915
4941
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
4916
|
-
|
|
4942
|
+
React91.useEffect(() => {
|
|
4917
4943
|
const canvas = canvasRef.current;
|
|
4918
4944
|
if (!canvas || !img || !rect) return;
|
|
4919
4945
|
canvas.width = rect.sw;
|
|
@@ -4989,7 +5015,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
4989
5015
|
const IconComp = value;
|
|
4990
5016
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
4991
5017
|
}
|
|
4992
|
-
if (
|
|
5018
|
+
if (React91__default.isValidElement(value)) {
|
|
4993
5019
|
return value;
|
|
4994
5020
|
}
|
|
4995
5021
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5066,7 +5092,7 @@ var init_Button = __esm({
|
|
|
5066
5092
|
md: "h-icon-default w-icon-default",
|
|
5067
5093
|
lg: "h-icon-default w-icon-default"
|
|
5068
5094
|
};
|
|
5069
|
-
Button =
|
|
5095
|
+
Button = React91__default.forwardRef(
|
|
5070
5096
|
({
|
|
5071
5097
|
className,
|
|
5072
5098
|
variant = "primary",
|
|
@@ -5136,7 +5162,7 @@ var Dialog;
|
|
|
5136
5162
|
var init_Dialog = __esm({
|
|
5137
5163
|
"components/core/atoms/Dialog.tsx"() {
|
|
5138
5164
|
init_cn();
|
|
5139
|
-
Dialog =
|
|
5165
|
+
Dialog = React91__default.forwardRef(
|
|
5140
5166
|
({
|
|
5141
5167
|
role = "dialog",
|
|
5142
5168
|
"aria-modal": ariaModal = true,
|
|
@@ -5699,7 +5725,7 @@ var init_Badge = __esm({
|
|
|
5699
5725
|
md: "px-2.5 py-1 text-sm",
|
|
5700
5726
|
lg: "px-3 py-1.5 text-base"
|
|
5701
5727
|
};
|
|
5702
|
-
Badge =
|
|
5728
|
+
Badge = React91__default.forwardRef(
|
|
5703
5729
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5704
5730
|
const iconSizes3 = {
|
|
5705
5731
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6049,7 +6075,7 @@ var init_SvgFlow = __esm({
|
|
|
6049
6075
|
width = 100,
|
|
6050
6076
|
height = 100
|
|
6051
6077
|
}) => {
|
|
6052
|
-
const markerId =
|
|
6078
|
+
const markerId = React91__default.useMemo(() => {
|
|
6053
6079
|
flowIdCounter += 1;
|
|
6054
6080
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6055
6081
|
}, []);
|
|
@@ -6642,7 +6668,7 @@ var init_SvgRing = __esm({
|
|
|
6642
6668
|
width = 100,
|
|
6643
6669
|
height = 100
|
|
6644
6670
|
}) => {
|
|
6645
|
-
const gradientId =
|
|
6671
|
+
const gradientId = React91__default.useMemo(() => {
|
|
6646
6672
|
ringIdCounter += 1;
|
|
6647
6673
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6648
6674
|
}, []);
|
|
@@ -6823,7 +6849,7 @@ var init_Input = __esm({
|
|
|
6823
6849
|
init_cn();
|
|
6824
6850
|
init_Icon();
|
|
6825
6851
|
init_useEventBus();
|
|
6826
|
-
Input =
|
|
6852
|
+
Input = React91__default.forwardRef(
|
|
6827
6853
|
({
|
|
6828
6854
|
className,
|
|
6829
6855
|
inputType,
|
|
@@ -6991,7 +7017,7 @@ var Label;
|
|
|
6991
7017
|
var init_Label = __esm({
|
|
6992
7018
|
"components/core/atoms/Label.tsx"() {
|
|
6993
7019
|
init_cn();
|
|
6994
|
-
Label =
|
|
7020
|
+
Label = React91__default.forwardRef(
|
|
6995
7021
|
({ className, required, children, ...props }, ref) => {
|
|
6996
7022
|
return /* @__PURE__ */ jsxs(
|
|
6997
7023
|
"label",
|
|
@@ -7018,7 +7044,7 @@ var init_Textarea = __esm({
|
|
|
7018
7044
|
"components/core/atoms/Textarea.tsx"() {
|
|
7019
7045
|
init_cn();
|
|
7020
7046
|
init_useEventBus();
|
|
7021
|
-
Textarea =
|
|
7047
|
+
Textarea = React91__default.forwardRef(
|
|
7022
7048
|
({ className, error, onChange, ...props }, ref) => {
|
|
7023
7049
|
const eventBus = useEventBus();
|
|
7024
7050
|
const handleChange = (e) => {
|
|
@@ -7257,7 +7283,7 @@ var init_Select = __esm({
|
|
|
7257
7283
|
init_cn();
|
|
7258
7284
|
init_Icon();
|
|
7259
7285
|
init_useEventBus();
|
|
7260
|
-
Select =
|
|
7286
|
+
Select = React91__default.forwardRef(
|
|
7261
7287
|
(props, _ref) => {
|
|
7262
7288
|
const { multiple, searchable, clearable } = props;
|
|
7263
7289
|
if (multiple || searchable || clearable) {
|
|
@@ -7274,7 +7300,7 @@ var init_Checkbox = __esm({
|
|
|
7274
7300
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7275
7301
|
init_cn();
|
|
7276
7302
|
init_useEventBus();
|
|
7277
|
-
Checkbox =
|
|
7303
|
+
Checkbox = React91__default.forwardRef(
|
|
7278
7304
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7279
7305
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7280
7306
|
const eventBus = useEventBus();
|
|
@@ -7328,7 +7354,7 @@ var init_Spinner = __esm({
|
|
|
7328
7354
|
md: "h-6 w-6",
|
|
7329
7355
|
lg: "h-8 w-8"
|
|
7330
7356
|
};
|
|
7331
|
-
Spinner =
|
|
7357
|
+
Spinner = React91__default.forwardRef(
|
|
7332
7358
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7333
7359
|
if (overlay) {
|
|
7334
7360
|
return /* @__PURE__ */ jsx(
|
|
@@ -7418,7 +7444,7 @@ var init_Card = __esm({
|
|
|
7418
7444
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7419
7445
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7420
7446
|
};
|
|
7421
|
-
Card =
|
|
7447
|
+
Card = React91__default.forwardRef(
|
|
7422
7448
|
({
|
|
7423
7449
|
className,
|
|
7424
7450
|
variant = "bordered",
|
|
@@ -7467,9 +7493,9 @@ var init_Card = __esm({
|
|
|
7467
7493
|
}
|
|
7468
7494
|
);
|
|
7469
7495
|
Card.displayName = "Card";
|
|
7470
|
-
CardHeader =
|
|
7496
|
+
CardHeader = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7471
7497
|
CardHeader.displayName = "CardHeader";
|
|
7472
|
-
CardTitle =
|
|
7498
|
+
CardTitle = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7473
7499
|
"h3",
|
|
7474
7500
|
{
|
|
7475
7501
|
ref,
|
|
@@ -7482,11 +7508,11 @@ var init_Card = __esm({
|
|
|
7482
7508
|
}
|
|
7483
7509
|
));
|
|
7484
7510
|
CardTitle.displayName = "CardTitle";
|
|
7485
|
-
CardContent =
|
|
7511
|
+
CardContent = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7486
7512
|
CardContent.displayName = "CardContent";
|
|
7487
7513
|
CardBody = CardContent;
|
|
7488
7514
|
CardBody.displayName = "CardBody";
|
|
7489
|
-
CardFooter =
|
|
7515
|
+
CardFooter = React91__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7490
7516
|
"div",
|
|
7491
7517
|
{
|
|
7492
7518
|
ref,
|
|
@@ -7573,7 +7599,7 @@ var init_FilterPill = __esm({
|
|
|
7573
7599
|
md: "w-3.5 h-3.5",
|
|
7574
7600
|
lg: "w-4 h-4"
|
|
7575
7601
|
};
|
|
7576
|
-
FilterPill =
|
|
7602
|
+
FilterPill = React91__default.forwardRef(
|
|
7577
7603
|
({
|
|
7578
7604
|
className,
|
|
7579
7605
|
variant = "default",
|
|
@@ -7702,8 +7728,8 @@ var init_Avatar = __esm({
|
|
|
7702
7728
|
actionPayload
|
|
7703
7729
|
}) => {
|
|
7704
7730
|
const eventBus = useEventBus();
|
|
7705
|
-
const [imgFailed, setImgFailed] =
|
|
7706
|
-
|
|
7731
|
+
const [imgFailed, setImgFailed] = React91__default.useState(false);
|
|
7732
|
+
React91__default.useEffect(() => {
|
|
7707
7733
|
setImgFailed(false);
|
|
7708
7734
|
}, [src]);
|
|
7709
7735
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7816,7 +7842,7 @@ var init_Center = __esm({
|
|
|
7816
7842
|
as: Component = "div"
|
|
7817
7843
|
}) => {
|
|
7818
7844
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7819
|
-
return
|
|
7845
|
+
return React91__default.createElement(Component, {
|
|
7820
7846
|
className: cn(
|
|
7821
7847
|
inline ? "inline-flex" : "flex",
|
|
7822
7848
|
horizontal && "justify-center",
|
|
@@ -8084,7 +8110,7 @@ var init_Radio = __esm({
|
|
|
8084
8110
|
md: "w-2.5 h-2.5",
|
|
8085
8111
|
lg: "w-3 h-3"
|
|
8086
8112
|
};
|
|
8087
|
-
Radio =
|
|
8113
|
+
Radio = React91__default.forwardRef(
|
|
8088
8114
|
({
|
|
8089
8115
|
label,
|
|
8090
8116
|
helperText,
|
|
@@ -8101,12 +8127,12 @@ var init_Radio = __esm({
|
|
|
8101
8127
|
onChange,
|
|
8102
8128
|
...props
|
|
8103
8129
|
}, ref) => {
|
|
8104
|
-
const reactId =
|
|
8130
|
+
const reactId = React91__default.useId();
|
|
8105
8131
|
const baseId = id || `radio-${reactId}`;
|
|
8106
8132
|
const hasError = !!error;
|
|
8107
8133
|
const eventBus = useEventBus();
|
|
8108
|
-
const [selected, setSelected] =
|
|
8109
|
-
|
|
8134
|
+
const [selected, setSelected] = React91__default.useState(value);
|
|
8135
|
+
React91__default.useEffect(() => {
|
|
8110
8136
|
if (value !== void 0) setSelected(value);
|
|
8111
8137
|
}, [value]);
|
|
8112
8138
|
const pick = (next, e) => {
|
|
@@ -8288,7 +8314,7 @@ var init_Switch = __esm({
|
|
|
8288
8314
|
"components/core/atoms/Switch.tsx"() {
|
|
8289
8315
|
"use client";
|
|
8290
8316
|
init_cn();
|
|
8291
|
-
Switch =
|
|
8317
|
+
Switch = React91.forwardRef(
|
|
8292
8318
|
({
|
|
8293
8319
|
checked,
|
|
8294
8320
|
defaultChecked = false,
|
|
@@ -8299,10 +8325,10 @@ var init_Switch = __esm({
|
|
|
8299
8325
|
name,
|
|
8300
8326
|
className
|
|
8301
8327
|
}, ref) => {
|
|
8302
|
-
const [isChecked, setIsChecked] =
|
|
8328
|
+
const [isChecked, setIsChecked] = React91.useState(
|
|
8303
8329
|
checked !== void 0 ? checked : defaultChecked
|
|
8304
8330
|
);
|
|
8305
|
-
|
|
8331
|
+
React91.useEffect(() => {
|
|
8306
8332
|
if (checked !== void 0) {
|
|
8307
8333
|
setIsChecked(checked);
|
|
8308
8334
|
}
|
|
@@ -8580,7 +8606,7 @@ var Aside;
|
|
|
8580
8606
|
var init_Aside = __esm({
|
|
8581
8607
|
"components/core/atoms/Aside.tsx"() {
|
|
8582
8608
|
init_cn();
|
|
8583
|
-
Aside =
|
|
8609
|
+
Aside = React91__default.forwardRef(
|
|
8584
8610
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8585
8611
|
);
|
|
8586
8612
|
Aside.displayName = "Aside";
|
|
@@ -8659,9 +8685,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8659
8685
|
className
|
|
8660
8686
|
}) => {
|
|
8661
8687
|
const { t } = useTranslate();
|
|
8662
|
-
const [isVisible, setIsVisible] =
|
|
8663
|
-
const timeoutRef =
|
|
8664
|
-
const triggerRef =
|
|
8688
|
+
const [isVisible, setIsVisible] = React91__default.useState(false);
|
|
8689
|
+
const timeoutRef = React91__default.useRef(null);
|
|
8690
|
+
const triggerRef = React91__default.useRef(null);
|
|
8665
8691
|
const handleMouseEnter = () => {
|
|
8666
8692
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8667
8693
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8672,7 +8698,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8672
8698
|
};
|
|
8673
8699
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8674
8700
|
const open = isVisible || revealed;
|
|
8675
|
-
|
|
8701
|
+
React91__default.useEffect(() => {
|
|
8676
8702
|
return () => {
|
|
8677
8703
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8678
8704
|
};
|
|
@@ -8882,7 +8908,7 @@ var init_StatusDot = __esm({
|
|
|
8882
8908
|
md: "w-2.5 h-2.5",
|
|
8883
8909
|
lg: "w-3 h-3"
|
|
8884
8910
|
};
|
|
8885
|
-
StatusDot =
|
|
8911
|
+
StatusDot = React91__default.forwardRef(
|
|
8886
8912
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
8887
8913
|
return /* @__PURE__ */ jsx(
|
|
8888
8914
|
"span",
|
|
@@ -8936,7 +8962,7 @@ var init_TrendIndicator = __esm({
|
|
|
8936
8962
|
down: "trending-down",
|
|
8937
8963
|
flat: "arrow-right"
|
|
8938
8964
|
};
|
|
8939
|
-
TrendIndicator =
|
|
8965
|
+
TrendIndicator = React91__default.forwardRef(
|
|
8940
8966
|
({
|
|
8941
8967
|
className,
|
|
8942
8968
|
value,
|
|
@@ -9005,7 +9031,7 @@ var init_RangeSlider = __esm({
|
|
|
9005
9031
|
md: "w-4 h-4",
|
|
9006
9032
|
lg: "w-5 h-5"
|
|
9007
9033
|
};
|
|
9008
|
-
RangeSlider =
|
|
9034
|
+
RangeSlider = React91__default.forwardRef(
|
|
9009
9035
|
({
|
|
9010
9036
|
className,
|
|
9011
9037
|
min = 0,
|
|
@@ -9616,7 +9642,7 @@ var init_ContentSection = __esm({
|
|
|
9616
9642
|
md: "py-16",
|
|
9617
9643
|
lg: "py-24"
|
|
9618
9644
|
};
|
|
9619
|
-
ContentSection =
|
|
9645
|
+
ContentSection = React91__default.forwardRef(
|
|
9620
9646
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9621
9647
|
return /* @__PURE__ */ jsx(
|
|
9622
9648
|
Box,
|
|
@@ -10150,7 +10176,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10150
10176
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10151
10177
|
"none": {}
|
|
10152
10178
|
};
|
|
10153
|
-
AnimatedReveal =
|
|
10179
|
+
AnimatedReveal = React91__default.forwardRef(
|
|
10154
10180
|
({
|
|
10155
10181
|
trigger = "scroll",
|
|
10156
10182
|
animation = "fade-up",
|
|
@@ -10310,7 +10336,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10310
10336
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10311
10337
|
"use client";
|
|
10312
10338
|
init_cn();
|
|
10313
|
-
AnimatedGraphic =
|
|
10339
|
+
AnimatedGraphic = React91__default.forwardRef(
|
|
10314
10340
|
({
|
|
10315
10341
|
src,
|
|
10316
10342
|
svgContent,
|
|
@@ -10333,7 +10359,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10333
10359
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10334
10360
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10335
10361
|
const prevAnimateRef = useRef(animate);
|
|
10336
|
-
const setRef =
|
|
10362
|
+
const setRef = React91__default.useCallback(
|
|
10337
10363
|
(node) => {
|
|
10338
10364
|
containerRef.current = node;
|
|
10339
10365
|
if (typeof ref === "function") ref(node);
|
|
@@ -11061,9 +11087,9 @@ function ControlButton({
|
|
|
11061
11087
|
className
|
|
11062
11088
|
}) {
|
|
11063
11089
|
const eventBus = useEventBus();
|
|
11064
|
-
const [isPressed, setIsPressed] =
|
|
11090
|
+
const [isPressed, setIsPressed] = React91.useState(false);
|
|
11065
11091
|
const actualPressed = pressed ?? isPressed;
|
|
11066
|
-
const handlePointerDown =
|
|
11092
|
+
const handlePointerDown = React91.useCallback(
|
|
11067
11093
|
(e) => {
|
|
11068
11094
|
e.preventDefault();
|
|
11069
11095
|
if (disabled) return;
|
|
@@ -11073,7 +11099,7 @@ function ControlButton({
|
|
|
11073
11099
|
},
|
|
11074
11100
|
[disabled, pressEvent, eventBus, onPress]
|
|
11075
11101
|
);
|
|
11076
|
-
const handlePointerUp =
|
|
11102
|
+
const handlePointerUp = React91.useCallback(
|
|
11077
11103
|
(e) => {
|
|
11078
11104
|
e.preventDefault();
|
|
11079
11105
|
if (disabled) return;
|
|
@@ -11083,7 +11109,7 @@ function ControlButton({
|
|
|
11083
11109
|
},
|
|
11084
11110
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
11085
11111
|
);
|
|
11086
|
-
const handlePointerLeave =
|
|
11112
|
+
const handlePointerLeave = React91.useCallback(
|
|
11087
11113
|
(e) => {
|
|
11088
11114
|
if (isPressed) {
|
|
11089
11115
|
setIsPressed(false);
|
|
@@ -11324,210 +11350,6 @@ var init_ChoiceButton = __esm({
|
|
|
11324
11350
|
ChoiceButton.displayName = "ChoiceButton";
|
|
11325
11351
|
}
|
|
11326
11352
|
});
|
|
11327
|
-
function SvgStage({
|
|
11328
|
-
cols,
|
|
11329
|
-
rows,
|
|
11330
|
-
tileSize = 32,
|
|
11331
|
-
background = "var(--color-background)",
|
|
11332
|
-
tileClickEvent,
|
|
11333
|
-
tileHoverEvent,
|
|
11334
|
-
tileLeaveEvent,
|
|
11335
|
-
keyMap,
|
|
11336
|
-
keyUpMap,
|
|
11337
|
-
className,
|
|
11338
|
-
children
|
|
11339
|
-
}) {
|
|
11340
|
-
const eventBus = useEventBus();
|
|
11341
|
-
const svgRef = useRef(null);
|
|
11342
|
-
const pointerDownRef = useRef(null);
|
|
11343
|
-
const cellFromClient = useCallback((clientX, clientY) => {
|
|
11344
|
-
const svg = svgRef.current;
|
|
11345
|
-
if (!svg) return null;
|
|
11346
|
-
const rect = svg.getBoundingClientRect();
|
|
11347
|
-
if (rect.width === 0 || rect.height === 0) return null;
|
|
11348
|
-
const vbW = cols * tileSize;
|
|
11349
|
-
const vbH = rows * tileSize;
|
|
11350
|
-
const meet = Math.min(rect.width / vbW, rect.height / vbH);
|
|
11351
|
-
const offsetX = (rect.width - vbW * meet) / 2;
|
|
11352
|
-
const offsetY = (rect.height - vbH * meet) / 2;
|
|
11353
|
-
const svgX = (clientX - rect.left - offsetX) / meet;
|
|
11354
|
-
const svgY = (clientY - rect.top - offsetY) / meet;
|
|
11355
|
-
return {
|
|
11356
|
-
x: Math.min(Math.max(Math.floor(svgX / tileSize), 0), cols - 1),
|
|
11357
|
-
y: Math.min(Math.max(Math.floor(svgY / tileSize), 0), rows - 1)
|
|
11358
|
-
};
|
|
11359
|
-
}, [cols, rows, tileSize]);
|
|
11360
|
-
const handlePointerDown = useCallback((e) => {
|
|
11361
|
-
pointerDownRef.current = { clientX: e.clientX, clientY: e.clientY };
|
|
11362
|
-
}, []);
|
|
11363
|
-
const handlePointerUp = useCallback((e) => {
|
|
11364
|
-
const down = pointerDownRef.current;
|
|
11365
|
-
pointerDownRef.current = null;
|
|
11366
|
-
if (!tileClickEvent) return;
|
|
11367
|
-
if (down && Math.hypot(e.clientX - down.clientX, e.clientY - down.clientY) > 5) return;
|
|
11368
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
11369
|
-
if (cell) eventBus.emit(`UI:${tileClickEvent}`, cell);
|
|
11370
|
-
}, [cellFromClient, tileClickEvent, eventBus]);
|
|
11371
|
-
const handlePointerMove = useCallback((e) => {
|
|
11372
|
-
if (!tileHoverEvent) return;
|
|
11373
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
11374
|
-
if (cell) eventBus.emit(`UI:${tileHoverEvent}`, cell);
|
|
11375
|
-
}, [cellFromClient, tileHoverEvent, eventBus]);
|
|
11376
|
-
const handlePointerLeave = useCallback(() => {
|
|
11377
|
-
pointerDownRef.current = null;
|
|
11378
|
-
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
11379
|
-
}, [tileLeaveEvent, eventBus]);
|
|
11380
|
-
useEffect(() => {
|
|
11381
|
-
if (!keyMap && !keyUpMap) return;
|
|
11382
|
-
const onDown = (e) => {
|
|
11383
|
-
const ev = keyMap?.[e.code];
|
|
11384
|
-
if (ev) {
|
|
11385
|
-
eventBus.emit(`UI:${ev}`, {});
|
|
11386
|
-
e.preventDefault();
|
|
11387
|
-
}
|
|
11388
|
-
};
|
|
11389
|
-
const onUp = (e) => {
|
|
11390
|
-
const ev = keyUpMap?.[e.code];
|
|
11391
|
-
if (ev) eventBus.emit(`UI:${ev}`, {});
|
|
11392
|
-
};
|
|
11393
|
-
window.addEventListener("keydown", onDown);
|
|
11394
|
-
window.addEventListener("keyup", onUp);
|
|
11395
|
-
return () => {
|
|
11396
|
-
window.removeEventListener("keydown", onDown);
|
|
11397
|
-
window.removeEventListener("keyup", onUp);
|
|
11398
|
-
};
|
|
11399
|
-
}, [keyMap, keyUpMap, eventBus]);
|
|
11400
|
-
useEffect(() => {
|
|
11401
|
-
if (!keyMap && !keyUpMap) return;
|
|
11402
|
-
svgRef.current?.focus();
|
|
11403
|
-
}, [keyMap, keyUpMap]);
|
|
11404
|
-
const stageContext = useMemo(() => ({ tileSize }), [tileSize]);
|
|
11405
|
-
return /* @__PURE__ */ jsxs(
|
|
11406
|
-
"svg",
|
|
11407
|
-
{
|
|
11408
|
-
ref: svgRef,
|
|
11409
|
-
"data-testid": "svg-stage",
|
|
11410
|
-
viewBox: `0 0 ${cols * tileSize} ${rows * tileSize}`,
|
|
11411
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
11412
|
-
className: cn("block h-full w-full", className),
|
|
11413
|
-
tabIndex: keyMap || keyUpMap ? 0 : void 0,
|
|
11414
|
-
onPointerDown: handlePointerDown,
|
|
11415
|
-
onPointerMove: handlePointerMove,
|
|
11416
|
-
onPointerUp: handlePointerUp,
|
|
11417
|
-
onPointerLeave: handlePointerLeave,
|
|
11418
|
-
children: [
|
|
11419
|
-
/* @__PURE__ */ jsx("rect", { width: cols * tileSize, height: rows * tileSize, fill: background }),
|
|
11420
|
-
/* @__PURE__ */ jsx(SvgStageContext.Provider, { value: stageContext, children })
|
|
11421
|
-
]
|
|
11422
|
-
}
|
|
11423
|
-
);
|
|
11424
|
-
}
|
|
11425
|
-
var SvgStageContext;
|
|
11426
|
-
var init_SvgStage = __esm({
|
|
11427
|
-
"components/game/molecules/SvgStage.tsx"() {
|
|
11428
|
-
"use client";
|
|
11429
|
-
init_cn();
|
|
11430
|
-
init_useEventBus();
|
|
11431
|
-
SvgStageContext = React92.createContext({ tileSize: 1 });
|
|
11432
|
-
SvgStage.displayName = "SvgStage";
|
|
11433
|
-
}
|
|
11434
|
-
});
|
|
11435
|
-
function SvgDrawShape({
|
|
11436
|
-
shape,
|
|
11437
|
-
x,
|
|
11438
|
-
y,
|
|
11439
|
-
width,
|
|
11440
|
-
height,
|
|
11441
|
-
radius,
|
|
11442
|
-
radiusY,
|
|
11443
|
-
points,
|
|
11444
|
-
d,
|
|
11445
|
-
x2,
|
|
11446
|
-
y2,
|
|
11447
|
-
fill,
|
|
11448
|
-
stroke,
|
|
11449
|
-
strokeWidth,
|
|
11450
|
-
opacity,
|
|
11451
|
-
className
|
|
11452
|
-
}) {
|
|
11453
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
11454
|
-
const cell = (v) => v === void 0 ? void 0 : v * tileSize;
|
|
11455
|
-
const paint = {
|
|
11456
|
-
fill: fill ?? (stroke === void 0 ? "var(--color-primary)" : "none"),
|
|
11457
|
-
stroke,
|
|
11458
|
-
strokeWidth,
|
|
11459
|
-
opacity,
|
|
11460
|
-
className
|
|
11461
|
-
};
|
|
11462
|
-
return /* @__PURE__ */ jsxs("g", { transform: `translate(${x * tileSize} ${y * tileSize})`, children: [
|
|
11463
|
-
shape === "rect" && /* @__PURE__ */ jsx("rect", { width: cell(width), height: cell(height), ...paint }),
|
|
11464
|
-
shape === "circle" && /* @__PURE__ */ jsx("circle", { r: cell(radius), ...paint }),
|
|
11465
|
-
shape === "ellipse" && /* @__PURE__ */ jsx("ellipse", { rx: cell(radius), ry: cell(radiusY ?? radius), ...paint }),
|
|
11466
|
-
shape === "polygon" && /* @__PURE__ */ jsx("polygon", { points, ...paint }),
|
|
11467
|
-
shape === "polyline" && /* @__PURE__ */ jsx("polyline", { points, ...paint }),
|
|
11468
|
-
shape === "path" && /* @__PURE__ */ jsx("path", { d, ...paint }),
|
|
11469
|
-
shape === "line" && /* @__PURE__ */ jsx("line", { x2: cell(x2), y2: cell(y2), ...paint })
|
|
11470
|
-
] });
|
|
11471
|
-
}
|
|
11472
|
-
var init_SvgDrawShape = __esm({
|
|
11473
|
-
"components/game/atoms/SvgDrawShape.tsx"() {
|
|
11474
|
-
"use client";
|
|
11475
|
-
init_SvgStage();
|
|
11476
|
-
SvgDrawShape.displayName = "SvgDrawShape";
|
|
11477
|
-
}
|
|
11478
|
-
});
|
|
11479
|
-
function SvgDrawGroup({
|
|
11480
|
-
x = 0,
|
|
11481
|
-
y = 0,
|
|
11482
|
-
scale,
|
|
11483
|
-
rotate,
|
|
11484
|
-
opacity,
|
|
11485
|
-
className,
|
|
11486
|
-
children
|
|
11487
|
-
}) {
|
|
11488
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
11489
|
-
const transforms = [`translate(${x * tileSize} ${y * tileSize})`];
|
|
11490
|
-
if (rotate !== void 0) transforms.push(`rotate(${rotate})`);
|
|
11491
|
-
if (scale !== void 0) transforms.push(`scale(${scale})`);
|
|
11492
|
-
return /* @__PURE__ */ jsx("g", { transform: transforms.join(" "), opacity, className, children });
|
|
11493
|
-
}
|
|
11494
|
-
var init_SvgDrawGroup = __esm({
|
|
11495
|
-
"components/game/atoms/SvgDrawGroup.tsx"() {
|
|
11496
|
-
"use client";
|
|
11497
|
-
init_SvgStage();
|
|
11498
|
-
SvgDrawGroup.displayName = "SvgDrawGroup";
|
|
11499
|
-
}
|
|
11500
|
-
});
|
|
11501
|
-
function SvgDrawText({
|
|
11502
|
-
x,
|
|
11503
|
-
y,
|
|
11504
|
-
text,
|
|
11505
|
-
size = 12,
|
|
11506
|
-
fill = "var(--color-foreground)",
|
|
11507
|
-
anchor = "middle",
|
|
11508
|
-
className
|
|
11509
|
-
}) {
|
|
11510
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
11511
|
-
return /* @__PURE__ */ jsx(
|
|
11512
|
-
"text",
|
|
11513
|
-
{
|
|
11514
|
-
x: x * tileSize,
|
|
11515
|
-
y: y * tileSize,
|
|
11516
|
-
fontSize: size,
|
|
11517
|
-
fill,
|
|
11518
|
-
textAnchor: anchor,
|
|
11519
|
-
className,
|
|
11520
|
-
children: text
|
|
11521
|
-
}
|
|
11522
|
-
);
|
|
11523
|
-
}
|
|
11524
|
-
var init_SvgDrawText = __esm({
|
|
11525
|
-
"components/game/atoms/SvgDrawText.tsx"() {
|
|
11526
|
-
"use client";
|
|
11527
|
-
init_SvgStage();
|
|
11528
|
-
SvgDrawText.displayName = "SvgDrawText";
|
|
11529
|
-
}
|
|
11530
|
-
});
|
|
11531
11353
|
function ControlGrid({
|
|
11532
11354
|
kind,
|
|
11533
11355
|
buttons = DEFAULT_BUTTONS,
|
|
@@ -11545,8 +11367,8 @@ function ControlGrid({
|
|
|
11545
11367
|
className
|
|
11546
11368
|
}) {
|
|
11547
11369
|
const eventBus = useEventBus();
|
|
11548
|
-
const [active, setActive] =
|
|
11549
|
-
const handlePress =
|
|
11370
|
+
const [active, setActive] = React91.useState(/* @__PURE__ */ new Set());
|
|
11371
|
+
const handlePress = React91.useCallback(
|
|
11550
11372
|
(id) => {
|
|
11551
11373
|
setActive((prev) => new Set(prev).add(id));
|
|
11552
11374
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11560,7 +11382,7 @@ function ControlGrid({
|
|
|
11560
11382
|
},
|
|
11561
11383
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
11562
11384
|
);
|
|
11563
|
-
const handleRelease =
|
|
11385
|
+
const handleRelease = React91.useCallback(
|
|
11564
11386
|
(id) => {
|
|
11565
11387
|
setActive((prev) => {
|
|
11566
11388
|
const next = new Set(prev);
|
|
@@ -11918,7 +11740,7 @@ function GameMenu({
|
|
|
11918
11740
|
}) {
|
|
11919
11741
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
11920
11742
|
const eventBus = useEventBus();
|
|
11921
|
-
const handleOptionClick =
|
|
11743
|
+
const handleOptionClick = React91.useCallback(
|
|
11922
11744
|
(option) => {
|
|
11923
11745
|
if (option.event) {
|
|
11924
11746
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -12154,7 +11976,7 @@ function StateGraph({
|
|
|
12154
11976
|
}) {
|
|
12155
11977
|
const eventBus = useEventBus();
|
|
12156
11978
|
const nodes = states ?? [];
|
|
12157
|
-
const positions =
|
|
11979
|
+
const positions = React91.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
12158
11980
|
return /* @__PURE__ */ jsxs(
|
|
12159
11981
|
Box,
|
|
12160
11982
|
{
|
|
@@ -12225,8 +12047,8 @@ function MiniMap({
|
|
|
12225
12047
|
tileAssets,
|
|
12226
12048
|
unitAssets
|
|
12227
12049
|
}) {
|
|
12228
|
-
const canvasRef =
|
|
12229
|
-
const imgCacheRef =
|
|
12050
|
+
const canvasRef = React91.useRef(null);
|
|
12051
|
+
const imgCacheRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
12230
12052
|
function loadImg(url) {
|
|
12231
12053
|
const cached = imgCacheRef.current.get(url);
|
|
12232
12054
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -12241,7 +12063,7 @@ function MiniMap({
|
|
|
12241
12063
|
imgCacheRef.current.set(url, img);
|
|
12242
12064
|
return null;
|
|
12243
12065
|
}
|
|
12244
|
-
|
|
12066
|
+
React91.useEffect(() => {
|
|
12245
12067
|
const canvas = canvasRef.current;
|
|
12246
12068
|
if (!canvas) return;
|
|
12247
12069
|
const ctx = canvas.getContext("2d");
|
|
@@ -12717,6 +12539,15 @@ function createWebPainter(ctx, onAssetLoad) {
|
|
|
12717
12539
|
ctx.lineWidth = lineWidth;
|
|
12718
12540
|
ctx.stroke();
|
|
12719
12541
|
},
|
|
12542
|
+
fillPath(d, color) {
|
|
12543
|
+
ctx.fillStyle = color;
|
|
12544
|
+
ctx.fill(new Path2D(d));
|
|
12545
|
+
},
|
|
12546
|
+
strokePath(d, color, lineWidth = 1) {
|
|
12547
|
+
ctx.strokeStyle = color;
|
|
12548
|
+
ctx.lineWidth = lineWidth;
|
|
12549
|
+
ctx.stroke(new Path2D(d));
|
|
12550
|
+
},
|
|
12720
12551
|
text(str, x, y, style) {
|
|
12721
12552
|
if (style.font) ctx.font = style.font;
|
|
12722
12553
|
ctx.fillStyle = style.color;
|
|
@@ -12892,6 +12723,16 @@ var init_DrawShape = __esm({
|
|
|
12892
12723
|
if (node.stroke) painter.strokePoly(pts, node.stroke, node.strokeWidth ?? 1, true);
|
|
12893
12724
|
break;
|
|
12894
12725
|
}
|
|
12726
|
+
case "path": {
|
|
12727
|
+
if (!node.d) break;
|
|
12728
|
+
const base = dctx.projector.project(node.position);
|
|
12729
|
+
const tw = dctx.projector.tileWidth;
|
|
12730
|
+
painter.translate(base.x, base.y);
|
|
12731
|
+
painter.scale(tw, tw);
|
|
12732
|
+
if (node.fill) painter.fillPath(node.d, node.fill);
|
|
12733
|
+
if (node.stroke) painter.strokePath(node.d, node.stroke, (node.strokeWidth ?? 1) / tw);
|
|
12734
|
+
break;
|
|
12735
|
+
}
|
|
12895
12736
|
}
|
|
12896
12737
|
painter.restore();
|
|
12897
12738
|
};
|
|
@@ -12983,6 +12824,19 @@ function paintDrawable(painter, node, dctx) {
|
|
|
12983
12824
|
case "draw-text":
|
|
12984
12825
|
paintText(painter, node, dctx);
|
|
12985
12826
|
break;
|
|
12827
|
+
case "draw-group": {
|
|
12828
|
+
if (!isValidScenePos(node.position)) break;
|
|
12829
|
+
if (!Array.isArray(node.items)) break;
|
|
12830
|
+
const p = dctx.projector.project(node.position);
|
|
12831
|
+
painter.save();
|
|
12832
|
+
painter.translate(p.x, p.y);
|
|
12833
|
+
if (node.scale !== void 0) painter.scale(node.scale, node.scale);
|
|
12834
|
+
if (node.rotate !== void 0) painter.rotate(node.rotate);
|
|
12835
|
+
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
12836
|
+
for (const item of node.items) paintDrawable(painter, item, dctx);
|
|
12837
|
+
painter.restore();
|
|
12838
|
+
break;
|
|
12839
|
+
}
|
|
12986
12840
|
case "draw-sprite-layer":
|
|
12987
12841
|
paintSpriteLayer(painter, node, dctx);
|
|
12988
12842
|
break;
|
|
@@ -12996,6 +12850,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
12996
12850
|
}
|
|
12997
12851
|
var init_paintDispatch = __esm({
|
|
12998
12852
|
"lib/drawable/paintDispatch.ts"() {
|
|
12853
|
+
init_contract();
|
|
12999
12854
|
init_DrawSprite();
|
|
13000
12855
|
init_DrawShape();
|
|
13001
12856
|
init_DrawText();
|
|
@@ -13013,6 +12868,7 @@ function collectDrawnItems(nodes) {
|
|
|
13013
12868
|
case "draw-sprite":
|
|
13014
12869
|
case "draw-shape":
|
|
13015
12870
|
case "draw-text":
|
|
12871
|
+
case "draw-group":
|
|
13016
12872
|
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
13017
12873
|
break;
|
|
13018
12874
|
case "draw-sprite-layer":
|
|
@@ -13553,32 +13409,6 @@ var init_Canvas = __esm({
|
|
|
13553
13409
|
Canvas.displayName = "Canvas";
|
|
13554
13410
|
}
|
|
13555
13411
|
});
|
|
13556
|
-
function SvgDrawShapeLayer({
|
|
13557
|
-
items,
|
|
13558
|
-
fill,
|
|
13559
|
-
stroke,
|
|
13560
|
-
strokeWidth,
|
|
13561
|
-
opacity
|
|
13562
|
-
}) {
|
|
13563
|
-
return /* @__PURE__ */ jsx("g", { children: items.map(({ id, ...shape }) => /* @__PURE__ */ jsx(
|
|
13564
|
-
SvgDrawShape,
|
|
13565
|
-
{
|
|
13566
|
-
...shape,
|
|
13567
|
-
fill: shape.fill ?? fill,
|
|
13568
|
-
stroke: shape.stroke ?? stroke,
|
|
13569
|
-
strokeWidth: shape.strokeWidth ?? strokeWidth,
|
|
13570
|
-
opacity: shape.opacity ?? opacity
|
|
13571
|
-
},
|
|
13572
|
-
id
|
|
13573
|
-
)) });
|
|
13574
|
-
}
|
|
13575
|
-
var init_SvgDrawShapeLayer = __esm({
|
|
13576
|
-
"components/game/molecules/SvgDrawShapeLayer.tsx"() {
|
|
13577
|
-
"use client";
|
|
13578
|
-
init_SvgDrawShape();
|
|
13579
|
-
SvgDrawShapeLayer.displayName = "SvgDrawShapeLayer";
|
|
13580
|
-
}
|
|
13581
|
-
});
|
|
13582
13412
|
function GameAudioToggle({
|
|
13583
13413
|
size = "sm",
|
|
13584
13414
|
className,
|
|
@@ -13695,7 +13525,7 @@ function LinearView({
|
|
|
13695
13525
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
13696
13526
|
const isDone = i < currentIdx;
|
|
13697
13527
|
const isCurrent = i === currentIdx;
|
|
13698
|
-
return /* @__PURE__ */ jsxs(
|
|
13528
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
13699
13529
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13700
13530
|
Typography,
|
|
13701
13531
|
{
|
|
@@ -14230,7 +14060,7 @@ function SequenceBar({
|
|
|
14230
14060
|
else onSlotRemove?.(index);
|
|
14231
14061
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
14232
14062
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
14233
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
14063
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
14234
14064
|
i > 0 && /* @__PURE__ */ jsx(
|
|
14235
14065
|
Typography,
|
|
14236
14066
|
{
|
|
@@ -14879,7 +14709,7 @@ var init_ErrorBoundary = __esm({
|
|
|
14879
14709
|
}
|
|
14880
14710
|
);
|
|
14881
14711
|
};
|
|
14882
|
-
ErrorBoundary = class extends
|
|
14712
|
+
ErrorBoundary = class extends React91__default.Component {
|
|
14883
14713
|
constructor(props) {
|
|
14884
14714
|
super(props);
|
|
14885
14715
|
__publicField(this, "reset", () => {
|
|
@@ -15148,7 +14978,7 @@ var init_Container = __esm({
|
|
|
15148
14978
|
as: Component = "div"
|
|
15149
14979
|
}) => {
|
|
15150
14980
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
15151
|
-
return
|
|
14981
|
+
return React91__default.createElement(
|
|
15152
14982
|
Component,
|
|
15153
14983
|
{
|
|
15154
14984
|
className: cn(
|
|
@@ -17286,7 +17116,7 @@ var init_CodeBlock = __esm({
|
|
|
17286
17116
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17287
17117
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17288
17118
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17289
|
-
CodeBlock =
|
|
17119
|
+
CodeBlock = React91__default.memo(
|
|
17290
17120
|
({
|
|
17291
17121
|
code: rawCode,
|
|
17292
17122
|
language = "text",
|
|
@@ -17874,7 +17704,7 @@ var init_MarkdownContent = __esm({
|
|
|
17874
17704
|
init_Box();
|
|
17875
17705
|
init_CodeBlock();
|
|
17876
17706
|
init_cn();
|
|
17877
|
-
MarkdownContent =
|
|
17707
|
+
MarkdownContent = React91__default.memo(
|
|
17878
17708
|
({ content, direction = "ltr", className }) => {
|
|
17879
17709
|
const { t: _t } = useTranslate();
|
|
17880
17710
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19201,7 +19031,7 @@ var init_StateMachineView = __esm({
|
|
|
19201
19031
|
style: { top: title ? 30 : 0 },
|
|
19202
19032
|
children: [
|
|
19203
19033
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19204
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19034
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React91__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19205
19035
|
StateNode2,
|
|
19206
19036
|
{
|
|
19207
19037
|
state,
|
|
@@ -25023,8 +24853,8 @@ var init_Menu = __esm({
|
|
|
25023
24853
|
"bottom-end": "bottom-start"
|
|
25024
24854
|
};
|
|
25025
24855
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25026
|
-
const triggerChild =
|
|
25027
|
-
const triggerElement =
|
|
24856
|
+
const triggerChild = React91__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24857
|
+
const triggerElement = React91__default.cloneElement(
|
|
25028
24858
|
triggerChild,
|
|
25029
24859
|
{
|
|
25030
24860
|
ref: triggerRef,
|
|
@@ -25119,14 +24949,14 @@ function useDataDnd(args) {
|
|
|
25119
24949
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25120
24950
|
const enabled = isZone || Boolean(dndRoot);
|
|
25121
24951
|
const eventBus = useEventBus();
|
|
25122
|
-
const parentRoot =
|
|
24952
|
+
const parentRoot = React91__default.useContext(RootCtx);
|
|
25123
24953
|
const isRoot = enabled && parentRoot === null;
|
|
25124
|
-
const zoneId =
|
|
24954
|
+
const zoneId = React91__default.useId();
|
|
25125
24955
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25126
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25127
|
-
const optimisticOrdersRef =
|
|
24956
|
+
const [optimisticOrders, setOptimisticOrders] = React91__default.useState(() => /* @__PURE__ */ new Map());
|
|
24957
|
+
const optimisticOrdersRef = React91__default.useRef(optimisticOrders);
|
|
25128
24958
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25129
|
-
const clearOptimisticOrder =
|
|
24959
|
+
const clearOptimisticOrder = React91__default.useCallback((group) => {
|
|
25130
24960
|
setOptimisticOrders((prev) => {
|
|
25131
24961
|
if (!prev.has(group)) return prev;
|
|
25132
24962
|
const next = new Map(prev);
|
|
@@ -25151,7 +24981,7 @@ function useDataDnd(args) {
|
|
|
25151
24981
|
const raw = it[dndItemIdField];
|
|
25152
24982
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25153
24983
|
}).join("|");
|
|
25154
|
-
const itemIds =
|
|
24984
|
+
const itemIds = React91__default.useMemo(
|
|
25155
24985
|
() => orderedItems.map((it, idx) => {
|
|
25156
24986
|
const raw = it[dndItemIdField];
|
|
25157
24987
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25162,7 +24992,7 @@ function useDataDnd(args) {
|
|
|
25162
24992
|
const raw = it[dndItemIdField];
|
|
25163
24993
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25164
24994
|
}).join("|");
|
|
25165
|
-
|
|
24995
|
+
React91__default.useEffect(() => {
|
|
25166
24996
|
const root = isRoot ? null : parentRoot;
|
|
25167
24997
|
if (root) {
|
|
25168
24998
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25170,20 +25000,20 @@ function useDataDnd(args) {
|
|
|
25170
25000
|
clearOptimisticOrder(ownGroup);
|
|
25171
25001
|
}
|
|
25172
25002
|
}, [itemsContentSig, ownGroup]);
|
|
25173
|
-
const zonesRef =
|
|
25174
|
-
const registerZone =
|
|
25003
|
+
const zonesRef = React91__default.useRef(/* @__PURE__ */ new Map());
|
|
25004
|
+
const registerZone = React91__default.useCallback((zoneId2, meta2) => {
|
|
25175
25005
|
zonesRef.current.set(zoneId2, meta2);
|
|
25176
25006
|
}, []);
|
|
25177
|
-
const unregisterZone =
|
|
25007
|
+
const unregisterZone = React91__default.useCallback((zoneId2) => {
|
|
25178
25008
|
zonesRef.current.delete(zoneId2);
|
|
25179
25009
|
}, []);
|
|
25180
|
-
const [activeDrag, setActiveDrag] =
|
|
25181
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25182
|
-
const meta =
|
|
25010
|
+
const [activeDrag, setActiveDrag] = React91__default.useState(null);
|
|
25011
|
+
const [overZoneGroup, setOverZoneGroup] = React91__default.useState(null);
|
|
25012
|
+
const meta = React91__default.useMemo(
|
|
25183
25013
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25184
25014
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25185
25015
|
);
|
|
25186
|
-
|
|
25016
|
+
React91__default.useEffect(() => {
|
|
25187
25017
|
const target = isRoot ? null : parentRoot;
|
|
25188
25018
|
if (!target) {
|
|
25189
25019
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25202,7 +25032,7 @@ function useDataDnd(args) {
|
|
|
25202
25032
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25203
25033
|
const sensors = useAlmadarDndSensors(true);
|
|
25204
25034
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25205
|
-
const findZoneByItem =
|
|
25035
|
+
const findZoneByItem = React91__default.useCallback(
|
|
25206
25036
|
(id) => {
|
|
25207
25037
|
for (const z of zonesRef.current.values()) {
|
|
25208
25038
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25211,7 +25041,7 @@ function useDataDnd(args) {
|
|
|
25211
25041
|
},
|
|
25212
25042
|
[]
|
|
25213
25043
|
);
|
|
25214
|
-
|
|
25044
|
+
React91__default.useCallback(
|
|
25215
25045
|
(group) => {
|
|
25216
25046
|
for (const z of zonesRef.current.values()) {
|
|
25217
25047
|
if (z.group === group) return z;
|
|
@@ -25220,7 +25050,7 @@ function useDataDnd(args) {
|
|
|
25220
25050
|
},
|
|
25221
25051
|
[]
|
|
25222
25052
|
);
|
|
25223
|
-
const handleDragEnd =
|
|
25053
|
+
const handleDragEnd = React91__default.useCallback(
|
|
25224
25054
|
(event) => {
|
|
25225
25055
|
const { active, over } = event;
|
|
25226
25056
|
const activeIdStr = String(active.id);
|
|
@@ -25311,8 +25141,8 @@ function useDataDnd(args) {
|
|
|
25311
25141
|
},
|
|
25312
25142
|
[eventBus]
|
|
25313
25143
|
);
|
|
25314
|
-
const sortableData =
|
|
25315
|
-
const SortableItem =
|
|
25144
|
+
const sortableData = React91__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25145
|
+
const SortableItem = React91__default.useCallback(
|
|
25316
25146
|
({ id, children }) => {
|
|
25317
25147
|
const {
|
|
25318
25148
|
attributes,
|
|
@@ -25352,7 +25182,7 @@ function useDataDnd(args) {
|
|
|
25352
25182
|
id: droppableId,
|
|
25353
25183
|
data: sortableData
|
|
25354
25184
|
});
|
|
25355
|
-
const ctx =
|
|
25185
|
+
const ctx = React91__default.useContext(RootCtx);
|
|
25356
25186
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25357
25187
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25358
25188
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25367,7 +25197,7 @@ function useDataDnd(args) {
|
|
|
25367
25197
|
showForeignPlaceholder,
|
|
25368
25198
|
ctxAvailable: ctx != null
|
|
25369
25199
|
});
|
|
25370
|
-
|
|
25200
|
+
React91__default.useEffect(() => {
|
|
25371
25201
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25372
25202
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25373
25203
|
return /* @__PURE__ */ jsx(
|
|
@@ -25381,11 +25211,11 @@ function useDataDnd(args) {
|
|
|
25381
25211
|
}
|
|
25382
25212
|
);
|
|
25383
25213
|
};
|
|
25384
|
-
const rootContextValue =
|
|
25214
|
+
const rootContextValue = React91__default.useMemo(
|
|
25385
25215
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25386
25216
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25387
25217
|
);
|
|
25388
|
-
const handleDragStart =
|
|
25218
|
+
const handleDragStart = React91__default.useCallback((event) => {
|
|
25389
25219
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25390
25220
|
const rect = event.active.rect.current.initial;
|
|
25391
25221
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25404,7 +25234,7 @@ function useDataDnd(args) {
|
|
|
25404
25234
|
isRoot
|
|
25405
25235
|
});
|
|
25406
25236
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25407
|
-
const handleDragOver =
|
|
25237
|
+
const handleDragOver = React91__default.useCallback((event) => {
|
|
25408
25238
|
const { active, over } = event;
|
|
25409
25239
|
const overData = over?.data?.current;
|
|
25410
25240
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25474,7 +25304,7 @@ function useDataDnd(args) {
|
|
|
25474
25304
|
return next;
|
|
25475
25305
|
});
|
|
25476
25306
|
}, []);
|
|
25477
|
-
const handleDragCancel =
|
|
25307
|
+
const handleDragCancel = React91__default.useCallback((event) => {
|
|
25478
25308
|
setActiveDrag(null);
|
|
25479
25309
|
setOverZoneGroup(null);
|
|
25480
25310
|
dndLog.warn("dragCancel", {
|
|
@@ -25482,12 +25312,12 @@ function useDataDnd(args) {
|
|
|
25482
25312
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25483
25313
|
});
|
|
25484
25314
|
}, []);
|
|
25485
|
-
const handleDragEndWithCleanup =
|
|
25315
|
+
const handleDragEndWithCleanup = React91__default.useCallback((event) => {
|
|
25486
25316
|
handleDragEnd(event);
|
|
25487
25317
|
setActiveDrag(null);
|
|
25488
25318
|
setOverZoneGroup(null);
|
|
25489
25319
|
}, [handleDragEnd]);
|
|
25490
|
-
const wrapContainer =
|
|
25320
|
+
const wrapContainer = React91__default.useCallback(
|
|
25491
25321
|
(children) => {
|
|
25492
25322
|
if (!enabled) return children;
|
|
25493
25323
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25541,7 +25371,7 @@ var init_useDataDnd = __esm({
|
|
|
25541
25371
|
init_useAlmadarDndCollision();
|
|
25542
25372
|
init_Box();
|
|
25543
25373
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25544
|
-
RootCtx =
|
|
25374
|
+
RootCtx = React91__default.createContext(null);
|
|
25545
25375
|
}
|
|
25546
25376
|
});
|
|
25547
25377
|
function renderIconInput(icon, props) {
|
|
@@ -26068,6 +25898,8 @@ function DataList({
|
|
|
26068
25898
|
hasMore,
|
|
26069
25899
|
children,
|
|
26070
25900
|
pageSize = 5,
|
|
25901
|
+
sortBy,
|
|
25902
|
+
sortDirection,
|
|
26071
25903
|
renderItem: schemaRenderItem,
|
|
26072
25904
|
dragGroup,
|
|
26073
25905
|
accepts,
|
|
@@ -26081,7 +25913,7 @@ function DataList({
|
|
|
26081
25913
|
}) {
|
|
26082
25914
|
const eventBus = useEventBus();
|
|
26083
25915
|
const { t } = useTranslate();
|
|
26084
|
-
const [visibleCount, setVisibleCount] =
|
|
25916
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize || Infinity);
|
|
26085
25917
|
const fieldDefs = fields ?? columns ?? [];
|
|
26086
25918
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26087
25919
|
const dnd = useDataDnd({
|
|
@@ -26096,11 +25928,15 @@ function DataList({
|
|
|
26096
25928
|
dndItemIdField,
|
|
26097
25929
|
dndRoot
|
|
26098
25930
|
});
|
|
26099
|
-
const
|
|
25931
|
+
const orderedData = dnd.orderedItems;
|
|
25932
|
+
const allData = React91__default.useMemo(
|
|
25933
|
+
() => sortRows(orderedData, sortBy, sortDirection),
|
|
25934
|
+
[orderedData, sortBy, sortDirection]
|
|
25935
|
+
);
|
|
26100
25936
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26101
25937
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26102
25938
|
const hasRenderProp = typeof children === "function";
|
|
26103
|
-
|
|
25939
|
+
React91__default.useEffect(() => {
|
|
26104
25940
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26105
25941
|
const childrenTypeOf = typeof children;
|
|
26106
25942
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26133,7 +25969,7 @@ function DataList({
|
|
|
26133
25969
|
};
|
|
26134
25970
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
26135
25971
|
};
|
|
26136
|
-
const renderItemActions = (itemData) => {
|
|
25972
|
+
const renderItemActions = (itemData, onPrimary = false) => {
|
|
26137
25973
|
if (!itemActions || itemActions.length === 0) return null;
|
|
26138
25974
|
const inline = maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions;
|
|
26139
25975
|
const overflow = maxInlineActions != null ? itemActions.slice(maxInlineActions) : [];
|
|
@@ -26146,7 +25982,12 @@ function DataList({
|
|
|
26146
25982
|
onClick: handleActionClick(action, itemData),
|
|
26147
25983
|
"data-testid": `action-${action.event}`,
|
|
26148
25984
|
"data-row-id": String(itemData.id),
|
|
26149
|
-
className: cn(
|
|
25985
|
+
className: cn(
|
|
25986
|
+
action.variant === "danger" && "text-error hover:bg-error/10",
|
|
25987
|
+
// Must sit on the Button itself: the variant's own text colour
|
|
25988
|
+
// beats an inherited one from the row wrapper.
|
|
25989
|
+
onPrimary && "!text-primary-foreground hover:bg-primary-foreground/15"
|
|
25990
|
+
),
|
|
26150
25991
|
children: [
|
|
26151
25992
|
action.icon && renderIconInput2(action.icon, { size: "xs", className: "mr-1" }),
|
|
26152
25993
|
action.label
|
|
@@ -26210,7 +26051,7 @@ function DataList({
|
|
|
26210
26051
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26211
26052
|
};
|
|
26212
26053
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26213
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26054
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
26214
26055
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26215
26056
|
group.items.map((itemData, index) => {
|
|
26216
26057
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26265,7 +26106,7 @@ function DataList({
|
|
|
26265
26106
|
children: formatDate(timestamp)
|
|
26266
26107
|
}
|
|
26267
26108
|
) : /* @__PURE__ */ jsx("span", {}),
|
|
26268
|
-
renderItemActions(itemData)
|
|
26109
|
+
renderItemActions(itemData, isSent)
|
|
26269
26110
|
] })
|
|
26270
26111
|
]
|
|
26271
26112
|
}
|
|
@@ -26405,7 +26246,7 @@ function DataList({
|
|
|
26405
26246
|
className
|
|
26406
26247
|
),
|
|
26407
26248
|
children: [
|
|
26408
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26249
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
26409
26250
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26410
26251
|
group.items.map(
|
|
26411
26252
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26492,7 +26333,7 @@ var init_FormSection = __esm({
|
|
|
26492
26333
|
columns = 1,
|
|
26493
26334
|
className
|
|
26494
26335
|
}) => {
|
|
26495
|
-
const [collapsed, setCollapsed] =
|
|
26336
|
+
const [collapsed, setCollapsed] = React91__default.useState(defaultCollapsed);
|
|
26496
26337
|
const { t } = useTranslate();
|
|
26497
26338
|
const eventBus = useEventBus();
|
|
26498
26339
|
const gridClass = {
|
|
@@ -26500,7 +26341,7 @@ var init_FormSection = __esm({
|
|
|
26500
26341
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26501
26342
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26502
26343
|
}[columns];
|
|
26503
|
-
|
|
26344
|
+
React91__default.useCallback(() => {
|
|
26504
26345
|
if (collapsible) {
|
|
26505
26346
|
setCollapsed((prev) => !prev);
|
|
26506
26347
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27369,7 +27210,7 @@ var init_Flex = __esm({
|
|
|
27369
27210
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
27370
27211
|
}
|
|
27371
27212
|
}
|
|
27372
|
-
return
|
|
27213
|
+
return React91__default.createElement(Component, {
|
|
27373
27214
|
className: cn(
|
|
27374
27215
|
inline ? "inline-flex" : "flex",
|
|
27375
27216
|
directionStyles[direction],
|
|
@@ -27488,7 +27329,7 @@ var init_Grid = __esm({
|
|
|
27488
27329
|
as: Component = "div"
|
|
27489
27330
|
}) => {
|
|
27490
27331
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
27491
|
-
return
|
|
27332
|
+
return React91__default.createElement(
|
|
27492
27333
|
Component,
|
|
27493
27334
|
{
|
|
27494
27335
|
className: cn(
|
|
@@ -27696,9 +27537,9 @@ var init_Popover = __esm({
|
|
|
27696
27537
|
onMouseLeave: handleClose,
|
|
27697
27538
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
27698
27539
|
};
|
|
27699
|
-
const childElement =
|
|
27540
|
+
const childElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27700
27541
|
const childPointerDown = childElement.props.onPointerDown;
|
|
27701
|
-
const triggerElement =
|
|
27542
|
+
const triggerElement = React91__default.cloneElement(
|
|
27702
27543
|
childElement,
|
|
27703
27544
|
{
|
|
27704
27545
|
ref: triggerRef,
|
|
@@ -28307,9 +28148,9 @@ var init_Tooltip = __esm({
|
|
|
28307
28148
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28308
28149
|
};
|
|
28309
28150
|
}, []);
|
|
28310
|
-
const triggerElement =
|
|
28151
|
+
const triggerElement = React91__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28311
28152
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
28312
|
-
const trigger =
|
|
28153
|
+
const trigger = React91__default.cloneElement(triggerElement, {
|
|
28313
28154
|
ref: triggerRef,
|
|
28314
28155
|
onMouseEnter: handleMouseEnter,
|
|
28315
28156
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28399,7 +28240,7 @@ var init_WizardProgress = __esm({
|
|
|
28399
28240
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28400
28241
|
const isActive = index === currentStep;
|
|
28401
28242
|
const isCompleted = index < currentStep;
|
|
28402
|
-
return /* @__PURE__ */ jsxs(
|
|
28243
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
28403
28244
|
/* @__PURE__ */ jsx(
|
|
28404
28245
|
"button",
|
|
28405
28246
|
{
|
|
@@ -29960,13 +29801,13 @@ var init_MapView = __esm({
|
|
|
29960
29801
|
shadowSize: [41, 41]
|
|
29961
29802
|
});
|
|
29962
29803
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29963
|
-
const { useEffect:
|
|
29804
|
+
const { useEffect: useEffect63, useRef: useRef62, useCallback: useCallback94, useState: useState97 } = React91__default;
|
|
29964
29805
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29965
29806
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29966
29807
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
29967
29808
|
const map = useMap();
|
|
29968
|
-
const prevRef =
|
|
29969
|
-
|
|
29809
|
+
const prevRef = useRef62({ centerLat, centerLng, zoom });
|
|
29810
|
+
useEffect63(() => {
|
|
29970
29811
|
const prev = prevRef.current;
|
|
29971
29812
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
29972
29813
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -29977,7 +29818,7 @@ var init_MapView = __esm({
|
|
|
29977
29818
|
}
|
|
29978
29819
|
function MapClickHandler({ onMapClick }) {
|
|
29979
29820
|
const map = useMap();
|
|
29980
|
-
|
|
29821
|
+
useEffect63(() => {
|
|
29981
29822
|
if (!onMapClick) return;
|
|
29982
29823
|
const handler = (e) => {
|
|
29983
29824
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30006,7 +29847,7 @@ var init_MapView = __esm({
|
|
|
30006
29847
|
}) {
|
|
30007
29848
|
const eventBus = useEventBus2();
|
|
30008
29849
|
const [clickedPosition, setClickedPosition] = useState97(null);
|
|
30009
|
-
const handleMapClick =
|
|
29850
|
+
const handleMapClick = useCallback94((lat, lng) => {
|
|
30010
29851
|
if (showClickedPin) {
|
|
30011
29852
|
setClickedPosition({ lat, lng });
|
|
30012
29853
|
}
|
|
@@ -30015,7 +29856,7 @@ var init_MapView = __esm({
|
|
|
30015
29856
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30016
29857
|
}
|
|
30017
29858
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30018
|
-
const handleMarkerClick =
|
|
29859
|
+
const handleMarkerClick = useCallback94((marker) => {
|
|
30019
29860
|
onMarkerClick?.(marker);
|
|
30020
29861
|
if (markerClickEvent) {
|
|
30021
29862
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -30877,8 +30718,8 @@ function TableView({
|
|
|
30877
30718
|
}) {
|
|
30878
30719
|
const eventBus = useEventBus();
|
|
30879
30720
|
const { t } = useTranslate();
|
|
30880
|
-
const [visibleCount, setVisibleCount] =
|
|
30881
|
-
const [localSelected, setLocalSelected] =
|
|
30721
|
+
const [visibleCount, setVisibleCount] = React91__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
30722
|
+
const [localSelected, setLocalSelected] = React91__default.useState(/* @__PURE__ */ new Set());
|
|
30882
30723
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
30883
30724
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
30884
30725
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -30900,7 +30741,7 @@ function TableView({
|
|
|
30900
30741
|
const hasRenderProp = typeof children === "function";
|
|
30901
30742
|
const idField = dndItemIdField ?? "id";
|
|
30902
30743
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
30903
|
-
|
|
30744
|
+
React91__default.useEffect(() => {
|
|
30904
30745
|
tableViewLog.debug("render", {
|
|
30905
30746
|
rowCount: data.length,
|
|
30906
30747
|
colCount: colDefs.length,
|
|
@@ -30949,7 +30790,7 @@ function TableView({
|
|
|
30949
30790
|
};
|
|
30950
30791
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
30951
30792
|
};
|
|
30952
|
-
const colFloors =
|
|
30793
|
+
const colFloors = React91__default.useMemo(
|
|
30953
30794
|
() => colDefs.map((col) => {
|
|
30954
30795
|
const longest = data.reduce((widest, row) => {
|
|
30955
30796
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -31108,12 +30949,12 @@ function TableView({
|
|
|
31108
30949
|
]
|
|
31109
30950
|
}
|
|
31110
30951
|
);
|
|
31111
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30952
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React91__default.Fragment, { children: rowInner }, id);
|
|
31112
30953
|
};
|
|
31113
30954
|
const items = Array.from(data);
|
|
31114
30955
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31115
30956
|
let runningIndex = 0;
|
|
31116
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30957
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
31117
30958
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31118
30959
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31119
30960
|
] }, gi)) });
|
|
@@ -32476,7 +32317,7 @@ var init_StepFlow = __esm({
|
|
|
32476
32317
|
className
|
|
32477
32318
|
}) => {
|
|
32478
32319
|
if (orientation === "vertical") {
|
|
32479
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
32320
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React91__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32480
32321
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32481
32322
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32482
32323
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32487,7 +32328,7 @@ var init_StepFlow = __esm({
|
|
|
32487
32328
|
] })
|
|
32488
32329
|
] }) }, index)) });
|
|
32489
32330
|
}
|
|
32490
|
-
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(
|
|
32331
|
+
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(React91__default.Fragment, { children: [
|
|
32491
32332
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32492
32333
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32493
32334
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33477,7 +33318,7 @@ var init_LikertScale = __esm({
|
|
|
33477
33318
|
md: "text-base",
|
|
33478
33319
|
lg: "text-lg"
|
|
33479
33320
|
};
|
|
33480
|
-
LikertScale =
|
|
33321
|
+
LikertScale = React91__default.forwardRef(
|
|
33481
33322
|
({
|
|
33482
33323
|
question,
|
|
33483
33324
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33489,7 +33330,7 @@ var init_LikertScale = __esm({
|
|
|
33489
33330
|
variant = "radios",
|
|
33490
33331
|
className
|
|
33491
33332
|
}, ref) => {
|
|
33492
|
-
const groupId =
|
|
33333
|
+
const groupId = React91__default.useId();
|
|
33493
33334
|
const eventBus = useEventBus();
|
|
33494
33335
|
const handleSelect = useCallback(
|
|
33495
33336
|
(next) => {
|
|
@@ -35778,7 +35619,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
35778
35619
|
"aria-label": t("aria.breadcrumb"),
|
|
35779
35620
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
35780
35621
|
const isLast = idx === items.length - 1;
|
|
35781
|
-
return /* @__PURE__ */ jsxs(
|
|
35622
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
35782
35623
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35783
35624
|
Icon,
|
|
35784
35625
|
{
|
|
@@ -36442,7 +36283,7 @@ var init_PageHeader = __esm({
|
|
|
36442
36283
|
info: "bg-info/10 text-info"
|
|
36443
36284
|
};
|
|
36444
36285
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
36445
|
-
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(
|
|
36286
|
+
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(React91__default.Fragment, { children: [
|
|
36446
36287
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
36447
36288
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
36448
36289
|
"a",
|
|
@@ -36800,7 +36641,7 @@ var init_Section = __esm({
|
|
|
36800
36641
|
as: Component = "section"
|
|
36801
36642
|
}) => {
|
|
36802
36643
|
const hasHeader = title || description || action;
|
|
36803
|
-
return
|
|
36644
|
+
return React91__default.createElement(
|
|
36804
36645
|
Component,
|
|
36805
36646
|
{
|
|
36806
36647
|
className: cn(
|
|
@@ -37174,7 +37015,7 @@ var init_WizardContainer = __esm({
|
|
|
37174
37015
|
const isCompleted = index < currentStep;
|
|
37175
37016
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37176
37017
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37177
|
-
return /* @__PURE__ */ jsxs(
|
|
37018
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
37178
37019
|
/* @__PURE__ */ jsx(
|
|
37179
37020
|
Button,
|
|
37180
37021
|
{
|
|
@@ -38961,7 +38802,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
38961
38802
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
38962
38803
|
const summary = fieldSummary(unit);
|
|
38963
38804
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
38964
|
-
return /* @__PURE__ */ jsxs(
|
|
38805
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
38965
38806
|
/* @__PURE__ */ jsxs(
|
|
38966
38807
|
Box,
|
|
38967
38808
|
{
|
|
@@ -39058,7 +38899,7 @@ var init_ImportProgress = __esm({
|
|
|
39058
38899
|
PIPELINE.map((key, index) => {
|
|
39059
38900
|
const isComplete = index < currentIndex;
|
|
39060
38901
|
const isActive = index === currentIndex;
|
|
39061
|
-
return /* @__PURE__ */ jsxs(
|
|
38902
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
39062
38903
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
39063
38904
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
39064
38905
|
/* @__PURE__ */ jsx(
|
|
@@ -40160,8 +40001,18 @@ var init_DetailPanel = __esm({
|
|
|
40160
40001
|
DetailPanel.displayName = "DetailPanel";
|
|
40161
40002
|
}
|
|
40162
40003
|
});
|
|
40004
|
+
|
|
40005
|
+
// components/game/atoms/DrawGroup.tsx
|
|
40006
|
+
function DrawGroup(_props) {
|
|
40007
|
+
return null;
|
|
40008
|
+
}
|
|
40009
|
+
var init_DrawGroup = __esm({
|
|
40010
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
40011
|
+
"use client";
|
|
40012
|
+
}
|
|
40013
|
+
});
|
|
40163
40014
|
function extractTitle(children) {
|
|
40164
|
-
if (!
|
|
40015
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
40165
40016
|
const props = children.props;
|
|
40166
40017
|
if (typeof props.title === "string") {
|
|
40167
40018
|
return props.title;
|
|
@@ -40511,12 +40362,12 @@ var init_Form = __esm({
|
|
|
40511
40362
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
40512
40363
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
40513
40364
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
40514
|
-
const normalizedInitialData =
|
|
40365
|
+
const normalizedInitialData = React91__default.useMemo(() => {
|
|
40515
40366
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
40516
40367
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
40517
40368
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
40518
40369
|
}, [entity, initialData]);
|
|
40519
|
-
const entityDerivedFields =
|
|
40370
|
+
const entityDerivedFields = React91__default.useMemo(() => {
|
|
40520
40371
|
if (fields && fields.length > 0) return void 0;
|
|
40521
40372
|
if (!resolvedEntity) return void 0;
|
|
40522
40373
|
return resolvedEntity.fields.map(
|
|
@@ -40537,16 +40388,16 @@ var init_Form = __esm({
|
|
|
40537
40388
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
40538
40389
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
40539
40390
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
40540
|
-
const [formData, setFormData] =
|
|
40391
|
+
const [formData, setFormData] = React91__default.useState(
|
|
40541
40392
|
normalizedInitialData
|
|
40542
40393
|
);
|
|
40543
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40394
|
+
const [collapsedSections, setCollapsedSections] = React91__default.useState(
|
|
40544
40395
|
/* @__PURE__ */ new Set()
|
|
40545
40396
|
);
|
|
40546
|
-
const [submitError, setSubmitError] =
|
|
40547
|
-
const formRef =
|
|
40397
|
+
const [submitError, setSubmitError] = React91__default.useState(null);
|
|
40398
|
+
const formRef = React91__default.useRef(null);
|
|
40548
40399
|
const formMode = props.mode;
|
|
40549
|
-
const mountedRef =
|
|
40400
|
+
const mountedRef = React91__default.useRef(false);
|
|
40550
40401
|
if (!mountedRef.current) {
|
|
40551
40402
|
mountedRef.current = true;
|
|
40552
40403
|
debug("forms", "mount", {
|
|
@@ -40559,7 +40410,7 @@ var init_Form = __esm({
|
|
|
40559
40410
|
});
|
|
40560
40411
|
}
|
|
40561
40412
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40562
|
-
const evalContext =
|
|
40413
|
+
const evalContext = React91__default.useMemo(
|
|
40563
40414
|
() => ({
|
|
40564
40415
|
formValues: formData,
|
|
40565
40416
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40568,7 +40419,7 @@ var init_Form = __esm({
|
|
|
40568
40419
|
}),
|
|
40569
40420
|
[formData, externalContext]
|
|
40570
40421
|
);
|
|
40571
|
-
|
|
40422
|
+
React91__default.useEffect(() => {
|
|
40572
40423
|
debug("forms", "initialData-sync", {
|
|
40573
40424
|
mode: formMode,
|
|
40574
40425
|
normalizedInitialData,
|
|
@@ -40579,7 +40430,7 @@ var init_Form = __esm({
|
|
|
40579
40430
|
setFormData(normalizedInitialData);
|
|
40580
40431
|
}
|
|
40581
40432
|
}, [normalizedInitialData]);
|
|
40582
|
-
const processCalculations =
|
|
40433
|
+
const processCalculations = React91__default.useCallback(
|
|
40583
40434
|
(changedFieldId, newFormData) => {
|
|
40584
40435
|
if (!hiddenCalculations.length) return;
|
|
40585
40436
|
const context = {
|
|
@@ -40604,7 +40455,7 @@ var init_Form = __esm({
|
|
|
40604
40455
|
},
|
|
40605
40456
|
[hiddenCalculations, externalContext, eventBus]
|
|
40606
40457
|
);
|
|
40607
|
-
const checkViolations =
|
|
40458
|
+
const checkViolations = React91__default.useCallback(
|
|
40608
40459
|
(changedFieldId, newFormData) => {
|
|
40609
40460
|
if (!violationTriggers.length) return;
|
|
40610
40461
|
const context = {
|
|
@@ -40642,7 +40493,7 @@ var init_Form = __esm({
|
|
|
40642
40493
|
processCalculations(name, newFormData);
|
|
40643
40494
|
checkViolations(name, newFormData);
|
|
40644
40495
|
};
|
|
40645
|
-
const isFieldVisible =
|
|
40496
|
+
const isFieldVisible = React91__default.useCallback(
|
|
40646
40497
|
(fieldName) => {
|
|
40647
40498
|
const condition = conditionalFields[fieldName];
|
|
40648
40499
|
if (!condition) return true;
|
|
@@ -40650,7 +40501,7 @@ var init_Form = __esm({
|
|
|
40650
40501
|
},
|
|
40651
40502
|
[conditionalFields, evalContext]
|
|
40652
40503
|
);
|
|
40653
|
-
const isSectionVisible =
|
|
40504
|
+
const isSectionVisible = React91__default.useCallback(
|
|
40654
40505
|
(section) => {
|
|
40655
40506
|
if (!section.condition) return true;
|
|
40656
40507
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -40726,7 +40577,7 @@ var init_Form = __esm({
|
|
|
40726
40577
|
eventBus.emit(`UI:${onCancel}`);
|
|
40727
40578
|
}
|
|
40728
40579
|
};
|
|
40729
|
-
const renderField =
|
|
40580
|
+
const renderField = React91__default.useCallback(
|
|
40730
40581
|
(field) => {
|
|
40731
40582
|
const fieldName = field.name || field.field;
|
|
40732
40583
|
if (!fieldName) return null;
|
|
@@ -40747,7 +40598,7 @@ var init_Form = __esm({
|
|
|
40747
40598
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
40748
40599
|
);
|
|
40749
40600
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
40750
|
-
const normalizedFields =
|
|
40601
|
+
const normalizedFields = React91__default.useMemo(() => {
|
|
40751
40602
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
40752
40603
|
return effectiveFields.map((field) => {
|
|
40753
40604
|
if (typeof field === "string") {
|
|
@@ -40771,7 +40622,7 @@ var init_Form = __esm({
|
|
|
40771
40622
|
return field;
|
|
40772
40623
|
});
|
|
40773
40624
|
}, [effectiveFields, resolvedEntity]);
|
|
40774
|
-
const schemaFields =
|
|
40625
|
+
const schemaFields = React91__default.useMemo(() => {
|
|
40775
40626
|
if (normalizedFields.length === 0) return null;
|
|
40776
40627
|
if (isDebugEnabled()) {
|
|
40777
40628
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -40781,7 +40632,7 @@ var init_Form = __esm({
|
|
|
40781
40632
|
}
|
|
40782
40633
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
40783
40634
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
40784
|
-
const sectionElements =
|
|
40635
|
+
const sectionElements = React91__default.useMemo(() => {
|
|
40785
40636
|
if (!sections || sections.length === 0) return null;
|
|
40786
40637
|
return sections.map((section) => {
|
|
40787
40638
|
if (!isSectionVisible(section)) {
|
|
@@ -41507,7 +41358,7 @@ var init_List = __esm({
|
|
|
41507
41358
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41508
41359
|
return [];
|
|
41509
41360
|
}, [entity]);
|
|
41510
|
-
const getItemActions =
|
|
41361
|
+
const getItemActions = React91__default.useCallback(
|
|
41511
41362
|
(item) => {
|
|
41512
41363
|
if (!itemActions) return [];
|
|
41513
41364
|
if (typeof itemActions === "function") {
|
|
@@ -41988,7 +41839,7 @@ var init_MediaGallery = __esm({
|
|
|
41988
41839
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
41989
41840
|
);
|
|
41990
41841
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
41991
|
-
const items =
|
|
41842
|
+
const items = React91__default.useMemo(() => {
|
|
41992
41843
|
if (propItems && propItems.length > 0) return propItems;
|
|
41993
41844
|
if (entityData.length === 0) return [];
|
|
41994
41845
|
return entityData.map((record, idx) => {
|
|
@@ -42153,7 +42004,7 @@ var init_MediaGallery = __esm({
|
|
|
42153
42004
|
}
|
|
42154
42005
|
});
|
|
42155
42006
|
function extractTitle2(children) {
|
|
42156
|
-
if (!
|
|
42007
|
+
if (!React91__default.isValidElement(children)) return void 0;
|
|
42157
42008
|
const props = children.props;
|
|
42158
42009
|
if (typeof props.title === "string") {
|
|
42159
42010
|
return props.title;
|
|
@@ -42427,7 +42278,7 @@ var init_debugRegistry = __esm({
|
|
|
42427
42278
|
}
|
|
42428
42279
|
});
|
|
42429
42280
|
function useDebugData() {
|
|
42430
|
-
const [data, setData] =
|
|
42281
|
+
const [data, setData] = React91.useState(() => ({
|
|
42431
42282
|
traits: [],
|
|
42432
42283
|
ticks: [],
|
|
42433
42284
|
guards: [],
|
|
@@ -42441,7 +42292,7 @@ function useDebugData() {
|
|
|
42441
42292
|
},
|
|
42442
42293
|
lastUpdate: Date.now()
|
|
42443
42294
|
}));
|
|
42444
|
-
|
|
42295
|
+
React91.useEffect(() => {
|
|
42445
42296
|
const updateData = () => {
|
|
42446
42297
|
setData({
|
|
42447
42298
|
traits: getAllTraits(),
|
|
@@ -42550,12 +42401,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42550
42401
|
return positions;
|
|
42551
42402
|
}
|
|
42552
42403
|
function WalkMinimap() {
|
|
42553
|
-
const [walkStep, setWalkStep] =
|
|
42554
|
-
const [traits2, setTraits] =
|
|
42555
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42556
|
-
const [completedTraits, setCompletedTraits] =
|
|
42557
|
-
const prevTraitRef =
|
|
42558
|
-
|
|
42404
|
+
const [walkStep, setWalkStep] = React91.useState(null);
|
|
42405
|
+
const [traits2, setTraits] = React91.useState([]);
|
|
42406
|
+
const [coveredEdges, setCoveredEdges] = React91.useState([]);
|
|
42407
|
+
const [completedTraits, setCompletedTraits] = React91.useState(/* @__PURE__ */ new Set());
|
|
42408
|
+
const prevTraitRef = React91.useRef(null);
|
|
42409
|
+
React91.useEffect(() => {
|
|
42559
42410
|
const interval = setInterval(() => {
|
|
42560
42411
|
const w = window;
|
|
42561
42412
|
const step = w.__orbitalWalkStep;
|
|
@@ -42991,15 +42842,15 @@ var init_EntitiesTab = __esm({
|
|
|
42991
42842
|
});
|
|
42992
42843
|
function EventFlowTab({ events: events2 }) {
|
|
42993
42844
|
const { t } = useTranslate();
|
|
42994
|
-
const [filter, setFilter] =
|
|
42995
|
-
const containerRef =
|
|
42996
|
-
const [autoScroll, setAutoScroll] =
|
|
42997
|
-
|
|
42845
|
+
const [filter, setFilter] = React91.useState("all");
|
|
42846
|
+
const containerRef = React91.useRef(null);
|
|
42847
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
42848
|
+
React91.useEffect(() => {
|
|
42998
42849
|
if (autoScroll && containerRef.current) {
|
|
42999
42850
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43000
42851
|
}
|
|
43001
42852
|
}, [events2.length, autoScroll]);
|
|
43002
|
-
const filteredEvents =
|
|
42853
|
+
const filteredEvents = React91.useMemo(() => {
|
|
43003
42854
|
if (filter === "all") return events2;
|
|
43004
42855
|
return events2.filter((e) => e.type === filter);
|
|
43005
42856
|
}, [events2, filter]);
|
|
@@ -43115,7 +42966,7 @@ var init_EventFlowTab = __esm({
|
|
|
43115
42966
|
});
|
|
43116
42967
|
function GuardsPanel({ guards }) {
|
|
43117
42968
|
const { t } = useTranslate();
|
|
43118
|
-
const [filter, setFilter] =
|
|
42969
|
+
const [filter, setFilter] = React91.useState("all");
|
|
43119
42970
|
if (guards.length === 0) {
|
|
43120
42971
|
return /* @__PURE__ */ jsx(
|
|
43121
42972
|
EmptyState,
|
|
@@ -43128,7 +42979,7 @@ function GuardsPanel({ guards }) {
|
|
|
43128
42979
|
}
|
|
43129
42980
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43130
42981
|
const failedCount = guards.length - passedCount;
|
|
43131
|
-
const filteredGuards =
|
|
42982
|
+
const filteredGuards = React91.useMemo(() => {
|
|
43132
42983
|
if (filter === "all") return guards;
|
|
43133
42984
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43134
42985
|
return guards.filter((g) => !g.result);
|
|
@@ -43291,10 +43142,10 @@ function EffectBadge({ effect }) {
|
|
|
43291
43142
|
}
|
|
43292
43143
|
function TransitionTimeline({ transitions }) {
|
|
43293
43144
|
const { t } = useTranslate();
|
|
43294
|
-
const containerRef =
|
|
43295
|
-
const [autoScroll, setAutoScroll] =
|
|
43296
|
-
const [expandedId, setExpandedId] =
|
|
43297
|
-
|
|
43145
|
+
const containerRef = React91.useRef(null);
|
|
43146
|
+
const [autoScroll, setAutoScroll] = React91.useState(true);
|
|
43147
|
+
const [expandedId, setExpandedId] = React91.useState(null);
|
|
43148
|
+
React91.useEffect(() => {
|
|
43298
43149
|
if (autoScroll && containerRef.current) {
|
|
43299
43150
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43300
43151
|
}
|
|
@@ -43574,9 +43425,9 @@ function getAllEvents(traits2) {
|
|
|
43574
43425
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43575
43426
|
const eventBus = useEventBus();
|
|
43576
43427
|
const { t } = useTranslate();
|
|
43577
|
-
const [log11, setLog] =
|
|
43578
|
-
const prevStatesRef =
|
|
43579
|
-
|
|
43428
|
+
const [log11, setLog] = React91.useState([]);
|
|
43429
|
+
const prevStatesRef = React91.useRef(/* @__PURE__ */ new Map());
|
|
43430
|
+
React91.useEffect(() => {
|
|
43580
43431
|
for (const trait of traits2) {
|
|
43581
43432
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43582
43433
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43745,10 +43596,10 @@ function VerifyModePanel({
|
|
|
43745
43596
|
localCount
|
|
43746
43597
|
}) {
|
|
43747
43598
|
const { t } = useTranslate();
|
|
43748
|
-
const [expanded, setExpanded] =
|
|
43749
|
-
const scrollRef =
|
|
43750
|
-
const prevCountRef =
|
|
43751
|
-
|
|
43599
|
+
const [expanded, setExpanded] = React91.useState(true);
|
|
43600
|
+
const scrollRef = React91.useRef(null);
|
|
43601
|
+
const prevCountRef = React91.useRef(0);
|
|
43602
|
+
React91.useEffect(() => {
|
|
43752
43603
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43753
43604
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43754
43605
|
}
|
|
@@ -43805,10 +43656,10 @@ function RuntimeDebugger({
|
|
|
43805
43656
|
schema
|
|
43806
43657
|
}) {
|
|
43807
43658
|
const { t } = useTranslate();
|
|
43808
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43809
|
-
const [isVisible, setIsVisible] =
|
|
43659
|
+
const [isCollapsed, setIsCollapsed] = React91.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43660
|
+
const [isVisible, setIsVisible] = React91.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43810
43661
|
const debugData = useDebugData();
|
|
43811
|
-
|
|
43662
|
+
React91.useEffect(() => {
|
|
43812
43663
|
if (mode === "inline") return;
|
|
43813
43664
|
return onDebugToggle((enabled) => {
|
|
43814
43665
|
setIsVisible(enabled);
|
|
@@ -43817,7 +43668,7 @@ function RuntimeDebugger({
|
|
|
43817
43668
|
}
|
|
43818
43669
|
});
|
|
43819
43670
|
}, [mode]);
|
|
43820
|
-
|
|
43671
|
+
React91.useEffect(() => {
|
|
43821
43672
|
if (mode === "inline") return;
|
|
43822
43673
|
const handleKeyDown = (e) => {
|
|
43823
43674
|
if (e.key === "`" && isVisible) {
|
|
@@ -44337,7 +44188,7 @@ var init_StatCard = __esm({
|
|
|
44337
44188
|
const labelToUse = propLabel ?? propTitle;
|
|
44338
44189
|
const eventBus = useEventBus();
|
|
44339
44190
|
const { t } = useTranslate();
|
|
44340
|
-
const handleActionClick =
|
|
44191
|
+
const handleActionClick = React91__default.useCallback(() => {
|
|
44341
44192
|
if (action?.event) {
|
|
44342
44193
|
eventBus.emit(`UI:${action.event}`, {});
|
|
44343
44194
|
}
|
|
@@ -44348,7 +44199,7 @@ var init_StatCard = __esm({
|
|
|
44348
44199
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
44349
44200
|
const isLoading = externalLoading ?? false;
|
|
44350
44201
|
const error = externalError;
|
|
44351
|
-
const computeMetricValue =
|
|
44202
|
+
const computeMetricValue = React91__default.useCallback(
|
|
44352
44203
|
(metric, items) => {
|
|
44353
44204
|
if (metric.value !== void 0) {
|
|
44354
44205
|
return metric.value;
|
|
@@ -44387,7 +44238,7 @@ var init_StatCard = __esm({
|
|
|
44387
44238
|
},
|
|
44388
44239
|
[]
|
|
44389
44240
|
);
|
|
44390
|
-
const schemaStats =
|
|
44241
|
+
const schemaStats = React91__default.useMemo(() => {
|
|
44391
44242
|
if (!metrics || metrics.length === 0) return null;
|
|
44392
44243
|
return metrics.map((metric) => ({
|
|
44393
44244
|
label: metric.label,
|
|
@@ -44395,7 +44246,7 @@ var init_StatCard = __esm({
|
|
|
44395
44246
|
format: metric.format
|
|
44396
44247
|
}));
|
|
44397
44248
|
}, [metrics, data, computeMetricValue]);
|
|
44398
|
-
const calculatedTrend =
|
|
44249
|
+
const calculatedTrend = React91__default.useMemo(() => {
|
|
44399
44250
|
if (manualTrend !== void 0) return manualTrend;
|
|
44400
44251
|
if (previousValue === void 0 || currentValue === void 0)
|
|
44401
44252
|
return void 0;
|
|
@@ -45035,8 +44886,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45035
44886
|
] });
|
|
45036
44887
|
};
|
|
45037
44888
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
45038
|
-
const endRef =
|
|
45039
|
-
|
|
44889
|
+
const endRef = React91__default.useRef(null);
|
|
44890
|
+
React91__default.useEffect(() => {
|
|
45040
44891
|
if (!autoScroll) return;
|
|
45041
44892
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45042
44893
|
}, [activities.length, autoScroll]);
|
|
@@ -45130,7 +44981,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
45130
44981
|
};
|
|
45131
44982
|
SubagentRichCard = ({ subagent }) => {
|
|
45132
44983
|
const { t } = useTranslate();
|
|
45133
|
-
const activities =
|
|
44984
|
+
const activities = React91__default.useMemo(
|
|
45134
44985
|
() => subagentMessagesToActivities(subagent.messages),
|
|
45135
44986
|
[subagent.messages]
|
|
45136
44987
|
);
|
|
@@ -45207,8 +45058,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45207
45058
|
] });
|
|
45208
45059
|
};
|
|
45209
45060
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
45210
|
-
const endRef =
|
|
45211
|
-
|
|
45061
|
+
const endRef = React91__default.useRef(null);
|
|
45062
|
+
React91__default.useEffect(() => {
|
|
45212
45063
|
if (!autoScroll) return;
|
|
45213
45064
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45214
45065
|
}, [messages.length, autoScroll]);
|
|
@@ -45643,7 +45494,7 @@ var init_Timeline = __esm({
|
|
|
45643
45494
|
}) => {
|
|
45644
45495
|
const { t } = useTranslate();
|
|
45645
45496
|
const entityData = entity ?? [];
|
|
45646
|
-
const items =
|
|
45497
|
+
const items = React91__default.useMemo(() => {
|
|
45647
45498
|
if (propItems) return propItems;
|
|
45648
45499
|
if (entityData.length === 0) return [];
|
|
45649
45500
|
return entityData.map((record, idx) => {
|
|
@@ -45745,7 +45596,7 @@ var init_Timeline = __esm({
|
|
|
45745
45596
|
}
|
|
45746
45597
|
});
|
|
45747
45598
|
function extractToastProps(children) {
|
|
45748
|
-
if (!
|
|
45599
|
+
if (!React91__default.isValidElement(children)) {
|
|
45749
45600
|
if (typeof children === "string") {
|
|
45750
45601
|
return { message: children };
|
|
45751
45602
|
}
|
|
@@ -45787,7 +45638,7 @@ var init_ToastSlot = __esm({
|
|
|
45787
45638
|
eventBus.emit(`${prefix}CLOSE`);
|
|
45788
45639
|
};
|
|
45789
45640
|
if (!isVisible) return null;
|
|
45790
|
-
const isCustomContent =
|
|
45641
|
+
const isCustomContent = React91__default.isValidElement(children) && !message;
|
|
45791
45642
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
45792
45643
|
Toast,
|
|
45793
45644
|
{
|
|
@@ -45882,6 +45733,7 @@ var init_component_registry_generated = __esm({
|
|
|
45882
45733
|
init_DocSidebar();
|
|
45883
45734
|
init_DocTOC();
|
|
45884
45735
|
init_DocumentViewer();
|
|
45736
|
+
init_DrawGroup();
|
|
45885
45737
|
init_DrawShape();
|
|
45886
45738
|
init_DrawShapeLayer();
|
|
45887
45739
|
init_DrawSprite();
|
|
@@ -46025,10 +45877,6 @@ var init_component_registry_generated = __esm({
|
|
|
46025
45877
|
init_SubagentTracePanel();
|
|
46026
45878
|
init_SvgBranch();
|
|
46027
45879
|
init_SvgConnection();
|
|
46028
|
-
init_SvgDrawGroup();
|
|
46029
|
-
init_SvgDrawShape();
|
|
46030
|
-
init_SvgDrawShapeLayer();
|
|
46031
|
-
init_SvgDrawText();
|
|
46032
45880
|
init_SvgFlow();
|
|
46033
45881
|
init_SvgGrid();
|
|
46034
45882
|
init_SvgLobe();
|
|
@@ -46039,7 +45887,6 @@ var init_component_registry_generated = __esm({
|
|
|
46039
45887
|
init_SvgRing();
|
|
46040
45888
|
init_SvgShield();
|
|
46041
45889
|
init_SvgStack();
|
|
46042
|
-
init_SvgStage();
|
|
46043
45890
|
init_SwipeableRow();
|
|
46044
45891
|
init_Switch();
|
|
46045
45892
|
init_TabbedContainer();
|
|
@@ -46153,6 +46000,7 @@ var init_component_registry_generated = __esm({
|
|
|
46153
46000
|
"DocSidebar": DocSidebar,
|
|
46154
46001
|
"DocTOC": DocTOC,
|
|
46155
46002
|
"DocumentViewer": DocumentViewer,
|
|
46003
|
+
"DrawGroup": DrawGroup,
|
|
46156
46004
|
"DrawShape": DrawShape,
|
|
46157
46005
|
"DrawShapeLayer": DrawShapeLayer,
|
|
46158
46006
|
"DrawSprite": DrawSprite,
|
|
@@ -46301,10 +46149,6 @@ var init_component_registry_generated = __esm({
|
|
|
46301
46149
|
"SubagentTracePanel": SubagentTracePanel,
|
|
46302
46150
|
"SvgBranch": SvgBranch,
|
|
46303
46151
|
"SvgConnection": SvgConnection,
|
|
46304
|
-
"SvgDrawGroup": SvgDrawGroup,
|
|
46305
|
-
"SvgDrawShape": SvgDrawShape,
|
|
46306
|
-
"SvgDrawShapeLayer": SvgDrawShapeLayer,
|
|
46307
|
-
"SvgDrawText": SvgDrawText,
|
|
46308
46152
|
"SvgFlow": SvgFlow,
|
|
46309
46153
|
"SvgGrid": SvgGrid,
|
|
46310
46154
|
"SvgLobe": SvgLobe,
|
|
@@ -46315,7 +46159,6 @@ var init_component_registry_generated = __esm({
|
|
|
46315
46159
|
"SvgRing": SvgRing,
|
|
46316
46160
|
"SvgShield": SvgShield,
|
|
46317
46161
|
"SvgStack": SvgStack,
|
|
46318
|
-
"SvgStage": SvgStage,
|
|
46319
46162
|
"SwipeableRow": SwipeableRow,
|
|
46320
46163
|
"Switch": Switch,
|
|
46321
46164
|
"TabbedContainer": TabbedContainer,
|
|
@@ -46366,7 +46209,7 @@ function SuspenseConfigProvider({
|
|
|
46366
46209
|
config,
|
|
46367
46210
|
children
|
|
46368
46211
|
}) {
|
|
46369
|
-
return
|
|
46212
|
+
return React91__default.createElement(
|
|
46370
46213
|
SuspenseConfigContext.Provider,
|
|
46371
46214
|
{ value: config },
|
|
46372
46215
|
children
|
|
@@ -46408,7 +46251,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46408
46251
|
}
|
|
46409
46252
|
return { name: field, label: humanizeFieldName(field) };
|
|
46410
46253
|
}
|
|
46411
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
46254
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React91__default.isValidElement(field) && !(field instanceof Date)) {
|
|
46412
46255
|
const obj = field;
|
|
46413
46256
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
46414
46257
|
if (!fieldName) return field;
|
|
@@ -46868,7 +46711,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46868
46711
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46869
46712
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46870
46713
|
}
|
|
46871
|
-
return /* @__PURE__ */ jsx(
|
|
46714
|
+
return /* @__PURE__ */ jsx(React91__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46872
46715
|
}
|
|
46873
46716
|
if (!child || typeof child !== "object") return null;
|
|
46874
46717
|
const childId = `${parentId}-${index}`;
|
|
@@ -46925,14 +46768,14 @@ function isPatternConfig(value) {
|
|
|
46925
46768
|
if (value === null || value === void 0) return false;
|
|
46926
46769
|
if (typeof value !== "object") return false;
|
|
46927
46770
|
if (Array.isArray(value)) return false;
|
|
46928
|
-
if (
|
|
46771
|
+
if (React91__default.isValidElement(value)) return false;
|
|
46929
46772
|
if (value instanceof Date) return false;
|
|
46930
46773
|
if (typeof value === "function") return false;
|
|
46931
46774
|
const record = value;
|
|
46932
46775
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
46933
46776
|
}
|
|
46934
46777
|
function isPlainConfigObject(value) {
|
|
46935
|
-
if (
|
|
46778
|
+
if (React91__default.isValidElement(value)) return false;
|
|
46936
46779
|
if (value instanceof Date) return false;
|
|
46937
46780
|
const proto = Object.getPrototypeOf(value);
|
|
46938
46781
|
return proto === Object.prototype || proto === null;
|
|
@@ -47060,7 +46903,7 @@ function SlotContentRenderer({
|
|
|
47060
46903
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
47061
46904
|
const slotVal = restProps[slotKey];
|
|
47062
46905
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
47063
|
-
if (
|
|
46906
|
+
if (React91__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
47064
46907
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
47065
46908
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
47066
46909
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -47114,7 +46957,7 @@ function SlotContentRenderer({
|
|
|
47114
46957
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
47115
46958
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
47116
46959
|
const sample = resolvedItems[0];
|
|
47117
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
46960
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React91__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
47118
46961
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
47119
46962
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
47120
46963
|
}
|
|
@@ -47480,7 +47323,7 @@ var AvlTransition = ({
|
|
|
47480
47323
|
opacity = 1,
|
|
47481
47324
|
className
|
|
47482
47325
|
}) => {
|
|
47483
|
-
const ids =
|
|
47326
|
+
const ids = React91__default.useMemo(() => {
|
|
47484
47327
|
avlTransitionId += 1;
|
|
47485
47328
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47486
47329
|
}, []);
|
|
@@ -48041,7 +47884,7 @@ var AvlStateMachine = ({
|
|
|
48041
47884
|
color = "var(--color-primary)",
|
|
48042
47885
|
animated = false
|
|
48043
47886
|
}) => {
|
|
48044
|
-
const ids =
|
|
47887
|
+
const ids = React91__default.useMemo(() => {
|
|
48045
47888
|
avlSmId += 1;
|
|
48046
47889
|
const base = `avl-sm-${avlSmId}`;
|
|
48047
47890
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48240,7 +48083,7 @@ var AvlOrbitalUnit = ({
|
|
|
48240
48083
|
color = "var(--color-primary)",
|
|
48241
48084
|
animated = false
|
|
48242
48085
|
}) => {
|
|
48243
|
-
const ids =
|
|
48086
|
+
const ids = React91__default.useMemo(() => {
|
|
48244
48087
|
avlOuId += 1;
|
|
48245
48088
|
const base = `avl-ou-${avlOuId}`;
|
|
48246
48089
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48336,7 +48179,7 @@ var AvlClosedCircuit = ({
|
|
|
48336
48179
|
color = "var(--color-primary)",
|
|
48337
48180
|
animated = false
|
|
48338
48181
|
}) => {
|
|
48339
|
-
const ids =
|
|
48182
|
+
const ids = React91__default.useMemo(() => {
|
|
48340
48183
|
avlCcId += 1;
|
|
48341
48184
|
const base = `avl-cc-${avlCcId}`;
|
|
48342
48185
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48491,7 +48334,7 @@ var AvlEmitListen = ({
|
|
|
48491
48334
|
color = "var(--color-primary)",
|
|
48492
48335
|
animated = false
|
|
48493
48336
|
}) => {
|
|
48494
|
-
const ids =
|
|
48337
|
+
const ids = React91__default.useMemo(() => {
|
|
48495
48338
|
avlElId += 1;
|
|
48496
48339
|
const base = `avl-el-${avlElId}`;
|
|
48497
48340
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -48765,7 +48608,7 @@ function renderNode(node, color, glowId) {
|
|
|
48765
48608
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
48766
48609
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
48767
48610
|
const nc = nodeColor(node.type, color);
|
|
48768
|
-
return /* @__PURE__ */ jsxs(
|
|
48611
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
48769
48612
|
node.children.map((child, i) => {
|
|
48770
48613
|
const childR = Math.max(
|
|
48771
48614
|
child.type === "operator" ? 20 : 16,
|
|
@@ -48822,7 +48665,7 @@ var AvlExprTree = ({
|
|
|
48822
48665
|
className,
|
|
48823
48666
|
color = "var(--color-primary)"
|
|
48824
48667
|
}) => {
|
|
48825
|
-
const ids =
|
|
48668
|
+
const ids = React91__default.useMemo(() => {
|
|
48826
48669
|
avlEtId += 1;
|
|
48827
48670
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
48828
48671
|
}, []);
|
|
@@ -49657,7 +49500,7 @@ var SystemNode = ({ data }) => {
|
|
|
49657
49500
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
49658
49501
|
const tc = transitionCounts[s.name] ?? 0;
|
|
49659
49502
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
49660
|
-
return /* @__PURE__ */ jsxs(
|
|
49503
|
+
return /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
49661
49504
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
|
|
49662
49505
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
49663
49506
|
] }, s.name);
|
|
@@ -50741,7 +50584,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
50741
50584
|
}
|
|
50742
50585
|
return substituted;
|
|
50743
50586
|
}
|
|
50744
|
-
if (body !== null && typeof body === "object" && !
|
|
50587
|
+
if (body !== null && typeof body === "object" && !React91__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
50745
50588
|
const out = {};
|
|
50746
50589
|
for (const [k, v] of Object.entries(body)) {
|
|
50747
50590
|
out[k] = recur(v);
|
|
@@ -50760,7 +50603,7 @@ function getSlotContentRenderer2() {
|
|
|
50760
50603
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
50761
50604
|
return (item, index) => {
|
|
50762
50605
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
50763
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
50606
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React91__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
50764
50607
|
return null;
|
|
50765
50608
|
}
|
|
50766
50609
|
const record = resolvedBody;
|
|
@@ -50779,7 +50622,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
50779
50622
|
props: childProps,
|
|
50780
50623
|
priority: 0
|
|
50781
50624
|
};
|
|
50782
|
-
return
|
|
50625
|
+
return React91__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
50783
50626
|
};
|
|
50784
50627
|
}
|
|
50785
50628
|
function convertNode(node, callerKey) {
|
|
@@ -50798,7 +50641,7 @@ function convertNode(node, callerKey) {
|
|
|
50798
50641
|
});
|
|
50799
50642
|
return anyChanged ? mapped : node;
|
|
50800
50643
|
}
|
|
50801
|
-
if (typeof node === "object" && !
|
|
50644
|
+
if (typeof node === "object" && !React91__default.isValidElement(node) && !(node instanceof Date)) {
|
|
50802
50645
|
return convertObjectProps(node);
|
|
50803
50646
|
}
|
|
50804
50647
|
return node;
|
|
@@ -52713,8 +52556,8 @@ function CanvasDndProvider({
|
|
|
52713
52556
|
}) {
|
|
52714
52557
|
const eventBus = useEventBus();
|
|
52715
52558
|
const sensors = useAlmadarDndSensors(false);
|
|
52716
|
-
const [activePayload, setActivePayload] =
|
|
52717
|
-
const handleDragStart =
|
|
52559
|
+
const [activePayload, setActivePayload] = React91__default.useState(null);
|
|
52560
|
+
const handleDragStart = React91__default.useCallback((e) => {
|
|
52718
52561
|
const data = e.active.data.current;
|
|
52719
52562
|
const payload = data?.payload;
|
|
52720
52563
|
if (payload) {
|
|
@@ -52725,7 +52568,7 @@ function CanvasDndProvider({
|
|
|
52725
52568
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
52726
52569
|
}
|
|
52727
52570
|
}, [eventBus]);
|
|
52728
|
-
const handleDragEnd =
|
|
52571
|
+
const handleDragEnd = React91__default.useCallback((e) => {
|
|
52729
52572
|
setActivePayload(null);
|
|
52730
52573
|
const activeData = e.active.data.current;
|
|
52731
52574
|
const payload = activeData?.payload;
|
|
@@ -52754,7 +52597,7 @@ function CanvasDndProvider({
|
|
|
52754
52597
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
52755
52598
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
52756
52599
|
}, [eventBus, onDrop]);
|
|
52757
|
-
const handleDragCancel =
|
|
52600
|
+
const handleDragCancel = React91__default.useCallback(() => {
|
|
52758
52601
|
setActivePayload(null);
|
|
52759
52602
|
log9.info("dragCancel");
|
|
52760
52603
|
}, []);
|
|
@@ -53512,7 +53355,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
53512
53355
|
}
|
|
53513
53356
|
);
|
|
53514
53357
|
};
|
|
53515
|
-
var OrbPreviewNode =
|
|
53358
|
+
var OrbPreviewNode = React91__default.memo(OrbPreviewNodeInner);
|
|
53516
53359
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
53517
53360
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
53518
53361
|
type: typeof OrbPreviewNode,
|
|
@@ -53617,7 +53460,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
53617
53460
|
) })
|
|
53618
53461
|
] });
|
|
53619
53462
|
};
|
|
53620
|
-
var EventFlowEdge =
|
|
53463
|
+
var EventFlowEdge = React91__default.memo(EventFlowEdgeInner);
|
|
53621
53464
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
53622
53465
|
|
|
53623
53466
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -53764,7 +53607,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
53764
53607
|
}
|
|
53765
53608
|
);
|
|
53766
53609
|
};
|
|
53767
|
-
var BehaviorComposeNode =
|
|
53610
|
+
var BehaviorComposeNode = React91__default.memo(BehaviorComposeNodeInner);
|
|
53768
53611
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
53769
53612
|
|
|
53770
53613
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -54790,7 +54633,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
54790
54633
|
}
|
|
54791
54634
|
);
|
|
54792
54635
|
};
|
|
54793
|
-
var TraitCardNode =
|
|
54636
|
+
var TraitCardNode = React91__default.memo(TraitCardNodeInner);
|
|
54794
54637
|
TraitCardNode.displayName = "TraitCardNode";
|
|
54795
54638
|
|
|
54796
54639
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -54871,7 +54714,7 @@ function FlowCanvasInner({
|
|
|
54871
54714
|
initialOrbital
|
|
54872
54715
|
);
|
|
54873
54716
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
54874
|
-
const screenSizeUserOverrideRef =
|
|
54717
|
+
const screenSizeUserOverrideRef = React91__default.useRef(false);
|
|
54875
54718
|
const [screenSize, setScreenSize] = useState(
|
|
54876
54719
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
54877
54720
|
);
|
|
@@ -55255,7 +55098,7 @@ var ZoomBreadcrumb = ({
|
|
|
55255
55098
|
if (eventName && band === "detail") {
|
|
55256
55099
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
55257
55100
|
}
|
|
55258
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
55101
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
55259
55102
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
55260
55103
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
55261
55104
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -55596,7 +55439,7 @@ var EventWireOverlay = ({
|
|
|
55596
55439
|
containerW,
|
|
55597
55440
|
containerH
|
|
55598
55441
|
}) => {
|
|
55599
|
-
const ids =
|
|
55442
|
+
const ids = React91__default.useMemo(() => {
|
|
55600
55443
|
avlOczWireId += 1;
|
|
55601
55444
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
55602
55445
|
}, []);
|
|
@@ -55963,7 +55806,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
55963
55806
|
borderRadius: 6,
|
|
55964
55807
|
border: `1px solid ${color}`
|
|
55965
55808
|
},
|
|
55966
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
55809
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React91__default.Fragment, { children: [
|
|
55967
55810
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
55968
55811
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
55969
55812
|
Box,
|