@almadar/ui 2.61.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1328 -1505
- package/dist/avl/index.css +7 -2
- package/dist/avl/index.js +251 -428
- package/dist/components/index.cjs +35 -37
- package/dist/components/index.css +7 -2
- package/dist/components/index.js +36 -38
- package/dist/components/organisms/DataTable.d.ts +3 -2
- package/dist/components/organisms/JazariStateMachine.d.ts +10 -37
- package/dist/components/organisms/MasterDetail.d.ts +4 -3
- package/dist/components/organisms/MediaGallery.d.ts +3 -2
- package/dist/components/organisms/Sidebar.d.ts +7 -2
- package/dist/components/organisms/StateMachineView.d.ts +7 -2
- package/dist/components/organisms/Table.d.ts +2 -1
- package/dist/components/organisms/Timeline.d.ts +15 -2
- package/dist/components/organisms/book/BookChapterView.d.ts +3 -2
- package/dist/components/organisms/book/BookCoverPage.d.ts +3 -3
- package/dist/components/organisms/book/BookNavBar.d.ts +3 -3
- package/dist/components/organisms/book/BookTableOfContents.d.ts +3 -2
- package/dist/components/organisms/book/BookViewer.d.ts +2 -2
- package/dist/components/organisms/book/types.d.ts +9 -4
- package/dist/components/organisms/game/WorldMapBoard.d.ts +9 -3
- package/dist/components/organisms/marketing-types.d.ts +22 -12
- package/dist/components/organisms/types.d.ts +23 -17
- package/dist/components/templates/types.d.ts +7 -2
- package/dist/hooks/index.cjs +5 -2
- package/dist/hooks/index.js +5 -2
- package/dist/lib/index.cjs +5 -2
- package/dist/lib/index.js +5 -2
- package/dist/providers/index.cjs +987 -1166
- package/dist/providers/index.css +7 -2
- package/dist/providers/index.d.ts +0 -2
- package/dist/providers/index.js +230 -403
- package/dist/runtime/index.cjs +36 -69
- package/dist/runtime/index.css +7 -2
- package/dist/runtime/index.js +37 -70
- package/package.json +3 -3
- package/dist/providers/EntityStoreProvider.d.ts +0 -63
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Html, RoundedBox, OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles } from '@react-three/drei';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React126 from 'react';
|
|
4
|
+
import React126__default, { createContext, useContext, useRef, useState, useCallback, useMemo, useEffect, Suspense, useLayoutEffect, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
5
5
|
import * as LucideIcons from 'lucide-react';
|
|
6
6
|
import { Loader2, ChevronDown, X, Check, Copy, AlertTriangle, Info, AlertCircle, CheckCircle, List, Printer, ChevronRight, ChevronLeft, Code, FileText, WrapText, Trash2, Settings, Menu as Menu$1, Search, Bell, LogOut, ZoomOut, ZoomIn, Download, FileQuestion, Inbox, XCircle, Filter, Plus, Pause, Play, RotateCcw, Package, Calendar, Pencil, Eye, MoreHorizontal, Image as Image$1, Upload, Minus, ArrowLeft, HelpCircle, ChevronUp, Eraser, Star, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, Sun, Moon, Circle, Clock, CheckCircle2, ArrowRight, FileWarning, SkipForward, Bug, Send, Wrench, User, Tag, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
7
7
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
@@ -31,6 +31,7 @@ import langDiff from 'react-syntax-highlighter/dist/esm/languages/prism/diff.js'
|
|
|
31
31
|
import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js';
|
|
32
32
|
import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
|
|
33
33
|
import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
|
|
34
|
+
import { FieldTypeSchema, isEntityCall, schemaToIR, getPage, isCircuitEvent, isInlineTrait } from '@almadar/core';
|
|
34
35
|
import { useFrame, useThree, Canvas } from '@react-three/fiber';
|
|
35
36
|
import * as THREE6 from 'three';
|
|
36
37
|
import { MathUtils, Vector3, Quaternion, QuadraticBezierCurve3 } from 'three';
|
|
@@ -41,7 +42,6 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
|
41
42
|
import { EffectComposer, Bloom, DepthOfField, Vignette } from '@react-three/postprocessing';
|
|
42
43
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
43
44
|
import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
44
|
-
import { FieldTypeSchema, isEntityCall, schemaToIR, getPage, isCircuitEvent } from '@almadar/core';
|
|
45
45
|
import '@tanstack/react-query';
|
|
46
46
|
import { StateMachineManager, createContextFromBindings, interpolateValue, EffectExecutor } from '@almadar/runtime';
|
|
47
47
|
|
|
@@ -2986,7 +2986,7 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2986
2986
|
}
|
|
2987
2987
|
};
|
|
2988
2988
|
}, [debug2]);
|
|
2989
|
-
const
|
|
2989
|
+
const contextValue = useMemo(
|
|
2990
2990
|
() => ({
|
|
2991
2991
|
emit,
|
|
2992
2992
|
on,
|
|
@@ -2999,12 +2999,12 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
2999
2999
|
[emit, on, once, hasListeners, onAny, getSelectedEntity, clearSelectedEntity]
|
|
3000
3000
|
);
|
|
3001
3001
|
useEffect(() => {
|
|
3002
|
-
setGlobalEventBus(
|
|
3002
|
+
setGlobalEventBus(contextValue);
|
|
3003
3003
|
return () => {
|
|
3004
3004
|
setGlobalEventBus(null);
|
|
3005
3005
|
};
|
|
3006
|
-
}, [
|
|
3007
|
-
return /* @__PURE__ */ jsx(EventBusContext.Provider, { value:
|
|
3006
|
+
}, [contextValue]);
|
|
3007
|
+
return /* @__PURE__ */ jsx(EventBusContext.Provider, { value: contextValue, children });
|
|
3008
3008
|
}
|
|
3009
3009
|
var busLog, subLog, EventBusContext;
|
|
3010
3010
|
var init_EventBusProvider = __esm({
|
|
@@ -3250,7 +3250,7 @@ var init_Box = __esm({
|
|
|
3250
3250
|
fixed: "fixed",
|
|
3251
3251
|
sticky: "sticky"
|
|
3252
3252
|
};
|
|
3253
|
-
Box =
|
|
3253
|
+
Box = React126__default.forwardRef(
|
|
3254
3254
|
({
|
|
3255
3255
|
padding,
|
|
3256
3256
|
paddingX,
|
|
@@ -4018,7 +4018,7 @@ var init_ThemeContext = __esm({
|
|
|
4018
4018
|
const newMode = resolvedMode === "dark" ? "light" : "dark";
|
|
4019
4019
|
setMode(newMode);
|
|
4020
4020
|
}, [resolvedMode, setMode]);
|
|
4021
|
-
const
|
|
4021
|
+
const contextValue = useMemo(
|
|
4022
4022
|
() => ({
|
|
4023
4023
|
theme,
|
|
4024
4024
|
mode,
|
|
@@ -4040,151 +4040,10 @@ var init_ThemeContext = __esm({
|
|
|
4040
4040
|
appliedTheme
|
|
4041
4041
|
]
|
|
4042
4042
|
);
|
|
4043
|
-
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value:
|
|
4043
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: contextValue, children });
|
|
4044
4044
|
};
|
|
4045
4045
|
}
|
|
4046
4046
|
});
|
|
4047
|
-
function extractId(record) {
|
|
4048
|
-
const r2 = record;
|
|
4049
|
-
return String(r2.id ?? r2._id ?? r2.key ?? "");
|
|
4050
|
-
}
|
|
4051
|
-
function materialize(snap) {
|
|
4052
|
-
return snap.ids.map((id) => snap.entities.get(id));
|
|
4053
|
-
}
|
|
4054
|
-
function notifyListeners(entityType, prev) {
|
|
4055
|
-
for (const listener of storeListeners) {
|
|
4056
|
-
listener();
|
|
4057
|
-
}
|
|
4058
|
-
const cbs = watchCallbacks.get(entityType);
|
|
4059
|
-
if (cbs) {
|
|
4060
|
-
const oldData = prev ? materialize(prev) : [];
|
|
4061
|
-
const cur = store.get(entityType);
|
|
4062
|
-
const newData = cur ? materialize(cur) : [];
|
|
4063
|
-
for (const cb of cbs) {
|
|
4064
|
-
try {
|
|
4065
|
-
cb(oldData, newData);
|
|
4066
|
-
} catch {
|
|
4067
|
-
}
|
|
4068
|
-
}
|
|
4069
|
-
}
|
|
4070
|
-
}
|
|
4071
|
-
function setAll(entityType, records) {
|
|
4072
|
-
const entities = /* @__PURE__ */ new Map();
|
|
4073
|
-
const ids = [];
|
|
4074
|
-
for (const r2 of records) {
|
|
4075
|
-
const rec = r2;
|
|
4076
|
-
const id = extractId(rec);
|
|
4077
|
-
if (id) {
|
|
4078
|
-
entities.set(id, rec);
|
|
4079
|
-
ids.push(id);
|
|
4080
|
-
}
|
|
4081
|
-
}
|
|
4082
|
-
const prev = store.get(entityType);
|
|
4083
|
-
const newVersion = (prev?.version ?? 0) + 1;
|
|
4084
|
-
store.set(entityType, { entities, ids, version: newVersion });
|
|
4085
|
-
storeLog.debug("setAll", { entityType, recordCount: records.length, version: newVersion });
|
|
4086
|
-
notifyListeners(entityType, prev);
|
|
4087
|
-
}
|
|
4088
|
-
function upsertOne(entityType, record) {
|
|
4089
|
-
const id = extractId(record);
|
|
4090
|
-
if (!id) return;
|
|
4091
|
-
const prev = store.get(entityType);
|
|
4092
|
-
const snapshot = prev ? { entities: new Map(prev.entities), ids: [...prev.ids], version: prev.version } : { entities: /* @__PURE__ */ new Map(), ids: [], version: 0 };
|
|
4093
|
-
snapshot.entities.set(id, record);
|
|
4094
|
-
if (!snapshot.ids.includes(id)) snapshot.ids.push(id);
|
|
4095
|
-
snapshot.version++;
|
|
4096
|
-
store.set(entityType, snapshot);
|
|
4097
|
-
storeLog.debug("upsertOne", { entityType, id, version: snapshot.version });
|
|
4098
|
-
notifyListeners(entityType, prev);
|
|
4099
|
-
}
|
|
4100
|
-
function addOne(entityType, record) {
|
|
4101
|
-
upsertOne(entityType, record);
|
|
4102
|
-
}
|
|
4103
|
-
function updateOne(entityType, id, changes) {
|
|
4104
|
-
const prev = store.get(entityType);
|
|
4105
|
-
if (!prev?.entities.has(id)) return;
|
|
4106
|
-
const snapshot = {
|
|
4107
|
-
entities: new Map(prev.entities),
|
|
4108
|
-
ids: [...prev.ids],
|
|
4109
|
-
version: prev.version
|
|
4110
|
-
};
|
|
4111
|
-
snapshot.entities.set(id, { ...snapshot.entities.get(id), ...changes });
|
|
4112
|
-
snapshot.version++;
|
|
4113
|
-
store.set(entityType, snapshot);
|
|
4114
|
-
storeLog.debug("updateOne", { entityType, id, changedFields: Object.keys(changes), version: snapshot.version });
|
|
4115
|
-
notifyListeners(entityType, prev);
|
|
4116
|
-
}
|
|
4117
|
-
function removeOne(entityType, id) {
|
|
4118
|
-
const prev = store.get(entityType);
|
|
4119
|
-
if (!prev) return;
|
|
4120
|
-
const snapshot = {
|
|
4121
|
-
entities: new Map(prev.entities),
|
|
4122
|
-
ids: prev.ids.filter((i) => i !== id),
|
|
4123
|
-
version: prev.version
|
|
4124
|
-
};
|
|
4125
|
-
snapshot.entities.delete(id);
|
|
4126
|
-
snapshot.version++;
|
|
4127
|
-
store.set(entityType, snapshot);
|
|
4128
|
-
storeLog.debug("removeOne", { entityType, id, remainingCount: snapshot.ids.length, version: snapshot.version });
|
|
4129
|
-
notifyListeners(entityType, prev);
|
|
4130
|
-
}
|
|
4131
|
-
function getSnapshot(entityType) {
|
|
4132
|
-
const snap = store.get(entityType);
|
|
4133
|
-
if (!snap) return [];
|
|
4134
|
-
return materialize(snap);
|
|
4135
|
-
}
|
|
4136
|
-
function getById(entityType, id) {
|
|
4137
|
-
return store.get(entityType)?.entities.get(id) ?? null;
|
|
4138
|
-
}
|
|
4139
|
-
function getVersion(entityType) {
|
|
4140
|
-
return store.get(entityType)?.version ?? 0;
|
|
4141
|
-
}
|
|
4142
|
-
function subscribeToStore(listener) {
|
|
4143
|
-
storeListeners.add(listener);
|
|
4144
|
-
return () => {
|
|
4145
|
-
storeListeners.delete(listener);
|
|
4146
|
-
};
|
|
4147
|
-
}
|
|
4148
|
-
function useEntityRef(entityType) {
|
|
4149
|
-
const versionRef = useRef(0);
|
|
4150
|
-
const dataRef = useRef([]);
|
|
4151
|
-
const getSnapshotStable = React127__default.useCallback(() => {
|
|
4152
|
-
const currentVersion = getVersion(entityType);
|
|
4153
|
-
if (currentVersion !== versionRef.current) {
|
|
4154
|
-
versionRef.current = currentVersion;
|
|
4155
|
-
dataRef.current = getSnapshot(entityType);
|
|
4156
|
-
}
|
|
4157
|
-
return dataRef.current;
|
|
4158
|
-
}, [entityType]);
|
|
4159
|
-
return useSyncExternalStore(subscribeToStore, getSnapshotStable, () => []);
|
|
4160
|
-
}
|
|
4161
|
-
function useEntityStore() {
|
|
4162
|
-
return useContext(EntityStoreContext);
|
|
4163
|
-
}
|
|
4164
|
-
function EntityStoreProvider({ children }) {
|
|
4165
|
-
return /* @__PURE__ */ jsx(EntityStoreContext.Provider, { value: contextValue, children });
|
|
4166
|
-
}
|
|
4167
|
-
var storeLog, store, storeListeners, watchCallbacks, contextValue, EntityStoreContext;
|
|
4168
|
-
var init_EntityStoreProvider = __esm({
|
|
4169
|
-
"providers/EntityStoreProvider.tsx"() {
|
|
4170
|
-
"use client";
|
|
4171
|
-
init_logger();
|
|
4172
|
-
storeLog = createLogger("almadar:entity:store");
|
|
4173
|
-
store = /* @__PURE__ */ new Map();
|
|
4174
|
-
storeListeners = /* @__PURE__ */ new Set();
|
|
4175
|
-
watchCallbacks = /* @__PURE__ */ new Map();
|
|
4176
|
-
contextValue = {
|
|
4177
|
-
setAll,
|
|
4178
|
-
upsertOne,
|
|
4179
|
-
addOne,
|
|
4180
|
-
updateOne,
|
|
4181
|
-
removeOne,
|
|
4182
|
-
getSnapshot,
|
|
4183
|
-
getById
|
|
4184
|
-
};
|
|
4185
|
-
EntityStoreContext = createContext(contextValue);
|
|
4186
|
-
}
|
|
4187
|
-
});
|
|
4188
4047
|
function EntitySchemaProvider({
|
|
4189
4048
|
entities,
|
|
4190
4049
|
children
|
|
@@ -4196,13 +4055,13 @@ function EntitySchemaProvider({
|
|
|
4196
4055
|
}
|
|
4197
4056
|
return map;
|
|
4198
4057
|
}, [entities]);
|
|
4199
|
-
const
|
|
4058
|
+
const contextValue = useMemo(
|
|
4200
4059
|
() => ({
|
|
4201
4060
|
entities: entitiesMap
|
|
4202
4061
|
}),
|
|
4203
4062
|
[entitiesMap]
|
|
4204
4063
|
);
|
|
4205
|
-
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value:
|
|
4064
|
+
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
4206
4065
|
}
|
|
4207
4066
|
function useEntitySchema() {
|
|
4208
4067
|
const context = useContext(EntitySchemaContext);
|
|
@@ -4440,8 +4299,8 @@ var init_useUISlots = __esm({
|
|
|
4440
4299
|
});
|
|
4441
4300
|
function UISlotProvider({ children }) {
|
|
4442
4301
|
const slotManager = useUISlotManager();
|
|
4443
|
-
const
|
|
4444
|
-
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value:
|
|
4302
|
+
const contextValue = useMemo(() => slotManager, [slotManager]);
|
|
4303
|
+
return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
|
|
4445
4304
|
}
|
|
4446
4305
|
function useUISlots() {
|
|
4447
4306
|
const context = useContext(UISlotContext);
|
|
@@ -4984,7 +4843,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
4984
4843
|
const IconComp = value;
|
|
4985
4844
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
4986
4845
|
}
|
|
4987
|
-
if (
|
|
4846
|
+
if (React126__default.isValidElement(value)) {
|
|
4988
4847
|
return value;
|
|
4989
4848
|
}
|
|
4990
4849
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5060,7 +4919,7 @@ var init_Button = __esm({
|
|
|
5060
4919
|
md: "h-4 w-4",
|
|
5061
4920
|
lg: "h-5 w-5"
|
|
5062
4921
|
};
|
|
5063
|
-
Button =
|
|
4922
|
+
Button = React126__default.forwardRef(
|
|
5064
4923
|
({
|
|
5065
4924
|
className,
|
|
5066
4925
|
variant = "primary",
|
|
@@ -5163,7 +5022,7 @@ var init_Badge = __esm({
|
|
|
5163
5022
|
md: "px-2.5 py-1 text-sm",
|
|
5164
5023
|
lg: "px-3 py-1.5 text-base"
|
|
5165
5024
|
};
|
|
5166
|
-
Badge =
|
|
5025
|
+
Badge = React126__default.forwardRef(
|
|
5167
5026
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
5168
5027
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
5169
5028
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -5304,7 +5163,7 @@ var Input;
|
|
|
5304
5163
|
var init_Input = __esm({
|
|
5305
5164
|
"components/atoms/Input.tsx"() {
|
|
5306
5165
|
init_cn();
|
|
5307
|
-
Input =
|
|
5166
|
+
Input = React126__default.forwardRef(
|
|
5308
5167
|
({
|
|
5309
5168
|
className,
|
|
5310
5169
|
inputType,
|
|
@@ -5422,7 +5281,7 @@ var Label;
|
|
|
5422
5281
|
var init_Label = __esm({
|
|
5423
5282
|
"components/atoms/Label.tsx"() {
|
|
5424
5283
|
init_cn();
|
|
5425
|
-
Label =
|
|
5284
|
+
Label = React126__default.forwardRef(
|
|
5426
5285
|
({ className, required, children, ...props }, ref) => {
|
|
5427
5286
|
return /* @__PURE__ */ jsxs(
|
|
5428
5287
|
"label",
|
|
@@ -5448,7 +5307,7 @@ var Textarea;
|
|
|
5448
5307
|
var init_Textarea = __esm({
|
|
5449
5308
|
"components/atoms/Textarea.tsx"() {
|
|
5450
5309
|
init_cn();
|
|
5451
|
-
Textarea =
|
|
5310
|
+
Textarea = React126__default.forwardRef(
|
|
5452
5311
|
({ className, error, ...props }, ref) => {
|
|
5453
5312
|
return /* @__PURE__ */ jsx(
|
|
5454
5313
|
"textarea",
|
|
@@ -5477,7 +5336,7 @@ var Select;
|
|
|
5477
5336
|
var init_Select = __esm({
|
|
5478
5337
|
"components/atoms/Select.tsx"() {
|
|
5479
5338
|
init_cn();
|
|
5480
|
-
Select =
|
|
5339
|
+
Select = React126__default.forwardRef(
|
|
5481
5340
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
5482
5341
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
5483
5342
|
/* @__PURE__ */ jsxs(
|
|
@@ -5519,7 +5378,7 @@ var Checkbox;
|
|
|
5519
5378
|
var init_Checkbox = __esm({
|
|
5520
5379
|
"components/atoms/Checkbox.tsx"() {
|
|
5521
5380
|
init_cn();
|
|
5522
|
-
Checkbox =
|
|
5381
|
+
Checkbox = React126__default.forwardRef(
|
|
5523
5382
|
({ className, label, id, ...props }, ref) => {
|
|
5524
5383
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
5525
5384
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -5601,7 +5460,7 @@ var init_Card = __esm({
|
|
|
5601
5460
|
md: "shadow",
|
|
5602
5461
|
lg: "shadow-lg"
|
|
5603
5462
|
};
|
|
5604
|
-
Card =
|
|
5463
|
+
Card = React126__default.forwardRef(
|
|
5605
5464
|
({
|
|
5606
5465
|
className,
|
|
5607
5466
|
variant = "bordered",
|
|
@@ -5637,9 +5496,9 @@ var init_Card = __esm({
|
|
|
5637
5496
|
}
|
|
5638
5497
|
);
|
|
5639
5498
|
Card.displayName = "Card";
|
|
5640
|
-
CardHeader =
|
|
5499
|
+
CardHeader = React126__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
5641
5500
|
CardHeader.displayName = "CardHeader";
|
|
5642
|
-
CardTitle =
|
|
5501
|
+
CardTitle = React126__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5643
5502
|
"h3",
|
|
5644
5503
|
{
|
|
5645
5504
|
ref,
|
|
@@ -5652,11 +5511,11 @@ var init_Card = __esm({
|
|
|
5652
5511
|
}
|
|
5653
5512
|
));
|
|
5654
5513
|
CardTitle.displayName = "CardTitle";
|
|
5655
|
-
CardContent =
|
|
5514
|
+
CardContent = React126__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
5656
5515
|
CardContent.displayName = "CardContent";
|
|
5657
5516
|
CardBody = CardContent;
|
|
5658
5517
|
CardBody.displayName = "CardBody";
|
|
5659
|
-
CardFooter =
|
|
5518
|
+
CardFooter = React126__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5660
5519
|
"div",
|
|
5661
5520
|
{
|
|
5662
5521
|
ref,
|
|
@@ -5677,7 +5536,7 @@ var init_Spinner = __esm({
|
|
|
5677
5536
|
md: "h-6 w-6",
|
|
5678
5537
|
lg: "h-8 w-8"
|
|
5679
5538
|
};
|
|
5680
|
-
Spinner =
|
|
5539
|
+
Spinner = React126__default.forwardRef(
|
|
5681
5540
|
({ className, size = "md", ...props }, ref) => {
|
|
5682
5541
|
return /* @__PURE__ */ jsx(
|
|
5683
5542
|
"div",
|
|
@@ -6125,7 +5984,7 @@ var Radio;
|
|
|
6125
5984
|
var init_Radio = __esm({
|
|
6126
5985
|
"components/atoms/Radio.tsx"() {
|
|
6127
5986
|
init_cn();
|
|
6128
|
-
Radio =
|
|
5987
|
+
Radio = React126__default.forwardRef(
|
|
6129
5988
|
({
|
|
6130
5989
|
label,
|
|
6131
5990
|
helperText,
|
|
@@ -6236,7 +6095,7 @@ var init_Switch = __esm({
|
|
|
6236
6095
|
"components/atoms/Switch.tsx"() {
|
|
6237
6096
|
"use client";
|
|
6238
6097
|
init_cn();
|
|
6239
|
-
Switch =
|
|
6098
|
+
Switch = React126.forwardRef(
|
|
6240
6099
|
({
|
|
6241
6100
|
checked,
|
|
6242
6101
|
defaultChecked = false,
|
|
@@ -6247,10 +6106,10 @@ var init_Switch = __esm({
|
|
|
6247
6106
|
name,
|
|
6248
6107
|
className
|
|
6249
6108
|
}, ref) => {
|
|
6250
|
-
const [isChecked, setIsChecked] =
|
|
6109
|
+
const [isChecked, setIsChecked] = React126.useState(
|
|
6251
6110
|
checked !== void 0 ? checked : defaultChecked
|
|
6252
6111
|
);
|
|
6253
|
-
|
|
6112
|
+
React126.useEffect(() => {
|
|
6254
6113
|
if (checked !== void 0) {
|
|
6255
6114
|
setIsChecked(checked);
|
|
6256
6115
|
}
|
|
@@ -6590,8 +6449,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6590
6449
|
position = "top",
|
|
6591
6450
|
className
|
|
6592
6451
|
}) => {
|
|
6593
|
-
const [isVisible, setIsVisible] =
|
|
6594
|
-
const timeoutRef =
|
|
6452
|
+
const [isVisible, setIsVisible] = React126__default.useState(false);
|
|
6453
|
+
const timeoutRef = React126__default.useRef(null);
|
|
6595
6454
|
const handleMouseEnter = () => {
|
|
6596
6455
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6597
6456
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -6600,7 +6459,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
6600
6459
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6601
6460
|
setIsVisible(false);
|
|
6602
6461
|
};
|
|
6603
|
-
|
|
6462
|
+
React126__default.useEffect(() => {
|
|
6604
6463
|
return () => {
|
|
6605
6464
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
6606
6465
|
};
|
|
@@ -6810,7 +6669,7 @@ var init_StatusDot = __esm({
|
|
|
6810
6669
|
md: "w-2.5 h-2.5",
|
|
6811
6670
|
lg: "w-3 h-3"
|
|
6812
6671
|
};
|
|
6813
|
-
StatusDot =
|
|
6672
|
+
StatusDot = React126__default.forwardRef(
|
|
6814
6673
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
6815
6674
|
return /* @__PURE__ */ jsx(
|
|
6816
6675
|
"span",
|
|
@@ -6863,7 +6722,7 @@ var init_TrendIndicator = __esm({
|
|
|
6863
6722
|
down: TrendingDown,
|
|
6864
6723
|
flat: ArrowRight
|
|
6865
6724
|
};
|
|
6866
|
-
TrendIndicator =
|
|
6725
|
+
TrendIndicator = React126__default.forwardRef(
|
|
6867
6726
|
({
|
|
6868
6727
|
className,
|
|
6869
6728
|
value,
|
|
@@ -6930,7 +6789,7 @@ var init_RangeSlider = __esm({
|
|
|
6930
6789
|
md: "w-4 h-4",
|
|
6931
6790
|
lg: "w-5 h-5"
|
|
6932
6791
|
};
|
|
6933
|
-
RangeSlider =
|
|
6792
|
+
RangeSlider = React126__default.forwardRef(
|
|
6934
6793
|
({
|
|
6935
6794
|
className,
|
|
6936
6795
|
min = 0,
|
|
@@ -7525,7 +7384,7 @@ var init_ContentSection = __esm({
|
|
|
7525
7384
|
md: "py-16",
|
|
7526
7385
|
lg: "py-24"
|
|
7527
7386
|
};
|
|
7528
|
-
ContentSection =
|
|
7387
|
+
ContentSection = React126__default.forwardRef(
|
|
7529
7388
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
7530
7389
|
return /* @__PURE__ */ jsx(
|
|
7531
7390
|
Box,
|
|
@@ -8059,7 +7918,7 @@ var init_AnimatedReveal = __esm({
|
|
|
8059
7918
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
8060
7919
|
"none": {}
|
|
8061
7920
|
};
|
|
8062
|
-
AnimatedReveal =
|
|
7921
|
+
AnimatedReveal = React126__default.forwardRef(
|
|
8063
7922
|
({
|
|
8064
7923
|
trigger = "scroll",
|
|
8065
7924
|
animation = "fade-up",
|
|
@@ -8219,7 +8078,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8219
8078
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
8220
8079
|
"use client";
|
|
8221
8080
|
init_cn();
|
|
8222
|
-
AnimatedGraphic =
|
|
8081
|
+
AnimatedGraphic = React126__default.forwardRef(
|
|
8223
8082
|
({
|
|
8224
8083
|
src,
|
|
8225
8084
|
svgContent,
|
|
@@ -8242,7 +8101,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
8242
8101
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
8243
8102
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
8244
8103
|
const prevAnimateRef = useRef(animate);
|
|
8245
|
-
const setRef =
|
|
8104
|
+
const setRef = React126__default.useCallback(
|
|
8246
8105
|
(node) => {
|
|
8247
8106
|
containerRef.current = node;
|
|
8248
8107
|
if (typeof ref === "function") ref(node);
|
|
@@ -8461,9 +8320,9 @@ function ScoreDisplay({
|
|
|
8461
8320
|
...rest
|
|
8462
8321
|
}) {
|
|
8463
8322
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
8464
|
-
const [displayValue, setDisplayValue] =
|
|
8465
|
-
const [isAnimating, setIsAnimating] =
|
|
8466
|
-
|
|
8323
|
+
const [displayValue, setDisplayValue] = React126.useState(resolvedValue);
|
|
8324
|
+
const [isAnimating, setIsAnimating] = React126.useState(false);
|
|
8325
|
+
React126.useEffect(() => {
|
|
8467
8326
|
if (!animated || displayValue === resolvedValue) {
|
|
8468
8327
|
setDisplayValue(resolvedValue);
|
|
8469
8328
|
return;
|
|
@@ -8533,9 +8392,9 @@ function ControlButton({
|
|
|
8533
8392
|
className
|
|
8534
8393
|
}) {
|
|
8535
8394
|
const eventBus = useEventBus();
|
|
8536
|
-
const [isPressed, setIsPressed] =
|
|
8395
|
+
const [isPressed, setIsPressed] = React126.useState(false);
|
|
8537
8396
|
const actualPressed = pressed ?? isPressed;
|
|
8538
|
-
const handlePointerDown =
|
|
8397
|
+
const handlePointerDown = React126.useCallback(
|
|
8539
8398
|
(e) => {
|
|
8540
8399
|
e.preventDefault();
|
|
8541
8400
|
if (disabled) return;
|
|
@@ -8545,7 +8404,7 @@ function ControlButton({
|
|
|
8545
8404
|
},
|
|
8546
8405
|
[disabled, pressEvent, eventBus, onPress]
|
|
8547
8406
|
);
|
|
8548
|
-
const handlePointerUp =
|
|
8407
|
+
const handlePointerUp = React126.useCallback(
|
|
8549
8408
|
(e) => {
|
|
8550
8409
|
e.preventDefault();
|
|
8551
8410
|
if (disabled) return;
|
|
@@ -8555,7 +8414,7 @@ function ControlButton({
|
|
|
8555
8414
|
},
|
|
8556
8415
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8557
8416
|
);
|
|
8558
|
-
const handlePointerLeave =
|
|
8417
|
+
const handlePointerLeave = React126.useCallback(
|
|
8559
8418
|
(e) => {
|
|
8560
8419
|
if (isPressed) {
|
|
8561
8420
|
setIsPressed(false);
|
|
@@ -9453,9 +9312,9 @@ function MiniMap({
|
|
|
9453
9312
|
viewportRect,
|
|
9454
9313
|
className
|
|
9455
9314
|
}) {
|
|
9456
|
-
const canvasRef =
|
|
9457
|
-
const frameRef =
|
|
9458
|
-
|
|
9315
|
+
const canvasRef = React126.useRef(null);
|
|
9316
|
+
const frameRef = React126.useRef(0);
|
|
9317
|
+
React126.useEffect(() => {
|
|
9459
9318
|
const canvas = canvasRef.current;
|
|
9460
9319
|
if (!canvas) return;
|
|
9461
9320
|
const ctx = canvas.getContext("2d");
|
|
@@ -9794,7 +9653,7 @@ var init_ErrorBoundary = __esm({
|
|
|
9794
9653
|
"use client";
|
|
9795
9654
|
init_cn();
|
|
9796
9655
|
init_ErrorState();
|
|
9797
|
-
ErrorBoundary = class extends
|
|
9656
|
+
ErrorBoundary = class extends React126__default.Component {
|
|
9798
9657
|
constructor(props) {
|
|
9799
9658
|
super(props);
|
|
9800
9659
|
__publicField(this, "reset", () => {
|
|
@@ -10267,8 +10126,8 @@ var init_Tooltip = __esm({
|
|
|
10267
10126
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
10268
10127
|
};
|
|
10269
10128
|
}, []);
|
|
10270
|
-
const triggerElement =
|
|
10271
|
-
const trigger =
|
|
10129
|
+
const triggerElement = React126__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10130
|
+
const trigger = React126__default.cloneElement(triggerElement, {
|
|
10272
10131
|
ref: triggerRef,
|
|
10273
10132
|
onMouseEnter: handleMouseEnter,
|
|
10274
10133
|
onMouseLeave: handleMouseLeave,
|
|
@@ -10389,8 +10248,8 @@ var init_Popover = __esm({
|
|
|
10389
10248
|
onMouseEnter: handleOpen,
|
|
10390
10249
|
onMouseLeave: handleClose
|
|
10391
10250
|
};
|
|
10392
|
-
const childElement =
|
|
10393
|
-
const triggerElement =
|
|
10251
|
+
const childElement = React126__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
10252
|
+
const triggerElement = React126__default.cloneElement(
|
|
10394
10253
|
childElement,
|
|
10395
10254
|
{
|
|
10396
10255
|
ref: triggerRef,
|
|
@@ -10507,8 +10366,8 @@ var init_Menu = __esm({
|
|
|
10507
10366
|
"bottom-start": "top-full left-0 mt-2",
|
|
10508
10367
|
"bottom-end": "top-full right-0 mt-2"
|
|
10509
10368
|
};
|
|
10510
|
-
const triggerChild =
|
|
10511
|
-
const triggerElement =
|
|
10369
|
+
const triggerChild = React126__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
10370
|
+
const triggerElement = React126__default.cloneElement(
|
|
10512
10371
|
triggerChild,
|
|
10513
10372
|
{
|
|
10514
10373
|
ref: triggerRef,
|
|
@@ -11022,13 +10881,13 @@ var init_MapView = __esm({
|
|
|
11022
10881
|
shadowSize: [41, 41]
|
|
11023
10882
|
});
|
|
11024
10883
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
11025
|
-
const { useEffect:
|
|
10884
|
+
const { useEffect: useEffect88, useRef: useRef87, useCallback: useCallback125, useState: useState126 } = React126__default;
|
|
11026
10885
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
11027
10886
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
11028
10887
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
11029
10888
|
const map = useMap();
|
|
11030
|
-
const prevRef =
|
|
11031
|
-
|
|
10889
|
+
const prevRef = useRef87({ centerLat, centerLng, zoom });
|
|
10890
|
+
useEffect88(() => {
|
|
11032
10891
|
const prev = prevRef.current;
|
|
11033
10892
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
11034
10893
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -11039,7 +10898,7 @@ var init_MapView = __esm({
|
|
|
11039
10898
|
}
|
|
11040
10899
|
function MapClickHandler({ onMapClick }) {
|
|
11041
10900
|
const map = useMap();
|
|
11042
|
-
|
|
10901
|
+
useEffect88(() => {
|
|
11043
10902
|
if (!onMapClick) return;
|
|
11044
10903
|
const handler = (e) => {
|
|
11045
10904
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -11274,7 +11133,7 @@ function InputPattern({
|
|
|
11274
11133
|
className
|
|
11275
11134
|
}) {
|
|
11276
11135
|
const { emit } = useEventBus();
|
|
11277
|
-
const [localValue, setLocalValue] =
|
|
11136
|
+
const [localValue, setLocalValue] = React126__default.useState(value);
|
|
11278
11137
|
const handleChange = (e) => {
|
|
11279
11138
|
setLocalValue(e.target.value);
|
|
11280
11139
|
if (onChange) {
|
|
@@ -11310,7 +11169,7 @@ function TextareaPattern({
|
|
|
11310
11169
|
className
|
|
11311
11170
|
}) {
|
|
11312
11171
|
const { emit } = useEventBus();
|
|
11313
|
-
const [localValue, setLocalValue] =
|
|
11172
|
+
const [localValue, setLocalValue] = React126__default.useState(value);
|
|
11314
11173
|
const handleChange = (e) => {
|
|
11315
11174
|
setLocalValue(e.target.value);
|
|
11316
11175
|
if (onChange) {
|
|
@@ -11340,7 +11199,7 @@ function SelectPattern({
|
|
|
11340
11199
|
className
|
|
11341
11200
|
}) {
|
|
11342
11201
|
const { emit } = useEventBus();
|
|
11343
|
-
const [localValue, setLocalValue] =
|
|
11202
|
+
const [localValue, setLocalValue] = React126__default.useState(value);
|
|
11344
11203
|
const handleChange = (e) => {
|
|
11345
11204
|
setLocalValue(e.target.value);
|
|
11346
11205
|
if (onChange) {
|
|
@@ -11368,7 +11227,7 @@ function CheckboxPattern({
|
|
|
11368
11227
|
className
|
|
11369
11228
|
}) {
|
|
11370
11229
|
const { emit } = useEventBus();
|
|
11371
|
-
const [localChecked, setLocalChecked] =
|
|
11230
|
+
const [localChecked, setLocalChecked] = React126__default.useState(checked);
|
|
11372
11231
|
const handleChange = (e) => {
|
|
11373
11232
|
setLocalChecked(e.target.checked);
|
|
11374
11233
|
if (onChange) {
|
|
@@ -11599,8 +11458,8 @@ function ActionButtons({
|
|
|
11599
11458
|
disabled
|
|
11600
11459
|
}) {
|
|
11601
11460
|
const eventBus = useEventBus();
|
|
11602
|
-
const [activeButtons, setActiveButtons] =
|
|
11603
|
-
const handlePress =
|
|
11461
|
+
const [activeButtons, setActiveButtons] = React126.useState(/* @__PURE__ */ new Set());
|
|
11462
|
+
const handlePress = React126.useCallback(
|
|
11604
11463
|
(id) => {
|
|
11605
11464
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
11606
11465
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11608,7 +11467,7 @@ function ActionButtons({
|
|
|
11608
11467
|
},
|
|
11609
11468
|
[actionEvent, eventBus, onAction]
|
|
11610
11469
|
);
|
|
11611
|
-
const handleRelease =
|
|
11470
|
+
const handleRelease = React126.useCallback(
|
|
11612
11471
|
(id) => {
|
|
11613
11472
|
setActiveButtons((prev) => {
|
|
11614
11473
|
const next = new Set(prev);
|
|
@@ -12010,13 +11869,13 @@ function getState() {
|
|
|
12010
11869
|
}
|
|
12011
11870
|
return { checks: /* @__PURE__ */ new Map(), transitions: [], bridgeHealth: null, listeners: /* @__PURE__ */ new Set() };
|
|
12012
11871
|
}
|
|
12013
|
-
function
|
|
11872
|
+
function notifyListeners() {
|
|
12014
11873
|
getState().listeners.forEach((l) => l());
|
|
12015
11874
|
exposeOnWindow();
|
|
12016
11875
|
}
|
|
12017
11876
|
function registerCheck(id, label, status = "pending", details) {
|
|
12018
11877
|
getState().checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
12019
|
-
|
|
11878
|
+
notifyListeners();
|
|
12020
11879
|
}
|
|
12021
11880
|
function getAllChecks() {
|
|
12022
11881
|
return Array.from(getState().checks.values());
|
|
@@ -12061,7 +11920,7 @@ function recordTransition(trace) {
|
|
|
12061
11920
|
failedEffects.map((e) => `${e.type}: ${e.error}`).join("; ")
|
|
12062
11921
|
);
|
|
12063
11922
|
}
|
|
12064
|
-
|
|
11923
|
+
notifyListeners();
|
|
12065
11924
|
}
|
|
12066
11925
|
function getTransitions2() {
|
|
12067
11926
|
return [...getState().transitions];
|
|
@@ -12094,7 +11953,7 @@ function recordServerResponse(orbitalName, event, response) {
|
|
|
12094
11953
|
response.error
|
|
12095
11954
|
);
|
|
12096
11955
|
}
|
|
12097
|
-
|
|
11956
|
+
notifyListeners();
|
|
12098
11957
|
}
|
|
12099
11958
|
function getBridgeHealth() {
|
|
12100
11959
|
const bh = getState().bridgeHealth;
|
|
@@ -12110,7 +11969,7 @@ function getSummary() {
|
|
|
12110
11969
|
pending: allChecks.filter((c) => c.status === "pending").length
|
|
12111
11970
|
};
|
|
12112
11971
|
}
|
|
12113
|
-
function
|
|
11972
|
+
function getSnapshot() {
|
|
12114
11973
|
return {
|
|
12115
11974
|
checks: getAllChecks(),
|
|
12116
11975
|
transitions: getTransitions2(),
|
|
@@ -12126,7 +11985,7 @@ function exposeOnWindow() {
|
|
|
12126
11985
|
if (typeof window === "undefined") return;
|
|
12127
11986
|
if (!window.__orbitalVerification) {
|
|
12128
11987
|
window.__orbitalVerification = {
|
|
12129
|
-
getSnapshot
|
|
11988
|
+
getSnapshot,
|
|
12130
11989
|
getChecks: getAllChecks,
|
|
12131
11990
|
getTransitions: getTransitions2,
|
|
12132
11991
|
getBridge: getBridgeHealth,
|
|
@@ -13624,9 +13483,9 @@ var init_ScaledDiagram = __esm({
|
|
|
13624
13483
|
}
|
|
13625
13484
|
});
|
|
13626
13485
|
|
|
13627
|
-
// node_modules/.pnpm/katex@0.16.
|
|
13486
|
+
// node_modules/.pnpm/katex@0.16.45/node_modules/katex/dist/katex.min.css
|
|
13628
13487
|
var init_katex_min = __esm({
|
|
13629
|
-
"node_modules/.pnpm/katex@0.16.
|
|
13488
|
+
"node_modules/.pnpm/katex@0.16.45/node_modules/katex/dist/katex.min.css"() {
|
|
13630
13489
|
}
|
|
13631
13490
|
});
|
|
13632
13491
|
var MarkdownContent;
|
|
@@ -13636,7 +13495,7 @@ var init_MarkdownContent = __esm({
|
|
|
13636
13495
|
init_Box();
|
|
13637
13496
|
init_useTranslate();
|
|
13638
13497
|
init_cn();
|
|
13639
|
-
MarkdownContent =
|
|
13498
|
+
MarkdownContent = React126__default.memo(
|
|
13640
13499
|
({ content, direction, className }) => {
|
|
13641
13500
|
const { t: _t } = useTranslate();
|
|
13642
13501
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13853,7 +13712,7 @@ var init_CodeBlock = __esm({
|
|
|
13853
13712
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
13854
13713
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13855
13714
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13856
|
-
CodeBlock =
|
|
13715
|
+
CodeBlock = React126__default.memo(
|
|
13857
13716
|
({
|
|
13858
13717
|
code: rawCode,
|
|
13859
13718
|
language = "text",
|
|
@@ -15162,7 +15021,7 @@ var init_StateMachineView = __esm({
|
|
|
15162
15021
|
style: { top: title ? 30 : 0 },
|
|
15163
15022
|
children: [
|
|
15164
15023
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15165
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15024
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React126__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15166
15025
|
StateNode,
|
|
15167
15026
|
{
|
|
15168
15027
|
state,
|
|
@@ -15675,7 +15534,9 @@ function extractTrait(schema, trait, traitIndex) {
|
|
|
15675
15534
|
for (const orbital of schema.orbitals) {
|
|
15676
15535
|
const traits2 = orbital.traits ?? [];
|
|
15677
15536
|
if (traitIndex < traits2.length) {
|
|
15678
|
-
|
|
15537
|
+
const traitRef = traits2[traitIndex];
|
|
15538
|
+
if (isInlineTrait(traitRef)) return traitRef;
|
|
15539
|
+
return null;
|
|
15679
15540
|
}
|
|
15680
15541
|
}
|
|
15681
15542
|
return null;
|
|
@@ -15683,8 +15544,10 @@ function extractTrait(schema, trait, traitIndex) {
|
|
|
15683
15544
|
function extractEntityFields(schema) {
|
|
15684
15545
|
if (!schema?.orbitals?.length) return [];
|
|
15685
15546
|
const entity = schema.orbitals[0].entity;
|
|
15686
|
-
if (!entity
|
|
15687
|
-
|
|
15547
|
+
if (!entity || typeof entity !== "object" || !("fields" in entity)) return [];
|
|
15548
|
+
const inlineEntity = entity;
|
|
15549
|
+
if (!inlineEntity.fields) return [];
|
|
15550
|
+
return inlineEntity.fields.map((f3) => f3.name);
|
|
15688
15551
|
}
|
|
15689
15552
|
function toStateMachineDefinition(sm) {
|
|
15690
15553
|
return {
|
|
@@ -15979,12 +15842,18 @@ var init_ContentRenderer = __esm({
|
|
|
15979
15842
|
);
|
|
15980
15843
|
case "orbital": {
|
|
15981
15844
|
const parsed = segment.schema;
|
|
15845
|
+
const inlineTrait = {
|
|
15846
|
+
name: "inline",
|
|
15847
|
+
scope: "instance",
|
|
15848
|
+
stateMachine: parsed
|
|
15849
|
+
};
|
|
15982
15850
|
const schema = Array.isArray(parsed.orbitals) ? parsed : {
|
|
15851
|
+
name: "inline",
|
|
15983
15852
|
orbitals: [{
|
|
15984
|
-
|
|
15985
|
-
|
|
15986
|
-
|
|
15987
|
-
|
|
15853
|
+
name: "inline",
|
|
15854
|
+
entity: { name: "inline", fields: [] },
|
|
15855
|
+
traits: [inlineTrait],
|
|
15856
|
+
pages: []
|
|
15988
15857
|
}]
|
|
15989
15858
|
};
|
|
15990
15859
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
@@ -20929,7 +20798,7 @@ function CraftingRecipe({
|
|
|
20929
20798
|
className
|
|
20930
20799
|
}) {
|
|
20931
20800
|
const eventBus = useEventBus();
|
|
20932
|
-
const handleCraft =
|
|
20801
|
+
const handleCraft = React126.useCallback(() => {
|
|
20933
20802
|
onCraft?.();
|
|
20934
20803
|
if (craftEvent) {
|
|
20935
20804
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20946,7 +20815,7 @@ function CraftingRecipe({
|
|
|
20946
20815
|
children: [
|
|
20947
20816
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20948
20817
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20949
|
-
return /* @__PURE__ */ jsxs(
|
|
20818
|
+
return /* @__PURE__ */ jsxs(React126.Fragment, { children: [
|
|
20950
20819
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20951
20820
|
ItemSlot,
|
|
20952
20821
|
{
|
|
@@ -21240,8 +21109,8 @@ function DPad({
|
|
|
21240
21109
|
}) {
|
|
21241
21110
|
const eventBus = useEventBus();
|
|
21242
21111
|
const sizes = sizeMap15[size];
|
|
21243
|
-
const [activeDirections, setActiveDirections] =
|
|
21244
|
-
const handlePress =
|
|
21112
|
+
const [activeDirections, setActiveDirections] = React126.useState(/* @__PURE__ */ new Set());
|
|
21113
|
+
const handlePress = React126.useCallback(
|
|
21245
21114
|
(direction) => {
|
|
21246
21115
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21247
21116
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21249,7 +21118,7 @@ function DPad({
|
|
|
21249
21118
|
},
|
|
21250
21119
|
[directionEvent, eventBus, onDirection]
|
|
21251
21120
|
);
|
|
21252
|
-
const handleRelease =
|
|
21121
|
+
const handleRelease = React126.useCallback(
|
|
21253
21122
|
(direction) => {
|
|
21254
21123
|
setActiveDirections((prev) => {
|
|
21255
21124
|
const next = new Set(prev);
|
|
@@ -22116,7 +21985,7 @@ var init_DataList = __esm({
|
|
|
22116
21985
|
}) => {
|
|
22117
21986
|
const eventBus = useEventBus();
|
|
22118
21987
|
const { t } = useTranslate();
|
|
22119
|
-
const [visibleCount, setVisibleCount] =
|
|
21988
|
+
const [visibleCount, setVisibleCount] = React126__default.useState(pageSize || Infinity);
|
|
22120
21989
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
22121
21990
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22122
21991
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -22153,7 +22022,7 @@ var init_DataList = __esm({
|
|
|
22153
22022
|
const items2 = data.map((item) => item);
|
|
22154
22023
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22155
22024
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
22156
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22025
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
22157
22026
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22158
22027
|
group.items.map((itemData, index) => {
|
|
22159
22028
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22356,7 +22225,7 @@ var init_DataList = __esm({
|
|
|
22356
22225
|
className
|
|
22357
22226
|
),
|
|
22358
22227
|
children: [
|
|
22359
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22228
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
22360
22229
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22361
22230
|
group.items.map(
|
|
22362
22231
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22562,43 +22431,43 @@ function useQuerySingleton(query) {
|
|
|
22562
22431
|
if (!query) {
|
|
22563
22432
|
return null;
|
|
22564
22433
|
}
|
|
22565
|
-
const
|
|
22434
|
+
const store = useMemo(() => getOrCreateStore(query), [query]);
|
|
22566
22435
|
useMemo(() => {
|
|
22567
22436
|
const listener = () => forceUpdate({});
|
|
22568
|
-
|
|
22437
|
+
store.listeners.add(listener);
|
|
22569
22438
|
return () => {
|
|
22570
|
-
|
|
22439
|
+
store.listeners.delete(listener);
|
|
22571
22440
|
};
|
|
22572
|
-
}, [
|
|
22573
|
-
const
|
|
22574
|
-
|
|
22575
|
-
}, [
|
|
22441
|
+
}, [store]);
|
|
22442
|
+
const notifyListeners3 = useCallback(() => {
|
|
22443
|
+
store.listeners.forEach((listener) => listener());
|
|
22444
|
+
}, [store]);
|
|
22576
22445
|
const setSearch = useCallback((value) => {
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
}, [
|
|
22446
|
+
store.search = value;
|
|
22447
|
+
notifyListeners3();
|
|
22448
|
+
}, [store, notifyListeners3]);
|
|
22580
22449
|
const setFilter = useCallback((key, value) => {
|
|
22581
|
-
|
|
22582
|
-
|
|
22583
|
-
}, [
|
|
22450
|
+
store.filters = { ...store.filters, [key]: value };
|
|
22451
|
+
notifyListeners3();
|
|
22452
|
+
}, [store, notifyListeners3]);
|
|
22584
22453
|
const clearFilters = useCallback(() => {
|
|
22585
|
-
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
}, [
|
|
22454
|
+
store.filters = {};
|
|
22455
|
+
store.search = "";
|
|
22456
|
+
notifyListeners3();
|
|
22457
|
+
}, [store, notifyListeners3]);
|
|
22589
22458
|
const setSort = useCallback((field, direction) => {
|
|
22590
|
-
|
|
22591
|
-
|
|
22592
|
-
|
|
22593
|
-
}, [
|
|
22459
|
+
store.sortField = field;
|
|
22460
|
+
store.sortDirection = direction;
|
|
22461
|
+
notifyListeners3();
|
|
22462
|
+
}, [store, notifyListeners3]);
|
|
22594
22463
|
return {
|
|
22595
|
-
search:
|
|
22464
|
+
search: store.search,
|
|
22596
22465
|
setSearch,
|
|
22597
|
-
filters:
|
|
22466
|
+
filters: store.filters,
|
|
22598
22467
|
setFilter,
|
|
22599
22468
|
clearFilters,
|
|
22600
|
-
sortField:
|
|
22601
|
-
sortDirection:
|
|
22469
|
+
sortField: store.sortField,
|
|
22470
|
+
sortDirection: store.sortDirection,
|
|
22602
22471
|
setSort
|
|
22603
22472
|
};
|
|
22604
22473
|
}
|
|
@@ -23609,7 +23478,7 @@ var init_WizardProgress = __esm({
|
|
|
23609
23478
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
23610
23479
|
const isActive = index === currentStep;
|
|
23611
23480
|
const isCompleted = index < currentStep;
|
|
23612
|
-
return /* @__PURE__ */ jsxs(
|
|
23481
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
23613
23482
|
/* @__PURE__ */ jsx(
|
|
23614
23483
|
"button",
|
|
23615
23484
|
{
|
|
@@ -24520,7 +24389,7 @@ function InventoryGrid({
|
|
|
24520
24389
|
const eventBus = useEventBus();
|
|
24521
24390
|
const slotCount = totalSlots ?? items.length;
|
|
24522
24391
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24523
|
-
const handleSelect =
|
|
24392
|
+
const handleSelect = React126.useCallback(
|
|
24524
24393
|
(id) => {
|
|
24525
24394
|
onSelect?.(id);
|
|
24526
24395
|
if (selectEvent) {
|
|
@@ -24733,15 +24602,15 @@ function GameCanvas2D({
|
|
|
24733
24602
|
fps = 60,
|
|
24734
24603
|
className
|
|
24735
24604
|
}) {
|
|
24736
|
-
const canvasRef =
|
|
24737
|
-
const rafRef =
|
|
24738
|
-
const frameRef =
|
|
24739
|
-
const lastTimeRef =
|
|
24740
|
-
const onDrawRef =
|
|
24605
|
+
const canvasRef = React126.useRef(null);
|
|
24606
|
+
const rafRef = React126.useRef(0);
|
|
24607
|
+
const frameRef = React126.useRef(0);
|
|
24608
|
+
const lastTimeRef = React126.useRef(0);
|
|
24609
|
+
const onDrawRef = React126.useRef(onDraw);
|
|
24741
24610
|
onDrawRef.current = onDraw;
|
|
24742
|
-
const onTickRef =
|
|
24611
|
+
const onTickRef = React126.useRef(onTick);
|
|
24743
24612
|
onTickRef.current = onTick;
|
|
24744
|
-
|
|
24613
|
+
React126.useEffect(() => {
|
|
24745
24614
|
const canvas = canvasRef.current;
|
|
24746
24615
|
if (!canvas) return;
|
|
24747
24616
|
const ctx = canvas.getContext("2d");
|
|
@@ -25030,7 +24899,7 @@ function TurnPanel({
|
|
|
25030
24899
|
className
|
|
25031
24900
|
}) {
|
|
25032
24901
|
const eventBus = useEventBus();
|
|
25033
|
-
const handleAction =
|
|
24902
|
+
const handleAction = React126.useCallback(
|
|
25034
24903
|
(event) => {
|
|
25035
24904
|
if (event) {
|
|
25036
24905
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25176,7 +25045,7 @@ function UnitCommandBar({
|
|
|
25176
25045
|
className
|
|
25177
25046
|
}) {
|
|
25178
25047
|
const eventBus = useEventBus();
|
|
25179
|
-
const handleCommand =
|
|
25048
|
+
const handleCommand = React126.useCallback(
|
|
25180
25049
|
(event) => {
|
|
25181
25050
|
if (event) {
|
|
25182
25051
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25661,7 +25530,7 @@ function GameMenu({
|
|
|
25661
25530
|
} catch {
|
|
25662
25531
|
}
|
|
25663
25532
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25664
|
-
const handleOptionClick =
|
|
25533
|
+
const handleOptionClick = React126.useCallback(
|
|
25665
25534
|
(option) => {
|
|
25666
25535
|
if (option.event && eventBus) {
|
|
25667
25536
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25775,7 +25644,7 @@ function GameOverScreen({
|
|
|
25775
25644
|
} catch {
|
|
25776
25645
|
}
|
|
25777
25646
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25778
|
-
const handleActionClick =
|
|
25647
|
+
const handleActionClick = React126.useCallback(
|
|
25779
25648
|
(action) => {
|
|
25780
25649
|
if (action.event && eventBus) {
|
|
25781
25650
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -28879,7 +28748,7 @@ var init_StepFlow = __esm({
|
|
|
28879
28748
|
className
|
|
28880
28749
|
}) => {
|
|
28881
28750
|
if (orientation === "vertical") {
|
|
28882
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
28751
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React126__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
28883
28752
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
28884
28753
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28885
28754
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -28890,7 +28759,7 @@ var init_StepFlow = __esm({
|
|
|
28890
28759
|
] })
|
|
28891
28760
|
] }) }, index)) });
|
|
28892
28761
|
}
|
|
28893
|
-
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(
|
|
28762
|
+
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(React126__default.Fragment, { children: [
|
|
28894
28763
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
28895
28764
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28896
28765
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31002,7 +30871,7 @@ var init_DocumentViewer = __esm({
|
|
|
31002
30871
|
}
|
|
31003
30872
|
});
|
|
31004
30873
|
function extractTitle(children) {
|
|
31005
|
-
if (!
|
|
30874
|
+
if (!React126__default.isValidElement(children)) return void 0;
|
|
31006
30875
|
const props = children.props;
|
|
31007
30876
|
if (typeof props.title === "string") {
|
|
31008
30877
|
return props.title;
|
|
@@ -31057,7 +30926,7 @@ function LinearView({
|
|
|
31057
30926
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
31058
30927
|
const isDone = i < currentIdx;
|
|
31059
30928
|
const isCurrent = i === currentIdx;
|
|
31060
|
-
return /* @__PURE__ */ jsxs(
|
|
30929
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
31061
30930
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31062
30931
|
Typography,
|
|
31063
30932
|
{
|
|
@@ -31824,7 +31693,7 @@ var init_Form = __esm({
|
|
|
31824
31693
|
const normalizedInitialData = initialData ?? {};
|
|
31825
31694
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
31826
31695
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
31827
|
-
const entityDerivedFields =
|
|
31696
|
+
const entityDerivedFields = React126__default.useMemo(() => {
|
|
31828
31697
|
if (fields && fields.length > 0) return void 0;
|
|
31829
31698
|
if (!resolvedEntity) return void 0;
|
|
31830
31699
|
return resolvedEntity.fields.map(
|
|
@@ -31843,14 +31712,14 @@ var init_Form = __esm({
|
|
|
31843
31712
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
31844
31713
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
31845
31714
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
31846
|
-
const [formData, setFormData] =
|
|
31715
|
+
const [formData, setFormData] = React126__default.useState(
|
|
31847
31716
|
normalizedInitialData
|
|
31848
31717
|
);
|
|
31849
|
-
const [collapsedSections, setCollapsedSections] =
|
|
31718
|
+
const [collapsedSections, setCollapsedSections] = React126__default.useState(
|
|
31850
31719
|
/* @__PURE__ */ new Set()
|
|
31851
31720
|
);
|
|
31852
31721
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
31853
|
-
const evalContext =
|
|
31722
|
+
const evalContext = React126__default.useMemo(
|
|
31854
31723
|
() => ({
|
|
31855
31724
|
formValues: formData,
|
|
31856
31725
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -31859,13 +31728,13 @@ var init_Form = __esm({
|
|
|
31859
31728
|
}),
|
|
31860
31729
|
[formData, externalContext]
|
|
31861
31730
|
);
|
|
31862
|
-
|
|
31731
|
+
React126__default.useEffect(() => {
|
|
31863
31732
|
const data = initialData;
|
|
31864
31733
|
if (data && Object.keys(data).length > 0) {
|
|
31865
31734
|
setFormData(data);
|
|
31866
31735
|
}
|
|
31867
31736
|
}, [initialData]);
|
|
31868
|
-
const processCalculations =
|
|
31737
|
+
const processCalculations = React126__default.useCallback(
|
|
31869
31738
|
(changedFieldId, newFormData) => {
|
|
31870
31739
|
if (!hiddenCalculations.length) return;
|
|
31871
31740
|
const context = {
|
|
@@ -31890,7 +31759,7 @@ var init_Form = __esm({
|
|
|
31890
31759
|
},
|
|
31891
31760
|
[hiddenCalculations, externalContext, eventBus]
|
|
31892
31761
|
);
|
|
31893
|
-
const checkViolations =
|
|
31762
|
+
const checkViolations = React126__default.useCallback(
|
|
31894
31763
|
(changedFieldId, newFormData) => {
|
|
31895
31764
|
if (!violationTriggers.length) return;
|
|
31896
31765
|
const context = {
|
|
@@ -31927,7 +31796,7 @@ var init_Form = __esm({
|
|
|
31927
31796
|
processCalculations(name, newFormData);
|
|
31928
31797
|
checkViolations(name, newFormData);
|
|
31929
31798
|
};
|
|
31930
|
-
const isFieldVisible =
|
|
31799
|
+
const isFieldVisible = React126__default.useCallback(
|
|
31931
31800
|
(fieldName) => {
|
|
31932
31801
|
const condition = conditionalFields[fieldName];
|
|
31933
31802
|
if (!condition) return true;
|
|
@@ -31935,7 +31804,7 @@ var init_Form = __esm({
|
|
|
31935
31804
|
},
|
|
31936
31805
|
[conditionalFields, evalContext]
|
|
31937
31806
|
);
|
|
31938
|
-
const isSectionVisible =
|
|
31807
|
+
const isSectionVisible = React126__default.useCallback(
|
|
31939
31808
|
(section) => {
|
|
31940
31809
|
if (!section.condition) return true;
|
|
31941
31810
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -31967,7 +31836,7 @@ var init_Form = __esm({
|
|
|
31967
31836
|
eventBus.emit(`UI:${onCancel}`);
|
|
31968
31837
|
}
|
|
31969
31838
|
};
|
|
31970
|
-
const renderField =
|
|
31839
|
+
const renderField = React126__default.useCallback(
|
|
31971
31840
|
(field) => {
|
|
31972
31841
|
const fieldName = field.name || field.field;
|
|
31973
31842
|
if (!fieldName) return null;
|
|
@@ -31988,7 +31857,7 @@ var init_Form = __esm({
|
|
|
31988
31857
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
31989
31858
|
);
|
|
31990
31859
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
31991
|
-
const normalizedFields =
|
|
31860
|
+
const normalizedFields = React126__default.useMemo(() => {
|
|
31992
31861
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
31993
31862
|
return effectiveFields.map((field) => {
|
|
31994
31863
|
if (typeof field === "string") {
|
|
@@ -32010,7 +31879,7 @@ var init_Form = __esm({
|
|
|
32010
31879
|
return field;
|
|
32011
31880
|
});
|
|
32012
31881
|
}, [effectiveFields, resolvedEntity]);
|
|
32013
|
-
const schemaFields =
|
|
31882
|
+
const schemaFields = React126__default.useMemo(() => {
|
|
32014
31883
|
if (normalizedFields.length === 0) return null;
|
|
32015
31884
|
if (isDebugEnabled()) {
|
|
32016
31885
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -32020,7 +31889,7 @@ var init_Form = __esm({
|
|
|
32020
31889
|
}
|
|
32021
31890
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
32022
31891
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
32023
|
-
const sectionElements =
|
|
31892
|
+
const sectionElements = React126__default.useMemo(() => {
|
|
32024
31893
|
if (!sections || sections.length === 0) return null;
|
|
32025
31894
|
return sections.map((section) => {
|
|
32026
31895
|
if (!isSectionVisible(section)) {
|
|
@@ -33517,7 +33386,7 @@ var init_List = __esm({
|
|
|
33517
33386
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
33518
33387
|
return [];
|
|
33519
33388
|
}, [entity]);
|
|
33520
|
-
const getItemActions =
|
|
33389
|
+
const getItemActions = React126__default.useCallback(
|
|
33521
33390
|
(item) => {
|
|
33522
33391
|
if (!itemActions) return [];
|
|
33523
33392
|
if (typeof itemActions === "function") {
|
|
@@ -33964,7 +33833,7 @@ var init_MediaGallery = __esm({
|
|
|
33964
33833
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
33965
33834
|
);
|
|
33966
33835
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
33967
|
-
const items =
|
|
33836
|
+
const items = React126__default.useMemo(() => {
|
|
33968
33837
|
if (propItems) return propItems;
|
|
33969
33838
|
if (entityData.length === 0) return [];
|
|
33970
33839
|
return entityData.map((record, idx) => ({
|
|
@@ -34128,7 +33997,7 @@ var init_MediaGallery = __esm({
|
|
|
34128
33997
|
}
|
|
34129
33998
|
});
|
|
34130
33999
|
function extractTitle2(children) {
|
|
34131
|
-
if (!
|
|
34000
|
+
if (!React126__default.isValidElement(children)) return void 0;
|
|
34132
34001
|
const props = children.props;
|
|
34133
34002
|
if (typeof props.title === "string") {
|
|
34134
34003
|
return props.title;
|
|
@@ -34841,7 +34710,7 @@ var init_PageHeader = __esm({
|
|
|
34841
34710
|
info: "bg-info/10 text-info"
|
|
34842
34711
|
};
|
|
34843
34712
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34844
|
-
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(
|
|
34713
|
+
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(React126__default.Fragment, { children: [
|
|
34845
34714
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34846
34715
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34847
34716
|
"a",
|
|
@@ -34930,24 +34799,24 @@ var init_PageHeader = __esm({
|
|
|
34930
34799
|
});
|
|
34931
34800
|
|
|
34932
34801
|
// lib/traitRegistry.ts
|
|
34933
|
-
function
|
|
34802
|
+
function notifyListeners2() {
|
|
34934
34803
|
listeners.forEach((listener) => listener());
|
|
34935
34804
|
}
|
|
34936
34805
|
function registerTrait(info) {
|
|
34937
34806
|
traits.set(info.id, info);
|
|
34938
|
-
|
|
34807
|
+
notifyListeners2();
|
|
34939
34808
|
}
|
|
34940
34809
|
function updateTraitState(id, newState) {
|
|
34941
34810
|
const trait = traits.get(id);
|
|
34942
34811
|
if (trait) {
|
|
34943
34812
|
trait.currentState = newState;
|
|
34944
34813
|
trait.transitionCount++;
|
|
34945
|
-
|
|
34814
|
+
notifyListeners2();
|
|
34946
34815
|
}
|
|
34947
34816
|
}
|
|
34948
34817
|
function unregisterTrait(id) {
|
|
34949
34818
|
traits.delete(id);
|
|
34950
|
-
|
|
34819
|
+
notifyListeners2();
|
|
34951
34820
|
}
|
|
34952
34821
|
function getAllTraits() {
|
|
34953
34822
|
return Array.from(traits.values());
|
|
@@ -35034,7 +34903,7 @@ var init_debugRegistry = __esm({
|
|
|
35034
34903
|
}
|
|
35035
34904
|
});
|
|
35036
34905
|
function useDebugData() {
|
|
35037
|
-
const [data, setData] =
|
|
34906
|
+
const [data, setData] = React126.useState(() => ({
|
|
35038
34907
|
traits: [],
|
|
35039
34908
|
ticks: [],
|
|
35040
34909
|
guards: [],
|
|
@@ -35048,7 +34917,7 @@ function useDebugData() {
|
|
|
35048
34917
|
},
|
|
35049
34918
|
lastUpdate: Date.now()
|
|
35050
34919
|
}));
|
|
35051
|
-
|
|
34920
|
+
React126.useEffect(() => {
|
|
35052
34921
|
const updateData = () => {
|
|
35053
34922
|
setData({
|
|
35054
34923
|
traits: getAllTraits(),
|
|
@@ -35157,12 +35026,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
35157
35026
|
return positions;
|
|
35158
35027
|
}
|
|
35159
35028
|
function WalkMinimap() {
|
|
35160
|
-
const [walkStep, setWalkStep] =
|
|
35161
|
-
const [traits2, setTraits] =
|
|
35162
|
-
const [coveredEdges, setCoveredEdges] =
|
|
35163
|
-
const [completedTraits, setCompletedTraits] =
|
|
35164
|
-
const prevTraitRef =
|
|
35165
|
-
|
|
35029
|
+
const [walkStep, setWalkStep] = React126.useState(null);
|
|
35030
|
+
const [traits2, setTraits] = React126.useState([]);
|
|
35031
|
+
const [coveredEdges, setCoveredEdges] = React126.useState([]);
|
|
35032
|
+
const [completedTraits, setCompletedTraits] = React126.useState(/* @__PURE__ */ new Set());
|
|
35033
|
+
const prevTraitRef = React126.useRef(null);
|
|
35034
|
+
React126.useEffect(() => {
|
|
35166
35035
|
const interval = setInterval(() => {
|
|
35167
35036
|
const w = window;
|
|
35168
35037
|
const step = w.__orbitalWalkStep;
|
|
@@ -35609,15 +35478,15 @@ var init_EntitiesTab = __esm({
|
|
|
35609
35478
|
}
|
|
35610
35479
|
});
|
|
35611
35480
|
function EventFlowTab({ events: events2 }) {
|
|
35612
|
-
const [filter, setFilter] =
|
|
35613
|
-
const containerRef =
|
|
35614
|
-
const [autoScroll, setAutoScroll] =
|
|
35615
|
-
|
|
35481
|
+
const [filter, setFilter] = React126.useState("all");
|
|
35482
|
+
const containerRef = React126.useRef(null);
|
|
35483
|
+
const [autoScroll, setAutoScroll] = React126.useState(true);
|
|
35484
|
+
React126.useEffect(() => {
|
|
35616
35485
|
if (autoScroll && containerRef.current) {
|
|
35617
35486
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35618
35487
|
}
|
|
35619
35488
|
}, [events2.length, autoScroll]);
|
|
35620
|
-
const filteredEvents =
|
|
35489
|
+
const filteredEvents = React126.useMemo(() => {
|
|
35621
35490
|
if (filter === "all") return events2;
|
|
35622
35491
|
return events2.filter((e) => e.type === filter);
|
|
35623
35492
|
}, [events2, filter]);
|
|
@@ -35736,7 +35605,7 @@ var init_EventFlowTab = __esm({
|
|
|
35736
35605
|
}
|
|
35737
35606
|
});
|
|
35738
35607
|
function GuardsPanel({ guards }) {
|
|
35739
|
-
const [filter, setFilter] =
|
|
35608
|
+
const [filter, setFilter] = React126.useState("all");
|
|
35740
35609
|
if (guards.length === 0) {
|
|
35741
35610
|
return /* @__PURE__ */ jsx(
|
|
35742
35611
|
EmptyState,
|
|
@@ -35749,7 +35618,7 @@ function GuardsPanel({ guards }) {
|
|
|
35749
35618
|
}
|
|
35750
35619
|
const passedCount = guards.filter((g) => g.result).length;
|
|
35751
35620
|
const failedCount = guards.length - passedCount;
|
|
35752
|
-
const filteredGuards =
|
|
35621
|
+
const filteredGuards = React126.useMemo(() => {
|
|
35753
35622
|
if (filter === "all") return guards;
|
|
35754
35623
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
35755
35624
|
return guards.filter((g) => !g.result);
|
|
@@ -35910,10 +35779,10 @@ function EffectBadge({ effect }) {
|
|
|
35910
35779
|
] });
|
|
35911
35780
|
}
|
|
35912
35781
|
function TransitionTimeline({ transitions }) {
|
|
35913
|
-
const containerRef =
|
|
35914
|
-
const [autoScroll, setAutoScroll] =
|
|
35915
|
-
const [expandedId, setExpandedId] =
|
|
35916
|
-
|
|
35782
|
+
const containerRef = React126.useRef(null);
|
|
35783
|
+
const [autoScroll, setAutoScroll] = React126.useState(true);
|
|
35784
|
+
const [expandedId, setExpandedId] = React126.useState(null);
|
|
35785
|
+
React126.useEffect(() => {
|
|
35917
35786
|
if (autoScroll && containerRef.current) {
|
|
35918
35787
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
35919
35788
|
}
|
|
@@ -36199,9 +36068,9 @@ function getAllEvents(traits2) {
|
|
|
36199
36068
|
}
|
|
36200
36069
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
36201
36070
|
const eventBus = useEventBus();
|
|
36202
|
-
const [log4, setLog] =
|
|
36203
|
-
const prevStatesRef =
|
|
36204
|
-
|
|
36071
|
+
const [log4, setLog] = React126.useState([]);
|
|
36072
|
+
const prevStatesRef = React126.useRef(/* @__PURE__ */ new Map());
|
|
36073
|
+
React126.useEffect(() => {
|
|
36205
36074
|
for (const trait of traits2) {
|
|
36206
36075
|
const prev = prevStatesRef.current.get(trait.id);
|
|
36207
36076
|
if (prev && prev !== trait.currentState) {
|
|
@@ -36371,10 +36240,10 @@ function VerifyModePanel({
|
|
|
36371
36240
|
serverCount,
|
|
36372
36241
|
localCount
|
|
36373
36242
|
}) {
|
|
36374
|
-
const [expanded, setExpanded] =
|
|
36375
|
-
const scrollRef =
|
|
36376
|
-
const prevCountRef =
|
|
36377
|
-
|
|
36243
|
+
const [expanded, setExpanded] = React126.useState(true);
|
|
36244
|
+
const scrollRef = React126.useRef(null);
|
|
36245
|
+
const prevCountRef = React126.useRef(0);
|
|
36246
|
+
React126.useEffect(() => {
|
|
36378
36247
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
36379
36248
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
36380
36249
|
}
|
|
@@ -36440,10 +36309,10 @@ function RuntimeDebugger({
|
|
|
36440
36309
|
defaultTab,
|
|
36441
36310
|
schema
|
|
36442
36311
|
}) {
|
|
36443
|
-
const [isCollapsed, setIsCollapsed] =
|
|
36444
|
-
const [isVisible, setIsVisible] =
|
|
36312
|
+
const [isCollapsed, setIsCollapsed] = React126.useState(mode === "verify" ? true : defaultCollapsed);
|
|
36313
|
+
const [isVisible, setIsVisible] = React126.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
36445
36314
|
const debugData = useDebugData();
|
|
36446
|
-
|
|
36315
|
+
React126.useEffect(() => {
|
|
36447
36316
|
if (mode === "inline") return;
|
|
36448
36317
|
return onDebugToggle((enabled) => {
|
|
36449
36318
|
setIsVisible(enabled);
|
|
@@ -36452,7 +36321,7 @@ function RuntimeDebugger({
|
|
|
36452
36321
|
}
|
|
36453
36322
|
});
|
|
36454
36323
|
}, [mode]);
|
|
36455
|
-
|
|
36324
|
+
React126.useEffect(() => {
|
|
36456
36325
|
if (mode === "inline") return;
|
|
36457
36326
|
const handleKeyDown = (e) => {
|
|
36458
36327
|
if (e.key === "`" && isVisible) {
|
|
@@ -37001,7 +36870,7 @@ function SequenceBar({
|
|
|
37001
36870
|
onSlotRemove(index);
|
|
37002
36871
|
}, [onSlotRemove, playing]);
|
|
37003
36872
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
37004
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
36873
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
37005
36874
|
i > 0 && /* @__PURE__ */ jsx(
|
|
37006
36875
|
Typography,
|
|
37007
36876
|
{
|
|
@@ -38346,7 +38215,7 @@ var init_StatCard2 = __esm({
|
|
|
38346
38215
|
const labelToUse = propLabel ?? propTitle;
|
|
38347
38216
|
const eventBus = useEventBus();
|
|
38348
38217
|
const { t } = useTranslate();
|
|
38349
|
-
const handleActionClick =
|
|
38218
|
+
const handleActionClick = React126__default.useCallback(() => {
|
|
38350
38219
|
if (action?.event) {
|
|
38351
38220
|
eventBus.emit(`UI:${action.event}`, {});
|
|
38352
38221
|
}
|
|
@@ -38357,7 +38226,7 @@ var init_StatCard2 = __esm({
|
|
|
38357
38226
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38358
38227
|
const isLoading = externalLoading ?? false;
|
|
38359
38228
|
const error = externalError;
|
|
38360
|
-
const computeMetricValue =
|
|
38229
|
+
const computeMetricValue = React126__default.useCallback(
|
|
38361
38230
|
(metric, items) => {
|
|
38362
38231
|
if (metric.value !== void 0) {
|
|
38363
38232
|
return metric.value;
|
|
@@ -38396,7 +38265,7 @@ var init_StatCard2 = __esm({
|
|
|
38396
38265
|
},
|
|
38397
38266
|
[]
|
|
38398
38267
|
);
|
|
38399
|
-
const schemaStats =
|
|
38268
|
+
const schemaStats = React126__default.useMemo(() => {
|
|
38400
38269
|
if (!metrics || metrics.length === 0) return null;
|
|
38401
38270
|
return metrics.map((metric) => ({
|
|
38402
38271
|
label: metric.label,
|
|
@@ -38404,7 +38273,7 @@ var init_StatCard2 = __esm({
|
|
|
38404
38273
|
format: metric.format
|
|
38405
38274
|
}));
|
|
38406
38275
|
}, [metrics, data, computeMetricValue]);
|
|
38407
|
-
const calculatedTrend =
|
|
38276
|
+
const calculatedTrend = React126__default.useMemo(() => {
|
|
38408
38277
|
if (manualTrend !== void 0) return manualTrend;
|
|
38409
38278
|
if (previousValue === void 0 || currentValue === void 0)
|
|
38410
38279
|
return void 0;
|
|
@@ -39388,7 +39257,7 @@ var init_Timeline = __esm({
|
|
|
39388
39257
|
}) => {
|
|
39389
39258
|
const { t } = useTranslate();
|
|
39390
39259
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39391
|
-
const items =
|
|
39260
|
+
const items = React126__default.useMemo(() => {
|
|
39392
39261
|
if (propItems) return propItems;
|
|
39393
39262
|
if (entityData.length === 0) return [];
|
|
39394
39263
|
return entityData.map((record, idx) => {
|
|
@@ -39492,7 +39361,7 @@ var init_Timeline = __esm({
|
|
|
39492
39361
|
}
|
|
39493
39362
|
});
|
|
39494
39363
|
function extractToastProps(children) {
|
|
39495
|
-
if (!
|
|
39364
|
+
if (!React126__default.isValidElement(children)) {
|
|
39496
39365
|
if (typeof children === "string") {
|
|
39497
39366
|
return { message: children };
|
|
39498
39367
|
}
|
|
@@ -39530,7 +39399,7 @@ var init_ToastSlot = __esm({
|
|
|
39530
39399
|
eventBus.emit("UI:CLOSE");
|
|
39531
39400
|
};
|
|
39532
39401
|
if (!isVisible) return null;
|
|
39533
|
-
const isCustomContent =
|
|
39402
|
+
const isCustomContent = React126__default.isValidElement(children) && !message;
|
|
39534
39403
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
39535
39404
|
Toast,
|
|
39536
39405
|
{
|
|
@@ -39799,7 +39668,7 @@ var init_WizardContainer = __esm({
|
|
|
39799
39668
|
const isCompleted = index < currentStep;
|
|
39800
39669
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
39801
39670
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
39802
|
-
return /* @__PURE__ */ jsxs(
|
|
39671
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
39803
39672
|
/* @__PURE__ */ jsx(
|
|
39804
39673
|
Button,
|
|
39805
39674
|
{
|
|
@@ -41988,7 +41857,7 @@ function UnitRenderer({
|
|
|
41988
41857
|
onAnimationStateChange,
|
|
41989
41858
|
animationSpeed = 1
|
|
41990
41859
|
}) {
|
|
41991
|
-
const handleUnitClick =
|
|
41860
|
+
const handleUnitClick = React126__default.useCallback(
|
|
41992
41861
|
(unit) => {
|
|
41993
41862
|
onUnitClick?.(unit);
|
|
41994
41863
|
},
|
|
@@ -45182,7 +45051,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45182
45051
|
const handleTraitClick = useCallback((name) => {
|
|
45183
45052
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
45184
45053
|
}, []);
|
|
45185
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
45054
|
+
const [highlightedTrait, setHighlightedTrait] = React126__default.useState(null);
|
|
45186
45055
|
const handleTransitionClick = useCallback((index) => {
|
|
45187
45056
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
45188
45057
|
}, []);
|
|
@@ -45269,7 +45138,7 @@ var init_Avl3DViewer = __esm({
|
|
|
45269
45138
|
gap: "xs",
|
|
45270
45139
|
align: "center",
|
|
45271
45140
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
45272
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
45141
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
45273
45142
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
45274
45143
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
45275
45144
|
Box,
|
|
@@ -45647,12 +45516,12 @@ var init_three = __esm({
|
|
|
45647
45516
|
}
|
|
45648
45517
|
});
|
|
45649
45518
|
function lazyThree(name, loader) {
|
|
45650
|
-
const Lazy =
|
|
45519
|
+
const Lazy = React126__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45651
45520
|
function ThreeWrapper(props) {
|
|
45652
|
-
return
|
|
45653
|
-
|
|
45521
|
+
return React126__default.createElement(
|
|
45522
|
+
React126__default.Suspense,
|
|
45654
45523
|
{ fallback: null },
|
|
45655
|
-
|
|
45524
|
+
React126__default.createElement(Lazy, props)
|
|
45656
45525
|
);
|
|
45657
45526
|
}
|
|
45658
45527
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -46140,7 +46009,7 @@ function SuspenseConfigProvider({
|
|
|
46140
46009
|
config,
|
|
46141
46010
|
children
|
|
46142
46011
|
}) {
|
|
46143
|
-
return
|
|
46012
|
+
return React126__default.createElement(
|
|
46144
46013
|
SuspenseConfigContext.Provider,
|
|
46145
46014
|
{ value: config },
|
|
46146
46015
|
children
|
|
@@ -46570,7 +46439,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46570
46439
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46571
46440
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46572
46441
|
}
|
|
46573
|
-
return /* @__PURE__ */ jsx(
|
|
46442
|
+
return /* @__PURE__ */ jsx(React126__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46574
46443
|
}
|
|
46575
46444
|
if (!child || typeof child !== "object") return null;
|
|
46576
46445
|
const childId = `${parentId}-${index}`;
|
|
@@ -46623,19 +46492,15 @@ function SlotContentRenderer({
|
|
|
46623
46492
|
patternPath
|
|
46624
46493
|
}) {
|
|
46625
46494
|
const entityProp = content.props.entity;
|
|
46626
|
-
|
|
46627
|
-
|
|
46628
|
-
|
|
46629
|
-
|
|
46630
|
-
|
|
46631
|
-
|
|
46632
|
-
|
|
46633
|
-
console.warn(
|
|
46634
|
-
`[UISlotRenderer] String-entity binding '${entityType}' is deprecated. Pass 'items' or 'entity' as a value prop resolved from @payload.data. See docs/Almadar_Entity_V2_Plan.md \xA75.`
|
|
46635
|
-
);
|
|
46636
|
-
}, [entityType]);
|
|
46495
|
+
if (typeof entityProp === "string" && entityProp.length > 0) {
|
|
46496
|
+
if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production") {
|
|
46497
|
+
throw new Error(
|
|
46498
|
+
`[UISlotRenderer] Received string 'entity: "${entityProp}"' at render time. The V2 flow requires pre-resolved data; declare a fetch success listener and pass 'entity: @payload.data'. See docs/Almadar_Entity_V2_Plan.md \xA76.`
|
|
46499
|
+
);
|
|
46500
|
+
}
|
|
46501
|
+
}
|
|
46637
46502
|
const schemaCtx = useEntitySchemaOptional();
|
|
46638
|
-
const entityDef =
|
|
46503
|
+
const entityDef = typeof entityProp === "string" && entityProp.length > 0 && schemaCtx ? schemaCtx.entities.get(entityProp) : void 0;
|
|
46639
46504
|
const PatternComponent = getComponentForPattern(content.pattern);
|
|
46640
46505
|
if (PatternComponent) {
|
|
46641
46506
|
const childrenConfig = content.props.children;
|
|
@@ -46644,15 +46509,10 @@ function SlotContentRenderer({
|
|
|
46644
46509
|
const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath) : void 0;
|
|
46645
46510
|
const { children: _childrenConfig, ...restProps } = content.props;
|
|
46646
46511
|
const renderedProps = renderPatternProps(restProps, onDismiss);
|
|
46647
|
-
|
|
46648
|
-
const resolvedItems = Array.isArray(
|
|
46649
|
-
|
|
46650
|
-
|
|
46651
|
-
} else if (Array.isArray(renderedProps.items)) {
|
|
46652
|
-
finalProps = { ...renderedProps, entity: renderedProps.items };
|
|
46653
|
-
} else {
|
|
46654
|
-
finalProps = renderedProps;
|
|
46655
|
-
}
|
|
46512
|
+
const finalProps = renderedProps;
|
|
46513
|
+
const resolvedItems = Array.isArray(
|
|
46514
|
+
finalProps.entity
|
|
46515
|
+
) ? finalProps.entity : null;
|
|
46656
46516
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
46657
46517
|
const sample = resolvedItems[0];
|
|
46658
46518
|
if (sample && typeof sample === "object") {
|
|
@@ -46663,9 +46523,6 @@ function SlotContentRenderer({
|
|
|
46663
46523
|
const isFormPattern = FORM_PATTERNS.has(content.pattern) || content.pattern.includes("form");
|
|
46664
46524
|
if (isFormPattern && entityDef && Array.isArray(finalProps.fields)) {
|
|
46665
46525
|
finalProps.fields = enrichFormFields(finalProps.fields, entityDef);
|
|
46666
|
-
if (finalProps.mode === "edit" && !finalProps.initialData && storeData.length > 0) {
|
|
46667
|
-
finalProps.initialData = storeData[0];
|
|
46668
|
-
}
|
|
46669
46526
|
}
|
|
46670
46527
|
const acceptsChildren = PATTERNS_WITH_CHILDREN.has(content.pattern);
|
|
46671
46528
|
return /* @__PURE__ */ jsx(
|
|
@@ -46759,11 +46616,10 @@ function UISlotRenderer({
|
|
|
46759
46616
|
}
|
|
46760
46617
|
return wrapped;
|
|
46761
46618
|
}
|
|
46762
|
-
var TRAIT_BINDING_RE,
|
|
46619
|
+
var TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
|
|
46763
46620
|
var init_UISlotRenderer = __esm({
|
|
46764
46621
|
"components/organisms/UISlotRenderer.tsx"() {
|
|
46765
46622
|
"use client";
|
|
46766
|
-
init_EntityStoreProvider();
|
|
46767
46623
|
init_EntitySchemaContext();
|
|
46768
46624
|
init_UISlotContext();
|
|
46769
46625
|
init_Modal();
|
|
@@ -46778,7 +46634,6 @@ var init_UISlotRenderer = __esm({
|
|
|
46778
46634
|
init_TraitFrame();
|
|
46779
46635
|
init_component_registry_generated();
|
|
46780
46636
|
TRAIT_BINDING_RE = /^@trait\.([A-Z][A-Za-z0-9]*)$/;
|
|
46781
|
-
STRING_ENTITY_WARNED = /* @__PURE__ */ new Set();
|
|
46782
46637
|
SuspenseConfigContext = createContext({ enabled: false });
|
|
46783
46638
|
SlotContainedContext = createContext(false);
|
|
46784
46639
|
SuspenseConfigProvider.displayName = "SuspenseConfigProvider";
|
|
@@ -47198,7 +47053,7 @@ var AvlTransition = ({
|
|
|
47198
47053
|
opacity = 1,
|
|
47199
47054
|
className
|
|
47200
47055
|
}) => {
|
|
47201
|
-
const ids =
|
|
47056
|
+
const ids = React126__default.useMemo(() => {
|
|
47202
47057
|
avlTransitionId += 1;
|
|
47203
47058
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47204
47059
|
}, []);
|
|
@@ -47963,7 +47818,7 @@ var AvlStateMachine = ({
|
|
|
47963
47818
|
color = "var(--color-primary)",
|
|
47964
47819
|
animated = false
|
|
47965
47820
|
}) => {
|
|
47966
|
-
const ids =
|
|
47821
|
+
const ids = React126__default.useMemo(() => {
|
|
47967
47822
|
avlSmId += 1;
|
|
47968
47823
|
const base = `avl-sm-${avlSmId}`;
|
|
47969
47824
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48158,7 +48013,7 @@ var AvlOrbitalUnit = ({
|
|
|
48158
48013
|
color = "var(--color-primary)",
|
|
48159
48014
|
animated = false
|
|
48160
48015
|
}) => {
|
|
48161
|
-
const ids =
|
|
48016
|
+
const ids = React126__default.useMemo(() => {
|
|
48162
48017
|
avlOuId += 1;
|
|
48163
48018
|
const base = `avl-ou-${avlOuId}`;
|
|
48164
48019
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48250,7 +48105,7 @@ var AvlClosedCircuit = ({
|
|
|
48250
48105
|
color = "var(--color-primary)",
|
|
48251
48106
|
animated = false
|
|
48252
48107
|
}) => {
|
|
48253
|
-
const ids =
|
|
48108
|
+
const ids = React126__default.useMemo(() => {
|
|
48254
48109
|
avlCcId += 1;
|
|
48255
48110
|
const base = `avl-cc-${avlCcId}`;
|
|
48256
48111
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48403,7 +48258,7 @@ var AvlEmitListen = ({
|
|
|
48403
48258
|
color = "var(--color-primary)",
|
|
48404
48259
|
animated = false
|
|
48405
48260
|
}) => {
|
|
48406
|
-
const ids =
|
|
48261
|
+
const ids = React126__default.useMemo(() => {
|
|
48407
48262
|
avlElId += 1;
|
|
48408
48263
|
const base = `avl-el-${avlElId}`;
|
|
48409
48264
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -48676,7 +48531,7 @@ function renderNode(node, color, glowId) {
|
|
|
48676
48531
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
48677
48532
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
48678
48533
|
const nc = nodeColor(node.type, color);
|
|
48679
|
-
return /* @__PURE__ */ jsxs(
|
|
48534
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
48680
48535
|
node.children.map((child, i) => {
|
|
48681
48536
|
const childR = Math.max(
|
|
48682
48537
|
child.type === "operator" ? 20 : 16,
|
|
@@ -48733,7 +48588,7 @@ var AvlExprTree = ({
|
|
|
48733
48588
|
className,
|
|
48734
48589
|
color = "var(--color-primary)"
|
|
48735
48590
|
}) => {
|
|
48736
|
-
const ids =
|
|
48591
|
+
const ids = React126__default.useMemo(() => {
|
|
48737
48592
|
avlEtId += 1;
|
|
48738
48593
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
48739
48594
|
}, []);
|
|
@@ -49707,7 +49562,7 @@ var SystemNode = ({ data }) => {
|
|
|
49707
49562
|
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) => {
|
|
49708
49563
|
const tc = transitionCounts[s.name] ?? 0;
|
|
49709
49564
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
49710
|
-
return /* @__PURE__ */ jsxs(
|
|
49565
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
49711
49566
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
49712
49567
|
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 })
|
|
49713
49568
|
] }, s.name);
|
|
@@ -49747,7 +49602,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
49747
49602
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
49748
49603
|
const tc = transitionCounts[s.name] ?? 0;
|
|
49749
49604
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
49750
|
-
return /* @__PURE__ */ jsxs(
|
|
49605
|
+
return /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
49751
49606
|
/* @__PURE__ */ jsx(
|
|
49752
49607
|
AvlState,
|
|
49753
49608
|
{
|
|
@@ -50714,7 +50569,6 @@ init_Typography();
|
|
|
50714
50569
|
|
|
50715
50570
|
// providers/OrbitalProvider.tsx
|
|
50716
50571
|
init_ThemeContext();
|
|
50717
|
-
init_EntityStoreProvider();
|
|
50718
50572
|
init_EventBusProvider();
|
|
50719
50573
|
|
|
50720
50574
|
// providers/SelectionProvider.tsx
|
|
@@ -50787,13 +50641,13 @@ function SelectionProvider({
|
|
|
50787
50641
|
unsubCancel();
|
|
50788
50642
|
};
|
|
50789
50643
|
}, [eventBus, setSelected, clearSelection, debug2]);
|
|
50790
|
-
const
|
|
50644
|
+
const contextValue = {
|
|
50791
50645
|
selected,
|
|
50792
50646
|
setSelected,
|
|
50793
50647
|
clearSelection,
|
|
50794
50648
|
isSelected
|
|
50795
50649
|
};
|
|
50796
|
-
return /* @__PURE__ */ jsx(SelectionContext.Provider, { value:
|
|
50650
|
+
return /* @__PURE__ */ jsx(SelectionContext.Provider, { value: contextValue, children });
|
|
50797
50651
|
}
|
|
50798
50652
|
|
|
50799
50653
|
// providers/OrbitalProvider.tsx
|
|
@@ -51000,7 +50854,7 @@ function OrbitalProvider({
|
|
|
51000
50854
|
() => ({ enabled: suspense }),
|
|
51001
50855
|
[suspense]
|
|
51002
50856
|
);
|
|
51003
|
-
const inner = /* @__PURE__ */ jsx(
|
|
50857
|
+
const inner = /* @__PURE__ */ jsx(EventBusProvider, { debug: debug2, children: /* @__PURE__ */ jsx(VerificationProvider, { enabled: verification, children: /* @__PURE__ */ jsx(SelectionProvider, { debug: debug2, children: /* @__PURE__ */ jsx(SuspenseConfigProvider, { config: suspenseConfig, children }) }) }) });
|
|
51004
50858
|
if (skipTheme) {
|
|
51005
50859
|
return inner;
|
|
51006
50860
|
}
|
|
@@ -51689,7 +51543,6 @@ function ServerBridgeProvider({
|
|
|
51689
51543
|
|
|
51690
51544
|
// runtime/OrbPreview.tsx
|
|
51691
51545
|
init_navigation();
|
|
51692
|
-
init_EntityStoreProvider();
|
|
51693
51546
|
init_verificationRegistry();
|
|
51694
51547
|
function generateEntityRow(entity, idx) {
|
|
51695
51548
|
const row = { id: String(idx) };
|
|
@@ -51734,7 +51587,7 @@ function buildMockData(schema) {
|
|
|
51734
51587
|
}
|
|
51735
51588
|
return result;
|
|
51736
51589
|
}
|
|
51737
|
-
function
|
|
51590
|
+
function isInlineTrait2(traitRef) {
|
|
51738
51591
|
return typeof traitRef === "object" && traitRef !== null && "stateMachine" in traitRef;
|
|
51739
51592
|
}
|
|
51740
51593
|
function findDataState(sm, initialStateName) {
|
|
@@ -51766,7 +51619,7 @@ function adjustSchemaForMockData(schema, mockData) {
|
|
|
51766
51619
|
const updatedOrbitals = schema.orbitals.map((orbital) => {
|
|
51767
51620
|
const traits2 = orbital.traits ?? [];
|
|
51768
51621
|
const updatedTraits = traits2.map((traitRef) => {
|
|
51769
|
-
if (!
|
|
51622
|
+
if (!isInlineTrait2(traitRef)) return traitRef;
|
|
51770
51623
|
const updated = rewriteTraitInitialState(traitRef, mockData);
|
|
51771
51624
|
if (updated !== traitRef) changed = true;
|
|
51772
51625
|
return updated;
|
|
@@ -51844,23 +51697,14 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51844
51697
|
const slotsActions = useSlotsActions();
|
|
51845
51698
|
const bridge = useServerBridge();
|
|
51846
51699
|
const uiSlots = useUISlots();
|
|
51847
|
-
const entityStore = useEntityStore();
|
|
51848
51700
|
const onEventProcessed = useCallback(async (event, payload) => {
|
|
51849
51701
|
if (!bridge.connected || !orbitalNames?.length) return;
|
|
51850
51702
|
for (const name of orbitalNames) {
|
|
51851
51703
|
const { effects, meta } = await bridge.sendEvent(name, event, payload);
|
|
51852
51704
|
recordServerResponse(name, event, meta);
|
|
51853
|
-
const responseData = meta?.data;
|
|
51854
|
-
if (responseData) {
|
|
51855
|
-
for (const [entityType, records] of Object.entries(responseData)) {
|
|
51856
|
-
if (Array.isArray(records)) {
|
|
51857
|
-
entityStore.setAll(entityType, records);
|
|
51858
|
-
}
|
|
51859
|
-
}
|
|
51860
|
-
}
|
|
51861
51705
|
applyServerEffects(effects, uiSlots, onNavigate);
|
|
51862
51706
|
}
|
|
51863
|
-
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate
|
|
51707
|
+
}, [bridge.connected, bridge.sendEvent, orbitalNames, uiSlots, onNavigate]);
|
|
51864
51708
|
const opts = orbitalNames ? { onEventProcessed, navigate: onNavigate } : { navigate: onNavigate };
|
|
51865
51709
|
const { sendEvent } = useTraitStateMachine(traits2, slotsActions, opts);
|
|
51866
51710
|
const initSentRef = useRef(false);
|
|
@@ -51900,14 +51744,6 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
51900
51744
|
effects: effectTraces,
|
|
51901
51745
|
timestamp: Date.now()
|
|
51902
51746
|
});
|
|
51903
|
-
const initResponseData = meta?.data;
|
|
51904
|
-
if (initResponseData) {
|
|
51905
|
-
for (const [entityType, records] of Object.entries(initResponseData)) {
|
|
51906
|
-
if (Array.isArray(records)) {
|
|
51907
|
-
entityStore.setAll(entityType, records);
|
|
51908
|
-
}
|
|
51909
|
-
}
|
|
51910
|
-
}
|
|
51911
51747
|
applyServerEffects(effects, uiSlots, onNavigate);
|
|
51912
51748
|
}
|
|
51913
51749
|
})();
|
|
@@ -51940,19 +51776,6 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
51940
51776
|
if (!orbitals) return [];
|
|
51941
51777
|
return orbitals.filter((o) => typeof o.name === "string").map((o) => o.name);
|
|
51942
51778
|
}, [schema]);
|
|
51943
|
-
const entityStore = useEntityStore();
|
|
51944
|
-
const seededRef = useRef("");
|
|
51945
|
-
const mockKey = mockData ? Object.keys(mockData).sort().join(",") : "";
|
|
51946
|
-
React127__default.useLayoutEffect(() => {
|
|
51947
|
-
if (!serverUrl && mockData && seededRef.current !== mockKey) {
|
|
51948
|
-
seededRef.current = mockKey;
|
|
51949
|
-
for (const [entityType, records] of Object.entries(mockData)) {
|
|
51950
|
-
if (Array.isArray(records)) {
|
|
51951
|
-
entityStore.setAll(entityType, records);
|
|
51952
|
-
}
|
|
51953
|
-
}
|
|
51954
|
-
}
|
|
51955
|
-
}, [mockKey, serverUrl, mockData, entityStore]);
|
|
51956
51779
|
const inner = /* @__PURE__ */ jsx(VerificationProvider, { enabled: true, children: /* @__PURE__ */ jsx(SlotsProvider, { children: /* @__PURE__ */ jsxs(EntitySchemaProvider, { entities: Array.from(allEntities.values()), children: [
|
|
51957
51780
|
/* @__PURE__ */ jsx(
|
|
51958
51781
|
TraitInitializer,
|
|
@@ -52450,7 +52273,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
52450
52273
|
}
|
|
52451
52274
|
);
|
|
52452
52275
|
};
|
|
52453
|
-
var OrbPreviewNode =
|
|
52276
|
+
var OrbPreviewNode = React126__default.memo(OrbPreviewNodeInner);
|
|
52454
52277
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
52455
52278
|
var EventFlowEdgeInner = (props) => {
|
|
52456
52279
|
const {
|
|
@@ -52527,7 +52350,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
52527
52350
|
) })
|
|
52528
52351
|
] });
|
|
52529
52352
|
};
|
|
52530
|
-
var EventFlowEdge =
|
|
52353
|
+
var EventFlowEdge = React126__default.memo(EventFlowEdgeInner);
|
|
52531
52354
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
52532
52355
|
|
|
52533
52356
|
// components/molecules/avl/BehaviorComposeNode.tsx
|
|
@@ -52666,7 +52489,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
52666
52489
|
}
|
|
52667
52490
|
);
|
|
52668
52491
|
};
|
|
52669
|
-
var BehaviorComposeNode =
|
|
52492
|
+
var BehaviorComposeNode = React126__default.memo(BehaviorComposeNodeInner);
|
|
52670
52493
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
52671
52494
|
|
|
52672
52495
|
// components/molecules/avl/avl-behavior-compose-converter.ts
|
|
@@ -53606,7 +53429,7 @@ var ZoomBreadcrumb = ({
|
|
|
53606
53429
|
if (eventName && band === "detail") {
|
|
53607
53430
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
53608
53431
|
}
|
|
53609
|
-
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-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
53432
|
+
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-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
53610
53433
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
53611
53434
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
53612
53435
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -54065,7 +53888,7 @@ var EventWireOverlay = ({
|
|
|
54065
53888
|
containerW,
|
|
54066
53889
|
containerH
|
|
54067
53890
|
}) => {
|
|
54068
|
-
const ids =
|
|
53891
|
+
const ids = React126__default.useMemo(() => {
|
|
54069
53892
|
avlOczWireId += 1;
|
|
54070
53893
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
54071
53894
|
}, []);
|
|
@@ -54383,7 +54206,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
54383
54206
|
borderRadius: 6,
|
|
54384
54207
|
border: `1px solid ${color}`
|
|
54385
54208
|
},
|
|
54386
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
54209
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React126__default.Fragment, { children: [
|
|
54387
54210
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
54388
54211
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
54389
54212
|
Box,
|