@almadar/ui 5.113.0 → 5.115.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 +240 -1055
- package/dist/avl/index.js +235 -1050
- package/dist/{cn-BkQrMR01.d.cts → cn-D3H9UzCW.d.cts} +1 -1
- package/dist/{cn-CTEFm9PC.d.ts → cn-Dm0VrLRG.d.ts} +1 -1
- package/dist/components/index.cjs +132 -680
- package/dist/components/index.d.cts +7 -3
- package/dist/components/index.d.ts +7 -3
- package/dist/components/index.js +131 -679
- package/dist/lib/drawable/three/index.cjs +58 -38
- package/dist/lib/drawable/three/index.d.cts +3 -2
- package/dist/lib/drawable/three/index.d.ts +3 -2
- package/dist/lib/drawable/three/index.js +58 -38
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/marketing/index.cjs +16 -637
- package/dist/marketing/index.js +16 -637
- package/dist/{paintDispatch-DR942knx.d.cts → paintDispatch-BXJgISot.d.cts} +2 -0
- package/dist/{paintDispatch-DR942knx.d.ts → paintDispatch-BXJgISot.d.ts} +2 -0
- package/dist/providers/index.cjs +132 -680
- package/dist/providers/index.js +131 -679
- package/dist/runtime/index.cjs +267 -1089
- package/dist/runtime/index.d.cts +11 -112
- package/dist/runtime/index.d.ts +11 -112
- package/dist/runtime/index.js +230 -1078
- package/package.json +3 -3
|
@@ -11,6 +11,7 @@ var hooks = require('@almadar/ui/hooks');
|
|
|
11
11
|
var context = require('@almadar/ui/context');
|
|
12
12
|
var evaluator = require('@almadar/evaluator');
|
|
13
13
|
var reactDom = require('react-dom');
|
|
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');
|
|
@@ -1269,41 +1270,6 @@ function kebabToPascal(name) {
|
|
|
1269
1270
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1270
1271
|
}).join("");
|
|
1271
1272
|
}
|
|
1272
|
-
function loadLib(key, importer) {
|
|
1273
|
-
let p = libPromises.get(key);
|
|
1274
|
-
if (!p) {
|
|
1275
|
-
p = importer();
|
|
1276
|
-
libPromises.set(key, p);
|
|
1277
|
-
}
|
|
1278
|
-
return p;
|
|
1279
|
-
}
|
|
1280
|
-
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
1281
|
-
const Lazy = React73__namespace.default.lazy(async () => {
|
|
1282
|
-
const lib = await loadLib(libKey, importer);
|
|
1283
|
-
const Comp = pick(lib);
|
|
1284
|
-
if (!Comp) {
|
|
1285
|
-
warnFallback(fallbackName, family);
|
|
1286
|
-
return { default: makeLucideAdapter(fallbackName, true) };
|
|
1287
|
-
}
|
|
1288
|
-
return { default: Comp };
|
|
1289
|
-
});
|
|
1290
|
-
const Wrapped = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1291
|
-
React73__namespace.default.Suspense,
|
|
1292
|
-
{
|
|
1293
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1294
|
-
"span",
|
|
1295
|
-
{
|
|
1296
|
-
"aria-hidden": true,
|
|
1297
|
-
className: props.className,
|
|
1298
|
-
style: { display: "inline-block", ...props.style }
|
|
1299
|
-
}
|
|
1300
|
-
),
|
|
1301
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Lazy, { ...props })
|
|
1302
|
-
}
|
|
1303
|
-
);
|
|
1304
|
-
Wrapped.displayName = `Lazy.${libKey}.${fallbackName}`;
|
|
1305
|
-
return Wrapped;
|
|
1306
|
-
}
|
|
1307
1273
|
function isComponentLike(v) {
|
|
1308
1274
|
return v != null && (typeof v === "function" || typeof v === "object");
|
|
1309
1275
|
}
|
|
@@ -1317,146 +1283,32 @@ function resolveLucide(name) {
|
|
|
1317
1283
|
if (isComponentLike(asIs)) return asIs;
|
|
1318
1284
|
return LucideIcons2__namespace.HelpCircle;
|
|
1319
1285
|
}
|
|
1320
|
-
function
|
|
1321
|
-
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
1322
|
-
return lazyFamilyIcon(
|
|
1323
|
-
"phosphor",
|
|
1324
|
-
() => import('@phosphor-icons/react'),
|
|
1325
|
-
(lib) => {
|
|
1326
|
-
const PhosphorComp = lib[target];
|
|
1327
|
-
if (!PhosphorComp) return null;
|
|
1328
|
-
const Component = PhosphorComp;
|
|
1329
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1330
|
-
Component,
|
|
1331
|
-
{
|
|
1332
|
-
weight,
|
|
1333
|
-
className: props.className,
|
|
1334
|
-
style: props.style,
|
|
1335
|
-
size: props.size ?? "1em"
|
|
1336
|
-
}
|
|
1337
|
-
);
|
|
1338
|
-
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
1339
|
-
return Adapter;
|
|
1340
|
-
},
|
|
1341
|
-
name,
|
|
1342
|
-
family
|
|
1343
|
-
);
|
|
1344
|
-
}
|
|
1345
|
-
function resolveTabler(name, family) {
|
|
1346
|
-
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
1347
|
-
const target = `Icon${suffix}`;
|
|
1348
|
-
return lazyFamilyIcon(
|
|
1349
|
-
"tabler",
|
|
1350
|
-
() => import('@tabler/icons-react'),
|
|
1351
|
-
(lib) => {
|
|
1352
|
-
const TablerComp = lib[target];
|
|
1353
|
-
if (!TablerComp) return null;
|
|
1354
|
-
const Component = TablerComp;
|
|
1355
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1356
|
-
Component,
|
|
1357
|
-
{
|
|
1358
|
-
stroke: props.strokeWidth ?? 1.5,
|
|
1359
|
-
className: props.className,
|
|
1360
|
-
style: props.style,
|
|
1361
|
-
size: props.size ?? 24
|
|
1362
|
-
}
|
|
1363
|
-
);
|
|
1364
|
-
Adapter.displayName = `Tabler.${target}`;
|
|
1365
|
-
return Adapter;
|
|
1366
|
-
},
|
|
1367
|
-
name,
|
|
1368
|
-
family
|
|
1369
|
-
);
|
|
1370
|
-
}
|
|
1371
|
-
function resolveFa(name, family) {
|
|
1372
|
-
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
1373
|
-
const target = `Fa${suffix}`;
|
|
1374
|
-
return lazyFamilyIcon(
|
|
1375
|
-
"fa",
|
|
1376
|
-
() => import('react-icons/fa'),
|
|
1377
|
-
(lib) => {
|
|
1378
|
-
const FaComp = lib[target];
|
|
1379
|
-
if (!FaComp) return null;
|
|
1380
|
-
const Component = FaComp;
|
|
1381
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1382
|
-
Component,
|
|
1383
|
-
{
|
|
1384
|
-
className: props.className,
|
|
1385
|
-
style: props.style,
|
|
1386
|
-
size: props.size ?? "1em"
|
|
1387
|
-
}
|
|
1388
|
-
);
|
|
1389
|
-
Adapter.displayName = `Fa.${target}`;
|
|
1390
|
-
return Adapter;
|
|
1391
|
-
},
|
|
1392
|
-
name,
|
|
1393
|
-
family
|
|
1394
|
-
);
|
|
1395
|
-
}
|
|
1396
|
-
function warnFallback(name, family) {
|
|
1397
|
-
const key = `${family}::${name}`;
|
|
1398
|
-
if (warned.has(key)) return;
|
|
1399
|
-
warned.add(key);
|
|
1400
|
-
if (typeof console !== "undefined") {
|
|
1401
|
-
console.warn(
|
|
1402
|
-
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
1403
|
-
);
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
function makeLucideAdapter(name, isFallback = false) {
|
|
1286
|
+
function makeLucideAdapter(name) {
|
|
1407
1287
|
const LucideComp = resolveLucide(name);
|
|
1408
|
-
const Adapter = (props) =>
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
);
|
|
1420
|
-
};
|
|
1421
|
-
Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
|
|
1288
|
+
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1289
|
+
LucideComp,
|
|
1290
|
+
{
|
|
1291
|
+
className: props.className,
|
|
1292
|
+
strokeWidth: props.strokeWidth,
|
|
1293
|
+
style: props.style,
|
|
1294
|
+
size: props.size
|
|
1295
|
+
}
|
|
1296
|
+
);
|
|
1297
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
1422
1298
|
return Adapter;
|
|
1423
1299
|
}
|
|
1424
|
-
function resolveIconForFamily(name,
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
// Non-lucide families resolve to a lazy, Suspense-wrapped component that
|
|
1429
|
-
// dynamic-imports the library on first render and falls back to lucide
|
|
1430
|
-
// internally when the family lacks the icon (see lazyFamilyIcon).
|
|
1431
|
-
case "phosphor-outline":
|
|
1432
|
-
return resolvePhosphor(name, "regular", family);
|
|
1433
|
-
case "phosphor-fill":
|
|
1434
|
-
return resolvePhosphor(name, "fill", family);
|
|
1435
|
-
case "phosphor-duotone":
|
|
1436
|
-
return resolvePhosphor(name, "duotone", family);
|
|
1437
|
-
case "tabler":
|
|
1438
|
-
return resolveTabler(name, family);
|
|
1439
|
-
case "fa-solid":
|
|
1440
|
-
return resolveFa(name, family);
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, libPromises, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
1300
|
+
function resolveIconForFamily(name, _family) {
|
|
1301
|
+
return makeLucideAdapter(name);
|
|
1302
|
+
}
|
|
1303
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases;
|
|
1444
1304
|
var init_iconFamily = __esm({
|
|
1445
1305
|
"lib/iconFamily.tsx"() {
|
|
1446
1306
|
"use client";
|
|
1447
1307
|
DEFAULT_FAMILY = "lucide";
|
|
1448
|
-
VALID_FAMILIES = [
|
|
1449
|
-
"lucide",
|
|
1450
|
-
"phosphor-outline",
|
|
1451
|
-
"phosphor-fill",
|
|
1452
|
-
"phosphor-duotone",
|
|
1453
|
-
"tabler",
|
|
1454
|
-
"fa-solid"
|
|
1455
|
-
];
|
|
1308
|
+
VALID_FAMILIES = [DEFAULT_FAMILY];
|
|
1456
1309
|
cachedFamily = null;
|
|
1457
1310
|
listeners = /* @__PURE__ */ new Set();
|
|
1458
1311
|
observer = null;
|
|
1459
|
-
libPromises = /* @__PURE__ */ new Map();
|
|
1460
1312
|
lucideAliases = {
|
|
1461
1313
|
close: LucideIcons2__namespace.X,
|
|
1462
1314
|
trash: LucideIcons2__namespace.Trash2,
|
|
@@ -1469,478 +1321,6 @@ var init_iconFamily = __esm({
|
|
|
1469
1321
|
"sort-asc": LucideIcons2__namespace.ArrowUpNarrowWide,
|
|
1470
1322
|
"sort-desc": LucideIcons2__namespace.ArrowDownNarrowWide
|
|
1471
1323
|
};
|
|
1472
|
-
phosphorAliases = {
|
|
1473
|
-
// lucide name → phosphor PascalCase name
|
|
1474
|
-
// Actions
|
|
1475
|
-
plus: "Plus",
|
|
1476
|
-
minus: "Minus",
|
|
1477
|
-
x: "X",
|
|
1478
|
-
check: "Check",
|
|
1479
|
-
close: "X",
|
|
1480
|
-
edit: "PencilSimple",
|
|
1481
|
-
pencil: "PencilSimple",
|
|
1482
|
-
trash: "Trash",
|
|
1483
|
-
save: "FloppyDisk",
|
|
1484
|
-
copy: "Copy",
|
|
1485
|
-
share: "Share",
|
|
1486
|
-
send: "PaperPlaneRight",
|
|
1487
|
-
download: "DownloadSimple",
|
|
1488
|
-
upload: "UploadSimple",
|
|
1489
|
-
archive: "Archive",
|
|
1490
|
-
refresh: "ArrowsClockwise",
|
|
1491
|
-
loader: "CircleNotch",
|
|
1492
|
-
link: "Link",
|
|
1493
|
-
paperclip: "Paperclip",
|
|
1494
|
-
// Navigation
|
|
1495
|
-
"chevron-down": "CaretDown",
|
|
1496
|
-
"chevron-up": "CaretUp",
|
|
1497
|
-
"chevron-left": "CaretLeft",
|
|
1498
|
-
"chevron-right": "CaretRight",
|
|
1499
|
-
"arrow-up": "ArrowUp",
|
|
1500
|
-
"arrow-down": "ArrowDown",
|
|
1501
|
-
"arrow-left": "ArrowLeft",
|
|
1502
|
-
"arrow-right": "ArrowRight",
|
|
1503
|
-
menu: "List",
|
|
1504
|
-
more: "DotsThree",
|
|
1505
|
-
"more-vertical": "DotsThreeVertical",
|
|
1506
|
-
"more-horizontal": "DotsThree",
|
|
1507
|
-
external: "ArrowSquareOut",
|
|
1508
|
-
"external-link": "ArrowSquareOut",
|
|
1509
|
-
// Files
|
|
1510
|
-
file: "File",
|
|
1511
|
-
"file-text": "FileText",
|
|
1512
|
-
"file-plus": "FilePlus",
|
|
1513
|
-
"file-minus": "FileMinus",
|
|
1514
|
-
folder: "Folder",
|
|
1515
|
-
"folder-open": "FolderOpen",
|
|
1516
|
-
document: "FileText",
|
|
1517
|
-
// Charts
|
|
1518
|
-
"bar-chart": "ChartBar",
|
|
1519
|
-
"bar-chart-2": "ChartBar",
|
|
1520
|
-
"bar-chart-3": "ChartBar",
|
|
1521
|
-
"line-chart": "ChartLine",
|
|
1522
|
-
"pie-chart": "ChartPie",
|
|
1523
|
-
activity: "Pulse",
|
|
1524
|
-
"trending-up": "TrendUp",
|
|
1525
|
-
"trending-down": "TrendDown",
|
|
1526
|
-
// Messages
|
|
1527
|
-
message: "ChatCircle",
|
|
1528
|
-
"message-circle": "ChatCircle",
|
|
1529
|
-
"message-square": "ChatText",
|
|
1530
|
-
"messages-square": "ChatsCircle",
|
|
1531
|
-
comment: "ChatCircle",
|
|
1532
|
-
comments: "ChatsCircle",
|
|
1533
|
-
inbox: "Tray",
|
|
1534
|
-
mail: "Envelope",
|
|
1535
|
-
envelope: "Envelope",
|
|
1536
|
-
// Status
|
|
1537
|
-
"alert-circle": "WarningCircle",
|
|
1538
|
-
"alert-triangle": "Warning",
|
|
1539
|
-
"check-circle": "CheckCircle",
|
|
1540
|
-
"x-circle": "XCircle",
|
|
1541
|
-
info: "Info",
|
|
1542
|
-
"help-circle": "Question",
|
|
1543
|
-
"life-buoy": "Lifebuoy",
|
|
1544
|
-
lifebuoy: "Lifebuoy",
|
|
1545
|
-
warning: "Warning",
|
|
1546
|
-
error: "WarningCircle",
|
|
1547
|
-
// Media
|
|
1548
|
-
image: "Image",
|
|
1549
|
-
video: "VideoCamera",
|
|
1550
|
-
film: "FilmStrip",
|
|
1551
|
-
camera: "Camera",
|
|
1552
|
-
music: "MusicNote",
|
|
1553
|
-
play: "Play",
|
|
1554
|
-
pause: "Pause",
|
|
1555
|
-
stop: "Stop",
|
|
1556
|
-
"skip-forward": "SkipForward",
|
|
1557
|
-
"skip-back": "SkipBack",
|
|
1558
|
-
volume: "SpeakerHigh",
|
|
1559
|
-
"volume-2": "SpeakerHigh",
|
|
1560
|
-
"volume-x": "SpeakerX",
|
|
1561
|
-
mic: "Microphone",
|
|
1562
|
-
"mic-off": "MicrophoneSlash",
|
|
1563
|
-
// People
|
|
1564
|
-
user: "User",
|
|
1565
|
-
users: "Users",
|
|
1566
|
-
"user-plus": "UserPlus",
|
|
1567
|
-
"user-check": "UserCheck",
|
|
1568
|
-
// Time
|
|
1569
|
-
calendar: "Calendar",
|
|
1570
|
-
clock: "Clock",
|
|
1571
|
-
timer: "Timer",
|
|
1572
|
-
// Location
|
|
1573
|
-
map: "MapTrifold",
|
|
1574
|
-
"map-pin": "MapPin",
|
|
1575
|
-
navigation: "NavigationArrow",
|
|
1576
|
-
compass: "Compass",
|
|
1577
|
-
globe: "Globe",
|
|
1578
|
-
target: "Target",
|
|
1579
|
-
// Project / layout
|
|
1580
|
-
kanban: "Kanban",
|
|
1581
|
-
list: "List",
|
|
1582
|
-
table: "Table",
|
|
1583
|
-
grid: "GridFour",
|
|
1584
|
-
layout: "Layout",
|
|
1585
|
-
columns: "Columns",
|
|
1586
|
-
rows: "Rows",
|
|
1587
|
-
// Misc
|
|
1588
|
-
bell: "Bell",
|
|
1589
|
-
bookmark: "Bookmark",
|
|
1590
|
-
briefcase: "Briefcase",
|
|
1591
|
-
flag: "Flag",
|
|
1592
|
-
tag: "Tag",
|
|
1593
|
-
tags: "Tag",
|
|
1594
|
-
star: "Star",
|
|
1595
|
-
heart: "Heart",
|
|
1596
|
-
home: "House",
|
|
1597
|
-
settings: "Gear",
|
|
1598
|
-
eye: "Eye",
|
|
1599
|
-
"eye-off": "EyeSlash",
|
|
1600
|
-
lock: "Lock",
|
|
1601
|
-
unlock: "LockOpen",
|
|
1602
|
-
key: "Key",
|
|
1603
|
-
shield: "Shield",
|
|
1604
|
-
search: "MagnifyingGlass",
|
|
1605
|
-
filter: "Funnel",
|
|
1606
|
-
"sort-asc": "SortAscending",
|
|
1607
|
-
"sort-desc": "SortDescending",
|
|
1608
|
-
zap: "Lightning",
|
|
1609
|
-
sparkles: "Sparkle",
|
|
1610
|
-
// Code
|
|
1611
|
-
code: "Code",
|
|
1612
|
-
terminal: "Terminal",
|
|
1613
|
-
database: "Database",
|
|
1614
|
-
server: "HardDrives",
|
|
1615
|
-
cloud: "Cloud",
|
|
1616
|
-
wifi: "WifiHigh",
|
|
1617
|
-
package: "Package",
|
|
1618
|
-
box: "Package",
|
|
1619
|
-
// Theme
|
|
1620
|
-
sun: "Sun",
|
|
1621
|
-
moon: "Moon",
|
|
1622
|
-
// Phone
|
|
1623
|
-
phone: "Phone",
|
|
1624
|
-
printer: "Printer",
|
|
1625
|
-
// Hierarchy
|
|
1626
|
-
tree: "Tree",
|
|
1627
|
-
network: "Network"
|
|
1628
|
-
};
|
|
1629
|
-
tablerAliases = {
|
|
1630
|
-
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
1631
|
-
// Actions
|
|
1632
|
-
plus: "Plus",
|
|
1633
|
-
minus: "Minus",
|
|
1634
|
-
x: "X",
|
|
1635
|
-
check: "Check",
|
|
1636
|
-
close: "X",
|
|
1637
|
-
edit: "Pencil",
|
|
1638
|
-
pencil: "Pencil",
|
|
1639
|
-
trash: "Trash",
|
|
1640
|
-
save: "DeviceFloppy",
|
|
1641
|
-
copy: "Copy",
|
|
1642
|
-
share: "Share",
|
|
1643
|
-
send: "Send",
|
|
1644
|
-
download: "Download",
|
|
1645
|
-
upload: "Upload",
|
|
1646
|
-
archive: "Archive",
|
|
1647
|
-
refresh: "Refresh",
|
|
1648
|
-
loader: "Loader2",
|
|
1649
|
-
link: "Link",
|
|
1650
|
-
paperclip: "Paperclip",
|
|
1651
|
-
external: "ExternalLink",
|
|
1652
|
-
"external-link": "ExternalLink",
|
|
1653
|
-
// Navigation
|
|
1654
|
-
"chevron-down": "ChevronDown",
|
|
1655
|
-
"chevron-up": "ChevronUp",
|
|
1656
|
-
"chevron-left": "ChevronLeft",
|
|
1657
|
-
"chevron-right": "ChevronRight",
|
|
1658
|
-
"arrow-down": "ArrowDown",
|
|
1659
|
-
"arrow-up": "ArrowUp",
|
|
1660
|
-
"arrow-left": "ArrowLeft",
|
|
1661
|
-
"arrow-right": "ArrowRight",
|
|
1662
|
-
menu: "Menu2",
|
|
1663
|
-
more: "Dots",
|
|
1664
|
-
"more-vertical": "DotsVertical",
|
|
1665
|
-
// Files
|
|
1666
|
-
file: "File",
|
|
1667
|
-
"file-text": "FileText",
|
|
1668
|
-
"file-plus": "FilePlus",
|
|
1669
|
-
"file-check": "FileCheck",
|
|
1670
|
-
"file-minus": "FileMinus",
|
|
1671
|
-
folder: "Folder",
|
|
1672
|
-
"folder-open": "FolderOpen",
|
|
1673
|
-
document: "FileText",
|
|
1674
|
-
// Charts
|
|
1675
|
-
"bar-chart": "ChartBar",
|
|
1676
|
-
"bar-chart-2": "ChartBar",
|
|
1677
|
-
"bar-chart-3": "ChartBar",
|
|
1678
|
-
"line-chart": "ChartLine",
|
|
1679
|
-
"pie-chart": "ChartPie",
|
|
1680
|
-
activity: "Activity",
|
|
1681
|
-
"trending-up": "TrendingUp",
|
|
1682
|
-
"trending-down": "TrendingDown",
|
|
1683
|
-
// Messages
|
|
1684
|
-
message: "Message",
|
|
1685
|
-
"message-circle": "MessageCircle",
|
|
1686
|
-
"message-square": "Message2",
|
|
1687
|
-
"messages-square": "Messages",
|
|
1688
|
-
comment: "Message",
|
|
1689
|
-
comments: "Messages",
|
|
1690
|
-
inbox: "Inbox",
|
|
1691
|
-
mail: "Mail",
|
|
1692
|
-
envelope: "Mail",
|
|
1693
|
-
// Status
|
|
1694
|
-
"alert-circle": "AlertCircle",
|
|
1695
|
-
"alert-triangle": "AlertTriangle",
|
|
1696
|
-
"check-circle": "CircleCheck",
|
|
1697
|
-
"x-circle": "CircleX",
|
|
1698
|
-
info: "InfoCircle",
|
|
1699
|
-
"help-circle": "HelpCircle",
|
|
1700
|
-
"life-buoy": "Lifebuoy",
|
|
1701
|
-
warning: "AlertTriangle",
|
|
1702
|
-
error: "AlertOctagon",
|
|
1703
|
-
// Media
|
|
1704
|
-
image: "Photo",
|
|
1705
|
-
video: "Video",
|
|
1706
|
-
camera: "Camera",
|
|
1707
|
-
music: "Music",
|
|
1708
|
-
play: "PlayerPlay",
|
|
1709
|
-
pause: "PlayerPause",
|
|
1710
|
-
stop: "PlayerStop",
|
|
1711
|
-
"skip-forward": "PlayerSkipForward",
|
|
1712
|
-
"skip-back": "PlayerSkipBack",
|
|
1713
|
-
volume: "Volume",
|
|
1714
|
-
"volume-2": "Volume",
|
|
1715
|
-
"volume-x": "VolumeOff",
|
|
1716
|
-
mic: "Microphone",
|
|
1717
|
-
"mic-off": "MicrophoneOff",
|
|
1718
|
-
// People
|
|
1719
|
-
user: "User",
|
|
1720
|
-
users: "Users",
|
|
1721
|
-
"user-plus": "UserPlus",
|
|
1722
|
-
"user-check": "UserCheck",
|
|
1723
|
-
// Time
|
|
1724
|
-
calendar: "Calendar",
|
|
1725
|
-
clock: "Clock",
|
|
1726
|
-
timer: "Hourglass",
|
|
1727
|
-
// Location
|
|
1728
|
-
map: "Map",
|
|
1729
|
-
"map-pin": "MapPin",
|
|
1730
|
-
navigation: "Navigation",
|
|
1731
|
-
compass: "Compass",
|
|
1732
|
-
globe: "World",
|
|
1733
|
-
target: "Target",
|
|
1734
|
-
// Project / layout
|
|
1735
|
-
kanban: "LayoutKanban",
|
|
1736
|
-
list: "List",
|
|
1737
|
-
table: "Table",
|
|
1738
|
-
grid: "LayoutGrid",
|
|
1739
|
-
layout: "Layout",
|
|
1740
|
-
columns: "LayoutColumns",
|
|
1741
|
-
rows: "LayoutRows",
|
|
1742
|
-
// Misc
|
|
1743
|
-
bell: "Bell",
|
|
1744
|
-
bookmark: "Bookmark",
|
|
1745
|
-
briefcase: "Briefcase",
|
|
1746
|
-
flag: "Flag",
|
|
1747
|
-
tag: "Tag",
|
|
1748
|
-
tags: "Tags",
|
|
1749
|
-
star: "Star",
|
|
1750
|
-
heart: "Heart",
|
|
1751
|
-
home: "Home",
|
|
1752
|
-
settings: "Settings",
|
|
1753
|
-
eye: "Eye",
|
|
1754
|
-
"eye-off": "EyeOff",
|
|
1755
|
-
lock: "Lock",
|
|
1756
|
-
unlock: "LockOpen",
|
|
1757
|
-
key: "Key",
|
|
1758
|
-
shield: "Shield",
|
|
1759
|
-
search: "Search",
|
|
1760
|
-
filter: "Filter",
|
|
1761
|
-
"sort-asc": "SortAscending",
|
|
1762
|
-
"sort-desc": "SortDescending",
|
|
1763
|
-
zap: "Bolt",
|
|
1764
|
-
sparkles: "Sparkles",
|
|
1765
|
-
// Code / data
|
|
1766
|
-
code: "Code",
|
|
1767
|
-
terminal: "Terminal",
|
|
1768
|
-
database: "Database",
|
|
1769
|
-
server: "Server",
|
|
1770
|
-
cloud: "Cloud",
|
|
1771
|
-
wifi: "Wifi",
|
|
1772
|
-
package: "Package",
|
|
1773
|
-
box: "Box",
|
|
1774
|
-
// Theme
|
|
1775
|
-
sun: "Sun",
|
|
1776
|
-
moon: "Moon",
|
|
1777
|
-
// Phone
|
|
1778
|
-
phone: "Phone",
|
|
1779
|
-
printer: "Printer",
|
|
1780
|
-
// Hierarchy
|
|
1781
|
-
tree: "Hierarchy",
|
|
1782
|
-
network: "Network"
|
|
1783
|
-
};
|
|
1784
|
-
faAliases = {
|
|
1785
|
-
// lucide name → fa-solid suffix (after the `Fa` prefix).
|
|
1786
|
-
// react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
|
|
1787
|
-
// (FA renamed to `FaFileAlt`). When you see a console.warn from
|
|
1788
|
-
// [iconFamily] about an unmapped lucide name in this family, add the
|
|
1789
|
-
// closest FA5 sibling here so the fallback stays in-family.
|
|
1790
|
-
search: "Search",
|
|
1791
|
-
close: "Times",
|
|
1792
|
-
x: "Times",
|
|
1793
|
-
loader: "Spinner",
|
|
1794
|
-
refresh: "Sync",
|
|
1795
|
-
"sort-asc": "SortAmountUp",
|
|
1796
|
-
"sort-desc": "SortAmountDown",
|
|
1797
|
-
"chevron-down": "ChevronDown",
|
|
1798
|
-
"chevron-up": "ChevronUp",
|
|
1799
|
-
"chevron-left": "ChevronLeft",
|
|
1800
|
-
"chevron-right": "ChevronRight",
|
|
1801
|
-
"help-circle": "QuestionCircle",
|
|
1802
|
-
"alert-triangle": "ExclamationTriangle",
|
|
1803
|
-
"alert-circle": "ExclamationCircle",
|
|
1804
|
-
"check-circle": "CheckCircle",
|
|
1805
|
-
"x-circle": "TimesCircle",
|
|
1806
|
-
edit: "Edit",
|
|
1807
|
-
pencil: "PencilAlt",
|
|
1808
|
-
trash: "Trash",
|
|
1809
|
-
send: "PaperPlane",
|
|
1810
|
-
share: "ShareAlt",
|
|
1811
|
-
external: "ExternalLinkAlt",
|
|
1812
|
-
plus: "Plus",
|
|
1813
|
-
minus: "Minus",
|
|
1814
|
-
check: "Check",
|
|
1815
|
-
star: "Star",
|
|
1816
|
-
heart: "Heart",
|
|
1817
|
-
home: "Home",
|
|
1818
|
-
user: "User",
|
|
1819
|
-
users: "Users",
|
|
1820
|
-
"user-plus": "UserPlus",
|
|
1821
|
-
"user-check": "UserCheck",
|
|
1822
|
-
settings: "Cog",
|
|
1823
|
-
menu: "Bars",
|
|
1824
|
-
"arrow-up": "ArrowUp",
|
|
1825
|
-
"arrow-down": "ArrowDown",
|
|
1826
|
-
"arrow-left": "ArrowLeft",
|
|
1827
|
-
"arrow-right": "ArrowRight",
|
|
1828
|
-
copy: "Copy",
|
|
1829
|
-
download: "Download",
|
|
1830
|
-
upload: "Upload",
|
|
1831
|
-
filter: "Filter",
|
|
1832
|
-
calendar: "Calendar",
|
|
1833
|
-
clock: "Clock",
|
|
1834
|
-
bell: "Bell",
|
|
1835
|
-
mail: "Envelope",
|
|
1836
|
-
envelope: "Envelope",
|
|
1837
|
-
lock: "Lock",
|
|
1838
|
-
unlock: "LockOpen",
|
|
1839
|
-
eye: "Eye",
|
|
1840
|
-
"eye-off": "EyeSlash",
|
|
1841
|
-
more: "EllipsisH",
|
|
1842
|
-
"more-vertical": "EllipsisV",
|
|
1843
|
-
info: "InfoCircle",
|
|
1844
|
-
warning: "ExclamationTriangle",
|
|
1845
|
-
error: "ExclamationCircle",
|
|
1846
|
-
// Time
|
|
1847
|
-
timer: "Hourglass",
|
|
1848
|
-
// Files (FA renamed FileText → FileAlt)
|
|
1849
|
-
file: "File",
|
|
1850
|
-
"file-text": "FileAlt",
|
|
1851
|
-
"file-plus": "FileMedical",
|
|
1852
|
-
"file-minus": "FileExcel",
|
|
1853
|
-
"file-check": "FileSignature",
|
|
1854
|
-
document: "FileAlt",
|
|
1855
|
-
// Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
|
|
1856
|
-
"bar-chart": "ChartBar",
|
|
1857
|
-
"bar-chart-2": "ChartBar",
|
|
1858
|
-
"bar-chart-3": "ChartBar",
|
|
1859
|
-
"line-chart": "ChartLine",
|
|
1860
|
-
"pie-chart": "ChartPie",
|
|
1861
|
-
activity: "ChartLine",
|
|
1862
|
-
"trending-up": "ChartLine",
|
|
1863
|
-
"trending-down": "ChartLine",
|
|
1864
|
-
// Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
|
|
1865
|
-
message: "Comment",
|
|
1866
|
-
"message-circle": "CommentDots",
|
|
1867
|
-
"message-square": "CommentAlt",
|
|
1868
|
-
"messages-square": "Comments",
|
|
1869
|
-
comment: "Comment",
|
|
1870
|
-
comments: "Comments",
|
|
1871
|
-
inbox: "Inbox",
|
|
1872
|
-
// Support / help
|
|
1873
|
-
"life-buoy": "LifeRing",
|
|
1874
|
-
lifebuoy: "LifeRing",
|
|
1875
|
-
// Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
|
|
1876
|
-
kanban: "Tasks",
|
|
1877
|
-
columns: "Columns",
|
|
1878
|
-
rows: "Bars",
|
|
1879
|
-
layout: "ThLarge",
|
|
1880
|
-
grid: "Th",
|
|
1881
|
-
list: "List",
|
|
1882
|
-
table: "Table",
|
|
1883
|
-
// Storage / folders
|
|
1884
|
-
folder: "Folder",
|
|
1885
|
-
"folder-open": "FolderOpen",
|
|
1886
|
-
archive: "Archive",
|
|
1887
|
-
bookmark: "Bookmark",
|
|
1888
|
-
briefcase: "Briefcase",
|
|
1889
|
-
package: "Box",
|
|
1890
|
-
box: "Box",
|
|
1891
|
-
// Map / location
|
|
1892
|
-
map: "Map",
|
|
1893
|
-
"map-pin": "MapMarkerAlt",
|
|
1894
|
-
navigation: "LocationArrow",
|
|
1895
|
-
compass: "Compass",
|
|
1896
|
-
globe: "Globe",
|
|
1897
|
-
target: "Bullseye",
|
|
1898
|
-
// Media
|
|
1899
|
-
image: "Image",
|
|
1900
|
-
video: "Video",
|
|
1901
|
-
film: "Film",
|
|
1902
|
-
camera: "Camera",
|
|
1903
|
-
music: "Music",
|
|
1904
|
-
play: "Play",
|
|
1905
|
-
pause: "Pause",
|
|
1906
|
-
stop: "Stop",
|
|
1907
|
-
"skip-forward": "Forward",
|
|
1908
|
-
"skip-back": "Backward",
|
|
1909
|
-
volume: "VolumeUp",
|
|
1910
|
-
"volume-2": "VolumeUp",
|
|
1911
|
-
"volume-x": "VolumeMute",
|
|
1912
|
-
mic: "Microphone",
|
|
1913
|
-
"mic-off": "MicrophoneSlash",
|
|
1914
|
-
phone: "Phone",
|
|
1915
|
-
// Code / data
|
|
1916
|
-
code: "Code",
|
|
1917
|
-
terminal: "Terminal",
|
|
1918
|
-
database: "Database",
|
|
1919
|
-
server: "Server",
|
|
1920
|
-
cloud: "Cloud",
|
|
1921
|
-
wifi: "Wifi",
|
|
1922
|
-
// Security
|
|
1923
|
-
shield: "ShieldAlt",
|
|
1924
|
-
key: "Key",
|
|
1925
|
-
// Misc actions
|
|
1926
|
-
printer: "Print",
|
|
1927
|
-
save: "Save",
|
|
1928
|
-
link: "Link",
|
|
1929
|
-
unlink: "Unlink",
|
|
1930
|
-
paperclip: "Paperclip",
|
|
1931
|
-
flag: "Flag",
|
|
1932
|
-
tag: "Tag",
|
|
1933
|
-
tags: "Tags",
|
|
1934
|
-
zap: "Bolt",
|
|
1935
|
-
sparkles: "Magic",
|
|
1936
|
-
// Theme
|
|
1937
|
-
sun: "Sun",
|
|
1938
|
-
moon: "Moon",
|
|
1939
|
-
// Hierarchy (FA has no Tree icon for hierarchies; Sitemap is the org-chart icon)
|
|
1940
|
-
tree: "Sitemap",
|
|
1941
|
-
network: "NetworkWired"
|
|
1942
|
-
};
|
|
1943
|
-
warned = /* @__PURE__ */ new Set();
|
|
1944
1324
|
}
|
|
1945
1325
|
});
|
|
1946
1326
|
function kebabToPascal2(name) {
|
|
@@ -2021,7 +1401,7 @@ var init_Icon = __esm({
|
|
|
2021
1401
|
const family = useIconFamily();
|
|
2022
1402
|
const RenderedComponent = React73__namespace.default.useMemo(() => {
|
|
2023
1403
|
if (directIcon) return null;
|
|
2024
|
-
return effectiveName ? resolveIconForFamily(effectiveName
|
|
1404
|
+
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
2025
1405
|
}, [directIcon, effectiveName, family]);
|
|
2026
1406
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
2027
1407
|
const inlineStyle = {
|
|
@@ -2400,7 +1780,7 @@ var init_Button = __esm({
|
|
|
2400
1780
|
ref,
|
|
2401
1781
|
disabled: disabled || isLoading,
|
|
2402
1782
|
className: cn(
|
|
2403
|
-
"inline-flex items-center justify-center gap-2",
|
|
1783
|
+
"relative inline-flex items-center justify-center gap-2",
|
|
2404
1784
|
"font-medium",
|
|
2405
1785
|
"rounded-sm",
|
|
2406
1786
|
"cursor-pointer",
|
|
@@ -2445,6 +1825,7 @@ var init_Input = __esm({
|
|
|
2445
1825
|
icon: iconProp,
|
|
2446
1826
|
clearable,
|
|
2447
1827
|
onClear,
|
|
1828
|
+
action,
|
|
2448
1829
|
value,
|
|
2449
1830
|
options,
|
|
2450
1831
|
rows: rows2 = 3,
|
|
@@ -2494,6 +1875,11 @@ var init_Input = __esm({
|
|
|
2494
1875
|
onClear?.();
|
|
2495
1876
|
}
|
|
2496
1877
|
};
|
|
1878
|
+
const handleKeyDown = (e) => {
|
|
1879
|
+
if (action && e.key === "Enter") {
|
|
1880
|
+
eventBus.emit(`UI:${action}`, { value: e.currentTarget.value });
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
2497
1883
|
const wrapField = (field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
2498
1884
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
2499
1885
|
field,
|
|
@@ -2567,6 +1953,7 @@ var init_Input = __esm({
|
|
|
2567
1953
|
type,
|
|
2568
1954
|
value,
|
|
2569
1955
|
onChange: handleChange,
|
|
1956
|
+
onKeyDown: handleKeyDown,
|
|
2570
1957
|
className: baseClassName,
|
|
2571
1958
|
...props
|
|
2572
1959
|
}
|
|
@@ -3192,7 +2579,7 @@ var init_Badge = __esm({
|
|
|
3192
2579
|
});
|
|
3193
2580
|
function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
3194
2581
|
const px = typeof size === "number" ? size : sizeMap[size];
|
|
3195
|
-
|
|
2582
|
+
useIconFamily();
|
|
3196
2583
|
if (assetUrl?.url) {
|
|
3197
2584
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3198
2585
|
AtlasImage,
|
|
@@ -3204,7 +2591,7 @@ function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
|
3204
2591
|
}
|
|
3205
2592
|
);
|
|
3206
2593
|
}
|
|
3207
|
-
const I = typeof icon === "string" ? resolveIconForFamily(icon
|
|
2594
|
+
const I = typeof icon === "string" ? resolveIconForFamily(icon) : icon;
|
|
3208
2595
|
return /* @__PURE__ */ jsxRuntime.jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
|
|
3209
2596
|
}
|
|
3210
2597
|
var sizeMap;
|
|
@@ -7445,21 +6832,6 @@ var init_renderer = __esm({
|
|
|
7445
6832
|
init_slot_definitions();
|
|
7446
6833
|
}
|
|
7447
6834
|
});
|
|
7448
|
-
|
|
7449
|
-
// lib/wrapCallbackForEvent.ts
|
|
7450
|
-
function wrapCallbackForEvent(qualifiedEvent, callbackArgs, emit) {
|
|
7451
|
-
const argNames = (callbackArgs ?? []).map((a) => a.name);
|
|
7452
|
-
if (argNames.length === 0) {
|
|
7453
|
-
return () => emit(qualifiedEvent);
|
|
7454
|
-
}
|
|
7455
|
-
return (...args) => {
|
|
7456
|
-
const payload = {};
|
|
7457
|
-
for (let i = 0; i < argNames.length; i += 1) {
|
|
7458
|
-
payload[argNames[i]] = args[i];
|
|
7459
|
-
}
|
|
7460
|
-
emit(qualifiedEvent, payload);
|
|
7461
|
-
};
|
|
7462
|
-
}
|
|
7463
6835
|
var init_wrapCallbackForEvent = __esm({
|
|
7464
6836
|
"lib/wrapCallbackForEvent.ts"() {
|
|
7465
6837
|
}
|
|
@@ -15813,9 +15185,9 @@ var init_isometric = __esm({
|
|
|
15813
15185
|
// lib/drawable/projector.ts
|
|
15814
15186
|
function create2DProjector(opts) {
|
|
15815
15187
|
const { scale, baseOffsetX, layout } = opts;
|
|
15816
|
-
const tileWidth = exports.TILE_WIDTH * scale;
|
|
15817
|
-
const floorHeight = exports.FLOOR_HEIGHT * scale;
|
|
15818
|
-
const diamondTopY = (opts.diamondTopY ?? exports.DIAMOND_TOP_Y) * scale;
|
|
15188
|
+
const tileWidth = layout === "free" ? 1 : exports.TILE_WIDTH * scale;
|
|
15189
|
+
const floorHeight = layout === "free" ? 1 : exports.FLOOR_HEIGHT * scale;
|
|
15190
|
+
const diamondTopY = layout === "free" ? 0 : (opts.diamondTopY ?? exports.DIAMOND_TOP_Y) * scale;
|
|
15819
15191
|
const squareGrid = layout === "flat" || layout === "free";
|
|
15820
15192
|
const project = (pos) => layout === "free" ? { x: pos.x, y: pos.y } : isoToScreen(pos.x, pos.y, scale, baseOffsetX, layout);
|
|
15821
15193
|
const anchorPoint = (pos, anchor) => {
|
|
@@ -15856,6 +15228,15 @@ var init_projector = __esm({
|
|
|
15856
15228
|
}
|
|
15857
15229
|
});
|
|
15858
15230
|
|
|
15231
|
+
// lib/drawable/contract.ts
|
|
15232
|
+
function isValidScenePos(pos) {
|
|
15233
|
+
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
15234
|
+
}
|
|
15235
|
+
var init_contract = __esm({
|
|
15236
|
+
"lib/drawable/contract.ts"() {
|
|
15237
|
+
}
|
|
15238
|
+
});
|
|
15239
|
+
|
|
15859
15240
|
// components/game/atoms/DrawSprite.tsx
|
|
15860
15241
|
function DrawSprite(_props) {
|
|
15861
15242
|
return null;
|
|
@@ -15865,10 +15246,12 @@ var init_DrawSprite = __esm({
|
|
|
15865
15246
|
"components/game/atoms/DrawSprite.tsx"() {
|
|
15866
15247
|
"use client";
|
|
15867
15248
|
init_atlasSlice();
|
|
15249
|
+
init_contract();
|
|
15868
15250
|
paintSprite = (painter, node, dctx) => {
|
|
15251
|
+
if (!node.asset?.url || !isValidScenePos(node.position)) return;
|
|
15869
15252
|
const tex = painter.resolveTexture(node.asset.url);
|
|
15870
15253
|
if (!tex) return;
|
|
15871
|
-
let src = node.frame;
|
|
15254
|
+
let src = typeof node.frame === "object" ? node.frame : void 0;
|
|
15872
15255
|
if (!src && isAtlasAsset(node.asset)) {
|
|
15873
15256
|
const atlas = getAtlas(node.asset.atlas, dctx.invalidate);
|
|
15874
15257
|
if (!atlas) return;
|
|
@@ -15913,7 +15296,9 @@ var paintShape;
|
|
|
15913
15296
|
var init_DrawShape = __esm({
|
|
15914
15297
|
"components/game/atoms/DrawShape.tsx"() {
|
|
15915
15298
|
"use client";
|
|
15299
|
+
init_contract();
|
|
15916
15300
|
paintShape = (painter, node, dctx) => {
|
|
15301
|
+
if (!isValidScenePos(node.position)) return;
|
|
15917
15302
|
painter.save();
|
|
15918
15303
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
15919
15304
|
switch (node.shape) {
|
|
@@ -15967,7 +15352,9 @@ var paintText;
|
|
|
15967
15352
|
var init_DrawText = __esm({
|
|
15968
15353
|
"components/game/atoms/DrawText.tsx"() {
|
|
15969
15354
|
"use client";
|
|
15355
|
+
init_contract();
|
|
15970
15356
|
paintText = (painter, node, dctx) => {
|
|
15357
|
+
if (!isValidScenePos(node.position)) return;
|
|
15971
15358
|
const p = dctx.projector.anchorPoint(node.position, node.anchor ?? "center");
|
|
15972
15359
|
const x = p.x + (node.offsetX ?? 0);
|
|
15973
15360
|
const y = p.y + (node.offsetY ?? 0);
|
|
@@ -16072,12 +15459,14 @@ function collectDrawnItems(nodes) {
|
|
|
16072
15459
|
case "draw-sprite":
|
|
16073
15460
|
case "draw-shape":
|
|
16074
15461
|
case "draw-text":
|
|
16075
|
-
out.push({ pos: n.position, id: n.id });
|
|
15462
|
+
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
16076
15463
|
break;
|
|
16077
15464
|
case "draw-sprite-layer":
|
|
16078
15465
|
case "draw-shape-layer":
|
|
16079
15466
|
case "draw-text-layer":
|
|
16080
|
-
for (const it of n.items)
|
|
15467
|
+
for (const it of n.items) {
|
|
15468
|
+
if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id });
|
|
15469
|
+
}
|
|
16081
15470
|
break;
|
|
16082
15471
|
}
|
|
16083
15472
|
}
|
|
@@ -16092,6 +15481,7 @@ function buildHitIndex(items) {
|
|
|
16092
15481
|
}
|
|
16093
15482
|
var init_hitTest = __esm({
|
|
16094
15483
|
"lib/drawable/hitTest.ts"() {
|
|
15484
|
+
init_contract();
|
|
16095
15485
|
}
|
|
16096
15486
|
});
|
|
16097
15487
|
function normalizeBackdrop(bg) {
|
|
@@ -20817,7 +20207,8 @@ function DataGrid({
|
|
|
20817
20207
|
const { t } = hooks.useTranslate();
|
|
20818
20208
|
const [selectedIds, setSelectedIds] = React73.useState(/* @__PURE__ */ new Set());
|
|
20819
20209
|
const [visibleCount, setVisibleCount] = React73.useState(pageSize || Infinity);
|
|
20820
|
-
const fieldDefs = fields ?? columns ?? [];
|
|
20210
|
+
const fieldDefs = (Array.isArray(fields) ? fields : void 0) ?? (Array.isArray(columns) ? columns : void 0) ?? [];
|
|
20211
|
+
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
20821
20212
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
20822
20213
|
const dnd = useDataDnd({
|
|
20823
20214
|
items: allDataRaw,
|
|
@@ -20861,8 +20252,8 @@ function DataGrid({
|
|
|
20861
20252
|
const titleField = fieldDefs.find((f3) => f3.variant === "h3" || f3.variant === "h4") ?? fieldDefs[0];
|
|
20862
20253
|
const badgeFields = fieldDefs.filter((f3) => f3.variant === "badge" && f3 !== titleField);
|
|
20863
20254
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
20864
|
-
const primaryActions =
|
|
20865
|
-
const dangerActions =
|
|
20255
|
+
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
20256
|
+
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
20866
20257
|
const handleActionClick = (action, itemData) => (e) => {
|
|
20867
20258
|
e.stopPropagation();
|
|
20868
20259
|
const payload = {
|
|
@@ -37239,7 +36630,7 @@ function measureLabelWidth(text) {
|
|
|
37239
36630
|
if (typeof document === "undefined") return text.length * 6;
|
|
37240
36631
|
if (!labelMeasureCtx) labelMeasureCtx = document.createElement("canvas").getContext("2d");
|
|
37241
36632
|
if (!labelMeasureCtx) return text.length * 6;
|
|
37242
|
-
labelMeasureCtx.font = "
|
|
36633
|
+
labelMeasureCtx.font = "12px system-ui";
|
|
37243
36634
|
return labelMeasureCtx.measureText(text).width;
|
|
37244
36635
|
}
|
|
37245
36636
|
function getGroupColor(group, groups) {
|
|
@@ -37285,6 +36676,7 @@ var init_GraphCanvas = __esm({
|
|
|
37285
36676
|
actions,
|
|
37286
36677
|
onNodeClick,
|
|
37287
36678
|
onNodeDoubleClick,
|
|
36679
|
+
onBadgeClick,
|
|
37288
36680
|
nodeClickEvent,
|
|
37289
36681
|
selectedNodeId,
|
|
37290
36682
|
repulsion = 800,
|
|
@@ -37402,7 +36794,7 @@ var init_GraphCanvas = __esm({
|
|
|
37402
36794
|
nodesRef.current = simNodes;
|
|
37403
36795
|
if (layout === "force") {
|
|
37404
36796
|
let iterations = 0;
|
|
37405
|
-
const maxIterations =
|
|
36797
|
+
const maxIterations = 300;
|
|
37406
36798
|
const tick = () => {
|
|
37407
36799
|
const nodes = nodesRef.current;
|
|
37408
36800
|
const centerX = w / 2;
|
|
@@ -37432,7 +36824,9 @@ var init_GraphCanvas = __esm({
|
|
|
37432
36824
|
const dx = target.x - source.x;
|
|
37433
36825
|
const dy = target.y - source.y;
|
|
37434
36826
|
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
37435
|
-
const
|
|
36827
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
36828
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
36829
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
37436
36830
|
const fx = dx / dist * force;
|
|
37437
36831
|
const fy = dy / dist * force;
|
|
37438
36832
|
source.fx += fx;
|
|
@@ -37440,9 +36834,27 @@ var init_GraphCanvas = __esm({
|
|
|
37440
36834
|
target.fx -= fx;
|
|
37441
36835
|
target.fy -= fy;
|
|
37442
36836
|
}
|
|
36837
|
+
const centroids = /* @__PURE__ */ new Map();
|
|
37443
36838
|
for (const node of nodes) {
|
|
37444
|
-
|
|
37445
|
-
|
|
36839
|
+
const g = node.group ?? "__none__";
|
|
36840
|
+
let c = centroids.get(g);
|
|
36841
|
+
if (!c) {
|
|
36842
|
+
c = { x: 0, y: 0, n: 0 };
|
|
36843
|
+
centroids.set(g, c);
|
|
36844
|
+
}
|
|
36845
|
+
c.x += node.x;
|
|
36846
|
+
c.y += node.y;
|
|
36847
|
+
c.n += 1;
|
|
36848
|
+
}
|
|
36849
|
+
for (const node of nodes) {
|
|
36850
|
+
const c = centroids.get(node.group ?? "__none__");
|
|
36851
|
+
if (c && c.n > 1) {
|
|
36852
|
+
node.fx += (c.x / c.n - node.x) * 0.04;
|
|
36853
|
+
node.fy += (c.y / c.n - node.y) * 0.04;
|
|
36854
|
+
} else {
|
|
36855
|
+
node.fx += (centerX - node.x) * 0.01;
|
|
36856
|
+
node.fy += (centerY - node.y) * 0.01;
|
|
36857
|
+
}
|
|
37446
36858
|
}
|
|
37447
36859
|
const damping = 0.9;
|
|
37448
36860
|
for (const node of nodes) {
|
|
@@ -37454,7 +36866,7 @@ var init_GraphCanvas = __esm({
|
|
|
37454
36866
|
node.y = Math.max(30, Math.min(h - 30, node.y));
|
|
37455
36867
|
}
|
|
37456
36868
|
const LABEL_GAP = 12;
|
|
37457
|
-
const LABEL_H =
|
|
36869
|
+
const LABEL_H = 16;
|
|
37458
36870
|
const pad = nodeSpacing / 2;
|
|
37459
36871
|
for (let i = 0; i < nodes.length; i++) {
|
|
37460
36872
|
for (let j = i + 1; j < nodes.length; j++) {
|
|
@@ -37509,6 +36921,11 @@ var init_GraphCanvas = __esm({
|
|
|
37509
36921
|
const h = height;
|
|
37510
36922
|
const nodes = nodesRef.current;
|
|
37511
36923
|
const accentColor = resolveColor3("var(--color-accent)", canvas);
|
|
36924
|
+
const fontFamily = resolveColor3("var(--font-family)", canvas) || "system-ui";
|
|
36925
|
+
const fgColor = resolveColor3("var(--color-foreground)", canvas);
|
|
36926
|
+
const mutedColor = resolveColor3("var(--color-muted-foreground)", canvas) || fgColor;
|
|
36927
|
+
const bgColor = resolveColor3("var(--color-background)", canvas) || "#ffffff";
|
|
36928
|
+
const accentFg = resolveColor3("var(--color-accent-foreground)", canvas) || "#ffffff";
|
|
37512
36929
|
const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
|
|
37513
36930
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
37514
36931
|
ctx.clearRect(0, 0, w, h);
|
|
@@ -37528,19 +36945,21 @@ var init_GraphCanvas = __esm({
|
|
|
37528
36945
|
const target = nodes.find((n) => n.id === edge.target);
|
|
37529
36946
|
if (!source || !target) continue;
|
|
37530
36947
|
const incident = !!hoveredNode && (edge.source === hoveredNode || edge.target === hoveredNode);
|
|
37531
|
-
|
|
36948
|
+
const w2 = edge.weight ?? 1;
|
|
36949
|
+
ctx.globalAlpha = hoveredNode ? incident ? 1 : 0.05 : linkOpacity * w2;
|
|
37532
36950
|
ctx.beginPath();
|
|
37533
36951
|
ctx.moveTo(source.x, source.y);
|
|
37534
36952
|
ctx.lineTo(target.x, target.y);
|
|
37535
36953
|
ctx.strokeStyle = incident ? accentColor : edge.color || "#888888";
|
|
37536
|
-
ctx.lineWidth = incident ? 2 :
|
|
36954
|
+
ctx.lineWidth = incident ? 2 : Math.max(0.75, w2);
|
|
37537
36955
|
ctx.stroke();
|
|
37538
36956
|
if (edge.label && showLabels) {
|
|
37539
36957
|
const mx = (source.x + target.x) / 2;
|
|
37540
36958
|
const my = (source.y + target.y) / 2;
|
|
37541
|
-
ctx.fillStyle =
|
|
37542
|
-
ctx.font =
|
|
36959
|
+
ctx.fillStyle = mutedColor;
|
|
36960
|
+
ctx.font = `9px ${fontFamily}`;
|
|
37543
36961
|
ctx.textAlign = "center";
|
|
36962
|
+
ctx.textBaseline = "alphabetic";
|
|
37544
36963
|
ctx.fillText(edge.label, mx, my - 4);
|
|
37545
36964
|
}
|
|
37546
36965
|
}
|
|
@@ -37565,10 +36984,33 @@ var init_GraphCanvas = __esm({
|
|
|
37565
36984
|
}
|
|
37566
36985
|
ctx.stroke();
|
|
37567
36986
|
if (showLabels && node.label) {
|
|
37568
|
-
ctx.
|
|
37569
|
-
ctx.font = `${isSelected || isHovered ? "bold " : ""}10px system-ui`;
|
|
36987
|
+
ctx.font = `${isSelected || isHovered ? "600" : "500"} 12px ${fontFamily}`;
|
|
37570
36988
|
ctx.textAlign = "center";
|
|
37571
|
-
ctx.
|
|
36989
|
+
ctx.textBaseline = "middle";
|
|
36990
|
+
const ly = node.y + radius + 14;
|
|
36991
|
+
ctx.lineWidth = 3;
|
|
36992
|
+
ctx.lineJoin = "round";
|
|
36993
|
+
ctx.strokeStyle = bgColor;
|
|
36994
|
+
ctx.strokeText(node.label, node.x, ly);
|
|
36995
|
+
ctx.fillStyle = isSelected || isHovered ? fgColor : mutedColor;
|
|
36996
|
+
ctx.fillText(node.label, node.x, ly);
|
|
36997
|
+
}
|
|
36998
|
+
if (node.badge && node.badge > 1) {
|
|
36999
|
+
const bx = node.x + radius * 0.7;
|
|
37000
|
+
const by = node.y - radius * 0.7;
|
|
37001
|
+
const br = Math.max(7, Math.min(11, radius * 0.45));
|
|
37002
|
+
ctx.beginPath();
|
|
37003
|
+
ctx.arc(bx, by, br, 0, Math.PI * 2);
|
|
37004
|
+
ctx.fillStyle = accentColor;
|
|
37005
|
+
ctx.fill();
|
|
37006
|
+
ctx.strokeStyle = bgColor;
|
|
37007
|
+
ctx.lineWidth = 2;
|
|
37008
|
+
ctx.stroke();
|
|
37009
|
+
ctx.fillStyle = accentFg;
|
|
37010
|
+
ctx.font = `600 9px ${fontFamily}`;
|
|
37011
|
+
ctx.textAlign = "center";
|
|
37012
|
+
ctx.textBaseline = "middle";
|
|
37013
|
+
ctx.fillText(String(node.badge), bx, by + 0.5);
|
|
37572
37014
|
}
|
|
37573
37015
|
}
|
|
37574
37016
|
ctx.restore();
|
|
@@ -37661,11 +37103,21 @@ var init_GraphCanvas = __esm({
|
|
|
37661
37103
|
if (!coords) return;
|
|
37662
37104
|
const node = nodeAt(coords.graphX, coords.graphY);
|
|
37663
37105
|
if (node) {
|
|
37106
|
+
if (node.badge && node.badge > 1 && onBadgeClick) {
|
|
37107
|
+
const r = (node.size || 8) + (selectedNodeId === node.id ? 4 : 0);
|
|
37108
|
+
const bx = node.x + r * 0.7;
|
|
37109
|
+
const by = node.y - r * 0.7;
|
|
37110
|
+
const br = Math.max(7, Math.min(11, r * 0.45)) + 3;
|
|
37111
|
+
if (Math.hypot(coords.graphX - bx, coords.graphY - by) <= br) {
|
|
37112
|
+
onBadgeClick(node);
|
|
37113
|
+
return;
|
|
37114
|
+
}
|
|
37115
|
+
}
|
|
37664
37116
|
handleNodeClick(node);
|
|
37665
37117
|
}
|
|
37666
37118
|
}
|
|
37667
37119
|
},
|
|
37668
|
-
[toCoords, nodeAt, handleNodeClick]
|
|
37120
|
+
[toCoords, nodeAt, handleNodeClick, onBadgeClick, selectedNodeId]
|
|
37669
37121
|
);
|
|
37670
37122
|
const handlePointerLeave = React73.useCallback(() => {
|
|
37671
37123
|
setHoveredNode(null);
|
|
@@ -45852,7 +45304,7 @@ function SlotContentRenderer({
|
|
|
45852
45304
|
if (typeof propValue !== "string") continue;
|
|
45853
45305
|
const propDef = propsSchema[propKey];
|
|
45854
45306
|
if (!propDef || propDef.kind !== "callback") continue;
|
|
45855
|
-
renderedProps[propKey] = wrapCallbackForEvent(
|
|
45307
|
+
renderedProps[propKey] = ui.wrapCallbackForEvent(
|
|
45856
45308
|
`UI:${propValue}`,
|
|
45857
45309
|
propDef.callbackArgs,
|
|
45858
45310
|
(eventKey, payload) => eventBus.emit(eventKey, payload)
|