@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,5 +1,5 @@
1
- import * as React105 from 'react';
2
- import React105__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
1
+ import * as React106 from 'react';
2
+ import React106__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
5
5
  import { clsx } from 'clsx';
@@ -729,7 +729,7 @@ var init_Box = __esm({
729
729
  fixed: "fixed",
730
730
  sticky: "sticky"
731
731
  };
732
- Box = React105__default.forwardRef(
732
+ Box = React106__default.forwardRef(
733
733
  ({
734
734
  padding,
735
735
  paddingX,
@@ -1428,7 +1428,7 @@ function resolveIconProp(value, sizeClass) {
1428
1428
  const IconComp = value;
1429
1429
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1430
1430
  }
1431
- if (React105__default.isValidElement(value)) {
1431
+ if (React106__default.isValidElement(value)) {
1432
1432
  return value;
1433
1433
  }
1434
1434
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -1504,7 +1504,7 @@ var init_Button = __esm({
1504
1504
  md: "h-4 w-4",
1505
1505
  lg: "h-5 w-5"
1506
1506
  };
1507
- Button = React105__default.forwardRef(
1507
+ Button = React106__default.forwardRef(
1508
1508
  ({
1509
1509
  className,
1510
1510
  variant = "primary",
@@ -1607,7 +1607,7 @@ var init_Badge = __esm({
1607
1607
  md: "px-2.5 py-1 text-sm",
1608
1608
  lg: "px-3 py-1.5 text-base"
1609
1609
  };
1610
- Badge = React105__default.forwardRef(
1610
+ Badge = React106__default.forwardRef(
1611
1611
  ({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
1612
1612
  const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
1613
1613
  const resolvedIcon = typeof icon === "string" ? (() => {
@@ -1767,7 +1767,7 @@ var Input;
1767
1767
  var init_Input = __esm({
1768
1768
  "components/atoms/Input.tsx"() {
1769
1769
  init_cn();
1770
- Input = React105__default.forwardRef(
1770
+ Input = React106__default.forwardRef(
1771
1771
  ({
1772
1772
  className,
1773
1773
  inputType,
@@ -1885,7 +1885,7 @@ var Label;
1885
1885
  var init_Label = __esm({
1886
1886
  "components/atoms/Label.tsx"() {
1887
1887
  init_cn();
1888
- Label = React105__default.forwardRef(
1888
+ Label = React106__default.forwardRef(
1889
1889
  ({ className, required, children, ...props }, ref) => {
1890
1890
  return /* @__PURE__ */ jsxs(
1891
1891
  "label",
@@ -1911,7 +1911,7 @@ var Textarea;
1911
1911
  var init_Textarea = __esm({
1912
1912
  "components/atoms/Textarea.tsx"() {
1913
1913
  init_cn();
1914
- Textarea = React105__default.forwardRef(
1914
+ Textarea = React106__default.forwardRef(
1915
1915
  ({ className, error, ...props }, ref) => {
1916
1916
  return /* @__PURE__ */ jsx(
1917
1917
  "textarea",
@@ -1940,7 +1940,7 @@ var Select;
1940
1940
  var init_Select = __esm({
1941
1941
  "components/atoms/Select.tsx"() {
1942
1942
  init_cn();
1943
- Select = React105__default.forwardRef(
1943
+ Select = React106__default.forwardRef(
1944
1944
  ({ className, options, placeholder, error, ...props }, ref) => {
1945
1945
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1946
1946
  /* @__PURE__ */ jsxs(
@@ -1982,7 +1982,7 @@ var Checkbox;
1982
1982
  var init_Checkbox = __esm({
1983
1983
  "components/atoms/Checkbox.tsx"() {
1984
1984
  init_cn();
1985
- Checkbox = React105__default.forwardRef(
1985
+ Checkbox = React106__default.forwardRef(
1986
1986
  ({ className, label, id, ...props }, ref) => {
1987
1987
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1988
1988
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
@@ -2064,7 +2064,7 @@ var init_Card = __esm({
2064
2064
  md: "shadow",
2065
2065
  lg: "shadow-lg"
2066
2066
  };
2067
- Card = React105__default.forwardRef(
2067
+ Card = React106__default.forwardRef(
2068
2068
  ({
2069
2069
  className,
2070
2070
  variant = "bordered",
@@ -2100,9 +2100,9 @@ var init_Card = __esm({
2100
2100
  }
2101
2101
  );
2102
2102
  Card.displayName = "Card";
2103
- CardHeader = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2103
+ CardHeader = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2104
2104
  CardHeader.displayName = "CardHeader";
2105
- CardTitle = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2105
+ CardTitle = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2106
2106
  "h3",
2107
2107
  {
2108
2108
  ref,
@@ -2115,11 +2115,11 @@ var init_Card = __esm({
2115
2115
  }
2116
2116
  ));
2117
2117
  CardTitle.displayName = "CardTitle";
2118
- CardContent = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2118
+ CardContent = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2119
2119
  CardContent.displayName = "CardContent";
2120
2120
  CardBody = CardContent;
2121
2121
  CardBody.displayName = "CardBody";
2122
- CardFooter = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2122
+ CardFooter = React106__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2123
2123
  "div",
2124
2124
  {
2125
2125
  ref,
@@ -2140,7 +2140,7 @@ var init_Spinner = __esm({
2140
2140
  md: "h-6 w-6",
2141
2141
  lg: "h-8 w-8"
2142
2142
  };
2143
- Spinner = React105__default.forwardRef(
2143
+ Spinner = React106__default.forwardRef(
2144
2144
  ({ className, size = "md", ...props }, ref) => {
2145
2145
  return /* @__PURE__ */ jsx(
2146
2146
  "div",
@@ -2588,7 +2588,7 @@ var Radio;
2588
2588
  var init_Radio = __esm({
2589
2589
  "components/atoms/Radio.tsx"() {
2590
2590
  init_cn();
2591
- Radio = React105__default.forwardRef(
2591
+ Radio = React106__default.forwardRef(
2592
2592
  ({
2593
2593
  label,
2594
2594
  helperText,
@@ -2699,7 +2699,7 @@ var init_Switch = __esm({
2699
2699
  "components/atoms/Switch.tsx"() {
2700
2700
  "use client";
2701
2701
  init_cn();
2702
- Switch = React105.forwardRef(
2702
+ Switch = React106.forwardRef(
2703
2703
  ({
2704
2704
  checked,
2705
2705
  defaultChecked = false,
@@ -2710,10 +2710,10 @@ var init_Switch = __esm({
2710
2710
  name,
2711
2711
  className
2712
2712
  }, ref) => {
2713
- const [isChecked, setIsChecked] = React105.useState(
2713
+ const [isChecked, setIsChecked] = React106.useState(
2714
2714
  checked !== void 0 ? checked : defaultChecked
2715
2715
  );
2716
- React105.useEffect(() => {
2716
+ React106.useEffect(() => {
2717
2717
  if (checked !== void 0) {
2718
2718
  setIsChecked(checked);
2719
2719
  }
@@ -3133,8 +3133,8 @@ var init_LawReferenceTooltip = __esm({
3133
3133
  position = "top",
3134
3134
  className
3135
3135
  }) => {
3136
- const [isVisible, setIsVisible] = React105__default.useState(false);
3137
- const timeoutRef = React105__default.useRef(null);
3136
+ const [isVisible, setIsVisible] = React106__default.useState(false);
3137
+ const timeoutRef = React106__default.useRef(null);
3138
3138
  const handleMouseEnter = () => {
3139
3139
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3140
3140
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -3143,7 +3143,7 @@ var init_LawReferenceTooltip = __esm({
3143
3143
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3144
3144
  setIsVisible(false);
3145
3145
  };
3146
- React105__default.useEffect(() => {
3146
+ React106__default.useEffect(() => {
3147
3147
  return () => {
3148
3148
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
3149
3149
  };
@@ -3353,7 +3353,7 @@ var init_StatusDot = __esm({
3353
3353
  md: "w-2.5 h-2.5",
3354
3354
  lg: "w-3 h-3"
3355
3355
  };
3356
- StatusDot = React105__default.forwardRef(
3356
+ StatusDot = React106__default.forwardRef(
3357
3357
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
3358
3358
  return /* @__PURE__ */ jsx(
3359
3359
  "span",
@@ -3406,7 +3406,7 @@ var init_TrendIndicator = __esm({
3406
3406
  down: TrendingDown,
3407
3407
  flat: ArrowRight
3408
3408
  };
3409
- TrendIndicator = React105__default.forwardRef(
3409
+ TrendIndicator = React106__default.forwardRef(
3410
3410
  ({
3411
3411
  className,
3412
3412
  value,
@@ -3473,7 +3473,7 @@ var init_RangeSlider = __esm({
3473
3473
  md: "w-4 h-4",
3474
3474
  lg: "w-5 h-5"
3475
3475
  };
3476
- RangeSlider = React105__default.forwardRef(
3476
+ RangeSlider = React106__default.forwardRef(
3477
3477
  ({
3478
3478
  className,
3479
3479
  min = 0,
@@ -4118,9 +4118,9 @@ function ScoreDisplay({
4118
4118
  ...rest
4119
4119
  }) {
4120
4120
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
4121
- const [displayValue, setDisplayValue] = React105.useState(resolvedValue);
4122
- const [isAnimating, setIsAnimating] = React105.useState(false);
4123
- React105.useEffect(() => {
4121
+ const [displayValue, setDisplayValue] = React106.useState(resolvedValue);
4122
+ const [isAnimating, setIsAnimating] = React106.useState(false);
4123
+ React106.useEffect(() => {
4124
4124
  if (!animated || displayValue === resolvedValue) {
4125
4125
  setDisplayValue(resolvedValue);
4126
4126
  return;
@@ -4190,9 +4190,9 @@ function ControlButton({
4190
4190
  className
4191
4191
  }) {
4192
4192
  const eventBus = useEventBus();
4193
- const [isPressed, setIsPressed] = React105.useState(false);
4193
+ const [isPressed, setIsPressed] = React106.useState(false);
4194
4194
  const actualPressed = pressed ?? isPressed;
4195
- const handlePointerDown = React105.useCallback(
4195
+ const handlePointerDown = React106.useCallback(
4196
4196
  (e) => {
4197
4197
  e.preventDefault();
4198
4198
  if (disabled) return;
@@ -4202,7 +4202,7 @@ function ControlButton({
4202
4202
  },
4203
4203
  [disabled, pressEvent, eventBus, onPress]
4204
4204
  );
4205
- const handlePointerUp = React105.useCallback(
4205
+ const handlePointerUp = React106.useCallback(
4206
4206
  (e) => {
4207
4207
  e.preventDefault();
4208
4208
  if (disabled) return;
@@ -4212,7 +4212,7 @@ function ControlButton({
4212
4212
  },
4213
4213
  [disabled, releaseEvent, eventBus, onRelease]
4214
4214
  );
4215
- const handlePointerLeave = React105.useCallback(
4215
+ const handlePointerLeave = React106.useCallback(
4216
4216
  (e) => {
4217
4217
  if (isPressed) {
4218
4218
  setIsPressed(false);
@@ -5110,9 +5110,9 @@ function MiniMap({
5110
5110
  viewportRect,
5111
5111
  className
5112
5112
  }) {
5113
- const canvasRef = React105.useRef(null);
5114
- const frameRef = React105.useRef(0);
5115
- React105.useEffect(() => {
5113
+ const canvasRef = React106.useRef(null);
5114
+ const frameRef = React106.useRef(0);
5115
+ React106.useEffect(() => {
5116
5116
  const canvas = canvasRef.current;
5117
5117
  if (!canvas) return;
5118
5118
  const ctx = canvas.getContext("2d");
@@ -5405,7 +5405,7 @@ var init_ErrorBoundary = __esm({
5405
5405
  "use client";
5406
5406
  init_cn();
5407
5407
  init_ErrorState();
5408
- ErrorBoundary = class extends React105__default.Component {
5408
+ ErrorBoundary = class extends React106__default.Component {
5409
5409
  constructor(props) {
5410
5410
  super(props);
5411
5411
  __publicField(this, "reset", () => {
@@ -6209,8 +6209,8 @@ var init_Tooltip = __esm({
6209
6209
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
6210
6210
  };
6211
6211
  }, []);
6212
- const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6213
- const trigger = React105__default.cloneElement(triggerElement, {
6212
+ const triggerElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6213
+ const trigger = React106__default.cloneElement(triggerElement, {
6214
6214
  ref: triggerRef,
6215
6215
  onMouseEnter: handleMouseEnter,
6216
6216
  onMouseLeave: handleMouseLeave,
@@ -6331,8 +6331,8 @@ var init_Popover = __esm({
6331
6331
  onMouseEnter: handleOpen,
6332
6332
  onMouseLeave: handleClose
6333
6333
  };
6334
- const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6335
- const triggerElement = React105__default.cloneElement(
6334
+ const childElement = React106__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
6335
+ const triggerElement = React106__default.cloneElement(
6336
6336
  childElement,
6337
6337
  {
6338
6338
  ref: triggerRef,
@@ -6449,8 +6449,8 @@ var init_Menu = __esm({
6449
6449
  "bottom-start": "top-full left-0 mt-2",
6450
6450
  "bottom-end": "top-full right-0 mt-2"
6451
6451
  };
6452
- const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
6453
- const triggerElement = React105__default.cloneElement(
6452
+ const triggerChild = React106__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
6453
+ const triggerElement = React106__default.cloneElement(
6454
6454
  triggerChild,
6455
6455
  {
6456
6456
  ref: triggerRef,
@@ -6969,7 +6969,7 @@ var init_MapView = __esm({
6969
6969
  shadowSize: [41, 41]
6970
6970
  });
6971
6971
  L.Marker.prototype.options.icon = defaultIcon;
6972
- const { useEffect: useEffect60, useRef: useRef59, useCallback: useCallback88, useState: useState80 } = React105__default;
6972
+ const { useEffect: useEffect60, useRef: useRef59, useCallback: useCallback88, useState: useState80 } = React106__default;
6973
6973
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
6974
6974
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
6975
6975
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -7200,7 +7200,7 @@ function InputPattern({
7200
7200
  fieldName
7201
7201
  }) {
7202
7202
  const { emit } = useEventBus();
7203
- const [localValue, setLocalValue] = React105__default.useState(value);
7203
+ const [localValue, setLocalValue] = React106__default.useState(value);
7204
7204
  const handleChange = (e) => {
7205
7205
  setLocalValue(e.target.value);
7206
7206
  if (onChange) {
@@ -7238,7 +7238,7 @@ function TextareaPattern({
7238
7238
  fieldName
7239
7239
  }) {
7240
7240
  const { emit } = useEventBus();
7241
- const [localValue, setLocalValue] = React105__default.useState(value);
7241
+ const [localValue, setLocalValue] = React106__default.useState(value);
7242
7242
  const handleChange = (e) => {
7243
7243
  setLocalValue(e.target.value);
7244
7244
  if (onChange) {
@@ -7270,7 +7270,7 @@ function SelectPattern({
7270
7270
  fieldName
7271
7271
  }) {
7272
7272
  const { emit } = useEventBus();
7273
- const [localValue, setLocalValue] = React105__default.useState(value);
7273
+ const [localValue, setLocalValue] = React106__default.useState(value);
7274
7274
  const handleChange = (e) => {
7275
7275
  setLocalValue(e.target.value);
7276
7276
  if (onChange) {
@@ -7299,7 +7299,7 @@ function CheckboxPattern({
7299
7299
  className
7300
7300
  }) {
7301
7301
  const { emit } = useEventBus();
7302
- const [localChecked, setLocalChecked] = React105__default.useState(checked);
7302
+ const [localChecked, setLocalChecked] = React106__default.useState(checked);
7303
7303
  const handleChange = (e) => {
7304
7304
  setLocalChecked(e.target.checked);
7305
7305
  if (onChange) {
@@ -7530,8 +7530,8 @@ function ActionButtons({
7530
7530
  disabled
7531
7531
  }) {
7532
7532
  const eventBus = useEventBus();
7533
- const [activeButtons, setActiveButtons] = React105.useState(/* @__PURE__ */ new Set());
7534
- const handlePress = React105.useCallback(
7533
+ const [activeButtons, setActiveButtons] = React106.useState(/* @__PURE__ */ new Set());
7534
+ const handlePress = React106.useCallback(
7535
7535
  (id) => {
7536
7536
  setActiveButtons((prev) => new Set(prev).add(id));
7537
7537
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -7539,7 +7539,7 @@ function ActionButtons({
7539
7539
  },
7540
7540
  [actionEvent, eventBus, onAction]
7541
7541
  );
7542
- const handleRelease = React105.useCallback(
7542
+ const handleRelease = React106.useCallback(
7543
7543
  (id) => {
7544
7544
  setActiveButtons((prev) => {
7545
7545
  const next = new Set(prev);
@@ -9562,7 +9562,7 @@ var init_MarkdownContent = __esm({
9562
9562
  init_Box();
9563
9563
  init_useTranslate();
9564
9564
  init_cn();
9565
- MarkdownContent = React105__default.memo(
9565
+ MarkdownContent = React106__default.memo(
9566
9566
  ({ content, direction, className }) => {
9567
9567
  const { t: _t } = useTranslate();
9568
9568
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -9779,7 +9779,7 @@ var init_CodeBlock = __esm({
9779
9779
  loloStyle = { ...dark, ...loloStyleOverrides };
9780
9780
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
9781
9781
  HIDDEN_LINE_NUMBERS = { display: "none" };
9782
- CodeBlock = React105__default.memo(
9782
+ CodeBlock = React106__default.memo(
9783
9783
  ({
9784
9784
  code: rawCode,
9785
9785
  language = "text",
@@ -11088,7 +11088,7 @@ var init_StateMachineView = __esm({
11088
11088
  style: { top: title ? 30 : 0 },
11089
11089
  children: [
11090
11090
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
11091
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
11091
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React106__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
11092
11092
  StateNode,
11093
11093
  {
11094
11094
  state,
@@ -16875,7 +16875,7 @@ function CraftingRecipe({
16875
16875
  className
16876
16876
  }) {
16877
16877
  const eventBus = useEventBus();
16878
- const handleCraft = React105.useCallback(() => {
16878
+ const handleCraft = React106.useCallback(() => {
16879
16879
  onCraft?.();
16880
16880
  if (craftEvent) {
16881
16881
  eventBus.emit(craftEvent, { output: output.label });
@@ -16892,7 +16892,7 @@ function CraftingRecipe({
16892
16892
  children: [
16893
16893
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
16894
16894
  const hasSufficient = ingredient.available >= ingredient.required;
16895
- return /* @__PURE__ */ jsxs(React105.Fragment, { children: [
16895
+ return /* @__PURE__ */ jsxs(React106.Fragment, { children: [
16896
16896
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
16897
16897
  ItemSlot,
16898
16898
  {
@@ -17186,8 +17186,8 @@ function DPad({
17186
17186
  }) {
17187
17187
  const eventBus = useEventBus();
17188
17188
  const sizes = sizeMap15[size];
17189
- const [activeDirections, setActiveDirections] = React105.useState(/* @__PURE__ */ new Set());
17190
- const handlePress = React105.useCallback(
17189
+ const [activeDirections, setActiveDirections] = React106.useState(/* @__PURE__ */ new Set());
17190
+ const handlePress = React106.useCallback(
17191
17191
  (direction) => {
17192
17192
  setActiveDirections((prev) => new Set(prev).add(direction));
17193
17193
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -17195,7 +17195,7 @@ function DPad({
17195
17195
  },
17196
17196
  [directionEvent, eventBus, onDirection]
17197
17197
  );
17198
- const handleRelease = React105.useCallback(
17198
+ const handleRelease = React106.useCallback(
17199
17199
  (direction) => {
17200
17200
  setActiveDirections((prev) => {
17201
17201
  const next = new Set(prev);
@@ -17327,6 +17327,19 @@ var init_useAuthContext = __esm({
17327
17327
  "hooks/useAuthContext.ts"() {
17328
17328
  }
17329
17329
  });
17330
+ var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
17331
+ var init_CurrentPagePathContext = __esm({
17332
+ "context/CurrentPagePathContext.tsx"() {
17333
+ "use client";
17334
+ CurrentPagePathContext = createContext(void 0);
17335
+ CurrentPagePathProvider = ({
17336
+ value,
17337
+ children
17338
+ }) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
17339
+ CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
17340
+ useCurrentPagePath = () => useContext(CurrentPagePathContext);
17341
+ }
17342
+ });
17330
17343
  var DashboardLayout, NavLink;
17331
17344
  var init_DashboardLayout = __esm({
17332
17345
  "components/templates/DashboardLayout.tsx"() {
@@ -17340,6 +17353,7 @@ var init_DashboardLayout = __esm({
17340
17353
  init_useAuthContext();
17341
17354
  init_useEventBus();
17342
17355
  init_useTranslate();
17356
+ init_CurrentPagePathContext();
17343
17357
  DashboardLayout = ({
17344
17358
  appName = "{{APP_TITLE}}",
17345
17359
  logo,
@@ -17356,6 +17370,7 @@ var init_DashboardLayout = __esm({
17356
17370
  showThemeToggle = true,
17357
17371
  sidebarFooter,
17358
17372
  onSignOut: onSignOutProp,
17373
+ currentPath,
17359
17374
  children
17360
17375
  }) => {
17361
17376
  const eventBus = useEventBus();
@@ -17376,259 +17391,271 @@ var init_DashboardLayout = __esm({
17376
17391
  const [sidebarOpen, setSidebarOpen] = useState(false);
17377
17392
  const [userMenuOpen, setUserMenuOpen] = useState(false);
17378
17393
  const location = useLocation();
17394
+ const ctxPagePath = useCurrentPagePath();
17395
+ const activePath = currentPath ?? ctxPagePath ?? location.pathname;
17379
17396
  const { signOut: authSignOut } = useAuthContext();
17380
17397
  const user = userProp || (null);
17381
17398
  const { t } = useTranslate();
17382
17399
  const handleSignOut = onSignOutProp || authSignOut;
17383
- return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
17384
- sidebarOpen && /* @__PURE__ */ jsx(
17385
- Box,
17386
- {
17387
- className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
17388
- onClick: () => setSidebarOpen(false)
17389
- }
17390
- ),
17391
- /* @__PURE__ */ jsxs(
17392
- Box,
17393
- {
17394
- as: "aside",
17395
- className: cn(
17396
- "fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
17397
- "transform transition-transform duration-200 ease-in-out lg:translate-x-0",
17398
- sidebarOpen ? "translate-x-0" : "-translate-x-full"
17400
+ return /* @__PURE__ */ jsxs(
17401
+ HStack,
17402
+ {
17403
+ gap: "none",
17404
+ className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
17405
+ children: [
17406
+ sidebarOpen && /* @__PURE__ */ jsx(
17407
+ Box,
17408
+ {
17409
+ className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
17410
+ onClick: () => setSidebarOpen(false)
17411
+ }
17399
17412
  ),
17400
- children: [
17401
- /* @__PURE__ */ jsxs(
17402
- HStack,
17403
- {
17404
- align: "center",
17405
- justify: "between",
17406
- className: "h-16 px-4 border-b border-border dark:border-border",
17407
- children: [
17408
- /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
17409
- logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
17410
- Typography,
17411
- {
17412
- variant: "small",
17413
- className: "text-white font-bold text-sm",
17414
- as: "span",
17415
- children: appName.charAt(0).toUpperCase()
17416
- }
17417
- ) }),
17418
- /* @__PURE__ */ jsx(
17419
- Typography,
17420
- {
17421
- variant: "label",
17422
- className: "font-semibold text-foreground dark:text-foreground",
17423
- as: "span",
17424
- children: appName
17425
- }
17426
- )
17427
- ] }),
17428
- /* @__PURE__ */ jsx(
17429
- Button,
17430
- {
17431
- variant: "ghost",
17432
- className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
17433
- onClick: () => setSidebarOpen(false),
17434
- children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
17435
- }
17436
- )
17437
- ]
17438
- }
17439
- ),
17440
- /* @__PURE__ */ jsx(
17441
- VStack,
17442
- {
17443
- as: "nav",
17444
- gap: "none",
17445
- className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
17446
- children: navItems.map((item) => /* @__PURE__ */ jsx(
17447
- NavLink,
17413
+ /* @__PURE__ */ jsxs(
17414
+ Box,
17415
+ {
17416
+ as: "aside",
17417
+ className: cn(
17418
+ "z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
17419
+ "fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
17420
+ "transform transition-transform duration-200 ease-in-out",
17421
+ "flex flex-col",
17422
+ sidebarOpen ? "translate-x-0" : "-translate-x-full"
17423
+ ),
17424
+ children: [
17425
+ /* @__PURE__ */ jsxs(
17426
+ HStack,
17448
17427
  {
17449
- item,
17450
- currentPath: location.pathname
17451
- },
17452
- item.href
17453
- ))
17454
- }
17455
- ),
17456
- sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
17457
- ]
17458
- }
17459
- ),
17460
- /* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
17461
- /* @__PURE__ */ jsx(
17462
- Box,
17463
- {
17464
- as: "header",
17465
- className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
17466
- children: /* @__PURE__ */ jsxs(
17467
- HStack,
17468
- {
17469
- align: "center",
17470
- justify: "between",
17471
- className: "h-full px-4 gap-4",
17472
- children: [
17473
- /* @__PURE__ */ jsx(
17474
- Button,
17475
- {
17476
- variant: "ghost",
17477
- 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",
17478
- onClick: () => setSidebarOpen(true),
17479
- "aria-label": "Open sidebar",
17480
- children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
17481
- }
17482
- ),
17483
- searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17484
- /* @__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" }),
17485
- /* @__PURE__ */ jsx(
17486
- Input,
17487
- {
17488
- type: "search",
17489
- placeholder: t("common.search"),
17490
- className: "pl-10 w-full",
17491
- onKeyDown: (e) => {
17492
- if (e.key === "Enter") {
17493
- handleSearchSubmit(e.target.value);
17428
+ align: "center",
17429
+ justify: "between",
17430
+ className: "h-16 px-4 border-b border-border dark:border-border",
17431
+ children: [
17432
+ /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
17433
+ logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
17434
+ Typography,
17435
+ {
17436
+ variant: "small",
17437
+ className: "text-white font-bold text-sm",
17438
+ as: "span",
17439
+ children: appName.charAt(0).toUpperCase()
17494
17440
  }
17441
+ ) }),
17442
+ /* @__PURE__ */ jsx(
17443
+ Typography,
17444
+ {
17445
+ variant: "label",
17446
+ className: "font-semibold text-foreground dark:text-foreground",
17447
+ as: "span",
17448
+ children: appName
17449
+ }
17450
+ )
17451
+ ] }),
17452
+ /* @__PURE__ */ jsx(
17453
+ Button,
17454
+ {
17455
+ variant: "ghost",
17456
+ className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
17457
+ onClick: () => setSidebarOpen(false),
17458
+ children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
17495
17459
  }
17496
- }
17497
- )
17498
- ] }) }),
17499
- /* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
17500
- headerActions,
17501
- showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
17502
- topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
17503
- Button,
17460
+ )
17461
+ ]
17462
+ }
17463
+ ),
17464
+ /* @__PURE__ */ jsx(
17465
+ VStack,
17466
+ {
17467
+ as: "nav",
17468
+ gap: "none",
17469
+ className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
17470
+ children: navItems.map((item) => /* @__PURE__ */ jsx(
17471
+ NavLink,
17504
17472
  {
17505
- variant: "ghost",
17506
- className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17507
- onClick: () => handleTopBarActionClick(action.event),
17508
- "aria-label": action.label ?? action.icon,
17509
- children: [
17510
- /* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17511
- action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
17512
- Box,
17513
- {
17514
- as: "span",
17515
- className: cn(
17516
- "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",
17517
- action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
17518
- ),
17519
- children: action.badge
17520
- }
17521
- )
17522
- ]
17473
+ item,
17474
+ currentPath: activePath
17523
17475
  },
17524
- `${action.event}-${idx}`
17525
- )),
17526
- notificationsEnabled && /* @__PURE__ */ jsxs(
17527
- Button,
17528
- {
17529
- variant: "ghost",
17530
- className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17531
- onClick: handleNotificationClick,
17532
- "aria-label": t("common.notifications"),
17533
- children: [
17534
- /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17535
- unreadCount > 0 && /* @__PURE__ */ jsx(
17536
- Box,
17537
- {
17538
- as: "span",
17539
- 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",
17540
- children: unreadCount > 99 ? "99+" : unreadCount
17541
- }
17542
- )
17543
- ]
17544
- }
17545
- ),
17546
- user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17547
- /* @__PURE__ */ jsxs(
17476
+ item.href
17477
+ ))
17478
+ }
17479
+ ),
17480
+ sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
17481
+ ]
17482
+ }
17483
+ ),
17484
+ /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0 min-h-screen", children: [
17485
+ /* @__PURE__ */ jsx(
17486
+ Box,
17487
+ {
17488
+ as: "header",
17489
+ className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
17490
+ children: /* @__PURE__ */ jsxs(
17491
+ HStack,
17492
+ {
17493
+ align: "center",
17494
+ justify: "between",
17495
+ className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
17496
+ children: [
17497
+ /* @__PURE__ */ jsx(
17548
17498
  Button,
17549
17499
  {
17550
17500
  variant: "ghost",
17551
- className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
17552
- onClick: () => setUserMenuOpen(!userMenuOpen),
17553
- children: [
17554
- /* @__PURE__ */ jsx(
17555
- Avatar,
17556
- {
17557
- src: user.avatar,
17558
- alt: user.name,
17559
- initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
17560
- size: "sm"
17561
- }
17562
- ),
17563
- /* @__PURE__ */ jsx(
17564
- Typography,
17565
- {
17566
- variant: "small",
17567
- className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
17568
- as: "span",
17569
- children: user.name
17570
- }
17571
- ),
17572
- /* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
17573
- ]
17501
+ 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",
17502
+ onClick: () => setSidebarOpen(true),
17503
+ "aria-label": "Open sidebar",
17504
+ children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
17574
17505
  }
17575
17506
  ),
17576
- userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
17507
+ searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17508
+ /* @__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" }),
17577
17509
  /* @__PURE__ */ jsx(
17578
- Box,
17510
+ Input,
17511
+ {
17512
+ type: "search",
17513
+ placeholder: t("common.search"),
17514
+ className: "pl-10 w-full",
17515
+ onKeyDown: (e) => {
17516
+ if (e.key === "Enter") {
17517
+ handleSearchSubmit(e.target.value);
17518
+ }
17519
+ }
17520
+ }
17521
+ )
17522
+ ] }) }),
17523
+ !searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
17524
+ /* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
17525
+ headerActions,
17526
+ showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
17527
+ topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
17528
+ Button,
17529
+ {
17530
+ variant: "ghost",
17531
+ className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17532
+ onClick: () => handleTopBarActionClick(action.event),
17533
+ "aria-label": action.label ?? action.icon,
17534
+ children: [
17535
+ /* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17536
+ action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
17537
+ Box,
17538
+ {
17539
+ as: "span",
17540
+ className: cn(
17541
+ "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",
17542
+ action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
17543
+ ),
17544
+ children: action.badge
17545
+ }
17546
+ )
17547
+ ]
17548
+ },
17549
+ `${action.event}-${idx}`
17550
+ )),
17551
+ notificationsEnabled && /* @__PURE__ */ jsxs(
17552
+ Button,
17579
17553
  {
17580
- className: "fixed inset-0 z-20",
17581
- onClick: () => setUserMenuOpen(false)
17554
+ variant: "ghost",
17555
+ className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
17556
+ onClick: handleNotificationClick,
17557
+ "aria-label": t("common.notifications"),
17558
+ children: [
17559
+ /* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
17560
+ unreadCount > 0 && /* @__PURE__ */ jsx(
17561
+ Box,
17562
+ {
17563
+ as: "span",
17564
+ 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",
17565
+ children: unreadCount > 99 ? "99+" : unreadCount
17566
+ }
17567
+ )
17568
+ ]
17582
17569
  }
17583
17570
  ),
17584
- /* @__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: [
17585
- /* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
17586
- /* @__PURE__ */ jsx(
17587
- Typography,
17588
- {
17589
- variant: "small",
17590
- className: "text-sm font-medium text-foreground dark:text-foreground",
17591
- as: "p",
17592
- children: user.name
17593
- }
17594
- ),
17595
- /* @__PURE__ */ jsx(
17596
- Typography,
17597
- {
17598
- variant: "caption",
17599
- className: "text-xs text-muted-foreground dark:text-muted-foreground",
17600
- as: "p",
17601
- children: user.email
17602
- }
17603
- )
17604
- ] }),
17571
+ user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
17605
17572
  /* @__PURE__ */ jsxs(
17606
17573
  Button,
17607
17574
  {
17608
17575
  variant: "ghost",
17609
- onClick: () => {
17610
- setUserMenuOpen(false);
17611
- handleSignOut?.();
17612
- },
17613
- 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",
17576
+ className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
17577
+ onClick: () => setUserMenuOpen(!userMenuOpen),
17614
17578
  children: [
17615
- /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
17616
- t("auth.signOut")
17579
+ /* @__PURE__ */ jsx(
17580
+ Avatar,
17581
+ {
17582
+ src: user.avatar,
17583
+ alt: user.name,
17584
+ initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
17585
+ size: "sm"
17586
+ }
17587
+ ),
17588
+ /* @__PURE__ */ jsx(
17589
+ Typography,
17590
+ {
17591
+ variant: "small",
17592
+ className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
17593
+ as: "span",
17594
+ children: user.name
17595
+ }
17596
+ ),
17597
+ /* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
17617
17598
  ]
17618
17599
  }
17619
- )
17600
+ ),
17601
+ userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
17602
+ /* @__PURE__ */ jsx(
17603
+ Box,
17604
+ {
17605
+ className: "fixed inset-0 z-20",
17606
+ onClick: () => setUserMenuOpen(false)
17607
+ }
17608
+ ),
17609
+ /* @__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: [
17610
+ /* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
17611
+ /* @__PURE__ */ jsx(
17612
+ Typography,
17613
+ {
17614
+ variant: "small",
17615
+ className: "text-sm font-medium text-foreground dark:text-foreground",
17616
+ as: "p",
17617
+ children: user.name
17618
+ }
17619
+ ),
17620
+ /* @__PURE__ */ jsx(
17621
+ Typography,
17622
+ {
17623
+ variant: "caption",
17624
+ className: "text-xs text-muted-foreground dark:text-muted-foreground",
17625
+ as: "p",
17626
+ children: user.email
17627
+ }
17628
+ )
17629
+ ] }),
17630
+ /* @__PURE__ */ jsxs(
17631
+ Button,
17632
+ {
17633
+ variant: "ghost",
17634
+ onClick: () => {
17635
+ setUserMenuOpen(false);
17636
+ handleSignOut?.();
17637
+ },
17638
+ 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",
17639
+ children: [
17640
+ /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
17641
+ t("auth.signOut")
17642
+ ]
17643
+ }
17644
+ )
17645
+ ] })
17646
+ ] })
17620
17647
  ] })
17621
17648
  ] })
17622
- ] })
17623
- ] })
17624
- ]
17649
+ ]
17650
+ }
17651
+ )
17625
17652
  }
17626
- )
17627
- }
17628
- ),
17629
- /* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
17630
- ] })
17631
- ] });
17653
+ ),
17654
+ /* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
17655
+ ] })
17656
+ ]
17657
+ }
17658
+ );
17632
17659
  };
17633
17660
  DashboardLayout.displayName = "DashboardLayout";
17634
17661
  NavLink = ({
@@ -18122,13 +18149,13 @@ function DataList({
18122
18149
  }) {
18123
18150
  const eventBus = useEventBus();
18124
18151
  const { t } = useTranslate();
18125
- const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
18152
+ const [visibleCount, setVisibleCount] = React106__default.useState(pageSize || Infinity);
18126
18153
  const fieldDefs = fields ?? columns ?? [];
18127
18154
  const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
18128
18155
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
18129
18156
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
18130
18157
  const hasRenderProp = typeof children === "function";
18131
- React105__default.useEffect(() => {
18158
+ React106__default.useEffect(() => {
18132
18159
  const renderItemTypeOf = typeof schemaRenderItem;
18133
18160
  const childrenTypeOf = typeof children;
18134
18161
  if (data.length > 0 && !hasRenderProp) {
@@ -18184,7 +18211,7 @@ function DataList({
18184
18211
  const items2 = data.map((item) => item);
18185
18212
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
18186
18213
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
18187
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
18214
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
18188
18215
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
18189
18216
  group.items.map((itemData, index) => {
18190
18217
  const id = itemData.id || `${gi}-${index}`;
@@ -18375,7 +18402,7 @@ function DataList({
18375
18402
  className
18376
18403
  ),
18377
18404
  children: [
18378
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
18405
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
18379
18406
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
18380
18407
  group.items.map(
18381
18408
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -19522,7 +19549,7 @@ var init_WizardProgress = __esm({
19522
19549
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
19523
19550
  const isActive = index === currentStep;
19524
19551
  const isCompleted = index < currentStep;
19525
- return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
19552
+ return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
19526
19553
  /* @__PURE__ */ jsx(
19527
19554
  "button",
19528
19555
  {
@@ -20433,7 +20460,7 @@ function InventoryGrid({
20433
20460
  const eventBus = useEventBus();
20434
20461
  const slotCount = totalSlots ?? items.length;
20435
20462
  const emptySlotCount = Math.max(0, slotCount - items.length);
20436
- const handleSelect = React105.useCallback(
20463
+ const handleSelect = React106.useCallback(
20437
20464
  (id) => {
20438
20465
  onSelect?.(id);
20439
20466
  if (selectEvent) {
@@ -20646,15 +20673,15 @@ function GameCanvas2D({
20646
20673
  fps = 60,
20647
20674
  className
20648
20675
  }) {
20649
- const canvasRef = React105.useRef(null);
20650
- const rafRef = React105.useRef(0);
20651
- const frameRef = React105.useRef(0);
20652
- const lastTimeRef = React105.useRef(0);
20653
- const onDrawRef = React105.useRef(onDraw);
20676
+ const canvasRef = React106.useRef(null);
20677
+ const rafRef = React106.useRef(0);
20678
+ const frameRef = React106.useRef(0);
20679
+ const lastTimeRef = React106.useRef(0);
20680
+ const onDrawRef = React106.useRef(onDraw);
20654
20681
  onDrawRef.current = onDraw;
20655
- const onTickRef = React105.useRef(onTick);
20682
+ const onTickRef = React106.useRef(onTick);
20656
20683
  onTickRef.current = onTick;
20657
- React105.useEffect(() => {
20684
+ React106.useEffect(() => {
20658
20685
  const canvas = canvasRef.current;
20659
20686
  if (!canvas) return;
20660
20687
  const ctx = canvas.getContext("2d");
@@ -20943,7 +20970,7 @@ function TurnPanel({
20943
20970
  className
20944
20971
  }) {
20945
20972
  const eventBus = useEventBus();
20946
- const handleAction = React105.useCallback(
20973
+ const handleAction = React106.useCallback(
20947
20974
  (event) => {
20948
20975
  if (event) {
20949
20976
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -21089,7 +21116,7 @@ function UnitCommandBar({
21089
21116
  className
21090
21117
  }) {
21091
21118
  const eventBus = useEventBus();
21092
- const handleCommand = React105.useCallback(
21119
+ const handleCommand = React106.useCallback(
21093
21120
  (event) => {
21094
21121
  if (event) {
21095
21122
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -21574,7 +21601,7 @@ function GameMenu({
21574
21601
  } catch {
21575
21602
  }
21576
21603
  const eventBus = eventBusProp || eventBusFromHook;
21577
- const handleOptionClick = React105.useCallback(
21604
+ const handleOptionClick = React106.useCallback(
21578
21605
  (option) => {
21579
21606
  if (option.event && eventBus) {
21580
21607
  eventBus.emit(`UI:${option.event}`, { option });
@@ -21688,7 +21715,7 @@ function GameOverScreen({
21688
21715
  } catch {
21689
21716
  }
21690
21717
  const eventBus = eventBusProp || eventBusFromHook;
21691
- const handleActionClick = React105.useCallback(
21718
+ const handleActionClick = React106.useCallback(
21692
21719
  (action) => {
21693
21720
  if (action.event && eventBus) {
21694
21721
  eventBus.emit(`UI:${action.event}`, { action });
@@ -25177,7 +25204,7 @@ var init_DocumentViewer = __esm({
25177
25204
  }
25178
25205
  });
25179
25206
  function extractTitle(children) {
25180
- if (!React105__default.isValidElement(children)) return void 0;
25207
+ if (!React106__default.isValidElement(children)) return void 0;
25181
25208
  const props = children.props;
25182
25209
  if (typeof props.title === "string") {
25183
25210
  return props.title;
@@ -25232,7 +25259,7 @@ function LinearView({
25232
25259
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
25233
25260
  const isDone = i < currentIdx;
25234
25261
  const isCurrent = i === currentIdx;
25235
- return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
25262
+ return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
25236
25263
  i > 0 && /* @__PURE__ */ jsx(
25237
25264
  Typography,
25238
25265
  {
@@ -26016,12 +26043,12 @@ var init_Form = __esm({
26016
26043
  const isSchemaEntity = isOrbitalEntitySchema(entity);
26017
26044
  const resolvedEntity = isSchemaEntity ? entity : void 0;
26018
26045
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
26019
- const normalizedInitialData = React105__default.useMemo(() => {
26046
+ const normalizedInitialData = React106__default.useMemo(() => {
26020
26047
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
26021
26048
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
26022
26049
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
26023
26050
  }, [entity, initialData]);
26024
- const entityDerivedFields = React105__default.useMemo(() => {
26051
+ const entityDerivedFields = React106__default.useMemo(() => {
26025
26052
  if (fields && fields.length > 0) return void 0;
26026
26053
  if (!resolvedEntity) return void 0;
26027
26054
  return resolvedEntity.fields.map(
@@ -26040,16 +26067,16 @@ var init_Form = __esm({
26040
26067
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
26041
26068
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
26042
26069
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
26043
- const [formData, setFormData] = React105__default.useState(
26070
+ const [formData, setFormData] = React106__default.useState(
26044
26071
  normalizedInitialData
26045
26072
  );
26046
- const [collapsedSections, setCollapsedSections] = React105__default.useState(
26073
+ const [collapsedSections, setCollapsedSections] = React106__default.useState(
26047
26074
  /* @__PURE__ */ new Set()
26048
26075
  );
26049
- const [submitError, setSubmitError] = React105__default.useState(null);
26050
- const formRef = React105__default.useRef(null);
26076
+ const [submitError, setSubmitError] = React106__default.useState(null);
26077
+ const formRef = React106__default.useRef(null);
26051
26078
  const formMode = props.mode;
26052
- const mountedRef = React105__default.useRef(false);
26079
+ const mountedRef = React106__default.useRef(false);
26053
26080
  if (!mountedRef.current) {
26054
26081
  mountedRef.current = true;
26055
26082
  debug("forms", "mount", {
@@ -26062,7 +26089,7 @@ var init_Form = __esm({
26062
26089
  });
26063
26090
  }
26064
26091
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
26065
- const evalContext = React105__default.useMemo(
26092
+ const evalContext = React106__default.useMemo(
26066
26093
  () => ({
26067
26094
  formValues: formData,
26068
26095
  globalVariables: externalContext?.globalVariables ?? {},
@@ -26071,7 +26098,7 @@ var init_Form = __esm({
26071
26098
  }),
26072
26099
  [formData, externalContext]
26073
26100
  );
26074
- React105__default.useEffect(() => {
26101
+ React106__default.useEffect(() => {
26075
26102
  debug("forms", "initialData-sync", {
26076
26103
  mode: formMode,
26077
26104
  normalizedInitialData,
@@ -26082,7 +26109,7 @@ var init_Form = __esm({
26082
26109
  setFormData(normalizedInitialData);
26083
26110
  }
26084
26111
  }, [normalizedInitialData]);
26085
- const processCalculations = React105__default.useCallback(
26112
+ const processCalculations = React106__default.useCallback(
26086
26113
  (changedFieldId, newFormData) => {
26087
26114
  if (!hiddenCalculations.length) return;
26088
26115
  const context = {
@@ -26107,7 +26134,7 @@ var init_Form = __esm({
26107
26134
  },
26108
26135
  [hiddenCalculations, externalContext, eventBus]
26109
26136
  );
26110
- const checkViolations = React105__default.useCallback(
26137
+ const checkViolations = React106__default.useCallback(
26111
26138
  (changedFieldId, newFormData) => {
26112
26139
  if (!violationTriggers.length) return;
26113
26140
  const context = {
@@ -26145,7 +26172,7 @@ var init_Form = __esm({
26145
26172
  processCalculations(name, newFormData);
26146
26173
  checkViolations(name, newFormData);
26147
26174
  };
26148
- const isFieldVisible = React105__default.useCallback(
26175
+ const isFieldVisible = React106__default.useCallback(
26149
26176
  (fieldName) => {
26150
26177
  const condition = conditionalFields[fieldName];
26151
26178
  if (!condition) return true;
@@ -26153,7 +26180,7 @@ var init_Form = __esm({
26153
26180
  },
26154
26181
  [conditionalFields, evalContext]
26155
26182
  );
26156
- const isSectionVisible = React105__default.useCallback(
26183
+ const isSectionVisible = React106__default.useCallback(
26157
26184
  (section) => {
26158
26185
  if (!section.condition) return true;
26159
26186
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -26229,7 +26256,7 @@ var init_Form = __esm({
26229
26256
  eventBus.emit(`UI:${onCancel}`);
26230
26257
  }
26231
26258
  };
26232
- const renderField = React105__default.useCallback(
26259
+ const renderField = React106__default.useCallback(
26233
26260
  (field) => {
26234
26261
  const fieldName = field.name || field.field;
26235
26262
  if (!fieldName) return null;
@@ -26250,7 +26277,7 @@ var init_Form = __esm({
26250
26277
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
26251
26278
  );
26252
26279
  const effectiveFields = entityDerivedFields ?? fields;
26253
- const normalizedFields = React105__default.useMemo(() => {
26280
+ const normalizedFields = React106__default.useMemo(() => {
26254
26281
  if (!effectiveFields || effectiveFields.length === 0) return [];
26255
26282
  return effectiveFields.map((field) => {
26256
26283
  if (typeof field === "string") {
@@ -26272,7 +26299,7 @@ var init_Form = __esm({
26272
26299
  return field;
26273
26300
  });
26274
26301
  }, [effectiveFields, resolvedEntity]);
26275
- const schemaFields = React105__default.useMemo(() => {
26302
+ const schemaFields = React106__default.useMemo(() => {
26276
26303
  if (normalizedFields.length === 0) return null;
26277
26304
  if (isDebugEnabled()) {
26278
26305
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -26282,7 +26309,7 @@ var init_Form = __esm({
26282
26309
  }
26283
26310
  return normalizedFields.map(renderField).filter(Boolean);
26284
26311
  }, [normalizedFields, renderField, entityName, conditionalFields]);
26285
- const sectionElements = React105__default.useMemo(() => {
26312
+ const sectionElements = React106__default.useMemo(() => {
26286
26313
  if (!sections || sections.length === 0) return null;
26287
26314
  return sections.map((section) => {
26288
26315
  if (!isSectionVisible(section)) {
@@ -27814,7 +27841,7 @@ var init_List = __esm({
27814
27841
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
27815
27842
  return [];
27816
27843
  }, [entity]);
27817
- const getItemActions = React105__default.useCallback(
27844
+ const getItemActions = React106__default.useCallback(
27818
27845
  (item) => {
27819
27846
  if (!itemActions) return [];
27820
27847
  if (typeof itemActions === "function") {
@@ -28251,7 +28278,7 @@ var init_MediaGallery = __esm({
28251
28278
  [selectable, selectedItems, selectionEvent, eventBus]
28252
28279
  );
28253
28280
  const entityData = Array.isArray(entity) ? entity : [];
28254
- const items = React105__default.useMemo(() => {
28281
+ const items = React106__default.useMemo(() => {
28255
28282
  if (propItems) return propItems;
28256
28283
  if (entityData.length === 0) return [];
28257
28284
  return entityData.map((record, idx) => ({
@@ -28415,7 +28442,7 @@ var init_MediaGallery = __esm({
28415
28442
  }
28416
28443
  });
28417
28444
  function extractTitle2(children) {
28418
- if (!React105__default.isValidElement(children)) return void 0;
28445
+ if (!React106__default.isValidElement(children)) return void 0;
28419
28446
  const props = children.props;
28420
28447
  if (typeof props.title === "string") {
28421
28448
  return props.title;
@@ -29128,7 +29155,7 @@ var init_PageHeader = __esm({
29128
29155
  info: "bg-info/10 text-info"
29129
29156
  };
29130
29157
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
29131
- 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(React105__default.Fragment, { children: [
29158
+ 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(React106__default.Fragment, { children: [
29132
29159
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
29133
29160
  crumb.href ? /* @__PURE__ */ jsx(
29134
29161
  "a",
@@ -29302,7 +29329,7 @@ var init_debugRegistry = __esm({
29302
29329
  }
29303
29330
  });
29304
29331
  function useDebugData() {
29305
- const [data, setData] = React105.useState(() => ({
29332
+ const [data, setData] = React106.useState(() => ({
29306
29333
  traits: [],
29307
29334
  ticks: [],
29308
29335
  guards: [],
@@ -29316,7 +29343,7 @@ function useDebugData() {
29316
29343
  },
29317
29344
  lastUpdate: Date.now()
29318
29345
  }));
29319
- React105.useEffect(() => {
29346
+ React106.useEffect(() => {
29320
29347
  const updateData = () => {
29321
29348
  setData({
29322
29349
  traits: getAllTraits(),
@@ -29425,12 +29452,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
29425
29452
  return positions;
29426
29453
  }
29427
29454
  function WalkMinimap() {
29428
- const [walkStep, setWalkStep] = React105.useState(null);
29429
- const [traits2, setTraits] = React105.useState([]);
29430
- const [coveredEdges, setCoveredEdges] = React105.useState([]);
29431
- const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
29432
- const prevTraitRef = React105.useRef(null);
29433
- React105.useEffect(() => {
29455
+ const [walkStep, setWalkStep] = React106.useState(null);
29456
+ const [traits2, setTraits] = React106.useState([]);
29457
+ const [coveredEdges, setCoveredEdges] = React106.useState([]);
29458
+ const [completedTraits, setCompletedTraits] = React106.useState(/* @__PURE__ */ new Set());
29459
+ const prevTraitRef = React106.useRef(null);
29460
+ React106.useEffect(() => {
29434
29461
  const interval = setInterval(() => {
29435
29462
  const w = window;
29436
29463
  const step = w.__orbitalWalkStep;
@@ -29877,15 +29904,15 @@ var init_EntitiesTab = __esm({
29877
29904
  }
29878
29905
  });
29879
29906
  function EventFlowTab({ events: events2 }) {
29880
- const [filter, setFilter] = React105.useState("all");
29881
- const containerRef = React105.useRef(null);
29882
- const [autoScroll, setAutoScroll] = React105.useState(true);
29883
- React105.useEffect(() => {
29907
+ const [filter, setFilter] = React106.useState("all");
29908
+ const containerRef = React106.useRef(null);
29909
+ const [autoScroll, setAutoScroll] = React106.useState(true);
29910
+ React106.useEffect(() => {
29884
29911
  if (autoScroll && containerRef.current) {
29885
29912
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
29886
29913
  }
29887
29914
  }, [events2.length, autoScroll]);
29888
- const filteredEvents = React105.useMemo(() => {
29915
+ const filteredEvents = React106.useMemo(() => {
29889
29916
  if (filter === "all") return events2;
29890
29917
  return events2.filter((e) => e.type === filter);
29891
29918
  }, [events2, filter]);
@@ -30004,7 +30031,7 @@ var init_EventFlowTab = __esm({
30004
30031
  }
30005
30032
  });
30006
30033
  function GuardsPanel({ guards }) {
30007
- const [filter, setFilter] = React105.useState("all");
30034
+ const [filter, setFilter] = React106.useState("all");
30008
30035
  if (guards.length === 0) {
30009
30036
  return /* @__PURE__ */ jsx(
30010
30037
  EmptyState,
@@ -30017,7 +30044,7 @@ function GuardsPanel({ guards }) {
30017
30044
  }
30018
30045
  const passedCount = guards.filter((g) => g.result).length;
30019
30046
  const failedCount = guards.length - passedCount;
30020
- const filteredGuards = React105.useMemo(() => {
30047
+ const filteredGuards = React106.useMemo(() => {
30021
30048
  if (filter === "all") return guards;
30022
30049
  if (filter === "passed") return guards.filter((g) => g.result);
30023
30050
  return guards.filter((g) => !g.result);
@@ -30178,10 +30205,10 @@ function EffectBadge({ effect }) {
30178
30205
  ] });
30179
30206
  }
30180
30207
  function TransitionTimeline({ transitions }) {
30181
- const containerRef = React105.useRef(null);
30182
- const [autoScroll, setAutoScroll] = React105.useState(true);
30183
- const [expandedId, setExpandedId] = React105.useState(null);
30184
- React105.useEffect(() => {
30208
+ const containerRef = React106.useRef(null);
30209
+ const [autoScroll, setAutoScroll] = React106.useState(true);
30210
+ const [expandedId, setExpandedId] = React106.useState(null);
30211
+ React106.useEffect(() => {
30185
30212
  if (autoScroll && containerRef.current) {
30186
30213
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
30187
30214
  }
@@ -30467,9 +30494,9 @@ function getAllEvents(traits2) {
30467
30494
  }
30468
30495
  function EventDispatcherTab({ traits: traits2, schema }) {
30469
30496
  const eventBus = useEventBus();
30470
- const [log4, setLog] = React105.useState([]);
30471
- const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
30472
- React105.useEffect(() => {
30497
+ const [log4, setLog] = React106.useState([]);
30498
+ const prevStatesRef = React106.useRef(/* @__PURE__ */ new Map());
30499
+ React106.useEffect(() => {
30473
30500
  for (const trait of traits2) {
30474
30501
  const prev = prevStatesRef.current.get(trait.id);
30475
30502
  if (prev && prev !== trait.currentState) {
@@ -30639,10 +30666,10 @@ function VerifyModePanel({
30639
30666
  serverCount,
30640
30667
  localCount
30641
30668
  }) {
30642
- const [expanded, setExpanded] = React105.useState(true);
30643
- const scrollRef = React105.useRef(null);
30644
- const prevCountRef = React105.useRef(0);
30645
- React105.useEffect(() => {
30669
+ const [expanded, setExpanded] = React106.useState(true);
30670
+ const scrollRef = React106.useRef(null);
30671
+ const prevCountRef = React106.useRef(0);
30672
+ React106.useEffect(() => {
30646
30673
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
30647
30674
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
30648
30675
  }
@@ -30708,10 +30735,10 @@ function RuntimeDebugger({
30708
30735
  defaultTab,
30709
30736
  schema
30710
30737
  }) {
30711
- const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
30712
- const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
30738
+ const [isCollapsed, setIsCollapsed] = React106.useState(mode === "verify" ? true : defaultCollapsed);
30739
+ const [isVisible, setIsVisible] = React106.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
30713
30740
  const debugData = useDebugData();
30714
- React105.useEffect(() => {
30741
+ React106.useEffect(() => {
30715
30742
  if (mode === "inline") return;
30716
30743
  return onDebugToggle((enabled) => {
30717
30744
  setIsVisible(enabled);
@@ -30720,7 +30747,7 @@ function RuntimeDebugger({
30720
30747
  }
30721
30748
  });
30722
30749
  }, [mode]);
30723
- React105.useEffect(() => {
30750
+ React106.useEffect(() => {
30724
30751
  if (mode === "inline") return;
30725
30752
  const handleKeyDown = (e) => {
30726
30753
  if (e.key === "`" && isVisible) {
@@ -31269,7 +31296,7 @@ function SequenceBar({
31269
31296
  onSlotRemove(index);
31270
31297
  }, [onSlotRemove, playing]);
31271
31298
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
31272
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
31299
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
31273
31300
  i > 0 && /* @__PURE__ */ jsx(
31274
31301
  Typography,
31275
31302
  {
@@ -32614,7 +32641,7 @@ var init_StatCard = __esm({
32614
32641
  const labelToUse = propLabel ?? propTitle;
32615
32642
  const eventBus = useEventBus();
32616
32643
  const { t } = useTranslate();
32617
- const handleActionClick = React105__default.useCallback(() => {
32644
+ const handleActionClick = React106__default.useCallback(() => {
32618
32645
  if (action?.event) {
32619
32646
  eventBus.emit(`UI:${action.event}`, {});
32620
32647
  }
@@ -32625,7 +32652,7 @@ var init_StatCard = __esm({
32625
32652
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
32626
32653
  const isLoading = externalLoading ?? false;
32627
32654
  const error = externalError;
32628
- const computeMetricValue = React105__default.useCallback(
32655
+ const computeMetricValue = React106__default.useCallback(
32629
32656
  (metric, items) => {
32630
32657
  if (metric.value !== void 0) {
32631
32658
  return metric.value;
@@ -32664,7 +32691,7 @@ var init_StatCard = __esm({
32664
32691
  },
32665
32692
  []
32666
32693
  );
32667
- const schemaStats = React105__default.useMemo(() => {
32694
+ const schemaStats = React106__default.useMemo(() => {
32668
32695
  if (!metrics || metrics.length === 0) return null;
32669
32696
  return metrics.map((metric) => ({
32670
32697
  label: metric.label,
@@ -32672,7 +32699,7 @@ var init_StatCard = __esm({
32672
32699
  format: metric.format
32673
32700
  }));
32674
32701
  }, [metrics, data, computeMetricValue]);
32675
- const calculatedTrend = React105__default.useMemo(() => {
32702
+ const calculatedTrend = React106__default.useMemo(() => {
32676
32703
  if (manualTrend !== void 0) return manualTrend;
32677
32704
  if (previousValue === void 0 || currentValue === void 0)
32678
32705
  return void 0;
@@ -33656,7 +33683,7 @@ var init_Timeline = __esm({
33656
33683
  }) => {
33657
33684
  const { t } = useTranslate();
33658
33685
  const entityData = Array.isArray(entity) ? entity : [];
33659
- const items = React105__default.useMemo(() => {
33686
+ const items = React106__default.useMemo(() => {
33660
33687
  if (propItems) return propItems;
33661
33688
  if (entityData.length === 0) return [];
33662
33689
  return entityData.map((record, idx) => {
@@ -33763,7 +33790,7 @@ var init_Timeline = __esm({
33763
33790
  }
33764
33791
  });
33765
33792
  function extractToastProps(children) {
33766
- if (!React105__default.isValidElement(children)) {
33793
+ if (!React106__default.isValidElement(children)) {
33767
33794
  if (typeof children === "string") {
33768
33795
  return { message: children };
33769
33796
  }
@@ -33801,7 +33828,7 @@ var init_ToastSlot = __esm({
33801
33828
  eventBus.emit("UI:CLOSE");
33802
33829
  };
33803
33830
  if (!isVisible) return null;
33804
- const isCustomContent = React105__default.isValidElement(children) && !message;
33831
+ const isCustomContent = React106__default.isValidElement(children) && !message;
33805
33832
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
33806
33833
  Toast,
33807
33834
  {
@@ -34070,7 +34097,7 @@ var init_WizardContainer = __esm({
34070
34097
  const isCompleted = index < currentStep;
34071
34098
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
34072
34099
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
34073
- return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
34100
+ return /* @__PURE__ */ jsxs(React106__default.Fragment, { children: [
34074
34101
  /* @__PURE__ */ jsx(
34075
34102
  Button,
34076
34103
  {
@@ -34452,12 +34479,12 @@ var init_WorldMapTemplate = __esm({
34452
34479
  }
34453
34480
  });
34454
34481
  function lazyThree(name, loader) {
34455
- const Lazy = React105__default.lazy(() => loader().then((m) => ({ default: m[name] })));
34482
+ const Lazy = React106__default.lazy(() => loader().then((m) => ({ default: m[name] })));
34456
34483
  function ThreeWrapper(props) {
34457
- return React105__default.createElement(
34458
- React105__default.Suspense,
34484
+ return React106__default.createElement(
34485
+ React106__default.Suspense,
34459
34486
  { fallback: null },
34460
- React105__default.createElement(Lazy, props)
34487
+ React106__default.createElement(Lazy, props)
34461
34488
  );
34462
34489
  }
34463
34490
  ThreeWrapper.displayName = `Lazy(${name})`;
@@ -34945,7 +34972,7 @@ function SuspenseConfigProvider({
34945
34972
  config,
34946
34973
  children
34947
34974
  }) {
34948
- return React105__default.createElement(
34975
+ return React106__default.createElement(
34949
34976
  SuspenseConfigContext.Provider,
34950
34977
  { value: config },
34951
34978
  children
@@ -35428,7 +35455,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
35428
35455
  const key = `${parentId}-${index}-trait:${traitName}`;
35429
35456
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
35430
35457
  }
35431
- return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
35458
+ return /* @__PURE__ */ jsx(React106__default.Fragment, { children: child }, `${parentId}-${index}`);
35432
35459
  }
35433
35460
  if (!child || typeof child !== "object") return null;
35434
35461
  const childId = `${parentId}-${index}`;
@@ -35465,14 +35492,14 @@ function isPatternConfig(value) {
35465
35492
  if (value === null || value === void 0) return false;
35466
35493
  if (typeof value !== "object") return false;
35467
35494
  if (Array.isArray(value)) return false;
35468
- if (React105__default.isValidElement(value)) return false;
35495
+ if (React106__default.isValidElement(value)) return false;
35469
35496
  if (value instanceof Date) return false;
35470
35497
  if (typeof value === "function") return false;
35471
35498
  const record = value;
35472
35499
  return "type" in record && typeof record.type === "string";
35473
35500
  }
35474
35501
  function isPlainConfigObject(value) {
35475
- if (React105__default.isValidElement(value)) return false;
35502
+ if (React106__default.isValidElement(value)) return false;
35476
35503
  if (value instanceof Date) return false;
35477
35504
  const proto = Object.getPrototypeOf(value);
35478
35505
  return proto === Object.prototype || proto === null;