@baishuyun/ui-base 2.3.4 → 3.0.1

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 (96) hide show
  1. package/dist/Amap/Amap-DL5dLiUm.js +77 -0
  2. package/dist/Amap/AmapCircle/index.js +4 -0
  3. package/dist/Amap/AmapCircle-BP187l-8.js +62 -0
  4. package/dist/Amap/AmapContext-JaYk1a3H.js +11 -0
  5. package/dist/Amap/AmapMarker/index.js +5 -0
  6. package/dist/Amap/AmapMarker-DYW0-8Hd.js +152 -0
  7. package/dist/Amap/AmapMarkerCluster/index.js +5 -0
  8. package/dist/Amap/AmapMarkerCluster-BRVHHMbi.js +241 -0
  9. package/dist/Amap/AmapProvider/index.js +5 -0
  10. package/dist/Amap/AmapProvider-CWbRK6QL.js +107 -0
  11. package/dist/Amap/hooks/index.js +3 -0
  12. package/dist/Amap/hooks-D1m8KgVM.js +121 -0
  13. package/dist/Amap/index.js +11 -0
  14. package/dist/Amap/useMarkerInfoWindowController-CRgf2I0Q.js +94 -0
  15. package/dist/Card/index.js +1 -1
  16. package/dist/CheckBox/{CheckBox-Cz6KW9Lw.js → CheckBox-B04hZKaC.js} +1 -1
  17. package/dist/CheckBox/index.js +2 -2
  18. package/dist/ColorPicker/{ColorPicker-C1kG_eI-.js → ColorPicker-B-KaMDAn.js} +3 -3
  19. package/dist/ColorPicker/index.js +4 -3
  20. package/dist/ConfigProvider/ConfigProvider-Bx-uxnns.js +159 -0
  21. package/dist/ConfigProvider/index.js +3 -0
  22. package/dist/DropDown/{DropDown-BAPBTglm.js → DropDown-CMKiQDrc.js} +5 -5
  23. package/dist/DropDown/index.js +6 -5
  24. package/dist/Editor/{Buttons-CsKKYGbV.js → Buttons-CZOTyAPL.js} +49 -49
  25. package/dist/Editor/ToolbarPlugin/Buttons/index.js +12 -11
  26. package/dist/Editor/index.js +12 -11
  27. package/dist/InputTag/index.js +1 -1
  28. package/dist/Loading/index.js +1 -1
  29. package/dist/Modal/index.js +1 -1
  30. package/dist/NotFoundContent/index.js +1 -1
  31. package/dist/Radio/index.js +1 -1
  32. package/dist/Segmented/index.js +1 -1
  33. package/dist/Select/{Select-BoNqxIRo.js → Select-xuQGK6It.js} +7 -7
  34. package/dist/Select/{SelectInputSearch-DMY6Y9B6.js → SelectInputSearch-Dm3CI_L4.js} +1 -1
  35. package/dist/Select/index.js +10 -9
  36. package/dist/Tabs/{Tabs-BqT-_eVo.js → Tabs-Cxf7jwys.js} +3 -3
  37. package/dist/Tabs/index.js +3 -3
  38. package/dist/Tree/index.js +3 -3
  39. package/dist/components/Amap/Amap.d.ts +3 -0
  40. package/dist/components/Amap/AmapCircle/AmapCircle.d.ts +3 -0
  41. package/dist/components/Amap/AmapCircle/__tests__/AmapCircle.test.d.ts +1 -0
  42. package/dist/components/Amap/AmapCircle/index.d.ts +1 -0
  43. package/dist/components/Amap/AmapMarker/AmapMarker.d.ts +3 -0
  44. package/dist/components/Amap/AmapMarker/__tests__/AmapMarker.test.d.ts +1 -0
  45. package/dist/components/Amap/AmapMarker/index.d.ts +1 -0
  46. package/dist/components/Amap/AmapMarker/useMarkerInfoWindow.d.ts +15 -0
  47. package/dist/components/Amap/AmapMarker/useMarkerInfoWindowController.d.ts +13 -0
  48. package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.d.ts +3 -0
  49. package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.type.d.ts +25 -0
  50. package/dist/components/Amap/AmapMarkerCluster/__tests__/AmapMarkerCluster.test.d.ts +1 -0
  51. package/dist/components/Amap/AmapMarkerCluster/index.d.ts +1 -0
  52. package/dist/components/Amap/AmapMarkerCluster/utils.d.ts +26 -0
  53. package/dist/components/Amap/AmapProvider/AmapProvider.d.ts +3 -0
  54. package/dist/components/Amap/AmapProvider/__tests__/AmapProvider.test.d.ts +1 -0
  55. package/dist/components/Amap/AmapProvider/index.d.ts +1 -0
  56. package/dist/components/Amap/__tests__/Amap.test.d.ts +1 -0
  57. package/dist/components/Amap/amap-types.d.ts +44 -0
  58. package/dist/components/Amap/context/AmapContext.d.ts +3 -0
  59. package/dist/components/Amap/hooks/__tests__/useCurrentLocation.test.d.ts +1 -0
  60. package/dist/components/Amap/hooks/index.d.ts +2 -0
  61. package/dist/components/Amap/hooks/useAmap.d.ts +2 -0
  62. package/dist/components/Amap/hooks/useCurrentLocation.d.ts +2 -0
  63. package/dist/components/Amap/index.d.ts +7 -0
  64. package/dist/components/Amap/interface.d.ts +142 -0
  65. package/dist/components/Amap/loader.d.ts +9 -0
  66. package/dist/components/Amap/utils/currentLocation.d.ts +18 -0
  67. package/dist/components/ConfigProvider/ConfigProvider.d.ts +3 -0
  68. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +16 -0
  69. package/dist/components/ConfigProvider/__tests__/ConfigProvider.test.d.ts +1 -0
  70. package/dist/components/ConfigProvider/context.d.ts +3 -0
  71. package/dist/components/ConfigProvider/index.d.ts +3 -0
  72. package/dist/components/Tree/Tree.test.d.ts +1 -0
  73. package/dist/components/Tree/context/TreeContext.d.ts +1 -1
  74. package/dist/components/Tree/types/tree.d.ts +1 -1
  75. package/dist/components/index.d.ts +4 -0
  76. package/dist/index.js +49 -94
  77. package/dist/locale/LocaleProvider.d.ts +3 -0
  78. package/dist/locale/__tests__/LocaleProvider.test.d.ts +1 -0
  79. package/dist/locale/index.d.ts +1 -1
  80. package/dist/locale/lang/zh-TW.json.d.ts +64 -0
  81. package/dist/vendors/{useLocale-BXnqO-Ju.js → LocaleContext-Jj_JGgi2.js} +7 -7
  82. package/dist/vendors/{Tree-nIRgDY2s.js → Tree-Bg2UzLsC.js} +3 -3
  83. package/dist/vendors/useLocale-Mk0d7wNt.js +6 -0
  84. package/dist/vite-env.d.ts +7 -0
  85. package/package.json +4 -3
  86. /package/dist/Card/{Card-CaKTq_1y.js → Card-D__c94yx.js} +0 -0
  87. /package/dist/CheckBox/{CheckBox-l__wOnmH.js → CheckBox-DF201Nxg.js} +0 -0
  88. /package/dist/InputTag/{InputTag-V4UnUnGJ.js → InputTag-F2Dv-r56.js} +0 -0
  89. /package/dist/Loading/{Loading-Dy5A--HK.js → Loading-dsLWSWsE.js} +0 -0
  90. /package/dist/Modal/{Modal-DQ5bptu_.js → Modal-CuDbh_WD.js} +0 -0
  91. /package/dist/NotFoundContent/{NotFoundContent-1-41e1rN.js → NotFoundContent-DJUQ0_2D.js} +0 -0
  92. /package/dist/Radio/{Radio-CZOrtNyn.js → Radio-WNw-VqIS.js} +0 -0
  93. /package/dist/Segmented/{Segmented-DEGgLO-b.js → Segmented-Byw8j1hQ.js} +0 -0
  94. /package/dist/vendors/{animations-DvjIfVz9.js → animations-C2i5EijE.js} +0 -0
  95. /package/dist/vendors/{color-CyuNdAfc.js → color-CxdZwdYM.js} +0 -0
  96. /package/dist/vendors/{useFloatingPortal-W4pliYWU.js → useFloatingPortal-CDgiCnbb.js} +0 -0
@@ -0,0 +1,121 @@
1
+ import { n as e, t } from "./AmapContext-JaYk1a3H.js";
2
+ import { useCallback as n, useContext as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
3
+ //#region src/components/Amap/hooks/useAmap.ts
4
+ var c = () => {
5
+ let e = r(t);
6
+ if (!e) throw Error("[ui-base] useAmap must be used within Amap.");
7
+ return e;
8
+ }, l = (e) => !Array.isArray(e) || e.length !== 2 ? !1 : Number.isFinite(Number(e[0])) && Number.isFinite(Number(e[1])), u = (e, t) => {
9
+ let n = [Number(e), Number(t)];
10
+ return l(n) ? n : null;
11
+ }, d = (e, t) => {
12
+ let n = t?.info ? String(t.info).toLowerCase() : "";
13
+ return e === "complete" || n === "ok";
14
+ }, f = (e, t, n) => new Promise((r, i) => {
15
+ let a = window.setTimeout(() => {
16
+ i(Error(n));
17
+ }, t);
18
+ e.then((e) => {
19
+ window.clearTimeout(a), r(e);
20
+ }).catch((e) => {
21
+ window.clearTimeout(a), i(e);
22
+ });
23
+ }), p = (e) => new Promise((t, n) => {
24
+ if (!navigator.geolocation?.getCurrentPosition) {
25
+ n(/* @__PURE__ */ Error("[ui-base] Browser geolocation is unavailable."));
26
+ return;
27
+ }
28
+ navigator.geolocation.getCurrentPosition(t, n, {
29
+ enableHighAccuracy: !1,
30
+ timeout: e,
31
+ maximumAge: 0
32
+ });
33
+ }), m = (e, t, n) => f(new Promise((n, r) => {
34
+ if (!e?.convertFrom) {
35
+ r(/* @__PURE__ */ Error("[ui-base] AMap.convertFrom is unavailable."));
36
+ return;
37
+ }
38
+ e.convertFrom(t, "gps", (e, t) => {
39
+ if (!d(e, t)) {
40
+ r(/* @__PURE__ */ Error("[ui-base] Failed to convert browser geolocation."));
41
+ return;
42
+ }
43
+ let i = t?.locations?.[0], a = u(i?.lng, i?.lat);
44
+ if (!a) {
45
+ r(/* @__PURE__ */ Error("[ui-base] Converted geolocation is invalid."));
46
+ return;
47
+ }
48
+ n(a);
49
+ });
50
+ }), n, "[ui-base] AMap.convertFrom timed out."), h = (e, t) => f(new Promise((t, n) => {
51
+ if (typeof e?.Geolocation != "function" || typeof e?.DistrictSearch != "function") {
52
+ n(/* @__PURE__ */ Error("[ui-base] AMap city location plugins are unavailable."));
53
+ return;
54
+ }
55
+ let { Geolocation: r, DistrictSearch: i } = e;
56
+ new r().getCityInfo((e, r) => {
57
+ if (!d(e, r) || !r?.adcode) {
58
+ n(/* @__PURE__ */ Error("[ui-base] Failed to resolve current city."));
59
+ return;
60
+ }
61
+ new i({
62
+ subdistrict: 0,
63
+ extensions: "base",
64
+ level: "district"
65
+ }).search(String(r.adcode), (e, r) => {
66
+ if (!d(e, r)) {
67
+ n(/* @__PURE__ */ Error("[ui-base] Failed to resolve current city center."));
68
+ return;
69
+ }
70
+ let i = r?.districtList?.[0]?.center, a = u(i?.lng, i?.lat);
71
+ if (!a) {
72
+ n(/* @__PURE__ */ Error("[ui-base] Current city center is invalid."));
73
+ return;
74
+ }
75
+ t(a);
76
+ });
77
+ });
78
+ }), t, "[ui-base] AMap city location timed out."), g = [116.4074, 39.9042], _ = 3e3, v = (t = {}) => {
79
+ let { AMap: c } = r(e), l = a(() => c, [c]), d = t.defaultLocation?.[0], f = t.defaultLocation?.[1], v = a(() => u(d, f) || g, [d, f]), y = t.fallbackToCity ?? !0, b = t.timeout ?? _, x = o(0), S = o(!0), [C, w] = s(v), [T, E] = s(!1), [D, O] = s(null);
80
+ i(() => (S.current = !0, () => {
81
+ S.current = !1;
82
+ }), []), i(() => {
83
+ w(v);
84
+ }, [v]);
85
+ let k = n(async () => {
86
+ let e = x.current + 1;
87
+ if (x.current = e, !l) {
88
+ let e = /* @__PURE__ */ Error("[ui-base] AMap is unavailable.");
89
+ return S.current && (E(!1), O(e), w(v)), v;
90
+ }
91
+ S.current && E(!0);
92
+ let t = null, n = v;
93
+ try {
94
+ let e = await p(b), r = u(e.coords.longitude, e.coords.latitude);
95
+ if (!r) throw Error("[ui-base] Browser geolocation is invalid.");
96
+ n = await m(l, r, b), t = null;
97
+ } catch (e) {
98
+ if (t = e, y) try {
99
+ n = await h(l, b), t = null;
100
+ } catch (e) {
101
+ t = e, n = v;
102
+ }
103
+ }
104
+ return S.current && x.current === e && (w(n), O(t), E(!1)), n;
105
+ }, [
106
+ l,
107
+ v,
108
+ y,
109
+ b
110
+ ]);
111
+ return i(() => {
112
+ k();
113
+ }, [k]), {
114
+ location: C,
115
+ loading: T,
116
+ error: D,
117
+ refresh: k
118
+ };
119
+ };
120
+ //#endregion
121
+ export { c as n, v as t };
@@ -0,0 +1,11 @@
1
+ import "../vendors/LocaleContext-Jj_JGgi2.js";
2
+ import "../ConfigProvider/ConfigProvider-Bx-uxnns.js";
3
+ import "./AmapContext-JaYk1a3H.js";
4
+ import { t as e } from "./AmapProvider-CWbRK6QL.js";
5
+ import { t } from "./Amap-DL5dLiUm.js";
6
+ import { n, t as r } from "./hooks-D1m8KgVM.js";
7
+ import { t as i } from "./AmapCircle-BP187l-8.js";
8
+ import "./useMarkerInfoWindowController-CRgf2I0Q.js";
9
+ import { t as a } from "./AmapMarker-DYW0-8Hd.js";
10
+ import { t as o } from "./AmapMarkerCluster-BRVHHMbi.js";
11
+ export { t as Amap, i as AmapCircle, a as AmapMarker, o as AmapMarkerCluster, e as AmapProvider, n as useAmap, r as useCurrentLocation };
@@ -0,0 +1,94 @@
1
+ import { Fragment as e, jsx as t } from "react/jsx-runtime";
2
+ import { useCallback as n, useEffect as r, useRef as i } from "react";
3
+ import { createRoot as a } from "react-dom/client";
4
+ import { flushSync as o } from "react-dom";
5
+ //#region src/components/Amap/AmapMarker/useMarkerInfoWindowController.tsx
6
+ var s = (e) => {
7
+ queueMicrotask(() => e.unmount());
8
+ }, c = "bottom-center", l = 250, u = (e, t) => Array.isArray(t) && typeof e.Pixel == "function" ? new e.Pixel(t[0], t[1]) : t, d = (e) => e.options?.offset !== void 0 && e.options?.offset !== null, f = ({ AMap: f, map: p, mapReady: m }) => {
9
+ let h = i(null), g = i(null), _ = i(null), v = i(null), y = i(!1), b = i({
10
+ openDelay: null,
11
+ openFrame: null,
12
+ closeDelay: null
13
+ }), x = i(!1), S = n(() => {
14
+ b.current.openDelay !== null && (window.clearTimeout(b.current.openDelay), b.current.openDelay = null), b.current.openFrame !== null && (window.cancelAnimationFrame(b.current.openFrame), b.current.openFrame = null);
15
+ }, []), C = n(() => {
16
+ b.current.closeDelay !== null && (window.clearTimeout(b.current.closeDelay), b.current.closeDelay = null);
17
+ }, []), w = n(() => {
18
+ S(), C(), v.current = null, x.current = !1, h.current?.close?.();
19
+ }, [C, S]), T = n(() => {
20
+ w(), _.current && (_.current.onmouseenter = null, _.current.onmouseleave = null), g.current && s(g.current), g.current = null, _.current = null, h.current = null, y.current = !1;
21
+ }, [w]), E = n(() => {
22
+ S(), C(), b.current.closeDelay = window.setTimeout(() => {
23
+ b.current.closeDelay = null, !x.current && w();
24
+ }, l);
25
+ }, [
26
+ C,
27
+ S,
28
+ w
29
+ ]), D = n((e) => {
30
+ if (!e || !f || !p || !m) return null;
31
+ let t = d(e);
32
+ if (y.current && !t && h.current && _.current && g.current && T(), h.current && _.current && g.current) return {
33
+ infoWindow: h.current,
34
+ contentElement: _.current,
35
+ contentRoot: g.current
36
+ };
37
+ let n = document.createElement("div"), r = {
38
+ ...e.options,
39
+ autoMove: !1,
40
+ isCustom: !0,
41
+ anchor: c
42
+ };
43
+ t && (r.offset = u(f, e.options?.offset));
44
+ let i = new f.InfoWindow(r), o = a(n);
45
+ return n.onmouseenter = () => {
46
+ x.current = !0, C();
47
+ }, n.onmouseleave = () => {
48
+ x.current = !1, E();
49
+ }, h.current = i, _.current = n, g.current = o, y.current = t, {
50
+ infoWindow: i,
51
+ contentElement: n,
52
+ contentRoot: o
53
+ };
54
+ }, [
55
+ f,
56
+ C,
57
+ p,
58
+ m,
59
+ T,
60
+ E
61
+ ]), O = n((n, r) => {
62
+ !n || !r || !f || !p || !m || (v.current = n, C(), S(), b.current.openDelay = window.setTimeout(() => {
63
+ b.current.openDelay = null;
64
+ let i = D(r);
65
+ if (!i || v.current !== n) return;
66
+ let { infoWindow: a, contentElement: s, contentRoot: l } = i, m = d(r);
67
+ if (a.setAnchor?.(c), m) {
68
+ let e = u(f, r.options?.offset);
69
+ a.setOffset?.(e);
70
+ }
71
+ o(() => {
72
+ l.render(/* @__PURE__ */ t(e, { children: r.content }));
73
+ }), a.setContent?.(s), b.current.openFrame = window.requestAnimationFrame(() => {
74
+ b.current.openFrame = null, v.current === n && a.open?.(p, n.getPosition?.());
75
+ });
76
+ }, l));
77
+ }, [
78
+ f,
79
+ C,
80
+ S,
81
+ D,
82
+ p,
83
+ m
84
+ ]);
85
+ return r(() => () => {
86
+ w(), _.current && (_.current.onmouseenter = null, _.current.onmouseleave = null), g.current && s(g.current), g.current = null, _.current = null, h.current = null, y.current = !1;
87
+ }, [w]), {
88
+ scheduleInfoWindowOpen: O,
89
+ scheduleInfoWindowClose: E,
90
+ closeInfoWindow: w
91
+ };
92
+ };
93
+ //#endregion
94
+ export { f as t };
@@ -1,3 +1,3 @@
1
1
  import "../Icon/Icon-CTZCSuVg.js";
2
- import { t as e } from "./Card-CaKTq_1y.js";
2
+ import { t as e } from "./Card-D__c94yx.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "./CheckBox-l__wOnmH.js";
1
+ import { n as e, r as t, t as n } from "./CheckBox-DF201Nxg.js";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import i from "clsx";
4
4
  import { useControllableValue as a } from "ahooks";
@@ -1,4 +1,4 @@
1
1
  import "../Icon/Icon-CTZCSuVg.js";
2
- import "./CheckBox-l__wOnmH.js";
3
- import { t as e } from "./CheckBox-Cz6KW9Lw.js";
2
+ import "./CheckBox-DF201Nxg.js";
3
+ import { t as e } from "./CheckBox-B04hZKaC.js";
4
4
  export { e as default };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../Icon/Icon-CTZCSuVg.js";
2
- import { t } from "../vendors/useLocale-BXnqO-Ju.js";
3
- import { t as n } from "../vendors/color-CyuNdAfc.js";
4
- import { n as r } from "../vendors/animations-DvjIfVz9.js";
2
+ import { t } from "../vendors/useLocale-Mk0d7wNt.js";
3
+ import { t as n } from "../vendors/color-CxdZwdYM.js";
4
+ import { n as r } from "../vendors/animations-C2i5EijE.js";
5
5
  import { isArray as i } from "lodash-es";
6
6
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
7
7
  import { cloneElement as c, isValidElement as l, useMemo as u, useRef as d, useState as f } from "react";
@@ -1,5 +1,6 @@
1
1
  import "../Icon/Icon-CTZCSuVg.js";
2
- import "../vendors/useLocale-BXnqO-Ju.js";
3
- import { n as e, t } from "./ColorPicker-C1kG_eI-.js";
4
- import "../vendors/color-CyuNdAfc.js";
2
+ import "../vendors/LocaleContext-Jj_JGgi2.js";
3
+ import { n as e, t } from "./ColorPicker-B-KaMDAn.js";
4
+ import "../vendors/useLocale-Mk0d7wNt.js";
5
+ import "../vendors/color-CxdZwdYM.js";
5
6
  export { e as COLOR_OPTIONS_RGBA, t as default };
@@ -0,0 +1,159 @@
1
+ import { n as e, t } from "../vendors/LocaleContext-Jj_JGgi2.js";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { createContext as r, useCallback as i, useContext as a, useMemo as o } from "react";
4
+ var s = {
5
+ select: "請選擇",
6
+ search: "搜尋",
7
+ noFindData: "未搜尋到任何資料",
8
+ allSelect: "全選",
9
+ context: "請輸入內容",
10
+ noData: "沒有可選擇的資料",
11
+ noDataFound: "未搜尋到任何資料",
12
+ dataSearching: "資料搜尋中...",
13
+ allSelectedBySearch: "搜尋結果全選",
14
+ leftAlign: "左對齊",
15
+ centerAlign: "置中對齊",
16
+ rightAlign: "右對齊",
17
+ underline: "底線",
18
+ link: "連結",
19
+ hyperLink: "超連結",
20
+ showContent: "顯示文字",
21
+ linkAddress: "連結地址",
22
+ openInNewTab: "在新頁面開啟",
23
+ confirm: "確認",
24
+ cancel: "取消",
25
+ cancelLink: "取消連結",
26
+ presetColors: "預設顏色",
27
+ editor: {
28
+ linkTip: "支援 https:// 連結或 @表單別名",
29
+ bold: "粗體",
30
+ italic: "斜體",
31
+ fontSize: "字號",
32
+ fontColor: "顏色",
33
+ fill: "填滿",
34
+ alignment: "對齊方式",
35
+ centerAlign: "置中對齊",
36
+ rightAlign: "右對齊",
37
+ uploadImage: "上傳圖片",
38
+ imageUrl: "圖片 URL",
39
+ imageUrlPlaceholder: "請輸入圖片 URL",
40
+ imageUrlRequired: "請輸入圖片 URL",
41
+ imageUrlInvalid: "請輸入有效的圖片 URL",
42
+ imageUrlNote: "註:輸入圖片 URL 即可插入圖片",
43
+ inputImageUrl: "輸入圖片 URL",
44
+ uploadImageNote: "註:單張圖片大小不能超過 1MB",
45
+ uploadImageText: "點擊或拖曳上傳圖片",
46
+ previewImage: "預覽圖片",
47
+ underline: "底線",
48
+ imageFormatOnly: "僅支援圖片格式",
49
+ imageSizeNote: "註:圖片大小不能超過 1MB",
50
+ uploadImageFirst: "請先上傳圖片",
51
+ imageAddSuccess: "圖片新增成功",
52
+ operationFailed: "操作失敗",
53
+ onlyImageFormatsSupported: "僅支援圖片格式",
54
+ pleaseUploadImageFirst: "請先上傳圖片",
55
+ clickOrDragToUpload: "點擊或拖曳上傳圖片",
56
+ enterImageUrl: "輸入圖片 URL",
57
+ pleaseEnterImageUrl: "請輸入圖片 URL",
58
+ pleaseEnterValidImageUrl: "請輸入有效的圖片 URL",
59
+ linkAddressEmpty: "連結地址不能為空"
60
+ },
61
+ picture: "圖片",
62
+ addPicture: "新增圖片",
63
+ customColor: "自訂顏色"
64
+ }, c = {
65
+ select: "Please select",
66
+ search: "search",
67
+ noFindData: "No search data",
68
+ allSelect: "Select All",
69
+ context: "Please enter the content",
70
+ noData: "No Data",
71
+ noDataFound: "No Data Found",
72
+ dataSearching: "Data Searching...",
73
+ allSelectedBySearch: "Select All by Search",
74
+ leftAlign: "Left Align",
75
+ centerAlign: "Center Align",
76
+ rightAlign: "Right Align",
77
+ underline: "Underline",
78
+ link: "Link",
79
+ hyperLink: "Hyper Link",
80
+ showContent: "Show Content",
81
+ linkAddress: "Link Address",
82
+ openInNewTab: "Open in New Tab",
83
+ confirm: "Confirm",
84
+ cancel: "Cancel",
85
+ cancelLink: "Cancel Link",
86
+ presetColors: "preset color",
87
+ editor: {
88
+ linkTip: "Support https://link or @form alias",
89
+ bold: "Bold",
90
+ italic: "Italic",
91
+ fontSize: "Font Size",
92
+ fontColor: "Font Color",
93
+ fill: "fill",
94
+ alignment: "Alignment",
95
+ centerAlign: "Center Align",
96
+ rightAlign: "Right Align",
97
+ uploadImage: "Upload Image",
98
+ imageUrl: "Image URL",
99
+ imageUrlPlaceholder: "Please enter image URL",
100
+ imageUrlRequired: "Please enter image URL",
101
+ imageUrlInvalid: "Please enter a valid image URL",
102
+ imageUrlNote: "Note: Enter image URL to insert image",
103
+ inputImageUrl: "Enter Image URL",
104
+ uploadImageNote: "Note: Single image size cannot exceed 1MB",
105
+ uploadImageText: "Click or drag to upload image",
106
+ previewImage: "Preview Image",
107
+ underline: "Underline",
108
+ imageFormatOnly: "Only image formats are supported",
109
+ uploadImageFirst: "Please upload image first",
110
+ imageAddSuccess: "Image added successfully",
111
+ operationFailed: "Operation failed",
112
+ onlyImageFormatsSupported: "Only image formats are supported",
113
+ pleaseUploadImageFirst: "Please upload image first",
114
+ imageSizeNote: "Image size cannot exceed 1MB",
115
+ clickOrDragToUpload: "Click or drag to upload image",
116
+ enterImageUrl: "Enter image URL",
117
+ pleaseEnterImageUrl: "Please enter image URL",
118
+ pleaseEnterValidImageUrl: "Please enter a valid image URL",
119
+ linkAddressEmpty: "Link address cannot be empty"
120
+ },
121
+ picture: "Picture",
122
+ customColor: "Custom Color",
123
+ addPicture: "Add Picture"
124
+ }, l = r({}), u = () => a(l), d = (...e) => e.reduce((e, t) => (t && Object.entries(t).forEach(([t, n]) => {
125
+ e[t] = {
126
+ ...e[t] || {},
127
+ ...n || {}
128
+ };
129
+ }), e), {}), f = (e, t) => {
130
+ if (!e && !t) return;
131
+ let n = Array.from(new Set([...e?.plugins || [], ...t?.plugins || []]));
132
+ return {
133
+ ...e,
134
+ ...t,
135
+ plugins: n.length ? n : void 0
136
+ };
137
+ }, p = (r) => {
138
+ let u = a(l), p = a(t), { children: m, locale: h = p.locale, messages: g = {}, amap: _ } = r, v = o(() => d({
139
+ "zh-CN": e,
140
+ "zh-TW": s,
141
+ "en-US": c
142
+ }, g), [g]), y = o(() => v[h] || e, [v, h]), b = i((e) => {
143
+ let t = e.split("."), n = y;
144
+ for (let r of t) if (n = n[r], !n) return console.warn(`[LocaleProvider] Cannot find translation for key: ${e}`), e;
145
+ return typeof n == "string" ? n : e;
146
+ }, [y]), x = o(() => ({
147
+ locale: h,
148
+ t: b
149
+ }), [h, b]), S = o(() => ({ amap: f(u.amap, _) }), [_, u.amap]);
150
+ return /* @__PURE__ */ n(l.Provider, {
151
+ value: S,
152
+ children: /* @__PURE__ */ n(t.Provider, {
153
+ value: x,
154
+ children: m
155
+ })
156
+ });
157
+ };
158
+ //#endregion
159
+ export { s as i, u as n, c as r, p as t };
@@ -0,0 +1,3 @@
1
+ import "../vendors/LocaleContext-Jj_JGgi2.js";
2
+ import { n as e, t } from "./ConfigProvider-Bx-uxnns.js";
3
+ export { t as ConfigProvider, t as default, e as useConfig };
@@ -1,8 +1,8 @@
1
- import { t as e } from "../vendors/useLocale-BXnqO-Ju.js";
2
- import { n as t } from "../vendors/animations-DvjIfVz9.js";
3
- import { t as n } from "../Select/SelectInputSearch-DMY6Y9B6.js";
4
- import { t as r } from "../NotFoundContent/NotFoundContent-1-41e1rN.js";
5
- import { t as i } from "../vendors/useFloatingPortal-W4pliYWU.js";
1
+ import { t as e } from "../vendors/useLocale-Mk0d7wNt.js";
2
+ import { n as t } from "../vendors/animations-C2i5EijE.js";
3
+ import { t as n } from "../Select/SelectInputSearch-Dm3CI_L4.js";
4
+ import { t as r } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
5
+ import { t as i } from "../vendors/useFloatingPortal-CDgiCnbb.js";
6
6
  import { isEmpty as a, isNumber as o } from "lodash-es";
7
7
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  import { cloneElement as u, isValidElement as d, memo as f, useMemo as p, useState as m } from "react";
@@ -1,7 +1,8 @@
1
1
  import "../Icon/Icon-CTZCSuVg.js";
2
- import "../vendors/useLocale-BXnqO-Ju.js";
3
- import "../Select/SelectInputSearch-DMY6Y9B6.js";
4
- import "../NotFoundContent/NotFoundContent-1-41e1rN.js";
5
- import "../vendors/useFloatingPortal-W4pliYWU.js";
6
- import { t as e } from "./DropDown-BAPBTglm.js";
2
+ import "../vendors/LocaleContext-Jj_JGgi2.js";
3
+ import "../vendors/useLocale-Mk0d7wNt.js";
4
+ import "../Select/SelectInputSearch-Dm3CI_L4.js";
5
+ import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
6
+ import "../vendors/useFloatingPortal-CDgiCnbb.js";
7
+ import { t as e } from "./DropDown-CMKiQDrc.js";
7
8
  export { e as default };