@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/providers/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React86 from 'react';
|
|
2
|
+
import React86__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
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 } from '@almadar/ui/context';
|
|
12
15
|
import { createPortal } from 'react-dom';
|
|
@@ -635,7 +638,7 @@ var init_Box = __esm({
|
|
|
635
638
|
fixed: "fixed",
|
|
636
639
|
sticky: "sticky"
|
|
637
640
|
};
|
|
638
|
-
Box =
|
|
641
|
+
Box = React86__default.forwardRef(
|
|
639
642
|
({
|
|
640
643
|
padding,
|
|
641
644
|
paddingX,
|
|
@@ -685,7 +688,7 @@ var init_Box = __esm({
|
|
|
685
688
|
onMouseLeave?.(e);
|
|
686
689
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
687
690
|
const isClickable = action || onClick;
|
|
688
|
-
return
|
|
691
|
+
return React86__default.createElement(
|
|
689
692
|
Component,
|
|
690
693
|
{
|
|
691
694
|
ref,
|
|
@@ -721,12 +724,378 @@ var init_Box = __esm({
|
|
|
721
724
|
Box.displayName = "Box";
|
|
722
725
|
}
|
|
723
726
|
});
|
|
727
|
+
function getCurrentIconFamily() {
|
|
728
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
729
|
+
return DEFAULT_FAMILY;
|
|
730
|
+
}
|
|
731
|
+
const raw = getComputedStyle(document.documentElement).getPropertyValue("--icon-family").trim().replace(/^["']|["']$/g, "");
|
|
732
|
+
return VALID_FAMILIES.includes(raw) ? raw : DEFAULT_FAMILY;
|
|
733
|
+
}
|
|
734
|
+
function ensureObserver() {
|
|
735
|
+
if (typeof window === "undefined" || observer) return;
|
|
736
|
+
observer = new MutationObserver(() => {
|
|
737
|
+
const next = getCurrentIconFamily();
|
|
738
|
+
if (next !== cachedFamily) {
|
|
739
|
+
cachedFamily = next;
|
|
740
|
+
listeners.forEach((fn) => fn());
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
observer.observe(document.documentElement, {
|
|
744
|
+
attributes: true,
|
|
745
|
+
attributeFilter: ["data-theme", "style"]
|
|
746
|
+
});
|
|
747
|
+
cachedFamily = getCurrentIconFamily();
|
|
748
|
+
}
|
|
749
|
+
function subscribeIconFamily(notify) {
|
|
750
|
+
ensureObserver();
|
|
751
|
+
listeners.add(notify);
|
|
752
|
+
return () => {
|
|
753
|
+
listeners.delete(notify);
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
function getIconFamilySnapshot() {
|
|
757
|
+
if (cachedFamily !== null) return cachedFamily;
|
|
758
|
+
cachedFamily = getCurrentIconFamily();
|
|
759
|
+
return cachedFamily;
|
|
760
|
+
}
|
|
761
|
+
function getIconFamilyServerSnapshot() {
|
|
762
|
+
return DEFAULT_FAMILY;
|
|
763
|
+
}
|
|
764
|
+
function useIconFamily() {
|
|
765
|
+
return useSyncExternalStore(
|
|
766
|
+
subscribeIconFamily,
|
|
767
|
+
getIconFamilySnapshot,
|
|
768
|
+
getIconFamilyServerSnapshot
|
|
769
|
+
);
|
|
770
|
+
}
|
|
724
771
|
function kebabToPascal(name) {
|
|
725
772
|
return name.split("-").map((part) => {
|
|
726
773
|
if (/^\d+$/.test(part)) return part;
|
|
727
774
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
728
775
|
}).join("");
|
|
729
776
|
}
|
|
777
|
+
function resolveLucide(name) {
|
|
778
|
+
if (lucideAliases[name]) return lucideAliases[name];
|
|
779
|
+
const pascal = kebabToPascal(name);
|
|
780
|
+
const lucideMap = LucideIcons2;
|
|
781
|
+
const direct = lucideMap[pascal];
|
|
782
|
+
if (direct && typeof direct === "object") return direct;
|
|
783
|
+
const asIs = lucideMap[name];
|
|
784
|
+
if (asIs && typeof asIs === "object") return asIs;
|
|
785
|
+
return LucideIcons2.HelpCircle;
|
|
786
|
+
}
|
|
787
|
+
function resolvePhosphor(name, weight) {
|
|
788
|
+
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
789
|
+
const map = PhosphorIcons;
|
|
790
|
+
const PhosphorComp = map[target];
|
|
791
|
+
if (!PhosphorComp || typeof PhosphorComp !== "object") return null;
|
|
792
|
+
const Component = PhosphorComp;
|
|
793
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
794
|
+
Component,
|
|
795
|
+
{
|
|
796
|
+
weight,
|
|
797
|
+
className: props.className,
|
|
798
|
+
style: props.style,
|
|
799
|
+
size: props.size ?? "1em"
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
803
|
+
return Adapter;
|
|
804
|
+
}
|
|
805
|
+
function resolveTabler(name) {
|
|
806
|
+
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
807
|
+
const target = `Icon${suffix}`;
|
|
808
|
+
const map = TablerIcons;
|
|
809
|
+
const TablerComp = map[target];
|
|
810
|
+
if (!TablerComp || typeof TablerComp !== "object") return null;
|
|
811
|
+
const Component = TablerComp;
|
|
812
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
813
|
+
Component,
|
|
814
|
+
{
|
|
815
|
+
stroke: props.strokeWidth ?? 1.5,
|
|
816
|
+
className: props.className,
|
|
817
|
+
style: props.style,
|
|
818
|
+
size: props.size ?? 24
|
|
819
|
+
}
|
|
820
|
+
);
|
|
821
|
+
Adapter.displayName = `Tabler.${target}`;
|
|
822
|
+
return Adapter;
|
|
823
|
+
}
|
|
824
|
+
function resolveFa(name) {
|
|
825
|
+
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
826
|
+
const target = `Fa${suffix}`;
|
|
827
|
+
const map = FaIcons;
|
|
828
|
+
const FaComp = map[target];
|
|
829
|
+
if (!FaComp || typeof FaComp !== "function") return null;
|
|
830
|
+
const Component = FaComp;
|
|
831
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
832
|
+
Component,
|
|
833
|
+
{
|
|
834
|
+
className: props.className,
|
|
835
|
+
style: props.style,
|
|
836
|
+
size: props.size ?? "1em"
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
Adapter.displayName = `Fa.${target}`;
|
|
840
|
+
return Adapter;
|
|
841
|
+
}
|
|
842
|
+
function warnFallback(name, family) {
|
|
843
|
+
const key = `${family}::${name}`;
|
|
844
|
+
if (warned.has(key)) return;
|
|
845
|
+
warned.add(key);
|
|
846
|
+
if (typeof console !== "undefined") {
|
|
847
|
+
console.warn(
|
|
848
|
+
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
849
|
+
);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
function makeLucideAdapter(name) {
|
|
853
|
+
const LucideComp = resolveLucide(name);
|
|
854
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
855
|
+
LucideComp,
|
|
856
|
+
{
|
|
857
|
+
className: props.className,
|
|
858
|
+
strokeWidth: props.strokeWidth,
|
|
859
|
+
style: props.style,
|
|
860
|
+
size: props.size
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
864
|
+
return Adapter;
|
|
865
|
+
}
|
|
866
|
+
function resolveIconForFamily(name, family) {
|
|
867
|
+
switch (family) {
|
|
868
|
+
case "lucide":
|
|
869
|
+
return makeLucideAdapter(name);
|
|
870
|
+
case "phosphor-outline": {
|
|
871
|
+
const p2 = resolvePhosphor(name, "regular");
|
|
872
|
+
if (p2) return p2;
|
|
873
|
+
warnFallback(name, family);
|
|
874
|
+
return makeLucideAdapter(name);
|
|
875
|
+
}
|
|
876
|
+
case "phosphor-fill": {
|
|
877
|
+
const p2 = resolvePhosphor(name, "fill");
|
|
878
|
+
if (p2) return p2;
|
|
879
|
+
warnFallback(name, family);
|
|
880
|
+
return makeLucideAdapter(name);
|
|
881
|
+
}
|
|
882
|
+
case "phosphor-duotone": {
|
|
883
|
+
const p2 = resolvePhosphor(name, "duotone");
|
|
884
|
+
if (p2) return p2;
|
|
885
|
+
warnFallback(name, family);
|
|
886
|
+
return makeLucideAdapter(name);
|
|
887
|
+
}
|
|
888
|
+
case "tabler": {
|
|
889
|
+
const t = resolveTabler(name);
|
|
890
|
+
if (t) return t;
|
|
891
|
+
warnFallback(name, family);
|
|
892
|
+
return makeLucideAdapter(name);
|
|
893
|
+
}
|
|
894
|
+
case "fa-solid": {
|
|
895
|
+
const f3 = resolveFa(name);
|
|
896
|
+
if (f3) return f3;
|
|
897
|
+
warnFallback(name, family);
|
|
898
|
+
return makeLucideAdapter(name);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
903
|
+
var init_iconFamily = __esm({
|
|
904
|
+
"lib/iconFamily.tsx"() {
|
|
905
|
+
"use client";
|
|
906
|
+
DEFAULT_FAMILY = "lucide";
|
|
907
|
+
VALID_FAMILIES = [
|
|
908
|
+
"lucide",
|
|
909
|
+
"phosphor-outline",
|
|
910
|
+
"phosphor-fill",
|
|
911
|
+
"phosphor-duotone",
|
|
912
|
+
"tabler",
|
|
913
|
+
"fa-solid"
|
|
914
|
+
];
|
|
915
|
+
cachedFamily = null;
|
|
916
|
+
listeners = /* @__PURE__ */ new Set();
|
|
917
|
+
observer = null;
|
|
918
|
+
lucideAliases = {
|
|
919
|
+
close: LucideIcons2.X,
|
|
920
|
+
trash: LucideIcons2.Trash2,
|
|
921
|
+
loader: LucideIcons2.Loader2,
|
|
922
|
+
stop: LucideIcons2.Square,
|
|
923
|
+
volume: LucideIcons2.Volume2,
|
|
924
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
925
|
+
refresh: LucideIcons2.RefreshCw,
|
|
926
|
+
share: LucideIcons2.Share2,
|
|
927
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
928
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
929
|
+
};
|
|
930
|
+
phosphorAliases = {
|
|
931
|
+
// lucide name → phosphor PascalCase name
|
|
932
|
+
search: "MagnifyingGlass",
|
|
933
|
+
close: "X",
|
|
934
|
+
loader: "CircleNotch",
|
|
935
|
+
refresh: "ArrowsClockwise",
|
|
936
|
+
"sort-asc": "SortAscending",
|
|
937
|
+
"sort-desc": "SortDescending",
|
|
938
|
+
"chevron-down": "CaretDown",
|
|
939
|
+
"chevron-up": "CaretUp",
|
|
940
|
+
"chevron-left": "CaretLeft",
|
|
941
|
+
"chevron-right": "CaretRight",
|
|
942
|
+
"help-circle": "Question",
|
|
943
|
+
"alert-triangle": "Warning",
|
|
944
|
+
"alert-circle": "WarningCircle",
|
|
945
|
+
"check-circle": "CheckCircle",
|
|
946
|
+
"x-circle": "XCircle",
|
|
947
|
+
edit: "PencilSimple",
|
|
948
|
+
pencil: "PencilSimple",
|
|
949
|
+
trash: "Trash",
|
|
950
|
+
send: "PaperPlaneRight",
|
|
951
|
+
external: "ArrowSquareOut",
|
|
952
|
+
"external-link": "ArrowSquareOut",
|
|
953
|
+
plus: "Plus",
|
|
954
|
+
minus: "Minus",
|
|
955
|
+
x: "X",
|
|
956
|
+
check: "Check",
|
|
957
|
+
star: "Star",
|
|
958
|
+
heart: "Heart",
|
|
959
|
+
home: "House",
|
|
960
|
+
user: "User",
|
|
961
|
+
users: "Users",
|
|
962
|
+
settings: "Gear",
|
|
963
|
+
menu: "List",
|
|
964
|
+
"arrow-up": "ArrowUp",
|
|
965
|
+
"arrow-down": "ArrowDown",
|
|
966
|
+
"arrow-left": "ArrowLeft",
|
|
967
|
+
"arrow-right": "ArrowRight",
|
|
968
|
+
copy: "Copy",
|
|
969
|
+
download: "DownloadSimple",
|
|
970
|
+
upload: "UploadSimple",
|
|
971
|
+
filter: "Funnel",
|
|
972
|
+
calendar: "Calendar",
|
|
973
|
+
clock: "Clock",
|
|
974
|
+
bell: "Bell",
|
|
975
|
+
mail: "Envelope",
|
|
976
|
+
envelope: "Envelope",
|
|
977
|
+
lock: "Lock",
|
|
978
|
+
unlock: "LockOpen",
|
|
979
|
+
eye: "Eye",
|
|
980
|
+
"eye-off": "EyeSlash",
|
|
981
|
+
more: "DotsThree",
|
|
982
|
+
"more-vertical": "DotsThreeVertical",
|
|
983
|
+
info: "Info",
|
|
984
|
+
warning: "Warning",
|
|
985
|
+
error: "WarningCircle"
|
|
986
|
+
};
|
|
987
|
+
tablerAliases = {
|
|
988
|
+
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
989
|
+
search: "Search",
|
|
990
|
+
close: "X",
|
|
991
|
+
loader: "Loader2",
|
|
992
|
+
refresh: "Refresh",
|
|
993
|
+
"sort-asc": "SortAscending",
|
|
994
|
+
"sort-desc": "SortDescending",
|
|
995
|
+
"chevron-down": "ChevronDown",
|
|
996
|
+
"chevron-up": "ChevronUp",
|
|
997
|
+
"chevron-left": "ChevronLeft",
|
|
998
|
+
"chevron-right": "ChevronRight",
|
|
999
|
+
"help-circle": "HelpCircle",
|
|
1000
|
+
"alert-triangle": "AlertTriangle",
|
|
1001
|
+
"alert-circle": "AlertCircle",
|
|
1002
|
+
"check-circle": "CircleCheck",
|
|
1003
|
+
"x-circle": "CircleX",
|
|
1004
|
+
edit: "Pencil",
|
|
1005
|
+
trash: "Trash",
|
|
1006
|
+
send: "Send",
|
|
1007
|
+
external: "ExternalLink",
|
|
1008
|
+
plus: "Plus",
|
|
1009
|
+
x: "X",
|
|
1010
|
+
check: "Check",
|
|
1011
|
+
star: "Star",
|
|
1012
|
+
heart: "Heart",
|
|
1013
|
+
home: "Home",
|
|
1014
|
+
user: "User",
|
|
1015
|
+
users: "Users",
|
|
1016
|
+
settings: "Settings",
|
|
1017
|
+
menu: "Menu2",
|
|
1018
|
+
copy: "Copy",
|
|
1019
|
+
download: "Download",
|
|
1020
|
+
upload: "Upload",
|
|
1021
|
+
filter: "Filter",
|
|
1022
|
+
calendar: "Calendar",
|
|
1023
|
+
clock: "Clock",
|
|
1024
|
+
bell: "Bell",
|
|
1025
|
+
mail: "Mail",
|
|
1026
|
+
envelope: "Mail",
|
|
1027
|
+
lock: "Lock",
|
|
1028
|
+
unlock: "LockOpen",
|
|
1029
|
+
eye: "Eye",
|
|
1030
|
+
"eye-off": "EyeOff",
|
|
1031
|
+
more: "Dots",
|
|
1032
|
+
"more-vertical": "DotsVertical",
|
|
1033
|
+
info: "InfoCircle"
|
|
1034
|
+
};
|
|
1035
|
+
faAliases = {
|
|
1036
|
+
// lucide name → fa-solid suffix (after the `Fa` prefix)
|
|
1037
|
+
search: "Search",
|
|
1038
|
+
close: "Times",
|
|
1039
|
+
x: "Times",
|
|
1040
|
+
loader: "Spinner",
|
|
1041
|
+
refresh: "Sync",
|
|
1042
|
+
"sort-asc": "SortAmountUp",
|
|
1043
|
+
"sort-desc": "SortAmountDown",
|
|
1044
|
+
"chevron-down": "ChevronDown",
|
|
1045
|
+
"chevron-up": "ChevronUp",
|
|
1046
|
+
"chevron-left": "ChevronLeft",
|
|
1047
|
+
"chevron-right": "ChevronRight",
|
|
1048
|
+
"help-circle": "QuestionCircle",
|
|
1049
|
+
"alert-triangle": "ExclamationTriangle",
|
|
1050
|
+
"alert-circle": "ExclamationCircle",
|
|
1051
|
+
"check-circle": "CheckCircle",
|
|
1052
|
+
"x-circle": "TimesCircle",
|
|
1053
|
+
edit: "Edit",
|
|
1054
|
+
pencil: "Pencil",
|
|
1055
|
+
trash: "Trash",
|
|
1056
|
+
send: "PaperPlane",
|
|
1057
|
+
external: "ExternalLinkAlt",
|
|
1058
|
+
plus: "Plus",
|
|
1059
|
+
minus: "Minus",
|
|
1060
|
+
check: "Check",
|
|
1061
|
+
star: "Star",
|
|
1062
|
+
heart: "Heart",
|
|
1063
|
+
home: "Home",
|
|
1064
|
+
user: "User",
|
|
1065
|
+
users: "Users",
|
|
1066
|
+
settings: "Cog",
|
|
1067
|
+
menu: "Bars",
|
|
1068
|
+
"arrow-up": "ArrowUp",
|
|
1069
|
+
"arrow-down": "ArrowDown",
|
|
1070
|
+
"arrow-left": "ArrowLeft",
|
|
1071
|
+
"arrow-right": "ArrowRight",
|
|
1072
|
+
copy: "Copy",
|
|
1073
|
+
download: "Download",
|
|
1074
|
+
upload: "Upload",
|
|
1075
|
+
filter: "Filter",
|
|
1076
|
+
calendar: "Calendar",
|
|
1077
|
+
clock: "Clock",
|
|
1078
|
+
bell: "Bell",
|
|
1079
|
+
mail: "Envelope",
|
|
1080
|
+
envelope: "Envelope",
|
|
1081
|
+
lock: "Lock",
|
|
1082
|
+
unlock: "LockOpen",
|
|
1083
|
+
eye: "Eye",
|
|
1084
|
+
"eye-off": "EyeSlash",
|
|
1085
|
+
more: "EllipsisH",
|
|
1086
|
+
"more-vertical": "EllipsisV",
|
|
1087
|
+
info: "InfoCircle",
|
|
1088
|
+
warning: "ExclamationTriangle"
|
|
1089
|
+
};
|
|
1090
|
+
warned = /* @__PURE__ */ new Set();
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
function kebabToPascal2(name) {
|
|
1094
|
+
return name.split("-").map((part) => {
|
|
1095
|
+
if (/^\d+$/.test(part)) return part;
|
|
1096
|
+
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
1097
|
+
}).join("");
|
|
1098
|
+
}
|
|
730
1099
|
function resolveIcon(name) {
|
|
731
1100
|
const cached = resolvedCache.get(name);
|
|
732
1101
|
if (cached) return cached;
|
|
@@ -736,28 +1105,30 @@ function resolveIcon(name) {
|
|
|
736
1105
|
}
|
|
737
1106
|
function doResolve(name) {
|
|
738
1107
|
if (iconAliases[name]) return iconAliases[name];
|
|
739
|
-
const pascalName =
|
|
740
|
-
const directLookup =
|
|
1108
|
+
const pascalName = kebabToPascal2(name);
|
|
1109
|
+
const directLookup = LucideIcons2[pascalName];
|
|
741
1110
|
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
742
|
-
const asIs =
|
|
1111
|
+
const asIs = LucideIcons2[name];
|
|
743
1112
|
if (asIs && typeof asIs === "object") return asIs;
|
|
744
|
-
return
|
|
1113
|
+
return LucideIcons2.HelpCircle;
|
|
745
1114
|
}
|
|
746
1115
|
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
747
1116
|
var init_Icon = __esm({
|
|
748
1117
|
"components/atoms/Icon.tsx"() {
|
|
1118
|
+
"use client";
|
|
749
1119
|
init_cn();
|
|
1120
|
+
init_iconFamily();
|
|
750
1121
|
iconAliases = {
|
|
751
|
-
"close":
|
|
752
|
-
"trash":
|
|
753
|
-
"loader":
|
|
754
|
-
"stop":
|
|
755
|
-
"volume":
|
|
756
|
-
"volume-off":
|
|
757
|
-
"refresh":
|
|
758
|
-
"share":
|
|
759
|
-
"sort-asc":
|
|
760
|
-
"sort-desc":
|
|
1122
|
+
"close": LucideIcons2.X,
|
|
1123
|
+
"trash": LucideIcons2.Trash2,
|
|
1124
|
+
"loader": LucideIcons2.Loader2,
|
|
1125
|
+
"stop": LucideIcons2.Square,
|
|
1126
|
+
"volume": LucideIcons2.Volume2,
|
|
1127
|
+
"volume-off": LucideIcons2.VolumeX,
|
|
1128
|
+
"refresh": LucideIcons2.RefreshCw,
|
|
1129
|
+
"share": LucideIcons2.Share2,
|
|
1130
|
+
"sort-asc": LucideIcons2.ArrowUpNarrowWide,
|
|
1131
|
+
"sort-desc": LucideIcons2.ArrowDownNarrowWide
|
|
761
1132
|
};
|
|
762
1133
|
resolvedCache = /* @__PURE__ */ new Map();
|
|
763
1134
|
sizeClasses = {
|
|
@@ -782,22 +1153,50 @@ var init_Icon = __esm({
|
|
|
782
1153
|
strokeWidth,
|
|
783
1154
|
style
|
|
784
1155
|
}) => {
|
|
785
|
-
const
|
|
1156
|
+
const family = useIconFamily();
|
|
1157
|
+
const RenderedComponent = React86__default.useMemo(() => {
|
|
1158
|
+
if (icon) return null;
|
|
1159
|
+
return name ? resolveIconForFamily(name, family) : null;
|
|
1160
|
+
}, [icon, name, family]);
|
|
786
1161
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
1162
|
+
const inlineStyle = {
|
|
1163
|
+
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
1164
|
+
...style
|
|
1165
|
+
};
|
|
1166
|
+
const composedClassName = cn(
|
|
1167
|
+
sizeClasses[size],
|
|
1168
|
+
animationClasses[animation],
|
|
1169
|
+
color ? color : "text-current",
|
|
1170
|
+
className
|
|
1171
|
+
);
|
|
1172
|
+
if (icon) {
|
|
1173
|
+
const Direct = icon;
|
|
1174
|
+
return /* @__PURE__ */ jsx(
|
|
1175
|
+
Direct,
|
|
1176
|
+
{
|
|
1177
|
+
className: composedClassName,
|
|
1178
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1179
|
+
style: inlineStyle
|
|
1180
|
+
}
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
if (RenderedComponent) {
|
|
1184
|
+
return /* @__PURE__ */ jsx(
|
|
1185
|
+
RenderedComponent,
|
|
1186
|
+
{
|
|
1187
|
+
className: composedClassName,
|
|
1188
|
+
strokeWidth: effectiveStrokeWidth,
|
|
1189
|
+
style: inlineStyle
|
|
1190
|
+
}
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
const Fallback = LucideIcons2.HelpCircle;
|
|
787
1194
|
return /* @__PURE__ */ jsx(
|
|
788
|
-
|
|
1195
|
+
Fallback,
|
|
789
1196
|
{
|
|
790
|
-
className:
|
|
791
|
-
sizeClasses[size],
|
|
792
|
-
animationClasses[animation],
|
|
793
|
-
color ? color : "text-current",
|
|
794
|
-
className
|
|
795
|
-
),
|
|
1197
|
+
className: composedClassName,
|
|
796
1198
|
strokeWidth: effectiveStrokeWidth,
|
|
797
|
-
style:
|
|
798
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
799
|
-
...style
|
|
800
|
-
}
|
|
1199
|
+
style: inlineStyle
|
|
801
1200
|
}
|
|
802
1201
|
);
|
|
803
1202
|
};
|
|
@@ -807,14 +1206,13 @@ var init_Icon = __esm({
|
|
|
807
1206
|
function resolveIconProp(value, sizeClass) {
|
|
808
1207
|
if (!value) return null;
|
|
809
1208
|
if (typeof value === "string") {
|
|
810
|
-
|
|
811
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
1209
|
+
return /* @__PURE__ */ jsx(Icon, { name: value, className: sizeClass });
|
|
812
1210
|
}
|
|
813
1211
|
if (typeof value === "function") {
|
|
814
1212
|
const IconComp = value;
|
|
815
1213
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
816
1214
|
}
|
|
817
|
-
if (
|
|
1215
|
+
if (React86__default.isValidElement(value)) {
|
|
818
1216
|
return value;
|
|
819
1217
|
}
|
|
820
1218
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -890,7 +1288,7 @@ var init_Button = __esm({
|
|
|
890
1288
|
md: "h-icon-default w-icon-default",
|
|
891
1289
|
lg: "h-5 w-5"
|
|
892
1290
|
};
|
|
893
|
-
Button =
|
|
1291
|
+
Button = React86__default.forwardRef(
|
|
894
1292
|
({
|
|
895
1293
|
className,
|
|
896
1294
|
variant = "primary",
|
|
@@ -955,7 +1353,7 @@ var Dialog;
|
|
|
955
1353
|
var init_Dialog = __esm({
|
|
956
1354
|
"components/atoms/Dialog.tsx"() {
|
|
957
1355
|
init_cn();
|
|
958
|
-
Dialog =
|
|
1356
|
+
Dialog = React86__default.forwardRef(
|
|
959
1357
|
({
|
|
960
1358
|
role = "dialog",
|
|
961
1359
|
"aria-modal": ariaModal = true,
|
|
@@ -1350,7 +1748,7 @@ var init_Modal = __esm({
|
|
|
1350
1748
|
{
|
|
1351
1749
|
variant: "ghost",
|
|
1352
1750
|
size: "sm",
|
|
1353
|
-
icon:
|
|
1751
|
+
icon: "x",
|
|
1354
1752
|
onClick: handleClose,
|
|
1355
1753
|
"data-event": "CLOSE",
|
|
1356
1754
|
"aria-label": "Close modal"
|
|
@@ -1507,7 +1905,7 @@ var init_Drawer = __esm({
|
|
|
1507
1905
|
{
|
|
1508
1906
|
variant: "ghost",
|
|
1509
1907
|
size: "sm",
|
|
1510
|
-
icon:
|
|
1908
|
+
icon: "x",
|
|
1511
1909
|
onClick: handleClose,
|
|
1512
1910
|
"aria-label": "Close drawer",
|
|
1513
1911
|
className: cn(!title && "ml-auto")
|
|
@@ -1601,13 +1999,10 @@ var init_Badge = __esm({
|
|
|
1601
1999
|
md: "px-2.5 py-1 text-sm",
|
|
1602
2000
|
lg: "px-3 py-1.5 text-base"
|
|
1603
2001
|
};
|
|
1604
|
-
Badge =
|
|
2002
|
+
Badge = React86__default.forwardRef(
|
|
1605
2003
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1606
2004
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1607
|
-
const resolvedIcon = typeof icon === "string" ? (
|
|
1608
|
-
const I = resolveIcon(icon);
|
|
1609
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes3[size] }) : null;
|
|
1610
|
-
})() : icon;
|
|
2005
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes3[size] }) : icon;
|
|
1611
2006
|
return /* @__PURE__ */ jsxs(
|
|
1612
2007
|
"span",
|
|
1613
2008
|
{
|
|
@@ -1667,10 +2062,10 @@ var init_Toast = __esm({
|
|
|
1667
2062
|
warning: "bg-card border-[length:var(--border-width)] border-warning"
|
|
1668
2063
|
};
|
|
1669
2064
|
iconMap = {
|
|
1670
|
-
success:
|
|
1671
|
-
error:
|
|
1672
|
-
info:
|
|
1673
|
-
warning:
|
|
2065
|
+
success: "check-circle",
|
|
2066
|
+
error: "alert-circle",
|
|
2067
|
+
info: "info",
|
|
2068
|
+
warning: "alert-triangle"
|
|
1674
2069
|
};
|
|
1675
2070
|
iconColors = {
|
|
1676
2071
|
success: "text-success",
|
|
@@ -1727,7 +2122,7 @@ var init_Toast = __esm({
|
|
|
1727
2122
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
1728
2123
|
Icon,
|
|
1729
2124
|
{
|
|
1730
|
-
|
|
2125
|
+
name: iconMap[variant],
|
|
1731
2126
|
size: "md",
|
|
1732
2127
|
className: iconColors[variant]
|
|
1733
2128
|
}
|
|
@@ -1744,7 +2139,7 @@ var init_Toast = __esm({
|
|
|
1744
2139
|
{
|
|
1745
2140
|
variant: "ghost",
|
|
1746
2141
|
size: "sm",
|
|
1747
|
-
icon:
|
|
2142
|
+
icon: "x",
|
|
1748
2143
|
onClick: handleDismiss,
|
|
1749
2144
|
"aria-label": "Dismiss toast",
|
|
1750
2145
|
className: "flex-shrink-0"
|
|
@@ -1915,7 +2310,7 @@ var init_SvgFlow = __esm({
|
|
|
1915
2310
|
opacity = 1,
|
|
1916
2311
|
className
|
|
1917
2312
|
}) => {
|
|
1918
|
-
const markerId =
|
|
2313
|
+
const markerId = React86__default.useMemo(() => {
|
|
1919
2314
|
flowIdCounter += 1;
|
|
1920
2315
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
1921
2316
|
}, []);
|
|
@@ -2458,7 +2853,7 @@ var init_SvgRing = __esm({
|
|
|
2458
2853
|
className,
|
|
2459
2854
|
label
|
|
2460
2855
|
}) => {
|
|
2461
|
-
const gradientId =
|
|
2856
|
+
const gradientId = React86__default.useMemo(() => {
|
|
2462
2857
|
ringIdCounter += 1;
|
|
2463
2858
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2464
2859
|
}, []);
|
|
@@ -2619,7 +3014,8 @@ var Input;
|
|
|
2619
3014
|
var init_Input = __esm({
|
|
2620
3015
|
"components/atoms/Input.tsx"() {
|
|
2621
3016
|
init_cn();
|
|
2622
|
-
|
|
3017
|
+
init_Icon();
|
|
3018
|
+
Input = React86__default.forwardRef(
|
|
2623
3019
|
({
|
|
2624
3020
|
className,
|
|
2625
3021
|
inputType,
|
|
@@ -2669,7 +3065,7 @@ var init_Input = __esm({
|
|
|
2669
3065
|
]
|
|
2670
3066
|
}
|
|
2671
3067
|
),
|
|
2672
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(
|
|
3068
|
+
/* @__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" }) })
|
|
2673
3069
|
] });
|
|
2674
3070
|
}
|
|
2675
3071
|
if (type === "textarea") {
|
|
@@ -2723,7 +3119,7 @@ var init_Input = __esm({
|
|
|
2723
3119
|
type: "button",
|
|
2724
3120
|
onClick: onClear,
|
|
2725
3121
|
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
2726
|
-
children: /* @__PURE__ */ jsx(
|
|
3122
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
2727
3123
|
}
|
|
2728
3124
|
),
|
|
2729
3125
|
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
@@ -2737,7 +3133,7 @@ var Label;
|
|
|
2737
3133
|
var init_Label = __esm({
|
|
2738
3134
|
"components/atoms/Label.tsx"() {
|
|
2739
3135
|
init_cn();
|
|
2740
|
-
Label =
|
|
3136
|
+
Label = React86__default.forwardRef(
|
|
2741
3137
|
({ className, required, children, ...props }, ref) => {
|
|
2742
3138
|
return /* @__PURE__ */ jsxs(
|
|
2743
3139
|
"label",
|
|
@@ -2763,7 +3159,7 @@ var Textarea;
|
|
|
2763
3159
|
var init_Textarea = __esm({
|
|
2764
3160
|
"components/atoms/Textarea.tsx"() {
|
|
2765
3161
|
init_cn();
|
|
2766
|
-
Textarea =
|
|
3162
|
+
Textarea = React86__default.forwardRef(
|
|
2767
3163
|
({ className, error, ...props }, ref) => {
|
|
2768
3164
|
return /* @__PURE__ */ jsx(
|
|
2769
3165
|
"textarea",
|
|
@@ -2792,7 +3188,8 @@ var Select;
|
|
|
2792
3188
|
var init_Select = __esm({
|
|
2793
3189
|
"components/atoms/Select.tsx"() {
|
|
2794
3190
|
init_cn();
|
|
2795
|
-
|
|
3191
|
+
init_Icon();
|
|
3192
|
+
Select = React86__default.forwardRef(
|
|
2796
3193
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2797
3194
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2798
3195
|
/* @__PURE__ */ jsxs(
|
|
@@ -2823,7 +3220,7 @@ var init_Select = __esm({
|
|
|
2823
3220
|
]
|
|
2824
3221
|
}
|
|
2825
3222
|
),
|
|
2826
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(
|
|
3223
|
+
/* @__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" }) })
|
|
2827
3224
|
] });
|
|
2828
3225
|
}
|
|
2829
3226
|
);
|
|
@@ -2834,7 +3231,7 @@ var Checkbox;
|
|
|
2834
3231
|
var init_Checkbox = __esm({
|
|
2835
3232
|
"components/atoms/Checkbox.tsx"() {
|
|
2836
3233
|
init_cn();
|
|
2837
|
-
Checkbox =
|
|
3234
|
+
Checkbox = React86__default.forwardRef(
|
|
2838
3235
|
({ className, label, id, ...props }, ref) => {
|
|
2839
3236
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2840
3237
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2916,7 +3313,7 @@ var init_Card = __esm({
|
|
|
2916
3313
|
md: "shadow",
|
|
2917
3314
|
lg: "shadow-elevation-dialog"
|
|
2918
3315
|
};
|
|
2919
|
-
Card =
|
|
3316
|
+
Card = React86__default.forwardRef(
|
|
2920
3317
|
({
|
|
2921
3318
|
className,
|
|
2922
3319
|
variant = "bordered",
|
|
@@ -2952,9 +3349,9 @@ var init_Card = __esm({
|
|
|
2952
3349
|
}
|
|
2953
3350
|
);
|
|
2954
3351
|
Card.displayName = "Card";
|
|
2955
|
-
CardHeader =
|
|
3352
|
+
CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2956
3353
|
CardHeader.displayName = "CardHeader";
|
|
2957
|
-
CardTitle =
|
|
3354
|
+
CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2958
3355
|
"h3",
|
|
2959
3356
|
{
|
|
2960
3357
|
ref,
|
|
@@ -2967,11 +3364,11 @@ var init_Card = __esm({
|
|
|
2967
3364
|
}
|
|
2968
3365
|
));
|
|
2969
3366
|
CardTitle.displayName = "CardTitle";
|
|
2970
|
-
CardContent =
|
|
3367
|
+
CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2971
3368
|
CardContent.displayName = "CardContent";
|
|
2972
3369
|
CardBody = CardContent;
|
|
2973
3370
|
CardBody.displayName = "CardBody";
|
|
2974
|
-
CardFooter =
|
|
3371
|
+
CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2975
3372
|
"div",
|
|
2976
3373
|
{
|
|
2977
3374
|
ref,
|
|
@@ -3026,7 +3423,7 @@ var init_FilterPill = __esm({
|
|
|
3026
3423
|
md: "w-3.5 h-3.5",
|
|
3027
3424
|
lg: "w-4 h-4"
|
|
3028
3425
|
};
|
|
3029
|
-
FilterPill =
|
|
3426
|
+
FilterPill = React86__default.forwardRef(
|
|
3030
3427
|
({
|
|
3031
3428
|
className,
|
|
3032
3429
|
variant = "default",
|
|
@@ -3051,11 +3448,7 @@ var init_FilterPill = __esm({
|
|
|
3051
3448
|
onRemove?.();
|
|
3052
3449
|
if (removeEvent) eventBus.emit(`UI:${removeEvent}`, { label: payloadLabel });
|
|
3053
3450
|
}, [onRemove, removeEvent, eventBus, payloadLabel]);
|
|
3054
|
-
const
|
|
3055
|
-
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
3056
|
-
const I = resolveIcon(icon);
|
|
3057
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes[size] }) : null;
|
|
3058
|
-
})() : icon;
|
|
3451
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes[size] }) : icon;
|
|
3059
3452
|
return /* @__PURE__ */ jsxs(
|
|
3060
3453
|
"span",
|
|
3061
3454
|
{
|
|
@@ -3084,7 +3477,7 @@ var init_FilterPill = __esm({
|
|
|
3084
3477
|
className: cn(
|
|
3085
3478
|
"ml-0.5 rounded-full hover:bg-foreground/10 transition-colors flex items-center justify-center"
|
|
3086
3479
|
),
|
|
3087
|
-
children:
|
|
3480
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: iconSizes[size] })
|
|
3088
3481
|
}
|
|
3089
3482
|
)
|
|
3090
3483
|
]
|
|
@@ -3099,13 +3492,14 @@ var sizeStyles5, Spinner;
|
|
|
3099
3492
|
var init_Spinner = __esm({
|
|
3100
3493
|
"components/atoms/Spinner.tsx"() {
|
|
3101
3494
|
init_cn();
|
|
3495
|
+
init_Icon();
|
|
3102
3496
|
sizeStyles5 = {
|
|
3103
3497
|
xs: "h-3 w-3",
|
|
3104
3498
|
sm: "h-4 w-4",
|
|
3105
3499
|
md: "h-6 w-6",
|
|
3106
3500
|
lg: "h-8 w-8"
|
|
3107
3501
|
};
|
|
3108
|
-
Spinner =
|
|
3502
|
+
Spinner = React86__default.forwardRef(
|
|
3109
3503
|
({ className, size = "md", ...props }, ref) => {
|
|
3110
3504
|
return /* @__PURE__ */ jsx(
|
|
3111
3505
|
"div",
|
|
@@ -3113,7 +3507,7 @@ var init_Spinner = __esm({
|
|
|
3113
3507
|
ref,
|
|
3114
3508
|
className: cn("text-foreground", className),
|
|
3115
3509
|
...props,
|
|
3116
|
-
children: /* @__PURE__ */ jsx(
|
|
3510
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles5[size]) })
|
|
3117
3511
|
}
|
|
3118
3512
|
);
|
|
3119
3513
|
}
|
|
@@ -3132,6 +3526,7 @@ var sizeClasses3, iconSizeClasses, statusSizeClasses, statusClasses, badgeSizeCl
|
|
|
3132
3526
|
var init_Avatar = __esm({
|
|
3133
3527
|
"components/atoms/Avatar.tsx"() {
|
|
3134
3528
|
"use client";
|
|
3529
|
+
init_Icon();
|
|
3135
3530
|
init_cn();
|
|
3136
3531
|
init_useEventBus();
|
|
3137
3532
|
sizeClasses3 = {
|
|
@@ -3173,7 +3568,7 @@ var init_Avatar = __esm({
|
|
|
3173
3568
|
alt,
|
|
3174
3569
|
name,
|
|
3175
3570
|
initials: providedInitials,
|
|
3176
|
-
icon:
|
|
3571
|
+
icon: IconComponent,
|
|
3177
3572
|
size = "md",
|
|
3178
3573
|
status,
|
|
3179
3574
|
badge,
|
|
@@ -3186,7 +3581,7 @@ var init_Avatar = __esm({
|
|
|
3186
3581
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
3187
3582
|
const hasImage = !!src;
|
|
3188
3583
|
const hasInitials = !!initials;
|
|
3189
|
-
const hasIcon = !!
|
|
3584
|
+
const hasIcon = !!IconComponent;
|
|
3190
3585
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
3191
3586
|
const isClickable = action || onClick;
|
|
3192
3587
|
const handleClick = () => {
|
|
@@ -3230,8 +3625,8 @@ var init_Avatar = __esm({
|
|
|
3230
3625
|
),
|
|
3231
3626
|
children: initials.substring(0, 2).toUpperCase()
|
|
3232
3627
|
}
|
|
3233
|
-
) : hasIcon ? /* @__PURE__ */ jsx(
|
|
3234
|
-
|
|
3628
|
+
) : hasIcon && IconComponent ? /* @__PURE__ */ jsx(
|
|
3629
|
+
IconComponent,
|
|
3235
3630
|
{
|
|
3236
3631
|
className: cn(
|
|
3237
3632
|
"text-foreground",
|
|
@@ -3239,8 +3634,9 @@ var init_Avatar = __esm({
|
|
|
3239
3634
|
)
|
|
3240
3635
|
}
|
|
3241
3636
|
) : /* @__PURE__ */ jsx(
|
|
3242
|
-
|
|
3637
|
+
Icon,
|
|
3243
3638
|
{
|
|
3639
|
+
name: "user",
|
|
3244
3640
|
className: cn(
|
|
3245
3641
|
"text-foreground",
|
|
3246
3642
|
iconSizeClasses[size]
|
|
@@ -3553,7 +3949,7 @@ var Radio;
|
|
|
3553
3949
|
var init_Radio = __esm({
|
|
3554
3950
|
"components/atoms/Radio.tsx"() {
|
|
3555
3951
|
init_cn();
|
|
3556
|
-
Radio =
|
|
3952
|
+
Radio = React86__default.forwardRef(
|
|
3557
3953
|
({
|
|
3558
3954
|
label,
|
|
3559
3955
|
helperText,
|
|
@@ -3725,7 +4121,7 @@ var init_Switch = __esm({
|
|
|
3725
4121
|
"components/atoms/Switch.tsx"() {
|
|
3726
4122
|
"use client";
|
|
3727
4123
|
init_cn();
|
|
3728
|
-
Switch =
|
|
4124
|
+
Switch = React86.forwardRef(
|
|
3729
4125
|
({
|
|
3730
4126
|
checked,
|
|
3731
4127
|
defaultChecked = false,
|
|
@@ -3736,10 +4132,10 @@ var init_Switch = __esm({
|
|
|
3736
4132
|
name,
|
|
3737
4133
|
className
|
|
3738
4134
|
}, ref) => {
|
|
3739
|
-
const [isChecked, setIsChecked] =
|
|
4135
|
+
const [isChecked, setIsChecked] = React86.useState(
|
|
3740
4136
|
checked !== void 0 ? checked : defaultChecked
|
|
3741
4137
|
);
|
|
3742
|
-
|
|
4138
|
+
React86.useEffect(() => {
|
|
3743
4139
|
if (checked !== void 0) {
|
|
3744
4140
|
setIsChecked(checked);
|
|
3745
4141
|
}
|
|
@@ -3998,6 +4394,7 @@ var sizeClasses4, iconSizes2, ThemeToggle;
|
|
|
3998
4394
|
var init_ThemeToggle = __esm({
|
|
3999
4395
|
"components/atoms/ThemeToggle.tsx"() {
|
|
4000
4396
|
"use client";
|
|
4397
|
+
init_Icon();
|
|
4001
4398
|
init_cn();
|
|
4002
4399
|
init_ThemeContext();
|
|
4003
4400
|
sizeClasses4 = {
|
|
@@ -4035,13 +4432,15 @@ var init_ThemeToggle = __esm({
|
|
|
4035
4432
|
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
4036
4433
|
children: [
|
|
4037
4434
|
isDark ? /* @__PURE__ */ jsx(
|
|
4038
|
-
|
|
4435
|
+
Icon,
|
|
4039
4436
|
{
|
|
4437
|
+
name: "sun",
|
|
4040
4438
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4041
4439
|
}
|
|
4042
4440
|
) : /* @__PURE__ */ jsx(
|
|
4043
|
-
|
|
4441
|
+
Icon,
|
|
4044
4442
|
{
|
|
4443
|
+
name: "moon",
|
|
4045
4444
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4046
4445
|
}
|
|
4047
4446
|
),
|
|
@@ -4092,7 +4491,7 @@ var Aside;
|
|
|
4092
4491
|
var init_Aside = __esm({
|
|
4093
4492
|
"components/atoms/Aside.tsx"() {
|
|
4094
4493
|
init_cn();
|
|
4095
|
-
Aside =
|
|
4494
|
+
Aside = React86__default.forwardRef(
|
|
4096
4495
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4097
4496
|
);
|
|
4098
4497
|
Aside.displayName = "Aside";
|
|
@@ -4169,8 +4568,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4169
4568
|
position = "top",
|
|
4170
4569
|
className
|
|
4171
4570
|
}) => {
|
|
4172
|
-
const [isVisible, setIsVisible] =
|
|
4173
|
-
const timeoutRef =
|
|
4571
|
+
const [isVisible, setIsVisible] = React86__default.useState(false);
|
|
4572
|
+
const timeoutRef = React86__default.useRef(null);
|
|
4174
4573
|
const handleMouseEnter = () => {
|
|
4175
4574
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4176
4575
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4179,7 +4578,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4179
4578
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4180
4579
|
setIsVisible(false);
|
|
4181
4580
|
};
|
|
4182
|
-
|
|
4581
|
+
React86__default.useEffect(() => {
|
|
4183
4582
|
return () => {
|
|
4184
4583
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4185
4584
|
};
|
|
@@ -4389,7 +4788,7 @@ var init_StatusDot = __esm({
|
|
|
4389
4788
|
md: "w-2.5 h-2.5",
|
|
4390
4789
|
lg: "w-3 h-3"
|
|
4391
4790
|
};
|
|
4392
|
-
StatusDot =
|
|
4791
|
+
StatusDot = React86__default.forwardRef(
|
|
4393
4792
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4394
4793
|
return /* @__PURE__ */ jsx(
|
|
4395
4794
|
"span",
|
|
@@ -4428,21 +4827,22 @@ function resolveColor(dir, invert) {
|
|
|
4428
4827
|
const isGood = invert ? !isPositive : isPositive;
|
|
4429
4828
|
return isGood ? "text-success" : "text-error";
|
|
4430
4829
|
}
|
|
4431
|
-
var sizeStyles7,
|
|
4830
|
+
var sizeStyles7, iconNameMap, TrendIndicator;
|
|
4432
4831
|
var init_TrendIndicator = __esm({
|
|
4433
4832
|
"components/atoms/TrendIndicator.tsx"() {
|
|
4833
|
+
init_Icon();
|
|
4434
4834
|
init_cn();
|
|
4435
4835
|
sizeStyles7 = {
|
|
4436
4836
|
sm: { icon: "w-3 h-3", text: "text-xs" },
|
|
4437
4837
|
md: { icon: "w-4 h-4", text: "text-sm" },
|
|
4438
4838
|
lg: { icon: "w-5 h-5", text: "text-base" }
|
|
4439
4839
|
};
|
|
4440
|
-
|
|
4441
|
-
up:
|
|
4442
|
-
down:
|
|
4443
|
-
flat:
|
|
4840
|
+
iconNameMap = {
|
|
4841
|
+
up: "trending-up",
|
|
4842
|
+
down: "trending-down",
|
|
4843
|
+
flat: "arrow-right"
|
|
4444
4844
|
};
|
|
4445
|
-
TrendIndicator =
|
|
4845
|
+
TrendIndicator = React86__default.forwardRef(
|
|
4446
4846
|
({
|
|
4447
4847
|
className,
|
|
4448
4848
|
value,
|
|
@@ -4455,7 +4855,7 @@ var init_TrendIndicator = __esm({
|
|
|
4455
4855
|
}, ref) => {
|
|
4456
4856
|
const dir = resolveDirection(value, direction);
|
|
4457
4857
|
const colorClass = resolveColor(dir, invert);
|
|
4458
|
-
const
|
|
4858
|
+
const iconName = iconNameMap[dir];
|
|
4459
4859
|
const styles = sizeStyles7[size];
|
|
4460
4860
|
const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
|
|
4461
4861
|
const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
|
|
@@ -4473,7 +4873,7 @@ var init_TrendIndicator = __esm({
|
|
|
4473
4873
|
"aria-label": ariaLabel,
|
|
4474
4874
|
...props,
|
|
4475
4875
|
children: [
|
|
4476
|
-
/* @__PURE__ */ jsx(
|
|
4876
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, className: styles.icon }),
|
|
4477
4877
|
showValue && formattedValue && /* @__PURE__ */ jsx("span", { children: formattedValue })
|
|
4478
4878
|
]
|
|
4479
4879
|
}
|
|
@@ -4509,7 +4909,7 @@ var init_RangeSlider = __esm({
|
|
|
4509
4909
|
md: "w-4 h-4",
|
|
4510
4910
|
lg: "w-5 h-5"
|
|
4511
4911
|
};
|
|
4512
|
-
RangeSlider =
|
|
4912
|
+
RangeSlider = React86__default.forwardRef(
|
|
4513
4913
|
({
|
|
4514
4914
|
className,
|
|
4515
4915
|
min = 0,
|
|
@@ -5077,7 +5477,7 @@ var init_ContentSection = __esm({
|
|
|
5077
5477
|
md: "py-16",
|
|
5078
5478
|
lg: "py-24"
|
|
5079
5479
|
};
|
|
5080
|
-
ContentSection =
|
|
5480
|
+
ContentSection = React86__default.forwardRef(
|
|
5081
5481
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5082
5482
|
return /* @__PURE__ */ jsx(
|
|
5083
5483
|
Box,
|
|
@@ -5611,7 +6011,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5611
6011
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5612
6012
|
"none": {}
|
|
5613
6013
|
};
|
|
5614
|
-
AnimatedReveal =
|
|
6014
|
+
AnimatedReveal = React86__default.forwardRef(
|
|
5615
6015
|
({
|
|
5616
6016
|
trigger = "scroll",
|
|
5617
6017
|
animation = "fade-up",
|
|
@@ -5641,7 +6041,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5641
6041
|
if (trigger !== "scroll") return;
|
|
5642
6042
|
const el = internalRef.current;
|
|
5643
6043
|
if (!el) return;
|
|
5644
|
-
const
|
|
6044
|
+
const observer2 = new IntersectionObserver(
|
|
5645
6045
|
([entry]) => {
|
|
5646
6046
|
if (entry.isIntersecting) {
|
|
5647
6047
|
if (once && hasAnimated.current) return;
|
|
@@ -5653,8 +6053,8 @@ var init_AnimatedReveal = __esm({
|
|
|
5653
6053
|
},
|
|
5654
6054
|
{ threshold }
|
|
5655
6055
|
);
|
|
5656
|
-
|
|
5657
|
-
return () =>
|
|
6056
|
+
observer2.observe(el);
|
|
6057
|
+
return () => observer2.disconnect();
|
|
5658
6058
|
}, [trigger, threshold, once]);
|
|
5659
6059
|
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
5660
6060
|
const handleMouseLeave = trigger === "hover" ? () => {
|
|
@@ -5771,7 +6171,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5771
6171
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
5772
6172
|
"use client";
|
|
5773
6173
|
init_cn();
|
|
5774
|
-
AnimatedGraphic =
|
|
6174
|
+
AnimatedGraphic = React86__default.forwardRef(
|
|
5775
6175
|
({
|
|
5776
6176
|
src,
|
|
5777
6177
|
svgContent,
|
|
@@ -5794,7 +6194,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5794
6194
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5795
6195
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5796
6196
|
const prevAnimateRef = useRef(animate);
|
|
5797
|
-
const setRef =
|
|
6197
|
+
const setRef = React86__default.useCallback(
|
|
5798
6198
|
(node) => {
|
|
5799
6199
|
containerRef.current = node;
|
|
5800
6200
|
if (typeof ref === "function") ref(node);
|
|
@@ -6019,9 +6419,9 @@ function ScoreDisplay({
|
|
|
6019
6419
|
...rest
|
|
6020
6420
|
}) {
|
|
6021
6421
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6022
|
-
const [displayValue, setDisplayValue] =
|
|
6023
|
-
const [isAnimating, setIsAnimating] =
|
|
6024
|
-
|
|
6422
|
+
const [displayValue, setDisplayValue] = React86.useState(resolvedValue);
|
|
6423
|
+
const [isAnimating, setIsAnimating] = React86.useState(false);
|
|
6424
|
+
React86.useEffect(() => {
|
|
6025
6425
|
if (!animated || displayValue === resolvedValue) {
|
|
6026
6426
|
setDisplayValue(resolvedValue);
|
|
6027
6427
|
return;
|
|
@@ -6091,9 +6491,9 @@ function ControlButton({
|
|
|
6091
6491
|
className
|
|
6092
6492
|
}) {
|
|
6093
6493
|
const eventBus = useEventBus();
|
|
6094
|
-
const [isPressed, setIsPressed] =
|
|
6494
|
+
const [isPressed, setIsPressed] = React86.useState(false);
|
|
6095
6495
|
const actualPressed = pressed ?? isPressed;
|
|
6096
|
-
const handlePointerDown =
|
|
6496
|
+
const handlePointerDown = React86.useCallback(
|
|
6097
6497
|
(e) => {
|
|
6098
6498
|
e.preventDefault();
|
|
6099
6499
|
if (disabled) return;
|
|
@@ -6103,7 +6503,7 @@ function ControlButton({
|
|
|
6103
6503
|
},
|
|
6104
6504
|
[disabled, pressEvent, eventBus, onPress]
|
|
6105
6505
|
);
|
|
6106
|
-
const handlePointerUp =
|
|
6506
|
+
const handlePointerUp = React86.useCallback(
|
|
6107
6507
|
(e) => {
|
|
6108
6508
|
e.preventDefault();
|
|
6109
6509
|
if (disabled) return;
|
|
@@ -6113,7 +6513,7 @@ function ControlButton({
|
|
|
6113
6513
|
},
|
|
6114
6514
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6115
6515
|
);
|
|
6116
|
-
const handlePointerLeave =
|
|
6516
|
+
const handlePointerLeave = React86.useCallback(
|
|
6117
6517
|
(e) => {
|
|
6118
6518
|
if (isPressed) {
|
|
6119
6519
|
setIsPressed(false);
|
|
@@ -7019,9 +7419,9 @@ function MiniMap({
|
|
|
7019
7419
|
viewportRect,
|
|
7020
7420
|
className
|
|
7021
7421
|
}) {
|
|
7022
|
-
const canvasRef =
|
|
7023
|
-
const frameRef =
|
|
7024
|
-
|
|
7422
|
+
const canvasRef = React86.useRef(null);
|
|
7423
|
+
const frameRef = React86.useRef(0);
|
|
7424
|
+
React86.useEffect(() => {
|
|
7025
7425
|
const canvas = canvasRef.current;
|
|
7026
7426
|
if (!canvas) return;
|
|
7027
7427
|
const ctx = canvas.getContext("2d");
|
|
@@ -7271,6 +7671,7 @@ var init_ErrorState = __esm({
|
|
|
7271
7671
|
init_Box();
|
|
7272
7672
|
init_Stack();
|
|
7273
7673
|
init_Typography();
|
|
7674
|
+
init_Icon();
|
|
7274
7675
|
init_useEventBus();
|
|
7275
7676
|
init_useTranslate();
|
|
7276
7677
|
ErrorState = ({
|
|
@@ -7298,7 +7699,7 @@ var init_ErrorState = __esm({
|
|
|
7298
7699
|
className
|
|
7299
7700
|
),
|
|
7300
7701
|
children: [
|
|
7301
|
-
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsx(
|
|
7702
|
+
/* @__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" }) }),
|
|
7302
7703
|
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
7303
7704
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
7304
7705
|
(onRetry || retryEvent) && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
@@ -7315,7 +7716,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7315
7716
|
"use client";
|
|
7316
7717
|
init_cn();
|
|
7317
7718
|
init_ErrorState();
|
|
7318
|
-
ErrorBoundary = class extends
|
|
7719
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
7319
7720
|
constructor(props) {
|
|
7320
7721
|
super(props);
|
|
7321
7722
|
__publicField(this, "reset", () => {
|
|
@@ -8596,7 +8997,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
8596
8997
|
AboutPageTemplate.displayName = "AboutPageTemplate";
|
|
8597
8998
|
}
|
|
8598
8999
|
});
|
|
8599
|
-
var variantBorderClasses, variantIconColors,
|
|
9000
|
+
var variantBorderClasses, variantIconColors, iconMap2, Alert;
|
|
8600
9001
|
var init_Alert = __esm({
|
|
8601
9002
|
"components/molecules/Alert.tsx"() {
|
|
8602
9003
|
"use client";
|
|
@@ -8617,11 +9018,11 @@ var init_Alert = __esm({
|
|
|
8617
9018
|
warning: "text-warning",
|
|
8618
9019
|
error: "text-error"
|
|
8619
9020
|
};
|
|
8620
|
-
|
|
8621
|
-
info:
|
|
8622
|
-
success:
|
|
8623
|
-
warning:
|
|
8624
|
-
error:
|
|
9021
|
+
iconMap2 = {
|
|
9022
|
+
info: "info",
|
|
9023
|
+
success: "check-circle",
|
|
9024
|
+
warning: "alert-triangle",
|
|
9025
|
+
error: "alert-circle"
|
|
8625
9026
|
};
|
|
8626
9027
|
Alert = ({
|
|
8627
9028
|
children,
|
|
@@ -8656,7 +9057,7 @@ var init_Alert = __esm({
|
|
|
8656
9057
|
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
8657
9058
|
Icon,
|
|
8658
9059
|
{
|
|
8659
|
-
|
|
9060
|
+
name: iconMap2[variant],
|
|
8660
9061
|
size: "md",
|
|
8661
9062
|
className: variantIconColors[variant]
|
|
8662
9063
|
}
|
|
@@ -8676,7 +9077,7 @@ var init_Alert = __esm({
|
|
|
8676
9077
|
"hover:bg-muted"
|
|
8677
9078
|
),
|
|
8678
9079
|
"aria-label": "Dismiss alert",
|
|
8679
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
9080
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "sm" })
|
|
8680
9081
|
}
|
|
8681
9082
|
)
|
|
8682
9083
|
] })
|
|
@@ -8752,8 +9153,8 @@ var init_Tooltip = __esm({
|
|
|
8752
9153
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
8753
9154
|
};
|
|
8754
9155
|
}, []);
|
|
8755
|
-
const triggerElement =
|
|
8756
|
-
const trigger =
|
|
9156
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9157
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
8757
9158
|
ref: triggerRef,
|
|
8758
9159
|
onMouseEnter: handleMouseEnter,
|
|
8759
9160
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8908,8 +9309,8 @@ var init_Popover = __esm({
|
|
|
8908
9309
|
onMouseEnter: handleOpen,
|
|
8909
9310
|
onMouseLeave: handleClose
|
|
8910
9311
|
};
|
|
8911
|
-
const childElement =
|
|
8912
|
-
const triggerElement =
|
|
9312
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9313
|
+
const triggerElement = React86__default.cloneElement(
|
|
8913
9314
|
childElement,
|
|
8914
9315
|
{
|
|
8915
9316
|
ref: triggerRef,
|
|
@@ -9025,8 +9426,8 @@ var init_Menu = __esm({
|
|
|
9025
9426
|
"bottom-start": "top-full left-0 mt-2",
|
|
9026
9427
|
"bottom-end": "top-full right-0 mt-2"
|
|
9027
9428
|
};
|
|
9028
|
-
const triggerChild =
|
|
9029
|
-
const triggerElement =
|
|
9429
|
+
const triggerChild = React86__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
9430
|
+
const triggerElement = React86__default.cloneElement(
|
|
9030
9431
|
triggerChild,
|
|
9031
9432
|
{
|
|
9032
9433
|
ref: triggerRef,
|
|
@@ -9071,7 +9472,7 @@ var init_Menu = __esm({
|
|
|
9071
9472
|
}
|
|
9072
9473
|
),
|
|
9073
9474
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
9074
|
-
hasSubMenu && /* @__PURE__ */ jsx(Icon, {
|
|
9475
|
+
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
9075
9476
|
] })
|
|
9076
9477
|
},
|
|
9077
9478
|
itemId
|
|
@@ -9216,7 +9617,7 @@ var init_Accordion = __esm({
|
|
|
9216
9617
|
/* @__PURE__ */ jsx(
|
|
9217
9618
|
Icon,
|
|
9218
9619
|
{
|
|
9219
|
-
|
|
9620
|
+
name: "chevron-down",
|
|
9220
9621
|
size: "sm",
|
|
9221
9622
|
className: cn(
|
|
9222
9623
|
"transition-transform duration-fast",
|
|
@@ -9241,15 +9642,6 @@ var init_Accordion = __esm({
|
|
|
9241
9642
|
Accordion.displayName = "Accordion";
|
|
9242
9643
|
}
|
|
9243
9644
|
});
|
|
9244
|
-
function resolveIcon2(name) {
|
|
9245
|
-
const pascalName = name.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join("");
|
|
9246
|
-
const icons = LucideIcons;
|
|
9247
|
-
const icon = icons[pascalName];
|
|
9248
|
-
if (icon) {
|
|
9249
|
-
return icon;
|
|
9250
|
-
}
|
|
9251
|
-
return Plus;
|
|
9252
|
-
}
|
|
9253
9645
|
var FloatingActionButton;
|
|
9254
9646
|
var init_FloatingActionButton = __esm({
|
|
9255
9647
|
"components/molecules/FloatingActionButton.tsx"() {
|
|
@@ -9275,7 +9667,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9275
9667
|
const eventBus = useEventBus();
|
|
9276
9668
|
const { t } = useTranslate();
|
|
9277
9669
|
const resolvedAction = icon ? {
|
|
9278
|
-
icon
|
|
9670
|
+
icon,
|
|
9279
9671
|
onClick: () => {
|
|
9280
9672
|
if (action) eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
9281
9673
|
onClick?.();
|
|
@@ -9385,7 +9777,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9385
9777
|
{
|
|
9386
9778
|
variant: isExpanded ? "secondary" : "primary",
|
|
9387
9779
|
size: "lg",
|
|
9388
|
-
icon: isExpanded ?
|
|
9780
|
+
icon: isExpanded ? "x" : "plus",
|
|
9389
9781
|
onClick: handleMainClick,
|
|
9390
9782
|
className: "rounded-full shadow-lg transition-all duration-normal",
|
|
9391
9783
|
"aria-label": isExpanded ? "Close actions" : "Open actions",
|
|
@@ -9442,13 +9834,13 @@ var init_MapView = __esm({
|
|
|
9442
9834
|
shadowSize: [41, 41]
|
|
9443
9835
|
});
|
|
9444
9836
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9445
|
-
const { useEffect:
|
|
9837
|
+
const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback113, useState: useState99 } = React86__default;
|
|
9446
9838
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9447
9839
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9448
9840
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9449
9841
|
const map = useMap();
|
|
9450
9842
|
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
9451
|
-
|
|
9843
|
+
useEffect69(() => {
|
|
9452
9844
|
const prev = prevRef.current;
|
|
9453
9845
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
9454
9846
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -9459,7 +9851,7 @@ var init_MapView = __esm({
|
|
|
9459
9851
|
}
|
|
9460
9852
|
function MapClickHandler({ onMapClick }) {
|
|
9461
9853
|
const map = useMap();
|
|
9462
|
-
|
|
9854
|
+
useEffect69(() => {
|
|
9463
9855
|
if (!onMapClick) return;
|
|
9464
9856
|
const handler = (e) => {
|
|
9465
9857
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -9487,7 +9879,7 @@ var init_MapView = __esm({
|
|
|
9487
9879
|
showAttribution = true
|
|
9488
9880
|
}) {
|
|
9489
9881
|
const eventBus = useEventBus2();
|
|
9490
|
-
const [clickedPosition, setClickedPosition] =
|
|
9882
|
+
const [clickedPosition, setClickedPosition] = useState99(null);
|
|
9491
9883
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
9492
9884
|
if (showClickedPin) {
|
|
9493
9885
|
setClickedPosition({ lat, lng });
|
|
@@ -9688,7 +10080,7 @@ function InputPattern({
|
|
|
9688
10080
|
fieldName
|
|
9689
10081
|
}) {
|
|
9690
10082
|
const { emit } = useEventBus();
|
|
9691
|
-
const [localValue, setLocalValue] =
|
|
10083
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9692
10084
|
const handleChange = (e) => {
|
|
9693
10085
|
setLocalValue(e.target.value);
|
|
9694
10086
|
if (onChange) {
|
|
@@ -9726,7 +10118,7 @@ function TextareaPattern({
|
|
|
9726
10118
|
fieldName
|
|
9727
10119
|
}) {
|
|
9728
10120
|
const { emit } = useEventBus();
|
|
9729
|
-
const [localValue, setLocalValue] =
|
|
10121
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9730
10122
|
const handleChange = (e) => {
|
|
9731
10123
|
setLocalValue(e.target.value);
|
|
9732
10124
|
if (onChange) {
|
|
@@ -9758,7 +10150,7 @@ function SelectPattern({
|
|
|
9758
10150
|
fieldName
|
|
9759
10151
|
}) {
|
|
9760
10152
|
const { emit } = useEventBus();
|
|
9761
|
-
const [localValue, setLocalValue] =
|
|
10153
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9762
10154
|
const handleChange = (e) => {
|
|
9763
10155
|
setLocalValue(e.target.value);
|
|
9764
10156
|
if (onChange) {
|
|
@@ -9787,7 +10179,7 @@ function CheckboxPattern({
|
|
|
9787
10179
|
className
|
|
9788
10180
|
}) {
|
|
9789
10181
|
const { emit } = useEventBus();
|
|
9790
|
-
const [localChecked, setLocalChecked] =
|
|
10182
|
+
const [localChecked, setLocalChecked] = React86__default.useState(checked);
|
|
9791
10183
|
const handleChange = (e) => {
|
|
9792
10184
|
setLocalChecked(e.target.checked);
|
|
9793
10185
|
if (onChange) {
|
|
@@ -10018,8 +10410,8 @@ function ActionButtons({
|
|
|
10018
10410
|
disabled
|
|
10019
10411
|
}) {
|
|
10020
10412
|
const eventBus = useEventBus();
|
|
10021
|
-
const [activeButtons, setActiveButtons] =
|
|
10022
|
-
const handlePress =
|
|
10413
|
+
const [activeButtons, setActiveButtons] = React86.useState(/* @__PURE__ */ new Set());
|
|
10414
|
+
const handlePress = React86.useCallback(
|
|
10023
10415
|
(id) => {
|
|
10024
10416
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
10025
10417
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -10027,7 +10419,7 @@ function ActionButtons({
|
|
|
10027
10419
|
},
|
|
10028
10420
|
[actionEvent, eventBus, onAction]
|
|
10029
10421
|
);
|
|
10030
|
-
const handleRelease =
|
|
10422
|
+
const handleRelease = React86.useCallback(
|
|
10031
10423
|
(id) => {
|
|
10032
10424
|
setActiveButtons((prev) => {
|
|
10033
10425
|
const next = new Set(prev);
|
|
@@ -10847,7 +11239,7 @@ function IsometricCanvas({
|
|
|
10847
11239
|
const el = containerRef.current;
|
|
10848
11240
|
if (!el) return;
|
|
10849
11241
|
if (typeof ResizeObserver === "undefined") return;
|
|
10850
|
-
const
|
|
11242
|
+
const observer2 = new ResizeObserver((entries) => {
|
|
10851
11243
|
const entry = entries[0];
|
|
10852
11244
|
if (entry) {
|
|
10853
11245
|
const w = Math.round(entry.contentRect.width) || 800;
|
|
@@ -10858,8 +11250,8 @@ function IsometricCanvas({
|
|
|
10858
11250
|
});
|
|
10859
11251
|
}
|
|
10860
11252
|
});
|
|
10861
|
-
|
|
10862
|
-
return () =>
|
|
11253
|
+
observer2.observe(el);
|
|
11254
|
+
return () => observer2.disconnect();
|
|
10863
11255
|
}, []);
|
|
10864
11256
|
const units = useMemo(
|
|
10865
11257
|
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
@@ -12878,7 +13270,7 @@ var init_MarkdownContent = __esm({
|
|
|
12878
13270
|
init_Box();
|
|
12879
13271
|
init_useTranslate();
|
|
12880
13272
|
init_cn();
|
|
12881
|
-
MarkdownContent =
|
|
13273
|
+
MarkdownContent = React86__default.memo(
|
|
12882
13274
|
({ content, direction, className }) => {
|
|
12883
13275
|
const { t: _t } = useTranslate();
|
|
12884
13276
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -13024,6 +13416,7 @@ var init_CodeBlock = __esm({
|
|
|
13024
13416
|
init_Badge();
|
|
13025
13417
|
init_Stack();
|
|
13026
13418
|
init_Textarea();
|
|
13419
|
+
init_Icon();
|
|
13027
13420
|
init_useEventBus();
|
|
13028
13421
|
init_useTranslate();
|
|
13029
13422
|
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
@@ -13096,7 +13489,7 @@ var init_CodeBlock = __esm({
|
|
|
13096
13489
|
log8 = createLogger("almadar:ui:markdown-code");
|
|
13097
13490
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13098
13491
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13099
|
-
CodeBlock =
|
|
13492
|
+
CodeBlock = React86__default.memo(
|
|
13100
13493
|
({
|
|
13101
13494
|
code: rawCode,
|
|
13102
13495
|
language = "text",
|
|
@@ -13314,7 +13707,7 @@ var init_CodeBlock = __esm({
|
|
|
13314
13707
|
onClick: handleCopy,
|
|
13315
13708
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
13316
13709
|
"aria-label": "Copy code",
|
|
13317
|
-
children: copied ? /* @__PURE__ */ jsx(
|
|
13710
|
+
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" })
|
|
13318
13711
|
}
|
|
13319
13712
|
)
|
|
13320
13713
|
]
|
|
@@ -13645,7 +14038,7 @@ var init_QuizBlock = __esm({
|
|
|
13645
14038
|
className: "self-start ml-7",
|
|
13646
14039
|
children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
13647
14040
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: revealed ? t("quiz.hideAnswer") : t("quiz.showAnswer") }),
|
|
13648
|
-
revealed ? /* @__PURE__ */ jsx(
|
|
14041
|
+
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" })
|
|
13649
14042
|
] })
|
|
13650
14043
|
}
|
|
13651
14044
|
)
|
|
@@ -14405,7 +14798,7 @@ var init_StateMachineView = __esm({
|
|
|
14405
14798
|
style: { top: title ? 30 : 0 },
|
|
14406
14799
|
children: [
|
|
14407
14800
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14408
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14801
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14409
14802
|
StateNode,
|
|
14410
14803
|
{
|
|
14411
14804
|
state,
|
|
@@ -15553,28 +15946,22 @@ var init_BookTableOfContents = __esm({
|
|
|
15553
15946
|
BookTableOfContents.displayName = "BookTableOfContents";
|
|
15554
15947
|
}
|
|
15555
15948
|
});
|
|
15556
|
-
var
|
|
15949
|
+
var ICON_NAME_ALIASES, EmptyState;
|
|
15557
15950
|
var init_EmptyState = __esm({
|
|
15558
15951
|
"components/molecules/EmptyState.tsx"() {
|
|
15559
15952
|
"use client";
|
|
15560
15953
|
init_cn();
|
|
15561
15954
|
init_atoms();
|
|
15562
15955
|
init_Box();
|
|
15956
|
+
init_Icon();
|
|
15563
15957
|
init_Stack();
|
|
15564
15958
|
init_Typography();
|
|
15565
15959
|
init_useEventBus();
|
|
15566
15960
|
init_useTranslate();
|
|
15567
|
-
|
|
15568
|
-
"check-circle"
|
|
15569
|
-
|
|
15570
|
-
"
|
|
15571
|
-
error: XCircle,
|
|
15572
|
-
"alert-circle": AlertCircle,
|
|
15573
|
-
warning: AlertCircle,
|
|
15574
|
-
info: Info,
|
|
15575
|
-
search: Search,
|
|
15576
|
-
inbox: Inbox,
|
|
15577
|
-
"file-question": FileQuestion
|
|
15961
|
+
ICON_NAME_ALIASES = {
|
|
15962
|
+
check: "check-circle",
|
|
15963
|
+
error: "x-circle",
|
|
15964
|
+
warning: "alert-circle"
|
|
15578
15965
|
};
|
|
15579
15966
|
EmptyState = ({
|
|
15580
15967
|
icon,
|
|
@@ -15594,7 +15981,9 @@ var init_EmptyState = __esm({
|
|
|
15594
15981
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
15595
15982
|
onAction?.();
|
|
15596
15983
|
};
|
|
15597
|
-
const
|
|
15984
|
+
const iconName = typeof icon === "string" ? ICON_NAME_ALIASES[icon] ?? icon : void 0;
|
|
15985
|
+
const iconComponent = typeof icon === "function" ? icon : void 0;
|
|
15986
|
+
const hasIcon = Boolean(iconName || iconComponent);
|
|
15598
15987
|
const isDestructive = destructive || variant === "error";
|
|
15599
15988
|
const isSuccess = variant === "success";
|
|
15600
15989
|
const displayText = title || message || t("empty.noItems");
|
|
@@ -15607,7 +15996,7 @@ var init_EmptyState = __esm({
|
|
|
15607
15996
|
className
|
|
15608
15997
|
),
|
|
15609
15998
|
children: [
|
|
15610
|
-
|
|
15999
|
+
hasIcon && /* @__PURE__ */ jsx(
|
|
15611
16000
|
Box,
|
|
15612
16001
|
{
|
|
15613
16002
|
className: cn(
|
|
@@ -15615,8 +16004,9 @@ var init_EmptyState = __esm({
|
|
|
15615
16004
|
isDestructive ? "bg-error/10" : isSuccess ? "bg-success/10" : "bg-muted"
|
|
15616
16005
|
),
|
|
15617
16006
|
children: /* @__PURE__ */ jsx(
|
|
15618
|
-
|
|
16007
|
+
Icon,
|
|
15619
16008
|
{
|
|
16009
|
+
...iconName ? { name: iconName } : { icon: iconComponent },
|
|
15620
16010
|
className: cn(
|
|
15621
16011
|
"h-8 w-8",
|
|
15622
16012
|
isDestructive ? "text-error" : isSuccess ? "text-success" : "text-muted-foreground"
|
|
@@ -15986,7 +16376,7 @@ var init_Grid = __esm({
|
|
|
15986
16376
|
as: Component = "div"
|
|
15987
16377
|
}) => {
|
|
15988
16378
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
15989
|
-
return
|
|
16379
|
+
return React86__default.createElement(
|
|
15990
16380
|
Component,
|
|
15991
16381
|
{
|
|
15992
16382
|
className: cn(
|
|
@@ -16599,7 +16989,7 @@ var init_Breadcrumb = __esm({
|
|
|
16599
16989
|
init_useEventBus();
|
|
16600
16990
|
Breadcrumb = ({
|
|
16601
16991
|
items,
|
|
16602
|
-
separator =
|
|
16992
|
+
separator = "chevron-right",
|
|
16603
16993
|
maxItems,
|
|
16604
16994
|
className
|
|
16605
16995
|
}) => {
|
|
@@ -16628,7 +17018,7 @@ var init_Breadcrumb = __esm({
|
|
|
16628
17018
|
),
|
|
16629
17019
|
"aria-current": isLast ? "page" : void 0,
|
|
16630
17020
|
children: [
|
|
16631
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
17021
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16632
17022
|
/* @__PURE__ */ jsx(
|
|
16633
17023
|
Typography,
|
|
16634
17024
|
{
|
|
@@ -16655,7 +17045,7 @@ var init_Breadcrumb = __esm({
|
|
|
16655
17045
|
"aria-current": isLast ? "page" : void 0,
|
|
16656
17046
|
disabled: isLast,
|
|
16657
17047
|
children: [
|
|
16658
|
-
item.icon && /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" }),
|
|
17048
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm" })),
|
|
16659
17049
|
/* @__PURE__ */ jsx(
|
|
16660
17050
|
Typography,
|
|
16661
17051
|
{
|
|
@@ -16667,14 +17057,7 @@ var init_Breadcrumb = __esm({
|
|
|
16667
17057
|
]
|
|
16668
17058
|
}
|
|
16669
17059
|
),
|
|
16670
|
-
!isLast && /* @__PURE__ */ jsx(
|
|
16671
|
-
Icon,
|
|
16672
|
-
{
|
|
16673
|
-
icon: separator,
|
|
16674
|
-
size: "sm",
|
|
16675
|
-
className: "text-muted-foreground"
|
|
16676
|
-
}
|
|
16677
|
-
)
|
|
17060
|
+
!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" }))
|
|
16678
17061
|
] }, index);
|
|
16679
17062
|
}) })
|
|
16680
17063
|
}
|
|
@@ -17195,7 +17578,7 @@ function CalendarGrid({
|
|
|
17195
17578
|
{
|
|
17196
17579
|
variant: "ghost",
|
|
17197
17580
|
size: "sm",
|
|
17198
|
-
icon:
|
|
17581
|
+
icon: "chevron-left",
|
|
17199
17582
|
onClick: stepPrev,
|
|
17200
17583
|
"aria-disabled": !canPrev || void 0,
|
|
17201
17584
|
"aria-label": "Previous days",
|
|
@@ -17208,7 +17591,7 @@ function CalendarGrid({
|
|
|
17208
17591
|
{
|
|
17209
17592
|
variant: "ghost",
|
|
17210
17593
|
size: "sm",
|
|
17211
|
-
iconRight:
|
|
17594
|
+
iconRight: "chevron-right",
|
|
17212
17595
|
onClick: stepNext,
|
|
17213
17596
|
"aria-disabled": !canNext || void 0,
|
|
17214
17597
|
"aria-label": "Next days",
|
|
@@ -21122,7 +21505,7 @@ function CounterMinimal({
|
|
|
21122
21505
|
size: sizeStyles9[size].button,
|
|
21123
21506
|
onClick: onDecrement,
|
|
21124
21507
|
disabled: resolved.decrementDisabled,
|
|
21125
|
-
icon:
|
|
21508
|
+
icon: "minus",
|
|
21126
21509
|
children: resolved.decrementLabel
|
|
21127
21510
|
}
|
|
21128
21511
|
),
|
|
@@ -21144,7 +21527,7 @@ function CounterMinimal({
|
|
|
21144
21527
|
size: sizeStyles9[size].button,
|
|
21145
21528
|
onClick: onIncrement,
|
|
21146
21529
|
disabled: resolved.incrementDisabled,
|
|
21147
|
-
icon:
|
|
21530
|
+
icon: "plus",
|
|
21148
21531
|
children: resolved.incrementLabel
|
|
21149
21532
|
}
|
|
21150
21533
|
)
|
|
@@ -21190,7 +21573,7 @@ function CounterStandard({
|
|
|
21190
21573
|
size: sizeStyles9[size].button,
|
|
21191
21574
|
onClick: onDecrement,
|
|
21192
21575
|
disabled: resolved.decrementDisabled,
|
|
21193
|
-
icon:
|
|
21576
|
+
icon: "minus"
|
|
21194
21577
|
}
|
|
21195
21578
|
),
|
|
21196
21579
|
/* @__PURE__ */ jsx(
|
|
@@ -21200,7 +21583,7 @@ function CounterStandard({
|
|
|
21200
21583
|
size: sizeStyles9[size].button,
|
|
21201
21584
|
onClick: onIncrement,
|
|
21202
21585
|
disabled: resolved.incrementDisabled,
|
|
21203
|
-
icon:
|
|
21586
|
+
icon: "plus"
|
|
21204
21587
|
}
|
|
21205
21588
|
)
|
|
21206
21589
|
] }),
|
|
@@ -21210,7 +21593,7 @@ function CounterStandard({
|
|
|
21210
21593
|
variant: "ghost",
|
|
21211
21594
|
size: "sm",
|
|
21212
21595
|
onClick: onReset,
|
|
21213
|
-
icon:
|
|
21596
|
+
icon: "rotate-ccw",
|
|
21214
21597
|
children: "Reset"
|
|
21215
21598
|
}
|
|
21216
21599
|
)
|
|
@@ -21259,7 +21642,7 @@ function CounterFull({
|
|
|
21259
21642
|
size: sizeStyles9[size].button,
|
|
21260
21643
|
onClick: onDecrement,
|
|
21261
21644
|
disabled: resolved.decrementDisabled,
|
|
21262
|
-
icon:
|
|
21645
|
+
icon: "minus",
|
|
21263
21646
|
children: resolved.decrementLabel
|
|
21264
21647
|
}
|
|
21265
21648
|
),
|
|
@@ -21270,7 +21653,7 @@ function CounterFull({
|
|
|
21270
21653
|
size: sizeStyles9[size].button,
|
|
21271
21654
|
onClick: onIncrement,
|
|
21272
21655
|
disabled: resolved.incrementDisabled,
|
|
21273
|
-
icon:
|
|
21656
|
+
icon: "plus",
|
|
21274
21657
|
children: resolved.incrementLabel
|
|
21275
21658
|
}
|
|
21276
21659
|
)
|
|
@@ -21281,7 +21664,7 @@ function CounterFull({
|
|
|
21281
21664
|
variant: "ghost",
|
|
21282
21665
|
size: "sm",
|
|
21283
21666
|
onClick: onReset,
|
|
21284
|
-
icon:
|
|
21667
|
+
icon: "rotate-ccw",
|
|
21285
21668
|
children: "Reset to 0"
|
|
21286
21669
|
}
|
|
21287
21670
|
)
|
|
@@ -21329,7 +21712,7 @@ function CraftingRecipe({
|
|
|
21329
21712
|
className
|
|
21330
21713
|
}) {
|
|
21331
21714
|
const eventBus = useEventBus();
|
|
21332
|
-
const handleCraft =
|
|
21715
|
+
const handleCraft = React86.useCallback(() => {
|
|
21333
21716
|
onCraft?.();
|
|
21334
21717
|
if (craftEvent) {
|
|
21335
21718
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21346,7 +21729,7 @@ function CraftingRecipe({
|
|
|
21346
21729
|
children: [
|
|
21347
21730
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21348
21731
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21349
|
-
return /* @__PURE__ */ jsxs(
|
|
21732
|
+
return /* @__PURE__ */ jsxs(React86.Fragment, { children: [
|
|
21350
21733
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21351
21734
|
ItemSlot,
|
|
21352
21735
|
{
|
|
@@ -21409,8 +21792,8 @@ function DPad({
|
|
|
21409
21792
|
}) {
|
|
21410
21793
|
const eventBus = useEventBus();
|
|
21411
21794
|
const sizes = sizeMap15[size];
|
|
21412
|
-
const [activeDirections, setActiveDirections] =
|
|
21413
|
-
const handlePress =
|
|
21795
|
+
const [activeDirections, setActiveDirections] = React86.useState(/* @__PURE__ */ new Set());
|
|
21796
|
+
const handlePress = React86.useCallback(
|
|
21414
21797
|
(direction) => {
|
|
21415
21798
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21416
21799
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21418,7 +21801,7 @@ function DPad({
|
|
|
21418
21801
|
},
|
|
21419
21802
|
[directionEvent, eventBus, onDirection]
|
|
21420
21803
|
);
|
|
21421
|
-
const handleRelease =
|
|
21804
|
+
const handleRelease = React86.useCallback(
|
|
21422
21805
|
(direction) => {
|
|
21423
21806
|
setActiveDirections((prev) => {
|
|
21424
21807
|
const next = new Set(prev);
|
|
@@ -21683,7 +22066,7 @@ var init_DashboardLayout = __esm({
|
|
|
21683
22066
|
variant: "ghost",
|
|
21684
22067
|
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
21685
22068
|
onClick: () => setSidebarOpen(false),
|
|
21686
|
-
children: /* @__PURE__ */ jsx(
|
|
22069
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-5 w-5" })
|
|
21687
22070
|
}
|
|
21688
22071
|
)
|
|
21689
22072
|
]
|
|
@@ -21729,7 +22112,7 @@ var init_DashboardLayout = __esm({
|
|
|
21729
22112
|
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",
|
|
21730
22113
|
onClick: () => setSidebarOpen(true),
|
|
21731
22114
|
"aria-label": "Open sidebar",
|
|
21732
|
-
children: /* @__PURE__ */ jsx(
|
|
22115
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "menu", className: "h-5 w-5" })
|
|
21733
22116
|
}
|
|
21734
22117
|
),
|
|
21735
22118
|
isTopNav && /* @__PURE__ */ jsxs(
|
|
@@ -21772,7 +22155,7 @@ var init_DashboardLayout = __esm({
|
|
|
21772
22155
|
}
|
|
21773
22156
|
),
|
|
21774
22157
|
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: [
|
|
21775
|
-
/* @__PURE__ */ jsx(
|
|
22158
|
+
/* @__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" }),
|
|
21776
22159
|
/* @__PURE__ */ jsx(
|
|
21777
22160
|
Input,
|
|
21778
22161
|
{
|
|
@@ -21823,7 +22206,7 @@ var init_DashboardLayout = __esm({
|
|
|
21823
22206
|
onClick: handleNotificationClick,
|
|
21824
22207
|
"aria-label": t("common.notifications"),
|
|
21825
22208
|
children: [
|
|
21826
|
-
/* @__PURE__ */ jsx(
|
|
22209
|
+
/* @__PURE__ */ jsx(Icon, { name: "bell", className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
21827
22210
|
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
21828
22211
|
Box,
|
|
21829
22212
|
{
|
|
@@ -21861,7 +22244,7 @@ var init_DashboardLayout = __esm({
|
|
|
21861
22244
|
children: user.name
|
|
21862
22245
|
}
|
|
21863
22246
|
),
|
|
21864
|
-
/* @__PURE__ */ jsx(
|
|
22247
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "hidden @sm/dashboard:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
21865
22248
|
]
|
|
21866
22249
|
}
|
|
21867
22250
|
),
|
|
@@ -21904,7 +22287,7 @@ var init_DashboardLayout = __esm({
|
|
|
21904
22287
|
},
|
|
21905
22288
|
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",
|
|
21906
22289
|
children: [
|
|
21907
|
-
/* @__PURE__ */ jsx(
|
|
22290
|
+
/* @__PURE__ */ jsx(Icon, { name: "log-out", className: "h-4 w-4" }),
|
|
21908
22291
|
t("auth.signOut")
|
|
21909
22292
|
]
|
|
21910
22293
|
}
|
|
@@ -22086,14 +22469,14 @@ function useDataDnd(args) {
|
|
|
22086
22469
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22087
22470
|
const enabled = isZone || Boolean(dndRoot);
|
|
22088
22471
|
const eventBus = useEventBus();
|
|
22089
|
-
const parentRoot =
|
|
22472
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
22090
22473
|
const isRoot = enabled && parentRoot === null;
|
|
22091
|
-
const zoneId =
|
|
22474
|
+
const zoneId = React86__default.useId();
|
|
22092
22475
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22093
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22094
|
-
const optimisticOrdersRef =
|
|
22476
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
22477
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
22095
22478
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22096
|
-
const clearOptimisticOrder =
|
|
22479
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
22097
22480
|
setOptimisticOrders((prev) => {
|
|
22098
22481
|
if (!prev.has(group)) return prev;
|
|
22099
22482
|
const next = new Map(prev);
|
|
@@ -22118,7 +22501,7 @@ function useDataDnd(args) {
|
|
|
22118
22501
|
const raw = it[dndItemIdField];
|
|
22119
22502
|
return String(raw ?? `__idx_${idx}`);
|
|
22120
22503
|
}).join("|");
|
|
22121
|
-
const itemIds =
|
|
22504
|
+
const itemIds = React86__default.useMemo(
|
|
22122
22505
|
() => orderedItems.map((it, idx) => {
|
|
22123
22506
|
const raw = it[dndItemIdField];
|
|
22124
22507
|
return raw ?? `__idx_${idx}`;
|
|
@@ -22126,7 +22509,7 @@ function useDataDnd(args) {
|
|
|
22126
22509
|
[itemIdsSignature]
|
|
22127
22510
|
);
|
|
22128
22511
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
22129
|
-
|
|
22512
|
+
React86__default.useEffect(() => {
|
|
22130
22513
|
const root = isRoot ? null : parentRoot;
|
|
22131
22514
|
if (root) {
|
|
22132
22515
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22134,20 +22517,20 @@ function useDataDnd(args) {
|
|
|
22134
22517
|
clearOptimisticOrder(ownGroup);
|
|
22135
22518
|
}
|
|
22136
22519
|
}, [itemsContentSig, ownGroup]);
|
|
22137
|
-
const zonesRef =
|
|
22138
|
-
const registerZone =
|
|
22520
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
22521
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
22139
22522
|
zonesRef.current.set(zoneId2, meta2);
|
|
22140
22523
|
}, []);
|
|
22141
|
-
const unregisterZone =
|
|
22524
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
22142
22525
|
zonesRef.current.delete(zoneId2);
|
|
22143
22526
|
}, []);
|
|
22144
|
-
const [activeDrag, setActiveDrag] =
|
|
22145
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22146
|
-
const meta =
|
|
22527
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
22528
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
22529
|
+
const meta = React86__default.useMemo(
|
|
22147
22530
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22148
22531
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22149
22532
|
);
|
|
22150
|
-
|
|
22533
|
+
React86__default.useEffect(() => {
|
|
22151
22534
|
const target = isRoot ? null : parentRoot;
|
|
22152
22535
|
if (!target) {
|
|
22153
22536
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22166,7 +22549,7 @@ function useDataDnd(args) {
|
|
|
22166
22549
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22167
22550
|
const sensors = useAlmadarDndSensors(true);
|
|
22168
22551
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22169
|
-
const findZoneByItem =
|
|
22552
|
+
const findZoneByItem = React86__default.useCallback(
|
|
22170
22553
|
(id) => {
|
|
22171
22554
|
for (const z of zonesRef.current.values()) {
|
|
22172
22555
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22175,7 +22558,7 @@ function useDataDnd(args) {
|
|
|
22175
22558
|
},
|
|
22176
22559
|
[]
|
|
22177
22560
|
);
|
|
22178
|
-
|
|
22561
|
+
React86__default.useCallback(
|
|
22179
22562
|
(group) => {
|
|
22180
22563
|
for (const z of zonesRef.current.values()) {
|
|
22181
22564
|
if (z.group === group) return z;
|
|
@@ -22184,7 +22567,7 @@ function useDataDnd(args) {
|
|
|
22184
22567
|
},
|
|
22185
22568
|
[]
|
|
22186
22569
|
);
|
|
22187
|
-
const handleDragEnd =
|
|
22570
|
+
const handleDragEnd = React86__default.useCallback(
|
|
22188
22571
|
(event) => {
|
|
22189
22572
|
const { active, over } = event;
|
|
22190
22573
|
const activeIdStr = String(active.id);
|
|
@@ -22275,12 +22658,12 @@ function useDataDnd(args) {
|
|
|
22275
22658
|
},
|
|
22276
22659
|
[eventBus]
|
|
22277
22660
|
);
|
|
22278
|
-
const sortableData =
|
|
22279
|
-
const SortableItem =
|
|
22661
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22662
|
+
const SortableItem = React86__default.useCallback(
|
|
22280
22663
|
({ id, children }) => {
|
|
22281
22664
|
const {
|
|
22282
22665
|
attributes,
|
|
22283
|
-
listeners:
|
|
22666
|
+
listeners: listeners7,
|
|
22284
22667
|
setNodeRef,
|
|
22285
22668
|
transform,
|
|
22286
22669
|
transition,
|
|
@@ -22303,7 +22686,7 @@ function useDataDnd(args) {
|
|
|
22303
22686
|
ref: setNodeRef,
|
|
22304
22687
|
style,
|
|
22305
22688
|
...attributes,
|
|
22306
|
-
...
|
|
22689
|
+
...listeners7,
|
|
22307
22690
|
children
|
|
22308
22691
|
}
|
|
22309
22692
|
);
|
|
@@ -22316,7 +22699,7 @@ function useDataDnd(args) {
|
|
|
22316
22699
|
id: droppableId,
|
|
22317
22700
|
data: sortableData
|
|
22318
22701
|
});
|
|
22319
|
-
const ctx =
|
|
22702
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
22320
22703
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22321
22704
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22322
22705
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22331,7 +22714,7 @@ function useDataDnd(args) {
|
|
|
22331
22714
|
showForeignPlaceholder,
|
|
22332
22715
|
ctxAvailable: ctx != null
|
|
22333
22716
|
});
|
|
22334
|
-
|
|
22717
|
+
React86__default.useEffect(() => {
|
|
22335
22718
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22336
22719
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22337
22720
|
return /* @__PURE__ */ jsx(
|
|
@@ -22345,11 +22728,11 @@ function useDataDnd(args) {
|
|
|
22345
22728
|
}
|
|
22346
22729
|
);
|
|
22347
22730
|
};
|
|
22348
|
-
const rootContextValue =
|
|
22731
|
+
const rootContextValue = React86__default.useMemo(
|
|
22349
22732
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22350
22733
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22351
22734
|
);
|
|
22352
|
-
const handleDragStart =
|
|
22735
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
22353
22736
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22354
22737
|
const rect = event.active.rect.current.initial;
|
|
22355
22738
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22368,7 +22751,7 @@ function useDataDnd(args) {
|
|
|
22368
22751
|
isRoot
|
|
22369
22752
|
});
|
|
22370
22753
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22371
|
-
const handleDragOver =
|
|
22754
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
22372
22755
|
const { active, over } = event;
|
|
22373
22756
|
const overData = over?.data?.current;
|
|
22374
22757
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22438,7 +22821,7 @@ function useDataDnd(args) {
|
|
|
22438
22821
|
return next;
|
|
22439
22822
|
});
|
|
22440
22823
|
}, []);
|
|
22441
|
-
const handleDragCancel =
|
|
22824
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
22442
22825
|
setActiveDrag(null);
|
|
22443
22826
|
setOverZoneGroup(null);
|
|
22444
22827
|
dndLog.warn("dragCancel", {
|
|
@@ -22446,12 +22829,12 @@ function useDataDnd(args) {
|
|
|
22446
22829
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22447
22830
|
});
|
|
22448
22831
|
}, []);
|
|
22449
|
-
const handleDragEndWithCleanup =
|
|
22832
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
22450
22833
|
handleDragEnd(event);
|
|
22451
22834
|
setActiveDrag(null);
|
|
22452
22835
|
setOverZoneGroup(null);
|
|
22453
22836
|
}, [handleDragEnd]);
|
|
22454
|
-
const wrapContainer =
|
|
22837
|
+
const wrapContainer = React86__default.useCallback(
|
|
22455
22838
|
(children) => {
|
|
22456
22839
|
if (!enabled) return children;
|
|
22457
22840
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22505,7 +22888,7 @@ var init_useDataDnd = __esm({
|
|
|
22505
22888
|
init_useAlmadarDndCollision();
|
|
22506
22889
|
init_Box();
|
|
22507
22890
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22508
|
-
RootCtx =
|
|
22891
|
+
RootCtx = React86__default.createContext(null);
|
|
22509
22892
|
}
|
|
22510
22893
|
});
|
|
22511
22894
|
function fieldLabel2(key) {
|
|
@@ -22994,7 +23377,7 @@ function DataList({
|
|
|
22994
23377
|
}) {
|
|
22995
23378
|
const eventBus = useEventBus();
|
|
22996
23379
|
const { t } = useTranslate();
|
|
22997
|
-
const [visibleCount, setVisibleCount] =
|
|
23380
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
22998
23381
|
const fieldDefs = fields ?? columns ?? [];
|
|
22999
23382
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23000
23383
|
const dnd = useDataDnd({
|
|
@@ -23013,7 +23396,7 @@ function DataList({
|
|
|
23013
23396
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23014
23397
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23015
23398
|
const hasRenderProp = typeof children === "function";
|
|
23016
|
-
|
|
23399
|
+
React86__default.useEffect(() => {
|
|
23017
23400
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23018
23401
|
const childrenTypeOf = typeof children;
|
|
23019
23402
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23070,7 +23453,7 @@ function DataList({
|
|
|
23070
23453
|
const items2 = data.map((item) => item);
|
|
23071
23454
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
23072
23455
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
23073
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23456
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
23074
23457
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23075
23458
|
group.items.map((itemData, index) => {
|
|
23076
23459
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23258,7 +23641,7 @@ function DataList({
|
|
|
23258
23641
|
className
|
|
23259
23642
|
),
|
|
23260
23643
|
children: [
|
|
23261
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23644
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
23262
23645
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23263
23646
|
group.items.map(
|
|
23264
23647
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23548,6 +23931,7 @@ var init_FilterGroup = __esm({
|
|
|
23548
23931
|
init_Select();
|
|
23549
23932
|
init_Badge();
|
|
23550
23933
|
init_Stack();
|
|
23934
|
+
init_Icon();
|
|
23551
23935
|
init_useEventBus();
|
|
23552
23936
|
init_useQuerySingleton();
|
|
23553
23937
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
@@ -23616,7 +24000,7 @@ var init_FilterGroup = __esm({
|
|
|
23616
24000
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
23617
24001
|
if (variant === "pills") {
|
|
23618
24002
|
return /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: cn("flex-wrap", className), children: [
|
|
23619
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
24003
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23620
24004
|
filters.map((filter) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
23621
24005
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-[var(--font-weight-medium)] text-muted-foreground", children: [
|
|
23622
24006
|
filter.label,
|
|
@@ -23664,7 +24048,7 @@ var init_FilterGroup = __esm({
|
|
|
23664
24048
|
variant: "ghost",
|
|
23665
24049
|
size: "sm",
|
|
23666
24050
|
onClick: handleClearAll,
|
|
23667
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24051
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23668
24052
|
children: "Clear"
|
|
23669
24053
|
}
|
|
23670
24054
|
)
|
|
@@ -23673,7 +24057,7 @@ var init_FilterGroup = __esm({
|
|
|
23673
24057
|
if (variant === "vertical") {
|
|
23674
24058
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
23675
24059
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23676
|
-
/* @__PURE__ */ jsx(
|
|
24060
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23677
24061
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23678
24062
|
] }),
|
|
23679
24063
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -23746,7 +24130,7 @@ var init_FilterGroup = __esm({
|
|
|
23746
24130
|
variant: "ghost",
|
|
23747
24131
|
size: "sm",
|
|
23748
24132
|
onClick: handleClearAll,
|
|
23749
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24133
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23750
24134
|
className: "self-start",
|
|
23751
24135
|
children: "Clear all"
|
|
23752
24136
|
}
|
|
@@ -23755,7 +24139,7 @@ var init_FilterGroup = __esm({
|
|
|
23755
24139
|
}
|
|
23756
24140
|
if (variant === "compact") {
|
|
23757
24141
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: cn("flex-wrap", className), children: [
|
|
23758
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
24142
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23759
24143
|
filters.map((filter) => /* @__PURE__ */ jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsx(
|
|
23760
24144
|
Input,
|
|
23761
24145
|
{
|
|
@@ -23831,7 +24215,7 @@ var init_FilterGroup = __esm({
|
|
|
23831
24215
|
filterDef?.label,
|
|
23832
24216
|
": ",
|
|
23833
24217
|
value,
|
|
23834
|
-
/* @__PURE__ */ jsx(
|
|
24218
|
+
/* @__PURE__ */ jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
|
|
23835
24219
|
]
|
|
23836
24220
|
},
|
|
23837
24221
|
field
|
|
@@ -23858,7 +24242,7 @@ var init_FilterGroup = __esm({
|
|
|
23858
24242
|
align: "center",
|
|
23859
24243
|
className: "text-muted-foreground",
|
|
23860
24244
|
children: [
|
|
23861
|
-
/* @__PURE__ */ jsx(
|
|
24245
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23862
24246
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23863
24247
|
]
|
|
23864
24248
|
}
|
|
@@ -23944,7 +24328,7 @@ var init_FilterGroup = __esm({
|
|
|
23944
24328
|
variant: "ghost",
|
|
23945
24329
|
size: "sm",
|
|
23946
24330
|
onClick: handleClearAll,
|
|
23947
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24331
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23948
24332
|
children: "Clear all"
|
|
23949
24333
|
}
|
|
23950
24334
|
)
|
|
@@ -24161,6 +24545,7 @@ var init_RelationSelect = __esm({
|
|
|
24161
24545
|
"use client";
|
|
24162
24546
|
init_cn();
|
|
24163
24547
|
init_Box();
|
|
24548
|
+
init_Icon();
|
|
24164
24549
|
init_Stack();
|
|
24165
24550
|
init_Input();
|
|
24166
24551
|
init_Button();
|
|
@@ -24304,12 +24689,13 @@ var init_RelationSelect = __esm({
|
|
|
24304
24689
|
as: "button",
|
|
24305
24690
|
className: "p-0.5 hover:bg-muted rounded cursor-pointer",
|
|
24306
24691
|
onClick: handleClear,
|
|
24307
|
-
children: /* @__PURE__ */ jsx(
|
|
24692
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-4 w-4 text-muted-foreground" })
|
|
24308
24693
|
}
|
|
24309
24694
|
),
|
|
24310
24695
|
/* @__PURE__ */ jsx(
|
|
24311
|
-
|
|
24696
|
+
Icon,
|
|
24312
24697
|
{
|
|
24698
|
+
name: "chevron-down",
|
|
24313
24699
|
className: cn(
|
|
24314
24700
|
"h-4 w-4 text-muted-foreground transition-transform",
|
|
24315
24701
|
isOpen && "transform rotate-180"
|
|
@@ -24540,7 +24926,7 @@ var init_SidePanel = __esm({
|
|
|
24540
24926
|
{
|
|
24541
24927
|
variant: "ghost",
|
|
24542
24928
|
size: "sm",
|
|
24543
|
-
icon:
|
|
24929
|
+
icon: "x",
|
|
24544
24930
|
onClick: handleClose,
|
|
24545
24931
|
"aria-label": "Close panel",
|
|
24546
24932
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
@@ -24598,7 +24984,7 @@ var init_WizardProgress = __esm({
|
|
|
24598
24984
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24599
24985
|
const isActive = index === currentStep;
|
|
24600
24986
|
const isCompleted = index < currentStep;
|
|
24601
|
-
return /* @__PURE__ */ jsxs(
|
|
24987
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
24602
24988
|
/* @__PURE__ */ jsx(
|
|
24603
24989
|
"button",
|
|
24604
24990
|
{
|
|
@@ -24612,7 +24998,7 @@ var init_WizardProgress = __esm({
|
|
|
24612
24998
|
isCompleted && "bg-foreground text-background cursor-pointer hover:bg-muted-foreground",
|
|
24613
24999
|
!isActive && !isCompleted && "bg-card text-foreground"
|
|
24614
25000
|
),
|
|
24615
|
-
children: isCompleted ? /* @__PURE__ */ jsx(Icon, {
|
|
25001
|
+
children: isCompleted ? /* @__PURE__ */ jsx(Icon, { name: "check", size: "sm" }) : index + 1
|
|
24616
25002
|
}
|
|
24617
25003
|
),
|
|
24618
25004
|
!compact && /* @__PURE__ */ jsx(
|
|
@@ -24731,13 +25117,13 @@ var init_WizardNavigation = __esm({
|
|
|
24731
25117
|
),
|
|
24732
25118
|
children: [
|
|
24733
25119
|
showBack ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", onClick: handleBack, disabled: isFirstStep, children: [
|
|
24734
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
25120
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
24735
25121
|
resolvedBackLabel
|
|
24736
25122
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
24737
25123
|
/* @__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) }) }) }),
|
|
24738
25124
|
isLastStep && showComplete ? /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleComplete, disabled: !isValid, children: resolvedCompleteLabel }) : showNext ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleNext, disabled: !isValid, children: [
|
|
24739
25125
|
resolvedNextLabel,
|
|
24740
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
25126
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
24741
25127
|
] }) : /* @__PURE__ */ jsx(Box, {})
|
|
24742
25128
|
]
|
|
24743
25129
|
}
|
|
@@ -25585,10 +25971,7 @@ function StatBadge({
|
|
|
25585
25971
|
className
|
|
25586
25972
|
),
|
|
25587
25973
|
children: [
|
|
25588
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? (
|
|
25589
|
-
const I = resolveIcon(icon);
|
|
25590
|
-
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
25591
|
-
})() : icon }),
|
|
25974
|
+
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 }),
|
|
25592
25975
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
25593
25976
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
25594
25977
|
HealthBar,
|
|
@@ -25656,7 +26039,7 @@ function InventoryGrid({
|
|
|
25656
26039
|
const eventBus = useEventBus();
|
|
25657
26040
|
const slotCount = totalSlots ?? items.length;
|
|
25658
26041
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
25659
|
-
const handleSelect =
|
|
26042
|
+
const handleSelect = React86.useCallback(
|
|
25660
26043
|
(id) => {
|
|
25661
26044
|
onSelect?.(id);
|
|
25662
26045
|
if (selectEvent) {
|
|
@@ -25869,15 +26252,15 @@ function GameCanvas2D({
|
|
|
25869
26252
|
fps = 60,
|
|
25870
26253
|
className
|
|
25871
26254
|
}) {
|
|
25872
|
-
const canvasRef =
|
|
25873
|
-
const rafRef =
|
|
25874
|
-
const frameRef =
|
|
25875
|
-
const lastTimeRef =
|
|
25876
|
-
const onDrawRef =
|
|
26255
|
+
const canvasRef = React86.useRef(null);
|
|
26256
|
+
const rafRef = React86.useRef(0);
|
|
26257
|
+
const frameRef = React86.useRef(0);
|
|
26258
|
+
const lastTimeRef = React86.useRef(0);
|
|
26259
|
+
const onDrawRef = React86.useRef(onDraw);
|
|
25877
26260
|
onDrawRef.current = onDraw;
|
|
25878
|
-
const onTickRef =
|
|
26261
|
+
const onTickRef = React86.useRef(onTick);
|
|
25879
26262
|
onTickRef.current = onTick;
|
|
25880
|
-
|
|
26263
|
+
React86.useEffect(() => {
|
|
25881
26264
|
const canvas = canvasRef.current;
|
|
25882
26265
|
if (!canvas) return;
|
|
25883
26266
|
const ctx = canvas.getContext("2d");
|
|
@@ -26166,7 +26549,7 @@ function TurnPanel({
|
|
|
26166
26549
|
className
|
|
26167
26550
|
}) {
|
|
26168
26551
|
const eventBus = useEventBus();
|
|
26169
|
-
const handleAction =
|
|
26552
|
+
const handleAction = React86.useCallback(
|
|
26170
26553
|
(event) => {
|
|
26171
26554
|
if (event) {
|
|
26172
26555
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -26312,7 +26695,7 @@ function UnitCommandBar({
|
|
|
26312
26695
|
className
|
|
26313
26696
|
}) {
|
|
26314
26697
|
const eventBus = useEventBus();
|
|
26315
|
-
const handleCommand =
|
|
26698
|
+
const handleCommand = React86.useCallback(
|
|
26316
26699
|
(event) => {
|
|
26317
26700
|
if (event) {
|
|
26318
26701
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -26797,7 +27180,7 @@ function GameMenu({
|
|
|
26797
27180
|
} catch {
|
|
26798
27181
|
}
|
|
26799
27182
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26800
|
-
const handleOptionClick =
|
|
27183
|
+
const handleOptionClick = React86.useCallback(
|
|
26801
27184
|
(option) => {
|
|
26802
27185
|
if (option.event && eventBus) {
|
|
26803
27186
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26911,7 +27294,7 @@ function GameOverScreen({
|
|
|
26911
27294
|
} catch {
|
|
26912
27295
|
}
|
|
26913
27296
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26914
|
-
const handleActionClick =
|
|
27297
|
+
const handleActionClick = React86.useCallback(
|
|
26915
27298
|
(action) => {
|
|
26916
27299
|
if (action.event && eventBus) {
|
|
26917
27300
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -27619,6 +28002,7 @@ var init_NumberStepper = __esm({
|
|
|
27619
28002
|
"components/molecules/NumberStepper.tsx"() {
|
|
27620
28003
|
"use client";
|
|
27621
28004
|
init_cn();
|
|
28005
|
+
init_Icon();
|
|
27622
28006
|
init_useEventBus();
|
|
27623
28007
|
sizeStyles10 = {
|
|
27624
28008
|
sm: {
|
|
@@ -27737,7 +28121,7 @@ var init_NumberStepper = __esm({
|
|
|
27737
28121
|
styles.button
|
|
27738
28122
|
),
|
|
27739
28123
|
"aria-label": "Decrease",
|
|
27740
|
-
children: /* @__PURE__ */ jsx(
|
|
28124
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "minus", className: styles.icon })
|
|
27741
28125
|
}
|
|
27742
28126
|
),
|
|
27743
28127
|
/* @__PURE__ */ jsx(
|
|
@@ -27778,7 +28162,7 @@ var init_NumberStepper = __esm({
|
|
|
27778
28162
|
styles.button
|
|
27779
28163
|
),
|
|
27780
28164
|
"aria-label": "Increase",
|
|
27781
|
-
children: /* @__PURE__ */ jsx(
|
|
28165
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles.icon })
|
|
27782
28166
|
}
|
|
27783
28167
|
)
|
|
27784
28168
|
]
|
|
@@ -27803,6 +28187,7 @@ var init_StarRating = __esm({
|
|
|
27803
28187
|
"components/molecules/StarRating.tsx"() {
|
|
27804
28188
|
"use client";
|
|
27805
28189
|
init_cn();
|
|
28190
|
+
init_Icon();
|
|
27806
28191
|
init_useEventBus();
|
|
27807
28192
|
sizeStyles11 = {
|
|
27808
28193
|
sm: { star: "w-4 h-4", gap: "gap-0.5" },
|
|
@@ -27889,8 +28274,9 @@ var init_StarRating = __esm({
|
|
|
27889
28274
|
},
|
|
27890
28275
|
children: [
|
|
27891
28276
|
/* @__PURE__ */ jsx(
|
|
27892
|
-
|
|
28277
|
+
Icon,
|
|
27893
28278
|
{
|
|
28279
|
+
name: "star",
|
|
27894
28280
|
className: cn(
|
|
27895
28281
|
styles.star,
|
|
27896
28282
|
"text-muted",
|
|
@@ -27900,8 +28286,9 @@ var init_StarRating = __esm({
|
|
|
27900
28286
|
}
|
|
27901
28287
|
),
|
|
27902
28288
|
(isFull || isHalf) && /* @__PURE__ */ jsx(
|
|
27903
|
-
|
|
28289
|
+
Icon,
|
|
27904
28290
|
{
|
|
28291
|
+
name: "star",
|
|
27905
28292
|
className: cn(
|
|
27906
28293
|
styles.star,
|
|
27907
28294
|
"absolute inset-0",
|
|
@@ -28093,7 +28480,7 @@ var init_UploadDropZone = __esm({
|
|
|
28093
28480
|
"aria-hidden": "true"
|
|
28094
28481
|
}
|
|
28095
28482
|
),
|
|
28096
|
-
error ? /* @__PURE__ */ jsx(Icon, {
|
|
28483
|
+
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" }),
|
|
28097
28484
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "Drop files here" : label }),
|
|
28098
28485
|
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 })
|
|
28099
28486
|
]
|
|
@@ -28117,6 +28504,7 @@ var Lightbox;
|
|
|
28117
28504
|
var init_Lightbox = __esm({
|
|
28118
28505
|
"components/molecules/Lightbox.tsx"() {
|
|
28119
28506
|
"use client";
|
|
28507
|
+
init_Icon();
|
|
28120
28508
|
init_cn();
|
|
28121
28509
|
init_useEventBus();
|
|
28122
28510
|
Lightbox = ({
|
|
@@ -28224,7 +28612,7 @@ var init_Lightbox = __esm({
|
|
|
28224
28612
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28225
28613
|
),
|
|
28226
28614
|
"aria-label": "Close",
|
|
28227
|
-
children: /* @__PURE__ */ jsx(
|
|
28615
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
28228
28616
|
}
|
|
28229
28617
|
),
|
|
28230
28618
|
hasPrev && safeImages.length > 1 && /* @__PURE__ */ jsx(
|
|
@@ -28243,7 +28631,7 @@ var init_Lightbox = __esm({
|
|
|
28243
28631
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28244
28632
|
),
|
|
28245
28633
|
"aria-label": "Previous image",
|
|
28246
|
-
children: /* @__PURE__ */ jsx(
|
|
28634
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
28247
28635
|
}
|
|
28248
28636
|
),
|
|
28249
28637
|
/* @__PURE__ */ jsx(
|
|
@@ -28280,7 +28668,7 @@ var init_Lightbox = __esm({
|
|
|
28280
28668
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28281
28669
|
),
|
|
28282
28670
|
"aria-label": "Next image",
|
|
28283
|
-
children: /* @__PURE__ */ jsx(
|
|
28671
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
28284
28672
|
}
|
|
28285
28673
|
),
|
|
28286
28674
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
|
|
@@ -29361,7 +29749,7 @@ var init_PricingCard = __esm({
|
|
|
29361
29749
|
/* @__PURE__ */ jsx(
|
|
29362
29750
|
Icon,
|
|
29363
29751
|
{
|
|
29364
|
-
|
|
29752
|
+
name: "check",
|
|
29365
29753
|
size: "sm",
|
|
29366
29754
|
className: "flex-shrink-0 text-success"
|
|
29367
29755
|
}
|
|
@@ -29579,7 +29967,7 @@ var init_StepFlow = __esm({
|
|
|
29579
29967
|
className
|
|
29580
29968
|
}) => {
|
|
29581
29969
|
if (orientation === "vertical") {
|
|
29582
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29970
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29583
29971
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29584
29972
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29585
29973
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29590,7 +29978,7 @@ var init_StepFlow = __esm({
|
|
|
29590
29978
|
] })
|
|
29591
29979
|
] }) }, index)) });
|
|
29592
29980
|
}
|
|
29593
|
-
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(
|
|
29981
|
+
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(React86__default.Fragment, { children: [
|
|
29594
29982
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29595
29983
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29596
29984
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -30404,6 +30792,7 @@ var init_VoteStack = __esm({
|
|
|
30404
30792
|
"components/molecules/VoteStack.tsx"() {
|
|
30405
30793
|
"use client";
|
|
30406
30794
|
init_cn();
|
|
30795
|
+
init_Icon();
|
|
30407
30796
|
init_useEventBus();
|
|
30408
30797
|
sizeStyles12 = {
|
|
30409
30798
|
sm: {
|
|
@@ -30485,7 +30874,7 @@ var init_VoteStack = __esm({
|
|
|
30485
30874
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30486
30875
|
styles.button
|
|
30487
30876
|
),
|
|
30488
|
-
children: /* @__PURE__ */ jsx(
|
|
30877
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
30489
30878
|
}
|
|
30490
30879
|
),
|
|
30491
30880
|
/* @__PURE__ */ jsx(
|
|
@@ -30522,7 +30911,7 @@ var init_VoteStack = __esm({
|
|
|
30522
30911
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30523
30912
|
styles.button
|
|
30524
30913
|
),
|
|
30525
|
-
children: /* @__PURE__ */ jsx(
|
|
30914
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
30526
30915
|
}
|
|
30527
30916
|
)
|
|
30528
30917
|
]
|
|
@@ -30564,7 +30953,7 @@ var init_LikertScale = __esm({
|
|
|
30564
30953
|
md: "text-base",
|
|
30565
30954
|
lg: "text-lg"
|
|
30566
30955
|
};
|
|
30567
|
-
LikertScale =
|
|
30956
|
+
LikertScale = React86__default.forwardRef(
|
|
30568
30957
|
({
|
|
30569
30958
|
question,
|
|
30570
30959
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30576,7 +30965,7 @@ var init_LikertScale = __esm({
|
|
|
30576
30965
|
variant = "radios",
|
|
30577
30966
|
className
|
|
30578
30967
|
}, ref) => {
|
|
30579
|
-
const groupId =
|
|
30968
|
+
const groupId = React86__default.useId();
|
|
30580
30969
|
const eventBus = useEventBus();
|
|
30581
30970
|
const handleSelect = useCallback(
|
|
30582
30971
|
(next) => {
|
|
@@ -30856,6 +31245,7 @@ var init_QrScanner = __esm({
|
|
|
30856
31245
|
"use client";
|
|
30857
31246
|
init_cn();
|
|
30858
31247
|
init_atoms();
|
|
31248
|
+
init_Icon();
|
|
30859
31249
|
init_useEventBus();
|
|
30860
31250
|
QrScanner = ({
|
|
30861
31251
|
onScan,
|
|
@@ -31006,7 +31396,7 @@ var init_QrScanner = __esm({
|
|
|
31006
31396
|
padding: "lg",
|
|
31007
31397
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
31008
31398
|
children: [
|
|
31009
|
-
/* @__PURE__ */ jsx(
|
|
31399
|
+
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
31010
31400
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "Camera unavailable" }),
|
|
31011
31401
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
31012
31402
|
]
|
|
@@ -31038,7 +31428,7 @@ var init_QrScanner = __esm({
|
|
|
31038
31428
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31039
31429
|
),
|
|
31040
31430
|
"aria-label": isPaused ? "Resume scanning" : "Pause scanning",
|
|
31041
|
-
children: isPaused ? /* @__PURE__ */ jsx(
|
|
31431
|
+
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
31042
31432
|
}
|
|
31043
31433
|
),
|
|
31044
31434
|
/* @__PURE__ */ jsx(
|
|
@@ -31051,7 +31441,7 @@ var init_QrScanner = __esm({
|
|
|
31051
31441
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31052
31442
|
),
|
|
31053
31443
|
"aria-label": `Switch to ${currentFacing === "environment" ? "front" : "rear"} camera`,
|
|
31054
|
-
children: /* @__PURE__ */ jsx(
|
|
31444
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31055
31445
|
}
|
|
31056
31446
|
),
|
|
31057
31447
|
/* @__PURE__ */ jsx(
|
|
@@ -31267,11 +31657,11 @@ function getShapeClasses(shape) {
|
|
|
31267
31657
|
function getStatusIcon(status) {
|
|
31268
31658
|
switch (status) {
|
|
31269
31659
|
case "seated":
|
|
31270
|
-
return /* @__PURE__ */ jsx(
|
|
31660
|
+
return /* @__PURE__ */ jsx(Icon, { name: "users", className: "w-4 h-4" });
|
|
31271
31661
|
case "ordered":
|
|
31272
|
-
return /* @__PURE__ */ jsx(
|
|
31662
|
+
return /* @__PURE__ */ jsx(Icon, { name: "coffee", className: "w-4 h-4" });
|
|
31273
31663
|
case "awaiting-bill":
|
|
31274
|
-
return /* @__PURE__ */ jsx(
|
|
31664
|
+
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", className: "w-4 h-4" });
|
|
31275
31665
|
default:
|
|
31276
31666
|
return null;
|
|
31277
31667
|
}
|
|
@@ -31283,6 +31673,7 @@ var init_PositionedCanvas = __esm({
|
|
|
31283
31673
|
init_cn();
|
|
31284
31674
|
init_useEventBus();
|
|
31285
31675
|
init_atoms();
|
|
31676
|
+
init_Icon();
|
|
31286
31677
|
STATUS_CLASSES = {
|
|
31287
31678
|
empty: "bg-surface border-border text-foreground",
|
|
31288
31679
|
seated: "bg-surface border-success text-success",
|
|
@@ -31587,7 +31978,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31587
31978
|
"transition-opacity"
|
|
31588
31979
|
),
|
|
31589
31980
|
onClick: () => setOpen((v) => !v),
|
|
31590
|
-
children: /* @__PURE__ */ jsx(
|
|
31981
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", className: "w-3.5 h-3.5" })
|
|
31591
31982
|
}
|
|
31592
31983
|
),
|
|
31593
31984
|
open && /* @__PURE__ */ jsxs(
|
|
@@ -31613,7 +32004,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31613
32004
|
setOpen(false);
|
|
31614
32005
|
},
|
|
31615
32006
|
children: [
|
|
31616
|
-
/* @__PURE__ */ jsx(
|
|
32007
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
31617
32008
|
" Duplicate"
|
|
31618
32009
|
]
|
|
31619
32010
|
}
|
|
@@ -31630,7 +32021,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31630
32021
|
setOpen(false);
|
|
31631
32022
|
},
|
|
31632
32023
|
children: [
|
|
31633
|
-
/* @__PURE__ */ jsx(
|
|
32024
|
+
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
31634
32025
|
" Delete"
|
|
31635
32026
|
]
|
|
31636
32027
|
}
|
|
@@ -31859,7 +32250,7 @@ function BlockRow({
|
|
|
31859
32250
|
"text-sm text-muted-foreground"
|
|
31860
32251
|
),
|
|
31861
32252
|
children: [
|
|
31862
|
-
/* @__PURE__ */ jsx(
|
|
32253
|
+
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
31863
32254
|
" No image URL set"
|
|
31864
32255
|
]
|
|
31865
32256
|
}
|
|
@@ -31933,7 +32324,7 @@ function BlockRow({
|
|
|
31933
32324
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
31934
32325
|
),
|
|
31935
32326
|
onClick: () => removeListItem(child.id),
|
|
31936
|
-
children: /* @__PURE__ */ jsx(
|
|
32327
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3 h-3" })
|
|
31937
32328
|
}
|
|
31938
32329
|
)
|
|
31939
32330
|
] }, child.id)),
|
|
@@ -31948,7 +32339,7 @@ function BlockRow({
|
|
|
31948
32339
|
),
|
|
31949
32340
|
onClick: addListItem,
|
|
31950
32341
|
children: [
|
|
31951
|
-
/* @__PURE__ */ jsx(
|
|
32342
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
31952
32343
|
" Add item"
|
|
31953
32344
|
]
|
|
31954
32345
|
}
|
|
@@ -31997,7 +32388,7 @@ function BlockRow({
|
|
|
31997
32388
|
"transition-opacity"
|
|
31998
32389
|
),
|
|
31999
32390
|
onClick: () => onInsertAfter("paragraph"),
|
|
32000
|
-
children: /* @__PURE__ */ jsx(
|
|
32391
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" })
|
|
32001
32392
|
}
|
|
32002
32393
|
),
|
|
32003
32394
|
/* @__PURE__ */ jsx(
|
|
@@ -32027,6 +32418,7 @@ var init_RichBlockEditor = __esm({
|
|
|
32027
32418
|
init_Box();
|
|
32028
32419
|
init_Divider();
|
|
32029
32420
|
init_Input();
|
|
32421
|
+
init_Icon();
|
|
32030
32422
|
init_useEventBus();
|
|
32031
32423
|
TOOLBAR_ENTRIES = [
|
|
32032
32424
|
{ type: "paragraph", label: "Text", icon: Type },
|
|
@@ -32270,7 +32662,7 @@ var init_ReplyTree = __esm({
|
|
|
32270
32662
|
onClick: handleToggle,
|
|
32271
32663
|
"aria-label": isCollapsed ? "Expand replies" : "Collapse replies",
|
|
32272
32664
|
"aria-expanded": !isCollapsed,
|
|
32273
|
-
leftIcon: isCollapsed ?
|
|
32665
|
+
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
32274
32666
|
className: cn(
|
|
32275
32667
|
"w-6 h-6 p-0 min-w-0",
|
|
32276
32668
|
"rounded-sm text-muted-foreground",
|
|
@@ -32317,7 +32709,7 @@ var init_ReplyTree = __esm({
|
|
|
32317
32709
|
{
|
|
32318
32710
|
variant: "ghost",
|
|
32319
32711
|
size: "sm",
|
|
32320
|
-
leftIcon:
|
|
32712
|
+
leftIcon: "message-square",
|
|
32321
32713
|
onClick: handleReply,
|
|
32322
32714
|
"aria-label": `Reply to ${node.authorName}`,
|
|
32323
32715
|
children: "Reply"
|
|
@@ -32328,7 +32720,7 @@ var init_ReplyTree = __esm({
|
|
|
32328
32720
|
{
|
|
32329
32721
|
variant: "ghost",
|
|
32330
32722
|
size: "sm",
|
|
32331
|
-
leftIcon:
|
|
32723
|
+
leftIcon: "flag",
|
|
32332
32724
|
onClick: handleFlag,
|
|
32333
32725
|
"aria-label": `Flag reply by ${node.authorName}`,
|
|
32334
32726
|
children: "Flag"
|
|
@@ -32341,7 +32733,7 @@ var init_ReplyTree = __esm({
|
|
|
32341
32733
|
variant: "ghost",
|
|
32342
32734
|
size: "sm",
|
|
32343
32735
|
onClick: handleContinue,
|
|
32344
|
-
rightIcon:
|
|
32736
|
+
rightIcon: "chevron-right",
|
|
32345
32737
|
className: cn(
|
|
32346
32738
|
"self-start gap-1 px-0 h-auto",
|
|
32347
32739
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
@@ -32582,7 +32974,7 @@ var init_VersionDiff = __esm({
|
|
|
32582
32974
|
className: "px-4 py-2 border-b border-border bg-muted/30 flex-wrap",
|
|
32583
32975
|
children: [
|
|
32584
32976
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
32585
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
32977
|
+
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
32586
32978
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
32587
32979
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32588
32980
|
Select,
|
|
@@ -32619,7 +33011,7 @@ var init_VersionDiff = __esm({
|
|
|
32619
33011
|
{
|
|
32620
33012
|
variant: "ghost",
|
|
32621
33013
|
size: "sm",
|
|
32622
|
-
icon: activeView === "side-by-side" ?
|
|
33014
|
+
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
32623
33015
|
onClick: handleViewToggle,
|
|
32624
33016
|
"aria-label": activeView === "side-by-side" ? "Switch to inline view" : "Switch to side-by-side view"
|
|
32625
33017
|
}
|
|
@@ -32629,7 +33021,7 @@ var init_VersionDiff = __esm({
|
|
|
32629
33021
|
{
|
|
32630
33022
|
variant: "ghost",
|
|
32631
33023
|
size: "sm",
|
|
32632
|
-
icon:
|
|
33024
|
+
icon: "rotate-ccw",
|
|
32633
33025
|
onClick: handleRevert,
|
|
32634
33026
|
children: "Revert"
|
|
32635
33027
|
}
|
|
@@ -32806,7 +33198,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32806
33198
|
"aria-label": "Breadcrumb",
|
|
32807
33199
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32808
33200
|
const isLast = idx === items.length - 1;
|
|
32809
|
-
return /* @__PURE__ */ jsxs(
|
|
33201
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
32810
33202
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32811
33203
|
Icon,
|
|
32812
33204
|
{
|
|
@@ -33765,7 +34157,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33765
34157
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33766
34158
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33767
34159
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
33768
|
-
return /* @__PURE__ */ jsxs(
|
|
34160
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
33769
34161
|
/* @__PURE__ */ jsx(
|
|
33770
34162
|
AvlState,
|
|
33771
34163
|
{
|
|
@@ -35142,7 +35534,7 @@ var init_DocumentViewer = __esm({
|
|
|
35142
35534
|
}
|
|
35143
35535
|
});
|
|
35144
35536
|
function extractTitle(children) {
|
|
35145
|
-
if (!
|
|
35537
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
35146
35538
|
const props = children.props;
|
|
35147
35539
|
if (typeof props.title === "string") {
|
|
35148
35540
|
return props.title;
|
|
@@ -35197,7 +35589,7 @@ function LinearView({
|
|
|
35197
35589
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
35198
35590
|
const isDone = i < currentIdx;
|
|
35199
35591
|
const isCurrent = i === currentIdx;
|
|
35200
|
-
return /* @__PURE__ */ jsxs(
|
|
35592
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
35201
35593
|
i > 0 && /* @__PURE__ */ jsx(
|
|
35202
35594
|
Typography,
|
|
35203
35595
|
{
|
|
@@ -36098,12 +36490,12 @@ var init_Form = __esm({
|
|
|
36098
36490
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
36099
36491
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
36100
36492
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
36101
|
-
const normalizedInitialData =
|
|
36493
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
36102
36494
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
36103
36495
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
36104
36496
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
36105
36497
|
}, [entity, initialData]);
|
|
36106
|
-
const entityDerivedFields =
|
|
36498
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
36107
36499
|
if (fields && fields.length > 0) return void 0;
|
|
36108
36500
|
if (!resolvedEntity) return void 0;
|
|
36109
36501
|
return resolvedEntity.fields.map(
|
|
@@ -36123,16 +36515,16 @@ var init_Form = __esm({
|
|
|
36123
36515
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
36124
36516
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
36125
36517
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
36126
|
-
const [formData, setFormData] =
|
|
36518
|
+
const [formData, setFormData] = React86__default.useState(
|
|
36127
36519
|
normalizedInitialData
|
|
36128
36520
|
);
|
|
36129
|
-
const [collapsedSections, setCollapsedSections] =
|
|
36521
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
36130
36522
|
/* @__PURE__ */ new Set()
|
|
36131
36523
|
);
|
|
36132
|
-
const [submitError, setSubmitError] =
|
|
36133
|
-
const formRef =
|
|
36524
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
36525
|
+
const formRef = React86__default.useRef(null);
|
|
36134
36526
|
const formMode = props.mode;
|
|
36135
|
-
const mountedRef =
|
|
36527
|
+
const mountedRef = React86__default.useRef(false);
|
|
36136
36528
|
if (!mountedRef.current) {
|
|
36137
36529
|
mountedRef.current = true;
|
|
36138
36530
|
debug("forms", "mount", {
|
|
@@ -36145,7 +36537,7 @@ var init_Form = __esm({
|
|
|
36145
36537
|
});
|
|
36146
36538
|
}
|
|
36147
36539
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
36148
|
-
const evalContext =
|
|
36540
|
+
const evalContext = React86__default.useMemo(
|
|
36149
36541
|
() => ({
|
|
36150
36542
|
formValues: formData,
|
|
36151
36543
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -36154,7 +36546,7 @@ var init_Form = __esm({
|
|
|
36154
36546
|
}),
|
|
36155
36547
|
[formData, externalContext]
|
|
36156
36548
|
);
|
|
36157
|
-
|
|
36549
|
+
React86__default.useEffect(() => {
|
|
36158
36550
|
debug("forms", "initialData-sync", {
|
|
36159
36551
|
mode: formMode,
|
|
36160
36552
|
normalizedInitialData,
|
|
@@ -36165,7 +36557,7 @@ var init_Form = __esm({
|
|
|
36165
36557
|
setFormData(normalizedInitialData);
|
|
36166
36558
|
}
|
|
36167
36559
|
}, [normalizedInitialData]);
|
|
36168
|
-
const processCalculations =
|
|
36560
|
+
const processCalculations = React86__default.useCallback(
|
|
36169
36561
|
(changedFieldId, newFormData) => {
|
|
36170
36562
|
if (!hiddenCalculations.length) return;
|
|
36171
36563
|
const context = {
|
|
@@ -36190,7 +36582,7 @@ var init_Form = __esm({
|
|
|
36190
36582
|
},
|
|
36191
36583
|
[hiddenCalculations, externalContext, eventBus]
|
|
36192
36584
|
);
|
|
36193
|
-
const checkViolations =
|
|
36585
|
+
const checkViolations = React86__default.useCallback(
|
|
36194
36586
|
(changedFieldId, newFormData) => {
|
|
36195
36587
|
if (!violationTriggers.length) return;
|
|
36196
36588
|
const context = {
|
|
@@ -36228,7 +36620,7 @@ var init_Form = __esm({
|
|
|
36228
36620
|
processCalculations(name, newFormData);
|
|
36229
36621
|
checkViolations(name, newFormData);
|
|
36230
36622
|
};
|
|
36231
|
-
const isFieldVisible =
|
|
36623
|
+
const isFieldVisible = React86__default.useCallback(
|
|
36232
36624
|
(fieldName) => {
|
|
36233
36625
|
const condition = conditionalFields[fieldName];
|
|
36234
36626
|
if (!condition) return true;
|
|
@@ -36236,7 +36628,7 @@ var init_Form = __esm({
|
|
|
36236
36628
|
},
|
|
36237
36629
|
[conditionalFields, evalContext]
|
|
36238
36630
|
);
|
|
36239
|
-
const isSectionVisible =
|
|
36631
|
+
const isSectionVisible = React86__default.useCallback(
|
|
36240
36632
|
(section) => {
|
|
36241
36633
|
if (!section.condition) return true;
|
|
36242
36634
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -36312,7 +36704,7 @@ var init_Form = __esm({
|
|
|
36312
36704
|
eventBus.emit(`UI:${onCancel}`);
|
|
36313
36705
|
}
|
|
36314
36706
|
};
|
|
36315
|
-
const renderField =
|
|
36707
|
+
const renderField = React86__default.useCallback(
|
|
36316
36708
|
(field) => {
|
|
36317
36709
|
const fieldName = field.name || field.field;
|
|
36318
36710
|
if (!fieldName) return null;
|
|
@@ -36333,7 +36725,7 @@ var init_Form = __esm({
|
|
|
36333
36725
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
36334
36726
|
);
|
|
36335
36727
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
36336
|
-
const normalizedFields =
|
|
36728
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
36337
36729
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
36338
36730
|
return effectiveFields.map((field) => {
|
|
36339
36731
|
if (typeof field === "string") {
|
|
@@ -36356,7 +36748,7 @@ var init_Form = __esm({
|
|
|
36356
36748
|
return field;
|
|
36357
36749
|
});
|
|
36358
36750
|
}, [effectiveFields, resolvedEntity]);
|
|
36359
|
-
const schemaFields =
|
|
36751
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
36360
36752
|
if (normalizedFields.length === 0) return null;
|
|
36361
36753
|
if (isDebugEnabled()) {
|
|
36362
36754
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -36366,7 +36758,7 @@ var init_Form = __esm({
|
|
|
36366
36758
|
}
|
|
36367
36759
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
36368
36760
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
36369
|
-
const sectionElements =
|
|
36761
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
36370
36762
|
if (!sections || sections.length === 0) return null;
|
|
36371
36763
|
return sections.map((section) => {
|
|
36372
36764
|
if (!isSectionVisible(section)) {
|
|
@@ -37071,7 +37463,7 @@ var init_GameTemplate = __esm({
|
|
|
37071
37463
|
{
|
|
37072
37464
|
variant: "secondary",
|
|
37073
37465
|
size: "sm",
|
|
37074
|
-
icon:
|
|
37466
|
+
icon: "pause",
|
|
37075
37467
|
onClick: controls.onPause,
|
|
37076
37468
|
children: "Pause"
|
|
37077
37469
|
}
|
|
@@ -37080,7 +37472,7 @@ var init_GameTemplate = __esm({
|
|
|
37080
37472
|
{
|
|
37081
37473
|
variant: "primary",
|
|
37082
37474
|
size: "sm",
|
|
37083
|
-
icon:
|
|
37475
|
+
icon: "play",
|
|
37084
37476
|
onClick: controls.onPlay,
|
|
37085
37477
|
children: "Play"
|
|
37086
37478
|
}
|
|
@@ -37090,7 +37482,7 @@ var init_GameTemplate = __esm({
|
|
|
37090
37482
|
{
|
|
37091
37483
|
variant: "ghost",
|
|
37092
37484
|
size: "sm",
|
|
37093
|
-
icon:
|
|
37485
|
+
icon: "rotate-ccw",
|
|
37094
37486
|
onClick: controls.onReset,
|
|
37095
37487
|
children: "Reset"
|
|
37096
37488
|
}
|
|
@@ -38092,7 +38484,7 @@ var init_List = __esm({
|
|
|
38092
38484
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
38093
38485
|
return [];
|
|
38094
38486
|
}, [entity]);
|
|
38095
|
-
const getItemActions =
|
|
38487
|
+
const getItemActions = React86__default.useCallback(
|
|
38096
38488
|
(item) => {
|
|
38097
38489
|
if (!itemActions) return [];
|
|
38098
38490
|
if (typeof itemActions === "function") {
|
|
@@ -38565,7 +38957,7 @@ var init_MediaGallery = __esm({
|
|
|
38565
38957
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
38566
38958
|
);
|
|
38567
38959
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
38568
|
-
const items =
|
|
38960
|
+
const items = React86__default.useMemo(() => {
|
|
38569
38961
|
if (propItems) return propItems;
|
|
38570
38962
|
if (entityData.length === 0) return [];
|
|
38571
38963
|
return entityData.map((record, idx) => ({
|
|
@@ -38729,7 +39121,7 @@ var init_MediaGallery = __esm({
|
|
|
38729
39121
|
}
|
|
38730
39122
|
});
|
|
38731
39123
|
function extractTitle2(children) {
|
|
38732
|
-
if (!
|
|
39124
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
38733
39125
|
const props = children.props;
|
|
38734
39126
|
if (typeof props.title === "string") {
|
|
38735
39127
|
return props.title;
|
|
@@ -39442,7 +39834,7 @@ var init_PageHeader = __esm({
|
|
|
39442
39834
|
info: "bg-info/10 text-info"
|
|
39443
39835
|
};
|
|
39444
39836
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39445
|
-
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(
|
|
39837
|
+
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(React86__default.Fragment, { children: [
|
|
39446
39838
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39447
39839
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39448
39840
|
"a",
|
|
@@ -39657,14 +40049,14 @@ function getAllTraits() {
|
|
|
39657
40049
|
return Array.from(traits.values());
|
|
39658
40050
|
}
|
|
39659
40051
|
function subscribeToTraitChanges(listener) {
|
|
39660
|
-
|
|
39661
|
-
return () =>
|
|
40052
|
+
listeners2.add(listener);
|
|
40053
|
+
return () => listeners2.delete(listener);
|
|
39662
40054
|
}
|
|
39663
|
-
var traits,
|
|
40055
|
+
var traits, listeners2;
|
|
39664
40056
|
var init_traitRegistry = __esm({
|
|
39665
40057
|
"lib/traitRegistry.ts"() {
|
|
39666
40058
|
traits = /* @__PURE__ */ new Map();
|
|
39667
|
-
|
|
40059
|
+
listeners2 = /* @__PURE__ */ new Set();
|
|
39668
40060
|
}
|
|
39669
40061
|
});
|
|
39670
40062
|
|
|
@@ -39673,14 +40065,14 @@ function getAllTicks() {
|
|
|
39673
40065
|
return Array.from(ticks.values());
|
|
39674
40066
|
}
|
|
39675
40067
|
function subscribeToTickChanges(listener) {
|
|
39676
|
-
|
|
39677
|
-
return () =>
|
|
40068
|
+
listeners3.add(listener);
|
|
40069
|
+
return () => listeners3.delete(listener);
|
|
39678
40070
|
}
|
|
39679
|
-
var ticks,
|
|
40071
|
+
var ticks, listeners3;
|
|
39680
40072
|
var init_tickRegistry = __esm({
|
|
39681
40073
|
"lib/tickRegistry.ts"() {
|
|
39682
40074
|
ticks = /* @__PURE__ */ new Map();
|
|
39683
|
-
|
|
40075
|
+
listeners3 = /* @__PURE__ */ new Set();
|
|
39684
40076
|
}
|
|
39685
40077
|
});
|
|
39686
40078
|
|
|
@@ -39689,14 +40081,14 @@ function getGuardHistory() {
|
|
|
39689
40081
|
return [...guardHistory];
|
|
39690
40082
|
}
|
|
39691
40083
|
function subscribeToGuardChanges(listener) {
|
|
39692
|
-
|
|
39693
|
-
return () =>
|
|
40084
|
+
listeners4.add(listener);
|
|
40085
|
+
return () => listeners4.delete(listener);
|
|
39694
40086
|
}
|
|
39695
|
-
var guardHistory,
|
|
40087
|
+
var guardHistory, listeners4;
|
|
39696
40088
|
var init_guardRegistry = __esm({
|
|
39697
40089
|
"lib/guardRegistry.ts"() {
|
|
39698
40090
|
guardHistory = [];
|
|
39699
|
-
|
|
40091
|
+
listeners4 = /* @__PURE__ */ new Set();
|
|
39700
40092
|
}
|
|
39701
40093
|
});
|
|
39702
40094
|
|
|
@@ -39727,18 +40119,18 @@ function getDebugEvents() {
|
|
|
39727
40119
|
return [...events];
|
|
39728
40120
|
}
|
|
39729
40121
|
function subscribeToDebugEvents(listener) {
|
|
39730
|
-
|
|
39731
|
-
return () =>
|
|
40122
|
+
listeners5.add(listener);
|
|
40123
|
+
return () => listeners5.delete(listener);
|
|
39732
40124
|
}
|
|
39733
|
-
var events,
|
|
40125
|
+
var events, listeners5;
|
|
39734
40126
|
var init_debugRegistry = __esm({
|
|
39735
40127
|
"lib/debugRegistry.ts"() {
|
|
39736
40128
|
events = [];
|
|
39737
|
-
|
|
40129
|
+
listeners5 = /* @__PURE__ */ new Set();
|
|
39738
40130
|
}
|
|
39739
40131
|
});
|
|
39740
40132
|
function useDebugData() {
|
|
39741
|
-
const [data, setData] =
|
|
40133
|
+
const [data, setData] = React86.useState(() => ({
|
|
39742
40134
|
traits: [],
|
|
39743
40135
|
ticks: [],
|
|
39744
40136
|
guards: [],
|
|
@@ -39752,7 +40144,7 @@ function useDebugData() {
|
|
|
39752
40144
|
},
|
|
39753
40145
|
lastUpdate: Date.now()
|
|
39754
40146
|
}));
|
|
39755
|
-
|
|
40147
|
+
React86.useEffect(() => {
|
|
39756
40148
|
const updateData = () => {
|
|
39757
40149
|
setData({
|
|
39758
40150
|
traits: getAllTraits(),
|
|
@@ -39811,14 +40203,14 @@ function isDebugEnabled2() {
|
|
|
39811
40203
|
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
39812
40204
|
}
|
|
39813
40205
|
function onDebugToggle(listener) {
|
|
39814
|
-
|
|
39815
|
-
return () =>
|
|
40206
|
+
listeners6.add(listener);
|
|
40207
|
+
return () => listeners6.delete(listener);
|
|
39816
40208
|
}
|
|
39817
|
-
var DEBUG_STORAGE_KEY,
|
|
40209
|
+
var DEBUG_STORAGE_KEY, listeners6;
|
|
39818
40210
|
var init_debugUtils = __esm({
|
|
39819
40211
|
"lib/debugUtils.ts"() {
|
|
39820
40212
|
DEBUG_STORAGE_KEY = "orbital-debug";
|
|
39821
|
-
|
|
40213
|
+
listeners6 = /* @__PURE__ */ new Set();
|
|
39822
40214
|
}
|
|
39823
40215
|
});
|
|
39824
40216
|
function layoutGraph(states, transitions, initialState, width, height) {
|
|
@@ -39861,12 +40253,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39861
40253
|
return positions;
|
|
39862
40254
|
}
|
|
39863
40255
|
function WalkMinimap() {
|
|
39864
|
-
const [walkStep, setWalkStep] =
|
|
39865
|
-
const [traits2, setTraits] =
|
|
39866
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39867
|
-
const [completedTraits, setCompletedTraits] =
|
|
39868
|
-
const prevTraitRef =
|
|
39869
|
-
|
|
40256
|
+
const [walkStep, setWalkStep] = React86.useState(null);
|
|
40257
|
+
const [traits2, setTraits] = React86.useState([]);
|
|
40258
|
+
const [coveredEdges, setCoveredEdges] = React86.useState([]);
|
|
40259
|
+
const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
|
|
40260
|
+
const prevTraitRef = React86.useRef(null);
|
|
40261
|
+
React86.useEffect(() => {
|
|
39870
40262
|
const interval = setInterval(() => {
|
|
39871
40263
|
const w = window;
|
|
39872
40264
|
const step = w.__orbitalWalkStep;
|
|
@@ -40313,15 +40705,15 @@ var init_EntitiesTab = __esm({
|
|
|
40313
40705
|
}
|
|
40314
40706
|
});
|
|
40315
40707
|
function EventFlowTab({ events: events2 }) {
|
|
40316
|
-
const [filter, setFilter] =
|
|
40317
|
-
const containerRef =
|
|
40318
|
-
const [autoScroll, setAutoScroll] =
|
|
40319
|
-
|
|
40708
|
+
const [filter, setFilter] = React86.useState("all");
|
|
40709
|
+
const containerRef = React86.useRef(null);
|
|
40710
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
40711
|
+
React86.useEffect(() => {
|
|
40320
40712
|
if (autoScroll && containerRef.current) {
|
|
40321
40713
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40322
40714
|
}
|
|
40323
40715
|
}, [events2.length, autoScroll]);
|
|
40324
|
-
const filteredEvents =
|
|
40716
|
+
const filteredEvents = React86.useMemo(() => {
|
|
40325
40717
|
if (filter === "all") return events2;
|
|
40326
40718
|
return events2.filter((e) => e.type === filter);
|
|
40327
40719
|
}, [events2, filter]);
|
|
@@ -40440,7 +40832,7 @@ var init_EventFlowTab = __esm({
|
|
|
40440
40832
|
}
|
|
40441
40833
|
});
|
|
40442
40834
|
function GuardsPanel({ guards }) {
|
|
40443
|
-
const [filter, setFilter] =
|
|
40835
|
+
const [filter, setFilter] = React86.useState("all");
|
|
40444
40836
|
if (guards.length === 0) {
|
|
40445
40837
|
return /* @__PURE__ */ jsx(
|
|
40446
40838
|
EmptyState,
|
|
@@ -40453,7 +40845,7 @@ function GuardsPanel({ guards }) {
|
|
|
40453
40845
|
}
|
|
40454
40846
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40455
40847
|
const failedCount = guards.length - passedCount;
|
|
40456
|
-
const filteredGuards =
|
|
40848
|
+
const filteredGuards = React86.useMemo(() => {
|
|
40457
40849
|
if (filter === "all") return guards;
|
|
40458
40850
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40459
40851
|
return guards.filter((g) => !g.result);
|
|
@@ -40614,10 +41006,10 @@ function EffectBadge({ effect }) {
|
|
|
40614
41006
|
] });
|
|
40615
41007
|
}
|
|
40616
41008
|
function TransitionTimeline({ transitions }) {
|
|
40617
|
-
const containerRef =
|
|
40618
|
-
const [autoScroll, setAutoScroll] =
|
|
40619
|
-
const [expandedId, setExpandedId] =
|
|
40620
|
-
|
|
41009
|
+
const containerRef = React86.useRef(null);
|
|
41010
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
41011
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
41012
|
+
React86.useEffect(() => {
|
|
40621
41013
|
if (autoScroll && containerRef.current) {
|
|
40622
41014
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40623
41015
|
}
|
|
@@ -40903,9 +41295,9 @@ function getAllEvents(traits2) {
|
|
|
40903
41295
|
}
|
|
40904
41296
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40905
41297
|
const eventBus = useEventBus();
|
|
40906
|
-
const [log12, setLog] =
|
|
40907
|
-
const prevStatesRef =
|
|
40908
|
-
|
|
41298
|
+
const [log12, setLog] = React86.useState([]);
|
|
41299
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
41300
|
+
React86.useEffect(() => {
|
|
40909
41301
|
for (const trait of traits2) {
|
|
40910
41302
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40911
41303
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41075,10 +41467,10 @@ function VerifyModePanel({
|
|
|
41075
41467
|
serverCount,
|
|
41076
41468
|
localCount
|
|
41077
41469
|
}) {
|
|
41078
|
-
const [expanded, setExpanded] =
|
|
41079
|
-
const scrollRef =
|
|
41080
|
-
const prevCountRef =
|
|
41081
|
-
|
|
41470
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
41471
|
+
const scrollRef = React86.useRef(null);
|
|
41472
|
+
const prevCountRef = React86.useRef(0);
|
|
41473
|
+
React86.useEffect(() => {
|
|
41082
41474
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41083
41475
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41084
41476
|
}
|
|
@@ -41144,10 +41536,10 @@ function RuntimeDebugger({
|
|
|
41144
41536
|
defaultTab,
|
|
41145
41537
|
schema
|
|
41146
41538
|
}) {
|
|
41147
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41148
|
-
const [isVisible, setIsVisible] =
|
|
41539
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41540
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41149
41541
|
const debugData = useDebugData();
|
|
41150
|
-
|
|
41542
|
+
React86.useEffect(() => {
|
|
41151
41543
|
if (mode === "inline") return;
|
|
41152
41544
|
return onDebugToggle((enabled) => {
|
|
41153
41545
|
setIsVisible(enabled);
|
|
@@ -41156,7 +41548,7 @@ function RuntimeDebugger({
|
|
|
41156
41548
|
}
|
|
41157
41549
|
});
|
|
41158
41550
|
}, [mode]);
|
|
41159
|
-
|
|
41551
|
+
React86.useEffect(() => {
|
|
41160
41552
|
if (mode === "inline") return;
|
|
41161
41553
|
const handleKeyDown = (e) => {
|
|
41162
41554
|
if (e.key === "`" && isVisible) {
|
|
@@ -41705,7 +42097,7 @@ function SequenceBar({
|
|
|
41705
42097
|
onSlotRemove(index);
|
|
41706
42098
|
}, [onSlotRemove, playing]);
|
|
41707
42099
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41708
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
42100
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
41709
42101
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41710
42102
|
Typography,
|
|
41711
42103
|
{
|
|
@@ -43107,7 +43499,7 @@ var init_StatCard = __esm({
|
|
|
43107
43499
|
const labelToUse = propLabel ?? propTitle;
|
|
43108
43500
|
const eventBus = useEventBus();
|
|
43109
43501
|
const { t } = useTranslate();
|
|
43110
|
-
const handleActionClick =
|
|
43502
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
43111
43503
|
if (action?.event) {
|
|
43112
43504
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43113
43505
|
}
|
|
@@ -43118,7 +43510,7 @@ var init_StatCard = __esm({
|
|
|
43118
43510
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43119
43511
|
const isLoading = externalLoading ?? false;
|
|
43120
43512
|
const error = externalError;
|
|
43121
|
-
const computeMetricValue =
|
|
43513
|
+
const computeMetricValue = React86__default.useCallback(
|
|
43122
43514
|
(metric, items) => {
|
|
43123
43515
|
if (metric.value !== void 0) {
|
|
43124
43516
|
return metric.value;
|
|
@@ -43157,7 +43549,7 @@ var init_StatCard = __esm({
|
|
|
43157
43549
|
},
|
|
43158
43550
|
[]
|
|
43159
43551
|
);
|
|
43160
|
-
const schemaStats =
|
|
43552
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
43161
43553
|
if (!metrics || metrics.length === 0) return null;
|
|
43162
43554
|
return metrics.map((metric) => ({
|
|
43163
43555
|
label: metric.label,
|
|
@@ -43165,7 +43557,7 @@ var init_StatCard = __esm({
|
|
|
43165
43557
|
format: metric.format
|
|
43166
43558
|
}));
|
|
43167
43559
|
}, [metrics, data, computeMetricValue]);
|
|
43168
|
-
const calculatedTrend =
|
|
43560
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
43169
43561
|
if (manualTrend !== void 0) return manualTrend;
|
|
43170
43562
|
if (previousValue === void 0 || currentValue === void 0)
|
|
43171
43563
|
return void 0;
|
|
@@ -44276,7 +44668,7 @@ var init_Timeline = __esm({
|
|
|
44276
44668
|
}) => {
|
|
44277
44669
|
const { t } = useTranslate();
|
|
44278
44670
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44279
|
-
const items =
|
|
44671
|
+
const items = React86__default.useMemo(() => {
|
|
44280
44672
|
if (propItems) return propItems;
|
|
44281
44673
|
if (entityData.length === 0) return [];
|
|
44282
44674
|
return entityData.map((record, idx) => {
|
|
@@ -44383,7 +44775,7 @@ var init_Timeline = __esm({
|
|
|
44383
44775
|
}
|
|
44384
44776
|
});
|
|
44385
44777
|
function extractToastProps(children) {
|
|
44386
|
-
if (!
|
|
44778
|
+
if (!React86__default.isValidElement(children)) {
|
|
44387
44779
|
if (typeof children === "string") {
|
|
44388
44780
|
return { message: children };
|
|
44389
44781
|
}
|
|
@@ -44421,7 +44813,7 @@ var init_ToastSlot = __esm({
|
|
|
44421
44813
|
eventBus.emit("UI:CLOSE");
|
|
44422
44814
|
};
|
|
44423
44815
|
if (!isVisible) return null;
|
|
44424
|
-
const isCustomContent =
|
|
44816
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
44425
44817
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44426
44818
|
Toast,
|
|
44427
44819
|
{
|
|
@@ -44690,7 +45082,7 @@ var init_WizardContainer = __esm({
|
|
|
44690
45082
|
const isCompleted = index < currentStep;
|
|
44691
45083
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44692
45084
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44693
|
-
return /* @__PURE__ */ jsxs(
|
|
45085
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
44694
45086
|
/* @__PURE__ */ jsx(
|
|
44695
45087
|
Button,
|
|
44696
45088
|
{
|
|
@@ -45072,12 +45464,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
45072
45464
|
}
|
|
45073
45465
|
});
|
|
45074
45466
|
function lazyThree(name, loader) {
|
|
45075
|
-
const Lazy =
|
|
45467
|
+
const Lazy = React86__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45076
45468
|
function ThreeWrapper(props) {
|
|
45077
|
-
return
|
|
45078
|
-
|
|
45469
|
+
return React86__default.createElement(
|
|
45470
|
+
React86__default.Suspense,
|
|
45079
45471
|
{ fallback: null },
|
|
45080
|
-
|
|
45472
|
+
React86__default.createElement(Lazy, props)
|
|
45081
45473
|
);
|
|
45082
45474
|
}
|
|
45083
45475
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -45693,7 +46085,7 @@ function SuspenseConfigProvider({
|
|
|
45693
46085
|
config,
|
|
45694
46086
|
children
|
|
45695
46087
|
}) {
|
|
45696
|
-
return
|
|
46088
|
+
return React86__default.createElement(
|
|
45697
46089
|
SuspenseConfigContext.Provider,
|
|
45698
46090
|
{ value: config },
|
|
45699
46091
|
children
|
|
@@ -46176,7 +46568,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46176
46568
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46177
46569
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46178
46570
|
}
|
|
46179
|
-
return /* @__PURE__ */ jsx(
|
|
46571
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46180
46572
|
}
|
|
46181
46573
|
if (!child || typeof child !== "object") return null;
|
|
46182
46574
|
const childId = `${parentId}-${index}`;
|
|
@@ -46213,14 +46605,14 @@ function isPatternConfig(value) {
|
|
|
46213
46605
|
if (value === null || value === void 0) return false;
|
|
46214
46606
|
if (typeof value !== "object") return false;
|
|
46215
46607
|
if (Array.isArray(value)) return false;
|
|
46216
|
-
if (
|
|
46608
|
+
if (React86__default.isValidElement(value)) return false;
|
|
46217
46609
|
if (value instanceof Date) return false;
|
|
46218
46610
|
if (typeof value === "function") return false;
|
|
46219
46611
|
const record = value;
|
|
46220
46612
|
return "type" in record && typeof record.type === "string";
|
|
46221
46613
|
}
|
|
46222
46614
|
function isPlainConfigObject(value) {
|
|
46223
|
-
if (
|
|
46615
|
+
if (React86__default.isValidElement(value)) return false;
|
|
46224
46616
|
if (value instanceof Date) return false;
|
|
46225
46617
|
const proto = Object.getPrototypeOf(value);
|
|
46226
46618
|
return proto === Object.prototype || proto === null;
|
|
@@ -46561,14 +46953,14 @@ function EventBusProvider({ children }) {
|
|
|
46561
46953
|
timestamp: Date.now(),
|
|
46562
46954
|
source
|
|
46563
46955
|
};
|
|
46564
|
-
const
|
|
46565
|
-
const listenerCount = (
|
|
46956
|
+
const listeners7 = listenersRef.current.get(type);
|
|
46957
|
+
const listenerCount = (listeners7?.size ?? 0) + anyListenersRef.current.size;
|
|
46566
46958
|
busLog.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount });
|
|
46567
46959
|
if (listenerCount === 0) {
|
|
46568
46960
|
busLog.warn("emit:no-listeners", { type });
|
|
46569
46961
|
}
|
|
46570
|
-
if (
|
|
46571
|
-
const listenersCopy = Array.from(
|
|
46962
|
+
if (listeners7) {
|
|
46963
|
+
const listenersCopy = Array.from(listeners7);
|
|
46572
46964
|
for (let i = 0; i < listenersCopy.length; i++) {
|
|
46573
46965
|
const listener = listenersCopy[i];
|
|
46574
46966
|
busLog.debug("emit:listener", {
|
|
@@ -46604,14 +46996,14 @@ function EventBusProvider({ children }) {
|
|
|
46604
46996
|
if (!listenersRef.current.has(type)) {
|
|
46605
46997
|
listenersRef.current.set(type, /* @__PURE__ */ new Set());
|
|
46606
46998
|
}
|
|
46607
|
-
const
|
|
46608
|
-
|
|
46999
|
+
const listeners7 = listenersRef.current.get(type);
|
|
47000
|
+
listeners7.add(listener);
|
|
46609
47001
|
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
46610
|
-
subLog2.debug("subscribe", { type, totalListeners:
|
|
47002
|
+
subLog2.debug("subscribe", { type, totalListeners: listeners7.size, tag: listenerTags.get(listener) });
|
|
46611
47003
|
return () => {
|
|
46612
|
-
|
|
46613
|
-
subLog2.debug("unsubscribe", { type, remaining:
|
|
46614
|
-
if (
|
|
47004
|
+
listeners7.delete(listener);
|
|
47005
|
+
subLog2.debug("unsubscribe", { type, remaining: listeners7.size });
|
|
47006
|
+
if (listeners7.size === 0) {
|
|
46615
47007
|
listenersRef.current.delete(type);
|
|
46616
47008
|
}
|
|
46617
47009
|
};
|
|
@@ -46624,8 +47016,8 @@ function EventBusProvider({ children }) {
|
|
|
46624
47016
|
return on(type, wrappedListener);
|
|
46625
47017
|
}, [on]);
|
|
46626
47018
|
const hasListeners = useCallback((type) => {
|
|
46627
|
-
const
|
|
46628
|
-
return
|
|
47019
|
+
const listeners7 = listenersRef.current.get(type);
|
|
47020
|
+
return listeners7 !== void 0 && listeners7.size > 0;
|
|
46629
47021
|
}, []);
|
|
46630
47022
|
const onAny = useCallback((listener) => {
|
|
46631
47023
|
anyListenersRef.current.add(listener);
|