@almadar/ui 5.113.0 → 5.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +240 -1055
- package/dist/avl/index.js +235 -1050
- package/dist/{cn-BkQrMR01.d.cts → cn-D3H9UzCW.d.cts} +1 -1
- package/dist/{cn-CTEFm9PC.d.ts → cn-Dm0VrLRG.d.ts} +1 -1
- package/dist/components/index.cjs +132 -680
- package/dist/components/index.d.cts +7 -3
- package/dist/components/index.d.ts +7 -3
- package/dist/components/index.js +131 -679
- package/dist/lib/drawable/three/index.cjs +58 -38
- package/dist/lib/drawable/three/index.d.cts +3 -2
- package/dist/lib/drawable/three/index.d.ts +3 -2
- package/dist/lib/drawable/three/index.js +58 -38
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/marketing/index.cjs +16 -637
- package/dist/marketing/index.js +16 -637
- package/dist/{paintDispatch-DR942knx.d.cts → paintDispatch-BXJgISot.d.cts} +2 -0
- package/dist/{paintDispatch-DR942knx.d.ts → paintDispatch-BXJgISot.d.ts} +2 -0
- package/dist/providers/index.cjs +132 -680
- package/dist/providers/index.js +131 -679
- package/dist/runtime/index.cjs +267 -1089
- package/dist/runtime/index.d.cts +11 -112
- package/dist/runtime/index.d.ts +11 -112
- package/dist/runtime/index.js +230 -1078
- package/package.json +3 -3
package/dist/providers/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ var reactDom = require('react-dom');
|
|
|
11
11
|
var hooks = require('@almadar/ui/hooks');
|
|
12
12
|
var context = require('@almadar/ui/context');
|
|
13
13
|
var evaluator = require('@almadar/evaluator');
|
|
14
|
+
var ui = require('@almadar/runtime/ui');
|
|
14
15
|
var reactRouterDom = require('react-router-dom');
|
|
15
16
|
var ELK = require('elkjs/lib/elk.bundled.js');
|
|
16
17
|
var SyntaxHighlighter = require('react-syntax-highlighter/dist/esm/prism-light.js');
|
|
@@ -585,41 +586,6 @@ function kebabToPascal(name) {
|
|
|
585
586
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
586
587
|
}).join("");
|
|
587
588
|
}
|
|
588
|
-
function loadLib(key, importer) {
|
|
589
|
-
let p = libPromises.get(key);
|
|
590
|
-
if (!p) {
|
|
591
|
-
p = importer();
|
|
592
|
-
libPromises.set(key, p);
|
|
593
|
-
}
|
|
594
|
-
return p;
|
|
595
|
-
}
|
|
596
|
-
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
597
|
-
const Lazy = React83__namespace.default.lazy(async () => {
|
|
598
|
-
const lib = await loadLib(libKey, importer);
|
|
599
|
-
const Comp = pick(lib);
|
|
600
|
-
if (!Comp) {
|
|
601
|
-
warnFallback(fallbackName, family);
|
|
602
|
-
return { default: makeLucideAdapter(fallbackName, true) };
|
|
603
|
-
}
|
|
604
|
-
return { default: Comp };
|
|
605
|
-
});
|
|
606
|
-
const Wrapped = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
607
|
-
React83__namespace.default.Suspense,
|
|
608
|
-
{
|
|
609
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
610
|
-
"span",
|
|
611
|
-
{
|
|
612
|
-
"aria-hidden": true,
|
|
613
|
-
className: props.className,
|
|
614
|
-
style: { display: "inline-block", ...props.style }
|
|
615
|
-
}
|
|
616
|
-
),
|
|
617
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Lazy, { ...props })
|
|
618
|
-
}
|
|
619
|
-
);
|
|
620
|
-
Wrapped.displayName = `Lazy.${libKey}.${fallbackName}`;
|
|
621
|
-
return Wrapped;
|
|
622
|
-
}
|
|
623
589
|
function isComponentLike(v) {
|
|
624
590
|
return v != null && (typeof v === "function" || typeof v === "object");
|
|
625
591
|
}
|
|
@@ -633,146 +599,32 @@ function resolveLucide(name) {
|
|
|
633
599
|
if (isComponentLike(asIs)) return asIs;
|
|
634
600
|
return LucideIcons2__namespace.HelpCircle;
|
|
635
601
|
}
|
|
636
|
-
function
|
|
637
|
-
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
638
|
-
return lazyFamilyIcon(
|
|
639
|
-
"phosphor",
|
|
640
|
-
() => import('@phosphor-icons/react'),
|
|
641
|
-
(lib) => {
|
|
642
|
-
const PhosphorComp = lib[target];
|
|
643
|
-
if (!PhosphorComp) return null;
|
|
644
|
-
const Component = PhosphorComp;
|
|
645
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
646
|
-
Component,
|
|
647
|
-
{
|
|
648
|
-
weight,
|
|
649
|
-
className: props.className,
|
|
650
|
-
style: props.style,
|
|
651
|
-
size: props.size ?? "1em"
|
|
652
|
-
}
|
|
653
|
-
);
|
|
654
|
-
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
655
|
-
return Adapter;
|
|
656
|
-
},
|
|
657
|
-
name,
|
|
658
|
-
family
|
|
659
|
-
);
|
|
660
|
-
}
|
|
661
|
-
function resolveTabler(name, family) {
|
|
662
|
-
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
663
|
-
const target = `Icon${suffix}`;
|
|
664
|
-
return lazyFamilyIcon(
|
|
665
|
-
"tabler",
|
|
666
|
-
() => import('@tabler/icons-react'),
|
|
667
|
-
(lib) => {
|
|
668
|
-
const TablerComp = lib[target];
|
|
669
|
-
if (!TablerComp) return null;
|
|
670
|
-
const Component = TablerComp;
|
|
671
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
-
Component,
|
|
673
|
-
{
|
|
674
|
-
stroke: props.strokeWidth ?? 1.5,
|
|
675
|
-
className: props.className,
|
|
676
|
-
style: props.style,
|
|
677
|
-
size: props.size ?? 24
|
|
678
|
-
}
|
|
679
|
-
);
|
|
680
|
-
Adapter.displayName = `Tabler.${target}`;
|
|
681
|
-
return Adapter;
|
|
682
|
-
},
|
|
683
|
-
name,
|
|
684
|
-
family
|
|
685
|
-
);
|
|
686
|
-
}
|
|
687
|
-
function resolveFa(name, family) {
|
|
688
|
-
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
689
|
-
const target = `Fa${suffix}`;
|
|
690
|
-
return lazyFamilyIcon(
|
|
691
|
-
"fa",
|
|
692
|
-
() => import('react-icons/fa'),
|
|
693
|
-
(lib) => {
|
|
694
|
-
const FaComp = lib[target];
|
|
695
|
-
if (!FaComp) return null;
|
|
696
|
-
const Component = FaComp;
|
|
697
|
-
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
698
|
-
Component,
|
|
699
|
-
{
|
|
700
|
-
className: props.className,
|
|
701
|
-
style: props.style,
|
|
702
|
-
size: props.size ?? "1em"
|
|
703
|
-
}
|
|
704
|
-
);
|
|
705
|
-
Adapter.displayName = `Fa.${target}`;
|
|
706
|
-
return Adapter;
|
|
707
|
-
},
|
|
708
|
-
name,
|
|
709
|
-
family
|
|
710
|
-
);
|
|
711
|
-
}
|
|
712
|
-
function warnFallback(name, family) {
|
|
713
|
-
const key = `${family}::${name}`;
|
|
714
|
-
if (warned.has(key)) return;
|
|
715
|
-
warned.add(key);
|
|
716
|
-
if (typeof console !== "undefined") {
|
|
717
|
-
console.warn(
|
|
718
|
-
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
719
|
-
);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
function makeLucideAdapter(name, isFallback = false) {
|
|
602
|
+
function makeLucideAdapter(name) {
|
|
723
603
|
const LucideComp = resolveLucide(name);
|
|
724
|
-
const Adapter = (props) =>
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
);
|
|
736
|
-
};
|
|
737
|
-
Adapter.displayName = `Lucide.${name}${isFallback ? ".fallback" : ""}`;
|
|
604
|
+
const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
605
|
+
LucideComp,
|
|
606
|
+
{
|
|
607
|
+
className: props.className,
|
|
608
|
+
strokeWidth: props.strokeWidth,
|
|
609
|
+
style: props.style,
|
|
610
|
+
size: props.size
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
738
614
|
return Adapter;
|
|
739
615
|
}
|
|
740
|
-
function resolveIconForFamily(name,
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
// Non-lucide families resolve to a lazy, Suspense-wrapped component that
|
|
745
|
-
// dynamic-imports the library on first render and falls back to lucide
|
|
746
|
-
// internally when the family lacks the icon (see lazyFamilyIcon).
|
|
747
|
-
case "phosphor-outline":
|
|
748
|
-
return resolvePhosphor(name, "regular", family);
|
|
749
|
-
case "phosphor-fill":
|
|
750
|
-
return resolvePhosphor(name, "fill", family);
|
|
751
|
-
case "phosphor-duotone":
|
|
752
|
-
return resolvePhosphor(name, "duotone", family);
|
|
753
|
-
case "tabler":
|
|
754
|
-
return resolveTabler(name, family);
|
|
755
|
-
case "fa-solid":
|
|
756
|
-
return resolveFa(name, family);
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, libPromises, lucideAliases, phosphorAliases, tablerAliases, faAliases, warned;
|
|
616
|
+
function resolveIconForFamily(name, _family) {
|
|
617
|
+
return makeLucideAdapter(name);
|
|
618
|
+
}
|
|
619
|
+
var DEFAULT_FAMILY, VALID_FAMILIES, cachedFamily, listeners, observer, lucideAliases;
|
|
760
620
|
var init_iconFamily = __esm({
|
|
761
621
|
"lib/iconFamily.tsx"() {
|
|
762
622
|
"use client";
|
|
763
623
|
DEFAULT_FAMILY = "lucide";
|
|
764
|
-
VALID_FAMILIES = [
|
|
765
|
-
"lucide",
|
|
766
|
-
"phosphor-outline",
|
|
767
|
-
"phosphor-fill",
|
|
768
|
-
"phosphor-duotone",
|
|
769
|
-
"tabler",
|
|
770
|
-
"fa-solid"
|
|
771
|
-
];
|
|
624
|
+
VALID_FAMILIES = [DEFAULT_FAMILY];
|
|
772
625
|
cachedFamily = null;
|
|
773
626
|
listeners = /* @__PURE__ */ new Set();
|
|
774
627
|
observer = null;
|
|
775
|
-
libPromises = /* @__PURE__ */ new Map();
|
|
776
628
|
lucideAliases = {
|
|
777
629
|
close: LucideIcons2__namespace.X,
|
|
778
630
|
trash: LucideIcons2__namespace.Trash2,
|
|
@@ -785,478 +637,6 @@ var init_iconFamily = __esm({
|
|
|
785
637
|
"sort-asc": LucideIcons2__namespace.ArrowUpNarrowWide,
|
|
786
638
|
"sort-desc": LucideIcons2__namespace.ArrowDownNarrowWide
|
|
787
639
|
};
|
|
788
|
-
phosphorAliases = {
|
|
789
|
-
// lucide name → phosphor PascalCase name
|
|
790
|
-
// Actions
|
|
791
|
-
plus: "Plus",
|
|
792
|
-
minus: "Minus",
|
|
793
|
-
x: "X",
|
|
794
|
-
check: "Check",
|
|
795
|
-
close: "X",
|
|
796
|
-
edit: "PencilSimple",
|
|
797
|
-
pencil: "PencilSimple",
|
|
798
|
-
trash: "Trash",
|
|
799
|
-
save: "FloppyDisk",
|
|
800
|
-
copy: "Copy",
|
|
801
|
-
share: "Share",
|
|
802
|
-
send: "PaperPlaneRight",
|
|
803
|
-
download: "DownloadSimple",
|
|
804
|
-
upload: "UploadSimple",
|
|
805
|
-
archive: "Archive",
|
|
806
|
-
refresh: "ArrowsClockwise",
|
|
807
|
-
loader: "CircleNotch",
|
|
808
|
-
link: "Link",
|
|
809
|
-
paperclip: "Paperclip",
|
|
810
|
-
// Navigation
|
|
811
|
-
"chevron-down": "CaretDown",
|
|
812
|
-
"chevron-up": "CaretUp",
|
|
813
|
-
"chevron-left": "CaretLeft",
|
|
814
|
-
"chevron-right": "CaretRight",
|
|
815
|
-
"arrow-up": "ArrowUp",
|
|
816
|
-
"arrow-down": "ArrowDown",
|
|
817
|
-
"arrow-left": "ArrowLeft",
|
|
818
|
-
"arrow-right": "ArrowRight",
|
|
819
|
-
menu: "List",
|
|
820
|
-
more: "DotsThree",
|
|
821
|
-
"more-vertical": "DotsThreeVertical",
|
|
822
|
-
"more-horizontal": "DotsThree",
|
|
823
|
-
external: "ArrowSquareOut",
|
|
824
|
-
"external-link": "ArrowSquareOut",
|
|
825
|
-
// Files
|
|
826
|
-
file: "File",
|
|
827
|
-
"file-text": "FileText",
|
|
828
|
-
"file-plus": "FilePlus",
|
|
829
|
-
"file-minus": "FileMinus",
|
|
830
|
-
folder: "Folder",
|
|
831
|
-
"folder-open": "FolderOpen",
|
|
832
|
-
document: "FileText",
|
|
833
|
-
// Charts
|
|
834
|
-
"bar-chart": "ChartBar",
|
|
835
|
-
"bar-chart-2": "ChartBar",
|
|
836
|
-
"bar-chart-3": "ChartBar",
|
|
837
|
-
"line-chart": "ChartLine",
|
|
838
|
-
"pie-chart": "ChartPie",
|
|
839
|
-
activity: "Pulse",
|
|
840
|
-
"trending-up": "TrendUp",
|
|
841
|
-
"trending-down": "TrendDown",
|
|
842
|
-
// Messages
|
|
843
|
-
message: "ChatCircle",
|
|
844
|
-
"message-circle": "ChatCircle",
|
|
845
|
-
"message-square": "ChatText",
|
|
846
|
-
"messages-square": "ChatsCircle",
|
|
847
|
-
comment: "ChatCircle",
|
|
848
|
-
comments: "ChatsCircle",
|
|
849
|
-
inbox: "Tray",
|
|
850
|
-
mail: "Envelope",
|
|
851
|
-
envelope: "Envelope",
|
|
852
|
-
// Status
|
|
853
|
-
"alert-circle": "WarningCircle",
|
|
854
|
-
"alert-triangle": "Warning",
|
|
855
|
-
"check-circle": "CheckCircle",
|
|
856
|
-
"x-circle": "XCircle",
|
|
857
|
-
info: "Info",
|
|
858
|
-
"help-circle": "Question",
|
|
859
|
-
"life-buoy": "Lifebuoy",
|
|
860
|
-
lifebuoy: "Lifebuoy",
|
|
861
|
-
warning: "Warning",
|
|
862
|
-
error: "WarningCircle",
|
|
863
|
-
// Media
|
|
864
|
-
image: "Image",
|
|
865
|
-
video: "VideoCamera",
|
|
866
|
-
film: "FilmStrip",
|
|
867
|
-
camera: "Camera",
|
|
868
|
-
music: "MusicNote",
|
|
869
|
-
play: "Play",
|
|
870
|
-
pause: "Pause",
|
|
871
|
-
stop: "Stop",
|
|
872
|
-
"skip-forward": "SkipForward",
|
|
873
|
-
"skip-back": "SkipBack",
|
|
874
|
-
volume: "SpeakerHigh",
|
|
875
|
-
"volume-2": "SpeakerHigh",
|
|
876
|
-
"volume-x": "SpeakerX",
|
|
877
|
-
mic: "Microphone",
|
|
878
|
-
"mic-off": "MicrophoneSlash",
|
|
879
|
-
// People
|
|
880
|
-
user: "User",
|
|
881
|
-
users: "Users",
|
|
882
|
-
"user-plus": "UserPlus",
|
|
883
|
-
"user-check": "UserCheck",
|
|
884
|
-
// Time
|
|
885
|
-
calendar: "Calendar",
|
|
886
|
-
clock: "Clock",
|
|
887
|
-
timer: "Timer",
|
|
888
|
-
// Location
|
|
889
|
-
map: "MapTrifold",
|
|
890
|
-
"map-pin": "MapPin",
|
|
891
|
-
navigation: "NavigationArrow",
|
|
892
|
-
compass: "Compass",
|
|
893
|
-
globe: "Globe",
|
|
894
|
-
target: "Target",
|
|
895
|
-
// Project / layout
|
|
896
|
-
kanban: "Kanban",
|
|
897
|
-
list: "List",
|
|
898
|
-
table: "Table",
|
|
899
|
-
grid: "GridFour",
|
|
900
|
-
layout: "Layout",
|
|
901
|
-
columns: "Columns",
|
|
902
|
-
rows: "Rows",
|
|
903
|
-
// Misc
|
|
904
|
-
bell: "Bell",
|
|
905
|
-
bookmark: "Bookmark",
|
|
906
|
-
briefcase: "Briefcase",
|
|
907
|
-
flag: "Flag",
|
|
908
|
-
tag: "Tag",
|
|
909
|
-
tags: "Tag",
|
|
910
|
-
star: "Star",
|
|
911
|
-
heart: "Heart",
|
|
912
|
-
home: "House",
|
|
913
|
-
settings: "Gear",
|
|
914
|
-
eye: "Eye",
|
|
915
|
-
"eye-off": "EyeSlash",
|
|
916
|
-
lock: "Lock",
|
|
917
|
-
unlock: "LockOpen",
|
|
918
|
-
key: "Key",
|
|
919
|
-
shield: "Shield",
|
|
920
|
-
search: "MagnifyingGlass",
|
|
921
|
-
filter: "Funnel",
|
|
922
|
-
"sort-asc": "SortAscending",
|
|
923
|
-
"sort-desc": "SortDescending",
|
|
924
|
-
zap: "Lightning",
|
|
925
|
-
sparkles: "Sparkle",
|
|
926
|
-
// Code
|
|
927
|
-
code: "Code",
|
|
928
|
-
terminal: "Terminal",
|
|
929
|
-
database: "Database",
|
|
930
|
-
server: "HardDrives",
|
|
931
|
-
cloud: "Cloud",
|
|
932
|
-
wifi: "WifiHigh",
|
|
933
|
-
package: "Package",
|
|
934
|
-
box: "Package",
|
|
935
|
-
// Theme
|
|
936
|
-
sun: "Sun",
|
|
937
|
-
moon: "Moon",
|
|
938
|
-
// Phone
|
|
939
|
-
phone: "Phone",
|
|
940
|
-
printer: "Printer",
|
|
941
|
-
// Hierarchy
|
|
942
|
-
tree: "Tree",
|
|
943
|
-
network: "Network"
|
|
944
|
-
};
|
|
945
|
-
tablerAliases = {
|
|
946
|
-
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
947
|
-
// Actions
|
|
948
|
-
plus: "Plus",
|
|
949
|
-
minus: "Minus",
|
|
950
|
-
x: "X",
|
|
951
|
-
check: "Check",
|
|
952
|
-
close: "X",
|
|
953
|
-
edit: "Pencil",
|
|
954
|
-
pencil: "Pencil",
|
|
955
|
-
trash: "Trash",
|
|
956
|
-
save: "DeviceFloppy",
|
|
957
|
-
copy: "Copy",
|
|
958
|
-
share: "Share",
|
|
959
|
-
send: "Send",
|
|
960
|
-
download: "Download",
|
|
961
|
-
upload: "Upload",
|
|
962
|
-
archive: "Archive",
|
|
963
|
-
refresh: "Refresh",
|
|
964
|
-
loader: "Loader2",
|
|
965
|
-
link: "Link",
|
|
966
|
-
paperclip: "Paperclip",
|
|
967
|
-
external: "ExternalLink",
|
|
968
|
-
"external-link": "ExternalLink",
|
|
969
|
-
// Navigation
|
|
970
|
-
"chevron-down": "ChevronDown",
|
|
971
|
-
"chevron-up": "ChevronUp",
|
|
972
|
-
"chevron-left": "ChevronLeft",
|
|
973
|
-
"chevron-right": "ChevronRight",
|
|
974
|
-
"arrow-down": "ArrowDown",
|
|
975
|
-
"arrow-up": "ArrowUp",
|
|
976
|
-
"arrow-left": "ArrowLeft",
|
|
977
|
-
"arrow-right": "ArrowRight",
|
|
978
|
-
menu: "Menu2",
|
|
979
|
-
more: "Dots",
|
|
980
|
-
"more-vertical": "DotsVertical",
|
|
981
|
-
// Files
|
|
982
|
-
file: "File",
|
|
983
|
-
"file-text": "FileText",
|
|
984
|
-
"file-plus": "FilePlus",
|
|
985
|
-
"file-check": "FileCheck",
|
|
986
|
-
"file-minus": "FileMinus",
|
|
987
|
-
folder: "Folder",
|
|
988
|
-
"folder-open": "FolderOpen",
|
|
989
|
-
document: "FileText",
|
|
990
|
-
// Charts
|
|
991
|
-
"bar-chart": "ChartBar",
|
|
992
|
-
"bar-chart-2": "ChartBar",
|
|
993
|
-
"bar-chart-3": "ChartBar",
|
|
994
|
-
"line-chart": "ChartLine",
|
|
995
|
-
"pie-chart": "ChartPie",
|
|
996
|
-
activity: "Activity",
|
|
997
|
-
"trending-up": "TrendingUp",
|
|
998
|
-
"trending-down": "TrendingDown",
|
|
999
|
-
// Messages
|
|
1000
|
-
message: "Message",
|
|
1001
|
-
"message-circle": "MessageCircle",
|
|
1002
|
-
"message-square": "Message2",
|
|
1003
|
-
"messages-square": "Messages",
|
|
1004
|
-
comment: "Message",
|
|
1005
|
-
comments: "Messages",
|
|
1006
|
-
inbox: "Inbox",
|
|
1007
|
-
mail: "Mail",
|
|
1008
|
-
envelope: "Mail",
|
|
1009
|
-
// Status
|
|
1010
|
-
"alert-circle": "AlertCircle",
|
|
1011
|
-
"alert-triangle": "AlertTriangle",
|
|
1012
|
-
"check-circle": "CircleCheck",
|
|
1013
|
-
"x-circle": "CircleX",
|
|
1014
|
-
info: "InfoCircle",
|
|
1015
|
-
"help-circle": "HelpCircle",
|
|
1016
|
-
"life-buoy": "Lifebuoy",
|
|
1017
|
-
warning: "AlertTriangle",
|
|
1018
|
-
error: "AlertOctagon",
|
|
1019
|
-
// Media
|
|
1020
|
-
image: "Photo",
|
|
1021
|
-
video: "Video",
|
|
1022
|
-
camera: "Camera",
|
|
1023
|
-
music: "Music",
|
|
1024
|
-
play: "PlayerPlay",
|
|
1025
|
-
pause: "PlayerPause",
|
|
1026
|
-
stop: "PlayerStop",
|
|
1027
|
-
"skip-forward": "PlayerSkipForward",
|
|
1028
|
-
"skip-back": "PlayerSkipBack",
|
|
1029
|
-
volume: "Volume",
|
|
1030
|
-
"volume-2": "Volume",
|
|
1031
|
-
"volume-x": "VolumeOff",
|
|
1032
|
-
mic: "Microphone",
|
|
1033
|
-
"mic-off": "MicrophoneOff",
|
|
1034
|
-
// People
|
|
1035
|
-
user: "User",
|
|
1036
|
-
users: "Users",
|
|
1037
|
-
"user-plus": "UserPlus",
|
|
1038
|
-
"user-check": "UserCheck",
|
|
1039
|
-
// Time
|
|
1040
|
-
calendar: "Calendar",
|
|
1041
|
-
clock: "Clock",
|
|
1042
|
-
timer: "Hourglass",
|
|
1043
|
-
// Location
|
|
1044
|
-
map: "Map",
|
|
1045
|
-
"map-pin": "MapPin",
|
|
1046
|
-
navigation: "Navigation",
|
|
1047
|
-
compass: "Compass",
|
|
1048
|
-
globe: "World",
|
|
1049
|
-
target: "Target",
|
|
1050
|
-
// Project / layout
|
|
1051
|
-
kanban: "LayoutKanban",
|
|
1052
|
-
list: "List",
|
|
1053
|
-
table: "Table",
|
|
1054
|
-
grid: "LayoutGrid",
|
|
1055
|
-
layout: "Layout",
|
|
1056
|
-
columns: "LayoutColumns",
|
|
1057
|
-
rows: "LayoutRows",
|
|
1058
|
-
// Misc
|
|
1059
|
-
bell: "Bell",
|
|
1060
|
-
bookmark: "Bookmark",
|
|
1061
|
-
briefcase: "Briefcase",
|
|
1062
|
-
flag: "Flag",
|
|
1063
|
-
tag: "Tag",
|
|
1064
|
-
tags: "Tags",
|
|
1065
|
-
star: "Star",
|
|
1066
|
-
heart: "Heart",
|
|
1067
|
-
home: "Home",
|
|
1068
|
-
settings: "Settings",
|
|
1069
|
-
eye: "Eye",
|
|
1070
|
-
"eye-off": "EyeOff",
|
|
1071
|
-
lock: "Lock",
|
|
1072
|
-
unlock: "LockOpen",
|
|
1073
|
-
key: "Key",
|
|
1074
|
-
shield: "Shield",
|
|
1075
|
-
search: "Search",
|
|
1076
|
-
filter: "Filter",
|
|
1077
|
-
"sort-asc": "SortAscending",
|
|
1078
|
-
"sort-desc": "SortDescending",
|
|
1079
|
-
zap: "Bolt",
|
|
1080
|
-
sparkles: "Sparkles",
|
|
1081
|
-
// Code / data
|
|
1082
|
-
code: "Code",
|
|
1083
|
-
terminal: "Terminal",
|
|
1084
|
-
database: "Database",
|
|
1085
|
-
server: "Server",
|
|
1086
|
-
cloud: "Cloud",
|
|
1087
|
-
wifi: "Wifi",
|
|
1088
|
-
package: "Package",
|
|
1089
|
-
box: "Box",
|
|
1090
|
-
// Theme
|
|
1091
|
-
sun: "Sun",
|
|
1092
|
-
moon: "Moon",
|
|
1093
|
-
// Phone
|
|
1094
|
-
phone: "Phone",
|
|
1095
|
-
printer: "Printer",
|
|
1096
|
-
// Hierarchy
|
|
1097
|
-
tree: "Hierarchy",
|
|
1098
|
-
network: "Network"
|
|
1099
|
-
};
|
|
1100
|
-
faAliases = {
|
|
1101
|
-
// lucide name → fa-solid suffix (after the `Fa` prefix).
|
|
1102
|
-
// react-icons/fa ships FontAwesome 5 — names like `FaFileText` don't exist
|
|
1103
|
-
// (FA renamed to `FaFileAlt`). When you see a console.warn from
|
|
1104
|
-
// [iconFamily] about an unmapped lucide name in this family, add the
|
|
1105
|
-
// closest FA5 sibling here so the fallback stays in-family.
|
|
1106
|
-
search: "Search",
|
|
1107
|
-
close: "Times",
|
|
1108
|
-
x: "Times",
|
|
1109
|
-
loader: "Spinner",
|
|
1110
|
-
refresh: "Sync",
|
|
1111
|
-
"sort-asc": "SortAmountUp",
|
|
1112
|
-
"sort-desc": "SortAmountDown",
|
|
1113
|
-
"chevron-down": "ChevronDown",
|
|
1114
|
-
"chevron-up": "ChevronUp",
|
|
1115
|
-
"chevron-left": "ChevronLeft",
|
|
1116
|
-
"chevron-right": "ChevronRight",
|
|
1117
|
-
"help-circle": "QuestionCircle",
|
|
1118
|
-
"alert-triangle": "ExclamationTriangle",
|
|
1119
|
-
"alert-circle": "ExclamationCircle",
|
|
1120
|
-
"check-circle": "CheckCircle",
|
|
1121
|
-
"x-circle": "TimesCircle",
|
|
1122
|
-
edit: "Edit",
|
|
1123
|
-
pencil: "PencilAlt",
|
|
1124
|
-
trash: "Trash",
|
|
1125
|
-
send: "PaperPlane",
|
|
1126
|
-
share: "ShareAlt",
|
|
1127
|
-
external: "ExternalLinkAlt",
|
|
1128
|
-
plus: "Plus",
|
|
1129
|
-
minus: "Minus",
|
|
1130
|
-
check: "Check",
|
|
1131
|
-
star: "Star",
|
|
1132
|
-
heart: "Heart",
|
|
1133
|
-
home: "Home",
|
|
1134
|
-
user: "User",
|
|
1135
|
-
users: "Users",
|
|
1136
|
-
"user-plus": "UserPlus",
|
|
1137
|
-
"user-check": "UserCheck",
|
|
1138
|
-
settings: "Cog",
|
|
1139
|
-
menu: "Bars",
|
|
1140
|
-
"arrow-up": "ArrowUp",
|
|
1141
|
-
"arrow-down": "ArrowDown",
|
|
1142
|
-
"arrow-left": "ArrowLeft",
|
|
1143
|
-
"arrow-right": "ArrowRight",
|
|
1144
|
-
copy: "Copy",
|
|
1145
|
-
download: "Download",
|
|
1146
|
-
upload: "Upload",
|
|
1147
|
-
filter: "Filter",
|
|
1148
|
-
calendar: "Calendar",
|
|
1149
|
-
clock: "Clock",
|
|
1150
|
-
bell: "Bell",
|
|
1151
|
-
mail: "Envelope",
|
|
1152
|
-
envelope: "Envelope",
|
|
1153
|
-
lock: "Lock",
|
|
1154
|
-
unlock: "LockOpen",
|
|
1155
|
-
eye: "Eye",
|
|
1156
|
-
"eye-off": "EyeSlash",
|
|
1157
|
-
more: "EllipsisH",
|
|
1158
|
-
"more-vertical": "EllipsisV",
|
|
1159
|
-
info: "InfoCircle",
|
|
1160
|
-
warning: "ExclamationTriangle",
|
|
1161
|
-
error: "ExclamationCircle",
|
|
1162
|
-
// Time
|
|
1163
|
-
timer: "Hourglass",
|
|
1164
|
-
// Files (FA renamed FileText → FileAlt)
|
|
1165
|
-
file: "File",
|
|
1166
|
-
"file-text": "FileAlt",
|
|
1167
|
-
"file-plus": "FileMedical",
|
|
1168
|
-
"file-minus": "FileExcel",
|
|
1169
|
-
"file-check": "FileSignature",
|
|
1170
|
-
document: "FileAlt",
|
|
1171
|
-
// Charts (lucide BarChart2 / BarChart3 → FA ChartBar)
|
|
1172
|
-
"bar-chart": "ChartBar",
|
|
1173
|
-
"bar-chart-2": "ChartBar",
|
|
1174
|
-
"bar-chart-3": "ChartBar",
|
|
1175
|
-
"line-chart": "ChartLine",
|
|
1176
|
-
"pie-chart": "ChartPie",
|
|
1177
|
-
activity: "ChartLine",
|
|
1178
|
-
"trending-up": "ChartLine",
|
|
1179
|
-
"trending-down": "ChartLine",
|
|
1180
|
-
// Messages (lucide MessageCircle/MessageSquare → FA CommentDots/CommentAlt)
|
|
1181
|
-
message: "Comment",
|
|
1182
|
-
"message-circle": "CommentDots",
|
|
1183
|
-
"message-square": "CommentAlt",
|
|
1184
|
-
"messages-square": "Comments",
|
|
1185
|
-
comment: "Comment",
|
|
1186
|
-
comments: "Comments",
|
|
1187
|
-
inbox: "Inbox",
|
|
1188
|
-
// Support / help
|
|
1189
|
-
"life-buoy": "LifeRing",
|
|
1190
|
-
lifebuoy: "LifeRing",
|
|
1191
|
-
// Project / kanban (FA has no kanban; closest semantic is Tasks/Columns)
|
|
1192
|
-
kanban: "Tasks",
|
|
1193
|
-
columns: "Columns",
|
|
1194
|
-
rows: "Bars",
|
|
1195
|
-
layout: "ThLarge",
|
|
1196
|
-
grid: "Th",
|
|
1197
|
-
list: "List",
|
|
1198
|
-
table: "Table",
|
|
1199
|
-
// Storage / folders
|
|
1200
|
-
folder: "Folder",
|
|
1201
|
-
"folder-open": "FolderOpen",
|
|
1202
|
-
archive: "Archive",
|
|
1203
|
-
bookmark: "Bookmark",
|
|
1204
|
-
briefcase: "Briefcase",
|
|
1205
|
-
package: "Box",
|
|
1206
|
-
box: "Box",
|
|
1207
|
-
// Map / location
|
|
1208
|
-
map: "Map",
|
|
1209
|
-
"map-pin": "MapMarkerAlt",
|
|
1210
|
-
navigation: "LocationArrow",
|
|
1211
|
-
compass: "Compass",
|
|
1212
|
-
globe: "Globe",
|
|
1213
|
-
target: "Bullseye",
|
|
1214
|
-
// Media
|
|
1215
|
-
image: "Image",
|
|
1216
|
-
video: "Video",
|
|
1217
|
-
film: "Film",
|
|
1218
|
-
camera: "Camera",
|
|
1219
|
-
music: "Music",
|
|
1220
|
-
play: "Play",
|
|
1221
|
-
pause: "Pause",
|
|
1222
|
-
stop: "Stop",
|
|
1223
|
-
"skip-forward": "Forward",
|
|
1224
|
-
"skip-back": "Backward",
|
|
1225
|
-
volume: "VolumeUp",
|
|
1226
|
-
"volume-2": "VolumeUp",
|
|
1227
|
-
"volume-x": "VolumeMute",
|
|
1228
|
-
mic: "Microphone",
|
|
1229
|
-
"mic-off": "MicrophoneSlash",
|
|
1230
|
-
phone: "Phone",
|
|
1231
|
-
// Code / data
|
|
1232
|
-
code: "Code",
|
|
1233
|
-
terminal: "Terminal",
|
|
1234
|
-
database: "Database",
|
|
1235
|
-
server: "Server",
|
|
1236
|
-
cloud: "Cloud",
|
|
1237
|
-
wifi: "Wifi",
|
|
1238
|
-
// Security
|
|
1239
|
-
shield: "ShieldAlt",
|
|
1240
|
-
key: "Key",
|
|
1241
|
-
// Misc actions
|
|
1242
|
-
printer: "Print",
|
|
1243
|
-
save: "Save",
|
|
1244
|
-
link: "Link",
|
|
1245
|
-
unlink: "Unlink",
|
|
1246
|
-
paperclip: "Paperclip",
|
|
1247
|
-
flag: "Flag",
|
|
1248
|
-
tag: "Tag",
|
|
1249
|
-
tags: "Tags",
|
|
1250
|
-
zap: "Bolt",
|
|
1251
|
-
sparkles: "Magic",
|
|
1252
|
-
// Theme
|
|
1253
|
-
sun: "Sun",
|
|
1254
|
-
moon: "Moon",
|
|
1255
|
-
// Hierarchy (FA has no Tree icon for hierarchies; Sitemap is the org-chart icon)
|
|
1256
|
-
tree: "Sitemap",
|
|
1257
|
-
network: "NetworkWired"
|
|
1258
|
-
};
|
|
1259
|
-
warned = /* @__PURE__ */ new Set();
|
|
1260
640
|
}
|
|
1261
641
|
});
|
|
1262
642
|
function kebabToPascal2(name) {
|
|
@@ -1337,7 +717,7 @@ var init_Icon = __esm({
|
|
|
1337
717
|
const family = useIconFamily();
|
|
1338
718
|
const RenderedComponent = React83__namespace.default.useMemo(() => {
|
|
1339
719
|
if (directIcon) return null;
|
|
1340
|
-
return effectiveName ? resolveIconForFamily(effectiveName
|
|
720
|
+
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1341
721
|
}, [directIcon, effectiveName, family]);
|
|
1342
722
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
1343
723
|
const inlineStyle = {
|
|
@@ -1716,7 +1096,7 @@ var init_Button = __esm({
|
|
|
1716
1096
|
ref,
|
|
1717
1097
|
disabled: disabled || isLoading,
|
|
1718
1098
|
className: cn(
|
|
1719
|
-
"inline-flex items-center justify-center gap-2",
|
|
1099
|
+
"relative inline-flex items-center justify-center gap-2",
|
|
1720
1100
|
"font-medium",
|
|
1721
1101
|
"rounded-sm",
|
|
1722
1102
|
"cursor-pointer",
|
|
@@ -3484,6 +2864,7 @@ var init_Input = __esm({
|
|
|
3484
2864
|
icon: iconProp,
|
|
3485
2865
|
clearable,
|
|
3486
2866
|
onClear,
|
|
2867
|
+
action,
|
|
3487
2868
|
value,
|
|
3488
2869
|
options,
|
|
3489
2870
|
rows = 3,
|
|
@@ -3533,6 +2914,11 @@ var init_Input = __esm({
|
|
|
3533
2914
|
onClear?.();
|
|
3534
2915
|
}
|
|
3535
2916
|
};
|
|
2917
|
+
const handleKeyDown = (e) => {
|
|
2918
|
+
if (action && e.key === "Enter") {
|
|
2919
|
+
eventBus.emit(`UI:${action}`, { value: e.currentTarget.value });
|
|
2920
|
+
}
|
|
2921
|
+
};
|
|
3536
2922
|
const wrapField = (field) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
3537
2923
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
3538
2924
|
field,
|
|
@@ -3606,6 +2992,7 @@ var init_Input = __esm({
|
|
|
3606
2992
|
type,
|
|
3607
2993
|
value,
|
|
3608
2994
|
onChange: handleChange,
|
|
2995
|
+
onKeyDown: handleKeyDown,
|
|
3609
2996
|
className: baseClassName,
|
|
3610
2997
|
...props
|
|
3611
2998
|
}
|
|
@@ -4138,7 +3525,7 @@ var init_Card = __esm({
|
|
|
4138
3525
|
});
|
|
4139
3526
|
function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
4140
3527
|
const px = typeof size === "number" ? size : sizeMap[size];
|
|
4141
|
-
|
|
3528
|
+
useIconFamily();
|
|
4142
3529
|
if (assetUrl?.url) {
|
|
4143
3530
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4144
3531
|
AtlasImage,
|
|
@@ -4150,7 +3537,7 @@ function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
|
4150
3537
|
}
|
|
4151
3538
|
);
|
|
4152
3539
|
}
|
|
4153
|
-
const I = typeof icon === "string" ? resolveIconForFamily(icon
|
|
3540
|
+
const I = typeof icon === "string" ? resolveIconForFamily(icon) : icon;
|
|
4154
3541
|
return /* @__PURE__ */ jsxRuntime.jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
|
|
4155
3542
|
}
|
|
4156
3543
|
var sizeMap;
|
|
@@ -9199,9 +8586,9 @@ var init_webPainter2d = __esm({
|
|
|
9199
8586
|
// lib/drawable/projector.ts
|
|
9200
8587
|
function create2DProjector(opts) {
|
|
9201
8588
|
const { scale, baseOffsetX, layout } = opts;
|
|
9202
|
-
const tileWidth = TILE_WIDTH * scale;
|
|
9203
|
-
const floorHeight = FLOOR_HEIGHT * scale;
|
|
9204
|
-
const diamondTopY = (opts.diamondTopY ?? DIAMOND_TOP_Y) * scale;
|
|
8589
|
+
const tileWidth = layout === "free" ? 1 : TILE_WIDTH * scale;
|
|
8590
|
+
const floorHeight = layout === "free" ? 1 : FLOOR_HEIGHT * scale;
|
|
8591
|
+
const diamondTopY = layout === "free" ? 0 : (opts.diamondTopY ?? DIAMOND_TOP_Y) * scale;
|
|
9205
8592
|
const squareGrid = layout === "flat" || layout === "free";
|
|
9206
8593
|
const project = (pos) => layout === "free" ? { x: pos.x, y: pos.y } : isoToScreen(pos.x, pos.y, scale, baseOffsetX, layout);
|
|
9207
8594
|
const anchorPoint = (pos, anchor) => {
|
|
@@ -9242,6 +8629,15 @@ var init_projector = __esm({
|
|
|
9242
8629
|
}
|
|
9243
8630
|
});
|
|
9244
8631
|
|
|
8632
|
+
// lib/drawable/contract.ts
|
|
8633
|
+
function isValidScenePos(pos) {
|
|
8634
|
+
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
8635
|
+
}
|
|
8636
|
+
var init_contract = __esm({
|
|
8637
|
+
"lib/drawable/contract.ts"() {
|
|
8638
|
+
}
|
|
8639
|
+
});
|
|
8640
|
+
|
|
9245
8641
|
// components/game/atoms/DrawSprite.tsx
|
|
9246
8642
|
function DrawSprite(_props) {
|
|
9247
8643
|
return null;
|
|
@@ -9251,10 +8647,12 @@ var init_DrawSprite = __esm({
|
|
|
9251
8647
|
"components/game/atoms/DrawSprite.tsx"() {
|
|
9252
8648
|
"use client";
|
|
9253
8649
|
init_atlasSlice();
|
|
8650
|
+
init_contract();
|
|
9254
8651
|
paintSprite = (painter, node, dctx) => {
|
|
8652
|
+
if (!node.asset?.url || !isValidScenePos(node.position)) return;
|
|
9255
8653
|
const tex = painter.resolveTexture(node.asset.url);
|
|
9256
8654
|
if (!tex) return;
|
|
9257
|
-
let src = node.frame;
|
|
8655
|
+
let src = typeof node.frame === "object" ? node.frame : void 0;
|
|
9258
8656
|
if (!src && isAtlasAsset(node.asset)) {
|
|
9259
8657
|
const atlas = getAtlas(node.asset.atlas, dctx.invalidate);
|
|
9260
8658
|
if (!atlas) return;
|
|
@@ -9299,7 +8697,9 @@ var paintShape;
|
|
|
9299
8697
|
var init_DrawShape = __esm({
|
|
9300
8698
|
"components/game/atoms/DrawShape.tsx"() {
|
|
9301
8699
|
"use client";
|
|
8700
|
+
init_contract();
|
|
9302
8701
|
paintShape = (painter, node, dctx) => {
|
|
8702
|
+
if (!isValidScenePos(node.position)) return;
|
|
9303
8703
|
painter.save();
|
|
9304
8704
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9305
8705
|
switch (node.shape) {
|
|
@@ -9353,7 +8753,9 @@ var paintText;
|
|
|
9353
8753
|
var init_DrawText = __esm({
|
|
9354
8754
|
"components/game/atoms/DrawText.tsx"() {
|
|
9355
8755
|
"use client";
|
|
8756
|
+
init_contract();
|
|
9356
8757
|
paintText = (painter, node, dctx) => {
|
|
8758
|
+
if (!isValidScenePos(node.position)) return;
|
|
9357
8759
|
const p = dctx.projector.anchorPoint(node.position, node.anchor ?? "center");
|
|
9358
8760
|
const x = p.x + (node.offsetX ?? 0);
|
|
9359
8761
|
const y = p.y + (node.offsetY ?? 0);
|
|
@@ -9458,12 +8860,14 @@ function collectDrawnItems(nodes) {
|
|
|
9458
8860
|
case "draw-sprite":
|
|
9459
8861
|
case "draw-shape":
|
|
9460
8862
|
case "draw-text":
|
|
9461
|
-
out.push({ pos: n.position, id: n.id });
|
|
8863
|
+
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
9462
8864
|
break;
|
|
9463
8865
|
case "draw-sprite-layer":
|
|
9464
8866
|
case "draw-shape-layer":
|
|
9465
8867
|
case "draw-text-layer":
|
|
9466
|
-
for (const it of n.items)
|
|
8868
|
+
for (const it of n.items) {
|
|
8869
|
+
if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id });
|
|
8870
|
+
}
|
|
9467
8871
|
break;
|
|
9468
8872
|
}
|
|
9469
8873
|
}
|
|
@@ -9478,6 +8882,7 @@ function buildHitIndex(items) {
|
|
|
9478
8882
|
}
|
|
9479
8883
|
var init_hitTest = __esm({
|
|
9480
8884
|
"lib/drawable/hitTest.ts"() {
|
|
8885
|
+
init_contract();
|
|
9481
8886
|
}
|
|
9482
8887
|
});
|
|
9483
8888
|
function normalizeBackdrop(bg) {
|
|
@@ -12167,21 +11572,6 @@ var init_renderer = __esm({
|
|
|
12167
11572
|
init_slot_definitions();
|
|
12168
11573
|
}
|
|
12169
11574
|
});
|
|
12170
|
-
|
|
12171
|
-
// lib/wrapCallbackForEvent.ts
|
|
12172
|
-
function wrapCallbackForEvent(qualifiedEvent, callbackArgs, emit) {
|
|
12173
|
-
const argNames = (callbackArgs ?? []).map((a) => a.name);
|
|
12174
|
-
if (argNames.length === 0) {
|
|
12175
|
-
return () => emit(qualifiedEvent);
|
|
12176
|
-
}
|
|
12177
|
-
return (...args) => {
|
|
12178
|
-
const payload = {};
|
|
12179
|
-
for (let i = 0; i < argNames.length; i += 1) {
|
|
12180
|
-
payload[argNames[i]] = args[i];
|
|
12181
|
-
}
|
|
12182
|
-
emit(qualifiedEvent, payload);
|
|
12183
|
-
};
|
|
12184
|
-
}
|
|
12185
11575
|
var init_wrapCallbackForEvent = __esm({
|
|
12186
11576
|
"lib/wrapCallbackForEvent.ts"() {
|
|
12187
11577
|
}
|
|
@@ -23203,7 +22593,8 @@ function DataGrid({
|
|
|
23203
22593
|
const { t } = hooks.useTranslate();
|
|
23204
22594
|
const [selectedIds, setSelectedIds] = React83.useState(/* @__PURE__ */ new Set());
|
|
23205
22595
|
const [visibleCount, setVisibleCount] = React83.useState(pageSize || Infinity);
|
|
23206
|
-
const fieldDefs = fields ?? columns ?? [];
|
|
22596
|
+
const fieldDefs = (Array.isArray(fields) ? fields : void 0) ?? (Array.isArray(columns) ? columns : void 0) ?? [];
|
|
22597
|
+
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
23207
22598
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23208
22599
|
const dnd = useDataDnd({
|
|
23209
22600
|
items: allDataRaw,
|
|
@@ -23247,8 +22638,8 @@ function DataGrid({
|
|
|
23247
22638
|
const titleField = fieldDefs.find((f3) => f3.variant === "h3" || f3.variant === "h4") ?? fieldDefs[0];
|
|
23248
22639
|
const badgeFields = fieldDefs.filter((f3) => f3.variant === "badge" && f3 !== titleField);
|
|
23249
22640
|
const bodyFields = fieldDefs.filter((f3) => f3 !== titleField && !badgeFields.includes(f3));
|
|
23250
|
-
const primaryActions =
|
|
23251
|
-
const dangerActions =
|
|
22641
|
+
const primaryActions = actionDefs.filter((a) => a.variant !== "danger");
|
|
22642
|
+
const dangerActions = actionDefs.filter((a) => a.variant === "danger");
|
|
23252
22643
|
const handleActionClick = (action, itemData) => (e) => {
|
|
23253
22644
|
e.stopPropagation();
|
|
23254
22645
|
const payload = {
|
|
@@ -35980,7 +35371,7 @@ function measureLabelWidth(text) {
|
|
|
35980
35371
|
if (typeof document === "undefined") return text.length * 6;
|
|
35981
35372
|
if (!labelMeasureCtx) labelMeasureCtx = document.createElement("canvas").getContext("2d");
|
|
35982
35373
|
if (!labelMeasureCtx) return text.length * 6;
|
|
35983
|
-
labelMeasureCtx.font = "
|
|
35374
|
+
labelMeasureCtx.font = "12px system-ui";
|
|
35984
35375
|
return labelMeasureCtx.measureText(text).width;
|
|
35985
35376
|
}
|
|
35986
35377
|
function getGroupColor(group, groups) {
|
|
@@ -36026,6 +35417,7 @@ var init_GraphCanvas = __esm({
|
|
|
36026
35417
|
actions,
|
|
36027
35418
|
onNodeClick,
|
|
36028
35419
|
onNodeDoubleClick,
|
|
35420
|
+
onBadgeClick,
|
|
36029
35421
|
nodeClickEvent,
|
|
36030
35422
|
selectedNodeId,
|
|
36031
35423
|
repulsion = 800,
|
|
@@ -36143,7 +35535,7 @@ var init_GraphCanvas = __esm({
|
|
|
36143
35535
|
nodesRef.current = simNodes;
|
|
36144
35536
|
if (layout === "force") {
|
|
36145
35537
|
let iterations = 0;
|
|
36146
|
-
const maxIterations =
|
|
35538
|
+
const maxIterations = 300;
|
|
36147
35539
|
const tick = () => {
|
|
36148
35540
|
const nodes = nodesRef.current;
|
|
36149
35541
|
const centerX = w / 2;
|
|
@@ -36173,7 +35565,9 @@ var init_GraphCanvas = __esm({
|
|
|
36173
35565
|
const dx = target.x - source.x;
|
|
36174
35566
|
const dy = target.y - source.y;
|
|
36175
35567
|
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
36176
|
-
const
|
|
35568
|
+
const w2 = Math.min(1, Math.max(0, edge.weight ?? 1));
|
|
35569
|
+
const linkTarget = linkDistance * (0.5 + (1 - w2) * 1.5);
|
|
35570
|
+
const force = (dist - linkTarget) * (0.04 + 0.1 * w2);
|
|
36177
35571
|
const fx = dx / dist * force;
|
|
36178
35572
|
const fy = dy / dist * force;
|
|
36179
35573
|
source.fx += fx;
|
|
@@ -36181,9 +35575,27 @@ var init_GraphCanvas = __esm({
|
|
|
36181
35575
|
target.fx -= fx;
|
|
36182
35576
|
target.fy -= fy;
|
|
36183
35577
|
}
|
|
35578
|
+
const centroids = /* @__PURE__ */ new Map();
|
|
36184
35579
|
for (const node of nodes) {
|
|
36185
|
-
|
|
36186
|
-
|
|
35580
|
+
const g = node.group ?? "__none__";
|
|
35581
|
+
let c = centroids.get(g);
|
|
35582
|
+
if (!c) {
|
|
35583
|
+
c = { x: 0, y: 0, n: 0 };
|
|
35584
|
+
centroids.set(g, c);
|
|
35585
|
+
}
|
|
35586
|
+
c.x += node.x;
|
|
35587
|
+
c.y += node.y;
|
|
35588
|
+
c.n += 1;
|
|
35589
|
+
}
|
|
35590
|
+
for (const node of nodes) {
|
|
35591
|
+
const c = centroids.get(node.group ?? "__none__");
|
|
35592
|
+
if (c && c.n > 1) {
|
|
35593
|
+
node.fx += (c.x / c.n - node.x) * 0.04;
|
|
35594
|
+
node.fy += (c.y / c.n - node.y) * 0.04;
|
|
35595
|
+
} else {
|
|
35596
|
+
node.fx += (centerX - node.x) * 0.01;
|
|
35597
|
+
node.fy += (centerY - node.y) * 0.01;
|
|
35598
|
+
}
|
|
36187
35599
|
}
|
|
36188
35600
|
const damping = 0.9;
|
|
36189
35601
|
for (const node of nodes) {
|
|
@@ -36195,7 +35607,7 @@ var init_GraphCanvas = __esm({
|
|
|
36195
35607
|
node.y = Math.max(30, Math.min(h - 30, node.y));
|
|
36196
35608
|
}
|
|
36197
35609
|
const LABEL_GAP = 12;
|
|
36198
|
-
const LABEL_H =
|
|
35610
|
+
const LABEL_H = 16;
|
|
36199
35611
|
const pad = nodeSpacing / 2;
|
|
36200
35612
|
for (let i = 0; i < nodes.length; i++) {
|
|
36201
35613
|
for (let j = i + 1; j < nodes.length; j++) {
|
|
@@ -36250,6 +35662,11 @@ var init_GraphCanvas = __esm({
|
|
|
36250
35662
|
const h = height;
|
|
36251
35663
|
const nodes = nodesRef.current;
|
|
36252
35664
|
const accentColor = resolveColor3("var(--color-accent)", canvas);
|
|
35665
|
+
const fontFamily = resolveColor3("var(--font-family)", canvas) || "system-ui";
|
|
35666
|
+
const fgColor = resolveColor3("var(--color-foreground)", canvas);
|
|
35667
|
+
const mutedColor = resolveColor3("var(--color-muted-foreground)", canvas) || fgColor;
|
|
35668
|
+
const bgColor = resolveColor3("var(--color-background)", canvas) || "#ffffff";
|
|
35669
|
+
const accentFg = resolveColor3("var(--color-accent-foreground)", canvas) || "#ffffff";
|
|
36253
35670
|
const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
|
|
36254
35671
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
36255
35672
|
ctx.clearRect(0, 0, w, h);
|
|
@@ -36269,19 +35686,21 @@ var init_GraphCanvas = __esm({
|
|
|
36269
35686
|
const target = nodes.find((n) => n.id === edge.target);
|
|
36270
35687
|
if (!source || !target) continue;
|
|
36271
35688
|
const incident = !!hoveredNode && (edge.source === hoveredNode || edge.target === hoveredNode);
|
|
36272
|
-
|
|
35689
|
+
const w2 = edge.weight ?? 1;
|
|
35690
|
+
ctx.globalAlpha = hoveredNode ? incident ? 1 : 0.05 : linkOpacity * w2;
|
|
36273
35691
|
ctx.beginPath();
|
|
36274
35692
|
ctx.moveTo(source.x, source.y);
|
|
36275
35693
|
ctx.lineTo(target.x, target.y);
|
|
36276
35694
|
ctx.strokeStyle = incident ? accentColor : edge.color || "#888888";
|
|
36277
|
-
ctx.lineWidth = incident ? 2 :
|
|
35695
|
+
ctx.lineWidth = incident ? 2 : Math.max(0.75, w2);
|
|
36278
35696
|
ctx.stroke();
|
|
36279
35697
|
if (edge.label && showLabels) {
|
|
36280
35698
|
const mx = (source.x + target.x) / 2;
|
|
36281
35699
|
const my = (source.y + target.y) / 2;
|
|
36282
|
-
ctx.fillStyle =
|
|
36283
|
-
ctx.font =
|
|
35700
|
+
ctx.fillStyle = mutedColor;
|
|
35701
|
+
ctx.font = `9px ${fontFamily}`;
|
|
36284
35702
|
ctx.textAlign = "center";
|
|
35703
|
+
ctx.textBaseline = "alphabetic";
|
|
36285
35704
|
ctx.fillText(edge.label, mx, my - 4);
|
|
36286
35705
|
}
|
|
36287
35706
|
}
|
|
@@ -36306,10 +35725,33 @@ var init_GraphCanvas = __esm({
|
|
|
36306
35725
|
}
|
|
36307
35726
|
ctx.stroke();
|
|
36308
35727
|
if (showLabels && node.label) {
|
|
36309
|
-
ctx.
|
|
36310
|
-
ctx.font = `${isSelected || isHovered ? "bold " : ""}10px system-ui`;
|
|
35728
|
+
ctx.font = `${isSelected || isHovered ? "600" : "500"} 12px ${fontFamily}`;
|
|
36311
35729
|
ctx.textAlign = "center";
|
|
36312
|
-
ctx.
|
|
35730
|
+
ctx.textBaseline = "middle";
|
|
35731
|
+
const ly = node.y + radius + 14;
|
|
35732
|
+
ctx.lineWidth = 3;
|
|
35733
|
+
ctx.lineJoin = "round";
|
|
35734
|
+
ctx.strokeStyle = bgColor;
|
|
35735
|
+
ctx.strokeText(node.label, node.x, ly);
|
|
35736
|
+
ctx.fillStyle = isSelected || isHovered ? fgColor : mutedColor;
|
|
35737
|
+
ctx.fillText(node.label, node.x, ly);
|
|
35738
|
+
}
|
|
35739
|
+
if (node.badge && node.badge > 1) {
|
|
35740
|
+
const bx = node.x + radius * 0.7;
|
|
35741
|
+
const by = node.y - radius * 0.7;
|
|
35742
|
+
const br = Math.max(7, Math.min(11, radius * 0.45));
|
|
35743
|
+
ctx.beginPath();
|
|
35744
|
+
ctx.arc(bx, by, br, 0, Math.PI * 2);
|
|
35745
|
+
ctx.fillStyle = accentColor;
|
|
35746
|
+
ctx.fill();
|
|
35747
|
+
ctx.strokeStyle = bgColor;
|
|
35748
|
+
ctx.lineWidth = 2;
|
|
35749
|
+
ctx.stroke();
|
|
35750
|
+
ctx.fillStyle = accentFg;
|
|
35751
|
+
ctx.font = `600 9px ${fontFamily}`;
|
|
35752
|
+
ctx.textAlign = "center";
|
|
35753
|
+
ctx.textBaseline = "middle";
|
|
35754
|
+
ctx.fillText(String(node.badge), bx, by + 0.5);
|
|
36313
35755
|
}
|
|
36314
35756
|
}
|
|
36315
35757
|
ctx.restore();
|
|
@@ -36402,11 +35844,21 @@ var init_GraphCanvas = __esm({
|
|
|
36402
35844
|
if (!coords) return;
|
|
36403
35845
|
const node = nodeAt(coords.graphX, coords.graphY);
|
|
36404
35846
|
if (node) {
|
|
35847
|
+
if (node.badge && node.badge > 1 && onBadgeClick) {
|
|
35848
|
+
const r = (node.size || 8) + (selectedNodeId === node.id ? 4 : 0);
|
|
35849
|
+
const bx = node.x + r * 0.7;
|
|
35850
|
+
const by = node.y - r * 0.7;
|
|
35851
|
+
const br = Math.max(7, Math.min(11, r * 0.45)) + 3;
|
|
35852
|
+
if (Math.hypot(coords.graphX - bx, coords.graphY - by) <= br) {
|
|
35853
|
+
onBadgeClick(node);
|
|
35854
|
+
return;
|
|
35855
|
+
}
|
|
35856
|
+
}
|
|
36405
35857
|
handleNodeClick(node);
|
|
36406
35858
|
}
|
|
36407
35859
|
}
|
|
36408
35860
|
},
|
|
36409
|
-
[toCoords, nodeAt, handleNodeClick]
|
|
35861
|
+
[toCoords, nodeAt, handleNodeClick, onBadgeClick, selectedNodeId]
|
|
36410
35862
|
);
|
|
36411
35863
|
const handlePointerLeave = React83.useCallback(() => {
|
|
36412
35864
|
setHoveredNode(null);
|
|
@@ -44376,7 +43828,7 @@ function SlotContentRenderer({
|
|
|
44376
43828
|
if (typeof propValue !== "string") continue;
|
|
44377
43829
|
const propDef = propsSchema[propKey];
|
|
44378
43830
|
if (!propDef || propDef.kind !== "callback") continue;
|
|
44379
|
-
renderedProps[propKey] = wrapCallbackForEvent(
|
|
43831
|
+
renderedProps[propKey] = ui.wrapCallbackForEvent(
|
|
44380
43832
|
`UI:${propValue}`,
|
|
44381
43833
|
propDef.callbackArgs,
|
|
44382
43834
|
(eventKey, payload) => eventBus.emit(eventKey, payload)
|