@almadar/ui 6.58.0 → 6.61.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.
Files changed (94) hide show
  1. package/dist/BehaviorValueFrame-3ORZHPWQ.css +1252 -0
  2. package/dist/BehaviorValueFrame-QTD7BWOI.js +18 -0
  3. package/dist/{Canvas3DHost-BTvRPfsr.d.ts → Canvas3DHost-CNjANoaU.d.ts} +1 -1
  4. package/dist/{GameAudioProvider-kXbonWTv.d.ts → GameAudioProvider-Dv_L-PHt.d.ts} +1 -1
  5. package/dist/TraitValueFrame-2WMYJOA5.css +1252 -0
  6. package/dist/TraitValueFrame-WOXNLLMM.js +17 -0
  7. package/dist/Typography-BY4A2NBY.js +5 -0
  8. package/dist/{UISlotRenderer-N5DFYE6K.js → UISlotRenderer-EEOXSJCI.js} +10 -8
  9. package/dist/avl/index.cjs +31960 -27831
  10. package/dist/avl/index.d.ts +36 -13
  11. package/dist/avl/index.js +331 -6147
  12. package/dist/{avl-3d-context-BpBKZIbc.d.ts → avl-3d-context-Dxun3-ri.d.ts} +2 -0
  13. package/dist/{chunk-I2ZNE5TD.js → chunk-6PV4LASE.js} +9495 -639
  14. package/dist/{chunk-723MJUU3.js → chunk-6ZCU3BQN.js} +1 -1
  15. package/dist/{chunk-GZGDBS4S.js → chunk-7NIU5GDC.js} +2 -2
  16. package/dist/{chunk-YYYHH5BA.js → chunk-CB64IOYD.js} +0 -4
  17. package/dist/{chunk-MZIDOJMD.js → chunk-EIIQGOZW.js} +2 -1
  18. package/dist/chunk-F7NZ3KZQ.js +434 -0
  19. package/dist/{chunk-LZRW6GXG.js → chunk-FYX64CDL.js} +0 -2
  20. package/dist/{chunk-4ZGXIW3B.js → chunk-KZRAMPM6.js} +1 -1
  21. package/dist/{chunk-VHTJRS2N.js → chunk-L3MTZ3RH.js} +7 -0
  22. package/dist/chunk-LUREMDI3.js +49 -0
  23. package/dist/{chunk-HA7CJWQX.js → chunk-MGN6B6OQ.js} +1477 -1177
  24. package/dist/{chunk-Q47ZN2DW.js → chunk-N23SVGTH.js} +83 -1
  25. package/dist/{chunk-KJGVLXEN.js → chunk-N4IJS5DD.js} +50 -116
  26. package/dist/{chunk-I5QOYW2Z.js → chunk-UTSDPJUP.js} +205 -2
  27. package/dist/{chunk-V3FGTQUE.js → chunk-ZR45FGW3.js} +7 -1
  28. package/dist/{cn-DIql5232.d.ts → cn-CDIhHCUC.d.ts} +40 -16
  29. package/dist/components/index.cjs +14455 -4099
  30. package/dist/components/index.d.ts +165 -177
  31. package/dist/components/index.js +14 -15
  32. package/dist/context/index.cjs +16 -1
  33. package/dist/context/index.js +4 -2
  34. package/dist/hooks/index.cjs +79 -6
  35. package/dist/hooks/index.d.ts +43 -2
  36. package/dist/hooks/index.js +6 -7
  37. package/dist/lib/drawable/three/index.cjs +350 -26
  38. package/dist/lib/drawable/three/index.d.ts +5 -5
  39. package/dist/lib/drawable/three/index.js +28 -7
  40. package/dist/lib/index.cjs +90 -4
  41. package/dist/lib/index.d.ts +3 -3
  42. package/dist/lib/index.js +74 -6
  43. package/dist/locales/index.cjs +0 -6
  44. package/dist/locales/index.js +2 -2
  45. package/dist/{paintDispatch-BN8Vbzgs.d.ts → paintDispatch-Cp1_S93j.d.ts} +30 -2
  46. package/dist/providers/index.cjs +13853 -1075
  47. package/dist/providers/index.d.ts +38 -6
  48. package/dist/providers/index.js +40 -30
  49. package/dist/runtime/index.cjs +28369 -18287
  50. package/dist/runtime/index.d.ts +65 -3
  51. package/dist/runtime/index.js +13 -379
  52. package/dist/ssr/index.cjs +508 -133
  53. package/dist/ssr/index.d.cts +56 -4
  54. package/dist/ssr/index.d.ts +56 -4
  55. package/dist/ssr/index.js +446 -71
  56. package/dist/{verificationRegistry-CK76GUfH.d.ts → verificationRegistry-B5aGl7WF.d.ts} +3 -2
  57. package/locales/ar.json +0 -2
  58. package/locales/en.json +0 -2
  59. package/locales/sl.json +0 -2
  60. package/package.json +7 -7
  61. package/tailwind-preset.cjs +78 -8
  62. package/themes/_contract.md +6 -0
  63. package/themes/_fonts.css +4 -4
  64. package/themes/_foundation.css +11 -0
  65. package/themes/_presets.css +2 -0
  66. package/themes/almadar-website.css +10 -0
  67. package/themes/almadar.css +10 -0
  68. package/themes/atelier.css +10 -0
  69. package/themes/bauhaus.css +10 -0
  70. package/themes/bloomberg-dense.css +10 -0
  71. package/themes/clay.css +10 -0
  72. package/themes/corporate.css +10 -0
  73. package/themes/gazette.css +10 -0
  74. package/themes/glass.css +10 -0
  75. package/themes/kflow.css +5 -0
  76. package/themes/kiosk.css +10 -0
  77. package/themes/linear-clean.css +10 -0
  78. package/themes/material.css +10 -0
  79. package/themes/minimalist.css +10 -0
  80. package/themes/nata.css +304 -0
  81. package/themes/neon.css +10 -0
  82. package/themes/notion-editorial.css +10 -0
  83. package/themes/orb.css +10 -0
  84. package/themes/prism.css +10 -0
  85. package/themes/rawi.css +304 -0
  86. package/themes/retro.css +10 -0
  87. package/themes/risograph.css +10 -0
  88. package/themes/scandi.css +10 -0
  89. package/themes/solarpunk.css +10 -0
  90. package/themes/terminal.css +138 -128
  91. package/dist/Typography-LZTP72Y4.js +0 -5
  92. package/dist/chunk-D2E44ODB.js +0 -350
  93. package/dist/chunk-HB3D3HUJ.js +0 -2265
  94. package/dist/chunk-N7JIG57B.js +0 -138
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React17 = require('react');
3
+ var React18 = require('react');
4
4
  var logger = require('@almadar/logger');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var core = require('@almadar/core');
@@ -25,7 +25,7 @@ function _interopNamespace(e) {
25
25
  return Object.freeze(n);
26
26
  }
27
27
 
28
- var React17__namespace = /*#__PURE__*/_interopNamespace(React17);
28
+ var React18__namespace = /*#__PURE__*/_interopNamespace(React18);
29
29
  var LucideIcons2__namespace = /*#__PURE__*/_interopNamespace(LucideIcons2);
30
30
 
31
31
  // node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -2576,13 +2576,51 @@ var twMerge = extendTailwindMerge({
2576
2576
  function cn(...inputs) {
2577
2577
  return twMerge(clsx(inputs));
2578
2578
  }
2579
+
2580
+ // lib/bandShapes.ts
2581
+ var shape = (d) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><path d='${d}'/></svg>")`;
2582
+ var BAND_SHAPES = {
2583
+ wave: shape("M0 60 C240 100 480 100 720 60 C960 20 1200 20 1440 60 V100 H0 Z"),
2584
+ arc: shape("M0 100 Q720 0 1440 100 Z"),
2585
+ tilt: shape("M0 100 L1440 0 V100 Z"),
2586
+ step: shape("M0 100 V75 H360 V50 H720 V25 H1080 V0 H1440 V100 Z"),
2587
+ scallop: shape("M0 100 V40 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 a60 40 0 0 1 120 0 V100 Z")
2588
+ };
2589
+ var BAND_EDGE_HEIGHT = "clamp(24px, 6vw, 96px)";
2590
+ var BAND_ACCENT_FALLBACK = "linear-gradient(180deg, color-mix(in oklab, var(--color-primary) 12%, var(--color-background)), var(--color-background))";
2591
+ var BAND_EDGE_FILL = {
2592
+ background: "var(--surface-page-image, none), var(--color-background)",
2593
+ muted: "var(--color-muted)",
2594
+ surface: "var(--color-card)",
2595
+ gradient: `var(--surface-accent-image, ${BAND_ACCENT_FALLBACK}), var(--color-muted)`,
2596
+ inverse: "var(--color-foreground)"
2597
+ };
2598
+ function bandEdgeMask(edge) {
2599
+ return edge === "curve" ? "var(--surface-edge-mask, none)" : BAND_SHAPES[edge];
2600
+ }
2601
+ function bandEdgeHeight(edge) {
2602
+ return edge === "curve" ? `var(--surface-edge-height, ${BAND_EDGE_HEIGHT})` : BAND_EDGE_HEIGHT;
2603
+ }
2604
+ function bandEdgeLayerStyle(edge, side, flip, color) {
2605
+ const mask = bandEdgeMask(edge);
2606
+ const turn = side === "top" ? flip ? "scaleY(-1)" : "rotate(180deg)" : flip ? "scaleX(-1)" : void 0;
2607
+ const style = { height: bandEdgeHeight(edge), background: BAND_EDGE_FILL[color], maskImage: mask, WebkitMaskImage: mask, transform: turn };
2608
+ if (color === "background") {
2609
+ style.backgroundSize = "var(--surface-page-image-size, auto), auto";
2610
+ style.backgroundAttachment = "fixed";
2611
+ }
2612
+ return style;
2613
+ }
2614
+ function bandPadding(basePad, edge) {
2615
+ return edge === "none" ? void 0 : `calc(${basePad} + ${bandEdgeHeight(edge)})`;
2616
+ }
2579
2617
  logger.createLogger("almadar:eventbus");
2580
2618
  logger.createLogger("almadar:eventbus:subscribe");
2581
- var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext = React17.createContext(null));
2619
+ var EventBusContext = globalThis.__almadarUiEventBusContext ?? (globalThis.__almadarUiEventBusContext = React18.createContext(null));
2582
2620
  var EMPTY_CHAIN = Object.freeze([]);
2583
- var TraitScopeContext = React17.createContext(null);
2621
+ var TraitScopeContext = React18.createContext(null);
2584
2622
  function useTraitScopeChain() {
2585
- const chain = React17.useContext(TraitScopeContext);
2623
+ const chain = React18.useContext(TraitScopeContext);
2586
2624
  return chain ?? EMPTY_CHAIN;
2587
2625
  }
2588
2626
  var log = logger.createLogger("almadar:eventbus");
@@ -2659,10 +2697,10 @@ var fallbackEventBus = {
2659
2697
  }
2660
2698
  };
2661
2699
  function useEventBus() {
2662
- const context = React17.useContext(EventBusContext);
2700
+ const context = React18.useContext(EventBusContext);
2663
2701
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2664
2702
  const chain = useTraitScopeChain();
2665
- return React17.useMemo(() => {
2703
+ return React18.useMemo(() => {
2666
2704
  if (chain.length === 0) {
2667
2705
  return {
2668
2706
  ...baseBus,
@@ -2708,24 +2746,24 @@ function useEventBus() {
2708
2746
  }
2709
2747
  function useTapReveal(options = {}) {
2710
2748
  const { onReveal, onDismiss, refs, enabled = true } = options;
2711
- const [revealed, setRevealed] = React17.useState(false);
2712
- const onRevealRef = React17.useRef(onReveal);
2713
- const onDismissRef = React17.useRef(onDismiss);
2749
+ const [revealed, setRevealed] = React18.useState(false);
2750
+ const onRevealRef = React18.useRef(onReveal);
2751
+ const onDismissRef = React18.useRef(onDismiss);
2714
2752
  onRevealRef.current = onReveal;
2715
2753
  onDismissRef.current = onDismiss;
2716
- const reveal = React17.useCallback(() => {
2754
+ const reveal = React18.useCallback(() => {
2717
2755
  setRevealed((wasRevealed) => {
2718
2756
  if (!wasRevealed) onRevealRef.current?.();
2719
2757
  return true;
2720
2758
  });
2721
2759
  }, []);
2722
- const dismiss = React17.useCallback(() => {
2760
+ const dismiss = React18.useCallback(() => {
2723
2761
  setRevealed((wasRevealed) => {
2724
2762
  if (wasRevealed) onDismissRef.current?.();
2725
2763
  return false;
2726
2764
  });
2727
2765
  }, []);
2728
- const onPointerDown = React17.useCallback(
2766
+ const onPointerDown = React18.useCallback(
2729
2767
  (e) => {
2730
2768
  if (!enabled || e.pointerType === "mouse") return;
2731
2769
  if (revealed) dismiss();
@@ -2733,7 +2771,7 @@ function useTapReveal(options = {}) {
2733
2771
  },
2734
2772
  [enabled, revealed, reveal, dismiss]
2735
2773
  );
2736
- React17.useEffect(() => {
2774
+ React18.useEffect(() => {
2737
2775
  if (!revealed || typeof document === "undefined") return;
2738
2776
  const onDocDown = (ev) => {
2739
2777
  const target = ev.target;
@@ -2750,10 +2788,10 @@ function useTapReveal(options = {}) {
2750
2788
  return { revealed, triggerProps: { onPointerDown }, reveal, dismiss };
2751
2789
  }
2752
2790
  logger.createLogger("almadar:ui:theme");
2753
- React17.createContext(void 0);
2754
- var ThemeScopeContext = React17.createContext({});
2791
+ React18.createContext(void 0);
2792
+ var ThemeScopeContext = React18.createContext({});
2755
2793
  function useThemeScope() {
2756
- return React17.useContext(ThemeScopeContext);
2794
+ return React18.useContext(ThemeScopeContext);
2757
2795
  }
2758
2796
 
2759
2797
  // lib/pressable.ts
@@ -2780,7 +2818,237 @@ function pressableProps(onPress, options = {}) {
2780
2818
  };
2781
2819
  }
2782
2820
 
2783
- // components/core/atoms/Box.tsx
2821
+ // lib/domPassthrough.ts
2822
+ var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set(["role", "id", "lang", "dir", "tabIndex"]);
2823
+ function domPassthrough(props) {
2824
+ const out = {};
2825
+ for (const [key, value] of Object.entries(props)) {
2826
+ if (key.startsWith("aria-") || key.startsWith("data-") || GLOBAL_ATTRIBUTES.has(key)) {
2827
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === void 0) {
2828
+ out[key] = value;
2829
+ }
2830
+ }
2831
+ }
2832
+ return out;
2833
+ }
2834
+ var motionEnabledCache = null;
2835
+ function isMotionEnabled() {
2836
+ if (typeof document === "undefined") return true;
2837
+ if (motionEnabledCache !== null) return motionEnabledCache;
2838
+ const v = getComputedStyle(document.documentElement).getPropertyValue("--motion-enable").trim().toLowerCase();
2839
+ motionEnabledCache = v !== "off";
2840
+ return motionEnabledCache;
2841
+ }
2842
+
2843
+ // lib/motion-tokens.ts
2844
+ function cssTimeMs(value) {
2845
+ const v = value.trim();
2846
+ if (v.endsWith("ms")) return Number.parseFloat(v);
2847
+ if (v.endsWith("s")) return Number.parseFloat(v) * 1e3;
2848
+ return Number.NaN;
2849
+ }
2850
+ function tokenAt(el, name) {
2851
+ for (let at = el; at !== null; at = at.parentElement) {
2852
+ const value = getComputedStyle(at).getPropertyValue(name).trim();
2853
+ if (value !== "") return value;
2854
+ }
2855
+ return "";
2856
+ }
2857
+ function motionTiming(durationToken, easingToken, scope) {
2858
+ const duration = cssTimeMs(tokenAt(scope ?? document.documentElement, durationToken));
2859
+ const easing = tokenAt(scope ?? document.documentElement, easingToken);
2860
+ const reduced = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2861
+ if (!isMotionEnabled() || reduced || !Number.isFinite(duration) || easing === "") return void 0;
2862
+ return { duration, easing };
2863
+ }
2864
+ function layoutScale(el) {
2865
+ const layoutWidth = el instanceof HTMLElement ? el.offsetWidth : 0;
2866
+ const screenWidth = el.getBoundingClientRect().width;
2867
+ return layoutWidth > 0 && screenWidth > 0 ? screenWidth / layoutWidth : 1;
2868
+ }
2869
+
2870
+ // lib/animate-changes.ts
2871
+ function ownMotion(el) {
2872
+ return el.closest("[data-item-move]") !== null || /\balmadar-enter-/.test(el.getAttribute("class") ?? "");
2873
+ }
2874
+ function boxesOf(el) {
2875
+ return getComputedStyle(el).display === "contents" ? boxedChildren(el) : [el];
2876
+ }
2877
+ function boxedChildren(el) {
2878
+ return [...el.children].flatMap(boxesOf);
2879
+ }
2880
+ var GHOST_STYLE = ["font", "letterSpacing", "lineHeight", "color", "textAlign", "whiteSpace", "textTransform"];
2881
+ function roll(el, oldText, timing) {
2882
+ const box = el.getBoundingClientRect();
2883
+ const scale2 = layoutScale(el);
2884
+ const computed = getComputedStyle(el);
2885
+ const holder = document.createElement("span");
2886
+ holder.setAttribute("aria-hidden", "true");
2887
+ Object.assign(holder.style, {
2888
+ position: "fixed",
2889
+ left: `${box.left}px`,
2890
+ top: `${box.top}px`,
2891
+ width: `${box.width / scale2}px`,
2892
+ height: `${box.height / scale2}px`,
2893
+ transform: scale2 === 1 ? "" : `scale(${scale2})`,
2894
+ transformOrigin: "top left",
2895
+ pointerEvents: "none",
2896
+ zIndex: "2147483647"
2897
+ });
2898
+ const ghost = document.createElement("span");
2899
+ ghost.setAttribute("data-change-ghost", "");
2900
+ ghost.setAttribute("aria-hidden", "true");
2901
+ ghost.textContent = oldText;
2902
+ for (const prop of GHOST_STYLE) ghost.style[prop] = computed[prop];
2903
+ Object.assign(ghost.style, { display: "block", width: "100%", height: "100%", overflow: "visible" });
2904
+ holder.appendChild(ghost);
2905
+ document.body.appendChild(holder);
2906
+ const out = ghost.animate(
2907
+ [{ opacity: 1, transform: "none" }, { opacity: 0, transform: "translateY(-40%)", offset: 0.5 }, { opacity: 0, transform: "translateY(-40%)" }],
2908
+ timing
2909
+ );
2910
+ if (out === void 0) holder.remove();
2911
+ else {
2912
+ out.addEventListener("finish", () => holder.remove());
2913
+ out.addEventListener("cancel", () => holder.remove());
2914
+ }
2915
+ el.animate(
2916
+ [{ opacity: 0, transform: "translateY(40%)" }, { opacity: 0, transform: "translateY(40%)", offset: 0.4 }, { opacity: 1, transform: "none" }],
2917
+ timing
2918
+ );
2919
+ }
2920
+ var textOnly = (el) => el instanceof HTMLElement && el.childNodes.length > 0 && [...el.childNodes].every((n) => n.nodeType === Node.TEXT_NODE);
2921
+ function settle(root, added, changed) {
2922
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
2923
+ if (timing === void 0) return;
2924
+ for (const el of added) {
2925
+ if (ownMotion(el) || el.parentElement !== null && [...added].some((other) => other !== el && other.contains(el))) continue;
2926
+ for (const box of boxesOf(el)) {
2927
+ if (ownMotion(box)) continue;
2928
+ box.animate([{ opacity: 0, transform: "translateY(6px)" }, { opacity: 1, transform: "none" }], timing);
2929
+ }
2930
+ }
2931
+ for (const [el, oldText] of changed) {
2932
+ if (ownMotion(el) || [...added].some((a) => a.contains(el))) continue;
2933
+ if (oldText !== void 0 && oldText !== el.textContent && textOnly(el)) roll(el, oldText, timing);
2934
+ else el.animate([{ opacity: 0.25 }, { opacity: 1 }], timing);
2935
+ }
2936
+ }
2937
+ function blocks(root) {
2938
+ const seen = /* @__PURE__ */ new Set();
2939
+ for (const wrapper of root.querySelectorAll("[data-pattern]")) {
2940
+ for (const box of boxesOf(wrapper)) if (!ownMotion(box)) seen.add(box);
2941
+ }
2942
+ return [...seen];
2943
+ }
2944
+ function glidePushed(root, places) {
2945
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
2946
+ const origin = root.getBoundingClientRect();
2947
+ const applied = /* @__PURE__ */ new Map();
2948
+ const present = /* @__PURE__ */ new Set();
2949
+ for (const el of blocks(root)) {
2950
+ present.add(el);
2951
+ if ((el.getAnimations?.() ?? []).length > 0) {
2952
+ places.delete(el);
2953
+ continue;
2954
+ }
2955
+ const box = el.getBoundingClientRect();
2956
+ const now = { x: box.left - origin.left, y: box.top - origin.top };
2957
+ const was = places.get(el);
2958
+ places.set(el, now);
2959
+ if (was === void 0 || timing === void 0) continue;
2960
+ let inherited = { x: 0, y: 0 };
2961
+ for (let up = el.parentElement; up !== null && up !== root; up = up.parentElement) {
2962
+ const a = applied.get(up);
2963
+ if (a !== void 0) {
2964
+ inherited = a;
2965
+ break;
2966
+ }
2967
+ }
2968
+ const dx = was.x - now.x - inherited.x;
2969
+ const dy = was.y - now.y - inherited.y;
2970
+ if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) {
2971
+ if (inherited.x !== 0 || inherited.y !== 0) applied.set(el, inherited);
2972
+ continue;
2973
+ }
2974
+ const scale2 = layoutScale(el);
2975
+ el.animate([{ transform: `translate(${dx / scale2}px, ${dy / scale2}px)` }, { transform: "none" }], { ...timing, composite: "add" });
2976
+ applied.set(el, { x: inherited.x + dx, y: inherited.y + dy });
2977
+ }
2978
+ for (const el of places.keys()) if (!present.has(el)) places.delete(el);
2979
+ }
2980
+ function easeHeight(root) {
2981
+ if (typeof ResizeObserver === "undefined") return () => void 0;
2982
+ let rest;
2983
+ let glide;
2984
+ const sizes = new ResizeObserver(() => {
2985
+ const scale2 = layoutScale(root);
2986
+ const shown = root.getBoundingClientRect().height / scale2;
2987
+ const gliding = glide !== void 0 && glide.playState === "running";
2988
+ glide?.cancel();
2989
+ glide = void 0;
2990
+ const height = root.getBoundingClientRect().height / scale2;
2991
+ const from = gliding ? shown : rest;
2992
+ rest = height;
2993
+ const timing = motionTiming("--duration-normal", "--easing-emphasized", root);
2994
+ if (from === void 0 || timing === void 0 || Math.abs(from - height) < 1) return;
2995
+ glide = root.animate(
2996
+ [{ height: `${from}px`, overflow: "clip" }, { height: `${height}px`, overflow: "clip" }],
2997
+ timing
2998
+ ) ?? void 0;
2999
+ });
3000
+ let watched = [];
3001
+ const watch = () => {
3002
+ const next = boxedChildren(root);
3003
+ if (next.length === watched.length && next.every((el, i) => el === watched[i])) return;
3004
+ watched = next;
3005
+ sizes.disconnect();
3006
+ for (const el of next) sizes.observe(el);
3007
+ };
3008
+ watch();
3009
+ const children = new MutationObserver(watch);
3010
+ children.observe(root, { childList: true, subtree: true });
3011
+ return () => {
3012
+ children.disconnect();
3013
+ sizes.disconnect();
3014
+ };
3015
+ }
3016
+ function useAnimateChanges(ref, enabled) {
3017
+ React18.useEffect(() => {
3018
+ const root = ref.current;
3019
+ if (!enabled || root === null) return;
3020
+ return easeHeight(root);
3021
+ }, [ref, enabled]);
3022
+ React18.useEffect(() => {
3023
+ const root = ref.current;
3024
+ if (!enabled || root === null || typeof MutationObserver === "undefined") return;
3025
+ const observer2 = new MutationObserver((records) => {
3026
+ const added = /* @__PURE__ */ new Set();
3027
+ const changed = /* @__PURE__ */ new Map();
3028
+ for (const record of records) {
3029
+ if (record.type === "childList") {
3030
+ for (const node of record.addedNodes) {
3031
+ if (node instanceof Element) added.add(node);
3032
+ else if (node.nodeType === Node.TEXT_NODE && node.parentElement !== null && changed.get(node.parentElement) === void 0) {
3033
+ const removed = [...record.removedNodes].filter((n) => n.nodeType === Node.TEXT_NODE);
3034
+ changed.set(node.parentElement, removed.length > 0 ? removed.map((n) => n.textContent ?? "").join("") : void 0);
3035
+ }
3036
+ }
3037
+ } else if (record.type === "characterData") {
3038
+ const el = record.target.parentElement;
3039
+ if (el === null || changed.get(el) !== void 0) continue;
3040
+ changed.set(el, [...el.childNodes].map((n) => n === record.target ? record.oldValue ?? "" : n.textContent ?? "").join(""));
3041
+ }
3042
+ }
3043
+ glidePushed(root, places);
3044
+ settle(root, added, changed);
3045
+ });
3046
+ const places = /* @__PURE__ */ new Map();
3047
+ glidePushed(root, places);
3048
+ observer2.observe(root, { subtree: true, childList: true, characterData: true, characterDataOldValue: true });
3049
+ return () => observer2.disconnect();
3050
+ }, [ref, enabled]);
3051
+ }
2784
3052
  var paddingStyles = {
2785
3053
  none: "p-0",
2786
3054
  xs: "p-1",
@@ -2845,7 +3113,18 @@ var bgStyles = {
2845
3113
  muted: "bg-muted text-foreground",
2846
3114
  accent: "bg-accent text-accent-foreground",
2847
3115
  surface: "bg-card",
2848
- overlay: "bg-card/80 backdrop-blur-sm"
3116
+ overlay: "bg-card/80 backdrop-blur-sm",
3117
+ gradient: "band-gradient",
3118
+ inverse: "band-inverse"
3119
+ };
3120
+ var paddingRem = {
3121
+ none: "0rem",
3122
+ xs: "0.25rem",
3123
+ sm: "0.5rem",
3124
+ md: "1rem",
3125
+ lg: "1.5rem",
3126
+ xl: "2rem",
3127
+ "2xl": "3rem"
2849
3128
  };
2850
3129
  var roundedStyles = {
2851
3130
  none: "rounded-none",
@@ -2883,7 +3162,7 @@ var positionStyles = {
2883
3162
  fixed: "fixed",
2884
3163
  sticky: "sticky"
2885
3164
  };
2886
- var Box = React17__namespace.default.forwardRef(
3165
+ var Box = React18__namespace.default.forwardRef(
2887
3166
  ({
2888
3167
  padding,
2889
3168
  paddingX,
@@ -2908,6 +3187,13 @@ var Box = React17__namespace.default.forwardRef(
2908
3187
  hoverEvent,
2909
3188
  tapReveal = true,
2910
3189
  maxWidth,
3190
+ edgeTop = "none",
3191
+ edgeBottom = "none",
3192
+ edgeColor = "background",
3193
+ edgeFlip = false,
3194
+ texture = false,
3195
+ animateChanges = false,
3196
+ backdrop,
2911
3197
  onClick,
2912
3198
  onMouseEnter,
2913
3199
  onMouseLeave,
@@ -2915,23 +3201,30 @@ var Box = React17__namespace.default.forwardRef(
2915
3201
  ...rest
2916
3202
  }, ref) => {
2917
3203
  const eventBus = useEventBus();
3204
+ const ownRef = React18.useRef(null);
3205
+ useAnimateChanges(ownRef, animateChanges);
3206
+ const setRef = React18.useCallback((node) => {
3207
+ ownRef.current = node;
3208
+ if (typeof ref === "function") ref(node);
3209
+ else if (ref !== null) ref.current = node;
3210
+ }, [ref]);
2918
3211
  const { override: themeOverride } = useThemeScope();
2919
3212
  const declaredTheme = rest["data-theme"];
2920
3213
  const dataTheme = declaredTheme !== void 0 && themeOverride ? themeOverride : declaredTheme;
2921
- const handleClick = React17.useCallback((e) => {
3214
+ const handleClick = React18.useCallback((e) => {
2922
3215
  if (action) {
2923
3216
  e.stopPropagation();
2924
3217
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
2925
3218
  }
2926
3219
  onClick?.(e);
2927
3220
  }, [action, actionPayload, eventBus, onClick]);
2928
- const handleMouseEnter = React17.useCallback((e) => {
3221
+ const handleMouseEnter = React18.useCallback((e) => {
2929
3222
  if (hoverEvent) {
2930
3223
  eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
2931
3224
  }
2932
3225
  onMouseEnter?.(e);
2933
3226
  }, [hoverEvent, eventBus, onMouseEnter]);
2934
- const handleMouseLeave = React17.useCallback((e) => {
3227
+ const handleMouseLeave = React18.useCallback((e) => {
2935
3228
  if (hoverEvent) {
2936
3229
  eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
2937
3230
  }
@@ -2939,23 +3232,36 @@ var Box = React17__namespace.default.forwardRef(
2939
3232
  }, [hoverEvent, eventBus, onMouseLeave]);
2940
3233
  const { triggerProps } = useTapReveal({
2941
3234
  enabled: tapReveal && !!hoverEvent,
2942
- onReveal: React17.useCallback(() => {
3235
+ onReveal: React18.useCallback(() => {
2943
3236
  if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
2944
3237
  }, [hoverEvent, eventBus]),
2945
- onDismiss: React17.useCallback(() => {
3238
+ onDismiss: React18.useCallback(() => {
2946
3239
  if (hoverEvent) eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
2947
3240
  }, [hoverEvent, eventBus])
2948
3241
  });
2949
- const handlePointerDown = React17.useCallback((e) => {
3242
+ const handlePointerDown = React18.useCallback((e) => {
2950
3243
  if (hoverEvent && tapReveal) triggerProps.onPointerDown(e);
2951
3244
  onPointerDown?.(e);
2952
3245
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3246
+ const isBand = backdrop != null || texture || edgeTop !== "none" || edgeBottom !== "none";
3247
+ const padKey = paddingY ?? padding;
3248
+ const bandStyle = {};
3249
+ const padTop = padKey ? bandPadding(paddingRem[padKey], edgeTop) : void 0;
3250
+ const padBottom = padKey ? bandPadding(paddingRem[padKey], edgeBottom) : void 0;
3251
+ if (padTop) bandStyle.paddingTop = padTop;
3252
+ if (padBottom) bandStyle.paddingBottom = padBottom;
3253
+ const bandLayers = isBand ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3254
+ backdrop != null && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-backdrop", children: backdrop }),
3255
+ texture && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-texture" }),
3256
+ edgeTop !== "none" && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-edge band-edge-top", style: bandEdgeLayerStyle(edgeTop, "top", edgeFlip, edgeColor) }),
3257
+ edgeBottom !== "none" && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", "data-band-layer": "", "aria-hidden": true, className: "band-edge band-edge-bottom", style: bandEdgeLayerStyle(edgeBottom, "bottom", edgeFlip, edgeColor) })
3258
+ ] }) : null;
2953
3259
  const isClickable = action || onClick;
2954
3260
  const actionControl = action && rest.role === void 0 && rest.tabIndex === void 0 ? pressableProps(handleClick) : {};
2955
- return React17__namespace.default.createElement(
3261
+ return React18__namespace.default.createElement(
2956
3262
  Component,
2957
3263
  {
2958
- ref,
3264
+ ref: setRef,
2959
3265
  className: cn(
2960
3266
  padding && paddingStyles[padding],
2961
3267
  paddingX && paddingXStyles[paddingX],
@@ -2973,6 +3279,7 @@ var Box = React17__namespace.default.forwardRef(
2973
3279
  overflow && overflowStyles[overflow],
2974
3280
  position && positionStyles[position],
2975
3281
  isClickable && "cursor-pointer",
3282
+ isBand && "band",
2976
3283
  className
2977
3284
  ),
2978
3285
  onClick: isClickable ? handleClick : void 0,
@@ -2980,29 +3287,19 @@ var Box = React17__namespace.default.forwardRef(
2980
3287
  onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
2981
3288
  onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
2982
3289
  onPointerDown: hoverEvent && tapReveal || onPointerDown ? handlePointerDown : void 0,
2983
- style: maxWidth ? { maxWidth, ...rest.style } : rest.style,
3290
+ style: maxWidth || isBand ? { ...maxWidth ? { maxWidth } : {}, ...bandStyle, ...rest.style } : rest.style,
2984
3291
  ...rest,
2985
- "data-theme": dataTheme
3292
+ "data-theme": dataTheme,
3293
+ "data-motion": animateChanges ? "presentation" : void 0
2986
3294
  },
2987
- children
3295
+ isBand ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3296
+ bandLayers,
3297
+ children
3298
+ ] }) : children
2988
3299
  );
2989
3300
  }
2990
3301
  );
2991
3302
  Box.displayName = "Box";
2992
-
2993
- // lib/domPassthrough.ts
2994
- var GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set(["role", "id", "lang", "dir", "tabIndex"]);
2995
- function domPassthrough(props) {
2996
- const out = {};
2997
- for (const [key, value] of Object.entries(props)) {
2998
- if (key.startsWith("aria-") || key.startsWith("data-") || GLOBAL_ATTRIBUTES.has(key)) {
2999
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === void 0) {
3000
- out[key] = value;
3001
- }
3002
- }
3003
- }
3004
- return out;
3005
- }
3006
3303
  var gapStyles = {
3007
3304
  none: "gap-0",
3008
3305
  xs: "gap-1",
@@ -3057,7 +3354,7 @@ var Stack = ({
3057
3354
  };
3058
3355
  const isHorizontal = direction === "horizontal";
3059
3356
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3060
- return React17__namespace.default.createElement(
3357
+ return React18__namespace.default.createElement(
3061
3358
  Component,
3062
3359
  {
3063
3360
  ...domPassthrough(rest),
@@ -3219,7 +3516,6 @@ var en_default = {
3219
3516
  "aria.upvote": "Upvote",
3220
3517
  "aria.downvote": "Downvote",
3221
3518
  "aria.qrScanner": "QR scanner",
3222
- "aria.mockScanDev": "Mock scan (dev)",
3223
3519
  "aria.openMenu": "Open menu",
3224
3520
  "aria.closeMenu": "Close menu",
3225
3521
  "aria.openSidebar": "Open sidebar",
@@ -3417,7 +3713,6 @@ var en_default = {
3417
3713
  "qrScanner.pauseScanning": "Pause scanning",
3418
3714
  "qrScanner.switchToFrontCamera": "Switch to front camera",
3419
3715
  "qrScanner.switchToRearCamera": "Switch to rear camera",
3420
- "qrScanner.mockScan": "Mock Scan",
3421
3716
  "docSearch.placeholder": "Search documentation...",
3422
3717
  "stateMachine.loading": "Loading state machine\u2026",
3423
3718
  "stateMachine.noStateMachine": "No state machine to visualize",
@@ -4405,7 +4700,7 @@ var INLINE_TEXT_ATTR = "data-inline-text";
4405
4700
  // hooks/useTranslate.ts
4406
4701
  var { $meta: _meta2, ...coreMessages2 } = en_default;
4407
4702
  var coreLocale2 = coreMessages2;
4408
- var I18nContext = React17.createContext({
4703
+ var I18nContext = React18.createContext({
4409
4704
  locale: "en",
4410
4705
  direction: "ltr",
4411
4706
  t: (key, params) => {
@@ -4420,11 +4715,11 @@ var I18nContext = React17.createContext({
4420
4715
  });
4421
4716
  I18nContext.displayName = "I18nContext";
4422
4717
  function useTranslate() {
4423
- return React17.useContext(I18nContext);
4718
+ return React18.useContext(I18nContext);
4424
4719
  }
4425
4720
  function useFormatContext() {
4426
- const { t, locale, currency } = React17.useContext(I18nContext);
4427
- return React17.useMemo(
4721
+ const { t, locale, currency } = React18.useContext(I18nContext);
4722
+ return React18.useMemo(
4428
4723
  () => ({ locale, currency: currency ?? DEFAULT_CURRENCY, booleanLabels: { yes: t("common.yes"), no: t("common.no") } }),
4429
4724
  [t, locale, currency]
4430
4725
  );
@@ -4530,7 +4825,7 @@ var Typography = ({
4530
4825
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4531
4826
  body = formatValue(body, format, fmt);
4532
4827
  }
4533
- return React17__namespace.default.createElement(
4828
+ return React18__namespace.default.createElement(
4534
4829
  Component,
4535
4830
  {
4536
4831
  ...domPassthrough(rest),
@@ -4584,20 +4879,20 @@ function subscribePending(key, cb) {
4584
4879
  if (set && set.size === 0) keyListeners.delete(key);
4585
4880
  };
4586
4881
  }
4587
- var PendingScopeContext = React17.createContext(null);
4882
+ var PendingScopeContext = React18.createContext(null);
4588
4883
  function usePendingAction() {
4589
- const scope = React17.useContext(PendingScopeContext);
4590
- const [key, setKey] = React17.useState(null);
4591
- const pending = React17.useSyncExternalStore(
4592
- React17.useCallback((cb) => key ? subscribePending(key, cb) : () => {
4884
+ const scope = React18.useContext(PendingScopeContext);
4885
+ const [key, setKey] = React18.useState(null);
4886
+ const pending = React18.useSyncExternalStore(
4887
+ React18.useCallback((cb) => key ? subscribePending(key, cb) : () => {
4593
4888
  }, [key]),
4594
4889
  () => key ? isPending(key) : false,
4595
4890
  () => false
4596
4891
  );
4597
- React17.useEffect(() => {
4892
+ React18.useEffect(() => {
4598
4893
  if (key && !pending) setKey(null);
4599
4894
  }, [key, pending]);
4600
- const activate = React17.useCallback((emit) => {
4895
+ const activate = React18.useCallback((emit) => {
4601
4896
  const k = newPendingKey();
4602
4897
  emit(k);
4603
4898
  if (!isPending(k)) return;
@@ -4692,10 +4987,10 @@ function getThemeVersionSnapshot() {
4692
4987
  return themeVersion;
4693
4988
  }
4694
4989
  function useThemeIconStrokeApplies(ref) {
4695
- const documentApplies = React17.useSyncExternalStore(subscribeIconFamily, getStrokeAppliesSnapshot, () => true);
4696
- const version = React17.useSyncExternalStore(subscribeIconFamily, getThemeVersionSnapshot, () => 0);
4697
- const [scopedApplies, setScopedApplies] = React17.useState(null);
4698
- React17.useLayoutEffect(() => {
4990
+ const documentApplies = React18.useSyncExternalStore(subscribeIconFamily, getStrokeAppliesSnapshot, () => true);
4991
+ const version = React18.useSyncExternalStore(subscribeIconFamily, getThemeVersionSnapshot, () => 0);
4992
+ const [scopedApplies, setScopedApplies] = React18.useState(null);
4993
+ React18.useLayoutEffect(() => {
4699
4994
  if (!ref.current) return;
4700
4995
  const scoped = scopedIconFamily(ref.current);
4701
4996
  setScopedApplies(scoped === null ? null : familyStrokeApplies(scoped));
@@ -4703,7 +4998,7 @@ function useThemeIconStrokeApplies(ref) {
4703
4998
  return scopedApplies ?? documentApplies;
4704
4999
  }
4705
5000
  function useIconFamily() {
4706
- return React17.useSyncExternalStore(
5001
+ return React18.useSyncExternalStore(
4707
5002
  subscribeIconFamily,
4708
5003
  getIconFamilySnapshot,
4709
5004
  getIconFamilyServerSnapshot
@@ -4742,7 +5037,7 @@ function resolveLucide(name) {
4742
5037
  }
4743
5038
  function makeLucideAdapter(name) {
4744
5039
  const LucideComp = resolveLucide(name);
4745
- const Adapter = React17__namespace.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5040
+ const Adapter = React18__namespace.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4746
5041
  LucideComp,
4747
5042
  {
4748
5043
  ref,
@@ -4830,9 +5125,9 @@ var Icon = ({
4830
5125
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
4831
5126
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
4832
5127
  const family = useIconFamily();
4833
- const svgRef = React17__namespace.default.useRef(null);
5128
+ const svgRef = React18__namespace.default.useRef(null);
4834
5129
  const themeStroke = useThemeIconStrokeApplies(svgRef);
4835
- const RenderedComponent = React17__namespace.default.useMemo(() => {
5130
+ const RenderedComponent = React18__namespace.default.useMemo(() => {
4836
5131
  if (directIcon) return null;
4837
5132
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
4838
5133
  }, [directIcon, effectiveName, family]);
@@ -4974,13 +5269,13 @@ function AtlasImage({
4974
5269
  "aria-hidden": ariaHidden,
4975
5270
  ...rest
4976
5271
  }) {
4977
- const [, bump] = React17__namespace.useReducer((x) => x + 1, 0);
4978
- const canvasRef = React17__namespace.useRef(null);
5272
+ const [, bump] = React18__namespace.useReducer((x) => x + 1, 0);
5273
+ const canvasRef = React18__namespace.useRef(null);
4979
5274
  const sliced = isAtlasAsset(asset);
4980
5275
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
4981
5276
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
4982
5277
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
4983
- React17__namespace.useEffect(() => {
5278
+ React18__namespace.useEffect(() => {
4984
5279
  const canvas = canvasRef.current;
4985
5280
  if (!canvas || !img || !rect) return;
4986
5281
  canvas.width = rect.sw;
@@ -5035,7 +5330,7 @@ function AtlasImage({
5035
5330
  }
5036
5331
  AtlasImage.displayName = "AtlasImage";
5037
5332
  logger.createLogger("almadar:ui:navigation");
5038
- React17.createContext(null);
5333
+ React18.createContext(null);
5039
5334
  var INERT_API = {
5040
5335
  entries: [],
5041
5336
  canGoBack: false,
@@ -5045,12 +5340,12 @@ var INERT_API = {
5045
5340
  setCurrentLabel: () => void 0,
5046
5341
  registerNavItems: () => void 0
5047
5342
  };
5048
- var NavStackContext = React17.createContext(INERT_API);
5343
+ var NavStackContext = React18.createContext(INERT_API);
5049
5344
  function isInertNavStack(api) {
5050
5345
  return api === INERT_API;
5051
5346
  }
5052
5347
  function useNavStack() {
5053
- return React17.useContext(NavStackContext);
5348
+ return React18.useContext(NavStackContext);
5054
5349
  }
5055
5350
 
5056
5351
  // lib/followHref.ts
@@ -5146,7 +5441,7 @@ function resolveIconProp(value, sizeClass) {
5146
5441
  const IconComp = value;
5147
5442
  return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
5148
5443
  }
5149
- if (React17__namespace.default.isValidElement(value)) {
5444
+ if (React18__namespace.default.isValidElement(value)) {
5150
5445
  return value;
5151
5446
  }
5152
5447
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5155,7 +5450,7 @@ function resolveIconProp(value, sizeClass) {
5155
5450
  }
5156
5451
  return value;
5157
5452
  }
5158
- var Button = React17__namespace.default.forwardRef(
5453
+ var Button = React18__namespace.default.forwardRef(
5159
5454
  ({
5160
5455
  className,
5161
5456
  variant = "primary",
@@ -5182,7 +5477,7 @@ var Button = React17__namespace.default.forwardRef(
5182
5477
  const navStack = useNavStack();
5183
5478
  const { pending, activate } = usePendingAction();
5184
5479
  const busy = isLoading || pending;
5185
- const [focused, setFocused] = React17__namespace.default.useState(false);
5480
+ const [focused, setFocused] = React18__namespace.default.useState(false);
5186
5481
  const inert = Boolean(disabled) || busy;
5187
5482
  const emitAction = () => {
5188
5483
  if (!action) return;
@@ -5224,7 +5519,7 @@ var Button = React17__namespace.default.forwardRef(
5224
5519
  disabled && focused && "opacity-50 cursor-not-allowed",
5225
5520
  className
5226
5521
  );
5227
- const testId = dataTestId ?? (action ? `action-${action}` : void 0);
5522
+ const testId = dataTestId ?? (action ? core.actionTestId(action) : void 0);
5228
5523
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5229
5524
  busy && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "almadar-busy-indicator absolute inset-0 flex items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons2.Loader2, { className: "h-icon-default w-icon-default animate-spin" }) }),
5230
5525
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("inline-flex flex-1 min-w-0 items-center [justify-content:inherit] gap-2", busy && "almadar-busy-content"), children: [
@@ -5240,6 +5535,8 @@ var Button = React17__namespace.default.forwardRef(
5240
5535
  return;
5241
5536
  }
5242
5537
  emitAction();
5538
+ onClick?.(e);
5539
+ if (e.defaultPrevented) return;
5243
5540
  if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
5244
5541
  if (!href.startsWith("#") && isInertNavStack(navStack)) return;
5245
5542
  e.preventDefault();
@@ -5320,7 +5617,7 @@ var sizeStyles2 = {
5320
5617
  md: "px-2.5 py-1 text-sm",
5321
5618
  lg: "px-3 py-1.5 text-base"
5322
5619
  };
5323
- var Badge = React17__namespace.default.forwardRef(
5620
+ var Badge = React18__namespace.default.forwardRef(
5324
5621
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, onClick, ...props }, ref) => {
5325
5622
  const { t } = useTranslate();
5326
5623
  const iconSizes = {
@@ -5384,12 +5681,12 @@ var Badge = React17__namespace.default.forwardRef(
5384
5681
  }
5385
5682
  );
5386
5683
  Badge.displayName = "Badge";
5387
- var SurfaceContext = React17__namespace.default.createContext(false);
5684
+ var SurfaceContext = React18__namespace.default.createContext(false);
5388
5685
  function SurfaceBoundary({ children }) {
5389
5686
  return /* @__PURE__ */ jsxRuntime.jsx(SurfaceContext.Provider, { value: true, children });
5390
5687
  }
5391
5688
  function useContentSurface(surface = "auto") {
5392
- const onSurface = React17__namespace.default.useContext(SurfaceContext);
5689
+ const onSurface = React18__namespace.default.useContext(SurfaceContext);
5393
5690
  const paints = surface === "auto" && !onSurface;
5394
5691
  return {
5395
5692
  className: paints ? "surface-content" : void 0,
@@ -5402,7 +5699,7 @@ var sizeStyles3 = {
5402
5699
  md: "h-6 w-6",
5403
5700
  lg: "h-8 w-8"
5404
5701
  };
5405
- var Spinner = React17__namespace.default.forwardRef(
5702
+ var Spinner = React18__namespace.default.forwardRef(
5406
5703
  ({ className, size = "md", overlay, ...props }, ref) => {
5407
5704
  const { t } = useTranslate();
5408
5705
  if (overlay) {
@@ -5487,7 +5784,7 @@ var lookStyles = {
5487
5784
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
5488
5785
  "tile-image-first": "p-0 overflow-hidden"
5489
5786
  };
5490
- var Card = React17__namespace.default.forwardRef(
5787
+ var Card = React18__namespace.default.forwardRef(
5491
5788
  ({
5492
5789
  className,
5493
5790
  variant = "bordered",
@@ -5537,9 +5834,9 @@ var Card = React17__namespace.default.forwardRef(
5537
5834
  }
5538
5835
  );
5539
5836
  Card.displayName = "Card";
5540
- var CardHeader = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
5837
+ var CardHeader = React18__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
5541
5838
  CardHeader.displayName = "CardHeader";
5542
- var CardTitle = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5839
+ var CardTitle = React18__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5543
5840
  "h3",
5544
5841
  {
5545
5842
  ref,
@@ -5552,11 +5849,11 @@ var CardTitle = React17__namespace.default.forwardRef(({ className, ...props },
5552
5849
  }
5553
5850
  ));
5554
5851
  CardTitle.displayName = "CardTitle";
5555
- var CardContent = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
5852
+ var CardContent = React18__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
5556
5853
  CardContent.displayName = "CardContent";
5557
5854
  var CardBody = CardContent;
5558
5855
  CardBody.displayName = "CardBody";
5559
- var CardFooter = React17__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5856
+ var CardFooter = React18__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5560
5857
  "div",
5561
5858
  {
5562
5859
  ref,
@@ -5653,7 +5950,7 @@ var Center = ({
5653
5950
  ...rest
5654
5951
  }) => {
5655
5952
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
5656
- return React17__namespace.default.createElement(Component, {
5953
+ return React18__namespace.default.createElement(Component, {
5657
5954
  ...domPassthrough(rest),
5658
5955
  className: cn(
5659
5956
  inline ? "inline-flex" : "flex",
@@ -5760,8 +6057,8 @@ var Avatar = ({
5760
6057
  }) => {
5761
6058
  const eventBus = useEventBus();
5762
6059
  const { t } = useTranslate();
5763
- const [imgFailed, setImgFailed] = React17__namespace.default.useState(false);
5764
- React17__namespace.default.useEffect(() => {
6060
+ const [imgFailed, setImgFailed] = React18__namespace.default.useState(false);
6061
+ React18__namespace.default.useEffect(() => {
5765
6062
  setImgFailed(false);
5766
6063
  }, [src]);
5767
6064
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -5836,6 +6133,7 @@ var Avatar = ({
5836
6133
  statusClasses[status],
5837
6134
  statusSizeClasses[size]
5838
6135
  ),
6136
+ role: "img",
5839
6137
  "aria-label": t("avatar.status", { status: t(`avatar.status.${status}`) })
5840
6138
  }
5841
6139
  ),
@@ -5878,6 +6176,13 @@ var roundedClass = {
5878
6176
  "2xl": "rounded-[calc(var(--radius-xl)*1.5)]",
5879
6177
  full: "rounded-full"
5880
6178
  };
6179
+ var positionClass = {
6180
+ center: "object-center",
6181
+ top: "object-top",
6182
+ bottom: "object-bottom",
6183
+ left: "object-left",
6184
+ right: "object-right"
6185
+ };
5881
6186
  var Image2 = ({
5882
6187
  src,
5883
6188
  alt,
@@ -5886,6 +6191,10 @@ var Image2 = ({
5886
6191
  rounded = "md",
5887
6192
  bordered = false,
5888
6193
  loading = "lazy",
6194
+ position = "center",
6195
+ srcSet,
6196
+ sizes,
6197
+ priority = false,
5889
6198
  className,
5890
6199
  ...rest
5891
6200
  }) => {
@@ -5894,14 +6203,18 @@ var Image2 = ({
5894
6203
  "img",
5895
6204
  {
5896
6205
  src,
6206
+ srcSet,
6207
+ sizes,
6208
+ fetchPriority: priority ? "high" : void 0,
5897
6209
  alt,
5898
6210
  ...domPassthrough(rest),
5899
6211
  role: alt === "" ? "presentation" : rest.role,
5900
- loading,
6212
+ loading: priority ? "eager" : loading,
5901
6213
  decoding: "async",
5902
6214
  className: cn(
5903
6215
  "block w-full h-auto max-w-full",
5904
6216
  fitClass[fit],
6217
+ positionClass[position],
5905
6218
  aspectClass[aspect],
5906
6219
  roundedClass[rounded],
5907
6220
  bordered && "border border-border",
@@ -6117,7 +6430,7 @@ var Container = ({
6117
6430
  ...rest
6118
6431
  }) => {
6119
6432
  const resolvedSize = maxWidth ?? size ?? "lg";
6120
- return React17__namespace.default.createElement(
6433
+ return React18__namespace.default.createElement(
6121
6434
  Component,
6122
6435
  {
6123
6436
  ...domPassthrough(rest),
@@ -6228,10 +6541,10 @@ function ListSkeleton({ rows = 5, className }) {
6228
6541
  ] }, i)) });
6229
6542
  }
6230
6543
  function GridSkeleton({ rows = 6, className }) {
6231
- return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "260px", gap: "md", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, {}, i)) });
6544
+ return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "256px", gap: "md", className, children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(CardSkeleton, {}, i)) });
6232
6545
  }
6233
6546
  function StatsSkeleton({ columns = 4, className }) {
6234
- return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "180px", gap: "md", className, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4 border border-border rounded-container", children: [
6547
+ return /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "176px", gap: "md", className, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4 border border-border rounded-container", children: [
6235
6548
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/2 h-3" }),
6236
6549
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-7 w-2/3" })
6237
6550
  ] }, i)) });
@@ -6253,7 +6566,7 @@ function DetailSkeleton({ rows = 6, className }) {
6253
6566
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" }),
6254
6567
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-20 flex-1" })
6255
6568
  ] }),
6256
- /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "200px", maxCols: 3, gap: "md", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
6569
+ /* @__PURE__ */ jsxRuntime.jsx(SimpleGrid, { minChildWidth: "192px", maxCols: 3, gap: "md", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
6257
6570
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonLine, { className: "w-1/3 h-3" }),
6258
6571
  /* @__PURE__ */ jsxRuntime.jsx(SkeletonBlock, { className: "h-5 w-2/3" })
6259
6572
  ] }, i)) }),
@@ -6270,8 +6583,8 @@ function Skeleton({
6270
6583
  ...rest
6271
6584
  }) {
6272
6585
  const { t } = useTranslate();
6273
- const shape = spec !== void 0 ? shapeOfSpec(spec) : { variant, rows, columns, fields };
6274
- if (shape === null) return null;
6586
+ const shape2 = spec !== void 0 ? shapeOfSpec(spec) : { variant, rows, columns, fields };
6587
+ if (shape2 === null) return null;
6275
6588
  return /* @__PURE__ */ jsxRuntime.jsx(
6276
6589
  Box,
6277
6590
  {
@@ -6279,10 +6592,10 @@ function Skeleton({
6279
6592
  role: "status",
6280
6593
  "aria-busy": "true",
6281
6594
  "aria-label": rest["aria-label"] ?? t("common.loading"),
6282
- "data-skeleton": shape.variant,
6595
+ "data-skeleton": shape2.variant,
6283
6596
  ...{ [core.LOADING_STATE_MARKER]: "" },
6284
6597
  className: "w-full",
6285
- children: renderVariant(shape.variant, shape.rows, shape.columns, shape.fields, className)
6598
+ children: renderVariant(shape2.variant, shape2.rows, shape2.columns, shape2.fields, className)
6286
6599
  }
6287
6600
  );
6288
6601
  }
@@ -6420,7 +6733,7 @@ var StatDisplay = ({
6420
6733
  const contentSurface = useContentSurface(surface);
6421
6734
  const eventBus = useEventBus();
6422
6735
  const fmt = useFormatContext();
6423
- const handleClick = React17.useCallback(() => {
6736
+ const handleClick = React18.useCallback(() => {
6424
6737
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { metricLabel: label });
6425
6738
  }, [clickEvent, eventBus, label]);
6426
6739
  const ResolvedIcon = typeof iconProp === "string" ? resolveIcon(iconProp) : typeof iconProp === "function" ? iconProp : null;
@@ -6574,14 +6887,14 @@ var AnimatedCounter = ({
6574
6887
  ...rest
6575
6888
  }) => {
6576
6889
  const fmt = useFormatContext();
6577
- const ref = React17.useRef(null);
6890
+ const ref = React18.useRef(null);
6578
6891
  const parsed = parseValue(value);
6579
6892
  const target = parsed.num ?? 0;
6580
- const [visible, setVisible] = React17.useState(() => typeof IntersectionObserver === "undefined");
6581
- const [display, setDisplay] = React17.useState(() => typeof IntersectionObserver === "undefined" ? target : 0);
6582
- const shownRef = React17.useRef(display);
6583
- const frameRef = React17.useRef(null);
6584
- React17.useEffect(() => {
6893
+ const [visible, setVisible] = React18.useState(() => typeof IntersectionObserver === "undefined");
6894
+ const [display, setDisplay] = React18.useState(() => typeof IntersectionObserver === "undefined" ? target : 0);
6895
+ const shownRef = React18.useRef(display);
6896
+ const frameRef = React18.useRef(null);
6897
+ React18.useEffect(() => {
6585
6898
  if (visible) return;
6586
6899
  const el = ref.current;
6587
6900
  if (!el || typeof IntersectionObserver === "undefined") {
@@ -6600,7 +6913,7 @@ var AnimatedCounter = ({
6600
6913
  observer2.observe(el);
6601
6914
  return () => observer2.disconnect();
6602
6915
  }, [visible]);
6603
- React17.useEffect(() => {
6916
+ React18.useEffect(() => {
6604
6917
  if (!visible) return;
6605
6918
  const from = shownRef.current;
6606
6919
  if (from === target || prefersReducedMotion() || typeof requestAnimationFrame === "undefined") {
@@ -6629,6 +6942,35 @@ var AnimatedCounter = ({
6629
6942
  ] });
6630
6943
  };
6631
6944
  AnimatedCounter.displayName = "AnimatedCounter";
6945
+ function useMediaQuery(query) {
6946
+ const subscribe = React18.useCallback(
6947
+ (onChange) => {
6948
+ if (!hasMatchMedia()) return () => void 0;
6949
+ const mql = window.matchMedia(query);
6950
+ mql.addEventListener("change", onChange);
6951
+ return () => mql.removeEventListener("change", onChange);
6952
+ },
6953
+ [query]
6954
+ );
6955
+ return React18.useSyncExternalStore(
6956
+ subscribe,
6957
+ () => hasMatchMedia() && window.matchMedia(query).matches,
6958
+ () => false
6959
+ );
6960
+ }
6961
+ function hasMatchMedia() {
6962
+ return typeof window !== "undefined" && typeof window.matchMedia === "function";
6963
+ }
6964
+
6965
+ // hooks/usePrefersReducedMotion.ts
6966
+ function usePrefersReducedMotion() {
6967
+ return useMediaQuery("(prefers-reduced-motion: reduce)");
6968
+ }
6969
+ var revealLog = logger.createLogger("almadar:ui:animated-reveal");
6970
+ function revealThresholds(threshold) {
6971
+ const steps = Array.from({ length: 20 }, (_, i) => i * threshold / 20);
6972
+ return [...steps, threshold];
6973
+ }
6632
6974
  var initialStyles = {
6633
6975
  "fade-up": { opacity: 0, transform: "translateY(24px)" },
6634
6976
  "fade-down": { opacity: 0, transform: "translateY(-24px)" },
@@ -6649,7 +6991,7 @@ var animatedStyles = {
6649
6991
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
6650
6992
  "none": {}
6651
6993
  };
6652
- var AnimatedReveal = React17__namespace.default.forwardRef(
6994
+ var AnimatedReveal = React18__namespace.default.forwardRef(
6653
6995
  ({
6654
6996
  trigger = "scroll",
6655
6997
  animation = "fade-up",
@@ -6657,6 +6999,9 @@ var AnimatedReveal = React17__namespace.default.forwardRef(
6657
6999
  delay = 0,
6658
7000
  threshold = 0.15,
6659
7001
  once = true,
7002
+ revealEvent,
7003
+ enterEvent,
7004
+ leaveEvent,
6660
7005
  animate: manualAnimate,
6661
7006
  easing = "cubic-bezier(0.16, 1, 0.3, 1)",
6662
7007
  children,
@@ -6664,10 +7009,14 @@ var AnimatedReveal = React17__namespace.default.forwardRef(
6664
7009
  style,
6665
7010
  ...props
6666
7011
  }, forwardedRef) => {
6667
- const [isAnimated, setIsAnimated] = React17.useState(false);
6668
- const internalRef = React17.useRef(null);
6669
- const hasAnimated = React17.useRef(false);
6670
- const setRef = React17.useCallback(
7012
+ const [isAnimated, setIsAnimated] = React18.useState(false);
7013
+ const reducedMotion = usePrefersReducedMotion();
7014
+ const eventBus = useEventBus();
7015
+ const revealEmitted = React18.useRef(false);
7016
+ const internalRef = React18.useRef(null);
7017
+ const hasAnimated = React18.useRef(false);
7018
+ const inView = React18.useRef(false);
7019
+ const setRef = React18.useCallback(
6671
7020
  (node) => {
6672
7021
  internalRef.current = node;
6673
7022
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -6675,25 +7024,48 @@ var AnimatedReveal = React17__namespace.default.forwardRef(
6675
7024
  },
6676
7025
  [forwardedRef]
6677
7026
  );
6678
- React17.useEffect(() => {
7027
+ React18.useEffect(() => {
6679
7028
  if (trigger !== "scroll") return;
6680
7029
  const el = internalRef.current;
6681
7030
  if (!el) return;
6682
7031
  const observer2 = new IntersectionObserver(
6683
7032
  ([entry]) => {
6684
- if (entry.isIntersecting) {
7033
+ if (entry.isIntersecting !== inView.current) {
7034
+ const event = entry.isIntersecting ? enterEvent : leaveEvent;
7035
+ inView.current = entry.isIntersecting;
7036
+ if (event) eventBus.emit(`UI:${event}`, {});
7037
+ }
7038
+ const seenEnough = entry.isIntersecting && (entry.intersectionRatio >= threshold || entry.rootBounds !== null && entry.intersectionRect.height >= threshold * entry.rootBounds.height);
7039
+ if (seenEnough) {
7040
+ if (revealEvent && !reducedMotion && !revealEmitted.current) {
7041
+ revealEmitted.current = true;
7042
+ revealLog.debug("reveal event", { event: revealEvent });
7043
+ eventBus.emit(`UI:${revealEvent}`, {});
7044
+ }
6685
7045
  if (once && hasAnimated.current) return;
6686
7046
  hasAnimated.current = true;
6687
7047
  setIsAnimated(true);
6688
- } else if (!once) {
7048
+ } else if (!entry.isIntersecting && !once) {
6689
7049
  setIsAnimated(false);
6690
7050
  }
6691
7051
  },
6692
- { threshold }
7052
+ { threshold: revealThresholds(threshold) }
7053
+ );
7054
+ observer2.observe(el);
7055
+ return () => observer2.disconnect();
7056
+ }, [trigger, threshold, once, revealEvent, enterEvent, leaveEvent, reducedMotion, eventBus]);
7057
+ React18.useEffect(() => {
7058
+ const el = internalRef.current;
7059
+ if (!el || typeof IntersectionObserver === "undefined") return;
7060
+ const observer2 = new IntersectionObserver(
7061
+ ([entry]) => {
7062
+ el.dataset.onScreen = entry.isIntersecting ? "true" : "false";
7063
+ },
7064
+ { rootMargin: "200px" }
6693
7065
  );
6694
7066
  observer2.observe(el);
6695
7067
  return () => observer2.disconnect();
6696
- }, [trigger, threshold, once]);
7068
+ }, []);
6697
7069
  const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
6698
7070
  const handleMouseLeave = trigger === "hover" ? () => {
6699
7071
  if (!once || !hasAnimated.current) {
@@ -6701,22 +7073,24 @@ var AnimatedReveal = React17__namespace.default.forwardRef(
6701
7073
  setIsAnimated(false);
6702
7074
  }
6703
7075
  } : void 0;
6704
- React17.useEffect(() => {
7076
+ React18.useEffect(() => {
6705
7077
  if (trigger === "manual" && manualAnimate !== void 0) {
6706
7078
  setIsAnimated(manualAnimate);
6707
7079
  }
6708
7080
  }, [trigger, manualAnimate]);
6709
- const active = isAnimated;
7081
+ const active = isAnimated || reducedMotion;
6710
7082
  const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
6711
7083
  return /* @__PURE__ */ jsxRuntime.jsx(
6712
7084
  "div",
6713
7085
  {
6714
7086
  ref: setRef,
6715
- className: cn("will-change-[opacity,transform]", className),
7087
+ className: cn(className),
6716
7088
  style: {
6717
7089
  ...currentStyle,
7090
+ // A revealed band is page-sized: keeping the layer hint after the reveal holds a huge GPU layer.
7091
+ willChange: active ? "auto" : "opacity, transform",
6718
7092
  transitionProperty: "opacity, transform",
6719
- transitionDuration: `${duration}ms`,
7093
+ transitionDuration: reducedMotion ? "0ms" : `${duration}ms`,
6720
7094
  transitionDelay: `${delay}ms`,
6721
7095
  transitionTimingFunction: easing,
6722
7096
  ...style
@@ -6731,9 +7105,9 @@ var AnimatedReveal = React17__namespace.default.forwardRef(
6731
7105
  );
6732
7106
  AnimatedReveal.displayName = "AnimatedReveal";
6733
7107
  function useFetchedSvg(src) {
6734
- const [svg, setSvg] = React17.useState(null);
6735
- const cache = React17.useRef({});
6736
- React17.useEffect(() => {
7108
+ const [svg, setSvg] = React18.useState(null);
7109
+ const cache = React18.useRef({});
7110
+ React18.useEffect(() => {
6737
7111
  if (!src) {
6738
7112
  setSvg(null);
6739
7113
  return;
@@ -6802,7 +7176,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
6802
7176
  el.style.opacity = animate ? "1" : "0";
6803
7177
  });
6804
7178
  }
6805
- var AnimatedGraphic = React17__namespace.default.forwardRef(
7179
+ var AnimatedGraphic = React18__namespace.default.forwardRef(
6806
7180
  ({
6807
7181
  src,
6808
7182
  svgContent,
@@ -6821,11 +7195,11 @@ var AnimatedGraphic = React17__namespace.default.forwardRef(
6821
7195
  children,
6822
7196
  ...props
6823
7197
  }, ref) => {
6824
- const containerRef = React17.useRef(null);
7198
+ const containerRef = React18.useRef(null);
6825
7199
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6826
7200
  const resolvedSvg = svgContent ?? fetchedSvg;
6827
- const prevAnimateRef = React17.useRef(animate);
6828
- const setRef = React17__namespace.default.useCallback(
7201
+ const prevAnimateRef = React18.useRef(animate);
7202
+ const setRef = React18__namespace.default.useCallback(
6829
7203
  (node) => {
6830
7204
  containerRef.current = node;
6831
7205
  if (typeof ref === "function") ref(node);
@@ -6833,7 +7207,7 @@ var AnimatedGraphic = React17__namespace.default.forwardRef(
6833
7207
  },
6834
7208
  [ref]
6835
7209
  );
6836
- React17.useEffect(() => {
7210
+ React18.useEffect(() => {
6837
7211
  const el = containerRef.current;
6838
7212
  if (!el || !strokeColor) return;
6839
7213
  const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
@@ -6841,7 +7215,7 @@ var AnimatedGraphic = React17__namespace.default.forwardRef(
6841
7215
  p.style.stroke = strokeColor;
6842
7216
  });
6843
7217
  }, [resolvedSvg, strokeColor]);
6844
- React17.useEffect(() => {
7218
+ React18.useEffect(() => {
6845
7219
  const el = containerRef.current;
6846
7220
  if (!el || !resolvedSvg) return;
6847
7221
  if (animation === "draw" || animation === "fill") {
@@ -6866,7 +7240,7 @@ var AnimatedGraphic = React17__namespace.default.forwardRef(
6866
7240
  });
6867
7241
  }
6868
7242
  }, [resolvedSvg, animation]);
6869
- React17.useEffect(() => {
7243
+ React18.useEffect(() => {
6870
7244
  const el = containerRef.current;
6871
7245
  if (!el) return;
6872
7246
  const id = requestAnimationFrame(() => {
@@ -6903,6 +7277,7 @@ var AnimatedGraphic = React17__namespace.default.forwardRef(
6903
7277
  "div",
6904
7278
  {
6905
7279
  className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
7280
+ "aria-hidden": "true",
6906
7281
  dangerouslySetInnerHTML: { __html: resolvedSvg }
6907
7282
  }
6908
7283
  ) : children
@@ -7667,7 +8042,7 @@ var GeometricPattern = ({
7667
8042
  children,
7668
8043
  className
7669
8044
  }) => {
7670
- const reactId = React17.useId();
8045
+ const reactId = React18.useId();
7671
8046
  const patternId = `gp${reactId.replace(/:/g, "")}`;
7672
8047
  const size = 60 * scale2;
7673
8048
  const stripHeight = 40 * scale2;
@@ -7902,7 +8277,7 @@ var EdgeDecoration = ({
7902
8277
  width = 15,
7903
8278
  className
7904
8279
  }) => {
7905
- const id = React17.useId();
8280
+ const id = React18.useId();
7906
8281
  const Variant = VARIANT_MAP2[variant];
7907
8282
  const resolvedColor = color in colorTokenVars2 ? colorTokenVars2[color] : color;
7908
8283
  const sides = side === "both" ? ["left", "right"] : [side];