@almadar/ui 5.112.0 → 5.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +278 -1073
- package/dist/avl/index.js +273 -1068
- package/dist/{avl-schema-parser-DKRm-nyh.d.cts → avl-schema-parser-B8Onmfsu.d.cts} +2 -220
- package/dist/{avl-schema-parser-DKRm-nyh.d.ts → avl-schema-parser-B8Onmfsu.d.ts} +2 -220
- package/dist/{cn-BbPvQLHt.d.ts → cn-D3H9UzCW.d.cts} +2 -1
- package/dist/{cn-BbPvQLHt.d.cts → cn-Dm0VrLRG.d.ts} +2 -1
- package/dist/components/index.cjs +124 -685
- package/dist/components/index.d.cts +9 -4
- package/dist/components/index.d.ts +9 -4
- package/dist/components/index.js +123 -684
- package/dist/lib/drawable/three/index.cjs +52 -37
- package/dist/lib/drawable/three/index.d.cts +5 -3
- package/dist/lib/drawable/three/index.d.ts +5 -3
- package/dist/lib/drawable/three/index.js +52 -37
- package/dist/lib/index.d.cts +2 -1
- package/dist/lib/index.d.ts +2 -1
- package/dist/marketing/index.cjs +16 -637
- package/dist/marketing/index.js +16 -637
- package/dist/paintDispatch-BXJgISot.d.cts +223 -0
- package/dist/paintDispatch-BXJgISot.d.ts +223 -0
- package/dist/providers/index.cjs +124 -685
- package/dist/providers/index.js +123 -684
- package/dist/runtime/index.cjs +305 -1107
- package/dist/runtime/index.d.cts +11 -112
- package/dist/runtime/index.d.ts +11 -112
- package/dist/runtime/index.js +268 -1096
- package/package.json +3 -3
package/dist/runtime/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ var reactDom = require('react-dom');
|
|
|
11
11
|
var hooks = require('@almadar/ui/hooks');
|
|
12
12
|
var context = require('@almadar/ui/context');
|
|
13
13
|
var evaluator = require('@almadar/evaluator');
|
|
14
|
+
var ui = require('@almadar/runtime/ui');
|
|
14
15
|
var reactRouterDom = require('react-router-dom');
|
|
15
16
|
var ELK = require('elkjs/lib/elk.bundled.js');
|
|
16
17
|
var SyntaxHighlighter = require('react-syntax-highlighter/dist/esm/prism-light.js');
|
|
@@ -43,6 +44,7 @@ var utilities = require('@dnd-kit/utilities');
|
|
|
43
44
|
var react = require('@xyflow/react');
|
|
44
45
|
var patterns = require('@almadar/core/patterns');
|
|
45
46
|
var runtime = require('@almadar/runtime');
|
|
47
|
+
var registry = require('@almadar/std/registry');
|
|
46
48
|
var OrbitalServerRuntime = require('@almadar/runtime/OrbitalServerRuntime');
|
|
47
49
|
|
|
48
50
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1062,41 +1064,6 @@ function kebabToPascal(name) {
|
|
|
1062
1064
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1063
1065
|
}).join("");
|
|
1064
1066
|
}
|
|
1065
|
-
function loadLib(key, importer) {
|
|
1066
|
-
let p = libPromises.get(key);
|
|
1067
|
-
if (!p) {
|
|
1068
|
-
p = importer();
|
|
1069
|
-
libPromises.set(key, p);
|
|
1070
|
-
}
|
|
1071
|
-
return p;
|
|
1072
|
-
}
|
|
1073
|
-
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
1074
|
-
const Lazy = React81__namespace.default.lazy(async () => {
|
|
1075
|
-
const lib = await loadLib(libKey, importer);
|
|
1076
|
-
const Comp = pick(lib);
|
|
1077
|
-
if (!Comp) {
|
|
1078
|
-
warnFallback(fallbackName, family);
|
|
1079
|
-
return { default: makeLucideAdapter(fallbackName, true) };
|
|
1080
|
-
}
|
|
1081
|
-
return { default: Comp };
|
|
1082
|
-
});
|
|
1083
|
-
const Wrapped = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
|
-
React81__namespace.default.Suspense,
|
|
1085
|
-
{
|
|
1086
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1087
|
-
"span",
|
|
1088
|
-
{
|
|
1089
|
-
"aria-hidden": true,
|
|
1090
|
-
className: props.className,
|
|
1091
|
-
style: { display: "inline-block", ...props.style }
|
|
1092
|
-
}
|
|
1093
|
-
),
|
|
1094
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Lazy, { ...props })
|
|
1095
|
-
}
|
|
1096
|
-
);
|
|
1097
|
-
Wrapped.displayName = `Lazy.${libKey}.${fallbackName}`;
|
|
1098
|
-
return Wrapped;
|
|
1099
|
-
}
|
|
1100
1067
|
function isComponentLike(v) {
|
|
1101
1068
|
return v != null && (typeof v === "function" || typeof v === "object");
|
|
1102
1069
|
}
|
|
@@ -1110,146 +1077,32 @@ function resolveLucide(name) {
|
|
|
1110
1077
|
if (isComponentLike(asIs)) return asIs;
|
|
1111
1078
|
return LucideIcons2__namespace.HelpCircle;
|
|
1112
1079
|
}
|
|
1113
|
-
function
|
|
1114
|
-
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
1115
|
-
return lazyFamilyIcon(
|
|
1116
|
-
"phosphor",
|
|
1117
|
-
() => import('@phosphor-icons/react'),
|
|
1118
|
-
(lib) => {
|
|
1119
|
-
const PhosphorComp = lib[target];
|
|
1120
|
-
if (!PhosphorComp) return null;
|
|
1121
|
-
const Component = PhosphorComp;
|
|
1122
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1123
|
-
Component,
|
|
1124
|
-
{
|
|
1125
|
-
weight,
|
|
1126
|
-
className: props.className,
|
|
1127
|
-
style: props.style,
|
|
1128
|
-
size: props.size ?? "1em"
|
|
1129
|
-
}
|
|
1130
|
-
);
|
|
1131
|
-
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
1132
|
-
return Adapter;
|
|
1133
|
-
},
|
|
1134
|
-
name,
|
|
1135
|
-
family
|
|
1136
|
-
);
|
|
1137
|
-
}
|
|
1138
|
-
function resolveTabler(name, family) {
|
|
1139
|
-
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
1140
|
-
const target = `Icon${suffix}`;
|
|
1141
|
-
return lazyFamilyIcon(
|
|
1142
|
-
"tabler",
|
|
1143
|
-
() => import('@tabler/icons-react'),
|
|
1144
|
-
(lib) => {
|
|
1145
|
-
const TablerComp = lib[target];
|
|
1146
|
-
if (!TablerComp) return null;
|
|
1147
|
-
const Component = TablerComp;
|
|
1148
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
|
-
Component,
|
|
1150
|
-
{
|
|
1151
|
-
stroke: props.strokeWidth ?? 1.5,
|
|
1152
|
-
className: props.className,
|
|
1153
|
-
style: props.style,
|
|
1154
|
-
size: props.size ?? 24
|
|
1155
|
-
}
|
|
1156
|
-
);
|
|
1157
|
-
Adapter.displayName = `Tabler.${target}`;
|
|
1158
|
-
return Adapter;
|
|
1159
|
-
},
|
|
1160
|
-
name,
|
|
1161
|
-
family
|
|
1162
|
-
);
|
|
1163
|
-
}
|
|
1164
|
-
function resolveFa(name, family) {
|
|
1165
|
-
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
1166
|
-
const target = `Fa${suffix}`;
|
|
1167
|
-
return lazyFamilyIcon(
|
|
1168
|
-
"fa",
|
|
1169
|
-
() => import('react-icons/fa'),
|
|
1170
|
-
(lib) => {
|
|
1171
|
-
const FaComp = lib[target];
|
|
1172
|
-
if (!FaComp) return null;
|
|
1173
|
-
const Component = FaComp;
|
|
1174
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1175
|
-
Component,
|
|
1176
|
-
{
|
|
1177
|
-
className: props.className,
|
|
1178
|
-
style: props.style,
|
|
1179
|
-
size: props.size ?? "1em"
|
|
1180
|
-
}
|
|
1181
|
-
);
|
|
1182
|
-
Adapter.displayName = `Fa.${target}`;
|
|
1183
|
-
return Adapter;
|
|
1184
|
-
},
|
|
1185
|
-
name,
|
|
1186
|
-
family
|
|
1187
|
-
);
|
|
1188
|
-
}
|
|
1189
|
-
function warnFallback(name, family) {
|
|
1190
|
-
const key = `${family}::${name}`;
|
|
1191
|
-
if (warned.has(key)) return;
|
|
1192
|
-
warned.add(key);
|
|
1193
|
-
if (typeof console !== "undefined") {
|
|
1194
|
-
console.warn(
|
|
1195
|
-
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
1196
|
-
);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
function makeLucideAdapter(name, isFallback = false) {
|
|
1080
|
+
function makeLucideAdapter(name) {
|
|
1200
1081
|
const LucideComp = resolveLucide(name);
|
|
1201
|
-
const Adapter = (props) =>
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
}
|
|
1212
|
-
);
|
|
1213
|
-
};
|
|
1214
|
-
Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
|
|
1082
|
+
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1083
|
+
LucideComp,
|
|
1084
|
+
{
|
|
1085
|
+
className: props.className,
|
|
1086
|
+
strokeWidth: props.strokeWidth,
|
|
1087
|
+
style: props.style,
|
|
1088
|
+
size: props.size
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
1215
1092
|
return Adapter;
|
|
1216
1093
|
}
|
|
1217
|
-
function resolveIconForFamily(name,
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
// Non-lucide families resolve to a lazy, Suspense-wrapped component that
|
|
1222
|
-
// dynamic-imports the library on first render and falls back to lucide
|
|
1223
|
-
// internally when the family lacks the icon (see lazyFamilyIcon).
|
|
1224
|
-
case "phosphor-outline":
|
|
1225
|
-
return resolvePhosphor(name, "regular", family);
|
|
1226
|
-
case "phosphor-fill":
|
|
1227
|
-
return resolvePhosphor(name, "fill", family);
|
|
1228
|
-
case "phosphor-duotone":
|
|
1229
|
-
return resolvePhosphor(name, "duotone", family);
|
|
1230
|
-
case "tabler":
|
|
1231
|
-
return resolveTabler(name, family);
|
|
1232
|
-
case "fa-solid":
|
|
1233
|
-
return resolveFa(name, family);
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, libPromises, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
1094
|
+
function resolveIconForFamily(name, _family) {
|
|
1095
|
+
return makeLucideAdapter(name);
|
|
1096
|
+
}
|
|
1097
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases;
|
|
1237
1098
|
var init_iconFamily = __esm({
|
|
1238
1099
|
"lib/iconFamily.tsx"() {
|
|
1239
1100
|
"use client";
|
|
1240
1101
|
DEFAULT_FAMILY = "lucide";
|
|
1241
|
-
VALID_FAMILIES = [
|
|
1242
|
-
"lucide",
|
|
1243
|
-
"phosphor-outline",
|
|
1244
|
-
"phosphor-fill",
|
|
1245
|
-
"phosphor-duotone",
|
|
1246
|
-
"tabler",
|
|
1247
|
-
"fa-solid"
|
|
1248
|
-
];
|
|
1102
|
+
VALID_FAMILIES = [DEFAULT_FAMILY];
|
|
1249
1103
|
cachedFamily = null;
|
|
1250
1104
|
listeners = /* @__PURE__ */ new Set();
|
|
1251
1105
|
observer = null;
|
|
1252
|
-
libPromises = /* @__PURE__ */ new Map();
|
|
1253
1106
|
lucideAliases = {
|
|
1254
1107
|
close: LucideIcons2__namespace.X,
|
|
1255
1108
|
trash: LucideIcons2__namespace.Trash2,
|
|
@@ -1262,478 +1115,6 @@ var init_iconFamily = __esm({
|
|
|
1262
1115
|
"sort-asc": LucideIcons2__namespace.ArrowUpNarrowWide,
|
|
1263
1116
|
"sort-desc": LucideIcons2__namespace.ArrowDownNarrowWide
|
|
1264
1117
|
};
|
|
1265
|
-
phosphorAliases = {
|
|
1266
|
-
// lucide name → phosphor PascalCase name
|
|
1267
|
-
// Actions
|
|
1268
|
-
plus: "Plus",
|
|
1269
|
-
minus: "Minus",
|
|
1270
|
-
x: "X",
|
|
1271
|
-
check: "Check",
|
|
1272
|
-
close: "X",
|
|
1273
|
-
edit: "PencilSimple",
|
|
1274
|
-
pencil: "PencilSimple",
|
|
1275
|
-
trash: "Trash",
|
|
1276
|
-
save: "FloppyDisk",
|
|
1277
|
-
copy: "Copy",
|
|
1278
|
-
share: "Share",
|
|
1279
|
-
send: "PaperPlaneRight",
|
|
1280
|
-
download: "DownloadSimple",
|
|
1281
|
-
upload: "UploadSimple",
|
|
1282
|
-
archive: "Archive",
|
|
1283
|
-
refresh: "ArrowsClockwise",
|
|
1284
|
-
loader: "CircleNotch",
|
|
1285
|
-
link: "Link",
|
|
1286
|
-
paperclip: "Paperclip",
|
|
1287
|
-
// Navigation
|
|
1288
|
-
"chevron-down": "CaretDown",
|
|
1289
|
-
"chevron-up": "CaretUp",
|
|
1290
|
-
"chevron-left": "CaretLeft",
|
|
1291
|
-
"chevron-right": "CaretRight",
|
|
1292
|
-
"arrow-up": "ArrowUp",
|
|
1293
|
-
"arrow-down": "ArrowDown",
|
|
1294
|
-
"arrow-left": "ArrowLeft",
|
|
1295
|
-
"arrow-right": "ArrowRight",
|
|
1296
|
-
menu: "List",
|
|
1297
|
-
more: "DotsThree",
|
|
1298
|
-
"more-vertical": "DotsThreeVertical",
|
|
1299
|
-
"more-horizontal": "DotsThree",
|
|
1300
|
-
external: "ArrowSquareOut",
|
|
1301
|
-
"external-link": "ArrowSquareOut",
|
|
1302
|
-
// Files
|
|
1303
|
-
file: "File",
|
|
1304
|
-
"file-text": "FileText",
|
|
1305
|
-
"file-plus": "FilePlus",
|
|
1306
|
-
"file-minus": "FileMinus",
|
|
1307
|
-
folder: "Folder",
|
|
1308
|
-
"folder-open": "FolderOpen",
|
|
1309
|
-
document: "FileText",
|
|
1310
|
-
// Charts
|
|
1311
|
-
"bar-chart": "ChartBar",
|
|
1312
|
-
"bar-chart-2": "ChartBar",
|
|
1313
|
-
"bar-chart-3": "ChartBar",
|
|
1314
|
-
"line-chart": "ChartLine",
|
|
1315
|
-
"pie-chart": "ChartPie",
|
|
1316
|
-
activity: "Pulse",
|
|
1317
|
-
"trending-up": "TrendUp",
|
|
1318
|
-
"trending-down": "TrendDown",
|
|
1319
|
-
// Messages
|
|
1320
|
-
message: "ChatCircle",
|
|
1321
|
-
"message-circle": "ChatCircle",
|
|
1322
|
-
"message-square": "ChatText",
|
|
1323
|
-
"messages-square": "ChatsCircle",
|
|
1324
|
-
comment: "ChatCircle",
|
|
1325
|
-
comments: "ChatsCircle",
|
|
1326
|
-
inbox: "Tray",
|
|
1327
|
-
mail: "Envelope",
|
|
1328
|
-
envelope: "Envelope",
|
|
1329
|
-
// Status
|
|
1330
|
-
"alert-circle": "WarningCircle",
|
|
1331
|
-
"alert-triangle": "Warning",
|
|
1332
|
-
"check-circle": "CheckCircle",
|
|
1333
|
-
"x-circle": "XCircle",
|
|
1334
|
-
info: "Info",
|
|
1335
|
-
"help-circle": "Question",
|
|
1336
|
-
"life-buoy": "Lifebuoy",
|
|
1337
|
-
lifebuoy: "Lifebuoy",
|
|
1338
|
-
warning: "Warning",
|
|
1339
|
-
error: "WarningCircle",
|
|
1340
|
-
// Media
|
|
1341
|
-
image: "Image",
|
|
1342
|
-
video: "VideoCamera",
|
|
1343
|
-
film: "FilmStrip",
|
|
1344
|
-
camera: "Camera",
|
|
1345
|
-
music: "MusicNote",
|
|
1346
|
-
play: "Play",
|
|
1347
|
-
pause: "Pause",
|
|
1348
|
-
stop: "Stop",
|
|
1349
|
-
"skip-forward": "SkipForward",
|
|
1350
|
-
"skip-back": "SkipBack",
|
|
1351
|
-
volume: "SpeakerHigh",
|
|
1352
|
-
"volume-2": "SpeakerHigh",
|
|
1353
|
-
"volume-x": "SpeakerX",
|
|
1354
|
-
mic: "Microphone",
|
|
1355
|
-
"mic-off": "MicrophoneSlash",
|
|
1356
|
-
// People
|
|
1357
|
-
user: "User",
|
|
1358
|
-
users: "Users",
|
|
1359
|
-
"user-plus": "UserPlus",
|
|
1360
|
-
"user-check": "UserCheck",
|
|
1361
|
-
// Time
|
|
1362
|
-
calendar: "Calendar",
|
|
1363
|
-
clock: "Clock",
|
|
1364
|
-
timer: "Timer",
|
|
1365
|
-
// Location
|
|
1366
|
-
map: "MapTrifold",
|
|
1367
|
-
"map-pin": "MapPin",
|
|
1368
|
-
navigation: "NavigationArrow",
|
|
1369
|
-
compass: "Compass",
|
|
1370
|
-
globe: "Globe",
|
|
1371
|
-
target: "Target",
|
|
1372
|
-
// Project / layout
|
|
1373
|
-
kanban: "Kanban",
|
|
1374
|
-
list: "List",
|
|
1375
|
-
table: "Table",
|
|
1376
|
-
grid: "GridFour",
|
|
1377
|
-
layout: "Layout",
|
|
1378
|
-
columns: "Columns",
|
|
1379
|
-
rows: "Rows",
|
|
1380
|
-
// Misc
|
|
1381
|
-
bell: "Bell",
|
|
1382
|
-
bookmark: "Bookmark",
|
|
1383
|
-
briefcase: "Briefcase",
|
|
1384
|
-
flag: "Flag",
|
|
1385
|
-
tag: "Tag",
|
|
1386
|
-
tags: "Tag",
|
|
1387
|
-
star: "Star",
|
|
1388
|
-
heart: "Heart",
|
|
1389
|
-
home: "House",
|
|
1390
|
-
settings: "Gear",
|
|
1391
|
-
eye: "Eye",
|
|
1392
|
-
"eye-off": "EyeSlash",
|
|
1393
|
-
lock: "Lock",
|
|
1394
|
-
unlock: "LockOpen",
|
|
1395
|
-
key: "Key",
|
|
1396
|
-
shield: "Shield",
|
|
1397
|
-
search: "MagnifyingGlass",
|
|
1398
|
-
filter: "Funnel",
|
|
1399
|
-
"sort-asc": "SortAscending",
|
|
1400
|
-
"sort-desc": "SortDescending",
|
|
1401
|
-
zap: "Lightning",
|
|
1402
|
-
sparkles: "Sparkle",
|
|
1403
|
-
// Code
|
|
1404
|
-
code: "Code",
|
|
1405
|
-
terminal: "Terminal",
|
|
1406
|
-
database: "Database",
|
|
1407
|
-
server: "HardDrives",
|
|
1408
|
-
cloud: "Cloud",
|
|
1409
|
-
wifi: "WifiHigh",
|
|
1410
|
-
package: "Package",
|
|
1411
|
-
box: "Package",
|
|
1412
|
-
// Theme
|
|
1413
|
-
sun: "Sun",
|
|
1414
|
-
moon: "Moon",
|
|
1415
|
-
// Phone
|
|
1416
|
-
phone: "Phone",
|
|
1417
|
-
printer: "Printer",
|
|
1418
|
-
// Hierarchy
|
|
1419
|
-
tree: "Tree",
|
|
1420
|
-
network: "Network"
|
|
1421
|
-
};
|
|
1422
|
-
tablerAliases = {
|
|
1423
|
-
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
1424
|
-
// Actions
|
|
1425
|
-
plus: "Plus",
|
|
1426
|
-
minus: "Minus",
|
|
1427
|
-
x: "X",
|
|
1428
|
-
check: "Check",
|
|
1429
|
-
close: "X",
|
|
1430
|
-
edit: "Pencil",
|
|
1431
|
-
pencil: "Pencil",
|
|
1432
|
-
trash: "Trash",
|
|
1433
|
-
save: "DeviceFloppy",
|
|
1434
|
-
copy: "Copy",
|
|
1435
|
-
share: "Share",
|
|
1436
|
-
send: "Send",
|
|
1437
|
-
download: "Download",
|
|
1438
|
-
upload: "Upload",
|
|
1439
|
-
archive: "Archive",
|
|
1440
|
-
refresh: "Refresh",
|
|
1441
|
-
loader: "Loader2",
|
|
1442
|
-
link: "Link",
|
|
1443
|
-
paperclip: "Paperclip",
|
|
1444
|
-
external: "ExternalLink",
|
|
1445
|
-
"external-link": "ExternalLink",
|
|
1446
|
-
// Navigation
|
|
1447
|
-
"chevron-down": "ChevronDown",
|
|
1448
|
-
"chevron-up": "ChevronUp",
|
|
1449
|
-
"chevron-left": "ChevronLeft",
|
|
1450
|
-
"chevron-right": "ChevronRight",
|
|
1451
|
-
"arrow-down": "ArrowDown",
|
|
1452
|
-
"arrow-up": "ArrowUp",
|
|
1453
|
-
"arrow-left": "ArrowLeft",
|
|
1454
|
-
"arrow-right": "ArrowRight",
|
|
1455
|
-
menu: "Menu2",
|
|
1456
|
-
more: "Dots",
|
|
1457
|
-
"more-vertical": "DotsVertical",
|
|
1458
|
-
// Files
|
|
1459
|
-
file: "File",
|
|
1460
|
-
"file-text": "FileText",
|
|
1461
|
-
"file-plus": "FilePlus",
|
|
1462
|
-
"file-check": "FileCheck",
|
|
1463
|
-
"file-minus": "FileMinus",
|
|
1464
|
-
folder: "Folder",
|
|
1465
|
-
"folder-open": "FolderOpen",
|
|
1466
|
-
document: "FileText",
|
|
1467
|
-
// Charts
|
|
1468
|
-
"bar-chart": "ChartBar",
|
|
1469
|
-
"bar-chart-2": "ChartBar",
|
|
1470
|
-
"bar-chart-3": "ChartBar",
|
|
1471
|
-
"line-chart": "ChartLine",
|
|
1472
|
-
"pie-chart": "ChartPie",
|
|
1473
|
-
activity: "Activity",
|
|
1474
|
-
"trending-up": "TrendingUp",
|
|
1475
|
-
"trending-down": "TrendingDown",
|
|
1476
|
-
// Messages
|
|
1477
|
-
message: "Message",
|
|
1478
|
-
"message-circle": "MessageCircle",
|
|
1479
|
-
"message-square": "Message2",
|
|
1480
|
-
"messages-square": "Messages",
|
|
1481
|
-
comment: "Message",
|
|
1482
|
-
comments: "Messages",
|
|
1483
|
-
inbox: "Inbox",
|
|
1484
|
-
mail: "Mail",
|
|
1485
|
-
envelope: "Mail",
|
|
1486
|
-
// Status
|
|
1487
|
-
"alert-circle": "AlertCircle",
|
|
1488
|
-
"alert-triangle": "AlertTriangle",
|
|
1489
|
-
"check-circle": "CircleCheck",
|
|
1490
|
-
"x-circle": "CircleX",
|
|
1491
|
-
info: "InfoCircle",
|
|
1492
|
-
"help-circle": "HelpCircle",
|
|
1493
|
-
"life-buoy": "Lifebuoy",
|
|
1494
|
-
warning: "AlertTriangle",
|
|
1495
|
-
error: "AlertOctagon",
|
|
1496
|
-
// Media
|
|
1497
|
-
image: "Photo",
|
|
1498
|
-
video: "Video",
|
|
1499
|
-
camera: "Camera",
|
|
1500
|
-
music: "Music",
|
|
1501
|
-
play: "PlayerPlay",
|
|
1502
|
-
pause: "PlayerPause",
|
|
1503
|
-
stop: "PlayerStop",
|
|
1504
|
-
"skip-forward": "PlayerSkipForward",
|
|
1505
|
-
"skip-back": "PlayerSkipBack",
|
|
1506
|
-
volume: "Volume",
|
|
1507
|
-
"volume-2": "Volume",
|
|
1508
|
-
"volume-x": "VolumeOff",
|
|
1509
|
-
mic: "Microphone",
|
|
1510
|
-
"mic-off": "MicrophoneOff",
|
|
1511
|
-
// People
|
|
1512
|
-
user: "User",
|
|
1513
|
-
users: "Users",
|
|
1514
|
-
"user-plus": "UserPlus",
|
|
1515
|
-
"user-check": "UserCheck",
|
|
1516
|
-
// Time
|
|
1517
|
-
calendar: "Calendar",
|
|
1518
|
-
clock: "Clock",
|
|
1519
|
-
timer: "Hourglass",
|
|
1520
|
-
// Location
|
|
1521
|
-
map: "Map",
|
|
1522
|
-
"map-pin": "MapPin",
|
|
1523
|
-
navigation: "Navigation",
|
|
1524
|
-
compass: "Compass",
|
|
1525
|
-
globe: "World",
|
|
1526
|
-
target: "Target",
|
|
1527
|
-
// Project / layout
|
|
1528
|
-
kanban: "LayoutKanban",
|
|
1529
|
-
list: "List",
|
|
1530
|
-
table: "Table",
|
|
1531
|
-
grid: "LayoutGrid",
|
|
1532
|
-
layout: "Layout",
|
|
1533
|
-
columns: "LayoutColumns",
|
|
1534
|
-
rows: "LayoutRows",
|
|
1535
|
-
// Misc
|
|
1536
|
-
bell: "Bell",
|
|
1537
|
-
bookmark: "Bookmark",
|
|
1538
|
-
briefcase: "Briefcase",
|
|
1539
|
-
flag: "Flag",
|
|
1540
|
-
tag: "Tag",
|
|
1541
|
-
tags: "Tags",
|
|
1542
|
-
star: "Star",
|
|
1543
|
-
heart: "Heart",
|
|
1544
|
-
home: "Home",
|
|
1545
|
-
settings: "Settings",
|
|
1546
|
-
eye: "Eye",
|
|
1547
|
-
"eye-off": "EyeOff",
|
|
1548
|
-
lock: "Lock",
|
|
1549
|
-
unlock: "LockOpen",
|
|
1550
|
-
key: "Key",
|
|
1551
|
-
shield: "Shield",
|
|
1552
|
-
search: "Search",
|
|
1553
|
-
filter: "Filter",
|
|
1554
|
-
"sort-asc": "SortAscending",
|
|
1555
|
-
"sort-desc": "SortDescending",
|
|
1556
|
-
zap: "Bolt",
|
|
1557
|
-
sparkles: "Sparkles",
|
|
1558
|
-
// Code / data
|
|
1559
|
-
code: "Code",
|
|
1560
|
-
terminal: "Terminal",
|
|
1561
|
-
database: "Database",
|
|
1562
|
-
server: "Server",
|
|
1563
|
-
cloud: "Cloud",
|
|
1564
|
-
wifi: "Wifi",
|
|
1565
|
-
package: "Package",
|
|
1566
|
-
box: "Box",
|
|
1567
|
-
// Theme
|
|
1568
|
-
sun: "Sun",
|
|
1569
|
-
moon: "Moon",
|
|
1570
|
-
// Phone
|
|
1571
|
-
phone: "Phone",
|
|
1572
|
-
printer: "Printer",
|
|
1573
|
-
// Hierarchy
|
|
1574
|
-
tree: "Hierarchy",
|
|
1575
|
-
network: "Network"
|
|
1576
|
-
};
|
|
1577
|
-
faAliases = {
|
|
1578
|
-
// lucide name → fa-solid suffix (after the `Fa` prefix).
|
|
1579
|
-
// react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
|
|
1580
|
-
// (FA renamed to `FaFileAlt`). When you see a console.warn from
|
|
1581
|
-
// [iconFamily] about an unmapped lucide name in this family, add the
|
|
1582
|
-
// closest FA5 sibling here so the fallback stays in-family.
|
|
1583
|
-
search: "Search",
|
|
1584
|
-
close: "Times",
|
|
1585
|
-
x: "Times",
|
|
1586
|
-
loader: "Spinner",
|
|
1587
|
-
refresh: "Sync",
|
|
1588
|
-
"sort-asc": "SortAmountUp",
|
|
1589
|
-
"sort-desc": "SortAmountDown",
|
|
1590
|
-
"chevron-down": "ChevronDown",
|
|
1591
|
-
"chevron-up": "ChevronUp",
|
|
1592
|
-
"chevron-left": "ChevronLeft",
|
|
1593
|
-
"chevron-right": "ChevronRight",
|
|
1594
|
-
"help-circle": "QuestionCircle",
|
|
1595
|
-
"alert-triangle": "ExclamationTriangle",
|
|
1596
|
-
"alert-circle": "ExclamationCircle",
|
|
1597
|
-
"check-circle": "CheckCircle",
|
|
1598
|
-
"x-circle": "TimesCircle",
|
|
1599
|
-
edit: "Edit",
|
|
1600
|
-
pencil: "PencilAlt",
|
|
1601
|
-
trash: "Trash",
|
|
1602
|
-
send: "PaperPlane",
|
|
1603
|
-
share: "ShareAlt",
|
|
1604
|
-
external: "ExternalLinkAlt",
|
|
1605
|
-
plus: "Plus",
|
|
1606
|
-
minus: "Minus",
|
|
1607
|
-
check: "Check",
|
|
1608
|
-
star: "Star",
|
|
1609
|
-
heart: "Heart",
|
|
1610
|
-
home: "Home",
|
|
1611
|
-
user: "User",
|
|
1612
|
-
users: "Users",
|
|
1613
|
-
"user-plus": "UserPlus",
|
|
1614
|
-
"user-check": "UserCheck",
|
|
1615
|
-
settings: "Cog",
|
|
1616
|
-
menu: "Bars",
|
|
1617
|
-
"arrow-up": "ArrowUp",
|
|
1618
|
-
"arrow-down": "ArrowDown",
|
|
1619
|
-
"arrow-left": "ArrowLeft",
|
|
1620
|
-
"arrow-right": "ArrowRight",
|
|
1621
|
-
copy: "Copy",
|
|
1622
|
-
download: "Download",
|
|
1623
|
-
upload: "Upload",
|
|
1624
|
-
filter: "Filter",
|
|
1625
|
-
calendar: "Calendar",
|
|
1626
|
-
clock: "Clock",
|
|
1627
|
-
bell: "Bell",
|
|
1628
|
-
mail: "Envelope",
|
|
1629
|
-
envelope: "Envelope",
|
|
1630
|
-
lock: "Lock",
|
|
1631
|
-
unlock: "LockOpen",
|
|
1632
|
-
eye: "Eye",
|
|
1633
|
-
"eye-off": "EyeSlash",
|
|
1634
|
-
more: "EllipsisH",
|
|
1635
|
-
"more-vertical": "EllipsisV",
|
|
1636
|
-
info: "InfoCircle",
|
|
1637
|
-
warning: "ExclamationTriangle",
|
|
1638
|
-
error: "ExclamationCircle",
|
|
1639
|
-
// Time
|
|
1640
|
-
timer: "Hourglass",
|
|
1641
|
-
// Files (FA renamed FileText → FileAlt)
|
|
1642
|
-
file: "File",
|
|
1643
|
-
"file-text": "FileAlt",
|
|
1644
|
-
"file-plus": "FileMedical",
|
|
1645
|
-
"file-minus": "FileExcel",
|
|
1646
|
-
"file-check": "FileSignature",
|
|
1647
|
-
document: "FileAlt",
|
|
1648
|
-
// Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
|
|
1649
|
-
"bar-chart": "ChartBar",
|
|
1650
|
-
"bar-chart-2": "ChartBar",
|
|
1651
|
-
"bar-chart-3": "ChartBar",
|
|
1652
|
-
"line-chart": "ChartLine",
|
|
1653
|
-
"pie-chart": "ChartPie",
|
|
1654
|
-
activity: "ChartLine",
|
|
1655
|
-
"trending-up": "ChartLine",
|
|
1656
|
-
"trending-down": "ChartLine",
|
|
1657
|
-
// Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
|
|
1658
|
-
message: "Comment",
|
|
1659
|
-
"message-circle": "CommentDots",
|
|
1660
|
-
"message-square": "CommentAlt",
|
|
1661
|
-
"messages-square": "Comments",
|
|
1662
|
-
comment: "Comment",
|
|
1663
|
-
comments: "Comments",
|
|
1664
|
-
inbox: "Inbox",
|
|
1665
|
-
// Support / help
|
|
1666
|
-
"life-buoy": "LifeRing",
|
|
1667
|
-
lifebuoy: "LifeRing",
|
|
1668
|
-
// Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
|
|
1669
|
-
kanban: "Tasks",
|
|
1670
|
-
columns: "Columns",
|
|
1671
|
-
rows: "Bars",
|
|
1672
|
-
layout: "ThLarge",
|
|
1673
|
-
grid: "Th",
|
|
1674
|
-
list: "List",
|
|
1675
|
-
table: "Table",
|
|
1676
|
-
// Storage / folders
|
|
1677
|
-
folder: "Folder",
|
|
1678
|
-
"folder-open": "FolderOpen",
|
|
1679
|
-
archive: "Archive",
|
|
1680
|
-
bookmark: "Bookmark",
|
|
1681
|
-
briefcase: "Briefcase",
|
|
1682
|
-
package: "Box",
|
|
1683
|
-
box: "Box",
|
|
1684
|
-
// Map / location
|
|
1685
|
-
map: "Map",
|
|
1686
|
-
"map-pin": "MapMarkerAlt",
|
|
1687
|
-
navigation: "LocationArrow",
|
|
1688
|
-
compass: "Compass",
|
|
1689
|
-
globe: "Globe",
|
|
1690
|
-
target: "Bullseye",
|
|
1691
|
-
// Media
|
|
1692
|
-
image: "Image",
|
|
1693
|
-
video: "Video",
|
|
1694
|
-
film: "Film",
|
|
1695
|
-
camera: "Camera",
|
|
1696
|
-
music: "Music",
|
|
1697
|
-
play: "Play",
|
|
1698
|
-
pause: "Pause",
|
|
1699
|
-
stop: "Stop",
|
|
1700
|
-
"skip-forward": "Forward",
|
|
1701
|
-
"skip-back": "Backward",
|
|
1702
|
-
volume: "VolumeUp",
|
|
1703
|
-
"volume-2": "VolumeUp",
|
|
1704
|
-
"volume-x": "VolumeMute",
|
|
1705
|
-
mic: "Microphone",
|
|
1706
|
-
"mic-off": "MicrophoneSlash",
|
|
1707
|
-
phone: "Phone",
|
|
1708
|
-
// Code / data
|
|
1709
|
-
code: "Code",
|
|
1710
|
-
terminal: "Terminal",
|
|
1711
|
-
database: "Database",
|
|
1712
|
-
server: "Server",
|
|
1713
|
-
cloud: "Cloud",
|
|
1714
|
-
wifi: "Wifi",
|
|
1715
|
-
// Security
|
|
1716
|
-
shield: "ShieldAlt",
|
|
1717
|
-
key: "Key",
|
|
1718
|
-
// Misc actions
|
|
1719
|
-
printer: "Print",
|
|
1720
|
-
save: "Save",
|
|
1721
|
-
link: "Link",
|
|
1722
|
-
unlink: "Unlink",
|
|
1723
|
-
paperclip: "Paperclip",
|
|
1724
|
-
flag: "Flag",
|
|
1725
|
-
tag: "Tag",
|
|
1726
|
-
tags: "Tags",
|
|
1727
|
-
zap: "Bolt",
|
|
1728
|
-
sparkles: "Magic",
|
|
1729
|
-
// Theme
|
|
1730
|
-
sun: "Sun",
|
|
1731
|
-
moon: "Moon",
|
|
1732
|
-
// Hierarchy (FA has no Tree icon for hierarchies; Sitemap is the org-chart icon)
|
|
1733
|
-
tree: "Sitemap",
|
|
1734
|
-
network: "NetworkWired"
|
|
1735
|
-
};
|
|
1736
|
-
warned = /* @__PURE__ */ new Set();
|
|
1737
1118
|
}
|
|
1738
1119
|
});
|
|
1739
1120
|
function kebabToPascal2(name) {
|
|
@@ -1814,7 +1195,7 @@ var init_Icon = __esm({
|
|
|
1814
1195
|
const family = useIconFamily();
|
|
1815
1196
|
const RenderedComponent = React81__namespace.default.useMemo(() => {
|
|
1816
1197
|
if (directIcon) return null;
|
|
1817
|
-
return effectiveName ? resolveIconForFamily(effectiveName
|
|
1198
|
+
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1818
1199
|
}, [directIcon, effectiveName, family]);
|
|
1819
1200
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
1820
1201
|
const inlineStyle = {
|
|
@@ -2193,7 +1574,7 @@ var init_Button = __esm({
|
|
|
2193
1574
|
ref,
|
|
2194
1575
|
disabled: disabled || isLoading,
|
|
2195
1576
|
className: cn(
|
|
2196
|
-
"inline-flex items-center justify-center gap-2",
|
|
1577
|
+
"relative inline-flex items-center justify-center gap-2",
|
|
2197
1578
|
"font-medium",
|
|
2198
1579
|
"rounded-sm",
|
|
2199
1580
|
"cursor-pointer",
|
|
@@ -3961,6 +3342,7 @@ var init_Input = __esm({
|
|
|
3961
3342
|
icon: iconProp,
|
|
3962
3343
|
clearable,
|
|
3963
3344
|
onClear,
|
|
3345
|
+
action,
|
|
3964
3346
|
value,
|
|
3965
3347
|
options,
|
|
3966
3348
|
rows = 3,
|
|
@@ -4010,6 +3392,11 @@ var init_Input = __esm({
|
|
|
4010
3392
|
onClear?.();
|
|
4011
3393
|
}
|
|
4012
3394
|
};
|
|
3395
|
+
const handleKeyDown = (e) => {
|
|
3396
|
+
if (action && e.key === "Enter") {
|
|
3397
|
+
eventBus.emit(`UI:${action}`, { value: e.currentTarget.value });
|
|
3398
|
+
}
|
|
3399
|
+
};
|
|
4013
3400
|
const wrapField = (field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
4014
3401
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
4015
3402
|
field,
|
|
@@ -4083,6 +3470,7 @@ var init_Input = __esm({
|
|
|
4083
3470
|
type,
|
|
4084
3471
|
value,
|
|
4085
3472
|
onChange: handleChange,
|
|
3473
|
+
onKeyDown: handleKeyDown,
|
|
4086
3474
|
className: baseClassName,
|
|
4087
3475
|
...props
|
|
4088
3476
|
}
|
|
@@ -4615,7 +4003,7 @@ var init_Card = __esm({
|
|
|
4615
4003
|
});
|
|
4616
4004
|
function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
4617
4005
|
const px = typeof size === "number" ? size : sizeMap[size];
|
|
4618
|
-
|
|
4006
|
+
useIconFamily();
|
|
4619
4007
|
if (assetUrl?.url) {
|
|
4620
4008
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4621
4009
|
AtlasImage,
|
|
@@ -4627,7 +4015,7 @@ function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
|
4627
4015
|
}
|
|
4628
4016
|
);
|
|
4629
4017
|
}
|
|
4630
|
-
const I = typeof icon === "string" ? resolveIconForFamily(icon
|
|
4018
|
+
const I = typeof icon === "string" ? resolveIconForFamily(icon) : icon;
|
|
4631
4019
|
return /* @__PURE__ */ jsxRuntime.jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
|
|
4632
4020
|
}
|
|
4633
4021
|
var sizeMap;
|
|
@@ -7024,8 +6412,8 @@ function Seigaiha({ size, color, strokeWidth }) {
|
|
|
7024
6412
|
[s, s * 0.1]
|
|
7025
6413
|
];
|
|
7026
6414
|
for (const [cx, cy] of centers) {
|
|
7027
|
-
for (let
|
|
7028
|
-
const cr = r * (
|
|
6415
|
+
for (let ring = 1; ring <= 3; ring++) {
|
|
6416
|
+
const cr = r * (ring / 3);
|
|
7029
6417
|
paths.push(
|
|
7030
6418
|
`M ${f(cx - cr)},${f(cy)} A ${f(cr)} ${f(cr)} 0 0 1 ${f(cx + cr)},${f(cy)}`
|
|
7031
6419
|
);
|
|
@@ -7122,8 +6510,8 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
7122
6510
|
const h = size * 1.5;
|
|
7123
6511
|
const cx = w / 2;
|
|
7124
6512
|
const paths = [];
|
|
7125
|
-
for (let
|
|
7126
|
-
const scale = 1 -
|
|
6513
|
+
for (let ring = 0; ring < 4; ring++) {
|
|
6514
|
+
const scale = 1 - ring * 0.2;
|
|
7127
6515
|
const archW = w * 0.48 * scale;
|
|
7128
6516
|
const archH = h * 0.7 * scale;
|
|
7129
6517
|
const baseY = h * 0.85;
|
|
@@ -7138,7 +6526,7 @@ function Arch({ size, color, strokeWidth }) {
|
|
|
7138
6526
|
paths.push(
|
|
7139
6527
|
`M ${f(lx)},${f(baseY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(cx)},${f(tipY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(rx)},${f(baseY)}`
|
|
7140
6528
|
);
|
|
7141
|
-
if (
|
|
6529
|
+
if (ring === 0) {
|
|
7142
6530
|
paths.push(`M ${f(lx)},${f(baseY)} L ${f(rx)},${f(baseY)}`);
|
|
7143
6531
|
}
|
|
7144
6532
|
}
|
|
@@ -9546,9 +8934,9 @@ var init_webPainter2d = __esm({
|
|
|
9546
8934
|
// lib/drawable/projector.ts
|
|
9547
8935
|
function create2DProjector(opts) {
|
|
9548
8936
|
const { scale, baseOffsetX, layout } = opts;
|
|
9549
|
-
const tileWidth = TILE_WIDTH * scale;
|
|
9550
|
-
const floorHeight = FLOOR_HEIGHT * scale;
|
|
9551
|
-
const diamondTopY = (opts.diamondTopY ?? DIAMOND_TOP_Y) * scale;
|
|
8937
|
+
const tileWidth = layout === "free" ? 1 : TILE_WIDTH * scale;
|
|
8938
|
+
const floorHeight = layout === "free" ? 1 : FLOOR_HEIGHT * scale;
|
|
8939
|
+
const diamondTopY = layout === "free" ? 0 : (opts.diamondTopY ?? DIAMOND_TOP_Y) * scale;
|
|
9552
8940
|
const squareGrid = layout === "flat" || layout === "free";
|
|
9553
8941
|
const project = (pos) => layout === "free" ? { x: pos.x, y: pos.y } : isoToScreen(pos.x, pos.y, scale, baseOffsetX, layout);
|
|
9554
8942
|
const anchorPoint = (pos, anchor) => {
|
|
@@ -9589,6 +8977,15 @@ var init_projector = __esm({
|
|
|
9589
8977
|
}
|
|
9590
8978
|
});
|
|
9591
8979
|
|
|
8980
|
+
// lib/drawable/contract.ts
|
|
8981
|
+
function isValidScenePos(pos) {
|
|
8982
|
+
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
8983
|
+
}
|
|
8984
|
+
var init_contract = __esm({
|
|
8985
|
+
"lib/drawable/contract.ts"() {
|
|
8986
|
+
}
|
|
8987
|
+
});
|
|
8988
|
+
|
|
9592
8989
|
// components/game/atoms/DrawSprite.tsx
|
|
9593
8990
|
function DrawSprite(_props) {
|
|
9594
8991
|
return null;
|
|
@@ -9598,10 +8995,12 @@ var init_DrawSprite = __esm({
|
|
|
9598
8995
|
"components/game/atoms/DrawSprite.tsx"() {
|
|
9599
8996
|
"use client";
|
|
9600
8997
|
init_atlasSlice();
|
|
8998
|
+
init_contract();
|
|
9601
8999
|
paintSprite = (painter, node, dctx) => {
|
|
9000
|
+
if (!node.asset?.url || !isValidScenePos(node.position)) return;
|
|
9602
9001
|
const tex = painter.resolveTexture(node.asset.url);
|
|
9603
9002
|
if (!tex) return;
|
|
9604
|
-
let src = node.frame;
|
|
9003
|
+
let src = typeof node.frame === "object" ? node.frame : void 0;
|
|
9605
9004
|
if (!src && isAtlasAsset(node.asset)) {
|
|
9606
9005
|
const atlas = getAtlas(node.asset.atlas, dctx.invalidate);
|
|
9607
9006
|
if (!atlas) return;
|
|
@@ -9646,7 +9045,9 @@ var paintShape;
|
|
|
9646
9045
|
var init_DrawShape = __esm({
|
|
9647
9046
|
"components/game/atoms/DrawShape.tsx"() {
|
|
9648
9047
|
"use client";
|
|
9048
|
+
init_contract();
|
|
9649
9049
|
paintShape = (painter, node, dctx) => {
|
|
9050
|
+
if (!isValidScenePos(node.position)) return;
|
|
9650
9051
|
painter.save();
|
|
9651
9052
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9652
9053
|
switch (node.shape) {
|
|
@@ -9700,7 +9101,9 @@ var paintText;
|
|
|
9700
9101
|
var init_DrawText = __esm({
|
|
9701
9102
|
"components/game/atoms/DrawText.tsx"() {
|
|
9702
9103
|
"use client";
|
|
9104
|
+
init_contract();
|
|
9703
9105
|
paintText = (painter, node, dctx) => {
|
|
9106
|
+
if (!isValidScenePos(node.position)) return;
|
|
9704
9107
|
const p = dctx.projector.anchorPoint(node.position, node.anchor ?? "center");
|
|
9705
9108
|
const x = p.x + (node.offsetX ?? 0);
|
|
9706
9109
|
const y = p.y + (node.offsetY ?? 0);
|
|
@@ -9805,12 +9208,14 @@ function collectDrawnItems(nodes) {
|
|
|
9805
9208
|
case "draw-sprite":
|
|
9806
9209
|
case "draw-shape":
|
|
9807
9210
|
case "draw-text":
|
|
9808
|
-
out.push({ pos: n.position, id: n.id });
|
|
9211
|
+
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
9809
9212
|
break;
|
|
9810
9213
|
case "draw-sprite-layer":
|
|
9811
9214
|
case "draw-shape-layer":
|
|
9812
9215
|
case "draw-text-layer":
|
|
9813
|
-
for (const it of n.items)
|
|
9216
|
+
for (const it of n.items) {
|
|
9217
|
+
if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id });
|
|
9218
|
+
}
|
|
9814
9219
|
break;
|
|
9815
9220
|
}
|
|
9816
9221
|
}
|
|
@@ -9825,6 +9230,7 @@ function buildHitIndex(items) {
|
|
|
9825
9230
|
}
|
|
9826
9231
|
var init_hitTest = __esm({
|
|
9827
9232
|
"lib/drawable/hitTest.ts"() {
|
|
9233
|
+
init_contract();
|
|
9828
9234
|
}
|
|
9829
9235
|
});
|
|
9830
9236
|
function normalizeBackdrop(bg) {
|
|
@@ -9850,14 +9256,16 @@ function Canvas2D({
|
|
|
9850
9256
|
cameraPos,
|
|
9851
9257
|
bgColor
|
|
9852
9258
|
}) {
|
|
9259
|
+
const instanceId = React81.useMemo(() => Math.random().toString(36).slice(2, 8), []);
|
|
9260
|
+
function isDrawableLayer(node) {
|
|
9261
|
+
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
9262
|
+
}
|
|
9853
9263
|
const layerSummaries = drawables?.map((d) => {
|
|
9854
|
-
if (!d
|
|
9855
|
-
|
|
9856
|
-
return { type: rec.type, itemsLen: Array.isArray(rec.items) ? rec.items.length : void 0, firstItem: Array.isArray(rec.items) ? rec.items[0] : void 0 };
|
|
9264
|
+
if (!isDrawableLayer(d)) return { type: d.type };
|
|
9265
|
+
return { type: d.type, itemsLen: d.items.length, firstItem: d.items[0] };
|
|
9857
9266
|
});
|
|
9858
|
-
|
|
9267
|
+
canvas2DLog.debug("Canvas2D render", { instanceId, projection, scale, cameraMode: camera, cameraPos: cameraPos ? JSON.stringify(cameraPos) : void 0, drawablesCount: drawables?.length, layerSummaries: layerSummaries ? JSON.stringify(layerSummaries) : void 0 });
|
|
9859
9268
|
const backgroundImage = normalizeBackdrop(backgroundImageRaw);
|
|
9860
|
-
const instanceId = React81.useMemo(() => Math.random().toString(36).slice(2, 8), []);
|
|
9861
9269
|
const isFree = projection === "free";
|
|
9862
9270
|
const squareGrid = projection === "flat" || isFree || projection === "side";
|
|
9863
9271
|
const layout = projection === "side" ? "free" : projection;
|
|
@@ -9992,7 +9400,7 @@ function Canvas2D({
|
|
|
9992
9400
|
}
|
|
9993
9401
|
const containerRect = containerRef.current?.getBoundingClientRect();
|
|
9994
9402
|
const canvasRect = canvas.getBoundingClientRect();
|
|
9995
|
-
|
|
9403
|
+
canvas2DLog.debug("Canvas2D draw", { instanceId, viewportSize, baseOffsetX, cam: { x: cam.x, y: cam.y, zoom: cam.zoom }, cameraPos: cameraPos ? JSON.stringify(cameraPos) : void 0, containerRect: containerRect ? { width: containerRect.width, height: containerRect.height } : null, canvasRect: canvasRect ? { width: canvasRect.width, height: canvasRect.height } : null });
|
|
9996
9404
|
const painter = createWebPainter(ctx, bumpAtlas);
|
|
9997
9405
|
painter.save();
|
|
9998
9406
|
painter.translate(viewportSize.width / 2, viewportSize.height / 2);
|
|
@@ -10204,6 +9612,7 @@ function Canvas2D({
|
|
|
10204
9612
|
}
|
|
10205
9613
|
);
|
|
10206
9614
|
}
|
|
9615
|
+
var canvas2DLog;
|
|
10207
9616
|
var init_Canvas2D = __esm({
|
|
10208
9617
|
"components/game/molecules/Canvas2D.tsx"() {
|
|
10209
9618
|
"use client";
|
|
@@ -10225,6 +9634,7 @@ var init_Canvas2D = __esm({
|
|
|
10225
9634
|
init_paintDispatch();
|
|
10226
9635
|
init_hitTest();
|
|
10227
9636
|
init_isometric();
|
|
9637
|
+
canvas2DLog = logger.createLogger("almadar:ui:game-canvas");
|
|
10228
9638
|
Canvas2D.displayName = "Canvas2D";
|
|
10229
9639
|
}
|
|
10230
9640
|
});
|
|
@@ -10263,7 +9673,7 @@ function Canvas({
|
|
|
10263
9673
|
keyMap,
|
|
10264
9674
|
keyUpMap
|
|
10265
9675
|
}) {
|
|
10266
|
-
|
|
9676
|
+
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
10267
9677
|
const zoom = camera?.zoom;
|
|
10268
9678
|
if (mode === "3d") {
|
|
10269
9679
|
const props3d = {
|
|
@@ -10316,7 +9726,7 @@ function Canvas({
|
|
|
10316
9726
|
}
|
|
10317
9727
|
);
|
|
10318
9728
|
}
|
|
10319
|
-
var Canvas3DHost;
|
|
9729
|
+
var Canvas3DHost, canvasLog;
|
|
10320
9730
|
var init_Canvas = __esm({
|
|
10321
9731
|
"components/game/molecules/Canvas.tsx"() {
|
|
10322
9732
|
"use client";
|
|
@@ -10324,6 +9734,7 @@ var init_Canvas = __esm({
|
|
|
10324
9734
|
Canvas3DHost = React81.lazy(
|
|
10325
9735
|
() => import('@almadar/ui/components/molecules/game/three').then((m) => ({ default: m.Canvas3DHost }))
|
|
10326
9736
|
);
|
|
9737
|
+
canvasLog = logger.createLogger("almadar:ui:game-canvas");
|
|
10327
9738
|
Canvas.displayName = "Canvas";
|
|
10328
9739
|
}
|
|
10329
9740
|
});
|
|
@@ -11859,21 +11270,6 @@ var init_renderer = __esm({
|
|
|
11859
11270
|
init_slot_definitions();
|
|
11860
11271
|
}
|
|
11861
11272
|
});
|
|
11862
|
-
|
|
11863
|
-
// lib/wrapCallbackForEvent.ts
|
|
11864
|
-
function wrapCallbackForEvent(qualifiedEvent, callbackArgs, emit) {
|
|
11865
|
-
const argNames = (callbackArgs ?? []).map((a) => a.name);
|
|
11866
|
-
if (argNames.length === 0) {
|
|
11867
|
-
return () => emit(qualifiedEvent);
|
|
11868
|
-
}
|
|
11869
|
-
return (...args) => {
|
|
11870
|
-
const payload = {};
|
|
11871
|
-
for (let i = 0; i < argNames.length; i += 1) {
|
|
11872
|
-
payload[argNames[i]] = args[i];
|
|
11873
|
-
}
|
|
11874
|
-
emit(qualifiedEvent, payload);
|
|
11875
|
-
};
|
|
11876
|
-
}
|
|
11877
11273
|
var init_wrapCallbackForEvent = __esm({
|
|
11878
11274
|
"lib/wrapCallbackForEvent.ts"() {
|
|
11879
11275
|
}
|
|
@@ -22764,7 +22160,8 @@ function DataGrid({
|
|
|
22764
22160
|
const { t } = hooks.useTranslate();
|
|
22765
22161
|
const [selectedIds, setSelectedIds] = React81.useState(/* @__PURE__ */ new Set());
|
|
22766
22162
|
const [visibleCount, setVisibleCount] = React81.useState(pageSize || Infinity);
|
|
22767
|
-
const fieldDefs = fields ?? columns ?? [];
|
|
22163
|
+
const fieldDefs = (Array.isArray(fields) ? fields : void 0) ?? (Array.isArray(columns) ? columns : void 0) ?? [];
|
|
22164
|
+
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
22768
22165
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22769
22166
|
const dnd = useDataDnd({
|
|
22770
22167
|
items: allDataRaw,
|
|
@@ -22808,8 +22205,8 @@ function DataGrid({
|
|
|
22808
22205
|
const titleField = fieldDefs.find((f3) => f3.variant === "h3" || f3.variant === "h4") ?? fieldDefs[0];
|
|
22809
22206
|
const badgeFields = fieldDefs.filter((f3) => f3.variant === "badge" && f3 !== titleField);
|
|
22810
22207
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
22811
|
-
const primaryActions =
|
|
22812
|
-
const dangerActions =
|
|
22208
|
+
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
22209
|
+
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
22813
22210
|
const handleActionClick = (action, itemData) => (e) => {
|
|
22814
22211
|
e.stopPropagation();
|
|
22815
22212
|
const payload = {
|
|
@@ -35339,7 +34736,7 @@ function measureLabelWidth(text) {
|
|
|
35339
34736
|
if (typeof document === "undefined") return text.length * 6;
|
|
35340
34737
|
if (!labelMeasureCtx) labelMeasureCtx = document.createElement("canvas").getContext("2d");
|
|
35341
34738
|
if (!labelMeasureCtx) return text.length * 6;
|
|
35342
|
-
labelMeasureCtx.font = "
|
|
34739
|
+
labelMeasureCtx.font = "12px system-ui";
|
|
35343
34740
|
return labelMeasureCtx.measureText(text).width;
|
|
35344
34741
|
}
|
|
35345
34742
|
function getGroupColor(group, groups) {
|
|
@@ -35385,6 +34782,7 @@ var init_GraphCanvas = __esm({
|
|
|
35385
34782
|
actions,
|
|
35386
34783
|
onNodeClick,
|
|
35387
34784
|
onNodeDoubleClick,
|
|
34785
|
+
onBadgeClick,
|
|
35388
34786
|
nodeClickEvent,
|
|
35389
34787
|
selectedNodeId,
|
|
35390
34788
|
repulsion = 800,
|
|
@@ -35532,7 +34930,9 @@ var init_GraphCanvas = __esm({
|
|
|
35532
34930
|
const dx = target.x - source.x;
|
|
35533
34931
|
const dy = target.y - source.y;
|
|
35534
34932
|
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
35535
|
-
const
|
|
34933
|
+
const w2 = edge.weight ?? 1;
|
|
34934
|
+
const linkTarget = linkDistance * (1 + (1 - Math.min(1, Math.max(0, w2))) * 1.5);
|
|
34935
|
+
const force = (dist - linkTarget) * 0.05;
|
|
35536
34936
|
const fx = dx / dist * force;
|
|
35537
34937
|
const fy = dy / dist * force;
|
|
35538
34938
|
source.fx += fx;
|
|
@@ -35554,7 +34954,7 @@ var init_GraphCanvas = __esm({
|
|
|
35554
34954
|
node.y = Math.max(30, Math.min(h - 30, node.y));
|
|
35555
34955
|
}
|
|
35556
34956
|
const LABEL_GAP = 12;
|
|
35557
|
-
const LABEL_H =
|
|
34957
|
+
const LABEL_H = 16;
|
|
35558
34958
|
const pad = nodeSpacing / 2;
|
|
35559
34959
|
for (let i = 0; i < nodes.length; i++) {
|
|
35560
34960
|
for (let j = i + 1; j < nodes.length; j++) {
|
|
@@ -35575,13 +34975,13 @@ var init_GraphCanvas = __esm({
|
|
|
35575
34975
|
const overlapY = Math.min(aBot, bBot) - Math.max(aTop, bTop);
|
|
35576
34976
|
if (overlapX > 0 && overlapY > 0) {
|
|
35577
34977
|
if (overlapX <= overlapY) {
|
|
35578
|
-
const
|
|
35579
|
-
a.x = Math.max(30, Math.min(w - 30, a.x -
|
|
35580
|
-
b.x = Math.max(30, Math.min(w - 30, b.x +
|
|
34978
|
+
const push = overlapX / 2 * (b.x >= a.x ? 1 : -1);
|
|
34979
|
+
a.x = Math.max(30, Math.min(w - 30, a.x - push));
|
|
34980
|
+
b.x = Math.max(30, Math.min(w - 30, b.x + push));
|
|
35581
34981
|
} else {
|
|
35582
|
-
const
|
|
35583
|
-
a.y = Math.max(30, Math.min(h - 30, a.y -
|
|
35584
|
-
b.y = Math.max(30, Math.min(h - 30, b.y +
|
|
34982
|
+
const push = overlapY / 2 * (bTop + bBot >= aTop + aBot ? 1 : -1);
|
|
34983
|
+
a.y = Math.max(30, Math.min(h - 30, a.y - push));
|
|
34984
|
+
b.y = Math.max(30, Math.min(h - 30, b.y + push));
|
|
35585
34985
|
}
|
|
35586
34986
|
}
|
|
35587
34987
|
}
|
|
@@ -35609,6 +35009,11 @@ var init_GraphCanvas = __esm({
|
|
|
35609
35009
|
const h = height;
|
|
35610
35010
|
const nodes = nodesRef.current;
|
|
35611
35011
|
const accentColor = resolveColor3("var(--color-accent)", canvas);
|
|
35012
|
+
const fontFamily = resolveColor3("var(--font-family)", canvas) || "system-ui";
|
|
35013
|
+
const fgColor = resolveColor3("var(--color-foreground)", canvas);
|
|
35014
|
+
const mutedColor = resolveColor3("var(--color-muted-foreground)", canvas) || fgColor;
|
|
35015
|
+
const bgColor = resolveColor3("var(--color-background)", canvas) || "#ffffff";
|
|
35016
|
+
const accentFg = resolveColor3("var(--color-accent-foreground)", canvas) || "#ffffff";
|
|
35612
35017
|
const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
|
|
35613
35018
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
35614
35019
|
ctx.clearRect(0, 0, w, h);
|
|
@@ -35628,19 +35033,21 @@ var init_GraphCanvas = __esm({
|
|
|
35628
35033
|
const target = nodes.find((n) => n.id === edge.target);
|
|
35629
35034
|
if (!source || !target) continue;
|
|
35630
35035
|
const incident = !!hoveredNode && (edge.source === hoveredNode || edge.target === hoveredNode);
|
|
35631
|
-
|
|
35036
|
+
const w2 = edge.weight ?? 1;
|
|
35037
|
+
ctx.globalAlpha = hoveredNode ? incident ? 1 : 0.05 : linkOpacity * w2;
|
|
35632
35038
|
ctx.beginPath();
|
|
35633
35039
|
ctx.moveTo(source.x, source.y);
|
|
35634
35040
|
ctx.lineTo(target.x, target.y);
|
|
35635
35041
|
ctx.strokeStyle = incident ? accentColor : edge.color || "#888888";
|
|
35636
|
-
ctx.lineWidth = incident ? 2 :
|
|
35042
|
+
ctx.lineWidth = incident ? 2 : Math.max(0.75, w2);
|
|
35637
35043
|
ctx.stroke();
|
|
35638
35044
|
if (edge.label && showLabels) {
|
|
35639
35045
|
const mx = (source.x + target.x) / 2;
|
|
35640
35046
|
const my = (source.y + target.y) / 2;
|
|
35641
|
-
ctx.fillStyle =
|
|
35642
|
-
ctx.font =
|
|
35047
|
+
ctx.fillStyle = mutedColor;
|
|
35048
|
+
ctx.font = `9px ${fontFamily}`;
|
|
35643
35049
|
ctx.textAlign = "center";
|
|
35050
|
+
ctx.textBaseline = "alphabetic";
|
|
35644
35051
|
ctx.fillText(edge.label, mx, my - 4);
|
|
35645
35052
|
}
|
|
35646
35053
|
}
|
|
@@ -35665,10 +35072,33 @@ var init_GraphCanvas = __esm({
|
|
|
35665
35072
|
}
|
|
35666
35073
|
ctx.stroke();
|
|
35667
35074
|
if (showLabels && node.label) {
|
|
35668
|
-
ctx.
|
|
35669
|
-
ctx.
|
|
35075
|
+
ctx.font = `${isSelected || isHovered ? "600" : "500"} 12px ${fontFamily}`;
|
|
35076
|
+
ctx.textAlign = "center";
|
|
35077
|
+
ctx.textBaseline = "middle";
|
|
35078
|
+
const ly = node.y + radius + 14;
|
|
35079
|
+
ctx.lineWidth = 3;
|
|
35080
|
+
ctx.lineJoin = "round";
|
|
35081
|
+
ctx.strokeStyle = bgColor;
|
|
35082
|
+
ctx.strokeText(node.label, node.x, ly);
|
|
35083
|
+
ctx.fillStyle = isSelected || isHovered ? fgColor : mutedColor;
|
|
35084
|
+
ctx.fillText(node.label, node.x, ly);
|
|
35085
|
+
}
|
|
35086
|
+
if (node.badge && node.badge > 1) {
|
|
35087
|
+
const bx = node.x + radius * 0.7;
|
|
35088
|
+
const by = node.y - radius * 0.7;
|
|
35089
|
+
const br = Math.max(7, Math.min(11, radius * 0.45));
|
|
35090
|
+
ctx.beginPath();
|
|
35091
|
+
ctx.arc(bx, by, br, 0, Math.PI * 2);
|
|
35092
|
+
ctx.fillStyle = accentColor;
|
|
35093
|
+
ctx.fill();
|
|
35094
|
+
ctx.strokeStyle = bgColor;
|
|
35095
|
+
ctx.lineWidth = 2;
|
|
35096
|
+
ctx.stroke();
|
|
35097
|
+
ctx.fillStyle = accentFg;
|
|
35098
|
+
ctx.font = `600 9px ${fontFamily}`;
|
|
35670
35099
|
ctx.textAlign = "center";
|
|
35671
|
-
ctx.
|
|
35100
|
+
ctx.textBaseline = "middle";
|
|
35101
|
+
ctx.fillText(String(node.badge), bx, by + 0.5);
|
|
35672
35102
|
}
|
|
35673
35103
|
}
|
|
35674
35104
|
ctx.restore();
|
|
@@ -35761,11 +35191,21 @@ var init_GraphCanvas = __esm({
|
|
|
35761
35191
|
if (!coords) return;
|
|
35762
35192
|
const node = nodeAt(coords.graphX, coords.graphY);
|
|
35763
35193
|
if (node) {
|
|
35194
|
+
if (node.badge && node.badge > 1 && onBadgeClick) {
|
|
35195
|
+
const r = (node.size || 8) + (selectedNodeId === node.id ? 4 : 0);
|
|
35196
|
+
const bx = node.x + r * 0.7;
|
|
35197
|
+
const by = node.y - r * 0.7;
|
|
35198
|
+
const br = Math.max(7, Math.min(11, r * 0.45)) + 3;
|
|
35199
|
+
if (Math.hypot(coords.graphX - bx, coords.graphY - by) <= br) {
|
|
35200
|
+
onBadgeClick(node);
|
|
35201
|
+
return;
|
|
35202
|
+
}
|
|
35203
|
+
}
|
|
35764
35204
|
handleNodeClick(node);
|
|
35765
35205
|
}
|
|
35766
35206
|
}
|
|
35767
35207
|
},
|
|
35768
|
-
[toCoords, nodeAt, handleNodeClick]
|
|
35208
|
+
[toCoords, nodeAt, handleNodeClick, onBadgeClick, selectedNodeId]
|
|
35769
35209
|
);
|
|
35770
35210
|
const handlePointerLeave = React81.useCallback(() => {
|
|
35771
35211
|
setHoveredNode(null);
|
|
@@ -40286,7 +39726,7 @@ function getAllEvents(traits2) {
|
|
|
40286
39726
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40287
39727
|
const eventBus = useEventBus();
|
|
40288
39728
|
const { t } = hooks.useTranslate();
|
|
40289
|
-
const [
|
|
39729
|
+
const [log9, setLog] = React81__namespace.useState([]);
|
|
40290
39730
|
const prevStatesRef = React81__namespace.useRef(/* @__PURE__ */ new Map());
|
|
40291
39731
|
React81__namespace.useEffect(() => {
|
|
40292
39732
|
for (const trait of traits2) {
|
|
@@ -40350,9 +39790,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
40350
39790
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
40351
39791
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
40352
39792
|
] }),
|
|
40353
|
-
|
|
39793
|
+
log9.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
40354
39794
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
40355
|
-
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children:
|
|
39795
|
+
/* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log9.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
40356
39796
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
40357
39797
|
" ",
|
|
40358
39798
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -43754,7 +43194,7 @@ function SlotContentRenderer({
|
|
|
43754
43194
|
if (typeof propValue !== "string") continue;
|
|
43755
43195
|
const propDef = propsSchema[propKey];
|
|
43756
43196
|
if (!propDef || propDef.kind !== "callback") continue;
|
|
43757
|
-
renderedProps[propKey] = wrapCallbackForEvent(
|
|
43197
|
+
renderedProps[propKey] = ui.wrapCallbackForEvent(
|
|
43758
43198
|
`UI:${propValue}`,
|
|
43759
43199
|
propDef.callbackArgs,
|
|
43760
43200
|
(eventKey, payload) => eventBus.emit(eventKey, payload)
|
|
@@ -43989,27 +43429,27 @@ var log2 = logger.createLogger("almadar:ui:shared-entity-store");
|
|
|
43989
43429
|
var EMPTY_ENTITY_STATE = {};
|
|
43990
43430
|
function createSharedEntityStore() {
|
|
43991
43431
|
const states = /* @__PURE__ */ new Map();
|
|
43992
|
-
const
|
|
43993
|
-
const
|
|
43994
|
-
const
|
|
43995
|
-
let set =
|
|
43432
|
+
const subscribers = /* @__PURE__ */ new Map();
|
|
43433
|
+
const getSnapshot2 = (entityId) => states.get(entityId) ?? EMPTY_ENTITY_STATE;
|
|
43434
|
+
const subscribe = (entityId, callback) => {
|
|
43435
|
+
let set = subscribers.get(entityId);
|
|
43996
43436
|
if (!set) {
|
|
43997
43437
|
set = /* @__PURE__ */ new Set();
|
|
43998
|
-
|
|
43438
|
+
subscribers.set(entityId, set);
|
|
43999
43439
|
}
|
|
44000
43440
|
set.add(callback);
|
|
44001
43441
|
return () => {
|
|
44002
|
-
const current =
|
|
43442
|
+
const current = subscribers.get(entityId);
|
|
44003
43443
|
if (!current) return;
|
|
44004
43444
|
current.delete(callback);
|
|
44005
43445
|
if (current.size === 0) {
|
|
44006
|
-
|
|
43446
|
+
subscribers.delete(entityId);
|
|
44007
43447
|
}
|
|
44008
43448
|
};
|
|
44009
43449
|
};
|
|
44010
43450
|
const commit = (entityId, nextState) => {
|
|
44011
43451
|
states.set(entityId, nextState);
|
|
44012
|
-
const set =
|
|
43452
|
+
const set = subscribers.get(entityId);
|
|
44013
43453
|
if (!set) return;
|
|
44014
43454
|
set.forEach((callback) => {
|
|
44015
43455
|
try {
|
|
@@ -44027,7 +43467,7 @@ function createSharedEntityStore() {
|
|
|
44027
43467
|
states.set(entityId, initialState);
|
|
44028
43468
|
}
|
|
44029
43469
|
};
|
|
44030
|
-
return { getSnapshot:
|
|
43470
|
+
return { getSnapshot: getSnapshot2, subscribe, commit, seed };
|
|
44031
43471
|
}
|
|
44032
43472
|
function useSharedEntityStore() {
|
|
44033
43473
|
const storeRef = React81.useRef(null);
|
|
@@ -44103,6 +43543,11 @@ function createClientEffectHandlers(options) {
|
|
|
44103
43543
|
};
|
|
44104
43544
|
}
|
|
44105
43545
|
var lambdaLog = logger.createLogger("almadar:ui:fn-form-lambda");
|
|
43546
|
+
function isOperatorCall(value) {
|
|
43547
|
+
const first = value[0];
|
|
43548
|
+
if (typeof first !== "string") return false;
|
|
43549
|
+
return registry.isKnownStdOperator(first) || first.includes("/") || first === "lambda" || first === "let";
|
|
43550
|
+
}
|
|
44106
43551
|
function isFnFormLambda(value) {
|
|
44107
43552
|
if (!Array.isArray(value)) return false;
|
|
44108
43553
|
const arr = value;
|
|
@@ -44142,7 +43587,14 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
44142
43587
|
return body;
|
|
44143
43588
|
}
|
|
44144
43589
|
if (Array.isArray(body)) {
|
|
44145
|
-
|
|
43590
|
+
if (isFnFormLambda(body)) return body;
|
|
43591
|
+
const arr = body;
|
|
43592
|
+
const substituted = arr.map((b) => recur(b));
|
|
43593
|
+
if (isOperatorCall(substituted) && core.isSExpr(substituted)) {
|
|
43594
|
+
const evaluated = evaluator.evaluate(substituted, evaluator.createMinimalContext());
|
|
43595
|
+
return core.isEventPayloadValue(evaluated) ? evaluated : String(evaluated);
|
|
43596
|
+
}
|
|
43597
|
+
return substituted;
|
|
44146
43598
|
}
|
|
44147
43599
|
if (body !== null && typeof body === "object" && !React81__namespace.default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
44148
43600
|
const out = {};
|
|
@@ -44237,6 +43689,8 @@ var flushLog = logger.createLogger("almadar:ui:slot-flush");
|
|
|
44237
43689
|
var stateLog = logger.createLogger("almadar:ui:state-transitions");
|
|
44238
43690
|
var tickLog = logger.createLogger("almadar:ui:tick-effects");
|
|
44239
43691
|
logger.setNamespaceLevel("almadar:ui:tick-effects", "WARN");
|
|
43692
|
+
var sharedEntityLog = logger.createLogger("almadar:ui:shared-entity");
|
|
43693
|
+
logger.setNamespaceLevel("almadar:ui:shared-entity", "WARN");
|
|
44240
43694
|
var SYNC_TICK_OPERATORS = /* @__PURE__ */ new Set([
|
|
44241
43695
|
"set",
|
|
44242
43696
|
"emit",
|
|
@@ -44331,14 +43785,14 @@ function createSharedEntityWriter(binding, tick, traitStatesRef, emit) {
|
|
|
44331
43785
|
function getBindingConfig(binding) {
|
|
44332
43786
|
const raw = binding.config;
|
|
44333
43787
|
const normalized = runtime.normalizeCallSiteConfigToValues(raw);
|
|
44334
|
-
|
|
43788
|
+
sharedEntityLog.debug("getBindingConfig", { traitName: binding.trait.name, rawKeys: raw ? Object.keys(raw) : void 0, hasTiles: raw ? "tiles" in raw : false });
|
|
44335
43789
|
return normalized;
|
|
44336
43790
|
}
|
|
44337
43791
|
function evalFieldDefault(value) {
|
|
44338
43792
|
if (!Array.isArray(value) || value.length === 0) return value;
|
|
44339
43793
|
const head = value[0];
|
|
44340
|
-
const
|
|
44341
|
-
if (!
|
|
43794
|
+
const isSExpr2 = typeof head === "string" && (head.includes("/") || head === "let" || head === "if" || head === "lambda");
|
|
43795
|
+
if (!isSExpr2) return value;
|
|
44342
43796
|
try {
|
|
44343
43797
|
return evaluator.evaluate(value, evaluator.createMinimalContext({}, {}, ""));
|
|
44344
43798
|
} catch {
|
|
@@ -44346,7 +43800,7 @@ function evalFieldDefault(value) {
|
|
|
44346
43800
|
}
|
|
44347
43801
|
}
|
|
44348
43802
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
44349
|
-
|
|
43803
|
+
sharedEntityLog.debug("useTraitStateMachine start", { traitBindingsCount: traitBindings.length, traitNames: traitBindings.map((b) => b.trait.name) });
|
|
44350
43804
|
const eventBus = useEventBus();
|
|
44351
43805
|
const { entities } = providers.useEntitySchema();
|
|
44352
43806
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
@@ -44365,10 +43819,15 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44365
43819
|
if (!group) {
|
|
44366
43820
|
let defaults;
|
|
44367
43821
|
for (const field of entityDef.fields) {
|
|
44368
|
-
if (field.default !== void 0) {
|
|
43822
|
+
if (field.default !== void 0 && field.default !== null) {
|
|
44369
43823
|
const evaluated = evalFieldDefault(field.default);
|
|
44370
43824
|
if (field.name === "tiles") {
|
|
44371
|
-
|
|
43825
|
+
sharedEntityLog.debug("seed tiles", {
|
|
43826
|
+
linkedEntityName,
|
|
43827
|
+
type: typeof evaluated,
|
|
43828
|
+
length: Array.isArray(evaluated) ? evaluated?.length : void 0,
|
|
43829
|
+
head: Array.isArray(evaluated) && evaluated.length > 0 ? JSON.stringify(evaluated[0]).slice(0, 80) : void 0
|
|
43830
|
+
});
|
|
44372
43831
|
}
|
|
44373
43832
|
(defaults ?? (defaults = {}))[field.name] = evaluated;
|
|
44374
43833
|
}
|
|
@@ -44385,7 +43844,12 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44385
43844
|
for (const group of sharedGroups.values()) {
|
|
44386
43845
|
if (group.defaults) {
|
|
44387
43846
|
sharedEntityStore.seed(group.storeKey, group.defaults);
|
|
44388
|
-
|
|
43847
|
+
sharedEntityLog.debug("shared-seed", {
|
|
43848
|
+
storeKey: group.storeKey,
|
|
43849
|
+
writers: group.writerBindings.map((b) => b.trait.name),
|
|
43850
|
+
renderers: group.renderBindings.map((b) => b.trait.name),
|
|
43851
|
+
tilesLength: Array.isArray(group.defaults.tiles) ? group.defaults.tiles.length : group.defaults.tiles
|
|
43852
|
+
});
|
|
44389
43853
|
}
|
|
44390
43854
|
}
|
|
44391
43855
|
const sharedKeyByTraitNameRef = React81.useRef(/* @__PURE__ */ new Map());
|
|
@@ -44396,13 +43860,15 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44396
43860
|
for (const binding of group.renderBindings) map.set(binding.trait.name, group.storeKey);
|
|
44397
43861
|
}
|
|
44398
43862
|
sharedKeyByTraitNameRef.current = map;
|
|
44399
|
-
|
|
43863
|
+
sharedEntityLog.debug("shared-map", { map: Array.from(map.entries()).map(([k, v]) => `${k}->${v}`) });
|
|
44400
43864
|
}, [sharedGroups]);
|
|
44401
43865
|
const manager = React81.useMemo(() => {
|
|
44402
43866
|
const traitDefs = traitBindings.map(toTraitDefinition);
|
|
44403
43867
|
const m = new runtime.StateMachineManager(traitDefs);
|
|
44404
43868
|
for (const binding of traitBindings) {
|
|
44405
|
-
const
|
|
43869
|
+
const rawCfg = getBindingConfig(binding);
|
|
43870
|
+
const resolvedCfg = traitConfigsByName?.[binding.trait.name];
|
|
43871
|
+
const cfg = rawCfg || resolvedCfg ? { ...rawCfg ?? {}, ...resolvedCfg ?? {} } : void 0;
|
|
44406
43872
|
if (cfg !== void 0) {
|
|
44407
43873
|
m.setTraitConfig(binding.trait.name, cfg);
|
|
44408
43874
|
}
|
|
@@ -44580,13 +44046,13 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44580
44046
|
};
|
|
44581
44047
|
}, [traitBindings]);
|
|
44582
44048
|
const executeTransitionEffects = React81.useCallback(async (params) => {
|
|
44583
|
-
const { binding, previousState, newState, payload, flushEvent, syncOnly, log:
|
|
44049
|
+
const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log9 } = params;
|
|
44584
44050
|
const traitName = binding.trait.name;
|
|
44585
44051
|
const linkedEntity = binding.linkedEntity || "";
|
|
44586
44052
|
const entityId = payload?.entityId;
|
|
44587
44053
|
const sharedKey = sharedKeyByTraitNameRef.current.get(traitName);
|
|
44588
44054
|
if (traitName === "Hero" || traitName === "Authority") {
|
|
44589
|
-
|
|
44055
|
+
sharedEntityLog.debug("executeTransitionEffects sharedKey", { traitName, sharedKey, storeTilesLength: sharedKey ? sharedEntityStore.getSnapshot(sharedKey).tiles?.length : void 0 });
|
|
44590
44056
|
}
|
|
44591
44057
|
let liveEntity;
|
|
44592
44058
|
if (sharedKey !== void 0) {
|
|
@@ -44613,10 +44079,15 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44613
44079
|
addPattern: (slot, pattern, props) => {
|
|
44614
44080
|
if (traitName === "Hero" && slot === "main" && props && typeof props === "object") {
|
|
44615
44081
|
const canvasChild = Array.isArray(props.children) ? props.children[0] : null;
|
|
44616
|
-
const grandChildren = canvasChild && typeof canvasChild === "object" ? canvasChild.children : null;
|
|
44082
|
+
const grandChildren = canvasChild && typeof canvasChild === "object" && !Array.isArray(canvasChild) ? canvasChild.children : null;
|
|
44617
44083
|
const firstLayer = Array.isArray(grandChildren) && grandChildren.length > 0 ? grandChildren[0] : null;
|
|
44618
|
-
const firstLayerItems = firstLayer && typeof firstLayer === "object" ? firstLayer.items : null;
|
|
44619
|
-
|
|
44084
|
+
const firstLayerItems = firstLayer && typeof firstLayer === "object" && !Array.isArray(firstLayer) ? firstLayer.items : null;
|
|
44085
|
+
sharedEntityLog.debug("render-ui main slot", {
|
|
44086
|
+
traitName,
|
|
44087
|
+
slot,
|
|
44088
|
+
canvasChildType: canvasChild && typeof canvasChild === "object" && !Array.isArray(canvasChild) ? canvasChild.type : "none",
|
|
44089
|
+
firstLayerItemsLength: Array.isArray(firstLayerItems) ? firstLayerItems.length : firstLayerItems
|
|
44090
|
+
});
|
|
44620
44091
|
}
|
|
44621
44092
|
const existing = pendingSlots.get(slot) || [];
|
|
44622
44093
|
existing.push({ pattern, props: props || {} });
|
|
@@ -44649,10 +44120,20 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44649
44120
|
state: previousState
|
|
44650
44121
|
};
|
|
44651
44122
|
const sharedDeclared = runtime.collectDeclaredConfigDefaults(binding.trait);
|
|
44652
|
-
const
|
|
44653
|
-
|
|
44123
|
+
const sharedResolved = traitConfigsByName?.[traitName];
|
|
44124
|
+
const sharedCallSiteRaw = getBindingConfig(binding);
|
|
44125
|
+
const sharedCallSite = sharedCallSiteRaw ? runtime.resolveCallSitePayloadCaptures(
|
|
44126
|
+
Object.fromEntries(
|
|
44127
|
+
Object.entries(sharedCallSiteRaw).filter(
|
|
44128
|
+
([, v]) => !(typeof v === "string" && v.startsWith("@config."))
|
|
44129
|
+
)
|
|
44130
|
+
),
|
|
44131
|
+
payload || {}
|
|
44132
|
+
) : void 0;
|
|
44133
|
+
if (sharedDeclared || sharedResolved || sharedCallSite) {
|
|
44654
44134
|
sharedBindings.config = {
|
|
44655
44135
|
...sharedDeclared ?? {},
|
|
44136
|
+
...sharedResolved ?? {},
|
|
44656
44137
|
...sharedCallSite ?? {}
|
|
44657
44138
|
};
|
|
44658
44139
|
}
|
|
@@ -44686,7 +44167,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44686
44167
|
...handlers,
|
|
44687
44168
|
set: async (targetId, field, value) => {
|
|
44688
44169
|
if (baseSet) await baseSet(targetId, field, value);
|
|
44689
|
-
|
|
44170
|
+
log9.debug("set:write", {
|
|
44690
44171
|
traitName,
|
|
44691
44172
|
field,
|
|
44692
44173
|
value: JSON.stringify(value),
|
|
@@ -44700,15 +44181,30 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44700
44181
|
state: previousState
|
|
44701
44182
|
};
|
|
44702
44183
|
const declaredDefaults = runtime.collectDeclaredConfigDefaults(binding.trait);
|
|
44184
|
+
const resolvedDefaults = traitConfigsByName?.[traitName];
|
|
44703
44185
|
const callSiteConfig = getBindingConfig(binding);
|
|
44704
|
-
|
|
44186
|
+
const callSiteOverrides = callSiteConfig ? runtime.resolveCallSitePayloadCaptures(
|
|
44187
|
+
Object.fromEntries(
|
|
44188
|
+
Object.entries(callSiteConfig).filter(
|
|
44189
|
+
([, v]) => !(typeof v === "string" && v.startsWith("@config."))
|
|
44190
|
+
)
|
|
44191
|
+
),
|
|
44192
|
+
payload || {}
|
|
44193
|
+
) : void 0;
|
|
44194
|
+
if (declaredDefaults || resolvedDefaults || callSiteOverrides) {
|
|
44705
44195
|
bindingCtx.config = {
|
|
44706
44196
|
...declaredDefaults ?? {},
|
|
44707
|
-
...
|
|
44197
|
+
...resolvedDefaults ?? {},
|
|
44198
|
+
...callSiteOverrides ?? {}
|
|
44708
44199
|
};
|
|
44709
44200
|
}
|
|
44710
44201
|
if (traitName === "Authority" || traitName === "Hero") {
|
|
44711
|
-
|
|
44202
|
+
sharedEntityLog.debug("executeTransitionEffects config tiles", {
|
|
44203
|
+
traitName,
|
|
44204
|
+
tilesType: typeof bindingCtx.config?.tiles,
|
|
44205
|
+
tilesLength: Array.isArray(bindingCtx.config?.tiles) ? bindingCtx.config?.tiles?.length : void 0,
|
|
44206
|
+
configKeys: bindingCtx.config ? Object.keys(bindingCtx.config) : void 0
|
|
44207
|
+
});
|
|
44712
44208
|
}
|
|
44713
44209
|
const effectContext = {
|
|
44714
44210
|
traitName,
|
|
@@ -44727,18 +44223,28 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44727
44223
|
}
|
|
44728
44224
|
};
|
|
44729
44225
|
if (traitName === "Hero") {
|
|
44730
|
-
|
|
44226
|
+
sharedEntityLog.debug("executeTransitionEffects effects summary", {
|
|
44227
|
+
traitName,
|
|
44228
|
+
effectsCount: effects.length,
|
|
44229
|
+
hasRenderUI: typeof handlers.renderUI === "function",
|
|
44230
|
+
effectHeads: effects.map((e) => Array.isArray(e) ? String(e[0]) : "??")
|
|
44231
|
+
});
|
|
44731
44232
|
}
|
|
44732
44233
|
const executor = new runtime.EffectExecutor({ handlers: trackingHandlers, bindings: bindingCtx, context: effectContext });
|
|
44733
44234
|
try {
|
|
44734
44235
|
await executor.executeAll(effects);
|
|
44735
44236
|
if (traitName === "Authority" || traitName === "Hero") {
|
|
44736
|
-
|
|
44237
|
+
sharedEntityLog.debug("executeTransitionEffects after executeAll", {
|
|
44238
|
+
traitName,
|
|
44239
|
+
tilesType: typeof liveEntity.tiles,
|
|
44240
|
+
tilesLength: Array.isArray(liveEntity.tiles) ? liveEntity.tiles?.length : void 0,
|
|
44241
|
+
firstTilePos: Array.isArray(liveEntity.tiles) && liveEntity.tiles.length > 0 ? JSON.stringify(liveEntity.tiles[0]).slice(0, 120) : void 0
|
|
44242
|
+
});
|
|
44737
44243
|
}
|
|
44738
44244
|
if (sharedKey !== void 0) {
|
|
44739
44245
|
sharedEntityStore.commit(sharedKey, liveEntity);
|
|
44740
44246
|
}
|
|
44741
|
-
|
|
44247
|
+
log9.debug("effects:executed", () => ({
|
|
44742
44248
|
traitName,
|
|
44743
44249
|
transition: `${previousState}->${newState}`,
|
|
44744
44250
|
event: flushEvent,
|
|
@@ -44748,7 +44254,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44748
44254
|
slotsTouched: Array.from(pendingSlots.keys()).join(",")
|
|
44749
44255
|
}));
|
|
44750
44256
|
for (const [slot, patterns] of pendingSlots) {
|
|
44751
|
-
|
|
44257
|
+
log9.debug("flush:slot", {
|
|
44752
44258
|
traitName,
|
|
44753
44259
|
slot,
|
|
44754
44260
|
patternCount: patterns.length,
|
|
@@ -44763,7 +44269,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44763
44269
|
});
|
|
44764
44270
|
}
|
|
44765
44271
|
} catch (error) {
|
|
44766
|
-
|
|
44272
|
+
log9.error("effects:error", {
|
|
44767
44273
|
traitName,
|
|
44768
44274
|
transition: `${previousState}->${newState}`,
|
|
44769
44275
|
event: flushEvent,
|
|
@@ -44785,7 +44291,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
44785
44291
|
payload: {},
|
|
44786
44292
|
state: currentState
|
|
44787
44293
|
};
|
|
44788
|
-
const bindingCfg = getBindingConfig(binding);
|
|
44294
|
+
const bindingCfg = getBindingConfig(binding) ?? traitConfigsByName?.[traitName];
|
|
44789
44295
|
if (bindingCfg) {
|
|
44790
44296
|
guardCtx.config = bindingCfg;
|
|
44791
44297
|
}
|
|
@@ -45148,17 +44654,19 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
45148
44654
|
}, [traitBindings, eventBus, enqueueAndDrain]);
|
|
45149
44655
|
React81.useEffect(() => {
|
|
45150
44656
|
const mgr = managerRef.current;
|
|
45151
|
-
const
|
|
44657
|
+
const eventsToFire = /* @__PURE__ */ new Set();
|
|
45152
44658
|
for (const binding of traitBindings) {
|
|
45153
44659
|
const traitName = binding.trait.name;
|
|
45154
|
-
if (inited.has(traitName)) continue;
|
|
45155
44660
|
const lifecycleEvent = LIFECYCLE_EVENTS.find(
|
|
45156
44661
|
(evt) => mgr.canHandleEvent(traitName, evt)
|
|
45157
44662
|
);
|
|
45158
|
-
if (lifecycleEvent
|
|
45159
|
-
|
|
45160
|
-
|
|
45161
|
-
|
|
44663
|
+
if (lifecycleEvent !== void 0) {
|
|
44664
|
+
eventsToFire.add(lifecycleEvent);
|
|
44665
|
+
}
|
|
44666
|
+
}
|
|
44667
|
+
for (const event of eventsToFire) {
|
|
44668
|
+
stateLog.debug("mount:fire-lifecycle", { event, traitCount: traitBindings.length });
|
|
44669
|
+
enqueueAndDrain(event, {});
|
|
45162
44670
|
}
|
|
45163
44671
|
return () => {
|
|
45164
44672
|
initedTraitsRef.current = /* @__PURE__ */ new Set();
|
|
@@ -45273,343 +44781,8 @@ init_Typography();
|
|
|
45273
44781
|
init_UISlotRenderer();
|
|
45274
44782
|
init_useEventBus();
|
|
45275
44783
|
|
|
45276
|
-
// lib/embedded-traits.ts
|
|
45277
|
-
var TRAIT_BINDING_PREFIX = "@trait.";
|
|
45278
|
-
function collectTraitRefsFromValue(value, into) {
|
|
45279
|
-
if (value === null || value === void 0) return;
|
|
45280
|
-
if (typeof value === "string") {
|
|
45281
|
-
if (value.startsWith(TRAIT_BINDING_PREFIX)) {
|
|
45282
|
-
const rest = value.slice(TRAIT_BINDING_PREFIX.length);
|
|
45283
|
-
const dot = rest.indexOf(".");
|
|
45284
|
-
const traitName = dot === -1 ? rest : rest.slice(0, dot);
|
|
45285
|
-
if (traitName.length > 0) into.add(traitName);
|
|
45286
|
-
}
|
|
45287
|
-
return;
|
|
45288
|
-
}
|
|
45289
|
-
if (Array.isArray(value)) {
|
|
45290
|
-
for (const item of value) collectTraitRefsFromValue(item, into);
|
|
45291
|
-
return;
|
|
45292
|
-
}
|
|
45293
|
-
if (typeof value === "object") {
|
|
45294
|
-
for (const v of Object.values(value)) {
|
|
45295
|
-
collectTraitRefsFromValue(v, into);
|
|
45296
|
-
}
|
|
45297
|
-
}
|
|
45298
|
-
}
|
|
45299
|
-
function collectTraitRefsFromEffects(effects, into) {
|
|
45300
|
-
if (!effects) return;
|
|
45301
|
-
for (const effect of effects) {
|
|
45302
|
-
if (!Array.isArray(effect)) continue;
|
|
45303
|
-
if (effect[0] === "render-ui" && effect.length >= 3) {
|
|
45304
|
-
collectTraitRefsFromValue(effect[2], into);
|
|
45305
|
-
continue;
|
|
45306
|
-
}
|
|
45307
|
-
for (let i = 1; i < effect.length; i++) {
|
|
45308
|
-
const arg = effect[i];
|
|
45309
|
-
if (Array.isArray(arg)) collectTraitRefsFromEffects([arg], into);
|
|
45310
|
-
else collectTraitRefsFromValue(arg, into);
|
|
45311
|
-
}
|
|
45312
|
-
}
|
|
45313
|
-
}
|
|
45314
|
-
function collectTraitRefsFromResolvedTrait(trait) {
|
|
45315
|
-
const out = /* @__PURE__ */ new Set();
|
|
45316
|
-
for (const transition of trait.transitions ?? []) {
|
|
45317
|
-
collectTraitRefsFromEffects(transition.effects, out);
|
|
45318
|
-
}
|
|
45319
|
-
for (const tick of trait.ticks ?? []) {
|
|
45320
|
-
collectTraitRefsFromEffects(tick.effects, out);
|
|
45321
|
-
}
|
|
45322
|
-
return out;
|
|
45323
|
-
}
|
|
45324
|
-
function collectEmbeddedTraits(schema) {
|
|
45325
|
-
const out = /* @__PURE__ */ new Set();
|
|
45326
|
-
if (!schema?.orbitals) return out;
|
|
45327
|
-
for (const orbital of schema.orbitals) {
|
|
45328
|
-
const traits2 = orbital.traits;
|
|
45329
|
-
if (!Array.isArray(traits2)) continue;
|
|
45330
|
-
for (const traitRef of traits2) {
|
|
45331
|
-
if (!traitRef || typeof traitRef !== "object") continue;
|
|
45332
|
-
const resolved = traitRef._resolved;
|
|
45333
|
-
const target = resolved && typeof resolved === "object" ? resolved : traitRef;
|
|
45334
|
-
if (target.config) {
|
|
45335
|
-
collectTraitRefsFromValue(target.config, out);
|
|
45336
|
-
}
|
|
45337
|
-
const transitions = target.stateMachine?.transitions;
|
|
45338
|
-
if (!Array.isArray(transitions)) continue;
|
|
45339
|
-
for (const t of transitions) {
|
|
45340
|
-
collectTraitRefsFromEffects(t.effects, out);
|
|
45341
|
-
}
|
|
45342
|
-
collectTraitRefsFromEffects(target.initialEffects, out);
|
|
45343
|
-
const ticks2 = target.ticks;
|
|
45344
|
-
if (Array.isArray(ticks2)) {
|
|
45345
|
-
for (const tick of ticks2) {
|
|
45346
|
-
collectTraitRefsFromEffects(tick.effects, out);
|
|
45347
|
-
}
|
|
45348
|
-
}
|
|
45349
|
-
}
|
|
45350
|
-
}
|
|
45351
|
-
return out;
|
|
45352
|
-
}
|
|
45353
|
-
|
|
45354
|
-
// lib/orbitalsByTrait.ts
|
|
45355
|
-
function buildOrbitalsByTrait(schema, resolvedPages = []) {
|
|
45356
|
-
const map = {};
|
|
45357
|
-
if (!schema?.orbitals) return map;
|
|
45358
|
-
const pagePathToOrbital = {};
|
|
45359
|
-
for (const orb of schema.orbitals) {
|
|
45360
|
-
for (const traitRef of orb.traits ?? []) {
|
|
45361
|
-
let traitName;
|
|
45362
|
-
if (typeof traitRef === "string") {
|
|
45363
|
-
const parts = traitRef.split(".");
|
|
45364
|
-
traitName = parts[parts.length - 1];
|
|
45365
|
-
} else if (typeof traitRef.ref === "string") {
|
|
45366
|
-
const parts = traitRef.ref.split(".");
|
|
45367
|
-
traitName = traitRef.name ?? parts[parts.length - 1];
|
|
45368
|
-
} else if (typeof traitRef.name === "string") {
|
|
45369
|
-
traitName = traitRef.name;
|
|
45370
|
-
}
|
|
45371
|
-
if (traitName) map[traitName] = orb.name;
|
|
45372
|
-
}
|
|
45373
|
-
for (const pg of orb.pages ?? []) {
|
|
45374
|
-
const path = typeof pg === "string" ? pg : pg?.path;
|
|
45375
|
-
if (path) pagePathToOrbital[path] = orb.name;
|
|
45376
|
-
}
|
|
45377
|
-
}
|
|
45378
|
-
for (const page of resolvedPages) {
|
|
45379
|
-
const orbital = page.path ? pagePathToOrbital[page.path] : void 0;
|
|
45380
|
-
if (!orbital) continue;
|
|
45381
|
-
for (const traitName of page.traitNames) {
|
|
45382
|
-
if (traitName && !(traitName in map)) map[traitName] = orbital;
|
|
45383
|
-
}
|
|
45384
|
-
}
|
|
45385
|
-
return map;
|
|
45386
|
-
}
|
|
45387
|
-
|
|
45388
44784
|
// runtime/OrbPreview.tsx
|
|
45389
44785
|
init_verificationRegistry();
|
|
45390
|
-
var PERF_NAMESPACE = "almadar:perf:canvas";
|
|
45391
|
-
var log9 = logger.createLogger(PERF_NAMESPACE);
|
|
45392
|
-
var RING_SIZE = 50;
|
|
45393
|
-
var ring = [];
|
|
45394
|
-
var writeIdx = 0;
|
|
45395
|
-
var subscribers = /* @__PURE__ */ new Set();
|
|
45396
|
-
var notifyScheduled = false;
|
|
45397
|
-
var revision = 0;
|
|
45398
|
-
var cachedSnapshot = [];
|
|
45399
|
-
var cachedRevision = -1;
|
|
45400
|
-
function scheduleNotify() {
|
|
45401
|
-
if (notifyScheduled) return;
|
|
45402
|
-
notifyScheduled = true;
|
|
45403
|
-
queueMicrotask(() => {
|
|
45404
|
-
notifyScheduled = false;
|
|
45405
|
-
revision++;
|
|
45406
|
-
for (const fn of subscribers) fn();
|
|
45407
|
-
});
|
|
45408
|
-
}
|
|
45409
|
-
function push(entry) {
|
|
45410
|
-
if (ring.length < RING_SIZE) {
|
|
45411
|
-
ring.push(entry);
|
|
45412
|
-
} else {
|
|
45413
|
-
ring[writeIdx] = entry;
|
|
45414
|
-
}
|
|
45415
|
-
writeIdx = (writeIdx + 1) % RING_SIZE;
|
|
45416
|
-
scheduleNotify();
|
|
45417
|
-
}
|
|
45418
|
-
function isEnabled() {
|
|
45419
|
-
return logger.isLogLevelEnabled("DEBUG", PERF_NAMESPACE);
|
|
45420
|
-
}
|
|
45421
|
-
function now() {
|
|
45422
|
-
return typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
|
|
45423
|
-
}
|
|
45424
|
-
function perfStart(name) {
|
|
45425
|
-
if (!isEnabled()) return -1;
|
|
45426
|
-
if (typeof performance !== "undefined" && typeof performance.mark === "function") {
|
|
45427
|
-
try {
|
|
45428
|
-
performance.mark(`${name}-start`);
|
|
45429
|
-
} catch {
|
|
45430
|
-
}
|
|
45431
|
-
}
|
|
45432
|
-
return now();
|
|
45433
|
-
}
|
|
45434
|
-
function perfEnd(name, startToken, detail) {
|
|
45435
|
-
if (startToken < 0 || !isEnabled()) return;
|
|
45436
|
-
const endTs = now();
|
|
45437
|
-
const durationMs = endTs - startToken;
|
|
45438
|
-
if (typeof performance !== "undefined" && typeof performance.measure === "function") {
|
|
45439
|
-
try {
|
|
45440
|
-
performance.mark(`${name}-end`);
|
|
45441
|
-
performance.measure(name, `${name}-start`, `${name}-end`);
|
|
45442
|
-
} catch {
|
|
45443
|
-
}
|
|
45444
|
-
}
|
|
45445
|
-
push({ name, durationMs, ts: endTs, detail });
|
|
45446
|
-
log9.debug(name, () => ({ durationMs, ...detail ?? {} }));
|
|
45447
|
-
}
|
|
45448
|
-
function perfTime(name, fn, detail) {
|
|
45449
|
-
const t = perfStart(name);
|
|
45450
|
-
try {
|
|
45451
|
-
return fn();
|
|
45452
|
-
} finally {
|
|
45453
|
-
perfEnd(name, t, detail);
|
|
45454
|
-
}
|
|
45455
|
-
}
|
|
45456
|
-
var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, commitTime) => {
|
|
45457
|
-
if (!isEnabled()) return;
|
|
45458
|
-
push({
|
|
45459
|
-
name: `profiler:${id}:${phase}`,
|
|
45460
|
-
durationMs: actualDuration,
|
|
45461
|
-
ts: commitTime,
|
|
45462
|
-
detail: { baseDuration }
|
|
45463
|
-
});
|
|
45464
|
-
log9.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
|
|
45465
|
-
};
|
|
45466
|
-
function getPerfSnapshot() {
|
|
45467
|
-
if (ring.length < RING_SIZE) return ring.slice();
|
|
45468
|
-
return [...ring.slice(writeIdx), ...ring.slice(0, writeIdx)];
|
|
45469
|
-
}
|
|
45470
|
-
function getSnapshot2() {
|
|
45471
|
-
if (cachedRevision !== revision) {
|
|
45472
|
-
cachedSnapshot = getPerfSnapshot();
|
|
45473
|
-
cachedRevision = revision;
|
|
45474
|
-
}
|
|
45475
|
-
return cachedSnapshot;
|
|
45476
|
-
}
|
|
45477
|
-
function subscribe(fn) {
|
|
45478
|
-
subscribers.add(fn);
|
|
45479
|
-
return () => {
|
|
45480
|
-
subscribers.delete(fn);
|
|
45481
|
-
};
|
|
45482
|
-
}
|
|
45483
|
-
function usePerfBuffer() {
|
|
45484
|
-
return React81.useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
|
|
45485
|
-
}
|
|
45486
|
-
function clearPerf() {
|
|
45487
|
-
ring.length = 0;
|
|
45488
|
-
writeIdx = 0;
|
|
45489
|
-
scheduleNotify();
|
|
45490
|
-
}
|
|
45491
|
-
|
|
45492
|
-
// lib/prepareSchemaForPreview.ts
|
|
45493
|
-
function generateEntityRow(entity, idx) {
|
|
45494
|
-
const row = { id: String(idx) };
|
|
45495
|
-
for (const f3 of entity.fields) {
|
|
45496
|
-
if (f3.name === void 0 || f3.name === "id") continue;
|
|
45497
|
-
row[f3.name] = generateFieldValue(entity.name, f3, idx);
|
|
45498
|
-
}
|
|
45499
|
-
return row;
|
|
45500
|
-
}
|
|
45501
|
-
function generateFieldValue(entityName, field, idx) {
|
|
45502
|
-
if ("values" in field && field.values && field.values.length > 0) {
|
|
45503
|
-
return field.values[(idx - 1) % field.values.length];
|
|
45504
|
-
}
|
|
45505
|
-
const fieldName = field.name ?? "";
|
|
45506
|
-
switch (field.type) {
|
|
45507
|
-
case "string":
|
|
45508
|
-
return `${entityName} ${fieldName.charAt(0).toUpperCase() + fieldName.slice(1)} ${idx}`;
|
|
45509
|
-
case "number":
|
|
45510
|
-
return idx * 10;
|
|
45511
|
-
case "boolean":
|
|
45512
|
-
return idx % 2 === 0;
|
|
45513
|
-
default:
|
|
45514
|
-
return field.default ?? null;
|
|
45515
|
-
}
|
|
45516
|
-
}
|
|
45517
|
-
function buildMockData(schema) {
|
|
45518
|
-
const t = perfStart("build-mock-data");
|
|
45519
|
-
const result = {};
|
|
45520
|
-
for (const orbital of schema.orbitals) {
|
|
45521
|
-
const entity = orbital.entity;
|
|
45522
|
-
if (!entity || typeof entity === "string") continue;
|
|
45523
|
-
if (core.isEntityCall(entity)) continue;
|
|
45524
|
-
const entityName = entity.name;
|
|
45525
|
-
if (!entityName) continue;
|
|
45526
|
-
if (entity.instances && entity.instances.length > 0) {
|
|
45527
|
-
result[entityName] = entity.instances;
|
|
45528
|
-
continue;
|
|
45529
|
-
}
|
|
45530
|
-
const rows = Array.from(
|
|
45531
|
-
{ length: 10 },
|
|
45532
|
-
(_, i) => generateEntityRow(entity, i + 1)
|
|
45533
|
-
);
|
|
45534
|
-
result[entityName] = rows;
|
|
45535
|
-
}
|
|
45536
|
-
for (const orbital of schema.orbitals) {
|
|
45537
|
-
for (const traitRef of orbital.traits ?? []) {
|
|
45538
|
-
if (!isInlineTrait3(traitRef)) continue;
|
|
45539
|
-
const trait = traitRef;
|
|
45540
|
-
const sourceEntity = trait.sourceEntityDefinition;
|
|
45541
|
-
if (!sourceEntity || core.isEntityCall(sourceEntity)) continue;
|
|
45542
|
-
const sourceName = sourceEntity.name;
|
|
45543
|
-
if (!sourceName) continue;
|
|
45544
|
-
if (!result[sourceName]) {
|
|
45545
|
-
result[sourceName] = sourceEntity.instances && sourceEntity.instances.length > 0 ? sourceEntity.instances : Array.from(
|
|
45546
|
-
{ length: 10 },
|
|
45547
|
-
(_, i) => generateEntityRow(sourceEntity, i + 1)
|
|
45548
|
-
);
|
|
45549
|
-
}
|
|
45550
|
-
const reboundName = trait.linkedEntity;
|
|
45551
|
-
if (!reboundName || reboundName === sourceName) continue;
|
|
45552
|
-
const reboundRows = result[reboundName];
|
|
45553
|
-
if (!reboundRows || reboundRows.length === 0) continue;
|
|
45554
|
-
reboundRows.forEach((row, i) => {
|
|
45555
|
-
for (const f3 of sourceEntity.fields) {
|
|
45556
|
-
if (f3.name === void 0 || f3.name === "id") continue;
|
|
45557
|
-
if (row[f3.name] !== void 0) continue;
|
|
45558
|
-
row[f3.name] = generateFieldValue(sourceName, f3, i + 1);
|
|
45559
|
-
}
|
|
45560
|
-
});
|
|
45561
|
-
}
|
|
45562
|
-
}
|
|
45563
|
-
perfEnd("build-mock-data", t, { orbitalCount: schema.orbitals.length, entityCount: Object.keys(result).length });
|
|
45564
|
-
return result;
|
|
45565
|
-
}
|
|
45566
|
-
function isInlineTrait3(traitRef) {
|
|
45567
|
-
return typeof traitRef === "object" && traitRef !== null && "stateMachine" in traitRef;
|
|
45568
|
-
}
|
|
45569
|
-
function findDataState(sm, initialStateName) {
|
|
45570
|
-
return sm.states.find((s) => {
|
|
45571
|
-
if (s.name === initialStateName) return false;
|
|
45572
|
-
return sm.transitions.some(
|
|
45573
|
-
(t) => t.event === "INIT" && (t.from === s.name || Array.isArray(t.from) && t.from.includes(s.name))
|
|
45574
|
-
);
|
|
45575
|
-
});
|
|
45576
|
-
}
|
|
45577
|
-
function rewriteTraitInitialState(trait, mockData) {
|
|
45578
|
-
const sm = trait.stateMachine;
|
|
45579
|
-
if (!sm) return trait;
|
|
45580
|
-
const linkedEntity = trait.linkedEntity;
|
|
45581
|
-
if (!linkedEntity || !mockData[linkedEntity]?.length) return trait;
|
|
45582
|
-
const initialStateName = sm.states.find((s) => s.isInitial)?.name ?? sm.states[0]?.name;
|
|
45583
|
-
if (!initialStateName) return trait;
|
|
45584
|
-
const dataState = findDataState(sm, initialStateName);
|
|
45585
|
-
if (!dataState) return trait;
|
|
45586
|
-
const updatedStates = sm.states.map((s) => {
|
|
45587
|
-
if (s.name === initialStateName) return { ...s, isInitial: false };
|
|
45588
|
-
if (s.name === dataState.name) return { ...s, isInitial: true };
|
|
45589
|
-
return s;
|
|
45590
|
-
});
|
|
45591
|
-
return { ...trait, stateMachine: { ...sm, states: updatedStates } };
|
|
45592
|
-
}
|
|
45593
|
-
function adjustSchemaForMockData(schema, mockData) {
|
|
45594
|
-
let changed = false;
|
|
45595
|
-
const updatedOrbitals = schema.orbitals.map((orbital) => {
|
|
45596
|
-
const traits2 = orbital.traits ?? [];
|
|
45597
|
-
const updatedTraits = traits2.map((traitRef) => {
|
|
45598
|
-
if (!isInlineTrait3(traitRef)) return traitRef;
|
|
45599
|
-
const updated = rewriteTraitInitialState(traitRef, mockData);
|
|
45600
|
-
if (updated !== traitRef) changed = true;
|
|
45601
|
-
return updated;
|
|
45602
|
-
});
|
|
45603
|
-
return changed ? { ...orbital, traits: updatedTraits } : orbital;
|
|
45604
|
-
});
|
|
45605
|
-
return changed ? { ...schema, orbitals: updatedOrbitals } : schema;
|
|
45606
|
-
}
|
|
45607
|
-
function prepareSchemaForPreview(input) {
|
|
45608
|
-
const parsed = typeof input === "string" ? JSON.parse(input) : input;
|
|
45609
|
-
const mockData = buildMockData(parsed);
|
|
45610
|
-
const schema = adjustSchemaForMockData(parsed, mockData);
|
|
45611
|
-
return { schema, mockData };
|
|
45612
|
-
}
|
|
45613
44786
|
var xOrbitalLog = logger.createLogger("almadar:runtime:cross-orbital");
|
|
45614
44787
|
var navLog = logger.createLogger("almadar:runtime:navigation");
|
|
45615
44788
|
function normalizeChild(child) {
|
|
@@ -45697,6 +44870,7 @@ function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFa
|
|
|
45697
44870
|
hadPrev: prevTraitsRef.current !== void 0
|
|
45698
44871
|
}));
|
|
45699
44872
|
if (refChanged) {
|
|
44873
|
+
navLog.info("page:traits-reset", { traitsCount: Array.isArray(traits2) ? traits2.length : -1 });
|
|
45700
44874
|
uiSlots.clearAll();
|
|
45701
44875
|
initSentRef.current = false;
|
|
45702
44876
|
}
|
|
@@ -45775,7 +44949,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
45775
44949
|
while (queue.length > 0) {
|
|
45776
44950
|
const binding = queue.shift();
|
|
45777
44951
|
if (!binding) continue;
|
|
45778
|
-
for (const refName of collectTraitRefsFromResolvedTrait(binding.trait)) {
|
|
44952
|
+
for (const refName of ui.collectTraitRefsFromResolvedTrait(binding.trait)) {
|
|
45779
44953
|
if (byName.has(refName)) continue;
|
|
45780
44954
|
const rt = allTraits.get(refName);
|
|
45781
44955
|
if (!rt) continue;
|
|
@@ -45793,7 +44967,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
45793
44967
|
return orbitals.map((o) => o.name);
|
|
45794
44968
|
}, [schema]);
|
|
45795
44969
|
const orbitalsByTrait = React81.useMemo(
|
|
45796
|
-
() => buildOrbitalsByTrait(
|
|
44970
|
+
() => ui.buildOrbitalsByTrait(
|
|
45797
44971
|
schema,
|
|
45798
44972
|
ir ? Array.from(ir.pages.values()).map((p) => ({
|
|
45799
44973
|
path: p.path,
|
|
@@ -45842,26 +45016,12 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
45842
45016
|
pageOrbitalNames: pageOrbitalNames.join(",")
|
|
45843
45017
|
});
|
|
45844
45018
|
}, [pageName, allPageTraits, orbitalsByTrait, pageOrbitalNames]);
|
|
45845
|
-
const traitConfigsByName = React81.useMemo(
|
|
45846
|
-
|
|
45847
|
-
|
|
45848
|
-
|
|
45849
|
-
for (const orb of orbitals) {
|
|
45850
|
-
const traitRefs = orb.traits;
|
|
45851
|
-
if (!traitRefs) continue;
|
|
45852
|
-
for (const t of traitRefs) {
|
|
45853
|
-
if (typeof t === "string") continue;
|
|
45854
|
-
const name = t.name ?? t.ref;
|
|
45855
|
-
const config = t.config;
|
|
45856
|
-
if (typeof name === "string" && config !== void 0) {
|
|
45857
|
-
map[name] = config;
|
|
45858
|
-
}
|
|
45859
|
-
}
|
|
45860
|
-
}
|
|
45861
|
-
return map;
|
|
45862
|
-
}, [schema]);
|
|
45019
|
+
const traitConfigsByName = React81.useMemo(
|
|
45020
|
+
() => core.buildResolvedTraitConfigs(schema),
|
|
45021
|
+
[schema]
|
|
45022
|
+
);
|
|
45863
45023
|
const embeddedTraits = React81.useMemo(() => {
|
|
45864
|
-
const set = collectEmbeddedTraits(schema);
|
|
45024
|
+
const set = ui.collectEmbeddedTraits(schema);
|
|
45865
45025
|
xOrbitalLog.info("SchemaRunner:embeddedTraits", {
|
|
45866
45026
|
pageName,
|
|
45867
45027
|
embedded: Array.from(set),
|
|
@@ -45946,7 +45106,7 @@ function OrbPreview({
|
|
|
45946
45106
|
parsed = schema;
|
|
45947
45107
|
}
|
|
45948
45108
|
if (autoMock && !serverUrl && !transport) {
|
|
45949
|
-
const prepared = prepareSchemaForPreview(parsed);
|
|
45109
|
+
const prepared = ui.prepareSchemaForPreview(parsed);
|
|
45950
45110
|
return { ok: true, schema: prepared.schema, mockData: prepared.mockData };
|
|
45951
45111
|
}
|
|
45952
45112
|
return { ok: true, schema: parsed, mockData: mockData ?? {} };
|
|
@@ -46121,6 +45281,17 @@ function BrowserPlayground({
|
|
|
46121
45281
|
}
|
|
46122
45282
|
);
|
|
46123
45283
|
}
|
|
45284
|
+
function usePerfBuffer() {
|
|
45285
|
+
return React81.useSyncExternalStore(ui.perfStore.subscribe, ui.perfStore.getSnapshot, ui.perfStore.getSnapshot);
|
|
45286
|
+
}
|
|
45287
|
+
var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, commitTime) => {
|
|
45288
|
+
ui.pushPerfEntry({
|
|
45289
|
+
name: `profiler:${id}:${phase}`,
|
|
45290
|
+
durationMs: actualDuration,
|
|
45291
|
+
ts: commitTime,
|
|
45292
|
+
detail: { baseDuration }
|
|
45293
|
+
});
|
|
45294
|
+
};
|
|
46124
45295
|
|
|
46125
45296
|
Object.defineProperty(exports, "EntitySchemaProvider", {
|
|
46126
45297
|
enumerable: true,
|
|
@@ -46158,20 +45329,47 @@ Object.defineProperty(exports, "useTraitContext", {
|
|
|
46158
45329
|
enumerable: true,
|
|
46159
45330
|
get: function () { return providers.useTraitContext; }
|
|
46160
45331
|
});
|
|
45332
|
+
Object.defineProperty(exports, "PERF_NAMESPACE", {
|
|
45333
|
+
enumerable: true,
|
|
45334
|
+
get: function () { return ui.PERF_NAMESPACE; }
|
|
45335
|
+
});
|
|
45336
|
+
Object.defineProperty(exports, "adjustSchemaForMockData", {
|
|
45337
|
+
enumerable: true,
|
|
45338
|
+
get: function () { return ui.adjustSchemaForMockData; }
|
|
45339
|
+
});
|
|
45340
|
+
Object.defineProperty(exports, "buildMockData", {
|
|
45341
|
+
enumerable: true,
|
|
45342
|
+
get: function () { return ui.buildMockData; }
|
|
45343
|
+
});
|
|
45344
|
+
Object.defineProperty(exports, "clearPerf", {
|
|
45345
|
+
enumerable: true,
|
|
45346
|
+
get: function () { return ui.clearPerf; }
|
|
45347
|
+
});
|
|
45348
|
+
Object.defineProperty(exports, "perfEnd", {
|
|
45349
|
+
enumerable: true,
|
|
45350
|
+
get: function () { return ui.perfEnd; }
|
|
45351
|
+
});
|
|
45352
|
+
Object.defineProperty(exports, "perfStart", {
|
|
45353
|
+
enumerable: true,
|
|
45354
|
+
get: function () { return ui.perfStart; }
|
|
45355
|
+
});
|
|
45356
|
+
Object.defineProperty(exports, "perfTime", {
|
|
45357
|
+
enumerable: true,
|
|
45358
|
+
get: function () { return ui.perfTime; }
|
|
45359
|
+
});
|
|
45360
|
+
Object.defineProperty(exports, "prepareSchemaForPreview", {
|
|
45361
|
+
enumerable: true,
|
|
45362
|
+
get: function () { return ui.prepareSchemaForPreview; }
|
|
45363
|
+
});
|
|
45364
|
+
Object.defineProperty(exports, "wrapCallbackForEvent", {
|
|
45365
|
+
enumerable: true,
|
|
45366
|
+
get: function () { return ui.wrapCallbackForEvent; }
|
|
45367
|
+
});
|
|
46161
45368
|
exports.BrowserPlayground = BrowserPlayground;
|
|
46162
45369
|
exports.OrbPreview = OrbPreview;
|
|
46163
|
-
exports.PERF_NAMESPACE = PERF_NAMESPACE;
|
|
46164
|
-
exports.adjustSchemaForMockData = adjustSchemaForMockData;
|
|
46165
|
-
exports.buildMockData = buildMockData;
|
|
46166
|
-
exports.clearPerf = clearPerf;
|
|
46167
45370
|
exports.clearSchemaCache = clearSchemaCache;
|
|
46168
45371
|
exports.createClientEffectHandlers = createClientEffectHandlers;
|
|
46169
|
-
exports.perfEnd = perfEnd;
|
|
46170
|
-
exports.perfStart = perfStart;
|
|
46171
|
-
exports.perfTime = perfTime;
|
|
46172
|
-
exports.prepareSchemaForPreview = prepareSchemaForPreview;
|
|
46173
45372
|
exports.profilerOnRender = profilerOnRender;
|
|
46174
45373
|
exports.usePerfBuffer = usePerfBuffer;
|
|
46175
45374
|
exports.useResolvedSchema = useResolvedSchema;
|
|
46176
45375
|
exports.useTraitStateMachine = useTraitStateMachine;
|
|
46177
|
-
exports.wrapCallbackForEvent = wrapCallbackForEvent;
|