@almadar/ui 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +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/index.css +5 -0
package/dist/runtime/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React85 from 'react';
|
|
2
|
+
import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
-
import * as
|
|
9
|
-
import {
|
|
8
|
+
import * as LucideIcons2 from 'lucide-react';
|
|
9
|
+
import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Check, Copy, AlertTriangle, Trash2, ZoomOut, ZoomIn, Download, RotateCcw, Menu as Menu$1, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, ArrowLeft, HelpCircle, Search, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Minus, Eraser, TrendingUp, TrendingDown, ArrowUp, ArrowDown, MoreVertical, AlertCircle, Circle, Clock, CheckCircle2, CheckCircle, XCircle, Play, Pause, SkipForward, Bug, Send, ChevronUp, ChevronDown, Wrench, 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 { useUISlots, UISlotProvider } from '@almadar/ui/context';
|
|
12
15
|
import { createPortal } from 'react-dom';
|
|
@@ -888,7 +891,7 @@ var init_Box = __esm({
|
|
|
888
891
|
fixed: "fixed",
|
|
889
892
|
sticky: "sticky"
|
|
890
893
|
};
|
|
891
|
-
Box =
|
|
894
|
+
Box = React85__default.forwardRef(
|
|
892
895
|
({
|
|
893
896
|
padding,
|
|
894
897
|
paddingX,
|
|
@@ -938,7 +941,7 @@ var init_Box = __esm({
|
|
|
938
941
|
onMouseLeave?.(e);
|
|
939
942
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
940
943
|
const isClickable = action || onClick;
|
|
941
|
-
return
|
|
944
|
+
return React85__default.createElement(
|
|
942
945
|
Component,
|
|
943
946
|
{
|
|
944
947
|
ref,
|
|
@@ -974,12 +977,378 @@ var init_Box = __esm({
|
|
|
974
977
|
Box.displayName = "Box";
|
|
975
978
|
}
|
|
976
979
|
});
|
|
980
|
+
function getCurrentIconFamily() {
|
|
981
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
982
|
+
return DEFAULT_FAMILY;
|
|
983
|
+
}
|
|
984
|
+
const raw = getComputedStyle(document.documentElement).getPropertyValue("--icon-family").trim().replace(/^["']|["']$/g, "");
|
|
985
|
+
return VALID_FAMILIES.includes(raw) ? raw : DEFAULT_FAMILY;
|
|
986
|
+
}
|
|
987
|
+
function ensureObserver() {
|
|
988
|
+
if (typeof window === "undefined" || observer) return;
|
|
989
|
+
observer = new MutationObserver(() => {
|
|
990
|
+
const next = getCurrentIconFamily();
|
|
991
|
+
if (next !== cachedFamily) {
|
|
992
|
+
cachedFamily = next;
|
|
993
|
+
listeners.forEach((fn) => fn());
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
observer.observe(document.documentElement, {
|
|
997
|
+
attributes: true,
|
|
998
|
+
attributeFilter: ["data-theme", "style"]
|
|
999
|
+
});
|
|
1000
|
+
cachedFamily = getCurrentIconFamily();
|
|
1001
|
+
}
|
|
1002
|
+
function subscribeIconFamily(notify) {
|
|
1003
|
+
ensureObserver();
|
|
1004
|
+
listeners.add(notify);
|
|
1005
|
+
return () => {
|
|
1006
|
+
listeners.delete(notify);
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
function getIconFamilySnapshot() {
|
|
1010
|
+
if (cachedFamily !== null) return cachedFamily;
|
|
1011
|
+
cachedFamily = getCurrentIconFamily();
|
|
1012
|
+
return cachedFamily;
|
|
1013
|
+
}
|
|
1014
|
+
function getIconFamilyServerSnapshot() {
|
|
1015
|
+
return DEFAULT_FAMILY;
|
|
1016
|
+
}
|
|
1017
|
+
function useIconFamily() {
|
|
1018
|
+
return useSyncExternalStore(
|
|
1019
|
+
subscribeIconFamily,
|
|
1020
|
+
getIconFamilySnapshot,
|
|
1021
|
+
getIconFamilyServerSnapshot
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
977
1024
|
function kebabToPascal(name) {
|
|
978
1025
|
return name.split("-").map((part) => {
|
|
979
1026
|
if (/^\d+$/.test(part)) return part;
|
|
980
1027
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
981
1028
|
}).join("");
|
|
982
1029
|
}
|
|
1030
|
+
function resolveLucide(name) {
|
|
1031
|
+
if (lucideAliases[name]) return lucideAliases[name];
|
|
1032
|
+
const pascal = kebabToPascal(name);
|
|
1033
|
+
const lucideMap = LucideIcons2;
|
|
1034
|
+
const direct = lucideMap[pascal];
|
|
1035
|
+
if (direct && typeof direct === "object") return direct;
|
|
1036
|
+
const asIs = lucideMap[name];
|
|
1037
|
+
if (asIs && typeof asIs === "object") return asIs;
|
|
1038
|
+
return LucideIcons2.HelpCircle;
|
|
1039
|
+
}
|
|
1040
|
+
function resolvePhosphor(name, weight) {
|
|
1041
|
+
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
1042
|
+
const map = PhosphorIcons;
|
|
1043
|
+
const PhosphorComp = map[target];
|
|
1044
|
+
if (!PhosphorComp || typeof PhosphorComp !== "object") return null;
|
|
1045
|
+
const Component = PhosphorComp;
|
|
1046
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1047
|
+
Component,
|
|
1048
|
+
{
|
|
1049
|
+
weight,
|
|
1050
|
+
className: props.className,
|
|
1051
|
+
style: props.style,
|
|
1052
|
+
size: props.size ?? "1em"
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
1056
|
+
return Adapter;
|
|
1057
|
+
}
|
|
1058
|
+
function resolveTabler(name) {
|
|
1059
|
+
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
1060
|
+
const target = `Icon${suffix}`;
|
|
1061
|
+
const map = TablerIcons;
|
|
1062
|
+
const TablerComp = map[target];
|
|
1063
|
+
if (!TablerComp || typeof TablerComp !== "object") return null;
|
|
1064
|
+
const Component = TablerComp;
|
|
1065
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1066
|
+
Component,
|
|
1067
|
+
{
|
|
1068
|
+
stroke: props.strokeWidth ?? 1.5,
|
|
1069
|
+
className: props.className,
|
|
1070
|
+
style: props.style,
|
|
1071
|
+
size: props.size ?? 24
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
Adapter.displayName = `Tabler.${target}`;
|
|
1075
|
+
return Adapter;
|
|
1076
|
+
}
|
|
1077
|
+
function resolveFa(name) {
|
|
1078
|
+
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
1079
|
+
const target = `Fa${suffix}`;
|
|
1080
|
+
const map = FaIcons;
|
|
1081
|
+
const FaComp = map[target];
|
|
1082
|
+
if (!FaComp || typeof FaComp !== "function") return null;
|
|
1083
|
+
const Component = FaComp;
|
|
1084
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1085
|
+
Component,
|
|
1086
|
+
{
|
|
1087
|
+
className: props.className,
|
|
1088
|
+
style: props.style,
|
|
1089
|
+
size: props.size ?? "1em"
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
Adapter.displayName = `Fa.${target}`;
|
|
1093
|
+
return Adapter;
|
|
1094
|
+
}
|
|
1095
|
+
function warnFallback(name, family) {
|
|
1096
|
+
const key = `${family}::${name}`;
|
|
1097
|
+
if (warned.has(key)) return;
|
|
1098
|
+
warned.add(key);
|
|
1099
|
+
if (typeof console !== "undefined") {
|
|
1100
|
+
console.warn(
|
|
1101
|
+
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
1102
|
+
);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
function makeLucideAdapter(name) {
|
|
1106
|
+
const LucideComp = resolveLucide(name);
|
|
1107
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
1108
|
+
LucideComp,
|
|
1109
|
+
{
|
|
1110
|
+
className: props.className,
|
|
1111
|
+
strokeWidth: props.strokeWidth,
|
|
1112
|
+
style: props.style,
|
|
1113
|
+
size: props.size
|
|
1114
|
+
}
|
|
1115
|
+
);
|
|
1116
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
1117
|
+
return Adapter;
|
|
1118
|
+
}
|
|
1119
|
+
function resolveIconForFamily(name, family) {
|
|
1120
|
+
switch (family) {
|
|
1121
|
+
case "lucide":
|
|
1122
|
+
return makeLucideAdapter(name);
|
|
1123
|
+
case "phosphor-outline": {
|
|
1124
|
+
const p2 = resolvePhosphor(name, "regular");
|
|
1125
|
+
if (p2) return p2;
|
|
1126
|
+
warnFallback(name, family);
|
|
1127
|
+
return makeLucideAdapter(name);
|
|
1128
|
+
}
|
|
1129
|
+
case "phosphor-fill": {
|
|
1130
|
+
const p2 = resolvePhosphor(name, "fill");
|
|
1131
|
+
if (p2) return p2;
|
|
1132
|
+
warnFallback(name, family);
|
|
1133
|
+
return makeLucideAdapter(name);
|
|
1134
|
+
}
|
|
1135
|
+
case "phosphor-duotone": {
|
|
1136
|
+
const p2 = resolvePhosphor(name, "duotone");
|
|
1137
|
+
if (p2) return p2;
|
|
1138
|
+
warnFallback(name, family);
|
|
1139
|
+
return makeLucideAdapter(name);
|
|
1140
|
+
}
|
|
1141
|
+
case "tabler": {
|
|
1142
|
+
const t = resolveTabler(name);
|
|
1143
|
+
if (t) return t;
|
|
1144
|
+
warnFallback(name, family);
|
|
1145
|
+
return makeLucideAdapter(name);
|
|
1146
|
+
}
|
|
1147
|
+
case "fa-solid": {
|
|
1148
|
+
const f3 = resolveFa(name);
|
|
1149
|
+
if (f3) return f3;
|
|
1150
|
+
warnFallback(name, family);
|
|
1151
|
+
return makeLucideAdapter(name);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
1156
|
+
var init_iconFamily = __esm({
|
|
1157
|
+
"lib/iconFamily.tsx"() {
|
|
1158
|
+
"use client";
|
|
1159
|
+
DEFAULT_FAMILY = "lucide";
|
|
1160
|
+
VALID_FAMILIES = [
|
|
1161
|
+
"lucide",
|
|
1162
|
+
"phosphor-outline",
|
|
1163
|
+
"phosphor-fill",
|
|
1164
|
+
"phosphor-duotone",
|
|
1165
|
+
"tabler",
|
|
1166
|
+
"fa-solid"
|
|
1167
|
+
];
|
|
1168
|
+
cachedFamily = null;
|
|
1169
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1170
|
+
observer = null;
|
|
1171
|
+
lucideAliases = {
|
|
1172
|
+
close: LucideIcons2.X,
|
|
1173
|
+
trash: LucideIcons2.Trash2,
|
|
1174
|
+
loader: LucideIcons2.Loader2,
|
|
1175
|
+
stop: LucideIcons2.Square,
|
|
1176
|
+
volume: LucideIcons2.Volume2,
|
|
1177
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
1178
|
+
refresh: LucideIcons2.RefreshCw,
|
|
1179
|
+
share: LucideIcons2.Share2,
|
|
1180
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
1181
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
1182
|
+
};
|
|
1183
|
+
phosphorAliases = {
|
|
1184
|
+
// lucide name → phosphor PascalCase name
|
|
1185
|
+
search: "MagnifyingGlass",
|
|
1186
|
+
close: "X",
|
|
1187
|
+
loader: "CircleNotch",
|
|
1188
|
+
refresh: "ArrowsClockwise",
|
|
1189
|
+
"sort-asc": "SortAscending",
|
|
1190
|
+
"sort-desc": "SortDescending",
|
|
1191
|
+
"chevron-down": "CaretDown",
|
|
1192
|
+
"chevron-up": "CaretUp",
|
|
1193
|
+
"chevron-left": "CaretLeft",
|
|
1194
|
+
"chevron-right": "CaretRight",
|
|
1195
|
+
"help-circle": "Question",
|
|
1196
|
+
"alert-triangle": "Warning",
|
|
1197
|
+
"alert-circle": "WarningCircle",
|
|
1198
|
+
"check-circle": "CheckCircle",
|
|
1199
|
+
"x-circle": "XCircle",
|
|
1200
|
+
edit: "PencilSimple",
|
|
1201
|
+
pencil: "PencilSimple",
|
|
1202
|
+
trash: "Trash",
|
|
1203
|
+
send: "PaperPlaneRight",
|
|
1204
|
+
external: "ArrowSquareOut",
|
|
1205
|
+
"external-link": "ArrowSquareOut",
|
|
1206
|
+
plus: "Plus",
|
|
1207
|
+
minus: "Minus",
|
|
1208
|
+
x: "X",
|
|
1209
|
+
check: "Check",
|
|
1210
|
+
star: "Star",
|
|
1211
|
+
heart: "Heart",
|
|
1212
|
+
home: "House",
|
|
1213
|
+
user: "User",
|
|
1214
|
+
users: "Users",
|
|
1215
|
+
settings: "Gear",
|
|
1216
|
+
menu: "List",
|
|
1217
|
+
"arrow-up": "ArrowUp",
|
|
1218
|
+
"arrow-down": "ArrowDown",
|
|
1219
|
+
"arrow-left": "ArrowLeft",
|
|
1220
|
+
"arrow-right": "ArrowRight",
|
|
1221
|
+
copy: "Copy",
|
|
1222
|
+
download: "DownloadSimple",
|
|
1223
|
+
upload: "UploadSimple",
|
|
1224
|
+
filter: "Funnel",
|
|
1225
|
+
calendar: "Calendar",
|
|
1226
|
+
clock: "Clock",
|
|
1227
|
+
bell: "Bell",
|
|
1228
|
+
mail: "Envelope",
|
|
1229
|
+
envelope: "Envelope",
|
|
1230
|
+
lock: "Lock",
|
|
1231
|
+
unlock: "LockOpen",
|
|
1232
|
+
eye: "Eye",
|
|
1233
|
+
"eye-off": "EyeSlash",
|
|
1234
|
+
more: "DotsThree",
|
|
1235
|
+
"more-vertical": "DotsThreeVertical",
|
|
1236
|
+
info: "Info",
|
|
1237
|
+
warning: "Warning",
|
|
1238
|
+
error: "WarningCircle"
|
|
1239
|
+
};
|
|
1240
|
+
tablerAliases = {
|
|
1241
|
+
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
1242
|
+
search: "Search",
|
|
1243
|
+
close: "X",
|
|
1244
|
+
loader: "Loader2",
|
|
1245
|
+
refresh: "Refresh",
|
|
1246
|
+
"sort-asc": "SortAscending",
|
|
1247
|
+
"sort-desc": "SortDescending",
|
|
1248
|
+
"chevron-down": "ChevronDown",
|
|
1249
|
+
"chevron-up": "ChevronUp",
|
|
1250
|
+
"chevron-left": "ChevronLeft",
|
|
1251
|
+
"chevron-right": "ChevronRight",
|
|
1252
|
+
"help-circle": "HelpCircle",
|
|
1253
|
+
"alert-triangle": "AlertTriangle",
|
|
1254
|
+
"alert-circle": "AlertCircle",
|
|
1255
|
+
"check-circle": "CircleCheck",
|
|
1256
|
+
"x-circle": "CircleX",
|
|
1257
|
+
edit: "Pencil",
|
|
1258
|
+
trash: "Trash",
|
|
1259
|
+
send: "Send",
|
|
1260
|
+
external: "ExternalLink",
|
|
1261
|
+
plus: "Plus",
|
|
1262
|
+
x: "X",
|
|
1263
|
+
check: "Check",
|
|
1264
|
+
star: "Star",
|
|
1265
|
+
heart: "Heart",
|
|
1266
|
+
home: "Home",
|
|
1267
|
+
user: "User",
|
|
1268
|
+
users: "Users",
|
|
1269
|
+
settings: "Settings",
|
|
1270
|
+
menu: "Menu2",
|
|
1271
|
+
copy: "Copy",
|
|
1272
|
+
download: "Download",
|
|
1273
|
+
upload: "Upload",
|
|
1274
|
+
filter: "Filter",
|
|
1275
|
+
calendar: "Calendar",
|
|
1276
|
+
clock: "Clock",
|
|
1277
|
+
bell: "Bell",
|
|
1278
|
+
mail: "Mail",
|
|
1279
|
+
envelope: "Mail",
|
|
1280
|
+
lock: "Lock",
|
|
1281
|
+
unlock: "LockOpen",
|
|
1282
|
+
eye: "Eye",
|
|
1283
|
+
"eye-off": "EyeOff",
|
|
1284
|
+
more: "Dots",
|
|
1285
|
+
"more-vertical": "DotsVertical",
|
|
1286
|
+
info: "InfoCircle"
|
|
1287
|
+
};
|
|
1288
|
+
faAliases = {
|
|
1289
|
+
// lucide name → fa-solid suffix (after the `Fa` prefix)
|
|
1290
|
+
search: "Search",
|
|
1291
|
+
close: "Times",
|
|
1292
|
+
x: "Times",
|
|
1293
|
+
loader: "Spinner",
|
|
1294
|
+
refresh: "Sync",
|
|
1295
|
+
"sort-asc": "SortAmountUp",
|
|
1296
|
+
"sort-desc": "SortAmountDown",
|
|
1297
|
+
"chevron-down": "ChevronDown",
|
|
1298
|
+
"chevron-up": "ChevronUp",
|
|
1299
|
+
"chevron-left": "ChevronLeft",
|
|
1300
|
+
"chevron-right": "ChevronRight",
|
|
1301
|
+
"help-circle": "QuestionCircle",
|
|
1302
|
+
"alert-triangle": "ExclamationTriangle",
|
|
1303
|
+
"alert-circle": "ExclamationCircle",
|
|
1304
|
+
"check-circle": "CheckCircle",
|
|
1305
|
+
"x-circle": "TimesCircle",
|
|
1306
|
+
edit: "Edit",
|
|
1307
|
+
pencil: "Pencil",
|
|
1308
|
+
trash: "Trash",
|
|
1309
|
+
send: "PaperPlane",
|
|
1310
|
+
external: "ExternalLinkAlt",
|
|
1311
|
+
plus: "Plus",
|
|
1312
|
+
minus: "Minus",
|
|
1313
|
+
check: "Check",
|
|
1314
|
+
star: "Star",
|
|
1315
|
+
heart: "Heart",
|
|
1316
|
+
home: "Home",
|
|
1317
|
+
user: "User",
|
|
1318
|
+
users: "Users",
|
|
1319
|
+
settings: "Cog",
|
|
1320
|
+
menu: "Bars",
|
|
1321
|
+
"arrow-up": "ArrowUp",
|
|
1322
|
+
"arrow-down": "ArrowDown",
|
|
1323
|
+
"arrow-left": "ArrowLeft",
|
|
1324
|
+
"arrow-right": "ArrowRight",
|
|
1325
|
+
copy: "Copy",
|
|
1326
|
+
download: "Download",
|
|
1327
|
+
upload: "Upload",
|
|
1328
|
+
filter: "Filter",
|
|
1329
|
+
calendar: "Calendar",
|
|
1330
|
+
clock: "Clock",
|
|
1331
|
+
bell: "Bell",
|
|
1332
|
+
mail: "Envelope",
|
|
1333
|
+
envelope: "Envelope",
|
|
1334
|
+
lock: "Lock",
|
|
1335
|
+
unlock: "LockOpen",
|
|
1336
|
+
eye: "Eye",
|
|
1337
|
+
"eye-off": "EyeSlash",
|
|
1338
|
+
more: "EllipsisH",
|
|
1339
|
+
"more-vertical": "EllipsisV",
|
|
1340
|
+
info: "InfoCircle",
|
|
1341
|
+
warning: "ExclamationTriangle"
|
|
1342
|
+
};
|
|
1343
|
+
warned = /* @__PURE__ */ new Set();
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
function kebabToPascal2(name) {
|
|
1347
|
+
return name.split("-").map((part) => {
|
|
1348
|
+
if (/^\d+$/.test(part)) return part;
|
|
1349
|
+
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1350
|
+
}).join("");
|
|
1351
|
+
}
|
|
983
1352
|
function resolveIcon(name) {
|
|
984
1353
|
const cached = resolvedCache.get(name);
|
|
985
1354
|
if (cached) return cached;
|
|
@@ -989,28 +1358,30 @@ function resolveIcon(name) {
|
|
|
989
1358
|
}
|
|
990
1359
|
function doResolve(name) {
|
|
991
1360
|
if (iconAliases[name]) return iconAliases[name];
|
|
992
|
-
const pascalName =
|
|
993
|
-
const directLookup =
|
|
1361
|
+
const pascalName = kebabToPascal2(name);
|
|
1362
|
+
const directLookup = LucideIcons2[pascalName];
|
|
994
1363
|
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
995
|
-
const asIs =
|
|
1364
|
+
const asIs = LucideIcons2[name];
|
|
996
1365
|
if (asIs && typeof asIs === "object") return asIs;
|
|
997
|
-
return
|
|
1366
|
+
return LucideIcons2.HelpCircle;
|
|
998
1367
|
}
|
|
999
1368
|
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
1000
1369
|
var init_Icon = __esm({
|
|
1001
1370
|
"components/atoms/Icon.tsx"() {
|
|
1371
|
+
"use client";
|
|
1002
1372
|
init_cn();
|
|
1373
|
+
init_iconFamily();
|
|
1003
1374
|
iconAliases = {
|
|
1004
|
-
"close":
|
|
1005
|
-
"trash":
|
|
1006
|
-
"loader":
|
|
1007
|
-
"stop":
|
|
1008
|
-
"volume":
|
|
1009
|
-
"volume-off":
|
|
1010
|
-
"refresh":
|
|
1011
|
-
"share":
|
|
1012
|
-
"sort-asc":
|
|
1013
|
-
"sort-desc":
|
|
1375
|
+
"close": LucideIcons2.X,
|
|
1376
|
+
"trash": LucideIcons2.Trash2,
|
|
1377
|
+
"loader": LucideIcons2.Loader2,
|
|
1378
|
+
"stop": LucideIcons2.Square,
|
|
1379
|
+
"volume": LucideIcons2.Volume2,
|
|
1380
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
1381
|
+
"refresh": LucideIcons2.RefreshCw,
|
|
1382
|
+
"share": LucideIcons2.Share2,
|
|
1383
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
1384
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
1014
1385
|
};
|
|
1015
1386
|
resolvedCache = /* @__PURE__ */ new Map();
|
|
1016
1387
|
sizeClasses = {
|
|
@@ -1035,22 +1406,50 @@ var init_Icon = __esm({
|
|
|
1035
1406
|
strokeWidth,
|
|
1036
1407
|
style
|
|
1037
1408
|
}) => {
|
|
1038
|
-
const
|
|
1409
|
+
const family = useIconFamily();
|
|
1410
|
+
const RenderedComponent = React85__default.useMemo(() => {
|
|
1411
|
+
if (icon) return null;
|
|
1412
|
+
return name ? resolveIconForFamily(name, family) : null;
|
|
1413
|
+
}, [icon, name, family]);
|
|
1039
1414
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
1415
|
+
const inlineStyle = {
|
|
1416
|
+
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
1417
|
+
...style
|
|
1418
|
+
};
|
|
1419
|
+
const composedClassName = cn(
|
|
1420
|
+
sizeClasses[size],
|
|
1421
|
+
animationClasses[animation],
|
|
1422
|
+
color ? color : "text-current",
|
|
1423
|
+
className
|
|
1424
|
+
);
|
|
1425
|
+
if (icon) {
|
|
1426
|
+
const Direct = icon;
|
|
1427
|
+
return /* @__PURE__ */ jsx(
|
|
1428
|
+
Direct,
|
|
1429
|
+
{
|
|
1430
|
+
className: composedClassName,
|
|
1431
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1432
|
+
style: inlineStyle
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
if (RenderedComponent) {
|
|
1437
|
+
return /* @__PURE__ */ jsx(
|
|
1438
|
+
RenderedComponent,
|
|
1439
|
+
{
|
|
1440
|
+
className: composedClassName,
|
|
1441
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1442
|
+
style: inlineStyle
|
|
1443
|
+
}
|
|
1444
|
+
);
|
|
1445
|
+
}
|
|
1446
|
+
const Fallback = LucideIcons2.HelpCircle;
|
|
1040
1447
|
return /* @__PURE__ */ jsx(
|
|
1041
|
-
|
|
1448
|
+
Fallback,
|
|
1042
1449
|
{
|
|
1043
|
-
className:
|
|
1044
|
-
sizeClasses[size],
|
|
1045
|
-
animationClasses[animation],
|
|
1046
|
-
color ? color : "text-current",
|
|
1047
|
-
className
|
|
1048
|
-
),
|
|
1450
|
+
className: composedClassName,
|
|
1049
1451
|
strokeWidth: effectiveStrokeWidth,
|
|
1050
|
-
style:
|
|
1051
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
1052
|
-
...style
|
|
1053
|
-
}
|
|
1452
|
+
style: inlineStyle
|
|
1054
1453
|
}
|
|
1055
1454
|
);
|
|
1056
1455
|
};
|
|
@@ -1060,14 +1459,13 @@ var init_Icon = __esm({
|
|
|
1060
1459
|
function resolveIconProp(value, sizeClass) {
|
|
1061
1460
|
if (!value) return null;
|
|
1062
1461
|
if (typeof value === "string") {
|
|
1063
|
-
|
|
1064
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
1462
|
+
return /* @__PURE__ */ jsx(Icon, { name: value, className: sizeClass });
|
|
1065
1463
|
}
|
|
1066
1464
|
if (typeof value === "function") {
|
|
1067
1465
|
const IconComp = value;
|
|
1068
1466
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1069
1467
|
}
|
|
1070
|
-
if (
|
|
1468
|
+
if (React85__default.isValidElement(value)) {
|
|
1071
1469
|
return value;
|
|
1072
1470
|
}
|
|
1073
1471
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1143,7 +1541,7 @@ var init_Button = __esm({
|
|
|
1143
1541
|
md: "h-icon-default w-icon-default",
|
|
1144
1542
|
lg: "h-5 w-5"
|
|
1145
1543
|
};
|
|
1146
|
-
Button =
|
|
1544
|
+
Button = React85__default.forwardRef(
|
|
1147
1545
|
({
|
|
1148
1546
|
className,
|
|
1149
1547
|
variant = "primary",
|
|
@@ -1208,7 +1606,7 @@ var Dialog;
|
|
|
1208
1606
|
var init_Dialog = __esm({
|
|
1209
1607
|
"components/atoms/Dialog.tsx"() {
|
|
1210
1608
|
init_cn();
|
|
1211
|
-
Dialog =
|
|
1609
|
+
Dialog = React85__default.forwardRef(
|
|
1212
1610
|
({
|
|
1213
1611
|
role = "dialog",
|
|
1214
1612
|
"aria-modal": ariaModal = true,
|
|
@@ -1603,7 +2001,7 @@ var init_Modal = __esm({
|
|
|
1603
2001
|
{
|
|
1604
2002
|
variant: "ghost",
|
|
1605
2003
|
size: "sm",
|
|
1606
|
-
icon:
|
|
2004
|
+
icon: "x",
|
|
1607
2005
|
onClick: handleClose,
|
|
1608
2006
|
"data-event": "CLOSE",
|
|
1609
2007
|
"aria-label": "Close modal"
|
|
@@ -1760,7 +2158,7 @@ var init_Drawer = __esm({
|
|
|
1760
2158
|
{
|
|
1761
2159
|
variant: "ghost",
|
|
1762
2160
|
size: "sm",
|
|
1763
|
-
icon:
|
|
2161
|
+
icon: "x",
|
|
1764
2162
|
onClick: handleClose,
|
|
1765
2163
|
"aria-label": "Close drawer",
|
|
1766
2164
|
className: cn(!title && "ml-auto")
|
|
@@ -1854,13 +2252,10 @@ var init_Badge = __esm({
|
|
|
1854
2252
|
md: "px-2.5 py-1 text-sm",
|
|
1855
2253
|
lg: "px-3 py-1.5 text-base"
|
|
1856
2254
|
};
|
|
1857
|
-
Badge =
|
|
2255
|
+
Badge = React85__default.forwardRef(
|
|
1858
2256
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1859
2257
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1860
|
-
const resolvedIcon = typeof icon === "string" ? (
|
|
1861
|
-
const I = resolveIcon(icon);
|
|
1862
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes3[size] }) : null;
|
|
1863
|
-
})() : icon;
|
|
2258
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes3[size] }) : icon;
|
|
1864
2259
|
return /* @__PURE__ */ jsxs(
|
|
1865
2260
|
"span",
|
|
1866
2261
|
{
|
|
@@ -1920,10 +2315,10 @@ var init_Toast = __esm({
|
|
|
1920
2315
|
warning: "bg-card border-[length:var(--border-width)] border-warning"
|
|
1921
2316
|
};
|
|
1922
2317
|
iconMap = {
|
|
1923
|
-
success:
|
|
1924
|
-
error:
|
|
1925
|
-
info:
|
|
1926
|
-
warning:
|
|
2318
|
+
success: "check-circle",
|
|
2319
|
+
error: "alert-circle",
|
|
2320
|
+
info: "info",
|
|
2321
|
+
warning: "alert-triangle"
|
|
1927
2322
|
};
|
|
1928
2323
|
iconColors = {
|
|
1929
2324
|
success: "text-success",
|
|
@@ -1980,7 +2375,7 @@ var init_Toast = __esm({
|
|
|
1980
2375
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
1981
2376
|
Icon,
|
|
1982
2377
|
{
|
|
1983
|
-
|
|
2378
|
+
name: iconMap[variant],
|
|
1984
2379
|
size: "md",
|
|
1985
2380
|
className: iconColors[variant]
|
|
1986
2381
|
}
|
|
@@ -1997,7 +2392,7 @@ var init_Toast = __esm({
|
|
|
1997
2392
|
{
|
|
1998
2393
|
variant: "ghost",
|
|
1999
2394
|
size: "sm",
|
|
2000
|
-
icon:
|
|
2395
|
+
icon: "x",
|
|
2001
2396
|
onClick: handleDismiss,
|
|
2002
2397
|
"aria-label": "Dismiss toast",
|
|
2003
2398
|
className: "flex-shrink-0"
|
|
@@ -2168,7 +2563,7 @@ var init_SvgFlow = __esm({
|
|
|
2168
2563
|
opacity = 1,
|
|
2169
2564
|
className
|
|
2170
2565
|
}) => {
|
|
2171
|
-
const markerId =
|
|
2566
|
+
const markerId = React85__default.useMemo(() => {
|
|
2172
2567
|
flowIdCounter += 1;
|
|
2173
2568
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2174
2569
|
}, []);
|
|
@@ -2711,7 +3106,7 @@ var init_SvgRing = __esm({
|
|
|
2711
3106
|
className,
|
|
2712
3107
|
label
|
|
2713
3108
|
}) => {
|
|
2714
|
-
const gradientId =
|
|
3109
|
+
const gradientId = React85__default.useMemo(() => {
|
|
2715
3110
|
ringIdCounter += 1;
|
|
2716
3111
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2717
3112
|
}, []);
|
|
@@ -2872,7 +3267,8 @@ var Input;
|
|
|
2872
3267
|
var init_Input = __esm({
|
|
2873
3268
|
"components/atoms/Input.tsx"() {
|
|
2874
3269
|
init_cn();
|
|
2875
|
-
|
|
3270
|
+
init_Icon();
|
|
3271
|
+
Input = React85__default.forwardRef(
|
|
2876
3272
|
({
|
|
2877
3273
|
className,
|
|
2878
3274
|
inputType,
|
|
@@ -2922,7 +3318,7 @@ var init_Input = __esm({
|
|
|
2922
3318
|
]
|
|
2923
3319
|
}
|
|
2924
3320
|
),
|
|
2925
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(
|
|
3321
|
+
/* @__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" }) })
|
|
2926
3322
|
] });
|
|
2927
3323
|
}
|
|
2928
3324
|
if (type === "textarea") {
|
|
@@ -2976,7 +3372,7 @@ var init_Input = __esm({
|
|
|
2976
3372
|
type: "button",
|
|
2977
3373
|
onClick: onClear,
|
|
2978
3374
|
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
2979
|
-
children: /* @__PURE__ */ jsx(
|
|
3375
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
2980
3376
|
}
|
|
2981
3377
|
),
|
|
2982
3378
|
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
@@ -2990,7 +3386,7 @@ var Label;
|
|
|
2990
3386
|
var init_Label = __esm({
|
|
2991
3387
|
"components/atoms/Label.tsx"() {
|
|
2992
3388
|
init_cn();
|
|
2993
|
-
Label =
|
|
3389
|
+
Label = React85__default.forwardRef(
|
|
2994
3390
|
({ className, required, children, ...props }, ref) => {
|
|
2995
3391
|
return /* @__PURE__ */ jsxs(
|
|
2996
3392
|
"label",
|
|
@@ -3016,7 +3412,7 @@ var Textarea;
|
|
|
3016
3412
|
var init_Textarea = __esm({
|
|
3017
3413
|
"components/atoms/Textarea.tsx"() {
|
|
3018
3414
|
init_cn();
|
|
3019
|
-
Textarea =
|
|
3415
|
+
Textarea = React85__default.forwardRef(
|
|
3020
3416
|
({ className, error, ...props }, ref) => {
|
|
3021
3417
|
return /* @__PURE__ */ jsx(
|
|
3022
3418
|
"textarea",
|
|
@@ -3045,7 +3441,8 @@ var Select;
|
|
|
3045
3441
|
var init_Select = __esm({
|
|
3046
3442
|
"components/atoms/Select.tsx"() {
|
|
3047
3443
|
init_cn();
|
|
3048
|
-
|
|
3444
|
+
init_Icon();
|
|
3445
|
+
Select = React85__default.forwardRef(
|
|
3049
3446
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
3050
3447
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3051
3448
|
/* @__PURE__ */ jsxs(
|
|
@@ -3076,7 +3473,7 @@ var init_Select = __esm({
|
|
|
3076
3473
|
]
|
|
3077
3474
|
}
|
|
3078
3475
|
),
|
|
3079
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
3476
|
+
/* @__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" }) })
|
|
3080
3477
|
] });
|
|
3081
3478
|
}
|
|
3082
3479
|
);
|
|
@@ -3087,7 +3484,7 @@ var Checkbox;
|
|
|
3087
3484
|
var init_Checkbox = __esm({
|
|
3088
3485
|
"components/atoms/Checkbox.tsx"() {
|
|
3089
3486
|
init_cn();
|
|
3090
|
-
Checkbox =
|
|
3487
|
+
Checkbox = React85__default.forwardRef(
|
|
3091
3488
|
({ className, label, id, ...props }, ref) => {
|
|
3092
3489
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3093
3490
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3169,7 +3566,7 @@ var init_Card = __esm({
|
|
|
3169
3566
|
md: "shadow",
|
|
3170
3567
|
lg: "shadow-elevation-dialog"
|
|
3171
3568
|
};
|
|
3172
|
-
Card =
|
|
3569
|
+
Card = React85__default.forwardRef(
|
|
3173
3570
|
({
|
|
3174
3571
|
className,
|
|
3175
3572
|
variant = "bordered",
|
|
@@ -3205,9 +3602,9 @@ var init_Card = __esm({
|
|
|
3205
3602
|
}
|
|
3206
3603
|
);
|
|
3207
3604
|
Card.displayName = "Card";
|
|
3208
|
-
CardHeader =
|
|
3605
|
+
CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3209
3606
|
CardHeader.displayName = "CardHeader";
|
|
3210
|
-
CardTitle =
|
|
3607
|
+
CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3211
3608
|
"h3",
|
|
3212
3609
|
{
|
|
3213
3610
|
ref,
|
|
@@ -3220,11 +3617,11 @@ var init_Card = __esm({
|
|
|
3220
3617
|
}
|
|
3221
3618
|
));
|
|
3222
3619
|
CardTitle.displayName = "CardTitle";
|
|
3223
|
-
CardContent =
|
|
3620
|
+
CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3224
3621
|
CardContent.displayName = "CardContent";
|
|
3225
3622
|
CardBody = CardContent;
|
|
3226
3623
|
CardBody.displayName = "CardBody";
|
|
3227
|
-
CardFooter =
|
|
3624
|
+
CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3228
3625
|
"div",
|
|
3229
3626
|
{
|
|
3230
3627
|
ref,
|
|
@@ -3279,7 +3676,7 @@ var init_FilterPill = __esm({
|
|
|
3279
3676
|
md: "w-3.5 h-3.5",
|
|
3280
3677
|
lg: "w-4 h-4"
|
|
3281
3678
|
};
|
|
3282
|
-
FilterPill =
|
|
3679
|
+
FilterPill = React85__default.forwardRef(
|
|
3283
3680
|
({
|
|
3284
3681
|
className,
|
|
3285
3682
|
variant = "default",
|
|
@@ -3304,11 +3701,7 @@ var init_FilterPill = __esm({
|
|
|
3304
3701
|
onRemove?.();
|
|
3305
3702
|
if (removeEvent) eventBus.emit(`UI:${removeEvent}`, { label: payloadLabel });
|
|
3306
3703
|
}, [onRemove, removeEvent, eventBus, payloadLabel]);
|
|
3307
|
-
const
|
|
3308
|
-
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
3309
|
-
const I = resolveIcon(icon);
|
|
3310
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes[size] }) : null;
|
|
3311
|
-
})() : icon;
|
|
3704
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes[size] }) : icon;
|
|
3312
3705
|
return /* @__PURE__ */ jsxs(
|
|
3313
3706
|
"span",
|
|
3314
3707
|
{
|
|
@@ -3337,7 +3730,7 @@ var init_FilterPill = __esm({
|
|
|
3337
3730
|
className: cn(
|
|
3338
3731
|
"ml-0.5 rounded-full hover:bg-foreground/10 transition-colors flex items-center justify-center"
|
|
3339
3732
|
),
|
|
3340
|
-
children:
|
|
3733
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: iconSizes[size] })
|
|
3341
3734
|
}
|
|
3342
3735
|
)
|
|
3343
3736
|
]
|
|
@@ -3352,13 +3745,14 @@ var sizeStyles5, Spinner;
|
|
|
3352
3745
|
var init_Spinner = __esm({
|
|
3353
3746
|
"components/atoms/Spinner.tsx"() {
|
|
3354
3747
|
init_cn();
|
|
3748
|
+
init_Icon();
|
|
3355
3749
|
sizeStyles5 = {
|
|
3356
3750
|
xs: "h-3 w-3",
|
|
3357
3751
|
sm: "h-4 w-4",
|
|
3358
3752
|
md: "h-6 w-6",
|
|
3359
3753
|
lg: "h-8 w-8"
|
|
3360
3754
|
};
|
|
3361
|
-
Spinner =
|
|
3755
|
+
Spinner = React85__default.forwardRef(
|
|
3362
3756
|
({ className, size = "md", ...props }, ref) => {
|
|
3363
3757
|
return /* @__PURE__ */ jsx(
|
|
3364
3758
|
"div",
|
|
@@ -3366,7 +3760,7 @@ var init_Spinner = __esm({
|
|
|
3366
3760
|
ref,
|
|
3367
3761
|
className: cn("text-foreground", className),
|
|
3368
3762
|
...props,
|
|
3369
|
-
children: /* @__PURE__ */ jsx(
|
|
3763
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles5[size]) })
|
|
3370
3764
|
}
|
|
3371
3765
|
);
|
|
3372
3766
|
}
|
|
@@ -3385,6 +3779,7 @@ var sizeClasses3, iconSizeClasses, statusSizeClasses, statusClasses, badgeSizeCl
|
|
|
3385
3779
|
var init_Avatar = __esm({
|
|
3386
3780
|
"components/atoms/Avatar.tsx"() {
|
|
3387
3781
|
"use client";
|
|
3782
|
+
init_Icon();
|
|
3388
3783
|
init_cn();
|
|
3389
3784
|
init_useEventBus();
|
|
3390
3785
|
sizeClasses3 = {
|
|
@@ -3426,7 +3821,7 @@ var init_Avatar = __esm({
|
|
|
3426
3821
|
alt,
|
|
3427
3822
|
name,
|
|
3428
3823
|
initials: providedInitials,
|
|
3429
|
-
icon:
|
|
3824
|
+
icon: IconComponent,
|
|
3430
3825
|
size = "md",
|
|
3431
3826
|
status,
|
|
3432
3827
|
badge,
|
|
@@ -3439,7 +3834,7 @@ var init_Avatar = __esm({
|
|
|
3439
3834
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
3440
3835
|
const hasImage = !!src;
|
|
3441
3836
|
const hasInitials = !!initials;
|
|
3442
|
-
const hasIcon = !!
|
|
3837
|
+
const hasIcon = !!IconComponent;
|
|
3443
3838
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
3444
3839
|
const isClickable = action || onClick;
|
|
3445
3840
|
const handleClick = () => {
|
|
@@ -3483,8 +3878,8 @@ var init_Avatar = __esm({
|
|
|
3483
3878
|
),
|
|
3484
3879
|
children: initials.substring(0, 2).toUpperCase()
|
|
3485
3880
|
}
|
|
3486
|
-
) : hasIcon ? /* @__PURE__ */ jsx(
|
|
3487
|
-
|
|
3881
|
+
) : hasIcon && IconComponent ? /* @__PURE__ */ jsx(
|
|
3882
|
+
IconComponent,
|
|
3488
3883
|
{
|
|
3489
3884
|
className: cn(
|
|
3490
3885
|
"text-foreground",
|
|
@@ -3492,8 +3887,9 @@ var init_Avatar = __esm({
|
|
|
3492
3887
|
)
|
|
3493
3888
|
}
|
|
3494
3889
|
) : /* @__PURE__ */ jsx(
|
|
3495
|
-
|
|
3890
|
+
Icon,
|
|
3496
3891
|
{
|
|
3892
|
+
name: "user",
|
|
3497
3893
|
className: cn(
|
|
3498
3894
|
"text-foreground",
|
|
3499
3895
|
iconSizeClasses[size]
|
|
@@ -3806,7 +4202,7 @@ var Radio;
|
|
|
3806
4202
|
var init_Radio = __esm({
|
|
3807
4203
|
"components/atoms/Radio.tsx"() {
|
|
3808
4204
|
init_cn();
|
|
3809
|
-
Radio =
|
|
4205
|
+
Radio = React85__default.forwardRef(
|
|
3810
4206
|
({
|
|
3811
4207
|
label,
|
|
3812
4208
|
helperText,
|
|
@@ -3978,7 +4374,7 @@ var init_Switch = __esm({
|
|
|
3978
4374
|
"components/atoms/Switch.tsx"() {
|
|
3979
4375
|
"use client";
|
|
3980
4376
|
init_cn();
|
|
3981
|
-
Switch =
|
|
4377
|
+
Switch = React85.forwardRef(
|
|
3982
4378
|
({
|
|
3983
4379
|
checked,
|
|
3984
4380
|
defaultChecked = false,
|
|
@@ -3989,10 +4385,10 @@ var init_Switch = __esm({
|
|
|
3989
4385
|
name,
|
|
3990
4386
|
className
|
|
3991
4387
|
}, ref) => {
|
|
3992
|
-
const [isChecked, setIsChecked] =
|
|
4388
|
+
const [isChecked, setIsChecked] = React85.useState(
|
|
3993
4389
|
checked !== void 0 ? checked : defaultChecked
|
|
3994
4390
|
);
|
|
3995
|
-
|
|
4391
|
+
React85.useEffect(() => {
|
|
3996
4392
|
if (checked !== void 0) {
|
|
3997
4393
|
setIsChecked(checked);
|
|
3998
4394
|
}
|
|
@@ -4408,6 +4804,7 @@ var sizeClasses4, iconSizes2, ThemeToggle;
|
|
|
4408
4804
|
var init_ThemeToggle = __esm({
|
|
4409
4805
|
"components/atoms/ThemeToggle.tsx"() {
|
|
4410
4806
|
"use client";
|
|
4807
|
+
init_Icon();
|
|
4411
4808
|
init_cn();
|
|
4412
4809
|
init_ThemeContext();
|
|
4413
4810
|
sizeClasses4 = {
|
|
@@ -4445,13 +4842,15 @@ var init_ThemeToggle = __esm({
|
|
|
4445
4842
|
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
4446
4843
|
children: [
|
|
4447
4844
|
isDark ? /* @__PURE__ */ jsx(
|
|
4448
|
-
|
|
4845
|
+
Icon,
|
|
4449
4846
|
{
|
|
4847
|
+
name: "sun",
|
|
4450
4848
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4451
4849
|
}
|
|
4452
4850
|
) : /* @__PURE__ */ jsx(
|
|
4453
|
-
|
|
4851
|
+
Icon,
|
|
4454
4852
|
{
|
|
4853
|
+
name: "moon",
|
|
4455
4854
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4456
4855
|
}
|
|
4457
4856
|
),
|
|
@@ -4502,7 +4901,7 @@ var Aside;
|
|
|
4502
4901
|
var init_Aside = __esm({
|
|
4503
4902
|
"components/atoms/Aside.tsx"() {
|
|
4504
4903
|
init_cn();
|
|
4505
|
-
Aside =
|
|
4904
|
+
Aside = React85__default.forwardRef(
|
|
4506
4905
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4507
4906
|
);
|
|
4508
4907
|
Aside.displayName = "Aside";
|
|
@@ -4579,8 +4978,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4579
4978
|
position = "top",
|
|
4580
4979
|
className
|
|
4581
4980
|
}) => {
|
|
4582
|
-
const [isVisible, setIsVisible] =
|
|
4583
|
-
const timeoutRef =
|
|
4981
|
+
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
4982
|
+
const timeoutRef = React85__default.useRef(null);
|
|
4584
4983
|
const handleMouseEnter = () => {
|
|
4585
4984
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4586
4985
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4589,7 +4988,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4589
4988
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4590
4989
|
setIsVisible(false);
|
|
4591
4990
|
};
|
|
4592
|
-
|
|
4991
|
+
React85__default.useEffect(() => {
|
|
4593
4992
|
return () => {
|
|
4594
4993
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4595
4994
|
};
|
|
@@ -4799,7 +5198,7 @@ var init_StatusDot = __esm({
|
|
|
4799
5198
|
md: "w-2.5 h-2.5",
|
|
4800
5199
|
lg: "w-3 h-3"
|
|
4801
5200
|
};
|
|
4802
|
-
StatusDot =
|
|
5201
|
+
StatusDot = React85__default.forwardRef(
|
|
4803
5202
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4804
5203
|
return /* @__PURE__ */ jsx(
|
|
4805
5204
|
"span",
|
|
@@ -4838,21 +5237,22 @@ function resolveColor(dir, invert) {
|
|
|
4838
5237
|
const isGood = invert ? !isPositive : isPositive;
|
|
4839
5238
|
return isGood ? "text-success" : "text-error";
|
|
4840
5239
|
}
|
|
4841
|
-
var sizeStyles7,
|
|
5240
|
+
var sizeStyles7, iconNameMap, TrendIndicator;
|
|
4842
5241
|
var init_TrendIndicator = __esm({
|
|
4843
5242
|
"components/atoms/TrendIndicator.tsx"() {
|
|
5243
|
+
init_Icon();
|
|
4844
5244
|
init_cn();
|
|
4845
5245
|
sizeStyles7 = {
|
|
4846
5246
|
sm: { icon: "w-3 h-3", text: "text-xs" },
|
|
4847
5247
|
md: { icon: "w-4 h-4", text: "text-sm" },
|
|
4848
5248
|
lg: { icon: "w-5 h-5", text: "text-base" }
|
|
4849
5249
|
};
|
|
4850
|
-
|
|
4851
|
-
up:
|
|
4852
|
-
down:
|
|
4853
|
-
flat:
|
|
5250
|
+
iconNameMap = {
|
|
5251
|
+
up: "trending-up",
|
|
5252
|
+
down: "trending-down",
|
|
5253
|
+
flat: "arrow-right"
|
|
4854
5254
|
};
|
|
4855
|
-
TrendIndicator =
|
|
5255
|
+
TrendIndicator = React85__default.forwardRef(
|
|
4856
5256
|
({
|
|
4857
5257
|
className,
|
|
4858
5258
|
value,
|
|
@@ -4865,7 +5265,7 @@ var init_TrendIndicator = __esm({
|
|
|
4865
5265
|
}, ref) => {
|
|
4866
5266
|
const dir = resolveDirection(value, direction);
|
|
4867
5267
|
const colorClass = resolveColor(dir, invert);
|
|
4868
|
-
const
|
|
5268
|
+
const iconName = iconNameMap[dir];
|
|
4869
5269
|
const styles = sizeStyles7[size];
|
|
4870
5270
|
const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
|
|
4871
5271
|
const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
|
|
@@ -4883,7 +5283,7 @@ var init_TrendIndicator = __esm({
|
|
|
4883
5283
|
"aria-label": ariaLabel,
|
|
4884
5284
|
...props,
|
|
4885
5285
|
children: [
|
|
4886
|
-
/* @__PURE__ */ jsx(
|
|
5286
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, className: styles.icon }),
|
|
4887
5287
|
showValue && formattedValue && /* @__PURE__ */ jsx("span", { children: formattedValue })
|
|
4888
5288
|
]
|
|
4889
5289
|
}
|
|
@@ -4919,7 +5319,7 @@ var init_RangeSlider = __esm({
|
|
|
4919
5319
|
md: "w-4 h-4",
|
|
4920
5320
|
lg: "w-5 h-5"
|
|
4921
5321
|
};
|
|
4922
|
-
RangeSlider =
|
|
5322
|
+
RangeSlider = React85__default.forwardRef(
|
|
4923
5323
|
({
|
|
4924
5324
|
className,
|
|
4925
5325
|
min = 0,
|
|
@@ -5452,7 +5852,7 @@ var init_ContentSection = __esm({
|
|
|
5452
5852
|
md: "py-16",
|
|
5453
5853
|
lg: "py-24"
|
|
5454
5854
|
};
|
|
5455
|
-
ContentSection =
|
|
5855
|
+
ContentSection = React85__default.forwardRef(
|
|
5456
5856
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5457
5857
|
return /* @__PURE__ */ jsx(
|
|
5458
5858
|
Box,
|
|
@@ -5986,7 +6386,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5986
6386
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5987
6387
|
"none": {}
|
|
5988
6388
|
};
|
|
5989
|
-
AnimatedReveal =
|
|
6389
|
+
AnimatedReveal = React85__default.forwardRef(
|
|
5990
6390
|
({
|
|
5991
6391
|
trigger = "scroll",
|
|
5992
6392
|
animation = "fade-up",
|
|
@@ -6016,7 +6416,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6016
6416
|
if (trigger !== "scroll") return;
|
|
6017
6417
|
const el = internalRef.current;
|
|
6018
6418
|
if (!el) return;
|
|
6019
|
-
const
|
|
6419
|
+
const observer2 = new IntersectionObserver(
|
|
6020
6420
|
([entry]) => {
|
|
6021
6421
|
if (entry.isIntersecting) {
|
|
6022
6422
|
if (once && hasAnimated.current) return;
|
|
@@ -6028,8 +6428,8 @@ var init_AnimatedReveal = __esm({
|
|
|
6028
6428
|
},
|
|
6029
6429
|
{ threshold }
|
|
6030
6430
|
);
|
|
6031
|
-
|
|
6032
|
-
return () =>
|
|
6431
|
+
observer2.observe(el);
|
|
6432
|
+
return () => observer2.disconnect();
|
|
6033
6433
|
}, [trigger, threshold, once]);
|
|
6034
6434
|
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
6035
6435
|
const handleMouseLeave = trigger === "hover" ? () => {
|
|
@@ -6146,7 +6546,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6146
6546
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
6147
6547
|
"use client";
|
|
6148
6548
|
init_cn();
|
|
6149
|
-
AnimatedGraphic =
|
|
6549
|
+
AnimatedGraphic = React85__default.forwardRef(
|
|
6150
6550
|
({
|
|
6151
6551
|
src,
|
|
6152
6552
|
svgContent,
|
|
@@ -6169,7 +6569,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6169
6569
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6170
6570
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6171
6571
|
const prevAnimateRef = useRef(animate);
|
|
6172
|
-
const setRef =
|
|
6572
|
+
const setRef = React85__default.useCallback(
|
|
6173
6573
|
(node) => {
|
|
6174
6574
|
containerRef.current = node;
|
|
6175
6575
|
if (typeof ref === "function") ref(node);
|
|
@@ -6394,9 +6794,9 @@ function ScoreDisplay({
|
|
|
6394
6794
|
...rest
|
|
6395
6795
|
}) {
|
|
6396
6796
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6397
|
-
const [displayValue, setDisplayValue] =
|
|
6398
|
-
const [isAnimating, setIsAnimating] =
|
|
6399
|
-
|
|
6797
|
+
const [displayValue, setDisplayValue] = React85.useState(resolvedValue);
|
|
6798
|
+
const [isAnimating, setIsAnimating] = React85.useState(false);
|
|
6799
|
+
React85.useEffect(() => {
|
|
6400
6800
|
if (!animated || displayValue === resolvedValue) {
|
|
6401
6801
|
setDisplayValue(resolvedValue);
|
|
6402
6802
|
return;
|
|
@@ -6466,9 +6866,9 @@ function ControlButton({
|
|
|
6466
6866
|
className
|
|
6467
6867
|
}) {
|
|
6468
6868
|
const eventBus = useEventBus();
|
|
6469
|
-
const [isPressed, setIsPressed] =
|
|
6869
|
+
const [isPressed, setIsPressed] = React85.useState(false);
|
|
6470
6870
|
const actualPressed = pressed ?? isPressed;
|
|
6471
|
-
const handlePointerDown =
|
|
6871
|
+
const handlePointerDown = React85.useCallback(
|
|
6472
6872
|
(e) => {
|
|
6473
6873
|
e.preventDefault();
|
|
6474
6874
|
if (disabled) return;
|
|
@@ -6478,7 +6878,7 @@ function ControlButton({
|
|
|
6478
6878
|
},
|
|
6479
6879
|
[disabled, pressEvent, eventBus, onPress]
|
|
6480
6880
|
);
|
|
6481
|
-
const handlePointerUp =
|
|
6881
|
+
const handlePointerUp = React85.useCallback(
|
|
6482
6882
|
(e) => {
|
|
6483
6883
|
e.preventDefault();
|
|
6484
6884
|
if (disabled) return;
|
|
@@ -6488,7 +6888,7 @@ function ControlButton({
|
|
|
6488
6888
|
},
|
|
6489
6889
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6490
6890
|
);
|
|
6491
|
-
const handlePointerLeave =
|
|
6891
|
+
const handlePointerLeave = React85.useCallback(
|
|
6492
6892
|
(e) => {
|
|
6493
6893
|
if (isPressed) {
|
|
6494
6894
|
setIsPressed(false);
|
|
@@ -7394,9 +7794,9 @@ function MiniMap({
|
|
|
7394
7794
|
viewportRect,
|
|
7395
7795
|
className
|
|
7396
7796
|
}) {
|
|
7397
|
-
const canvasRef =
|
|
7398
|
-
const frameRef =
|
|
7399
|
-
|
|
7797
|
+
const canvasRef = React85.useRef(null);
|
|
7798
|
+
const frameRef = React85.useRef(0);
|
|
7799
|
+
React85.useEffect(() => {
|
|
7400
7800
|
const canvas = canvasRef.current;
|
|
7401
7801
|
if (!canvas) return;
|
|
7402
7802
|
const ctx = canvas.getContext("2d");
|
|
@@ -7515,6 +7915,7 @@ var init_ErrorState = __esm({
|
|
|
7515
7915
|
init_Box();
|
|
7516
7916
|
init_Stack();
|
|
7517
7917
|
init_Typography();
|
|
7918
|
+
init_Icon();
|
|
7518
7919
|
init_useEventBus();
|
|
7519
7920
|
init_useTranslate();
|
|
7520
7921
|
ErrorState = ({
|
|
@@ -7542,7 +7943,7 @@ var init_ErrorState = __esm({
|
|
|
7542
7943
|
className
|
|
7543
7944
|
),
|
|
7544
7945
|
children: [
|
|
7545
|
-
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsx(
|
|
7946
|
+
/* @__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" }) }),
|
|
7546
7947
|
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
7547
7948
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
7548
7949
|
(onRetry || retryEvent) && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
@@ -7559,7 +7960,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7559
7960
|
"use client";
|
|
7560
7961
|
init_cn();
|
|
7561
7962
|
init_ErrorState();
|
|
7562
|
-
ErrorBoundary = class extends
|
|
7963
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
7563
7964
|
constructor(props) {
|
|
7564
7965
|
super(props);
|
|
7565
7966
|
__publicField(this, "reset", () => {
|
|
@@ -8484,7 +8885,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
8484
8885
|
AboutPageTemplate.displayName = "AboutPageTemplate";
|
|
8485
8886
|
}
|
|
8486
8887
|
});
|
|
8487
|
-
var variantBorderClasses, variantIconColors,
|
|
8888
|
+
var variantBorderClasses, variantIconColors, iconMap2, Alert;
|
|
8488
8889
|
var init_Alert = __esm({
|
|
8489
8890
|
"components/molecules/Alert.tsx"() {
|
|
8490
8891
|
"use client";
|
|
@@ -8505,11 +8906,11 @@ var init_Alert = __esm({
|
|
|
8505
8906
|
warning: "text-warning",
|
|
8506
8907
|
error: "text-error"
|
|
8507
8908
|
};
|
|
8508
|
-
|
|
8509
|
-
info:
|
|
8510
|
-
success:
|
|
8511
|
-
warning:
|
|
8512
|
-
error:
|
|
8909
|
+
iconMap2 = {
|
|
8910
|
+
info: "info",
|
|
8911
|
+
success: "check-circle",
|
|
8912
|
+
warning: "alert-triangle",
|
|
8913
|
+
error: "alert-circle"
|
|
8513
8914
|
};
|
|
8514
8915
|
Alert = ({
|
|
8515
8916
|
children,
|
|
@@ -8544,7 +8945,7 @@ var init_Alert = __esm({
|
|
|
8544
8945
|
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
8545
8946
|
Icon,
|
|
8546
8947
|
{
|
|
8547
|
-
|
|
8948
|
+
name: iconMap2[variant],
|
|
8548
8949
|
size: "md",
|
|
8549
8950
|
className: variantIconColors[variant]
|
|
8550
8951
|
}
|
|
@@ -8564,7 +8965,7 @@ var init_Alert = __esm({
|
|
|
8564
8965
|
"hover:bg-muted"
|
|
8565
8966
|
),
|
|
8566
8967
|
"aria-label": "Dismiss alert",
|
|
8567
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
8968
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "sm" })
|
|
8568
8969
|
}
|
|
8569
8970
|
)
|
|
8570
8971
|
] })
|
|
@@ -8640,8 +9041,8 @@ var init_Tooltip = __esm({
|
|
|
8640
9041
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
8641
9042
|
};
|
|
8642
9043
|
}, []);
|
|
8643
|
-
const triggerElement =
|
|
8644
|
-
const trigger =
|
|
9044
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9045
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
8645
9046
|
ref: triggerRef,
|
|
8646
9047
|
onMouseEnter: handleMouseEnter,
|
|
8647
9048
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8796,8 +9197,8 @@ var init_Popover = __esm({
|
|
|
8796
9197
|
onMouseEnter: handleOpen,
|
|
8797
9198
|
onMouseLeave: handleClose
|
|
8798
9199
|
};
|
|
8799
|
-
const childElement =
|
|
8800
|
-
const triggerElement =
|
|
9200
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9201
|
+
const triggerElement = React85__default.cloneElement(
|
|
8801
9202
|
childElement,
|
|
8802
9203
|
{
|
|
8803
9204
|
ref: triggerRef,
|
|
@@ -8913,8 +9314,8 @@ var init_Menu = __esm({
|
|
|
8913
9314
|
"bottom-start": "top-full left-0 mt-2",
|
|
8914
9315
|
"bottom-end": "top-full right-0 mt-2"
|
|
8915
9316
|
};
|
|
8916
|
-
const triggerChild =
|
|
8917
|
-
const triggerElement =
|
|
9317
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
9318
|
+
const triggerElement = React85__default.cloneElement(
|
|
8918
9319
|
triggerChild,
|
|
8919
9320
|
{
|
|
8920
9321
|
ref: triggerRef,
|
|
@@ -8959,7 +9360,7 @@ var init_Menu = __esm({
|
|
|
8959
9360
|
}
|
|
8960
9361
|
),
|
|
8961
9362
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
8962
|
-
hasSubMenu && /* @__PURE__ */ jsx(Icon, {
|
|
9363
|
+
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
8963
9364
|
] })
|
|
8964
9365
|
},
|
|
8965
9366
|
itemId
|
|
@@ -9104,7 +9505,7 @@ var init_Accordion = __esm({
|
|
|
9104
9505
|
/* @__PURE__ */ jsx(
|
|
9105
9506
|
Icon,
|
|
9106
9507
|
{
|
|
9107
|
-
|
|
9508
|
+
name: "chevron-down",
|
|
9108
9509
|
size: "sm",
|
|
9109
9510
|
className: cn(
|
|
9110
9511
|
"transition-transform duration-fast",
|
|
@@ -9129,15 +9530,6 @@ var init_Accordion = __esm({
|
|
|
9129
9530
|
Accordion.displayName = "Accordion";
|
|
9130
9531
|
}
|
|
9131
9532
|
});
|
|
9132
|
-
function resolveIcon2(name) {
|
|
9133
|
-
const pascalName = name.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join("");
|
|
9134
|
-
const icons = LucideIcons;
|
|
9135
|
-
const icon = icons[pascalName];
|
|
9136
|
-
if (icon) {
|
|
9137
|
-
return icon;
|
|
9138
|
-
}
|
|
9139
|
-
return Plus;
|
|
9140
|
-
}
|
|
9141
9533
|
var FloatingActionButton;
|
|
9142
9534
|
var init_FloatingActionButton = __esm({
|
|
9143
9535
|
"components/molecules/FloatingActionButton.tsx"() {
|
|
@@ -9163,7 +9555,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9163
9555
|
const eventBus = useEventBus();
|
|
9164
9556
|
const { t } = useTranslate();
|
|
9165
9557
|
const resolvedAction = icon ? {
|
|
9166
|
-
icon
|
|
9558
|
+
icon,
|
|
9167
9559
|
onClick: () => {
|
|
9168
9560
|
if (action) eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
9169
9561
|
onClick?.();
|
|
@@ -9273,7 +9665,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9273
9665
|
{
|
|
9274
9666
|
variant: isExpanded ? "secondary" : "primary",
|
|
9275
9667
|
size: "lg",
|
|
9276
|
-
icon: isExpanded ?
|
|
9668
|
+
icon: isExpanded ? "x" : "plus",
|
|
9277
9669
|
onClick: handleMainClick,
|
|
9278
9670
|
className: "rounded-full shadow-lg transition-all duration-normal",
|
|
9279
9671
|
"aria-label": isExpanded ? "Close actions" : "Open actions",
|
|
@@ -9330,13 +9722,13 @@ var init_MapView = __esm({
|
|
|
9330
9722
|
shadowSize: [41, 41]
|
|
9331
9723
|
});
|
|
9332
9724
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9333
|
-
const { useEffect:
|
|
9725
|
+
const { useEffect: useEffect70, useRef: useRef65, useCallback: useCallback113, useState: useState102 } = React85__default;
|
|
9334
9726
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9335
9727
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9336
9728
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9337
9729
|
const map = useMap();
|
|
9338
9730
|
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
9339
|
-
|
|
9731
|
+
useEffect70(() => {
|
|
9340
9732
|
const prev = prevRef.current;
|
|
9341
9733
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
9342
9734
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -9347,7 +9739,7 @@ var init_MapView = __esm({
|
|
|
9347
9739
|
}
|
|
9348
9740
|
function MapClickHandler({ onMapClick }) {
|
|
9349
9741
|
const map = useMap();
|
|
9350
|
-
|
|
9742
|
+
useEffect70(() => {
|
|
9351
9743
|
if (!onMapClick) return;
|
|
9352
9744
|
const handler = (e) => {
|
|
9353
9745
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -9375,7 +9767,7 @@ var init_MapView = __esm({
|
|
|
9375
9767
|
showAttribution = true
|
|
9376
9768
|
}) {
|
|
9377
9769
|
const eventBus = useEventBus2();
|
|
9378
|
-
const [clickedPosition, setClickedPosition] =
|
|
9770
|
+
const [clickedPosition, setClickedPosition] = useState102(null);
|
|
9379
9771
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
9380
9772
|
if (showClickedPin) {
|
|
9381
9773
|
setClickedPosition({ lat, lng });
|
|
@@ -9576,7 +9968,7 @@ function InputPattern({
|
|
|
9576
9968
|
fieldName
|
|
9577
9969
|
}) {
|
|
9578
9970
|
const { emit } = useEventBus();
|
|
9579
|
-
const [localValue, setLocalValue] =
|
|
9971
|
+
const [localValue, setLocalValue] = React85__default.useState(value);
|
|
9580
9972
|
const handleChange = (e) => {
|
|
9581
9973
|
setLocalValue(e.target.value);
|
|
9582
9974
|
if (onChange) {
|
|
@@ -9614,7 +10006,7 @@ function TextareaPattern({
|
|
|
9614
10006
|
fieldName
|
|
9615
10007
|
}) {
|
|
9616
10008
|
const { emit } = useEventBus();
|
|
9617
|
-
const [localValue, setLocalValue] =
|
|
10009
|
+
const [localValue, setLocalValue] = React85__default.useState(value);
|
|
9618
10010
|
const handleChange = (e) => {
|
|
9619
10011
|
setLocalValue(e.target.value);
|
|
9620
10012
|
if (onChange) {
|
|
@@ -9646,7 +10038,7 @@ function SelectPattern({
|
|
|
9646
10038
|
fieldName
|
|
9647
10039
|
}) {
|
|
9648
10040
|
const { emit } = useEventBus();
|
|
9649
|
-
const [localValue, setLocalValue] =
|
|
10041
|
+
const [localValue, setLocalValue] = React85__default.useState(value);
|
|
9650
10042
|
const handleChange = (e) => {
|
|
9651
10043
|
setLocalValue(e.target.value);
|
|
9652
10044
|
if (onChange) {
|
|
@@ -9675,7 +10067,7 @@ function CheckboxPattern({
|
|
|
9675
10067
|
className
|
|
9676
10068
|
}) {
|
|
9677
10069
|
const { emit } = useEventBus();
|
|
9678
|
-
const [localChecked, setLocalChecked] =
|
|
10070
|
+
const [localChecked, setLocalChecked] = React85__default.useState(checked);
|
|
9679
10071
|
const handleChange = (e) => {
|
|
9680
10072
|
setLocalChecked(e.target.checked);
|
|
9681
10073
|
if (onChange) {
|
|
@@ -9906,8 +10298,8 @@ function ActionButtons({
|
|
|
9906
10298
|
disabled
|
|
9907
10299
|
}) {
|
|
9908
10300
|
const eventBus = useEventBus();
|
|
9909
|
-
const [activeButtons, setActiveButtons] =
|
|
9910
|
-
const handlePress =
|
|
10301
|
+
const [activeButtons, setActiveButtons] = React85.useState(/* @__PURE__ */ new Set());
|
|
10302
|
+
const handlePress = React85.useCallback(
|
|
9911
10303
|
(id) => {
|
|
9912
10304
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9913
10305
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9915,7 +10307,7 @@ function ActionButtons({
|
|
|
9915
10307
|
},
|
|
9916
10308
|
[actionEvent, eventBus, onAction]
|
|
9917
10309
|
);
|
|
9918
|
-
const handleRelease =
|
|
10310
|
+
const handleRelease = React85.useCallback(
|
|
9919
10311
|
(id) => {
|
|
9920
10312
|
setActiveButtons((prev) => {
|
|
9921
10313
|
const next = new Set(prev);
|
|
@@ -10747,7 +11139,7 @@ function IsometricCanvas({
|
|
|
10747
11139
|
const el = containerRef.current;
|
|
10748
11140
|
if (!el) return;
|
|
10749
11141
|
if (typeof ResizeObserver === "undefined") return;
|
|
10750
|
-
const
|
|
11142
|
+
const observer2 = new ResizeObserver((entries) => {
|
|
10751
11143
|
const entry = entries[0];
|
|
10752
11144
|
if (entry) {
|
|
10753
11145
|
const w = Math.round(entry.contentRect.width) || 800;
|
|
@@ -10758,8 +11150,8 @@ function IsometricCanvas({
|
|
|
10758
11150
|
});
|
|
10759
11151
|
}
|
|
10760
11152
|
});
|
|
10761
|
-
|
|
10762
|
-
return () =>
|
|
11153
|
+
observer2.observe(el);
|
|
11154
|
+
return () => observer2.disconnect();
|
|
10763
11155
|
}, []);
|
|
10764
11156
|
const units = useMemo(
|
|
10765
11157
|
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
@@ -12778,7 +13170,7 @@ var init_MarkdownContent = __esm({
|
|
|
12778
13170
|
init_Box();
|
|
12779
13171
|
init_useTranslate();
|
|
12780
13172
|
init_cn();
|
|
12781
|
-
MarkdownContent =
|
|
13173
|
+
MarkdownContent = React85__default.memo(
|
|
12782
13174
|
({ content, direction, className }) => {
|
|
12783
13175
|
const { t: _t } = useTranslate();
|
|
12784
13176
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -12924,6 +13316,7 @@ var init_CodeBlock = __esm({
|
|
|
12924
13316
|
init_Badge();
|
|
12925
13317
|
init_Stack();
|
|
12926
13318
|
init_Textarea();
|
|
13319
|
+
init_Icon();
|
|
12927
13320
|
init_useEventBus();
|
|
12928
13321
|
init_useTranslate();
|
|
12929
13322
|
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
@@ -12996,7 +13389,7 @@ var init_CodeBlock = __esm({
|
|
|
12996
13389
|
log7 = createLogger("almadar:ui:markdown-code");
|
|
12997
13390
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12998
13391
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12999
|
-
CodeBlock =
|
|
13392
|
+
CodeBlock = React85__default.memo(
|
|
13000
13393
|
({
|
|
13001
13394
|
code: rawCode,
|
|
13002
13395
|
language = "text",
|
|
@@ -13214,7 +13607,7 @@ var init_CodeBlock = __esm({
|
|
|
13214
13607
|
onClick: handleCopy,
|
|
13215
13608
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
13216
13609
|
"aria-label": "Copy code",
|
|
13217
|
-
children: copied ? /* @__PURE__ */ jsx(
|
|
13610
|
+
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" })
|
|
13218
13611
|
}
|
|
13219
13612
|
)
|
|
13220
13613
|
]
|
|
@@ -13495,7 +13888,7 @@ var init_QuizBlock = __esm({
|
|
|
13495
13888
|
className: "self-start ml-7",
|
|
13496
13889
|
children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
13497
13890
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: revealed ? t("quiz.hideAnswer") : t("quiz.showAnswer") }),
|
|
13498
|
-
revealed ? /* @__PURE__ */ jsx(
|
|
13891
|
+
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" })
|
|
13499
13892
|
] })
|
|
13500
13893
|
}
|
|
13501
13894
|
)
|
|
@@ -14255,7 +14648,7 @@ var init_StateMachineView = __esm({
|
|
|
14255
14648
|
style: { top: title ? 30 : 0 },
|
|
14256
14649
|
children: [
|
|
14257
14650
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14258
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14651
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14259
14652
|
StateNode,
|
|
14260
14653
|
{
|
|
14261
14654
|
state,
|
|
@@ -15403,28 +15796,22 @@ var init_BookTableOfContents = __esm({
|
|
|
15403
15796
|
BookTableOfContents.displayName = "BookTableOfContents";
|
|
15404
15797
|
}
|
|
15405
15798
|
});
|
|
15406
|
-
var
|
|
15799
|
+
var ICON_NAME_ALIASES, EmptyState;
|
|
15407
15800
|
var init_EmptyState = __esm({
|
|
15408
15801
|
"components/molecules/EmptyState.tsx"() {
|
|
15409
15802
|
"use client";
|
|
15410
15803
|
init_cn();
|
|
15411
15804
|
init_atoms();
|
|
15412
15805
|
init_Box();
|
|
15806
|
+
init_Icon();
|
|
15413
15807
|
init_Stack();
|
|
15414
15808
|
init_Typography();
|
|
15415
15809
|
init_useEventBus();
|
|
15416
15810
|
init_useTranslate();
|
|
15417
|
-
|
|
15418
|
-
"check-circle"
|
|
15419
|
-
|
|
15420
|
-
"
|
|
15421
|
-
error: XCircle,
|
|
15422
|
-
"alert-circle": AlertCircle,
|
|
15423
|
-
warning: AlertCircle,
|
|
15424
|
-
info: Info,
|
|
15425
|
-
search: Search,
|
|
15426
|
-
inbox: Inbox,
|
|
15427
|
-
"file-question": FileQuestion
|
|
15811
|
+
ICON_NAME_ALIASES = {
|
|
15812
|
+
check: "check-circle",
|
|
15813
|
+
error: "x-circle",
|
|
15814
|
+
warning: "alert-circle"
|
|
15428
15815
|
};
|
|
15429
15816
|
EmptyState = ({
|
|
15430
15817
|
icon,
|
|
@@ -15444,7 +15831,9 @@ var init_EmptyState = __esm({
|
|
|
15444
15831
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
15445
15832
|
onAction?.();
|
|
15446
15833
|
};
|
|
15447
|
-
const
|
|
15834
|
+
const iconName = typeof icon === "string" ? ICON_NAME_ALIASES[icon] ?? icon : void 0;
|
|
15835
|
+
const iconComponent = typeof icon === "function" ? icon : void 0;
|
|
15836
|
+
const hasIcon = Boolean(iconName || iconComponent);
|
|
15448
15837
|
const isDestructive = destructive || variant === "error";
|
|
15449
15838
|
const isSuccess = variant === "success";
|
|
15450
15839
|
const displayText = title || message || t("empty.noItems");
|
|
@@ -15457,7 +15846,7 @@ var init_EmptyState = __esm({
|
|
|
15457
15846
|
className
|
|
15458
15847
|
),
|
|
15459
15848
|
children: [
|
|
15460
|
-
|
|
15849
|
+
hasIcon && /* @__PURE__ */ jsx(
|
|
15461
15850
|
Box,
|
|
15462
15851
|
{
|
|
15463
15852
|
className: cn(
|
|
@@ -15465,8 +15854,9 @@ var init_EmptyState = __esm({
|
|
|
15465
15854
|
isDestructive ? "bg-error/10" : isSuccess ? "bg-success/10" : "bg-muted"
|
|
15466
15855
|
),
|
|
15467
15856
|
children: /* @__PURE__ */ jsx(
|
|
15468
|
-
|
|
15857
|
+
Icon,
|
|
15469
15858
|
{
|
|
15859
|
+
...iconName ? { name: iconName } : { icon: iconComponent },
|
|
15470
15860
|
className: cn(
|
|
15471
15861
|
"h-8 w-8",
|
|
15472
15862
|
isDestructive ? "text-error" : isSuccess ? "text-success" : "text-muted-foreground"
|
|
@@ -15836,7 +16226,7 @@ var init_Grid = __esm({
|
|
|
15836
16226
|
as: Component = "div"
|
|
15837
16227
|
}) => {
|
|
15838
16228
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
15839
|
-
return
|
|
16229
|
+
return React85__default.createElement(
|
|
15840
16230
|
Component,
|
|
15841
16231
|
{
|
|
15842
16232
|
className: cn(
|
|
@@ -16449,7 +16839,7 @@ var init_Breadcrumb = __esm({
|
|
|
16449
16839
|
init_useEventBus();
|
|
16450
16840
|
Breadcrumb = ({
|
|
16451
16841
|
items,
|
|
16452
|
-
separator =
|
|
16842
|
+
separator = "chevron-right",
|
|
16453
16843
|
maxItems,
|
|
16454
16844
|
className
|
|
16455
16845
|
}) => {
|
|
@@ -16478,7 +16868,7 @@ var init_Breadcrumb = __esm({
|
|
|
16478
16868
|
),
|
|
16479
16869
|
"aria-current": isLast ? "page" : void 0,
|
|
16480
16870
|
children: [
|
|
16481
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
16871
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16482
16872
|
/* @__PURE__ */ jsx(
|
|
16483
16873
|
Typography,
|
|
16484
16874
|
{
|
|
@@ -16505,7 +16895,7 @@ var init_Breadcrumb = __esm({
|
|
|
16505
16895
|
"aria-current": isLast ? "page" : void 0,
|
|
16506
16896
|
disabled: isLast,
|
|
16507
16897
|
children: [
|
|
16508
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
16898
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16509
16899
|
/* @__PURE__ */ jsx(
|
|
16510
16900
|
Typography,
|
|
16511
16901
|
{
|
|
@@ -16517,14 +16907,7 @@ var init_Breadcrumb = __esm({
|
|
|
16517
16907
|
]
|
|
16518
16908
|
}
|
|
16519
16909
|
),
|
|
16520
|
-
!isLast && /* @__PURE__ */ jsx(
|
|
16521
|
-
Icon,
|
|
16522
|
-
{
|
|
16523
|
-
icon: separator,
|
|
16524
|
-
size: "sm",
|
|
16525
|
-
className: "text-muted-foreground"
|
|
16526
|
-
}
|
|
16527
|
-
)
|
|
16910
|
+
!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" }))
|
|
16528
16911
|
] }, index);
|
|
16529
16912
|
}) })
|
|
16530
16913
|
}
|
|
@@ -16978,7 +17361,7 @@ function CalendarGrid({
|
|
|
16978
17361
|
{
|
|
16979
17362
|
variant: "ghost",
|
|
16980
17363
|
size: "sm",
|
|
16981
|
-
icon:
|
|
17364
|
+
icon: "chevron-left",
|
|
16982
17365
|
onClick: stepPrev,
|
|
16983
17366
|
"aria-disabled": !canPrev || void 0,
|
|
16984
17367
|
"aria-label": "Previous days",
|
|
@@ -16991,7 +17374,7 @@ function CalendarGrid({
|
|
|
16991
17374
|
{
|
|
16992
17375
|
variant: "ghost",
|
|
16993
17376
|
size: "sm",
|
|
16994
|
-
iconRight:
|
|
17377
|
+
iconRight: "chevron-right",
|
|
16995
17378
|
onClick: stepNext,
|
|
16996
17379
|
"aria-disabled": !canNext || void 0,
|
|
16997
17380
|
"aria-label": "Next days",
|
|
@@ -20905,7 +21288,7 @@ function CounterMinimal({
|
|
|
20905
21288
|
size: sizeStyles9[size].button,
|
|
20906
21289
|
onClick: onDecrement,
|
|
20907
21290
|
disabled: resolved.decrementDisabled,
|
|
20908
|
-
icon:
|
|
21291
|
+
icon: "minus",
|
|
20909
21292
|
children: resolved.decrementLabel
|
|
20910
21293
|
}
|
|
20911
21294
|
),
|
|
@@ -20927,7 +21310,7 @@ function CounterMinimal({
|
|
|
20927
21310
|
size: sizeStyles9[size].button,
|
|
20928
21311
|
onClick: onIncrement,
|
|
20929
21312
|
disabled: resolved.incrementDisabled,
|
|
20930
|
-
icon:
|
|
21313
|
+
icon: "plus",
|
|
20931
21314
|
children: resolved.incrementLabel
|
|
20932
21315
|
}
|
|
20933
21316
|
)
|
|
@@ -20973,7 +21356,7 @@ function CounterStandard({
|
|
|
20973
21356
|
size: sizeStyles9[size].button,
|
|
20974
21357
|
onClick: onDecrement,
|
|
20975
21358
|
disabled: resolved.decrementDisabled,
|
|
20976
|
-
icon:
|
|
21359
|
+
icon: "minus"
|
|
20977
21360
|
}
|
|
20978
21361
|
),
|
|
20979
21362
|
/* @__PURE__ */ jsx(
|
|
@@ -20983,7 +21366,7 @@ function CounterStandard({
|
|
|
20983
21366
|
size: sizeStyles9[size].button,
|
|
20984
21367
|
onClick: onIncrement,
|
|
20985
21368
|
disabled: resolved.incrementDisabled,
|
|
20986
|
-
icon:
|
|
21369
|
+
icon: "plus"
|
|
20987
21370
|
}
|
|
20988
21371
|
)
|
|
20989
21372
|
] }),
|
|
@@ -20993,7 +21376,7 @@ function CounterStandard({
|
|
|
20993
21376
|
variant: "ghost",
|
|
20994
21377
|
size: "sm",
|
|
20995
21378
|
onClick: onReset,
|
|
20996
|
-
icon:
|
|
21379
|
+
icon: "rotate-ccw",
|
|
20997
21380
|
children: "Reset"
|
|
20998
21381
|
}
|
|
20999
21382
|
)
|
|
@@ -21042,7 +21425,7 @@ function CounterFull({
|
|
|
21042
21425
|
size: sizeStyles9[size].button,
|
|
21043
21426
|
onClick: onDecrement,
|
|
21044
21427
|
disabled: resolved.decrementDisabled,
|
|
21045
|
-
icon:
|
|
21428
|
+
icon: "minus",
|
|
21046
21429
|
children: resolved.decrementLabel
|
|
21047
21430
|
}
|
|
21048
21431
|
),
|
|
@@ -21053,7 +21436,7 @@ function CounterFull({
|
|
|
21053
21436
|
size: sizeStyles9[size].button,
|
|
21054
21437
|
onClick: onIncrement,
|
|
21055
21438
|
disabled: resolved.incrementDisabled,
|
|
21056
|
-
icon:
|
|
21439
|
+
icon: "plus",
|
|
21057
21440
|
children: resolved.incrementLabel
|
|
21058
21441
|
}
|
|
21059
21442
|
)
|
|
@@ -21064,7 +21447,7 @@ function CounterFull({
|
|
|
21064
21447
|
variant: "ghost",
|
|
21065
21448
|
size: "sm",
|
|
21066
21449
|
onClick: onReset,
|
|
21067
|
-
icon:
|
|
21450
|
+
icon: "rotate-ccw",
|
|
21068
21451
|
children: "Reset to 0"
|
|
21069
21452
|
}
|
|
21070
21453
|
)
|
|
@@ -21112,7 +21495,7 @@ function CraftingRecipe({
|
|
|
21112
21495
|
className
|
|
21113
21496
|
}) {
|
|
21114
21497
|
const eventBus = useEventBus();
|
|
21115
|
-
const handleCraft =
|
|
21498
|
+
const handleCraft = React85.useCallback(() => {
|
|
21116
21499
|
onCraft?.();
|
|
21117
21500
|
if (craftEvent) {
|
|
21118
21501
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21129,7 +21512,7 @@ function CraftingRecipe({
|
|
|
21129
21512
|
children: [
|
|
21130
21513
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21131
21514
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21132
|
-
return /* @__PURE__ */ jsxs(
|
|
21515
|
+
return /* @__PURE__ */ jsxs(React85.Fragment, { children: [
|
|
21133
21516
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21134
21517
|
ItemSlot,
|
|
21135
21518
|
{
|
|
@@ -21192,8 +21575,8 @@ function DPad({
|
|
|
21192
21575
|
}) {
|
|
21193
21576
|
const eventBus = useEventBus();
|
|
21194
21577
|
const sizes = sizeMap15[size];
|
|
21195
|
-
const [activeDirections, setActiveDirections] =
|
|
21196
|
-
const handlePress =
|
|
21578
|
+
const [activeDirections, setActiveDirections] = React85.useState(/* @__PURE__ */ new Set());
|
|
21579
|
+
const handlePress = React85.useCallback(
|
|
21197
21580
|
(direction) => {
|
|
21198
21581
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21199
21582
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21201,7 +21584,7 @@ function DPad({
|
|
|
21201
21584
|
},
|
|
21202
21585
|
[directionEvent, eventBus, onDirection]
|
|
21203
21586
|
);
|
|
21204
|
-
const handleRelease =
|
|
21587
|
+
const handleRelease = React85.useCallback(
|
|
21205
21588
|
(direction) => {
|
|
21206
21589
|
setActiveDirections((prev) => {
|
|
21207
21590
|
const next = new Set(prev);
|
|
@@ -21452,7 +21835,7 @@ var init_DashboardLayout = __esm({
|
|
|
21452
21835
|
variant: "ghost",
|
|
21453
21836
|
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
21454
21837
|
onClick: () => setSidebarOpen(false),
|
|
21455
|
-
children: /* @__PURE__ */ jsx(
|
|
21838
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-5 w-5" })
|
|
21456
21839
|
}
|
|
21457
21840
|
)
|
|
21458
21841
|
]
|
|
@@ -21498,7 +21881,7 @@ var init_DashboardLayout = __esm({
|
|
|
21498
21881
|
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",
|
|
21499
21882
|
onClick: () => setSidebarOpen(true),
|
|
21500
21883
|
"aria-label": "Open sidebar",
|
|
21501
|
-
children: /* @__PURE__ */ jsx(
|
|
21884
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "menu", className: "h-5 w-5" })
|
|
21502
21885
|
}
|
|
21503
21886
|
),
|
|
21504
21887
|
isTopNav && /* @__PURE__ */ jsxs(
|
|
@@ -21541,7 +21924,7 @@ var init_DashboardLayout = __esm({
|
|
|
21541
21924
|
}
|
|
21542
21925
|
),
|
|
21543
21926
|
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: [
|
|
21544
|
-
/* @__PURE__ */ jsx(
|
|
21927
|
+
/* @__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" }),
|
|
21545
21928
|
/* @__PURE__ */ jsx(
|
|
21546
21929
|
Input,
|
|
21547
21930
|
{
|
|
@@ -21592,7 +21975,7 @@ var init_DashboardLayout = __esm({
|
|
|
21592
21975
|
onClick: handleNotificationClick,
|
|
21593
21976
|
"aria-label": t("common.notifications"),
|
|
21594
21977
|
children: [
|
|
21595
|
-
/* @__PURE__ */ jsx(
|
|
21978
|
+
/* @__PURE__ */ jsx(Icon, { name: "bell", className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
21596
21979
|
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
21597
21980
|
Box,
|
|
21598
21981
|
{
|
|
@@ -21630,7 +22013,7 @@ var init_DashboardLayout = __esm({
|
|
|
21630
22013
|
children: user.name
|
|
21631
22014
|
}
|
|
21632
22015
|
),
|
|
21633
|
-
/* @__PURE__ */ jsx(
|
|
22016
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "hidden @sm/dashboard:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
21634
22017
|
]
|
|
21635
22018
|
}
|
|
21636
22019
|
),
|
|
@@ -21673,7 +22056,7 @@ var init_DashboardLayout = __esm({
|
|
|
21673
22056
|
},
|
|
21674
22057
|
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",
|
|
21675
22058
|
children: [
|
|
21676
|
-
/* @__PURE__ */ jsx(
|
|
22059
|
+
/* @__PURE__ */ jsx(Icon, { name: "log-out", className: "h-4 w-4" }),
|
|
21677
22060
|
t("auth.signOut")
|
|
21678
22061
|
]
|
|
21679
22062
|
}
|
|
@@ -21855,14 +22238,14 @@ function useDataDnd(args) {
|
|
|
21855
22238
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21856
22239
|
const enabled = isZone || Boolean(dndRoot);
|
|
21857
22240
|
const eventBus = useEventBus();
|
|
21858
|
-
const parentRoot =
|
|
22241
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
21859
22242
|
const isRoot = enabled && parentRoot === null;
|
|
21860
|
-
const zoneId =
|
|
22243
|
+
const zoneId = React85__default.useId();
|
|
21861
22244
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
21862
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
21863
|
-
const optimisticOrdersRef =
|
|
22245
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
22246
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
21864
22247
|
optimisticOrdersRef.current = optimisticOrders;
|
|
21865
|
-
const clearOptimisticOrder =
|
|
22248
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
21866
22249
|
setOptimisticOrders((prev) => {
|
|
21867
22250
|
if (!prev.has(group)) return prev;
|
|
21868
22251
|
const next = new Map(prev);
|
|
@@ -21887,7 +22270,7 @@ function useDataDnd(args) {
|
|
|
21887
22270
|
const raw = it[dndItemIdField];
|
|
21888
22271
|
return String(raw ?? `__idx_${idx}`);
|
|
21889
22272
|
}).join("|");
|
|
21890
|
-
const itemIds =
|
|
22273
|
+
const itemIds = React85__default.useMemo(
|
|
21891
22274
|
() => orderedItems.map((it, idx) => {
|
|
21892
22275
|
const raw = it[dndItemIdField];
|
|
21893
22276
|
return raw ?? `__idx_${idx}`;
|
|
@@ -21895,7 +22278,7 @@ function useDataDnd(args) {
|
|
|
21895
22278
|
[itemIdsSignature]
|
|
21896
22279
|
);
|
|
21897
22280
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
21898
|
-
|
|
22281
|
+
React85__default.useEffect(() => {
|
|
21899
22282
|
const root = isRoot ? null : parentRoot;
|
|
21900
22283
|
if (root) {
|
|
21901
22284
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -21903,20 +22286,20 @@ function useDataDnd(args) {
|
|
|
21903
22286
|
clearOptimisticOrder(ownGroup);
|
|
21904
22287
|
}
|
|
21905
22288
|
}, [itemsContentSig, ownGroup]);
|
|
21906
|
-
const zonesRef =
|
|
21907
|
-
const registerZone =
|
|
22289
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
22290
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
21908
22291
|
zonesRef.current.set(zoneId2, meta2);
|
|
21909
22292
|
}, []);
|
|
21910
|
-
const unregisterZone =
|
|
22293
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
21911
22294
|
zonesRef.current.delete(zoneId2);
|
|
21912
22295
|
}, []);
|
|
21913
|
-
const [activeDrag, setActiveDrag] =
|
|
21914
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
21915
|
-
const meta =
|
|
22296
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
22297
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
22298
|
+
const meta = React85__default.useMemo(
|
|
21916
22299
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
21917
22300
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
21918
22301
|
);
|
|
21919
|
-
|
|
22302
|
+
React85__default.useEffect(() => {
|
|
21920
22303
|
const target = isRoot ? null : parentRoot;
|
|
21921
22304
|
if (!target) {
|
|
21922
22305
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -21935,7 +22318,7 @@ function useDataDnd(args) {
|
|
|
21935
22318
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
21936
22319
|
const sensors = useAlmadarDndSensors(true);
|
|
21937
22320
|
const collisionDetection = almadarDndCollisionDetection;
|
|
21938
|
-
const findZoneByItem =
|
|
22321
|
+
const findZoneByItem = React85__default.useCallback(
|
|
21939
22322
|
(id) => {
|
|
21940
22323
|
for (const z of zonesRef.current.values()) {
|
|
21941
22324
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -21944,7 +22327,7 @@ function useDataDnd(args) {
|
|
|
21944
22327
|
},
|
|
21945
22328
|
[]
|
|
21946
22329
|
);
|
|
21947
|
-
|
|
22330
|
+
React85__default.useCallback(
|
|
21948
22331
|
(group) => {
|
|
21949
22332
|
for (const z of zonesRef.current.values()) {
|
|
21950
22333
|
if (z.group === group) return z;
|
|
@@ -21953,7 +22336,7 @@ function useDataDnd(args) {
|
|
|
21953
22336
|
},
|
|
21954
22337
|
[]
|
|
21955
22338
|
);
|
|
21956
|
-
const handleDragEnd =
|
|
22339
|
+
const handleDragEnd = React85__default.useCallback(
|
|
21957
22340
|
(event) => {
|
|
21958
22341
|
const { active, over } = event;
|
|
21959
22342
|
const activeIdStr = String(active.id);
|
|
@@ -22044,12 +22427,12 @@ function useDataDnd(args) {
|
|
|
22044
22427
|
},
|
|
22045
22428
|
[eventBus]
|
|
22046
22429
|
);
|
|
22047
|
-
const sortableData =
|
|
22048
|
-
const SortableItem =
|
|
22430
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22431
|
+
const SortableItem = React85__default.useCallback(
|
|
22049
22432
|
({ id, children }) => {
|
|
22050
22433
|
const {
|
|
22051
22434
|
attributes,
|
|
22052
|
-
listeners:
|
|
22435
|
+
listeners: listeners7,
|
|
22053
22436
|
setNodeRef,
|
|
22054
22437
|
transform,
|
|
22055
22438
|
transition,
|
|
@@ -22072,7 +22455,7 @@ function useDataDnd(args) {
|
|
|
22072
22455
|
ref: setNodeRef,
|
|
22073
22456
|
style,
|
|
22074
22457
|
...attributes,
|
|
22075
|
-
...
|
|
22458
|
+
...listeners7,
|
|
22076
22459
|
children
|
|
22077
22460
|
}
|
|
22078
22461
|
);
|
|
@@ -22085,7 +22468,7 @@ function useDataDnd(args) {
|
|
|
22085
22468
|
id: droppableId,
|
|
22086
22469
|
data: sortableData
|
|
22087
22470
|
});
|
|
22088
|
-
const ctx =
|
|
22471
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
22089
22472
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22090
22473
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22091
22474
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22100,7 +22483,7 @@ function useDataDnd(args) {
|
|
|
22100
22483
|
showForeignPlaceholder,
|
|
22101
22484
|
ctxAvailable: ctx != null
|
|
22102
22485
|
});
|
|
22103
|
-
|
|
22486
|
+
React85__default.useEffect(() => {
|
|
22104
22487
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22105
22488
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22106
22489
|
return /* @__PURE__ */ jsx(
|
|
@@ -22114,11 +22497,11 @@ function useDataDnd(args) {
|
|
|
22114
22497
|
}
|
|
22115
22498
|
);
|
|
22116
22499
|
};
|
|
22117
|
-
const rootContextValue =
|
|
22500
|
+
const rootContextValue = React85__default.useMemo(
|
|
22118
22501
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22119
22502
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22120
22503
|
);
|
|
22121
|
-
const handleDragStart =
|
|
22504
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
22122
22505
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22123
22506
|
const rect = event.active.rect.current.initial;
|
|
22124
22507
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22137,7 +22520,7 @@ function useDataDnd(args) {
|
|
|
22137
22520
|
isRoot
|
|
22138
22521
|
});
|
|
22139
22522
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22140
|
-
const handleDragOver =
|
|
22523
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
22141
22524
|
const { active, over } = event;
|
|
22142
22525
|
const overData = over?.data?.current;
|
|
22143
22526
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22207,7 +22590,7 @@ function useDataDnd(args) {
|
|
|
22207
22590
|
return next;
|
|
22208
22591
|
});
|
|
22209
22592
|
}, []);
|
|
22210
|
-
const handleDragCancel =
|
|
22593
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
22211
22594
|
setActiveDrag(null);
|
|
22212
22595
|
setOverZoneGroup(null);
|
|
22213
22596
|
dndLog.warn("dragCancel", {
|
|
@@ -22215,12 +22598,12 @@ function useDataDnd(args) {
|
|
|
22215
22598
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22216
22599
|
});
|
|
22217
22600
|
}, []);
|
|
22218
|
-
const handleDragEndWithCleanup =
|
|
22601
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
22219
22602
|
handleDragEnd(event);
|
|
22220
22603
|
setActiveDrag(null);
|
|
22221
22604
|
setOverZoneGroup(null);
|
|
22222
22605
|
}, [handleDragEnd]);
|
|
22223
|
-
const wrapContainer =
|
|
22606
|
+
const wrapContainer = React85__default.useCallback(
|
|
22224
22607
|
(children) => {
|
|
22225
22608
|
if (!enabled) return children;
|
|
22226
22609
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22274,7 +22657,7 @@ var init_useDataDnd = __esm({
|
|
|
22274
22657
|
init_useAlmadarDndCollision();
|
|
22275
22658
|
init_Box();
|
|
22276
22659
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22277
|
-
RootCtx =
|
|
22660
|
+
RootCtx = React85__default.createContext(null);
|
|
22278
22661
|
}
|
|
22279
22662
|
});
|
|
22280
22663
|
function fieldLabel2(key) {
|
|
@@ -22763,7 +23146,7 @@ function DataList({
|
|
|
22763
23146
|
}) {
|
|
22764
23147
|
const eventBus = useEventBus();
|
|
22765
23148
|
const { t } = useTranslate();
|
|
22766
|
-
const [visibleCount, setVisibleCount] =
|
|
23149
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
22767
23150
|
const fieldDefs = fields ?? columns ?? [];
|
|
22768
23151
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22769
23152
|
const dnd = useDataDnd({
|
|
@@ -22782,7 +23165,7 @@ function DataList({
|
|
|
22782
23165
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22783
23166
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22784
23167
|
const hasRenderProp = typeof children === "function";
|
|
22785
|
-
|
|
23168
|
+
React85__default.useEffect(() => {
|
|
22786
23169
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22787
23170
|
const childrenTypeOf = typeof children;
|
|
22788
23171
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -22839,7 +23222,7 @@ function DataList({
|
|
|
22839
23222
|
const items2 = data.map((item) => item);
|
|
22840
23223
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22841
23224
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
22842
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23225
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
22843
23226
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22844
23227
|
group.items.map((itemData, index) => {
|
|
22845
23228
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23027,7 +23410,7 @@ function DataList({
|
|
|
23027
23410
|
className
|
|
23028
23411
|
),
|
|
23029
23412
|
children: [
|
|
23030
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23413
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
23031
23414
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23032
23415
|
group.items.map(
|
|
23033
23416
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23253,6 +23636,7 @@ var init_FilterGroup = __esm({
|
|
|
23253
23636
|
init_Select();
|
|
23254
23637
|
init_Badge();
|
|
23255
23638
|
init_Stack();
|
|
23639
|
+
init_Icon();
|
|
23256
23640
|
init_useEventBus();
|
|
23257
23641
|
init_useQuerySingleton();
|
|
23258
23642
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
@@ -23321,7 +23705,7 @@ var init_FilterGroup = __esm({
|
|
|
23321
23705
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
23322
23706
|
if (variant === "pills") {
|
|
23323
23707
|
return /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: cn("flex-wrap", className), children: [
|
|
23324
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
23708
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23325
23709
|
filters.map((filter) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
23326
23710
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-[var(--font-weight-medium)] text-muted-foreground", children: [
|
|
23327
23711
|
filter.label,
|
|
@@ -23369,7 +23753,7 @@ var init_FilterGroup = __esm({
|
|
|
23369
23753
|
variant: "ghost",
|
|
23370
23754
|
size: "sm",
|
|
23371
23755
|
onClick: handleClearAll,
|
|
23372
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
23756
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23373
23757
|
children: "Clear"
|
|
23374
23758
|
}
|
|
23375
23759
|
)
|
|
@@ -23378,7 +23762,7 @@ var init_FilterGroup = __esm({
|
|
|
23378
23762
|
if (variant === "vertical") {
|
|
23379
23763
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
23380
23764
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23381
|
-
/* @__PURE__ */ jsx(
|
|
23765
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23382
23766
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23383
23767
|
] }),
|
|
23384
23768
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -23451,7 +23835,7 @@ var init_FilterGroup = __esm({
|
|
|
23451
23835
|
variant: "ghost",
|
|
23452
23836
|
size: "sm",
|
|
23453
23837
|
onClick: handleClearAll,
|
|
23454
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
23838
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23455
23839
|
className: "self-start",
|
|
23456
23840
|
children: "Clear all"
|
|
23457
23841
|
}
|
|
@@ -23460,7 +23844,7 @@ var init_FilterGroup = __esm({
|
|
|
23460
23844
|
}
|
|
23461
23845
|
if (variant === "compact") {
|
|
23462
23846
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: cn("flex-wrap", className), children: [
|
|
23463
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
23847
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23464
23848
|
filters.map((filter) => /* @__PURE__ */ jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsx(
|
|
23465
23849
|
Input,
|
|
23466
23850
|
{
|
|
@@ -23536,7 +23920,7 @@ var init_FilterGroup = __esm({
|
|
|
23536
23920
|
filterDef?.label,
|
|
23537
23921
|
": ",
|
|
23538
23922
|
value,
|
|
23539
|
-
/* @__PURE__ */ jsx(
|
|
23923
|
+
/* @__PURE__ */ jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
|
|
23540
23924
|
]
|
|
23541
23925
|
},
|
|
23542
23926
|
field
|
|
@@ -23563,7 +23947,7 @@ var init_FilterGroup = __esm({
|
|
|
23563
23947
|
align: "center",
|
|
23564
23948
|
className: "text-muted-foreground",
|
|
23565
23949
|
children: [
|
|
23566
|
-
/* @__PURE__ */ jsx(
|
|
23950
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23567
23951
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23568
23952
|
]
|
|
23569
23953
|
}
|
|
@@ -23649,7 +24033,7 @@ var init_FilterGroup = __esm({
|
|
|
23649
24033
|
variant: "ghost",
|
|
23650
24034
|
size: "sm",
|
|
23651
24035
|
onClick: handleClearAll,
|
|
23652
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24036
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23653
24037
|
children: "Clear all"
|
|
23654
24038
|
}
|
|
23655
24039
|
)
|
|
@@ -23866,6 +24250,7 @@ var init_RelationSelect = __esm({
|
|
|
23866
24250
|
"use client";
|
|
23867
24251
|
init_cn();
|
|
23868
24252
|
init_Box();
|
|
24253
|
+
init_Icon();
|
|
23869
24254
|
init_Stack();
|
|
23870
24255
|
init_Input();
|
|
23871
24256
|
init_Button();
|
|
@@ -24009,12 +24394,13 @@ var init_RelationSelect = __esm({
|
|
|
24009
24394
|
as: "button",
|
|
24010
24395
|
className: "p-0.5 hover:bg-muted rounded cursor-pointer",
|
|
24011
24396
|
onClick: handleClear,
|
|
24012
|
-
children: /* @__PURE__ */ jsx(
|
|
24397
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-4 w-4 text-muted-foreground" })
|
|
24013
24398
|
}
|
|
24014
24399
|
),
|
|
24015
24400
|
/* @__PURE__ */ jsx(
|
|
24016
|
-
|
|
24401
|
+
Icon,
|
|
24017
24402
|
{
|
|
24403
|
+
name: "chevron-down",
|
|
24018
24404
|
className: cn(
|
|
24019
24405
|
"h-4 w-4 text-muted-foreground transition-transform",
|
|
24020
24406
|
isOpen && "transform rotate-180"
|
|
@@ -24245,7 +24631,7 @@ var init_SidePanel = __esm({
|
|
|
24245
24631
|
{
|
|
24246
24632
|
variant: "ghost",
|
|
24247
24633
|
size: "sm",
|
|
24248
|
-
icon:
|
|
24634
|
+
icon: "x",
|
|
24249
24635
|
onClick: handleClose,
|
|
24250
24636
|
"aria-label": "Close panel",
|
|
24251
24637
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
@@ -24303,7 +24689,7 @@ var init_WizardProgress = __esm({
|
|
|
24303
24689
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24304
24690
|
const isActive = index === currentStep;
|
|
24305
24691
|
const isCompleted = index < currentStep;
|
|
24306
|
-
return /* @__PURE__ */ jsxs(
|
|
24692
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24307
24693
|
/* @__PURE__ */ jsx(
|
|
24308
24694
|
"button",
|
|
24309
24695
|
{
|
|
@@ -24317,7 +24703,7 @@ var init_WizardProgress = __esm({
|
|
|
24317
24703
|
isCompleted && "bg-foreground text-background cursor-pointer hover:bg-muted-foreground",
|
|
24318
24704
|
!isActive && !isCompleted && "bg-card text-foreground"
|
|
24319
24705
|
),
|
|
24320
|
-
children: isCompleted ? /* @__PURE__ */ jsx(Icon, {
|
|
24706
|
+
children: isCompleted ? /* @__PURE__ */ jsx(Icon, { name: "check", size: "sm" }) : index + 1
|
|
24321
24707
|
}
|
|
24322
24708
|
),
|
|
24323
24709
|
!compact && /* @__PURE__ */ jsx(
|
|
@@ -24436,13 +24822,13 @@ var init_WizardNavigation = __esm({
|
|
|
24436
24822
|
),
|
|
24437
24823
|
children: [
|
|
24438
24824
|
showBack ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", onClick: handleBack, disabled: isFirstStep, children: [
|
|
24439
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
24825
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
24440
24826
|
resolvedBackLabel
|
|
24441
24827
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
24442
24828
|
/* @__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) }) }) }),
|
|
24443
24829
|
isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
24444
24830
|
resolvedNextLabel,
|
|
24445
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
24831
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
24446
24832
|
] }) : /* @__PURE__ */ jsx(Box, {})
|
|
24447
24833
|
]
|
|
24448
24834
|
}
|
|
@@ -25290,10 +25676,7 @@ function StatBadge({
|
|
|
25290
25676
|
className
|
|
25291
25677
|
),
|
|
25292
25678
|
children: [
|
|
25293
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? (
|
|
25294
|
-
const I = resolveIcon(icon);
|
|
25295
|
-
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
25296
|
-
})() : icon }),
|
|
25679
|
+
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 }),
|
|
25297
25680
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
25298
25681
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
25299
25682
|
HealthBar,
|
|
@@ -25361,7 +25744,7 @@ function InventoryGrid({
|
|
|
25361
25744
|
const eventBus = useEventBus();
|
|
25362
25745
|
const slotCount = totalSlots ?? items.length;
|
|
25363
25746
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
25364
|
-
const handleSelect =
|
|
25747
|
+
const handleSelect = React85.useCallback(
|
|
25365
25748
|
(id) => {
|
|
25366
25749
|
onSelect?.(id);
|
|
25367
25750
|
if (selectEvent) {
|
|
@@ -25574,15 +25957,15 @@ function GameCanvas2D({
|
|
|
25574
25957
|
fps = 60,
|
|
25575
25958
|
className
|
|
25576
25959
|
}) {
|
|
25577
|
-
const canvasRef =
|
|
25578
|
-
const rafRef =
|
|
25579
|
-
const frameRef =
|
|
25580
|
-
const lastTimeRef =
|
|
25581
|
-
const onDrawRef =
|
|
25960
|
+
const canvasRef = React85.useRef(null);
|
|
25961
|
+
const rafRef = React85.useRef(0);
|
|
25962
|
+
const frameRef = React85.useRef(0);
|
|
25963
|
+
const lastTimeRef = React85.useRef(0);
|
|
25964
|
+
const onDrawRef = React85.useRef(onDraw);
|
|
25582
25965
|
onDrawRef.current = onDraw;
|
|
25583
|
-
const onTickRef =
|
|
25966
|
+
const onTickRef = React85.useRef(onTick);
|
|
25584
25967
|
onTickRef.current = onTick;
|
|
25585
|
-
|
|
25968
|
+
React85.useEffect(() => {
|
|
25586
25969
|
const canvas = canvasRef.current;
|
|
25587
25970
|
if (!canvas) return;
|
|
25588
25971
|
const ctx = canvas.getContext("2d");
|
|
@@ -25871,7 +26254,7 @@ function TurnPanel({
|
|
|
25871
26254
|
className
|
|
25872
26255
|
}) {
|
|
25873
26256
|
const eventBus = useEventBus();
|
|
25874
|
-
const handleAction =
|
|
26257
|
+
const handleAction = React85.useCallback(
|
|
25875
26258
|
(event) => {
|
|
25876
26259
|
if (event) {
|
|
25877
26260
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -26017,7 +26400,7 @@ function UnitCommandBar({
|
|
|
26017
26400
|
className
|
|
26018
26401
|
}) {
|
|
26019
26402
|
const eventBus = useEventBus();
|
|
26020
|
-
const handleCommand =
|
|
26403
|
+
const handleCommand = React85.useCallback(
|
|
26021
26404
|
(event) => {
|
|
26022
26405
|
if (event) {
|
|
26023
26406
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -26502,7 +26885,7 @@ function GameMenu({
|
|
|
26502
26885
|
} catch {
|
|
26503
26886
|
}
|
|
26504
26887
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26505
|
-
const handleOptionClick =
|
|
26888
|
+
const handleOptionClick = React85.useCallback(
|
|
26506
26889
|
(option) => {
|
|
26507
26890
|
if (option.event && eventBus) {
|
|
26508
26891
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26616,7 +26999,7 @@ function GameOverScreen({
|
|
|
26616
26999
|
} catch {
|
|
26617
27000
|
}
|
|
26618
27001
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26619
|
-
const handleActionClick =
|
|
27002
|
+
const handleActionClick = React85.useCallback(
|
|
26620
27003
|
(action) => {
|
|
26621
27004
|
if (action.event && eventBus) {
|
|
26622
27005
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -27324,6 +27707,7 @@ var init_NumberStepper = __esm({
|
|
|
27324
27707
|
"components/molecules/NumberStepper.tsx"() {
|
|
27325
27708
|
"use client";
|
|
27326
27709
|
init_cn();
|
|
27710
|
+
init_Icon();
|
|
27327
27711
|
init_useEventBus();
|
|
27328
27712
|
sizeStyles10 = {
|
|
27329
27713
|
sm: {
|
|
@@ -27442,7 +27826,7 @@ var init_NumberStepper = __esm({
|
|
|
27442
27826
|
styles.button
|
|
27443
27827
|
),
|
|
27444
27828
|
"aria-label": "Decrease",
|
|
27445
|
-
children: /* @__PURE__ */ jsx(
|
|
27829
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "minus", className: styles.icon })
|
|
27446
27830
|
}
|
|
27447
27831
|
),
|
|
27448
27832
|
/* @__PURE__ */ jsx(
|
|
@@ -27483,7 +27867,7 @@ var init_NumberStepper = __esm({
|
|
|
27483
27867
|
styles.button
|
|
27484
27868
|
),
|
|
27485
27869
|
"aria-label": "Increase",
|
|
27486
|
-
children: /* @__PURE__ */ jsx(
|
|
27870
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles.icon })
|
|
27487
27871
|
}
|
|
27488
27872
|
)
|
|
27489
27873
|
]
|
|
@@ -27508,6 +27892,7 @@ var init_StarRating = __esm({
|
|
|
27508
27892
|
"components/molecules/StarRating.tsx"() {
|
|
27509
27893
|
"use client";
|
|
27510
27894
|
init_cn();
|
|
27895
|
+
init_Icon();
|
|
27511
27896
|
init_useEventBus();
|
|
27512
27897
|
sizeStyles11 = {
|
|
27513
27898
|
sm: { star: "w-4 h-4", gap: "gap-0.5" },
|
|
@@ -27594,8 +27979,9 @@ var init_StarRating = __esm({
|
|
|
27594
27979
|
},
|
|
27595
27980
|
children: [
|
|
27596
27981
|
/* @__PURE__ */ jsx(
|
|
27597
|
-
|
|
27982
|
+
Icon,
|
|
27598
27983
|
{
|
|
27984
|
+
name: "star",
|
|
27599
27985
|
className: cn(
|
|
27600
27986
|
styles.star,
|
|
27601
27987
|
"text-muted",
|
|
@@ -27605,8 +27991,9 @@ var init_StarRating = __esm({
|
|
|
27605
27991
|
}
|
|
27606
27992
|
),
|
|
27607
27993
|
(isFull || isHalf) && /* @__PURE__ */ jsx(
|
|
27608
|
-
|
|
27994
|
+
Icon,
|
|
27609
27995
|
{
|
|
27996
|
+
name: "star",
|
|
27610
27997
|
className: cn(
|
|
27611
27998
|
styles.star,
|
|
27612
27999
|
"absolute inset-0",
|
|
@@ -27798,7 +28185,7 @@ var init_UploadDropZone = __esm({
|
|
|
27798
28185
|
"aria-hidden": "true"
|
|
27799
28186
|
}
|
|
27800
28187
|
),
|
|
27801
|
-
error ? /* @__PURE__ */ jsx(Icon, {
|
|
28188
|
+
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" }),
|
|
27802
28189
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "Drop files here" : label }),
|
|
27803
28190
|
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 })
|
|
27804
28191
|
]
|
|
@@ -27822,6 +28209,7 @@ var Lightbox;
|
|
|
27822
28209
|
var init_Lightbox = __esm({
|
|
27823
28210
|
"components/molecules/Lightbox.tsx"() {
|
|
27824
28211
|
"use client";
|
|
28212
|
+
init_Icon();
|
|
27825
28213
|
init_cn();
|
|
27826
28214
|
init_useEventBus();
|
|
27827
28215
|
Lightbox = ({
|
|
@@ -27929,7 +28317,7 @@ var init_Lightbox = __esm({
|
|
|
27929
28317
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27930
28318
|
),
|
|
27931
28319
|
"aria-label": "Close",
|
|
27932
|
-
children: /* @__PURE__ */ jsx(
|
|
28320
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
27933
28321
|
}
|
|
27934
28322
|
),
|
|
27935
28323
|
hasPrev && safeImages.length > 1 && /* @__PURE__ */ jsx(
|
|
@@ -27948,7 +28336,7 @@ var init_Lightbox = __esm({
|
|
|
27948
28336
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27949
28337
|
),
|
|
27950
28338
|
"aria-label": "Previous image",
|
|
27951
|
-
children: /* @__PURE__ */ jsx(
|
|
28339
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
27952
28340
|
}
|
|
27953
28341
|
),
|
|
27954
28342
|
/* @__PURE__ */ jsx(
|
|
@@ -27985,7 +28373,7 @@ var init_Lightbox = __esm({
|
|
|
27985
28373
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
27986
28374
|
),
|
|
27987
28375
|
"aria-label": "Next image",
|
|
27988
|
-
children: /* @__PURE__ */ jsx(
|
|
28376
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
27989
28377
|
}
|
|
27990
28378
|
),
|
|
27991
28379
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
|
|
@@ -28928,7 +29316,7 @@ var init_PricingCard = __esm({
|
|
|
28928
29316
|
/* @__PURE__ */ jsx(
|
|
28929
29317
|
Icon,
|
|
28930
29318
|
{
|
|
28931
|
-
|
|
29319
|
+
name: "check",
|
|
28932
29320
|
size: "sm",
|
|
28933
29321
|
className: "flex-shrink-0 text-success"
|
|
28934
29322
|
}
|
|
@@ -29146,7 +29534,7 @@ var init_StepFlow = __esm({
|
|
|
29146
29534
|
className
|
|
29147
29535
|
}) => {
|
|
29148
29536
|
if (orientation === "vertical") {
|
|
29149
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29537
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29150
29538
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29151
29539
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29152
29540
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29157,7 +29545,7 @@ var init_StepFlow = __esm({
|
|
|
29157
29545
|
] })
|
|
29158
29546
|
] }) }, index)) });
|
|
29159
29547
|
}
|
|
29160
|
-
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(
|
|
29548
|
+
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(React85__default.Fragment, { children: [
|
|
29161
29549
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29162
29550
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29163
29551
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -29971,6 +30359,7 @@ var init_VoteStack = __esm({
|
|
|
29971
30359
|
"components/molecules/VoteStack.tsx"() {
|
|
29972
30360
|
"use client";
|
|
29973
30361
|
init_cn();
|
|
30362
|
+
init_Icon();
|
|
29974
30363
|
init_useEventBus();
|
|
29975
30364
|
sizeStyles12 = {
|
|
29976
30365
|
sm: {
|
|
@@ -30052,7 +30441,7 @@ var init_VoteStack = __esm({
|
|
|
30052
30441
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30053
30442
|
styles.button
|
|
30054
30443
|
),
|
|
30055
|
-
children: /* @__PURE__ */ jsx(
|
|
30444
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
30056
30445
|
}
|
|
30057
30446
|
),
|
|
30058
30447
|
/* @__PURE__ */ jsx(
|
|
@@ -30089,7 +30478,7 @@ var init_VoteStack = __esm({
|
|
|
30089
30478
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30090
30479
|
styles.button
|
|
30091
30480
|
),
|
|
30092
|
-
children: /* @__PURE__ */ jsx(
|
|
30481
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
30093
30482
|
}
|
|
30094
30483
|
)
|
|
30095
30484
|
]
|
|
@@ -30131,7 +30520,7 @@ var init_LikertScale = __esm({
|
|
|
30131
30520
|
md: "text-base",
|
|
30132
30521
|
lg: "text-lg"
|
|
30133
30522
|
};
|
|
30134
|
-
LikertScale =
|
|
30523
|
+
LikertScale = React85__default.forwardRef(
|
|
30135
30524
|
({
|
|
30136
30525
|
question,
|
|
30137
30526
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30143,7 +30532,7 @@ var init_LikertScale = __esm({
|
|
|
30143
30532
|
variant = "radios",
|
|
30144
30533
|
className
|
|
30145
30534
|
}, ref) => {
|
|
30146
|
-
const groupId =
|
|
30535
|
+
const groupId = React85__default.useId();
|
|
30147
30536
|
const eventBus = useEventBus();
|
|
30148
30537
|
const handleSelect = useCallback(
|
|
30149
30538
|
(next) => {
|
|
@@ -30423,6 +30812,7 @@ var init_QrScanner = __esm({
|
|
|
30423
30812
|
"use client";
|
|
30424
30813
|
init_cn();
|
|
30425
30814
|
init_atoms();
|
|
30815
|
+
init_Icon();
|
|
30426
30816
|
init_useEventBus();
|
|
30427
30817
|
QrScanner = ({
|
|
30428
30818
|
onScan,
|
|
@@ -30573,7 +30963,7 @@ var init_QrScanner = __esm({
|
|
|
30573
30963
|
padding: "lg",
|
|
30574
30964
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
30575
30965
|
children: [
|
|
30576
|
-
/* @__PURE__ */ jsx(
|
|
30966
|
+
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
30577
30967
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "Camera unavailable" }),
|
|
30578
30968
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
30579
30969
|
]
|
|
@@ -30605,7 +30995,7 @@ var init_QrScanner = __esm({
|
|
|
30605
30995
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30606
30996
|
),
|
|
30607
30997
|
"aria-label": isPaused ? "Resume scanning" : "Pause scanning",
|
|
30608
|
-
children: isPaused ? /* @__PURE__ */ jsx(
|
|
30998
|
+
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
30609
30999
|
}
|
|
30610
31000
|
),
|
|
30611
31001
|
/* @__PURE__ */ jsx(
|
|
@@ -30618,7 +31008,7 @@ var init_QrScanner = __esm({
|
|
|
30618
31008
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
30619
31009
|
),
|
|
30620
31010
|
"aria-label": `Switch to ${currentFacing === "environment" ? "front" : "rear"} camera`,
|
|
30621
|
-
children: /* @__PURE__ */ jsx(
|
|
31011
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
30622
31012
|
}
|
|
30623
31013
|
),
|
|
30624
31014
|
/* @__PURE__ */ jsx(
|
|
@@ -30834,11 +31224,11 @@ function getShapeClasses(shape) {
|
|
|
30834
31224
|
function getStatusIcon(status) {
|
|
30835
31225
|
switch (status) {
|
|
30836
31226
|
case "seated":
|
|
30837
|
-
return /* @__PURE__ */ jsx(
|
|
31227
|
+
return /* @__PURE__ */ jsx(Icon, { name: "users", className: "w-4 h-4" });
|
|
30838
31228
|
case "ordered":
|
|
30839
|
-
return /* @__PURE__ */ jsx(
|
|
31229
|
+
return /* @__PURE__ */ jsx(Icon, { name: "coffee", className: "w-4 h-4" });
|
|
30840
31230
|
case "awaiting-bill":
|
|
30841
|
-
return /* @__PURE__ */ jsx(
|
|
31231
|
+
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", className: "w-4 h-4" });
|
|
30842
31232
|
default:
|
|
30843
31233
|
return null;
|
|
30844
31234
|
}
|
|
@@ -30850,6 +31240,7 @@ var init_PositionedCanvas = __esm({
|
|
|
30850
31240
|
init_cn();
|
|
30851
31241
|
init_useEventBus();
|
|
30852
31242
|
init_atoms();
|
|
31243
|
+
init_Icon();
|
|
30853
31244
|
STATUS_CLASSES = {
|
|
30854
31245
|
empty: "bg-surface border-border text-foreground",
|
|
30855
31246
|
seated: "bg-surface border-success text-success",
|
|
@@ -31154,7 +31545,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31154
31545
|
"transition-opacity"
|
|
31155
31546
|
),
|
|
31156
31547
|
onClick: () => setOpen((v) => !v),
|
|
31157
|
-
children: /* @__PURE__ */ jsx(
|
|
31548
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", className: "w-3.5 h-3.5" })
|
|
31158
31549
|
}
|
|
31159
31550
|
),
|
|
31160
31551
|
open && /* @__PURE__ */ jsxs(
|
|
@@ -31180,7 +31571,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31180
31571
|
setOpen(false);
|
|
31181
31572
|
},
|
|
31182
31573
|
children: [
|
|
31183
|
-
/* @__PURE__ */ jsx(
|
|
31574
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
31184
31575
|
" Duplicate"
|
|
31185
31576
|
]
|
|
31186
31577
|
}
|
|
@@ -31197,7 +31588,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31197
31588
|
setOpen(false);
|
|
31198
31589
|
},
|
|
31199
31590
|
children: [
|
|
31200
|
-
/* @__PURE__ */ jsx(
|
|
31591
|
+
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
31201
31592
|
" Delete"
|
|
31202
31593
|
]
|
|
31203
31594
|
}
|
|
@@ -31426,7 +31817,7 @@ function BlockRow({
|
|
|
31426
31817
|
"text-sm text-muted-foreground"
|
|
31427
31818
|
),
|
|
31428
31819
|
children: [
|
|
31429
|
-
/* @__PURE__ */ jsx(
|
|
31820
|
+
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
31430
31821
|
" No image URL set"
|
|
31431
31822
|
]
|
|
31432
31823
|
}
|
|
@@ -31500,7 +31891,7 @@ function BlockRow({
|
|
|
31500
31891
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
31501
31892
|
),
|
|
31502
31893
|
onClick: () => removeListItem(child.id),
|
|
31503
|
-
children: /* @__PURE__ */ jsx(
|
|
31894
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3 h-3" })
|
|
31504
31895
|
}
|
|
31505
31896
|
)
|
|
31506
31897
|
] }, child.id)),
|
|
@@ -31515,7 +31906,7 @@ function BlockRow({
|
|
|
31515
31906
|
),
|
|
31516
31907
|
onClick: addListItem,
|
|
31517
31908
|
children: [
|
|
31518
|
-
/* @__PURE__ */ jsx(
|
|
31909
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
31519
31910
|
" Add item"
|
|
31520
31911
|
]
|
|
31521
31912
|
}
|
|
@@ -31564,7 +31955,7 @@ function BlockRow({
|
|
|
31564
31955
|
"transition-opacity"
|
|
31565
31956
|
),
|
|
31566
31957
|
onClick: () => onInsertAfter("paragraph"),
|
|
31567
|
-
children: /* @__PURE__ */ jsx(
|
|
31958
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" })
|
|
31568
31959
|
}
|
|
31569
31960
|
),
|
|
31570
31961
|
/* @__PURE__ */ jsx(
|
|
@@ -31594,6 +31985,7 @@ var init_RichBlockEditor = __esm({
|
|
|
31594
31985
|
init_Box();
|
|
31595
31986
|
init_Divider();
|
|
31596
31987
|
init_Input();
|
|
31988
|
+
init_Icon();
|
|
31597
31989
|
init_useEventBus();
|
|
31598
31990
|
TOOLBAR_ENTRIES = [
|
|
31599
31991
|
{ type: "paragraph", label: "Text", icon: Type },
|
|
@@ -31837,7 +32229,7 @@ var init_ReplyTree = __esm({
|
|
|
31837
32229
|
onClick: handleToggle,
|
|
31838
32230
|
"aria-label": isCollapsed ? "Expand replies" : "Collapse replies",
|
|
31839
32231
|
"aria-expanded": !isCollapsed,
|
|
31840
|
-
leftIcon: isCollapsed ?
|
|
32232
|
+
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
31841
32233
|
className: cn(
|
|
31842
32234
|
"w-6 h-6 p-0 min-w-0",
|
|
31843
32235
|
"rounded-sm text-muted-foreground",
|
|
@@ -31884,7 +32276,7 @@ var init_ReplyTree = __esm({
|
|
|
31884
32276
|
{
|
|
31885
32277
|
variant: "ghost",
|
|
31886
32278
|
size: "sm",
|
|
31887
|
-
leftIcon:
|
|
32279
|
+
leftIcon: "message-square",
|
|
31888
32280
|
onClick: handleReply,
|
|
31889
32281
|
"aria-label": `Reply to ${node.authorName}`,
|
|
31890
32282
|
children: "Reply"
|
|
@@ -31895,7 +32287,7 @@ var init_ReplyTree = __esm({
|
|
|
31895
32287
|
{
|
|
31896
32288
|
variant: "ghost",
|
|
31897
32289
|
size: "sm",
|
|
31898
|
-
leftIcon:
|
|
32290
|
+
leftIcon: "flag",
|
|
31899
32291
|
onClick: handleFlag,
|
|
31900
32292
|
"aria-label": `Flag reply by ${node.authorName}`,
|
|
31901
32293
|
children: "Flag"
|
|
@@ -31908,7 +32300,7 @@ var init_ReplyTree = __esm({
|
|
|
31908
32300
|
variant: "ghost",
|
|
31909
32301
|
size: "sm",
|
|
31910
32302
|
onClick: handleContinue,
|
|
31911
|
-
rightIcon:
|
|
32303
|
+
rightIcon: "chevron-right",
|
|
31912
32304
|
className: cn(
|
|
31913
32305
|
"self-start gap-1 px-0 h-auto",
|
|
31914
32306
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
@@ -32149,7 +32541,7 @@ var init_VersionDiff = __esm({
|
|
|
32149
32541
|
className: "px-4 py-2 border-b border-border bg-muted/30 flex-wrap",
|
|
32150
32542
|
children: [
|
|
32151
32543
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
32152
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
32544
|
+
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
32153
32545
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
32154
32546
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32155
32547
|
Select,
|
|
@@ -32186,7 +32578,7 @@ var init_VersionDiff = __esm({
|
|
|
32186
32578
|
{
|
|
32187
32579
|
variant: "ghost",
|
|
32188
32580
|
size: "sm",
|
|
32189
|
-
icon: activeView === "side-by-side" ?
|
|
32581
|
+
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
32190
32582
|
onClick: handleViewToggle,
|
|
32191
32583
|
"aria-label": activeView === "side-by-side" ? "Switch to inline view" : "Switch to side-by-side view"
|
|
32192
32584
|
}
|
|
@@ -32196,7 +32588,7 @@ var init_VersionDiff = __esm({
|
|
|
32196
32588
|
{
|
|
32197
32589
|
variant: "ghost",
|
|
32198
32590
|
size: "sm",
|
|
32199
|
-
icon:
|
|
32591
|
+
icon: "rotate-ccw",
|
|
32200
32592
|
onClick: handleRevert,
|
|
32201
32593
|
children: "Revert"
|
|
32202
32594
|
}
|
|
@@ -32373,7 +32765,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32373
32765
|
"aria-label": "Breadcrumb",
|
|
32374
32766
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32375
32767
|
const isLast = idx === items.length - 1;
|
|
32376
|
-
return /* @__PURE__ */ jsxs(
|
|
32768
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
32377
32769
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32378
32770
|
Icon,
|
|
32379
32771
|
{
|
|
@@ -33332,7 +33724,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33332
33724
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33333
33725
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33334
33726
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
33335
|
-
return /* @__PURE__ */ jsxs(
|
|
33727
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
33336
33728
|
/* @__PURE__ */ jsx(
|
|
33337
33729
|
AvlState,
|
|
33338
33730
|
{
|
|
@@ -34709,7 +35101,7 @@ var init_DocumentViewer = __esm({
|
|
|
34709
35101
|
}
|
|
34710
35102
|
});
|
|
34711
35103
|
function extractTitle(children) {
|
|
34712
|
-
if (!
|
|
35104
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
34713
35105
|
const props = children.props;
|
|
34714
35106
|
if (typeof props.title === "string") {
|
|
34715
35107
|
return props.title;
|
|
@@ -34764,7 +35156,7 @@ function LinearView({
|
|
|
34764
35156
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
34765
35157
|
const isDone = i < currentIdx;
|
|
34766
35158
|
const isCurrent = i === currentIdx;
|
|
34767
|
-
return /* @__PURE__ */ jsxs(
|
|
35159
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
34768
35160
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34769
35161
|
Typography,
|
|
34770
35162
|
{
|
|
@@ -35665,12 +36057,12 @@ var init_Form = __esm({
|
|
|
35665
36057
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
35666
36058
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
35667
36059
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
35668
|
-
const normalizedInitialData =
|
|
36060
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
35669
36061
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
35670
36062
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
35671
36063
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
35672
36064
|
}, [entity, initialData]);
|
|
35673
|
-
const entityDerivedFields =
|
|
36065
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
35674
36066
|
if (fields && fields.length > 0) return void 0;
|
|
35675
36067
|
if (!resolvedEntity) return void 0;
|
|
35676
36068
|
return resolvedEntity.fields.map(
|
|
@@ -35690,16 +36082,16 @@ var init_Form = __esm({
|
|
|
35690
36082
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
35691
36083
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
35692
36084
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
35693
|
-
const [formData, setFormData] =
|
|
36085
|
+
const [formData, setFormData] = React85__default.useState(
|
|
35694
36086
|
normalizedInitialData
|
|
35695
36087
|
);
|
|
35696
|
-
const [collapsedSections, setCollapsedSections] =
|
|
36088
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
35697
36089
|
/* @__PURE__ */ new Set()
|
|
35698
36090
|
);
|
|
35699
|
-
const [submitError, setSubmitError] =
|
|
35700
|
-
const formRef =
|
|
36091
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
36092
|
+
const formRef = React85__default.useRef(null);
|
|
35701
36093
|
const formMode = props.mode;
|
|
35702
|
-
const mountedRef =
|
|
36094
|
+
const mountedRef = React85__default.useRef(false);
|
|
35703
36095
|
if (!mountedRef.current) {
|
|
35704
36096
|
mountedRef.current = true;
|
|
35705
36097
|
debug("forms", "mount", {
|
|
@@ -35712,7 +36104,7 @@ var init_Form = __esm({
|
|
|
35712
36104
|
});
|
|
35713
36105
|
}
|
|
35714
36106
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
35715
|
-
const evalContext =
|
|
36107
|
+
const evalContext = React85__default.useMemo(
|
|
35716
36108
|
() => ({
|
|
35717
36109
|
formValues: formData,
|
|
35718
36110
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -35721,7 +36113,7 @@ var init_Form = __esm({
|
|
|
35721
36113
|
}),
|
|
35722
36114
|
[formData, externalContext]
|
|
35723
36115
|
);
|
|
35724
|
-
|
|
36116
|
+
React85__default.useEffect(() => {
|
|
35725
36117
|
debug("forms", "initialData-sync", {
|
|
35726
36118
|
mode: formMode,
|
|
35727
36119
|
normalizedInitialData,
|
|
@@ -35732,7 +36124,7 @@ var init_Form = __esm({
|
|
|
35732
36124
|
setFormData(normalizedInitialData);
|
|
35733
36125
|
}
|
|
35734
36126
|
}, [normalizedInitialData]);
|
|
35735
|
-
const processCalculations =
|
|
36127
|
+
const processCalculations = React85__default.useCallback(
|
|
35736
36128
|
(changedFieldId, newFormData) => {
|
|
35737
36129
|
if (!hiddenCalculations.length) return;
|
|
35738
36130
|
const context = {
|
|
@@ -35757,7 +36149,7 @@ var init_Form = __esm({
|
|
|
35757
36149
|
},
|
|
35758
36150
|
[hiddenCalculations, externalContext, eventBus]
|
|
35759
36151
|
);
|
|
35760
|
-
const checkViolations =
|
|
36152
|
+
const checkViolations = React85__default.useCallback(
|
|
35761
36153
|
(changedFieldId, newFormData) => {
|
|
35762
36154
|
if (!violationTriggers.length) return;
|
|
35763
36155
|
const context = {
|
|
@@ -35795,7 +36187,7 @@ var init_Form = __esm({
|
|
|
35795
36187
|
processCalculations(name, newFormData);
|
|
35796
36188
|
checkViolations(name, newFormData);
|
|
35797
36189
|
};
|
|
35798
|
-
const isFieldVisible =
|
|
36190
|
+
const isFieldVisible = React85__default.useCallback(
|
|
35799
36191
|
(fieldName) => {
|
|
35800
36192
|
const condition = conditionalFields[fieldName];
|
|
35801
36193
|
if (!condition) return true;
|
|
@@ -35803,7 +36195,7 @@ var init_Form = __esm({
|
|
|
35803
36195
|
},
|
|
35804
36196
|
[conditionalFields, evalContext]
|
|
35805
36197
|
);
|
|
35806
|
-
const isSectionVisible =
|
|
36198
|
+
const isSectionVisible = React85__default.useCallback(
|
|
35807
36199
|
(section) => {
|
|
35808
36200
|
if (!section.condition) return true;
|
|
35809
36201
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -35879,7 +36271,7 @@ var init_Form = __esm({
|
|
|
35879
36271
|
eventBus.emit(`UI:${onCancel}`);
|
|
35880
36272
|
}
|
|
35881
36273
|
};
|
|
35882
|
-
const renderField =
|
|
36274
|
+
const renderField = React85__default.useCallback(
|
|
35883
36275
|
(field) => {
|
|
35884
36276
|
const fieldName = field.name || field.field;
|
|
35885
36277
|
if (!fieldName) return null;
|
|
@@ -35900,7 +36292,7 @@ var init_Form = __esm({
|
|
|
35900
36292
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
35901
36293
|
);
|
|
35902
36294
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
35903
|
-
const normalizedFields =
|
|
36295
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
35904
36296
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
35905
36297
|
return effectiveFields.map((field) => {
|
|
35906
36298
|
if (typeof field === "string") {
|
|
@@ -35923,7 +36315,7 @@ var init_Form = __esm({
|
|
|
35923
36315
|
return field;
|
|
35924
36316
|
});
|
|
35925
36317
|
}, [effectiveFields, resolvedEntity]);
|
|
35926
|
-
const schemaFields =
|
|
36318
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
35927
36319
|
if (normalizedFields.length === 0) return null;
|
|
35928
36320
|
if (isDebugEnabled()) {
|
|
35929
36321
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -35933,7 +36325,7 @@ var init_Form = __esm({
|
|
|
35933
36325
|
}
|
|
35934
36326
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
35935
36327
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
35936
|
-
const sectionElements =
|
|
36328
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
35937
36329
|
if (!sections || sections.length === 0) return null;
|
|
35938
36330
|
return sections.map((section) => {
|
|
35939
36331
|
if (!isSectionVisible(section)) {
|
|
@@ -36638,7 +37030,7 @@ var init_GameTemplate = __esm({
|
|
|
36638
37030
|
{
|
|
36639
37031
|
variant: "secondary",
|
|
36640
37032
|
size: "sm",
|
|
36641
|
-
icon:
|
|
37033
|
+
icon: "pause",
|
|
36642
37034
|
onClick: controls.onPause,
|
|
36643
37035
|
children: "Pause"
|
|
36644
37036
|
}
|
|
@@ -36647,7 +37039,7 @@ var init_GameTemplate = __esm({
|
|
|
36647
37039
|
{
|
|
36648
37040
|
variant: "primary",
|
|
36649
37041
|
size: "sm",
|
|
36650
|
-
icon:
|
|
37042
|
+
icon: "play",
|
|
36651
37043
|
onClick: controls.onPlay,
|
|
36652
37044
|
children: "Play"
|
|
36653
37045
|
}
|
|
@@ -36657,7 +37049,7 @@ var init_GameTemplate = __esm({
|
|
|
36657
37049
|
{
|
|
36658
37050
|
variant: "ghost",
|
|
36659
37051
|
size: "sm",
|
|
36660
|
-
icon:
|
|
37052
|
+
icon: "rotate-ccw",
|
|
36661
37053
|
onClick: controls.onReset,
|
|
36662
37054
|
children: "Reset"
|
|
36663
37055
|
}
|
|
@@ -37659,7 +38051,7 @@ var init_List = __esm({
|
|
|
37659
38051
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
37660
38052
|
return [];
|
|
37661
38053
|
}, [entity]);
|
|
37662
|
-
const getItemActions =
|
|
38054
|
+
const getItemActions = React85__default.useCallback(
|
|
37663
38055
|
(item) => {
|
|
37664
38056
|
if (!itemActions) return [];
|
|
37665
38057
|
if (typeof itemActions === "function") {
|
|
@@ -38132,7 +38524,7 @@ var init_MediaGallery = __esm({
|
|
|
38132
38524
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
38133
38525
|
);
|
|
38134
38526
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
38135
|
-
const items =
|
|
38527
|
+
const items = React85__default.useMemo(() => {
|
|
38136
38528
|
if (propItems) return propItems;
|
|
38137
38529
|
if (entityData.length === 0) return [];
|
|
38138
38530
|
return entityData.map((record, idx) => ({
|
|
@@ -38296,7 +38688,7 @@ var init_MediaGallery = __esm({
|
|
|
38296
38688
|
}
|
|
38297
38689
|
});
|
|
38298
38690
|
function extractTitle2(children) {
|
|
38299
|
-
if (!
|
|
38691
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
38300
38692
|
const props = children.props;
|
|
38301
38693
|
if (typeof props.title === "string") {
|
|
38302
38694
|
return props.title;
|
|
@@ -39009,7 +39401,7 @@ var init_PageHeader = __esm({
|
|
|
39009
39401
|
info: "bg-info/10 text-info"
|
|
39010
39402
|
};
|
|
39011
39403
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39012
|
-
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(
|
|
39404
|
+
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(React85__default.Fragment, { children: [
|
|
39013
39405
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39014
39406
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39015
39407
|
"a",
|
|
@@ -39221,7 +39613,7 @@ var init_PricingPageTemplate = __esm({
|
|
|
39221
39613
|
|
|
39222
39614
|
// lib/traitRegistry.ts
|
|
39223
39615
|
function notifyListeners2() {
|
|
39224
|
-
|
|
39616
|
+
listeners2.forEach((listener) => listener());
|
|
39225
39617
|
}
|
|
39226
39618
|
function registerTrait(info) {
|
|
39227
39619
|
traits.set(info.id, info);
|
|
@@ -39243,14 +39635,14 @@ function getAllTraits() {
|
|
|
39243
39635
|
return Array.from(traits.values());
|
|
39244
39636
|
}
|
|
39245
39637
|
function subscribeToTraitChanges(listener) {
|
|
39246
|
-
|
|
39247
|
-
return () =>
|
|
39638
|
+
listeners2.add(listener);
|
|
39639
|
+
return () => listeners2.delete(listener);
|
|
39248
39640
|
}
|
|
39249
|
-
var traits,
|
|
39641
|
+
var traits, listeners2;
|
|
39250
39642
|
var init_traitRegistry = __esm({
|
|
39251
39643
|
"lib/traitRegistry.ts"() {
|
|
39252
39644
|
traits = /* @__PURE__ */ new Map();
|
|
39253
|
-
|
|
39645
|
+
listeners2 = /* @__PURE__ */ new Set();
|
|
39254
39646
|
}
|
|
39255
39647
|
});
|
|
39256
39648
|
|
|
@@ -39259,14 +39651,14 @@ function getAllTicks() {
|
|
|
39259
39651
|
return Array.from(ticks.values());
|
|
39260
39652
|
}
|
|
39261
39653
|
function subscribeToTickChanges(listener) {
|
|
39262
|
-
|
|
39263
|
-
return () =>
|
|
39654
|
+
listeners3.add(listener);
|
|
39655
|
+
return () => listeners3.delete(listener);
|
|
39264
39656
|
}
|
|
39265
|
-
var ticks,
|
|
39657
|
+
var ticks, listeners3;
|
|
39266
39658
|
var init_tickRegistry = __esm({
|
|
39267
39659
|
"lib/tickRegistry.ts"() {
|
|
39268
39660
|
ticks = /* @__PURE__ */ new Map();
|
|
39269
|
-
|
|
39661
|
+
listeners3 = /* @__PURE__ */ new Set();
|
|
39270
39662
|
}
|
|
39271
39663
|
});
|
|
39272
39664
|
|
|
@@ -39275,14 +39667,14 @@ function getGuardHistory() {
|
|
|
39275
39667
|
return [...guardHistory];
|
|
39276
39668
|
}
|
|
39277
39669
|
function subscribeToGuardChanges(listener) {
|
|
39278
|
-
|
|
39279
|
-
return () =>
|
|
39670
|
+
listeners4.add(listener);
|
|
39671
|
+
return () => listeners4.delete(listener);
|
|
39280
39672
|
}
|
|
39281
|
-
var guardHistory,
|
|
39673
|
+
var guardHistory, listeners4;
|
|
39282
39674
|
var init_guardRegistry = __esm({
|
|
39283
39675
|
"lib/guardRegistry.ts"() {
|
|
39284
39676
|
guardHistory = [];
|
|
39285
|
-
|
|
39677
|
+
listeners4 = /* @__PURE__ */ new Set();
|
|
39286
39678
|
}
|
|
39287
39679
|
});
|
|
39288
39680
|
|
|
@@ -39313,18 +39705,18 @@ function getDebugEvents() {
|
|
|
39313
39705
|
return [...events];
|
|
39314
39706
|
}
|
|
39315
39707
|
function subscribeToDebugEvents(listener) {
|
|
39316
|
-
|
|
39317
|
-
return () =>
|
|
39708
|
+
listeners5.add(listener);
|
|
39709
|
+
return () => listeners5.delete(listener);
|
|
39318
39710
|
}
|
|
39319
|
-
var events,
|
|
39711
|
+
var events, listeners5;
|
|
39320
39712
|
var init_debugRegistry = __esm({
|
|
39321
39713
|
"lib/debugRegistry.ts"() {
|
|
39322
39714
|
events = [];
|
|
39323
|
-
|
|
39715
|
+
listeners5 = /* @__PURE__ */ new Set();
|
|
39324
39716
|
}
|
|
39325
39717
|
});
|
|
39326
39718
|
function useDebugData() {
|
|
39327
|
-
const [data, setData] =
|
|
39719
|
+
const [data, setData] = React85.useState(() => ({
|
|
39328
39720
|
traits: [],
|
|
39329
39721
|
ticks: [],
|
|
39330
39722
|
guards: [],
|
|
@@ -39338,7 +39730,7 @@ function useDebugData() {
|
|
|
39338
39730
|
},
|
|
39339
39731
|
lastUpdate: Date.now()
|
|
39340
39732
|
}));
|
|
39341
|
-
|
|
39733
|
+
React85.useEffect(() => {
|
|
39342
39734
|
const updateData = () => {
|
|
39343
39735
|
setData({
|
|
39344
39736
|
traits: getAllTraits(),
|
|
@@ -39397,14 +39789,14 @@ function isDebugEnabled2() {
|
|
|
39397
39789
|
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
39398
39790
|
}
|
|
39399
39791
|
function onDebugToggle(listener) {
|
|
39400
|
-
|
|
39401
|
-
return () =>
|
|
39792
|
+
listeners6.add(listener);
|
|
39793
|
+
return () => listeners6.delete(listener);
|
|
39402
39794
|
}
|
|
39403
|
-
var DEBUG_STORAGE_KEY,
|
|
39795
|
+
var DEBUG_STORAGE_KEY, listeners6;
|
|
39404
39796
|
var init_debugUtils = __esm({
|
|
39405
39797
|
"lib/debugUtils.ts"() {
|
|
39406
39798
|
DEBUG_STORAGE_KEY = "orbital-debug";
|
|
39407
|
-
|
|
39799
|
+
listeners6 = /* @__PURE__ */ new Set();
|
|
39408
39800
|
}
|
|
39409
39801
|
});
|
|
39410
39802
|
function layoutGraph(states, transitions, initialState, width, height) {
|
|
@@ -39447,12 +39839,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39447
39839
|
return positions;
|
|
39448
39840
|
}
|
|
39449
39841
|
function WalkMinimap() {
|
|
39450
|
-
const [walkStep, setWalkStep] =
|
|
39451
|
-
const [traits2, setTraits] =
|
|
39452
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39453
|
-
const [completedTraits, setCompletedTraits] =
|
|
39454
|
-
const prevTraitRef =
|
|
39455
|
-
|
|
39842
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
39843
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
39844
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
39845
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
39846
|
+
const prevTraitRef = React85.useRef(null);
|
|
39847
|
+
React85.useEffect(() => {
|
|
39456
39848
|
const interval = setInterval(() => {
|
|
39457
39849
|
const w = window;
|
|
39458
39850
|
const step = w.__orbitalWalkStep;
|
|
@@ -39899,15 +40291,15 @@ var init_EntitiesTab = __esm({
|
|
|
39899
40291
|
}
|
|
39900
40292
|
});
|
|
39901
40293
|
function EventFlowTab({ events: events2 }) {
|
|
39902
|
-
const [filter, setFilter] =
|
|
39903
|
-
const containerRef =
|
|
39904
|
-
const [autoScroll, setAutoScroll] =
|
|
39905
|
-
|
|
40294
|
+
const [filter, setFilter] = React85.useState("all");
|
|
40295
|
+
const containerRef = React85.useRef(null);
|
|
40296
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
40297
|
+
React85.useEffect(() => {
|
|
39906
40298
|
if (autoScroll && containerRef.current) {
|
|
39907
40299
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39908
40300
|
}
|
|
39909
40301
|
}, [events2.length, autoScroll]);
|
|
39910
|
-
const filteredEvents =
|
|
40302
|
+
const filteredEvents = React85.useMemo(() => {
|
|
39911
40303
|
if (filter === "all") return events2;
|
|
39912
40304
|
return events2.filter((e) => e.type === filter);
|
|
39913
40305
|
}, [events2, filter]);
|
|
@@ -40026,7 +40418,7 @@ var init_EventFlowTab = __esm({
|
|
|
40026
40418
|
}
|
|
40027
40419
|
});
|
|
40028
40420
|
function GuardsPanel({ guards }) {
|
|
40029
|
-
const [filter, setFilter] =
|
|
40421
|
+
const [filter, setFilter] = React85.useState("all");
|
|
40030
40422
|
if (guards.length === 0) {
|
|
40031
40423
|
return /* @__PURE__ */ jsx(
|
|
40032
40424
|
EmptyState,
|
|
@@ -40039,7 +40431,7 @@ function GuardsPanel({ guards }) {
|
|
|
40039
40431
|
}
|
|
40040
40432
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40041
40433
|
const failedCount = guards.length - passedCount;
|
|
40042
|
-
const filteredGuards =
|
|
40434
|
+
const filteredGuards = React85.useMemo(() => {
|
|
40043
40435
|
if (filter === "all") return guards;
|
|
40044
40436
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40045
40437
|
return guards.filter((g) => !g.result);
|
|
@@ -40200,10 +40592,10 @@ function EffectBadge({ effect }) {
|
|
|
40200
40592
|
] });
|
|
40201
40593
|
}
|
|
40202
40594
|
function TransitionTimeline({ transitions }) {
|
|
40203
|
-
const containerRef =
|
|
40204
|
-
const [autoScroll, setAutoScroll] =
|
|
40205
|
-
const [expandedId, setExpandedId] =
|
|
40206
|
-
|
|
40595
|
+
const containerRef = React85.useRef(null);
|
|
40596
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
40597
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
40598
|
+
React85.useEffect(() => {
|
|
40207
40599
|
if (autoScroll && containerRef.current) {
|
|
40208
40600
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40209
40601
|
}
|
|
@@ -40489,9 +40881,9 @@ function getAllEvents(traits2) {
|
|
|
40489
40881
|
}
|
|
40490
40882
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40491
40883
|
const eventBus = useEventBus();
|
|
40492
|
-
const [log12, setLog] =
|
|
40493
|
-
const prevStatesRef =
|
|
40494
|
-
|
|
40884
|
+
const [log12, setLog] = React85.useState([]);
|
|
40885
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
40886
|
+
React85.useEffect(() => {
|
|
40495
40887
|
for (const trait of traits2) {
|
|
40496
40888
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40497
40889
|
if (prev && prev !== trait.currentState) {
|
|
@@ -40661,10 +41053,10 @@ function VerifyModePanel({
|
|
|
40661
41053
|
serverCount,
|
|
40662
41054
|
localCount
|
|
40663
41055
|
}) {
|
|
40664
|
-
const [expanded, setExpanded] =
|
|
40665
|
-
const scrollRef =
|
|
40666
|
-
const prevCountRef =
|
|
40667
|
-
|
|
41056
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
41057
|
+
const scrollRef = React85.useRef(null);
|
|
41058
|
+
const prevCountRef = React85.useRef(0);
|
|
41059
|
+
React85.useEffect(() => {
|
|
40668
41060
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
40669
41061
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
40670
41062
|
}
|
|
@@ -40730,10 +41122,10 @@ function RuntimeDebugger({
|
|
|
40730
41122
|
defaultTab,
|
|
40731
41123
|
schema
|
|
40732
41124
|
}) {
|
|
40733
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40734
|
-
const [isVisible, setIsVisible] =
|
|
41125
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41126
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40735
41127
|
const debugData = useDebugData();
|
|
40736
|
-
|
|
41128
|
+
React85.useEffect(() => {
|
|
40737
41129
|
if (mode === "inline") return;
|
|
40738
41130
|
return onDebugToggle((enabled) => {
|
|
40739
41131
|
setIsVisible(enabled);
|
|
@@ -40742,7 +41134,7 @@ function RuntimeDebugger({
|
|
|
40742
41134
|
}
|
|
40743
41135
|
});
|
|
40744
41136
|
}, [mode]);
|
|
40745
|
-
|
|
41137
|
+
React85.useEffect(() => {
|
|
40746
41138
|
if (mode === "inline") return;
|
|
40747
41139
|
const handleKeyDown = (e) => {
|
|
40748
41140
|
if (e.key === "`" && isVisible) {
|
|
@@ -41291,7 +41683,7 @@ function SequenceBar({
|
|
|
41291
41683
|
onSlotRemove(index);
|
|
41292
41684
|
}, [onSlotRemove, playing]);
|
|
41293
41685
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41294
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
41686
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
41295
41687
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41296
41688
|
Typography,
|
|
41297
41689
|
{
|
|
@@ -42693,7 +43085,7 @@ var init_StatCard = __esm({
|
|
|
42693
43085
|
const labelToUse = propLabel ?? propTitle;
|
|
42694
43086
|
const eventBus = useEventBus();
|
|
42695
43087
|
const { t } = useTranslate();
|
|
42696
|
-
const handleActionClick =
|
|
43088
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
42697
43089
|
if (action?.event) {
|
|
42698
43090
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42699
43091
|
}
|
|
@@ -42704,7 +43096,7 @@ var init_StatCard = __esm({
|
|
|
42704
43096
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42705
43097
|
const isLoading = externalLoading ?? false;
|
|
42706
43098
|
const error = externalError;
|
|
42707
|
-
const computeMetricValue =
|
|
43099
|
+
const computeMetricValue = React85__default.useCallback(
|
|
42708
43100
|
(metric, items) => {
|
|
42709
43101
|
if (metric.value !== void 0) {
|
|
42710
43102
|
return metric.value;
|
|
@@ -42743,7 +43135,7 @@ var init_StatCard = __esm({
|
|
|
42743
43135
|
},
|
|
42744
43136
|
[]
|
|
42745
43137
|
);
|
|
42746
|
-
const schemaStats =
|
|
43138
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
42747
43139
|
if (!metrics || metrics.length === 0) return null;
|
|
42748
43140
|
return metrics.map((metric) => ({
|
|
42749
43141
|
label: metric.label,
|
|
@@ -42751,7 +43143,7 @@ var init_StatCard = __esm({
|
|
|
42751
43143
|
format: metric.format
|
|
42752
43144
|
}));
|
|
42753
43145
|
}, [metrics, data, computeMetricValue]);
|
|
42754
|
-
const calculatedTrend =
|
|
43146
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
42755
43147
|
if (manualTrend !== void 0) return manualTrend;
|
|
42756
43148
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42757
43149
|
return void 0;
|
|
@@ -43862,7 +44254,7 @@ var init_Timeline = __esm({
|
|
|
43862
44254
|
}) => {
|
|
43863
44255
|
const { t } = useTranslate();
|
|
43864
44256
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43865
|
-
const items =
|
|
44257
|
+
const items = React85__default.useMemo(() => {
|
|
43866
44258
|
if (propItems) return propItems;
|
|
43867
44259
|
if (entityData.length === 0) return [];
|
|
43868
44260
|
return entityData.map((record, idx) => {
|
|
@@ -43969,7 +44361,7 @@ var init_Timeline = __esm({
|
|
|
43969
44361
|
}
|
|
43970
44362
|
});
|
|
43971
44363
|
function extractToastProps(children) {
|
|
43972
|
-
if (!
|
|
44364
|
+
if (!React85__default.isValidElement(children)) {
|
|
43973
44365
|
if (typeof children === "string") {
|
|
43974
44366
|
return { message: children };
|
|
43975
44367
|
}
|
|
@@ -44007,7 +44399,7 @@ var init_ToastSlot = __esm({
|
|
|
44007
44399
|
eventBus.emit("UI:CLOSE");
|
|
44008
44400
|
};
|
|
44009
44401
|
if (!isVisible) return null;
|
|
44010
|
-
const isCustomContent =
|
|
44402
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
44011
44403
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44012
44404
|
Toast,
|
|
44013
44405
|
{
|
|
@@ -44276,7 +44668,7 @@ var init_WizardContainer = __esm({
|
|
|
44276
44668
|
const isCompleted = index < currentStep;
|
|
44277
44669
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44278
44670
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44279
|
-
return /* @__PURE__ */ jsxs(
|
|
44671
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
44280
44672
|
/* @__PURE__ */ jsx(
|
|
44281
44673
|
Button,
|
|
44282
44674
|
{
|
|
@@ -44658,12 +45050,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
44658
45050
|
}
|
|
44659
45051
|
});
|
|
44660
45052
|
function lazyThree(name, loader) {
|
|
44661
|
-
const Lazy =
|
|
45053
|
+
const Lazy = React85__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44662
45054
|
function ThreeWrapper(props) {
|
|
44663
|
-
return
|
|
44664
|
-
|
|
45055
|
+
return React85__default.createElement(
|
|
45056
|
+
React85__default.Suspense,
|
|
44665
45057
|
{ fallback: null },
|
|
44666
|
-
|
|
45058
|
+
React85__default.createElement(Lazy, props)
|
|
44667
45059
|
);
|
|
44668
45060
|
}
|
|
44669
45061
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -45279,7 +45671,7 @@ function SuspenseConfigProvider({
|
|
|
45279
45671
|
config,
|
|
45280
45672
|
children
|
|
45281
45673
|
}) {
|
|
45282
|
-
return
|
|
45674
|
+
return React85__default.createElement(
|
|
45283
45675
|
SuspenseConfigContext.Provider,
|
|
45284
45676
|
{ value: config },
|
|
45285
45677
|
children
|
|
@@ -45762,7 +46154,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45762
46154
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45763
46155
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45764
46156
|
}
|
|
45765
|
-
return /* @__PURE__ */ jsx(
|
|
46157
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45766
46158
|
}
|
|
45767
46159
|
if (!child || typeof child !== "object") return null;
|
|
45768
46160
|
const childId = `${parentId}-${index}`;
|
|
@@ -45799,14 +46191,14 @@ function isPatternConfig(value) {
|
|
|
45799
46191
|
if (value === null || value === void 0) return false;
|
|
45800
46192
|
if (typeof value !== "object") return false;
|
|
45801
46193
|
if (Array.isArray(value)) return false;
|
|
45802
|
-
if (
|
|
46194
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45803
46195
|
if (value instanceof Date) return false;
|
|
45804
46196
|
if (typeof value === "function") return false;
|
|
45805
46197
|
const record = value;
|
|
45806
46198
|
return "type" in record && typeof record.type === "string";
|
|
45807
46199
|
}
|
|
45808
46200
|
function isPlainConfigObject(value) {
|
|
45809
|
-
if (
|
|
46201
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45810
46202
|
if (value instanceof Date) return false;
|
|
45811
46203
|
const proto = Object.getPrototypeOf(value);
|
|
45812
46204
|
return proto === Object.prototype || proto === null;
|
|
@@ -46168,7 +46560,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
46168
46560
|
if (Array.isArray(body)) {
|
|
46169
46561
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
46170
46562
|
}
|
|
46171
|
-
if (body !== null && typeof body === "object" && !
|
|
46563
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
46172
46564
|
const out = {};
|
|
46173
46565
|
for (const [k, v] of Object.entries(body)) {
|
|
46174
46566
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -46187,7 +46579,7 @@ function getSlotContentRenderer2() {
|
|
|
46187
46579
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
46188
46580
|
return (item, index) => {
|
|
46189
46581
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
46190
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
46582
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
46191
46583
|
return null;
|
|
46192
46584
|
}
|
|
46193
46585
|
const record = resolvedBody;
|
|
@@ -46205,7 +46597,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
46205
46597
|
props: childProps,
|
|
46206
46598
|
priority: 0
|
|
46207
46599
|
};
|
|
46208
|
-
return
|
|
46600
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
46209
46601
|
};
|
|
46210
46602
|
}
|
|
46211
46603
|
function convertNode(node, callerKey) {
|
|
@@ -46224,7 +46616,7 @@ function convertNode(node, callerKey) {
|
|
|
46224
46616
|
});
|
|
46225
46617
|
return anyChanged ? mapped : node;
|
|
46226
46618
|
}
|
|
46227
|
-
if (typeof node === "object" && !
|
|
46619
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
46228
46620
|
return convertObjectProps(node);
|
|
46229
46621
|
}
|
|
46230
46622
|
return node;
|