@almadar/ui 4.51.16 → 4.52.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 +1940 -1802
- package/dist/avl/index.js +694 -556
- package/dist/components/atoms/Aside.d.ts +15 -0
- package/dist/components/atoms/Dialog.d.ts +18 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +1523 -1406
- package/dist/components/index.js +500 -383
- package/dist/components/molecules/CalendarGrid.d.ts +14 -1
- package/dist/components/molecules/SidePanel.d.ts +7 -2
- package/dist/components/molecules/Tabs.d.ts +10 -2
- package/dist/components/molecules/avl/avl-preview-types.d.ts +24 -3
- package/dist/components/organisms/game/three/index.cjs +175 -185
- package/dist/components/organisms/game/three/index.js +12 -22
- package/dist/docs/index.cjs +7 -17
- package/dist/docs/index.js +8 -18
- package/dist/marketing/index.cjs +22 -27
- package/dist/marketing/index.js +23 -28
- package/dist/providers/index.cjs +1619 -1504
- package/dist/providers/index.js +728 -613
- package/dist/runtime/index.cjs +1658 -1543
- package/dist/runtime/index.js +732 -617
- package/package.json +1 -1
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React84 from 'react';
|
|
2
|
+
import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } 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';
|
|
@@ -496,89 +496,6 @@ var init_cn = __esm({
|
|
|
496
496
|
"lib/cn.ts"() {
|
|
497
497
|
}
|
|
498
498
|
});
|
|
499
|
-
function kebabToPascal(name) {
|
|
500
|
-
return name.split("-").map((part) => {
|
|
501
|
-
if (/^\d+$/.test(part)) return part;
|
|
502
|
-
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
503
|
-
}).join("");
|
|
504
|
-
}
|
|
505
|
-
function resolveIcon(name) {
|
|
506
|
-
const cached = resolvedCache.get(name);
|
|
507
|
-
if (cached) return cached;
|
|
508
|
-
const resolved = doResolve(name);
|
|
509
|
-
resolvedCache.set(name, resolved);
|
|
510
|
-
return resolved;
|
|
511
|
-
}
|
|
512
|
-
function doResolve(name) {
|
|
513
|
-
if (iconAliases[name]) return iconAliases[name];
|
|
514
|
-
const pascalName = kebabToPascal(name);
|
|
515
|
-
const directLookup = LucideIcons[pascalName];
|
|
516
|
-
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
517
|
-
const asIs = LucideIcons[name];
|
|
518
|
-
if (asIs && typeof asIs === "object") return asIs;
|
|
519
|
-
return LucideIcons.HelpCircle;
|
|
520
|
-
}
|
|
521
|
-
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
522
|
-
var init_Icon = __esm({
|
|
523
|
-
"components/atoms/Icon.tsx"() {
|
|
524
|
-
init_cn();
|
|
525
|
-
iconAliases = {
|
|
526
|
-
"close": LucideIcons.X,
|
|
527
|
-
"trash": LucideIcons.Trash2,
|
|
528
|
-
"loader": LucideIcons.Loader2,
|
|
529
|
-
"stop": LucideIcons.Square,
|
|
530
|
-
"volume": LucideIcons.Volume2,
|
|
531
|
-
"volume-off": LucideIcons.VolumeX,
|
|
532
|
-
"refresh": LucideIcons.RefreshCw,
|
|
533
|
-
"share": LucideIcons.Share2,
|
|
534
|
-
"sort-asc": LucideIcons.ArrowUpNarrowWide,
|
|
535
|
-
"sort-desc": LucideIcons.ArrowDownNarrowWide
|
|
536
|
-
};
|
|
537
|
-
resolvedCache = /* @__PURE__ */ new Map();
|
|
538
|
-
sizeClasses = {
|
|
539
|
-
xs: "w-3 h-3",
|
|
540
|
-
sm: "w-4 h-4",
|
|
541
|
-
md: "w-5 h-5",
|
|
542
|
-
lg: "w-6 h-6",
|
|
543
|
-
xl: "w-8 h-8"
|
|
544
|
-
};
|
|
545
|
-
animationClasses = {
|
|
546
|
-
none: "",
|
|
547
|
-
spin: "animate-spin",
|
|
548
|
-
pulse: "animate-pulse"
|
|
549
|
-
};
|
|
550
|
-
Icon = ({
|
|
551
|
-
icon,
|
|
552
|
-
name,
|
|
553
|
-
size = "md",
|
|
554
|
-
color,
|
|
555
|
-
animation = "none",
|
|
556
|
-
className,
|
|
557
|
-
strokeWidth,
|
|
558
|
-
style
|
|
559
|
-
}) => {
|
|
560
|
-
const IconComponent = icon ?? (name ? resolveIcon(name) : LucideIcons.HelpCircle);
|
|
561
|
-
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
562
|
-
return /* @__PURE__ */ jsx(
|
|
563
|
-
IconComponent,
|
|
564
|
-
{
|
|
565
|
-
className: cn(
|
|
566
|
-
sizeClasses[size],
|
|
567
|
-
animationClasses[animation],
|
|
568
|
-
color ? color : "text-current",
|
|
569
|
-
className
|
|
570
|
-
),
|
|
571
|
-
strokeWidth: effectiveStrokeWidth,
|
|
572
|
-
style: {
|
|
573
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
574
|
-
...style
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
);
|
|
578
|
-
};
|
|
579
|
-
Icon.displayName = "Icon";
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
499
|
var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
|
|
583
500
|
var init_Box = __esm({
|
|
584
501
|
"components/atoms/Box.tsx"() {
|
|
@@ -687,7 +604,7 @@ var init_Box = __esm({
|
|
|
687
604
|
fixed: "fixed",
|
|
688
605
|
sticky: "sticky"
|
|
689
606
|
};
|
|
690
|
-
Box =
|
|
607
|
+
Box = React84__default.forwardRef(
|
|
691
608
|
({
|
|
692
609
|
padding,
|
|
693
610
|
paddingX,
|
|
@@ -737,38 +654,26 @@ var init_Box = __esm({
|
|
|
737
654
|
onMouseLeave?.(e);
|
|
738
655
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
739
656
|
const isClickable = action || onClick;
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
Comp,
|
|
657
|
+
return React84__default.createElement(
|
|
658
|
+
Component,
|
|
743
659
|
{
|
|
744
660
|
ref,
|
|
745
661
|
className: cn(
|
|
746
|
-
// Padding
|
|
747
662
|
padding && paddingStyles[padding],
|
|
748
663
|
paddingX && paddingXStyles[paddingX],
|
|
749
664
|
paddingY && paddingYStyles[paddingY],
|
|
750
|
-
// Margin
|
|
751
665
|
margin && marginStyles[margin],
|
|
752
666
|
marginX && marginXStyles[marginX],
|
|
753
667
|
marginY && marginYStyles[marginY],
|
|
754
|
-
// Background
|
|
755
668
|
bgStyles[bg],
|
|
756
|
-
// Border - uses theme variables
|
|
757
669
|
border && "border-[length:var(--border-width)] border-border",
|
|
758
|
-
// Rounded
|
|
759
670
|
roundedStyles[rounded],
|
|
760
|
-
// Shadow
|
|
761
671
|
shadowStyles[shadow],
|
|
762
|
-
// Display
|
|
763
672
|
display && displayStyles[display],
|
|
764
|
-
// Dimensions
|
|
765
673
|
fullWidth && "w-full",
|
|
766
674
|
fullHeight && "h-full",
|
|
767
|
-
// Overflow
|
|
768
675
|
overflow && overflowStyles[overflow],
|
|
769
|
-
// Position
|
|
770
676
|
position && positionStyles[position],
|
|
771
|
-
// Cursor for clickable
|
|
772
677
|
isClickable && "cursor-pointer",
|
|
773
678
|
className
|
|
774
679
|
),
|
|
@@ -776,15 +681,271 @@ var init_Box = __esm({
|
|
|
776
681
|
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
777
682
|
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
778
683
|
style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
|
|
779
|
-
...rest
|
|
780
|
-
|
|
781
|
-
|
|
684
|
+
...rest
|
|
685
|
+
},
|
|
686
|
+
children
|
|
782
687
|
);
|
|
783
688
|
}
|
|
784
689
|
);
|
|
785
690
|
Box.displayName = "Box";
|
|
786
691
|
}
|
|
787
692
|
});
|
|
693
|
+
function kebabToPascal(name) {
|
|
694
|
+
return name.split("-").map((part) => {
|
|
695
|
+
if (/^\d+$/.test(part)) return part;
|
|
696
|
+
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
697
|
+
}).join("");
|
|
698
|
+
}
|
|
699
|
+
function resolveIcon(name) {
|
|
700
|
+
const cached = resolvedCache.get(name);
|
|
701
|
+
if (cached) return cached;
|
|
702
|
+
const resolved = doResolve(name);
|
|
703
|
+
resolvedCache.set(name, resolved);
|
|
704
|
+
return resolved;
|
|
705
|
+
}
|
|
706
|
+
function doResolve(name) {
|
|
707
|
+
if (iconAliases[name]) return iconAliases[name];
|
|
708
|
+
const pascalName = kebabToPascal(name);
|
|
709
|
+
const directLookup = LucideIcons[pascalName];
|
|
710
|
+
if (directLookup && typeof directLookup === "object") return directLookup;
|
|
711
|
+
const asIs = LucideIcons[name];
|
|
712
|
+
if (asIs && typeof asIs === "object") return asIs;
|
|
713
|
+
return LucideIcons.HelpCircle;
|
|
714
|
+
}
|
|
715
|
+
var iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
|
|
716
|
+
var init_Icon = __esm({
|
|
717
|
+
"components/atoms/Icon.tsx"() {
|
|
718
|
+
init_cn();
|
|
719
|
+
iconAliases = {
|
|
720
|
+
"close": LucideIcons.X,
|
|
721
|
+
"trash": LucideIcons.Trash2,
|
|
722
|
+
"loader": LucideIcons.Loader2,
|
|
723
|
+
"stop": LucideIcons.Square,
|
|
724
|
+
"volume": LucideIcons.Volume2,
|
|
725
|
+
"volume-off": LucideIcons.VolumeX,
|
|
726
|
+
"refresh": LucideIcons.RefreshCw,
|
|
727
|
+
"share": LucideIcons.Share2,
|
|
728
|
+
"sort-asc": LucideIcons.ArrowUpNarrowWide,
|
|
729
|
+
"sort-desc": LucideIcons.ArrowDownNarrowWide
|
|
730
|
+
};
|
|
731
|
+
resolvedCache = /* @__PURE__ */ new Map();
|
|
732
|
+
sizeClasses = {
|
|
733
|
+
xs: "w-3 h-3",
|
|
734
|
+
sm: "w-4 h-4",
|
|
735
|
+
md: "w-5 h-5",
|
|
736
|
+
lg: "w-6 h-6",
|
|
737
|
+
xl: "w-8 h-8"
|
|
738
|
+
};
|
|
739
|
+
animationClasses = {
|
|
740
|
+
none: "",
|
|
741
|
+
spin: "animate-spin",
|
|
742
|
+
pulse: "animate-pulse"
|
|
743
|
+
};
|
|
744
|
+
Icon = ({
|
|
745
|
+
icon,
|
|
746
|
+
name,
|
|
747
|
+
size = "md",
|
|
748
|
+
color,
|
|
749
|
+
animation = "none",
|
|
750
|
+
className,
|
|
751
|
+
strokeWidth,
|
|
752
|
+
style
|
|
753
|
+
}) => {
|
|
754
|
+
const IconComponent = icon ?? (name ? resolveIcon(name) : LucideIcons.HelpCircle);
|
|
755
|
+
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
756
|
+
return /* @__PURE__ */ jsx(
|
|
757
|
+
IconComponent,
|
|
758
|
+
{
|
|
759
|
+
className: cn(
|
|
760
|
+
sizeClasses[size],
|
|
761
|
+
animationClasses[animation],
|
|
762
|
+
color ? color : "text-current",
|
|
763
|
+
className
|
|
764
|
+
),
|
|
765
|
+
strokeWidth: effectiveStrokeWidth,
|
|
766
|
+
style: {
|
|
767
|
+
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
768
|
+
...style
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
);
|
|
772
|
+
};
|
|
773
|
+
Icon.displayName = "Icon";
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
function resolveIconProp(value, sizeClass) {
|
|
777
|
+
if (!value) return null;
|
|
778
|
+
if (typeof value === "string") {
|
|
779
|
+
const Resolved = resolveIcon(value);
|
|
780
|
+
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
781
|
+
}
|
|
782
|
+
if (typeof value === "function") {
|
|
783
|
+
const IconComp = value;
|
|
784
|
+
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
785
|
+
}
|
|
786
|
+
if (React84__default.isValidElement(value)) {
|
|
787
|
+
return value;
|
|
788
|
+
}
|
|
789
|
+
if (typeof value === "object" && value !== null && "render" in value) {
|
|
790
|
+
const IconComp = value;
|
|
791
|
+
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
792
|
+
}
|
|
793
|
+
return value;
|
|
794
|
+
}
|
|
795
|
+
var variantStyles, sizeStyles, iconSizeStyles, Button;
|
|
796
|
+
var init_Button = __esm({
|
|
797
|
+
"components/atoms/Button.tsx"() {
|
|
798
|
+
"use client";
|
|
799
|
+
init_cn();
|
|
800
|
+
init_useEventBus();
|
|
801
|
+
init_Icon();
|
|
802
|
+
variantStyles = {
|
|
803
|
+
primary: [
|
|
804
|
+
"bg-primary text-primary-foreground",
|
|
805
|
+
"border-none",
|
|
806
|
+
"shadow-sm",
|
|
807
|
+
"hover:bg-primary-hover hover:shadow-lg",
|
|
808
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
809
|
+
].join(" "),
|
|
810
|
+
secondary: [
|
|
811
|
+
"bg-transparent text-accent",
|
|
812
|
+
"border border-accent",
|
|
813
|
+
"hover:bg-accent hover:text-white hover:border-accent",
|
|
814
|
+
"active:scale-[var(--active-scale)]"
|
|
815
|
+
].join(" "),
|
|
816
|
+
ghost: [
|
|
817
|
+
"bg-transparent text-muted-foreground",
|
|
818
|
+
"border border-transparent",
|
|
819
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
820
|
+
"active:scale-[var(--active-scale)]"
|
|
821
|
+
].join(" "),
|
|
822
|
+
danger: [
|
|
823
|
+
"bg-surface text-error",
|
|
824
|
+
"border-[length:var(--border-width)] border-error",
|
|
825
|
+
"shadow-sm",
|
|
826
|
+
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
827
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
828
|
+
].join(" "),
|
|
829
|
+
success: [
|
|
830
|
+
"bg-surface text-success",
|
|
831
|
+
"border-[length:var(--border-width)] border-success",
|
|
832
|
+
"shadow-sm",
|
|
833
|
+
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
834
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
835
|
+
].join(" "),
|
|
836
|
+
warning: [
|
|
837
|
+
"bg-surface text-warning",
|
|
838
|
+
"border-[length:var(--border-width)] border-warning",
|
|
839
|
+
"shadow-sm",
|
|
840
|
+
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
841
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
842
|
+
].join(" "),
|
|
843
|
+
// "default" is an alias for secondary
|
|
844
|
+
default: [
|
|
845
|
+
"bg-secondary text-secondary-foreground",
|
|
846
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
847
|
+
"hover:bg-secondary-hover",
|
|
848
|
+
"active:scale-[var(--active-scale)]"
|
|
849
|
+
].join(" ")
|
|
850
|
+
};
|
|
851
|
+
variantStyles.destructive = variantStyles.danger;
|
|
852
|
+
sizeStyles = {
|
|
853
|
+
sm: "px-3 py-1.5 text-sm",
|
|
854
|
+
md: "px-4 py-2 text-sm",
|
|
855
|
+
lg: "px-6 py-3 text-base"
|
|
856
|
+
};
|
|
857
|
+
iconSizeStyles = {
|
|
858
|
+
sm: "h-3.5 w-3.5",
|
|
859
|
+
md: "h-4 w-4",
|
|
860
|
+
lg: "h-5 w-5"
|
|
861
|
+
};
|
|
862
|
+
Button = React84__default.forwardRef(
|
|
863
|
+
({
|
|
864
|
+
className,
|
|
865
|
+
variant = "primary",
|
|
866
|
+
size = "md",
|
|
867
|
+
isLoading = false,
|
|
868
|
+
disabled,
|
|
869
|
+
leftIcon,
|
|
870
|
+
rightIcon,
|
|
871
|
+
icon: iconProp,
|
|
872
|
+
iconRight: iconRightProp,
|
|
873
|
+
action,
|
|
874
|
+
actionPayload,
|
|
875
|
+
label,
|
|
876
|
+
children,
|
|
877
|
+
onClick,
|
|
878
|
+
...props
|
|
879
|
+
}, ref) => {
|
|
880
|
+
const eventBus = useEventBus();
|
|
881
|
+
const leftIconValue = leftIcon || iconProp;
|
|
882
|
+
const rightIconValue = rightIcon || iconRightProp;
|
|
883
|
+
const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
|
|
884
|
+
const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
|
|
885
|
+
const handleClick = (e) => {
|
|
886
|
+
if (action) {
|
|
887
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
888
|
+
}
|
|
889
|
+
onClick?.(e);
|
|
890
|
+
};
|
|
891
|
+
return /* @__PURE__ */ jsxs(
|
|
892
|
+
"button",
|
|
893
|
+
{
|
|
894
|
+
ref,
|
|
895
|
+
disabled: disabled || isLoading,
|
|
896
|
+
className: cn(
|
|
897
|
+
"inline-flex items-center justify-center gap-2",
|
|
898
|
+
"font-[var(--font-weight-medium)]",
|
|
899
|
+
"rounded-sm",
|
|
900
|
+
"cursor-pointer",
|
|
901
|
+
"transition-all duration-[var(--transition-normal)]",
|
|
902
|
+
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
903
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
904
|
+
variantStyles[variant],
|
|
905
|
+
sizeStyles[size],
|
|
906
|
+
className
|
|
907
|
+
),
|
|
908
|
+
onClick: handleClick,
|
|
909
|
+
...props,
|
|
910
|
+
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
911
|
+
children: [
|
|
912
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
913
|
+
children || label,
|
|
914
|
+
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
915
|
+
]
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
);
|
|
920
|
+
Button.displayName = "Button";
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
var Dialog;
|
|
924
|
+
var init_Dialog = __esm({
|
|
925
|
+
"components/atoms/Dialog.tsx"() {
|
|
926
|
+
init_cn();
|
|
927
|
+
Dialog = React84__default.forwardRef(
|
|
928
|
+
({
|
|
929
|
+
role = "dialog",
|
|
930
|
+
"aria-modal": ariaModal = true,
|
|
931
|
+
className,
|
|
932
|
+
children,
|
|
933
|
+
...rest
|
|
934
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
935
|
+
"dialog",
|
|
936
|
+
{
|
|
937
|
+
ref,
|
|
938
|
+
role,
|
|
939
|
+
"aria-modal": ariaModal,
|
|
940
|
+
className: cn(className),
|
|
941
|
+
...rest,
|
|
942
|
+
children
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
);
|
|
946
|
+
Dialog.displayName = "Dialog";
|
|
947
|
+
}
|
|
948
|
+
});
|
|
788
949
|
|
|
789
950
|
// components/atoms/Typography.tsx
|
|
790
951
|
var Typography_exports = {};
|
|
@@ -793,11 +954,11 @@ __export(Typography_exports, {
|
|
|
793
954
|
Text: () => Text,
|
|
794
955
|
Typography: () => Typography
|
|
795
956
|
});
|
|
796
|
-
var
|
|
957
|
+
var variantStyles2, colorStyles, weightStyles, defaultElements, typographySizeStyles, overflowStyles2, Typography, sizeStyles2, Heading, Text;
|
|
797
958
|
var init_Typography = __esm({
|
|
798
959
|
"components/atoms/Typography.tsx"() {
|
|
799
960
|
init_cn();
|
|
800
|
-
|
|
961
|
+
variantStyles2 = {
|
|
801
962
|
h1: "text-4xl font-bold tracking-tight text-foreground",
|
|
802
963
|
h2: "text-3xl font-bold tracking-tight text-foreground",
|
|
803
964
|
h3: "text-2xl font-bold text-foreground",
|
|
@@ -889,7 +1050,7 @@ var init_Typography = __esm({
|
|
|
889
1050
|
{
|
|
890
1051
|
id,
|
|
891
1052
|
className: cn(
|
|
892
|
-
|
|
1053
|
+
variantStyles2[variant],
|
|
893
1054
|
colorStyles[color],
|
|
894
1055
|
weight && weightStyles[weight],
|
|
895
1056
|
size && typographySizeStyles[size],
|
|
@@ -904,7 +1065,7 @@ var init_Typography = __esm({
|
|
|
904
1065
|
);
|
|
905
1066
|
};
|
|
906
1067
|
Typography.displayName = "Typography";
|
|
907
|
-
|
|
1068
|
+
sizeStyles2 = {
|
|
908
1069
|
xs: "text-xs",
|
|
909
1070
|
sm: "text-sm",
|
|
910
1071
|
md: "text-base",
|
|
@@ -920,7 +1081,7 @@ var init_Typography = __esm({
|
|
|
920
1081
|
...props
|
|
921
1082
|
}) => {
|
|
922
1083
|
const variant = `h${level}`;
|
|
923
|
-
const sizeClass = size ?
|
|
1084
|
+
const sizeClass = size ? sizeStyles2[size] : void 0;
|
|
924
1085
|
return /* @__PURE__ */ jsx(
|
|
925
1086
|
Typography,
|
|
926
1087
|
{
|
|
@@ -987,8 +1148,9 @@ var sizeClasses2, minWidths, Modal;
|
|
|
987
1148
|
var init_Modal = __esm({
|
|
988
1149
|
"components/molecules/Modal.tsx"() {
|
|
989
1150
|
"use client";
|
|
990
|
-
init_Icon();
|
|
991
1151
|
init_Box();
|
|
1152
|
+
init_Button();
|
|
1153
|
+
init_Dialog();
|
|
992
1154
|
init_Typography();
|
|
993
1155
|
init_Overlay();
|
|
994
1156
|
init_cn();
|
|
@@ -1081,7 +1243,7 @@ var init_Modal = __esm({
|
|
|
1081
1243
|
}
|
|
1082
1244
|
),
|
|
1083
1245
|
/* @__PURE__ */ jsx(
|
|
1084
|
-
|
|
1246
|
+
Box,
|
|
1085
1247
|
{
|
|
1086
1248
|
className: cn(
|
|
1087
1249
|
"fixed inset-0 z-50 pointer-events-none",
|
|
@@ -1090,17 +1252,17 @@ var init_Modal = __esm({
|
|
|
1090
1252
|
),
|
|
1091
1253
|
style: { paddingTop: "10vh" },
|
|
1092
1254
|
children: /* @__PURE__ */ jsxs(
|
|
1093
|
-
|
|
1255
|
+
Dialog,
|
|
1094
1256
|
{
|
|
1095
1257
|
ref: modalRef,
|
|
1096
|
-
|
|
1097
|
-
border: true,
|
|
1098
|
-
shadow: "lg",
|
|
1099
|
-
rounded: "md",
|
|
1258
|
+
open: true,
|
|
1100
1259
|
className: cn(
|
|
1101
|
-
|
|
1260
|
+
// Reset browser-default dialog chrome — we own styling.
|
|
1261
|
+
"m-0 p-0 border-0 bg-transparent",
|
|
1262
|
+
// Pre-existing dialog frame
|
|
1263
|
+
"pointer-events-auto w-full flex flex-col bg-surface border shadow-lg rounded-md",
|
|
1102
1264
|
sizeClasses2[size],
|
|
1103
|
-
"max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
1265
|
+
"max-sm:max-w-full max-sm:min-w-0 max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
1104
1266
|
className
|
|
1105
1267
|
),
|
|
1106
1268
|
style: {
|
|
@@ -1111,12 +1273,10 @@ var init_Modal = __esm({
|
|
|
1111
1273
|
transition: isDragging.current ? "none" : "transform 200ms ease-out"
|
|
1112
1274
|
}
|
|
1113
1275
|
},
|
|
1114
|
-
role: "dialog",
|
|
1115
|
-
"aria-modal": "true",
|
|
1116
1276
|
...title && { "aria-labelledby": "modal-title" },
|
|
1117
1277
|
children: [
|
|
1118
1278
|
/* @__PURE__ */ jsx(
|
|
1119
|
-
|
|
1279
|
+
Box,
|
|
1120
1280
|
{
|
|
1121
1281
|
className: "hidden max-sm:flex justify-center py-2 cursor-grab active:cursor-grabbing touch-none",
|
|
1122
1282
|
onPointerDown: (e) => {
|
|
@@ -1142,11 +1302,11 @@ var init_Modal = __esm({
|
|
|
1142
1302
|
isDragging.current = false;
|
|
1143
1303
|
setDragY(0);
|
|
1144
1304
|
},
|
|
1145
|
-
children: /* @__PURE__ */ jsx(
|
|
1305
|
+
children: /* @__PURE__ */ jsx(Box, { className: "w-10 h-1 rounded-full bg-border" })
|
|
1146
1306
|
}
|
|
1147
1307
|
),
|
|
1148
1308
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
1149
|
-
|
|
1309
|
+
Box,
|
|
1150
1310
|
{
|
|
1151
1311
|
className: cn(
|
|
1152
1312
|
"px-6 py-4 flex items-center justify-between",
|
|
@@ -1155,25 +1315,22 @@ var init_Modal = __esm({
|
|
|
1155
1315
|
children: [
|
|
1156
1316
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "modal-title", children: title }),
|
|
1157
1317
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
1158
|
-
|
|
1318
|
+
Button,
|
|
1159
1319
|
{
|
|
1160
|
-
|
|
1320
|
+
variant: "ghost",
|
|
1321
|
+
size: "sm",
|
|
1322
|
+
icon: X,
|
|
1161
1323
|
onClick: handleClose,
|
|
1162
1324
|
"data-event": "CLOSE",
|
|
1163
|
-
|
|
1164
|
-
"p-1 transition-colors rounded-sm",
|
|
1165
|
-
"hover:bg-muted"
|
|
1166
|
-
),
|
|
1167
|
-
"aria-label": "Close modal",
|
|
1168
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
|
|
1325
|
+
"aria-label": "Close modal"
|
|
1169
1326
|
}
|
|
1170
1327
|
)
|
|
1171
1328
|
]
|
|
1172
1329
|
}
|
|
1173
1330
|
),
|
|
1174
|
-
/* @__PURE__ */ jsx(
|
|
1331
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
1175
1332
|
footer && /* @__PURE__ */ jsx(
|
|
1176
|
-
|
|
1333
|
+
Box,
|
|
1177
1334
|
{
|
|
1178
1335
|
className: cn(
|
|
1179
1336
|
"px-6 py-4 bg-muted",
|
|
@@ -1196,21 +1353,19 @@ var sizeWidths, Drawer;
|
|
|
1196
1353
|
var init_Drawer = __esm({
|
|
1197
1354
|
"components/molecules/Drawer.tsx"() {
|
|
1198
1355
|
"use client";
|
|
1199
|
-
init_Icon();
|
|
1200
1356
|
init_Box();
|
|
1357
|
+
init_Button();
|
|
1201
1358
|
init_Typography();
|
|
1202
1359
|
init_Overlay();
|
|
1203
1360
|
init_cn();
|
|
1204
1361
|
init_useEventBus();
|
|
1205
1362
|
sizeWidths = {
|
|
1206
|
-
sm: "w-80",
|
|
1363
|
+
sm: "w-full sm:w-80",
|
|
1207
1364
|
// 320px
|
|
1208
|
-
md: "w-96",
|
|
1365
|
+
md: "w-full sm:w-96",
|
|
1209
1366
|
// 384px
|
|
1210
|
-
lg: "w-[480px]",
|
|
1211
|
-
|
|
1212
|
-
xl: "w-[640px]",
|
|
1213
|
-
// 640px
|
|
1367
|
+
lg: "w-full sm:w-[480px]",
|
|
1368
|
+
xl: "w-full sm:w-[640px]",
|
|
1214
1369
|
full: "w-screen"
|
|
1215
1370
|
};
|
|
1216
1371
|
Drawer = ({
|
|
@@ -1308,7 +1463,7 @@ var init_Drawer = __esm({
|
|
|
1308
1463
|
...title && { "aria-labelledby": "drawer-title" },
|
|
1309
1464
|
children: [
|
|
1310
1465
|
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
1311
|
-
|
|
1466
|
+
Box,
|
|
1312
1467
|
{
|
|
1313
1468
|
className: cn(
|
|
1314
1469
|
"px-6 py-4 flex items-center justify-between shrink-0",
|
|
@@ -1317,25 +1472,22 @@ var init_Drawer = __esm({
|
|
|
1317
1472
|
children: [
|
|
1318
1473
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "drawer-title", children: title }),
|
|
1319
1474
|
showCloseButton && /* @__PURE__ */ jsx(
|
|
1320
|
-
|
|
1475
|
+
Button,
|
|
1321
1476
|
{
|
|
1322
|
-
|
|
1477
|
+
variant: "ghost",
|
|
1478
|
+
size: "sm",
|
|
1479
|
+
icon: X,
|
|
1323
1480
|
onClick: handleClose,
|
|
1324
|
-
className: cn(
|
|
1325
|
-
"p-1 transition-colors rounded-sm",
|
|
1326
|
-
"hover:bg-muted",
|
|
1327
|
-
!title && "ml-auto"
|
|
1328
|
-
),
|
|
1329
1481
|
"aria-label": "Close drawer",
|
|
1330
|
-
|
|
1482
|
+
className: cn(!title && "ml-auto")
|
|
1331
1483
|
}
|
|
1332
1484
|
)
|
|
1333
1485
|
]
|
|
1334
1486
|
}
|
|
1335
1487
|
),
|
|
1336
|
-
/* @__PURE__ */ jsx(
|
|
1488
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto p-6", children }),
|
|
1337
1489
|
footer && /* @__PURE__ */ jsx(
|
|
1338
|
-
|
|
1490
|
+
Box,
|
|
1339
1491
|
{
|
|
1340
1492
|
className: cn(
|
|
1341
1493
|
"px-6 py-4 shrink-0 bg-muted",
|
|
@@ -1376,153 +1528,6 @@ var init_Drawer = __esm({
|
|
|
1376
1528
|
Drawer.displayName = "Drawer";
|
|
1377
1529
|
}
|
|
1378
1530
|
});
|
|
1379
|
-
function resolveIconProp(value, sizeClass) {
|
|
1380
|
-
if (!value) return null;
|
|
1381
|
-
if (typeof value === "string") {
|
|
1382
|
-
const Resolved = resolveIcon(value);
|
|
1383
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
1384
|
-
}
|
|
1385
|
-
if (typeof value === "function") {
|
|
1386
|
-
const IconComp = value;
|
|
1387
|
-
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1388
|
-
}
|
|
1389
|
-
if (React81__default.isValidElement(value)) {
|
|
1390
|
-
return value;
|
|
1391
|
-
}
|
|
1392
|
-
if (typeof value === "object" && value !== null && "render" in value) {
|
|
1393
|
-
const IconComp = value;
|
|
1394
|
-
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1395
|
-
}
|
|
1396
|
-
return value;
|
|
1397
|
-
}
|
|
1398
|
-
var variantStyles2, sizeStyles2, iconSizeStyles, Button;
|
|
1399
|
-
var init_Button = __esm({
|
|
1400
|
-
"components/atoms/Button.tsx"() {
|
|
1401
|
-
"use client";
|
|
1402
|
-
init_cn();
|
|
1403
|
-
init_useEventBus();
|
|
1404
|
-
init_Icon();
|
|
1405
|
-
variantStyles2 = {
|
|
1406
|
-
primary: [
|
|
1407
|
-
"bg-primary text-primary-foreground",
|
|
1408
|
-
"border-none",
|
|
1409
|
-
"shadow-sm",
|
|
1410
|
-
"hover:bg-primary-hover hover:shadow-lg",
|
|
1411
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
1412
|
-
].join(" "),
|
|
1413
|
-
secondary: [
|
|
1414
|
-
"bg-transparent text-accent",
|
|
1415
|
-
"border border-accent",
|
|
1416
|
-
"hover:bg-accent hover:text-white hover:border-accent",
|
|
1417
|
-
"active:scale-[var(--active-scale)]"
|
|
1418
|
-
].join(" "),
|
|
1419
|
-
ghost: [
|
|
1420
|
-
"bg-transparent text-muted-foreground",
|
|
1421
|
-
"border border-transparent",
|
|
1422
|
-
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
1423
|
-
"active:scale-[var(--active-scale)]"
|
|
1424
|
-
].join(" "),
|
|
1425
|
-
danger: [
|
|
1426
|
-
"bg-surface text-error",
|
|
1427
|
-
"border-[length:var(--border-width)] border-error",
|
|
1428
|
-
"shadow-sm",
|
|
1429
|
-
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
1430
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
1431
|
-
].join(" "),
|
|
1432
|
-
success: [
|
|
1433
|
-
"bg-surface text-success",
|
|
1434
|
-
"border-[length:var(--border-width)] border-success",
|
|
1435
|
-
"shadow-sm",
|
|
1436
|
-
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
1437
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
1438
|
-
].join(" "),
|
|
1439
|
-
warning: [
|
|
1440
|
-
"bg-surface text-warning",
|
|
1441
|
-
"border-[length:var(--border-width)] border-warning",
|
|
1442
|
-
"shadow-sm",
|
|
1443
|
-
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
1444
|
-
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
1445
|
-
].join(" "),
|
|
1446
|
-
// "default" is an alias for secondary
|
|
1447
|
-
default: [
|
|
1448
|
-
"bg-secondary text-secondary-foreground",
|
|
1449
|
-
"border-[length:var(--border-width-thin)] border-border",
|
|
1450
|
-
"hover:bg-secondary-hover",
|
|
1451
|
-
"active:scale-[var(--active-scale)]"
|
|
1452
|
-
].join(" ")
|
|
1453
|
-
};
|
|
1454
|
-
variantStyles2.destructive = variantStyles2.danger;
|
|
1455
|
-
sizeStyles2 = {
|
|
1456
|
-
sm: "px-3 py-1.5 text-sm",
|
|
1457
|
-
md: "px-4 py-2 text-sm",
|
|
1458
|
-
lg: "px-6 py-3 text-base"
|
|
1459
|
-
};
|
|
1460
|
-
iconSizeStyles = {
|
|
1461
|
-
sm: "h-3.5 w-3.5",
|
|
1462
|
-
md: "h-4 w-4",
|
|
1463
|
-
lg: "h-5 w-5"
|
|
1464
|
-
};
|
|
1465
|
-
Button = React81__default.forwardRef(
|
|
1466
|
-
({
|
|
1467
|
-
className,
|
|
1468
|
-
variant = "primary",
|
|
1469
|
-
size = "md",
|
|
1470
|
-
isLoading = false,
|
|
1471
|
-
disabled,
|
|
1472
|
-
leftIcon,
|
|
1473
|
-
rightIcon,
|
|
1474
|
-
icon: iconProp,
|
|
1475
|
-
iconRight: iconRightProp,
|
|
1476
|
-
action,
|
|
1477
|
-
actionPayload,
|
|
1478
|
-
label,
|
|
1479
|
-
children,
|
|
1480
|
-
onClick,
|
|
1481
|
-
...props
|
|
1482
|
-
}, ref) => {
|
|
1483
|
-
const eventBus = useEventBus();
|
|
1484
|
-
const leftIconValue = leftIcon || iconProp;
|
|
1485
|
-
const rightIconValue = rightIcon || iconRightProp;
|
|
1486
|
-
const resolvedLeftIcon = resolveIconProp(leftIconValue, iconSizeStyles[size]);
|
|
1487
|
-
const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
|
|
1488
|
-
const handleClick = (e) => {
|
|
1489
|
-
if (action) {
|
|
1490
|
-
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
1491
|
-
}
|
|
1492
|
-
onClick?.(e);
|
|
1493
|
-
};
|
|
1494
|
-
return /* @__PURE__ */ jsxs(
|
|
1495
|
-
"button",
|
|
1496
|
-
{
|
|
1497
|
-
ref,
|
|
1498
|
-
disabled: disabled || isLoading,
|
|
1499
|
-
className: cn(
|
|
1500
|
-
"inline-flex items-center justify-center gap-2",
|
|
1501
|
-
"font-[var(--font-weight-medium)]",
|
|
1502
|
-
"rounded-sm",
|
|
1503
|
-
"cursor-pointer",
|
|
1504
|
-
"transition-all duration-[var(--transition-normal)]",
|
|
1505
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
1506
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1507
|
-
variantStyles2[variant],
|
|
1508
|
-
sizeStyles2[size],
|
|
1509
|
-
className
|
|
1510
|
-
),
|
|
1511
|
-
onClick: handleClick,
|
|
1512
|
-
...props,
|
|
1513
|
-
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
1514
|
-
children: [
|
|
1515
|
-
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
1516
|
-
children || label,
|
|
1517
|
-
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
1518
|
-
]
|
|
1519
|
-
}
|
|
1520
|
-
);
|
|
1521
|
-
}
|
|
1522
|
-
);
|
|
1523
|
-
Button.displayName = "Button";
|
|
1524
|
-
}
|
|
1525
|
-
});
|
|
1526
1531
|
var variantStyles3, sizeStyles3, Badge;
|
|
1527
1532
|
var init_Badge = __esm({
|
|
1528
1533
|
"components/atoms/Badge.tsx"() {
|
|
@@ -1565,7 +1570,7 @@ var init_Badge = __esm({
|
|
|
1565
1570
|
md: "px-2.5 py-1 text-sm",
|
|
1566
1571
|
lg: "px-3 py-1.5 text-base"
|
|
1567
1572
|
};
|
|
1568
|
-
Badge =
|
|
1573
|
+
Badge = React84__default.forwardRef(
|
|
1569
1574
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1570
1575
|
const iconSizes3 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1571
1576
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1598,6 +1603,7 @@ var variantClasses, iconMap, iconColors, Toast;
|
|
|
1598
1603
|
var init_Toast = __esm({
|
|
1599
1604
|
"components/molecules/Toast.tsx"() {
|
|
1600
1605
|
"use client";
|
|
1606
|
+
init_Box();
|
|
1601
1607
|
init_Icon();
|
|
1602
1608
|
init_Typography();
|
|
1603
1609
|
init_Button();
|
|
@@ -1655,17 +1661,20 @@ var init_Toast = __esm({
|
|
|
1655
1661
|
return () => clearTimeout(timer);
|
|
1656
1662
|
}, [duration, onDismiss, dismissEvent]);
|
|
1657
1663
|
return /* @__PURE__ */ jsx(
|
|
1658
|
-
|
|
1664
|
+
Box,
|
|
1659
1665
|
{
|
|
1660
1666
|
className: cn(
|
|
1661
|
-
|
|
1667
|
+
// `min-w-[300px]` only kicks in at `sm:` and above so a phone
|
|
1668
|
+
// viewport doesn't get a toast wider than the screen near the
|
|
1669
|
+
// edge. `max-w-[calc(100vw-2rem)]` clamps to viewport too.
|
|
1670
|
+
"border-l-4 p-4 shadow min-w-0 sm:min-w-[300px] max-w-md max-w-[calc(100vw-2rem)]",
|
|
1662
1671
|
"rounded-sm",
|
|
1663
1672
|
variantClasses[variant],
|
|
1664
1673
|
className
|
|
1665
1674
|
),
|
|
1666
1675
|
role: "alert",
|
|
1667
|
-
children: /* @__PURE__ */ jsxs(
|
|
1668
|
-
/* @__PURE__ */ jsx(
|
|
1676
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-3", children: [
|
|
1677
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx(
|
|
1669
1678
|
Icon,
|
|
1670
1679
|
{
|
|
1671
1680
|
icon: iconMap[variant],
|
|
@@ -1673,25 +1682,22 @@ var init_Toast = __esm({
|
|
|
1673
1682
|
className: iconColors[variant]
|
|
1674
1683
|
}
|
|
1675
1684
|
) }),
|
|
1676
|
-
/* @__PURE__ */ jsxs(
|
|
1685
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
1677
1686
|
title && /* @__PURE__ */ jsx(Typography, { variant: "h6", className: "mb-1", children: title }),
|
|
1678
1687
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-sm", children: message }),
|
|
1679
|
-
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(
|
|
1688
|
+
actionLabel && (onAction || actionEvent) && /* @__PURE__ */ jsx(Box, { className: "mt-3", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleAction, children: actionLabel }) })
|
|
1680
1689
|
] }),
|
|
1681
|
-
/* @__PURE__ */ jsxs(
|
|
1690
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-start gap-2 flex-shrink-0", children: [
|
|
1682
1691
|
badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: badge }),
|
|
1683
1692
|
dismissible && /* @__PURE__ */ jsx(
|
|
1684
|
-
|
|
1693
|
+
Button,
|
|
1685
1694
|
{
|
|
1686
|
-
|
|
1695
|
+
variant: "ghost",
|
|
1696
|
+
size: "sm",
|
|
1697
|
+
icon: X,
|
|
1687
1698
|
onClick: handleDismiss,
|
|
1688
|
-
className: cn(
|
|
1689
|
-
"flex-shrink-0 p-1 transition-colors rounded-sm",
|
|
1690
|
-
"hover:bg-muted",
|
|
1691
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
|
1692
|
-
),
|
|
1693
1699
|
"aria-label": "Dismiss toast",
|
|
1694
|
-
|
|
1700
|
+
className: "flex-shrink-0"
|
|
1695
1701
|
}
|
|
1696
1702
|
)
|
|
1697
1703
|
] })
|
|
@@ -1859,7 +1865,7 @@ var init_SvgFlow = __esm({
|
|
|
1859
1865
|
opacity = 1,
|
|
1860
1866
|
className
|
|
1861
1867
|
}) => {
|
|
1862
|
-
const markerId =
|
|
1868
|
+
const markerId = React84__default.useMemo(() => {
|
|
1863
1869
|
flowIdCounter += 1;
|
|
1864
1870
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
1865
1871
|
}, []);
|
|
@@ -2402,7 +2408,7 @@ var init_SvgRing = __esm({
|
|
|
2402
2408
|
className,
|
|
2403
2409
|
label
|
|
2404
2410
|
}) => {
|
|
2405
|
-
const gradientId =
|
|
2411
|
+
const gradientId = React84__default.useMemo(() => {
|
|
2406
2412
|
ringIdCounter += 1;
|
|
2407
2413
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2408
2414
|
}, []);
|
|
@@ -2563,7 +2569,7 @@ var Input;
|
|
|
2563
2569
|
var init_Input = __esm({
|
|
2564
2570
|
"components/atoms/Input.tsx"() {
|
|
2565
2571
|
init_cn();
|
|
2566
|
-
Input =
|
|
2572
|
+
Input = React84__default.forwardRef(
|
|
2567
2573
|
({
|
|
2568
2574
|
className,
|
|
2569
2575
|
inputType,
|
|
@@ -2681,7 +2687,7 @@ var Label;
|
|
|
2681
2687
|
var init_Label = __esm({
|
|
2682
2688
|
"components/atoms/Label.tsx"() {
|
|
2683
2689
|
init_cn();
|
|
2684
|
-
Label =
|
|
2690
|
+
Label = React84__default.forwardRef(
|
|
2685
2691
|
({ className, required, children, ...props }, ref) => {
|
|
2686
2692
|
return /* @__PURE__ */ jsxs(
|
|
2687
2693
|
"label",
|
|
@@ -2707,7 +2713,7 @@ var Textarea;
|
|
|
2707
2713
|
var init_Textarea = __esm({
|
|
2708
2714
|
"components/atoms/Textarea.tsx"() {
|
|
2709
2715
|
init_cn();
|
|
2710
|
-
Textarea =
|
|
2716
|
+
Textarea = React84__default.forwardRef(
|
|
2711
2717
|
({ className, error, ...props }, ref) => {
|
|
2712
2718
|
return /* @__PURE__ */ jsx(
|
|
2713
2719
|
"textarea",
|
|
@@ -2736,7 +2742,7 @@ var Select;
|
|
|
2736
2742
|
var init_Select = __esm({
|
|
2737
2743
|
"components/atoms/Select.tsx"() {
|
|
2738
2744
|
init_cn();
|
|
2739
|
-
Select =
|
|
2745
|
+
Select = React84__default.forwardRef(
|
|
2740
2746
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2741
2747
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2742
2748
|
/* @__PURE__ */ jsxs(
|
|
@@ -2778,7 +2784,7 @@ var Checkbox;
|
|
|
2778
2784
|
var init_Checkbox = __esm({
|
|
2779
2785
|
"components/atoms/Checkbox.tsx"() {
|
|
2780
2786
|
init_cn();
|
|
2781
|
-
Checkbox =
|
|
2787
|
+
Checkbox = React84__default.forwardRef(
|
|
2782
2788
|
({ className, label, id, ...props }, ref) => {
|
|
2783
2789
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2784
2790
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2860,7 +2866,7 @@ var init_Card = __esm({
|
|
|
2860
2866
|
md: "shadow",
|
|
2861
2867
|
lg: "shadow-lg"
|
|
2862
2868
|
};
|
|
2863
|
-
Card =
|
|
2869
|
+
Card = React84__default.forwardRef(
|
|
2864
2870
|
({
|
|
2865
2871
|
className,
|
|
2866
2872
|
variant = "bordered",
|
|
@@ -2896,9 +2902,9 @@ var init_Card = __esm({
|
|
|
2896
2902
|
}
|
|
2897
2903
|
);
|
|
2898
2904
|
Card.displayName = "Card";
|
|
2899
|
-
CardHeader =
|
|
2905
|
+
CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2900
2906
|
CardHeader.displayName = "CardHeader";
|
|
2901
|
-
CardTitle =
|
|
2907
|
+
CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2902
2908
|
"h3",
|
|
2903
2909
|
{
|
|
2904
2910
|
ref,
|
|
@@ -2911,11 +2917,11 @@ var init_Card = __esm({
|
|
|
2911
2917
|
}
|
|
2912
2918
|
));
|
|
2913
2919
|
CardTitle.displayName = "CardTitle";
|
|
2914
|
-
CardContent =
|
|
2920
|
+
CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2915
2921
|
CardContent.displayName = "CardContent";
|
|
2916
2922
|
CardBody = CardContent;
|
|
2917
2923
|
CardBody.displayName = "CardBody";
|
|
2918
|
-
CardFooter =
|
|
2924
|
+
CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2919
2925
|
"div",
|
|
2920
2926
|
{
|
|
2921
2927
|
ref,
|
|
@@ -2970,7 +2976,7 @@ var init_FilterPill = __esm({
|
|
|
2970
2976
|
md: "w-3.5 h-3.5",
|
|
2971
2977
|
lg: "w-4 h-4"
|
|
2972
2978
|
};
|
|
2973
|
-
FilterPill =
|
|
2979
|
+
FilterPill = React84__default.forwardRef(
|
|
2974
2980
|
({
|
|
2975
2981
|
className,
|
|
2976
2982
|
variant = "default",
|
|
@@ -3049,7 +3055,7 @@ var init_Spinner = __esm({
|
|
|
3049
3055
|
md: "h-6 w-6",
|
|
3050
3056
|
lg: "h-8 w-8"
|
|
3051
3057
|
};
|
|
3052
|
-
Spinner =
|
|
3058
|
+
Spinner = React84__default.forwardRef(
|
|
3053
3059
|
({ className, size = "md", ...props }, ref) => {
|
|
3054
3060
|
return /* @__PURE__ */ jsx(
|
|
3055
3061
|
"div",
|
|
@@ -3497,7 +3503,7 @@ var Radio;
|
|
|
3497
3503
|
var init_Radio = __esm({
|
|
3498
3504
|
"components/atoms/Radio.tsx"() {
|
|
3499
3505
|
init_cn();
|
|
3500
|
-
Radio =
|
|
3506
|
+
Radio = React84__default.forwardRef(
|
|
3501
3507
|
({
|
|
3502
3508
|
label,
|
|
3503
3509
|
helperText,
|
|
@@ -3669,7 +3675,7 @@ var init_Switch = __esm({
|
|
|
3669
3675
|
"components/atoms/Switch.tsx"() {
|
|
3670
3676
|
"use client";
|
|
3671
3677
|
init_cn();
|
|
3672
|
-
Switch =
|
|
3678
|
+
Switch = React84.forwardRef(
|
|
3673
3679
|
({
|
|
3674
3680
|
checked,
|
|
3675
3681
|
defaultChecked = false,
|
|
@@ -3680,10 +3686,10 @@ var init_Switch = __esm({
|
|
|
3680
3686
|
name,
|
|
3681
3687
|
className
|
|
3682
3688
|
}, ref) => {
|
|
3683
|
-
const [isChecked, setIsChecked] =
|
|
3689
|
+
const [isChecked, setIsChecked] = React84.useState(
|
|
3684
3690
|
checked !== void 0 ? checked : defaultChecked
|
|
3685
3691
|
);
|
|
3686
|
-
|
|
3692
|
+
React84.useEffect(() => {
|
|
3687
3693
|
if (checked !== void 0) {
|
|
3688
3694
|
setIsChecked(checked);
|
|
3689
3695
|
}
|
|
@@ -4032,6 +4038,16 @@ var init_FlipContainer = __esm({
|
|
|
4032
4038
|
FlipContainer.displayName = "FlipContainer";
|
|
4033
4039
|
}
|
|
4034
4040
|
});
|
|
4041
|
+
var Aside;
|
|
4042
|
+
var init_Aside = __esm({
|
|
4043
|
+
"components/atoms/Aside.tsx"() {
|
|
4044
|
+
init_cn();
|
|
4045
|
+
Aside = React84__default.forwardRef(
|
|
4046
|
+
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4047
|
+
);
|
|
4048
|
+
Aside.displayName = "Aside";
|
|
4049
|
+
}
|
|
4050
|
+
});
|
|
4035
4051
|
function toSharedContext(ctx) {
|
|
4036
4052
|
return createMinimalContext(
|
|
4037
4053
|
{
|
|
@@ -4103,8 +4119,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4103
4119
|
position = "top",
|
|
4104
4120
|
className
|
|
4105
4121
|
}) => {
|
|
4106
|
-
const [isVisible, setIsVisible] =
|
|
4107
|
-
const timeoutRef =
|
|
4122
|
+
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
4123
|
+
const timeoutRef = React84__default.useRef(null);
|
|
4108
4124
|
const handleMouseEnter = () => {
|
|
4109
4125
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4110
4126
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4113,7 +4129,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4113
4129
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4114
4130
|
setIsVisible(false);
|
|
4115
4131
|
};
|
|
4116
|
-
|
|
4132
|
+
React84__default.useEffect(() => {
|
|
4117
4133
|
return () => {
|
|
4118
4134
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4119
4135
|
};
|
|
@@ -4323,7 +4339,7 @@ var init_StatusDot = __esm({
|
|
|
4323
4339
|
md: "w-2.5 h-2.5",
|
|
4324
4340
|
lg: "w-3 h-3"
|
|
4325
4341
|
};
|
|
4326
|
-
StatusDot =
|
|
4342
|
+
StatusDot = React84__default.forwardRef(
|
|
4327
4343
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4328
4344
|
return /* @__PURE__ */ jsx(
|
|
4329
4345
|
"span",
|
|
@@ -4376,7 +4392,7 @@ var init_TrendIndicator = __esm({
|
|
|
4376
4392
|
down: TrendingDown,
|
|
4377
4393
|
flat: ArrowRight
|
|
4378
4394
|
};
|
|
4379
|
-
TrendIndicator =
|
|
4395
|
+
TrendIndicator = React84__default.forwardRef(
|
|
4380
4396
|
({
|
|
4381
4397
|
className,
|
|
4382
4398
|
value,
|
|
@@ -4443,7 +4459,7 @@ var init_RangeSlider = __esm({
|
|
|
4443
4459
|
md: "w-4 h-4",
|
|
4444
4460
|
lg: "w-5 h-5"
|
|
4445
4461
|
};
|
|
4446
|
-
RangeSlider =
|
|
4462
|
+
RangeSlider = React84__default.forwardRef(
|
|
4447
4463
|
({
|
|
4448
4464
|
className,
|
|
4449
4465
|
min = 0,
|
|
@@ -5011,7 +5027,7 @@ var init_ContentSection = __esm({
|
|
|
5011
5027
|
md: "py-16",
|
|
5012
5028
|
lg: "py-24"
|
|
5013
5029
|
};
|
|
5014
|
-
ContentSection =
|
|
5030
|
+
ContentSection = React84__default.forwardRef(
|
|
5015
5031
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5016
5032
|
return /* @__PURE__ */ jsx(
|
|
5017
5033
|
Box,
|
|
@@ -5545,7 +5561,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5545
5561
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5546
5562
|
"none": {}
|
|
5547
5563
|
};
|
|
5548
|
-
AnimatedReveal =
|
|
5564
|
+
AnimatedReveal = React84__default.forwardRef(
|
|
5549
5565
|
({
|
|
5550
5566
|
trigger = "scroll",
|
|
5551
5567
|
animation = "fade-up",
|
|
@@ -5705,7 +5721,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5705
5721
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
5706
5722
|
"use client";
|
|
5707
5723
|
init_cn();
|
|
5708
|
-
AnimatedGraphic =
|
|
5724
|
+
AnimatedGraphic = React84__default.forwardRef(
|
|
5709
5725
|
({
|
|
5710
5726
|
src,
|
|
5711
5727
|
svgContent,
|
|
@@ -5728,7 +5744,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
5728
5744
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5729
5745
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5730
5746
|
const prevAnimateRef = useRef(animate);
|
|
5731
|
-
const setRef =
|
|
5747
|
+
const setRef = React84__default.useCallback(
|
|
5732
5748
|
(node) => {
|
|
5733
5749
|
containerRef.current = node;
|
|
5734
5750
|
if (typeof ref === "function") ref(node);
|
|
@@ -5953,9 +5969,9 @@ function ScoreDisplay({
|
|
|
5953
5969
|
...rest
|
|
5954
5970
|
}) {
|
|
5955
5971
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
5956
|
-
const [displayValue, setDisplayValue] =
|
|
5957
|
-
const [isAnimating, setIsAnimating] =
|
|
5958
|
-
|
|
5972
|
+
const [displayValue, setDisplayValue] = React84.useState(resolvedValue);
|
|
5973
|
+
const [isAnimating, setIsAnimating] = React84.useState(false);
|
|
5974
|
+
React84.useEffect(() => {
|
|
5959
5975
|
if (!animated || displayValue === resolvedValue) {
|
|
5960
5976
|
setDisplayValue(resolvedValue);
|
|
5961
5977
|
return;
|
|
@@ -6025,9 +6041,9 @@ function ControlButton({
|
|
|
6025
6041
|
className
|
|
6026
6042
|
}) {
|
|
6027
6043
|
const eventBus = useEventBus();
|
|
6028
|
-
const [isPressed, setIsPressed] =
|
|
6044
|
+
const [isPressed, setIsPressed] = React84.useState(false);
|
|
6029
6045
|
const actualPressed = pressed ?? isPressed;
|
|
6030
|
-
const handlePointerDown =
|
|
6046
|
+
const handlePointerDown = React84.useCallback(
|
|
6031
6047
|
(e) => {
|
|
6032
6048
|
e.preventDefault();
|
|
6033
6049
|
if (disabled) return;
|
|
@@ -6037,7 +6053,7 @@ function ControlButton({
|
|
|
6037
6053
|
},
|
|
6038
6054
|
[disabled, pressEvent, eventBus, onPress]
|
|
6039
6055
|
);
|
|
6040
|
-
const handlePointerUp =
|
|
6056
|
+
const handlePointerUp = React84.useCallback(
|
|
6041
6057
|
(e) => {
|
|
6042
6058
|
e.preventDefault();
|
|
6043
6059
|
if (disabled) return;
|
|
@@ -6047,7 +6063,7 @@ function ControlButton({
|
|
|
6047
6063
|
},
|
|
6048
6064
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6049
6065
|
);
|
|
6050
|
-
const handlePointerLeave =
|
|
6066
|
+
const handlePointerLeave = React84.useCallback(
|
|
6051
6067
|
(e) => {
|
|
6052
6068
|
if (isPressed) {
|
|
6053
6069
|
setIsPressed(false);
|
|
@@ -6953,9 +6969,9 @@ function MiniMap({
|
|
|
6953
6969
|
viewportRect,
|
|
6954
6970
|
className
|
|
6955
6971
|
}) {
|
|
6956
|
-
const canvasRef =
|
|
6957
|
-
const frameRef =
|
|
6958
|
-
|
|
6972
|
+
const canvasRef = React84.useRef(null);
|
|
6973
|
+
const frameRef = React84.useRef(0);
|
|
6974
|
+
React84.useEffect(() => {
|
|
6959
6975
|
const canvas = canvasRef.current;
|
|
6960
6976
|
if (!canvas) return;
|
|
6961
6977
|
const ctx = canvas.getContext("2d");
|
|
@@ -7249,7 +7265,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7249
7265
|
"use client";
|
|
7250
7266
|
init_cn();
|
|
7251
7267
|
init_ErrorState();
|
|
7252
|
-
ErrorBoundary = class extends
|
|
7268
|
+
ErrorBoundary = class extends React84__default.Component {
|
|
7253
7269
|
constructor(props) {
|
|
7254
7270
|
super(props);
|
|
7255
7271
|
__publicField(this, "reset", () => {
|
|
@@ -8185,7 +8201,7 @@ var init_HeroSection = __esm({
|
|
|
8185
8201
|
HeroSection.displayName = "HeroSection";
|
|
8186
8202
|
}
|
|
8187
8203
|
});
|
|
8188
|
-
var ArticleSection;
|
|
8204
|
+
var maxWidthMap, ArticleSection;
|
|
8189
8205
|
var init_ArticleSection = __esm({
|
|
8190
8206
|
"components/molecules/ArticleSection.tsx"() {
|
|
8191
8207
|
"use client";
|
|
@@ -8193,6 +8209,11 @@ var init_ArticleSection = __esm({
|
|
|
8193
8209
|
init_Box();
|
|
8194
8210
|
init_Stack();
|
|
8195
8211
|
init_Typography();
|
|
8212
|
+
maxWidthMap = {
|
|
8213
|
+
sm: "max-w-full sm:max-w-xl md:max-w-2xl",
|
|
8214
|
+
md: "max-w-full sm:max-w-2xl md:max-w-3xl",
|
|
8215
|
+
lg: "max-w-full sm:max-w-3xl md:max-w-4xl"
|
|
8216
|
+
};
|
|
8196
8217
|
ArticleSection = ({
|
|
8197
8218
|
title,
|
|
8198
8219
|
children,
|
|
@@ -8207,7 +8228,7 @@ var init_ArticleSection = __esm({
|
|
|
8207
8228
|
className
|
|
8208
8229
|
),
|
|
8209
8230
|
padding: "md",
|
|
8210
|
-
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", children: [
|
|
8231
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", align: "start", className: cn("w-full mx-auto", maxWidthMap[maxWidth]), children: [
|
|
8211
8232
|
/* @__PURE__ */ jsx(Typography, { variant: "h2", children: title }),
|
|
8212
8233
|
/* @__PURE__ */ jsx(Box, { className: "w-full", children })
|
|
8213
8234
|
] })
|
|
@@ -8259,6 +8280,7 @@ var init_TeamCard = __esm({
|
|
|
8259
8280
|
var gapStyles2, colStyles, SimpleGrid;
|
|
8260
8281
|
var init_SimpleGrid = __esm({
|
|
8261
8282
|
"components/molecules/SimpleGrid.tsx"() {
|
|
8283
|
+
init_Box();
|
|
8262
8284
|
init_cn();
|
|
8263
8285
|
gapStyles2 = {
|
|
8264
8286
|
none: "gap-0",
|
|
@@ -8271,10 +8293,10 @@ var init_SimpleGrid = __esm({
|
|
|
8271
8293
|
colStyles = {
|
|
8272
8294
|
1: "grid-cols-1",
|
|
8273
8295
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
8274
|
-
3: "grid-cols-1 sm:grid-cols-2
|
|
8275
|
-
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
8276
|
-
5: "grid-cols-1 sm:grid-cols-2
|
|
8277
|
-
6: "grid-cols-1 sm:grid-cols-2
|
|
8296
|
+
3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
|
|
8297
|
+
4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
|
|
8298
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",
|
|
8299
|
+
6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6"
|
|
8278
8300
|
};
|
|
8279
8301
|
SimpleGrid = ({
|
|
8280
8302
|
minChildWidth = 250,
|
|
@@ -8285,12 +8307,12 @@ var init_SimpleGrid = __esm({
|
|
|
8285
8307
|
children
|
|
8286
8308
|
}) => {
|
|
8287
8309
|
if (cols) {
|
|
8288
|
-
return /* @__PURE__ */ jsx(
|
|
8310
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("grid", colStyles[cols], gapStyles2[gap], className), children });
|
|
8289
8311
|
}
|
|
8290
8312
|
const minWidth = typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth;
|
|
8291
8313
|
const templateColumns = maxCols ? `repeat(auto-fit, minmax(min(${minWidth}, 100%), 1fr))` : `repeat(auto-fit, minmax(${minWidth}, 1fr))`;
|
|
8292
8314
|
return /* @__PURE__ */ jsx(
|
|
8293
|
-
|
|
8315
|
+
Box,
|
|
8294
8316
|
{
|
|
8295
8317
|
className: cn("grid", gapStyles2[gap], className),
|
|
8296
8318
|
style: {
|
|
@@ -8680,8 +8702,8 @@ var init_Tooltip = __esm({
|
|
|
8680
8702
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
8681
8703
|
};
|
|
8682
8704
|
}, []);
|
|
8683
|
-
const triggerElement =
|
|
8684
|
-
const trigger =
|
|
8705
|
+
const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
8706
|
+
const trigger = React84__default.cloneElement(triggerElement, {
|
|
8685
8707
|
ref: triggerRef,
|
|
8686
8708
|
onMouseEnter: handleMouseEnter,
|
|
8687
8709
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8802,8 +8824,8 @@ var init_Popover = __esm({
|
|
|
8802
8824
|
onMouseEnter: handleOpen,
|
|
8803
8825
|
onMouseLeave: handleClose
|
|
8804
8826
|
};
|
|
8805
|
-
const childElement =
|
|
8806
|
-
const triggerElement =
|
|
8827
|
+
const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
8828
|
+
const triggerElement = React84__default.cloneElement(
|
|
8807
8829
|
childElement,
|
|
8808
8830
|
{
|
|
8809
8831
|
ref: triggerRef,
|
|
@@ -8852,6 +8874,7 @@ var Menu;
|
|
|
8852
8874
|
var init_Menu = __esm({
|
|
8853
8875
|
"components/molecules/Menu.tsx"() {
|
|
8854
8876
|
"use client";
|
|
8877
|
+
init_Box();
|
|
8855
8878
|
init_Icon();
|
|
8856
8879
|
init_Divider();
|
|
8857
8880
|
init_Typography();
|
|
@@ -8920,8 +8943,8 @@ var init_Menu = __esm({
|
|
|
8920
8943
|
"bottom-start": "top-full left-0 mt-2",
|
|
8921
8944
|
"bottom-end": "top-full right-0 mt-2"
|
|
8922
8945
|
};
|
|
8923
|
-
const triggerChild =
|
|
8924
|
-
const triggerElement =
|
|
8946
|
+
const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
8947
|
+
const triggerElement = React84__default.cloneElement(
|
|
8925
8948
|
triggerChild,
|
|
8926
8949
|
{
|
|
8927
8950
|
ref: triggerRef,
|
|
@@ -8933,17 +8956,17 @@ var init_Menu = __esm({
|
|
|
8933
8956
|
"border-[length:var(--border-width)] border-border",
|
|
8934
8957
|
"shadow",
|
|
8935
8958
|
"rounded-sm",
|
|
8936
|
-
"min-w-[200px] py-1"
|
|
8959
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
8937
8960
|
);
|
|
8938
8961
|
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
8939
8962
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
8940
8963
|
const isDanger = item.variant === "danger";
|
|
8941
8964
|
return /* @__PURE__ */ jsx(
|
|
8942
|
-
|
|
8965
|
+
Box,
|
|
8943
8966
|
{
|
|
8944
|
-
|
|
8945
|
-
onClick: () => handleItemClick({ ...item, id: itemId }),
|
|
8946
|
-
disabled: item.disabled,
|
|
8967
|
+
as: "button",
|
|
8968
|
+
onClick: () => !item.disabled && handleItemClick({ ...item, id: itemId }),
|
|
8969
|
+
"aria-disabled": item.disabled || void 0,
|
|
8947
8970
|
onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
|
|
8948
8971
|
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
8949
8972
|
className: cn(
|
|
@@ -8955,7 +8978,7 @@ var init_Menu = __esm({
|
|
|
8955
8978
|
item.disabled && "cursor-not-allowed",
|
|
8956
8979
|
isDanger && "text-error hover:bg-error/10"
|
|
8957
8980
|
),
|
|
8958
|
-
children: /* @__PURE__ */ jsxs(
|
|
8981
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
8959
8982
|
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
8960
8983
|
/* @__PURE__ */ jsx(
|
|
8961
8984
|
Typography,
|
|
@@ -8980,10 +9003,10 @@ var init_Menu = __esm({
|
|
|
8980
9003
|
if (isDivider) {
|
|
8981
9004
|
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
8982
9005
|
}
|
|
8983
|
-
return /* @__PURE__ */ jsxs(
|
|
9006
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
8984
9007
|
renderMenuItem(item, !!hasSubMenu, index),
|
|
8985
9008
|
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
8986
|
-
|
|
9009
|
+
Box,
|
|
8987
9010
|
{
|
|
8988
9011
|
className: cn(
|
|
8989
9012
|
"absolute left-full top-0 ml-2 z-50",
|
|
@@ -8995,10 +9018,10 @@ var init_Menu = __esm({
|
|
|
8995
9018
|
] }, itemId);
|
|
8996
9019
|
});
|
|
8997
9020
|
};
|
|
8998
|
-
return /* @__PURE__ */ jsxs(
|
|
9021
|
+
return /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
8999
9022
|
triggerElement,
|
|
9000
9023
|
isOpen && triggerRect && /* @__PURE__ */ jsx(
|
|
9001
|
-
|
|
9024
|
+
Box,
|
|
9002
9025
|
{
|
|
9003
9026
|
ref: menuRef,
|
|
9004
9027
|
className: cn(
|
|
@@ -9337,13 +9360,13 @@ var init_MapView = __esm({
|
|
|
9337
9360
|
shadowSize: [41, 41]
|
|
9338
9361
|
});
|
|
9339
9362
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9340
|
-
const { useEffect:
|
|
9363
|
+
const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback112, useState: useState97 } = React84__default;
|
|
9341
9364
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9342
9365
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9343
9366
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9344
9367
|
const map = useMap();
|
|
9345
9368
|
const prevRef = useRef65({ centerLat, centerLng, zoom });
|
|
9346
|
-
|
|
9369
|
+
useEffect68(() => {
|
|
9347
9370
|
const prev = prevRef.current;
|
|
9348
9371
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
9349
9372
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -9354,7 +9377,7 @@ var init_MapView = __esm({
|
|
|
9354
9377
|
}
|
|
9355
9378
|
function MapClickHandler({ onMapClick }) {
|
|
9356
9379
|
const map = useMap();
|
|
9357
|
-
|
|
9380
|
+
useEffect68(() => {
|
|
9358
9381
|
if (!onMapClick) return;
|
|
9359
9382
|
const handler = (e) => {
|
|
9360
9383
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -9382,7 +9405,7 @@ var init_MapView = __esm({
|
|
|
9382
9405
|
showAttribution = true
|
|
9383
9406
|
}) {
|
|
9384
9407
|
const eventBus = useEventBus2();
|
|
9385
|
-
const [clickedPosition, setClickedPosition] =
|
|
9408
|
+
const [clickedPosition, setClickedPosition] = useState97(null);
|
|
9386
9409
|
const handleMapClick = useCallback112((lat, lng) => {
|
|
9387
9410
|
if (showClickedPin) {
|
|
9388
9411
|
setClickedPosition({ lat, lng });
|
|
@@ -9583,7 +9606,7 @@ function InputPattern({
|
|
|
9583
9606
|
fieldName
|
|
9584
9607
|
}) {
|
|
9585
9608
|
const { emit } = useEventBus();
|
|
9586
|
-
const [localValue, setLocalValue] =
|
|
9609
|
+
const [localValue, setLocalValue] = React84__default.useState(value);
|
|
9587
9610
|
const handleChange = (e) => {
|
|
9588
9611
|
setLocalValue(e.target.value);
|
|
9589
9612
|
if (onChange) {
|
|
@@ -9621,7 +9644,7 @@ function TextareaPattern({
|
|
|
9621
9644
|
fieldName
|
|
9622
9645
|
}) {
|
|
9623
9646
|
const { emit } = useEventBus();
|
|
9624
|
-
const [localValue, setLocalValue] =
|
|
9647
|
+
const [localValue, setLocalValue] = React84__default.useState(value);
|
|
9625
9648
|
const handleChange = (e) => {
|
|
9626
9649
|
setLocalValue(e.target.value);
|
|
9627
9650
|
if (onChange) {
|
|
@@ -9653,7 +9676,7 @@ function SelectPattern({
|
|
|
9653
9676
|
fieldName
|
|
9654
9677
|
}) {
|
|
9655
9678
|
const { emit } = useEventBus();
|
|
9656
|
-
const [localValue, setLocalValue] =
|
|
9679
|
+
const [localValue, setLocalValue] = React84__default.useState(value);
|
|
9657
9680
|
const handleChange = (e) => {
|
|
9658
9681
|
setLocalValue(e.target.value);
|
|
9659
9682
|
if (onChange) {
|
|
@@ -9682,7 +9705,7 @@ function CheckboxPattern({
|
|
|
9682
9705
|
className
|
|
9683
9706
|
}) {
|
|
9684
9707
|
const { emit } = useEventBus();
|
|
9685
|
-
const [localChecked, setLocalChecked] =
|
|
9708
|
+
const [localChecked, setLocalChecked] = React84__default.useState(checked);
|
|
9686
9709
|
const handleChange = (e) => {
|
|
9687
9710
|
setLocalChecked(e.target.checked);
|
|
9688
9711
|
if (onChange) {
|
|
@@ -9913,8 +9936,8 @@ function ActionButtons({
|
|
|
9913
9936
|
disabled
|
|
9914
9937
|
}) {
|
|
9915
9938
|
const eventBus = useEventBus();
|
|
9916
|
-
const [activeButtons, setActiveButtons] =
|
|
9917
|
-
const handlePress =
|
|
9939
|
+
const [activeButtons, setActiveButtons] = React84.useState(/* @__PURE__ */ new Set());
|
|
9940
|
+
const handlePress = React84.useCallback(
|
|
9918
9941
|
(id) => {
|
|
9919
9942
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9920
9943
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9922,7 +9945,7 @@ function ActionButtons({
|
|
|
9922
9945
|
},
|
|
9923
9946
|
[actionEvent, eventBus, onAction]
|
|
9924
9947
|
);
|
|
9925
|
-
const handleRelease =
|
|
9948
|
+
const handleRelease = React84.useCallback(
|
|
9926
9949
|
(id) => {
|
|
9927
9950
|
setActiveButtons((prev) => {
|
|
9928
9951
|
const next = new Set(prev);
|
|
@@ -12773,7 +12796,7 @@ var init_MarkdownContent = __esm({
|
|
|
12773
12796
|
init_Box();
|
|
12774
12797
|
init_useTranslate();
|
|
12775
12798
|
init_cn();
|
|
12776
|
-
MarkdownContent =
|
|
12799
|
+
MarkdownContent = React84__default.memo(
|
|
12777
12800
|
({ content, direction, className }) => {
|
|
12778
12801
|
const { t: _t } = useTranslate();
|
|
12779
12802
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -12991,7 +13014,7 @@ var init_CodeBlock = __esm({
|
|
|
12991
13014
|
log8 = createLogger("almadar:ui:markdown-code");
|
|
12992
13015
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
12993
13016
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
12994
|
-
CodeBlock =
|
|
13017
|
+
CodeBlock = React84__default.memo(
|
|
12995
13018
|
({
|
|
12996
13019
|
code: rawCode,
|
|
12997
13020
|
language = "text",
|
|
@@ -14300,7 +14323,7 @@ var init_StateMachineView = __esm({
|
|
|
14300
14323
|
style: { top: title ? 30 : 0 },
|
|
14301
14324
|
children: [
|
|
14302
14325
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
14303
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
14326
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
14304
14327
|
StateNode,
|
|
14305
14328
|
{
|
|
14306
14329
|
state,
|
|
@@ -15881,27 +15904,23 @@ var init_Grid = __esm({
|
|
|
15881
15904
|
as: Component = "div"
|
|
15882
15905
|
}) => {
|
|
15883
15906
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
Comp,
|
|
15907
|
+
return React84__default.createElement(
|
|
15908
|
+
Component,
|
|
15887
15909
|
{
|
|
15888
15910
|
className: cn(
|
|
15889
15911
|
"grid",
|
|
15890
15912
|
getColsClass(cols),
|
|
15891
|
-
// Gap (rowGap/colGap override gap)
|
|
15892
15913
|
rowGap ? rowGapStyles[rowGap] : colGap ? void 0 : gapStyles3[gap],
|
|
15893
15914
|
colGap ? colGapStyles[colGap] : rowGap ? void 0 : void 0,
|
|
15894
15915
|
rowGap && colGap ? `${rowGapStyles[rowGap]} ${colGapStyles[colGap]}` : void 0,
|
|
15895
|
-
// Alignment
|
|
15896
15916
|
alignItems && alignStyles2[alignItems],
|
|
15897
15917
|
justifyItems && justifyStyles2[justifyItems],
|
|
15898
|
-
// Flow
|
|
15899
15918
|
flow && flowStyles[flow],
|
|
15900
15919
|
className
|
|
15901
15920
|
),
|
|
15902
|
-
style: mergedStyle
|
|
15903
|
-
|
|
15904
|
-
|
|
15921
|
+
style: mergedStyle
|
|
15922
|
+
},
|
|
15923
|
+
children
|
|
15905
15924
|
);
|
|
15906
15925
|
};
|
|
15907
15926
|
Grid.displayName = "Grid";
|
|
@@ -16920,6 +16939,35 @@ var init_useSwipeGesture = __esm({
|
|
|
16920
16939
|
"use client";
|
|
16921
16940
|
}
|
|
16922
16941
|
});
|
|
16942
|
+
function dayWindowForViewport(width) {
|
|
16943
|
+
if (width <= 640) return 1;
|
|
16944
|
+
if (width <= 1024) return 3;
|
|
16945
|
+
return 7;
|
|
16946
|
+
}
|
|
16947
|
+
function useDayWindow(override) {
|
|
16948
|
+
const [w, setW] = useState(() => {
|
|
16949
|
+
if (override !== "auto") return override;
|
|
16950
|
+
if (typeof window === "undefined") return 7;
|
|
16951
|
+
return dayWindowForViewport(window.innerWidth);
|
|
16952
|
+
});
|
|
16953
|
+
useEffect(() => {
|
|
16954
|
+
if (override !== "auto") {
|
|
16955
|
+
setW(override);
|
|
16956
|
+
return void 0;
|
|
16957
|
+
}
|
|
16958
|
+
if (typeof window === "undefined") return void 0;
|
|
16959
|
+
const onResize = () => setW(dayWindowForViewport(window.innerWidth));
|
|
16960
|
+
onResize();
|
|
16961
|
+
window.addEventListener("resize", onResize);
|
|
16962
|
+
return () => window.removeEventListener("resize", onResize);
|
|
16963
|
+
}, [override]);
|
|
16964
|
+
return w;
|
|
16965
|
+
}
|
|
16966
|
+
function formatDateRange(start, end) {
|
|
16967
|
+
const startStr = start.toLocaleDateString(void 0, SHORT_DATE);
|
|
16968
|
+
const endStr = end.toLocaleDateString(void 0, SHORT_DATE);
|
|
16969
|
+
return start.toDateString() === end.toDateString() ? startStr : `${startStr} \u2013 ${endStr}`;
|
|
16970
|
+
}
|
|
16923
16971
|
function getStartOfWeek(date) {
|
|
16924
16972
|
const d = new Date(date);
|
|
16925
16973
|
const day = d.getDay();
|
|
@@ -16960,7 +17008,8 @@ function CalendarGrid({
|
|
|
16960
17008
|
longPressEvent,
|
|
16961
17009
|
longPressPayload,
|
|
16962
17010
|
swipeLeftEvent,
|
|
16963
|
-
swipeRightEvent
|
|
17011
|
+
swipeRightEvent,
|
|
17012
|
+
dayWindow = "auto"
|
|
16964
17013
|
}) {
|
|
16965
17014
|
const eventBus = useEventBus();
|
|
16966
17015
|
const longPressTimer = useRef(null);
|
|
@@ -16976,6 +17025,26 @@ function CalendarGrid({
|
|
|
16976
17025
|
() => timeSlots ?? generateDefaultTimeSlots(),
|
|
16977
17026
|
[timeSlots]
|
|
16978
17027
|
);
|
|
17028
|
+
const visibleCount = useDayWindow(dayWindow);
|
|
17029
|
+
const [dayOffset, setDayOffset] = useState(0);
|
|
17030
|
+
useEffect(() => {
|
|
17031
|
+
if (dayOffset + visibleCount > 7) {
|
|
17032
|
+
setDayOffset(Math.max(0, 7 - visibleCount));
|
|
17033
|
+
}
|
|
17034
|
+
}, [visibleCount, dayOffset]);
|
|
17035
|
+
const visibleDays = useMemo(
|
|
17036
|
+
() => weekDays.slice(dayOffset, dayOffset + visibleCount),
|
|
17037
|
+
[weekDays, dayOffset, visibleCount]
|
|
17038
|
+
);
|
|
17039
|
+
const canPrev = dayOffset > 0;
|
|
17040
|
+
const canNext = dayOffset + visibleCount < 7;
|
|
17041
|
+
const stepPrev = useCallback(() => {
|
|
17042
|
+
setDayOffset((d) => Math.max(0, d - visibleCount));
|
|
17043
|
+
}, [visibleCount]);
|
|
17044
|
+
const stepNext = useCallback(() => {
|
|
17045
|
+
setDayOffset((d) => Math.min(7 - visibleCount, d + visibleCount));
|
|
17046
|
+
}, [visibleCount]);
|
|
17047
|
+
const gridColsClass = visibleCount === 1 ? "grid-cols-2" : visibleCount === 3 ? "grid-cols-4" : "grid-cols-8";
|
|
16979
17048
|
const handleSlotClick = useCallback(
|
|
16980
17049
|
(day, time) => {
|
|
16981
17050
|
onSlotClick?.(day, time);
|
|
@@ -17027,93 +17096,124 @@ function CalendarGrid({
|
|
|
17027
17096
|
},
|
|
17028
17097
|
event.id
|
|
17029
17098
|
);
|
|
17030
|
-
return /* @__PURE__ */
|
|
17099
|
+
return /* @__PURE__ */ jsxs(
|
|
17031
17100
|
Box,
|
|
17032
17101
|
{
|
|
17033
|
-
className
|
|
17102
|
+
className,
|
|
17034
17103
|
...swipeLeftEvent || swipeRightEvent ? {
|
|
17035
17104
|
onPointerDown: swipe.onPointerDown,
|
|
17036
17105
|
onPointerMove: swipe.onPointerMove,
|
|
17037
17106
|
onPointerUp: swipe.onPointerUp,
|
|
17038
17107
|
onPointerCancel: swipe.onPointerCancel
|
|
17039
17108
|
} : {},
|
|
17040
|
-
children:
|
|
17041
|
-
/* @__PURE__ */ jsxs(
|
|
17042
|
-
/* @__PURE__ */ jsx(
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17109
|
+
children: [
|
|
17110
|
+
visibleCount < 7 && /* @__PURE__ */ jsxs(HStack, { align: "center", justify: "between", className: "mb-2 px-2", children: [
|
|
17111
|
+
/* @__PURE__ */ jsx(
|
|
17112
|
+
Button,
|
|
17113
|
+
{
|
|
17114
|
+
variant: "ghost",
|
|
17115
|
+
size: "sm",
|
|
17116
|
+
icon: ChevronLeft,
|
|
17117
|
+
onClick: stepPrev,
|
|
17118
|
+
"aria-disabled": !canPrev || void 0,
|
|
17119
|
+
"aria-label": "Previous days",
|
|
17120
|
+
children: "Prev"
|
|
17121
|
+
}
|
|
17122
|
+
),
|
|
17123
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
17124
|
+
/* @__PURE__ */ jsx(
|
|
17125
|
+
Button,
|
|
17126
|
+
{
|
|
17127
|
+
variant: "ghost",
|
|
17128
|
+
size: "sm",
|
|
17129
|
+
iconRight: ChevronRight,
|
|
17130
|
+
onClick: stepNext,
|
|
17131
|
+
"aria-disabled": !canNext || void 0,
|
|
17132
|
+
"aria-label": "Next days",
|
|
17133
|
+
children: "Next"
|
|
17134
|
+
}
|
|
17135
|
+
)
|
|
17065
17136
|
] }),
|
|
17066
|
-
/* @__PURE__ */
|
|
17067
|
-
Box,
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17137
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
17138
|
+
/* @__PURE__ */ jsxs(Box, { className: cn("grid border-b border-border", gridColsClass), children: [
|
|
17139
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2" }),
|
|
17140
|
+
visibleDays.map((day) => {
|
|
17141
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
17142
|
+
const count = eventsForDayCount(day);
|
|
17143
|
+
return /* @__PURE__ */ jsxs(
|
|
17144
|
+
Box,
|
|
17073
17145
|
{
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
17084
|
-
return /* @__PURE__ */ jsx(
|
|
17085
|
-
TimeSlotCell,
|
|
17086
|
-
{
|
|
17087
|
-
time,
|
|
17088
|
-
isOccupied: slotEvents.length > 0,
|
|
17089
|
-
onClick: () => handleSlotClick(day, time),
|
|
17090
|
-
className: cn(
|
|
17091
|
-
"border-l border-border",
|
|
17092
|
-
isToday && "bg-blue-50/30"
|
|
17146
|
+
className: "border-l border-border",
|
|
17147
|
+
children: [
|
|
17148
|
+
/* @__PURE__ */ jsx(
|
|
17149
|
+
DayCell,
|
|
17150
|
+
{
|
|
17151
|
+
date: day,
|
|
17152
|
+
isToday,
|
|
17153
|
+
onClick: onDayClick
|
|
17154
|
+
}
|
|
17093
17155
|
),
|
|
17094
|
-
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17156
|
+
count > 0 && /* @__PURE__ */ jsx(Box, { className: "text-center pb-1", children: /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: count }) })
|
|
17157
|
+
]
|
|
17158
|
+
},
|
|
17159
|
+
day.toISOString()
|
|
17160
|
+
);
|
|
17161
|
+
})
|
|
17162
|
+
] }),
|
|
17163
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[500px] overflow-y-auto", children: resolvedTimeSlots.map((time) => /* @__PURE__ */ jsxs(
|
|
17164
|
+
Box,
|
|
17165
|
+
{
|
|
17166
|
+
className: cn("grid border-b border-border", gridColsClass),
|
|
17167
|
+
children: [
|
|
17168
|
+
/* @__PURE__ */ jsx(Box, { className: "p-2 text-right pr-3", children: /* @__PURE__ */ jsx(
|
|
17169
|
+
Typography,
|
|
17170
|
+
{
|
|
17171
|
+
variant: "small",
|
|
17172
|
+
className: "text-muted-foreground",
|
|
17173
|
+
children: time
|
|
17174
|
+
}
|
|
17175
|
+
) }),
|
|
17176
|
+
visibleDays.map((day) => {
|
|
17177
|
+
const slotEvents = events2.filter(
|
|
17178
|
+
(ev) => eventInSlot(ev, day, time)
|
|
17179
|
+
);
|
|
17180
|
+
const isToday = day.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
17181
|
+
return /* @__PURE__ */ jsx(
|
|
17182
|
+
TimeSlotCell,
|
|
17183
|
+
{
|
|
17184
|
+
time,
|
|
17185
|
+
isOccupied: slotEvents.length > 0,
|
|
17186
|
+
onClick: () => handleSlotClick(day, time),
|
|
17187
|
+
className: cn(
|
|
17188
|
+
"border-l border-border",
|
|
17189
|
+
isToday && "bg-blue-50/30"
|
|
17190
|
+
),
|
|
17191
|
+
...longPressEvent ? {
|
|
17192
|
+
onPointerDown: () => startLongPress(day, time),
|
|
17193
|
+
onPointerUp: clearLongPress,
|
|
17194
|
+
onPointerCancel: clearLongPress
|
|
17195
|
+
} : {},
|
|
17196
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "xs", children: slotEvents.map(renderEvent) })
|
|
17197
|
+
},
|
|
17198
|
+
`${day.toISOString()}-${time}`
|
|
17199
|
+
);
|
|
17200
|
+
})
|
|
17201
|
+
]
|
|
17202
|
+
},
|
|
17203
|
+
time
|
|
17204
|
+
)) })
|
|
17205
|
+
] })
|
|
17206
|
+
]
|
|
17109
17207
|
}
|
|
17110
17208
|
);
|
|
17111
17209
|
}
|
|
17210
|
+
var SHORT_DATE;
|
|
17112
17211
|
var init_CalendarGrid = __esm({
|
|
17113
17212
|
"components/molecules/CalendarGrid.tsx"() {
|
|
17114
17213
|
"use client";
|
|
17115
17214
|
init_cn();
|
|
17116
17215
|
init_Box();
|
|
17216
|
+
init_Button();
|
|
17117
17217
|
init_Stack();
|
|
17118
17218
|
init_Typography();
|
|
17119
17219
|
init_Badge();
|
|
@@ -17121,6 +17221,7 @@ var init_CalendarGrid = __esm({
|
|
|
17121
17221
|
init_TimeSlotCell();
|
|
17122
17222
|
init_useEventBus();
|
|
17123
17223
|
init_useSwipeGesture();
|
|
17224
|
+
SHORT_DATE = { month: "short", day: "numeric" };
|
|
17124
17225
|
CalendarGrid.displayName = "CalendarGrid";
|
|
17125
17226
|
}
|
|
17126
17227
|
});
|
|
@@ -20282,9 +20383,9 @@ var init_Tabs = __esm({
|
|
|
20282
20383
|
className
|
|
20283
20384
|
}) => {
|
|
20284
20385
|
const rawItems = items ?? tabs ?? [];
|
|
20285
|
-
const safeItems = rawItems.map((
|
|
20286
|
-
...
|
|
20287
|
-
id:
|
|
20386
|
+
const safeItems = rawItems.map(({ id, value, ...rest }) => ({
|
|
20387
|
+
...rest,
|
|
20388
|
+
id: id || value || ""
|
|
20288
20389
|
}));
|
|
20289
20390
|
const eventBus = useEventBus();
|
|
20290
20391
|
const { t } = useTranslate();
|
|
@@ -20353,7 +20454,12 @@ var init_Tabs = __esm({
|
|
|
20353
20454
|
role: "tablist",
|
|
20354
20455
|
className: cn(
|
|
20355
20456
|
"flex",
|
|
20356
|
-
|
|
20457
|
+
// Horizontal tab strip becomes a horizontally-scrollable lane
|
|
20458
|
+
// below its container width — phones with many tabs scroll
|
|
20459
|
+
// instead of clipping. `snap-x` snaps to each tab; the
|
|
20460
|
+
// scrollbar is hidden for a cleaner affordance (the swipe
|
|
20461
|
+
// gesture is the discoverability cue).
|
|
20462
|
+
orientation === "horizontal" ? "flex-row border-b-[length:var(--border-width)] border-border overflow-x-auto snap-x snap-mandatory [&::-webkit-scrollbar]:hidden" : "flex-col border-r-[length:var(--border-width)] border-border",
|
|
20357
20463
|
variant === "pills" && "gap-1 p-1 bg-muted border-0 rounded-md",
|
|
20358
20464
|
variant === "underline" && orientation === "vertical" && "border-b-0"
|
|
20359
20465
|
),
|
|
@@ -20375,7 +20481,8 @@ var init_Tabs = __esm({
|
|
|
20375
20481
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
20376
20482
|
"data-active": isActive,
|
|
20377
20483
|
className: cn(
|
|
20378
|
-
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all",
|
|
20484
|
+
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all whitespace-nowrap",
|
|
20485
|
+
orientation === "horizontal" && "snap-start shrink-0",
|
|
20379
20486
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
20380
20487
|
isDisabled && "opacity-50 cursor-not-allowed",
|
|
20381
20488
|
variantClasses2[variant],
|
|
@@ -21140,7 +21247,7 @@ function CraftingRecipe({
|
|
|
21140
21247
|
className
|
|
21141
21248
|
}) {
|
|
21142
21249
|
const eventBus = useEventBus();
|
|
21143
|
-
const handleCraft =
|
|
21250
|
+
const handleCraft = React84.useCallback(() => {
|
|
21144
21251
|
onCraft?.();
|
|
21145
21252
|
if (craftEvent) {
|
|
21146
21253
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -21157,7 +21264,7 @@ function CraftingRecipe({
|
|
|
21157
21264
|
children: [
|
|
21158
21265
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
21159
21266
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
21160
|
-
return /* @__PURE__ */ jsxs(
|
|
21267
|
+
return /* @__PURE__ */ jsxs(React84.Fragment, { children: [
|
|
21161
21268
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
21162
21269
|
ItemSlot,
|
|
21163
21270
|
{
|
|
@@ -21220,8 +21327,8 @@ function DPad({
|
|
|
21220
21327
|
}) {
|
|
21221
21328
|
const eventBus = useEventBus();
|
|
21222
21329
|
const sizes = sizeMap15[size];
|
|
21223
|
-
const [activeDirections, setActiveDirections] =
|
|
21224
|
-
const handlePress =
|
|
21330
|
+
const [activeDirections, setActiveDirections] = React84.useState(/* @__PURE__ */ new Set());
|
|
21331
|
+
const handlePress = React84.useCallback(
|
|
21225
21332
|
(direction) => {
|
|
21226
21333
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
21227
21334
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -21229,7 +21336,7 @@ function DPad({
|
|
|
21229
21336
|
},
|
|
21230
21337
|
[directionEvent, eventBus, onDirection]
|
|
21231
21338
|
);
|
|
21232
|
-
const handleRelease =
|
|
21339
|
+
const handleRelease = React84.useCallback(
|
|
21233
21340
|
(direction) => {
|
|
21234
21341
|
setActiveDirections((prev) => {
|
|
21235
21342
|
const next = new Set(prev);
|
|
@@ -21770,14 +21877,14 @@ function useDataDnd(args) {
|
|
|
21770
21877
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
21771
21878
|
const enabled = isZone || Boolean(dndRoot);
|
|
21772
21879
|
const eventBus = useEventBus();
|
|
21773
|
-
const parentRoot =
|
|
21880
|
+
const parentRoot = React84__default.useContext(RootCtx);
|
|
21774
21881
|
const isRoot = enabled && parentRoot === null;
|
|
21775
|
-
const zoneId =
|
|
21882
|
+
const zoneId = React84__default.useId();
|
|
21776
21883
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
21777
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
21778
|
-
const optimisticOrdersRef =
|
|
21884
|
+
const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
|
|
21885
|
+
const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
|
|
21779
21886
|
optimisticOrdersRef.current = optimisticOrders;
|
|
21780
|
-
const clearOptimisticOrder =
|
|
21887
|
+
const clearOptimisticOrder = React84__default.useCallback((group) => {
|
|
21781
21888
|
setOptimisticOrders((prev) => {
|
|
21782
21889
|
if (!prev.has(group)) return prev;
|
|
21783
21890
|
const next = new Map(prev);
|
|
@@ -21802,7 +21909,7 @@ function useDataDnd(args) {
|
|
|
21802
21909
|
const raw = it[dndItemIdField];
|
|
21803
21910
|
return String(raw ?? `__idx_${idx}`);
|
|
21804
21911
|
}).join("|");
|
|
21805
|
-
const itemIds =
|
|
21912
|
+
const itemIds = React84__default.useMemo(
|
|
21806
21913
|
() => orderedItems.map((it, idx) => {
|
|
21807
21914
|
const raw = it[dndItemIdField];
|
|
21808
21915
|
return raw ?? `__idx_${idx}`;
|
|
@@ -21810,7 +21917,7 @@ function useDataDnd(args) {
|
|
|
21810
21917
|
[itemIdsSignature]
|
|
21811
21918
|
);
|
|
21812
21919
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
21813
|
-
|
|
21920
|
+
React84__default.useEffect(() => {
|
|
21814
21921
|
const root = isRoot ? null : parentRoot;
|
|
21815
21922
|
if (root) {
|
|
21816
21923
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -21818,20 +21925,20 @@ function useDataDnd(args) {
|
|
|
21818
21925
|
clearOptimisticOrder(ownGroup);
|
|
21819
21926
|
}
|
|
21820
21927
|
}, [itemsContentSig, ownGroup]);
|
|
21821
|
-
const zonesRef =
|
|
21822
|
-
const registerZone =
|
|
21928
|
+
const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
|
|
21929
|
+
const registerZone = React84__default.useCallback((zoneId2, meta2) => {
|
|
21823
21930
|
zonesRef.current.set(zoneId2, meta2);
|
|
21824
21931
|
}, []);
|
|
21825
|
-
const unregisterZone =
|
|
21932
|
+
const unregisterZone = React84__default.useCallback((zoneId2) => {
|
|
21826
21933
|
zonesRef.current.delete(zoneId2);
|
|
21827
21934
|
}, []);
|
|
21828
|
-
const [activeDrag, setActiveDrag] =
|
|
21829
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
21830
|
-
const meta =
|
|
21935
|
+
const [activeDrag, setActiveDrag] = React84__default.useState(null);
|
|
21936
|
+
const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
|
|
21937
|
+
const meta = React84__default.useMemo(
|
|
21831
21938
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
21832
21939
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
21833
21940
|
);
|
|
21834
|
-
|
|
21941
|
+
React84__default.useEffect(() => {
|
|
21835
21942
|
const target = isRoot ? null : parentRoot;
|
|
21836
21943
|
if (!target) {
|
|
21837
21944
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -21850,7 +21957,7 @@ function useDataDnd(args) {
|
|
|
21850
21957
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
21851
21958
|
const sensors = useAlmadarDndSensors(true);
|
|
21852
21959
|
const collisionDetection = almadarDndCollisionDetection;
|
|
21853
|
-
const findZoneByItem =
|
|
21960
|
+
const findZoneByItem = React84__default.useCallback(
|
|
21854
21961
|
(id) => {
|
|
21855
21962
|
for (const z of zonesRef.current.values()) {
|
|
21856
21963
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -21859,7 +21966,7 @@ function useDataDnd(args) {
|
|
|
21859
21966
|
},
|
|
21860
21967
|
[]
|
|
21861
21968
|
);
|
|
21862
|
-
|
|
21969
|
+
React84__default.useCallback(
|
|
21863
21970
|
(group) => {
|
|
21864
21971
|
for (const z of zonesRef.current.values()) {
|
|
21865
21972
|
if (z.group === group) return z;
|
|
@@ -21868,7 +21975,7 @@ function useDataDnd(args) {
|
|
|
21868
21975
|
},
|
|
21869
21976
|
[]
|
|
21870
21977
|
);
|
|
21871
|
-
const handleDragEnd =
|
|
21978
|
+
const handleDragEnd = React84__default.useCallback(
|
|
21872
21979
|
(event) => {
|
|
21873
21980
|
const { active, over } = event;
|
|
21874
21981
|
const activeIdStr = String(active.id);
|
|
@@ -21959,8 +22066,8 @@ function useDataDnd(args) {
|
|
|
21959
22066
|
},
|
|
21960
22067
|
[eventBus]
|
|
21961
22068
|
);
|
|
21962
|
-
const sortableData =
|
|
21963
|
-
const SortableItem =
|
|
22069
|
+
const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22070
|
+
const SortableItem = React84__default.useCallback(
|
|
21964
22071
|
({ id, children }) => {
|
|
21965
22072
|
const {
|
|
21966
22073
|
attributes,
|
|
@@ -22000,7 +22107,7 @@ function useDataDnd(args) {
|
|
|
22000
22107
|
id: droppableId,
|
|
22001
22108
|
data: sortableData
|
|
22002
22109
|
});
|
|
22003
|
-
const ctx =
|
|
22110
|
+
const ctx = React84__default.useContext(RootCtx);
|
|
22004
22111
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22005
22112
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22006
22113
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22015,7 +22122,7 @@ function useDataDnd(args) {
|
|
|
22015
22122
|
showForeignPlaceholder,
|
|
22016
22123
|
ctxAvailable: ctx != null
|
|
22017
22124
|
});
|
|
22018
|
-
|
|
22125
|
+
React84__default.useEffect(() => {
|
|
22019
22126
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22020
22127
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22021
22128
|
return /* @__PURE__ */ jsx(
|
|
@@ -22029,11 +22136,11 @@ function useDataDnd(args) {
|
|
|
22029
22136
|
}
|
|
22030
22137
|
);
|
|
22031
22138
|
};
|
|
22032
|
-
const rootContextValue =
|
|
22139
|
+
const rootContextValue = React84__default.useMemo(
|
|
22033
22140
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22034
22141
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22035
22142
|
);
|
|
22036
|
-
const handleDragStart =
|
|
22143
|
+
const handleDragStart = React84__default.useCallback((event) => {
|
|
22037
22144
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22038
22145
|
const rect = event.active.rect.current.initial;
|
|
22039
22146
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22052,7 +22159,7 @@ function useDataDnd(args) {
|
|
|
22052
22159
|
isRoot
|
|
22053
22160
|
});
|
|
22054
22161
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22055
|
-
const handleDragOver =
|
|
22162
|
+
const handleDragOver = React84__default.useCallback((event) => {
|
|
22056
22163
|
const { active, over } = event;
|
|
22057
22164
|
const overData = over?.data?.current;
|
|
22058
22165
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22122,7 +22229,7 @@ function useDataDnd(args) {
|
|
|
22122
22229
|
return next;
|
|
22123
22230
|
});
|
|
22124
22231
|
}, []);
|
|
22125
|
-
const handleDragCancel =
|
|
22232
|
+
const handleDragCancel = React84__default.useCallback((event) => {
|
|
22126
22233
|
setActiveDrag(null);
|
|
22127
22234
|
setOverZoneGroup(null);
|
|
22128
22235
|
dndLog.warn("dragCancel", {
|
|
@@ -22130,12 +22237,12 @@ function useDataDnd(args) {
|
|
|
22130
22237
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22131
22238
|
});
|
|
22132
22239
|
}, []);
|
|
22133
|
-
const handleDragEndWithCleanup =
|
|
22240
|
+
const handleDragEndWithCleanup = React84__default.useCallback((event) => {
|
|
22134
22241
|
handleDragEnd(event);
|
|
22135
22242
|
setActiveDrag(null);
|
|
22136
22243
|
setOverZoneGroup(null);
|
|
22137
22244
|
}, [handleDragEnd]);
|
|
22138
|
-
const wrapContainer =
|
|
22245
|
+
const wrapContainer = React84__default.useCallback(
|
|
22139
22246
|
(children) => {
|
|
22140
22247
|
if (!enabled) return children;
|
|
22141
22248
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22189,7 +22296,7 @@ var init_useDataDnd = __esm({
|
|
|
22189
22296
|
init_useAlmadarDndCollision();
|
|
22190
22297
|
init_Box();
|
|
22191
22298
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22192
|
-
RootCtx =
|
|
22299
|
+
RootCtx = React84__default.createContext(null);
|
|
22193
22300
|
}
|
|
22194
22301
|
});
|
|
22195
22302
|
function fieldLabel2(key) {
|
|
@@ -22678,7 +22785,7 @@ function DataList({
|
|
|
22678
22785
|
}) {
|
|
22679
22786
|
const eventBus = useEventBus();
|
|
22680
22787
|
const { t } = useTranslate();
|
|
22681
|
-
const [visibleCount, setVisibleCount] =
|
|
22788
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
|
|
22682
22789
|
const fieldDefs = fields ?? columns ?? [];
|
|
22683
22790
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
22684
22791
|
const dnd = useDataDnd({
|
|
@@ -22697,7 +22804,7 @@ function DataList({
|
|
|
22697
22804
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
22698
22805
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
22699
22806
|
const hasRenderProp = typeof children === "function";
|
|
22700
|
-
|
|
22807
|
+
React84__default.useEffect(() => {
|
|
22701
22808
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
22702
22809
|
const childrenTypeOf = typeof children;
|
|
22703
22810
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -22754,7 +22861,7 @@ function DataList({
|
|
|
22754
22861
|
const items2 = data.map((item) => item);
|
|
22755
22862
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
22756
22863
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
22757
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22864
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
22758
22865
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
22759
22866
|
group.items.map((itemData, index) => {
|
|
22760
22867
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22942,7 +23049,7 @@ function DataList({
|
|
|
22942
23049
|
className
|
|
22943
23050
|
),
|
|
22944
23051
|
children: [
|
|
22945
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23052
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
22946
23053
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22947
23054
|
group.items.map(
|
|
22948
23055
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24171,6 +24278,8 @@ var SidePanel;
|
|
|
24171
24278
|
var init_SidePanel = __esm({
|
|
24172
24279
|
"components/molecules/SidePanel.tsx"() {
|
|
24173
24280
|
"use client";
|
|
24281
|
+
init_Aside();
|
|
24282
|
+
init_Box();
|
|
24174
24283
|
init_Button();
|
|
24175
24284
|
init_Typography();
|
|
24176
24285
|
init_cn();
|
|
@@ -24180,7 +24289,7 @@ var init_SidePanel = __esm({
|
|
|
24180
24289
|
children,
|
|
24181
24290
|
isOpen,
|
|
24182
24291
|
onClose,
|
|
24183
|
-
width = "w-96",
|
|
24292
|
+
width = "w-full sm:w-96",
|
|
24184
24293
|
position = "right",
|
|
24185
24294
|
showOverlay = true,
|
|
24186
24295
|
className,
|
|
@@ -24194,14 +24303,14 @@ var init_SidePanel = __esm({
|
|
|
24194
24303
|
if (!isOpen) return null;
|
|
24195
24304
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24196
24305
|
showOverlay && /* @__PURE__ */ jsx(
|
|
24197
|
-
|
|
24306
|
+
Box,
|
|
24198
24307
|
{
|
|
24199
24308
|
className: "fixed inset-0 bg-white/80 backdrop-blur-sm z-40 lg:hidden",
|
|
24200
24309
|
onClick: handleClose
|
|
24201
24310
|
}
|
|
24202
24311
|
),
|
|
24203
24312
|
/* @__PURE__ */ jsxs(
|
|
24204
|
-
|
|
24313
|
+
Aside,
|
|
24205
24314
|
{
|
|
24206
24315
|
className: cn(
|
|
24207
24316
|
"fixed top-16 lg:top-0 bottom-0 z-[60]",
|
|
@@ -24215,7 +24324,7 @@ var init_SidePanel = __esm({
|
|
|
24215
24324
|
className
|
|
24216
24325
|
),
|
|
24217
24326
|
children: [
|
|
24218
|
-
/* @__PURE__ */ jsxs(
|
|
24327
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b-2 border-border sticky top-0 bg-card z-10", children: [
|
|
24219
24328
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: title }),
|
|
24220
24329
|
/* @__PURE__ */ jsx(
|
|
24221
24330
|
Button,
|
|
@@ -24225,11 +24334,11 @@ var init_SidePanel = __esm({
|
|
|
24225
24334
|
icon: X,
|
|
24226
24335
|
onClick: handleClose,
|
|
24227
24336
|
"aria-label": "Close panel",
|
|
24228
|
-
children: /* @__PURE__ */ jsx("span",
|
|
24337
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", className: "sr-only", children: "Close" })
|
|
24229
24338
|
}
|
|
24230
24339
|
)
|
|
24231
24340
|
] }),
|
|
24232
|
-
/* @__PURE__ */ jsx(
|
|
24341
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 flex-1 overflow-y-auto", children })
|
|
24233
24342
|
]
|
|
24234
24343
|
}
|
|
24235
24344
|
)
|
|
@@ -24280,7 +24389,7 @@ var init_WizardProgress = __esm({
|
|
|
24280
24389
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
24281
24390
|
const isActive = index === currentStep;
|
|
24282
24391
|
const isCompleted = index < currentStep;
|
|
24283
|
-
return /* @__PURE__ */ jsxs(
|
|
24392
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
24284
24393
|
/* @__PURE__ */ jsx(
|
|
24285
24394
|
"button",
|
|
24286
24395
|
{
|
|
@@ -24405,7 +24514,9 @@ var init_WizardNavigation = __esm({
|
|
|
24405
24514
|
{
|
|
24406
24515
|
border: true,
|
|
24407
24516
|
className: cn(
|
|
24408
|
-
|
|
24517
|
+
// `flex-wrap gap-2` lets the Back / Step / Next trio reflow on
|
|
24518
|
+
// narrow viewports rather than crushing the step counter.
|
|
24519
|
+
"border-t-2 border-x-0 border-b-0 border-border flex flex-wrap gap-2 justify-between items-center",
|
|
24409
24520
|
compact ? "px-4 py-2" : "px-6 py-4",
|
|
24410
24521
|
className
|
|
24411
24522
|
),
|
|
@@ -25336,7 +25447,7 @@ function InventoryGrid({
|
|
|
25336
25447
|
const eventBus = useEventBus();
|
|
25337
25448
|
const slotCount = totalSlots ?? items.length;
|
|
25338
25449
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
25339
|
-
const handleSelect =
|
|
25450
|
+
const handleSelect = React84.useCallback(
|
|
25340
25451
|
(id) => {
|
|
25341
25452
|
onSelect?.(id);
|
|
25342
25453
|
if (selectEvent) {
|
|
@@ -25549,15 +25660,15 @@ function GameCanvas2D({
|
|
|
25549
25660
|
fps = 60,
|
|
25550
25661
|
className
|
|
25551
25662
|
}) {
|
|
25552
|
-
const canvasRef =
|
|
25553
|
-
const rafRef =
|
|
25554
|
-
const frameRef =
|
|
25555
|
-
const lastTimeRef =
|
|
25556
|
-
const onDrawRef =
|
|
25663
|
+
const canvasRef = React84.useRef(null);
|
|
25664
|
+
const rafRef = React84.useRef(0);
|
|
25665
|
+
const frameRef = React84.useRef(0);
|
|
25666
|
+
const lastTimeRef = React84.useRef(0);
|
|
25667
|
+
const onDrawRef = React84.useRef(onDraw);
|
|
25557
25668
|
onDrawRef.current = onDraw;
|
|
25558
|
-
const onTickRef =
|
|
25669
|
+
const onTickRef = React84.useRef(onTick);
|
|
25559
25670
|
onTickRef.current = onTick;
|
|
25560
|
-
|
|
25671
|
+
React84.useEffect(() => {
|
|
25561
25672
|
const canvas = canvasRef.current;
|
|
25562
25673
|
if (!canvas) return;
|
|
25563
25674
|
const ctx = canvas.getContext("2d");
|
|
@@ -25846,7 +25957,7 @@ function TurnPanel({
|
|
|
25846
25957
|
className
|
|
25847
25958
|
}) {
|
|
25848
25959
|
const eventBus = useEventBus();
|
|
25849
|
-
const handleAction =
|
|
25960
|
+
const handleAction = React84.useCallback(
|
|
25850
25961
|
(event) => {
|
|
25851
25962
|
if (event) {
|
|
25852
25963
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -25992,7 +26103,7 @@ function UnitCommandBar({
|
|
|
25992
26103
|
className
|
|
25993
26104
|
}) {
|
|
25994
26105
|
const eventBus = useEventBus();
|
|
25995
|
-
const handleCommand =
|
|
26106
|
+
const handleCommand = React84.useCallback(
|
|
25996
26107
|
(event) => {
|
|
25997
26108
|
if (event) {
|
|
25998
26109
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -26477,7 +26588,7 @@ function GameMenu({
|
|
|
26477
26588
|
} catch {
|
|
26478
26589
|
}
|
|
26479
26590
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26480
|
-
const handleOptionClick =
|
|
26591
|
+
const handleOptionClick = React84.useCallback(
|
|
26481
26592
|
(option) => {
|
|
26482
26593
|
if (option.event && eventBus) {
|
|
26483
26594
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -26591,7 +26702,7 @@ function GameOverScreen({
|
|
|
26591
26702
|
} catch {
|
|
26592
26703
|
}
|
|
26593
26704
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
26594
|
-
const handleActionClick =
|
|
26705
|
+
const handleActionClick = React84.useCallback(
|
|
26595
26706
|
(action) => {
|
|
26596
26707
|
if (action.event && eventBus) {
|
|
26597
26708
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -29250,7 +29361,7 @@ var init_StepFlow = __esm({
|
|
|
29250
29361
|
className
|
|
29251
29362
|
}) => {
|
|
29252
29363
|
if (orientation === "vertical") {
|
|
29253
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29364
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29254
29365
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29255
29366
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29256
29367
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29261,7 +29372,7 @@ var init_StepFlow = __esm({
|
|
|
29261
29372
|
] })
|
|
29262
29373
|
] }) }, index)) });
|
|
29263
29374
|
}
|
|
29264
|
-
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(
|
|
29375
|
+
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(React84__default.Fragment, { children: [
|
|
29265
29376
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29266
29377
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29267
29378
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -29329,9 +29440,9 @@ var init_SplitSection = __esm({
|
|
|
29329
29440
|
className
|
|
29330
29441
|
),
|
|
29331
29442
|
padding: "lg",
|
|
29332
|
-
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col
|
|
29333
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
29334
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0
|
|
29443
|
+
children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col md:flex-row gap-8 md:gap-12 lg:gap-16 items-center", isImageLeft && "md:flex-row-reverse"), children: [
|
|
29444
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:min-w-[45%]", children: textContent }),
|
|
29445
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 md:max-w-[50%]", children: mediaContent })
|
|
29335
29446
|
] })
|
|
29336
29447
|
}
|
|
29337
29448
|
);
|
|
@@ -30143,7 +30254,7 @@ var init_LikertScale = __esm({
|
|
|
30143
30254
|
md: "text-base",
|
|
30144
30255
|
lg: "text-lg"
|
|
30145
30256
|
};
|
|
30146
|
-
LikertScale =
|
|
30257
|
+
LikertScale = React84__default.forwardRef(
|
|
30147
30258
|
({
|
|
30148
30259
|
question,
|
|
30149
30260
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30155,7 +30266,7 @@ var init_LikertScale = __esm({
|
|
|
30155
30266
|
variant = "radios",
|
|
30156
30267
|
className
|
|
30157
30268
|
}, ref) => {
|
|
30158
|
-
const groupId =
|
|
30269
|
+
const groupId = React84__default.useId();
|
|
30159
30270
|
const eventBus = useEventBus();
|
|
30160
30271
|
const handleSelect = useCallback(
|
|
30161
30272
|
(next) => {
|
|
@@ -32159,7 +32270,7 @@ var init_VersionDiff = __esm({
|
|
|
32159
32270
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
32160
32271
|
/* @__PURE__ */ jsx(Icon, { icon: GitCommit, size: "sm", className: "text-muted-foreground" }),
|
|
32161
32272
|
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "Compare" }),
|
|
32162
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32273
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32163
32274
|
Select,
|
|
32164
32275
|
{
|
|
32165
32276
|
options,
|
|
@@ -32169,7 +32280,7 @@ var init_VersionDiff = __esm({
|
|
|
32169
32280
|
}
|
|
32170
32281
|
) }),
|
|
32171
32282
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
32172
|
-
/* @__PURE__ */ jsx(Box, { className: "min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32283
|
+
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
32173
32284
|
Select,
|
|
32174
32285
|
{
|
|
32175
32286
|
options,
|
|
@@ -32234,8 +32345,8 @@ var init_VersionDiff = __esm({
|
|
|
32234
32345
|
]
|
|
32235
32346
|
}
|
|
32236
32347
|
),
|
|
32237
|
-
/* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-2", children: [
|
|
32238
|
-
/* @__PURE__ */ jsx(Box, { className: "border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
|
|
32348
|
+
/* @__PURE__ */ jsx(Box, { className: "overflow-auto bg-muted/20", style: { maxHeight: 600 }, children: activeView === "side-by-side" ? /* @__PURE__ */ jsxs(Box, { className: "grid grid-cols-1 md:grid-cols-2", children: [
|
|
32349
|
+
/* @__PURE__ */ jsx(Box, { className: "border-b md:border-b-0 md:border-r border-border", children: /* @__PURE__ */ jsx(VStack, { gap: "none", className: "font-mono text-xs", children: beforeLines.map((line, idx) => {
|
|
32239
32350
|
const isRemoved = line.type === "removed";
|
|
32240
32351
|
return /* @__PURE__ */ jsxs(
|
|
32241
32352
|
HStack,
|
|
@@ -32381,7 +32492,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32381
32492
|
"aria-label": "Breadcrumb",
|
|
32382
32493
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32383
32494
|
const isLast = idx === items.length - 1;
|
|
32384
|
-
return /* @__PURE__ */ jsxs(
|
|
32495
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
32385
32496
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32386
32497
|
Icon,
|
|
32387
32498
|
{
|
|
@@ -33271,7 +33382,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33271
33382
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33272
33383
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33273
33384
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
33274
|
-
return /* @__PURE__ */ jsxs(
|
|
33385
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
33275
33386
|
/* @__PURE__ */ jsx(
|
|
33276
33387
|
AvlState,
|
|
33277
33388
|
{
|
|
@@ -34648,7 +34759,7 @@ var init_DocumentViewer = __esm({
|
|
|
34648
34759
|
}
|
|
34649
34760
|
});
|
|
34650
34761
|
function extractTitle(children) {
|
|
34651
|
-
if (!
|
|
34762
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
34652
34763
|
const props = children.props;
|
|
34653
34764
|
if (typeof props.title === "string") {
|
|
34654
34765
|
return props.title;
|
|
@@ -34703,7 +34814,7 @@ function LinearView({
|
|
|
34703
34814
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
34704
34815
|
const isDone = i < currentIdx;
|
|
34705
34816
|
const isCurrent = i === currentIdx;
|
|
34706
|
-
return /* @__PURE__ */ jsxs(
|
|
34817
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
34707
34818
|
i > 0 && /* @__PURE__ */ jsx(
|
|
34708
34819
|
Typography,
|
|
34709
34820
|
{
|
|
@@ -35604,12 +35715,12 @@ var init_Form = __esm({
|
|
|
35604
35715
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
35605
35716
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
35606
35717
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
35607
|
-
const normalizedInitialData =
|
|
35718
|
+
const normalizedInitialData = React84__default.useMemo(() => {
|
|
35608
35719
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
35609
35720
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
35610
35721
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
35611
35722
|
}, [entity, initialData]);
|
|
35612
|
-
const entityDerivedFields =
|
|
35723
|
+
const entityDerivedFields = React84__default.useMemo(() => {
|
|
35613
35724
|
if (fields && fields.length > 0) return void 0;
|
|
35614
35725
|
if (!resolvedEntity) return void 0;
|
|
35615
35726
|
return resolvedEntity.fields.map(
|
|
@@ -35628,16 +35739,16 @@ var init_Form = __esm({
|
|
|
35628
35739
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
35629
35740
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
35630
35741
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
35631
|
-
const [formData, setFormData] =
|
|
35742
|
+
const [formData, setFormData] = React84__default.useState(
|
|
35632
35743
|
normalizedInitialData
|
|
35633
35744
|
);
|
|
35634
|
-
const [collapsedSections, setCollapsedSections] =
|
|
35745
|
+
const [collapsedSections, setCollapsedSections] = React84__default.useState(
|
|
35635
35746
|
/* @__PURE__ */ new Set()
|
|
35636
35747
|
);
|
|
35637
|
-
const [submitError, setSubmitError] =
|
|
35638
|
-
const formRef =
|
|
35748
|
+
const [submitError, setSubmitError] = React84__default.useState(null);
|
|
35749
|
+
const formRef = React84__default.useRef(null);
|
|
35639
35750
|
const formMode = props.mode;
|
|
35640
|
-
const mountedRef =
|
|
35751
|
+
const mountedRef = React84__default.useRef(false);
|
|
35641
35752
|
if (!mountedRef.current) {
|
|
35642
35753
|
mountedRef.current = true;
|
|
35643
35754
|
debug("forms", "mount", {
|
|
@@ -35650,7 +35761,7 @@ var init_Form = __esm({
|
|
|
35650
35761
|
});
|
|
35651
35762
|
}
|
|
35652
35763
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
35653
|
-
const evalContext =
|
|
35764
|
+
const evalContext = React84__default.useMemo(
|
|
35654
35765
|
() => ({
|
|
35655
35766
|
formValues: formData,
|
|
35656
35767
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -35659,7 +35770,7 @@ var init_Form = __esm({
|
|
|
35659
35770
|
}),
|
|
35660
35771
|
[formData, externalContext]
|
|
35661
35772
|
);
|
|
35662
|
-
|
|
35773
|
+
React84__default.useEffect(() => {
|
|
35663
35774
|
debug("forms", "initialData-sync", {
|
|
35664
35775
|
mode: formMode,
|
|
35665
35776
|
normalizedInitialData,
|
|
@@ -35670,7 +35781,7 @@ var init_Form = __esm({
|
|
|
35670
35781
|
setFormData(normalizedInitialData);
|
|
35671
35782
|
}
|
|
35672
35783
|
}, [normalizedInitialData]);
|
|
35673
|
-
const processCalculations =
|
|
35784
|
+
const processCalculations = React84__default.useCallback(
|
|
35674
35785
|
(changedFieldId, newFormData) => {
|
|
35675
35786
|
if (!hiddenCalculations.length) return;
|
|
35676
35787
|
const context = {
|
|
@@ -35695,7 +35806,7 @@ var init_Form = __esm({
|
|
|
35695
35806
|
},
|
|
35696
35807
|
[hiddenCalculations, externalContext, eventBus]
|
|
35697
35808
|
);
|
|
35698
|
-
const checkViolations =
|
|
35809
|
+
const checkViolations = React84__default.useCallback(
|
|
35699
35810
|
(changedFieldId, newFormData) => {
|
|
35700
35811
|
if (!violationTriggers.length) return;
|
|
35701
35812
|
const context = {
|
|
@@ -35733,7 +35844,7 @@ var init_Form = __esm({
|
|
|
35733
35844
|
processCalculations(name, newFormData);
|
|
35734
35845
|
checkViolations(name, newFormData);
|
|
35735
35846
|
};
|
|
35736
|
-
const isFieldVisible =
|
|
35847
|
+
const isFieldVisible = React84__default.useCallback(
|
|
35737
35848
|
(fieldName) => {
|
|
35738
35849
|
const condition = conditionalFields[fieldName];
|
|
35739
35850
|
if (!condition) return true;
|
|
@@ -35741,7 +35852,7 @@ var init_Form = __esm({
|
|
|
35741
35852
|
},
|
|
35742
35853
|
[conditionalFields, evalContext]
|
|
35743
35854
|
);
|
|
35744
|
-
const isSectionVisible =
|
|
35855
|
+
const isSectionVisible = React84__default.useCallback(
|
|
35745
35856
|
(section) => {
|
|
35746
35857
|
if (!section.condition) return true;
|
|
35747
35858
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -35817,7 +35928,7 @@ var init_Form = __esm({
|
|
|
35817
35928
|
eventBus.emit(`UI:${onCancel}`);
|
|
35818
35929
|
}
|
|
35819
35930
|
};
|
|
35820
|
-
const renderField =
|
|
35931
|
+
const renderField = React84__default.useCallback(
|
|
35821
35932
|
(field) => {
|
|
35822
35933
|
const fieldName = field.name || field.field;
|
|
35823
35934
|
if (!fieldName) return null;
|
|
@@ -35838,7 +35949,7 @@ var init_Form = __esm({
|
|
|
35838
35949
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
35839
35950
|
);
|
|
35840
35951
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
35841
|
-
const normalizedFields =
|
|
35952
|
+
const normalizedFields = React84__default.useMemo(() => {
|
|
35842
35953
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
35843
35954
|
return effectiveFields.map((field) => {
|
|
35844
35955
|
if (typeof field === "string") {
|
|
@@ -35860,7 +35971,7 @@ var init_Form = __esm({
|
|
|
35860
35971
|
return field;
|
|
35861
35972
|
});
|
|
35862
35973
|
}, [effectiveFields, resolvedEntity]);
|
|
35863
|
-
const schemaFields =
|
|
35974
|
+
const schemaFields = React84__default.useMemo(() => {
|
|
35864
35975
|
if (normalizedFields.length === 0) return null;
|
|
35865
35976
|
if (isDebugEnabled()) {
|
|
35866
35977
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -35870,7 +35981,7 @@ var init_Form = __esm({
|
|
|
35870
35981
|
}
|
|
35871
35982
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
35872
35983
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
35873
|
-
const sectionElements =
|
|
35984
|
+
const sectionElements = React84__default.useMemo(() => {
|
|
35874
35985
|
if (!sections || sections.length === 0) return null;
|
|
35875
35986
|
return sections.map((section) => {
|
|
35876
35987
|
if (!isSectionVisible(section)) {
|
|
@@ -37596,7 +37707,7 @@ var init_List = __esm({
|
|
|
37596
37707
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
37597
37708
|
return [];
|
|
37598
37709
|
}, [entity]);
|
|
37599
|
-
const getItemActions =
|
|
37710
|
+
const getItemActions = React84__default.useCallback(
|
|
37600
37711
|
(item) => {
|
|
37601
37712
|
if (!itemActions) return [];
|
|
37602
37713
|
if (typeof itemActions === "function") {
|
|
@@ -38069,7 +38180,7 @@ var init_MediaGallery = __esm({
|
|
|
38069
38180
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
38070
38181
|
);
|
|
38071
38182
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
38072
|
-
const items =
|
|
38183
|
+
const items = React84__default.useMemo(() => {
|
|
38073
38184
|
if (propItems) return propItems;
|
|
38074
38185
|
if (entityData.length === 0) return [];
|
|
38075
38186
|
return entityData.map((record, idx) => ({
|
|
@@ -38233,7 +38344,7 @@ var init_MediaGallery = __esm({
|
|
|
38233
38344
|
}
|
|
38234
38345
|
});
|
|
38235
38346
|
function extractTitle2(children) {
|
|
38236
|
-
if (!
|
|
38347
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
38237
38348
|
const props = children.props;
|
|
38238
38349
|
if (typeof props.title === "string") {
|
|
38239
38350
|
return props.title;
|
|
@@ -38946,7 +39057,7 @@ var init_PageHeader = __esm({
|
|
|
38946
39057
|
info: "bg-info/10 text-info"
|
|
38947
39058
|
};
|
|
38948
39059
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
38949
|
-
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(
|
|
39060
|
+
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(React84__default.Fragment, { children: [
|
|
38950
39061
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
38951
39062
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
38952
39063
|
"a",
|
|
@@ -39242,7 +39353,7 @@ var init_debugRegistry = __esm({
|
|
|
39242
39353
|
}
|
|
39243
39354
|
});
|
|
39244
39355
|
function useDebugData() {
|
|
39245
|
-
const [data, setData] =
|
|
39356
|
+
const [data, setData] = React84.useState(() => ({
|
|
39246
39357
|
traits: [],
|
|
39247
39358
|
ticks: [],
|
|
39248
39359
|
guards: [],
|
|
@@ -39256,7 +39367,7 @@ function useDebugData() {
|
|
|
39256
39367
|
},
|
|
39257
39368
|
lastUpdate: Date.now()
|
|
39258
39369
|
}));
|
|
39259
|
-
|
|
39370
|
+
React84.useEffect(() => {
|
|
39260
39371
|
const updateData = () => {
|
|
39261
39372
|
setData({
|
|
39262
39373
|
traits: getAllTraits(),
|
|
@@ -39365,12 +39476,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
39365
39476
|
return positions;
|
|
39366
39477
|
}
|
|
39367
39478
|
function WalkMinimap() {
|
|
39368
|
-
const [walkStep, setWalkStep] =
|
|
39369
|
-
const [traits2, setTraits] =
|
|
39370
|
-
const [coveredEdges, setCoveredEdges] =
|
|
39371
|
-
const [completedTraits, setCompletedTraits] =
|
|
39372
|
-
const prevTraitRef =
|
|
39373
|
-
|
|
39479
|
+
const [walkStep, setWalkStep] = React84.useState(null);
|
|
39480
|
+
const [traits2, setTraits] = React84.useState([]);
|
|
39481
|
+
const [coveredEdges, setCoveredEdges] = React84.useState([]);
|
|
39482
|
+
const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
|
|
39483
|
+
const prevTraitRef = React84.useRef(null);
|
|
39484
|
+
React84.useEffect(() => {
|
|
39374
39485
|
const interval = setInterval(() => {
|
|
39375
39486
|
const w = window;
|
|
39376
39487
|
const step = w.__orbitalWalkStep;
|
|
@@ -39817,15 +39928,15 @@ var init_EntitiesTab = __esm({
|
|
|
39817
39928
|
}
|
|
39818
39929
|
});
|
|
39819
39930
|
function EventFlowTab({ events: events2 }) {
|
|
39820
|
-
const [filter, setFilter] =
|
|
39821
|
-
const containerRef =
|
|
39822
|
-
const [autoScroll, setAutoScroll] =
|
|
39823
|
-
|
|
39931
|
+
const [filter, setFilter] = React84.useState("all");
|
|
39932
|
+
const containerRef = React84.useRef(null);
|
|
39933
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
39934
|
+
React84.useEffect(() => {
|
|
39824
39935
|
if (autoScroll && containerRef.current) {
|
|
39825
39936
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
39826
39937
|
}
|
|
39827
39938
|
}, [events2.length, autoScroll]);
|
|
39828
|
-
const filteredEvents =
|
|
39939
|
+
const filteredEvents = React84.useMemo(() => {
|
|
39829
39940
|
if (filter === "all") return events2;
|
|
39830
39941
|
return events2.filter((e) => e.type === filter);
|
|
39831
39942
|
}, [events2, filter]);
|
|
@@ -39944,7 +40055,7 @@ var init_EventFlowTab = __esm({
|
|
|
39944
40055
|
}
|
|
39945
40056
|
});
|
|
39946
40057
|
function GuardsPanel({ guards }) {
|
|
39947
|
-
const [filter, setFilter] =
|
|
40058
|
+
const [filter, setFilter] = React84.useState("all");
|
|
39948
40059
|
if (guards.length === 0) {
|
|
39949
40060
|
return /* @__PURE__ */ jsx(
|
|
39950
40061
|
EmptyState,
|
|
@@ -39957,7 +40068,7 @@ function GuardsPanel({ guards }) {
|
|
|
39957
40068
|
}
|
|
39958
40069
|
const passedCount = guards.filter((g) => g.result).length;
|
|
39959
40070
|
const failedCount = guards.length - passedCount;
|
|
39960
|
-
const filteredGuards =
|
|
40071
|
+
const filteredGuards = React84.useMemo(() => {
|
|
39961
40072
|
if (filter === "all") return guards;
|
|
39962
40073
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
39963
40074
|
return guards.filter((g) => !g.result);
|
|
@@ -40118,10 +40229,10 @@ function EffectBadge({ effect }) {
|
|
|
40118
40229
|
] });
|
|
40119
40230
|
}
|
|
40120
40231
|
function TransitionTimeline({ transitions }) {
|
|
40121
|
-
const containerRef =
|
|
40122
|
-
const [autoScroll, setAutoScroll] =
|
|
40123
|
-
const [expandedId, setExpandedId] =
|
|
40124
|
-
|
|
40232
|
+
const containerRef = React84.useRef(null);
|
|
40233
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
40234
|
+
const [expandedId, setExpandedId] = React84.useState(null);
|
|
40235
|
+
React84.useEffect(() => {
|
|
40125
40236
|
if (autoScroll && containerRef.current) {
|
|
40126
40237
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40127
40238
|
}
|
|
@@ -40407,9 +40518,9 @@ function getAllEvents(traits2) {
|
|
|
40407
40518
|
}
|
|
40408
40519
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
40409
40520
|
const eventBus = useEventBus();
|
|
40410
|
-
const [log12, setLog] =
|
|
40411
|
-
const prevStatesRef =
|
|
40412
|
-
|
|
40521
|
+
const [log12, setLog] = React84.useState([]);
|
|
40522
|
+
const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
40523
|
+
React84.useEffect(() => {
|
|
40413
40524
|
for (const trait of traits2) {
|
|
40414
40525
|
const prev = prevStatesRef.current.get(trait.id);
|
|
40415
40526
|
if (prev && prev !== trait.currentState) {
|
|
@@ -40579,10 +40690,10 @@ function VerifyModePanel({
|
|
|
40579
40690
|
serverCount,
|
|
40580
40691
|
localCount
|
|
40581
40692
|
}) {
|
|
40582
|
-
const [expanded, setExpanded] =
|
|
40583
|
-
const scrollRef =
|
|
40584
|
-
const prevCountRef =
|
|
40585
|
-
|
|
40693
|
+
const [expanded, setExpanded] = React84.useState(true);
|
|
40694
|
+
const scrollRef = React84.useRef(null);
|
|
40695
|
+
const prevCountRef = React84.useRef(0);
|
|
40696
|
+
React84.useEffect(() => {
|
|
40586
40697
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
40587
40698
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
40588
40699
|
}
|
|
@@ -40648,10 +40759,10 @@ function RuntimeDebugger({
|
|
|
40648
40759
|
defaultTab,
|
|
40649
40760
|
schema
|
|
40650
40761
|
}) {
|
|
40651
|
-
const [isCollapsed, setIsCollapsed] =
|
|
40652
|
-
const [isVisible, setIsVisible] =
|
|
40762
|
+
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
40763
|
+
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
40653
40764
|
const debugData = useDebugData();
|
|
40654
|
-
|
|
40765
|
+
React84.useEffect(() => {
|
|
40655
40766
|
if (mode === "inline") return;
|
|
40656
40767
|
return onDebugToggle((enabled) => {
|
|
40657
40768
|
setIsVisible(enabled);
|
|
@@ -40660,7 +40771,7 @@ function RuntimeDebugger({
|
|
|
40660
40771
|
}
|
|
40661
40772
|
});
|
|
40662
40773
|
}, [mode]);
|
|
40663
|
-
|
|
40774
|
+
React84.useEffect(() => {
|
|
40664
40775
|
if (mode === "inline") return;
|
|
40665
40776
|
const handleKeyDown = (e) => {
|
|
40666
40777
|
if (e.key === "`" && isVisible) {
|
|
@@ -41209,7 +41320,7 @@ function SequenceBar({
|
|
|
41209
41320
|
onSlotRemove(index);
|
|
41210
41321
|
}, [onSlotRemove, playing]);
|
|
41211
41322
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41212
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
41323
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
41213
41324
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41214
41325
|
Typography,
|
|
41215
41326
|
{
|
|
@@ -42611,7 +42722,7 @@ var init_StatCard = __esm({
|
|
|
42611
42722
|
const labelToUse = propLabel ?? propTitle;
|
|
42612
42723
|
const eventBus = useEventBus();
|
|
42613
42724
|
const { t } = useTranslate();
|
|
42614
|
-
const handleActionClick =
|
|
42725
|
+
const handleActionClick = React84__default.useCallback(() => {
|
|
42615
42726
|
if (action?.event) {
|
|
42616
42727
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42617
42728
|
}
|
|
@@ -42622,7 +42733,7 @@ var init_StatCard = __esm({
|
|
|
42622
42733
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42623
42734
|
const isLoading = externalLoading ?? false;
|
|
42624
42735
|
const error = externalError;
|
|
42625
|
-
const computeMetricValue =
|
|
42736
|
+
const computeMetricValue = React84__default.useCallback(
|
|
42626
42737
|
(metric, items) => {
|
|
42627
42738
|
if (metric.value !== void 0) {
|
|
42628
42739
|
return metric.value;
|
|
@@ -42661,7 +42772,7 @@ var init_StatCard = __esm({
|
|
|
42661
42772
|
},
|
|
42662
42773
|
[]
|
|
42663
42774
|
);
|
|
42664
|
-
const schemaStats =
|
|
42775
|
+
const schemaStats = React84__default.useMemo(() => {
|
|
42665
42776
|
if (!metrics || metrics.length === 0) return null;
|
|
42666
42777
|
return metrics.map((metric) => ({
|
|
42667
42778
|
label: metric.label,
|
|
@@ -42669,7 +42780,7 @@ var init_StatCard = __esm({
|
|
|
42669
42780
|
format: metric.format
|
|
42670
42781
|
}));
|
|
42671
42782
|
}, [metrics, data, computeMetricValue]);
|
|
42672
|
-
const calculatedTrend =
|
|
42783
|
+
const calculatedTrend = React84__default.useMemo(() => {
|
|
42673
42784
|
if (manualTrend !== void 0) return manualTrend;
|
|
42674
42785
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42675
42786
|
return void 0;
|
|
@@ -43780,7 +43891,7 @@ var init_Timeline = __esm({
|
|
|
43780
43891
|
}) => {
|
|
43781
43892
|
const { t } = useTranslate();
|
|
43782
43893
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43783
|
-
const items =
|
|
43894
|
+
const items = React84__default.useMemo(() => {
|
|
43784
43895
|
if (propItems) return propItems;
|
|
43785
43896
|
if (entityData.length === 0) return [];
|
|
43786
43897
|
return entityData.map((record, idx) => {
|
|
@@ -43887,7 +43998,7 @@ var init_Timeline = __esm({
|
|
|
43887
43998
|
}
|
|
43888
43999
|
});
|
|
43889
44000
|
function extractToastProps(children) {
|
|
43890
|
-
if (!
|
|
44001
|
+
if (!React84__default.isValidElement(children)) {
|
|
43891
44002
|
if (typeof children === "string") {
|
|
43892
44003
|
return { message: children };
|
|
43893
44004
|
}
|
|
@@ -43925,7 +44036,7 @@ var init_ToastSlot = __esm({
|
|
|
43925
44036
|
eventBus.emit("UI:CLOSE");
|
|
43926
44037
|
};
|
|
43927
44038
|
if (!isVisible) return null;
|
|
43928
|
-
const isCustomContent =
|
|
44039
|
+
const isCustomContent = React84__default.isValidElement(children) && !message;
|
|
43929
44040
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43930
44041
|
Toast,
|
|
43931
44042
|
{
|
|
@@ -44194,7 +44305,7 @@ var init_WizardContainer = __esm({
|
|
|
44194
44305
|
const isCompleted = index < currentStep;
|
|
44195
44306
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44196
44307
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44197
|
-
return /* @__PURE__ */ jsxs(
|
|
44308
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
44198
44309
|
/* @__PURE__ */ jsx(
|
|
44199
44310
|
Button,
|
|
44200
44311
|
{
|
|
@@ -44576,12 +44687,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
44576
44687
|
}
|
|
44577
44688
|
});
|
|
44578
44689
|
function lazyThree(name, loader) {
|
|
44579
|
-
const Lazy =
|
|
44690
|
+
const Lazy = React84__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44580
44691
|
function ThreeWrapper(props) {
|
|
44581
|
-
return
|
|
44582
|
-
|
|
44692
|
+
return React84__default.createElement(
|
|
44693
|
+
React84__default.Suspense,
|
|
44583
44694
|
{ fallback: null },
|
|
44584
|
-
|
|
44695
|
+
React84__default.createElement(Lazy, props)
|
|
44585
44696
|
);
|
|
44586
44697
|
}
|
|
44587
44698
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -44600,6 +44711,7 @@ var init_component_registry_generated = __esm({
|
|
|
44600
44711
|
init_AnimatedGraphic();
|
|
44601
44712
|
init_AnimatedReveal();
|
|
44602
44713
|
init_ArticleSection();
|
|
44714
|
+
init_Aside();
|
|
44603
44715
|
init_AuthLayout();
|
|
44604
44716
|
init_BattleBoard();
|
|
44605
44717
|
init_BattleTemplate();
|
|
@@ -44654,6 +44766,7 @@ var init_component_registry_generated = __esm({
|
|
|
44654
44766
|
init_DayCell();
|
|
44655
44767
|
init_DebuggerBoard();
|
|
44656
44768
|
init_DetailPanel();
|
|
44769
|
+
init_Dialog();
|
|
44657
44770
|
init_DialogueBox();
|
|
44658
44771
|
init_DialogueBubble();
|
|
44659
44772
|
init_DocBreadcrumb();
|
|
@@ -44867,6 +44980,7 @@ var init_component_registry_generated = __esm({
|
|
|
44867
44980
|
"AnimatedGraphic": AnimatedGraphic,
|
|
44868
44981
|
"AnimatedReveal": AnimatedReveal,
|
|
44869
44982
|
"ArticleSection": ArticleSection,
|
|
44983
|
+
"Aside": Aside,
|
|
44870
44984
|
"AuthLayout": AuthLayout,
|
|
44871
44985
|
"Avatar": AvatarPattern,
|
|
44872
44986
|
"AvatarPattern": AvatarPattern,
|
|
@@ -44936,6 +45050,7 @@ var init_component_registry_generated = __esm({
|
|
|
44936
45050
|
"DayCell": DayCell,
|
|
44937
45051
|
"DebuggerBoard": DebuggerBoard,
|
|
44938
45052
|
"DetailPanel": DetailPanel,
|
|
45053
|
+
"Dialog": Dialog,
|
|
44939
45054
|
"DialogueBox": DialogueBox,
|
|
44940
45055
|
"DialogueBubble": DialogueBubble,
|
|
44941
45056
|
"Divider": DividerPattern,
|
|
@@ -45189,7 +45304,7 @@ function SuspenseConfigProvider({
|
|
|
45189
45304
|
config,
|
|
45190
45305
|
children
|
|
45191
45306
|
}) {
|
|
45192
|
-
return
|
|
45307
|
+
return React84__default.createElement(
|
|
45193
45308
|
SuspenseConfigContext.Provider,
|
|
45194
45309
|
{ value: config },
|
|
45195
45310
|
children
|
|
@@ -45672,7 +45787,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45672
45787
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45673
45788
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45674
45789
|
}
|
|
45675
|
-
return /* @__PURE__ */ jsx(
|
|
45790
|
+
return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45676
45791
|
}
|
|
45677
45792
|
if (!child || typeof child !== "object") return null;
|
|
45678
45793
|
const childId = `${parentId}-${index}`;
|
|
@@ -45709,14 +45824,14 @@ function isPatternConfig(value) {
|
|
|
45709
45824
|
if (value === null || value === void 0) return false;
|
|
45710
45825
|
if (typeof value !== "object") return false;
|
|
45711
45826
|
if (Array.isArray(value)) return false;
|
|
45712
|
-
if (
|
|
45827
|
+
if (React84__default.isValidElement(value)) return false;
|
|
45713
45828
|
if (value instanceof Date) return false;
|
|
45714
45829
|
if (typeof value === "function") return false;
|
|
45715
45830
|
const record = value;
|
|
45716
45831
|
return "type" in record && typeof record.type === "string";
|
|
45717
45832
|
}
|
|
45718
45833
|
function isPlainConfigObject(value) {
|
|
45719
|
-
if (
|
|
45834
|
+
if (React84__default.isValidElement(value)) return false;
|
|
45720
45835
|
if (value instanceof Date) return false;
|
|
45721
45836
|
const proto = Object.getPrototypeOf(value);
|
|
45722
45837
|
return proto === Object.prototype || proto === null;
|