@baishuyun/ui-base 6.10.0 → 6.11.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 (181) hide show
  1. package/dist/Amap/{Amap-BNnmSPnl.js → Amap-BLSziesG.js} +1 -1
  2. package/dist/Amap/AmapCircle/index.js +4 -4
  3. package/dist/Amap/{AmapCircle-BDW6pnNR.js → AmapCircle-2qupysHe.js} +1 -1
  4. package/dist/Amap/AmapMarker/index.js +5 -5
  5. package/dist/Amap/{AmapMarker-CdoPWdff.js → AmapMarker-xEqoVnFR.js} +2 -2
  6. package/dist/Amap/AmapMarkerCluster/index.js +5 -5
  7. package/dist/Amap/{AmapMarkerCluster-CSIxiVC5.js → AmapMarkerCluster-CvEQa3o9.js} +2 -2
  8. package/dist/Amap/AmapProvider/index.js +6 -5
  9. package/dist/Amap/{AmapProvider-Cwi6WOe0.js → AmapProvider-CvRHhN42.js} +2 -2
  10. package/dist/Amap/hooks/index.js +3 -3
  11. package/dist/Amap/{hooks-DAN31s_-.js → hooks-BTcFpdd0.js} +1 -1
  12. package/dist/Amap/index.js +12 -11
  13. package/dist/Calendar/{AllDaySection-DNsVyixx.js → AllDaySection-BqbcPQls.js} +3 -3
  14. package/dist/Calendar/{Calendar-DL2X3z_z.js → Calendar-BS0nzK4h.js} +12 -13
  15. package/dist/Calendar/{CurrentTimeIndicator-twXtFHIp.js → CurrentTimeIndicator-dRYot1Rk.js} +24 -18
  16. package/dist/Calendar/{EventCard-CvEnWcKd.js → EventCard-Di5UX4pB.js} +3 -4
  17. package/dist/Calendar/{TimeGrid-D62R57Bo.js → TimeGrid-CBpDFAM4.js} +1 -1
  18. package/dist/Calendar/context/index.js +2 -2
  19. package/dist/Calendar/index.js +21 -20
  20. package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -7
  21. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +6 -5
  22. package/dist/Calendar/subcomponents/EventCard/index.js +7 -6
  23. package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -4
  24. package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
  25. package/dist/Calendar/{theme-BRVmxhqD.js → theme-i60ueO92.js} +2 -2
  26. package/dist/Calendar/utils/index.js +4 -4
  27. package/dist/Calendar/utils/layout/index.js +3 -3
  28. package/dist/Calendar/utils/theme/index.js +2 -2
  29. package/dist/Card/index.js +2 -2
  30. package/dist/CheckBox/{CheckBox-CcM19LnP.js → CheckBox-nBm0u6zX.js} +1 -1
  31. package/dist/CheckBox/index.js +3 -3
  32. package/dist/ColorPicker/ColorPicker-DVwg07Gs.js +174 -0
  33. package/dist/ColorPicker/index.js +7 -6
  34. package/dist/ConfigProvider/index.js +4 -3
  35. package/dist/DatePicker/DatePicker-DNPnHLT2.js +101 -0
  36. package/dist/DatePicker/{DatePickerPanel-Bz3uvbYF.js → DatePickerPanel-TS6AxAH-.js} +5 -5
  37. package/dist/DatePicker/index.js +10 -9
  38. package/dist/DatePicker/style/index.js +2 -2
  39. package/dist/DatePicker/{style-BwmM26RP.js → style-UKXn1N_p.js} +1 -1
  40. package/dist/DropDown/DropDown-DWf5yf4l.js +178 -0
  41. package/dist/DropDown/index.js +11 -10
  42. package/dist/DropDown/style/index.js +2 -2
  43. package/dist/DropDown/{style-BSgosymi.js → style-LLDVPpPa.js} +1 -1
  44. package/dist/Editor/Buttons-BBioCubp.js +1148 -0
  45. package/dist/Editor/ToolbarPlugin/Buttons/index.js +17 -16
  46. package/dist/Editor/constants/index.js +3 -3
  47. package/dist/Editor/index.js +1015 -257
  48. package/dist/Gantt/GanttChart/index.js +18 -17
  49. package/dist/Gantt/{GanttChart-6gpw5vi6.js → GanttChart-BaEW7EDO.js} +8 -10
  50. package/dist/Gantt/GanttTable/index.js +11 -11
  51. package/dist/Gantt/{GanttTable-lVu-YUtt.js → GanttTable-CdXhMHF6.js} +5 -5
  52. package/dist/Gantt/GanttToolBar/index.js +14 -13
  53. package/dist/Gantt/{GanttToolBar-CarBWZg-.js → GanttToolBar-COwsYlMG.js} +3 -4
  54. package/dist/Gantt/{collapseKeys-_ShTXPKt.js → collapseKeys-B4SOVHjd.js} +2 -2
  55. package/dist/Gantt/index.js +26 -25
  56. package/dist/Gantt/{theme-CiMD9Y6i.js → theme-2LyXJRDe.js} +1 -1
  57. package/dist/Gantt/{timelineViewConfig-CLIpppp0.js → timelineViewConfig-9HArvbmb.js} +1 -1
  58. package/dist/Gantt/utils/index.js +6 -6
  59. package/dist/Gantt/utils/theme/index.js +2 -2
  60. package/dist/Icon/index.js +1 -1
  61. package/dist/InputTag/{InputTag-DxPO0DwD.js → InputTag-Jpm8H32L.js} +2 -2
  62. package/dist/InputTag/index.js +5 -5
  63. package/dist/Loading/{Loading-CVyzO5-s.js → Loading-CiRe7i2R.js} +1 -1
  64. package/dist/Loading/index.js +4 -4
  65. package/dist/Modal/Modal-Cb7Msq26.js +96 -0
  66. package/dist/Modal/index.js +3 -2
  67. package/dist/NotFoundContent/index.js +2 -2
  68. package/dist/Overlay/OverlayContext-CVSFoyqN.js +23 -0
  69. package/dist/Overlay/index.js +3 -0
  70. package/dist/Radio/index.js +2 -2
  71. package/dist/ScrollBar/{ScrollBar-CnwYQfXM.js → ScrollBar-N2pOLv-8.js} +1 -1
  72. package/dist/ScrollBar/index.js +2 -2
  73. package/dist/Segmented/{Segmented-Ck2ZmfF7.js → Segmented-BCQRrc65.js} +1 -1
  74. package/dist/Segmented/index.js +2 -2
  75. package/dist/Select/Select-BY5Rpo3f.js +753 -0
  76. package/dist/Select/{SelectInputSearch-CrGW_eVo.js → SelectInputSearch-i3egm8Wy.js} +1 -1
  77. package/dist/Select/index.js +14 -13
  78. package/dist/Table/{Table-CL-KfNY3.js → Table-CSPdFGYn.js} +5 -5
  79. package/dist/Table/hooks/index.js +2 -2
  80. package/dist/Table/{hooks-uCDY9dqx.js → hooks-BceUZQQm.js} +1 -1
  81. package/dist/Table/index.js +8 -8
  82. package/dist/Table/{processRowspan-nIGqGyHh.js → processRowspan-B0WELhG2.js} +1 -1
  83. package/dist/Table/style/index.js +2 -2
  84. package/dist/Table/{style-x9xfw6te.js → style-C4wp0IOM.js} +1 -1
  85. package/dist/Table/utils/index.js +2 -2
  86. package/dist/Tabs/Tabs-C0m3mt-j.js +413 -0
  87. package/dist/Tabs/index.js +6 -5
  88. package/dist/Tooltip/Tooltip-Bb3Jx-If.js +172 -0
  89. package/dist/Tooltip/index.js +3 -2
  90. package/dist/Tree/index.js +4 -4
  91. package/dist/Tree/utils/index.js +1 -1
  92. package/dist/components/ColorPicker/ColorPalettes.d.ts +2 -0
  93. package/dist/components/ColorPicker/ColorPicker.type.d.ts +1 -7
  94. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +2 -0
  95. package/dist/components/DatePicker/interface.d.ts +2 -0
  96. package/dist/components/Editor/ToolbarPlugin/Buttons/BulletListButton.d.ts +2 -0
  97. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeButton.d.ts +2 -0
  98. package/dist/components/Editor/ToolbarPlugin/Buttons/CodeLanguageButton.d.ts +2 -0
  99. package/dist/components/Editor/ToolbarPlugin/Buttons/HeadingButton.d.ts +2 -0
  100. package/dist/components/Editor/ToolbarPlugin/Buttons/IndentButton.d.ts +2 -0
  101. package/dist/components/Editor/ToolbarPlugin/Buttons/NumberListButton.d.ts +2 -0
  102. package/dist/components/Editor/ToolbarPlugin/Buttons/OutdentButton.d.ts +2 -0
  103. package/dist/components/Editor/ToolbarPlugin/Buttons/RedoButton.d.ts +2 -0
  104. package/dist/components/Editor/ToolbarPlugin/Buttons/SourceButton.d.ts +2 -0
  105. package/dist/components/Editor/ToolbarPlugin/Buttons/StrikeThroughButton.d.ts +2 -0
  106. package/dist/components/Editor/ToolbarPlugin/Buttons/SubscriptButton.d.ts +2 -0
  107. package/dist/components/Editor/ToolbarPlugin/Buttons/SuperscriptButton.d.ts +2 -0
  108. package/dist/components/Editor/ToolbarPlugin/Buttons/TableButton.d.ts +2 -0
  109. package/dist/components/Editor/ToolbarPlugin/Buttons/UndoButton.d.ts +2 -0
  110. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +13 -0
  111. package/dist/components/Editor/ToolbarPlugin/context/HistoryStateProvider.d.ts +8 -0
  112. package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +10 -1
  113. package/dist/components/Editor/ToolbarPlugin/icons/ToolbarIcon.d.ts +13 -0
  114. package/dist/components/Editor/constants/codeLanguages.d.ts +69 -0
  115. package/dist/components/Editor/constants/index.d.ts +3 -0
  116. package/dist/components/Editor/context/EditorContainerContext.d.ts +0 -1
  117. package/dist/components/Editor/context/SourceModeContext.d.ts +9 -0
  118. package/dist/components/Editor/htmlConfig.d.ts +2 -0
  119. package/dist/components/Editor/interface.d.ts +1 -1
  120. package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +1 -0
  121. package/dist/components/Editor/plugins/HeadingPlugin.d.ts +3 -0
  122. package/dist/components/Editor/plugins/LinkColorPlugin.d.ts +2 -0
  123. package/dist/components/Editor/plugins/PasteStripImagePlugin.d.ts +1 -0
  124. package/dist/components/Editor/plugins/SourceModePlugin.d.ts +7 -0
  125. package/dist/components/Editor/plugins/TabIndentPlugin.d.ts +1 -0
  126. package/dist/components/Editor/plugins/TablePlugin.d.ts +1 -0
  127. package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
  128. package/dist/components/Editor/utils/fillRootFromHtml.d.ts +2 -0
  129. package/dist/components/Editor/utils/formatEditorHtml.d.ts +1 -0
  130. package/dist/components/Editor/utils/formatTruncatedFilename.d.ts +4 -0
  131. package/dist/components/Editor/utils/isEmptyEditorHtml.d.ts +1 -0
  132. package/dist/components/Editor/utils/sanitizeEditorHtml.d.ts +1 -0
  133. package/dist/components/Editor/utils/stripImagesFromHtml.d.ts +1 -0
  134. package/dist/components/Editor/utils/stripInlineStyleProperty.d.ts +2 -0
  135. package/dist/components/Editor/utils/writeHtmlSource.d.ts +1 -0
  136. package/dist/components/Overlay/OverlayContext.d.ts +16 -0
  137. package/dist/components/Overlay/index.d.ts +2 -0
  138. package/dist/components/Tooltip/Tooltip.type.d.ts +1 -1
  139. package/dist/components/index.d.ts +2 -0
  140. package/dist/index.js +53 -51
  141. package/dist/locale/lang/en-US.json.d.ts +21 -2
  142. package/dist/locale/lang/zh-CN.json.d.ts +21 -2
  143. package/dist/locale/lang/zh-TW.json.d.ts +21 -2
  144. package/dist/style.css +1 -1
  145. package/dist/vendors/{ConfigProvider-DxrZpdIb.js → ConfigProvider-4xHyyeop.js} +84 -36
  146. package/dist/vendors/{LocaleContext-Dcw6C1LX.js → LocaleContext-I4PW9j4M.js} +21 -2
  147. package/dist/vendors/{Tree-D1s-eADo.js → Tree-B09frqQX.js} +3 -2
  148. package/dist/vendors/{useLocale-BKZX2_zw.js → useLocale-FGYsRWSe.js} +1 -1
  149. package/dist/vendors/{version-L-kG2La0.js → version-BxI5QM5W.js} +1 -1
  150. package/package.json +10 -1
  151. package/dist/ColorPicker/ColorPicker-D3JuQ7a7.js +0 -153
  152. package/dist/DatePicker/DatePicker-Dah_CjYG.js +0 -96
  153. package/dist/DropDown/DropDown-Daxr9BYf.js +0 -171
  154. package/dist/Editor/Buttons-DG_-Sg_C.js +0 -600
  155. package/dist/Modal/Modal-LiztSF7x.js +0 -92
  156. package/dist/Select/Select-CBI5PgeQ.js +0 -746
  157. package/dist/Tabs/Tabs-B1RsYb2W.js +0 -409
  158. package/dist/Tooltip/Tooltip-DWWWYn1a.js +0 -168
  159. /package/dist/Amap/{AmapContext-D7Njjm5a.js → AmapContext-CJBe6lld.js} +0 -0
  160. /package/dist/Amap/{useMarkerInfoWindowController-BQmhR0N7.js → useMarkerInfoWindowController-Cjx0xQXw.js} +0 -0
  161. /package/dist/Calendar/{TimeAxis-D7bgZDKs.js → TimeAxis-C9e2BdYs.js} +0 -0
  162. /package/dist/Calendar/{colorUtils-lXNjGoCk.js → colorUtils-CBLTsDX0.js} +0 -0
  163. /package/dist/Calendar/{context-CBJnz0IH.js → context-4tCN5X33.js} +0 -0
  164. /package/dist/Calendar/{layout-BglMom3m.js → layout-Dz-grtu9.js} +0 -0
  165. /package/dist/Card/{Card-CtKLNh3n.js → Card-Ds5Rpq--.js} +0 -0
  166. /package/dist/CheckBox/{CheckBox-Bb0UuX1Y.js → CheckBox-ByWSy9Yr.js} +0 -0
  167. /package/dist/DatePicker/{ensureDayjsPlugins-CVL-fnAl.js → ensureDayjsPlugins-Cn9Bkjkj.js} +0 -0
  168. /package/dist/DatePicker/{pickerLocale-BeMlfhKu.js → pickerLocale-BRnNjLcv.js} +0 -0
  169. /package/dist/Gantt/{GanttHighlightContext-grda5bhd.js → GanttHighlightContext-ChThr8ia.js} +0 -0
  170. /package/dist/Gantt/{columnResize-DV1tSBx_.js → columnResize-jG0Wy2PC.js} +0 -0
  171. /package/dist/Gantt/{constants-BObDP0h6.js → constants-LIz5jwed.js} +0 -0
  172. /package/dist/Gantt/{highlightTarget-DrP0_NrM.js → highlightTarget-BpkYTonb.js} +0 -0
  173. /package/dist/NotFoundContent/{NotFoundContent-J-TEnljc.js → NotFoundContent-BLmzWNBi.js} +0 -0
  174. /package/dist/Radio/{Radio-CBUZ7DB5.js → Radio-CX9cUqb7.js} +0 -0
  175. /package/dist/Table/{constants-CcwjDbe7.js → constants-kRpjsoet.js} +0 -0
  176. /package/dist/vendors/{animations-Mlw78WYo.js → animations-rwUbyoT0.js} +0 -0
  177. /package/dist/vendors/{cssVars-B8o94Yao.js → cssVars-l4-kP_14.js} +0 -0
  178. /package/dist/vendors/{mergeRefs-Bai1cIzv.js → mergeRefs-TiJ0xjUN.js} +0 -0
  179. /package/dist/vendors/{useFloatingOverlay-BApqkHSu.js → useFloatingOverlay-B3M9k8nj.js} +0 -0
  180. /package/dist/vendors/{useFloatingPortal-C8V67X0v.js → useFloatingPortal-CmVJbuRm.js} +0 -0
  181. /package/dist/vendors/{useLatchedPopupPortalRoot-hwf14FJ5.js → useLatchedPopupPortalRoot-4fVhqVT4.js} +0 -0
@@ -0,0 +1,172 @@
1
+ import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
2
+ import { n } from "../vendors/mergeRefs-TiJ0xjUN.js";
3
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { Fragment as o, cloneElement as ee, createContext as s, isValidElement as c, useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as te } from "react";
5
+ import { useControllableValue as ne } from "ahooks";
6
+ import { FloatingArrow as re, FloatingPortal as ie, arrow as ae, autoUpdate as p, flip as oe, offset as se, safePolygon as ce, shift as le, size as ue, useClick as m, useDismiss as h, useFloating as g, useHover as _, useInteractions as v, useRole as y, useTransitionStyles as de } from "@floating-ui/react";
7
+ //#region src/components/Tooltip/context/TooltipFloatingContext.ts
8
+ var b = s(null), x = {
9
+ "bsy-tooltip": "_bsy-tooltip_eibqv_1",
10
+ "bsy-tooltip__trigger": "_bsy-tooltip__trigger_eibqv_4",
11
+ "bsy-tooltip__content": "_bsy-tooltip__content_eibqv_8"
12
+ }, fe = "M0 14C0 14 1.44834 13.9879 4.14272 10.7864C5.24990 9.46652 6.28557 8.66663 7.0002 8.66663C7.71415 8.66663 8.73670 9.55158 9.85697 10.8831C12.5664 14.1005 14 14 14 14H0Z", pe = "#525867", S = (e, t) => e ? t ? (n) => {
13
+ e(n), t(n);
14
+ } : e : t, C = (e) => {
15
+ if (!(e === "auto" || e === void 0)) return typeof e == "number" ? `${e}px` : e;
16
+ }, me = (e) => e.type === o || (e.type?.toString().includes("Fragment") ?? !1), w = ({ children: o, content: s, trigger: w = "hover", style: T, zIndex: E, showArrow: D = !0, placement: O = "bottom", onClose: k, hoverDelay: A = 500, getPopupContainer: j, moveToFloatingKeepOpen: M = !1, widthMode: N = "content", width: P, minWidth: F = 60, maxWidth: I = 340, offset: L = 10, fallbackPlacements: R, virtualReference: z, flipBoundary: B, animated: V = !1, animationConfig: H, ...he }) => {
17
+ let U = f(null), [ge, _e] = te(null), W = e(E), [G, K] = ne(he, {
18
+ valuePropName: "visible",
19
+ trigger: "onVisibleChange",
20
+ defaultValue: !1
21
+ }), ve = l((e) => {
22
+ !e && G && k && k(), K(e);
23
+ }, [
24
+ G,
25
+ k,
26
+ K
27
+ ]), ye = d(() => {
28
+ let e = R ? { fallbackPlacements: R } : {};
29
+ B && (e.boundary = B);
30
+ let t = [
31
+ se(L),
32
+ oe(e),
33
+ le({ padding: 8 })
34
+ ];
35
+ return D && t.push(ae({ element: U })), N === "reference" && t.push(ue({ apply({ rects: e, elements: t }) {
36
+ t.floating.style.width = `${e.reference.width}px`;
37
+ let n = C(F);
38
+ n && (t.floating.style.minWidth = n);
39
+ let r = C(I);
40
+ r && (t.floating.style.maxWidth = r);
41
+ } })), t;
42
+ }, [
43
+ N,
44
+ F,
45
+ I,
46
+ L,
47
+ R,
48
+ B,
49
+ D
50
+ ]), { refs: q, floatingStyles: J, context: Y } = g({
51
+ open: G,
52
+ onOpenChange: ve,
53
+ whileElementsMounted: G ? (e, t, n) => p(e, t, n, {
54
+ animationFrame: !1,
55
+ ancestorScroll: !0,
56
+ ancestorResize: !0,
57
+ elementResize: !0,
58
+ layoutShift: !1
59
+ }) : void 0,
60
+ placement: O,
61
+ middleware: ye,
62
+ transform: !1
63
+ }), { isMounted: be, styles: xe } = de(Y, V && H ? H : { duration: 0 }), Se = V ? be : G, X = d(() => {
64
+ let e = {
65
+ ...J,
66
+ ...T,
67
+ "--bsy-tooltip-z-index": W
68
+ };
69
+ switch (N) {
70
+ case "content":
71
+ e.width = "auto";
72
+ break;
73
+ case "manual":
74
+ P !== void 0 && (e.width = C(P));
75
+ break;
76
+ case "reference": break;
77
+ default: e.width = "max-content";
78
+ }
79
+ return N !== "reference" && (F !== void 0 && (e.minWidth = C(F)), I !== void 0 && (e.maxWidth = C(I))), e;
80
+ }, [
81
+ J,
82
+ T,
83
+ W,
84
+ N,
85
+ P,
86
+ F,
87
+ I
88
+ ]);
89
+ u(() => {
90
+ z && q.setPositionReference(z);
91
+ }, [z, q]);
92
+ let { getReferenceProps: Ce, getFloatingProps: we } = v([
93
+ _(Y, {
94
+ enabled: w === "hover",
95
+ delay: { open: A },
96
+ handleClose: M ? ce() : void 0
97
+ }),
98
+ m(Y, { enabled: w === "click" }),
99
+ h(Y),
100
+ y(Y, { role: "tooltip" })
101
+ ]), Z = Ce(), Q = {
102
+ ...Z,
103
+ onClick: (e) => {
104
+ w === "click" && e.stopPropagation(), Z.onClick?.(e);
105
+ },
106
+ onMouseEnter: (e) => {
107
+ w === "hover" && e.stopPropagation(), Z.onMouseEnter?.(e);
108
+ },
109
+ onMouseLeave: (e) => {
110
+ w === "hover" && e.stopPropagation(), Z.onMouseLeave?.(e);
111
+ },
112
+ onMouseMove: (e) => {
113
+ Z.onMouseMove?.(e);
114
+ }
115
+ }, Te = j?.(), Ee = typeof T?.background == "string" ? T.background : pe, De = n(q.setFloating, _e), $ = Se ? /* @__PURE__ */ i(ie, {
116
+ root: Te ?? void 0,
117
+ children: /* @__PURE__ */ i(t, {
118
+ zIndex: W,
119
+ children: /* @__PURE__ */ a("div", {
120
+ ref: De,
121
+ style: V ? {
122
+ ...X,
123
+ ...xe
124
+ } : X,
125
+ ...we(),
126
+ className: x["bsy-tooltip__content"],
127
+ onClick: (e) => e.stopPropagation(),
128
+ children: [D ? /* @__PURE__ */ i(re, {
129
+ ref: U,
130
+ context: Y,
131
+ width: 14,
132
+ height: 14,
133
+ tipRadius: 2,
134
+ fill: Ee,
135
+ d: fe
136
+ }) : null, /* @__PURE__ */ i(b.Provider, {
137
+ value: ge,
138
+ children: s
139
+ })]
140
+ })
141
+ })
142
+ }) : null;
143
+ if (c(o) && !me(o)) {
144
+ let e = o.props, t = o.ref;
145
+ return /* @__PURE__ */ a(r, { children: [ee(o, {
146
+ ...e,
147
+ ...Q,
148
+ ref: t ? n(q.setReference, t) : q.setReference,
149
+ style: e.style,
150
+ onClick: S(e.onClick, Q.onClick),
151
+ onMouseEnter: S(e.onMouseEnter, Q.onMouseEnter),
152
+ onMouseLeave: S(e.onMouseLeave, Q.onMouseLeave),
153
+ onMouseMove: S(e.onMouseMove, Q.onMouseMove)
154
+ }), $] });
155
+ }
156
+ return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("div", {
157
+ className: x["bsy-tooltip"],
158
+ children: /* @__PURE__ */ i("div", {
159
+ ref: q.setReference,
160
+ ...Q,
161
+ className: x["bsy-tooltip__trigger"],
162
+ children: o
163
+ })
164
+ }), $] });
165
+ }, T = ({ content: e, children: t, ...n }) => e ? /* @__PURE__ */ i(w, {
166
+ content: e,
167
+ ...n,
168
+ children: t
169
+ }) : /* @__PURE__ */ i(r, { children: t });
170
+ T.displayName = "BsyTooltip";
171
+ //#endregion
172
+ export { b as n, T as t };
@@ -1,3 +1,4 @@
1
- import "../vendors/version-L-kG2La0.js";
2
- import { n as e, t } from "./Tooltip-DWWWYn1a.js";
1
+ import "../vendors/version-BxI5QM5W.js";
2
+ import "../Overlay/OverlayContext-CVSFoyqN.js";
3
+ import { n as e, t } from "./Tooltip-Bb3Jx-If.js";
3
4
  export { e as TooltipFloatingContext, t as default };
@@ -1,6 +1,6 @@
1
- import "../vendors/version-L-kG2La0.js";
1
+ import "../vendors/version-BxI5QM5W.js";
2
2
  import "../Icon/Icon-BBDcb-yw.js";
3
- import { t as e } from "../vendors/Tree-D1s-eADo.js";
4
- import "../CheckBox/CheckBox-Bb0UuX1Y.js";
5
- import "../Radio/Radio-CBUZ7DB5.js";
3
+ import { t as e } from "../vendors/Tree-B09frqQX.js";
4
+ import "../CheckBox/CheckBox-ByWSy9Yr.js";
5
+ import "../Radio/Radio-CX9cUqb7.js";
6
6
  export { e as Tree };
@@ -1,4 +1,4 @@
1
- import "../../vendors/version-L-kG2La0.js";
1
+ import "../../vendors/version-BxI5QM5W.js";
2
2
  import { isString as e } from "lodash-es";
3
3
  //#region src/components/Tree/utils/index.ts
4
4
  var t = (e, n, r, i = []) => {
@@ -1,8 +1,10 @@
1
+ import { ColorPickerPalette } from './ColorPicker.type';
1
2
  interface PresetColorsProps {
2
3
  currentColor: string;
3
4
  onColorSelect: (color: string) => void;
4
5
  options: string[];
5
6
  className?: string;
7
+ palette?: ColorPickerPalette;
6
8
  }
7
9
  declare const ColorPalettes: React.FC<PresetColorsProps>;
8
10
  export default ColorPalettes;
@@ -32,14 +32,8 @@ export interface ColorPickerProps {
32
32
  */
33
33
  presetColors?: ColorPickerPalette | string[];
34
34
  /**
35
- * 指定颜色选择器浮层(含内部自定义取色面板)渲染的父级 DOM 节点
35
+ * 指定颜色选择器外层面板渲染的父级 DOM 节点。内部自定义取色面板挂在外层面板上。
36
36
  * @default undefined (默认渲染到 body 元素上)
37
- * @example
38
- * ```tsx
39
- * <ColorPicker getPopupContainer={() => document.getElementById('container')}>
40
- * <button>选择颜色</button>
41
- * </ColorPicker>
42
- * ```
43
37
  */
44
38
  getPopupContainer?: () => HTMLElement;
45
39
  }
@@ -10,6 +10,8 @@ export type ConfigProviderProps = PropsWithChildren<{
10
10
  locale?: Locale;
11
11
  messages?: Record<string, any>;
12
12
  amap?: AmapConfig;
13
+ /** 全局浮层 z-index 偏移。第一层 = offset + 1000。默认 0 */
14
+ overlayOffset?: number;
13
15
  }>;
14
16
  export type ConfigContextValue = {
15
17
  locale?: Locale;
@@ -41,4 +41,6 @@ export interface DatePickerProps {
41
41
  getPopupContainer?: () => HTMLElement;
42
42
  /** 浮层打开时追加到 trigger 元素的 className */
43
43
  triggerActiveClassName?: string;
44
+ /** 浮层 z-index,默认走 Overlay 底座 */
45
+ zIndex?: number;
44
46
  }
@@ -0,0 +1,2 @@
1
+ declare const BulletListButton: React.FC;
2
+ export default BulletListButton;
@@ -0,0 +1,2 @@
1
+ declare const CodeButton: React.FC;
2
+ export default CodeButton;
@@ -0,0 +1,2 @@
1
+ declare const CodeLanguageButton: React.FC;
2
+ export default CodeLanguageButton;
@@ -0,0 +1,2 @@
1
+ declare const HeadingButton: React.FC;
2
+ export default HeadingButton;
@@ -0,0 +1,2 @@
1
+ declare const IndentButton: React.FC;
2
+ export default IndentButton;
@@ -0,0 +1,2 @@
1
+ declare const NumberListButton: React.FC;
2
+ export default NumberListButton;
@@ -0,0 +1,2 @@
1
+ declare const OutdentButton: React.FC;
2
+ export default OutdentButton;
@@ -0,0 +1,2 @@
1
+ declare const RedoButton: React.FC;
2
+ export default RedoButton;
@@ -0,0 +1,2 @@
1
+ declare const SourceButton: React.FC;
2
+ export default SourceButton;
@@ -0,0 +1,2 @@
1
+ declare const StrikeThroughButton: React.FC;
2
+ export default StrikeThroughButton;
@@ -0,0 +1,2 @@
1
+ declare const SubscriptButton: React.FC;
2
+ export default SubscriptButton;
@@ -0,0 +1,2 @@
1
+ declare const SuperscriptButton: React.FC;
2
+ export default SuperscriptButton;
@@ -0,0 +1,2 @@
1
+ declare const TableButton: React.FC;
2
+ export default TableButton;
@@ -0,0 +1,2 @@
1
+ declare const UndoButton: React.FC;
2
+ export default UndoButton;
@@ -1,15 +1,28 @@
1
1
  import { getToolbarButton, listRegisteredToolbarButtons, registerToolbarButton, unregisterToolbarButton } from './registry';
2
2
  declare const builtinButtons: {
3
+ undo: import('react').FC<{}>;
4
+ redo: import('react').FC<{}>;
3
5
  bold: import('react').FC<{}>;
4
6
  underline: import('react').FC<{}>;
5
7
  italic: import('react').FC<{}>;
8
+ strikethrough: import('react').FC<{}>;
9
+ superscript: import('react').FC<{}>;
10
+ subscript: import('react').FC<{}>;
11
+ heading: import('react').FC<{}>;
6
12
  fontSize: import('react').FC<{}>;
7
13
  fontColor: import('react').FC<{}>;
8
14
  fill: import('react').FC<{}>;
15
+ bullet: import('react').FC<{}>;
16
+ number: import('react').FC<{}>;
17
+ outdent: import('react').FC<{}>;
18
+ indent: import('react').FC<{}>;
9
19
  align: import('react').FC<{}>;
10
20
  link: import('react').FC<{}>;
11
21
  unLink: import('react').FC<{}>;
12
22
  picture: import('react').FC<{}>;
23
+ code: import('react').FC<{}>;
24
+ table: import('react').FC<{}>;
25
+ source: import('react').FC<{}>;
13
26
  };
14
27
  export type BuiltinButtonName = keyof typeof builtinButtons;
15
28
  export type ToolbarButtonName = BuiltinButtonName | (string & {});
@@ -0,0 +1,8 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type HistoryState = {
3
+ canUndo: boolean;
4
+ canRedo: boolean;
5
+ };
6
+ export declare const useHistoryStateContext: () => HistoryState;
7
+ declare const HistoryStateProvider: React.FC<PropsWithChildren>;
8
+ export default HistoryStateProvider;
@@ -1,12 +1,21 @@
1
- export type TextFormatType = 'bold' | 'italic' | 'underline' | 'fontSize' | 'fontColor' | 'backgroundColor' | 'align';
1
+ import { CodeLanguageId } from '../../constants/codeLanguages';
2
2
  export type TextFormatsState = {
3
3
  bold: boolean;
4
4
  italic: boolean;
5
5
  underline: boolean;
6
+ strikethrough: boolean;
7
+ superscript: boolean;
8
+ subscript: boolean;
6
9
  fontSize: string;
7
10
  fontColor: string;
8
11
  backgroundColor: string;
9
12
  align: 'left' | 'center' | 'right';
13
+ listType: 'bullet' | 'number' | false;
14
+ canOutdent: boolean;
15
+ isCodeBlock: boolean;
16
+ isInTable: boolean;
17
+ headingTag: 'h1' | 'h2' | 'h3' | false;
18
+ codeLanguage: CodeLanguageId;
10
19
  link?: {
11
20
  link?: string;
12
21
  linkText?: string;
@@ -0,0 +1,13 @@
1
+ declare const StrikeThroughIcon: () => import("react").JSX.Element;
2
+ declare const UndoIcon: () => import("react").JSX.Element;
3
+ declare const RedoIcon: () => import("react").JSX.Element;
4
+ declare const SuperscriptIcon: () => import("react").JSX.Element;
5
+ declare const SubscriptIcon: () => import("react").JSX.Element;
6
+ declare const IndentIncreaseIcon: () => import("react").JSX.Element;
7
+ declare const IndentDecreaseIcon: () => import("react").JSX.Element;
8
+ declare const ListOrderedIcon: () => import("react").JSX.Element;
9
+ declare const ListUnorderedIcon: () => import("react").JSX.Element;
10
+ declare const CodeBlockIcon: () => import("react").JSX.Element;
11
+ declare const TableIcon: () => import("react").JSX.Element;
12
+ declare const HtmlIcon: () => import("react").JSX.Element;
13
+ export { StrikeThroughIcon, UndoIcon, RedoIcon, SuperscriptIcon, SubscriptIcon, IndentIncreaseIcon, IndentDecreaseIcon, ListOrderedIcon, ListUnorderedIcon, CodeBlockIcon, TableIcon, HtmlIcon, };
@@ -0,0 +1,69 @@
1
+ export declare const DEFAULT_CODE_LANGUAGE = "plaintext";
2
+ export declare const CODE_HIGHLIGHT_THEME = "github-light";
3
+ export declare const CODE_LANGUAGES: readonly [{
4
+ readonly id: "plaintext";
5
+ readonly label: "Plain text";
6
+ }, {
7
+ readonly id: "css";
8
+ readonly label: "CSS";
9
+ }, {
10
+ readonly id: "html";
11
+ readonly label: "HTML";
12
+ }, {
13
+ readonly id: "xml";
14
+ readonly label: "XML";
15
+ }, {
16
+ readonly id: "javascript";
17
+ readonly label: "JavaScript";
18
+ }, {
19
+ readonly id: "typescript";
20
+ readonly label: "TypeScript";
21
+ }, {
22
+ readonly id: "jsx";
23
+ readonly label: "JSX";
24
+ }, {
25
+ readonly id: "go";
26
+ readonly label: "Go";
27
+ }, {
28
+ readonly id: "php";
29
+ readonly label: "PHP";
30
+ }, {
31
+ readonly id: "c";
32
+ readonly label: "C";
33
+ }, {
34
+ readonly id: "python";
35
+ readonly label: "Python";
36
+ }, {
37
+ readonly id: "java";
38
+ readonly label: "Java";
39
+ }, {
40
+ readonly id: "cpp";
41
+ readonly label: "C++";
42
+ }, {
43
+ readonly id: "csharp";
44
+ readonly label: "C#";
45
+ }, {
46
+ readonly id: "vb";
47
+ readonly label: "Visual Basic";
48
+ }, {
49
+ readonly id: "sql";
50
+ readonly label: "SQL";
51
+ }, {
52
+ readonly id: "ruby";
53
+ readonly label: "Ruby";
54
+ }, {
55
+ readonly id: "swift";
56
+ readonly label: "Swift";
57
+ }, {
58
+ readonly id: "bash";
59
+ readonly label: "Bash";
60
+ }, {
61
+ readonly id: "lua";
62
+ readonly label: "Lua";
63
+ }, {
64
+ readonly id: "markdown";
65
+ readonly label: "Markdown";
66
+ }];
67
+ export type CodeLanguageId = (typeof CODE_LANGUAGES)[number]['id'];
68
+ export declare const CODE_LANGUAGE_BY_ID: Record<string, (typeof CODE_LANGUAGES)[number]>;
69
+ export declare const normalizeCodeLanguage: (language: string | null | undefined) => CodeLanguageId;
@@ -38,4 +38,7 @@ export declare const FONT_SIZES: readonly [{
38
38
  export declare const DEFAULT_FONT_SIZE = "16px";
39
39
  export declare const DEFAULT_FONT_COLOR = "#000";
40
40
  export declare const DEFAULT_BACKGROUND_COLOR = "transparent";
41
+ export declare const IMAGE_MAX_BYTES: number;
42
+ export declare const IMAGE_MAX_COUNT = 10;
43
+ export declare const TABLE_GRID_SIZE = 10;
41
44
  export type FontSize = (typeof FONT_SIZES)[number]['value'];
@@ -2,7 +2,6 @@ import { RefObject } from 'react';
2
2
  interface EditorContainerContextType {
3
3
  containerRef: RefObject<HTMLDivElement | null>;
4
4
  toolbarRef: RefObject<HTMLDivElement>;
5
- getPopupContainer: () => HTMLElement;
6
5
  }
7
6
  declare const EditorContainerContext: import('react').Context<EditorContainerContextType | null>;
8
7
  export declare const useEditorContainer: () => EditorContainerContextType;
@@ -0,0 +1,9 @@
1
+ import { MutableRefObject } from 'react';
2
+ export type SourceModeContextValue = {
3
+ isSourceMode: boolean;
4
+ isSourceModeRef: MutableRefObject<boolean>;
5
+ toggleSourceMode: () => void;
6
+ };
7
+ declare const SourceModeContext: import('react').Context<SourceModeContextValue | null>;
8
+ export declare const useSourceMode: () => SourceModeContextValue;
9
+ export default SourceModeContext;
@@ -0,0 +1,2 @@
1
+ import { HTMLConfig } from 'lexical';
2
+ export declare const editorHtmlConfig: HTMLConfig;
@@ -101,7 +101,7 @@ export type EditorProps = {
101
101
  maxLength?: number;
102
102
 
103
103
  /**
104
- * 发生超限(键入拦截 / 粘贴截断 / 回填截断)时触发
104
+ * 发生超限(键入拦截 / 粘贴截断 / 回填截断 / 退出源码截断)时触发
105
105
  */
106
106
  onMaxLengthExceed?: () => void;
107
107
 
@@ -0,0 +1 @@
1
+ export default function CodeHighlightPlugin(): null;
@@ -0,0 +1,3 @@
1
+ import { HeadingNode } from '@lexical/rich-text';
2
+ export declare function $normalizeHeadingNode(node: HeadingNode): void;
3
+ export default function HeadingPlugin(): null;
@@ -1,2 +1,4 @@
1
+ import { TextNode } from 'lexical';
2
+ export declare function $clearLinkTextColor(node: TextNode): void;
1
3
  /** 链接内文字始终用主题蓝,去掉会盖住 .editor-link 的内联 color */
2
4
  export default function LinkColorPlugin(): null;
@@ -0,0 +1 @@
1
+ export default function PasteStripImagePlugin(): null;
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type SourceModeProviderProps = PropsWithChildren<{
3
+ maxLength?: number;
4
+ onMaxLengthExceed?: () => void;
5
+ }>;
6
+ export default function SourceModeProvider({ children, maxLength, onMaxLengthExceed, }: SourceModeProviderProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export default function TabIndentPlugin(): null;
@@ -0,0 +1 @@
1
+ export default function TablePlugin(): null;
@@ -0,0 +1,12 @@
1
+ import { HighlighterCore } from '@shikijs/core';
2
+ import { CodeNode } from '@lexical/code-core';
3
+ import { LexicalNode } from 'lexical';
4
+ import { CodeLanguageId } from '../constants/codeLanguages';
5
+ type HighlightLang = Exclude<CodeLanguageId, 'plaintext'>;
6
+ export declare const isHighlightLang: (language: string) => language is HighlightLang;
7
+ export declare const loadCodeHighlighter: () => Promise<HighlighterCore>;
8
+ export declare const isCodeLanguageReady: (highlighter: HighlighterCore, language: string) => language is HighlightLang;
9
+ export declare const loadCodeLanguage: (language: HighlightLang) => Promise<HighlighterCore>;
10
+ export declare const loadCodeTheme: () => Promise<HighlighterCore>;
11
+ export declare const $tokenizeCodeNode: (codeNode: CodeNode, language: string, highlighter: HighlighterCore | null) => LexicalNode[];
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ export declare function $fillRootFromHtml(editor: LexicalEditor, html: string): void;
@@ -0,0 +1 @@
1
+ export declare function formatEditorHtml(html: string): Promise<string>;
@@ -0,0 +1,4 @@
1
+ export declare const formatTruncatedFilename: (filename: string, maxWidth: number, measureWidth: (text: string) => number) => {
2
+ display: string;
3
+ truncated: boolean;
4
+ };
@@ -0,0 +1 @@
1
+ export declare function isEmptyEditorHtml(html: string, text: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function sanitizeEditorHtml(html: string): string;
@@ -0,0 +1 @@
1
+ export declare function stripImagesFromHtml(html: string): string;
@@ -0,0 +1,2 @@
1
+ /** 按声明名精确匹配,font-size 不会误伤 font-size-adjust。 */
2
+ export declare function stripInlineStyleProperty(style: string, property: string): string;
@@ -0,0 +1 @@
1
+ export declare function $writeHtmlSource(source: string): void;
@@ -0,0 +1,16 @@
1
+ import { PropsWithChildren } from 'react';
2
+ /** 第一层浮层底座。嵌套时改为 parentZ + STEP */
3
+ export declare const OVERLAY_Z_BASE = 1000;
4
+ export declare const OVERLAY_Z_STEP = 50;
5
+ type OverlayContextValue = {
6
+ parentZ?: number;
7
+ offset: number;
8
+ };
9
+ export declare const OverlayContext: import('react').Context<OverlayContextValue>;
10
+ export type OverlayProviderProps = PropsWithChildren<{
11
+ zIndex?: number;
12
+ offset?: number;
13
+ }>;
14
+ export declare const OverlayProvider: ({ zIndex, offset, children }: OverlayProviderProps) => import("react").JSX.Element;
15
+ export declare const useOverlayZIndex: (override?: number) => number;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OverlayProvider, useOverlayZIndex, OVERLAY_Z_BASE, OVERLAY_Z_STEP, } from './OverlayContext';
2
+ export type { OverlayProviderProps } from './OverlayContext';
@@ -11,7 +11,7 @@ export type TooltipProps = {
11
11
  content?: ReactNode;
12
12
  trigger?: TooltipTrigger;
13
13
  style?: CSSProperties;
14
- /** 浮层 z-index,默认通过 CSS 变量 `--bsy-tooltip-z-index` 生效 */
14
+ /** 浮层 z-index,默认 Overlay 底座;未传时写入 `--bsy-tooltip-z-index` */
15
15
  zIndex?: number;
16
16
  showArrow?: boolean;
17
17
  placement?: Placement;
@@ -3,6 +3,8 @@ 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 { OverlayProvider, useOverlayZIndex, OVERLAY_Z_BASE, OVERLAY_Z_STEP } from './Overlay';
7
+ export type { OverlayProviderProps } from './Overlay';
6
8
  export { LocalTheme } from './theme';
7
9
  export { default as Card } from './Card';
8
10
  export { default as Modal } from './Modal';