react-docs-ui 0.7.1 → 0.7.3

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.
@@ -22736,22 +22736,31 @@ var sx = {
22736
22736
  Mermaid: b
22737
22737
  }, cx = null;
22738
22738
  function lx() {
22739
- return cx ||= import("./mdx-components-TEc3uhbY.js").then((e) => e && e.MDX_COMPONENTS ? e.MDX_COMPONENTS : null).catch(() => null), cx;
22739
+ let e = globalThis.__REACT_DOCS_UI_MDX_COMPONENTS__;
22740
+ return e && typeof e == "object" ? e : null;
22740
22741
  }
22741
- async function ux() {
22742
+ function ux() {
22743
+ if (!cx) {
22744
+ let e = lx();
22745
+ if (e) return cx = Promise.resolve(e), cx;
22746
+ cx = import("./mdx-components-TEc3uhbY.js").then((e) => e && e.MDX_COMPONENTS ? e.MDX_COMPONENTS : null).catch(() => null);
22747
+ }
22748
+ return cx;
22749
+ }
22750
+ async function dx() {
22742
22751
  try {
22743
- return await lx();
22752
+ return await ux();
22744
22753
  } catch {
22745
22754
  return null;
22746
22755
  }
22747
22756
  }
22748
- function dx() {
22749
- lx();
22757
+ function fx() {
22758
+ ux();
22750
22759
  }
22751
- async function fx(e = "/src/components") {
22760
+ async function px(e = "/src/components") {
22752
22761
  return [];
22753
22762
  }
22754
- async function px(e) {
22763
+ async function mx(e) {
22755
22764
  try {
22756
22765
  let t = await import(
22757
22766
  /* @vite-ignore */
@@ -22762,22 +22771,22 @@ async function px(e) {
22762
22771
  return console.warn(`[MDX] 无法导入组件 ${e}:`, t), null;
22763
22772
  }
22764
22773
  }
22765
- async function mx(e, t) {
22774
+ async function hx(e, t) {
22766
22775
  let n = {};
22767
22776
  Object.assign(n, sx);
22768
- let r = await ux();
22777
+ let r = await dx();
22769
22778
  if (r && Object.keys(r).length > 0 && Object.assign(n, r), t && Object.keys(t).length > 0 && !r) for (let [e, r] of Object.entries(t)) try {
22770
- let t = await px(r);
22779
+ let t = await mx(r);
22771
22780
  t && (n[e] = t);
22772
22781
  } catch (t) {
22773
22782
  console.warn(`[MDX] 加载组件 ${e} 失败:`, t);
22774
22783
  }
22775
22784
  return n;
22776
22785
  }
22777
- function hx() {
22786
+ function gx() {
22778
22787
  return { ...sx };
22779
22788
  }
22780
- function gx(e = {}) {
22789
+ function _x(e = {}) {
22781
22790
  return {
22782
22791
  ...sx,
22783
22792
  ...e
@@ -22785,7 +22794,7 @@ function gx(e = {}) {
22785
22794
  }
22786
22795
  //#endregion
22787
22796
  //#region src/lib/navigation.ts
22788
- function _x(e, t, n, r) {
22797
+ function vx(e, t, n, r) {
22789
22798
  if (!e) return {
22790
22799
  prev: null,
22791
22800
  next: null
@@ -22812,37 +22821,37 @@ function _x(e, t, n, r) {
22812
22821
  };
22813
22822
  }
22814
22823
  typeof window < "u" && window.document && window.document.createElement;
22815
- function vx(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
22824
+ function yx(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
22816
22825
  return function(r) {
22817
22826
  if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
22818
22827
  };
22819
22828
  }
22820
22829
  //#endregion
22821
22830
  //#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
22822
- function yx(e, t) {
22831
+ function bx(e, t) {
22823
22832
  if (typeof e == "function") return e(t);
22824
22833
  e != null && (e.current = t);
22825
22834
  }
22826
- function bx(...e) {
22835
+ function xx(...e) {
22827
22836
  return (t) => {
22828
22837
  let n = !1, r = e.map((e) => {
22829
- let r = yx(e, t);
22838
+ let r = bx(e, t);
22830
22839
  return !n && typeof r == "function" && (n = !0), r;
22831
22840
  });
22832
22841
  if (n) return () => {
22833
22842
  for (let t = 0; t < r.length; t++) {
22834
22843
  let n = r[t];
22835
- typeof n == "function" ? n() : yx(e[t], null);
22844
+ typeof n == "function" ? n() : bx(e[t], null);
22836
22845
  }
22837
22846
  };
22838
22847
  };
22839
22848
  }
22840
- function xx(...e) {
22841
- return N.useCallback(bx(...e), e);
22849
+ function Sx(...e) {
22850
+ return N.useCallback(xx(...e), e);
22842
22851
  }
22843
22852
  //#endregion
22844
22853
  //#region node_modules/@radix-ui/react-context/dist/index.mjs
22845
- function Sx(e, t = []) {
22854
+ function Cx(e, t = []) {
22846
22855
  let n = [];
22847
22856
  function r(t, r) {
22848
22857
  let i = N.createContext(r), a = n.length;
@@ -22873,9 +22882,9 @@ function Sx(e, t = []) {
22873
22882
  } }), [n, r]);
22874
22883
  };
22875
22884
  };
22876
- return i.scopeName = e, [r, Cx(i, ...t)];
22885
+ return i.scopeName = e, [r, wx(i, ...t)];
22877
22886
  }
22878
- function Cx(...e) {
22887
+ function wx(...e) {
22879
22888
  let t = e[0];
22880
22889
  if (e.length === 1) return t;
22881
22890
  let n = () => {
@@ -22898,8 +22907,8 @@ function Cx(...e) {
22898
22907
  }
22899
22908
  //#endregion
22900
22909
  //#region node_modules/@radix-ui/react-collection/dist/index.mjs
22901
- function wx(e) {
22902
- let t = e + "CollectionProvider", [n, r] = Sx(t), [i, a] = n(t, {
22910
+ function Tx(e) {
22911
+ let t = e + "CollectionProvider", [n, r] = Cx(t), [i, a] = n(t, {
22903
22912
  collectionRef: { current: null },
22904
22913
  itemMap: /* @__PURE__ */ new Map()
22905
22914
  }), o = (e) => {
@@ -22915,13 +22924,13 @@ function wx(e) {
22915
22924
  let s = e + "CollectionSlot", c = Ye(s), l = P.forwardRef((e, t) => {
22916
22925
  let { scope: n, children: r } = e;
22917
22926
  return /* @__PURE__ */ U(c, {
22918
- ref: xx(t, a(s, n).collectionRef),
22927
+ ref: Sx(t, a(s, n).collectionRef),
22919
22928
  children: r
22920
22929
  });
22921
22930
  });
22922
22931
  l.displayName = s;
22923
22932
  let u = e + "CollectionItemSlot", d = "data-radix-collection-item", f = Ye(u), p = P.forwardRef((e, t) => {
22924
- let { scope: n, children: r, ...i } = e, o = P.useRef(null), s = xx(t, o), c = a(u, n);
22933
+ let { scope: n, children: r, ...i } = e, o = P.useRef(null), s = Sx(t, o), c = a(u, n);
22925
22934
  return P.useEffect(() => (c.itemMap.set(o, {
22926
22935
  ref: o,
22927
22936
  ...i
@@ -22953,7 +22962,7 @@ function wx(e) {
22953
22962
  }
22954
22963
  //#endregion
22955
22964
  //#region node_modules/@radix-ui/react-primitive/dist/index.mjs
22956
- var Tx = [
22965
+ var Ex = [
22957
22966
  "a",
22958
22967
  "button",
22959
22968
  "div",
@@ -22984,12 +22993,12 @@ var Tx = [
22984
22993
  [t]: r
22985
22994
  };
22986
22995
  }, {});
22987
- function Ex(e, t) {
22996
+ function Dx(e, t) {
22988
22997
  e && it.flushSync(() => e.dispatchEvent(t));
22989
22998
  }
22990
22999
  //#endregion
22991
23000
  //#region node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
22992
- function Dx(e) {
23001
+ function Ox(e) {
22993
23002
  let t = N.useRef(e);
22994
23003
  return N.useEffect(() => {
22995
23004
  t.current = e;
@@ -22997,8 +23006,8 @@ function Dx(e) {
22997
23006
  }
22998
23007
  //#endregion
22999
23008
  //#region node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
23000
- function Ox(e, t = globalThis?.document) {
23001
- let n = Dx(e);
23009
+ function kx(e, t = globalThis?.document) {
23010
+ let n = Ox(e);
23002
23011
  N.useEffect(() => {
23003
23012
  let e = (e) => {
23004
23013
  e.key === "Escape" && n(e);
@@ -23008,23 +23017,23 @@ function Ox(e, t = globalThis?.document) {
23008
23017
  }
23009
23018
  //#endregion
23010
23019
  //#region node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
23011
- var kx = "DismissableLayer", Ax = "dismissableLayer.update", jx = "dismissableLayer.pointerDownOutside", Mx = "dismissableLayer.focusOutside", Nx, Px = N.createContext({
23020
+ var Ax = "DismissableLayer", jx = "dismissableLayer.update", Mx = "dismissableLayer.pointerDownOutside", Nx = "dismissableLayer.focusOutside", Px, Fx = N.createContext({
23012
23021
  layers: /* @__PURE__ */ new Set(),
23013
23022
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
23014
23023
  branches: /* @__PURE__ */ new Set()
23015
- }), Fx = N.forwardRef((e, t) => {
23016
- let { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: a, onInteractOutside: o, onDismiss: s, ...c } = e, l = N.useContext(Px), [u, d] = N.useState(null), f = u?.ownerDocument ?? globalThis?.document, [, p] = N.useState({}), m = xx(t, (e) => d(e)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = h.indexOf(g), v = u ? h.indexOf(u) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, b = v >= _, x = Rx((e) => {
23024
+ }), Ix = N.forwardRef((e, t) => {
23025
+ let { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: a, onInteractOutside: o, onDismiss: s, ...c } = e, l = N.useContext(Fx), [u, d] = N.useState(null), f = u?.ownerDocument ?? globalThis?.document, [, p] = N.useState({}), m = Sx(t, (e) => d(e)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = h.indexOf(g), v = u ? h.indexOf(u) : -1, y = l.layersWithOutsidePointerEventsDisabled.size > 0, b = v >= _, x = zx((e) => {
23017
23026
  let t = e.target, n = [...l.branches].some((e) => e.contains(t));
23018
23027
  !b || n || (i?.(e), o?.(e), e.defaultPrevented || s?.());
23019
- }, f), S = zx((e) => {
23028
+ }, f), S = Bx((e) => {
23020
23029
  let t = e.target;
23021
23030
  [...l.branches].some((e) => e.contains(t)) || (a?.(e), o?.(e), e.defaultPrevented || s?.());
23022
23031
  }, f);
23023
- return Ox((e) => {
23032
+ return kx((e) => {
23024
23033
  v === l.layers.size - 1 && (r?.(e), !e.defaultPrevented && s && (e.preventDefault(), s()));
23025
23034
  }, f), N.useEffect(() => {
23026
- if (u) return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Nx = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(u)), l.layers.add(u), Bx(), () => {
23027
- n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = Nx);
23035
+ if (u) return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Px = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(u)), l.layers.add(u), Vx(), () => {
23036
+ n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = Px);
23028
23037
  };
23029
23038
  }, [
23030
23039
  u,
@@ -23032,43 +23041,43 @@ var kx = "DismissableLayer", Ax = "dismissableLayer.update", jx = "dismissableLa
23032
23041
  n,
23033
23042
  l
23034
23043
  ]), N.useEffect(() => () => {
23035
- u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u), Bx());
23044
+ u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u), Vx());
23036
23045
  }, [u, l]), N.useEffect(() => {
23037
23046
  let e = () => p({});
23038
- return document.addEventListener(Ax, e), () => document.removeEventListener(Ax, e);
23039
- }, []), /* @__PURE__ */ U(Tx.div, {
23047
+ return document.addEventListener(jx, e), () => document.removeEventListener(jx, e);
23048
+ }, []), /* @__PURE__ */ U(Ex.div, {
23040
23049
  ...c,
23041
23050
  ref: m,
23042
23051
  style: {
23043
23052
  pointerEvents: y ? b ? "auto" : "none" : void 0,
23044
23053
  ...e.style
23045
23054
  },
23046
- onFocusCapture: vx(e.onFocusCapture, S.onFocusCapture),
23047
- onBlurCapture: vx(e.onBlurCapture, S.onBlurCapture),
23048
- onPointerDownCapture: vx(e.onPointerDownCapture, x.onPointerDownCapture)
23055
+ onFocusCapture: yx(e.onFocusCapture, S.onFocusCapture),
23056
+ onBlurCapture: yx(e.onBlurCapture, S.onBlurCapture),
23057
+ onPointerDownCapture: yx(e.onPointerDownCapture, x.onPointerDownCapture)
23049
23058
  });
23050
23059
  });
23051
- Fx.displayName = kx;
23052
- var Ix = "DismissableLayerBranch", Lx = N.forwardRef((e, t) => {
23053
- let n = N.useContext(Px), r = N.useRef(null), i = xx(t, r);
23060
+ Ix.displayName = Ax;
23061
+ var Lx = "DismissableLayerBranch", Rx = N.forwardRef((e, t) => {
23062
+ let n = N.useContext(Fx), r = N.useRef(null), i = Sx(t, r);
23054
23063
  return N.useEffect(() => {
23055
23064
  let e = r.current;
23056
23065
  if (e) return n.branches.add(e), () => {
23057
23066
  n.branches.delete(e);
23058
23067
  };
23059
- }, [n.branches]), /* @__PURE__ */ U(Tx.div, {
23068
+ }, [n.branches]), /* @__PURE__ */ U(Ex.div, {
23060
23069
  ...e,
23061
23070
  ref: i
23062
23071
  });
23063
23072
  });
23064
- Lx.displayName = Ix;
23065
- function Rx(e, t = globalThis?.document) {
23066
- let n = Dx(e), r = N.useRef(!1), i = N.useRef(() => {});
23073
+ Rx.displayName = Lx;
23074
+ function zx(e, t = globalThis?.document) {
23075
+ let n = Ox(e), r = N.useRef(!1), i = N.useRef(() => {});
23067
23076
  return N.useEffect(() => {
23068
23077
  let e = (e) => {
23069
23078
  if (e.target && !r.current) {
23070
23079
  let r = function() {
23071
- Vx(jx, n, a, { discrete: !0 });
23080
+ Hx(Mx, n, a, { discrete: !0 });
23072
23081
  }, a = { originalEvent: e };
23073
23082
  e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
23074
23083
  } else t.removeEventListener("click", i.current);
@@ -23081,11 +23090,11 @@ function Rx(e, t = globalThis?.document) {
23081
23090
  };
23082
23091
  }, [t, n]), { onPointerDownCapture: () => r.current = !0 };
23083
23092
  }
23084
- function zx(e, t = globalThis?.document) {
23085
- let n = Dx(e), r = N.useRef(!1);
23093
+ function Bx(e, t = globalThis?.document) {
23094
+ let n = Ox(e), r = N.useRef(!1);
23086
23095
  return N.useEffect(() => {
23087
23096
  let e = (e) => {
23088
- e.target && !r.current && Vx(Mx, n, { originalEvent: e }, { discrete: !1 });
23097
+ e.target && !r.current && Hx(Nx, n, { originalEvent: e }, { discrete: !1 });
23089
23098
  };
23090
23099
  return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
23091
23100
  }, [t, n]), {
@@ -23093,40 +23102,40 @@ function zx(e, t = globalThis?.document) {
23093
23102
  onBlurCapture: () => r.current = !1
23094
23103
  };
23095
23104
  }
23096
- function Bx() {
23097
- let e = new CustomEvent(Ax);
23105
+ function Vx() {
23106
+ let e = new CustomEvent(jx);
23098
23107
  document.dispatchEvent(e);
23099
23108
  }
23100
- function Vx(e, t, n, { discrete: r }) {
23109
+ function Hx(e, t, n, { discrete: r }) {
23101
23110
  let i = n.originalEvent.target, a = new CustomEvent(e, {
23102
23111
  bubbles: !1,
23103
23112
  cancelable: !0,
23104
23113
  detail: n
23105
23114
  });
23106
- t && i.addEventListener(e, t, { once: !0 }), r ? Ex(i, a) : i.dispatchEvent(a);
23115
+ t && i.addEventListener(e, t, { once: !0 }), r ? Dx(i, a) : i.dispatchEvent(a);
23107
23116
  }
23108
- var Hx = Fx, Ux = Lx, Wx = globalThis?.document ? N.useLayoutEffect : () => {}, Gx = "Portal", Kx = N.forwardRef((e, t) => {
23117
+ var Ux = Ix, Wx = Rx, Gx = globalThis?.document ? N.useLayoutEffect : () => {}, Kx = "Portal", qx = N.forwardRef((e, t) => {
23109
23118
  let { container: n, ...r } = e, [i, a] = N.useState(!1);
23110
- Wx(() => a(!0), []);
23119
+ Gx(() => a(!0), []);
23111
23120
  let o = n || i && globalThis?.document?.body;
23112
- return o ? at.createPortal(/* @__PURE__ */ U(Tx.div, {
23121
+ return o ? at.createPortal(/* @__PURE__ */ U(Ex.div, {
23113
23122
  ...r,
23114
23123
  ref: t
23115
23124
  }), o) : null;
23116
23125
  });
23117
- Kx.displayName = Gx;
23126
+ qx.displayName = Kx;
23118
23127
  //#endregion
23119
23128
  //#region node_modules/@radix-ui/react-presence/dist/index.mjs
23120
- function qx(e, t) {
23129
+ function Jx(e, t) {
23121
23130
  return N.useReducer((e, n) => t[e][n] ?? e, e);
23122
23131
  }
23123
- var Jx = (e) => {
23124
- let { present: t, children: n } = e, r = Yx(t), i = typeof n == "function" ? n({ present: r.isPresent }) : N.Children.only(n), a = xx(r.ref, Zx(i));
23132
+ var Yx = (e) => {
23133
+ let { present: t, children: n } = e, r = Xx(t), i = typeof n == "function" ? n({ present: r.isPresent }) : N.Children.only(n), a = Sx(r.ref, Qx(i));
23125
23134
  return typeof n == "function" || r.isPresent ? N.cloneElement(i, { ref: a }) : null;
23126
23135
  };
23127
- Jx.displayName = "Presence";
23128
- function Yx(e) {
23129
- let [t, n] = N.useState(), r = N.useRef(null), i = N.useRef(e), a = N.useRef("none"), [o, s] = qx(e ? "mounted" : "unmounted", {
23136
+ Yx.displayName = "Presence";
23137
+ function Xx(e) {
23138
+ let [t, n] = N.useState(), r = N.useRef(null), i = N.useRef(e), a = N.useRef("none"), [o, s] = Jx(e ? "mounted" : "unmounted", {
23130
23139
  mounted: {
23131
23140
  UNMOUNT: "unmounted",
23132
23141
  ANIMATION_OUT: "unmountSuspended"
@@ -23138,18 +23147,18 @@ function Yx(e) {
23138
23147
  unmounted: { MOUNT: "mounted" }
23139
23148
  });
23140
23149
  return N.useEffect(() => {
23141
- let e = Xx(r.current);
23150
+ let e = Zx(r.current);
23142
23151
  a.current = o === "mounted" ? e : "none";
23143
- }, [o]), Wx(() => {
23152
+ }, [o]), Gx(() => {
23144
23153
  let t = r.current, n = i.current;
23145
23154
  if (n !== e) {
23146
- let r = a.current, o = Xx(t);
23155
+ let r = a.current, o = Zx(t);
23147
23156
  e ? s("MOUNT") : o === "none" || t?.display === "none" ? s("UNMOUNT") : s(n && r !== o ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
23148
23157
  }
23149
- }, [e, s]), Wx(() => {
23158
+ }, [e, s]), Gx(() => {
23150
23159
  if (t) {
23151
23160
  let e, n = t.ownerDocument.defaultView ?? window, o = (a) => {
23152
- let o = Xx(r.current).includes(CSS.escape(a.animationName));
23161
+ let o = Zx(r.current).includes(CSS.escape(a.animationName));
23153
23162
  if (a.target === t && o && (s("ANIMATION_END"), !i.current)) {
23154
23163
  let r = t.style.animationFillMode;
23155
23164
  t.style.animationFillMode = "forwards", e = n.setTimeout(() => {
@@ -23157,7 +23166,7 @@ function Yx(e) {
23157
23166
  });
23158
23167
  }
23159
23168
  }, c = (e) => {
23160
- e.target === t && (a.current = Xx(r.current));
23169
+ e.target === t && (a.current = Zx(r.current));
23161
23170
  };
23162
23171
  return t.addEventListener("animationstart", c), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
23163
23172
  n.clearTimeout(e), t.removeEventListener("animationstart", c), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
@@ -23170,18 +23179,18 @@ function Yx(e) {
23170
23179
  }, [])
23171
23180
  };
23172
23181
  }
23173
- function Xx(e) {
23182
+ function Zx(e) {
23174
23183
  return e?.animationName || "none";
23175
23184
  }
23176
- function Zx(e) {
23185
+ function Qx(e) {
23177
23186
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
23178
23187
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
23179
23188
  }
23180
23189
  //#endregion
23181
23190
  //#region node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
23182
- var Qx = N.useInsertionEffect || Wx;
23183
- function $x({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
23184
- let [i, a, o] = eS({
23191
+ var $x = N.useInsertionEffect || Gx;
23192
+ function eS({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
23193
+ let [i, a, o] = tS({
23185
23194
  defaultProp: t,
23186
23195
  onChange: n
23187
23196
  }), s = e !== void 0, c = s ? e : i;
@@ -23194,7 +23203,7 @@ function $x({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
23194
23203
  }
23195
23204
  return [c, N.useCallback((t) => {
23196
23205
  if (s) {
23197
- let n = tS(t) ? t(e) : t;
23206
+ let n = nS(t) ? t(e) : t;
23198
23207
  n !== e && o.current?.(n);
23199
23208
  } else a(t);
23200
23209
  }, [
@@ -23204,9 +23213,9 @@ function $x({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
23204
23213
  o
23205
23214
  ])];
23206
23215
  }
23207
- function eS({ defaultProp: e, onChange: t }) {
23216
+ function tS({ defaultProp: e, onChange: t }) {
23208
23217
  let [n, r] = N.useState(e), i = N.useRef(n), a = N.useRef(t);
23209
- return Qx(() => {
23218
+ return $x(() => {
23210
23219
  a.current = t;
23211
23220
  }, [t]), N.useEffect(() => {
23212
23221
  i.current !== n && (a.current?.(n), i.current = n);
@@ -23216,12 +23225,12 @@ function eS({ defaultProp: e, onChange: t }) {
23216
23225
  a
23217
23226
  ];
23218
23227
  }
23219
- function tS(e) {
23228
+ function nS(e) {
23220
23229
  return typeof e == "function";
23221
23230
  }
23222
23231
  //#endregion
23223
23232
  //#region node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
23224
- var nS = Object.freeze({
23233
+ var rS = Object.freeze({
23225
23234
  position: "absolute",
23226
23235
  border: 0,
23227
23236
  width: 1,
@@ -23232,22 +23241,22 @@ var nS = Object.freeze({
23232
23241
  clip: "rect(0, 0, 0, 0)",
23233
23242
  whiteSpace: "nowrap",
23234
23243
  wordWrap: "normal"
23235
- }), rS = "VisuallyHidden", iS = N.forwardRef((e, t) => /* @__PURE__ */ U(Tx.span, {
23244
+ }), iS = "VisuallyHidden", aS = N.forwardRef((e, t) => /* @__PURE__ */ U(Ex.span, {
23236
23245
  ...e,
23237
23246
  ref: t,
23238
23247
  style: {
23239
- ...nS,
23248
+ ...rS,
23240
23249
  ...e.style
23241
23250
  }
23242
23251
  }));
23243
- iS.displayName = rS;
23252
+ aS.displayName = iS;
23244
23253
  //#endregion
23245
23254
  //#region node_modules/@radix-ui/react-toast/dist/index.mjs
23246
- var aS = "ToastProvider", [oS, sS, cS] = wx("Toast"), [lS, uS] = Sx("Toast", [cS]), [dS, fS] = lS(aS), pS = (e) => {
23255
+ var oS = "ToastProvider", [sS, cS, lS] = Tx("Toast"), [uS, dS] = Cx("Toast", [lS]), [fS, pS] = uS(oS), mS = (e) => {
23247
23256
  let { __scopeToast: t, label: n = "Notification", duration: r = 5e3, swipeDirection: i = "right", swipeThreshold: a = 50, children: o } = e, [s, c] = N.useState(null), [l, u] = N.useState(0), d = N.useRef(!1), f = N.useRef(!1);
23248
- return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${aS}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ U(oS.Provider, {
23257
+ return n.trim() || console.error(`Invalid prop \`label\` supplied to \`${oS}\`. Expected non-empty \`string\`.`), /* @__PURE__ */ U(sS.Provider, {
23249
23258
  scope: t,
23250
- children: /* @__PURE__ */ U(dS, {
23259
+ children: /* @__PURE__ */ U(fS, {
23251
23260
  scope: t,
23252
23261
  label: n,
23253
23262
  duration: r,
@@ -23264,9 +23273,9 @@ var aS = "ToastProvider", [oS, sS, cS] = wx("Toast"), [lS, uS] = Sx("Toast", [cS
23264
23273
  })
23265
23274
  });
23266
23275
  };
23267
- pS.displayName = aS;
23268
- var mS = "ToastViewport", hS = ["F8"], gS = "toast.viewportPause", _S = "toast.viewportResume", vS = N.forwardRef((e, t) => {
23269
- let { __scopeToast: n, hotkey: r = hS, label: i = "Notifications ({hotkey})", ...a } = e, o = fS(mS, n), s = sS(n), c = N.useRef(null), l = N.useRef(null), u = N.useRef(null), d = N.useRef(null), f = xx(t, d, o.onViewportChange), p = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), m = o.toastCount > 0;
23276
+ mS.displayName = oS;
23277
+ var hS = "ToastViewport", gS = ["F8"], _S = "toast.viewportPause", vS = "toast.viewportResume", yS = N.forwardRef((e, t) => {
23278
+ let { __scopeToast: n, hotkey: r = gS, label: i = "Notifications ({hotkey})", ...a } = e, o = pS(hS, n), s = cS(n), c = N.useRef(null), l = N.useRef(null), u = N.useRef(null), d = N.useRef(null), f = Sx(t, d, o.onViewportChange), p = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), m = o.toastCount > 0;
23270
23279
  N.useEffect(() => {
23271
23280
  let e = (e) => {
23272
23281
  r.length !== 0 && r.every((t) => e[t] || e.code === t) && d.current?.focus();
@@ -23277,12 +23286,12 @@ var mS = "ToastViewport", hS = ["F8"], gS = "toast.viewportPause", _S = "toast.v
23277
23286
  if (m && e && t) {
23278
23287
  let n = () => {
23279
23288
  if (!o.isClosePausedRef.current) {
23280
- let e = new CustomEvent(gS);
23289
+ let e = new CustomEvent(_S);
23281
23290
  t.dispatchEvent(e), o.isClosePausedRef.current = !0;
23282
23291
  }
23283
23292
  }, r = () => {
23284
23293
  if (o.isClosePausedRef.current) {
23285
- let e = new CustomEvent(_S);
23294
+ let e = new CustomEvent(vS);
23286
23295
  t.dispatchEvent(e), o.isClosePausedRef.current = !1;
23287
23296
  }
23288
23297
  }, i = (t) => {
@@ -23297,7 +23306,7 @@ var mS = "ToastViewport", hS = ["F8"], gS = "toast.viewportPause", _S = "toast.v
23297
23306
  }, [m, o.isClosePausedRef]);
23298
23307
  let h = N.useCallback(({ tabbingDirection: e }) => {
23299
23308
  let t = s().map((t) => {
23300
- let n = t.ref.current, r = [n, ...GS(n)];
23309
+ let n = t.ref.current, r = [n, ...KS(n)];
23301
23310
  return e === "forwards" ? r : r.reverse();
23302
23311
  });
23303
23312
  return (e === "forwards" ? t.reverse() : t).flat();
@@ -23314,45 +23323,45 @@ var mS = "ToastViewport", hS = ["F8"], gS = "toast.viewportPause", _S = "toast.v
23314
23323
  return;
23315
23324
  }
23316
23325
  let i = h({ tabbingDirection: r ? "backwards" : "forwards" }), a = i.findIndex((e) => e === n);
23317
- KS(i.slice(a + 1)) ? t.preventDefault() : r ? l.current?.focus() : u.current?.focus();
23326
+ qS(i.slice(a + 1)) ? t.preventDefault() : r ? l.current?.focus() : u.current?.focus();
23318
23327
  }
23319
23328
  };
23320
23329
  return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
23321
23330
  }
23322
- }, [s, h]), /* @__PURE__ */ W(Ux, {
23331
+ }, [s, h]), /* @__PURE__ */ W(Wx, {
23323
23332
  ref: c,
23324
23333
  role: "region",
23325
23334
  "aria-label": i.replace("{hotkey}", p),
23326
23335
  tabIndex: -1,
23327
23336
  style: { pointerEvents: m ? void 0 : "none" },
23328
23337
  children: [
23329
- m && /* @__PURE__ */ U(bS, {
23338
+ m && /* @__PURE__ */ U(xS, {
23330
23339
  ref: l,
23331
23340
  onFocusFromOutsideViewport: () => {
23332
- KS(h({ tabbingDirection: "forwards" }));
23341
+ qS(h({ tabbingDirection: "forwards" }));
23333
23342
  }
23334
23343
  }),
23335
- /* @__PURE__ */ U(oS.Slot, {
23344
+ /* @__PURE__ */ U(sS.Slot, {
23336
23345
  scope: n,
23337
- children: /* @__PURE__ */ U(Tx.ol, {
23346
+ children: /* @__PURE__ */ U(Ex.ol, {
23338
23347
  tabIndex: -1,
23339
23348
  ...a,
23340
23349
  ref: f
23341
23350
  })
23342
23351
  }),
23343
- m && /* @__PURE__ */ U(bS, {
23352
+ m && /* @__PURE__ */ U(xS, {
23344
23353
  ref: u,
23345
23354
  onFocusFromOutsideViewport: () => {
23346
- KS(h({ tabbingDirection: "backwards" }));
23355
+ qS(h({ tabbingDirection: "backwards" }));
23347
23356
  }
23348
23357
  })
23349
23358
  ]
23350
23359
  });
23351
23360
  });
23352
- vS.displayName = mS;
23353
- var yS = "ToastFocusProxy", bS = N.forwardRef((e, t) => {
23354
- let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = fS(yS, n);
23355
- return /* @__PURE__ */ U(iS, {
23361
+ yS.displayName = hS;
23362
+ var bS = "ToastFocusProxy", xS = N.forwardRef((e, t) => {
23363
+ let { __scopeToast: n, onFocusFromOutsideViewport: r, ...i } = e, a = pS(bS, n);
23364
+ return /* @__PURE__ */ U(aS, {
23356
23365
  tabIndex: 0,
23357
23366
  ...i,
23358
23367
  ref: t,
@@ -23363,43 +23372,43 @@ var yS = "ToastFocusProxy", bS = N.forwardRef((e, t) => {
23363
23372
  }
23364
23373
  });
23365
23374
  });
23366
- bS.displayName = yS;
23367
- var xS = "Toast", SS = "toast.swipeStart", CS = "toast.swipeMove", wS = "toast.swipeCancel", TS = "toast.swipeEnd", ES = N.forwardRef((e, t) => {
23368
- let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, c] = $x({
23375
+ xS.displayName = bS;
23376
+ var SS = "Toast", CS = "toast.swipeStart", wS = "toast.swipeMove", TS = "toast.swipeCancel", ES = "toast.swipeEnd", DS = N.forwardRef((e, t) => {
23377
+ let { forceMount: n, open: r, defaultOpen: i, onOpenChange: a, ...o } = e, [s, c] = eS({
23369
23378
  prop: r,
23370
23379
  defaultProp: i ?? !0,
23371
23380
  onChange: a,
23372
- caller: xS
23381
+ caller: SS
23373
23382
  });
23374
- return /* @__PURE__ */ U(Jx, {
23383
+ return /* @__PURE__ */ U(Yx, {
23375
23384
  present: n || s,
23376
- children: /* @__PURE__ */ U(kS, {
23385
+ children: /* @__PURE__ */ U(AS, {
23377
23386
  open: s,
23378
23387
  ...o,
23379
23388
  ref: t,
23380
23389
  onClose: () => c(!1),
23381
- onPause: Dx(e.onPause),
23382
- onResume: Dx(e.onResume),
23383
- onSwipeStart: vx(e.onSwipeStart, (e) => {
23390
+ onPause: Ox(e.onPause),
23391
+ onResume: Ox(e.onResume),
23392
+ onSwipeStart: yx(e.onSwipeStart, (e) => {
23384
23393
  e.currentTarget.setAttribute("data-swipe", "start");
23385
23394
  }),
23386
- onSwipeMove: vx(e.onSwipeMove, (e) => {
23395
+ onSwipeMove: yx(e.onSwipeMove, (e) => {
23387
23396
  let { x: t, y: n } = e.detail.delta;
23388
23397
  e.currentTarget.setAttribute("data-swipe", "move"), e.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${n}px`);
23389
23398
  }),
23390
- onSwipeCancel: vx(e.onSwipeCancel, (e) => {
23399
+ onSwipeCancel: yx(e.onSwipeCancel, (e) => {
23391
23400
  e.currentTarget.setAttribute("data-swipe", "cancel"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
23392
23401
  }),
23393
- onSwipeEnd: vx(e.onSwipeEnd, (e) => {
23402
+ onSwipeEnd: yx(e.onSwipeEnd, (e) => {
23394
23403
  let { x: t, y: n } = e.detail.delta;
23395
23404
  e.currentTarget.setAttribute("data-swipe", "end"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), e.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${t}px`), e.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${n}px`), c(!1);
23396
23405
  })
23397
23406
  })
23398
23407
  });
23399
23408
  });
23400
- ES.displayName = xS;
23401
- var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23402
- let { __scopeToast: n, type: r = "foreground", duration: i, open: a, onClose: o, onEscapeKeyDown: s, onPause: c, onResume: l, onSwipeStart: u, onSwipeMove: d, onSwipeCancel: f, onSwipeEnd: p, ...m } = e, h = fS(xS, n), [g, _] = N.useState(null), v = xx(t, (e) => _(e)), y = N.useRef(null), b = N.useRef(null), x = i || h.duration, S = N.useRef(0), C = N.useRef(x), w = N.useRef(0), { onToastAdd: T, onToastRemove: E } = h, D = Dx(() => {
23409
+ DS.displayName = SS;
23410
+ var [OS, kS] = uS(SS, { onClose() {} }), AS = N.forwardRef((e, t) => {
23411
+ let { __scopeToast: n, type: r = "foreground", duration: i, open: a, onClose: o, onEscapeKeyDown: s, onPause: c, onResume: l, onSwipeStart: u, onSwipeMove: d, onSwipeCancel: f, onSwipeEnd: p, ...m } = e, h = pS(SS, n), [g, _] = N.useState(null), v = Sx(t, (e) => _(e)), y = N.useRef(null), b = N.useRef(null), x = i || h.duration, S = N.useRef(0), C = N.useRef(x), w = N.useRef(0), { onToastAdd: T, onToastRemove: E } = h, D = Ox(() => {
23403
23412
  g?.contains(document.activeElement) && h.viewport?.focus(), o();
23404
23413
  }), O = N.useCallback((e) => {
23405
23414
  !e || e === Infinity || (window.clearTimeout(w.current), S.current = (/* @__PURE__ */ new Date()).getTime(), w.current = window.setTimeout(D, e));
@@ -23413,8 +23422,8 @@ var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23413
23422
  let e = (/* @__PURE__ */ new Date()).getTime() - S.current;
23414
23423
  C.current -= e, window.clearTimeout(w.current), c?.();
23415
23424
  };
23416
- return e.addEventListener(gS, n), e.addEventListener(_S, t), () => {
23417
- e.removeEventListener(gS, n), e.removeEventListener(_S, t);
23425
+ return e.addEventListener(_S, n), e.addEventListener(vS, t), () => {
23426
+ e.removeEventListener(_S, n), e.removeEventListener(vS, t);
23418
23427
  };
23419
23428
  }
23420
23429
  }, [
@@ -23431,23 +23440,23 @@ var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23431
23440
  h.isClosePausedRef,
23432
23441
  O
23433
23442
  ]), N.useEffect(() => (T(), () => E()), [T, E]);
23434
- let k = N.useMemo(() => g ? BS(g) : null, [g]);
23435
- return h.viewport ? /* @__PURE__ */ W(Je, { children: [k && /* @__PURE__ */ U(AS, {
23443
+ let k = N.useMemo(() => g ? VS(g) : null, [g]);
23444
+ return h.viewport ? /* @__PURE__ */ W(Je, { children: [k && /* @__PURE__ */ U(jS, {
23436
23445
  __scopeToast: n,
23437
23446
  role: "status",
23438
23447
  "aria-live": r === "foreground" ? "assertive" : "polite",
23439
23448
  children: k
23440
- }), /* @__PURE__ */ U(DS, {
23449
+ }), /* @__PURE__ */ U(OS, {
23441
23450
  scope: n,
23442
23451
  onClose: D,
23443
- children: it.createPortal(/* @__PURE__ */ U(oS.ItemSlot, {
23452
+ children: it.createPortal(/* @__PURE__ */ U(sS.ItemSlot, {
23444
23453
  scope: n,
23445
- children: /* @__PURE__ */ U(Hx, {
23454
+ children: /* @__PURE__ */ U(Ux, {
23446
23455
  asChild: !0,
23447
- onEscapeKeyDown: vx(s, () => {
23456
+ onEscapeKeyDown: yx(s, () => {
23448
23457
  h.isFocusedToastEscapeKeyDownRef.current || D(), h.isFocusedToastEscapeKeyDownRef.current = !1;
23449
23458
  }),
23450
- children: /* @__PURE__ */ U(Tx.li, {
23459
+ children: /* @__PURE__ */ U(Ex.li, {
23451
23460
  tabIndex: 0,
23452
23461
  "data-state": a ? "open" : "closed",
23453
23462
  "data-swipe-direction": h.swipeDirection,
@@ -23458,16 +23467,16 @@ var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23458
23467
  touchAction: "none",
23459
23468
  ...e.style
23460
23469
  },
23461
- onKeyDown: vx(e.onKeyDown, (e) => {
23470
+ onKeyDown: yx(e.onKeyDown, (e) => {
23462
23471
  e.key === "Escape" && (s?.(e.nativeEvent), e.nativeEvent.defaultPrevented || (h.isFocusedToastEscapeKeyDownRef.current = !0, D()));
23463
23472
  }),
23464
- onPointerDown: vx(e.onPointerDown, (e) => {
23473
+ onPointerDown: yx(e.onPointerDown, (e) => {
23465
23474
  e.button === 0 && (y.current = {
23466
23475
  x: e.clientX,
23467
23476
  y: e.clientY
23468
23477
  });
23469
23478
  }),
23470
- onPointerMove: vx(e.onPointerMove, (e) => {
23479
+ onPointerMove: yx(e.onPointerMove, (e) => {
23471
23480
  if (!y.current) return;
23472
23481
  let t = e.clientX - y.current.x, n = e.clientY - y.current.y, r = !!b.current, i = ["left", "right"].includes(h.swipeDirection), a = ["left", "up"].includes(h.swipeDirection) ? Math.min : Math.max, o = i ? a(0, t) : 0, s = i ? 0 : a(0, n), c = e.pointerType === "touch" ? 10 : 2, l = {
23473
23482
  x: o,
@@ -23476,30 +23485,30 @@ var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23476
23485
  originalEvent: e,
23477
23486
  delta: l
23478
23487
  };
23479
- r ? (b.current = l, VS(CS, d, f, { discrete: !1 })) : HS(l, h.swipeDirection, c) ? (b.current = l, VS(SS, u, f, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (y.current = null);
23488
+ r ? (b.current = l, HS(wS, d, f, { discrete: !1 })) : US(l, h.swipeDirection, c) ? (b.current = l, HS(CS, u, f, { discrete: !1 }), e.target.setPointerCapture(e.pointerId)) : (Math.abs(t) > c || Math.abs(n) > c) && (y.current = null);
23480
23489
  }),
23481
- onPointerUp: vx(e.onPointerUp, (e) => {
23490
+ onPointerUp: yx(e.onPointerUp, (e) => {
23482
23491
  let t = b.current, n = e.target;
23483
23492
  if (n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), b.current = null, y.current = null, t) {
23484
23493
  let n = e.currentTarget, r = {
23485
23494
  originalEvent: e,
23486
23495
  delta: t
23487
23496
  };
23488
- HS(t, h.swipeDirection, h.swipeThreshold) ? VS(TS, p, r, { discrete: !0 }) : VS(wS, f, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
23497
+ US(t, h.swipeDirection, h.swipeThreshold) ? HS(ES, p, r, { discrete: !0 }) : HS(TS, f, r, { discrete: !0 }), n.addEventListener("click", (e) => e.preventDefault(), { once: !0 });
23489
23498
  }
23490
23499
  })
23491
23500
  })
23492
23501
  })
23493
23502
  }), h.viewport)
23494
23503
  })] }) : null;
23495
- }), AS = (e) => {
23496
- let { __scopeToast: t, children: n, ...r } = e, i = fS(xS, t), [a, o] = N.useState(!1), [s, c] = N.useState(!1);
23497
- return US(() => o(!0)), N.useEffect(() => {
23504
+ }), jS = (e) => {
23505
+ let { __scopeToast: t, children: n, ...r } = e, i = pS(SS, t), [a, o] = N.useState(!1), [s, c] = N.useState(!1);
23506
+ return WS(() => o(!0)), N.useEffect(() => {
23498
23507
  let e = window.setTimeout(() => c(!0), 1e3);
23499
23508
  return () => window.clearTimeout(e);
23500
- }, []), s ? null : /* @__PURE__ */ U(Kx, {
23509
+ }, []), s ? null : /* @__PURE__ */ U(qx, {
23501
23510
  asChild: !0,
23502
- children: /* @__PURE__ */ U(iS, {
23511
+ children: /* @__PURE__ */ U(aS, {
23503
23512
  ...r,
23504
23513
  children: a && /* @__PURE__ */ W(Je, { children: [
23505
23514
  i.label,
@@ -23508,93 +23517,93 @@ var [DS, OS] = lS(xS, { onClose() {} }), kS = N.forwardRef((e, t) => {
23508
23517
  ] })
23509
23518
  })
23510
23519
  });
23511
- }, jS = "ToastTitle", MS = N.forwardRef((e, t) => {
23520
+ }, MS = "ToastTitle", NS = N.forwardRef((e, t) => {
23512
23521
  let { __scopeToast: n, ...r } = e;
23513
- return /* @__PURE__ */ U(Tx.div, {
23522
+ return /* @__PURE__ */ U(Ex.div, {
23514
23523
  ...r,
23515
23524
  ref: t
23516
23525
  });
23517
23526
  });
23518
- MS.displayName = jS;
23519
- var NS = "ToastDescription", PS = N.forwardRef((e, t) => {
23527
+ NS.displayName = MS;
23528
+ var PS = "ToastDescription", FS = N.forwardRef((e, t) => {
23520
23529
  let { __scopeToast: n, ...r } = e;
23521
- return /* @__PURE__ */ U(Tx.div, {
23530
+ return /* @__PURE__ */ U(Ex.div, {
23522
23531
  ...r,
23523
23532
  ref: t
23524
23533
  });
23525
23534
  });
23526
- PS.displayName = NS;
23527
- var FS = "ToastAction", IS = N.forwardRef((e, t) => {
23535
+ FS.displayName = PS;
23536
+ var IS = "ToastAction", LS = N.forwardRef((e, t) => {
23528
23537
  let { altText: n, ...r } = e;
23529
- return n.trim() ? /* @__PURE__ */ U(zS, {
23538
+ return n.trim() ? /* @__PURE__ */ U(BS, {
23530
23539
  altText: n,
23531
23540
  asChild: !0,
23532
- children: /* @__PURE__ */ U(RS, {
23541
+ children: /* @__PURE__ */ U(zS, {
23533
23542
  ...r,
23534
23543
  ref: t
23535
23544
  })
23536
- }) : (console.error(`Invalid prop \`altText\` supplied to \`${FS}\`. Expected non-empty \`string\`.`), null);
23545
+ }) : (console.error(`Invalid prop \`altText\` supplied to \`${IS}\`. Expected non-empty \`string\`.`), null);
23537
23546
  });
23538
- IS.displayName = FS;
23539
- var LS = "ToastClose", RS = N.forwardRef((e, t) => {
23540
- let { __scopeToast: n, ...r } = e, i = OS(LS, n);
23541
- return /* @__PURE__ */ U(zS, {
23547
+ LS.displayName = IS;
23548
+ var RS = "ToastClose", zS = N.forwardRef((e, t) => {
23549
+ let { __scopeToast: n, ...r } = e, i = kS(RS, n);
23550
+ return /* @__PURE__ */ U(BS, {
23542
23551
  asChild: !0,
23543
- children: /* @__PURE__ */ U(Tx.button, {
23552
+ children: /* @__PURE__ */ U(Ex.button, {
23544
23553
  type: "button",
23545
23554
  ...r,
23546
23555
  ref: t,
23547
- onClick: vx(e.onClick, i.onClose)
23556
+ onClick: yx(e.onClick, i.onClose)
23548
23557
  })
23549
23558
  });
23550
23559
  });
23551
- RS.displayName = LS;
23552
- var zS = N.forwardRef((e, t) => {
23560
+ zS.displayName = RS;
23561
+ var BS = N.forwardRef((e, t) => {
23553
23562
  let { __scopeToast: n, altText: r, ...i } = e;
23554
- return /* @__PURE__ */ U(Tx.div, {
23563
+ return /* @__PURE__ */ U(Ex.div, {
23555
23564
  "data-radix-toast-announce-exclude": "",
23556
23565
  "data-radix-toast-announce-alt": r || void 0,
23557
23566
  ...i,
23558
23567
  ref: t
23559
23568
  });
23560
23569
  });
23561
- function BS(e) {
23570
+ function VS(e) {
23562
23571
  let t = [];
23563
23572
  return Array.from(e.childNodes).forEach((e) => {
23564
- if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), WS(e)) {
23573
+ if (e.nodeType === e.TEXT_NODE && e.textContent && t.push(e.textContent), GS(e)) {
23565
23574
  let n = e.ariaHidden || e.hidden || e.style.display === "none", r = e.dataset.radixToastAnnounceExclude === "";
23566
23575
  if (!n) if (r) {
23567
23576
  let n = e.dataset.radixToastAnnounceAlt;
23568
23577
  n && t.push(n);
23569
- } else t.push(...BS(e));
23578
+ } else t.push(...VS(e));
23570
23579
  }
23571
23580
  }), t;
23572
23581
  }
23573
- function VS(e, t, n, { discrete: r }) {
23582
+ function HS(e, t, n, { discrete: r }) {
23574
23583
  let i = n.originalEvent.currentTarget, a = new CustomEvent(e, {
23575
23584
  bubbles: !0,
23576
23585
  cancelable: !0,
23577
23586
  detail: n
23578
23587
  });
23579
- t && i.addEventListener(e, t, { once: !0 }), r ? Ex(i, a) : i.dispatchEvent(a);
23588
+ t && i.addEventListener(e, t, { once: !0 }), r ? Dx(i, a) : i.dispatchEvent(a);
23580
23589
  }
23581
- var HS = (e, t, n = 0) => {
23590
+ var US = (e, t, n = 0) => {
23582
23591
  let r = Math.abs(e.x), i = Math.abs(e.y), a = r > i;
23583
23592
  return t === "left" || t === "right" ? a && r > n : !a && i > n;
23584
23593
  };
23585
- function US(e = () => {}) {
23586
- let t = Dx(e);
23587
- Wx(() => {
23594
+ function WS(e = () => {}) {
23595
+ let t = Ox(e);
23596
+ Gx(() => {
23588
23597
  let e = 0, n = 0;
23589
23598
  return e = window.requestAnimationFrame(() => n = window.requestAnimationFrame(t)), () => {
23590
23599
  window.cancelAnimationFrame(e), window.cancelAnimationFrame(n);
23591
23600
  };
23592
23601
  }, [t]);
23593
23602
  }
23594
- function WS(e) {
23603
+ function GS(e) {
23595
23604
  return e.nodeType === e.ELEMENT_NODE;
23596
23605
  }
23597
- function GS(e) {
23606
+ function KS(e) {
23598
23607
  let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
23599
23608
  let t = e.tagName === "INPUT" && e.type === "hidden";
23600
23609
  return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
@@ -23602,75 +23611,75 @@ function GS(e) {
23602
23611
  for (; n.nextNode();) t.push(n.currentNode);
23603
23612
  return t;
23604
23613
  }
23605
- function KS(e) {
23614
+ function qS(e) {
23606
23615
  let t = document.activeElement;
23607
23616
  return e.some((e) => e === t ? !0 : (e.focus(), document.activeElement !== t));
23608
23617
  }
23609
- var qS = pS, JS = vS, YS = ES, XS = MS, ZS = PS, QS = IS, $S = RS, eC = qS, tC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(JS, {
23618
+ var JS = mS, YS = yS, XS = DS, ZS = NS, QS = FS, $S = LS, eC = zS, tC = JS, nC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(YS, {
23610
23619
  ref: n,
23611
23620
  className: o("fixed top-4 left-1/2 z-[100] flex max-h-screen w-fit max-w-[min(92vw,360px)] -translate-x-1/2 flex-col gap-2 p-0", e),
23612
23621
  ...t
23613
23622
  }));
23614
- tC.displayName = JS.displayName;
23615
- var nC = Xe("group pointer-events-auto relative flex w-fit max-w-[min(92vw,360px)] items-start gap-3 overflow-hidden rounded-md border px-4 py-3 pr-9 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2", {
23623
+ nC.displayName = YS.displayName;
23624
+ var rC = Xe("group pointer-events-auto relative flex w-fit max-w-[min(92vw,360px)] items-start gap-3 overflow-hidden rounded-md border px-4 py-3 pr-9 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2", {
23616
23625
  variants: { variant: {
23617
23626
  default: "border bg-background text-foreground",
23618
23627
  destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
23619
23628
  } },
23620
23629
  defaultVariants: { variant: "default" }
23621
- }), rC = N.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ U(YS, {
23630
+ }), iC = N.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ U(XS, {
23622
23631
  ref: r,
23623
- className: o(nC({ variant: t }), e),
23632
+ className: o(rC({ variant: t }), e),
23624
23633
  ...n
23625
23634
  }));
23626
- rC.displayName = YS.displayName;
23627
- var iC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(QS, {
23635
+ iC.displayName = XS.displayName;
23636
+ var aC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U($S, {
23628
23637
  ref: n,
23629
23638
  className: o("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", e),
23630
23639
  ...t
23631
23640
  }));
23632
- iC.displayName = QS.displayName;
23633
- var aC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U($S, {
23641
+ aC.displayName = $S.displayName;
23642
+ var oC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(eC, {
23634
23643
  ref: n,
23635
23644
  className: o("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", e),
23636
23645
  "toast-close": "",
23637
23646
  ...t,
23638
23647
  children: /* @__PURE__ */ U(ze, { className: "h-4 w-4" })
23639
23648
  }));
23640
- aC.displayName = $S.displayName;
23641
- var oC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(XS, {
23649
+ oC.displayName = eC.displayName;
23650
+ var sC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(ZS, {
23642
23651
  ref: n,
23643
23652
  className: o("text-sm font-semibold", e),
23644
23653
  ...t
23645
23654
  }));
23646
- oC.displayName = XS.displayName;
23647
- var sC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(ZS, {
23655
+ sC.displayName = ZS.displayName;
23656
+ var cC = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ U(QS, {
23648
23657
  ref: n,
23649
23658
  className: o("text-sm opacity-90", e),
23650
23659
  ...t
23651
23660
  }));
23652
- sC.displayName = ZS.displayName;
23661
+ cC.displayName = QS.displayName;
23653
23662
  //#endregion
23654
23663
  //#region src/components/ui/toaster.tsx
23655
- function cC() {
23664
+ function lC() {
23656
23665
  let { toasts: e } = T();
23657
- return /* @__PURE__ */ W(eC, { children: [e.map(function({ id: e, title: t, description: n, action: r, ...i }) {
23658
- return /* @__PURE__ */ W(rC, {
23666
+ return /* @__PURE__ */ W(tC, { children: [e.map(function({ id: e, title: t, description: n, action: r, ...i }) {
23667
+ return /* @__PURE__ */ W(iC, {
23659
23668
  ...i,
23660
23669
  children: [
23661
23670
  /* @__PURE__ */ W("div", {
23662
23671
  className: "grid gap-1",
23663
- children: [t && /* @__PURE__ */ U(oC, { children: t }), n && /* @__PURE__ */ U(sC, { children: n })]
23672
+ children: [t && /* @__PURE__ */ U(sC, { children: t }), n && /* @__PURE__ */ U(cC, { children: n })]
23664
23673
  }),
23665
23674
  r,
23666
- /* @__PURE__ */ U(aC, {})
23675
+ /* @__PURE__ */ U(oC, {})
23667
23676
  ]
23668
23677
  }, e);
23669
- }), /* @__PURE__ */ U(tC, {})] });
23678
+ }), /* @__PURE__ */ U(nC, {})] });
23670
23679
  }
23671
23680
  //#endregion
23672
23681
  //#region src/pages/ChangelogPage.tsx
23673
- function lC() {
23682
+ function uC() {
23674
23683
  let e = Ke(), [t, n] = qe(), r = e.lang === "en" ? "en" : "zh-cn", [i, a] = H(null), [o, s] = H([]);
23675
23684
  B(() => {
23676
23685
  cb(r).then(a).catch(() => a(null)), rn(r).then((e) => s(e.items)).catch(() => s([]));
@@ -23819,15 +23828,15 @@ function lC() {
23819
23828
  }
23820
23829
  //#endregion
23821
23830
  //#region src/lib/page-meta.ts
23822
- function uC(e) {
23831
+ function dC(e) {
23823
23832
  if (typeof e == "string") return e;
23824
23833
  if (e instanceof Date && !Number.isNaN(e.getTime())) return e.toISOString();
23825
23834
  }
23826
- function dC(e, t) {
23835
+ function fC(e, t) {
23827
23836
  if (e) return e.replace(/\{(\w+)\}/g, (e, n) => t[n] ?? "");
23828
23837
  }
23829
- function fC(e) {
23830
- let { gitMeta: t, frontmatter: n, preferGitMeta: r = !0 } = e, i = Array.isArray(n?.authors) ? n.authors.filter((e) => typeof e == "string") : typeof n?.author == "string" ? [n.author] : [], a = t?.author ? [t.author] : [], o = r && a.length > 0 ? a : i, s = uC(n?.lastUpdated);
23838
+ function pC(e) {
23839
+ let { gitMeta: t, frontmatter: n, preferGitMeta: r = !0 } = e, i = Array.isArray(n?.authors) ? n.authors.filter((e) => typeof e == "string") : typeof n?.author == "string" ? [n.author] : [], a = t?.author ? [t.author] : [], o = r && a.length > 0 ? a : i, s = dC(n?.lastUpdated);
23831
23840
  return {
23832
23841
  lastUpdated: r && t?.lastUpdated ? t.lastUpdated : s,
23833
23842
  authors: o
@@ -23835,7 +23844,7 @@ function fC(e) {
23835
23844
  }
23836
23845
  //#endregion
23837
23846
  //#region src/lib/rehype-toc.ts
23838
- function pC(e) {
23847
+ function mC(e) {
23839
23848
  return e.split(/(`[^`]+`|~~[^~]+~~)/g).filter(Boolean).map((e) => e.startsWith("`") && e.endsWith("`") ? {
23840
23849
  type: "inlineCode",
23841
23850
  value: e.slice(1, -1)
@@ -23850,38 +23859,38 @@ function pC(e) {
23850
23859
  value: e
23851
23860
  });
23852
23861
  }
23853
- function mC(e) {
23862
+ function hC(e) {
23854
23863
  try {
23855
- return e ? Array.isArray(e) ? e.map(mC).join("") : e.type === "text" || e.type === "inlineCode" ? e.value || "" : typeof e == "object" && "children" in e && Array.isArray(e.children) ? e.children.map(mC).join("") : "" : "";
23864
+ return e ? Array.isArray(e) ? e.map(hC).join("") : e.type === "text" || e.type === "inlineCode" ? e.value || "" : typeof e == "object" && "children" in e && Array.isArray(e.children) ? e.children.map(hC).join("") : "" : "";
23856
23865
  } catch {
23857
23866
  return "";
23858
23867
  }
23859
23868
  }
23860
- function hC(e) {
23869
+ function gC(e) {
23861
23870
  try {
23862
- return e ? Array.isArray(e) ? e.flatMap(hC) : e.type === "text" ? pC(e.value || "") : e.type === "inlineCode" ? [{
23871
+ return e ? Array.isArray(e) ? e.flatMap(gC) : e.type === "text" ? mC(e.value || "") : e.type === "inlineCode" ? [{
23863
23872
  type: "inlineCode",
23864
23873
  value: e.value || ""
23865
23874
  }] : e.type === "strong" || e.type === "emphasis" || e.type === "delete" ? [{
23866
23875
  type: e.type,
23867
- children: hC(e.children || [])
23876
+ children: gC(e.children || [])
23868
23877
  }] : e.type === "link" ? [{
23869
23878
  type: "link",
23870
23879
  url: e.url,
23871
- children: hC(e.children || [])
23872
- }] : typeof e == "object" && "children" in e && Array.isArray(e.children) ? hC(e.children) : [] : [];
23880
+ children: gC(e.children || [])
23881
+ }] : typeof e == "object" && "children" in e && Array.isArray(e.children) ? gC(e.children) : [] : [];
23873
23882
  } catch {
23874
23883
  return [];
23875
23884
  }
23876
23885
  }
23877
- function gC(e = {}) {
23886
+ function _C(e = {}) {
23878
23887
  let t = e.maxLevel || 3;
23879
23888
  return (e) => {
23880
23889
  let n = [], r = /* @__PURE__ */ new Map();
23881
23890
  rt(e, "heading", (e) => {
23882
23891
  try {
23883
23892
  if (e.depth > t) return;
23884
- let i = mC(e).trim(), a = hC(e.children || []);
23893
+ let i = hC(e).trim(), a = gC(e.children || []);
23885
23894
  if (!i) return;
23886
23895
  let o = i.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5\s-]/g, "").replace(/\s+/g, "-"), s = r.get(o) || 0;
23887
23896
  r.set(o, s + 1), s > 0 && (o = `${o}-${s}`);
@@ -23903,23 +23912,23 @@ function gC(e = {}) {
23903
23912
  }
23904
23913
  //#endregion
23905
23914
  //#region src/app/DocsApp.tsx
23906
- var _C = L(() => import("./GlobalContextMenu-BtVjQk0v.js").then((e) => ({ default: e.GlobalContextMenu }))), vC = L(() => import("./MdxContent.lazy-SjGAqyn3.js"));
23907
- function yC() {
23908
- import("./MdxContent.lazy-SjGAqyn3.js");
23909
- }
23915
+ var vC = L(() => import("./GlobalContextMenu-BtVjQk0v.js").then((e) => ({ default: e.GlobalContextMenu }))), yC = L(() => import("./MdxContent.lazy-i9phqEH3.js"));
23910
23916
  function bC() {
23917
+ import("./MdxContent.lazy-i9phqEH3.js");
23918
+ }
23919
+ function xC() {
23911
23920
  globalThis.dispatchEvent(new Event("react-docs-ui:content-ready"));
23912
23921
  }
23913
- var xC = L(() => import("./AISelectionTrigger-SLyb8Vep.js").then((e) => e.n).then((e) => ({ default: e.AISelectionTrigger }))), SC = L(() => import("./AIChatDialog-BnAX3dRn.js").then((e) => e.n).then((e) => ({ default: e.AIChatDialog }))), CC = L(() => import("./AISettingsPanel-Bsd_wLP4.js").then((e) => e.n).then((e) => ({ default: e.AISettingsPanel })));
23914
- function wC(e) {
23922
+ var SC = L(() => import("./AISelectionTrigger-SLyb8Vep.js").then((e) => e.n).then((e) => ({ default: e.AISelectionTrigger }))), CC = L(() => import("./AIChatDialog-BnAX3dRn.js").then((e) => e.n).then((e) => ({ default: e.AIChatDialog }))), wC = L(() => import("./AISettingsPanel-Bsd_wLP4.js").then((e) => e.n).then((e) => ({ default: e.AISettingsPanel })));
23923
+ function TC(e) {
23915
23924
  let t = e.split("\n");
23916
23925
  for (let e of t) if (e.startsWith("# ")) return e.slice(2).trim();
23917
23926
  }
23918
- var TC = I({
23927
+ var EC = I({
23919
23928
  config: null,
23920
23929
  lang: "zh-cn"
23921
23930
  });
23922
- function EC({ children: e }) {
23931
+ function DC({ children: e }) {
23923
23932
  let t = Ke(), n = V(() => t.lang || "zh-cn", [t.lang]), r = V(() => t.version, [t.version]), [i, a] = H(null);
23924
23933
  return B(() => {
23925
23934
  cb(n).then(a).catch(console.error);
@@ -23932,8 +23941,8 @@ function EC({ children: e }) {
23932
23941
  children: e
23933
23942
  });
23934
23943
  }
23935
- function DC() {
23936
- let e = We(), [t, n] = H(null), [r, i] = H(() => hx()), [o, s] = H(!1), c = V(() => {
23944
+ function OC() {
23945
+ let e = We(), [t, n] = H(null), [r, i] = H(() => gx()), [o, s] = H(!1), c = V(() => {
23937
23946
  let t = e.pathname.split("/").filter(Boolean);
23938
23947
  return t[0] === "en" || t[0] === "zh-cn" ? t[0] : "zh-cn";
23939
23948
  }, [e.pathname]);
@@ -23941,13 +23950,13 @@ function DC() {
23941
23950
  let e = !1;
23942
23951
  return (async () => {
23943
23952
  try {
23944
- dx();
23953
+ fx();
23945
23954
  let t = await cb(c);
23946
23955
  if (!e) {
23947
23956
  n(t), s(t?.ai?.enabled === !0);
23948
23957
  let e = t?.mdx?.componentsPath || "/src/components", r = t?.mdx?.components;
23949
23958
  if (t?.mdx?.enabled !== !1) try {
23950
- i(await mx(await fx(e), r));
23959
+ i(await hx(await px(e), r));
23951
23960
  } catch (e) {
23952
23961
  console.warn("[MDX] 加载组件失败:", e);
23953
23962
  }
@@ -23961,7 +23970,7 @@ function DC() {
23961
23970
  }, [c]), /* @__PURE__ */ U(a, {
23962
23971
  defaultTheme: "system",
23963
23972
  storageKey: "vite-ui-theme",
23964
- children: /* @__PURE__ */ U(TC.Provider, {
23973
+ children: /* @__PURE__ */ U(EC.Provider, {
23965
23974
  value: {
23966
23975
  config: t,
23967
23976
  lang: c
@@ -23971,32 +23980,32 @@ function DC() {
23971
23980
  lang: c,
23972
23981
  children: /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ U(f, {
23973
23982
  components: r,
23974
- children: /* @__PURE__ */ U(EC, { children: /* @__PURE__ */ U(F, {
23983
+ children: /* @__PURE__ */ U(DC, { children: /* @__PURE__ */ U(F, {
23975
23984
  fallback: /* @__PURE__ */ U(Ve, {}),
23976
- children: /* @__PURE__ */ W(_C, {
23985
+ children: /* @__PURE__ */ W(vC, {
23977
23986
  config: t?.contextMenu,
23978
23987
  children: [o && /* @__PURE__ */ W(F, {
23979
23988
  fallback: null,
23980
23989
  children: [
23981
- /* @__PURE__ */ U(xC, {}),
23982
23990
  /* @__PURE__ */ U(SC, {}),
23983
- /* @__PURE__ */ U(CC, {})
23991
+ /* @__PURE__ */ U(CC, {}),
23992
+ /* @__PURE__ */ U(wC, {})
23984
23993
  ]
23985
23994
  }), /* @__PURE__ */ U(Ve, {})]
23986
23995
  })
23987
23996
  }) })
23988
- }), /* @__PURE__ */ U(cC, {})] })
23997
+ }), /* @__PURE__ */ U(lC, {})] })
23989
23998
  })
23990
23999
  })
23991
24000
  });
23992
24001
  }
23993
- function OC({ shikiBundle: e }) {
24002
+ function kC({ shikiBundle: e }) {
23994
24003
  let t = Ke(), n = t.lang, r = t.version, i = t["*"], a = !!(n && n !== "en" && n !== "zh-cn"), o = V(() => n === "en" || n === "zh-cn" ? n : "zh-cn", [n]), [s, c] = H(null), [u, d] = H(null), [f, m] = H(null), [h, _] = H(null), [v, y] = H(), [b, S] = H(), [C, w] = H(!0), [T, E] = H(null), D = V(() => p(s, r) ? r : void 0, [s, r]), O = V(() => {
23995
24004
  let e = (i || "").split("/").filter(Boolean);
23996
24005
  return e.length > 0 ? e[0] : "";
23997
24006
  }, [i]), { prev: k, next: A } = V(() => {
23998
24007
  let e = D ? `/${o}/v/${D}/${i || ""}` : `/${o}/${i || ""}`;
23999
- return _x(s?.sidebar, e, O, D);
24008
+ return vx(s?.sidebar, e, O, D);
24000
24009
  }, [
24001
24010
  s?.sidebar,
24002
24011
  o,
@@ -24018,7 +24027,7 @@ function OC({ shikiBundle: e }) {
24018
24027
  };
24019
24028
  }, [o]), B(() => {
24020
24029
  let t = !1;
24021
- if (w(!0), _(null), y(void 0), S(void 0), yC(), a) return d("# 404 - Not Found\n\nThe page you're looking for could not be found."), m({
24030
+ if (w(!0), _(null), y(void 0), S(void 0), bC(), a) return d("# 404 - Not Found\n\nThe page you're looking for could not be found."), m({
24022
24031
  title: "Not Found",
24023
24032
  toc: []
24024
24033
  }), E(null), w(!1), () => {
@@ -24046,7 +24055,7 @@ function OC({ shikiBundle: e }) {
24046
24055
  }
24047
24056
  if (!g) throw Error(`Neither ${r} nor ${c} found`);
24048
24057
  if (t) return;
24049
- let { data: b, content: C } = db(g), w = s?.toc?.maxLevel || 3, T = Qg().use(sb).use(gC, { maxLevel: w }), E = (await T.run(T.parse(C))).data?.toc || [], O = wC(C);
24058
+ let { data: b, content: C } = db(g), w = s?.toc?.maxLevel || 3, T = Qg().use(sb).use(_C, { maxLevel: w }), E = (await T.run(T.parse(C))).data?.toc || [], O = TC(C);
24050
24059
  m({
24051
24060
  ...b,
24052
24061
  toc: E,
@@ -24084,18 +24093,18 @@ function OC({ shikiBundle: e }) {
24084
24093
  e = !0;
24085
24094
  };
24086
24095
  }, [v, f?.title]), B(() => {
24087
- !u || C || (bC(), x(u, s?.codeHighlight, e));
24096
+ !u || C || (xC(), x(u, s?.codeHighlight, e));
24088
24097
  }, [
24089
24098
  u,
24090
24099
  C,
24091
24100
  s?.codeHighlight,
24092
24101
  e
24093
24102
  ]), !s) return /* @__PURE__ */ U("div", { children: "Loading..." });
24094
- let j = fC({
24103
+ let j = pC({
24095
24104
  gitMeta: h ?? void 0,
24096
24105
  frontmatter: f,
24097
24106
  preferGitMeta: s.pageMeta?.preferGitMeta !== !1
24098
- }), M = typeof f?.editUrl == "string" ? f.editUrl : s.editLink?.enabled === !1 ? void 0 : dC(s.editLink?.urlTemplate, {
24107
+ }), M = typeof f?.editUrl == "string" ? f.editUrl : s.editLink?.enabled === !1 ? void 0 : fC(s.editLink?.urlTemplate, {
24099
24108
  lang: o,
24100
24109
  version: D,
24101
24110
  slug: i || "index",
@@ -24133,7 +24142,7 @@ function OC({ shikiBundle: e }) {
24133
24142
  availableLangs: ["zh-cn", "en"],
24134
24143
  children: C && !u ? /* @__PURE__ */ U("div", { children: "Loading..." }) : /* @__PURE__ */ U(F, {
24135
24144
  fallback: /* @__PURE__ */ U("div", { children: "Loading..." }),
24136
- children: /* @__PURE__ */ U(vC, {
24145
+ children: /* @__PURE__ */ U(yC, {
24137
24146
  source: u || "",
24138
24147
  skipFirstH1: !!f?.title,
24139
24148
  imageViewer: s?.imageViewer,
@@ -24143,37 +24152,37 @@ function OC({ shikiBundle: e }) {
24143
24152
  })
24144
24153
  });
24145
24154
  }
24146
- function kC({ shikiBundle: e } = {}) {
24155
+ function AC({ shikiBundle: e } = {}) {
24147
24156
  return /* @__PURE__ */ U(He, { router: V(() => Ue([{
24148
24157
  path: "/",
24149
- element: /* @__PURE__ */ U(DC, {}),
24158
+ element: /* @__PURE__ */ U(OC, {}),
24150
24159
  children: [
24151
24160
  {
24152
24161
  index: !0,
24153
- element: /* @__PURE__ */ U(OC, { shikiBundle: e })
24162
+ element: /* @__PURE__ */ U(kC, { shikiBundle: e })
24154
24163
  },
24155
24164
  {
24156
24165
  path: ":lang/changelog",
24157
- element: /* @__PURE__ */ U(lC, {})
24166
+ element: /* @__PURE__ */ U(uC, {})
24158
24167
  },
24159
24168
  {
24160
24169
  path: ":lang",
24161
- element: /* @__PURE__ */ U(OC, { shikiBundle: e })
24170
+ element: /* @__PURE__ */ U(kC, { shikiBundle: e })
24162
24171
  },
24163
24172
  {
24164
24173
  path: ":lang/v/:version",
24165
- element: /* @__PURE__ */ U(OC, { shikiBundle: e })
24174
+ element: /* @__PURE__ */ U(kC, { shikiBundle: e })
24166
24175
  },
24167
24176
  {
24168
24177
  path: ":lang/v/:version/*",
24169
- element: /* @__PURE__ */ U(OC, { shikiBundle: e })
24178
+ element: /* @__PURE__ */ U(kC, { shikiBundle: e })
24170
24179
  },
24171
24180
  {
24172
24181
  path: ":lang/*",
24173
- element: /* @__PURE__ */ U(OC, { shikiBundle: e })
24182
+ element: /* @__PURE__ */ U(kC, { shikiBundle: e })
24174
24183
  }
24175
24184
  ]
24176
24185
  }]), [e]) });
24177
24186
  }
24178
24187
  //#endregion
24179
- export { Vt as A, bt as B, vn as C, nn as D, un as E, kt as F, wt as G, mt as H, dt as I, vt as J, Tt as K, xt as L, Ht as M, Bt as N, Gt as O, jt as P, yt as R, cb as S, pn as T, gt as U, Ct as V, St as W, ft as X, _t as Y, Bb as _, px as a, zb as b, dx as c, ax as d, Xb as f, Pb as g, Hb as h, _x as i, Ut as j, Wt as k, fx as l, Wb as m, yC as n, mx as o, Kb as p, ht as q, gC as r, gx as s, kC as t, ox as u, Fb as v, mn as w, Vb as x, Ib as y, pt as z };
24188
+ export { Vt as A, bt as B, vn as C, nn as D, un as E, kt as F, wt as G, mt as H, dt as I, vt as J, Tt as K, xt as L, Ht as M, Bt as N, Gt as O, jt as P, yt as R, cb as S, pn as T, gt as U, Ct as V, St as W, ft as X, _t as Y, Bb as _, mx as a, zb as b, fx as c, ax as d, Xb as f, Pb as g, Hb as h, vx as i, Ut as j, Wt as k, px as l, Wb as m, bC as n, hx as o, Kb as p, ht as q, _C as r, _x as s, AC as t, ox as u, Fb as v, mn as w, Vb as x, Ib as y, pt as z };
@@ -835,7 +835,7 @@ function Z({ source: e, skipFirstH1: t = !1, imageViewer: n, codeHighlight: i, s
835
835
  let r = q(t);
836
836
  return v.createElement(n, r, e);
837
837
  });
838
- if (e.set(t, r), t.includes(".")) {
838
+ if (e.set(t, r), e.set(t.toLowerCase(), r), t.includes(".")) {
839
839
  let [n, i] = t.split("."), a = `${n.toLowerCase()}-${i.toLowerCase()}`;
840
840
  e.set(a, r);
841
841
  }
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MdxContent-BdbPnB6O.js";
1
+ import { t as e } from "./MdxContent-CZLqZlNp.js";
2
2
  import t from "katex";
3
3
  t.__defineMacro("\\ce", function(e) {
4
4
  return n(e.consumeArgs(1)[0], "ce");
@@ -1,4 +1,4 @@
1
- import { c as e, n as t, t as n } from "./DocsApp-Cx8m3Qn3.js";
1
+ import { c as e, n as t, t as n } from "./DocsApp-_rW6UKxz.js";
2
2
  //#region src/docs-app.ts
3
3
  var r = !1;
4
4
  function i() {
@@ -1,10 +1,10 @@
1
1
  import { n as e, t } from "./theme-provider-fNhx9xK0.js";
2
- import { A as n, B as r, C as i, D as a, E as o, F as ee, G as te, H as ne, I as re, J as ie, K as ae, L as oe, M as se, N as ce, O as le, P as ue, R as s, S as c, T as l, U as u, V as d, W as f, X as p, Y as m, _ as h, a as g, b as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, o as D, p as O, q as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L, z as R } from "./DocsApp-Cx8m3Qn3.js";
2
+ import { A as n, B as r, C as i, D as a, E as o, F as ee, G as te, H as ne, I as re, J as ie, K as ae, L as oe, M as se, N as ce, O as le, P as ue, R as s, S as c, T as l, U as u, V as d, W as f, X as p, Y as m, _ as h, a as g, b as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, o as D, p as O, q as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L, z as R } from "./DocsApp-_rW6UKxz.js";
3
3
  import { t as z } from "./utils-Ct96Mtjw.js";
4
4
  import { C as B, S as V, a as H, b as U, f as de, i as fe, o as pe, p as me, v as he, x as ge, y as _e } from "./mdx-components-m1cGPhc8.js";
5
5
  import { a as ve, c as ye, i as W, n as be, o as G, r as K, s as q, t as J } from "./dialog-D8otbqQL.js";
6
6
  import { a as xe, c as Se, d as Ce, f as we, l as Te, m as Ee, n as De, o as Oe, p as Y, r as ke, s as Ae, t as je, u as Me } from "./context-menu-BIQsQup7.js";
7
- import { n as Ne, t as Pe } from "./MdxContent-BdbPnB6O.js";
7
+ import { n as Ne, t as Pe } from "./MdxContent-CZLqZlNp.js";
8
8
  import { S as Fe, _ as Ie, a as Le, b as Re, c as ze, d as Be, f as Ve, g as He, i as Ue, l as We, m as Ge, n as Ke, o as qe, p as Je, r as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./AIProvider-niZNPSGi.js";
9
9
  import { t as nt } from "./AISelectionTrigger-SLyb8Vep.js";
10
10
  import { i as rt, r as it, t as at } from "./AIChatDialog-BnAX3dRn.js";
@@ -1 +1 @@
1
- {"version":3,"file":"MdxContent.d.ts","sourceRoot":"","sources":["../../../src/components/MdxContent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAqE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAK9H,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAI7E,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,aAAa,CAAC,EAAE,qBAAqB,CAAA;IACrC,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AA6iBD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,EAAE,eAAe,2CAqLjB"}
1
+ {"version":3,"file":"MdxContent.d.ts","sourceRoot":"","sources":["../../../src/components/MdxContent.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAqE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAK9H,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAI7E,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,aAAa,CAAC,EAAE,qBAAqB,CAAA;IACrC,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AA6iBD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,aAAa,EACb,WAAW,GACZ,EAAE,eAAe,2CAsLjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"component-scanner.d.ts","sourceRoot":"","sources":["../../../src/lib/component-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AA4CD,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,eAAe,GAAE,MAA0B,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAI5G;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,eAAe,EAAE,CASvG;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAcrG;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,eAAe,EAAE,EAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,iBAAiB,CAAC,CA2B5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,GAAE,iBAAsB,GACvC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAK1C"}
1
+ {"version":3,"file":"component-scanner.d.ts","sourceRoot":"","sources":["../../../src/lib/component-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,aAAa,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AA0DD,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,eAAe,GAAE,MAA0B,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAI5G;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,eAAe,EAAE,CASvG;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAcrG;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,eAAe,EAAE,EAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,iBAAiB,CAAC,CA2B5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,GAAE,iBAAsB,GACvC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAK1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-docs-ui",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "description": "React documentation site UI components — navigation, sidebar, search, code highlight, MDX rendering and theming to help you build docs fast.",
6
6
  "homepage": "https://shenjianZ.github.io/react-docs-ui",