@almadar/ui 5.0.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +2233 -1838
- package/dist/avl/index.js +844 -452
- package/dist/components/atoms/Icon.d.ts +7 -4
- package/dist/components/index.cjs +1967 -1572
- package/dist/components/index.js +807 -415
- package/dist/components/molecules/Breadcrumb.d.ts +4 -4
- package/dist/components/molecules/EmptyState.d.ts +1 -1
- package/dist/components/templates/DashboardLayout.d.ts +1 -1
- package/dist/docs/index.cjs +437 -79
- package/dist/docs/index.d.cts +7 -4
- package/dist/docs/index.js +410 -55
- package/dist/lib/iconFamily.d.ts +41 -0
- package/dist/marketing/index.cjs +462 -106
- package/dist/marketing/index.d.cts +7 -4
- package/dist/marketing/index.js +428 -75
- package/dist/providers/index.cjs +1836 -1441
- package/dist/providers/index.js +811 -419
- package/dist/runtime/index.cjs +1864 -1469
- package/dist/runtime/index.js +804 -412
- package/package.json +4 -1
- package/themes/atelier.css +4 -3
- package/themes/index.css +5 -0
- package/themes/kiosk.css +6 -4
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React80 from 'react';
|
|
3
|
+
import React80__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, Suspense, useState, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
7
7
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
8
|
-
import * as
|
|
9
|
-
import { Loader2, X,
|
|
8
|
+
import * as LucideIcons2 from 'lucide-react';
|
|
9
|
+
import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, CheckCircle, XCircle, Wrench, RotateCcw, Send, Code, FileText, WrapText, Check, Copy, AlertTriangle, Trash2, Search, ChevronUp, ChevronDown, MoreHorizontal, Bug, ZoomOut, ZoomIn, Download, Menu as Menu$1, Package, Calendar, Pencil, Eye, Image as Image$1, Upload, ArrowRight, ArrowLeft, Eraser, Pause, Play, SkipForward, TrendingUp, TrendingDown, Minus, ArrowUp, ArrowDown, MoreVertical, AlertCircle, Circle, Clock, CheckCircle2, HelpCircle, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, GitBranch, Plus, Trash, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
10
|
+
import * as PhosphorIcons from '@phosphor-icons/react';
|
|
11
|
+
import * as TablerIcons from '@tabler/icons-react';
|
|
12
|
+
import * as FaIcons from 'react-icons/fa';
|
|
10
13
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
11
14
|
import { createPortal } from 'react-dom';
|
|
12
15
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
@@ -206,7 +209,7 @@ var init_SvgFlow = __esm({
|
|
|
206
209
|
opacity = 1,
|
|
207
210
|
className
|
|
208
211
|
}) => {
|
|
209
|
-
const markerId =
|
|
212
|
+
const markerId = React80__default.useMemo(() => {
|
|
210
213
|
flowIdCounter += 1;
|
|
211
214
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
212
215
|
}, []);
|
|
@@ -749,7 +752,7 @@ var init_SvgRing = __esm({
|
|
|
749
752
|
className,
|
|
750
753
|
label
|
|
751
754
|
}) => {
|
|
752
|
-
const gradientId =
|
|
755
|
+
const gradientId = React80__default.useMemo(() => {
|
|
753
756
|
ringIdCounter += 1;
|
|
754
757
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
755
758
|
}, []);
|
|
@@ -1084,12 +1087,378 @@ var init_useEventBus = __esm({
|
|
|
1084
1087
|
useEventBus_default = useEventBus;
|
|
1085
1088
|
}
|
|
1086
1089
|
});
|
|
1090
|
+
function getCurrentIconFamily() {
|
|
1091
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
1092
|
+
return DEFAULT_FAMILY;
|
|
1093
|
+
}
|
|
1094
|
+
const raw = getComputedStyle(document.documentElement).getPropertyValue("--icon-family").trim().replace(/^["']|["']$/g, "");
|
|
1095
|
+
return VALID_FAMILIES.includes(raw) ? raw : DEFAULT_FAMILY;
|
|
1096
|
+
}
|
|
1097
|
+
function ensureObserver() {
|
|
1098
|
+
if (typeof window === "undefined" || observer) return;
|
|
1099
|
+
observer = new MutationObserver(() => {
|
|
1100
|
+
const next = getCurrentIconFamily();
|
|
1101
|
+
if (next !== cachedFamily) {
|
|
1102
|
+
cachedFamily = next;
|
|
1103
|
+
listeners.forEach((fn) => fn());
|
|
1104
|
+
}
|
|
1105
|
+
});
|
|
1106
|
+
observer.observe(document.documentElement, {
|
|
1107
|
+
attributes: true,
|
|
1108
|
+
attributeFilter: ["data-theme", "style"]
|
|
1109
|
+
});
|
|
1110
|
+
cachedFamily = getCurrentIconFamily();
|
|
1111
|
+
}
|
|
1112
|
+
function subscribeIconFamily(notify2) {
|
|
1113
|
+
ensureObserver();
|
|
1114
|
+
listeners.add(notify2);
|
|
1115
|
+
return () => {
|
|
1116
|
+
listeners.delete(notify2);
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
function getIconFamilySnapshot() {
|
|
1120
|
+
if (cachedFamily !== null) return cachedFamily;
|
|
1121
|
+
cachedFamily = getCurrentIconFamily();
|
|
1122
|
+
return cachedFamily;
|
|
1123
|
+
}
|
|
1124
|
+
function getIconFamilyServerSnapshot() {
|
|
1125
|
+
return DEFAULT_FAMILY;
|
|
1126
|
+
}
|
|
1127
|
+
function useIconFamily() {
|
|
1128
|
+
return useSyncExternalStore(
|
|
1129
|
+
subscribeIconFamily,
|
|
1130
|
+
getIconFamilySnapshot,
|
|
1131
|
+
getIconFamilyServerSnapshot
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1087
1134
|
function kebabToPascal(name) {
|
|
1088
1135
|
return name.split("-").map((part) => {
|
|
1089
1136
|
if (/^\d+$/.test(part)) return part;
|
|
1090
1137
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1091
1138
|
}).join("");
|
|
1092
1139
|
}
|
|
1140
|
+
function resolveLucide(name) {
|
|
1141
|
+
if (lucideAliases[name]) return lucideAliases[name];
|
|
1142
|
+
const pascal = kebabToPascal(name);
|
|
1143
|
+
const lucideMap = LucideIcons2;
|
|
1144
|
+
const direct = lucideMap[pascal];
|
|
1145
|
+
if (direct && typeof direct === "object") return direct;
|
|
1146
|
+
const asIs = lucideMap[name];
|
|
1147
|
+
if (asIs && typeof asIs === "object") return asIs;
|
|
1148
|
+
return LucideIcons2.HelpCircle;
|
|
1149
|
+
}
|
|
1150
|
+
function resolvePhosphor(name, weight) {
|
|
1151
|
+
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
1152
|
+
const map = PhosphorIcons;
|
|
1153
|
+
const PhosphorComp = map[target];
|
|
1154
|
+
if (!PhosphorComp || typeof PhosphorComp !== "object") return null;
|
|
1155
|
+
const Component = PhosphorComp;
|
|
1156
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1157
|
+
Component,
|
|
1158
|
+
{
|
|
1159
|
+
weight,
|
|
1160
|
+
className: props.className,
|
|
1161
|
+
style: props.style,
|
|
1162
|
+
size: props.size ?? "1em"
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
1166
|
+
return Adapter;
|
|
1167
|
+
}
|
|
1168
|
+
function resolveTabler(name) {
|
|
1169
|
+
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
1170
|
+
const target = `Icon${suffix}`;
|
|
1171
|
+
const map = TablerIcons;
|
|
1172
|
+
const TablerComp = map[target];
|
|
1173
|
+
if (!TablerComp || typeof TablerComp !== "object") return null;
|
|
1174
|
+
const Component = TablerComp;
|
|
1175
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1176
|
+
Component,
|
|
1177
|
+
{
|
|
1178
|
+
stroke: props.strokeWidth ?? 1.5,
|
|
1179
|
+
className: props.className,
|
|
1180
|
+
style: props.style,
|
|
1181
|
+
size: props.size ?? 24
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1184
|
+
Adapter.displayName = `Tabler.${target}`;
|
|
1185
|
+
return Adapter;
|
|
1186
|
+
}
|
|
1187
|
+
function resolveFa(name) {
|
|
1188
|
+
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
1189
|
+
const target = `Fa${suffix}`;
|
|
1190
|
+
const map = FaIcons;
|
|
1191
|
+
const FaComp = map[target];
|
|
1192
|
+
if (!FaComp || typeof FaComp !== "function") return null;
|
|
1193
|
+
const Component = FaComp;
|
|
1194
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1195
|
+
Component,
|
|
1196
|
+
{
|
|
1197
|
+
className: props.className,
|
|
1198
|
+
style: props.style,
|
|
1199
|
+
size: props.size ?? "1em"
|
|
1200
|
+
}
|
|
1201
|
+
);
|
|
1202
|
+
Adapter.displayName = `Fa.${target}`;
|
|
1203
|
+
return Adapter;
|
|
1204
|
+
}
|
|
1205
|
+
function warnFallback(name, family) {
|
|
1206
|
+
const key = `${family}::${name}`;
|
|
1207
|
+
if (warned.has(key)) return;
|
|
1208
|
+
warned.add(key);
|
|
1209
|
+
if (typeof console !== "undefined") {
|
|
1210
|
+
console.warn(
|
|
1211
|
+
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
function makeLucideAdapter(name) {
|
|
1216
|
+
const LucideComp = resolveLucide(name);
|
|
1217
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1218
|
+
LucideComp,
|
|
1219
|
+
{
|
|
1220
|
+
className: props.className,
|
|
1221
|
+
strokeWidth: props.strokeWidth,
|
|
1222
|
+
style: props.style,
|
|
1223
|
+
size: props.size
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
1227
|
+
return Adapter;
|
|
1228
|
+
}
|
|
1229
|
+
function resolveIconForFamily(name, family) {
|
|
1230
|
+
switch (family) {
|
|
1231
|
+
case "lucide":
|
|
1232
|
+
return makeLucideAdapter(name);
|
|
1233
|
+
case "phosphor-outline": {
|
|
1234
|
+
const p2 = resolvePhosphor(name, "regular");
|
|
1235
|
+
if (p2) return p2;
|
|
1236
|
+
warnFallback(name, family);
|
|
1237
|
+
return makeLucideAdapter(name);
|
|
1238
|
+
}
|
|
1239
|
+
case "phosphor-fill": {
|
|
1240
|
+
const p2 = resolvePhosphor(name, "fill");
|
|
1241
|
+
if (p2) return p2;
|
|
1242
|
+
warnFallback(name, family);
|
|
1243
|
+
return makeLucideAdapter(name);
|
|
1244
|
+
}
|
|
1245
|
+
case "phosphor-duotone": {
|
|
1246
|
+
const p2 = resolvePhosphor(name, "duotone");
|
|
1247
|
+
if (p2) return p2;
|
|
1248
|
+
warnFallback(name, family);
|
|
1249
|
+
return makeLucideAdapter(name);
|
|
1250
|
+
}
|
|
1251
|
+
case "tabler": {
|
|
1252
|
+
const t = resolveTabler(name);
|
|
1253
|
+
if (t) return t;
|
|
1254
|
+
warnFallback(name, family);
|
|
1255
|
+
return makeLucideAdapter(name);
|
|
1256
|
+
}
|
|
1257
|
+
case "fa-solid": {
|
|
1258
|
+
const f3 = resolveFa(name);
|
|
1259
|
+
if (f3) return f3;
|
|
1260
|
+
warnFallback(name, family);
|
|
1261
|
+
return makeLucideAdapter(name);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
1266
|
+
var init_iconFamily = __esm({
|
|
1267
|
+
"lib/iconFamily.tsx"() {
|
|
1268
|
+
"use client";
|
|
1269
|
+
DEFAULT_FAMILY = "lucide";
|
|
1270
|
+
VALID_FAMILIES = [
|
|
1271
|
+
"lucide",
|
|
1272
|
+
"phosphor-outline",
|
|
1273
|
+
"phosphor-fill",
|
|
1274
|
+
"phosphor-duotone",
|
|
1275
|
+
"tabler",
|
|
1276
|
+
"fa-solid"
|
|
1277
|
+
];
|
|
1278
|
+
cachedFamily = null;
|
|
1279
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1280
|
+
observer = null;
|
|
1281
|
+
lucideAliases = {
|
|
1282
|
+
close: LucideIcons2.X,
|
|
1283
|
+
trash: LucideIcons2.Trash2,
|
|
1284
|
+
loader: LucideIcons2.Loader2,
|
|
1285
|
+
stop: LucideIcons2.Square,
|
|
1286
|
+
volume: LucideIcons2.Volume2,
|
|
1287
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
1288
|
+
refresh: LucideIcons2.RefreshCw,
|
|
1289
|
+
share: LucideIcons2.Share2,
|
|
1290
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
1291
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
1292
|
+
};
|
|
1293
|
+
phosphorAliases = {
|
|
1294
|
+
// lucide name → phosphor PascalCase name
|
|
1295
|
+
search: "MagnifyingGlass",
|
|
1296
|
+
close: "X",
|
|
1297
|
+
loader: "CircleNotch",
|
|
1298
|
+
refresh: "ArrowsClockwise",
|
|
1299
|
+
"sort-asc": "SortAscending",
|
|
1300
|
+
"sort-desc": "SortDescending",
|
|
1301
|
+
"chevron-down": "CaretDown",
|
|
1302
|
+
"chevron-up": "CaretUp",
|
|
1303
|
+
"chevron-left": "CaretLeft",
|
|
1304
|
+
"chevron-right": "CaretRight",
|
|
1305
|
+
"help-circle": "Question",
|
|
1306
|
+
"alert-triangle": "Warning",
|
|
1307
|
+
"alert-circle": "WarningCircle",
|
|
1308
|
+
"check-circle": "CheckCircle",
|
|
1309
|
+
"x-circle": "XCircle",
|
|
1310
|
+
edit: "PencilSimple",
|
|
1311
|
+
pencil: "PencilSimple",
|
|
1312
|
+
trash: "Trash",
|
|
1313
|
+
send: "PaperPlaneRight",
|
|
1314
|
+
external: "ArrowSquareOut",
|
|
1315
|
+
"external-link": "ArrowSquareOut",
|
|
1316
|
+
plus: "Plus",
|
|
1317
|
+
minus: "Minus",
|
|
1318
|
+
x: "X",
|
|
1319
|
+
check: "Check",
|
|
1320
|
+
star: "Star",
|
|
1321
|
+
heart: "Heart",
|
|
1322
|
+
home: "House",
|
|
1323
|
+
user: "User",
|
|
1324
|
+
users: "Users",
|
|
1325
|
+
settings: "Gear",
|
|
1326
|
+
menu: "List",
|
|
1327
|
+
"arrow-up": "ArrowUp",
|
|
1328
|
+
"arrow-down": "ArrowDown",
|
|
1329
|
+
"arrow-left": "ArrowLeft",
|
|
1330
|
+
"arrow-right": "ArrowRight",
|
|
1331
|
+
copy: "Copy",
|
|
1332
|
+
download: "DownloadSimple",
|
|
1333
|
+
upload: "UploadSimple",
|
|
1334
|
+
filter: "Funnel",
|
|
1335
|
+
calendar: "Calendar",
|
|
1336
|
+
clock: "Clock",
|
|
1337
|
+
bell: "Bell",
|
|
1338
|
+
mail: "Envelope",
|
|
1339
|
+
envelope: "Envelope",
|
|
1340
|
+
lock: "Lock",
|
|
1341
|
+
unlock: "LockOpen",
|
|
1342
|
+
eye: "Eye",
|
|
1343
|
+
"eye-off": "EyeSlash",
|
|
1344
|
+
more: "DotsThree",
|
|
1345
|
+
"more-vertical": "DotsThreeVertical",
|
|
1346
|
+
info: "Info",
|
|
1347
|
+
warning: "Warning",
|
|
1348
|
+
error: "WarningCircle"
|
|
1349
|
+
};
|
|
1350
|
+
tablerAliases = {
|
|
1351
|
+
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
1352
|
+
search: "Search",
|
|
1353
|
+
close: "X",
|
|
1354
|
+
loader: "Loader2",
|
|
1355
|
+
refresh: "Refresh",
|
|
1356
|
+
"sort-asc": "SortAscending",
|
|
1357
|
+
"sort-desc": "SortDescending",
|
|
1358
|
+
"chevron-down": "ChevronDown",
|
|
1359
|
+
"chevron-up": "ChevronUp",
|
|
1360
|
+
"chevron-left": "ChevronLeft",
|
|
1361
|
+
"chevron-right": "ChevronRight",
|
|
1362
|
+
"help-circle": "HelpCircle",
|
|
1363
|
+
"alert-triangle": "AlertTriangle",
|
|
1364
|
+
"alert-circle": "AlertCircle",
|
|
1365
|
+
"check-circle": "CircleCheck",
|
|
1366
|
+
"x-circle": "CircleX",
|
|
1367
|
+
edit: "Pencil",
|
|
1368
|
+
trash: "Trash",
|
|
1369
|
+
send: "Send",
|
|
1370
|
+
external: "ExternalLink",
|
|
1371
|
+
plus: "Plus",
|
|
1372
|
+
x: "X",
|
|
1373
|
+
check: "Check",
|
|
1374
|
+
star: "Star",
|
|
1375
|
+
heart: "Heart",
|
|
1376
|
+
home: "Home",
|
|
1377
|
+
user: "User",
|
|
1378
|
+
users: "Users",
|
|
1379
|
+
settings: "Settings",
|
|
1380
|
+
menu: "Menu2",
|
|
1381
|
+
copy: "Copy",
|
|
1382
|
+
download: "Download",
|
|
1383
|
+
upload: "Upload",
|
|
1384
|
+
filter: "Filter",
|
|
1385
|
+
calendar: "Calendar",
|
|
1386
|
+
clock: "Clock",
|
|
1387
|
+
bell: "Bell",
|
|
1388
|
+
mail: "Mail",
|
|
1389
|
+
envelope: "Mail",
|
|
1390
|
+
lock: "Lock",
|
|
1391
|
+
unlock: "LockOpen",
|
|
1392
|
+
eye: "Eye",
|
|
1393
|
+
"eye-off": "EyeOff",
|
|
1394
|
+
more: "Dots",
|
|
1395
|
+
"more-vertical": "DotsVertical",
|
|
1396
|
+
info: "InfoCircle"
|
|
1397
|
+
};
|
|
1398
|
+
faAliases = {
|
|
1399
|
+
// lucide name → fa-solid suffix (after the `Fa` prefix)
|
|
1400
|
+
search: "Search",
|
|
1401
|
+
close: "Times",
|
|
1402
|
+
x: "Times",
|
|
1403
|
+
loader: "Spinner",
|
|
1404
|
+
refresh: "Sync",
|
|
1405
|
+
"sort-asc": "SortAmountUp",
|
|
1406
|
+
"sort-desc": "SortAmountDown",
|
|
1407
|
+
"chevron-down": "ChevronDown",
|
|
1408
|
+
"chevron-up": "ChevronUp",
|
|
1409
|
+
"chevron-left": "ChevronLeft",
|
|
1410
|
+
"chevron-right": "ChevronRight",
|
|
1411
|
+
"help-circle": "QuestionCircle",
|
|
1412
|
+
"alert-triangle": "ExclamationTriangle",
|
|
1413
|
+
"alert-circle": "ExclamationCircle",
|
|
1414
|
+
"check-circle": "CheckCircle",
|
|
1415
|
+
"x-circle": "TimesCircle",
|
|
1416
|
+
edit: "Edit",
|
|
1417
|
+
pencil: "Pencil",
|
|
1418
|
+
trash: "Trash",
|
|
1419
|
+
send: "PaperPlane",
|
|
1420
|
+
external: "ExternalLinkAlt",
|
|
1421
|
+
plus: "Plus",
|
|
1422
|
+
minus: "Minus",
|
|
1423
|
+
check: "Check",
|
|
1424
|
+
star: "Star",
|
|
1425
|
+
heart: "Heart",
|
|
1426
|
+
home: "Home",
|
|
1427
|
+
user: "User",
|
|
1428
|
+
users: "Users",
|
|
1429
|
+
settings: "Cog",
|
|
1430
|
+
menu: "Bars",
|
|
1431
|
+
"arrow-up": "ArrowUp",
|
|
1432
|
+
"arrow-down": "ArrowDown",
|
|
1433
|
+
"arrow-left": "ArrowLeft",
|
|
1434
|
+
"arrow-right": "ArrowRight",
|
|
1435
|
+
copy: "Copy",
|
|
1436
|
+
download: "Download",
|
|
1437
|
+
upload: "Upload",
|
|
1438
|
+
filter: "Filter",
|
|
1439
|
+
calendar: "Calendar",
|
|
1440
|
+
clock: "Clock",
|
|
1441
|
+
bell: "Bell",
|
|
1442
|
+
mail: "Envelope",
|
|
1443
|
+
envelope: "Envelope",
|
|
1444
|
+
lock: "Lock",
|
|
1445
|
+
unlock: "LockOpen",
|
|
1446
|
+
eye: "Eye",
|
|
1447
|
+
"eye-off": "EyeSlash",
|
|
1448
|
+
more: "EllipsisH",
|
|
1449
|
+
"more-vertical": "EllipsisV",
|
|
1450
|
+
info: "InfoCircle",
|
|
1451
|
+
warning: "ExclamationTriangle"
|
|
1452
|
+
};
|
|
1453
|
+
warned = /* @__PURE__ */ new Set();
|
|
1454
|
+
}
|
|
1455
|
+
});
|
|
1456
|
+
function kebabToPascal2(name) {
|
|
1457
|
+
return name.split("-").map((part) => {
|
|
1458
|
+
if (/^\d+$/.test(part)) return part;
|
|
1459
|
+
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1460
|
+
}).join("");
|
|
1461
|
+
}
|
|
1093
1462
|
function resolveIcon(name) {
|
|
1094
1463
|
const cached = resolvedCache.get(name);
|
|
1095
1464
|
if (cached) return cached;
|
|
@@ -1099,28 +1468,30 @@ function resolveIcon(name) {
|
|
|
1099
1468
|
}
|
|
1100
1469
|
function doResolve(name) {
|
|
1101
1470
|
if (iconAliases[name]) return iconAliases[name];
|
|
1102
|
-
const pascalName =
|
|
1103
|
-
const directLookup =
|
|
1471
|
+
const pascalName = kebabToPascal2(name);
|
|
1472
|
+
const directLookup = LucideIcons2[pascalName];
|
|
1104
1473
|
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
1105
|
-
const asIs =
|
|
1474
|
+
const asIs = LucideIcons2[name];
|
|
1106
1475
|
if (asIs && typeof asIs === "object") return asIs;
|
|
1107
|
-
return
|
|
1476
|
+
return LucideIcons2.HelpCircle;
|
|
1108
1477
|
}
|
|
1109
1478
|
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
1110
1479
|
var init_Icon = __esm({
|
|
1111
1480
|
"components/atoms/Icon.tsx"() {
|
|
1481
|
+
"use client";
|
|
1112
1482
|
init_cn();
|
|
1483
|
+
init_iconFamily();
|
|
1113
1484
|
iconAliases = {
|
|
1114
|
-
"close":
|
|
1115
|
-
"trash":
|
|
1116
|
-
"loader":
|
|
1117
|
-
"stop":
|
|
1118
|
-
"volume":
|
|
1119
|
-
"volume-off":
|
|
1120
|
-
"refresh":
|
|
1121
|
-
"share":
|
|
1122
|
-
"sort-asc":
|
|
1123
|
-
"sort-desc":
|
|
1485
|
+
"close": LucideIcons2.X,
|
|
1486
|
+
"trash": LucideIcons2.Trash2,
|
|
1487
|
+
"loader": LucideIcons2.Loader2,
|
|
1488
|
+
"stop": LucideIcons2.Square,
|
|
1489
|
+
"volume": LucideIcons2.Volume2,
|
|
1490
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
1491
|
+
"refresh": LucideIcons2.RefreshCw,
|
|
1492
|
+
"share": LucideIcons2.Share2,
|
|
1493
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
1494
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
1124
1495
|
};
|
|
1125
1496
|
resolvedCache = /* @__PURE__ */ new Map();
|
|
1126
1497
|
sizeClasses = {
|
|
@@ -1145,22 +1516,50 @@ var init_Icon = __esm({
|
|
|
1145
1516
|
strokeWidth,
|
|
1146
1517
|
style
|
|
1147
1518
|
}) => {
|
|
1148
|
-
const
|
|
1519
|
+
const family = useIconFamily();
|
|
1520
|
+
const RenderedComponent = React80__default.useMemo(() => {
|
|
1521
|
+
if (icon) return null;
|
|
1522
|
+
return name ? resolveIconForFamily(name, family) : null;
|
|
1523
|
+
}, [icon, name, family]);
|
|
1149
1524
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
1525
|
+
const inlineStyle = {
|
|
1526
|
+
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
1527
|
+
...style
|
|
1528
|
+
};
|
|
1529
|
+
const composedClassName = cn(
|
|
1530
|
+
sizeClasses[size],
|
|
1531
|
+
animationClasses[animation],
|
|
1532
|
+
color ? color : "text-current",
|
|
1533
|
+
className
|
|
1534
|
+
);
|
|
1535
|
+
if (icon) {
|
|
1536
|
+
const Direct = icon;
|
|
1537
|
+
return /* @__PURE__ */ jsx(
|
|
1538
|
+
Direct,
|
|
1539
|
+
{
|
|
1540
|
+
className: composedClassName,
|
|
1541
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1542
|
+
style: inlineStyle
|
|
1543
|
+
}
|
|
1544
|
+
);
|
|
1545
|
+
}
|
|
1546
|
+
if (RenderedComponent) {
|
|
1547
|
+
return /* @__PURE__ */ jsx(
|
|
1548
|
+
RenderedComponent,
|
|
1549
|
+
{
|
|
1550
|
+
className: composedClassName,
|
|
1551
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1552
|
+
style: inlineStyle
|
|
1553
|
+
}
|
|
1554
|
+
);
|
|
1555
|
+
}
|
|
1556
|
+
const Fallback = LucideIcons2.HelpCircle;
|
|
1150
1557
|
return /* @__PURE__ */ jsx(
|
|
1151
|
-
|
|
1558
|
+
Fallback,
|
|
1152
1559
|
{
|
|
1153
|
-
className:
|
|
1154
|
-
sizeClasses[size],
|
|
1155
|
-
animationClasses[animation],
|
|
1156
|
-
color ? color : "text-current",
|
|
1157
|
-
className
|
|
1158
|
-
),
|
|
1560
|
+
className: composedClassName,
|
|
1159
1561
|
strokeWidth: effectiveStrokeWidth,
|
|
1160
|
-
style:
|
|
1161
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
1162
|
-
...style
|
|
1163
|
-
}
|
|
1562
|
+
style: inlineStyle
|
|
1164
1563
|
}
|
|
1165
1564
|
);
|
|
1166
1565
|
};
|
|
@@ -1170,14 +1569,13 @@ var init_Icon = __esm({
|
|
|
1170
1569
|
function resolveIconProp(value, sizeClass) {
|
|
1171
1570
|
if (!value) return null;
|
|
1172
1571
|
if (typeof value === "string") {
|
|
1173
|
-
|
|
1174
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
1572
|
+
return /* @__PURE__ */ jsx(Icon, { name: value, className: sizeClass });
|
|
1175
1573
|
}
|
|
1176
1574
|
if (typeof value === "function") {
|
|
1177
1575
|
const IconComp = value;
|
|
1178
1576
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1179
1577
|
}
|
|
1180
|
-
if (
|
|
1578
|
+
if (React80__default.isValidElement(value)) {
|
|
1181
1579
|
return value;
|
|
1182
1580
|
}
|
|
1183
1581
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1253,7 +1651,7 @@ var init_Button = __esm({
|
|
|
1253
1651
|
md: "h-icon-default w-icon-default",
|
|
1254
1652
|
lg: "h-5 w-5"
|
|
1255
1653
|
};
|
|
1256
|
-
Button =
|
|
1654
|
+
Button = React80__default.forwardRef(
|
|
1257
1655
|
({
|
|
1258
1656
|
className,
|
|
1259
1657
|
variant = "primary",
|
|
@@ -1318,7 +1716,8 @@ var Input;
|
|
|
1318
1716
|
var init_Input = __esm({
|
|
1319
1717
|
"components/atoms/Input.tsx"() {
|
|
1320
1718
|
init_cn();
|
|
1321
|
-
|
|
1719
|
+
init_Icon();
|
|
1720
|
+
Input = React80__default.forwardRef(
|
|
1322
1721
|
({
|
|
1323
1722
|
className,
|
|
1324
1723
|
inputType,
|
|
@@ -1368,7 +1767,7 @@ var init_Input = __esm({
|
|
|
1368
1767
|
]
|
|
1369
1768
|
}
|
|
1370
1769
|
),
|
|
1371
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(
|
|
1770
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "h-icon-default w-icon-default" }) })
|
|
1372
1771
|
] });
|
|
1373
1772
|
}
|
|
1374
1773
|
if (type === "textarea") {
|
|
@@ -1422,7 +1821,7 @@ var init_Input = __esm({
|
|
|
1422
1821
|
type: "button",
|
|
1423
1822
|
onClick: onClear,
|
|
1424
1823
|
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
1425
|
-
children: /* @__PURE__ */ jsx(
|
|
1824
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
1426
1825
|
}
|
|
1427
1826
|
),
|
|
1428
1827
|
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
@@ -1436,7 +1835,7 @@ var Label;
|
|
|
1436
1835
|
var init_Label = __esm({
|
|
1437
1836
|
"components/atoms/Label.tsx"() {
|
|
1438
1837
|
init_cn();
|
|
1439
|
-
Label =
|
|
1838
|
+
Label = React80__default.forwardRef(
|
|
1440
1839
|
({ className, required, children, ...props }, ref) => {
|
|
1441
1840
|
return /* @__PURE__ */ jsxs(
|
|
1442
1841
|
"label",
|
|
@@ -1462,7 +1861,7 @@ var Textarea;
|
|
|
1462
1861
|
var init_Textarea = __esm({
|
|
1463
1862
|
"components/atoms/Textarea.tsx"() {
|
|
1464
1863
|
init_cn();
|
|
1465
|
-
Textarea =
|
|
1864
|
+
Textarea = React80__default.forwardRef(
|
|
1466
1865
|
({ className, error, ...props }, ref) => {
|
|
1467
1866
|
return /* @__PURE__ */ jsx(
|
|
1468
1867
|
"textarea",
|
|
@@ -1491,7 +1890,8 @@ var Select;
|
|
|
1491
1890
|
var init_Select = __esm({
|
|
1492
1891
|
"components/atoms/Select.tsx"() {
|
|
1493
1892
|
init_cn();
|
|
1494
|
-
|
|
1893
|
+
init_Icon();
|
|
1894
|
+
Select = React80__default.forwardRef(
|
|
1495
1895
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1496
1896
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1497
1897
|
/* @__PURE__ */ jsxs(
|
|
@@ -1522,7 +1922,7 @@ var init_Select = __esm({
|
|
|
1522
1922
|
]
|
|
1523
1923
|
}
|
|
1524
1924
|
),
|
|
1525
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
1925
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "h-icon-default w-icon-default text-foreground" }) })
|
|
1526
1926
|
] });
|
|
1527
1927
|
}
|
|
1528
1928
|
);
|
|
@@ -1533,7 +1933,7 @@ var Checkbox;
|
|
|
1533
1933
|
var init_Checkbox = __esm({
|
|
1534
1934
|
"components/atoms/Checkbox.tsx"() {
|
|
1535
1935
|
init_cn();
|
|
1536
|
-
Checkbox =
|
|
1936
|
+
Checkbox = React80__default.forwardRef(
|
|
1537
1937
|
({ className, label, id, ...props }, ref) => {
|
|
1538
1938
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1539
1939
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1615,7 +2015,7 @@ var init_Card = __esm({
|
|
|
1615
2015
|
md: "shadow",
|
|
1616
2016
|
lg: "shadow-elevation-dialog"
|
|
1617
2017
|
};
|
|
1618
|
-
Card =
|
|
2018
|
+
Card = React80__default.forwardRef(
|
|
1619
2019
|
({
|
|
1620
2020
|
className,
|
|
1621
2021
|
variant = "bordered",
|
|
@@ -1651,9 +2051,9 @@ var init_Card = __esm({
|
|
|
1651
2051
|
}
|
|
1652
2052
|
);
|
|
1653
2053
|
Card.displayName = "Card";
|
|
1654
|
-
CardHeader =
|
|
2054
|
+
CardHeader = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
1655
2055
|
CardHeader.displayName = "CardHeader";
|
|
1656
|
-
CardTitle =
|
|
2056
|
+
CardTitle = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1657
2057
|
"h3",
|
|
1658
2058
|
{
|
|
1659
2059
|
ref,
|
|
@@ -1666,11 +2066,11 @@ var init_Card = __esm({
|
|
|
1666
2066
|
}
|
|
1667
2067
|
));
|
|
1668
2068
|
CardTitle.displayName = "CardTitle";
|
|
1669
|
-
CardContent =
|
|
2069
|
+
CardContent = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
1670
2070
|
CardContent.displayName = "CardContent";
|
|
1671
2071
|
CardBody = CardContent;
|
|
1672
2072
|
CardBody.displayName = "CardBody";
|
|
1673
|
-
CardFooter =
|
|
2073
|
+
CardFooter = React80__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1674
2074
|
"div",
|
|
1675
2075
|
{
|
|
1676
2076
|
ref,
|
|
@@ -1723,13 +2123,10 @@ var init_Badge = __esm({
|
|
|
1723
2123
|
md: "px-2.5 py-1 text-sm",
|
|
1724
2124
|
lg: "px-3 py-1.5 text-base"
|
|
1725
2125
|
};
|
|
1726
|
-
Badge =
|
|
2126
|
+
Badge = React80__default.forwardRef(
|
|
1727
2127
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1728
2128
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1729
|
-
const resolvedIcon = typeof icon === "string" ? (
|
|
1730
|
-
const I = resolveIcon(icon);
|
|
1731
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes3[size] }) : null;
|
|
1732
|
-
})() : icon;
|
|
2129
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes3[size] }) : icon;
|
|
1733
2130
|
return /* @__PURE__ */ jsxs(
|
|
1734
2131
|
"span",
|
|
1735
2132
|
{
|
|
@@ -1815,7 +2212,7 @@ var init_FilterPill = __esm({
|
|
|
1815
2212
|
md: "w-3.5 h-3.5",
|
|
1816
2213
|
lg: "w-4 h-4"
|
|
1817
2214
|
};
|
|
1818
|
-
FilterPill =
|
|
2215
|
+
FilterPill = React80__default.forwardRef(
|
|
1819
2216
|
({
|
|
1820
2217
|
className,
|
|
1821
2218
|
variant = "default",
|
|
@@ -1840,11 +2237,7 @@ var init_FilterPill = __esm({
|
|
|
1840
2237
|
onRemove?.();
|
|
1841
2238
|
if (removeEvent) eventBus.emit(`UI:${removeEvent}`, { label: payloadLabel });
|
|
1842
2239
|
}, [onRemove, removeEvent, eventBus, payloadLabel]);
|
|
1843
|
-
const
|
|
1844
|
-
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
1845
|
-
const I = resolveIcon(icon);
|
|
1846
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes[size] }) : null;
|
|
1847
|
-
})() : icon;
|
|
2240
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes[size] }) : icon;
|
|
1848
2241
|
return /* @__PURE__ */ jsxs(
|
|
1849
2242
|
"span",
|
|
1850
2243
|
{
|
|
@@ -1873,7 +2266,7 @@ var init_FilterPill = __esm({
|
|
|
1873
2266
|
className: cn(
|
|
1874
2267
|
"ml-0.5 rounded-full hover:bg-foreground/10 transition-colors flex items-center justify-center"
|
|
1875
2268
|
),
|
|
1876
|
-
children:
|
|
2269
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: iconSizes[size] })
|
|
1877
2270
|
}
|
|
1878
2271
|
)
|
|
1879
2272
|
]
|
|
@@ -1888,13 +2281,14 @@ var sizeStyles4, Spinner;
|
|
|
1888
2281
|
var init_Spinner = __esm({
|
|
1889
2282
|
"components/atoms/Spinner.tsx"() {
|
|
1890
2283
|
init_cn();
|
|
2284
|
+
init_Icon();
|
|
1891
2285
|
sizeStyles4 = {
|
|
1892
2286
|
xs: "h-3 w-3",
|
|
1893
2287
|
sm: "h-4 w-4",
|
|
1894
2288
|
md: "h-6 w-6",
|
|
1895
2289
|
lg: "h-8 w-8"
|
|
1896
2290
|
};
|
|
1897
|
-
Spinner =
|
|
2291
|
+
Spinner = React80__default.forwardRef(
|
|
1898
2292
|
({ className, size = "md", ...props }, ref) => {
|
|
1899
2293
|
return /* @__PURE__ */ jsx(
|
|
1900
2294
|
"div",
|
|
@@ -1902,7 +2296,7 @@ var init_Spinner = __esm({
|
|
|
1902
2296
|
ref,
|
|
1903
2297
|
className: cn("text-foreground", className),
|
|
1904
2298
|
...props,
|
|
1905
|
-
children: /* @__PURE__ */ jsx(
|
|
2299
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles4[size]) })
|
|
1906
2300
|
}
|
|
1907
2301
|
);
|
|
1908
2302
|
}
|
|
@@ -1921,6 +2315,7 @@ var sizeClasses2, iconSizeClasses, statusSizeClasses, statusClasses, badgeSizeCl
|
|
|
1921
2315
|
var init_Avatar = __esm({
|
|
1922
2316
|
"components/atoms/Avatar.tsx"() {
|
|
1923
2317
|
"use client";
|
|
2318
|
+
init_Icon();
|
|
1924
2319
|
init_cn();
|
|
1925
2320
|
init_useEventBus();
|
|
1926
2321
|
sizeClasses2 = {
|
|
@@ -1962,7 +2357,7 @@ var init_Avatar = __esm({
|
|
|
1962
2357
|
alt,
|
|
1963
2358
|
name,
|
|
1964
2359
|
initials: providedInitials,
|
|
1965
|
-
icon:
|
|
2360
|
+
icon: IconComponent,
|
|
1966
2361
|
size = "md",
|
|
1967
2362
|
status,
|
|
1968
2363
|
badge,
|
|
@@ -1975,7 +2370,7 @@ var init_Avatar = __esm({
|
|
|
1975
2370
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
1976
2371
|
const hasImage = !!src;
|
|
1977
2372
|
const hasInitials = !!initials;
|
|
1978
|
-
const hasIcon = !!
|
|
2373
|
+
const hasIcon = !!IconComponent;
|
|
1979
2374
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
1980
2375
|
const isClickable = action || onClick;
|
|
1981
2376
|
const handleClick = () => {
|
|
@@ -2019,8 +2414,8 @@ var init_Avatar = __esm({
|
|
|
2019
2414
|
),
|
|
2020
2415
|
children: initials.substring(0, 2).toUpperCase()
|
|
2021
2416
|
}
|
|
2022
|
-
) : hasIcon ? /* @__PURE__ */ jsx(
|
|
2023
|
-
|
|
2417
|
+
) : hasIcon && IconComponent ? /* @__PURE__ */ jsx(
|
|
2418
|
+
IconComponent,
|
|
2024
2419
|
{
|
|
2025
2420
|
className: cn(
|
|
2026
2421
|
"text-foreground",
|
|
@@ -2028,8 +2423,9 @@ var init_Avatar = __esm({
|
|
|
2028
2423
|
)
|
|
2029
2424
|
}
|
|
2030
2425
|
) : /* @__PURE__ */ jsx(
|
|
2031
|
-
|
|
2426
|
+
Icon,
|
|
2032
2427
|
{
|
|
2428
|
+
name: "user",
|
|
2033
2429
|
className: cn(
|
|
2034
2430
|
"text-foreground",
|
|
2035
2431
|
iconSizeClasses[size]
|
|
@@ -2175,7 +2571,7 @@ var init_Box = __esm({
|
|
|
2175
2571
|
fixed: "fixed",
|
|
2176
2572
|
sticky: "sticky"
|
|
2177
2573
|
};
|
|
2178
|
-
Box =
|
|
2574
|
+
Box = React80__default.forwardRef(
|
|
2179
2575
|
({
|
|
2180
2576
|
padding,
|
|
2181
2577
|
paddingX,
|
|
@@ -2225,7 +2621,7 @@ var init_Box = __esm({
|
|
|
2225
2621
|
onMouseLeave?.(e);
|
|
2226
2622
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2227
2623
|
const isClickable = action || onClick;
|
|
2228
|
-
return
|
|
2624
|
+
return React80__default.createElement(
|
|
2229
2625
|
Component,
|
|
2230
2626
|
{
|
|
2231
2627
|
ref,
|
|
@@ -2536,7 +2932,7 @@ var Radio;
|
|
|
2536
2932
|
var init_Radio = __esm({
|
|
2537
2933
|
"components/atoms/Radio.tsx"() {
|
|
2538
2934
|
init_cn();
|
|
2539
|
-
Radio =
|
|
2935
|
+
Radio = React80__default.forwardRef(
|
|
2540
2936
|
({
|
|
2541
2937
|
label,
|
|
2542
2938
|
helperText,
|
|
@@ -2708,7 +3104,7 @@ var init_Switch = __esm({
|
|
|
2708
3104
|
"components/atoms/Switch.tsx"() {
|
|
2709
3105
|
"use client";
|
|
2710
3106
|
init_cn();
|
|
2711
|
-
Switch =
|
|
3107
|
+
Switch = React80.forwardRef(
|
|
2712
3108
|
({
|
|
2713
3109
|
checked,
|
|
2714
3110
|
defaultChecked = false,
|
|
@@ -2719,10 +3115,10 @@ var init_Switch = __esm({
|
|
|
2719
3115
|
name,
|
|
2720
3116
|
className
|
|
2721
3117
|
}, ref) => {
|
|
2722
|
-
const [isChecked, setIsChecked] =
|
|
3118
|
+
const [isChecked, setIsChecked] = React80.useState(
|
|
2723
3119
|
checked !== void 0 ? checked : defaultChecked
|
|
2724
3120
|
);
|
|
2725
|
-
|
|
3121
|
+
React80.useEffect(() => {
|
|
2726
3122
|
if (checked !== void 0) {
|
|
2727
3123
|
setIsChecked(checked);
|
|
2728
3124
|
}
|
|
@@ -3299,6 +3695,7 @@ var sizeClasses3, iconSizes2, ThemeToggle;
|
|
|
3299
3695
|
var init_ThemeToggle = __esm({
|
|
3300
3696
|
"components/atoms/ThemeToggle.tsx"() {
|
|
3301
3697
|
"use client";
|
|
3698
|
+
init_Icon();
|
|
3302
3699
|
init_cn();
|
|
3303
3700
|
init_ThemeContext();
|
|
3304
3701
|
sizeClasses3 = {
|
|
@@ -3336,13 +3733,15 @@ var init_ThemeToggle = __esm({
|
|
|
3336
3733
|
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
3337
3734
|
children: [
|
|
3338
3735
|
isDark ? /* @__PURE__ */ jsx(
|
|
3339
|
-
|
|
3736
|
+
Icon,
|
|
3340
3737
|
{
|
|
3738
|
+
name: "sun",
|
|
3341
3739
|
className: cn(iconSizes2[size], "text-foreground")
|
|
3342
3740
|
}
|
|
3343
3741
|
) : /* @__PURE__ */ jsx(
|
|
3344
|
-
|
|
3742
|
+
Icon,
|
|
3345
3743
|
{
|
|
3744
|
+
name: "moon",
|
|
3346
3745
|
className: cn(iconSizes2[size], "text-foreground")
|
|
3347
3746
|
}
|
|
3348
3747
|
),
|
|
@@ -3572,7 +3971,7 @@ var Dialog;
|
|
|
3572
3971
|
var init_Dialog = __esm({
|
|
3573
3972
|
"components/atoms/Dialog.tsx"() {
|
|
3574
3973
|
init_cn();
|
|
3575
|
-
Dialog =
|
|
3974
|
+
Dialog = React80__default.forwardRef(
|
|
3576
3975
|
({
|
|
3577
3976
|
role = "dialog",
|
|
3578
3977
|
"aria-modal": ariaModal = true,
|
|
@@ -3598,7 +3997,7 @@ var Aside;
|
|
|
3598
3997
|
var init_Aside = __esm({
|
|
3599
3998
|
"components/atoms/Aside.tsx"() {
|
|
3600
3999
|
init_cn();
|
|
3601
|
-
Aside =
|
|
4000
|
+
Aside = React80__default.forwardRef(
|
|
3602
4001
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
3603
4002
|
);
|
|
3604
4003
|
Aside.displayName = "Aside";
|
|
@@ -3675,8 +4074,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3675
4074
|
position = "top",
|
|
3676
4075
|
className
|
|
3677
4076
|
}) => {
|
|
3678
|
-
const [isVisible, setIsVisible] =
|
|
3679
|
-
const timeoutRef =
|
|
4077
|
+
const [isVisible, setIsVisible] = React80__default.useState(false);
|
|
4078
|
+
const timeoutRef = React80__default.useRef(null);
|
|
3680
4079
|
const handleMouseEnter = () => {
|
|
3681
4080
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3682
4081
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -3685,7 +4084,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3685
4084
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3686
4085
|
setIsVisible(false);
|
|
3687
4086
|
};
|
|
3688
|
-
|
|
4087
|
+
React80__default.useEffect(() => {
|
|
3689
4088
|
return () => {
|
|
3690
4089
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3691
4090
|
};
|
|
@@ -3895,7 +4294,7 @@ var init_StatusDot = __esm({
|
|
|
3895
4294
|
md: "w-2.5 h-2.5",
|
|
3896
4295
|
lg: "w-3 h-3"
|
|
3897
4296
|
};
|
|
3898
|
-
StatusDot =
|
|
4297
|
+
StatusDot = React80__default.forwardRef(
|
|
3899
4298
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
3900
4299
|
return /* @__PURE__ */ jsx(
|
|
3901
4300
|
"span",
|
|
@@ -3934,21 +4333,22 @@ function resolveColor(dir, invert) {
|
|
|
3934
4333
|
const isGood = invert ? !isPositive : isPositive;
|
|
3935
4334
|
return isGood ? "text-success" : "text-error";
|
|
3936
4335
|
}
|
|
3937
|
-
var sizeStyles7,
|
|
4336
|
+
var sizeStyles7, iconNameMap, TrendIndicator;
|
|
3938
4337
|
var init_TrendIndicator = __esm({
|
|
3939
4338
|
"components/atoms/TrendIndicator.tsx"() {
|
|
4339
|
+
init_Icon();
|
|
3940
4340
|
init_cn();
|
|
3941
4341
|
sizeStyles7 = {
|
|
3942
4342
|
sm: { icon: "w-3 h-3", text: "text-xs" },
|
|
3943
4343
|
md: { icon: "w-4 h-4", text: "text-sm" },
|
|
3944
4344
|
lg: { icon: "w-5 h-5", text: "text-base" }
|
|
3945
4345
|
};
|
|
3946
|
-
|
|
3947
|
-
up:
|
|
3948
|
-
down:
|
|
3949
|
-
flat:
|
|
4346
|
+
iconNameMap = {
|
|
4347
|
+
up: "trending-up",
|
|
4348
|
+
down: "trending-down",
|
|
4349
|
+
flat: "arrow-right"
|
|
3950
4350
|
};
|
|
3951
|
-
TrendIndicator =
|
|
4351
|
+
TrendIndicator = React80__default.forwardRef(
|
|
3952
4352
|
({
|
|
3953
4353
|
className,
|
|
3954
4354
|
value,
|
|
@@ -3961,7 +4361,7 @@ var init_TrendIndicator = __esm({
|
|
|
3961
4361
|
}, ref) => {
|
|
3962
4362
|
const dir = resolveDirection(value, direction);
|
|
3963
4363
|
const colorClass = resolveColor(dir, invert);
|
|
3964
|
-
const
|
|
4364
|
+
const iconName = iconNameMap[dir];
|
|
3965
4365
|
const styles = sizeStyles7[size];
|
|
3966
4366
|
const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
|
|
3967
4367
|
const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
|
|
@@ -3979,7 +4379,7 @@ var init_TrendIndicator = __esm({
|
|
|
3979
4379
|
"aria-label": ariaLabel,
|
|
3980
4380
|
...props,
|
|
3981
4381
|
children: [
|
|
3982
|
-
/* @__PURE__ */ jsx(
|
|
4382
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, className: styles.icon }),
|
|
3983
4383
|
showValue && formattedValue && /* @__PURE__ */ jsx("span", { children: formattedValue })
|
|
3984
4384
|
]
|
|
3985
4385
|
}
|
|
@@ -4015,7 +4415,7 @@ var init_RangeSlider = __esm({
|
|
|
4015
4415
|
md: "w-4 h-4",
|
|
4016
4416
|
lg: "w-5 h-5"
|
|
4017
4417
|
};
|
|
4018
|
-
RangeSlider =
|
|
4418
|
+
RangeSlider = React80__default.forwardRef(
|
|
4019
4419
|
({
|
|
4020
4420
|
className,
|
|
4021
4421
|
min = 0,
|
|
@@ -4611,7 +5011,7 @@ var init_ContentSection = __esm({
|
|
|
4611
5011
|
md: "py-16",
|
|
4612
5012
|
lg: "py-24"
|
|
4613
5013
|
};
|
|
4614
|
-
ContentSection =
|
|
5014
|
+
ContentSection = React80__default.forwardRef(
|
|
4615
5015
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4616
5016
|
return /* @__PURE__ */ jsx(
|
|
4617
5017
|
Box,
|
|
@@ -5145,7 +5545,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5145
5545
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5146
5546
|
"none": {}
|
|
5147
5547
|
};
|
|
5148
|
-
AnimatedReveal =
|
|
5548
|
+
AnimatedReveal = React80__default.forwardRef(
|
|
5149
5549
|
({
|
|
5150
5550
|
trigger = "scroll",
|
|
5151
5551
|
animation = "fade-up",
|
|
@@ -5175,7 +5575,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5175
5575
|
if (trigger !== "scroll") return;
|
|
5176
5576
|
const el = internalRef.current;
|
|
5177
5577
|
if (!el) return;
|
|
5178
|
-
const
|
|
5578
|
+
const observer2 = new IntersectionObserver(
|
|
5179
5579
|
([entry]) => {
|
|
5180
5580
|
if (entry.isIntersecting) {
|
|
5181
5581
|
if (once && hasAnimated.current) return;
|
|
@@ -5187,8 +5587,8 @@ var init_AnimatedReveal = __esm({
|
|
|
5187
5587
|
},
|
|
5188
5588
|
{ threshold }
|
|
5189
5589
|
);
|
|
5190
|
-
|
|
5191
|
-
return () =>
|
|
5590
|
+
observer2.observe(el);
|
|
5591
|
+
return () => observer2.disconnect();
|
|
5192
5592
|
}, [trigger, threshold, once]);
|
|
5193
5593
|
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
5194
5594
|
const handleMouseLeave = trigger === "hover" ? () => {
|
|
@@ -5305,7 +5705,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5305
5705
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
5306
5706
|
"use client";
|
|
5307
5707
|
init_cn();
|
|
5308
|
-
AnimatedGraphic =
|
|
5708
|
+
AnimatedGraphic = React80__default.forwardRef(
|
|
5309
5709
|
({
|
|
5310
5710
|
src,
|
|
5311
5711
|
svgContent,
|
|
@@ -5328,7 +5728,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5328
5728
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5329
5729
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5330
5730
|
const prevAnimateRef = useRef(animate);
|
|
5331
|
-
const setRef =
|
|
5731
|
+
const setRef = React80__default.useCallback(
|
|
5332
5732
|
(node) => {
|
|
5333
5733
|
containerRef.current = node;
|
|
5334
5734
|
if (typeof ref === "function") ref(node);
|
|
@@ -5601,7 +6001,7 @@ var init_Modal = __esm({
|
|
|
5601
6001
|
{
|
|
5602
6002
|
variant: "ghost",
|
|
5603
6003
|
size: "sm",
|
|
5604
|
-
icon:
|
|
6004
|
+
icon: "x",
|
|
5605
6005
|
onClick: handleClose,
|
|
5606
6006
|
"data-event": "CLOSE",
|
|
5607
6007
|
"aria-label": "Close modal"
|
|
@@ -5758,7 +6158,7 @@ var init_Drawer = __esm({
|
|
|
5758
6158
|
{
|
|
5759
6159
|
variant: "ghost",
|
|
5760
6160
|
size: "sm",
|
|
5761
|
-
icon:
|
|
6161
|
+
icon: "x",
|
|
5762
6162
|
onClick: handleClose,
|
|
5763
6163
|
"aria-label": "Close drawer",
|
|
5764
6164
|
className: cn(!title && "ml-auto")
|
|
@@ -5810,7 +6210,7 @@ var init_Drawer = __esm({
|
|
|
5810
6210
|
Drawer.displayName = "Drawer";
|
|
5811
6211
|
}
|
|
5812
6212
|
});
|
|
5813
|
-
var variantClasses,
|
|
6213
|
+
var variantClasses, iconMap, iconColors, Toast;
|
|
5814
6214
|
var init_Toast = __esm({
|
|
5815
6215
|
"components/molecules/Toast.tsx"() {
|
|
5816
6216
|
"use client";
|
|
@@ -5827,11 +6227,11 @@ var init_Toast = __esm({
|
|
|
5827
6227
|
info: "bg-card border-[length:var(--border-width)] border-info",
|
|
5828
6228
|
warning: "bg-card border-[length:var(--border-width)] border-warning"
|
|
5829
6229
|
};
|
|
5830
|
-
|
|
5831
|
-
success:
|
|
5832
|
-
error:
|
|
5833
|
-
info:
|
|
5834
|
-
warning:
|
|
6230
|
+
iconMap = {
|
|
6231
|
+
success: "check-circle",
|
|
6232
|
+
error: "alert-circle",
|
|
6233
|
+
info: "info",
|
|
6234
|
+
warning: "alert-triangle"
|
|
5835
6235
|
};
|
|
5836
6236
|
iconColors = {
|
|
5837
6237
|
success: "text-success",
|
|
@@ -5888,7 +6288,7 @@ var init_Toast = __esm({
|
|
|
5888
6288
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
5889
6289
|
Icon,
|
|
5890
6290
|
{
|
|
5891
|
-
|
|
6291
|
+
name: iconMap[variant],
|
|
5892
6292
|
size: "md",
|
|
5893
6293
|
className: iconColors[variant]
|
|
5894
6294
|
}
|
|
@@ -5905,7 +6305,7 @@ var init_Toast = __esm({
|
|
|
5905
6305
|
{
|
|
5906
6306
|
variant: "ghost",
|
|
5907
6307
|
size: "sm",
|
|
5908
|
-
icon:
|
|
6308
|
+
icon: "x",
|
|
5909
6309
|
onClick: handleDismiss,
|
|
5910
6310
|
"aria-label": "Dismiss toast",
|
|
5911
6311
|
className: "flex-shrink-0"
|
|
@@ -6086,6 +6486,7 @@ var init_ErrorState = __esm({
|
|
|
6086
6486
|
init_Box();
|
|
6087
6487
|
init_Stack();
|
|
6088
6488
|
init_Typography();
|
|
6489
|
+
init_Icon();
|
|
6089
6490
|
init_useEventBus();
|
|
6090
6491
|
init_useTranslate();
|
|
6091
6492
|
ErrorState = ({
|
|
@@ -6113,7 +6514,7 @@ var init_ErrorState = __esm({
|
|
|
6113
6514
|
className
|
|
6114
6515
|
),
|
|
6115
6516
|
children: [
|
|
6116
|
-
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsx(
|
|
6517
|
+
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsx(Icon, { name: "alert-circle", className: "h-8 w-8 text-error" }) }),
|
|
6117
6518
|
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
6118
6519
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
6119
6520
|
(onRetry || retryEvent) && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
@@ -6130,7 +6531,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6130
6531
|
"use client";
|
|
6131
6532
|
init_cn();
|
|
6132
6533
|
init_ErrorState();
|
|
6133
|
-
ErrorBoundary = class extends
|
|
6534
|
+
ErrorBoundary = class extends React80__default.Component {
|
|
6134
6535
|
constructor(props) {
|
|
6135
6536
|
super(props);
|
|
6136
6537
|
__publicField(this, "reset", () => {
|
|
@@ -7028,7 +7429,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
7028
7429
|
AboutPageTemplate.displayName = "AboutPageTemplate";
|
|
7029
7430
|
}
|
|
7030
7431
|
});
|
|
7031
|
-
var variantBorderClasses, variantIconColors,
|
|
7432
|
+
var variantBorderClasses, variantIconColors, iconMap2, Alert;
|
|
7032
7433
|
var init_Alert = __esm({
|
|
7033
7434
|
"components/molecules/Alert.tsx"() {
|
|
7034
7435
|
"use client";
|
|
@@ -7049,11 +7450,11 @@ var init_Alert = __esm({
|
|
|
7049
7450
|
warning: "text-warning",
|
|
7050
7451
|
error: "text-error"
|
|
7051
7452
|
};
|
|
7052
|
-
|
|
7053
|
-
info:
|
|
7054
|
-
success:
|
|
7055
|
-
warning:
|
|
7056
|
-
error:
|
|
7453
|
+
iconMap2 = {
|
|
7454
|
+
info: "info",
|
|
7455
|
+
success: "check-circle",
|
|
7456
|
+
warning: "alert-triangle",
|
|
7457
|
+
error: "alert-circle"
|
|
7057
7458
|
};
|
|
7058
7459
|
Alert = ({
|
|
7059
7460
|
children,
|
|
@@ -7088,7 +7489,7 @@ var init_Alert = __esm({
|
|
|
7088
7489
|
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
7089
7490
|
Icon,
|
|
7090
7491
|
{
|
|
7091
|
-
|
|
7492
|
+
name: iconMap2[variant],
|
|
7092
7493
|
size: "md",
|
|
7093
7494
|
className: variantIconColors[variant]
|
|
7094
7495
|
}
|
|
@@ -7108,7 +7509,7 @@ var init_Alert = __esm({
|
|
|
7108
7509
|
"hover:bg-muted"
|
|
7109
7510
|
),
|
|
7110
7511
|
"aria-label": "Dismiss alert",
|
|
7111
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
7512
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "sm" })
|
|
7112
7513
|
}
|
|
7113
7514
|
)
|
|
7114
7515
|
] })
|
|
@@ -7184,8 +7585,8 @@ var init_Tooltip = __esm({
|
|
|
7184
7585
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
7185
7586
|
};
|
|
7186
7587
|
}, []);
|
|
7187
|
-
const triggerElement =
|
|
7188
|
-
const trigger =
|
|
7588
|
+
const triggerElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7589
|
+
const trigger = React80__default.cloneElement(triggerElement, {
|
|
7189
7590
|
ref: triggerRef,
|
|
7190
7591
|
onMouseEnter: handleMouseEnter,
|
|
7191
7592
|
onMouseLeave: handleMouseLeave,
|
|
@@ -7340,8 +7741,8 @@ var init_Popover = __esm({
|
|
|
7340
7741
|
onMouseEnter: handleOpen,
|
|
7341
7742
|
onMouseLeave: handleClose
|
|
7342
7743
|
};
|
|
7343
|
-
const childElement =
|
|
7344
|
-
const triggerElement =
|
|
7744
|
+
const childElement = React80__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7745
|
+
const triggerElement = React80__default.cloneElement(
|
|
7345
7746
|
childElement,
|
|
7346
7747
|
{
|
|
7347
7748
|
ref: triggerRef,
|
|
@@ -7457,8 +7858,8 @@ var init_Menu = __esm({
|
|
|
7457
7858
|
"bottom-start": "top-full left-0 mt-2",
|
|
7458
7859
|
"bottom-end": "top-full right-0 mt-2"
|
|
7459
7860
|
};
|
|
7460
|
-
const triggerChild =
|
|
7461
|
-
const triggerElement =
|
|
7861
|
+
const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
7862
|
+
const triggerElement = React80__default.cloneElement(
|
|
7462
7863
|
triggerChild,
|
|
7463
7864
|
{
|
|
7464
7865
|
ref: triggerRef,
|
|
@@ -7503,7 +7904,7 @@ var init_Menu = __esm({
|
|
|
7503
7904
|
}
|
|
7504
7905
|
),
|
|
7505
7906
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
7506
|
-
hasSubMenu && /* @__PURE__ */ jsx(Icon, {
|
|
7907
|
+
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
7507
7908
|
] })
|
|
7508
7909
|
},
|
|
7509
7910
|
itemId
|
|
@@ -7648,7 +8049,7 @@ var init_Accordion = __esm({
|
|
|
7648
8049
|
/* @__PURE__ */ jsx(
|
|
7649
8050
|
Icon,
|
|
7650
8051
|
{
|
|
7651
|
-
|
|
8052
|
+
name: "chevron-down",
|
|
7652
8053
|
size: "sm",
|
|
7653
8054
|
className: cn(
|
|
7654
8055
|
"transition-transform duration-fast",
|
|
@@ -7673,15 +8074,6 @@ var init_Accordion = __esm({
|
|
|
7673
8074
|
Accordion.displayName = "Accordion";
|
|
7674
8075
|
}
|
|
7675
8076
|
});
|
|
7676
|
-
function resolveIcon2(name) {
|
|
7677
|
-
const pascalName = name.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join("");
|
|
7678
|
-
const icons = LucideIcons;
|
|
7679
|
-
const icon = icons[pascalName];
|
|
7680
|
-
if (icon) {
|
|
7681
|
-
return icon;
|
|
7682
|
-
}
|
|
7683
|
-
return Plus;
|
|
7684
|
-
}
|
|
7685
8077
|
var FloatingActionButton;
|
|
7686
8078
|
var init_FloatingActionButton = __esm({
|
|
7687
8079
|
"components/molecules/FloatingActionButton.tsx"() {
|
|
@@ -7707,7 +8099,7 @@ var init_FloatingActionButton = __esm({
|
|
|
7707
8099
|
const eventBus = useEventBus();
|
|
7708
8100
|
const { t } = useTranslate();
|
|
7709
8101
|
const resolvedAction = icon ? {
|
|
7710
|
-
icon
|
|
8102
|
+
icon,
|
|
7711
8103
|
onClick: () => {
|
|
7712
8104
|
if (action) eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
7713
8105
|
onClick?.();
|
|
@@ -7817,7 +8209,7 @@ var init_FloatingActionButton = __esm({
|
|
|
7817
8209
|
{
|
|
7818
8210
|
variant: isExpanded ? "secondary" : "primary",
|
|
7819
8211
|
size: "lg",
|
|
7820
|
-
icon: isExpanded ?
|
|
8212
|
+
icon: isExpanded ? "x" : "plus",
|
|
7821
8213
|
onClick: handleMainClick,
|
|
7822
8214
|
className: "rounded-full shadow-lg transition-all duration-normal",
|
|
7823
8215
|
"aria-label": isExpanded ? "Close actions" : "Open actions",
|
|
@@ -7874,13 +8266,13 @@ var init_MapView = __esm({
|
|
|
7874
8266
|
shadowSize: [41, 41]
|
|
7875
8267
|
});
|
|
7876
8268
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
7877
|
-
const { useEffect:
|
|
8269
|
+
const { useEffect: useEffect72, useRef: useRef66, useCallback: useCallback127, useState: useState110 } = React80__default;
|
|
7878
8270
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
7879
8271
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
7880
8272
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
7881
8273
|
const map = useMap();
|
|
7882
8274
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
7883
|
-
|
|
8275
|
+
useEffect72(() => {
|
|
7884
8276
|
const prev = prevRef.current;
|
|
7885
8277
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
7886
8278
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -7891,7 +8283,7 @@ var init_MapView = __esm({
|
|
|
7891
8283
|
}
|
|
7892
8284
|
function MapClickHandler({ onMapClick }) {
|
|
7893
8285
|
const map = useMap();
|
|
7894
|
-
|
|
8286
|
+
useEffect72(() => {
|
|
7895
8287
|
if (!onMapClick) return;
|
|
7896
8288
|
const handler = (e) => {
|
|
7897
8289
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -7919,7 +8311,7 @@ var init_MapView = __esm({
|
|
|
7919
8311
|
showAttribution = true
|
|
7920
8312
|
}) {
|
|
7921
8313
|
const eventBus = useEventBus2();
|
|
7922
|
-
const [clickedPosition, setClickedPosition] =
|
|
8314
|
+
const [clickedPosition, setClickedPosition] = useState110(null);
|
|
7923
8315
|
const handleMapClick = useCallback127((lat, lng) => {
|
|
7924
8316
|
if (showClickedPin) {
|
|
7925
8317
|
setClickedPosition({ lat, lng });
|
|
@@ -8120,7 +8512,7 @@ function InputPattern({
|
|
|
8120
8512
|
fieldName
|
|
8121
8513
|
}) {
|
|
8122
8514
|
const { emit } = useEventBus();
|
|
8123
|
-
const [localValue, setLocalValue] =
|
|
8515
|
+
const [localValue, setLocalValue] = React80__default.useState(value);
|
|
8124
8516
|
const handleChange = (e) => {
|
|
8125
8517
|
setLocalValue(e.target.value);
|
|
8126
8518
|
if (onChange) {
|
|
@@ -8158,7 +8550,7 @@ function TextareaPattern({
|
|
|
8158
8550
|
fieldName
|
|
8159
8551
|
}) {
|
|
8160
8552
|
const { emit } = useEventBus();
|
|
8161
|
-
const [localValue, setLocalValue] =
|
|
8553
|
+
const [localValue, setLocalValue] = React80__default.useState(value);
|
|
8162
8554
|
const handleChange = (e) => {
|
|
8163
8555
|
setLocalValue(e.target.value);
|
|
8164
8556
|
if (onChange) {
|
|
@@ -8190,7 +8582,7 @@ function SelectPattern({
|
|
|
8190
8582
|
fieldName
|
|
8191
8583
|
}) {
|
|
8192
8584
|
const { emit } = useEventBus();
|
|
8193
|
-
const [localValue, setLocalValue] =
|
|
8585
|
+
const [localValue, setLocalValue] = React80__default.useState(value);
|
|
8194
8586
|
const handleChange = (e) => {
|
|
8195
8587
|
setLocalValue(e.target.value);
|
|
8196
8588
|
if (onChange) {
|
|
@@ -8219,7 +8611,7 @@ function CheckboxPattern({
|
|
|
8219
8611
|
className
|
|
8220
8612
|
}) {
|
|
8221
8613
|
const { emit } = useEventBus();
|
|
8222
|
-
const [localChecked, setLocalChecked] =
|
|
8614
|
+
const [localChecked, setLocalChecked] = React80__default.useState(checked);
|
|
8223
8615
|
const handleChange = (e) => {
|
|
8224
8616
|
setLocalChecked(e.target.checked);
|
|
8225
8617
|
if (onChange) {
|
|
@@ -8532,9 +8924,9 @@ function ControlButton({
|
|
|
8532
8924
|
className
|
|
8533
8925
|
}) {
|
|
8534
8926
|
const eventBus = useEventBus();
|
|
8535
|
-
const [isPressed, setIsPressed] =
|
|
8927
|
+
const [isPressed, setIsPressed] = React80.useState(false);
|
|
8536
8928
|
const actualPressed = pressed ?? isPressed;
|
|
8537
|
-
const handlePointerDown =
|
|
8929
|
+
const handlePointerDown = React80.useCallback(
|
|
8538
8930
|
(e) => {
|
|
8539
8931
|
e.preventDefault();
|
|
8540
8932
|
if (disabled) return;
|
|
@@ -8544,7 +8936,7 @@ function ControlButton({
|
|
|
8544
8936
|
},
|
|
8545
8937
|
[disabled, pressEvent, eventBus, onPress]
|
|
8546
8938
|
);
|
|
8547
|
-
const handlePointerUp =
|
|
8939
|
+
const handlePointerUp = React80.useCallback(
|
|
8548
8940
|
(e) => {
|
|
8549
8941
|
e.preventDefault();
|
|
8550
8942
|
if (disabled) return;
|
|
@@ -8554,7 +8946,7 @@ function ControlButton({
|
|
|
8554
8946
|
},
|
|
8555
8947
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
8556
8948
|
);
|
|
8557
|
-
const handlePointerLeave =
|
|
8949
|
+
const handlePointerLeave = React80.useCallback(
|
|
8558
8950
|
(e) => {
|
|
8559
8951
|
if (isPressed) {
|
|
8560
8952
|
setIsPressed(false);
|
|
@@ -8631,8 +9023,8 @@ function ActionButtons({
|
|
|
8631
9023
|
disabled
|
|
8632
9024
|
}) {
|
|
8633
9025
|
const eventBus = useEventBus();
|
|
8634
|
-
const [activeButtons, setActiveButtons] =
|
|
8635
|
-
const handlePress =
|
|
9026
|
+
const [activeButtons, setActiveButtons] = React80.useState(/* @__PURE__ */ new Set());
|
|
9027
|
+
const handlePress = React80.useCallback(
|
|
8636
9028
|
(id) => {
|
|
8637
9029
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
8638
9030
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8640,7 +9032,7 @@ function ActionButtons({
|
|
|
8640
9032
|
},
|
|
8641
9033
|
[actionEvent, eventBus, onAction]
|
|
8642
9034
|
);
|
|
8643
|
-
const handleRelease =
|
|
9035
|
+
const handleRelease = React80.useCallback(
|
|
8644
9036
|
(id) => {
|
|
8645
9037
|
setActiveButtons((prev) => {
|
|
8646
9038
|
const next = new Set(prev);
|
|
@@ -9370,7 +9762,7 @@ function IsometricCanvas({
|
|
|
9370
9762
|
const el = containerRef.current;
|
|
9371
9763
|
if (!el) return;
|
|
9372
9764
|
if (typeof ResizeObserver === "undefined") return;
|
|
9373
|
-
const
|
|
9765
|
+
const observer2 = new ResizeObserver((entries) => {
|
|
9374
9766
|
const entry = entries[0];
|
|
9375
9767
|
if (entry) {
|
|
9376
9768
|
const w = Math.round(entry.contentRect.width) || 800;
|
|
@@ -9381,8 +9773,8 @@ function IsometricCanvas({
|
|
|
9381
9773
|
});
|
|
9382
9774
|
}
|
|
9383
9775
|
});
|
|
9384
|
-
|
|
9385
|
-
return () =>
|
|
9776
|
+
observer2.observe(el);
|
|
9777
|
+
return () => observer2.disconnect();
|
|
9386
9778
|
}, []);
|
|
9387
9779
|
const units = useMemo(
|
|
9388
9780
|
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
@@ -11402,7 +11794,7 @@ var init_MarkdownContent = __esm({
|
|
|
11402
11794
|
init_Box();
|
|
11403
11795
|
init_useTranslate();
|
|
11404
11796
|
init_cn();
|
|
11405
|
-
MarkdownContent =
|
|
11797
|
+
MarkdownContent = React80__default.memo(
|
|
11406
11798
|
({ content, direction, className }) => {
|
|
11407
11799
|
const { t: _t } = useTranslate();
|
|
11408
11800
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -11548,6 +11940,7 @@ var init_CodeBlock = __esm({
|
|
|
11548
11940
|
init_Badge();
|
|
11549
11941
|
init_Stack();
|
|
11550
11942
|
init_Textarea();
|
|
11943
|
+
init_Icon();
|
|
11551
11944
|
init_useEventBus();
|
|
11552
11945
|
init_useTranslate();
|
|
11553
11946
|
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
@@ -11620,7 +12013,7 @@ var init_CodeBlock = __esm({
|
|
|
11620
12013
|
log5 = createLogger("almadar:ui:markdown-code");
|
|
11621
12014
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
11622
12015
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
11623
|
-
CodeBlock =
|
|
12016
|
+
CodeBlock = React80__default.memo(
|
|
11624
12017
|
({
|
|
11625
12018
|
code: rawCode,
|
|
11626
12019
|
language = "text",
|
|
@@ -11838,7 +12231,7 @@ var init_CodeBlock = __esm({
|
|
|
11838
12231
|
onClick: handleCopy,
|
|
11839
12232
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
11840
12233
|
"aria-label": "Copy code",
|
|
11841
|
-
children: copied ? /* @__PURE__ */ jsx(
|
|
12234
|
+
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
11842
12235
|
}
|
|
11843
12236
|
)
|
|
11844
12237
|
]
|
|
@@ -12169,7 +12562,7 @@ var init_QuizBlock = __esm({
|
|
|
12169
12562
|
className: "self-start ml-7",
|
|
12170
12563
|
children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
12171
12564
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: revealed ? t("quiz.hideAnswer") : t("quiz.showAnswer") }),
|
|
12172
|
-
revealed ? /* @__PURE__ */ jsx(
|
|
12565
|
+
revealed ? /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "w-3.5 h-3.5" })
|
|
12173
12566
|
] })
|
|
12174
12567
|
}
|
|
12175
12568
|
)
|
|
@@ -12929,7 +13322,7 @@ var init_StateMachineView = __esm({
|
|
|
12929
13322
|
style: { top: title ? 30 : 0 },
|
|
12930
13323
|
children: [
|
|
12931
13324
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
12932
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
13325
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React80__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
12933
13326
|
StateNode,
|
|
12934
13327
|
{
|
|
12935
13328
|
state,
|
|
@@ -14077,28 +14470,22 @@ var init_BookTableOfContents = __esm({
|
|
|
14077
14470
|
BookTableOfContents.displayName = "BookTableOfContents";
|
|
14078
14471
|
}
|
|
14079
14472
|
});
|
|
14080
|
-
var
|
|
14473
|
+
var ICON_NAME_ALIASES, EmptyState;
|
|
14081
14474
|
var init_EmptyState = __esm({
|
|
14082
14475
|
"components/molecules/EmptyState.tsx"() {
|
|
14083
14476
|
"use client";
|
|
14084
14477
|
init_cn();
|
|
14085
14478
|
init_atoms();
|
|
14086
14479
|
init_Box();
|
|
14480
|
+
init_Icon();
|
|
14087
14481
|
init_Stack();
|
|
14088
14482
|
init_Typography();
|
|
14089
14483
|
init_useEventBus();
|
|
14090
14484
|
init_useTranslate();
|
|
14091
|
-
|
|
14092
|
-
"check-circle"
|
|
14093
|
-
|
|
14094
|
-
"
|
|
14095
|
-
error: XCircle,
|
|
14096
|
-
"alert-circle": AlertCircle,
|
|
14097
|
-
warning: AlertCircle,
|
|
14098
|
-
info: Info,
|
|
14099
|
-
search: Search,
|
|
14100
|
-
inbox: Inbox,
|
|
14101
|
-
"file-question": FileQuestion
|
|
14485
|
+
ICON_NAME_ALIASES = {
|
|
14486
|
+
check: "check-circle",
|
|
14487
|
+
error: "x-circle",
|
|
14488
|
+
warning: "alert-circle"
|
|
14102
14489
|
};
|
|
14103
14490
|
EmptyState = ({
|
|
14104
14491
|
icon,
|
|
@@ -14118,7 +14505,9 @@ var init_EmptyState = __esm({
|
|
|
14118
14505
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
14119
14506
|
onAction?.();
|
|
14120
14507
|
};
|
|
14121
|
-
const
|
|
14508
|
+
const iconName = typeof icon === "string" ? ICON_NAME_ALIASES[icon] ?? icon : void 0;
|
|
14509
|
+
const iconComponent = typeof icon === "function" ? icon : void 0;
|
|
14510
|
+
const hasIcon = Boolean(iconName || iconComponent);
|
|
14122
14511
|
const isDestructive = destructive || variant === "error";
|
|
14123
14512
|
const isSuccess = variant === "success";
|
|
14124
14513
|
const displayText = title || message || t("empty.noItems");
|
|
@@ -14131,7 +14520,7 @@ var init_EmptyState = __esm({
|
|
|
14131
14520
|
className
|
|
14132
14521
|
),
|
|
14133
14522
|
children: [
|
|
14134
|
-
|
|
14523
|
+
hasIcon && /* @__PURE__ */ jsx(
|
|
14135
14524
|
Box,
|
|
14136
14525
|
{
|
|
14137
14526
|
className: cn(
|
|
@@ -14139,8 +14528,9 @@ var init_EmptyState = __esm({
|
|
|
14139
14528
|
isDestructive ? "bg-error/10" : isSuccess ? "bg-success/10" : "bg-muted"
|
|
14140
14529
|
),
|
|
14141
14530
|
children: /* @__PURE__ */ jsx(
|
|
14142
|
-
|
|
14531
|
+
Icon,
|
|
14143
14532
|
{
|
|
14533
|
+
...iconName ? { name: iconName } : { icon: iconComponent },
|
|
14144
14534
|
className: cn(
|
|
14145
14535
|
"h-8 w-8",
|
|
14146
14536
|
isDestructive ? "text-error" : isSuccess ? "text-success" : "text-muted-foreground"
|
|
@@ -14510,7 +14900,7 @@ var init_Grid = __esm({
|
|
|
14510
14900
|
as: Component = "div"
|
|
14511
14901
|
}) => {
|
|
14512
14902
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
14513
|
-
return
|
|
14903
|
+
return React80__default.createElement(
|
|
14514
14904
|
Component,
|
|
14515
14905
|
{
|
|
14516
14906
|
className: cn(
|
|
@@ -15123,7 +15513,7 @@ var init_Breadcrumb = __esm({
|
|
|
15123
15513
|
init_useEventBus();
|
|
15124
15514
|
Breadcrumb = ({
|
|
15125
15515
|
items,
|
|
15126
|
-
separator =
|
|
15516
|
+
separator = "chevron-right",
|
|
15127
15517
|
maxItems,
|
|
15128
15518
|
className
|
|
15129
15519
|
}) => {
|
|
@@ -15152,7 +15542,7 @@ var init_Breadcrumb = __esm({
|
|
|
15152
15542
|
),
|
|
15153
15543
|
"aria-current": isLast ? "page" : void 0,
|
|
15154
15544
|
children: [
|
|
15155
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
15545
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
15156
15546
|
/* @__PURE__ */ jsx(
|
|
15157
15547
|
Typography,
|
|
15158
15548
|
{
|
|
@@ -15179,7 +15569,7 @@ var init_Breadcrumb = __esm({
|
|
|
15179
15569
|
"aria-current": isLast ? "page" : void 0,
|
|
15180
15570
|
disabled: isLast,
|
|
15181
15571
|
children: [
|
|
15182
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
15572
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
15183
15573
|
/* @__PURE__ */ jsx(
|
|
15184
15574
|
Typography,
|
|
15185
15575
|
{
|
|
@@ -15191,14 +15581,7 @@ var init_Breadcrumb = __esm({
|
|
|
15191
15581
|
]
|
|
15192
15582
|
}
|
|
15193
15583
|
),
|
|
15194
|
-
!isLast && /* @__PURE__ */ jsx(
|
|
15195
|
-
Icon,
|
|
15196
|
-
{
|
|
15197
|
-
icon: separator,
|
|
15198
|
-
size: "sm",
|
|
15199
|
-
className: "text-muted-foreground"
|
|
15200
|
-
}
|
|
15201
|
-
)
|
|
15584
|
+
!isLast && (typeof separator === "string" ? /* @__PURE__ */ jsx(Icon, { name: separator, size: "sm", className: "text-muted-foreground" }) : /* @__PURE__ */ jsx(Icon, { icon: separator, size: "sm", className: "text-muted-foreground" }))
|
|
15202
15585
|
] }, index);
|
|
15203
15586
|
}) })
|
|
15204
15587
|
}
|
|
@@ -15719,7 +16102,7 @@ function CalendarGrid({
|
|
|
15719
16102
|
{
|
|
15720
16103
|
variant: "ghost",
|
|
15721
16104
|
size: "sm",
|
|
15722
|
-
icon:
|
|
16105
|
+
icon: "chevron-left",
|
|
15723
16106
|
onClick: stepPrev,
|
|
15724
16107
|
"aria-disabled": !canPrev || void 0,
|
|
15725
16108
|
"aria-label": "Previous days",
|
|
@@ -15732,7 +16115,7 @@ function CalendarGrid({
|
|
|
15732
16115
|
{
|
|
15733
16116
|
variant: "ghost",
|
|
15734
16117
|
size: "sm",
|
|
15735
|
-
iconRight:
|
|
16118
|
+
iconRight: "chevron-right",
|
|
15736
16119
|
onClick: stepNext,
|
|
15737
16120
|
"aria-disabled": !canNext || void 0,
|
|
15738
16121
|
"aria-label": "Next days",
|
|
@@ -19749,7 +20132,7 @@ function CounterMinimal({
|
|
|
19749
20132
|
size: sizeStyles9[size].button,
|
|
19750
20133
|
onClick: onDecrement,
|
|
19751
20134
|
disabled: resolved.decrementDisabled,
|
|
19752
|
-
icon:
|
|
20135
|
+
icon: "minus",
|
|
19753
20136
|
children: resolved.decrementLabel
|
|
19754
20137
|
}
|
|
19755
20138
|
),
|
|
@@ -19771,7 +20154,7 @@ function CounterMinimal({
|
|
|
19771
20154
|
size: sizeStyles9[size].button,
|
|
19772
20155
|
onClick: onIncrement,
|
|
19773
20156
|
disabled: resolved.incrementDisabled,
|
|
19774
|
-
icon:
|
|
20157
|
+
icon: "plus",
|
|
19775
20158
|
children: resolved.incrementLabel
|
|
19776
20159
|
}
|
|
19777
20160
|
)
|
|
@@ -19817,7 +20200,7 @@ function CounterStandard({
|
|
|
19817
20200
|
size: sizeStyles9[size].button,
|
|
19818
20201
|
onClick: onDecrement,
|
|
19819
20202
|
disabled: resolved.decrementDisabled,
|
|
19820
|
-
icon:
|
|
20203
|
+
icon: "minus"
|
|
19821
20204
|
}
|
|
19822
20205
|
),
|
|
19823
20206
|
/* @__PURE__ */ jsx(
|
|
@@ -19827,7 +20210,7 @@ function CounterStandard({
|
|
|
19827
20210
|
size: sizeStyles9[size].button,
|
|
19828
20211
|
onClick: onIncrement,
|
|
19829
20212
|
disabled: resolved.incrementDisabled,
|
|
19830
|
-
icon:
|
|
20213
|
+
icon: "plus"
|
|
19831
20214
|
}
|
|
19832
20215
|
)
|
|
19833
20216
|
] }),
|
|
@@ -19837,7 +20220,7 @@ function CounterStandard({
|
|
|
19837
20220
|
variant: "ghost",
|
|
19838
20221
|
size: "sm",
|
|
19839
20222
|
onClick: onReset,
|
|
19840
|
-
icon:
|
|
20223
|
+
icon: "rotate-ccw",
|
|
19841
20224
|
children: "Reset"
|
|
19842
20225
|
}
|
|
19843
20226
|
)
|
|
@@ -19886,7 +20269,7 @@ function CounterFull({
|
|
|
19886
20269
|
size: sizeStyles9[size].button,
|
|
19887
20270
|
onClick: onDecrement,
|
|
19888
20271
|
disabled: resolved.decrementDisabled,
|
|
19889
|
-
icon:
|
|
20272
|
+
icon: "minus",
|
|
19890
20273
|
children: resolved.decrementLabel
|
|
19891
20274
|
}
|
|
19892
20275
|
),
|
|
@@ -19897,7 +20280,7 @@ function CounterFull({
|
|
|
19897
20280
|
size: sizeStyles9[size].button,
|
|
19898
20281
|
onClick: onIncrement,
|
|
19899
20282
|
disabled: resolved.incrementDisabled,
|
|
19900
|
-
icon:
|
|
20283
|
+
icon: "plus",
|
|
19901
20284
|
children: resolved.incrementLabel
|
|
19902
20285
|
}
|
|
19903
20286
|
)
|
|
@@ -19908,7 +20291,7 @@ function CounterFull({
|
|
|
19908
20291
|
variant: "ghost",
|
|
19909
20292
|
size: "sm",
|
|
19910
20293
|
onClick: onReset,
|
|
19911
|
-
icon:
|
|
20294
|
+
icon: "rotate-ccw",
|
|
19912
20295
|
children: "Reset to 0"
|
|
19913
20296
|
}
|
|
19914
20297
|
)
|
|
@@ -20031,7 +20414,7 @@ function CraftingRecipe({
|
|
|
20031
20414
|
className
|
|
20032
20415
|
}) {
|
|
20033
20416
|
const eventBus = useEventBus();
|
|
20034
|
-
const handleCraft =
|
|
20417
|
+
const handleCraft = React80.useCallback(() => {
|
|
20035
20418
|
onCraft?.();
|
|
20036
20419
|
if (craftEvent) {
|
|
20037
20420
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -20048,7 +20431,7 @@ function CraftingRecipe({
|
|
|
20048
20431
|
children: [
|
|
20049
20432
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
20050
20433
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
20051
|
-
return /* @__PURE__ */ jsxs(
|
|
20434
|
+
return /* @__PURE__ */ jsxs(React80.Fragment, { children: [
|
|
20052
20435
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
20053
20436
|
ItemSlot,
|
|
20054
20437
|
{
|
|
@@ -20111,8 +20494,8 @@ function DPad({
|
|
|
20111
20494
|
}) {
|
|
20112
20495
|
const eventBus = useEventBus();
|
|
20113
20496
|
const sizes = sizeMap6[size];
|
|
20114
|
-
const [activeDirections, setActiveDirections] =
|
|
20115
|
-
const handlePress =
|
|
20497
|
+
const [activeDirections, setActiveDirections] = React80.useState(/* @__PURE__ */ new Set());
|
|
20498
|
+
const handlePress = React80.useCallback(
|
|
20116
20499
|
(direction) => {
|
|
20117
20500
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
20118
20501
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -20120,7 +20503,7 @@ function DPad({
|
|
|
20120
20503
|
},
|
|
20121
20504
|
[directionEvent, eventBus, onDirection]
|
|
20122
20505
|
);
|
|
20123
|
-
const handleRelease =
|
|
20506
|
+
const handleRelease = React80.useCallback(
|
|
20124
20507
|
(direction) => {
|
|
20125
20508
|
setActiveDirections((prev) => {
|
|
20126
20509
|
const next = new Set(prev);
|
|
@@ -20438,7 +20821,7 @@ var init_DashboardLayout = __esm({
|
|
|
20438
20821
|
variant: "ghost",
|
|
20439
20822
|
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20440
20823
|
onClick: () => setSidebarOpen(false),
|
|
20441
|
-
children: /* @__PURE__ */ jsx(
|
|
20824
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-5 w-5" })
|
|
20442
20825
|
}
|
|
20443
20826
|
)
|
|
20444
20827
|
]
|
|
@@ -20484,7 +20867,7 @@ var init_DashboardLayout = __esm({
|
|
|
20484
20867
|
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20485
20868
|
onClick: () => setSidebarOpen(true),
|
|
20486
20869
|
"aria-label": "Open sidebar",
|
|
20487
|
-
children: /* @__PURE__ */ jsx(
|
|
20870
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "menu", className: "h-5 w-5" })
|
|
20488
20871
|
}
|
|
20489
20872
|
),
|
|
20490
20873
|
isTopNav && /* @__PURE__ */ jsxs(
|
|
@@ -20527,7 +20910,7 @@ var init_DashboardLayout = __esm({
|
|
|
20527
20910
|
}
|
|
20528
20911
|
),
|
|
20529
20912
|
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden @sm/dashboard:block flex-1 min-w-0 @xl/dashboard:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20530
|
-
/* @__PURE__ */ jsx(
|
|
20913
|
+
/* @__PURE__ */ jsx(Icon, { name: "search", className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20531
20914
|
/* @__PURE__ */ jsx(
|
|
20532
20915
|
Input,
|
|
20533
20916
|
{
|
|
@@ -20578,7 +20961,7 @@ var init_DashboardLayout = __esm({
|
|
|
20578
20961
|
onClick: handleNotificationClick,
|
|
20579
20962
|
"aria-label": t("common.notifications"),
|
|
20580
20963
|
children: [
|
|
20581
|
-
/* @__PURE__ */ jsx(
|
|
20964
|
+
/* @__PURE__ */ jsx(Icon, { name: "bell", className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20582
20965
|
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
20583
20966
|
Box,
|
|
20584
20967
|
{
|
|
@@ -20616,7 +20999,7 @@ var init_DashboardLayout = __esm({
|
|
|
20616
20999
|
children: user.name
|
|
20617
21000
|
}
|
|
20618
21001
|
),
|
|
20619
|
-
/* @__PURE__ */ jsx(
|
|
21002
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "hidden @sm/dashboard:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20620
21003
|
]
|
|
20621
21004
|
}
|
|
20622
21005
|
),
|
|
@@ -20659,7 +21042,7 @@ var init_DashboardLayout = __esm({
|
|
|
20659
21042
|
},
|
|
20660
21043
|
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
20661
21044
|
children: [
|
|
20662
|
-
/* @__PURE__ */ jsx(
|
|
21045
|
+
/* @__PURE__ */ jsx(Icon, { name: "log-out", className: "h-4 w-4" }),
|
|
20663
21046
|
t("auth.signOut")
|
|
20664
21047
|
]
|
|
20665
21048
|
}
|
|
@@ -20841,14 +21224,14 @@ function useDataDnd(args) {
|
|
|
20841
21224
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
20842
21225
|
const enabled = isZone || Boolean(dndRoot);
|
|
20843
21226
|
const eventBus = useEventBus();
|
|
20844
|
-
const parentRoot =
|
|
21227
|
+
const parentRoot = React80__default.useContext(RootCtx);
|
|
20845
21228
|
const isRoot = enabled && parentRoot === null;
|
|
20846
|
-
const zoneId =
|
|
21229
|
+
const zoneId = React80__default.useId();
|
|
20847
21230
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
20848
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
20849
|
-
const optimisticOrdersRef =
|
|
21231
|
+
const [optimisticOrders, setOptimisticOrders] = React80__default.useState(() => /* @__PURE__ */ new Map());
|
|
21232
|
+
const optimisticOrdersRef = React80__default.useRef(optimisticOrders);
|
|
20850
21233
|
optimisticOrdersRef.current = optimisticOrders;
|
|
20851
|
-
const clearOptimisticOrder =
|
|
21234
|
+
const clearOptimisticOrder = React80__default.useCallback((group) => {
|
|
20852
21235
|
setOptimisticOrders((prev) => {
|
|
20853
21236
|
if (!prev.has(group)) return prev;
|
|
20854
21237
|
const next = new Map(prev);
|
|
@@ -20873,7 +21256,7 @@ function useDataDnd(args) {
|
|
|
20873
21256
|
const raw = it[dndItemIdField];
|
|
20874
21257
|
return String(raw ?? `__idx_${idx}`);
|
|
20875
21258
|
}).join("|");
|
|
20876
|
-
const itemIds =
|
|
21259
|
+
const itemIds = React80__default.useMemo(
|
|
20877
21260
|
() => orderedItems.map((it, idx) => {
|
|
20878
21261
|
const raw = it[dndItemIdField];
|
|
20879
21262
|
return raw ?? `__idx_${idx}`;
|
|
@@ -20881,7 +21264,7 @@ function useDataDnd(args) {
|
|
|
20881
21264
|
[itemIdsSignature]
|
|
20882
21265
|
);
|
|
20883
21266
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
20884
|
-
|
|
21267
|
+
React80__default.useEffect(() => {
|
|
20885
21268
|
const root = isRoot ? null : parentRoot;
|
|
20886
21269
|
if (root) {
|
|
20887
21270
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -20889,20 +21272,20 @@ function useDataDnd(args) {
|
|
|
20889
21272
|
clearOptimisticOrder(ownGroup);
|
|
20890
21273
|
}
|
|
20891
21274
|
}, [itemsContentSig, ownGroup]);
|
|
20892
|
-
const zonesRef =
|
|
20893
|
-
const registerZone =
|
|
21275
|
+
const zonesRef = React80__default.useRef(/* @__PURE__ */ new Map());
|
|
21276
|
+
const registerZone = React80__default.useCallback((zoneId2, meta2) => {
|
|
20894
21277
|
zonesRef.current.set(zoneId2, meta2);
|
|
20895
21278
|
}, []);
|
|
20896
|
-
const unregisterZone =
|
|
21279
|
+
const unregisterZone = React80__default.useCallback((zoneId2) => {
|
|
20897
21280
|
zonesRef.current.delete(zoneId2);
|
|
20898
21281
|
}, []);
|
|
20899
|
-
const [activeDrag, setActiveDrag] =
|
|
20900
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
20901
|
-
const meta =
|
|
21282
|
+
const [activeDrag, setActiveDrag] = React80__default.useState(null);
|
|
21283
|
+
const [overZoneGroup, setOverZoneGroup] = React80__default.useState(null);
|
|
21284
|
+
const meta = React80__default.useMemo(
|
|
20902
21285
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
20903
21286
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
20904
21287
|
);
|
|
20905
|
-
|
|
21288
|
+
React80__default.useEffect(() => {
|
|
20906
21289
|
const target = isRoot ? null : parentRoot;
|
|
20907
21290
|
if (!target) {
|
|
20908
21291
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -20921,7 +21304,7 @@ function useDataDnd(args) {
|
|
|
20921
21304
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
20922
21305
|
const sensors = useAlmadarDndSensors(true);
|
|
20923
21306
|
const collisionDetection = almadarDndCollisionDetection;
|
|
20924
|
-
const findZoneByItem =
|
|
21307
|
+
const findZoneByItem = React80__default.useCallback(
|
|
20925
21308
|
(id) => {
|
|
20926
21309
|
for (const z of zonesRef.current.values()) {
|
|
20927
21310
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -20930,7 +21313,7 @@ function useDataDnd(args) {
|
|
|
20930
21313
|
},
|
|
20931
21314
|
[]
|
|
20932
21315
|
);
|
|
20933
|
-
|
|
21316
|
+
React80__default.useCallback(
|
|
20934
21317
|
(group) => {
|
|
20935
21318
|
for (const z of zonesRef.current.values()) {
|
|
20936
21319
|
if (z.group === group) return z;
|
|
@@ -20939,7 +21322,7 @@ function useDataDnd(args) {
|
|
|
20939
21322
|
},
|
|
20940
21323
|
[]
|
|
20941
21324
|
);
|
|
20942
|
-
const handleDragEnd =
|
|
21325
|
+
const handleDragEnd = React80__default.useCallback(
|
|
20943
21326
|
(event) => {
|
|
20944
21327
|
const { active, over } = event;
|
|
20945
21328
|
const activeIdStr = String(active.id);
|
|
@@ -21030,12 +21413,12 @@ function useDataDnd(args) {
|
|
|
21030
21413
|
},
|
|
21031
21414
|
[eventBus]
|
|
21032
21415
|
);
|
|
21033
|
-
const sortableData =
|
|
21034
|
-
const SortableItem =
|
|
21416
|
+
const sortableData = React80__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
21417
|
+
const SortableItem = React80__default.useCallback(
|
|
21035
21418
|
({ id, children }) => {
|
|
21036
21419
|
const {
|
|
21037
21420
|
attributes,
|
|
21038
|
-
listeners:
|
|
21421
|
+
listeners: listeners8,
|
|
21039
21422
|
setNodeRef,
|
|
21040
21423
|
transform,
|
|
21041
21424
|
transition,
|
|
@@ -21058,7 +21441,7 @@ function useDataDnd(args) {
|
|
|
21058
21441
|
ref: setNodeRef,
|
|
21059
21442
|
style,
|
|
21060
21443
|
...attributes,
|
|
21061
|
-
...
|
|
21444
|
+
...listeners8,
|
|
21062
21445
|
children
|
|
21063
21446
|
}
|
|
21064
21447
|
);
|
|
@@ -21071,7 +21454,7 @@ function useDataDnd(args) {
|
|
|
21071
21454
|
id: droppableId,
|
|
21072
21455
|
data: sortableData
|
|
21073
21456
|
});
|
|
21074
|
-
const ctx =
|
|
21457
|
+
const ctx = React80__default.useContext(RootCtx);
|
|
21075
21458
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
21076
21459
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
21077
21460
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -21086,7 +21469,7 @@ function useDataDnd(args) {
|
|
|
21086
21469
|
showForeignPlaceholder,
|
|
21087
21470
|
ctxAvailable: ctx != null
|
|
21088
21471
|
});
|
|
21089
|
-
|
|
21472
|
+
React80__default.useEffect(() => {
|
|
21090
21473
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
21091
21474
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
21092
21475
|
return /* @__PURE__ */ jsx(
|
|
@@ -21100,11 +21483,11 @@ function useDataDnd(args) {
|
|
|
21100
21483
|
}
|
|
21101
21484
|
);
|
|
21102
21485
|
};
|
|
21103
|
-
const rootContextValue =
|
|
21486
|
+
const rootContextValue = React80__default.useMemo(
|
|
21104
21487
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
21105
21488
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
21106
21489
|
);
|
|
21107
|
-
const handleDragStart =
|
|
21490
|
+
const handleDragStart = React80__default.useCallback((event) => {
|
|
21108
21491
|
const sourceZone = findZoneByItem(event.active.id);
|
|
21109
21492
|
const rect = event.active.rect.current.initial;
|
|
21110
21493
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -21123,7 +21506,7 @@ function useDataDnd(args) {
|
|
|
21123
21506
|
isRoot
|
|
21124
21507
|
});
|
|
21125
21508
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
21126
|
-
const handleDragOver =
|
|
21509
|
+
const handleDragOver = React80__default.useCallback((event) => {
|
|
21127
21510
|
const { active, over } = event;
|
|
21128
21511
|
const overData = over?.data?.current;
|
|
21129
21512
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -21193,7 +21576,7 @@ function useDataDnd(args) {
|
|
|
21193
21576
|
return next;
|
|
21194
21577
|
});
|
|
21195
21578
|
}, []);
|
|
21196
|
-
const handleDragCancel =
|
|
21579
|
+
const handleDragCancel = React80__default.useCallback((event) => {
|
|
21197
21580
|
setActiveDrag(null);
|
|
21198
21581
|
setOverZoneGroup(null);
|
|
21199
21582
|
dndLog.warn("dragCancel", {
|
|
@@ -21201,12 +21584,12 @@ function useDataDnd(args) {
|
|
|
21201
21584
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
21202
21585
|
});
|
|
21203
21586
|
}, []);
|
|
21204
|
-
const handleDragEndWithCleanup =
|
|
21587
|
+
const handleDragEndWithCleanup = React80__default.useCallback((event) => {
|
|
21205
21588
|
handleDragEnd(event);
|
|
21206
21589
|
setActiveDrag(null);
|
|
21207
21590
|
setOverZoneGroup(null);
|
|
21208
21591
|
}, [handleDragEnd]);
|
|
21209
|
-
const wrapContainer =
|
|
21592
|
+
const wrapContainer = React80__default.useCallback(
|
|
21210
21593
|
(children) => {
|
|
21211
21594
|
if (!enabled) return children;
|
|
21212
21595
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -21260,7 +21643,7 @@ var init_useDataDnd = __esm({
|
|
|
21260
21643
|
init_useAlmadarDndCollision();
|
|
21261
21644
|
init_Box();
|
|
21262
21645
|
dndLog = createLogger("almadar:ui:dnd");
|
|
21263
|
-
RootCtx =
|
|
21646
|
+
RootCtx = React80__default.createContext(null);
|
|
21264
21647
|
}
|
|
21265
21648
|
});
|
|
21266
21649
|
function fieldLabel2(key) {
|
|
@@ -21749,7 +22132,7 @@ function DataList({
|
|
|
21749
22132
|
}) {
|
|
21750
22133
|
const eventBus = useEventBus();
|
|
21751
22134
|
const { t } = useTranslate();
|
|
21752
|
-
const [visibleCount, setVisibleCount] =
|
|
22135
|
+
const [visibleCount, setVisibleCount] = React80__default.useState(pageSize || Infinity);
|
|
21753
22136
|
const fieldDefs = fields ?? columns ?? [];
|
|
21754
22137
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21755
22138
|
const dnd = useDataDnd({
|
|
@@ -21768,7 +22151,7 @@ function DataList({
|
|
|
21768
22151
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21769
22152
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21770
22153
|
const hasRenderProp = typeof children === "function";
|
|
21771
|
-
|
|
22154
|
+
React80__default.useEffect(() => {
|
|
21772
22155
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21773
22156
|
const childrenTypeOf = typeof children;
|
|
21774
22157
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21825,7 +22208,7 @@ function DataList({
|
|
|
21825
22208
|
const items2 = data.map((item) => item);
|
|
21826
22209
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
21827
22210
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
21828
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22211
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
21829
22212
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21830
22213
|
group.items.map((itemData, index) => {
|
|
21831
22214
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22013,7 +22396,7 @@ function DataList({
|
|
|
22013
22396
|
className
|
|
22014
22397
|
),
|
|
22015
22398
|
children: [
|
|
22016
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22399
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
22017
22400
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22018
22401
|
group.items.map(
|
|
22019
22402
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22311,6 +22694,7 @@ var init_FilterGroup = __esm({
|
|
|
22311
22694
|
init_Select();
|
|
22312
22695
|
init_Badge();
|
|
22313
22696
|
init_Stack();
|
|
22697
|
+
init_Icon();
|
|
22314
22698
|
init_useEventBus();
|
|
22315
22699
|
init_useQuerySingleton();
|
|
22316
22700
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
@@ -22379,7 +22763,7 @@ var init_FilterGroup = __esm({
|
|
|
22379
22763
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
22380
22764
|
if (variant === "pills") {
|
|
22381
22765
|
return /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: cn("flex-wrap", className), children: [
|
|
22382
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
22766
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
22383
22767
|
filters.map((filter) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
22384
22768
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-[var(--font-weight-medium)] text-muted-foreground", children: [
|
|
22385
22769
|
filter.label,
|
|
@@ -22427,7 +22811,7 @@ var init_FilterGroup = __esm({
|
|
|
22427
22811
|
variant: "ghost",
|
|
22428
22812
|
size: "sm",
|
|
22429
22813
|
onClick: handleClearAll,
|
|
22430
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
22814
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
22431
22815
|
children: "Clear"
|
|
22432
22816
|
}
|
|
22433
22817
|
)
|
|
@@ -22436,7 +22820,7 @@ var init_FilterGroup = __esm({
|
|
|
22436
22820
|
if (variant === "vertical") {
|
|
22437
22821
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
22438
22822
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
22439
|
-
/* @__PURE__ */ jsx(
|
|
22823
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
22440
22824
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
22441
22825
|
] }),
|
|
22442
22826
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -22509,7 +22893,7 @@ var init_FilterGroup = __esm({
|
|
|
22509
22893
|
variant: "ghost",
|
|
22510
22894
|
size: "sm",
|
|
22511
22895
|
onClick: handleClearAll,
|
|
22512
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
22896
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
22513
22897
|
className: "self-start",
|
|
22514
22898
|
children: "Clear all"
|
|
22515
22899
|
}
|
|
@@ -22518,7 +22902,7 @@ var init_FilterGroup = __esm({
|
|
|
22518
22902
|
}
|
|
22519
22903
|
if (variant === "compact") {
|
|
22520
22904
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: cn("flex-wrap", className), children: [
|
|
22521
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
22905
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
22522
22906
|
filters.map((filter) => /* @__PURE__ */ jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsx(
|
|
22523
22907
|
Input,
|
|
22524
22908
|
{
|
|
@@ -22594,7 +22978,7 @@ var init_FilterGroup = __esm({
|
|
|
22594
22978
|
filterDef?.label,
|
|
22595
22979
|
": ",
|
|
22596
22980
|
value,
|
|
22597
|
-
/* @__PURE__ */ jsx(
|
|
22981
|
+
/* @__PURE__ */ jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
|
|
22598
22982
|
]
|
|
22599
22983
|
},
|
|
22600
22984
|
field
|
|
@@ -22621,7 +23005,7 @@ var init_FilterGroup = __esm({
|
|
|
22621
23005
|
align: "center",
|
|
22622
23006
|
className: "text-muted-foreground",
|
|
22623
23007
|
children: [
|
|
22624
|
-
/* @__PURE__ */ jsx(
|
|
23008
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
22625
23009
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
22626
23010
|
]
|
|
22627
23011
|
}
|
|
@@ -22707,7 +23091,7 @@ var init_FilterGroup = __esm({
|
|
|
22707
23091
|
variant: "ghost",
|
|
22708
23092
|
size: "sm",
|
|
22709
23093
|
onClick: handleClearAll,
|
|
22710
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
23094
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
22711
23095
|
children: "Clear all"
|
|
22712
23096
|
}
|
|
22713
23097
|
)
|
|
@@ -22924,6 +23308,7 @@ var init_RelationSelect = __esm({
|
|
|
22924
23308
|
"use client";
|
|
22925
23309
|
init_cn();
|
|
22926
23310
|
init_Box();
|
|
23311
|
+
init_Icon();
|
|
22927
23312
|
init_Stack();
|
|
22928
23313
|
init_Input();
|
|
22929
23314
|
init_Button();
|
|
@@ -23067,12 +23452,13 @@ var init_RelationSelect = __esm({
|
|
|
23067
23452
|
as: "button",
|
|
23068
23453
|
className: "p-0.5 hover:bg-muted rounded cursor-pointer",
|
|
23069
23454
|
onClick: handleClear,
|
|
23070
|
-
children: /* @__PURE__ */ jsx(
|
|
23455
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-4 w-4 text-muted-foreground" })
|
|
23071
23456
|
}
|
|
23072
23457
|
),
|
|
23073
23458
|
/* @__PURE__ */ jsx(
|
|
23074
|
-
|
|
23459
|
+
Icon,
|
|
23075
23460
|
{
|
|
23461
|
+
name: "chevron-down",
|
|
23076
23462
|
className: cn(
|
|
23077
23463
|
"h-4 w-4 text-muted-foreground transition-transform",
|
|
23078
23464
|
isOpen && "transform rotate-180"
|
|
@@ -23303,7 +23689,7 @@ var init_SidePanel = __esm({
|
|
|
23303
23689
|
{
|
|
23304
23690
|
variant: "ghost",
|
|
23305
23691
|
size: "sm",
|
|
23306
|
-
icon:
|
|
23692
|
+
icon: "x",
|
|
23307
23693
|
onClick: handleClose,
|
|
23308
23694
|
"aria-label": "Close panel",
|
|
23309
23695
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
@@ -23361,7 +23747,7 @@ var init_WizardProgress = __esm({
|
|
|
23361
23747
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
23362
23748
|
const isActive = index === currentStep;
|
|
23363
23749
|
const isCompleted = index < currentStep;
|
|
23364
|
-
return /* @__PURE__ */ jsxs(
|
|
23750
|
+
return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
23365
23751
|
/* @__PURE__ */ jsx(
|
|
23366
23752
|
"button",
|
|
23367
23753
|
{
|
|
@@ -23375,7 +23761,7 @@ var init_WizardProgress = __esm({
|
|
|
23375
23761
|
isCompleted && "bg-foreground text-background cursor-pointer hover:bg-muted-foreground",
|
|
23376
23762
|
!isActive && !isCompleted && "bg-card text-foreground"
|
|
23377
23763
|
),
|
|
23378
|
-
children: isCompleted ? /* @__PURE__ */ jsx(Icon, {
|
|
23764
|
+
children: isCompleted ? /* @__PURE__ */ jsx(Icon, { name: "check", size: "sm" }) : index + 1
|
|
23379
23765
|
}
|
|
23380
23766
|
),
|
|
23381
23767
|
!compact && /* @__PURE__ */ jsx(
|
|
@@ -23494,13 +23880,13 @@ var init_WizardNavigation = __esm({
|
|
|
23494
23880
|
),
|
|
23495
23881
|
children: [
|
|
23496
23882
|
showBack ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", onClick: handleBack, disabled: isFirstStep, children: [
|
|
23497
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
23883
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
23498
23884
|
resolvedBackLabel
|
|
23499
23885
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
23500
23886
|
/* @__PURE__ */ jsx(HStack, { align: "center", gap: "sm", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-neutral-500", children: t("wizard.stepOf", { current: String(currentStep + 1), total: String(totalSteps) }) }) }),
|
|
23501
23887
|
isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
23502
23888
|
resolvedNextLabel,
|
|
23503
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
23889
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
23504
23890
|
] }) : /* @__PURE__ */ jsx(Box, {})
|
|
23505
23891
|
]
|
|
23506
23892
|
}
|
|
@@ -24408,9 +24794,9 @@ function ScoreDisplay({
|
|
|
24408
24794
|
...rest
|
|
24409
24795
|
}) {
|
|
24410
24796
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
24411
|
-
const [displayValue, setDisplayValue] =
|
|
24412
|
-
const [isAnimating, setIsAnimating] =
|
|
24413
|
-
|
|
24797
|
+
const [displayValue, setDisplayValue] = React80.useState(resolvedValue);
|
|
24798
|
+
const [isAnimating, setIsAnimating] = React80.useState(false);
|
|
24799
|
+
React80.useEffect(() => {
|
|
24414
24800
|
if (!animated || displayValue === resolvedValue) {
|
|
24415
24801
|
setDisplayValue(resolvedValue);
|
|
24416
24802
|
return;
|
|
@@ -24489,10 +24875,7 @@ function StatBadge({
|
|
|
24489
24875
|
className
|
|
24490
24876
|
),
|
|
24491
24877
|
children: [
|
|
24492
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? (
|
|
24493
|
-
const I = resolveIcon(icon);
|
|
24494
|
-
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
24495
|
-
})() : icon }),
|
|
24878
|
+
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: "w-4 h-4" }) : icon }),
|
|
24496
24879
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
24497
24880
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
24498
24881
|
HealthBar,
|
|
@@ -24560,7 +24943,7 @@ function InventoryGrid({
|
|
|
24560
24943
|
const eventBus = useEventBus();
|
|
24561
24944
|
const slotCount = totalSlots ?? items.length;
|
|
24562
24945
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
24563
|
-
const handleSelect =
|
|
24946
|
+
const handleSelect = React80.useCallback(
|
|
24564
24947
|
(id) => {
|
|
24565
24948
|
onSelect?.(id);
|
|
24566
24949
|
if (selectEvent) {
|
|
@@ -24842,15 +25225,15 @@ function GameCanvas2D({
|
|
|
24842
25225
|
fps = 60,
|
|
24843
25226
|
className
|
|
24844
25227
|
}) {
|
|
24845
|
-
const canvasRef =
|
|
24846
|
-
const rafRef =
|
|
24847
|
-
const frameRef =
|
|
24848
|
-
const lastTimeRef =
|
|
24849
|
-
const onDrawRef =
|
|
25228
|
+
const canvasRef = React80.useRef(null);
|
|
25229
|
+
const rafRef = React80.useRef(0);
|
|
25230
|
+
const frameRef = React80.useRef(0);
|
|
25231
|
+
const lastTimeRef = React80.useRef(0);
|
|
25232
|
+
const onDrawRef = React80.useRef(onDraw);
|
|
24850
25233
|
onDrawRef.current = onDraw;
|
|
24851
|
-
const onTickRef =
|
|
25234
|
+
const onTickRef = React80.useRef(onTick);
|
|
24852
25235
|
onTickRef.current = onTick;
|
|
24853
|
-
|
|
25236
|
+
React80.useEffect(() => {
|
|
24854
25237
|
const canvas = canvasRef.current;
|
|
24855
25238
|
if (!canvas) return;
|
|
24856
25239
|
const ctx = canvas.getContext("2d");
|
|
@@ -25191,7 +25574,7 @@ function TurnPanel({
|
|
|
25191
25574
|
className
|
|
25192
25575
|
}) {
|
|
25193
25576
|
const eventBus = useEventBus();
|
|
25194
|
-
const handleAction =
|
|
25577
|
+
const handleAction = React80.useCallback(
|
|
25195
25578
|
(event) => {
|
|
25196
25579
|
if (event) {
|
|
25197
25580
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25337,7 +25720,7 @@ function UnitCommandBar({
|
|
|
25337
25720
|
className
|
|
25338
25721
|
}) {
|
|
25339
25722
|
const eventBus = useEventBus();
|
|
25340
|
-
const handleCommand =
|
|
25723
|
+
const handleCommand = React80.useCallback(
|
|
25341
25724
|
(event) => {
|
|
25342
25725
|
if (event) {
|
|
25343
25726
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -25822,7 +26205,7 @@ function GameMenu({
|
|
|
25822
26205
|
} catch {
|
|
25823
26206
|
}
|
|
25824
26207
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25825
|
-
const handleOptionClick =
|
|
26208
|
+
const handleOptionClick = React80.useCallback(
|
|
25826
26209
|
(option) => {
|
|
25827
26210
|
if (option.event && eventBus) {
|
|
25828
26211
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -25936,7 +26319,7 @@ function GameOverScreen({
|
|
|
25936
26319
|
} catch {
|
|
25937
26320
|
}
|
|
25938
26321
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
25939
|
-
const handleActionClick =
|
|
26322
|
+
const handleActionClick = React80.useCallback(
|
|
25940
26323
|
(action) => {
|
|
25941
26324
|
if (action.event && eventBus) {
|
|
25942
26325
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -26666,6 +27049,7 @@ var init_NumberStepper = __esm({
|
|
|
26666
27049
|
"components/molecules/NumberStepper.tsx"() {
|
|
26667
27050
|
"use client";
|
|
26668
27051
|
init_cn();
|
|
27052
|
+
init_Icon();
|
|
26669
27053
|
init_useEventBus();
|
|
26670
27054
|
sizeStyles10 = {
|
|
26671
27055
|
sm: {
|
|
@@ -26784,7 +27168,7 @@ var init_NumberStepper = __esm({
|
|
|
26784
27168
|
styles.button
|
|
26785
27169
|
),
|
|
26786
27170
|
"aria-label": "Decrease",
|
|
26787
|
-
children: /* @__PURE__ */ jsx(
|
|
27171
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "minus", className: styles.icon })
|
|
26788
27172
|
}
|
|
26789
27173
|
),
|
|
26790
27174
|
/* @__PURE__ */ jsx(
|
|
@@ -26825,7 +27209,7 @@ var init_NumberStepper = __esm({
|
|
|
26825
27209
|
styles.button
|
|
26826
27210
|
),
|
|
26827
27211
|
"aria-label": "Increase",
|
|
26828
|
-
children: /* @__PURE__ */ jsx(
|
|
27212
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles.icon })
|
|
26829
27213
|
}
|
|
26830
27214
|
)
|
|
26831
27215
|
]
|
|
@@ -26850,6 +27234,7 @@ var init_StarRating = __esm({
|
|
|
26850
27234
|
"components/molecules/StarRating.tsx"() {
|
|
26851
27235
|
"use client";
|
|
26852
27236
|
init_cn();
|
|
27237
|
+
init_Icon();
|
|
26853
27238
|
init_useEventBus();
|
|
26854
27239
|
sizeStyles11 = {
|
|
26855
27240
|
sm: { star: "w-4 h-4", gap: "gap-0.5" },
|
|
@@ -26936,8 +27321,9 @@ var init_StarRating = __esm({
|
|
|
26936
27321
|
},
|
|
26937
27322
|
children: [
|
|
26938
27323
|
/* @__PURE__ */ jsx(
|
|
26939
|
-
|
|
27324
|
+
Icon,
|
|
26940
27325
|
{
|
|
27326
|
+
name: "star",
|
|
26941
27327
|
className: cn(
|
|
26942
27328
|
styles.star,
|
|
26943
27329
|
"text-muted",
|
|
@@ -26947,8 +27333,9 @@ var init_StarRating = __esm({
|
|
|
26947
27333
|
}
|
|
26948
27334
|
),
|
|
26949
27335
|
(isFull || isHalf) && /* @__PURE__ */ jsx(
|
|
26950
|
-
|
|
27336
|
+
Icon,
|
|
26951
27337
|
{
|
|
27338
|
+
name: "star",
|
|
26952
27339
|
className: cn(
|
|
26953
27340
|
styles.star,
|
|
26954
27341
|
"absolute inset-0",
|
|
@@ -27140,7 +27527,7 @@ var init_UploadDropZone = __esm({
|
|
|
27140
27527
|
"aria-hidden": "true"
|
|
27141
27528
|
}
|
|
27142
27529
|
),
|
|
27143
|
-
error ? /* @__PURE__ */ jsx(Icon, {
|
|
27530
|
+
error ? /* @__PURE__ */ jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
27144
27531
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "Drop files here" : label }),
|
|
27145
27532
|
error ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
27146
27533
|
]
|
|
@@ -27164,6 +27551,7 @@ var Lightbox;
|
|
|
27164
27551
|
var init_Lightbox = __esm({
|
|
27165
27552
|
"components/molecules/Lightbox.tsx"() {
|
|
27166
27553
|
"use client";
|
|
27554
|
+
init_Icon();
|
|
27167
27555
|
init_cn();
|
|
27168
27556
|
init_useEventBus();
|
|
27169
27557
|
Lightbox = ({
|
|
@@ -27271,7 +27659,7 @@ var init_Lightbox = __esm({
|
|
|
27271
27659
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27272
27660
|
),
|
|
27273
27661
|
"aria-label": "Close",
|
|
27274
|
-
children: /* @__PURE__ */ jsx(
|
|
27662
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
27275
27663
|
}
|
|
27276
27664
|
),
|
|
27277
27665
|
hasPrev && safeImages.length > 1 && /* @__PURE__ */ jsx(
|
|
@@ -27290,7 +27678,7 @@ var init_Lightbox = __esm({
|
|
|
27290
27678
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27291
27679
|
),
|
|
27292
27680
|
"aria-label": "Previous image",
|
|
27293
|
-
children: /* @__PURE__ */ jsx(
|
|
27681
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
27294
27682
|
}
|
|
27295
27683
|
),
|
|
27296
27684
|
/* @__PURE__ */ jsx(
|
|
@@ -27327,7 +27715,7 @@ var init_Lightbox = __esm({
|
|
|
27327
27715
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27328
27716
|
),
|
|
27329
27717
|
"aria-label": "Next image",
|
|
27330
|
-
children: /* @__PURE__ */ jsx(
|
|
27718
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
27331
27719
|
}
|
|
27332
27720
|
),
|
|
27333
27721
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
|
|
@@ -28408,7 +28796,7 @@ var init_PricingCard = __esm({
|
|
|
28408
28796
|
/* @__PURE__ */ jsx(
|
|
28409
28797
|
Icon,
|
|
28410
28798
|
{
|
|
28411
|
-
|
|
28799
|
+
name: "check",
|
|
28412
28800
|
size: "sm",
|
|
28413
28801
|
className: "flex-shrink-0 text-success"
|
|
28414
28802
|
}
|
|
@@ -28626,7 +29014,7 @@ var init_StepFlow = __esm({
|
|
|
28626
29014
|
className
|
|
28627
29015
|
}) => {
|
|
28628
29016
|
if (orientation === "vertical") {
|
|
28629
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29017
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React80__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
28630
29018
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
28631
29019
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28632
29020
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -28637,7 +29025,7 @@ var init_StepFlow = __esm({
|
|
|
28637
29025
|
] })
|
|
28638
29026
|
] }) }, index)) });
|
|
28639
29027
|
}
|
|
28640
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
29028
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
28641
29029
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
28642
29030
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
28643
29031
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -29451,6 +29839,7 @@ var init_VoteStack = __esm({
|
|
|
29451
29839
|
"components/molecules/VoteStack.tsx"() {
|
|
29452
29840
|
"use client";
|
|
29453
29841
|
init_cn();
|
|
29842
|
+
init_Icon();
|
|
29454
29843
|
init_useEventBus();
|
|
29455
29844
|
sizeStyles12 = {
|
|
29456
29845
|
sm: {
|
|
@@ -29532,7 +29921,7 @@ var init_VoteStack = __esm({
|
|
|
29532
29921
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29533
29922
|
styles.button
|
|
29534
29923
|
),
|
|
29535
|
-
children: /* @__PURE__ */ jsx(
|
|
29924
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
29536
29925
|
}
|
|
29537
29926
|
),
|
|
29538
29927
|
/* @__PURE__ */ jsx(
|
|
@@ -29569,7 +29958,7 @@ var init_VoteStack = __esm({
|
|
|
29569
29958
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
29570
29959
|
styles.button
|
|
29571
29960
|
),
|
|
29572
|
-
children: /* @__PURE__ */ jsx(
|
|
29961
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
29573
29962
|
}
|
|
29574
29963
|
)
|
|
29575
29964
|
]
|
|
@@ -29611,7 +30000,7 @@ var init_LikertScale = __esm({
|
|
|
29611
30000
|
md: "text-base",
|
|
29612
30001
|
lg: "text-lg"
|
|
29613
30002
|
};
|
|
29614
|
-
LikertScale =
|
|
30003
|
+
LikertScale = React80__default.forwardRef(
|
|
29615
30004
|
({
|
|
29616
30005
|
question,
|
|
29617
30006
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -29623,7 +30012,7 @@ var init_LikertScale = __esm({
|
|
|
29623
30012
|
variant = "radios",
|
|
29624
30013
|
className
|
|
29625
30014
|
}, ref) => {
|
|
29626
|
-
const groupId =
|
|
30015
|
+
const groupId = React80__default.useId();
|
|
29627
30016
|
const eventBus = useEventBus();
|
|
29628
30017
|
const handleSelect = useCallback(
|
|
29629
30018
|
(next) => {
|
|
@@ -29903,6 +30292,7 @@ var init_QrScanner = __esm({
|
|
|
29903
30292
|
"use client";
|
|
29904
30293
|
init_cn();
|
|
29905
30294
|
init_atoms();
|
|
30295
|
+
init_Icon();
|
|
29906
30296
|
init_useEventBus();
|
|
29907
30297
|
QrScanner = ({
|
|
29908
30298
|
onScan,
|
|
@@ -30053,7 +30443,7 @@ var init_QrScanner = __esm({
|
|
|
30053
30443
|
padding: "lg",
|
|
30054
30444
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
30055
30445
|
children: [
|
|
30056
|
-
/* @__PURE__ */ jsx(
|
|
30446
|
+
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
30057
30447
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "Camera unavailable" }),
|
|
30058
30448
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
30059
30449
|
]
|
|
@@ -30085,7 +30475,7 @@ var init_QrScanner = __esm({
|
|
|
30085
30475
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30086
30476
|
),
|
|
30087
30477
|
"aria-label": isPaused ? "Resume scanning" : "Pause scanning",
|
|
30088
|
-
children: isPaused ? /* @__PURE__ */ jsx(
|
|
30478
|
+
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
30089
30479
|
}
|
|
30090
30480
|
),
|
|
30091
30481
|
/* @__PURE__ */ jsx(
|
|
@@ -30098,7 +30488,7 @@ var init_QrScanner = __esm({
|
|
|
30098
30488
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30099
30489
|
),
|
|
30100
30490
|
"aria-label": `Switch to ${currentFacing === "environment" ? "front" : "rear"} camera`,
|
|
30101
|
-
children: /* @__PURE__ */ jsx(
|
|
30491
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
30102
30492
|
}
|
|
30103
30493
|
),
|
|
30104
30494
|
/* @__PURE__ */ jsx(
|
|
@@ -30314,11 +30704,11 @@ function getShapeClasses(shape) {
|
|
|
30314
30704
|
function getStatusIcon(status) {
|
|
30315
30705
|
switch (status) {
|
|
30316
30706
|
case "seated":
|
|
30317
|
-
return /* @__PURE__ */ jsx(
|
|
30707
|
+
return /* @__PURE__ */ jsx(Icon, { name: "users", className: "w-4 h-4" });
|
|
30318
30708
|
case "ordered":
|
|
30319
|
-
return /* @__PURE__ */ jsx(
|
|
30709
|
+
return /* @__PURE__ */ jsx(Icon, { name: "coffee", className: "w-4 h-4" });
|
|
30320
30710
|
case "awaiting-bill":
|
|
30321
|
-
return /* @__PURE__ */ jsx(
|
|
30711
|
+
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", className: "w-4 h-4" });
|
|
30322
30712
|
default:
|
|
30323
30713
|
return null;
|
|
30324
30714
|
}
|
|
@@ -30330,6 +30720,7 @@ var init_PositionedCanvas = __esm({
|
|
|
30330
30720
|
init_cn();
|
|
30331
30721
|
init_useEventBus();
|
|
30332
30722
|
init_atoms();
|
|
30723
|
+
init_Icon();
|
|
30333
30724
|
STATUS_CLASSES = {
|
|
30334
30725
|
empty: "bg-surface border-border text-foreground",
|
|
30335
30726
|
seated: "bg-surface border-success text-success",
|
|
@@ -30634,7 +31025,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
30634
31025
|
"transition-opacity"
|
|
30635
31026
|
),
|
|
30636
31027
|
onClick: () => setOpen((v) => !v),
|
|
30637
|
-
children: /* @__PURE__ */ jsx(
|
|
31028
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", className: "w-3.5 h-3.5" })
|
|
30638
31029
|
}
|
|
30639
31030
|
),
|
|
30640
31031
|
open && /* @__PURE__ */ jsxs(
|
|
@@ -30660,7 +31051,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
30660
31051
|
setOpen(false);
|
|
30661
31052
|
},
|
|
30662
31053
|
children: [
|
|
30663
|
-
/* @__PURE__ */ jsx(
|
|
31054
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
30664
31055
|
" Duplicate"
|
|
30665
31056
|
]
|
|
30666
31057
|
}
|
|
@@ -30677,7 +31068,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
30677
31068
|
setOpen(false);
|
|
30678
31069
|
},
|
|
30679
31070
|
children: [
|
|
30680
|
-
/* @__PURE__ */ jsx(
|
|
31071
|
+
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
30681
31072
|
" Delete"
|
|
30682
31073
|
]
|
|
30683
31074
|
}
|
|
@@ -30906,7 +31297,7 @@ function BlockRow({
|
|
|
30906
31297
|
"text-sm text-muted-foreground"
|
|
30907
31298
|
),
|
|
30908
31299
|
children: [
|
|
30909
|
-
/* @__PURE__ */ jsx(
|
|
31300
|
+
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
30910
31301
|
" No image URL set"
|
|
30911
31302
|
]
|
|
30912
31303
|
}
|
|
@@ -30980,7 +31371,7 @@ function BlockRow({
|
|
|
30980
31371
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
30981
31372
|
),
|
|
30982
31373
|
onClick: () => removeListItem(child.id),
|
|
30983
|
-
children: /* @__PURE__ */ jsx(
|
|
31374
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3 h-3" })
|
|
30984
31375
|
}
|
|
30985
31376
|
)
|
|
30986
31377
|
] }, child.id)),
|
|
@@ -30995,7 +31386,7 @@ function BlockRow({
|
|
|
30995
31386
|
),
|
|
30996
31387
|
onClick: addListItem,
|
|
30997
31388
|
children: [
|
|
30998
|
-
/* @__PURE__ */ jsx(
|
|
31389
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
30999
31390
|
" Add item"
|
|
31000
31391
|
]
|
|
31001
31392
|
}
|
|
@@ -31044,7 +31435,7 @@ function BlockRow({
|
|
|
31044
31435
|
"transition-opacity"
|
|
31045
31436
|
),
|
|
31046
31437
|
onClick: () => onInsertAfter("paragraph"),
|
|
31047
|
-
children: /* @__PURE__ */ jsx(
|
|
31438
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" })
|
|
31048
31439
|
}
|
|
31049
31440
|
),
|
|
31050
31441
|
/* @__PURE__ */ jsx(
|
|
@@ -31074,6 +31465,7 @@ var init_RichBlockEditor = __esm({
|
|
|
31074
31465
|
init_Box();
|
|
31075
31466
|
init_Divider();
|
|
31076
31467
|
init_Input();
|
|
31468
|
+
init_Icon();
|
|
31077
31469
|
init_useEventBus();
|
|
31078
31470
|
TOOLBAR_ENTRIES = [
|
|
31079
31471
|
{ type: "paragraph", label: "Text", icon: Type },
|
|
@@ -31317,7 +31709,7 @@ var init_ReplyTree = __esm({
|
|
|
31317
31709
|
onClick: handleToggle,
|
|
31318
31710
|
"aria-label": isCollapsed ? "Expand replies" : "Collapse replies",
|
|
31319
31711
|
"aria-expanded": !isCollapsed,
|
|
31320
|
-
leftIcon: isCollapsed ?
|
|
31712
|
+
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
31321
31713
|
className: cn(
|
|
31322
31714
|
"w-6 h-6 p-0 min-w-0",
|
|
31323
31715
|
"rounded-sm text-muted-foreground",
|
|
@@ -31364,7 +31756,7 @@ var init_ReplyTree = __esm({
|
|
|
31364
31756
|
{
|
|
31365
31757
|
variant: "ghost",
|
|
31366
31758
|
size: "sm",
|
|
31367
|
-
leftIcon:
|
|
31759
|
+
leftIcon: "message-square",
|
|
31368
31760
|
onClick: handleReply,
|
|
31369
31761
|
"aria-label": `Reply to ${node.authorName}`,
|
|
31370
31762
|
children: "Reply"
|
|
@@ -31375,7 +31767,7 @@ var init_ReplyTree = __esm({
|
|
|
31375
31767
|
{
|
|
31376
31768
|
variant: "ghost",
|
|
31377
31769
|
size: "sm",
|
|
31378
|
-
leftIcon:
|
|
31770
|
+
leftIcon: "flag",
|
|
31379
31771
|
onClick: handleFlag,
|
|
31380
31772
|
"aria-label": `Flag reply by ${node.authorName}`,
|
|
31381
31773
|
children: "Flag"
|
|
@@ -31388,7 +31780,7 @@ var init_ReplyTree = __esm({
|
|
|
31388
31780
|
variant: "ghost",
|
|
31389
31781
|
size: "sm",
|
|
31390
31782
|
onClick: handleContinue,
|
|
31391
|
-
rightIcon:
|
|
31783
|
+
rightIcon: "chevron-right",
|
|
31392
31784
|
className: cn(
|
|
31393
31785
|
"self-start gap-1 px-0 h-auto",
|
|
31394
31786
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
@@ -31629,7 +32021,7 @@ var init_VersionDiff = __esm({
|
|
|
31629
32021
|
className: "px-4 py-2 border-b border-border bg-muted/30 flex-wrap",
|
|
31630
32022
|
children: [
|
|
31631
32023
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
31632
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
32024
|
+
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
31633
32025
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
31634
32026
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
31635
32027
|
Select,
|
|
@@ -31666,7 +32058,7 @@ var init_VersionDiff = __esm({
|
|
|
31666
32058
|
{
|
|
31667
32059
|
variant: "ghost",
|
|
31668
32060
|
size: "sm",
|
|
31669
|
-
icon: activeView === "side-by-side" ?
|
|
32061
|
+
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
31670
32062
|
onClick: handleViewToggle,
|
|
31671
32063
|
"aria-label": activeView === "side-by-side" ? "Switch to inline view" : "Switch to side-by-side view"
|
|
31672
32064
|
}
|
|
@@ -31676,7 +32068,7 @@ var init_VersionDiff = __esm({
|
|
|
31676
32068
|
{
|
|
31677
32069
|
variant: "ghost",
|
|
31678
32070
|
size: "sm",
|
|
31679
|
-
icon:
|
|
32071
|
+
icon: "rotate-ccw",
|
|
31680
32072
|
onClick: handleRevert,
|
|
31681
32073
|
children: "Revert"
|
|
31682
32074
|
}
|
|
@@ -31853,7 +32245,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
31853
32245
|
"aria-label": "Breadcrumb",
|
|
31854
32246
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
31855
32247
|
const isLast = idx === items.length - 1;
|
|
31856
|
-
return /* @__PURE__ */ jsxs(
|
|
32248
|
+
return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
31857
32249
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
31858
32250
|
Icon,
|
|
31859
32251
|
{
|
|
@@ -32812,7 +33204,7 @@ var init_MiniStateMachine = __esm({
|
|
|
32812
33204
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
32813
33205
|
const tc = transitionCounts[s.name] ?? 0;
|
|
32814
33206
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
32815
|
-
return /* @__PURE__ */ jsxs(
|
|
33207
|
+
return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
32816
33208
|
/* @__PURE__ */ jsx(
|
|
32817
33209
|
AvlState,
|
|
32818
33210
|
{
|
|
@@ -34328,7 +34720,7 @@ var init_DocumentViewer = __esm({
|
|
|
34328
34720
|
}
|
|
34329
34721
|
});
|
|
34330
34722
|
function extractTitle(children) {
|
|
34331
|
-
if (!
|
|
34723
|
+
if (!React80__default.isValidElement(children)) return void 0;
|
|
34332
34724
|
const props = children.props;
|
|
34333
34725
|
if (typeof props.title === "string") {
|
|
34334
34726
|
return props.title;
|
|
@@ -34440,7 +34832,7 @@ function LinearView({
|
|
|
34440
34832
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
34441
34833
|
const isDone = i < currentIdx;
|
|
34442
34834
|
const isCurrent = i === currentIdx;
|
|
34443
|
-
return /* @__PURE__ */ jsxs(
|
|
34835
|
+
return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
34444
34836
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34445
34837
|
Typography,
|
|
34446
34838
|
{
|
|
@@ -35341,12 +35733,12 @@ var init_Form = __esm({
|
|
|
35341
35733
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
35342
35734
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
35343
35735
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
35344
|
-
const normalizedInitialData =
|
|
35736
|
+
const normalizedInitialData = React80__default.useMemo(() => {
|
|
35345
35737
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
35346
35738
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
35347
35739
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
35348
35740
|
}, [entity, initialData]);
|
|
35349
|
-
const entityDerivedFields =
|
|
35741
|
+
const entityDerivedFields = React80__default.useMemo(() => {
|
|
35350
35742
|
if (fields && fields.length > 0) return void 0;
|
|
35351
35743
|
if (!resolvedEntity) return void 0;
|
|
35352
35744
|
return resolvedEntity.fields.map(
|
|
@@ -35366,16 +35758,16 @@ var init_Form = __esm({
|
|
|
35366
35758
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
35367
35759
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
35368
35760
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
35369
|
-
const [formData, setFormData] =
|
|
35761
|
+
const [formData, setFormData] = React80__default.useState(
|
|
35370
35762
|
normalizedInitialData
|
|
35371
35763
|
);
|
|
35372
|
-
const [collapsedSections, setCollapsedSections] =
|
|
35764
|
+
const [collapsedSections, setCollapsedSections] = React80__default.useState(
|
|
35373
35765
|
/* @__PURE__ */ new Set()
|
|
35374
35766
|
);
|
|
35375
|
-
const [submitError, setSubmitError] =
|
|
35376
|
-
const formRef =
|
|
35767
|
+
const [submitError, setSubmitError] = React80__default.useState(null);
|
|
35768
|
+
const formRef = React80__default.useRef(null);
|
|
35377
35769
|
const formMode = props.mode;
|
|
35378
|
-
const mountedRef =
|
|
35770
|
+
const mountedRef = React80__default.useRef(false);
|
|
35379
35771
|
if (!mountedRef.current) {
|
|
35380
35772
|
mountedRef.current = true;
|
|
35381
35773
|
debug("forms", "mount", {
|
|
@@ -35388,7 +35780,7 @@ var init_Form = __esm({
|
|
|
35388
35780
|
});
|
|
35389
35781
|
}
|
|
35390
35782
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
35391
|
-
const evalContext =
|
|
35783
|
+
const evalContext = React80__default.useMemo(
|
|
35392
35784
|
() => ({
|
|
35393
35785
|
formValues: formData,
|
|
35394
35786
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -35397,7 +35789,7 @@ var init_Form = __esm({
|
|
|
35397
35789
|
}),
|
|
35398
35790
|
[formData, externalContext]
|
|
35399
35791
|
);
|
|
35400
|
-
|
|
35792
|
+
React80__default.useEffect(() => {
|
|
35401
35793
|
debug("forms", "initialData-sync", {
|
|
35402
35794
|
mode: formMode,
|
|
35403
35795
|
normalizedInitialData,
|
|
@@ -35408,7 +35800,7 @@ var init_Form = __esm({
|
|
|
35408
35800
|
setFormData(normalizedInitialData);
|
|
35409
35801
|
}
|
|
35410
35802
|
}, [normalizedInitialData]);
|
|
35411
|
-
const processCalculations =
|
|
35803
|
+
const processCalculations = React80__default.useCallback(
|
|
35412
35804
|
(changedFieldId, newFormData) => {
|
|
35413
35805
|
if (!hiddenCalculations.length) return;
|
|
35414
35806
|
const context = {
|
|
@@ -35433,7 +35825,7 @@ var init_Form = __esm({
|
|
|
35433
35825
|
},
|
|
35434
35826
|
[hiddenCalculations, externalContext, eventBus]
|
|
35435
35827
|
);
|
|
35436
|
-
const checkViolations =
|
|
35828
|
+
const checkViolations = React80__default.useCallback(
|
|
35437
35829
|
(changedFieldId, newFormData) => {
|
|
35438
35830
|
if (!violationTriggers.length) return;
|
|
35439
35831
|
const context = {
|
|
@@ -35471,7 +35863,7 @@ var init_Form = __esm({
|
|
|
35471
35863
|
processCalculations(name, newFormData);
|
|
35472
35864
|
checkViolations(name, newFormData);
|
|
35473
35865
|
};
|
|
35474
|
-
const isFieldVisible =
|
|
35866
|
+
const isFieldVisible = React80__default.useCallback(
|
|
35475
35867
|
(fieldName) => {
|
|
35476
35868
|
const condition = conditionalFields[fieldName];
|
|
35477
35869
|
if (!condition) return true;
|
|
@@ -35479,7 +35871,7 @@ var init_Form = __esm({
|
|
|
35479
35871
|
},
|
|
35480
35872
|
[conditionalFields, evalContext]
|
|
35481
35873
|
);
|
|
35482
|
-
const isSectionVisible =
|
|
35874
|
+
const isSectionVisible = React80__default.useCallback(
|
|
35483
35875
|
(section) => {
|
|
35484
35876
|
if (!section.condition) return true;
|
|
35485
35877
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -35555,7 +35947,7 @@ var init_Form = __esm({
|
|
|
35555
35947
|
eventBus.emit(`UI:${onCancel}`);
|
|
35556
35948
|
}
|
|
35557
35949
|
};
|
|
35558
|
-
const renderField =
|
|
35950
|
+
const renderField = React80__default.useCallback(
|
|
35559
35951
|
(field) => {
|
|
35560
35952
|
const fieldName = field.name || field.field;
|
|
35561
35953
|
if (!fieldName) return null;
|
|
@@ -35576,7 +35968,7 @@ var init_Form = __esm({
|
|
|
35576
35968
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
35577
35969
|
);
|
|
35578
35970
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
35579
|
-
const normalizedFields =
|
|
35971
|
+
const normalizedFields = React80__default.useMemo(() => {
|
|
35580
35972
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
35581
35973
|
return effectiveFields.map((field) => {
|
|
35582
35974
|
if (typeof field === "string") {
|
|
@@ -35599,7 +35991,7 @@ var init_Form = __esm({
|
|
|
35599
35991
|
return field;
|
|
35600
35992
|
});
|
|
35601
35993
|
}, [effectiveFields, resolvedEntity]);
|
|
35602
|
-
const schemaFields =
|
|
35994
|
+
const schemaFields = React80__default.useMemo(() => {
|
|
35603
35995
|
if (normalizedFields.length === 0) return null;
|
|
35604
35996
|
if (isDebugEnabled()) {
|
|
35605
35997
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -35609,7 +36001,7 @@ var init_Form = __esm({
|
|
|
35609
36001
|
}
|
|
35610
36002
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
35611
36003
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
35612
|
-
const sectionElements =
|
|
36004
|
+
const sectionElements = React80__default.useMemo(() => {
|
|
35613
36005
|
if (!sections || sections.length === 0) return null;
|
|
35614
36006
|
return sections.map((section) => {
|
|
35615
36007
|
if (!isSectionVisible(section)) {
|
|
@@ -36314,7 +36706,7 @@ var init_GameTemplate = __esm({
|
|
|
36314
36706
|
{
|
|
36315
36707
|
variant: "secondary",
|
|
36316
36708
|
size: "sm",
|
|
36317
|
-
icon:
|
|
36709
|
+
icon: "pause",
|
|
36318
36710
|
onClick: controls.onPause,
|
|
36319
36711
|
children: "Pause"
|
|
36320
36712
|
}
|
|
@@ -36323,7 +36715,7 @@ var init_GameTemplate = __esm({
|
|
|
36323
36715
|
{
|
|
36324
36716
|
variant: "primary",
|
|
36325
36717
|
size: "sm",
|
|
36326
|
-
icon:
|
|
36718
|
+
icon: "play",
|
|
36327
36719
|
onClick: controls.onPlay,
|
|
36328
36720
|
children: "Play"
|
|
36329
36721
|
}
|
|
@@ -36333,7 +36725,7 @@ var init_GameTemplate = __esm({
|
|
|
36333
36725
|
{
|
|
36334
36726
|
variant: "ghost",
|
|
36335
36727
|
size: "sm",
|
|
36336
|
-
icon:
|
|
36728
|
+
icon: "rotate-ccw",
|
|
36337
36729
|
onClick: controls.onReset,
|
|
36338
36730
|
children: "Reset"
|
|
36339
36731
|
}
|
|
@@ -37335,7 +37727,7 @@ var init_List = __esm({
|
|
|
37335
37727
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
37336
37728
|
return [];
|
|
37337
37729
|
}, [entity]);
|
|
37338
|
-
const getItemActions =
|
|
37730
|
+
const getItemActions = React80__default.useCallback(
|
|
37339
37731
|
(item) => {
|
|
37340
37732
|
if (!itemActions) return [];
|
|
37341
37733
|
if (typeof itemActions === "function") {
|
|
@@ -37808,7 +38200,7 @@ var init_MediaGallery = __esm({
|
|
|
37808
38200
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
37809
38201
|
);
|
|
37810
38202
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
37811
|
-
const items =
|
|
38203
|
+
const items = React80__default.useMemo(() => {
|
|
37812
38204
|
if (propItems) return propItems;
|
|
37813
38205
|
if (entityData.length === 0) return [];
|
|
37814
38206
|
return entityData.map((record, idx) => ({
|
|
@@ -37981,9 +38373,9 @@ function MiniMap({
|
|
|
37981
38373
|
viewportRect,
|
|
37982
38374
|
className
|
|
37983
38375
|
}) {
|
|
37984
|
-
const canvasRef =
|
|
37985
|
-
const frameRef =
|
|
37986
|
-
|
|
38376
|
+
const canvasRef = React80.useRef(null);
|
|
38377
|
+
const frameRef = React80.useRef(0);
|
|
38378
|
+
React80.useEffect(() => {
|
|
37987
38379
|
const canvas = canvasRef.current;
|
|
37988
38380
|
if (!canvas) return;
|
|
37989
38381
|
const ctx = canvas.getContext("2d");
|
|
@@ -38065,7 +38457,7 @@ var init_MiniMap = __esm({
|
|
|
38065
38457
|
}
|
|
38066
38458
|
});
|
|
38067
38459
|
function extractTitle2(children) {
|
|
38068
|
-
if (!
|
|
38460
|
+
if (!React80__default.isValidElement(children)) return void 0;
|
|
38069
38461
|
const props = children.props;
|
|
38070
38462
|
if (typeof props.title === "string") {
|
|
38071
38463
|
return props.title;
|
|
@@ -38778,7 +39170,7 @@ var init_PageHeader = __esm({
|
|
|
38778
39170
|
info: "bg-info/10 text-info"
|
|
38779
39171
|
};
|
|
38780
39172
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38781
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
39173
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
38782
39174
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38783
39175
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38784
39176
|
"a",
|
|
@@ -39038,14 +39430,14 @@ function getAllTraits() {
|
|
|
39038
39430
|
return Array.from(traits.values());
|
|
39039
39431
|
}
|
|
39040
39432
|
function subscribeToTraitChanges(listener) {
|
|
39041
|
-
|
|
39042
|
-
return () =>
|
|
39433
|
+
listeners2.add(listener);
|
|
39434
|
+
return () => listeners2.delete(listener);
|
|
39043
39435
|
}
|
|
39044
|
-
var traits,
|
|
39436
|
+
var traits, listeners2;
|
|
39045
39437
|
var init_traitRegistry = __esm({
|
|
39046
39438
|
"lib/traitRegistry.ts"() {
|
|
39047
39439
|
traits = /* @__PURE__ */ new Map();
|
|
39048
|
-
|
|
39440
|
+
listeners2 = /* @__PURE__ */ new Set();
|
|
39049
39441
|
}
|
|
39050
39442
|
});
|
|
39051
39443
|
|
|
@@ -39054,14 +39446,14 @@ function getAllTicks() {
|
|
|
39054
39446
|
return Array.from(ticks.values());
|
|
39055
39447
|
}
|
|
39056
39448
|
function subscribeToTickChanges(listener) {
|
|
39057
|
-
|
|
39058
|
-
return () =>
|
|
39449
|
+
listeners3.add(listener);
|
|
39450
|
+
return () => listeners3.delete(listener);
|
|
39059
39451
|
}
|
|
39060
|
-
var ticks,
|
|
39452
|
+
var ticks, listeners3;
|
|
39061
39453
|
var init_tickRegistry = __esm({
|
|
39062
39454
|
"lib/tickRegistry.ts"() {
|
|
39063
39455
|
ticks = /* @__PURE__ */ new Map();
|
|
39064
|
-
|
|
39456
|
+
listeners3 = /* @__PURE__ */ new Set();
|
|
39065
39457
|
}
|
|
39066
39458
|
});
|
|
39067
39459
|
|
|
@@ -39070,14 +39462,14 @@ function getGuardHistory() {
|
|
|
39070
39462
|
return [...guardHistory];
|
|
39071
39463
|
}
|
|
39072
39464
|
function subscribeToGuardChanges(listener) {
|
|
39073
|
-
|
|
39074
|
-
return () =>
|
|
39465
|
+
listeners4.add(listener);
|
|
39466
|
+
return () => listeners4.delete(listener);
|
|
39075
39467
|
}
|
|
39076
|
-
var guardHistory,
|
|
39468
|
+
var guardHistory, listeners4;
|
|
39077
39469
|
var init_guardRegistry = __esm({
|
|
39078
39470
|
"lib/guardRegistry.ts"() {
|
|
39079
39471
|
guardHistory = [];
|
|
39080
|
-
|
|
39472
|
+
listeners4 = /* @__PURE__ */ new Set();
|
|
39081
39473
|
}
|
|
39082
39474
|
});
|
|
39083
39475
|
|
|
@@ -39108,18 +39500,18 @@ function getDebugEvents() {
|
|
|
39108
39500
|
return [...events];
|
|
39109
39501
|
}
|
|
39110
39502
|
function subscribeToDebugEvents(listener) {
|
|
39111
|
-
|
|
39112
|
-
return () =>
|
|
39503
|
+
listeners5.add(listener);
|
|
39504
|
+
return () => listeners5.delete(listener);
|
|
39113
39505
|
}
|
|
39114
|
-
var events,
|
|
39506
|
+
var events, listeners5;
|
|
39115
39507
|
var init_debugRegistry = __esm({
|
|
39116
39508
|
"lib/debugRegistry.ts"() {
|
|
39117
39509
|
events = [];
|
|
39118
|
-
|
|
39510
|
+
listeners5 = /* @__PURE__ */ new Set();
|
|
39119
39511
|
}
|
|
39120
39512
|
});
|
|
39121
39513
|
function useDebugData() {
|
|
39122
|
-
const [data, setData] =
|
|
39514
|
+
const [data, setData] = React80.useState(() => ({
|
|
39123
39515
|
traits: [],
|
|
39124
39516
|
ticks: [],
|
|
39125
39517
|
guards: [],
|
|
@@ -39133,7 +39525,7 @@ function useDebugData() {
|
|
|
39133
39525
|
},
|
|
39134
39526
|
lastUpdate: Date.now()
|
|
39135
39527
|
}));
|
|
39136
|
-
|
|
39528
|
+
React80.useEffect(() => {
|
|
39137
39529
|
const updateData = () => {
|
|
39138
39530
|
setData({
|
|
39139
39531
|
traits: getAllTraits(),
|
|
@@ -39192,14 +39584,14 @@ function isDebugEnabled2() {
|
|
|
39192
39584
|
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
39193
39585
|
}
|
|
39194
39586
|
function onDebugToggle(listener) {
|
|
39195
|
-
|
|
39196
|
-
return () =>
|
|
39587
|
+
listeners6.add(listener);
|
|
39588
|
+
return () => listeners6.delete(listener);
|
|
39197
39589
|
}
|
|
39198
|
-
var DEBUG_STORAGE_KEY,
|
|
39590
|
+
var DEBUG_STORAGE_KEY, listeners6;
|
|
39199
39591
|
var init_debugUtils = __esm({
|
|
39200
39592
|
"lib/debugUtils.ts"() {
|
|
39201
39593
|
DEBUG_STORAGE_KEY = "orbital-debug";
|
|
39202
|
-
|
|
39594
|
+
listeners6 = /* @__PURE__ */ new Set();
|
|
39203
39595
|
}
|
|
39204
39596
|
});
|
|
39205
39597
|
function layoutGraph(states, transitions, initialState, width, height) {
|
|
@@ -39242,12 +39634,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39242
39634
|
return positions;
|
|
39243
39635
|
}
|
|
39244
39636
|
function WalkMinimap() {
|
|
39245
|
-
const [walkStep, setWalkStep] =
|
|
39246
|
-
const [traits2, setTraits] =
|
|
39247
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39248
|
-
const [completedTraits, setCompletedTraits] =
|
|
39249
|
-
const prevTraitRef =
|
|
39250
|
-
|
|
39637
|
+
const [walkStep, setWalkStep] = React80.useState(null);
|
|
39638
|
+
const [traits2, setTraits] = React80.useState([]);
|
|
39639
|
+
const [coveredEdges, setCoveredEdges] = React80.useState([]);
|
|
39640
|
+
const [completedTraits, setCompletedTraits] = React80.useState(/* @__PURE__ */ new Set());
|
|
39641
|
+
const prevTraitRef = React80.useRef(null);
|
|
39642
|
+
React80.useEffect(() => {
|
|
39251
39643
|
const interval = setInterval(() => {
|
|
39252
39644
|
const w = window;
|
|
39253
39645
|
const step = w.__orbitalWalkStep;
|
|
@@ -39694,15 +40086,15 @@ var init_EntitiesTab = __esm({
|
|
|
39694
40086
|
}
|
|
39695
40087
|
});
|
|
39696
40088
|
function EventFlowTab({ events: events2 }) {
|
|
39697
|
-
const [filter, setFilter] =
|
|
39698
|
-
const containerRef =
|
|
39699
|
-
const [autoScroll, setAutoScroll] =
|
|
39700
|
-
|
|
40089
|
+
const [filter, setFilter] = React80.useState("all");
|
|
40090
|
+
const containerRef = React80.useRef(null);
|
|
40091
|
+
const [autoScroll, setAutoScroll] = React80.useState(true);
|
|
40092
|
+
React80.useEffect(() => {
|
|
39701
40093
|
if (autoScroll && containerRef.current) {
|
|
39702
40094
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39703
40095
|
}
|
|
39704
40096
|
}, [events2.length, autoScroll]);
|
|
39705
|
-
const filteredEvents =
|
|
40097
|
+
const filteredEvents = React80.useMemo(() => {
|
|
39706
40098
|
if (filter === "all") return events2;
|
|
39707
40099
|
return events2.filter((e) => e.type === filter);
|
|
39708
40100
|
}, [events2, filter]);
|
|
@@ -39821,7 +40213,7 @@ var init_EventFlowTab = __esm({
|
|
|
39821
40213
|
}
|
|
39822
40214
|
});
|
|
39823
40215
|
function GuardsPanel({ guards }) {
|
|
39824
|
-
const [filter, setFilter] =
|
|
40216
|
+
const [filter, setFilter] = React80.useState("all");
|
|
39825
40217
|
if (guards.length === 0) {
|
|
39826
40218
|
return /* @__PURE__ */ jsx(
|
|
39827
40219
|
EmptyState,
|
|
@@ -39834,7 +40226,7 @@ function GuardsPanel({ guards }) {
|
|
|
39834
40226
|
}
|
|
39835
40227
|
const passedCount = guards.filter((g) => g.result).length;
|
|
39836
40228
|
const failedCount = guards.length - passedCount;
|
|
39837
|
-
const filteredGuards =
|
|
40229
|
+
const filteredGuards = React80.useMemo(() => {
|
|
39838
40230
|
if (filter === "all") return guards;
|
|
39839
40231
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
39840
40232
|
return guards.filter((g) => !g.result);
|
|
@@ -39995,10 +40387,10 @@ function EffectBadge({ effect }) {
|
|
|
39995
40387
|
] });
|
|
39996
40388
|
}
|
|
39997
40389
|
function TransitionTimeline({ transitions }) {
|
|
39998
|
-
const containerRef =
|
|
39999
|
-
const [autoScroll, setAutoScroll] =
|
|
40000
|
-
const [expandedId, setExpandedId] =
|
|
40001
|
-
|
|
40390
|
+
const containerRef = React80.useRef(null);
|
|
40391
|
+
const [autoScroll, setAutoScroll] = React80.useState(true);
|
|
40392
|
+
const [expandedId, setExpandedId] = React80.useState(null);
|
|
40393
|
+
React80.useEffect(() => {
|
|
40002
40394
|
if (autoScroll && containerRef.current) {
|
|
40003
40395
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40004
40396
|
}
|
|
@@ -40284,9 +40676,9 @@ function getAllEvents(traits2) {
|
|
|
40284
40676
|
}
|
|
40285
40677
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40286
40678
|
const eventBus = useEventBus();
|
|
40287
|
-
const [log18, setLog] =
|
|
40288
|
-
const prevStatesRef =
|
|
40289
|
-
|
|
40679
|
+
const [log18, setLog] = React80.useState([]);
|
|
40680
|
+
const prevStatesRef = React80.useRef(/* @__PURE__ */ new Map());
|
|
40681
|
+
React80.useEffect(() => {
|
|
40290
40682
|
for (const trait of traits2) {
|
|
40291
40683
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40292
40684
|
if (prev && prev !== trait.currentState) {
|
|
@@ -40456,10 +40848,10 @@ function VerifyModePanel({
|
|
|
40456
40848
|
serverCount,
|
|
40457
40849
|
localCount
|
|
40458
40850
|
}) {
|
|
40459
|
-
const [expanded, setExpanded] =
|
|
40460
|
-
const scrollRef =
|
|
40461
|
-
const prevCountRef =
|
|
40462
|
-
|
|
40851
|
+
const [expanded, setExpanded] = React80.useState(true);
|
|
40852
|
+
const scrollRef = React80.useRef(null);
|
|
40853
|
+
const prevCountRef = React80.useRef(0);
|
|
40854
|
+
React80.useEffect(() => {
|
|
40463
40855
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
40464
40856
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
40465
40857
|
}
|
|
@@ -40525,10 +40917,10 @@ function RuntimeDebugger({
|
|
|
40525
40917
|
defaultTab,
|
|
40526
40918
|
schema
|
|
40527
40919
|
}) {
|
|
40528
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40529
|
-
const [isVisible, setIsVisible] =
|
|
40920
|
+
const [isCollapsed, setIsCollapsed] = React80.useState(mode === "verify" ? true : defaultCollapsed);
|
|
40921
|
+
const [isVisible, setIsVisible] = React80.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40530
40922
|
const debugData = useDebugData();
|
|
40531
|
-
|
|
40923
|
+
React80.useEffect(() => {
|
|
40532
40924
|
if (mode === "inline") return;
|
|
40533
40925
|
return onDebugToggle((enabled) => {
|
|
40534
40926
|
setIsVisible(enabled);
|
|
@@ -40537,7 +40929,7 @@ function RuntimeDebugger({
|
|
|
40537
40929
|
}
|
|
40538
40930
|
});
|
|
40539
40931
|
}, [mode]);
|
|
40540
|
-
|
|
40932
|
+
React80.useEffect(() => {
|
|
40541
40933
|
if (mode === "inline") return;
|
|
40542
40934
|
const handleKeyDown = (e) => {
|
|
40543
40935
|
if (e.key === "`" && isVisible) {
|
|
@@ -41086,7 +41478,7 @@ function SequenceBar({
|
|
|
41086
41478
|
onSlotRemove(index);
|
|
41087
41479
|
}, [onSlotRemove, playing]);
|
|
41088
41480
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41089
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
41481
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
41090
41482
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41091
41483
|
Typography,
|
|
41092
41484
|
{
|
|
@@ -42599,7 +42991,7 @@ var init_StatCard = __esm({
|
|
|
42599
42991
|
const labelToUse = propLabel ?? propTitle;
|
|
42600
42992
|
const eventBus = useEventBus();
|
|
42601
42993
|
const { t } = useTranslate();
|
|
42602
|
-
const handleActionClick =
|
|
42994
|
+
const handleActionClick = React80__default.useCallback(() => {
|
|
42603
42995
|
if (action?.event) {
|
|
42604
42996
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42605
42997
|
}
|
|
@@ -42610,7 +43002,7 @@ var init_StatCard = __esm({
|
|
|
42610
43002
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42611
43003
|
const isLoading = externalLoading ?? false;
|
|
42612
43004
|
const error = externalError;
|
|
42613
|
-
const computeMetricValue =
|
|
43005
|
+
const computeMetricValue = React80__default.useCallback(
|
|
42614
43006
|
(metric, items) => {
|
|
42615
43007
|
if (metric.value !== void 0) {
|
|
42616
43008
|
return metric.value;
|
|
@@ -42649,7 +43041,7 @@ var init_StatCard = __esm({
|
|
|
42649
43041
|
},
|
|
42650
43042
|
[]
|
|
42651
43043
|
);
|
|
42652
|
-
const schemaStats =
|
|
43044
|
+
const schemaStats = React80__default.useMemo(() => {
|
|
42653
43045
|
if (!metrics || metrics.length === 0) return null;
|
|
42654
43046
|
return metrics.map((metric) => ({
|
|
42655
43047
|
label: metric.label,
|
|
@@ -42657,7 +43049,7 @@ var init_StatCard = __esm({
|
|
|
42657
43049
|
format: metric.format
|
|
42658
43050
|
}));
|
|
42659
43051
|
}, [metrics, data, computeMetricValue]);
|
|
42660
|
-
const calculatedTrend =
|
|
43052
|
+
const calculatedTrend = React80__default.useMemo(() => {
|
|
42661
43053
|
if (manualTrend !== void 0) return manualTrend;
|
|
42662
43054
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42663
43055
|
return void 0;
|
|
@@ -43839,7 +44231,7 @@ var init_Timeline = __esm({
|
|
|
43839
44231
|
}) => {
|
|
43840
44232
|
const { t } = useTranslate();
|
|
43841
44233
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43842
|
-
const items =
|
|
44234
|
+
const items = React80__default.useMemo(() => {
|
|
43843
44235
|
if (propItems) return propItems;
|
|
43844
44236
|
if (entityData.length === 0) return [];
|
|
43845
44237
|
return entityData.map((record, idx) => {
|
|
@@ -43996,7 +44388,7 @@ var init_TimerDisplay = __esm({
|
|
|
43996
44388
|
}
|
|
43997
44389
|
});
|
|
43998
44390
|
function extractToastProps(children) {
|
|
43999
|
-
if (!
|
|
44391
|
+
if (!React80__default.isValidElement(children)) {
|
|
44000
44392
|
if (typeof children === "string") {
|
|
44001
44393
|
return { message: children };
|
|
44002
44394
|
}
|
|
@@ -44034,7 +44426,7 @@ var init_ToastSlot = __esm({
|
|
|
44034
44426
|
eventBus.emit("UI:CLOSE");
|
|
44035
44427
|
};
|
|
44036
44428
|
if (!isVisible) return null;
|
|
44037
|
-
const isCustomContent =
|
|
44429
|
+
const isCustomContent = React80__default.isValidElement(children) && !message;
|
|
44038
44430
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44039
44431
|
Toast,
|
|
44040
44432
|
{
|
|
@@ -44303,7 +44695,7 @@ var init_WizardContainer = __esm({
|
|
|
44303
44695
|
const isCompleted = index < currentStep;
|
|
44304
44696
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44305
44697
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44306
|
-
return /* @__PURE__ */ jsxs(
|
|
44698
|
+
return /* @__PURE__ */ jsxs(React80__default.Fragment, { children: [
|
|
44307
44699
|
/* @__PURE__ */ jsx(
|
|
44308
44700
|
Button,
|
|
44309
44701
|
{
|
|
@@ -44753,12 +45145,12 @@ var init_XPBar = __esm({
|
|
|
44753
45145
|
}
|
|
44754
45146
|
});
|
|
44755
45147
|
function lazyThree(name, loader) {
|
|
44756
|
-
const Lazy =
|
|
45148
|
+
const Lazy = React80__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44757
45149
|
function ThreeWrapper(props) {
|
|
44758
|
-
return
|
|
44759
|
-
|
|
45150
|
+
return React80__default.createElement(
|
|
45151
|
+
React80__default.Suspense,
|
|
44760
45152
|
{ fallback: null },
|
|
44761
|
-
|
|
45153
|
+
React80__default.createElement(Lazy, props)
|
|
44762
45154
|
);
|
|
44763
45155
|
}
|
|
44764
45156
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -45374,7 +45766,7 @@ function SuspenseConfigProvider({
|
|
|
45374
45766
|
config,
|
|
45375
45767
|
children
|
|
45376
45768
|
}) {
|
|
45377
|
-
return
|
|
45769
|
+
return React80__default.createElement(
|
|
45378
45770
|
SuspenseConfigContext.Provider,
|
|
45379
45771
|
{ value: config },
|
|
45380
45772
|
children
|
|
@@ -45857,7 +46249,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45857
46249
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45858
46250
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45859
46251
|
}
|
|
45860
|
-
return /* @__PURE__ */ jsx(
|
|
46252
|
+
return /* @__PURE__ */ jsx(React80__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45861
46253
|
}
|
|
45862
46254
|
if (!child || typeof child !== "object") return null;
|
|
45863
46255
|
const childId = `${parentId}-${index}`;
|
|
@@ -45894,14 +46286,14 @@ function isPatternConfig(value) {
|
|
|
45894
46286
|
if (value === null || value === void 0) return false;
|
|
45895
46287
|
if (typeof value !== "object") return false;
|
|
45896
46288
|
if (Array.isArray(value)) return false;
|
|
45897
|
-
if (
|
|
46289
|
+
if (React80__default.isValidElement(value)) return false;
|
|
45898
46290
|
if (value instanceof Date) return false;
|
|
45899
46291
|
if (typeof value === "function") return false;
|
|
45900
46292
|
const record = value;
|
|
45901
46293
|
return "type" in record && typeof record.type === "string";
|
|
45902
46294
|
}
|
|
45903
46295
|
function isPlainConfigObject(value) {
|
|
45904
|
-
if (
|
|
46296
|
+
if (React80__default.isValidElement(value)) return false;
|
|
45905
46297
|
if (value instanceof Date) return false;
|
|
45906
46298
|
const proto = Object.getPrototypeOf(value);
|
|
45907
46299
|
return proto === Object.prototype || proto === null;
|
|
@@ -46349,7 +46741,7 @@ var FormSection = ({
|
|
|
46349
46741
|
columns = 1,
|
|
46350
46742
|
className
|
|
46351
46743
|
}) => {
|
|
46352
|
-
const [collapsed, setCollapsed] =
|
|
46744
|
+
const [collapsed, setCollapsed] = React80__default.useState(defaultCollapsed);
|
|
46353
46745
|
const { t } = useTranslate();
|
|
46354
46746
|
const eventBus = useEventBus();
|
|
46355
46747
|
const gridClass = {
|
|
@@ -46357,7 +46749,7 @@ var FormSection = ({
|
|
|
46357
46749
|
2: "grid-cols-1 md:grid-cols-2",
|
|
46358
46750
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
46359
46751
|
}[columns];
|
|
46360
|
-
|
|
46752
|
+
React80__default.useCallback(() => {
|
|
46361
46753
|
if (collapsible) {
|
|
46362
46754
|
setCollapsed((prev) => !prev);
|
|
46363
46755
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -48891,14 +49283,14 @@ init_useQuerySingleton();
|
|
|
48891
49283
|
|
|
48892
49284
|
// stores/entityStore.ts
|
|
48893
49285
|
var entities = /* @__PURE__ */ new Map();
|
|
48894
|
-
var
|
|
49286
|
+
var listeners7 = /* @__PURE__ */ new Set();
|
|
48895
49287
|
var idCounter2 = 0;
|
|
48896
49288
|
function subscribe(listener) {
|
|
48897
|
-
|
|
48898
|
-
return () =>
|
|
49289
|
+
listeners7.add(listener);
|
|
49290
|
+
return () => listeners7.delete(listener);
|
|
48899
49291
|
}
|
|
48900
49292
|
function notify() {
|
|
48901
|
-
|
|
49293
|
+
listeners7.forEach((listener) => listener());
|
|
48902
49294
|
}
|
|
48903
49295
|
function getEntity(id) {
|
|
48904
49296
|
return entities.get(id);
|