@almadar/ui 4.57.5 → 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 +2499 -1903
- package/dist/avl/index.js +1111 -518
- package/dist/components/atoms/Icon.d.ts +7 -4
- package/dist/components/index.cjs +2064 -1636
- package/dist/components/index.js +905 -480
- 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/context/index.cjs +199 -0
- package/dist/context/index.js +199 -0
- package/dist/context/themeTokens.d.ts +1 -1
- package/dist/docs/index.cjs +456 -98
- package/dist/docs/index.d.cts +7 -4
- package/dist/docs/index.js +429 -74
- package/dist/lib/iconFamily.d.ts +41 -0
- package/dist/marketing/index.cjs +480 -124
- package/dist/marketing/index.d.cts +7 -4
- package/dist/marketing/index.js +446 -93
- package/dist/providers/index.cjs +1933 -1505
- package/dist/providers/index.js +909 -484
- package/dist/runtime/index.cjs +2130 -1534
- package/dist/runtime/index.js +1071 -478
- package/package.json +5 -2
- package/tailwind-preset.cjs +118 -3
- package/themes/_contract.md +198 -0
- package/themes/almadar-website.css +212 -0
- package/themes/almadar.css +210 -0
- package/themes/arctic.css +210 -0
- package/themes/atelier.css +427 -0
- package/themes/copper.css +210 -0
- package/themes/ember.css +210 -0
- package/themes/forest.css +210 -0
- package/themes/gazette.css +411 -0
- package/themes/index.css +12 -0
- package/themes/kiosk.css +412 -0
- package/themes/lavender.css +210 -0
- package/themes/midnight.css +210 -0
- package/themes/minimalist.css +210 -0
- package/themes/neon.css +210 -0
- package/themes/ocean.css +210 -0
- package/themes/prism.css +406 -0
- package/themes/rose.css +210 -0
- package/themes/sand.css +210 -0
- package/themes/slate.css +210 -0
- package/themes/sunset.css +210 -0
- package/themes/terminal.css +422 -0
- package/themes/trait-wars.css +210 -0
- package/themes/wireframe.css +216 -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';
|
|
@@ -195,6 +198,37 @@ var init_ThemeContext = __esm({
|
|
|
195
198
|
displayName: "Copper",
|
|
196
199
|
hasLightMode: true,
|
|
197
200
|
hasDarkMode: true
|
|
201
|
+
},
|
|
202
|
+
// Layer 1 skin axes — truly-unique themes (compact tech / editorial / brutalist dense / display-heavy / touch-first)
|
|
203
|
+
{
|
|
204
|
+
name: "prism",
|
|
205
|
+
displayName: "Prism",
|
|
206
|
+
hasLightMode: true,
|
|
207
|
+
hasDarkMode: true
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "gazette",
|
|
211
|
+
displayName: "Gazette",
|
|
212
|
+
hasLightMode: true,
|
|
213
|
+
hasDarkMode: true
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: "terminal",
|
|
217
|
+
displayName: "Terminal",
|
|
218
|
+
hasLightMode: true,
|
|
219
|
+
hasDarkMode: true
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "atelier",
|
|
223
|
+
displayName: "Atelier",
|
|
224
|
+
hasLightMode: true,
|
|
225
|
+
hasDarkMode: true
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "kiosk",
|
|
229
|
+
displayName: "Kiosk",
|
|
230
|
+
hasLightMode: true,
|
|
231
|
+
hasDarkMode: true
|
|
198
232
|
}
|
|
199
233
|
];
|
|
200
234
|
ThemeContext = createContext(void 0);
|
|
@@ -604,7 +638,7 @@ var init_Box = __esm({
|
|
|
604
638
|
fixed: "fixed",
|
|
605
639
|
sticky: "sticky"
|
|
606
640
|
};
|
|
607
|
-
Box =
|
|
641
|
+
Box = React86__default.forwardRef(
|
|
608
642
|
({
|
|
609
643
|
padding,
|
|
610
644
|
paddingX,
|
|
@@ -654,7 +688,7 @@ var init_Box = __esm({
|
|
|
654
688
|
onMouseLeave?.(e);
|
|
655
689
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
656
690
|
const isClickable = action || onClick;
|
|
657
|
-
return
|
|
691
|
+
return React86__default.createElement(
|
|
658
692
|
Component,
|
|
659
693
|
{
|
|
660
694
|
ref,
|
|
@@ -690,12 +724,378 @@ var init_Box = __esm({
|
|
|
690
724
|
Box.displayName = "Box";
|
|
691
725
|
}
|
|
692
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
|
+
}
|
|
693
771
|
function kebabToPascal(name) {
|
|
694
772
|
return name.split("-").map((part) => {
|
|
695
773
|
if (/^\d+$/.test(part)) return part;
|
|
696
774
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
697
775
|
}).join("");
|
|
698
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
|
+
}
|
|
699
1099
|
function resolveIcon(name) {
|
|
700
1100
|
const cached = resolvedCache.get(name);
|
|
701
1101
|
if (cached) return cached;
|
|
@@ -705,28 +1105,30 @@ function resolveIcon(name) {
|
|
|
705
1105
|
}
|
|
706
1106
|
function doResolve(name) {
|
|
707
1107
|
if (iconAliases[name]) return iconAliases[name];
|
|
708
|
-
const pascalName =
|
|
709
|
-
const directLookup =
|
|
1108
|
+
const pascalName = kebabToPascal2(name);
|
|
1109
|
+
const directLookup = LucideIcons2[pascalName];
|
|
710
1110
|
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
711
|
-
const asIs =
|
|
1111
|
+
const asIs = LucideIcons2[name];
|
|
712
1112
|
if (asIs && typeof asIs === "object") return asIs;
|
|
713
|
-
return
|
|
1113
|
+
return LucideIcons2.HelpCircle;
|
|
714
1114
|
}
|
|
715
1115
|
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
716
1116
|
var init_Icon = __esm({
|
|
717
1117
|
"components/atoms/Icon.tsx"() {
|
|
1118
|
+
"use client";
|
|
718
1119
|
init_cn();
|
|
1120
|
+
init_iconFamily();
|
|
719
1121
|
iconAliases = {
|
|
720
|
-
"close":
|
|
721
|
-
"trash":
|
|
722
|
-
"loader":
|
|
723
|
-
"stop":
|
|
724
|
-
"volume":
|
|
725
|
-
"volume-off":
|
|
726
|
-
"refresh":
|
|
727
|
-
"share":
|
|
728
|
-
"sort-asc":
|
|
729
|
-
"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
|
|
730
1132
|
};
|
|
731
1133
|
resolvedCache = /* @__PURE__ */ new Map();
|
|
732
1134
|
sizeClasses = {
|
|
@@ -751,22 +1153,50 @@ var init_Icon = __esm({
|
|
|
751
1153
|
strokeWidth,
|
|
752
1154
|
style
|
|
753
1155
|
}) => {
|
|
754
|
-
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]);
|
|
755
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;
|
|
756
1194
|
return /* @__PURE__ */ jsx(
|
|
757
|
-
|
|
1195
|
+
Fallback,
|
|
758
1196
|
{
|
|
759
|
-
className:
|
|
760
|
-
sizeClasses[size],
|
|
761
|
-
animationClasses[animation],
|
|
762
|
-
color ? color : "text-current",
|
|
763
|
-
className
|
|
764
|
-
),
|
|
1197
|
+
className: composedClassName,
|
|
765
1198
|
strokeWidth: effectiveStrokeWidth,
|
|
766
|
-
style:
|
|
767
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
768
|
-
...style
|
|
769
|
-
}
|
|
1199
|
+
style: inlineStyle
|
|
770
1200
|
}
|
|
771
1201
|
);
|
|
772
1202
|
};
|
|
@@ -776,14 +1206,13 @@ var init_Icon = __esm({
|
|
|
776
1206
|
function resolveIconProp(value, sizeClass) {
|
|
777
1207
|
if (!value) return null;
|
|
778
1208
|
if (typeof value === "string") {
|
|
779
|
-
|
|
780
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
1209
|
+
return /* @__PURE__ */ jsx(Icon, { name: value, className: sizeClass });
|
|
781
1210
|
}
|
|
782
1211
|
if (typeof value === "function") {
|
|
783
1212
|
const IconComp = value;
|
|
784
1213
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
785
1214
|
}
|
|
786
|
-
if (
|
|
1215
|
+
if (React86__default.isValidElement(value)) {
|
|
787
1216
|
return value;
|
|
788
1217
|
}
|
|
789
1218
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -856,10 +1285,10 @@ var init_Button = __esm({
|
|
|
856
1285
|
};
|
|
857
1286
|
iconSizeStyles = {
|
|
858
1287
|
sm: "h-3.5 w-3.5",
|
|
859
|
-
md: "h-
|
|
1288
|
+
md: "h-icon-default w-icon-default",
|
|
860
1289
|
lg: "h-5 w-5"
|
|
861
1290
|
};
|
|
862
|
-
Button =
|
|
1291
|
+
Button = React86__default.forwardRef(
|
|
863
1292
|
({
|
|
864
1293
|
className,
|
|
865
1294
|
variant = "primary",
|
|
@@ -909,7 +1338,7 @@ var init_Button = __esm({
|
|
|
909
1338
|
...props,
|
|
910
1339
|
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
911
1340
|
children: [
|
|
912
|
-
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-
|
|
1341
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
913
1342
|
children || label,
|
|
914
1343
|
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
915
1344
|
]
|
|
@@ -924,7 +1353,7 @@ var Dialog;
|
|
|
924
1353
|
var init_Dialog = __esm({
|
|
925
1354
|
"components/atoms/Dialog.tsx"() {
|
|
926
1355
|
init_cn();
|
|
927
|
-
Dialog =
|
|
1356
|
+
Dialog = React86__default.forwardRef(
|
|
928
1357
|
({
|
|
929
1358
|
role = "dialog",
|
|
930
1359
|
"aria-modal": ariaModal = true,
|
|
@@ -1259,7 +1688,7 @@ var init_Modal = __esm({
|
|
|
1259
1688
|
// Reset browser-default dialog chrome — we own styling.
|
|
1260
1689
|
"m-0 p-0 border-0 bg-transparent",
|
|
1261
1690
|
// Pre-existing dialog frame
|
|
1262
|
-
"pointer-events-auto w-full flex flex-col bg-surface border shadow-
|
|
1691
|
+
"pointer-events-auto w-full flex flex-col bg-surface border shadow-elevation-dialog rounded-container",
|
|
1263
1692
|
// Desktop sizing + viewport-aware floor.
|
|
1264
1693
|
sizeClasses2[size],
|
|
1265
1694
|
minWidthClasses[size],
|
|
@@ -1319,7 +1748,7 @@ var init_Modal = __esm({
|
|
|
1319
1748
|
{
|
|
1320
1749
|
variant: "ghost",
|
|
1321
1750
|
size: "sm",
|
|
1322
|
-
icon:
|
|
1751
|
+
icon: "x",
|
|
1323
1752
|
onClick: handleClose,
|
|
1324
1753
|
"data-event": "CLOSE",
|
|
1325
1754
|
"aria-label": "Close modal"
|
|
@@ -1476,7 +1905,7 @@ var init_Drawer = __esm({
|
|
|
1476
1905
|
{
|
|
1477
1906
|
variant: "ghost",
|
|
1478
1907
|
size: "sm",
|
|
1479
|
-
icon:
|
|
1908
|
+
icon: "x",
|
|
1480
1909
|
onClick: handleClose,
|
|
1481
1910
|
"aria-label": "Close drawer",
|
|
1482
1911
|
className: cn(!title && "ml-auto")
|
|
@@ -1570,13 +1999,10 @@ var init_Badge = __esm({
|
|
|
1570
1999
|
md: "px-2.5 py-1 text-sm",
|
|
1571
2000
|
lg: "px-3 py-1.5 text-base"
|
|
1572
2001
|
};
|
|
1573
|
-
Badge =
|
|
2002
|
+
Badge = React86__default.forwardRef(
|
|
1574
2003
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1575
2004
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1576
|
-
const resolvedIcon = typeof icon === "string" ? (
|
|
1577
|
-
const I = resolveIcon(icon);
|
|
1578
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes3[size] }) : null;
|
|
1579
|
-
})() : icon;
|
|
2005
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes3[size] }) : icon;
|
|
1580
2006
|
return /* @__PURE__ */ jsxs(
|
|
1581
2007
|
"span",
|
|
1582
2008
|
{
|
|
@@ -1636,10 +2062,10 @@ var init_Toast = __esm({
|
|
|
1636
2062
|
warning: "bg-card border-[length:var(--border-width)] border-warning"
|
|
1637
2063
|
};
|
|
1638
2064
|
iconMap = {
|
|
1639
|
-
success:
|
|
1640
|
-
error:
|
|
1641
|
-
info:
|
|
1642
|
-
warning:
|
|
2065
|
+
success: "check-circle",
|
|
2066
|
+
error: "alert-circle",
|
|
2067
|
+
info: "info",
|
|
2068
|
+
warning: "alert-triangle"
|
|
1643
2069
|
};
|
|
1644
2070
|
iconColors = {
|
|
1645
2071
|
success: "text-success",
|
|
@@ -1686,7 +2112,7 @@ var init_Toast = __esm({
|
|
|
1686
2112
|
// `min-w-[300px]` only kicks in at `sm:` and above so a phone
|
|
1687
2113
|
// viewport doesn't get a toast wider than the screen near the
|
|
1688
2114
|
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
1689
|
-
"border-l-4 p-4 shadow min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
2115
|
+
"border-l-4 p-4 shadow-elevation-toast min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
1690
2116
|
"rounded-sm",
|
|
1691
2117
|
variantClasses[variant],
|
|
1692
2118
|
className
|
|
@@ -1696,7 +2122,7 @@ var init_Toast = __esm({
|
|
|
1696
2122
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
1697
2123
|
Icon,
|
|
1698
2124
|
{
|
|
1699
|
-
|
|
2125
|
+
name: iconMap[variant],
|
|
1700
2126
|
size: "md",
|
|
1701
2127
|
className: iconColors[variant]
|
|
1702
2128
|
}
|
|
@@ -1713,7 +2139,7 @@ var init_Toast = __esm({
|
|
|
1713
2139
|
{
|
|
1714
2140
|
variant: "ghost",
|
|
1715
2141
|
size: "sm",
|
|
1716
|
-
icon:
|
|
2142
|
+
icon: "x",
|
|
1717
2143
|
onClick: handleDismiss,
|
|
1718
2144
|
"aria-label": "Dismiss toast",
|
|
1719
2145
|
className: "flex-shrink-0"
|
|
@@ -1884,7 +2310,7 @@ var init_SvgFlow = __esm({
|
|
|
1884
2310
|
opacity = 1,
|
|
1885
2311
|
className
|
|
1886
2312
|
}) => {
|
|
1887
|
-
const markerId =
|
|
2313
|
+
const markerId = React86__default.useMemo(() => {
|
|
1888
2314
|
flowIdCounter += 1;
|
|
1889
2315
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
1890
2316
|
}, []);
|
|
@@ -2427,7 +2853,7 @@ var init_SvgRing = __esm({
|
|
|
2427
2853
|
className,
|
|
2428
2854
|
label
|
|
2429
2855
|
}) => {
|
|
2430
|
-
const gradientId =
|
|
2856
|
+
const gradientId = React86__default.useMemo(() => {
|
|
2431
2857
|
ringIdCounter += 1;
|
|
2432
2858
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2433
2859
|
}, []);
|
|
@@ -2588,7 +3014,8 @@ var Input;
|
|
|
2588
3014
|
var init_Input = __esm({
|
|
2589
3015
|
"components/atoms/Input.tsx"() {
|
|
2590
3016
|
init_cn();
|
|
2591
|
-
|
|
3017
|
+
init_Icon();
|
|
3018
|
+
Input = React86__default.forwardRef(
|
|
2592
3019
|
({
|
|
2593
3020
|
className,
|
|
2594
3021
|
inputType,
|
|
@@ -2606,7 +3033,7 @@ var init_Input = __esm({
|
|
|
2606
3033
|
...props
|
|
2607
3034
|
}, ref) => {
|
|
2608
3035
|
const type = inputType || htmlType || "text";
|
|
2609
|
-
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "h-
|
|
3036
|
+
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
2610
3037
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
2611
3038
|
const baseClassName = cn(
|
|
2612
3039
|
"block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
|
|
@@ -2638,7 +3065,7 @@ var init_Input = __esm({
|
|
|
2638
3065
|
]
|
|
2639
3066
|
}
|
|
2640
3067
|
),
|
|
2641
|
-
/* @__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" }) })
|
|
2642
3069
|
] });
|
|
2643
3070
|
}
|
|
2644
3071
|
if (type === "textarea") {
|
|
@@ -2692,7 +3119,7 @@ var init_Input = __esm({
|
|
|
2692
3119
|
type: "button",
|
|
2693
3120
|
onClick: onClear,
|
|
2694
3121
|
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
2695
|
-
children: /* @__PURE__ */ jsx(
|
|
3122
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
2696
3123
|
}
|
|
2697
3124
|
),
|
|
2698
3125
|
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
@@ -2706,7 +3133,7 @@ var Label;
|
|
|
2706
3133
|
var init_Label = __esm({
|
|
2707
3134
|
"components/atoms/Label.tsx"() {
|
|
2708
3135
|
init_cn();
|
|
2709
|
-
Label =
|
|
3136
|
+
Label = React86__default.forwardRef(
|
|
2710
3137
|
({ className, required, children, ...props }, ref) => {
|
|
2711
3138
|
return /* @__PURE__ */ jsxs(
|
|
2712
3139
|
"label",
|
|
@@ -2732,7 +3159,7 @@ var Textarea;
|
|
|
2732
3159
|
var init_Textarea = __esm({
|
|
2733
3160
|
"components/atoms/Textarea.tsx"() {
|
|
2734
3161
|
init_cn();
|
|
2735
|
-
Textarea =
|
|
3162
|
+
Textarea = React86__default.forwardRef(
|
|
2736
3163
|
({ className, error, ...props }, ref) => {
|
|
2737
3164
|
return /* @__PURE__ */ jsx(
|
|
2738
3165
|
"textarea",
|
|
@@ -2761,7 +3188,8 @@ var Select;
|
|
|
2761
3188
|
var init_Select = __esm({
|
|
2762
3189
|
"components/atoms/Select.tsx"() {
|
|
2763
3190
|
init_cn();
|
|
2764
|
-
|
|
3191
|
+
init_Icon();
|
|
3192
|
+
Select = React86__default.forwardRef(
|
|
2765
3193
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2766
3194
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2767
3195
|
/* @__PURE__ */ jsxs(
|
|
@@ -2792,7 +3220,7 @@ var init_Select = __esm({
|
|
|
2792
3220
|
]
|
|
2793
3221
|
}
|
|
2794
3222
|
),
|
|
2795
|
-
/* @__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" }) })
|
|
2796
3224
|
] });
|
|
2797
3225
|
}
|
|
2798
3226
|
);
|
|
@@ -2803,7 +3231,7 @@ var Checkbox;
|
|
|
2803
3231
|
var init_Checkbox = __esm({
|
|
2804
3232
|
"components/atoms/Checkbox.tsx"() {
|
|
2805
3233
|
init_cn();
|
|
2806
|
-
Checkbox =
|
|
3234
|
+
Checkbox = React86__default.forwardRef(
|
|
2807
3235
|
({ className, label, id, ...props }, ref) => {
|
|
2808
3236
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2809
3237
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2845,23 +3273,23 @@ var init_Card = __esm({
|
|
|
2845
3273
|
default: [
|
|
2846
3274
|
"bg-card",
|
|
2847
3275
|
"border-[length:var(--border-width)] border-border",
|
|
2848
|
-
"shadow-
|
|
3276
|
+
"shadow-elevation-card",
|
|
2849
3277
|
"transition-all duration-[var(--transition-normal)]",
|
|
2850
|
-
"hover:shadow-
|
|
3278
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
2851
3279
|
].join(" "),
|
|
2852
3280
|
bordered: [
|
|
2853
3281
|
"bg-card",
|
|
2854
3282
|
"border-[length:var(--border-width)] border-border",
|
|
2855
|
-
"shadow-
|
|
3283
|
+
"shadow-elevation-card",
|
|
2856
3284
|
"transition-all duration-[var(--transition-normal)]",
|
|
2857
|
-
"hover:shadow-
|
|
3285
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
2858
3286
|
].join(" "),
|
|
2859
3287
|
elevated: [
|
|
2860
3288
|
"bg-card",
|
|
2861
3289
|
"border-[length:var(--border-width)] border-border",
|
|
2862
3290
|
"shadow",
|
|
2863
3291
|
"transition-all duration-[var(--transition-normal)]",
|
|
2864
|
-
"hover:shadow-
|
|
3292
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
2865
3293
|
].join(" "),
|
|
2866
3294
|
// Interactive variant with theme-specific hover effects
|
|
2867
3295
|
interactive: [
|
|
@@ -2870,22 +3298,22 @@ var init_Card = __esm({
|
|
|
2870
3298
|
"shadow",
|
|
2871
3299
|
"cursor-pointer",
|
|
2872
3300
|
"transition-all duration-[var(--transition-normal)]",
|
|
2873
|
-
"hover:shadow-
|
|
3301
|
+
"hover:shadow-elevation-dialog"
|
|
2874
3302
|
].join(" ")
|
|
2875
3303
|
};
|
|
2876
3304
|
paddingStyles2 = {
|
|
2877
3305
|
none: "",
|
|
2878
|
-
sm: "p-
|
|
2879
|
-
md: "p-
|
|
2880
|
-
lg: "p-
|
|
3306
|
+
sm: "p-card-sm",
|
|
3307
|
+
md: "p-card-md",
|
|
3308
|
+
lg: "p-card-lg"
|
|
2881
3309
|
};
|
|
2882
3310
|
shadowStyles2 = {
|
|
2883
3311
|
none: "shadow-none",
|
|
2884
|
-
sm: "shadow-
|
|
3312
|
+
sm: "shadow-elevation-card",
|
|
2885
3313
|
md: "shadow",
|
|
2886
|
-
lg: "shadow-
|
|
3314
|
+
lg: "shadow-elevation-dialog"
|
|
2887
3315
|
};
|
|
2888
|
-
Card =
|
|
3316
|
+
Card = React86__default.forwardRef(
|
|
2889
3317
|
({
|
|
2890
3318
|
className,
|
|
2891
3319
|
variant = "bordered",
|
|
@@ -2901,7 +3329,7 @@ var init_Card = __esm({
|
|
|
2901
3329
|
{
|
|
2902
3330
|
ref,
|
|
2903
3331
|
className: cn(
|
|
2904
|
-
"rounded-
|
|
3332
|
+
"rounded-container",
|
|
2905
3333
|
"transition-all duration-[var(--transition-normal)]",
|
|
2906
3334
|
variantStyles4[variant],
|
|
2907
3335
|
paddingStyles2[padding],
|
|
@@ -2921,9 +3349,9 @@ var init_Card = __esm({
|
|
|
2921
3349
|
}
|
|
2922
3350
|
);
|
|
2923
3351
|
Card.displayName = "Card";
|
|
2924
|
-
CardHeader =
|
|
3352
|
+
CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2925
3353
|
CardHeader.displayName = "CardHeader";
|
|
2926
|
-
CardTitle =
|
|
3354
|
+
CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2927
3355
|
"h3",
|
|
2928
3356
|
{
|
|
2929
3357
|
ref,
|
|
@@ -2936,11 +3364,11 @@ var init_Card = __esm({
|
|
|
2936
3364
|
}
|
|
2937
3365
|
));
|
|
2938
3366
|
CardTitle.displayName = "CardTitle";
|
|
2939
|
-
CardContent =
|
|
3367
|
+
CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2940
3368
|
CardContent.displayName = "CardContent";
|
|
2941
3369
|
CardBody = CardContent;
|
|
2942
3370
|
CardBody.displayName = "CardBody";
|
|
2943
|
-
CardFooter =
|
|
3371
|
+
CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2944
3372
|
"div",
|
|
2945
3373
|
{
|
|
2946
3374
|
ref,
|
|
@@ -2995,7 +3423,7 @@ var init_FilterPill = __esm({
|
|
|
2995
3423
|
md: "w-3.5 h-3.5",
|
|
2996
3424
|
lg: "w-4 h-4"
|
|
2997
3425
|
};
|
|
2998
|
-
FilterPill =
|
|
3426
|
+
FilterPill = React86__default.forwardRef(
|
|
2999
3427
|
({
|
|
3000
3428
|
className,
|
|
3001
3429
|
variant = "default",
|
|
@@ -3020,17 +3448,13 @@ var init_FilterPill = __esm({
|
|
|
3020
3448
|
onRemove?.();
|
|
3021
3449
|
if (removeEvent) eventBus.emit(`UI:${removeEvent}`, { label: payloadLabel });
|
|
3022
3450
|
}, [onRemove, removeEvent, eventBus, payloadLabel]);
|
|
3023
|
-
const
|
|
3024
|
-
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
3025
|
-
const I = resolveIcon(icon);
|
|
3026
|
-
return I ? /* @__PURE__ */ jsx(I, { className: iconSizes[size] }) : null;
|
|
3027
|
-
})() : icon;
|
|
3451
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: iconSizes[size] }) : icon;
|
|
3028
3452
|
return /* @__PURE__ */ jsxs(
|
|
3029
3453
|
"span",
|
|
3030
3454
|
{
|
|
3031
3455
|
ref,
|
|
3032
3456
|
className: cn(
|
|
3033
|
-
"inline-flex items-center gap-1 font-bold rounded-
|
|
3457
|
+
"inline-flex items-center gap-1 font-bold rounded-pill",
|
|
3034
3458
|
variantStyles5[variant],
|
|
3035
3459
|
sizeStyles4[size],
|
|
3036
3460
|
(onClick || clickEvent) && "cursor-pointer",
|
|
@@ -3053,7 +3477,7 @@ var init_FilterPill = __esm({
|
|
|
3053
3477
|
className: cn(
|
|
3054
3478
|
"ml-0.5 rounded-full hover:bg-foreground/10 transition-colors flex items-center justify-center"
|
|
3055
3479
|
),
|
|
3056
|
-
children:
|
|
3480
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: iconSizes[size] })
|
|
3057
3481
|
}
|
|
3058
3482
|
)
|
|
3059
3483
|
]
|
|
@@ -3068,13 +3492,14 @@ var sizeStyles5, Spinner;
|
|
|
3068
3492
|
var init_Spinner = __esm({
|
|
3069
3493
|
"components/atoms/Spinner.tsx"() {
|
|
3070
3494
|
init_cn();
|
|
3495
|
+
init_Icon();
|
|
3071
3496
|
sizeStyles5 = {
|
|
3072
3497
|
xs: "h-3 w-3",
|
|
3073
3498
|
sm: "h-4 w-4",
|
|
3074
3499
|
md: "h-6 w-6",
|
|
3075
3500
|
lg: "h-8 w-8"
|
|
3076
3501
|
};
|
|
3077
|
-
Spinner =
|
|
3502
|
+
Spinner = React86__default.forwardRef(
|
|
3078
3503
|
({ className, size = "md", ...props }, ref) => {
|
|
3079
3504
|
return /* @__PURE__ */ jsx(
|
|
3080
3505
|
"div",
|
|
@@ -3082,7 +3507,7 @@ var init_Spinner = __esm({
|
|
|
3082
3507
|
ref,
|
|
3083
3508
|
className: cn("text-foreground", className),
|
|
3084
3509
|
...props,
|
|
3085
|
-
children: /* @__PURE__ */ jsx(
|
|
3510
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "loader", className: cn("animate-spin", sizeStyles5[size]) })
|
|
3086
3511
|
}
|
|
3087
3512
|
);
|
|
3088
3513
|
}
|
|
@@ -3101,6 +3526,7 @@ var sizeClasses3, iconSizeClasses, statusSizeClasses, statusClasses, badgeSizeCl
|
|
|
3101
3526
|
var init_Avatar = __esm({
|
|
3102
3527
|
"components/atoms/Avatar.tsx"() {
|
|
3103
3528
|
"use client";
|
|
3529
|
+
init_Icon();
|
|
3104
3530
|
init_cn();
|
|
3105
3531
|
init_useEventBus();
|
|
3106
3532
|
sizeClasses3 = {
|
|
@@ -3131,8 +3557,8 @@ var init_Avatar = __esm({
|
|
|
3131
3557
|
busy: "bg-error"
|
|
3132
3558
|
};
|
|
3133
3559
|
badgeSizeClasses = {
|
|
3134
|
-
xs: "w-3 h-3 text-
|
|
3135
|
-
sm: "w-4 h-4 text-
|
|
3560
|
+
xs: "w-3 h-3 text-xs",
|
|
3561
|
+
sm: "w-4 h-4 text-xs",
|
|
3136
3562
|
md: "w-5 h-5 text-xs",
|
|
3137
3563
|
lg: "w-6 h-6 text-sm",
|
|
3138
3564
|
xl: "w-7 h-7 text-base"
|
|
@@ -3142,7 +3568,7 @@ var init_Avatar = __esm({
|
|
|
3142
3568
|
alt,
|
|
3143
3569
|
name,
|
|
3144
3570
|
initials: providedInitials,
|
|
3145
|
-
icon:
|
|
3571
|
+
icon: IconComponent,
|
|
3146
3572
|
size = "md",
|
|
3147
3573
|
status,
|
|
3148
3574
|
badge,
|
|
@@ -3155,7 +3581,7 @@ var init_Avatar = __esm({
|
|
|
3155
3581
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
3156
3582
|
const hasImage = !!src;
|
|
3157
3583
|
const hasInitials = !!initials;
|
|
3158
|
-
const hasIcon = !!
|
|
3584
|
+
const hasIcon = !!IconComponent;
|
|
3159
3585
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
3160
3586
|
const isClickable = action || onClick;
|
|
3161
3587
|
const handleClick = () => {
|
|
@@ -3199,8 +3625,8 @@ var init_Avatar = __esm({
|
|
|
3199
3625
|
),
|
|
3200
3626
|
children: initials.substring(0, 2).toUpperCase()
|
|
3201
3627
|
}
|
|
3202
|
-
) : hasIcon ? /* @__PURE__ */ jsx(
|
|
3203
|
-
|
|
3628
|
+
) : hasIcon && IconComponent ? /* @__PURE__ */ jsx(
|
|
3629
|
+
IconComponent,
|
|
3204
3630
|
{
|
|
3205
3631
|
className: cn(
|
|
3206
3632
|
"text-foreground",
|
|
@@ -3208,8 +3634,9 @@ var init_Avatar = __esm({
|
|
|
3208
3634
|
)
|
|
3209
3635
|
}
|
|
3210
3636
|
) : /* @__PURE__ */ jsx(
|
|
3211
|
-
|
|
3637
|
+
Icon,
|
|
3212
3638
|
{
|
|
3639
|
+
name: "user",
|
|
3213
3640
|
className: cn(
|
|
3214
3641
|
"text-foreground",
|
|
3215
3642
|
iconSizeClasses[size]
|
|
@@ -3404,7 +3831,7 @@ var init_ProgressBar = __esm({
|
|
|
3404
3831
|
"div",
|
|
3405
3832
|
{
|
|
3406
3833
|
className: cn(
|
|
3407
|
-
"h-full transition-all duration-
|
|
3834
|
+
"h-full transition-all duration-normal ease-emphasized",
|
|
3408
3835
|
colorClasses[effectiveColor]
|
|
3409
3836
|
),
|
|
3410
3837
|
style: { width: `${percentage}%` },
|
|
@@ -3460,7 +3887,7 @@ var init_ProgressBar = __esm({
|
|
|
3460
3887
|
strokeDashoffset: offset,
|
|
3461
3888
|
strokeLinecap: "round",
|
|
3462
3889
|
className: cn(
|
|
3463
|
-
"transition-all duration-
|
|
3890
|
+
"transition-all duration-normal ease-emphasized",
|
|
3464
3891
|
colorClasses[effectiveColor]
|
|
3465
3892
|
)
|
|
3466
3893
|
}
|
|
@@ -3499,7 +3926,7 @@ var init_ProgressBar = __esm({
|
|
|
3499
3926
|
"div",
|
|
3500
3927
|
{
|
|
3501
3928
|
className: cn(
|
|
3502
|
-
"h-full transition-all duration-
|
|
3929
|
+
"h-full transition-all duration-normal ease-emphasized",
|
|
3503
3930
|
(isActive || isPartial) && colorClasses[effectiveColor]
|
|
3504
3931
|
),
|
|
3505
3932
|
style: {
|
|
@@ -3522,7 +3949,7 @@ var Radio;
|
|
|
3522
3949
|
var init_Radio = __esm({
|
|
3523
3950
|
"components/atoms/Radio.tsx"() {
|
|
3524
3951
|
init_cn();
|
|
3525
|
-
Radio =
|
|
3952
|
+
Radio = React86__default.forwardRef(
|
|
3526
3953
|
({
|
|
3527
3954
|
label,
|
|
3528
3955
|
helperText,
|
|
@@ -3694,7 +4121,7 @@ var init_Switch = __esm({
|
|
|
3694
4121
|
"components/atoms/Switch.tsx"() {
|
|
3695
4122
|
"use client";
|
|
3696
4123
|
init_cn();
|
|
3697
|
-
Switch =
|
|
4124
|
+
Switch = React86.forwardRef(
|
|
3698
4125
|
({
|
|
3699
4126
|
checked,
|
|
3700
4127
|
defaultChecked = false,
|
|
@@ -3705,10 +4132,10 @@ var init_Switch = __esm({
|
|
|
3705
4132
|
name,
|
|
3706
4133
|
className
|
|
3707
4134
|
}, ref) => {
|
|
3708
|
-
const [isChecked, setIsChecked] =
|
|
4135
|
+
const [isChecked, setIsChecked] = React86.useState(
|
|
3709
4136
|
checked !== void 0 ? checked : defaultChecked
|
|
3710
4137
|
);
|
|
3711
|
-
|
|
4138
|
+
React86.useEffect(() => {
|
|
3712
4139
|
if (checked !== void 0) {
|
|
3713
4140
|
setIsChecked(checked);
|
|
3714
4141
|
}
|
|
@@ -3967,6 +4394,7 @@ var sizeClasses4, iconSizes2, ThemeToggle;
|
|
|
3967
4394
|
var init_ThemeToggle = __esm({
|
|
3968
4395
|
"components/atoms/ThemeToggle.tsx"() {
|
|
3969
4396
|
"use client";
|
|
4397
|
+
init_Icon();
|
|
3970
4398
|
init_cn();
|
|
3971
4399
|
init_ThemeContext();
|
|
3972
4400
|
sizeClasses4 = {
|
|
@@ -3996,7 +4424,7 @@ var init_ThemeToggle = __esm({
|
|
|
3996
4424
|
"text-foreground",
|
|
3997
4425
|
"hover:bg-muted border-[length:var(--border-width)] border-transparent hover:border-border",
|
|
3998
4426
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
3999
|
-
"transition-colors duration-
|
|
4427
|
+
"transition-colors duration-fast",
|
|
4000
4428
|
sizeClasses4[size],
|
|
4001
4429
|
className
|
|
4002
4430
|
),
|
|
@@ -4004,13 +4432,15 @@ var init_ThemeToggle = __esm({
|
|
|
4004
4432
|
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
4005
4433
|
children: [
|
|
4006
4434
|
isDark ? /* @__PURE__ */ jsx(
|
|
4007
|
-
|
|
4435
|
+
Icon,
|
|
4008
4436
|
{
|
|
4437
|
+
name: "sun",
|
|
4009
4438
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4010
4439
|
}
|
|
4011
4440
|
) : /* @__PURE__ */ jsx(
|
|
4012
|
-
|
|
4441
|
+
Icon,
|
|
4013
4442
|
{
|
|
4443
|
+
name: "moon",
|
|
4014
4444
|
className: cn(iconSizes2[size], "text-foreground")
|
|
4015
4445
|
}
|
|
4016
4446
|
),
|
|
@@ -4043,7 +4473,7 @@ var init_FlipContainer = __esm({
|
|
|
4043
4473
|
children: /* @__PURE__ */ jsx(
|
|
4044
4474
|
Box,
|
|
4045
4475
|
{
|
|
4046
|
-
className: "relative w-full h-full transition-transform duration-
|
|
4476
|
+
className: "relative w-full h-full transition-transform duration-slow",
|
|
4047
4477
|
style: {
|
|
4048
4478
|
transformStyle: "preserve-3d",
|
|
4049
4479
|
transform: flipped ? "rotateY(180deg)" : "rotateY(0deg)"
|
|
@@ -4061,7 +4491,7 @@ var Aside;
|
|
|
4061
4491
|
var init_Aside = __esm({
|
|
4062
4492
|
"components/atoms/Aside.tsx"() {
|
|
4063
4493
|
init_cn();
|
|
4064
|
-
Aside =
|
|
4494
|
+
Aside = React86__default.forwardRef(
|
|
4065
4495
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4066
4496
|
);
|
|
4067
4497
|
Aside.displayName = "Aside";
|
|
@@ -4101,7 +4531,7 @@ var init_ConditionalWrapper = __esm({
|
|
|
4101
4531
|
Box,
|
|
4102
4532
|
{
|
|
4103
4533
|
overflow: "hidden",
|
|
4104
|
-
className: `transition-all duration-
|
|
4534
|
+
className: `transition-all duration-fast ${isVisible ? "opacity-100 max-h-[1000px]" : "opacity-0 max-h-0"}`,
|
|
4105
4535
|
children: isVisible ? children : fallback
|
|
4106
4536
|
}
|
|
4107
4537
|
);
|
|
@@ -4138,8 +4568,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4138
4568
|
position = "top",
|
|
4139
4569
|
className
|
|
4140
4570
|
}) => {
|
|
4141
|
-
const [isVisible, setIsVisible] =
|
|
4142
|
-
const timeoutRef =
|
|
4571
|
+
const [isVisible, setIsVisible] = React86__default.useState(false);
|
|
4572
|
+
const timeoutRef = React86__default.useRef(null);
|
|
4143
4573
|
const handleMouseEnter = () => {
|
|
4144
4574
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4145
4575
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4148,7 +4578,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4148
4578
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4149
4579
|
setIsVisible(false);
|
|
4150
4580
|
};
|
|
4151
|
-
|
|
4581
|
+
React86__default.useEffect(() => {
|
|
4152
4582
|
return () => {
|
|
4153
4583
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4154
4584
|
};
|
|
@@ -4358,7 +4788,7 @@ var init_StatusDot = __esm({
|
|
|
4358
4788
|
md: "w-2.5 h-2.5",
|
|
4359
4789
|
lg: "w-3 h-3"
|
|
4360
4790
|
};
|
|
4361
|
-
StatusDot =
|
|
4791
|
+
StatusDot = React86__default.forwardRef(
|
|
4362
4792
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4363
4793
|
return /* @__PURE__ */ jsx(
|
|
4364
4794
|
"span",
|
|
@@ -4397,21 +4827,22 @@ function resolveColor(dir, invert) {
|
|
|
4397
4827
|
const isGood = invert ? !isPositive : isPositive;
|
|
4398
4828
|
return isGood ? "text-success" : "text-error";
|
|
4399
4829
|
}
|
|
4400
|
-
var sizeStyles7,
|
|
4830
|
+
var sizeStyles7, iconNameMap, TrendIndicator;
|
|
4401
4831
|
var init_TrendIndicator = __esm({
|
|
4402
4832
|
"components/atoms/TrendIndicator.tsx"() {
|
|
4833
|
+
init_Icon();
|
|
4403
4834
|
init_cn();
|
|
4404
4835
|
sizeStyles7 = {
|
|
4405
4836
|
sm: { icon: "w-3 h-3", text: "text-xs" },
|
|
4406
4837
|
md: { icon: "w-4 h-4", text: "text-sm" },
|
|
4407
4838
|
lg: { icon: "w-5 h-5", text: "text-base" }
|
|
4408
4839
|
};
|
|
4409
|
-
|
|
4410
|
-
up:
|
|
4411
|
-
down:
|
|
4412
|
-
flat:
|
|
4840
|
+
iconNameMap = {
|
|
4841
|
+
up: "trending-up",
|
|
4842
|
+
down: "trending-down",
|
|
4843
|
+
flat: "arrow-right"
|
|
4413
4844
|
};
|
|
4414
|
-
TrendIndicator =
|
|
4845
|
+
TrendIndicator = React86__default.forwardRef(
|
|
4415
4846
|
({
|
|
4416
4847
|
className,
|
|
4417
4848
|
value,
|
|
@@ -4424,7 +4855,7 @@ var init_TrendIndicator = __esm({
|
|
|
4424
4855
|
}, ref) => {
|
|
4425
4856
|
const dir = resolveDirection(value, direction);
|
|
4426
4857
|
const colorClass = resolveColor(dir, invert);
|
|
4427
|
-
const
|
|
4858
|
+
const iconName = iconNameMap[dir];
|
|
4428
4859
|
const styles = sizeStyles7[size];
|
|
4429
4860
|
const formattedValue = value !== void 0 ? `${value > 0 ? "+" : ""}${value}%` : void 0;
|
|
4430
4861
|
const ariaLabel = label ?? (formattedValue ? `${dir} ${formattedValue}` : dir);
|
|
@@ -4442,7 +4873,7 @@ var init_TrendIndicator = __esm({
|
|
|
4442
4873
|
"aria-label": ariaLabel,
|
|
4443
4874
|
...props,
|
|
4444
4875
|
children: [
|
|
4445
|
-
/* @__PURE__ */ jsx(
|
|
4876
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, className: styles.icon }),
|
|
4446
4877
|
showValue && formattedValue && /* @__PURE__ */ jsx("span", { children: formattedValue })
|
|
4447
4878
|
]
|
|
4448
4879
|
}
|
|
@@ -4478,7 +4909,7 @@ var init_RangeSlider = __esm({
|
|
|
4478
4909
|
md: "w-4 h-4",
|
|
4479
4910
|
lg: "w-5 h-5"
|
|
4480
4911
|
};
|
|
4481
|
-
RangeSlider =
|
|
4912
|
+
RangeSlider = React86__default.forwardRef(
|
|
4482
4913
|
({
|
|
4483
4914
|
className,
|
|
4484
4915
|
min = 0,
|
|
@@ -5046,7 +5477,7 @@ var init_ContentSection = __esm({
|
|
|
5046
5477
|
md: "py-16",
|
|
5047
5478
|
lg: "py-24"
|
|
5048
5479
|
};
|
|
5049
|
-
ContentSection =
|
|
5480
|
+
ContentSection = React86__default.forwardRef(
|
|
5050
5481
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5051
5482
|
return /* @__PURE__ */ jsx(
|
|
5052
5483
|
Box,
|
|
@@ -5580,7 +6011,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5580
6011
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5581
6012
|
"none": {}
|
|
5582
6013
|
};
|
|
5583
|
-
AnimatedReveal =
|
|
6014
|
+
AnimatedReveal = React86__default.forwardRef(
|
|
5584
6015
|
({
|
|
5585
6016
|
trigger = "scroll",
|
|
5586
6017
|
animation = "fade-up",
|
|
@@ -5610,7 +6041,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5610
6041
|
if (trigger !== "scroll") return;
|
|
5611
6042
|
const el = internalRef.current;
|
|
5612
6043
|
if (!el) return;
|
|
5613
|
-
const
|
|
6044
|
+
const observer2 = new IntersectionObserver(
|
|
5614
6045
|
([entry]) => {
|
|
5615
6046
|
if (entry.isIntersecting) {
|
|
5616
6047
|
if (once && hasAnimated.current) return;
|
|
@@ -5622,8 +6053,8 @@ var init_AnimatedReveal = __esm({
|
|
|
5622
6053
|
},
|
|
5623
6054
|
{ threshold }
|
|
5624
6055
|
);
|
|
5625
|
-
|
|
5626
|
-
return () =>
|
|
6056
|
+
observer2.observe(el);
|
|
6057
|
+
return () => observer2.disconnect();
|
|
5627
6058
|
}, [trigger, threshold, once]);
|
|
5628
6059
|
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
5629
6060
|
const handleMouseLeave = trigger === "hover" ? () => {
|
|
@@ -5740,7 +6171,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5740
6171
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
5741
6172
|
"use client";
|
|
5742
6173
|
init_cn();
|
|
5743
|
-
AnimatedGraphic =
|
|
6174
|
+
AnimatedGraphic = React86__default.forwardRef(
|
|
5744
6175
|
({
|
|
5745
6176
|
src,
|
|
5746
6177
|
svgContent,
|
|
@@ -5763,7 +6194,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5763
6194
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5764
6195
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5765
6196
|
const prevAnimateRef = useRef(animate);
|
|
5766
|
-
const setRef =
|
|
6197
|
+
const setRef = React86__default.useCallback(
|
|
5767
6198
|
(node) => {
|
|
5768
6199
|
containerRef.current = node;
|
|
5769
6200
|
if (typeof ref === "function") ref(node);
|
|
@@ -5988,9 +6419,9 @@ function ScoreDisplay({
|
|
|
5988
6419
|
...rest
|
|
5989
6420
|
}) {
|
|
5990
6421
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
5991
|
-
const [displayValue, setDisplayValue] =
|
|
5992
|
-
const [isAnimating, setIsAnimating] =
|
|
5993
|
-
|
|
6422
|
+
const [displayValue, setDisplayValue] = React86.useState(resolvedValue);
|
|
6423
|
+
const [isAnimating, setIsAnimating] = React86.useState(false);
|
|
6424
|
+
React86.useEffect(() => {
|
|
5994
6425
|
if (!animated || displayValue === resolvedValue) {
|
|
5995
6426
|
setDisplayValue(resolvedValue);
|
|
5996
6427
|
return;
|
|
@@ -6060,9 +6491,9 @@ function ControlButton({
|
|
|
6060
6491
|
className
|
|
6061
6492
|
}) {
|
|
6062
6493
|
const eventBus = useEventBus();
|
|
6063
|
-
const [isPressed, setIsPressed] =
|
|
6494
|
+
const [isPressed, setIsPressed] = React86.useState(false);
|
|
6064
6495
|
const actualPressed = pressed ?? isPressed;
|
|
6065
|
-
const handlePointerDown =
|
|
6496
|
+
const handlePointerDown = React86.useCallback(
|
|
6066
6497
|
(e) => {
|
|
6067
6498
|
e.preventDefault();
|
|
6068
6499
|
if (disabled) return;
|
|
@@ -6072,7 +6503,7 @@ function ControlButton({
|
|
|
6072
6503
|
},
|
|
6073
6504
|
[disabled, pressEvent, eventBus, onPress]
|
|
6074
6505
|
);
|
|
6075
|
-
const handlePointerUp =
|
|
6506
|
+
const handlePointerUp = React86.useCallback(
|
|
6076
6507
|
(e) => {
|
|
6077
6508
|
e.preventDefault();
|
|
6078
6509
|
if (disabled) return;
|
|
@@ -6082,7 +6513,7 @@ function ControlButton({
|
|
|
6082
6513
|
},
|
|
6083
6514
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6084
6515
|
);
|
|
6085
|
-
const handlePointerLeave =
|
|
6516
|
+
const handlePointerLeave = React86.useCallback(
|
|
6086
6517
|
(e) => {
|
|
6087
6518
|
if (isPressed) {
|
|
6088
6519
|
setIsPressed(false);
|
|
@@ -6988,9 +7419,9 @@ function MiniMap({
|
|
|
6988
7419
|
viewportRect,
|
|
6989
7420
|
className
|
|
6990
7421
|
}) {
|
|
6991
|
-
const canvasRef =
|
|
6992
|
-
const frameRef =
|
|
6993
|
-
|
|
7422
|
+
const canvasRef = React86.useRef(null);
|
|
7423
|
+
const frameRef = React86.useRef(0);
|
|
7424
|
+
React86.useEffect(() => {
|
|
6994
7425
|
const canvas = canvasRef.current;
|
|
6995
7426
|
if (!canvas) return;
|
|
6996
7427
|
const ctx = canvas.getContext("2d");
|
|
@@ -7240,6 +7671,7 @@ var init_ErrorState = __esm({
|
|
|
7240
7671
|
init_Box();
|
|
7241
7672
|
init_Stack();
|
|
7242
7673
|
init_Typography();
|
|
7674
|
+
init_Icon();
|
|
7243
7675
|
init_useEventBus();
|
|
7244
7676
|
init_useTranslate();
|
|
7245
7677
|
ErrorState = ({
|
|
@@ -7267,7 +7699,7 @@ var init_ErrorState = __esm({
|
|
|
7267
7699
|
className
|
|
7268
7700
|
),
|
|
7269
7701
|
children: [
|
|
7270
|
-
/* @__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" }) }),
|
|
7271
7703
|
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
7272
7704
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
7273
7705
|
(onRetry || retryEvent) && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
@@ -7284,7 +7716,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7284
7716
|
"use client";
|
|
7285
7717
|
init_cn();
|
|
7286
7718
|
init_ErrorState();
|
|
7287
|
-
ErrorBoundary = class extends
|
|
7719
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
7288
7720
|
constructor(props) {
|
|
7289
7721
|
super(props);
|
|
7290
7722
|
__publicField(this, "reset", () => {
|
|
@@ -8011,7 +8443,7 @@ var init_InstallBox = __esm({
|
|
|
8011
8443
|
/* @__PURE__ */ jsx(
|
|
8012
8444
|
Box,
|
|
8013
8445
|
{
|
|
8014
|
-
className: "bg-surface rounded-
|
|
8446
|
+
className: "bg-surface rounded-container border-[length:var(--border-width)] border-border",
|
|
8015
8447
|
padding: "md",
|
|
8016
8448
|
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3", children: [
|
|
8017
8449
|
/* @__PURE__ */ jsx(
|
|
@@ -8565,7 +8997,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
8565
8997
|
AboutPageTemplate.displayName = "AboutPageTemplate";
|
|
8566
8998
|
}
|
|
8567
8999
|
});
|
|
8568
|
-
var variantBorderClasses, variantIconColors,
|
|
9000
|
+
var variantBorderClasses, variantIconColors, iconMap2, Alert;
|
|
8569
9001
|
var init_Alert = __esm({
|
|
8570
9002
|
"components/molecules/Alert.tsx"() {
|
|
8571
9003
|
"use client";
|
|
@@ -8586,11 +9018,11 @@ var init_Alert = __esm({
|
|
|
8586
9018
|
warning: "text-warning",
|
|
8587
9019
|
error: "text-error"
|
|
8588
9020
|
};
|
|
8589
|
-
|
|
8590
|
-
info:
|
|
8591
|
-
success:
|
|
8592
|
-
warning:
|
|
8593
|
-
error:
|
|
9021
|
+
iconMap2 = {
|
|
9022
|
+
info: "info",
|
|
9023
|
+
success: "check-circle",
|
|
9024
|
+
warning: "alert-triangle",
|
|
9025
|
+
error: "alert-circle"
|
|
8594
9026
|
};
|
|
8595
9027
|
Alert = ({
|
|
8596
9028
|
children,
|
|
@@ -8625,7 +9057,7 @@ var init_Alert = __esm({
|
|
|
8625
9057
|
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
8626
9058
|
Icon,
|
|
8627
9059
|
{
|
|
8628
|
-
|
|
9060
|
+
name: iconMap2[variant],
|
|
8629
9061
|
size: "md",
|
|
8630
9062
|
className: variantIconColors[variant]
|
|
8631
9063
|
}
|
|
@@ -8645,7 +9077,7 @@ var init_Alert = __esm({
|
|
|
8645
9077
|
"hover:bg-muted"
|
|
8646
9078
|
),
|
|
8647
9079
|
"aria-label": "Dismiss alert",
|
|
8648
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
9080
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "sm" })
|
|
8649
9081
|
}
|
|
8650
9082
|
)
|
|
8651
9083
|
] })
|
|
@@ -8721,8 +9153,8 @@ var init_Tooltip = __esm({
|
|
|
8721
9153
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
8722
9154
|
};
|
|
8723
9155
|
}, []);
|
|
8724
|
-
const triggerElement =
|
|
8725
|
-
const trigger =
|
|
9156
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9157
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
8726
9158
|
ref: triggerRef,
|
|
8727
9159
|
onMouseEnter: handleMouseEnter,
|
|
8728
9160
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8736,7 +9168,7 @@ var init_Tooltip = __esm({
|
|
|
8736
9168
|
className: cn(
|
|
8737
9169
|
"fixed z-50 px-3 py-2 max-w-xs",
|
|
8738
9170
|
"bg-primary text-primary-foreground",
|
|
8739
|
-
"shadow-
|
|
9171
|
+
"shadow-elevation-popover rounded-sm",
|
|
8740
9172
|
"text-sm pointer-events-none",
|
|
8741
9173
|
"break-words whitespace-normal",
|
|
8742
9174
|
"h-auto min-h-fit",
|
|
@@ -8877,8 +9309,8 @@ var init_Popover = __esm({
|
|
|
8877
9309
|
onMouseEnter: handleOpen,
|
|
8878
9310
|
onMouseLeave: handleClose
|
|
8879
9311
|
};
|
|
8880
|
-
const childElement =
|
|
8881
|
-
const triggerElement =
|
|
9312
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
9313
|
+
const triggerElement = React86__default.cloneElement(
|
|
8882
9314
|
childElement,
|
|
8883
9315
|
{
|
|
8884
9316
|
ref: triggerRef,
|
|
@@ -8891,7 +9323,7 @@ var init_Popover = __esm({
|
|
|
8891
9323
|
ref: popoverRef,
|
|
8892
9324
|
className: cn(
|
|
8893
9325
|
"fixed z-50 p-4",
|
|
8894
|
-
"bg-card border-2 border-border shadow-
|
|
9326
|
+
"bg-card border-2 border-border shadow-elevation-popover",
|
|
8895
9327
|
positionClasses2[position],
|
|
8896
9328
|
className
|
|
8897
9329
|
),
|
|
@@ -8994,8 +9426,8 @@ var init_Menu = __esm({
|
|
|
8994
9426
|
"bottom-start": "top-full left-0 mt-2",
|
|
8995
9427
|
"bottom-end": "top-full right-0 mt-2"
|
|
8996
9428
|
};
|
|
8997
|
-
const triggerChild =
|
|
8998
|
-
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(
|
|
8999
9431
|
triggerChild,
|
|
9000
9432
|
{
|
|
9001
9433
|
ref: triggerRef,
|
|
@@ -9005,7 +9437,7 @@ var init_Menu = __esm({
|
|
|
9005
9437
|
const menuContainerStyles = cn(
|
|
9006
9438
|
"bg-card",
|
|
9007
9439
|
"border-[length:var(--border-width)] border-border",
|
|
9008
|
-
"shadow",
|
|
9440
|
+
"shadow-elevation-popover",
|
|
9009
9441
|
"rounded-sm",
|
|
9010
9442
|
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
9011
9443
|
);
|
|
@@ -9040,7 +9472,7 @@ var init_Menu = __esm({
|
|
|
9040
9472
|
}
|
|
9041
9473
|
),
|
|
9042
9474
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
9043
|
-
hasSubMenu && /* @__PURE__ */ jsx(Icon, {
|
|
9475
|
+
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
9044
9476
|
] })
|
|
9045
9477
|
},
|
|
9046
9478
|
itemId
|
|
@@ -9173,7 +9605,7 @@ var init_Accordion = __esm({
|
|
|
9173
9605
|
"w-full flex items-center justify-between px-4 py-3",
|
|
9174
9606
|
"bg-card",
|
|
9175
9607
|
"hover:bg-muted",
|
|
9176
|
-
"transition-colors duration-
|
|
9608
|
+
"transition-colors duration-fast",
|
|
9177
9609
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-inset",
|
|
9178
9610
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
9179
9611
|
isOpen && "bg-muted font-bold"
|
|
@@ -9185,10 +9617,10 @@ var init_Accordion = __esm({
|
|
|
9185
9617
|
/* @__PURE__ */ jsx(
|
|
9186
9618
|
Icon,
|
|
9187
9619
|
{
|
|
9188
|
-
|
|
9620
|
+
name: "chevron-down",
|
|
9189
9621
|
size: "sm",
|
|
9190
9622
|
className: cn(
|
|
9191
|
-
"transition-transform duration-
|
|
9623
|
+
"transition-transform duration-fast",
|
|
9192
9624
|
isOpen && "transform rotate-180"
|
|
9193
9625
|
)
|
|
9194
9626
|
}
|
|
@@ -9210,15 +9642,6 @@ var init_Accordion = __esm({
|
|
|
9210
9642
|
Accordion.displayName = "Accordion";
|
|
9211
9643
|
}
|
|
9212
9644
|
});
|
|
9213
|
-
function resolveIcon2(name) {
|
|
9214
|
-
const pascalName = name.split(/[-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join("");
|
|
9215
|
-
const icons = LucideIcons;
|
|
9216
|
-
const icon = icons[pascalName];
|
|
9217
|
-
if (icon) {
|
|
9218
|
-
return icon;
|
|
9219
|
-
}
|
|
9220
|
-
return Plus;
|
|
9221
|
-
}
|
|
9222
9645
|
var FloatingActionButton;
|
|
9223
9646
|
var init_FloatingActionButton = __esm({
|
|
9224
9647
|
"components/molecules/FloatingActionButton.tsx"() {
|
|
@@ -9244,7 +9667,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9244
9667
|
const eventBus = useEventBus();
|
|
9245
9668
|
const { t } = useTranslate();
|
|
9246
9669
|
const resolvedAction = icon ? {
|
|
9247
|
-
icon
|
|
9670
|
+
icon,
|
|
9248
9671
|
onClick: () => {
|
|
9249
9672
|
if (action) eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
9250
9673
|
onClick?.();
|
|
@@ -9318,7 +9741,7 @@ var init_FloatingActionButton = __esm({
|
|
|
9318
9741
|
{
|
|
9319
9742
|
align: "center",
|
|
9320
9743
|
gap: "sm",
|
|
9321
|
-
className: "transition-all duration-
|
|
9744
|
+
className: "transition-all duration-fast",
|
|
9322
9745
|
style: {
|
|
9323
9746
|
opacity: isExpanded ? 1 : 0,
|
|
9324
9747
|
transform: isExpanded ? "translateY(0)" : "translateY(10px)",
|
|
@@ -9354,9 +9777,9 @@ var init_FloatingActionButton = __esm({
|
|
|
9354
9777
|
{
|
|
9355
9778
|
variant: isExpanded ? "secondary" : "primary",
|
|
9356
9779
|
size: "lg",
|
|
9357
|
-
icon: isExpanded ?
|
|
9780
|
+
icon: isExpanded ? "x" : "plus",
|
|
9358
9781
|
onClick: handleMainClick,
|
|
9359
|
-
className: "rounded-full shadow-lg transition-all duration-
|
|
9782
|
+
className: "rounded-full shadow-lg transition-all duration-normal",
|
|
9360
9783
|
"aria-label": isExpanded ? "Close actions" : "Open actions",
|
|
9361
9784
|
"aria-expanded": isExpanded,
|
|
9362
9785
|
children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: isExpanded ? t("common.close") : t("common.open") })
|
|
@@ -9411,13 +9834,13 @@ var init_MapView = __esm({
|
|
|
9411
9834
|
shadowSize: [41, 41]
|
|
9412
9835
|
});
|
|
9413
9836
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9414
|
-
const { useEffect:
|
|
9837
|
+
const { useEffect: useEffect69, useRef: useRef65, useCallback: useCallback113, useState: useState99 } = React86__default;
|
|
9415
9838
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9416
9839
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9417
9840
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9418
9841
|
const map = useMap();
|
|
9419
9842
|
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
9420
|
-
|
|
9843
|
+
useEffect69(() => {
|
|
9421
9844
|
const prev = prevRef.current;
|
|
9422
9845
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
9423
9846
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -9428,7 +9851,7 @@ var init_MapView = __esm({
|
|
|
9428
9851
|
}
|
|
9429
9852
|
function MapClickHandler({ onMapClick }) {
|
|
9430
9853
|
const map = useMap();
|
|
9431
|
-
|
|
9854
|
+
useEffect69(() => {
|
|
9432
9855
|
if (!onMapClick) return;
|
|
9433
9856
|
const handler = (e) => {
|
|
9434
9857
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -9456,7 +9879,7 @@ var init_MapView = __esm({
|
|
|
9456
9879
|
showAttribution = true
|
|
9457
9880
|
}) {
|
|
9458
9881
|
const eventBus = useEventBus2();
|
|
9459
|
-
const [clickedPosition, setClickedPosition] =
|
|
9882
|
+
const [clickedPosition, setClickedPosition] = useState99(null);
|
|
9460
9883
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
9461
9884
|
if (showClickedPin) {
|
|
9462
9885
|
setClickedPosition({ lat, lng });
|
|
@@ -9657,7 +10080,7 @@ function InputPattern({
|
|
|
9657
10080
|
fieldName
|
|
9658
10081
|
}) {
|
|
9659
10082
|
const { emit } = useEventBus();
|
|
9660
|
-
const [localValue, setLocalValue] =
|
|
10083
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9661
10084
|
const handleChange = (e) => {
|
|
9662
10085
|
setLocalValue(e.target.value);
|
|
9663
10086
|
if (onChange) {
|
|
@@ -9695,7 +10118,7 @@ function TextareaPattern({
|
|
|
9695
10118
|
fieldName
|
|
9696
10119
|
}) {
|
|
9697
10120
|
const { emit } = useEventBus();
|
|
9698
|
-
const [localValue, setLocalValue] =
|
|
10121
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9699
10122
|
const handleChange = (e) => {
|
|
9700
10123
|
setLocalValue(e.target.value);
|
|
9701
10124
|
if (onChange) {
|
|
@@ -9727,7 +10150,7 @@ function SelectPattern({
|
|
|
9727
10150
|
fieldName
|
|
9728
10151
|
}) {
|
|
9729
10152
|
const { emit } = useEventBus();
|
|
9730
|
-
const [localValue, setLocalValue] =
|
|
10153
|
+
const [localValue, setLocalValue] = React86__default.useState(value);
|
|
9731
10154
|
const handleChange = (e) => {
|
|
9732
10155
|
setLocalValue(e.target.value);
|
|
9733
10156
|
if (onChange) {
|
|
@@ -9756,7 +10179,7 @@ function CheckboxPattern({
|
|
|
9756
10179
|
className
|
|
9757
10180
|
}) {
|
|
9758
10181
|
const { emit } = useEventBus();
|
|
9759
|
-
const [localChecked, setLocalChecked] =
|
|
10182
|
+
const [localChecked, setLocalChecked] = React86__default.useState(checked);
|
|
9760
10183
|
const handleChange = (e) => {
|
|
9761
10184
|
setLocalChecked(e.target.checked);
|
|
9762
10185
|
if (onChange) {
|
|
@@ -9987,8 +10410,8 @@ function ActionButtons({
|
|
|
9987
10410
|
disabled
|
|
9988
10411
|
}) {
|
|
9989
10412
|
const eventBus = useEventBus();
|
|
9990
|
-
const [activeButtons, setActiveButtons] =
|
|
9991
|
-
const handlePress =
|
|
10413
|
+
const [activeButtons, setActiveButtons] = React86.useState(/* @__PURE__ */ new Set());
|
|
10414
|
+
const handlePress = React86.useCallback(
|
|
9992
10415
|
(id) => {
|
|
9993
10416
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9994
10417
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9996,7 +10419,7 @@ function ActionButtons({
|
|
|
9996
10419
|
},
|
|
9997
10420
|
[actionEvent, eventBus, onAction]
|
|
9998
10421
|
);
|
|
9999
|
-
const handleRelease =
|
|
10422
|
+
const handleRelease = React86.useCallback(
|
|
10000
10423
|
(id) => {
|
|
10001
10424
|
setActiveButtons((prev) => {
|
|
10002
10425
|
const next = new Set(prev);
|
|
@@ -10816,7 +11239,7 @@ function IsometricCanvas({
|
|
|
10816
11239
|
const el = containerRef.current;
|
|
10817
11240
|
if (!el) return;
|
|
10818
11241
|
if (typeof ResizeObserver === "undefined") return;
|
|
10819
|
-
const
|
|
11242
|
+
const observer2 = new ResizeObserver((entries) => {
|
|
10820
11243
|
const entry = entries[0];
|
|
10821
11244
|
if (entry) {
|
|
10822
11245
|
const w = Math.round(entry.contentRect.width) || 800;
|
|
@@ -10827,8 +11250,8 @@ function IsometricCanvas({
|
|
|
10827
11250
|
});
|
|
10828
11251
|
}
|
|
10829
11252
|
});
|
|
10830
|
-
|
|
10831
|
-
return () =>
|
|
11253
|
+
observer2.observe(el);
|
|
11254
|
+
return () => observer2.disconnect();
|
|
10832
11255
|
}, []);
|
|
10833
11256
|
const units = useMemo(
|
|
10834
11257
|
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
@@ -12847,7 +13270,7 @@ var init_MarkdownContent = __esm({
|
|
|
12847
13270
|
init_Box();
|
|
12848
13271
|
init_useTranslate();
|
|
12849
13272
|
init_cn();
|
|
12850
|
-
MarkdownContent =
|
|
13273
|
+
MarkdownContent = React86__default.memo(
|
|
12851
13274
|
({ content, direction, className }) => {
|
|
12852
13275
|
const { t: _t } = useTranslate();
|
|
12853
13276
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -12993,6 +13416,7 @@ var init_CodeBlock = __esm({
|
|
|
12993
13416
|
init_Badge();
|
|
12994
13417
|
init_Stack();
|
|
12995
13418
|
init_Textarea();
|
|
13419
|
+
init_Icon();
|
|
12996
13420
|
init_useEventBus();
|
|
12997
13421
|
init_useTranslate();
|
|
12998
13422
|
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
@@ -13065,7 +13489,7 @@ var init_CodeBlock = __esm({
|
|
|
13065
13489
|
log8 = createLogger("almadar:ui:markdown-code");
|
|
13066
13490
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13067
13491
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13068
|
-
CodeBlock =
|
|
13492
|
+
CodeBlock = React86__default.memo(
|
|
13069
13493
|
({
|
|
13070
13494
|
code: rawCode,
|
|
13071
13495
|
language = "text",
|
|
@@ -13283,7 +13707,7 @@ var init_CodeBlock = __esm({
|
|
|
13283
13707
|
onClick: handleCopy,
|
|
13284
13708
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
13285
13709
|
"aria-label": "Copy code",
|
|
13286
|
-
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" })
|
|
13287
13711
|
}
|
|
13288
13712
|
)
|
|
13289
13713
|
]
|
|
@@ -13519,8 +13943,8 @@ function Card2({
|
|
|
13519
13943
|
className: `
|
|
13520
13944
|
bg-card
|
|
13521
13945
|
border border-border
|
|
13522
|
-
rounded-
|
|
13523
|
-
${isClickable ? "cursor-pointer hover:shadow-
|
|
13946
|
+
rounded-container shadow-elevation-card
|
|
13947
|
+
${isClickable ? "cursor-pointer hover:shadow-elevation-dialog transition-shadow" : ""}
|
|
13524
13948
|
${className}
|
|
13525
13949
|
`,
|
|
13526
13950
|
onClick: isClickable ? handleClick : void 0,
|
|
@@ -13614,7 +14038,7 @@ var init_QuizBlock = __esm({
|
|
|
13614
14038
|
className: "self-start ml-7",
|
|
13615
14039
|
children: /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
13616
14040
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: revealed ? t("quiz.hideAnswer") : t("quiz.showAnswer") }),
|
|
13617
|
-
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" })
|
|
13618
14042
|
] })
|
|
13619
14043
|
}
|
|
13620
14044
|
)
|
|
@@ -14374,7 +14798,7 @@ var init_StateMachineView = __esm({
|
|
|
14374
14798
|
style: { top: title ? 30 : 0 },
|
|
14375
14799
|
children: [
|
|
14376
14800
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14377
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14801
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14378
14802
|
StateNode,
|
|
14379
14803
|
{
|
|
14380
14804
|
state,
|
|
@@ -15522,28 +15946,22 @@ var init_BookTableOfContents = __esm({
|
|
|
15522
15946
|
BookTableOfContents.displayName = "BookTableOfContents";
|
|
15523
15947
|
}
|
|
15524
15948
|
});
|
|
15525
|
-
var
|
|
15949
|
+
var ICON_NAME_ALIASES, EmptyState;
|
|
15526
15950
|
var init_EmptyState = __esm({
|
|
15527
15951
|
"components/molecules/EmptyState.tsx"() {
|
|
15528
15952
|
"use client";
|
|
15529
15953
|
init_cn();
|
|
15530
15954
|
init_atoms();
|
|
15531
15955
|
init_Box();
|
|
15956
|
+
init_Icon();
|
|
15532
15957
|
init_Stack();
|
|
15533
15958
|
init_Typography();
|
|
15534
15959
|
init_useEventBus();
|
|
15535
15960
|
init_useTranslate();
|
|
15536
|
-
|
|
15537
|
-
"check-circle"
|
|
15538
|
-
|
|
15539
|
-
"
|
|
15540
|
-
error: XCircle,
|
|
15541
|
-
"alert-circle": AlertCircle,
|
|
15542
|
-
warning: AlertCircle,
|
|
15543
|
-
info: Info,
|
|
15544
|
-
search: Search,
|
|
15545
|
-
inbox: Inbox,
|
|
15546
|
-
"file-question": FileQuestion
|
|
15961
|
+
ICON_NAME_ALIASES = {
|
|
15962
|
+
check: "check-circle",
|
|
15963
|
+
error: "x-circle",
|
|
15964
|
+
warning: "alert-circle"
|
|
15547
15965
|
};
|
|
15548
15966
|
EmptyState = ({
|
|
15549
15967
|
icon,
|
|
@@ -15563,7 +15981,9 @@ var init_EmptyState = __esm({
|
|
|
15563
15981
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
15564
15982
|
onAction?.();
|
|
15565
15983
|
};
|
|
15566
|
-
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);
|
|
15567
15987
|
const isDestructive = destructive || variant === "error";
|
|
15568
15988
|
const isSuccess = variant === "success";
|
|
15569
15989
|
const displayText = title || message || t("empty.noItems");
|
|
@@ -15576,7 +15996,7 @@ var init_EmptyState = __esm({
|
|
|
15576
15996
|
className
|
|
15577
15997
|
),
|
|
15578
15998
|
children: [
|
|
15579
|
-
|
|
15999
|
+
hasIcon && /* @__PURE__ */ jsx(
|
|
15580
16000
|
Box,
|
|
15581
16001
|
{
|
|
15582
16002
|
className: cn(
|
|
@@ -15584,8 +16004,9 @@ var init_EmptyState = __esm({
|
|
|
15584
16004
|
isDestructive ? "bg-error/10" : isSuccess ? "bg-success/10" : "bg-muted"
|
|
15585
16005
|
),
|
|
15586
16006
|
children: /* @__PURE__ */ jsx(
|
|
15587
|
-
|
|
16007
|
+
Icon,
|
|
15588
16008
|
{
|
|
16009
|
+
...iconName ? { name: iconName } : { icon: iconComponent },
|
|
15589
16010
|
className: cn(
|
|
15590
16011
|
"h-8 w-8",
|
|
15591
16012
|
isDestructive ? "text-error" : isSuccess ? "text-success" : "text-muted-foreground"
|
|
@@ -15955,7 +16376,7 @@ var init_Grid = __esm({
|
|
|
15955
16376
|
as: Component = "div"
|
|
15956
16377
|
}) => {
|
|
15957
16378
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
15958
|
-
return
|
|
16379
|
+
return React86__default.createElement(
|
|
15959
16380
|
Component,
|
|
15960
16381
|
{
|
|
15961
16382
|
className: cn(
|
|
@@ -16325,7 +16746,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16325
16746
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
16326
16747
|
return { items, positions, width, height };
|
|
16327
16748
|
}, [questions]);
|
|
16328
|
-
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-
|
|
16749
|
+
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
16329
16750
|
"svg",
|
|
16330
16751
|
{
|
|
16331
16752
|
width: layout.width,
|
|
@@ -16568,7 +16989,7 @@ var init_Breadcrumb = __esm({
|
|
|
16568
16989
|
init_useEventBus();
|
|
16569
16990
|
Breadcrumb = ({
|
|
16570
16991
|
items,
|
|
16571
|
-
separator =
|
|
16992
|
+
separator = "chevron-right",
|
|
16572
16993
|
maxItems,
|
|
16573
16994
|
className
|
|
16574
16995
|
}) => {
|
|
@@ -16597,7 +17018,7 @@ var init_Breadcrumb = __esm({
|
|
|
16597
17018
|
),
|
|
16598
17019
|
"aria-current": isLast ? "page" : void 0,
|
|
16599
17020
|
children: [
|
|
16600
|
-
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" })),
|
|
16601
17022
|
/* @__PURE__ */ jsx(
|
|
16602
17023
|
Typography,
|
|
16603
17024
|
{
|
|
@@ -16624,7 +17045,7 @@ var init_Breadcrumb = __esm({
|
|
|
16624
17045
|
"aria-current": isLast ? "page" : void 0,
|
|
16625
17046
|
disabled: isLast,
|
|
16626
17047
|
children: [
|
|
16627
|
-
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" })),
|
|
16628
17049
|
/* @__PURE__ */ jsx(
|
|
16629
17050
|
Typography,
|
|
16630
17051
|
{
|
|
@@ -16636,14 +17057,7 @@ var init_Breadcrumb = __esm({
|
|
|
16636
17057
|
]
|
|
16637
17058
|
}
|
|
16638
17059
|
),
|
|
16639
|
-
!isLast && /* @__PURE__ */ jsx(
|
|
16640
|
-
Icon,
|
|
16641
|
-
{
|
|
16642
|
-
icon: separator,
|
|
16643
|
-
size: "sm",
|
|
16644
|
-
className: "text-muted-foreground"
|
|
16645
|
-
}
|
|
16646
|
-
)
|
|
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" }))
|
|
16647
17061
|
] }, index);
|
|
16648
17062
|
}) })
|
|
16649
17063
|
}
|
|
@@ -17164,7 +17578,7 @@ function CalendarGrid({
|
|
|
17164
17578
|
{
|
|
17165
17579
|
variant: "ghost",
|
|
17166
17580
|
size: "sm",
|
|
17167
|
-
icon:
|
|
17581
|
+
icon: "chevron-left",
|
|
17168
17582
|
onClick: stepPrev,
|
|
17169
17583
|
"aria-disabled": !canPrev || void 0,
|
|
17170
17584
|
"aria-label": "Previous days",
|
|
@@ -17177,7 +17591,7 @@ function CalendarGrid({
|
|
|
17177
17591
|
{
|
|
17178
17592
|
variant: "ghost",
|
|
17179
17593
|
size: "sm",
|
|
17180
|
-
iconRight:
|
|
17594
|
+
iconRight: "chevron-right",
|
|
17181
17595
|
onClick: stepNext,
|
|
17182
17596
|
"aria-disabled": !canNext || void 0,
|
|
17183
17597
|
"aria-label": "Next days",
|
|
@@ -19223,7 +19637,7 @@ var init_Carousel = __esm({
|
|
|
19223
19637
|
Box,
|
|
19224
19638
|
{
|
|
19225
19639
|
className: cn(
|
|
19226
|
-
"rounded-full cursor-pointer transition-all duration-
|
|
19640
|
+
"rounded-full cursor-pointer transition-all duration-fast"
|
|
19227
19641
|
),
|
|
19228
19642
|
style: {
|
|
19229
19643
|
width: isActive ? 10 : 8,
|
|
@@ -20315,7 +20729,7 @@ var init_CodeExample = __esm({
|
|
|
20315
20729
|
{
|
|
20316
20730
|
className: cn(
|
|
20317
20731
|
"bg-foreground",
|
|
20318
|
-
"rounded-
|
|
20732
|
+
"rounded-container",
|
|
20319
20733
|
"border-[length:var(--border-width)] border-border",
|
|
20320
20734
|
"overflow-hidden",
|
|
20321
20735
|
className
|
|
@@ -21091,7 +21505,7 @@ function CounterMinimal({
|
|
|
21091
21505
|
size: sizeStyles9[size].button,
|
|
21092
21506
|
onClick: onDecrement,
|
|
21093
21507
|
disabled: resolved.decrementDisabled,
|
|
21094
|
-
icon:
|
|
21508
|
+
icon: "minus",
|
|
21095
21509
|
children: resolved.decrementLabel
|
|
21096
21510
|
}
|
|
21097
21511
|
),
|
|
@@ -21113,7 +21527,7 @@ function CounterMinimal({
|
|
|
21113
21527
|
size: sizeStyles9[size].button,
|
|
21114
21528
|
onClick: onIncrement,
|
|
21115
21529
|
disabled: resolved.incrementDisabled,
|
|
21116
|
-
icon:
|
|
21530
|
+
icon: "plus",
|
|
21117
21531
|
children: resolved.incrementLabel
|
|
21118
21532
|
}
|
|
21119
21533
|
)
|
|
@@ -21159,7 +21573,7 @@ function CounterStandard({
|
|
|
21159
21573
|
size: sizeStyles9[size].button,
|
|
21160
21574
|
onClick: onDecrement,
|
|
21161
21575
|
disabled: resolved.decrementDisabled,
|
|
21162
|
-
icon:
|
|
21576
|
+
icon: "minus"
|
|
21163
21577
|
}
|
|
21164
21578
|
),
|
|
21165
21579
|
/* @__PURE__ */ jsx(
|
|
@@ -21169,7 +21583,7 @@ function CounterStandard({
|
|
|
21169
21583
|
size: sizeStyles9[size].button,
|
|
21170
21584
|
onClick: onIncrement,
|
|
21171
21585
|
disabled: resolved.incrementDisabled,
|
|
21172
|
-
icon:
|
|
21586
|
+
icon: "plus"
|
|
21173
21587
|
}
|
|
21174
21588
|
)
|
|
21175
21589
|
] }),
|
|
@@ -21179,7 +21593,7 @@ function CounterStandard({
|
|
|
21179
21593
|
variant: "ghost",
|
|
21180
21594
|
size: "sm",
|
|
21181
21595
|
onClick: onReset,
|
|
21182
|
-
icon:
|
|
21596
|
+
icon: "rotate-ccw",
|
|
21183
21597
|
children: "Reset"
|
|
21184
21598
|
}
|
|
21185
21599
|
)
|
|
@@ -21228,7 +21642,7 @@ function CounterFull({
|
|
|
21228
21642
|
size: sizeStyles9[size].button,
|
|
21229
21643
|
onClick: onDecrement,
|
|
21230
21644
|
disabled: resolved.decrementDisabled,
|
|
21231
|
-
icon:
|
|
21645
|
+
icon: "minus",
|
|
21232
21646
|
children: resolved.decrementLabel
|
|
21233
21647
|
}
|
|
21234
21648
|
),
|
|
@@ -21239,7 +21653,7 @@ function CounterFull({
|
|
|
21239
21653
|
size: sizeStyles9[size].button,
|
|
21240
21654
|
onClick: onIncrement,
|
|
21241
21655
|
disabled: resolved.incrementDisabled,
|
|
21242
|
-
icon:
|
|
21656
|
+
icon: "plus",
|
|
21243
21657
|
children: resolved.incrementLabel
|
|
21244
21658
|
}
|
|
21245
21659
|
)
|
|
@@ -21250,7 +21664,7 @@ function CounterFull({
|
|
|
21250
21664
|
variant: "ghost",
|
|
21251
21665
|
size: "sm",
|
|
21252
21666
|
onClick: onReset,
|
|
21253
|
-
icon:
|
|
21667
|
+
icon: "rotate-ccw",
|
|
21254
21668
|
children: "Reset to 0"
|
|
21255
21669
|
}
|
|
21256
21670
|
)
|
|
@@ -21298,7 +21712,7 @@ function CraftingRecipe({
|
|
|
21298
21712
|
className
|
|
21299
21713
|
}) {
|
|
21300
21714
|
const eventBus = useEventBus();
|
|
21301
|
-
const handleCraft =
|
|
21715
|
+
const handleCraft = React86.useCallback(() => {
|
|
21302
21716
|
onCraft?.();
|
|
21303
21717
|
if (craftEvent) {
|
|
21304
21718
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21315,7 +21729,7 @@ function CraftingRecipe({
|
|
|
21315
21729
|
children: [
|
|
21316
21730
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21317
21731
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21318
|
-
return /* @__PURE__ */ jsxs(
|
|
21732
|
+
return /* @__PURE__ */ jsxs(React86.Fragment, { children: [
|
|
21319
21733
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21320
21734
|
ItemSlot,
|
|
21321
21735
|
{
|
|
@@ -21378,8 +21792,8 @@ function DPad({
|
|
|
21378
21792
|
}) {
|
|
21379
21793
|
const eventBus = useEventBus();
|
|
21380
21794
|
const sizes = sizeMap15[size];
|
|
21381
|
-
const [activeDirections, setActiveDirections] =
|
|
21382
|
-
const handlePress =
|
|
21795
|
+
const [activeDirections, setActiveDirections] = React86.useState(/* @__PURE__ */ new Set());
|
|
21796
|
+
const handlePress = React86.useCallback(
|
|
21383
21797
|
(direction) => {
|
|
21384
21798
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21385
21799
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21387,7 +21801,7 @@ function DPad({
|
|
|
21387
21801
|
},
|
|
21388
21802
|
[directionEvent, eventBus, onDirection]
|
|
21389
21803
|
);
|
|
21390
|
-
const handleRelease =
|
|
21804
|
+
const handleRelease = React86.useCallback(
|
|
21391
21805
|
(direction) => {
|
|
21392
21806
|
setActiveDirections((prev) => {
|
|
21393
21807
|
const next = new Set(prev);
|
|
@@ -21652,7 +22066,7 @@ var init_DashboardLayout = __esm({
|
|
|
21652
22066
|
variant: "ghost",
|
|
21653
22067
|
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
21654
22068
|
onClick: () => setSidebarOpen(false),
|
|
21655
|
-
children: /* @__PURE__ */ jsx(
|
|
22069
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-5 w-5" })
|
|
21656
22070
|
}
|
|
21657
22071
|
)
|
|
21658
22072
|
]
|
|
@@ -21698,7 +22112,7 @@ var init_DashboardLayout = __esm({
|
|
|
21698
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",
|
|
21699
22113
|
onClick: () => setSidebarOpen(true),
|
|
21700
22114
|
"aria-label": "Open sidebar",
|
|
21701
|
-
children: /* @__PURE__ */ jsx(
|
|
22115
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "menu", className: "h-5 w-5" })
|
|
21702
22116
|
}
|
|
21703
22117
|
),
|
|
21704
22118
|
isTopNav && /* @__PURE__ */ jsxs(
|
|
@@ -21741,7 +22155,7 @@ var init_DashboardLayout = __esm({
|
|
|
21741
22155
|
}
|
|
21742
22156
|
),
|
|
21743
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: [
|
|
21744
|
-
/* @__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" }),
|
|
21745
22159
|
/* @__PURE__ */ jsx(
|
|
21746
22160
|
Input,
|
|
21747
22161
|
{
|
|
@@ -21792,7 +22206,7 @@ var init_DashboardLayout = __esm({
|
|
|
21792
22206
|
onClick: handleNotificationClick,
|
|
21793
22207
|
"aria-label": t("common.notifications"),
|
|
21794
22208
|
children: [
|
|
21795
|
-
/* @__PURE__ */ jsx(
|
|
22209
|
+
/* @__PURE__ */ jsx(Icon, { name: "bell", className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
21796
22210
|
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
21797
22211
|
Box,
|
|
21798
22212
|
{
|
|
@@ -21830,7 +22244,7 @@ var init_DashboardLayout = __esm({
|
|
|
21830
22244
|
children: user.name
|
|
21831
22245
|
}
|
|
21832
22246
|
),
|
|
21833
|
-
/* @__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" })
|
|
21834
22248
|
]
|
|
21835
22249
|
}
|
|
21836
22250
|
),
|
|
@@ -21873,7 +22287,7 @@ var init_DashboardLayout = __esm({
|
|
|
21873
22287
|
},
|
|
21874
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",
|
|
21875
22289
|
children: [
|
|
21876
|
-
/* @__PURE__ */ jsx(
|
|
22290
|
+
/* @__PURE__ */ jsx(Icon, { name: "log-out", className: "h-4 w-4" }),
|
|
21877
22291
|
t("auth.signOut")
|
|
21878
22292
|
]
|
|
21879
22293
|
}
|
|
@@ -22055,14 +22469,14 @@ function useDataDnd(args) {
|
|
|
22055
22469
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22056
22470
|
const enabled = isZone || Boolean(dndRoot);
|
|
22057
22471
|
const eventBus = useEventBus();
|
|
22058
|
-
const parentRoot =
|
|
22472
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
22059
22473
|
const isRoot = enabled && parentRoot === null;
|
|
22060
|
-
const zoneId =
|
|
22474
|
+
const zoneId = React86__default.useId();
|
|
22061
22475
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22062
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22063
|
-
const optimisticOrdersRef =
|
|
22476
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
22477
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
22064
22478
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22065
|
-
const clearOptimisticOrder =
|
|
22479
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
22066
22480
|
setOptimisticOrders((prev) => {
|
|
22067
22481
|
if (!prev.has(group)) return prev;
|
|
22068
22482
|
const next = new Map(prev);
|
|
@@ -22087,7 +22501,7 @@ function useDataDnd(args) {
|
|
|
22087
22501
|
const raw = it[dndItemIdField];
|
|
22088
22502
|
return String(raw ?? `__idx_${idx}`);
|
|
22089
22503
|
}).join("|");
|
|
22090
|
-
const itemIds =
|
|
22504
|
+
const itemIds = React86__default.useMemo(
|
|
22091
22505
|
() => orderedItems.map((it, idx) => {
|
|
22092
22506
|
const raw = it[dndItemIdField];
|
|
22093
22507
|
return raw ?? `__idx_${idx}`;
|
|
@@ -22095,7 +22509,7 @@ function useDataDnd(args) {
|
|
|
22095
22509
|
[itemIdsSignature]
|
|
22096
22510
|
);
|
|
22097
22511
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
22098
|
-
|
|
22512
|
+
React86__default.useEffect(() => {
|
|
22099
22513
|
const root = isRoot ? null : parentRoot;
|
|
22100
22514
|
if (root) {
|
|
22101
22515
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22103,20 +22517,20 @@ function useDataDnd(args) {
|
|
|
22103
22517
|
clearOptimisticOrder(ownGroup);
|
|
22104
22518
|
}
|
|
22105
22519
|
}, [itemsContentSig, ownGroup]);
|
|
22106
|
-
const zonesRef =
|
|
22107
|
-
const registerZone =
|
|
22520
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
22521
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
22108
22522
|
zonesRef.current.set(zoneId2, meta2);
|
|
22109
22523
|
}, []);
|
|
22110
|
-
const unregisterZone =
|
|
22524
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
22111
22525
|
zonesRef.current.delete(zoneId2);
|
|
22112
22526
|
}, []);
|
|
22113
|
-
const [activeDrag, setActiveDrag] =
|
|
22114
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22115
|
-
const meta =
|
|
22527
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
22528
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
22529
|
+
const meta = React86__default.useMemo(
|
|
22116
22530
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22117
22531
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22118
22532
|
);
|
|
22119
|
-
|
|
22533
|
+
React86__default.useEffect(() => {
|
|
22120
22534
|
const target = isRoot ? null : parentRoot;
|
|
22121
22535
|
if (!target) {
|
|
22122
22536
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22135,7 +22549,7 @@ function useDataDnd(args) {
|
|
|
22135
22549
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22136
22550
|
const sensors = useAlmadarDndSensors(true);
|
|
22137
22551
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22138
|
-
const findZoneByItem =
|
|
22552
|
+
const findZoneByItem = React86__default.useCallback(
|
|
22139
22553
|
(id) => {
|
|
22140
22554
|
for (const z of zonesRef.current.values()) {
|
|
22141
22555
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22144,7 +22558,7 @@ function useDataDnd(args) {
|
|
|
22144
22558
|
},
|
|
22145
22559
|
[]
|
|
22146
22560
|
);
|
|
22147
|
-
|
|
22561
|
+
React86__default.useCallback(
|
|
22148
22562
|
(group) => {
|
|
22149
22563
|
for (const z of zonesRef.current.values()) {
|
|
22150
22564
|
if (z.group === group) return z;
|
|
@@ -22153,7 +22567,7 @@ function useDataDnd(args) {
|
|
|
22153
22567
|
},
|
|
22154
22568
|
[]
|
|
22155
22569
|
);
|
|
22156
|
-
const handleDragEnd =
|
|
22570
|
+
const handleDragEnd = React86__default.useCallback(
|
|
22157
22571
|
(event) => {
|
|
22158
22572
|
const { active, over } = event;
|
|
22159
22573
|
const activeIdStr = String(active.id);
|
|
@@ -22244,12 +22658,12 @@ function useDataDnd(args) {
|
|
|
22244
22658
|
},
|
|
22245
22659
|
[eventBus]
|
|
22246
22660
|
);
|
|
22247
|
-
const sortableData =
|
|
22248
|
-
const SortableItem =
|
|
22661
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22662
|
+
const SortableItem = React86__default.useCallback(
|
|
22249
22663
|
({ id, children }) => {
|
|
22250
22664
|
const {
|
|
22251
22665
|
attributes,
|
|
22252
|
-
listeners:
|
|
22666
|
+
listeners: listeners7,
|
|
22253
22667
|
setNodeRef,
|
|
22254
22668
|
transform,
|
|
22255
22669
|
transition,
|
|
@@ -22272,7 +22686,7 @@ function useDataDnd(args) {
|
|
|
22272
22686
|
ref: setNodeRef,
|
|
22273
22687
|
style,
|
|
22274
22688
|
...attributes,
|
|
22275
|
-
...
|
|
22689
|
+
...listeners7,
|
|
22276
22690
|
children
|
|
22277
22691
|
}
|
|
22278
22692
|
);
|
|
@@ -22285,7 +22699,7 @@ function useDataDnd(args) {
|
|
|
22285
22699
|
id: droppableId,
|
|
22286
22700
|
data: sortableData
|
|
22287
22701
|
});
|
|
22288
|
-
const ctx =
|
|
22702
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
22289
22703
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22290
22704
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22291
22705
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22300,7 +22714,7 @@ function useDataDnd(args) {
|
|
|
22300
22714
|
showForeignPlaceholder,
|
|
22301
22715
|
ctxAvailable: ctx != null
|
|
22302
22716
|
});
|
|
22303
|
-
|
|
22717
|
+
React86__default.useEffect(() => {
|
|
22304
22718
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22305
22719
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22306
22720
|
return /* @__PURE__ */ jsx(
|
|
@@ -22314,11 +22728,11 @@ function useDataDnd(args) {
|
|
|
22314
22728
|
}
|
|
22315
22729
|
);
|
|
22316
22730
|
};
|
|
22317
|
-
const rootContextValue =
|
|
22731
|
+
const rootContextValue = React86__default.useMemo(
|
|
22318
22732
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22319
22733
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22320
22734
|
);
|
|
22321
|
-
const handleDragStart =
|
|
22735
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
22322
22736
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22323
22737
|
const rect = event.active.rect.current.initial;
|
|
22324
22738
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22337,7 +22751,7 @@ function useDataDnd(args) {
|
|
|
22337
22751
|
isRoot
|
|
22338
22752
|
});
|
|
22339
22753
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22340
|
-
const handleDragOver =
|
|
22754
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
22341
22755
|
const { active, over } = event;
|
|
22342
22756
|
const overData = over?.data?.current;
|
|
22343
22757
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22407,7 +22821,7 @@ function useDataDnd(args) {
|
|
|
22407
22821
|
return next;
|
|
22408
22822
|
});
|
|
22409
22823
|
}, []);
|
|
22410
|
-
const handleDragCancel =
|
|
22824
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
22411
22825
|
setActiveDrag(null);
|
|
22412
22826
|
setOverZoneGroup(null);
|
|
22413
22827
|
dndLog.warn("dragCancel", {
|
|
@@ -22415,12 +22829,12 @@ function useDataDnd(args) {
|
|
|
22415
22829
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22416
22830
|
});
|
|
22417
22831
|
}, []);
|
|
22418
|
-
const handleDragEndWithCleanup =
|
|
22832
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
22419
22833
|
handleDragEnd(event);
|
|
22420
22834
|
setActiveDrag(null);
|
|
22421
22835
|
setOverZoneGroup(null);
|
|
22422
22836
|
}, [handleDragEnd]);
|
|
22423
|
-
const wrapContainer =
|
|
22837
|
+
const wrapContainer = React86__default.useCallback(
|
|
22424
22838
|
(children) => {
|
|
22425
22839
|
if (!enabled) return children;
|
|
22426
22840
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22474,7 +22888,7 @@ var init_useDataDnd = __esm({
|
|
|
22474
22888
|
init_useAlmadarDndCollision();
|
|
22475
22889
|
init_Box();
|
|
22476
22890
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22477
|
-
RootCtx =
|
|
22891
|
+
RootCtx = React86__default.createContext(null);
|
|
22478
22892
|
}
|
|
22479
22893
|
});
|
|
22480
22894
|
function fieldLabel2(key) {
|
|
@@ -22696,7 +23110,7 @@ function DataGrid({
|
|
|
22696
23110
|
className: cn(
|
|
22697
23111
|
"bg-card rounded-lg",
|
|
22698
23112
|
"border border-border",
|
|
22699
|
-
"shadow-
|
|
23113
|
+
"shadow-elevation-card hover:shadow-elevation-dialog",
|
|
22700
23114
|
"hover:border-primary transition-all",
|
|
22701
23115
|
"flex flex-col",
|
|
22702
23116
|
isSelected && "ring-2 ring-primary border-primary"
|
|
@@ -22963,7 +23377,7 @@ function DataList({
|
|
|
22963
23377
|
}) {
|
|
22964
23378
|
const eventBus = useEventBus();
|
|
22965
23379
|
const { t } = useTranslate();
|
|
22966
|
-
const [visibleCount, setVisibleCount] =
|
|
23380
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
22967
23381
|
const fieldDefs = fields ?? columns ?? [];
|
|
22968
23382
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22969
23383
|
const dnd = useDataDnd({
|
|
@@ -22982,7 +23396,7 @@ function DataList({
|
|
|
22982
23396
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22983
23397
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22984
23398
|
const hasRenderProp = typeof children === "function";
|
|
22985
|
-
|
|
23399
|
+
React86__default.useEffect(() => {
|
|
22986
23400
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22987
23401
|
const childrenTypeOf = typeof children;
|
|
22988
23402
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23039,7 +23453,7 @@ function DataList({
|
|
|
23039
23453
|
const items2 = data.map((item) => item);
|
|
23040
23454
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
23041
23455
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
23042
|
-
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: [
|
|
23043
23457
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23044
23458
|
group.items.map((itemData, index) => {
|
|
23045
23459
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23070,7 +23484,7 @@ function DataList({
|
|
|
23070
23484
|
{
|
|
23071
23485
|
variant: "caption",
|
|
23072
23486
|
className: cn(
|
|
23073
|
-
"mt-1 text-
|
|
23487
|
+
"mt-1 text-xs",
|
|
23074
23488
|
isSent ? "opacity-70" : "text-muted-foreground"
|
|
23075
23489
|
),
|
|
23076
23490
|
children: formatDate3(timestamp)
|
|
@@ -23135,7 +23549,7 @@ function DataList({
|
|
|
23135
23549
|
Box,
|
|
23136
23550
|
{
|
|
23137
23551
|
className: cn(
|
|
23138
|
-
"group flex items-center gap-4 transition-all duration-
|
|
23552
|
+
"group flex items-center gap-4 transition-all duration-fast",
|
|
23139
23553
|
isCompact ? "px-4 py-2" : "px-6 py-4",
|
|
23140
23554
|
"hover:bg-muted/80",
|
|
23141
23555
|
!isCard && !isCompact && "rounded-lg border border-transparent hover:border-border"
|
|
@@ -23222,12 +23636,12 @@ function DataList({
|
|
|
23222
23636
|
Box,
|
|
23223
23637
|
{
|
|
23224
23638
|
className: cn(
|
|
23225
|
-
isCard && "bg-card rounded-xl border border-border shadow-
|
|
23639
|
+
isCard && "bg-card rounded-xl border border-border shadow-elevation-dialog overflow-hidden",
|
|
23226
23640
|
!isCard && gapClass,
|
|
23227
23641
|
className
|
|
23228
23642
|
),
|
|
23229
23643
|
children: [
|
|
23230
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23644
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
23231
23645
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23232
23646
|
group.items.map(
|
|
23233
23647
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23364,7 +23778,7 @@ var init_FileTree = __esm({
|
|
|
23364
23778
|
Typography,
|
|
23365
23779
|
{
|
|
23366
23780
|
variant: "caption",
|
|
23367
|
-
className: `truncate font-mono text-
|
|
23781
|
+
className: `truncate font-mono text-xs !text-inherit ${isSelected ? "font-semibold" : ""}`,
|
|
23368
23782
|
children: node.name
|
|
23369
23783
|
}
|
|
23370
23784
|
),
|
|
@@ -23517,6 +23931,7 @@ var init_FilterGroup = __esm({
|
|
|
23517
23931
|
init_Select();
|
|
23518
23932
|
init_Badge();
|
|
23519
23933
|
init_Stack();
|
|
23934
|
+
init_Icon();
|
|
23520
23935
|
init_useEventBus();
|
|
23521
23936
|
init_useQuerySingleton();
|
|
23522
23937
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
@@ -23585,7 +24000,7 @@ var init_FilterGroup = __esm({
|
|
|
23585
24000
|
const activeFilterCount = Object.keys(selectedValues).length;
|
|
23586
24001
|
if (variant === "pills") {
|
|
23587
24002
|
return /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: cn("flex-wrap", className), children: [
|
|
23588
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
24003
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23589
24004
|
filters.map((filter) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
23590
24005
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-[var(--font-weight-medium)] text-muted-foreground", children: [
|
|
23591
24006
|
filter.label,
|
|
@@ -23633,7 +24048,7 @@ var init_FilterGroup = __esm({
|
|
|
23633
24048
|
variant: "ghost",
|
|
23634
24049
|
size: "sm",
|
|
23635
24050
|
onClick: handleClearAll,
|
|
23636
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24051
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23637
24052
|
children: "Clear"
|
|
23638
24053
|
}
|
|
23639
24054
|
)
|
|
@@ -23642,7 +24057,7 @@ var init_FilterGroup = __esm({
|
|
|
23642
24057
|
if (variant === "vertical") {
|
|
23643
24058
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
23644
24059
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
23645
|
-
/* @__PURE__ */ jsx(
|
|
24060
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23646
24061
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23647
24062
|
] }),
|
|
23648
24063
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -23715,7 +24130,7 @@ var init_FilterGroup = __esm({
|
|
|
23715
24130
|
variant: "ghost",
|
|
23716
24131
|
size: "sm",
|
|
23717
24132
|
onClick: handleClearAll,
|
|
23718
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24133
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23719
24134
|
className: "self-start",
|
|
23720
24135
|
children: "Clear all"
|
|
23721
24136
|
}
|
|
@@ -23724,7 +24139,7 @@ var init_FilterGroup = __esm({
|
|
|
23724
24139
|
}
|
|
23725
24140
|
if (variant === "compact") {
|
|
23726
24141
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: cn("flex-wrap", className), children: [
|
|
23727
|
-
showIcon && /* @__PURE__ */ jsx(
|
|
24142
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
|
|
23728
24143
|
filters.map((filter) => /* @__PURE__ */ jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsx(
|
|
23729
24144
|
Input,
|
|
23730
24145
|
{
|
|
@@ -23800,7 +24215,7 @@ var init_FilterGroup = __esm({
|
|
|
23800
24215
|
filterDef?.label,
|
|
23801
24216
|
": ",
|
|
23802
24217
|
value,
|
|
23803
|
-
/* @__PURE__ */ jsx(
|
|
24218
|
+
/* @__PURE__ */ jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
|
|
23804
24219
|
]
|
|
23805
24220
|
},
|
|
23806
24221
|
field
|
|
@@ -23814,7 +24229,7 @@ var init_FilterGroup = __esm({
|
|
|
23814
24229
|
"div",
|
|
23815
24230
|
{
|
|
23816
24231
|
className: cn(
|
|
23817
|
-
"p-4 rounded-
|
|
24232
|
+
"p-4 rounded-container",
|
|
23818
24233
|
"bg-card",
|
|
23819
24234
|
"border-[length:var(--border-width)] border-border",
|
|
23820
24235
|
className
|
|
@@ -23827,7 +24242,7 @@ var init_FilterGroup = __esm({
|
|
|
23827
24242
|
align: "center",
|
|
23828
24243
|
className: "text-muted-foreground",
|
|
23829
24244
|
children: [
|
|
23830
|
-
/* @__PURE__ */ jsx(
|
|
24245
|
+
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
23831
24246
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-[var(--font-weight-bold)] uppercase tracking-wide", children: "Filters" })
|
|
23832
24247
|
]
|
|
23833
24248
|
}
|
|
@@ -23913,7 +24328,7 @@ var init_FilterGroup = __esm({
|
|
|
23913
24328
|
variant: "ghost",
|
|
23914
24329
|
size: "sm",
|
|
23915
24330
|
onClick: handleClearAll,
|
|
23916
|
-
leftIcon: /* @__PURE__ */ jsx(
|
|
24331
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
23917
24332
|
children: "Clear all"
|
|
23918
24333
|
}
|
|
23919
24334
|
)
|
|
@@ -24130,6 +24545,7 @@ var init_RelationSelect = __esm({
|
|
|
24130
24545
|
"use client";
|
|
24131
24546
|
init_cn();
|
|
24132
24547
|
init_Box();
|
|
24548
|
+
init_Icon();
|
|
24133
24549
|
init_Stack();
|
|
24134
24550
|
init_Input();
|
|
24135
24551
|
init_Button();
|
|
@@ -24273,12 +24689,13 @@ var init_RelationSelect = __esm({
|
|
|
24273
24689
|
as: "button",
|
|
24274
24690
|
className: "p-0.5 hover:bg-muted rounded cursor-pointer",
|
|
24275
24691
|
onClick: handleClear,
|
|
24276
|
-
children: /* @__PURE__ */ jsx(
|
|
24692
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-4 w-4 text-muted-foreground" })
|
|
24277
24693
|
}
|
|
24278
24694
|
),
|
|
24279
24695
|
/* @__PURE__ */ jsx(
|
|
24280
|
-
|
|
24696
|
+
Icon,
|
|
24281
24697
|
{
|
|
24698
|
+
name: "chevron-down",
|
|
24282
24699
|
className: cn(
|
|
24283
24700
|
"h-4 w-4 text-muted-foreground transition-transform",
|
|
24284
24701
|
isOpen && "transform rotate-180"
|
|
@@ -24496,7 +24913,7 @@ var init_SidePanel = __esm({
|
|
|
24496
24913
|
"border-l-2 border-border",
|
|
24497
24914
|
position === "left" && "border-l-0 border-r-2",
|
|
24498
24915
|
"flex flex-col",
|
|
24499
|
-
"transition-transform duration-
|
|
24916
|
+
"transition-transform duration-normal ease-standard",
|
|
24500
24917
|
width,
|
|
24501
24918
|
position === "right" ? "right-0" : "left-0",
|
|
24502
24919
|
className
|
|
@@ -24509,7 +24926,7 @@ var init_SidePanel = __esm({
|
|
|
24509
24926
|
{
|
|
24510
24927
|
variant: "ghost",
|
|
24511
24928
|
size: "sm",
|
|
24512
|
-
icon:
|
|
24929
|
+
icon: "x",
|
|
24513
24930
|
onClick: handleClose,
|
|
24514
24931
|
"aria-label": "Close panel",
|
|
24515
24932
|
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
@@ -24567,7 +24984,7 @@ var init_WizardProgress = __esm({
|
|
|
24567
24984
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24568
24985
|
const isActive = index === currentStep;
|
|
24569
24986
|
const isCompleted = index < currentStep;
|
|
24570
|
-
return /* @__PURE__ */ jsxs(
|
|
24987
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
24571
24988
|
/* @__PURE__ */ jsx(
|
|
24572
24989
|
"button",
|
|
24573
24990
|
{
|
|
@@ -24581,7 +24998,7 @@ var init_WizardProgress = __esm({
|
|
|
24581
24998
|
isCompleted && "bg-foreground text-background cursor-pointer hover:bg-muted-foreground",
|
|
24582
24999
|
!isActive && !isCompleted && "bg-card text-foreground"
|
|
24583
25000
|
),
|
|
24584
|
-
children: isCompleted ? /* @__PURE__ */ jsx(Icon, {
|
|
25001
|
+
children: isCompleted ? /* @__PURE__ */ jsx(Icon, { name: "check", size: "sm" }) : index + 1
|
|
24585
25002
|
}
|
|
24586
25003
|
),
|
|
24587
25004
|
!compact && /* @__PURE__ */ jsx(
|
|
@@ -24700,13 +25117,13 @@ var init_WizardNavigation = __esm({
|
|
|
24700
25117
|
),
|
|
24701
25118
|
children: [
|
|
24702
25119
|
showBack ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", onClick: handleBack, disabled: isFirstStep, children: [
|
|
24703
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
25120
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "sm" }),
|
|
24704
25121
|
resolvedBackLabel
|
|
24705
25122
|
] }) : /* @__PURE__ */ jsx(Box, {}),
|
|
24706
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) }) }) }),
|
|
24707
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: [
|
|
24708
25125
|
resolvedNextLabel,
|
|
24709
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
25126
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm" })
|
|
24710
25127
|
] }) : /* @__PURE__ */ jsx(Box, {})
|
|
24711
25128
|
]
|
|
24712
25129
|
}
|
|
@@ -24898,7 +25315,7 @@ var init_ViolationAlert = __esm({
|
|
|
24898
25315
|
Box,
|
|
24899
25316
|
{
|
|
24900
25317
|
className: cn(
|
|
24901
|
-
"px-3 py-2 rounded-
|
|
25318
|
+
"px-3 py-2 rounded-container border",
|
|
24902
25319
|
bgColor,
|
|
24903
25320
|
className
|
|
24904
25321
|
),
|
|
@@ -25159,7 +25576,7 @@ var init_FlipCard = __esm({
|
|
|
25159
25576
|
/* @__PURE__ */ jsx(
|
|
25160
25577
|
Box,
|
|
25161
25578
|
{
|
|
25162
|
-
className: "absolute inset-0 w-full h-full rounded-lg shadow-
|
|
25579
|
+
className: "absolute inset-0 w-full h-full rounded-lg shadow-elevation-dialog flex items-center justify-center p-6",
|
|
25163
25580
|
style: { backfaceVisibility: "hidden", transform: "rotateY(0deg)" },
|
|
25164
25581
|
children: front
|
|
25165
25582
|
}
|
|
@@ -25167,7 +25584,7 @@ var init_FlipCard = __esm({
|
|
|
25167
25584
|
/* @__PURE__ */ jsx(
|
|
25168
25585
|
Box,
|
|
25169
25586
|
{
|
|
25170
|
-
className: "absolute inset-0 w-full h-full rounded-lg shadow-
|
|
25587
|
+
className: "absolute inset-0 w-full h-full rounded-lg shadow-elevation-dialog flex items-center justify-center p-6",
|
|
25171
25588
|
style: { backfaceVisibility: "hidden", transform: "rotateY(180deg)" },
|
|
25172
25589
|
children: back
|
|
25173
25590
|
}
|
|
@@ -25512,7 +25929,7 @@ var init_ProgressDots = __esm({
|
|
|
25512
25929
|
Box,
|
|
25513
25930
|
{
|
|
25514
25931
|
className: cn(
|
|
25515
|
-
"rounded-full transition-all duration-
|
|
25932
|
+
"rounded-full transition-all duration-fast",
|
|
25516
25933
|
onDotClick && "cursor-pointer"
|
|
25517
25934
|
),
|
|
25518
25935
|
style: {
|
|
@@ -25554,10 +25971,7 @@ function StatBadge({
|
|
|
25554
25971
|
className
|
|
25555
25972
|
),
|
|
25556
25973
|
children: [
|
|
25557
|
-
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? (
|
|
25558
|
-
const I = resolveIcon(icon);
|
|
25559
|
-
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : icon;
|
|
25560
|
-
})() : 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 }),
|
|
25561
25975
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
25562
25976
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
25563
25977
|
HealthBar,
|
|
@@ -25625,7 +26039,7 @@ function InventoryGrid({
|
|
|
25625
26039
|
const eventBus = useEventBus();
|
|
25626
26040
|
const slotCount = totalSlots ?? items.length;
|
|
25627
26041
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
25628
|
-
const handleSelect =
|
|
26042
|
+
const handleSelect = React86.useCallback(
|
|
25629
26043
|
(id) => {
|
|
25630
26044
|
onSelect?.(id);
|
|
25631
26045
|
if (selectEvent) {
|
|
@@ -25838,15 +26252,15 @@ function GameCanvas2D({
|
|
|
25838
26252
|
fps = 60,
|
|
25839
26253
|
className
|
|
25840
26254
|
}) {
|
|
25841
|
-
const canvasRef =
|
|
25842
|
-
const rafRef =
|
|
25843
|
-
const frameRef =
|
|
25844
|
-
const lastTimeRef =
|
|
25845
|
-
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);
|
|
25846
26260
|
onDrawRef.current = onDraw;
|
|
25847
|
-
const onTickRef =
|
|
26261
|
+
const onTickRef = React86.useRef(onTick);
|
|
25848
26262
|
onTickRef.current = onTick;
|
|
25849
|
-
|
|
26263
|
+
React86.useEffect(() => {
|
|
25850
26264
|
const canvas = canvasRef.current;
|
|
25851
26265
|
if (!canvas) return;
|
|
25852
26266
|
const ctx = canvas.getContext("2d");
|
|
@@ -26135,7 +26549,7 @@ function TurnPanel({
|
|
|
26135
26549
|
className
|
|
26136
26550
|
}) {
|
|
26137
26551
|
const eventBus = useEventBus();
|
|
26138
|
-
const handleAction =
|
|
26552
|
+
const handleAction = React86.useCallback(
|
|
26139
26553
|
(event) => {
|
|
26140
26554
|
if (event) {
|
|
26141
26555
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -26281,7 +26695,7 @@ function UnitCommandBar({
|
|
|
26281
26695
|
className
|
|
26282
26696
|
}) {
|
|
26283
26697
|
const eventBus = useEventBus();
|
|
26284
|
-
const handleCommand =
|
|
26698
|
+
const handleCommand = React86.useCallback(
|
|
26285
26699
|
(event) => {
|
|
26286
26700
|
if (event) {
|
|
26287
26701
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -26766,7 +27180,7 @@ function GameMenu({
|
|
|
26766
27180
|
} catch {
|
|
26767
27181
|
}
|
|
26768
27182
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26769
|
-
const handleOptionClick =
|
|
27183
|
+
const handleOptionClick = React86.useCallback(
|
|
26770
27184
|
(option) => {
|
|
26771
27185
|
if (option.event && eventBus) {
|
|
26772
27186
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26880,7 +27294,7 @@ function GameOverScreen({
|
|
|
26880
27294
|
} catch {
|
|
26881
27295
|
}
|
|
26882
27296
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26883
|
-
const handleActionClick =
|
|
27297
|
+
const handleActionClick = React86.useCallback(
|
|
26884
27298
|
(action) => {
|
|
26885
27299
|
if (action.event && eventBus) {
|
|
26886
27300
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -27588,6 +28002,7 @@ var init_NumberStepper = __esm({
|
|
|
27588
28002
|
"components/molecules/NumberStepper.tsx"() {
|
|
27589
28003
|
"use client";
|
|
27590
28004
|
init_cn();
|
|
28005
|
+
init_Icon();
|
|
27591
28006
|
init_useEventBus();
|
|
27592
28007
|
sizeStyles10 = {
|
|
27593
28008
|
sm: {
|
|
@@ -27706,7 +28121,7 @@ var init_NumberStepper = __esm({
|
|
|
27706
28121
|
styles.button
|
|
27707
28122
|
),
|
|
27708
28123
|
"aria-label": "Decrease",
|
|
27709
|
-
children: /* @__PURE__ */ jsx(
|
|
28124
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "minus", className: styles.icon })
|
|
27710
28125
|
}
|
|
27711
28126
|
),
|
|
27712
28127
|
/* @__PURE__ */ jsx(
|
|
@@ -27747,7 +28162,7 @@ var init_NumberStepper = __esm({
|
|
|
27747
28162
|
styles.button
|
|
27748
28163
|
),
|
|
27749
28164
|
"aria-label": "Increase",
|
|
27750
|
-
children: /* @__PURE__ */ jsx(
|
|
28165
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: styles.icon })
|
|
27751
28166
|
}
|
|
27752
28167
|
)
|
|
27753
28168
|
]
|
|
@@ -27772,6 +28187,7 @@ var init_StarRating = __esm({
|
|
|
27772
28187
|
"components/molecules/StarRating.tsx"() {
|
|
27773
28188
|
"use client";
|
|
27774
28189
|
init_cn();
|
|
28190
|
+
init_Icon();
|
|
27775
28191
|
init_useEventBus();
|
|
27776
28192
|
sizeStyles11 = {
|
|
27777
28193
|
sm: { star: "w-4 h-4", gap: "gap-0.5" },
|
|
@@ -27858,8 +28274,9 @@ var init_StarRating = __esm({
|
|
|
27858
28274
|
},
|
|
27859
28275
|
children: [
|
|
27860
28276
|
/* @__PURE__ */ jsx(
|
|
27861
|
-
|
|
28277
|
+
Icon,
|
|
27862
28278
|
{
|
|
28279
|
+
name: "star",
|
|
27863
28280
|
className: cn(
|
|
27864
28281
|
styles.star,
|
|
27865
28282
|
"text-muted",
|
|
@@ -27869,8 +28286,9 @@ var init_StarRating = __esm({
|
|
|
27869
28286
|
}
|
|
27870
28287
|
),
|
|
27871
28288
|
(isFull || isHalf) && /* @__PURE__ */ jsx(
|
|
27872
|
-
|
|
28289
|
+
Icon,
|
|
27873
28290
|
{
|
|
28291
|
+
name: "star",
|
|
27874
28292
|
className: cn(
|
|
27875
28293
|
styles.star,
|
|
27876
28294
|
"absolute inset-0",
|
|
@@ -28062,7 +28480,7 @@ var init_UploadDropZone = __esm({
|
|
|
28062
28480
|
"aria-hidden": "true"
|
|
28063
28481
|
}
|
|
28064
28482
|
),
|
|
28065
|
-
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" }),
|
|
28066
28484
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "Drop files here" : label }),
|
|
28067
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 })
|
|
28068
28486
|
]
|
|
@@ -28086,6 +28504,7 @@ var Lightbox;
|
|
|
28086
28504
|
var init_Lightbox = __esm({
|
|
28087
28505
|
"components/molecules/Lightbox.tsx"() {
|
|
28088
28506
|
"use client";
|
|
28507
|
+
init_Icon();
|
|
28089
28508
|
init_cn();
|
|
28090
28509
|
init_useEventBus();
|
|
28091
28510
|
Lightbox = ({
|
|
@@ -28193,7 +28612,7 @@ var init_Lightbox = __esm({
|
|
|
28193
28612
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28194
28613
|
),
|
|
28195
28614
|
"aria-label": "Close",
|
|
28196
|
-
children: /* @__PURE__ */ jsx(
|
|
28615
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "w-6 h-6" })
|
|
28197
28616
|
}
|
|
28198
28617
|
),
|
|
28199
28618
|
hasPrev && safeImages.length > 1 && /* @__PURE__ */ jsx(
|
|
@@ -28212,7 +28631,7 @@ var init_Lightbox = __esm({
|
|
|
28212
28631
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28213
28632
|
),
|
|
28214
28633
|
"aria-label": "Previous image",
|
|
28215
|
-
children: /* @__PURE__ */ jsx(
|
|
28634
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", className: "w-8 h-8" })
|
|
28216
28635
|
}
|
|
28217
28636
|
),
|
|
28218
28637
|
/* @__PURE__ */ jsx(
|
|
@@ -28249,7 +28668,7 @@ var init_Lightbox = __esm({
|
|
|
28249
28668
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
28250
28669
|
),
|
|
28251
28670
|
"aria-label": "Next image",
|
|
28252
|
-
children: /* @__PURE__ */ jsx(
|
|
28671
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "w-8 h-8" })
|
|
28253
28672
|
}
|
|
28254
28673
|
),
|
|
28255
28674
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
|
|
@@ -28533,7 +28952,7 @@ var init_Meter = __esm({
|
|
|
28533
28952
|
strokeDasharray: circumference,
|
|
28534
28953
|
strokeDashoffset: offset,
|
|
28535
28954
|
strokeLinecap: "round",
|
|
28536
|
-
className: "transition-all duration-
|
|
28955
|
+
className: "transition-all duration-slow ease-emphasized"
|
|
28537
28956
|
}
|
|
28538
28957
|
)
|
|
28539
28958
|
]
|
|
@@ -28576,7 +28995,7 @@ var init_Meter = __esm({
|
|
|
28576
28995
|
Box,
|
|
28577
28996
|
{
|
|
28578
28997
|
className: cn(
|
|
28579
|
-
"h-2 flex-1 rounded-sm transition-all duration-
|
|
28998
|
+
"h-2 flex-1 rounded-sm transition-all duration-normal",
|
|
28580
28999
|
!isActive && "bg-muted"
|
|
28581
29000
|
),
|
|
28582
29001
|
style: isActive ? { backgroundColor: segColor } : void 0
|
|
@@ -28595,7 +29014,7 @@ var init_Meter = __esm({
|
|
|
28595
29014
|
/* @__PURE__ */ jsx(Box, { className: "w-full h-3 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
28596
29015
|
Box,
|
|
28597
29016
|
{
|
|
28598
|
-
className: "h-full rounded-full transition-all duration-
|
|
29017
|
+
className: "h-full rounded-full transition-all duration-slow ease-emphasized",
|
|
28599
29018
|
style: {
|
|
28600
29019
|
width: `${percentage}%`,
|
|
28601
29020
|
backgroundColor: activeColor
|
|
@@ -29121,7 +29540,7 @@ var init_PullToRefresh = __esm({
|
|
|
29121
29540
|
className: cn(
|
|
29122
29541
|
"top-0 left-0 right-0 z-10",
|
|
29123
29542
|
"items-center justify-center",
|
|
29124
|
-
"transition-opacity duration-
|
|
29543
|
+
"transition-opacity duration-fast",
|
|
29125
29544
|
showIndicator ? "opacity-100" : "opacity-0"
|
|
29126
29545
|
),
|
|
29127
29546
|
style: {
|
|
@@ -29307,7 +29726,7 @@ var init_PricingCard = __esm({
|
|
|
29307
29726
|
"hover:-translate-y-1 transition-all",
|
|
29308
29727
|
highlighted && [
|
|
29309
29728
|
"border-[length:2px] border-primary",
|
|
29310
|
-
"shadow-
|
|
29729
|
+
"shadow-elevation-dialog",
|
|
29311
29730
|
"scale-[1.05]",
|
|
29312
29731
|
"ring-2 ring-primary"
|
|
29313
29732
|
],
|
|
@@ -29330,7 +29749,7 @@ var init_PricingCard = __esm({
|
|
|
29330
29749
|
/* @__PURE__ */ jsx(
|
|
29331
29750
|
Icon,
|
|
29332
29751
|
{
|
|
29333
|
-
|
|
29752
|
+
name: "check",
|
|
29334
29753
|
size: "sm",
|
|
29335
29754
|
className: "flex-shrink-0 text-success"
|
|
29336
29755
|
}
|
|
@@ -29548,7 +29967,7 @@ var init_StepFlow = __esm({
|
|
|
29548
29967
|
className
|
|
29549
29968
|
}) => {
|
|
29550
29969
|
if (orientation === "vertical") {
|
|
29551
|
-
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: [
|
|
29552
29971
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29553
29972
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29554
29973
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29559,7 +29978,7 @@ var init_StepFlow = __esm({
|
|
|
29559
29978
|
] })
|
|
29560
29979
|
] }) }, index)) });
|
|
29561
29980
|
}
|
|
29562
|
-
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: [
|
|
29563
29982
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29564
29983
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29565
29984
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -30373,6 +30792,7 @@ var init_VoteStack = __esm({
|
|
|
30373
30792
|
"components/molecules/VoteStack.tsx"() {
|
|
30374
30793
|
"use client";
|
|
30375
30794
|
init_cn();
|
|
30795
|
+
init_Icon();
|
|
30376
30796
|
init_useEventBus();
|
|
30377
30797
|
sizeStyles12 = {
|
|
30378
30798
|
sm: {
|
|
@@ -30454,7 +30874,7 @@ var init_VoteStack = __esm({
|
|
|
30454
30874
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30455
30875
|
styles.button
|
|
30456
30876
|
),
|
|
30457
|
-
children: /* @__PURE__ */ jsx(
|
|
30877
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-up", className: styles.icon })
|
|
30458
30878
|
}
|
|
30459
30879
|
),
|
|
30460
30880
|
/* @__PURE__ */ jsx(
|
|
@@ -30491,7 +30911,7 @@ var init_VoteStack = __esm({
|
|
|
30491
30911
|
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-inset",
|
|
30492
30912
|
styles.button
|
|
30493
30913
|
),
|
|
30494
|
-
children: /* @__PURE__ */ jsx(
|
|
30914
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: styles.icon })
|
|
30495
30915
|
}
|
|
30496
30916
|
)
|
|
30497
30917
|
]
|
|
@@ -30533,7 +30953,7 @@ var init_LikertScale = __esm({
|
|
|
30533
30953
|
md: "text-base",
|
|
30534
30954
|
lg: "text-lg"
|
|
30535
30955
|
};
|
|
30536
|
-
LikertScale =
|
|
30956
|
+
LikertScale = React86__default.forwardRef(
|
|
30537
30957
|
({
|
|
30538
30958
|
question,
|
|
30539
30959
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30545,7 +30965,7 @@ var init_LikertScale = __esm({
|
|
|
30545
30965
|
variant = "radios",
|
|
30546
30966
|
className
|
|
30547
30967
|
}, ref) => {
|
|
30548
|
-
const groupId =
|
|
30968
|
+
const groupId = React86__default.useId();
|
|
30549
30969
|
const eventBus = useEventBus();
|
|
30550
30970
|
const handleSelect = useCallback(
|
|
30551
30971
|
(next) => {
|
|
@@ -30825,6 +31245,7 @@ var init_QrScanner = __esm({
|
|
|
30825
31245
|
"use client";
|
|
30826
31246
|
init_cn();
|
|
30827
31247
|
init_atoms();
|
|
31248
|
+
init_Icon();
|
|
30828
31249
|
init_useEventBus();
|
|
30829
31250
|
QrScanner = ({
|
|
30830
31251
|
onScan,
|
|
@@ -30975,7 +31396,7 @@ var init_QrScanner = __esm({
|
|
|
30975
31396
|
padding: "lg",
|
|
30976
31397
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
30977
31398
|
children: [
|
|
30978
|
-
/* @__PURE__ */ jsx(
|
|
31399
|
+
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
30979
31400
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "Camera unavailable" }),
|
|
30980
31401
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
30981
31402
|
]
|
|
@@ -31007,7 +31428,7 @@ var init_QrScanner = __esm({
|
|
|
31007
31428
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31008
31429
|
),
|
|
31009
31430
|
"aria-label": isPaused ? "Resume scanning" : "Pause scanning",
|
|
31010
|
-
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" })
|
|
31011
31432
|
}
|
|
31012
31433
|
),
|
|
31013
31434
|
/* @__PURE__ */ jsx(
|
|
@@ -31020,7 +31441,7 @@ var init_QrScanner = __esm({
|
|
|
31020
31441
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
31021
31442
|
),
|
|
31022
31443
|
"aria-label": `Switch to ${currentFacing === "environment" ? "front" : "rear"} camera`,
|
|
31023
|
-
children: /* @__PURE__ */ jsx(
|
|
31444
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
31024
31445
|
}
|
|
31025
31446
|
),
|
|
31026
31447
|
/* @__PURE__ */ jsx(
|
|
@@ -31236,11 +31657,11 @@ function getShapeClasses(shape) {
|
|
|
31236
31657
|
function getStatusIcon(status) {
|
|
31237
31658
|
switch (status) {
|
|
31238
31659
|
case "seated":
|
|
31239
|
-
return /* @__PURE__ */ jsx(
|
|
31660
|
+
return /* @__PURE__ */ jsx(Icon, { name: "users", className: "w-4 h-4" });
|
|
31240
31661
|
case "ordered":
|
|
31241
|
-
return /* @__PURE__ */ jsx(
|
|
31662
|
+
return /* @__PURE__ */ jsx(Icon, { name: "coffee", className: "w-4 h-4" });
|
|
31242
31663
|
case "awaiting-bill":
|
|
31243
|
-
return /* @__PURE__ */ jsx(
|
|
31664
|
+
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", className: "w-4 h-4" });
|
|
31244
31665
|
default:
|
|
31245
31666
|
return null;
|
|
31246
31667
|
}
|
|
@@ -31252,6 +31673,7 @@ var init_PositionedCanvas = __esm({
|
|
|
31252
31673
|
init_cn();
|
|
31253
31674
|
init_useEventBus();
|
|
31254
31675
|
init_atoms();
|
|
31676
|
+
init_Icon();
|
|
31255
31677
|
STATUS_CLASSES = {
|
|
31256
31678
|
empty: "bg-surface border-border text-foreground",
|
|
31257
31679
|
seated: "bg-surface border-success text-success",
|
|
@@ -31364,7 +31786,7 @@ var init_PositionedCanvas = __esm({
|
|
|
31364
31786
|
{
|
|
31365
31787
|
ref: containerRef,
|
|
31366
31788
|
"data-testid": "positioned-canvas",
|
|
31367
|
-
className: "relative bg-background border border-border rounded-
|
|
31789
|
+
className: "relative bg-background border border-border rounded-container overflow-hidden",
|
|
31368
31790
|
style: { width, height },
|
|
31369
31791
|
onClick: handleContainerClick,
|
|
31370
31792
|
children: items.map((item) => {
|
|
@@ -31556,7 +31978,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31556
31978
|
"transition-opacity"
|
|
31557
31979
|
),
|
|
31558
31980
|
onClick: () => setOpen((v) => !v),
|
|
31559
|
-
children: /* @__PURE__ */ jsx(
|
|
31981
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "more-horizontal", className: "w-3.5 h-3.5" })
|
|
31560
31982
|
}
|
|
31561
31983
|
),
|
|
31562
31984
|
open && /* @__PURE__ */ jsxs(
|
|
@@ -31565,7 +31987,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31565
31987
|
role: "menu",
|
|
31566
31988
|
className: cn(
|
|
31567
31989
|
"absolute right-0 z-10 mt-1 w-44",
|
|
31568
|
-
"rounded-
|
|
31990
|
+
"rounded-container border border-border bg-popover shadow-elevation-popover",
|
|
31569
31991
|
"py-1 text-sm"
|
|
31570
31992
|
),
|
|
31571
31993
|
children: [
|
|
@@ -31582,7 +32004,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31582
32004
|
setOpen(false);
|
|
31583
32005
|
},
|
|
31584
32006
|
children: [
|
|
31585
|
-
/* @__PURE__ */ jsx(
|
|
32007
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
31586
32008
|
" Duplicate"
|
|
31587
32009
|
]
|
|
31588
32010
|
}
|
|
@@ -31599,7 +32021,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
31599
32021
|
setOpen(false);
|
|
31600
32022
|
},
|
|
31601
32023
|
children: [
|
|
31602
|
-
/* @__PURE__ */ jsx(
|
|
32024
|
+
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
31603
32025
|
" Delete"
|
|
31604
32026
|
]
|
|
31605
32027
|
}
|
|
@@ -31828,7 +32250,7 @@ function BlockRow({
|
|
|
31828
32250
|
"text-sm text-muted-foreground"
|
|
31829
32251
|
),
|
|
31830
32252
|
children: [
|
|
31831
|
-
/* @__PURE__ */ jsx(
|
|
32253
|
+
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
31832
32254
|
" No image URL set"
|
|
31833
32255
|
]
|
|
31834
32256
|
}
|
|
@@ -31902,7 +32324,7 @@ function BlockRow({
|
|
|
31902
32324
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
31903
32325
|
),
|
|
31904
32326
|
onClick: () => removeListItem(child.id),
|
|
31905
|
-
children: /* @__PURE__ */ jsx(
|
|
32327
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3 h-3" })
|
|
31906
32328
|
}
|
|
31907
32329
|
)
|
|
31908
32330
|
] }, child.id)),
|
|
@@ -31917,7 +32339,7 @@ function BlockRow({
|
|
|
31917
32339
|
),
|
|
31918
32340
|
onClick: addListItem,
|
|
31919
32341
|
children: [
|
|
31920
|
-
/* @__PURE__ */ jsx(
|
|
32342
|
+
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
31921
32343
|
" Add item"
|
|
31922
32344
|
]
|
|
31923
32345
|
}
|
|
@@ -31966,7 +32388,7 @@ function BlockRow({
|
|
|
31966
32388
|
"transition-opacity"
|
|
31967
32389
|
),
|
|
31968
32390
|
onClick: () => onInsertAfter("paragraph"),
|
|
31969
|
-
children: /* @__PURE__ */ jsx(
|
|
32391
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" })
|
|
31970
32392
|
}
|
|
31971
32393
|
),
|
|
31972
32394
|
/* @__PURE__ */ jsx(
|
|
@@ -31996,6 +32418,7 @@ var init_RichBlockEditor = __esm({
|
|
|
31996
32418
|
init_Box();
|
|
31997
32419
|
init_Divider();
|
|
31998
32420
|
init_Input();
|
|
32421
|
+
init_Icon();
|
|
31999
32422
|
init_useEventBus();
|
|
32000
32423
|
TOOLBAR_ENTRIES = [
|
|
32001
32424
|
{ type: "paragraph", label: "Text", icon: Type },
|
|
@@ -32239,7 +32662,7 @@ var init_ReplyTree = __esm({
|
|
|
32239
32662
|
onClick: handleToggle,
|
|
32240
32663
|
"aria-label": isCollapsed ? "Expand replies" : "Collapse replies",
|
|
32241
32664
|
"aria-expanded": !isCollapsed,
|
|
32242
|
-
leftIcon: isCollapsed ?
|
|
32665
|
+
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
32243
32666
|
className: cn(
|
|
32244
32667
|
"w-6 h-6 p-0 min-w-0",
|
|
32245
32668
|
"rounded-sm text-muted-foreground",
|
|
@@ -32286,7 +32709,7 @@ var init_ReplyTree = __esm({
|
|
|
32286
32709
|
{
|
|
32287
32710
|
variant: "ghost",
|
|
32288
32711
|
size: "sm",
|
|
32289
|
-
leftIcon:
|
|
32712
|
+
leftIcon: "message-square",
|
|
32290
32713
|
onClick: handleReply,
|
|
32291
32714
|
"aria-label": `Reply to ${node.authorName}`,
|
|
32292
32715
|
children: "Reply"
|
|
@@ -32297,7 +32720,7 @@ var init_ReplyTree = __esm({
|
|
|
32297
32720
|
{
|
|
32298
32721
|
variant: "ghost",
|
|
32299
32722
|
size: "sm",
|
|
32300
|
-
leftIcon:
|
|
32723
|
+
leftIcon: "flag",
|
|
32301
32724
|
onClick: handleFlag,
|
|
32302
32725
|
"aria-label": `Flag reply by ${node.authorName}`,
|
|
32303
32726
|
children: "Flag"
|
|
@@ -32310,7 +32733,7 @@ var init_ReplyTree = __esm({
|
|
|
32310
32733
|
variant: "ghost",
|
|
32311
32734
|
size: "sm",
|
|
32312
32735
|
onClick: handleContinue,
|
|
32313
|
-
rightIcon:
|
|
32736
|
+
rightIcon: "chevron-right",
|
|
32314
32737
|
className: cn(
|
|
32315
32738
|
"self-start gap-1 px-0 h-auto",
|
|
32316
32739
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
@@ -32551,7 +32974,7 @@ var init_VersionDiff = __esm({
|
|
|
32551
32974
|
className: "px-4 py-2 border-b border-border bg-muted/30 flex-wrap",
|
|
32552
32975
|
children: [
|
|
32553
32976
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
32554
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
32977
|
+
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
32555
32978
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
32556
32979
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32557
32980
|
Select,
|
|
@@ -32588,7 +33011,7 @@ var init_VersionDiff = __esm({
|
|
|
32588
33011
|
{
|
|
32589
33012
|
variant: "ghost",
|
|
32590
33013
|
size: "sm",
|
|
32591
|
-
icon: activeView === "side-by-side" ?
|
|
33014
|
+
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
32592
33015
|
onClick: handleViewToggle,
|
|
32593
33016
|
"aria-label": activeView === "side-by-side" ? "Switch to inline view" : "Switch to side-by-side view"
|
|
32594
33017
|
}
|
|
@@ -32598,7 +33021,7 @@ var init_VersionDiff = __esm({
|
|
|
32598
33021
|
{
|
|
32599
33022
|
variant: "ghost",
|
|
32600
33023
|
size: "sm",
|
|
32601
|
-
icon:
|
|
33024
|
+
icon: "rotate-ccw",
|
|
32602
33025
|
onClick: handleRevert,
|
|
32603
33026
|
children: "Revert"
|
|
32604
33027
|
}
|
|
@@ -32775,7 +33198,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32775
33198
|
"aria-label": "Breadcrumb",
|
|
32776
33199
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32777
33200
|
const isLast = idx === items.length - 1;
|
|
32778
|
-
return /* @__PURE__ */ jsxs(
|
|
33201
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
32779
33202
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32780
33203
|
Icon,
|
|
32781
33204
|
{
|
|
@@ -32841,7 +33264,7 @@ function DocCodeBlock({
|
|
|
32841
33264
|
Box,
|
|
32842
33265
|
{
|
|
32843
33266
|
className: cn(
|
|
32844
|
-
"rounded-
|
|
33267
|
+
"rounded-container border border-border overflow-hidden",
|
|
32845
33268
|
className
|
|
32846
33269
|
),
|
|
32847
33270
|
position: "relative",
|
|
@@ -33000,11 +33423,11 @@ var init_DocPagination = __esm({
|
|
|
33000
33423
|
init_Typography();
|
|
33001
33424
|
linkCardStyles = [
|
|
33002
33425
|
"border border-border",
|
|
33003
|
-
"rounded-
|
|
33426
|
+
"rounded-container",
|
|
33004
33427
|
"p-4",
|
|
33005
33428
|
"transition-all",
|
|
33006
33429
|
"hover:border-primary",
|
|
33007
|
-
"hover:shadow-
|
|
33430
|
+
"hover:shadow-elevation-dialog",
|
|
33008
33431
|
"no-underline",
|
|
33009
33432
|
"flex-1",
|
|
33010
33433
|
"min-w-0",
|
|
@@ -33141,7 +33564,7 @@ function DocSearch({
|
|
|
33141
33564
|
Box,
|
|
33142
33565
|
{
|
|
33143
33566
|
position: "absolute",
|
|
33144
|
-
className: "top-full left-0 right-0 mt-1 z-50 bg-card border border-border rounded-
|
|
33567
|
+
className: "top-full left-0 right-0 mt-1 z-50 bg-card border border-border rounded-container shadow-elevation-popover max-h-80 overflow-y-auto",
|
|
33145
33568
|
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: results.map((result, index) => /* @__PURE__ */ jsx(
|
|
33146
33569
|
Box,
|
|
33147
33570
|
{
|
|
@@ -33734,7 +34157,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33734
34157
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33735
34158
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33736
34159
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
33737
|
-
return /* @__PURE__ */ jsxs(
|
|
34160
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
33738
34161
|
/* @__PURE__ */ jsx(
|
|
33739
34162
|
AvlState,
|
|
33740
34163
|
{
|
|
@@ -35111,7 +35534,7 @@ var init_DocumentViewer = __esm({
|
|
|
35111
35534
|
}
|
|
35112
35535
|
});
|
|
35113
35536
|
function extractTitle(children) {
|
|
35114
|
-
if (!
|
|
35537
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
35115
35538
|
const props = children.props;
|
|
35116
35539
|
if (typeof props.title === "string") {
|
|
35117
35540
|
return props.title;
|
|
@@ -35166,7 +35589,7 @@ function LinearView({
|
|
|
35166
35589
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
35167
35590
|
const isDone = i < currentIdx;
|
|
35168
35591
|
const isCurrent = i === currentIdx;
|
|
35169
|
-
return /* @__PURE__ */ jsxs(
|
|
35592
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
35170
35593
|
i > 0 && /* @__PURE__ */ jsx(
|
|
35171
35594
|
Typography,
|
|
35172
35595
|
{
|
|
@@ -36067,12 +36490,12 @@ var init_Form = __esm({
|
|
|
36067
36490
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
36068
36491
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
36069
36492
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
36070
|
-
const normalizedInitialData =
|
|
36493
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
36071
36494
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
36072
36495
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
36073
36496
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
36074
36497
|
}, [entity, initialData]);
|
|
36075
|
-
const entityDerivedFields =
|
|
36498
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
36076
36499
|
if (fields && fields.length > 0) return void 0;
|
|
36077
36500
|
if (!resolvedEntity) return void 0;
|
|
36078
36501
|
return resolvedEntity.fields.map(
|
|
@@ -36081,26 +36504,27 @@ var init_Form = __esm({
|
|
|
36081
36504
|
type: f3.type,
|
|
36082
36505
|
required: f3.required,
|
|
36083
36506
|
defaultValue: f3.default,
|
|
36084
|
-
values
|
|
36507
|
+
// EntityField is a discriminated union — `values` lives on Scalar/Enum, `relation` lives on Relation.
|
|
36508
|
+
values: "values" in f3 ? f3.values : void 0,
|
|
36085
36509
|
min: f3.min,
|
|
36086
36510
|
max: f3.max,
|
|
36087
|
-
relation:
|
|
36511
|
+
relation: "relation" in f3 ? { entity: f3.relation.entity } : void 0
|
|
36088
36512
|
})
|
|
36089
36513
|
);
|
|
36090
36514
|
}, [entity, fields]);
|
|
36091
36515
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
36092
36516
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
36093
36517
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
36094
|
-
const [formData, setFormData] =
|
|
36518
|
+
const [formData, setFormData] = React86__default.useState(
|
|
36095
36519
|
normalizedInitialData
|
|
36096
36520
|
);
|
|
36097
|
-
const [collapsedSections, setCollapsedSections] =
|
|
36521
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
36098
36522
|
/* @__PURE__ */ new Set()
|
|
36099
36523
|
);
|
|
36100
|
-
const [submitError, setSubmitError] =
|
|
36101
|
-
const formRef =
|
|
36524
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
36525
|
+
const formRef = React86__default.useRef(null);
|
|
36102
36526
|
const formMode = props.mode;
|
|
36103
|
-
const mountedRef =
|
|
36527
|
+
const mountedRef = React86__default.useRef(false);
|
|
36104
36528
|
if (!mountedRef.current) {
|
|
36105
36529
|
mountedRef.current = true;
|
|
36106
36530
|
debug("forms", "mount", {
|
|
@@ -36113,7 +36537,7 @@ var init_Form = __esm({
|
|
|
36113
36537
|
});
|
|
36114
36538
|
}
|
|
36115
36539
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
36116
|
-
const evalContext =
|
|
36540
|
+
const evalContext = React86__default.useMemo(
|
|
36117
36541
|
() => ({
|
|
36118
36542
|
formValues: formData,
|
|
36119
36543
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -36122,7 +36546,7 @@ var init_Form = __esm({
|
|
|
36122
36546
|
}),
|
|
36123
36547
|
[formData, externalContext]
|
|
36124
36548
|
);
|
|
36125
|
-
|
|
36549
|
+
React86__default.useEffect(() => {
|
|
36126
36550
|
debug("forms", "initialData-sync", {
|
|
36127
36551
|
mode: formMode,
|
|
36128
36552
|
normalizedInitialData,
|
|
@@ -36133,7 +36557,7 @@ var init_Form = __esm({
|
|
|
36133
36557
|
setFormData(normalizedInitialData);
|
|
36134
36558
|
}
|
|
36135
36559
|
}, [normalizedInitialData]);
|
|
36136
|
-
const processCalculations =
|
|
36560
|
+
const processCalculations = React86__default.useCallback(
|
|
36137
36561
|
(changedFieldId, newFormData) => {
|
|
36138
36562
|
if (!hiddenCalculations.length) return;
|
|
36139
36563
|
const context = {
|
|
@@ -36158,7 +36582,7 @@ var init_Form = __esm({
|
|
|
36158
36582
|
},
|
|
36159
36583
|
[hiddenCalculations, externalContext, eventBus]
|
|
36160
36584
|
);
|
|
36161
|
-
const checkViolations =
|
|
36585
|
+
const checkViolations = React86__default.useCallback(
|
|
36162
36586
|
(changedFieldId, newFormData) => {
|
|
36163
36587
|
if (!violationTriggers.length) return;
|
|
36164
36588
|
const context = {
|
|
@@ -36196,7 +36620,7 @@ var init_Form = __esm({
|
|
|
36196
36620
|
processCalculations(name, newFormData);
|
|
36197
36621
|
checkViolations(name, newFormData);
|
|
36198
36622
|
};
|
|
36199
|
-
const isFieldVisible =
|
|
36623
|
+
const isFieldVisible = React86__default.useCallback(
|
|
36200
36624
|
(fieldName) => {
|
|
36201
36625
|
const condition = conditionalFields[fieldName];
|
|
36202
36626
|
if (!condition) return true;
|
|
@@ -36204,7 +36628,7 @@ var init_Form = __esm({
|
|
|
36204
36628
|
},
|
|
36205
36629
|
[conditionalFields, evalContext]
|
|
36206
36630
|
);
|
|
36207
|
-
const isSectionVisible =
|
|
36631
|
+
const isSectionVisible = React86__default.useCallback(
|
|
36208
36632
|
(section) => {
|
|
36209
36633
|
if (!section.condition) return true;
|
|
36210
36634
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -36280,7 +36704,7 @@ var init_Form = __esm({
|
|
|
36280
36704
|
eventBus.emit(`UI:${onCancel}`);
|
|
36281
36705
|
}
|
|
36282
36706
|
};
|
|
36283
|
-
const renderField =
|
|
36707
|
+
const renderField = React86__default.useCallback(
|
|
36284
36708
|
(field) => {
|
|
36285
36709
|
const fieldName = field.name || field.field;
|
|
36286
36710
|
if (!fieldName) return null;
|
|
@@ -36301,7 +36725,7 @@ var init_Form = __esm({
|
|
|
36301
36725
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
36302
36726
|
);
|
|
36303
36727
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
36304
|
-
const normalizedFields =
|
|
36728
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
36305
36729
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
36306
36730
|
return effectiveFields.map((field) => {
|
|
36307
36731
|
if (typeof field === "string") {
|
|
@@ -36312,10 +36736,11 @@ var init_Form = __esm({
|
|
|
36312
36736
|
type: entityField.type,
|
|
36313
36737
|
required: entityField.required,
|
|
36314
36738
|
defaultValue: entityField.default,
|
|
36315
|
-
values
|
|
36739
|
+
// EntityField is a discriminated union — `values` lives on Scalar/Enum, `relation` lives on Relation.
|
|
36740
|
+
values: "values" in entityField ? entityField.values : void 0,
|
|
36316
36741
|
min: entityField.min,
|
|
36317
36742
|
max: entityField.max,
|
|
36318
|
-
relation:
|
|
36743
|
+
relation: "relation" in entityField ? { entity: entityField.relation.entity } : void 0
|
|
36319
36744
|
};
|
|
36320
36745
|
}
|
|
36321
36746
|
return { name: field, type: "string" };
|
|
@@ -36323,7 +36748,7 @@ var init_Form = __esm({
|
|
|
36323
36748
|
return field;
|
|
36324
36749
|
});
|
|
36325
36750
|
}, [effectiveFields, resolvedEntity]);
|
|
36326
|
-
const schemaFields =
|
|
36751
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
36327
36752
|
if (normalizedFields.length === 0) return null;
|
|
36328
36753
|
if (isDebugEnabled()) {
|
|
36329
36754
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -36333,7 +36758,7 @@ var init_Form = __esm({
|
|
|
36333
36758
|
}
|
|
36334
36759
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
36335
36760
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
36336
|
-
const sectionElements =
|
|
36761
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
36337
36762
|
if (!sections || sections.length === 0) return null;
|
|
36338
36763
|
return sections.map((section) => {
|
|
36339
36764
|
if (!isSectionVisible(section)) {
|
|
@@ -37038,7 +37463,7 @@ var init_GameTemplate = __esm({
|
|
|
37038
37463
|
{
|
|
37039
37464
|
variant: "secondary",
|
|
37040
37465
|
size: "sm",
|
|
37041
|
-
icon:
|
|
37466
|
+
icon: "pause",
|
|
37042
37467
|
onClick: controls.onPause,
|
|
37043
37468
|
children: "Pause"
|
|
37044
37469
|
}
|
|
@@ -37047,7 +37472,7 @@ var init_GameTemplate = __esm({
|
|
|
37047
37472
|
{
|
|
37048
37473
|
variant: "primary",
|
|
37049
37474
|
size: "sm",
|
|
37050
|
-
icon:
|
|
37475
|
+
icon: "play",
|
|
37051
37476
|
onClick: controls.onPlay,
|
|
37052
37477
|
children: "Play"
|
|
37053
37478
|
}
|
|
@@ -37057,7 +37482,7 @@ var init_GameTemplate = __esm({
|
|
|
37057
37482
|
{
|
|
37058
37483
|
variant: "ghost",
|
|
37059
37484
|
size: "sm",
|
|
37060
|
-
icon:
|
|
37485
|
+
icon: "rotate-ccw",
|
|
37061
37486
|
onClick: controls.onReset,
|
|
37062
37487
|
children: "Reset"
|
|
37063
37488
|
}
|
|
@@ -38059,7 +38484,7 @@ var init_List = __esm({
|
|
|
38059
38484
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
38060
38485
|
return [];
|
|
38061
38486
|
}, [entity]);
|
|
38062
|
-
const getItemActions =
|
|
38487
|
+
const getItemActions = React86__default.useCallback(
|
|
38063
38488
|
(item) => {
|
|
38064
38489
|
if (!itemActions) return [];
|
|
38065
38490
|
if (typeof itemActions === "function") {
|
|
@@ -38532,7 +38957,7 @@ var init_MediaGallery = __esm({
|
|
|
38532
38957
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
38533
38958
|
);
|
|
38534
38959
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
38535
|
-
const items =
|
|
38960
|
+
const items = React86__default.useMemo(() => {
|
|
38536
38961
|
if (propItems) return propItems;
|
|
38537
38962
|
if (entityData.length === 0) return [];
|
|
38538
38963
|
return entityData.map((record, idx) => ({
|
|
@@ -38696,7 +39121,7 @@ var init_MediaGallery = __esm({
|
|
|
38696
39121
|
}
|
|
38697
39122
|
});
|
|
38698
39123
|
function extractTitle2(children) {
|
|
38699
|
-
if (!
|
|
39124
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
38700
39125
|
const props = children.props;
|
|
38701
39126
|
if (typeof props.title === "string") {
|
|
38702
39127
|
return props.title;
|
|
@@ -39409,7 +39834,7 @@ var init_PageHeader = __esm({
|
|
|
39409
39834
|
info: "bg-info/10 text-info"
|
|
39410
39835
|
};
|
|
39411
39836
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39412
|
-
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: [
|
|
39413
39838
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39414
39839
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39415
39840
|
"a",
|
|
@@ -39624,14 +40049,14 @@ function getAllTraits() {
|
|
|
39624
40049
|
return Array.from(traits.values());
|
|
39625
40050
|
}
|
|
39626
40051
|
function subscribeToTraitChanges(listener) {
|
|
39627
|
-
|
|
39628
|
-
return () =>
|
|
40052
|
+
listeners2.add(listener);
|
|
40053
|
+
return () => listeners2.delete(listener);
|
|
39629
40054
|
}
|
|
39630
|
-
var traits,
|
|
40055
|
+
var traits, listeners2;
|
|
39631
40056
|
var init_traitRegistry = __esm({
|
|
39632
40057
|
"lib/traitRegistry.ts"() {
|
|
39633
40058
|
traits = /* @__PURE__ */ new Map();
|
|
39634
|
-
|
|
40059
|
+
listeners2 = /* @__PURE__ */ new Set();
|
|
39635
40060
|
}
|
|
39636
40061
|
});
|
|
39637
40062
|
|
|
@@ -39640,14 +40065,14 @@ function getAllTicks() {
|
|
|
39640
40065
|
return Array.from(ticks.values());
|
|
39641
40066
|
}
|
|
39642
40067
|
function subscribeToTickChanges(listener) {
|
|
39643
|
-
|
|
39644
|
-
return () =>
|
|
40068
|
+
listeners3.add(listener);
|
|
40069
|
+
return () => listeners3.delete(listener);
|
|
39645
40070
|
}
|
|
39646
|
-
var ticks,
|
|
40071
|
+
var ticks, listeners3;
|
|
39647
40072
|
var init_tickRegistry = __esm({
|
|
39648
40073
|
"lib/tickRegistry.ts"() {
|
|
39649
40074
|
ticks = /* @__PURE__ */ new Map();
|
|
39650
|
-
|
|
40075
|
+
listeners3 = /* @__PURE__ */ new Set();
|
|
39651
40076
|
}
|
|
39652
40077
|
});
|
|
39653
40078
|
|
|
@@ -39656,14 +40081,14 @@ function getGuardHistory() {
|
|
|
39656
40081
|
return [...guardHistory];
|
|
39657
40082
|
}
|
|
39658
40083
|
function subscribeToGuardChanges(listener) {
|
|
39659
|
-
|
|
39660
|
-
return () =>
|
|
40084
|
+
listeners4.add(listener);
|
|
40085
|
+
return () => listeners4.delete(listener);
|
|
39661
40086
|
}
|
|
39662
|
-
var guardHistory,
|
|
40087
|
+
var guardHistory, listeners4;
|
|
39663
40088
|
var init_guardRegistry = __esm({
|
|
39664
40089
|
"lib/guardRegistry.ts"() {
|
|
39665
40090
|
guardHistory = [];
|
|
39666
|
-
|
|
40091
|
+
listeners4 = /* @__PURE__ */ new Set();
|
|
39667
40092
|
}
|
|
39668
40093
|
});
|
|
39669
40094
|
|
|
@@ -39694,18 +40119,18 @@ function getDebugEvents() {
|
|
|
39694
40119
|
return [...events];
|
|
39695
40120
|
}
|
|
39696
40121
|
function subscribeToDebugEvents(listener) {
|
|
39697
|
-
|
|
39698
|
-
return () =>
|
|
40122
|
+
listeners5.add(listener);
|
|
40123
|
+
return () => listeners5.delete(listener);
|
|
39699
40124
|
}
|
|
39700
|
-
var events,
|
|
40125
|
+
var events, listeners5;
|
|
39701
40126
|
var init_debugRegistry = __esm({
|
|
39702
40127
|
"lib/debugRegistry.ts"() {
|
|
39703
40128
|
events = [];
|
|
39704
|
-
|
|
40129
|
+
listeners5 = /* @__PURE__ */ new Set();
|
|
39705
40130
|
}
|
|
39706
40131
|
});
|
|
39707
40132
|
function useDebugData() {
|
|
39708
|
-
const [data, setData] =
|
|
40133
|
+
const [data, setData] = React86.useState(() => ({
|
|
39709
40134
|
traits: [],
|
|
39710
40135
|
ticks: [],
|
|
39711
40136
|
guards: [],
|
|
@@ -39719,7 +40144,7 @@ function useDebugData() {
|
|
|
39719
40144
|
},
|
|
39720
40145
|
lastUpdate: Date.now()
|
|
39721
40146
|
}));
|
|
39722
|
-
|
|
40147
|
+
React86.useEffect(() => {
|
|
39723
40148
|
const updateData = () => {
|
|
39724
40149
|
setData({
|
|
39725
40150
|
traits: getAllTraits(),
|
|
@@ -39778,14 +40203,14 @@ function isDebugEnabled2() {
|
|
|
39778
40203
|
return localStorage.getItem(DEBUG_STORAGE_KEY) === "true";
|
|
39779
40204
|
}
|
|
39780
40205
|
function onDebugToggle(listener) {
|
|
39781
|
-
|
|
39782
|
-
return () =>
|
|
40206
|
+
listeners6.add(listener);
|
|
40207
|
+
return () => listeners6.delete(listener);
|
|
39783
40208
|
}
|
|
39784
|
-
var DEBUG_STORAGE_KEY,
|
|
40209
|
+
var DEBUG_STORAGE_KEY, listeners6;
|
|
39785
40210
|
var init_debugUtils = __esm({
|
|
39786
40211
|
"lib/debugUtils.ts"() {
|
|
39787
40212
|
DEBUG_STORAGE_KEY = "orbital-debug";
|
|
39788
|
-
|
|
40213
|
+
listeners6 = /* @__PURE__ */ new Set();
|
|
39789
40214
|
}
|
|
39790
40215
|
});
|
|
39791
40216
|
function layoutGraph(states, transitions, initialState, width, height) {
|
|
@@ -39828,12 +40253,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39828
40253
|
return positions;
|
|
39829
40254
|
}
|
|
39830
40255
|
function WalkMinimap() {
|
|
39831
|
-
const [walkStep, setWalkStep] =
|
|
39832
|
-
const [traits2, setTraits] =
|
|
39833
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39834
|
-
const [completedTraits, setCompletedTraits] =
|
|
39835
|
-
const prevTraitRef =
|
|
39836
|
-
|
|
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(() => {
|
|
39837
40262
|
const interval = setInterval(() => {
|
|
39838
40263
|
const w = window;
|
|
39839
40264
|
const step = w.__orbitalWalkStep;
|
|
@@ -40280,15 +40705,15 @@ var init_EntitiesTab = __esm({
|
|
|
40280
40705
|
}
|
|
40281
40706
|
});
|
|
40282
40707
|
function EventFlowTab({ events: events2 }) {
|
|
40283
|
-
const [filter, setFilter] =
|
|
40284
|
-
const containerRef =
|
|
40285
|
-
const [autoScroll, setAutoScroll] =
|
|
40286
|
-
|
|
40708
|
+
const [filter, setFilter] = React86.useState("all");
|
|
40709
|
+
const containerRef = React86.useRef(null);
|
|
40710
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
40711
|
+
React86.useEffect(() => {
|
|
40287
40712
|
if (autoScroll && containerRef.current) {
|
|
40288
40713
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40289
40714
|
}
|
|
40290
40715
|
}, [events2.length, autoScroll]);
|
|
40291
|
-
const filteredEvents =
|
|
40716
|
+
const filteredEvents = React86.useMemo(() => {
|
|
40292
40717
|
if (filter === "all") return events2;
|
|
40293
40718
|
return events2.filter((e) => e.type === filter);
|
|
40294
40719
|
}, [events2, filter]);
|
|
@@ -40407,7 +40832,7 @@ var init_EventFlowTab = __esm({
|
|
|
40407
40832
|
}
|
|
40408
40833
|
});
|
|
40409
40834
|
function GuardsPanel({ guards }) {
|
|
40410
|
-
const [filter, setFilter] =
|
|
40835
|
+
const [filter, setFilter] = React86.useState("all");
|
|
40411
40836
|
if (guards.length === 0) {
|
|
40412
40837
|
return /* @__PURE__ */ jsx(
|
|
40413
40838
|
EmptyState,
|
|
@@ -40420,7 +40845,7 @@ function GuardsPanel({ guards }) {
|
|
|
40420
40845
|
}
|
|
40421
40846
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40422
40847
|
const failedCount = guards.length - passedCount;
|
|
40423
|
-
const filteredGuards =
|
|
40848
|
+
const filteredGuards = React86.useMemo(() => {
|
|
40424
40849
|
if (filter === "all") return guards;
|
|
40425
40850
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40426
40851
|
return guards.filter((g) => !g.result);
|
|
@@ -40581,10 +41006,10 @@ function EffectBadge({ effect }) {
|
|
|
40581
41006
|
] });
|
|
40582
41007
|
}
|
|
40583
41008
|
function TransitionTimeline({ transitions }) {
|
|
40584
|
-
const containerRef =
|
|
40585
|
-
const [autoScroll, setAutoScroll] =
|
|
40586
|
-
const [expandedId, setExpandedId] =
|
|
40587
|
-
|
|
41009
|
+
const containerRef = React86.useRef(null);
|
|
41010
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
41011
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
41012
|
+
React86.useEffect(() => {
|
|
40588
41013
|
if (autoScroll && containerRef.current) {
|
|
40589
41014
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40590
41015
|
}
|
|
@@ -40870,9 +41295,9 @@ function getAllEvents(traits2) {
|
|
|
40870
41295
|
}
|
|
40871
41296
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40872
41297
|
const eventBus = useEventBus();
|
|
40873
|
-
const [log12, setLog] =
|
|
40874
|
-
const prevStatesRef =
|
|
40875
|
-
|
|
41298
|
+
const [log12, setLog] = React86.useState([]);
|
|
41299
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
41300
|
+
React86.useEffect(() => {
|
|
40876
41301
|
for (const trait of traits2) {
|
|
40877
41302
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40878
41303
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41042,10 +41467,10 @@ function VerifyModePanel({
|
|
|
41042
41467
|
serverCount,
|
|
41043
41468
|
localCount
|
|
41044
41469
|
}) {
|
|
41045
|
-
const [expanded, setExpanded] =
|
|
41046
|
-
const scrollRef =
|
|
41047
|
-
const prevCountRef =
|
|
41048
|
-
|
|
41470
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
41471
|
+
const scrollRef = React86.useRef(null);
|
|
41472
|
+
const prevCountRef = React86.useRef(0);
|
|
41473
|
+
React86.useEffect(() => {
|
|
41049
41474
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41050
41475
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41051
41476
|
}
|
|
@@ -41111,10 +41536,10 @@ function RuntimeDebugger({
|
|
|
41111
41536
|
defaultTab,
|
|
41112
41537
|
schema
|
|
41113
41538
|
}) {
|
|
41114
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41115
|
-
const [isVisible, setIsVisible] =
|
|
41539
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41540
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41116
41541
|
const debugData = useDebugData();
|
|
41117
|
-
|
|
41542
|
+
React86.useEffect(() => {
|
|
41118
41543
|
if (mode === "inline") return;
|
|
41119
41544
|
return onDebugToggle((enabled) => {
|
|
41120
41545
|
setIsVisible(enabled);
|
|
@@ -41123,7 +41548,7 @@ function RuntimeDebugger({
|
|
|
41123
41548
|
}
|
|
41124
41549
|
});
|
|
41125
41550
|
}, [mode]);
|
|
41126
|
-
|
|
41551
|
+
React86.useEffect(() => {
|
|
41127
41552
|
if (mode === "inline") return;
|
|
41128
41553
|
const handleKeyDown = (e) => {
|
|
41129
41554
|
if (e.key === "`" && isVisible) {
|
|
@@ -41672,7 +42097,7 @@ function SequenceBar({
|
|
|
41672
42097
|
onSlotRemove(index);
|
|
41673
42098
|
}, [onSlotRemove, playing]);
|
|
41674
42099
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41675
|
-
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: [
|
|
41676
42101
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41677
42102
|
Typography,
|
|
41678
42103
|
{
|
|
@@ -43074,7 +43499,7 @@ var init_StatCard = __esm({
|
|
|
43074
43499
|
const labelToUse = propLabel ?? propTitle;
|
|
43075
43500
|
const eventBus = useEventBus();
|
|
43076
43501
|
const { t } = useTranslate();
|
|
43077
|
-
const handleActionClick =
|
|
43502
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
43078
43503
|
if (action?.event) {
|
|
43079
43504
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43080
43505
|
}
|
|
@@ -43085,7 +43510,7 @@ var init_StatCard = __esm({
|
|
|
43085
43510
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43086
43511
|
const isLoading = externalLoading ?? false;
|
|
43087
43512
|
const error = externalError;
|
|
43088
|
-
const computeMetricValue =
|
|
43513
|
+
const computeMetricValue = React86__default.useCallback(
|
|
43089
43514
|
(metric, items) => {
|
|
43090
43515
|
if (metric.value !== void 0) {
|
|
43091
43516
|
return metric.value;
|
|
@@ -43124,7 +43549,7 @@ var init_StatCard = __esm({
|
|
|
43124
43549
|
},
|
|
43125
43550
|
[]
|
|
43126
43551
|
);
|
|
43127
|
-
const schemaStats =
|
|
43552
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
43128
43553
|
if (!metrics || metrics.length === 0) return null;
|
|
43129
43554
|
return metrics.map((metric) => ({
|
|
43130
43555
|
label: metric.label,
|
|
@@ -43132,7 +43557,7 @@ var init_StatCard = __esm({
|
|
|
43132
43557
|
format: metric.format
|
|
43133
43558
|
}));
|
|
43134
43559
|
}, [metrics, data, computeMetricValue]);
|
|
43135
|
-
const calculatedTrend =
|
|
43560
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
43136
43561
|
if (manualTrend !== void 0) return manualTrend;
|
|
43137
43562
|
if (previousValue === void 0 || currentValue === void 0)
|
|
43138
43563
|
return void 0;
|
|
@@ -44243,7 +44668,7 @@ var init_Timeline = __esm({
|
|
|
44243
44668
|
}) => {
|
|
44244
44669
|
const { t } = useTranslate();
|
|
44245
44670
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44246
|
-
const items =
|
|
44671
|
+
const items = React86__default.useMemo(() => {
|
|
44247
44672
|
if (propItems) return propItems;
|
|
44248
44673
|
if (entityData.length === 0) return [];
|
|
44249
44674
|
return entityData.map((record, idx) => {
|
|
@@ -44350,7 +44775,7 @@ var init_Timeline = __esm({
|
|
|
44350
44775
|
}
|
|
44351
44776
|
});
|
|
44352
44777
|
function extractToastProps(children) {
|
|
44353
|
-
if (!
|
|
44778
|
+
if (!React86__default.isValidElement(children)) {
|
|
44354
44779
|
if (typeof children === "string") {
|
|
44355
44780
|
return { message: children };
|
|
44356
44781
|
}
|
|
@@ -44388,7 +44813,7 @@ var init_ToastSlot = __esm({
|
|
|
44388
44813
|
eventBus.emit("UI:CLOSE");
|
|
44389
44814
|
};
|
|
44390
44815
|
if (!isVisible) return null;
|
|
44391
|
-
const isCustomContent =
|
|
44816
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
44392
44817
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44393
44818
|
Toast,
|
|
44394
44819
|
{
|
|
@@ -44657,7 +45082,7 @@ var init_WizardContainer = __esm({
|
|
|
44657
45082
|
const isCompleted = index < currentStep;
|
|
44658
45083
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44659
45084
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44660
|
-
return /* @__PURE__ */ jsxs(
|
|
45085
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
44661
45086
|
/* @__PURE__ */ jsx(
|
|
44662
45087
|
Button,
|
|
44663
45088
|
{
|
|
@@ -45039,12 +45464,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
45039
45464
|
}
|
|
45040
45465
|
});
|
|
45041
45466
|
function lazyThree(name, loader) {
|
|
45042
|
-
const Lazy =
|
|
45467
|
+
const Lazy = React86__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
45043
45468
|
function ThreeWrapper(props) {
|
|
45044
|
-
return
|
|
45045
|
-
|
|
45469
|
+
return React86__default.createElement(
|
|
45470
|
+
React86__default.Suspense,
|
|
45046
45471
|
{ fallback: null },
|
|
45047
|
-
|
|
45472
|
+
React86__default.createElement(Lazy, props)
|
|
45048
45473
|
);
|
|
45049
45474
|
}
|
|
45050
45475
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -45660,7 +46085,7 @@ function SuspenseConfigProvider({
|
|
|
45660
46085
|
config,
|
|
45661
46086
|
children
|
|
45662
46087
|
}) {
|
|
45663
|
-
return
|
|
46088
|
+
return React86__default.createElement(
|
|
45664
46089
|
SuspenseConfigContext.Provider,
|
|
45665
46090
|
{ value: config },
|
|
45666
46091
|
children
|
|
@@ -46143,7 +46568,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46143
46568
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46144
46569
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46145
46570
|
}
|
|
46146
|
-
return /* @__PURE__ */ jsx(
|
|
46571
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46147
46572
|
}
|
|
46148
46573
|
if (!child || typeof child !== "object") return null;
|
|
46149
46574
|
const childId = `${parentId}-${index}`;
|
|
@@ -46180,14 +46605,14 @@ function isPatternConfig(value) {
|
|
|
46180
46605
|
if (value === null || value === void 0) return false;
|
|
46181
46606
|
if (typeof value !== "object") return false;
|
|
46182
46607
|
if (Array.isArray(value)) return false;
|
|
46183
|
-
if (
|
|
46608
|
+
if (React86__default.isValidElement(value)) return false;
|
|
46184
46609
|
if (value instanceof Date) return false;
|
|
46185
46610
|
if (typeof value === "function") return false;
|
|
46186
46611
|
const record = value;
|
|
46187
46612
|
return "type" in record && typeof record.type === "string";
|
|
46188
46613
|
}
|
|
46189
46614
|
function isPlainConfigObject(value) {
|
|
46190
|
-
if (
|
|
46615
|
+
if (React86__default.isValidElement(value)) return false;
|
|
46191
46616
|
if (value instanceof Date) return false;
|
|
46192
46617
|
const proto = Object.getPrototypeOf(value);
|
|
46193
46618
|
return proto === Object.prototype || proto === null;
|
|
@@ -46528,14 +46953,14 @@ function EventBusProvider({ children }) {
|
|
|
46528
46953
|
timestamp: Date.now(),
|
|
46529
46954
|
source
|
|
46530
46955
|
};
|
|
46531
|
-
const
|
|
46532
|
-
const listenerCount = (
|
|
46956
|
+
const listeners7 = listenersRef.current.get(type);
|
|
46957
|
+
const listenerCount = (listeners7?.size ?? 0) + anyListenersRef.current.size;
|
|
46533
46958
|
busLog.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount });
|
|
46534
46959
|
if (listenerCount === 0) {
|
|
46535
46960
|
busLog.warn("emit:no-listeners", { type });
|
|
46536
46961
|
}
|
|
46537
|
-
if (
|
|
46538
|
-
const listenersCopy = Array.from(
|
|
46962
|
+
if (listeners7) {
|
|
46963
|
+
const listenersCopy = Array.from(listeners7);
|
|
46539
46964
|
for (let i = 0; i < listenersCopy.length; i++) {
|
|
46540
46965
|
const listener = listenersCopy[i];
|
|
46541
46966
|
busLog.debug("emit:listener", {
|
|
@@ -46571,14 +46996,14 @@ function EventBusProvider({ children }) {
|
|
|
46571
46996
|
if (!listenersRef.current.has(type)) {
|
|
46572
46997
|
listenersRef.current.set(type, /* @__PURE__ */ new Set());
|
|
46573
46998
|
}
|
|
46574
|
-
const
|
|
46575
|
-
|
|
46999
|
+
const listeners7 = listenersRef.current.get(type);
|
|
47000
|
+
listeners7.add(listener);
|
|
46576
47001
|
if (!listenerTags.has(listener)) listenerTags.set(listener, captureSubscriberTag(listener));
|
|
46577
|
-
subLog2.debug("subscribe", { type, totalListeners:
|
|
47002
|
+
subLog2.debug("subscribe", { type, totalListeners: listeners7.size, tag: listenerTags.get(listener) });
|
|
46578
47003
|
return () => {
|
|
46579
|
-
|
|
46580
|
-
subLog2.debug("unsubscribe", { type, remaining:
|
|
46581
|
-
if (
|
|
47004
|
+
listeners7.delete(listener);
|
|
47005
|
+
subLog2.debug("unsubscribe", { type, remaining: listeners7.size });
|
|
47006
|
+
if (listeners7.size === 0) {
|
|
46582
47007
|
listenersRef.current.delete(type);
|
|
46583
47008
|
}
|
|
46584
47009
|
};
|
|
@@ -46591,8 +47016,8 @@ function EventBusProvider({ children }) {
|
|
|
46591
47016
|
return on(type, wrappedListener);
|
|
46592
47017
|
}, [on]);
|
|
46593
47018
|
const hasListeners = useCallback((type) => {
|
|
46594
|
-
const
|
|
46595
|
-
return
|
|
47019
|
+
const listeners7 = listenersRef.current.get(type);
|
|
47020
|
+
return listeners7 !== void 0 && listeners7.size > 0;
|
|
46596
47021
|
}, []);
|
|
46597
47022
|
const onAny = useCallback((listener) => {
|
|
46598
47023
|
anyListenersRef.current.add(listener);
|