@baishuyun/ui-mobile 0.9.1 → 0.10.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 (64) hide show
  1. package/dist/AMap/{AMap-B1GiEoPE.js → AMap-BkfhkrnK.js} +106 -106
  2. package/dist/AMap/index.js +4 -4
  3. package/dist/ActionSheet/{ActionSheet-DVck9uyS.js → ActionSheet-DJyeduZq.js} +7 -7
  4. package/dist/ActionSheet/index.js +6 -6
  5. package/dist/Calendar/{Calendar-B1TwDL1q.js → Calendar-Cf81JVOC.js} +353 -356
  6. package/dist/Calendar/index.js +5 -4
  7. package/dist/Calendar/{cssVars-DNOooryc.js → timeUtils-t4A3-Hr6.js} +1 -3
  8. package/dist/ConfigProvider/{ConfigProvider-xyGx046s.js → ConfigProvider-CNWefxiV.js} +14 -2
  9. package/dist/ConfigProvider/index.js +4 -4
  10. package/dist/ConfigProvider/{useLocale-Bf81I-9U.js → useLocale-DiKogqPs.js} +6 -0
  11. package/dist/Editor/Editor-CfA-ye-u.js +2774 -0
  12. package/dist/Editor/index.js +8 -8
  13. package/dist/Gantt/{Gantt-CbHw9RMw.js → Gantt-Bhvbj3l8.js} +220 -219
  14. package/dist/Gantt/index.js +8 -8
  15. package/dist/Icon/Icon-BKlmJSoE.js +23 -0
  16. package/dist/Icon/index.js +2 -2
  17. package/dist/Overlay/index.js +2 -2
  18. package/dist/Popup/{Popup-BIIDAUmB.js → Popup-Cg3t422z.js} +2 -2
  19. package/dist/Popup/index.js +4 -4
  20. package/dist/Segmented/Segmented-CxQ3Pd05.js +85 -0
  21. package/dist/Segmented/index.js +3 -0
  22. package/dist/components/Editor/{EditorHtml.d.ts → EditorHtmlPreview.d.ts} +1 -1
  23. package/dist/components/Editor/color/EditorColorPicker.d.ts +11 -0
  24. package/dist/components/Editor/color/colorUtils.d.ts +32 -0
  25. package/dist/components/Editor/constants/codeLanguages.d.ts +6 -0
  26. package/dist/components/Editor/hooks/useEditorAiSession.d.ts +20 -0
  27. package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
  28. package/dist/components/Editor/hooks/useEditorImageUpload.d.ts +17 -0
  29. package/dist/components/Editor/hooks/useEditorLink.d.ts +15 -0
  30. package/dist/components/Editor/hooks/useEditorValueBridge.d.ts +10 -0
  31. package/dist/components/Editor/htmlConfig.d.ts +2 -0
  32. package/dist/components/Editor/index.d.ts +1 -1
  33. package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
  34. package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +2 -0
  35. package/dist/components/Editor/plugins/EnterKeyPlugin.d.ts +1 -0
  36. package/dist/components/Editor/plugins/TablePlugin.d.ts +2 -0
  37. package/dist/components/Editor/popups/AiResultPopup.d.ts +13 -0
  38. package/dist/components/Editor/popups/ImageUrlPopup.d.ts +7 -0
  39. package/dist/components/Editor/popups/LinkPopup.d.ts +13 -0
  40. package/dist/components/Editor/popups/OptionSheets.d.ts +23 -0
  41. package/dist/components/Editor/popups/index.d.ts +4 -0
  42. package/dist/components/Editor/popups/shared.d.ts +11 -0
  43. package/dist/components/Editor/toolbar/Toolbar.d.ts +7 -1
  44. package/dist/components/Editor/toolbar/useTextFormats.d.ts +2 -15
  45. package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
  46. package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +4 -0
  47. package/dist/components/Editor/utils/readTextFormats.d.ts +21 -0
  48. package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
  49. package/dist/components/Segmented/Segmented.d.ts +7 -0
  50. package/dist/components/Segmented/index.d.ts +2 -0
  51. package/dist/components/Segmented/interface.d.ts +42 -0
  52. package/dist/components/index.d.ts +3 -1
  53. package/dist/index.js +14 -13
  54. package/dist/locale/lang/en-US.json.d.ts +6 -0
  55. package/dist/locale/lang/zh-CN.json.d.ts +6 -0
  56. package/dist/locale/lang/zh-TW.json.d.ts +6 -0
  57. package/dist/style.css +1 -1
  58. package/dist/vendors/cssVars-BbL_cmFM.js +6 -0
  59. package/dist/vendors/{version-CegBK2kS.js → version-C0got4sp.js} +1 -1
  60. package/package.json +7 -1
  61. package/dist/Editor/Editor-COxP3RpF.js +0 -2059
  62. package/dist/Icon/Icon-D3xi1oyo.js +0 -23
  63. package/dist/components/Editor/sheets.d.ts +0 -43
  64. /package/dist/Overlay/{Overlay-CqQWOqO4.js → Overlay-DFiZYsBs.js} +0 -0
@@ -1,13 +1,10 @@
1
- import { t as e } from "../Icon/Icon-D3xi1oyo.js";
2
- import { r as t, t as n } from "../ConfigProvider/useLocale-Bf81I-9U.js";
1
+ import { r as e, t } from "../ConfigProvider/useLocale-DiKogqPs.js";
2
+ import { t as n } from "../Icon/Icon-BKlmJSoE.js";
3
3
  import { createContext as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
4
4
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
- //#region src/components/AMap/AMap.module.scss
6
- var f = {
7
- "bsy-mobile-amap": "_bsy-mobile-amap_1j885_1",
8
- "bsy-mobile-amap__canvas": "_bsy-mobile-amap__canvas_1j885_6"
9
- }, p = r(null), m = () => {
10
- let e = a(p);
5
+ //#region src/components/AMap/context.ts
6
+ var f = r(null), p = () => {
7
+ let e = a(f);
11
8
  return e ? {
12
9
  map: e.map,
13
10
  ready: e.ready
@@ -15,7 +12,7 @@ var f = {
15
12
  map: null,
16
13
  ready: !1
17
14
  };
18
- }, h = () => a(p), g = "script[src*=\"webapi.amap.com/maps\"]", _ = 15e3, v = 50, y = null, b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Map(), S = () => typeof window < "u" && typeof window.AMap?.Map == "function", C = () => typeof document > "u" ? null : document.querySelector(g), w = (e, t) => new Promise((n, r) => {
15
+ }, m = () => a(f), h = "script[src*=\"webapi.amap.com/maps\"]", g = 15e3, _ = 50, v = null, y = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Map(), x = () => typeof window < "u" && typeof window.AMap?.Map == "function", S = () => typeof document > "u" ? null : document.querySelector(h), C = (e, t) => new Promise((n, r) => {
19
16
  if (e()) {
20
17
  n();
21
18
  return;
@@ -25,17 +22,17 @@ var f = {
25
22
  window.clearInterval(a), n();
26
23
  return;
27
24
  }
28
- Date.now() - i >= _ && (window.clearInterval(a), r(Error(t)));
29
- }, v);
30
- }), T = (e) => new Promise((t, n) => {
31
- if (S()) {
25
+ Date.now() - i >= g && (window.clearInterval(a), r(Error(t)));
26
+ }, _);
27
+ }), w = (e) => new Promise((t, n) => {
28
+ if (x()) {
32
29
  t();
33
30
  return;
34
31
  }
35
32
  e.addEventListener("load", () => {
36
- w(S, "AMap script loaded but AMap.Map is missing").then(t, n);
37
- }, { once: !0 }), e.addEventListener("error", () => n(/* @__PURE__ */ Error("AMap script failed to load")), { once: !0 }), w(S, "Timed out waiting for existing AMap script").then(t, n);
38
- }), E = async ({ key: e, securityJsCode: t }) => {
33
+ C(x, "AMap script loaded but AMap.Map is missing").then(t, n);
34
+ }, { once: !0 }), e.addEventListener("error", () => n(/* @__PURE__ */ Error("AMap script failed to load")), { once: !0 }), C(x, "Timed out waiting for existing AMap script").then(t, n);
35
+ }), T = async ({ key: e, securityJsCode: t }) => {
39
36
  if (!e) throw Error("AMap key is required when the maps script is not loaded");
40
37
  t && !window._AMapSecurityConfig && (window._AMapSecurityConfig = { securityJsCode: t });
41
38
  let { default: n } = await import("@amap/amap-jsapi-loader");
@@ -43,15 +40,15 @@ var f = {
43
40
  key: e,
44
41
  version: "2.0",
45
42
  plugins: []
46
- }), !S()) throw Error("AMap loader finished but AMap.Map is missing");
47
- }, D = (e = {}) => S() ? Promise.resolve(window.AMap) : y || (y = (async () => {
48
- let t = C();
49
- return t ? (await T(t), window.AMap) : (await E(e), window.AMap);
43
+ }), !x()) throw Error("AMap loader finished but AMap.Map is missing");
44
+ }, E = (e = {}) => x() ? Promise.resolve(window.AMap) : v || (v = (async () => {
45
+ let t = S();
46
+ return t ? (await w(t), window.AMap) : (await T(e), window.AMap);
50
47
  })().catch((e) => {
51
- throw y = null, e;
52
- }), y), O = (e) => {
53
- if (e.every((e) => b.has(e))) return Promise.resolve();
54
- let t = [...e].sort().join(","), n = x.get(t);
48
+ throw v = null, e;
49
+ }), v), D = (e) => {
50
+ if (e.every((e) => y.has(e))) return Promise.resolve();
51
+ let t = [...e].sort().join(","), n = b.get(t);
55
52
  if (n) return n;
56
53
  let r = new Promise((t, n) => {
57
54
  let r = window.AMap;
@@ -60,27 +57,30 @@ var f = {
60
57
  return;
61
58
  }
62
59
  r.plugin(e, () => {
63
- e.forEach((e) => b.add(e)), t();
60
+ e.forEach((e) => y.add(e)), t();
64
61
  });
65
62
  }).finally(() => {
66
- x.delete(t);
63
+ b.delete(t);
67
64
  });
68
- return x.set(t, r), r;
69
- }, k = (...e) => e.filter(Boolean).join(" "), A = ({ mapKey: e, securityJsCode: n, zoom: r, center: i, className: a, children: m, onReady: h, onError: g }) => {
70
- let _ = t(), v = c(null), y = c(null), [b, x] = l(null), S = c(h), C = c(g);
71
- S.current = h, C.current = g;
72
- let w = e ?? _?.key, T = n ?? _?.securityJsCode;
65
+ return b.set(t, r), r;
66
+ }, O = (...e) => e.filter(Boolean).join(" "), k = {
67
+ "bsy-mobile-amap": "_bsy-mobile-amap_1j885_1",
68
+ "bsy-mobile-amap__canvas": "_bsy-mobile-amap__canvas_1j885_6"
69
+ }, A = ({ mapKey: t, securityJsCode: n, zoom: r, center: i, className: a, children: p, onReady: m, onError: h }) => {
70
+ let g = e(), _ = c(null), v = c(null), [y, b] = l(null), x = c(m), S = c(h);
71
+ x.current = m, S.current = h;
72
+ let C = t ?? g?.key, w = n ?? g?.securityJsCode;
73
73
  o(() => {
74
- let e = v.current;
74
+ let e = _.current;
75
75
  if (!e) return;
76
76
  let t = !1;
77
77
  return (async () => {
78
78
  try {
79
- let n = await D({
80
- key: w,
81
- securityJsCode: T
79
+ let n = await E({
80
+ key: C,
81
+ securityJsCode: w
82
82
  });
83
- if (t || y.current || (await O(["AMap.Scale"]).catch((e) => {
83
+ if (t || v.current || (await D(["AMap.Scale"]).catch((e) => {
84
84
  console.warn("[AMap] failed to load Scale plugin", e);
85
85
  }), t)) return;
86
86
  let a = new n.Map(e, {
@@ -90,36 +90,36 @@ var f = {
90
90
  ...r === void 0 ? {} : { zoom: r },
91
91
  ...i ? { center: i } : {}
92
92
  });
93
- typeof n.Scale == "function" && a.addControl(new n.Scale()), y.current = a, x(n), S.current?.(a);
93
+ typeof n.Scale == "function" && a.addControl(new n.Scale()), v.current = a, b(n), x.current?.(a);
94
94
  } catch (e) {
95
- t || C.current?.(e instanceof Error ? e : Error(String(e)));
95
+ t || S.current?.(e instanceof Error ? e : Error(String(e)));
96
96
  }
97
97
  })(), () => {
98
- t = !0, y.current?.destroy?.(), y.current = null, x(null);
98
+ t = !0, v.current?.destroy?.(), v.current = null, b(null);
99
99
  };
100
100
  }, [
101
+ C,
101
102
  w,
102
- T,
103
103
  r,
104
104
  i
105
105
  ]);
106
- let E = s(() => ({
107
- map: y.current,
108
- ready: b !== null,
109
- AMapNS: b
110
- }), [b]);
111
- return /* @__PURE__ */ u(p.Provider, {
112
- value: E,
106
+ let T = s(() => ({
107
+ map: v.current,
108
+ ready: y !== null,
109
+ AMapNS: y
110
+ }), [y]);
111
+ return /* @__PURE__ */ u(f.Provider, {
112
+ value: T,
113
113
  children: /* @__PURE__ */ d("div", {
114
- className: k(f["bsy-mobile-amap"], a),
114
+ className: O(k["bsy-mobile-amap"], a),
115
115
  children: [/* @__PURE__ */ u("div", {
116
- ref: v,
117
- className: f["bsy-mobile-amap__canvas"]
118
- }), m]
116
+ ref: _,
117
+ className: k["bsy-mobile-amap__canvas"]
118
+ }), p]
119
119
  })
120
120
  });
121
121
  }, j = { "bsy-mobile-amap__controls": "_bsy-mobile-amap__controls_8fnp9_1" }, M = ({ children: e, className: t }) => /* @__PURE__ */ u("div", {
122
- className: k(j["bsy-mobile-amap__controls"], t),
122
+ className: O(j["bsy-mobile-amap__controls"], t),
123
123
  children: e
124
124
  }), N = {
125
125
  small: 22,
@@ -241,8 +241,8 @@ var f = {
241
241
  white-space:nowrap;
242
242
  ">${e}</div>
243
243
  </div>
244
- `, H = () => "\n <div style=\"\n position: relative;\n width: 30px;\n height: 30px;\n pointer-events: none;\n transform: translateZ(0);\n will-change: transform;\n \">\n <div style=\"position: absolute; inset: 0; pointer-events: none;\">\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 22px;\n height: 22px;\n margin: -11px 0 0 -11px;\n border-radius: 50%;\n background: rgba(2, 101, 255, 0.2);\n \"></div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 14px;\n height: 14px;\n margin: -7px 0 0 -7px;\n border-radius: 50%;\n background: #0265ff;\n animation: map-current-location-ripple 2.4s ease-out infinite;\n \"></div>\n </div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 24px;\n height: 24px;\n margin: -12px 0 0 -12px;\n border-radius: 50%;\n background: #fff;\n border: 1px solid rgba(2, 101, 255, 0.2);\n \"></div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 14px;\n height: 14px;\n margin: -7px 0 0 -7px;\n border-radius: 50%;\n background: #0265ff;\n \"></div>\n <style>\n @keyframes map-current-location-ripple {\n 0% { transform: scale(1); opacity: 0.38; }\n 100% { transform: scale(3); opacity: 0; }\n }\n </style>\n </div>\n", ee = { "bsy-mobile-amap__control-btn": "_bsy-mobile-amap__control-btn_wwc06_1" }, U = ({ onLocate: t, onError: r }) => {
245
- let { t: a } = n(), o = h(), s = o?.map, l = o?.AMapNS, d = c(null), f = c(!1), p = c(null), m = i((e) => {
244
+ `, H = () => "\n <div style=\"\n position: relative;\n width: 30px;\n height: 30px;\n pointer-events: none;\n transform: translateZ(0);\n will-change: transform;\n \">\n <div style=\"position: absolute; inset: 0; pointer-events: none;\">\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 22px;\n height: 22px;\n margin: -11px 0 0 -11px;\n border-radius: 50%;\n background: rgba(2, 101, 255, 0.2);\n \"></div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 14px;\n height: 14px;\n margin: -7px 0 0 -7px;\n border-radius: 50%;\n background: #0265ff;\n animation: map-current-location-ripple 2.4s ease-out infinite;\n \"></div>\n </div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 24px;\n height: 24px;\n margin: -12px 0 0 -12px;\n border-radius: 50%;\n background: #fff;\n border: 1px solid rgba(2, 101, 255, 0.2);\n \"></div>\n <div style=\"\n position: absolute;\n top: 50%;\n left: 50%;\n width: 14px;\n height: 14px;\n margin: -7px 0 0 -7px;\n border-radius: 50%;\n background: #0265ff;\n \"></div>\n <style>\n @keyframes map-current-location-ripple {\n 0% { transform: scale(1); opacity: 0.38; }\n 100% { transform: scale(3); opacity: 0; }\n }\n </style>\n </div>\n", U = { "bsy-mobile-amap__control-btn": "_bsy-mobile-amap__control-btn_wwc06_1" }, W = ({ onLocate: e, onError: r }) => {
245
+ let { t: a } = t(), o = m(), s = o?.map, l = o?.AMapNS, d = c(null), f = c(!1), p = c(null), h = i((e) => {
246
246
  if (!s || !l) return;
247
247
  d.current?.remove?.();
248
248
  let t = new l.Marker({
@@ -255,8 +255,8 @@ var f = {
255
255
  if (!(!s || !l || f.current)) {
256
256
  f.current = !0;
257
257
  try {
258
- await O(["AMap.Geolocation"]);
259
- let e = await new Promise((e, t) => {
258
+ await D(["AMap.Geolocation"]);
259
+ let t = await new Promise((e, t) => {
260
260
  p.current ??= new l.Geolocation({
261
261
  timeout: 1e4,
262
262
  showButton: !1,
@@ -272,7 +272,7 @@ var f = {
272
272
  t(Error(r?.message || a("amap.locate.failed")));
273
273
  });
274
274
  });
275
- s.setZoomAndCenter(17, e), m(e), t?.(e);
275
+ s.setZoomAndCenter(17, t), h(t), e?.(t);
276
276
  } catch (e) {
277
277
  r?.(e instanceof Error ? e : Error(String(e)));
278
278
  } finally {
@@ -282,36 +282,36 @@ var f = {
282
282
  };
283
283
  return /* @__PURE__ */ u("button", {
284
284
  type: "button",
285
- className: ee["bsy-mobile-amap__control-btn"],
285
+ className: U["bsy-mobile-amap__control-btn"],
286
286
  "aria-label": a("amap.locate.ariaLabel"),
287
287
  onClick: () => {
288
288
  g();
289
289
  },
290
- children: /* @__PURE__ */ u(e, {
290
+ children: /* @__PURE__ */ u(n, {
291
291
  name: "Positioning",
292
292
  size: 26,
293
293
  color: "#121111"
294
294
  })
295
295
  });
296
- }, W = [
296
+ }, G = [
297
297
  48,
298
298
  48,
299
299
  48,
300
300
  48
301
- ], G = ({ AMap: e, map: t, points: n, singleMarkerZoom: r = 17, maxZoom: i, avoid: a = [...W] }) => {
301
+ ], K = ({ AMap: e, map: t, points: n, singleMarkerZoom: r = 17, maxZoom: i, avoid: a = [...G] }) => {
302
302
  if (!t || !Array.isArray(n) || n.length === 0) return !1;
303
303
  if (n.length === 1) return t.setZoomAndCenter(r, [n[0].lng, n[0].lat]), !0;
304
304
  let o = n.map((e) => e.lng), s = n.map((e) => e.lat), c = new e.LngLat(Math.min(...o), Math.min(...s)), l = new e.LngLat(Math.max(...o), Math.max(...s)), u = new e.Bounds(c, l), d = i === void 0 ? t.getFitZoomAndCenterByBounds(u, a) : t.getFitZoomAndCenterByBounds(u, a, i), [f, p] = Array.isArray(d) ? d : [];
305
305
  return typeof f != "number" || !p ? !1 : (t.setZoomAndCenter(f, p), !0);
306
- }, K = [], q = (e) => {
306
+ }, q = [], ee = (e) => {
307
307
  let t = e?.lnglat;
308
308
  if (Array.isArray(t) && t.length >= 2) {
309
309
  let [e, n] = t.map(Number);
310
310
  if (Number.isFinite(e) && Number.isFinite(n)) return [e, n];
311
311
  }
312
312
  return t && Number.isFinite(t.lng) && Number.isFinite(t.lat) ? [Number(t.lng), Number(t.lat)] : null;
313
- }, J = ({ items: e = K, cluster: t = !1, icon: n = F, size: r = "middle", labelColor: i = "dark", highlightId: a = null, fitView: l = !1, onClick: u, onDisplayChange: d }) => {
314
- let f = h(), p = f?.map, m = !!f?.ready, g = f?.AMapNS, _ = c(/* @__PURE__ */ new Map()), v = c(null), y = c(u), b = c(d), x = c({
313
+ }, J = ({ items: e = q, cluster: t = !1, icon: n = F, size: r = "middle", labelColor: i = "dark", highlightId: a = null, fitView: l = !1, onClick: u, onDisplayChange: d }) => {
314
+ let f = m(), p = f?.map, h = !!f?.ready, g = f?.AMapNS, _ = c(/* @__PURE__ */ new Map()), v = c(null), y = c(u), b = c(d), x = c({
315
315
  id: a,
316
316
  nonce: 0
317
317
  }), S = c("");
@@ -330,7 +330,7 @@ var f = {
330
330
  labelColor: i
331
331
  });
332
332
  return o(() => {
333
- if (!m || !p || !g) return;
333
+ if (!h || !p || !g) return;
334
334
  let n = () => {
335
335
  _.current.forEach((e) => {
336
336
  e?.off?.("click"), e?.remove?.();
@@ -355,7 +355,7 @@ var f = {
355
355
  n();
356
356
  let a = !1;
357
357
  return (async () => {
358
- await O(["AMap.MarkerCluster"]), !(a || !p) && (v.current || (v.current = new g.MarkerCluster(p, [], {
358
+ await D(["AMap.MarkerCluster"]), !(a || !p) && (v.current || (v.current = new g.MarkerCluster(p, [], {
359
359
  gridSize: 60,
360
360
  averageCenter: !0,
361
361
  renderMarker: (e) => {
@@ -379,10 +379,10 @@ var f = {
379
379
  t && y.current?.(t);
380
380
  return;
381
381
  }
382
- G({
382
+ K({
383
383
  AMap: g,
384
384
  map: p,
385
- points: t.map((e) => q(e)).filter((e) => e !== null).map((e) => ({
385
+ points: t.map((e) => ee(e)).filter((e) => e !== null).map((e) => ({
386
386
  lng: e[0],
387
387
  lat: e[1]
388
388
  })),
@@ -405,16 +405,16 @@ var f = {
405
405
  e,
406
406
  i,
407
407
  p,
408
- m,
408
+ h,
409
409
  r,
410
410
  a
411
411
  ]), o(() => {
412
- if (!(!l || !m || !p || !g)) {
412
+ if (!(!l || !h || !p || !g)) {
413
413
  if (!T) {
414
414
  S.current = "";
415
415
  return;
416
416
  }
417
- S.current !== T && G({
417
+ S.current !== T && K({
418
418
  AMap: g,
419
419
  map: p,
420
420
  points: e
@@ -425,7 +425,7 @@ var f = {
425
425
  l,
426
426
  e,
427
427
  p,
428
- m,
428
+ h,
429
429
  T
430
430
  ]), null;
431
431
  }, te = (e) => {
@@ -497,7 +497,7 @@ var f = {
497
497
  }), se = async ({ AMap: e, keyword: t, pageSize: n }) => {
498
498
  let r = `${t || ""}`.trim();
499
499
  if (!r) return [];
500
- await O(["AMap.PlaceSearch", "AMap.AutoComplete"]);
500
+ await D(["AMap.PlaceSearch", "AMap.AutoComplete"]);
501
501
  let i = await Promise.allSettled([ae({
502
502
  AMap: e,
503
503
  keyword: r
@@ -529,19 +529,19 @@ var f = {
529
529
  }, ce = 20, Z = 14, le = 240, ue = 250, Q = 246, de = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fe = (e, t, n) => n ? `${e || ""}`.split(n).map((e, n) => e ? e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ u("span", {
530
530
  className: X["bsy-mobile-amap__poi-highlight"],
531
531
  children: e
532
- }, `${e}-${n}`) : /* @__PURE__ */ u("span", { children: e }, `${e}-${n}`) : null) : e, pe = ({ onSelect: t }) => {
533
- let { t: r } = n(), a = h(), s = a?.map, f = a?.AMapNS, p = c(null), m = c(null), g = c(null), [_, v] = l(""), [y, b] = l(""), [x, S] = l([]), [C, w] = l(!1), [T, E] = l(!1), [D, O] = l("collapsed"), [A, j] = l(Q), M = c(null), N = c(null), P = c(null), F = c(0), I = c(!1), L = c("collapsed"), R = c(!0), z = i(() => {
532
+ }, `${e}-${n}`) : /* @__PURE__ */ u("span", { children: e }, `${e}-${n}`) : null) : e, pe = ({ onSelect: e }) => {
533
+ let { t: r } = t(), a = m(), s = a?.map, f = a?.AMapNS, p = c(null), h = c(null), g = c(null), [_, v] = l(""), [y, b] = l(""), [x, S] = l([]), [C, w] = l(!1), [T, E] = l(!1), [D, k] = l("collapsed"), [A, j] = l(Q), M = c(null), N = c(null), P = c(null), F = c(0), I = c(!1), L = c("collapsed"), R = c(!0), z = i(() => {
534
534
  g.current?.remove?.(), g.current = null;
535
535
  }, []), B = i(() => {
536
- N.current !== null && (window.clearTimeout(N.current), N.current = null), M.current !== null && (window.clearTimeout(M.current), M.current = null), L.current !== "expanded" && (O("collapsed"), L.current = "collapsed", N.current = window.setTimeout(() => {
537
- R.current && (O("expanded"), L.current = "expanded", N.current = null);
536
+ N.current !== null && (window.clearTimeout(N.current), N.current = null), M.current !== null && (window.clearTimeout(M.current), M.current = null), L.current !== "expanded" && (k("collapsed"), L.current = "collapsed", N.current = window.setTimeout(() => {
537
+ R.current && (k("expanded"), L.current = "expanded", N.current = null);
538
538
  }, 1));
539
539
  }, []), V = i(() => {
540
- L.current !== "collapsed" && (N.current !== null && (window.clearTimeout(N.current), N.current = null), O("closing"), L.current = "closing", M.current !== null && window.clearTimeout(M.current), M.current = window.setTimeout(() => {
541
- O("collapsed"), b(""), S([]), L.current = "collapsed", M.current = null;
540
+ L.current !== "collapsed" && (N.current !== null && (window.clearTimeout(N.current), N.current = null), k("closing"), L.current = "closing", M.current !== null && window.clearTimeout(M.current), M.current = window.setTimeout(() => {
541
+ k("collapsed"), b(""), S([]), L.current = "collapsed", M.current = null;
542
542
  }, le));
543
543
  }, []), H = i(() => {
544
- N.current !== null && (window.clearTimeout(N.current), N.current = null), M.current !== null && (window.clearTimeout(M.current), M.current = null), O("collapsed"), b(""), S([]), w(!1), L.current = "collapsed";
544
+ N.current !== null && (window.clearTimeout(N.current), N.current = null), M.current !== null && (window.clearTimeout(M.current), M.current = null), k("collapsed"), b(""), S([]), w(!1), L.current = "collapsed";
545
545
  }, []);
546
546
  o(() => {
547
547
  let e = p.current?.parentElement, t = () => {
@@ -591,19 +591,19 @@ var f = {
591
591
  ]), o(() => (R.current = !0, () => {
592
592
  R.current = !1, P.current !== null && window.clearTimeout(P.current), N.current !== null && window.clearTimeout(N.current), M.current !== null && window.clearTimeout(M.current), z();
593
593
  }), [z]);
594
- let ee = (e) => {
594
+ let U = (e) => {
595
595
  let t = e.target.value;
596
596
  t.trim() || z(), v(t);
597
- }, U = () => {
598
- P.current !== null && (window.clearTimeout(P.current), P.current = null), F.current += 1, z(), v(""), H(), m.current?.focus();
599
- }, W = (e) => {
600
- if (z(), I.current = !0, v(e.title || ""), typeof f?.Marker == "function" && s) {
601
- let t = new f.Marker({ position: [e.lng, e.lat] });
602
- s.add(t), g.current = t;
597
+ }, W = () => {
598
+ P.current !== null && (window.clearTimeout(P.current), P.current = null), F.current += 1, z(), v(""), H(), h.current?.focus();
599
+ }, G = (t) => {
600
+ if (z(), I.current = !0, v(t.title || ""), typeof f?.Marker == "function" && s) {
601
+ let e = new f.Marker({ position: [t.lng, t.lat] });
602
+ s.add(e), g.current = e;
603
603
  }
604
604
  let n = typeof s?.getZoom == "function" ? s.getZoom() : Z;
605
- typeof s?.setZoomAndCenter == "function" && s.setZoomAndCenter(Math.max(n || 0, Z), [e.lng, e.lat], !0), F.current += 1, w(!1), V(), t?.(e);
606
- }, G = D === "expanded", K = D === "closing", q = !!_.trim() && T, J = y.trim() ? RegExp(`(${de(y)})`, "ig") : null;
605
+ typeof s?.setZoomAndCenter == "function" && s.setZoomAndCenter(Math.max(n || 0, Z), [t.lng, t.lat], !0), F.current += 1, w(!1), V(), e?.(t);
606
+ }, K = D === "expanded", q = D === "closing", ee = !!_.trim() && T, J = y.trim() ? RegExp(`(${de(y)})`, "ig") : null;
607
607
  return /* @__PURE__ */ d("div", {
608
608
  ref: p,
609
609
  className: X["bsy-mobile-amap__poi"],
@@ -611,64 +611,64 @@ var f = {
611
611
  children: [/* @__PURE__ */ d("div", {
612
612
  className: X["bsy-mobile-amap__poi-box"],
613
613
  children: [/* @__PURE__ */ u("input", {
614
- ref: m,
614
+ ref: h,
615
615
  className: X["bsy-mobile-amap__poi-input"],
616
616
  value: _,
617
- onChange: ee,
617
+ onChange: U,
618
618
  onFocus: () => E(!0),
619
619
  onBlur: () => E(!1),
620
620
  placeholder: r("amap.poi.placeholder"),
621
621
  "data-testid": "map-poi-search-input"
622
- }), q ? /* @__PURE__ */ u("button", {
622
+ }), ee ? /* @__PURE__ */ u("button", {
623
623
  type: "button",
624
624
  className: X["bsy-mobile-amap__poi-clear"],
625
625
  onMouseDown: (e) => e.preventDefault(),
626
- onClick: U,
627
- children: /* @__PURE__ */ u(e, {
626
+ onClick: W,
627
+ children: /* @__PURE__ */ u(n, {
628
628
  name: "close",
629
629
  size: 16,
630
630
  color: "#666666"
631
631
  })
632
- }) : /* @__PURE__ */ u(e, {
632
+ }) : /* @__PURE__ */ u(n, {
633
633
  name: "search",
634
634
  size: 16,
635
635
  color: "#666666"
636
636
  })]
637
637
  }), /* @__PURE__ */ u("div", {
638
- className: k(X["bsy-mobile-amap__poi-dropdown"], G && X["bsy-mobile-amap__poi-dropdown--open"], K && X["bsy-mobile-amap__poi-dropdown--closing"]),
638
+ className: O(X["bsy-mobile-amap__poi-dropdown"], K && X["bsy-mobile-amap__poi-dropdown--open"], q && X["bsy-mobile-amap__poi-dropdown--closing"]),
639
639
  "data-panel-state": D,
640
640
  children: /* @__PURE__ */ u("div", {
641
641
  className: X["bsy-mobile-amap__poi-dropdown-clip"],
642
642
  children: /* @__PURE__ */ u("div", {
643
643
  className: X["bsy-mobile-amap__poi-panel"],
644
644
  style: {
645
- opacity: K ? 0 : 1,
646
- transform: G ? "translateY(0)" : "translateY(12px)"
645
+ opacity: q ? 0 : 1,
646
+ transform: K ? "translateY(0)" : "translateY(12px)"
647
647
  },
648
648
  children: /* @__PURE__ */ u("div", {
649
649
  className: X["bsy-mobile-amap__poi-list"],
650
650
  style: { maxHeight: A },
651
- children: x.length > 0 ? x.map((t) => /* @__PURE__ */ u("button", {
651
+ children: x.length > 0 ? x.map((e) => /* @__PURE__ */ u("button", {
652
652
  type: "button",
653
653
  className: X["bsy-mobile-amap__poi-option"],
654
- onClick: () => W(t),
654
+ onClick: () => G(e),
655
655
  children: /* @__PURE__ */ d("div", {
656
656
  className: X["bsy-mobile-amap__poi-option-body"],
657
657
  children: [/* @__PURE__ */ d("div", {
658
658
  className: X["bsy-mobile-amap__poi-title-wrap"],
659
- children: [/* @__PURE__ */ u(e, {
659
+ children: [/* @__PURE__ */ u(n, {
660
660
  name: "Address",
661
661
  size: 16
662
662
  }), /* @__PURE__ */ u("div", {
663
663
  className: X["bsy-mobile-amap__poi-title"],
664
- children: fe(t.title, y, J)
664
+ children: fe(e.title, y, J)
665
665
  })]
666
666
  }), /* @__PURE__ */ u("div", {
667
667
  className: X["bsy-mobile-amap__poi-address"],
668
- children: fe(t.address, y, J)
668
+ children: fe(e.address, y, J)
669
669
  })]
670
670
  })
671
- }, `${t.id}-${t.lng}-${t.lat}`)) : /* @__PURE__ */ u("div", {
671
+ }, `${e.id}-${e.lng}-${e.lat}`)) : /* @__PURE__ */ u("div", {
672
672
  className: X["bsy-mobile-amap__poi-status"],
673
673
  children: r(C ? "amap.poi.loading" : "amap.poi.empty")
674
674
  })
@@ -678,6 +678,6 @@ var f = {
678
678
  })]
679
679
  });
680
680
  }, $ = A;
681
- $.Markers = J, $.PoiSearch = pe, $.Controls = M, $.Locate = U;
681
+ $.Markers = J, $.PoiSearch = pe, $.Controls = M, $.Locate = W;
682
682
  //#endregion
683
- export { m as n, $ as t };
683
+ export { p as n, $ as t };
@@ -1,5 +1,5 @@
1
- import "../vendors/version-CegBK2kS.js";
2
- import "../Icon/Icon-D3xi1oyo.js";
3
- import { n as e, t } from "./AMap-B1GiEoPE.js";
4
- import "../ConfigProvider/useLocale-Bf81I-9U.js";
1
+ import "../vendors/version-C0got4sp.js";
2
+ import "../ConfigProvider/useLocale-DiKogqPs.js";
3
+ import "../Icon/Icon-BKlmJSoE.js";
4
+ import { n as e, t } from "./AMap-BkfhkrnK.js";
5
5
  export { t as default, e as useAMap };
@@ -1,6 +1,6 @@
1
- import { t as e } from "../Popup/Popup-BIIDAUmB.js";
2
- import { t } from "../Icon/Icon-D3xi1oyo.js";
3
- import { t as n } from "../ConfigProvider/useLocale-Bf81I-9U.js";
1
+ import { t as e } from "../ConfigProvider/useLocale-DiKogqPs.js";
2
+ import { t } from "../Popup/Popup-Cg3t422z.js";
3
+ import { t as n } from "../Icon/Icon-BKlmJSoE.js";
4
4
  import { useId as r } from "react";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  //#region src/components/ActionSheet/ActionSheet.module.scss
@@ -21,8 +21,8 @@ var o = {
21
21
  "bsy-mobile-action-sheet__item-label": "_bsy-mobile-action-sheet__item-label_o2a6g_101",
22
22
  "bsy-mobile-action-sheet__check": "_bsy-mobile-action-sheet__check_o2a6g_110"
23
23
  }, s = (...e) => e.filter(Boolean).join(" "), c = ({ open: c, onClose: l, mode: u = "select", title: d, actions: f, onAction: p, children: m, zIndex: h, getPopupContainer: g, className: _ }) => {
24
- let { t: v } = n(), y = r(), b = u === "menu", x = v("actionSheet.close");
25
- return /* @__PURE__ */ i(e, {
24
+ let { t: v } = e(), y = r(), b = u === "menu", x = v("actionSheet.close");
25
+ return /* @__PURE__ */ i(t, {
26
26
  open: c,
27
27
  onClose: l,
28
28
  position: "bottom",
@@ -42,7 +42,7 @@ var o = {
42
42
  className: o["bsy-mobile-action-sheet__close"],
43
43
  "aria-label": x,
44
44
  onClick: l,
45
- children: /* @__PURE__ */ i(t, {
45
+ children: /* @__PURE__ */ i(n, {
46
46
  name: "close",
47
47
  size: 18
48
48
  })
@@ -70,7 +70,7 @@ var o = {
70
70
  })]
71
71
  }), !b && e.selected ? /* @__PURE__ */ i("span", {
72
72
  className: o["bsy-mobile-action-sheet__check"],
73
- children: /* @__PURE__ */ i(t, {
73
+ children: /* @__PURE__ */ i(n, {
74
74
  name: "checkthebox",
75
75
  size: 16
76
76
  })
@@ -1,7 +1,7 @@
1
- import "../vendors/version-CegBK2kS.js";
2
- import "../Popup/Popup-BIIDAUmB.js";
3
- import { t as e } from "./ActionSheet-DVck9uyS.js";
4
- import "../Icon/Icon-D3xi1oyo.js";
5
- import "../Overlay/Overlay-CqQWOqO4.js";
6
- import "../ConfigProvider/useLocale-Bf81I-9U.js";
1
+ import "../vendors/version-C0got4sp.js";
2
+ import "../Overlay/Overlay-DFiZYsBs.js";
3
+ import "../ConfigProvider/useLocale-DiKogqPs.js";
4
+ import "../Popup/Popup-Cg3t422z.js";
5
+ import "../Icon/Icon-BKlmJSoE.js";
6
+ import { t as e } from "./ActionSheet-DJyeduZq.js";
7
7
  export { e as default };