@baishuyun/ui-base 3.0.2 → 6.1.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 (59) hide show
  1. package/dist/Amap/AmapCircle/index.js +1 -1
  2. package/dist/Amap/{AmapCircle-COjtl-XB.js → AmapCircle-mh92P2l6.js} +1 -1
  3. package/dist/Amap/AmapProvider/index.js +2 -2
  4. package/dist/Amap/{AmapProvider-CWbRK6QL.js → AmapProvider-H1GNfMdk.js} +1 -1
  5. package/dist/Amap/index.js +3 -3
  6. package/dist/Card/{Card-D__c94yx.js → Card-CRrtIjNT.js} +1 -1
  7. package/dist/Card/index.js +2 -2
  8. package/dist/CheckBox/{CheckBox-DF201Nxg.js → CheckBox-BsihF-AN.js} +1 -1
  9. package/dist/CheckBox/{CheckBox-B04hZKaC.js → CheckBox-D1aeCoQb.js} +1 -1
  10. package/dist/CheckBox/index.js +3 -3
  11. package/dist/ColorPicker/{ColorPicker-B-KaMDAn.js → ColorPicker-CFKvAzYa.js} +8 -8
  12. package/dist/ColorPicker/index.js +2 -2
  13. package/dist/ConfigProvider/index.js +1 -1
  14. package/dist/DropDown/{DropDown-CMKiQDrc.js → DropDown-DNEQ5nQz.js} +1 -1
  15. package/dist/DropDown/index.js +3 -3
  16. package/dist/Editor/{Buttons-CZOTyAPL.js → Buttons-0qZ4g7Ig.js} +30 -30
  17. package/dist/Editor/ToolbarPlugin/Buttons/index.js +8 -8
  18. package/dist/Editor/index.js +8 -8
  19. package/dist/Icon/{Icon-CTZCSuVg.js → Icon-BQ3Whub2.js} +1 -1
  20. package/dist/Icon/index.js +1 -1
  21. package/dist/InputTag/{InputTag-F2Dv-r56.js → InputTag-DcVn_bRl.js} +1 -1
  22. package/dist/InputTag/index.js +2 -2
  23. package/dist/Modal/{Modal-CuDbh_WD.js → Modal-B5AW5GKt.js} +39 -30
  24. package/dist/Modal/index.js +2 -2
  25. package/dist/Segmented/{Segmented-Byw8j1hQ.js → Segmented-DkhT5_Ty.js} +36 -25
  26. package/dist/Segmented/index.js +1 -1
  27. package/dist/Select/{Select-xuQGK6It.js → Select-BSPmsIMh.js} +16 -17
  28. package/dist/Select/{SelectInputSearch-Dm3CI_L4.js → SelectInputSearch-Cj9Uubc4.js} +2 -2
  29. package/dist/Select/index.js +6 -6
  30. package/dist/Tabs/{Tabs-Cxf7jwys.js → Tabs-BVSzo2qS.js} +1 -1
  31. package/dist/Tabs/index.js +2 -2
  32. package/dist/Tree/index.js +3 -3
  33. package/dist/components/Amap/Amap.d.ts +1 -1
  34. package/dist/components/Amap/{interface.d.ts → Amap.type.d.ts} +187 -2
  35. package/dist/components/Amap/AmapCircle/AmapCircle.d.ts +1 -1
  36. package/dist/components/Amap/AmapMarker/AmapMarker.d.ts +1 -1
  37. package/dist/components/Amap/AmapMarker/useMarkerInfoWindow.d.ts +1 -1
  38. package/dist/components/Amap/AmapMarker/useMarkerInfoWindowController.d.ts +1 -1
  39. package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.d.ts +1 -1
  40. package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.type.d.ts +1 -1
  41. package/dist/components/Amap/AmapMarkerCluster/utils.d.ts +1 -1
  42. package/dist/components/Amap/AmapProvider/AmapProvider.d.ts +1 -1
  43. package/dist/components/Amap/context/AmapContext.d.ts +1 -1
  44. package/dist/components/Amap/hooks/useAmap.d.ts +1 -1
  45. package/dist/components/Amap/hooks/useCurrentLocation.d.ts +1 -1
  46. package/dist/components/Amap/index.d.ts +1 -1
  47. package/dist/components/Amap/utils/currentLocation.d.ts +1 -1
  48. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +1 -0
  49. package/dist/components/Modal/Modal.type.d.ts +4 -0
  50. package/dist/components/Segmented/Segmented.type.d.ts +4 -0
  51. package/dist/components/index.d.ts +1 -1
  52. package/dist/components/theme.d.ts +6 -0
  53. package/dist/index.js +25 -51
  54. package/dist/style.css +1 -1
  55. package/dist/{ConfigProvider/ConfigProvider-Bx-uxnns.js → vendors/ConfigProvider-Bd6SRQtO.js} +93 -22
  56. package/dist/vendors/{Tree-Bg2UzLsC.js → Tree-D7ZZAwIg.js} +2 -2
  57. package/package.json +6 -10
  58. package/dist/locale/LocaleProvider.d.ts +0 -9
  59. /package/dist/locale/__tests__/{LocaleProvider.test.d.ts → locale.test.d.ts} +0 -0
@@ -13,50 +13,61 @@ var l = {
13
13
  "bsy-segmented__item--active": "_bsy-segmented__item--active_ia83v_44",
14
14
  "bsy-segmented__item--inactive": "_bsy-segmented__item--inactive_ia83v_48",
15
15
  "bsy-segmented__slider": "_bsy-segmented__slider_ia83v_53"
16
- }, u = (u) => {
17
- let { options: d, block: f = !1, disabled: p = !1 } = u, [m, h] = s(u), [g, _] = a({
16
+ }, u = {
17
+ type: "spring",
18
+ stiffness: 350,
19
+ damping: 35
20
+ }, d = { duration: 0 }, f = (f) => {
21
+ let { options: p, block: m = !1, disabled: h = !1, enableAnimation: g = !1 } = f, [_, v] = s(f), [y, b] = a({
18
22
  width: 0,
19
23
  left: 0
20
- }), [v, y] = a(!1), b = i(null), x = i(/* @__PURE__ */ new Map()), S = n(() => {
21
- let e = x.current.get(m), t = b.current;
24
+ }), x = i(null), S = i(/* @__PURE__ */ new Map()), C = i(!1), w = n(() => {
25
+ let e = S.current.get(_), t = x.current;
22
26
  if (e && t) {
23
27
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
24
- _({
28
+ b({
25
29
  width: r.width,
26
30
  left: r.left - n.left
27
31
  });
28
32
  }
29
- }, [m]);
33
+ }, [_]);
30
34
  return r(() => {
31
- S();
32
- let e = new ResizeObserver(S);
33
- return b.current && e.observe(b.current), () => {
35
+ if (g && C.current) {
36
+ let e = requestAnimationFrame(() => {
37
+ w();
38
+ });
39
+ return () => cancelAnimationFrame(e);
40
+ }
41
+ w();
42
+ }, [
43
+ _,
44
+ g,
45
+ w
46
+ ]), r(() => {
47
+ let e = new ResizeObserver(w);
48
+ return x.current && e.observe(x.current), () => {
34
49
  e.disconnect();
35
50
  };
36
- }, [S]), /* @__PURE__ */ t("div", {
37
- ref: b,
38
- className: o(l["bsy-segmented"], f && l["bsy-segmented--block"]),
39
- style: f ? { gridTemplateColumns: `repeat(${d.length}, 1fr)` } : void 0,
51
+ }, [w]), /* @__PURE__ */ t("div", {
52
+ ref: x,
53
+ className: o(l["bsy-segmented"], m && l["bsy-segmented--block"]),
54
+ style: m ? { gridTemplateColumns: `repeat(${p.length}, 1fr)` } : void 0,
40
55
  children: [/* @__PURE__ */ e(c.div, {
41
56
  className: l["bsy-segmented__slider"],
42
- animate: g,
43
- transition: v ? {
44
- type: "spring",
45
- stiffness: 350,
46
- damping: 35
47
- } : { duration: 0 }
48
- }), d.map((t) => /* @__PURE__ */ e("button", {
57
+ animate: y,
58
+ transition: g && C.current ? u : d
59
+ }), p.map((t) => /* @__PURE__ */ e("button", {
49
60
  ref: (e) => {
50
- e ? x.current.set(t.value, e) : x.current.delete(t.value);
61
+ e ? S.current.set(t.value, e) : S.current.delete(t.value);
51
62
  },
52
63
  onClick: () => {
53
- p || (h(t.value), y(!0));
64
+ h || (g && t.value !== _ && (C.current = !0), v(t.value));
54
65
  },
55
- className: o(l["bsy-segmented__item"], f && l["bsy-segmented__item--block"], m === t.value ? l["bsy-segmented__item--active"] : l["bsy-segmented__item--inactive"], { [l["bsy-segmented__item--disabled"]]: p }),
66
+ className: o(l["bsy-segmented__item"], m && l["bsy-segmented__item--block"], _ === t.value ? l["bsy-segmented__item--active"] : l["bsy-segmented__item--inactive"], { [l["bsy-segmented__item--disabled"]]: h }),
56
67
  children: t.label
57
68
  }, t.value))]
58
69
  });
59
70
  };
60
- u.displayName = "BsySegmented";
71
+ f.displayName = "BsySegmented";
61
72
  //#endregion
62
- export { u as t };
73
+ export { f as t };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./Segmented-Byw8j1hQ.js";
1
+ import { t as e } from "./Segmented-DkhT5_Ty.js";
2
2
  export { e as default };
@@ -1,17 +1,17 @@
1
- import { t as e } from "../Icon/Icon-CTZCSuVg.js";
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { t } from "../vendors/useLocale-Mk0d7wNt.js";
3
3
  import { n, t as r } from "../vendors/animations-C2i5EijE.js";
4
- import { t as i } from "./SelectInputSearch-Dm3CI_L4.js";
5
- import { n as a, t as o } from "../vendors/Tree-Bg2UzLsC.js";
6
- import { t as s } from "../CheckBox/CheckBox-B04hZKaC.js";
4
+ import { t as i } from "./SelectInputSearch-Cj9Uubc4.js";
5
+ import { n as a, t as o } from "../vendors/Tree-D7ZZAwIg.js";
6
+ import { t as s } from "../CheckBox/CheckBox-D1aeCoQb.js";
7
7
  import { t as c } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
8
8
  import { t as l } from "../vendors/useFloatingPortal-CDgiCnbb.js";
9
9
  import { first as u, isArray as d, isEmpty as f, isNil as p, noop as m } from "lodash-es";
10
10
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
11
11
  import { Suspense as v, createContext as y, forwardRef as b, memo as x, useCallback as S, useContext as C, useDeferredValue as w, useId as T, useImperativeHandle as E, useLayoutEffect as D, useMemo as O, useRef as k, useState as A } from "react";
12
+ import { Input as ee } from "antd";
12
13
  import j from "clsx";
13
- import { useControllableValue as ee, useHover as te, useToggle as ne } from "ahooks";
14
- import { Input as M } from "antd";
14
+ import { useControllableValue as te, useHover as M, useToggle as ne } from "ahooks";
15
15
  import { AnimatePresence as re, motion as N } from "motion/react";
16
16
  import { FloatingPortal as ie } from "@floating-ui/react";
17
17
  import P from "fuse.js";
@@ -89,10 +89,10 @@ H.displayName = "BsySelectSingleInput";
89
89
  //#endregion
90
90
  //#region src/components/Select/SelectInput/SelectMultipleInput/OptionTag/option-tag.module.scss
91
91
  var U = {
92
- "bsy-input-tag__container": "_bsy-input-tag__container_18guu_1",
93
- "bsy-input-tag__item": "_bsy-input-tag__item_18guu_7",
94
- "bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_18guu_20",
95
- "bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_18guu_24"
92
+ "bsy-input-tag__container": "_bsy-input-tag__container_znvs6_1",
93
+ "bsy-input-tag__item": "_bsy-input-tag__item_znvs6_7",
94
+ "bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_znvs6_20",
95
+ "bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_znvs6_24"
96
96
  }, W = b(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ g("div", {
97
97
  "data-bsy-input-tag": "true",
98
98
  className: j({
@@ -146,7 +146,7 @@ var G = "_select_multiple_input__container_8pd2n_1", K = "_select_multiple_input
146
146
  children: /* @__PURE__ */ _(W.Container, { children: [n?.map((t, n) => {
147
147
  let a = (t) => /* @__PURE__ */ g("div", {
148
148
  style: t,
149
- className: "bsy-input-tag__item-icon cursor-pointer",
149
+ className: j(U["bsy-input-tag__item-icon"], "cursor-pointer"),
150
150
  children: /* @__PURE__ */ g(e, {
151
151
  name: "close",
152
152
  style: { fontSize: 12 },
@@ -178,7 +178,7 @@ var G = "_select_multiple_input__container_8pd2n_1", K = "_select_multiple_input
178
178
  children: [v, /* @__PURE__ */ _(W.Container, { children: [n?.slice(0, u).map((t, n) => {
179
179
  let a = (n) => /* @__PURE__ */ g("div", {
180
180
  style: n,
181
- className: j("bsy-input-tag__item-icon", {
181
+ className: j(U["bsy-input-tag__item-icon"], {
182
182
  [Y.select_multiple_input__close_btn]: !s,
183
183
  [Y.select_multiple_input__close_btn + "--disabled"]: s
184
184
  }),
@@ -225,7 +225,7 @@ var Q = (e, t) => {
225
225
  };
226
226
  return r(e), n;
227
227
  }, ue = ({ placeholder: t, mode: n, clearable: i, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: f, ghost: m, inputValueStyle: v, tagStyle: y }) => {
228
- let b = k(null), x = te(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = R(), { fieldNames: T } = z(), E = O(() => {
228
+ let b = k(null), x = M(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = R(), { fieldNames: T } = z(), E = O(() => {
229
229
  if (p(C)) return [];
230
230
  let e = d(C) ? C : [C];
231
231
  if (l === L.TREE) {
@@ -331,7 +331,7 @@ var $ = x((e) => {
331
331
  className: "ml-2 flex-1",
332
332
  onClick: (e) => e.stopPropagation(),
333
333
  style: { minWidth: "146px" },
334
- children: /* @__PURE__ */ g(M, {
334
+ children: /* @__PURE__ */ g(ee, {
335
335
  ref: m,
336
336
  value: u,
337
337
  onChange: (e) => {
@@ -384,7 +384,6 @@ var de = (e) => {
384
384
  return /* @__PURE__ */ g("li", {
385
385
  className: j("flex items-center gap-[8px] min-h-[34px]", "cursor-pointer rounded-[4px]", "bsy-multiple-select-item", {
386
386
  "hover:bg-[#f3f3f3]": !0,
387
- "text-[#0265ff]": o,
388
387
  "text-[#4d609f]": c && !o
389
388
  }),
390
389
  children: /* @__PURE__ */ g(s, {
@@ -526,7 +525,7 @@ ge.displayName = "BsySelectPanel";
526
525
  //#endregion
527
526
  //#region src/components/Select/Select.tsx
528
527
  var _e = b((e, n) => {
529
- let { options: r = [], type: i = L.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender: u, onOtherInputChange: d, onOpenChange: f, onPopupScroll: p, prefix: m, suffixIcon: v, ghost: y, inputValueStyle: b, tagStyle: x, zIndex: C = 1101, zIndexMask: w = 1100, otherInputPosition: D = "bottom", popupMinWidth: te } = e, M = ae[i], { t: N } = t(), P = T(), { onChange: F } = e, R = a || oe, [z, B] = ee(e, {
528
+ let { options: r = [], type: i = L.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender: u, onOtherInputChange: d, onOpenChange: f, onPopupScroll: p, prefix: m, suffixIcon: v, ghost: y, inputValueStyle: b, tagStyle: x, zIndex: C = 1101, zIndexMask: w = 1100, otherInputPosition: D = "bottom", popupMinWidth: ee } = e, M = ae[i], { t: N } = t(), P = T(), { onChange: F } = e, R = a || oe, [z, B] = te(e, {
530
529
  defaultValue: M === I.SINGLE ? void 0 : [],
531
530
  defaultValuePropName: "defaultValue",
532
531
  valuePropName: "value",
@@ -633,7 +632,7 @@ var _e = b((e, n) => {
633
632
  showMask: e.showMask,
634
633
  zIndex: C,
635
634
  zIndexMask: w,
636
- popupMinWidth: te,
635
+ popupMinWidth: ee,
637
636
  offset: {
638
637
  x: 0,
639
638
  y: 4
@@ -1,4 +1,4 @@
1
- import { t as e } from "../Icon/Icon-CTZCSuVg.js";
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { t } from "../vendors/useLocale-Mk0d7wNt.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/components/Select/SelectInputSearch/SelectInputSearch.tsx
@@ -35,7 +35,7 @@ var i = (i) => {
35
35
  onClick: () => c?.(""),
36
36
  role: "button",
37
37
  "aria-label": "clear search",
38
- children: /* @__PURE__ */ n(e, { name: "close" })
38
+ children: /* @__PURE__ */ n(e, { name: "empty" })
39
39
  })
40
40
  ]
41
41
  })
@@ -1,11 +1,11 @@
1
- import "../Icon/Icon-CTZCSuVg.js";
1
+ import "../Icon/Icon-BQ3Whub2.js";
2
2
  import "../vendors/LocaleContext-Jj_JGgi2.js";
3
3
  import "../vendors/useLocale-Mk0d7wNt.js";
4
- import { n as e, r as t, t as n } from "./Select-xuQGK6It.js";
5
- import "./SelectInputSearch-Dm3CI_L4.js";
6
- import "../vendors/Tree-Bg2UzLsC.js";
7
- import "../CheckBox/CheckBox-DF201Nxg.js";
8
- import "../CheckBox/CheckBox-B04hZKaC.js";
4
+ import { n as e, r as t, t as n } from "./Select-BSPmsIMh.js";
5
+ import "./SelectInputSearch-Cj9Uubc4.js";
6
+ import "../vendors/Tree-D7ZZAwIg.js";
7
+ import "../CheckBox/CheckBox-BsihF-AN.js";
8
+ import "../CheckBox/CheckBox-D1aeCoQb.js";
9
9
  import "../Radio/Radio-WNw-VqIS.js";
10
10
  import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
11
11
  import "../vendors/useFloatingPortal-CDgiCnbb.js";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../Icon/Icon-CTZCSuVg.js";
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { n as t } from "../vendors/color-CxdZwdYM.js";
3
3
  import { n } from "../vendors/animations-C2i5EijE.js";
4
4
  import { t as r } from "../vendors/useFloatingPortal-CDgiCnbb.js";
@@ -1,5 +1,5 @@
1
- import "../Icon/Icon-CTZCSuVg.js";
1
+ import "../Icon/Icon-BQ3Whub2.js";
2
2
  import "../vendors/color-CxdZwdYM.js";
3
3
  import "../vendors/useFloatingPortal-CDgiCnbb.js";
4
- import { i as e, n as t, r as n, t as r } from "./Tabs-Cxf7jwys.js";
4
+ import { i as e, n as t, r as n, t as r } from "./Tabs-BVSzo2qS.js";
5
5
  export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
@@ -1,5 +1,5 @@
1
- import "../Icon/Icon-CTZCSuVg.js";
2
- import { t as e } from "../vendors/Tree-Bg2UzLsC.js";
3
- import "../CheckBox/CheckBox-DF201Nxg.js";
1
+ import "../Icon/Icon-BQ3Whub2.js";
2
+ import { t as e } from "../vendors/Tree-D7ZZAwIg.js";
3
+ import "../CheckBox/CheckBox-BsihF-AN.js";
4
4
  import "../Radio/Radio-WNw-VqIS.js";
5
5
  export { e as Tree };
@@ -1,3 +1,3 @@
1
- import { AmapProps } from './interface';
1
+ import { AmapProps } from './Amap.type';
2
2
  export declare function Amap(props: AmapProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default Amap;
@@ -1,14 +1,45 @@
1
1
  /// <reference path="amap-types.d.ts" />
2
- import { ReactNode, CSSProperties } from 'react';
2
+ import { CSSProperties, ReactNode } from 'react';
3
3
  export type LngLat = [number, number];
4
4
  export type AmapLoaderStatus = 'idle' | 'loading' | 'success' | 'error';
5
5
  export type AmapProviderProps = {
6
+ /**
7
+ *
8
+ * 高德地图应用 Key,未传时读取全局 ConfigProvider 中的 amap.key
9
+ */
6
10
  amapKey?: string;
11
+ /**
12
+ *
13
+ * 高德地图安全密钥,未传时读取全局 ConfigProvider 中的 amap.securityJsCode
14
+ */
7
15
  securityJsCode?: string;
16
+ /**
17
+ *
18
+ * 高德地图 JSAPI 版本号,未传时读取全局 ConfigProvider 中的 amap.version
19
+ */
8
20
  version?: string;
21
+ /**
22
+ *
23
+ * 需要额外加载的高德地图插件列表
24
+ * @default []
25
+ */
9
26
  plugins?: string[];
27
+ /**
28
+ *
29
+ * 地图资源加载中的占位内容
30
+ * @default null
31
+ */
10
32
  fallback?: ReactNode;
33
+ /**
34
+ *
35
+ * 地图资源加载失败时的占位内容或自定义渲染函数
36
+ * @default null
37
+ */
11
38
  errorFallback?: ReactNode | ((error: Error) => ReactNode);
39
+ /**
40
+ *
41
+ * Provider 包裹的地图内容
42
+ */
12
43
  children?: ReactNode;
13
44
  };
14
45
  export type AmapProviderContextValue = {
@@ -19,16 +50,49 @@ export type AmapProviderContextValue = {
19
50
  plugins: string[];
20
51
  };
21
52
  export type AmapProps = {
53
+ /**
54
+ *
55
+ * 地图中心点坐标
56
+ */
22
57
  center?: LngLat;
58
+ /**
59
+ *
60
+ * 地图缩放级别
61
+ */
23
62
  zoom?: number;
24
- options?: Record<string, any>;
63
+ /**
64
+ *
65
+ * 透传给 AMap.Map 的初始化配置
66
+ * @default {}
67
+ */
68
+ options?: AMap.Map;
69
+ /**
70
+ *
71
+ * 地图容器自定义类名
72
+ */
25
73
  className?: string;
74
+ /**
75
+ *
76
+ * 地图容器自定义样式
77
+ */
26
78
  style?: CSSProperties;
79
+ /**
80
+ *
81
+ * 地图子组件,例如标记、圆形覆盖物、聚合标记
82
+ */
27
83
  children?: ReactNode;
84
+ /**
85
+ *
86
+ * 地图实例创建完成后的回调
87
+ */
28
88
  onReady?: (ctx: {
29
89
  AMap: typeof AMap;
30
90
  map: AMap.Map;
31
91
  }) => void;
92
+ /**
93
+ *
94
+ * 地图初始化或事件绑定异常时的回调
95
+ */
32
96
  onError?: (error: Error) => void;
33
97
  };
34
98
  export type AmapContextValue = {
@@ -64,11 +128,36 @@ export type AmapMarkerInfoWindowOptions = {
64
128
  options?: AmapMarkerInfoWindowNativeOptions;
65
129
  };
66
130
  export type AmapMarkerProps = {
131
+ /**
132
+ *
133
+ * 标记自定义内容
134
+ */
67
135
  content?: ReactNode;
136
+ /**
137
+ *
138
+ * 鼠标悬停时展示的信息窗配置
139
+ */
68
140
  infoWindow?: AmapMarkerInfoWindowOptions;
141
+ /**
142
+ *
143
+ * 透传给 AMap.Marker 的配置
144
+ * @default {}
145
+ */
69
146
  options?: AMap.MarkerOptions;
147
+ /**
148
+ *
149
+ * 标记点击回调
150
+ */
70
151
  onClick?: (ctx: AmapMarkerEventContext) => void;
152
+ /**
153
+ *
154
+ * 鼠标移入标记回调
155
+ */
71
156
  onMouseEnter?: (ctx: AmapMarkerEventContext) => void;
157
+ /**
158
+ *
159
+ * 鼠标移出标记回调
160
+ */
72
161
  onMouseLeave?: (ctx: AmapMarkerEventContext) => void;
73
162
  };
74
163
  export type AmapMarkerClusterFitOptions = {
@@ -107,22 +196,92 @@ export type AmapMarkerClusterRuntime<T> = {
107
196
  content?: AmapMarkerClusterContent;
108
197
  };
109
198
  export type AmapMarkerClusterProps<T> = {
199
+ /**
200
+ *
201
+ * 聚合数据源
202
+ */
110
203
  data: T[];
204
+ /**
205
+ *
206
+ * 获取数据项唯一标识
207
+ */
111
208
  getKey: (item: T) => string;
209
+ /**
210
+ *
211
+ * 获取数据项经纬度坐标,返回空值时跳过该数据项
212
+ */
112
213
  getPosition: (item: T) => LngLat | null | undefined;
214
+ /**
215
+ *
216
+ * 自定义渲染单个标记内容
217
+ */
113
218
  renderMarker?: (ctx: AmapMarkerClusterMarkerContext<T>) => AmapMarkerClusterContent;
219
+ /**
220
+ *
221
+ * 自定义渲染聚合点内容
222
+ */
114
223
  renderCluster?: (ctx: AmapMarkerClusterRenderClusterContext<T>) => AmapMarkerClusterContent;
224
+ /**
225
+ *
226
+ * 单个标记的信息窗配置
227
+ */
115
228
  markerInfoWindow?: (ctx: AmapMarkerClusterInfoWindowContext<T>) => AmapMarkerInfoWindowOptions | null | undefined;
229
+ /**
230
+ *
231
+ * 透传给 AMap.MarkerCluster 的配置
232
+ * @default {}
233
+ */
116
234
  clusterOptions?: Record<string, any>;
235
+ /**
236
+ *
237
+ * 单个标记内容偏移量
238
+ */
117
239
  markerOffset?: AmapMarkerClusterMarkerOffset;
240
+ /**
241
+ *
242
+ * 点击聚合点时是否自动调整地图视野
243
+ * @default true
244
+ */
118
245
  autoFitOnClusterClick?: boolean;
246
+ /**
247
+ *
248
+ * 点击聚合点自动调整视野时的配置
249
+ */
119
250
  fitOptions?: AmapMarkerClusterFitOptions;
251
+ /**
252
+ *
253
+ * 单个标记点击回调
254
+ */
120
255
  onMarkerClick?: (ctx: AmapMarkerClusterMarkerEventContext<T>) => void;
256
+ /**
257
+ *
258
+ * 聚合点点击回调
259
+ */
121
260
  onClusterClick?: (ctx: AmapMarkerClusterEventContext<T>) => void;
261
+ /**
262
+ *
263
+ * 鼠标移入单个标记回调
264
+ */
122
265
  onMarkerMouseEnter?: (ctx: AmapMarkerClusterMarkerEventContext<T>) => void;
266
+ /**
267
+ *
268
+ * 鼠标移出单个标记回调
269
+ */
123
270
  onMarkerMouseLeave?: (ctx: AmapMarkerClusterMarkerEventContext<T>) => void;
271
+ /**
272
+ *
273
+ * 当前地图视野内可见数据项变化回调
274
+ */
124
275
  onVisibleItemsChange?: (items: T[]) => void;
276
+ /**
277
+ *
278
+ * 标记运行时信息变化回调
279
+ */
125
280
  onMarkerRuntimeChange?: (runtimes: Array<AmapMarkerClusterRuntime<T>>) => void;
281
+ /**
282
+ *
283
+ * 聚合组件内部异常回调
284
+ */
126
285
  onError?: (error: Error) => void;
127
286
  };
128
287
  export type AmapCircleEventContext = {
@@ -131,10 +290,36 @@ export type AmapCircleEventContext = {
131
290
  map: AMap.Map;
132
291
  };
133
292
  export type AmapCircleProps = {
293
+ /**
294
+ *
295
+ * 圆心坐标
296
+ */
134
297
  center: LngLat;
298
+ /**
299
+ *
300
+ * 圆形半径,单位米
301
+ */
135
302
  radius: number;
303
+ /**
304
+ *
305
+ * 透传给 AMap.Circle 的配置
306
+ * @default {}
307
+ */
136
308
  options?: Record<string, any>;
309
+ /**
310
+ *
311
+ * 是否显示圆形覆盖物
312
+ * @default true
313
+ */
137
314
  visible?: boolean;
315
+ /**
316
+ *
317
+ * 鼠标移入圆形覆盖物回调
318
+ */
138
319
  onMouseEnter?: (ctx: AmapCircleEventContext) => void;
320
+ /**
321
+ *
322
+ * 鼠标移出圆形覆盖物回调
323
+ */
139
324
  onMouseLeave?: (ctx: AmapCircleEventContext) => void;
140
325
  };
@@ -1,3 +1,3 @@
1
- import { AmapCircleProps } from '../interface';
1
+ import { AmapCircleProps } from '../Amap.type';
2
2
  export declare function AmapCircle(props: AmapCircleProps): null;
3
3
  export default AmapCircle;
@@ -1,3 +1,3 @@
1
- import { AmapMarkerProps } from '../interface';
1
+ import { AmapMarkerProps } from '../Amap.type';
2
2
  export declare function AmapMarker(props: AmapMarkerProps): null;
3
3
  export default AmapMarker;
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../amap-types.d.ts" />
2
- import { AmapMarkerInfoWindowOptions } from '../interface';
2
+ import { AmapMarkerInfoWindowOptions } from '../Amap.type';
3
3
  type UseMarkerInfoWindowOptions = {
4
4
  AMap: typeof AMap;
5
5
  map: AMap.Map;
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../amap-types.d.ts" />
2
- import { AmapMarkerInfoWindowOptions } from '../interface';
2
+ import { AmapMarkerInfoWindowOptions } from '../Amap.type';
3
3
  type UseMarkerInfoWindowControllerOptions = {
4
4
  AMap: typeof AMap;
5
5
  map: AMap.Map;
@@ -1,3 +1,3 @@
1
- import { AmapMarkerClusterProps } from '../interface';
1
+ import { AmapMarkerClusterProps } from '../Amap.type';
2
2
  export declare function AmapMarkerCluster<T>(props: AmapMarkerClusterProps<T>): null;
3
3
  export default AmapMarkerCluster;
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../amap-types.d.ts" />
2
- import { LngLat } from '../interface';
2
+ import { LngLat } from '../Amap.type';
3
3
  export type ClusterPoint<T> = {
4
4
  lnglat: LngLat;
5
5
  extData: {
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../amap-types.d.ts" />
2
- import { AmapMarkerClusterContent, AmapMarkerClusterMarkerOffset, AmapMarkerClusterRuntime, LngLat } from '../interface';
2
+ import { AmapMarkerClusterContent, AmapMarkerClusterMarkerOffset, AmapMarkerClusterRuntime, LngLat } from '../Amap.type';
3
3
  import { ClusterPoint, ManagedMarker } from './AmapMarkerCluster.type';
4
4
  export declare const MARKER_CLUSTER_PLUGIN_ERROR = "[ui-base] AmapMarkerCluster requires AMap.MarkerCluster plugin. Please add \"AMap.MarkerCluster\" to AmapProvider plugins.";
5
5
  export declare const EMPTY_CLUSTER_OPTIONS: Record<string, any>;
@@ -1,3 +1,3 @@
1
- import { AmapProviderProps } from '../interface';
1
+ import { AmapProviderProps } from '../Amap.type';
2
2
  export declare function AmapProvider(props: AmapProviderProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  export default AmapProvider;
@@ -1,3 +1,3 @@
1
- import { AmapContextValue, AmapProviderContextValue } from '../interface';
1
+ import { AmapContextValue, AmapProviderContextValue } from '../Amap.type';
2
2
  export declare const AmapProviderContext: import('react').Context<AmapProviderContextValue>;
3
3
  export declare const AmapContext: import('react').Context<AmapContextValue | null>;
@@ -1,2 +1,2 @@
1
- import { UseAmapResult } from '../interface';
1
+ import { UseAmapResult } from '../Amap.type';
2
2
  export declare const useAmap: () => UseAmapResult;
@@ -1,2 +1,2 @@
1
- import { UseCurrentLocationOptions, UseCurrentLocationResult } from '../interface';
1
+ import { UseCurrentLocationOptions, UseCurrentLocationResult } from '../Amap.type';
2
2
  export declare const useCurrentLocation: (options?: UseCurrentLocationOptions) => UseCurrentLocationResult;
@@ -4,4 +4,4 @@ export { AmapCircle } from './AmapCircle';
4
4
  export { AmapMarker } from './AmapMarker';
5
5
  export { AmapMarkerCluster } from './AmapMarkerCluster';
6
6
  export { useAmap, useCurrentLocation } from './hooks';
7
- export type { AmapCircleEventContext, AmapCircleProps, AmapMarkerClusterContent, AmapMarkerClusterEventContext, AmapMarkerClusterFitOptions, AmapMarkerClusterInfoWindowContext, AmapMarkerClusterMarkerContext, AmapMarkerClusterMarkerEventContext, AmapMarkerClusterMarkerOffset, AmapMarkerClusterProps, AmapMarkerClusterRenderClusterContext, AmapMarkerClusterRuntime, AmapMarkerEventContext, AmapMarkerInfoWindowNativeOptions, AmapMarkerInfoWindowOptions, AmapMarkerProps, AmapProps, AmapProviderProps, LngLat, UseAmapResult, UseCurrentLocationOptions, UseCurrentLocationResult, } from './interface';
7
+ export type { AmapCircleEventContext, AmapCircleProps, AmapMarkerClusterContent, AmapMarkerClusterEventContext, AmapMarkerClusterFitOptions, AmapMarkerClusterInfoWindowContext, AmapMarkerClusterMarkerContext, AmapMarkerClusterMarkerEventContext, AmapMarkerClusterMarkerOffset, AmapMarkerClusterProps, AmapMarkerClusterRenderClusterContext, AmapMarkerClusterRuntime, AmapMarkerEventContext, AmapMarkerInfoWindowNativeOptions, AmapMarkerInfoWindowOptions, AmapMarkerProps, AmapProps, AmapProviderProps, LngLat, UseAmapResult, UseCurrentLocationOptions, UseCurrentLocationResult, } from './Amap.type';
@@ -1,5 +1,5 @@
1
1
  /// <reference path="../amap-types.d.ts" />
2
- import { LngLat } from '../interface';
2
+ import { LngLat } from '../Amap.type';
3
3
  export type AmapRuntime = typeof globalThis.AMap & {
4
4
  convertFrom?: (location: LngLat, type: string, callback: (status: string, result: any) => void) => void;
5
5
  Geolocation?: new () => {
@@ -12,5 +12,6 @@ export type ConfigProviderProps = PropsWithChildren<{
12
12
  amap?: AmapConfig;
13
13
  }>;
14
14
  export type ConfigContextValue = {
15
+ locale?: Locale;
15
16
  amap?: AmapConfig;
16
17
  };
@@ -15,6 +15,10 @@ export interface ModalProps {
15
15
  * 宽度
16
16
  */
17
17
  width?: string;
18
+ /**
19
+ * 弹窗层级
20
+ */
21
+ zIndex?: number;
18
22
  /**
19
23
  * 是否全屏和默认宽度切换
20
24
  */
@@ -28,4 +28,8 @@ export type SegmentedProps<T extends React.Key = string | number> = {
28
28
  * @description 是否禁用
29
29
  */
30
30
  disabled?: boolean;
31
+ /**
32
+ * @description 用户点击切换时是否启用滑块滑动动画;首屏定位始终瞬间完成
33
+ */
34
+ enableAnimation?: boolean;
31
35
  };
@@ -3,7 +3,7 @@ export { Amap, AmapCircle, AmapMarker, AmapMarkerCluster, AmapProvider, useAmap,
3
3
  export type { AmapCircleEventContext, AmapCircleProps, AmapMarkerClusterContent, AmapMarkerClusterEventContext, AmapMarkerClusterFitOptions, AmapMarkerClusterInfoWindowContext, AmapMarkerClusterMarkerContext, AmapMarkerClusterMarkerEventContext, AmapMarkerClusterMarkerOffset, AmapMarkerClusterProps, AmapMarkerClusterRenderClusterContext, AmapMarkerClusterRuntime, AmapMarkerEventContext, AmapMarkerInfoWindowNativeOptions, AmapMarkerInfoWindowOptions, AmapMarkerProps, AmapProps, AmapProviderProps, LngLat, UseAmapResult, UseCurrentLocationOptions, UseCurrentLocationResult, } from './Amap';
4
4
  export { ConfigProvider } from './ConfigProvider';
5
5
  export type { AmapConfig, ConfigProviderProps } from './ConfigProvider';
6
- export { LocaleProvider } from '../locale/LocaleProvider';
6
+ export { LocalTheme } from './theme';
7
7
  export { default as Card } from './Card';
8
8
  export { default as Modal } from './Modal';
9
9
  export { default as ColorPicker } from './ColorPicker';