@almadar/ui 4.31.0 → 4.33.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.
@@ -1,7 +1,7 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
- import * as React109 from 'react';
4
- import React109__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
3
+ import * as React110 from 'react';
4
+ import React110__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
5
5
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
6
6
  import * as LucideIcons from 'lucide-react';
7
7
  import { Loader2, X, AlertTriangle, Info, AlertCircle, CheckCircle, ChevronDown, List, Printer, ChevronRight, ChevronLeft, XCircle, Wrench, RotateCcw, Send, Code, FileText, WrapText, Check, Copy, Trash2, Menu as Menu$1, Search, Bell, LogOut, ChevronUp, MoreHorizontal, Bug, ZoomOut, ZoomIn, Download, Pause, Play, Package, Calendar, Pencil, Eye, Image as Image$1, Upload, ArrowRight, ArrowLeft, Eraser, SkipForward, TrendingUp, TrendingDown, Minus, ArrowUp, ArrowDown, MoreVertical, Circle, Clock, CheckCircle2, HelpCircle, FileQuestion, Inbox, Plus, User, Filter, Star, FileWarning, Tag, DollarSign, Sun, Moon, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
@@ -368,7 +368,7 @@ function resolveIconProp(value, sizeClass) {
368
368
  const IconComp = value;
369
369
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
370
370
  }
371
- if (React109__default.isValidElement(value)) {
371
+ if (React110__default.isValidElement(value)) {
372
372
  return value;
373
373
  }
374
374
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -444,7 +444,7 @@ var init_Button = __esm({
444
444
  md: "h-4 w-4",
445
445
  lg: "h-5 w-5"
446
446
  };
447
- Button = React109__default.forwardRef(
447
+ Button = React110__default.forwardRef(
448
448
  ({
449
449
  className,
450
450
  variant = "primary",
@@ -509,7 +509,7 @@ var Input;
509
509
  var init_Input = __esm({
510
510
  "components/atoms/Input.tsx"() {
511
511
  init_cn();
512
- Input = React109__default.forwardRef(
512
+ Input = React110__default.forwardRef(
513
513
  ({
514
514
  className,
515
515
  inputType,
@@ -627,7 +627,7 @@ var Label;
627
627
  var init_Label = __esm({
628
628
  "components/atoms/Label.tsx"() {
629
629
  init_cn();
630
- Label = React109__default.forwardRef(
630
+ Label = React110__default.forwardRef(
631
631
  ({ className, required, children, ...props }, ref) => {
632
632
  return /* @__PURE__ */ jsxs(
633
633
  "label",
@@ -653,7 +653,7 @@ var Textarea;
653
653
  var init_Textarea = __esm({
654
654
  "components/atoms/Textarea.tsx"() {
655
655
  init_cn();
656
- Textarea = React109__default.forwardRef(
656
+ Textarea = React110__default.forwardRef(
657
657
  ({ className, error, ...props }, ref) => {
658
658
  return /* @__PURE__ */ jsx(
659
659
  "textarea",
@@ -682,7 +682,7 @@ var Select;
682
682
  var init_Select = __esm({
683
683
  "components/atoms/Select.tsx"() {
684
684
  init_cn();
685
- Select = React109__default.forwardRef(
685
+ Select = React110__default.forwardRef(
686
686
  ({ className, options, placeholder, error, ...props }, ref) => {
687
687
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
688
688
  /* @__PURE__ */ jsxs(
@@ -724,7 +724,7 @@ var Checkbox;
724
724
  var init_Checkbox = __esm({
725
725
  "components/atoms/Checkbox.tsx"() {
726
726
  init_cn();
727
- Checkbox = React109__default.forwardRef(
727
+ Checkbox = React110__default.forwardRef(
728
728
  ({ className, label, id, ...props }, ref) => {
729
729
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
730
730
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -806,7 +806,7 @@ var init_Card = __esm({
806
806
  md: "shadow",
807
807
  lg: "shadow-lg"
808
808
  };
809
- Card = React109__default.forwardRef(
809
+ Card = React110__default.forwardRef(
810
810
  ({
811
811
  className,
812
812
  variant = "bordered",
@@ -842,9 +842,9 @@ var init_Card = __esm({
842
842
  }
843
843
  );
844
844
  Card.displayName = "Card";
845
- CardHeader = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
845
+ CardHeader = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
846
846
  CardHeader.displayName = "CardHeader";
847
- CardTitle = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
847
+ CardTitle = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
848
848
  "h3",
849
849
  {
850
850
  ref,
@@ -857,11 +857,11 @@ var init_Card = __esm({
857
857
  }
858
858
  ));
859
859
  CardTitle.displayName = "CardTitle";
860
- CardContent = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
860
+ CardContent = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
861
861
  CardContent.displayName = "CardContent";
862
862
  CardBody = CardContent;
863
863
  CardBody.displayName = "CardBody";
864
- CardFooter = React109__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
864
+ CardFooter = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
865
865
  "div",
866
866
  {
867
867
  ref,
@@ -914,7 +914,7 @@ var init_Badge = __esm({
914
914
  md: "px-2.5 py-1 text-sm",
915
915
  lg: "px-3 py-1.5 text-base"
916
916
  };
917
- Badge = React109__default.forwardRef(
917
+ Badge = React110__default.forwardRef(
918
918
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
919
919
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
920
920
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -953,7 +953,7 @@ var init_Spinner = __esm({
953
953
  md: "h-6 w-6",
954
954
  lg: "h-8 w-8"
955
955
  };
956
- Spinner = React109__default.forwardRef(
956
+ Spinner = React110__default.forwardRef(
957
957
  ({ className, size = "md", ...props }, ref) => {
958
958
  return /* @__PURE__ */ jsx(
959
959
  "div",
@@ -1234,7 +1234,7 @@ var init_Box = __esm({
1234
1234
  fixed: "fixed",
1235
1235
  sticky: "sticky"
1236
1236
  };
1237
- Box = React109__default.forwardRef(
1237
+ Box = React110__default.forwardRef(
1238
1238
  ({
1239
1239
  padding,
1240
1240
  paddingX,
@@ -1607,7 +1607,7 @@ var Radio;
1607
1607
  var init_Radio = __esm({
1608
1608
  "components/atoms/Radio.tsx"() {
1609
1609
  init_cn();
1610
- Radio = React109__default.forwardRef(
1610
+ Radio = React110__default.forwardRef(
1611
1611
  ({
1612
1612
  label,
1613
1613
  helperText,
@@ -1718,7 +1718,7 @@ var init_Switch = __esm({
1718
1718
  "components/atoms/Switch.tsx"() {
1719
1719
  "use client";
1720
1720
  init_cn();
1721
- Switch = React109.forwardRef(
1721
+ Switch = React110.forwardRef(
1722
1722
  ({
1723
1723
  checked,
1724
1724
  defaultChecked = false,
@@ -1729,10 +1729,10 @@ var init_Switch = __esm({
1729
1729
  name,
1730
1730
  className
1731
1731
  }, ref) => {
1732
- const [isChecked, setIsChecked] = React109.useState(
1732
+ const [isChecked, setIsChecked] = React110.useState(
1733
1733
  checked !== void 0 ? checked : defaultChecked
1734
1734
  );
1735
- React109.useEffect(() => {
1735
+ React110.useEffect(() => {
1736
1736
  if (checked !== void 0) {
1737
1737
  setIsChecked(checked);
1738
1738
  }
@@ -2617,8 +2617,8 @@ var init_LawReferenceTooltip = __esm({
2617
2617
  position = "top",
2618
2618
  className
2619
2619
  }) => {
2620
- const [isVisible, setIsVisible] = React109__default.useState(false);
2621
- const timeoutRef = React109__default.useRef(null);
2620
+ const [isVisible, setIsVisible] = React110__default.useState(false);
2621
+ const timeoutRef = React110__default.useRef(null);
2622
2622
  const handleMouseEnter = () => {
2623
2623
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2624
2624
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -2627,7 +2627,7 @@ var init_LawReferenceTooltip = __esm({
2627
2627
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2628
2628
  setIsVisible(false);
2629
2629
  };
2630
- React109__default.useEffect(() => {
2630
+ React110__default.useEffect(() => {
2631
2631
  return () => {
2632
2632
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
2633
2633
  };
@@ -2837,7 +2837,7 @@ var init_StatusDot = __esm({
2837
2837
  md: "w-2.5 h-2.5",
2838
2838
  lg: "w-3 h-3"
2839
2839
  };
2840
- StatusDot = React109__default.forwardRef(
2840
+ StatusDot = React110__default.forwardRef(
2841
2841
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
2842
2842
  return /* @__PURE__ */ jsx(
2843
2843
  "span",
@@ -2890,7 +2890,7 @@ var init_TrendIndicator = __esm({
2890
2890
  down: TrendingDown,
2891
2891
  flat: ArrowRight
2892
2892
  };
2893
- TrendIndicator = React109__default.forwardRef(
2893
+ TrendIndicator = React110__default.forwardRef(
2894
2894
  ({
2895
2895
  className,
2896
2896
  value,
@@ -2957,7 +2957,7 @@ var init_RangeSlider = __esm({
2957
2957
  md: "w-4 h-4",
2958
2958
  lg: "w-5 h-5"
2959
2959
  };
2960
- RangeSlider = React109__default.forwardRef(
2960
+ RangeSlider = React110__default.forwardRef(
2961
2961
  ({
2962
2962
  className,
2963
2963
  min = 0,
@@ -3553,7 +3553,7 @@ var init_ContentSection = __esm({
3553
3553
  md: "py-16",
3554
3554
  lg: "py-24"
3555
3555
  };
3556
- ContentSection = React109__default.forwardRef(
3556
+ ContentSection = React110__default.forwardRef(
3557
3557
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
3558
3558
  return /* @__PURE__ */ jsx(
3559
3559
  Box,
@@ -4087,7 +4087,7 @@ var init_AnimatedReveal = __esm({
4087
4087
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
4088
4088
  "none": {}
4089
4089
  };
4090
- AnimatedReveal = React109__default.forwardRef(
4090
+ AnimatedReveal = React110__default.forwardRef(
4091
4091
  ({
4092
4092
  trigger = "scroll",
4093
4093
  animation = "fade-up",
@@ -4247,7 +4247,7 @@ var init_AnimatedGraphic = __esm({
4247
4247
  "components/atoms/AnimatedGraphic.tsx"() {
4248
4248
  "use client";
4249
4249
  init_cn();
4250
- AnimatedGraphic = React109__default.forwardRef(
4250
+ AnimatedGraphic = React110__default.forwardRef(
4251
4251
  ({
4252
4252
  src,
4253
4253
  svgContent,
@@ -4270,7 +4270,7 @@ var init_AnimatedGraphic = __esm({
4270
4270
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
4271
4271
  const resolvedSvg = svgContent ?? fetchedSvg;
4272
4272
  const prevAnimateRef = useRef(animate);
4273
- const setRef = React109__default.useCallback(
4273
+ const setRef = React110__default.useCallback(
4274
4274
  (node) => {
4275
4275
  containerRef.current = node;
4276
4276
  if (typeof ref === "function") ref(node);
@@ -5083,7 +5083,7 @@ var init_ErrorBoundary = __esm({
5083
5083
  "use client";
5084
5084
  init_cn();
5085
5085
  init_ErrorState();
5086
- ErrorBoundary = class extends React109__default.Component {
5086
+ ErrorBoundary = class extends React110__default.Component {
5087
5087
  constructor(props) {
5088
5088
  super(props);
5089
5089
  __publicField(this, "reset", () => {
@@ -5504,8 +5504,8 @@ var init_Tooltip = __esm({
5504
5504
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
5505
5505
  };
5506
5506
  }, []);
5507
- const triggerElement = React109__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
5508
- const trigger = React109__default.cloneElement(triggerElement, {
5507
+ const triggerElement = React110__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
5508
+ const trigger = React110__default.cloneElement(triggerElement, {
5509
5509
  ref: triggerRef,
5510
5510
  onMouseEnter: handleMouseEnter,
5511
5511
  onMouseLeave: handleMouseLeave,
@@ -5626,8 +5626,8 @@ var init_Popover = __esm({
5626
5626
  onMouseEnter: handleOpen,
5627
5627
  onMouseLeave: handleClose
5628
5628
  };
5629
- const childElement = React109__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
5630
- const triggerElement = React109__default.cloneElement(
5629
+ const childElement = React110__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
5630
+ const triggerElement = React110__default.cloneElement(
5631
5631
  childElement,
5632
5632
  {
5633
5633
  ref: triggerRef,
@@ -5744,8 +5744,8 @@ var init_Menu = __esm({
5744
5744
  "bottom-start": "top-full left-0 mt-2",
5745
5745
  "bottom-end": "top-full right-0 mt-2"
5746
5746
  };
5747
- const triggerChild = React109__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
5748
- const triggerElement = React109__default.cloneElement(
5747
+ const triggerChild = React110__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
5748
+ const triggerElement = React110__default.cloneElement(
5749
5749
  triggerChild,
5750
5750
  {
5751
5751
  ref: triggerRef,
@@ -6264,7 +6264,7 @@ var init_MapView = __esm({
6264
6264
  shadowSize: [41, 41]
6265
6265
  });
6266
6266
  L.Marker.prototype.options.icon = defaultIcon;
6267
- const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } = React109__default;
6267
+ const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } = React110__default;
6268
6268
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
6269
6269
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
6270
6270
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -6495,7 +6495,7 @@ function InputPattern({
6495
6495
  fieldName
6496
6496
  }) {
6497
6497
  const { emit } = useEventBus();
6498
- const [localValue, setLocalValue] = React109__default.useState(value);
6498
+ const [localValue, setLocalValue] = React110__default.useState(value);
6499
6499
  const handleChange = (e) => {
6500
6500
  setLocalValue(e.target.value);
6501
6501
  if (onChange) {
@@ -6533,7 +6533,7 @@ function TextareaPattern({
6533
6533
  fieldName
6534
6534
  }) {
6535
6535
  const { emit } = useEventBus();
6536
- const [localValue, setLocalValue] = React109__default.useState(value);
6536
+ const [localValue, setLocalValue] = React110__default.useState(value);
6537
6537
  const handleChange = (e) => {
6538
6538
  setLocalValue(e.target.value);
6539
6539
  if (onChange) {
@@ -6565,7 +6565,7 @@ function SelectPattern({
6565
6565
  fieldName
6566
6566
  }) {
6567
6567
  const { emit } = useEventBus();
6568
- const [localValue, setLocalValue] = React109__default.useState(value);
6568
+ const [localValue, setLocalValue] = React110__default.useState(value);
6569
6569
  const handleChange = (e) => {
6570
6570
  setLocalValue(e.target.value);
6571
6571
  if (onChange) {
@@ -6594,7 +6594,7 @@ function CheckboxPattern({
6594
6594
  className
6595
6595
  }) {
6596
6596
  const { emit } = useEventBus();
6597
- const [localChecked, setLocalChecked] = React109__default.useState(checked);
6597
+ const [localChecked, setLocalChecked] = React110__default.useState(checked);
6598
6598
  const handleChange = (e) => {
6599
6599
  setLocalChecked(e.target.checked);
6600
6600
  if (onChange) {
@@ -6903,9 +6903,9 @@ function ControlButton({
6903
6903
  className
6904
6904
  }) {
6905
6905
  const eventBus = useEventBus();
6906
- const [isPressed, setIsPressed] = React109.useState(false);
6906
+ const [isPressed, setIsPressed] = React110.useState(false);
6907
6907
  const actualPressed = pressed ?? isPressed;
6908
- const handlePointerDown = React109.useCallback(
6908
+ const handlePointerDown = React110.useCallback(
6909
6909
  (e) => {
6910
6910
  e.preventDefault();
6911
6911
  if (disabled) return;
@@ -6915,7 +6915,7 @@ function ControlButton({
6915
6915
  },
6916
6916
  [disabled, pressEvent, eventBus, onPress]
6917
6917
  );
6918
- const handlePointerUp = React109.useCallback(
6918
+ const handlePointerUp = React110.useCallback(
6919
6919
  (e) => {
6920
6920
  e.preventDefault();
6921
6921
  if (disabled) return;
@@ -6925,7 +6925,7 @@ function ControlButton({
6925
6925
  },
6926
6926
  [disabled, releaseEvent, eventBus, onRelease]
6927
6927
  );
6928
- const handlePointerLeave = React109.useCallback(
6928
+ const handlePointerLeave = React110.useCallback(
6929
6929
  (e) => {
6930
6930
  if (isPressed) {
6931
6931
  setIsPressed(false);
@@ -6998,8 +6998,8 @@ function ActionButtons({
6998
6998
  disabled
6999
6999
  }) {
7000
7000
  const eventBus = useEventBus();
7001
- const [activeButtons, setActiveButtons] = React109.useState(/* @__PURE__ */ new Set());
7002
- const handlePress = React109.useCallback(
7001
+ const [activeButtons, setActiveButtons] = React110.useState(/* @__PURE__ */ new Set());
7002
+ const handlePress = React110.useCallback(
7003
7003
  (id) => {
7004
7004
  setActiveButtons((prev) => new Set(prev).add(id));
7005
7005
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -7007,7 +7007,7 @@ function ActionButtons({
7007
7007
  },
7008
7008
  [actionEvent, eventBus, onAction]
7009
7009
  );
7010
- const handleRelease = React109.useCallback(
7010
+ const handleRelease = React110.useCallback(
7011
7011
  (id) => {
7012
7012
  setActiveButtons((prev) => {
7013
7013
  const next = new Set(prev);
@@ -8941,7 +8941,7 @@ var init_MarkdownContent = __esm({
8941
8941
  init_Box();
8942
8942
  init_useTranslate();
8943
8943
  init_cn();
8944
- MarkdownContent = React109__default.memo(
8944
+ MarkdownContent = React110__default.memo(
8945
8945
  ({ content, direction, className }) => {
8946
8946
  const { t: _t } = useTranslate();
8947
8947
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -9158,7 +9158,7 @@ var init_CodeBlock = __esm({
9158
9158
  loloStyle = { ...dark, ...loloStyleOverrides };
9159
9159
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
9160
9160
  HIDDEN_LINE_NUMBERS = { display: "none" };
9161
- CodeBlock = React109__default.memo(
9161
+ CodeBlock = React110__default.memo(
9162
9162
  ({
9163
9163
  code: rawCode,
9164
9164
  language = "text",
@@ -10467,7 +10467,7 @@ var init_StateMachineView = __esm({
10467
10467
  style: { top: title ? 30 : 0 },
10468
10468
  children: [
10469
10469
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
10470
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React109__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
10470
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React110__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
10471
10471
  StateNode,
10472
10472
  {
10473
10473
  state,
@@ -16432,7 +16432,7 @@ function CraftingRecipe({
16432
16432
  className
16433
16433
  }) {
16434
16434
  const eventBus = useEventBus();
16435
- const handleCraft = React109.useCallback(() => {
16435
+ const handleCraft = React110.useCallback(() => {
16436
16436
  onCraft?.();
16437
16437
  if (craftEvent) {
16438
16438
  eventBus.emit(craftEvent, { output: output.label });
@@ -16449,7 +16449,7 @@ function CraftingRecipe({
16449
16449
  children: [
16450
16450
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
16451
16451
  const hasSufficient = ingredient.available >= ingredient.required;
16452
- return /* @__PURE__ */ jsxs(React109.Fragment, { children: [
16452
+ return /* @__PURE__ */ jsxs(React110.Fragment, { children: [
16453
16453
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
16454
16454
  ItemSlot,
16455
16455
  {
@@ -16743,8 +16743,8 @@ function DPad({
16743
16743
  }) {
16744
16744
  const eventBus = useEventBus();
16745
16745
  const sizes = sizeMap6[size];
16746
- const [activeDirections, setActiveDirections] = React109.useState(/* @__PURE__ */ new Set());
16747
- const handlePress = React109.useCallback(
16746
+ const [activeDirections, setActiveDirections] = React110.useState(/* @__PURE__ */ new Set());
16747
+ const handlePress = React110.useCallback(
16748
16748
  (direction) => {
16749
16749
  setActiveDirections((prev) => new Set(prev).add(direction));
16750
16750
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -16752,7 +16752,7 @@ function DPad({
16752
16752
  },
16753
16753
  [directionEvent, eventBus, onDirection]
16754
16754
  );
16755
- const handleRelease = React109.useCallback(
16755
+ const handleRelease = React110.useCallback(
16756
16756
  (direction) => {
16757
16757
  setActiveDirections((prev) => {
16758
16758
  const next = new Set(prev);
@@ -16933,6 +16933,19 @@ var init_useAuthContext = __esm({
16933
16933
  "hooks/useAuthContext.ts"() {
16934
16934
  }
16935
16935
  });
16936
+ var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
16937
+ var init_CurrentPagePathContext = __esm({
16938
+ "context/CurrentPagePathContext.tsx"() {
16939
+ "use client";
16940
+ CurrentPagePathContext = createContext(void 0);
16941
+ CurrentPagePathProvider = ({
16942
+ value,
16943
+ children
16944
+ }) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
16945
+ CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
16946
+ useCurrentPagePath = () => useContext(CurrentPagePathContext);
16947
+ }
16948
+ });
16936
16949
  var DashboardLayout, NavLink;
16937
16950
  var init_DashboardLayout = __esm({
16938
16951
  "components/templates/DashboardLayout.tsx"() {
@@ -16946,6 +16959,7 @@ var init_DashboardLayout = __esm({
16946
16959
  init_useAuthContext();
16947
16960
  init_useEventBus();
16948
16961
  init_useTranslate();
16962
+ init_CurrentPagePathContext();
16949
16963
  DashboardLayout = ({
16950
16964
  appName = "{{APP_TITLE}}",
16951
16965
  logo,
@@ -16962,6 +16976,7 @@ var init_DashboardLayout = __esm({
16962
16976
  showThemeToggle = true,
16963
16977
  sidebarFooter,
16964
16978
  onSignOut: onSignOutProp,
16979
+ currentPath,
16965
16980
  children
16966
16981
  }) => {
16967
16982
  const eventBus = useEventBus();
@@ -16982,6 +16997,8 @@ var init_DashboardLayout = __esm({
16982
16997
  const [sidebarOpen, setSidebarOpen] = useState(false);
16983
16998
  const [userMenuOpen, setUserMenuOpen] = useState(false);
16984
16999
  const location = useLocation();
17000
+ const ctxPagePath = useCurrentPagePath();
17001
+ const activePath = currentPath ?? ctxPagePath ?? location.pathname;
16985
17002
  const { user: authUser, signOut: authSignOut } = useAuthContext();
16986
17003
  const user = userProp || (authUser ? {
16987
17004
  name: authUser.displayName || authUser.email?.split("@")[0] || "User",
@@ -16990,255 +17007,265 @@ var init_DashboardLayout = __esm({
16990
17007
  } : null);
16991
17008
  const { t } = useTranslate();
16992
17009
  const handleSignOut = onSignOutProp || authSignOut;
16993
- return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
16994
- sidebarOpen && /* @__PURE__ */ jsx(
16995
- Box,
16996
- {
16997
- className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
16998
- onClick: () => setSidebarOpen(false)
16999
- }
17000
- ),
17001
- /* @__PURE__ */ jsxs(
17002
- Box,
17003
- {
17004
- as: "aside",
17005
- className: cn(
17006
- "fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
17007
- "transform transition-transform duration-200 ease-in-out lg:translate-x-0",
17008
- sidebarOpen ? "translate-x-0" : "-translate-x-full"
17010
+ return /* @__PURE__ */ jsxs(
17011
+ HStack,
17012
+ {
17013
+ gap: "none",
17014
+ className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
17015
+ children: [
17016
+ sidebarOpen && /* @__PURE__ */ jsx(
17017
+ Box,
17018
+ {
17019
+ className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
17020
+ onClick: () => setSidebarOpen(false)
17021
+ }
17009
17022
  ),
17010
- children: [
17011
- /* @__PURE__ */ jsxs(
17012
- HStack,
17013
- {
17014
- align: "center",
17015
- justify: "between",
17016
- className: "h-16 px-4 border-b border-border dark:border-border",
17017
- children: [
17018
- /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
17019
- logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
17020
- Typography,
17021
- {
17022
- variant: "small",
17023
- className: "text-white font-bold text-sm",
17024
- as: "span",
17025
- children: appName.charAt(0).toUpperCase()
17026
- }
17027
- ) }),
17028
- /* @__PURE__ */ jsx(
17029
- Typography,
17030
- {
17031
- variant: "label",
17032
- className: "font-semibold text-foreground dark:text-foreground",
17033
- as: "span",
17034
- children: appName
17035
- }
17036
- )
17037
- ] }),
17038
- /* @__PURE__ */ jsx(
17039
- Button,
17040
- {
17041
- variant: "ghost",
17042
- className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
17043
- onClick: () => setSidebarOpen(false),
17044
- children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
17045
- }
17046
- )
17047
- ]
17048
- }
17049
- ),
17050
- /* @__PURE__ */ jsx(
17051
- VStack,
17052
- {
17053
- as: "nav",
17054
- gap: "none",
17055
- className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
17056
- children: navItems.map((item) => /* @__PURE__ */ jsx(
17057
- NavLink,
17023
+ /* @__PURE__ */ jsxs(
17024
+ Box,
17025
+ {
17026
+ as: "aside",
17027
+ className: cn(
17028
+ "z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
17029
+ "fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
17030
+ "transform transition-transform duration-200 ease-in-out",
17031
+ "flex flex-col",
17032
+ sidebarOpen ? "translate-x-0" : "-translate-x-full"
17033
+ ),
17034
+ children: [
17035
+ /* @__PURE__ */ jsxs(
17036
+ HStack,
17058
17037
  {
17059
- item,
17060
- currentPath: location.pathname
17061
- },
17062
- item.href
17063
- ))
17064
- }
17065
- ),
17066
- sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
17067
- ]
17068
- }
17069
- ),
17070
- /* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
17071
- /* @__PURE__ */ jsx(
17072
- Box,
17073
- {
17074
- as: "header",
17075
- className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
17076
- children: /* @__PURE__ */ jsxs(
17077
- HStack,
17078
- {
17079
- align: "center",
17080
- justify: "between",
17081
- className: "h-full px-4 gap-4",
17082
- children: [
17083
- /* @__PURE__ */ jsx(
17084
- Button,
17085
- {
17086
- variant: "ghost",
17087
- className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
17088
- onClick: () => setSidebarOpen(true),
17089
- "aria-label": "Open sidebar",
17090
- children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
17091
- }
17092
- ),
17093
- searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17094
- /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
17095
- /* @__PURE__ */ jsx(
17096
- Input,
17097
- {
17098
- type: "search",
17099
- placeholder: t("common.search"),
17100
- className: "pl-10 w-full",
17101
- onKeyDown: (e) => {
17102
- if (e.key === "Enter") {
17103
- handleSearchSubmit(e.target.value);
17038
+ align: "center",
17039
+ justify: "between",
17040
+ className: "h-16 px-4 border-b border-border dark:border-border",
17041
+ children: [
17042
+ /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
17043
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
17044
+ Typography,
17045
+ {
17046
+ variant: "small",
17047
+ className: "text-white font-bold text-sm",
17048
+ as: "span",
17049
+ children: appName.charAt(0).toUpperCase()
17104
17050
  }
17051
+ ) }),
17052
+ /* @__PURE__ */ jsx(
17053
+ Typography,
17054
+ {
17055
+ variant: "label",
17056
+ className: "font-semibold text-foreground dark:text-foreground",
17057
+ as: "span",
17058
+ children: appName
17059
+ }
17060
+ )
17061
+ ] }),
17062
+ /* @__PURE__ */ jsx(
17063
+ Button,
17064
+ {
17065
+ variant: "ghost",
17066
+ className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
17067
+ onClick: () => setSidebarOpen(false),
17068
+ children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
17105
17069
  }
17106
- }
17107
- )
17108
- ] }) }),
17109
- /* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
17110
- headerActions,
17111
- showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
17112
- topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
17113
- Button,
17070
+ )
17071
+ ]
17072
+ }
17073
+ ),
17074
+ /* @__PURE__ */ jsx(
17075
+ VStack,
17076
+ {
17077
+ as: "nav",
17078
+ gap: "none",
17079
+ className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
17080
+ children: navItems.map((item) => /* @__PURE__ */ jsx(
17081
+ NavLink,
17114
17082
  {
17115
- variant: "ghost",
17116
- className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17117
- onClick: () => handleTopBarActionClick(action.event),
17118
- "aria-label": action.label ?? action.icon,
17119
- children: [
17120
- /* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17121
- action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
17122
- Box,
17123
- {
17124
- as: "span",
17125
- className: cn(
17126
- "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
17127
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
17128
- ),
17129
- children: action.badge
17130
- }
17131
- )
17132
- ]
17083
+ item,
17084
+ currentPath: activePath
17133
17085
  },
17134
- `${action.event}-${idx}`
17135
- )),
17136
- notificationsEnabled && /* @__PURE__ */ jsxs(
17137
- Button,
17138
- {
17139
- variant: "ghost",
17140
- className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17141
- onClick: handleNotificationClick,
17142
- "aria-label": t("common.notifications"),
17143
- children: [
17144
- /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17145
- unreadCount > 0 && /* @__PURE__ */ jsx(
17146
- Box,
17147
- {
17148
- as: "span",
17149
- className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
17150
- children: unreadCount > 99 ? "99+" : unreadCount
17151
- }
17152
- )
17153
- ]
17154
- }
17155
- ),
17156
- user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17157
- /* @__PURE__ */ jsxs(
17086
+ item.href
17087
+ ))
17088
+ }
17089
+ ),
17090
+ sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
17091
+ ]
17092
+ }
17093
+ ),
17094
+ /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
17095
+ /* @__PURE__ */ jsx(
17096
+ Box,
17097
+ {
17098
+ as: "header",
17099
+ className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
17100
+ children: /* @__PURE__ */ jsxs(
17101
+ HStack,
17102
+ {
17103
+ align: "center",
17104
+ justify: "between",
17105
+ className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
17106
+ children: [
17107
+ /* @__PURE__ */ jsx(
17158
17108
  Button,
17159
17109
  {
17160
17110
  variant: "ghost",
17161
- className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
17162
- onClick: () => setUserMenuOpen(!userMenuOpen),
17163
- children: [
17164
- /* @__PURE__ */ jsx(
17165
- Avatar,
17166
- {
17167
- src: user.avatar,
17168
- alt: user.name,
17169
- initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
17170
- size: "sm"
17171
- }
17172
- ),
17173
- /* @__PURE__ */ jsx(
17174
- Typography,
17175
- {
17176
- variant: "small",
17177
- className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
17178
- as: "span",
17179
- children: user.name
17180
- }
17181
- ),
17182
- /* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
17183
- ]
17111
+ className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
17112
+ onClick: () => setSidebarOpen(true),
17113
+ "aria-label": "Open sidebar",
17114
+ children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
17184
17115
  }
17185
17116
  ),
17186
- userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
17117
+ searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17118
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
17187
17119
  /* @__PURE__ */ jsx(
17188
- Box,
17120
+ Input,
17121
+ {
17122
+ type: "search",
17123
+ placeholder: t("common.search"),
17124
+ className: "pl-10 w-full",
17125
+ onKeyDown: (e) => {
17126
+ if (e.key === "Enter") {
17127
+ handleSearchSubmit(e.target.value);
17128
+ }
17129
+ }
17130
+ }
17131
+ )
17132
+ ] }) }),
17133
+ !searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
17134
+ /* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
17135
+ headerActions,
17136
+ showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
17137
+ topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
17138
+ Button,
17139
+ {
17140
+ variant: "ghost",
17141
+ className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17142
+ onClick: () => handleTopBarActionClick(action.event),
17143
+ "aria-label": action.label ?? action.icon,
17144
+ children: [
17145
+ /* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17146
+ action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
17147
+ Box,
17148
+ {
17149
+ as: "span",
17150
+ className: cn(
17151
+ "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
17152
+ action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
17153
+ ),
17154
+ children: action.badge
17155
+ }
17156
+ )
17157
+ ]
17158
+ },
17159
+ `${action.event}-${idx}`
17160
+ )),
17161
+ notificationsEnabled && /* @__PURE__ */ jsxs(
17162
+ Button,
17189
17163
  {
17190
- className: "fixed inset-0 z-20",
17191
- onClick: () => setUserMenuOpen(false)
17164
+ variant: "ghost",
17165
+ className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17166
+ onClick: handleNotificationClick,
17167
+ "aria-label": t("common.notifications"),
17168
+ children: [
17169
+ /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17170
+ unreadCount > 0 && /* @__PURE__ */ jsx(
17171
+ Box,
17172
+ {
17173
+ as: "span",
17174
+ className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
17175
+ children: unreadCount > 99 ? "99+" : unreadCount
17176
+ }
17177
+ )
17178
+ ]
17192
17179
  }
17193
17180
  ),
17194
- /* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
17195
- /* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
17196
- /* @__PURE__ */ jsx(
17197
- Typography,
17198
- {
17199
- variant: "small",
17200
- className: "text-sm font-medium text-foreground dark:text-foreground",
17201
- as: "p",
17202
- children: user.name
17203
- }
17204
- ),
17205
- /* @__PURE__ */ jsx(
17206
- Typography,
17207
- {
17208
- variant: "caption",
17209
- className: "text-xs text-muted-foreground dark:text-muted-foreground",
17210
- as: "p",
17211
- children: user.email
17212
- }
17213
- )
17214
- ] }),
17181
+ user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17215
17182
  /* @__PURE__ */ jsxs(
17216
17183
  Button,
17217
17184
  {
17218
17185
  variant: "ghost",
17219
- onClick: () => {
17220
- setUserMenuOpen(false);
17221
- handleSignOut?.();
17222
- },
17223
- className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
17186
+ className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
17187
+ onClick: () => setUserMenuOpen(!userMenuOpen),
17224
17188
  children: [
17225
- /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
17226
- t("auth.signOut")
17189
+ /* @__PURE__ */ jsx(
17190
+ Avatar,
17191
+ {
17192
+ src: user.avatar,
17193
+ alt: user.name,
17194
+ initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
17195
+ size: "sm"
17196
+ }
17197
+ ),
17198
+ /* @__PURE__ */ jsx(
17199
+ Typography,
17200
+ {
17201
+ variant: "small",
17202
+ className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
17203
+ as: "span",
17204
+ children: user.name
17205
+ }
17206
+ ),
17207
+ /* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
17227
17208
  ]
17228
17209
  }
17229
- )
17210
+ ),
17211
+ userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
17212
+ /* @__PURE__ */ jsx(
17213
+ Box,
17214
+ {
17215
+ className: "fixed inset-0 z-20",
17216
+ onClick: () => setUserMenuOpen(false)
17217
+ }
17218
+ ),
17219
+ /* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
17220
+ /* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
17221
+ /* @__PURE__ */ jsx(
17222
+ Typography,
17223
+ {
17224
+ variant: "small",
17225
+ className: "text-sm font-medium text-foreground dark:text-foreground",
17226
+ as: "p",
17227
+ children: user.name
17228
+ }
17229
+ ),
17230
+ /* @__PURE__ */ jsx(
17231
+ Typography,
17232
+ {
17233
+ variant: "caption",
17234
+ className: "text-xs text-muted-foreground dark:text-muted-foreground",
17235
+ as: "p",
17236
+ children: user.email
17237
+ }
17238
+ )
17239
+ ] }),
17240
+ /* @__PURE__ */ jsxs(
17241
+ Button,
17242
+ {
17243
+ variant: "ghost",
17244
+ onClick: () => {
17245
+ setUserMenuOpen(false);
17246
+ handleSignOut?.();
17247
+ },
17248
+ className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
17249
+ children: [
17250
+ /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
17251
+ t("auth.signOut")
17252
+ ]
17253
+ }
17254
+ )
17255
+ ] })
17256
+ ] })
17230
17257
  ] })
17231
17258
  ] })
17232
- ] })
17233
- ] })
17234
- ]
17259
+ ]
17260
+ }
17261
+ )
17235
17262
  }
17236
- )
17237
- }
17238
- ),
17239
- /* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
17240
- ] })
17241
- ] });
17263
+ ),
17264
+ /* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
17265
+ ] })
17266
+ ]
17267
+ }
17268
+ );
17242
17269
  };
17243
17270
  DashboardLayout.displayName = "DashboardLayout";
17244
17271
  NavLink = ({
@@ -17732,13 +17759,13 @@ function DataList({
17732
17759
  }) {
17733
17760
  const eventBus = useEventBus();
17734
17761
  const { t } = useTranslate();
17735
- const [visibleCount, setVisibleCount] = React109__default.useState(pageSize || Infinity);
17762
+ const [visibleCount, setVisibleCount] = React110__default.useState(pageSize || Infinity);
17736
17763
  const fieldDefs = fields ?? columns ?? [];
17737
17764
  const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
17738
17765
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
17739
17766
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
17740
17767
  const hasRenderProp = typeof children === "function";
17741
- React109__default.useEffect(() => {
17768
+ React110__default.useEffect(() => {
17742
17769
  const renderItemTypeOf = typeof schemaRenderItem;
17743
17770
  const childrenTypeOf = typeof children;
17744
17771
  if (data.length > 0 && !hasRenderProp) {
@@ -17794,7 +17821,7 @@ function DataList({
17794
17821
  const items2 = data.map((item) => item);
17795
17822
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
17796
17823
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
17797
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
17824
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
17798
17825
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
17799
17826
  group.items.map((itemData, index) => {
17800
17827
  const id = itemData.id || `${gi}-${index}`;
@@ -17985,7 +18012,7 @@ function DataList({
17985
18012
  className
17986
18013
  ),
17987
18014
  children: [
17988
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
18015
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
17989
18016
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
17990
18017
  group.items.map(
17991
18018
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -19269,7 +19296,7 @@ var init_WizardProgress = __esm({
19269
19296
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
19270
19297
  const isActive = index === currentStep;
19271
19298
  const isCompleted = index < currentStep;
19272
- return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
19299
+ return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
19273
19300
  /* @__PURE__ */ jsx(
19274
19301
  "button",
19275
19302
  {
@@ -20169,9 +20196,9 @@ function ScoreDisplay({
20169
20196
  ...rest
20170
20197
  }) {
20171
20198
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
20172
- const [displayValue, setDisplayValue] = React109.useState(resolvedValue);
20173
- const [isAnimating, setIsAnimating] = React109.useState(false);
20174
- React109.useEffect(() => {
20199
+ const [displayValue, setDisplayValue] = React110.useState(resolvedValue);
20200
+ const [isAnimating, setIsAnimating] = React110.useState(false);
20201
+ React110.useEffect(() => {
20175
20202
  if (!animated || displayValue === resolvedValue) {
20176
20203
  setDisplayValue(resolvedValue);
20177
20204
  return;
@@ -20321,7 +20348,7 @@ function InventoryGrid({
20321
20348
  const eventBus = useEventBus();
20322
20349
  const slotCount = totalSlots ?? items.length;
20323
20350
  const emptySlotCount = Math.max(0, slotCount - items.length);
20324
- const handleSelect = React109.useCallback(
20351
+ const handleSelect = React110.useCallback(
20325
20352
  (id) => {
20326
20353
  onSelect?.(id);
20327
20354
  if (selectEvent) {
@@ -20603,15 +20630,15 @@ function GameCanvas2D({
20603
20630
  fps = 60,
20604
20631
  className
20605
20632
  }) {
20606
- const canvasRef = React109.useRef(null);
20607
- const rafRef = React109.useRef(0);
20608
- const frameRef = React109.useRef(0);
20609
- const lastTimeRef = React109.useRef(0);
20610
- const onDrawRef = React109.useRef(onDraw);
20633
+ const canvasRef = React110.useRef(null);
20634
+ const rafRef = React110.useRef(0);
20635
+ const frameRef = React110.useRef(0);
20636
+ const lastTimeRef = React110.useRef(0);
20637
+ const onDrawRef = React110.useRef(onDraw);
20611
20638
  onDrawRef.current = onDraw;
20612
- const onTickRef = React109.useRef(onTick);
20639
+ const onTickRef = React110.useRef(onTick);
20613
20640
  onTickRef.current = onTick;
20614
- React109.useEffect(() => {
20641
+ React110.useEffect(() => {
20615
20642
  const canvas = canvasRef.current;
20616
20643
  if (!canvas) return;
20617
20644
  const ctx = canvas.getContext("2d");
@@ -20952,7 +20979,7 @@ function TurnPanel({
20952
20979
  className
20953
20980
  }) {
20954
20981
  const eventBus = useEventBus();
20955
- const handleAction = React109.useCallback(
20982
+ const handleAction = React110.useCallback(
20956
20983
  (event) => {
20957
20984
  if (event) {
20958
20985
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -21098,7 +21125,7 @@ function UnitCommandBar({
21098
21125
  className
21099
21126
  }) {
21100
21127
  const eventBus = useEventBus();
21101
- const handleCommand = React109.useCallback(
21128
+ const handleCommand = React110.useCallback(
21102
21129
  (event) => {
21103
21130
  if (event) {
21104
21131
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -21583,7 +21610,7 @@ function GameMenu({
21583
21610
  } catch {
21584
21611
  }
21585
21612
  const eventBus = eventBusProp || eventBusFromHook;
21586
- const handleOptionClick = React109.useCallback(
21613
+ const handleOptionClick = React110.useCallback(
21587
21614
  (option) => {
21588
21615
  if (option.event && eventBus) {
21589
21616
  eventBus.emit(`UI:${option.event}`, { option });
@@ -21697,7 +21724,7 @@ function GameOverScreen({
21697
21724
  } catch {
21698
21725
  }
21699
21726
  const eventBus = eventBusProp || eventBusFromHook;
21700
- const handleActionClick = React109.useCallback(
21727
+ const handleActionClick = React110.useCallback(
21701
21728
  (action) => {
21702
21729
  if (action.event && eventBus) {
21703
21730
  eventBus.emit(`UI:${action.event}`, { action });
@@ -24828,7 +24855,7 @@ var init_StepFlow = __esm({
24828
24855
  className
24829
24856
  }) => {
24830
24857
  if (orientation === "vertical") {
24831
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React109__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
24858
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React110__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
24832
24859
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
24833
24860
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
24834
24861
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -24839,7 +24866,7 @@ var init_StepFlow = __esm({
24839
24866
  ] })
24840
24867
  ] }) }, index)) });
24841
24868
  }
24842
- 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(React109__default.Fragment, { children: [
24869
+ 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(React110__default.Fragment, { children: [
24843
24870
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
24844
24871
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
24845
24872
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -26991,7 +27018,7 @@ var init_DocumentViewer = __esm({
26991
27018
  }
26992
27019
  });
26993
27020
  function extractTitle(children) {
26994
- if (!React109__default.isValidElement(children)) return void 0;
27021
+ if (!React110__default.isValidElement(children)) return void 0;
26995
27022
  const props = children.props;
26996
27023
  if (typeof props.title === "string") {
26997
27024
  return props.title;
@@ -27103,7 +27130,7 @@ function LinearView({
27103
27130
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
27104
27131
  const isDone = i < currentIdx;
27105
27132
  const isCurrent = i === currentIdx;
27106
- return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
27133
+ return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
27107
27134
  i > 0 && /* @__PURE__ */ jsx(
27108
27135
  Typography,
27109
27136
  {
@@ -27887,12 +27914,12 @@ var init_Form = __esm({
27887
27914
  const isSchemaEntity = isOrbitalEntitySchema(entity);
27888
27915
  const resolvedEntity = isSchemaEntity ? entity : void 0;
27889
27916
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
27890
- const normalizedInitialData = React109__default.useMemo(() => {
27917
+ const normalizedInitialData = React110__default.useMemo(() => {
27891
27918
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
27892
27919
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
27893
27920
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
27894
27921
  }, [entity, initialData]);
27895
- const entityDerivedFields = React109__default.useMemo(() => {
27922
+ const entityDerivedFields = React110__default.useMemo(() => {
27896
27923
  if (fields && fields.length > 0) return void 0;
27897
27924
  if (!resolvedEntity) return void 0;
27898
27925
  return resolvedEntity.fields.map(
@@ -27911,16 +27938,16 @@ var init_Form = __esm({
27911
27938
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
27912
27939
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
27913
27940
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
27914
- const [formData, setFormData] = React109__default.useState(
27941
+ const [formData, setFormData] = React110__default.useState(
27915
27942
  normalizedInitialData
27916
27943
  );
27917
- const [collapsedSections, setCollapsedSections] = React109__default.useState(
27944
+ const [collapsedSections, setCollapsedSections] = React110__default.useState(
27918
27945
  /* @__PURE__ */ new Set()
27919
27946
  );
27920
- const [submitError, setSubmitError] = React109__default.useState(null);
27921
- const formRef = React109__default.useRef(null);
27947
+ const [submitError, setSubmitError] = React110__default.useState(null);
27948
+ const formRef = React110__default.useRef(null);
27922
27949
  const formMode = props.mode;
27923
- const mountedRef = React109__default.useRef(false);
27950
+ const mountedRef = React110__default.useRef(false);
27924
27951
  if (!mountedRef.current) {
27925
27952
  mountedRef.current = true;
27926
27953
  debug("forms", "mount", {
@@ -27933,7 +27960,7 @@ var init_Form = __esm({
27933
27960
  });
27934
27961
  }
27935
27962
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
27936
- const evalContext = React109__default.useMemo(
27963
+ const evalContext = React110__default.useMemo(
27937
27964
  () => ({
27938
27965
  formValues: formData,
27939
27966
  globalVariables: externalContext?.globalVariables ?? {},
@@ -27942,7 +27969,7 @@ var init_Form = __esm({
27942
27969
  }),
27943
27970
  [formData, externalContext]
27944
27971
  );
27945
- React109__default.useEffect(() => {
27972
+ React110__default.useEffect(() => {
27946
27973
  debug("forms", "initialData-sync", {
27947
27974
  mode: formMode,
27948
27975
  normalizedInitialData,
@@ -27953,7 +27980,7 @@ var init_Form = __esm({
27953
27980
  setFormData(normalizedInitialData);
27954
27981
  }
27955
27982
  }, [normalizedInitialData]);
27956
- const processCalculations = React109__default.useCallback(
27983
+ const processCalculations = React110__default.useCallback(
27957
27984
  (changedFieldId, newFormData) => {
27958
27985
  if (!hiddenCalculations.length) return;
27959
27986
  const context = {
@@ -27978,7 +28005,7 @@ var init_Form = __esm({
27978
28005
  },
27979
28006
  [hiddenCalculations, externalContext, eventBus]
27980
28007
  );
27981
- const checkViolations = React109__default.useCallback(
28008
+ const checkViolations = React110__default.useCallback(
27982
28009
  (changedFieldId, newFormData) => {
27983
28010
  if (!violationTriggers.length) return;
27984
28011
  const context = {
@@ -28016,7 +28043,7 @@ var init_Form = __esm({
28016
28043
  processCalculations(name, newFormData);
28017
28044
  checkViolations(name, newFormData);
28018
28045
  };
28019
- const isFieldVisible = React109__default.useCallback(
28046
+ const isFieldVisible = React110__default.useCallback(
28020
28047
  (fieldName) => {
28021
28048
  const condition = conditionalFields[fieldName];
28022
28049
  if (!condition) return true;
@@ -28024,7 +28051,7 @@ var init_Form = __esm({
28024
28051
  },
28025
28052
  [conditionalFields, evalContext]
28026
28053
  );
28027
- const isSectionVisible = React109__default.useCallback(
28054
+ const isSectionVisible = React110__default.useCallback(
28028
28055
  (section) => {
28029
28056
  if (!section.condition) return true;
28030
28057
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -28100,7 +28127,7 @@ var init_Form = __esm({
28100
28127
  eventBus.emit(`UI:${onCancel}`);
28101
28128
  }
28102
28129
  };
28103
- const renderField = React109__default.useCallback(
28130
+ const renderField = React110__default.useCallback(
28104
28131
  (field) => {
28105
28132
  const fieldName = field.name || field.field;
28106
28133
  if (!fieldName) return null;
@@ -28121,7 +28148,7 @@ var init_Form = __esm({
28121
28148
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
28122
28149
  );
28123
28150
  const effectiveFields = entityDerivedFields ?? fields;
28124
- const normalizedFields = React109__default.useMemo(() => {
28151
+ const normalizedFields = React110__default.useMemo(() => {
28125
28152
  if (!effectiveFields || effectiveFields.length === 0) return [];
28126
28153
  return effectiveFields.map((field) => {
28127
28154
  if (typeof field === "string") {
@@ -28143,7 +28170,7 @@ var init_Form = __esm({
28143
28170
  return field;
28144
28171
  });
28145
28172
  }, [effectiveFields, resolvedEntity]);
28146
- const schemaFields = React109__default.useMemo(() => {
28173
+ const schemaFields = React110__default.useMemo(() => {
28147
28174
  if (normalizedFields.length === 0) return null;
28148
28175
  if (isDebugEnabled()) {
28149
28176
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -28153,7 +28180,7 @@ var init_Form = __esm({
28153
28180
  }
28154
28181
  return normalizedFields.map(renderField).filter(Boolean);
28155
28182
  }, [normalizedFields, renderField, entityName, conditionalFields]);
28156
- const sectionElements = React109__default.useMemo(() => {
28183
+ const sectionElements = React110__default.useMemo(() => {
28157
28184
  if (!sections || sections.length === 0) return null;
28158
28185
  return sections.map((section) => {
28159
28186
  if (!isSectionVisible(section)) {
@@ -29685,7 +29712,7 @@ var init_List = __esm({
29685
29712
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
29686
29713
  return [];
29687
29714
  }, [entity]);
29688
- const getItemActions = React109__default.useCallback(
29715
+ const getItemActions = React110__default.useCallback(
29689
29716
  (item) => {
29690
29717
  if (!itemActions) return [];
29691
29718
  if (typeof itemActions === "function") {
@@ -30122,7 +30149,7 @@ var init_MediaGallery = __esm({
30122
30149
  [selectable, selectedItems, selectionEvent, eventBus]
30123
30150
  );
30124
30151
  const entityData = Array.isArray(entity) ? entity : [];
30125
- const items = React109__default.useMemo(() => {
30152
+ const items = React110__default.useMemo(() => {
30126
30153
  if (propItems) return propItems;
30127
30154
  if (entityData.length === 0) return [];
30128
30155
  return entityData.map((record, idx) => ({
@@ -30295,9 +30322,9 @@ function MiniMap({
30295
30322
  viewportRect,
30296
30323
  className
30297
30324
  }) {
30298
- const canvasRef = React109.useRef(null);
30299
- const frameRef = React109.useRef(0);
30300
- React109.useEffect(() => {
30325
+ const canvasRef = React110.useRef(null);
30326
+ const frameRef = React110.useRef(0);
30327
+ React110.useEffect(() => {
30301
30328
  const canvas = canvasRef.current;
30302
30329
  if (!canvas) return;
30303
30330
  const ctx = canvas.getContext("2d");
@@ -30379,7 +30406,7 @@ var init_MiniMap = __esm({
30379
30406
  }
30380
30407
  });
30381
30408
  function extractTitle2(children) {
30382
- if (!React109__default.isValidElement(children)) return void 0;
30409
+ if (!React110__default.isValidElement(children)) return void 0;
30383
30410
  const props = children.props;
30384
30411
  if (typeof props.title === "string") {
30385
30412
  return props.title;
@@ -31092,7 +31119,7 @@ var init_PageHeader = __esm({
31092
31119
  info: "bg-info/10 text-info"
31093
31120
  };
31094
31121
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
31095
- 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(React109__default.Fragment, { children: [
31122
+ 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(React110__default.Fragment, { children: [
31096
31123
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
31097
31124
  crumb.href ? /* @__PURE__ */ jsx(
31098
31125
  "a",
@@ -31311,7 +31338,7 @@ var init_debugRegistry = __esm({
31311
31338
  }
31312
31339
  });
31313
31340
  function useDebugData() {
31314
- const [data, setData] = React109.useState(() => ({
31341
+ const [data, setData] = React110.useState(() => ({
31315
31342
  traits: [],
31316
31343
  ticks: [],
31317
31344
  guards: [],
@@ -31325,7 +31352,7 @@ function useDebugData() {
31325
31352
  },
31326
31353
  lastUpdate: Date.now()
31327
31354
  }));
31328
- React109.useEffect(() => {
31355
+ React110.useEffect(() => {
31329
31356
  const updateData = () => {
31330
31357
  setData({
31331
31358
  traits: getAllTraits(),
@@ -31434,12 +31461,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
31434
31461
  return positions;
31435
31462
  }
31436
31463
  function WalkMinimap() {
31437
- const [walkStep, setWalkStep] = React109.useState(null);
31438
- const [traits2, setTraits] = React109.useState([]);
31439
- const [coveredEdges, setCoveredEdges] = React109.useState([]);
31440
- const [completedTraits, setCompletedTraits] = React109.useState(/* @__PURE__ */ new Set());
31441
- const prevTraitRef = React109.useRef(null);
31442
- React109.useEffect(() => {
31464
+ const [walkStep, setWalkStep] = React110.useState(null);
31465
+ const [traits2, setTraits] = React110.useState([]);
31466
+ const [coveredEdges, setCoveredEdges] = React110.useState([]);
31467
+ const [completedTraits, setCompletedTraits] = React110.useState(/* @__PURE__ */ new Set());
31468
+ const prevTraitRef = React110.useRef(null);
31469
+ React110.useEffect(() => {
31443
31470
  const interval = setInterval(() => {
31444
31471
  const w = window;
31445
31472
  const step = w.__orbitalWalkStep;
@@ -31886,15 +31913,15 @@ var init_EntitiesTab = __esm({
31886
31913
  }
31887
31914
  });
31888
31915
  function EventFlowTab({ events: events2 }) {
31889
- const [filter, setFilter] = React109.useState("all");
31890
- const containerRef = React109.useRef(null);
31891
- const [autoScroll, setAutoScroll] = React109.useState(true);
31892
- React109.useEffect(() => {
31916
+ const [filter, setFilter] = React110.useState("all");
31917
+ const containerRef = React110.useRef(null);
31918
+ const [autoScroll, setAutoScroll] = React110.useState(true);
31919
+ React110.useEffect(() => {
31893
31920
  if (autoScroll && containerRef.current) {
31894
31921
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
31895
31922
  }
31896
31923
  }, [events2.length, autoScroll]);
31897
- const filteredEvents = React109.useMemo(() => {
31924
+ const filteredEvents = React110.useMemo(() => {
31898
31925
  if (filter === "all") return events2;
31899
31926
  return events2.filter((e) => e.type === filter);
31900
31927
  }, [events2, filter]);
@@ -32013,7 +32040,7 @@ var init_EventFlowTab = __esm({
32013
32040
  }
32014
32041
  });
32015
32042
  function GuardsPanel({ guards }) {
32016
- const [filter, setFilter] = React109.useState("all");
32043
+ const [filter, setFilter] = React110.useState("all");
32017
32044
  if (guards.length === 0) {
32018
32045
  return /* @__PURE__ */ jsx(
32019
32046
  EmptyState,
@@ -32026,7 +32053,7 @@ function GuardsPanel({ guards }) {
32026
32053
  }
32027
32054
  const passedCount = guards.filter((g) => g.result).length;
32028
32055
  const failedCount = guards.length - passedCount;
32029
- const filteredGuards = React109.useMemo(() => {
32056
+ const filteredGuards = React110.useMemo(() => {
32030
32057
  if (filter === "all") return guards;
32031
32058
  if (filter === "passed") return guards.filter((g) => g.result);
32032
32059
  return guards.filter((g) => !g.result);
@@ -32187,10 +32214,10 @@ function EffectBadge({ effect }) {
32187
32214
  ] });
32188
32215
  }
32189
32216
  function TransitionTimeline({ transitions }) {
32190
- const containerRef = React109.useRef(null);
32191
- const [autoScroll, setAutoScroll] = React109.useState(true);
32192
- const [expandedId, setExpandedId] = React109.useState(null);
32193
- React109.useEffect(() => {
32217
+ const containerRef = React110.useRef(null);
32218
+ const [autoScroll, setAutoScroll] = React110.useState(true);
32219
+ const [expandedId, setExpandedId] = React110.useState(null);
32220
+ React110.useEffect(() => {
32194
32221
  if (autoScroll && containerRef.current) {
32195
32222
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
32196
32223
  }
@@ -32476,9 +32503,9 @@ function getAllEvents(traits2) {
32476
32503
  }
32477
32504
  function EventDispatcherTab({ traits: traits2, schema }) {
32478
32505
  const eventBus = useEventBus();
32479
- const [log3, setLog] = React109.useState([]);
32480
- const prevStatesRef = React109.useRef(/* @__PURE__ */ new Map());
32481
- React109.useEffect(() => {
32506
+ const [log3, setLog] = React110.useState([]);
32507
+ const prevStatesRef = React110.useRef(/* @__PURE__ */ new Map());
32508
+ React110.useEffect(() => {
32482
32509
  for (const trait of traits2) {
32483
32510
  const prev = prevStatesRef.current.get(trait.id);
32484
32511
  if (prev && prev !== trait.currentState) {
@@ -32648,10 +32675,10 @@ function VerifyModePanel({
32648
32675
  serverCount,
32649
32676
  localCount
32650
32677
  }) {
32651
- const [expanded, setExpanded] = React109.useState(true);
32652
- const scrollRef = React109.useRef(null);
32653
- const prevCountRef = React109.useRef(0);
32654
- React109.useEffect(() => {
32678
+ const [expanded, setExpanded] = React110.useState(true);
32679
+ const scrollRef = React110.useRef(null);
32680
+ const prevCountRef = React110.useRef(0);
32681
+ React110.useEffect(() => {
32655
32682
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
32656
32683
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
32657
32684
  }
@@ -32717,10 +32744,10 @@ function RuntimeDebugger({
32717
32744
  defaultTab,
32718
32745
  schema
32719
32746
  }) {
32720
- const [isCollapsed, setIsCollapsed] = React109.useState(mode === "verify" ? true : defaultCollapsed);
32721
- const [isVisible, setIsVisible] = React109.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
32747
+ const [isCollapsed, setIsCollapsed] = React110.useState(mode === "verify" ? true : defaultCollapsed);
32748
+ const [isVisible, setIsVisible] = React110.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
32722
32749
  const debugData = useDebugData();
32723
- React109.useEffect(() => {
32750
+ React110.useEffect(() => {
32724
32751
  if (mode === "inline") return;
32725
32752
  return onDebugToggle((enabled) => {
32726
32753
  setIsVisible(enabled);
@@ -32729,7 +32756,7 @@ function RuntimeDebugger({
32729
32756
  }
32730
32757
  });
32731
32758
  }, [mode]);
32732
- React109.useEffect(() => {
32759
+ React110.useEffect(() => {
32733
32760
  if (mode === "inline") return;
32734
32761
  const handleKeyDown = (e) => {
32735
32762
  if (e.key === "`" && isVisible) {
@@ -33278,7 +33305,7 @@ function SequenceBar({
33278
33305
  onSlotRemove(index);
33279
33306
  }, [onSlotRemove, playing]);
33280
33307
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
33281
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
33308
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
33282
33309
  i > 0 && /* @__PURE__ */ jsx(
33283
33310
  Typography,
33284
33311
  {
@@ -34734,7 +34761,7 @@ var init_StatCard2 = __esm({
34734
34761
  const labelToUse = propLabel ?? propTitle;
34735
34762
  const eventBus = useEventBus();
34736
34763
  const { t } = useTranslate();
34737
- const handleActionClick = React109__default.useCallback(() => {
34764
+ const handleActionClick = React110__default.useCallback(() => {
34738
34765
  if (action?.event) {
34739
34766
  eventBus.emit(`UI:${action.event}`, {});
34740
34767
  }
@@ -34745,7 +34772,7 @@ var init_StatCard2 = __esm({
34745
34772
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
34746
34773
  const isLoading = externalLoading ?? false;
34747
34774
  const error = externalError;
34748
- const computeMetricValue = React109__default.useCallback(
34775
+ const computeMetricValue = React110__default.useCallback(
34749
34776
  (metric, items) => {
34750
34777
  if (metric.value !== void 0) {
34751
34778
  return metric.value;
@@ -34784,7 +34811,7 @@ var init_StatCard2 = __esm({
34784
34811
  },
34785
34812
  []
34786
34813
  );
34787
- const schemaStats = React109__default.useMemo(() => {
34814
+ const schemaStats = React110__default.useMemo(() => {
34788
34815
  if (!metrics || metrics.length === 0) return null;
34789
34816
  return metrics.map((metric) => ({
34790
34817
  label: metric.label,
@@ -34792,7 +34819,7 @@ var init_StatCard2 = __esm({
34792
34819
  format: metric.format
34793
34820
  }));
34794
34821
  }, [metrics, data, computeMetricValue]);
34795
- const calculatedTrend = React109__default.useMemo(() => {
34822
+ const calculatedTrend = React110__default.useMemo(() => {
34796
34823
  if (manualTrend !== void 0) return manualTrend;
34797
34824
  if (previousValue === void 0 || currentValue === void 0)
34798
34825
  return void 0;
@@ -35847,7 +35874,7 @@ var init_Timeline = __esm({
35847
35874
  }) => {
35848
35875
  const { t } = useTranslate();
35849
35876
  const entityData = Array.isArray(entity) ? entity : [];
35850
- const items = React109__default.useMemo(() => {
35877
+ const items = React110__default.useMemo(() => {
35851
35878
  if (propItems) return propItems;
35852
35879
  if (entityData.length === 0) return [];
35853
35880
  return entityData.map((record, idx) => {
@@ -36004,7 +36031,7 @@ var init_TimerDisplay = __esm({
36004
36031
  }
36005
36032
  });
36006
36033
  function extractToastProps(children) {
36007
- if (!React109__default.isValidElement(children)) {
36034
+ if (!React110__default.isValidElement(children)) {
36008
36035
  if (typeof children === "string") {
36009
36036
  return { message: children };
36010
36037
  }
@@ -36042,7 +36069,7 @@ var init_ToastSlot = __esm({
36042
36069
  eventBus.emit("UI:CLOSE");
36043
36070
  };
36044
36071
  if (!isVisible) return null;
36045
- const isCustomContent = React109__default.isValidElement(children) && !message;
36072
+ const isCustomContent = React110__default.isValidElement(children) && !message;
36046
36073
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
36047
36074
  Toast,
36048
36075
  {
@@ -36311,7 +36338,7 @@ var init_WizardContainer = __esm({
36311
36338
  const isCompleted = index < currentStep;
36312
36339
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36313
36340
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36314
- return /* @__PURE__ */ jsxs(React109__default.Fragment, { children: [
36341
+ return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
36315
36342
  /* @__PURE__ */ jsx(
36316
36343
  Button,
36317
36344
  {
@@ -36761,12 +36788,12 @@ var init_XPBar = __esm({
36761
36788
  }
36762
36789
  });
36763
36790
  function lazyThree(name, loader) {
36764
- const Lazy = React109__default.lazy(() => loader().then((m) => ({ default: m[name] })));
36791
+ const Lazy = React110__default.lazy(() => loader().then((m) => ({ default: m[name] })));
36765
36792
  function ThreeWrapper(props) {
36766
- return React109__default.createElement(
36767
- React109__default.Suspense,
36793
+ return React110__default.createElement(
36794
+ React110__default.Suspense,
36768
36795
  { fallback: null },
36769
- React109__default.createElement(Lazy, props)
36796
+ React110__default.createElement(Lazy, props)
36770
36797
  );
36771
36798
  }
36772
36799
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -37254,7 +37281,7 @@ function SuspenseConfigProvider({
37254
37281
  config,
37255
37282
  children
37256
37283
  }) {
37257
- return React109__default.createElement(
37284
+ return React110__default.createElement(
37258
37285
  SuspenseConfigContext.Provider,
37259
37286
  { value: config },
37260
37287
  children
@@ -37737,7 +37764,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37737
37764
  const key = `${parentId}-${index}-trait:${traitName}`;
37738
37765
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
37739
37766
  }
37740
- return /* @__PURE__ */ jsx(React109__default.Fragment, { children: child }, `${parentId}-${index}`);
37767
+ return /* @__PURE__ */ jsx(React110__default.Fragment, { children: child }, `${parentId}-${index}`);
37741
37768
  }
37742
37769
  if (!child || typeof child !== "object") return null;
37743
37770
  const childId = `${parentId}-${index}`;
@@ -37774,14 +37801,14 @@ function isPatternConfig(value) {
37774
37801
  if (value === null || value === void 0) return false;
37775
37802
  if (typeof value !== "object") return false;
37776
37803
  if (Array.isArray(value)) return false;
37777
- if (React109__default.isValidElement(value)) return false;
37804
+ if (React110__default.isValidElement(value)) return false;
37778
37805
  if (value instanceof Date) return false;
37779
37806
  if (typeof value === "function") return false;
37780
37807
  const record = value;
37781
37808
  return "type" in record && typeof record.type === "string";
37782
37809
  }
37783
37810
  function isPlainConfigObject(value) {
37784
- if (React109__default.isValidElement(value)) return false;
37811
+ if (React110__default.isValidElement(value)) return false;
37785
37812
  if (value instanceof Date) return false;
37786
37813
  const proto = Object.getPrototypeOf(value);
37787
37814
  return proto === Object.prototype || proto === null;
@@ -38224,7 +38251,7 @@ var FormSection = ({
38224
38251
  columns = 1,
38225
38252
  className
38226
38253
  }) => {
38227
- const [collapsed, setCollapsed] = React109__default.useState(defaultCollapsed);
38254
+ const [collapsed, setCollapsed] = React110__default.useState(defaultCollapsed);
38228
38255
  const { t } = useTranslate();
38229
38256
  const eventBus = useEventBus();
38230
38257
  const gridClass = {
@@ -38232,7 +38259,7 @@ var FormSection = ({
38232
38259
  2: "grid-cols-1 md:grid-cols-2",
38233
38260
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
38234
38261
  }[columns];
38235
- React109__default.useCallback(() => {
38262
+ React110__default.useCallback(() => {
38236
38263
  if (collapsible) {
38237
38264
  setCollapsed((prev) => !prev);
38238
38265
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });