@unicom-cloud/ui 0.8.110 → 0.8.112

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 (321) hide show
  1. package/Affix.js +3 -3
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +2 -2
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/ColorPicker.js +1 -1
  14. package/Comment.js +1 -1
  15. package/ConfigProvider.js +1 -1
  16. package/Copy.js +2 -2
  17. package/Countdown.js +17 -17
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Details.js +19 -19
  21. package/Development.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Dropdown.js +1 -1
  25. package/Empty.js +1 -1
  26. package/Flex.js +18 -18
  27. package/Form.js +1 -1
  28. package/Icon.js +1 -1
  29. package/IconHover.js +1 -1
  30. package/Image.js +1 -1
  31. package/InputNumber.js +1 -1
  32. package/Layout.js +1 -1
  33. package/Link.js +1 -1
  34. package/LiquidFill.js +19 -19
  35. package/List.js +1 -1
  36. package/Loading.js +18 -18
  37. package/Marquee.js +19 -19
  38. package/Mentions.js +1 -1
  39. package/Menu.js +1 -1
  40. package/Message.js +1 -1
  41. package/Modal.js +1 -1
  42. package/Notice.js +18 -18
  43. package/Notification.js +1 -1
  44. package/OverflowEllipsis.js +2 -2
  45. package/PageHeader.js +2 -2
  46. package/Popconfirm.js +1 -1
  47. package/Popover.js +1 -1
  48. package/Progress.js +1 -1
  49. package/QrCode.js +18 -18
  50. package/Radio.js +1 -1
  51. package/Rate.js +1 -1
  52. package/ResizeBox.js +1 -1
  53. package/Result.js +1 -1
  54. package/RichText.js +13 -70
  55. package/Segmented.js +20 -20
  56. package/Skeleton.js +1 -1
  57. package/Slider.js +1 -1
  58. package/Space.js +18 -18
  59. package/Spin.js +1 -1
  60. package/Statistic.js +1 -1
  61. package/Steps.js +1 -1
  62. package/Switch.js +1 -1
  63. package/Table.js +1 -1
  64. package/Tabs.js +1 -1
  65. package/Tag.js +1 -1
  66. package/Tooltip.js +1 -1
  67. package/Tour.js +19 -19
  68. package/Transfer.js +1 -1
  69. package/Tree.js +1 -1
  70. package/TreeSelect.js +1 -1
  71. package/Trigger.js +2 -2
  72. package/affix/index.js +3 -3
  73. package/alert/index.js +1 -1
  74. package/anchor/Anchor.js +1 -1
  75. package/anchor/Link.js +1 -1
  76. package/app/App.js +2 -2
  77. package/auto-complete/index.js +1 -1
  78. package/avatar/Avatar.js +1 -1
  79. package/avatar/Group.js +1 -1
  80. package/back-top/index.js +1 -1
  81. package/badge/index.js +1 -1
  82. package/breadcrumb/index.js +2 -2
  83. package/button/Group.js +1 -1
  84. package/button/index.js +1 -1
  85. package/calendar/index.js +2 -2
  86. package/card/Grid.js +1 -1
  87. package/card/Meta.js +1 -1
  88. package/card/index.js +1 -1
  89. package/carousel/Arrow.js +1 -1
  90. package/carousel/Indicator.js +1 -1
  91. package/carousel/index.js +2 -2
  92. package/cascader/Cascader.js +3 -3
  93. package/cascader/index.js +1 -1
  94. package/cascader/util.js +1 -1
  95. package/checkbox/Checkbox.js +2 -2
  96. package/checkbox/Group.js +2 -2
  97. package/checkbox/GroupBlock.js +2 -2
  98. package/checkbox/index.js +2 -2
  99. package/chunk/{Y_GQsZUt.js → 0BhDjhcd.js} +1 -1
  100. package/chunk/{BDMqvmVH.js → BCmfDFV4.js} +28 -30
  101. package/chunk/{n1tirBXA.js → BfVlSL8A.js} +3 -3
  102. package/chunk/BiZSULcr.js +1872 -0
  103. package/chunk/{BcEZk8pT.js → C1vY8016.js} +14 -14
  104. package/chunk/{qsVvkBLU.js → C3kH2ES3.js} +1 -1
  105. package/chunk/{BGJspFG9.js → C5CbL5ku.js} +1 -1
  106. package/chunk/CAA93JLq.js +6 -0
  107. package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
  108. package/chunk/{Dbw0YUY1.js → CYssV-zz.js} +36 -36
  109. package/chunk/CrOzsnI0.js +51 -0
  110. package/chunk/{CFyN9Eio.js → CtCFA4ht.js} +4 -4
  111. package/chunk/{BnUWOu3_.js → Cx92e1S8.js} +3 -3
  112. package/chunk/{BeHcDey_.js → CylbdYce.js} +1 -1
  113. package/chunk/{BUNoUPLs.js → DMv8Hn4u.js} +1 -1
  114. package/chunk/{zFFM4RBT.js → DfUcAhyT.js} +703 -680
  115. package/chunk/{DSqW_efI.js → DfbO4QTS.js} +152 -156
  116. package/chunk/{CgN4U7Ou.js → DhAvt6tJ.js} +2 -2
  117. package/chunk/DsuIQH0F.js +200 -0
  118. package/chunk/{Lyh0cz3R.js → KPBMJlOB.js} +1 -1
  119. package/chunk/{B_c0gPsX.js → vP3qfmKM.js} +24 -23
  120. package/collapse/Collapse.js +1 -1
  121. package/collapse/Item.js +1 -1
  122. package/color-picker/ControlBar.js +1 -1
  123. package/color-picker/InputAlpha.js +1 -1
  124. package/color-picker/InputHex.js +1 -1
  125. package/color-picker/InputRgb.js +1 -1
  126. package/color-picker/Palette.js +1 -1
  127. package/color-picker/Panel.js +2 -2
  128. package/color-picker/index.js +1 -1
  129. package/comment/index.js +1 -1
  130. package/config-provider/ConfigProvider.js +1 -1
  131. package/config-provider/context.js +1 -1
  132. package/config-provider/index.js +2 -2
  133. package/copy/index.js +2 -2
  134. package/countdown/index.js +17 -17
  135. package/date-picker/Picker.js +1 -1
  136. package/date-picker/RangePicker.js +2 -2
  137. package/date-picker/index.js +1 -1
  138. package/descriptions/index.js +1 -1
  139. package/details/index.js +19 -19
  140. package/development/index.js +1 -1
  141. package/divider/index.js +1 -1
  142. package/draggable/index.js +1 -1
  143. package/drawer/Drawer.js +1 -1
  144. package/dropdown/Button.js +1 -1
  145. package/dropdown/index.js +1 -1
  146. package/empty/index.js +1 -1
  147. package/flex/index.js +18 -18
  148. package/form/Form.js +2 -2
  149. package/form/FormItem.js +1 -1
  150. package/form/index.js +1 -1
  151. package/grid/Grid.js +1 -1
  152. package/grid/Item.js +1 -1
  153. package/hooks/index.js +96 -97
  154. package/hooks/useId.js +1 -1
  155. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  156. package/hooks/useResizeObserver.js +58 -2
  157. package/hooks/useWindowSize.js +1 -1
  158. package/icon/index.js +1 -1
  159. package/icon-hover/index.js +1 -1
  160. package/icons/file.js +1 -1
  161. package/image/Image.js +2 -2
  162. package/image/ImagePreview.js +22 -22
  163. package/image/ImagePreviewArrow.js +1 -1
  164. package/image/ImagePreviewGroup.js +1 -1
  165. package/image/index.js +1 -1
  166. package/index.js +691 -693
  167. package/input/Button.js +1 -1
  168. package/input/Group.js +1 -1
  169. package/input/Input.js +2 -2
  170. package/input/InputElement.js +2 -2
  171. package/input/Password.js +1 -1
  172. package/input/Search.js +1 -1
  173. package/input/Textarea.js +2 -2
  174. package/input-number/index.js +1 -1
  175. package/input-number/useSelectionRange.js +1 -1
  176. package/input-tag/InputTag.js +1 -1
  177. package/layout/Content.js +1 -1
  178. package/layout/Footer.js +1 -1
  179. package/layout/Header.js +1 -1
  180. package/layout/Sider.js +1 -1
  181. package/layout/index.js +1 -1
  182. package/link/index.js +1 -1
  183. package/liquid-fill/index.js +24 -24
  184. package/list/Item.js +1 -1
  185. package/list/Meta.js +1 -1
  186. package/list/index.js +1 -1
  187. package/loading/index.js +18 -18
  188. package/marquee/index.js +22 -22
  189. package/marquee-/index.js +22 -22
  190. package/mentions/index.js +1 -1
  191. package/menu/Menu.js +3 -3
  192. package/menu/OverflowWrap.js +2 -2
  193. package/menu/index.js +2 -2
  194. package/message/index.js +1 -1
  195. package/message/useMessage.js +1 -1
  196. package/modal/Confirm.js +2 -2
  197. package/modal/Modal.js +2 -2
  198. package/modal/index.js +2 -2
  199. package/notice/index.js +18 -18
  200. package/notification/index.js +1 -1
  201. package/notification/useNotification.js +1 -1
  202. package/overflow-ellipsis/OverflowItem.js +2 -2
  203. package/overflow-ellipsis/index.js +2 -2
  204. package/package.json +1 -1
  205. package/page-header/index.js +2 -2
  206. package/pagination/PageItem.js +1 -1
  207. package/pagination/PageJumper.js +1 -1
  208. package/pagination/PageOption.js +1 -1
  209. package/pagination/Pagination.js +1 -1
  210. package/picker/Input.js +1 -1
  211. package/picker/InputRange.js +1 -1
  212. package/popconfirm/index.js +1 -1
  213. package/popover/index.js +1 -1
  214. package/progress/CircleProgress.js +1 -1
  215. package/progress/index.js +1 -1
  216. package/qr-code/index.js +18 -18
  217. package/radio/Group.js +2 -2
  218. package/radio/GroupBlock.js +2 -2
  219. package/radio/Radio.js +2 -2
  220. package/radio/index.js +2 -2
  221. package/rate/index.js +1 -1
  222. package/resize-box/ResizeTrigger.js +2 -2
  223. package/resize-box/Split.js +2 -2
  224. package/resize-box/SplitGroup.js +1 -1
  225. package/resize-box/index.js +1 -1
  226. package/result/index.js +1 -1
  227. package/rich-text/core.js +1 -1
  228. package/rich-text/index.js +65 -128
  229. package/rich-text/rich.js +406 -936
  230. package/row-col/Col-.js +1 -1
  231. package/row-col/Col.js +71 -74
  232. package/row-col/Row.js +1 -1
  233. package/segmented/index.js +23 -23
  234. package/select/Option.js +1 -1
  235. package/select/Select.js +4 -4
  236. package/select-view/Core.js +1 -1
  237. package/skeleton/index.js +1 -1
  238. package/slider/Button.js +1 -1
  239. package/slider/index.js +1 -1
  240. package/space/index.js +18 -18
  241. package/spin/DotLoading.js +1 -1
  242. package/spin/index.js +1 -1
  243. package/splitter/Panel.js +1 -1
  244. package/splitter/SplitBar.js +2 -2
  245. package/splitter/Splitter.js +3 -3
  246. package/statistic/index.js +1 -1
  247. package/steps/index.js +1 -1
  248. package/style.css +1 -1
  249. package/switch/index.js +1 -1
  250. package/table/Table.js +61 -11
  251. package/table/index.js +4 -4
  252. package/tabs/Tab.js +3 -3
  253. package/tabs/TabContent.js +2 -2
  254. package/tabs/TabPane.js +1 -1
  255. package/tabs/index.js +2 -2
  256. package/tag/index.js +1 -1
  257. package/time-picker/Picker.js +1 -1
  258. package/time-picker/TimePicker.js +1 -1
  259. package/timeline/Item.js +1 -1
  260. package/timeline/Timeline.js +1 -1
  261. package/tooltip/index.js +1 -1
  262. package/tour/index.js +27 -27
  263. package/transfer/Item.js +2 -2
  264. package/transfer/List.js +2 -2
  265. package/transfer/index.js +1 -1
  266. package/tree/Animation.js +2 -2
  267. package/tree/Node.js +3 -3
  268. package/tree/NodeList.js +1 -1
  269. package/tree/Tree.js +2 -2
  270. package/tree/index.js +1 -1
  271. package/tree-select/Select.js +3 -3
  272. package/tree-select/index.js +1 -1
  273. package/trigger/index.js +2 -2
  274. package/types/common/hooks/src/use-size/index.d.ts +1 -1
  275. package/types/common/hooks/src/use-theme/index.d.ts +2 -2
  276. package/types/common/hooks/src/utils/isBrowser.d.ts +1 -1
  277. package/types/common/hooks/useResizeObserver.d.ts +1 -5
  278. package/types/common/hooks/useWindowSize.d.ts +1 -1
  279. package/types/common/utils/emitter.d.ts +1 -0
  280. package/types/common/utils/index.d.ts +1 -1
  281. package/types/pc/index.d.ts +1 -1
  282. package/types/pc/menu/context.d.ts +1 -1
  283. package/types/pc/rich-text/blots/scroll.d.ts +2 -8
  284. package/types/pc/rich-text/core/emitter.d.ts +2 -3
  285. package/types/pc/rich-text/core/rich.d.ts +11 -44
  286. package/types/pc/rich-text/core/selection.d.ts +1 -8
  287. package/types/pc/rich-text/core/theme.d.ts +3 -0
  288. package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +2 -4
  289. package/types/pc/rich-text/themes/base.d.ts +3 -0
  290. package/types/pc/rich-text/themes/{snow.d.ts → pqb.d.ts} +2 -2
  291. package/types/pc/rich-text/ui/tooltip.d.ts +2 -0
  292. package/types/pc/utils/emitter.d.ts +1 -0
  293. package/types/pc/utils/index.d.ts +1 -1
  294. package/typography/Base.js +2 -2
  295. package/typography/Ellipsis.js +3 -3
  296. package/typography/Operations.js +2 -2
  297. package/typography/Paragraph.js +1 -1
  298. package/typography/Typography.js +1 -1
  299. package/typography/useEllipsis.js +1 -1
  300. package/upload/TriggerNode.js +1 -1
  301. package/upload/Upload.js +1 -1
  302. package/utils/contextHolder.js +1 -1
  303. package/utils/emitter.js +5 -0
  304. package/utils/index.js +3 -3
  305. package/utils/resizeObserver.js +1 -1
  306. package/verification-code/VerificationCode.js +1 -1
  307. package/version/index.js +1 -1
  308. package/virtual-list/VirtualList.js +2 -2
  309. package/watermark/Watermark.js +1 -1
  310. package/chunk/BDgzrqDN.js +0 -154
  311. package/chunk/COc48wzV.js +0 -64
  312. package/chunk/COsRZOz1.js +0 -1813
  313. package/chunk/CylJZkp8.js +0 -6
  314. package/chunk/Di5KBCVQ.js +0 -4
  315. package/chunk/cW_5U6dL.js +0 -28
  316. package/rich-text/eventemitter/index.d.ts +0 -135
  317. package/types/common/utils/mitt.d.ts +0 -1
  318. package/types/pc/rich-text/eventemitter/index.d.ts +0 -101
  319. package/types/pc/rich-text/themes/bubble.d.ts +0 -18
  320. package/types/pc/utils/mitt.d.ts +0 -1
  321. package/utils/mitt.js +0 -5
@@ -118,11 +118,9 @@ declare class Rich {
118
118
  uploader: Uploader;
119
119
  options: ExpandedRichOptions;
120
120
  constructor(container: HTMLElement | string, options?: RichOptions);
121
- addContainer(container: string, refNode?: Node | null): HTMLDivElement;
122
- addContainer(container: HTMLElement, refNode?: Node | null): HTMLElement;
121
+ addContainer(container: string | HTMLElement, refNode?: Node | null, parentElement?: HTMLElement): HTMLDivElement | HTMLElement;
123
122
  blur(): void;
124
- deleteText(range: Range, source?: EmitterSource): Delta;
125
- deleteText(index: number, length: number, source?: EmitterSource): Delta;
123
+ deleteText(index: number | Range, length?: number | EmitterSource, source?: EmitterSource): Delta;
126
124
  disable(): void;
127
125
  editReadOnly<T>(modifier: () => T): T;
128
126
  enable(enabled?: boolean): void;
@@ -130,11 +128,8 @@ declare class Rich {
130
128
  preventScroll?: boolean;
131
129
  }): void;
132
130
  format(name: string, value: unknown, source?: EmitterSource): Delta;
133
- formatLine(index: number, length: number, formats: Record<string, unknown>, source?: EmitterSource): Delta;
134
- formatLine(index: number, length: number, name: string, value?: unknown, source?: EmitterSource): Delta;
135
- formatText(range: Range, name: string, value: unknown, source?: EmitterSource): Delta;
136
- formatText(index: number, length: number, name: string, value: unknown, source?: EmitterSource): Delta;
137
- formatText(index: number, length: number, formats: Record<string, unknown>, source?: EmitterSource): Delta;
131
+ formatLine(index: number, length: number, name: string | Record<string, unknown>, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
132
+ formatText(index: number | Range, length: number | string, name: string | unknown, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
138
133
  getBounds(index: number | Range, length?: number): Bounds | null;
139
134
  getContents(index?: number, length?: number): Delta;
140
135
  getFormat(index?: number, length?: number): {
@@ -147,36 +142,17 @@ declare class Rich {
147
142
  getLength(): number;
148
143
  getLeaf(index: number): [Parchment.LeafBlot | null, number];
149
144
  getLine(index: number): [Block | BlockEmbed | null, number];
150
- getLines(range: Range): (Block | BlockEmbed)[];
151
- getLines(index?: number, length?: number): (Block | BlockEmbed)[];
145
+ getLines(index?: Range | number, length?: number): (Block | BlockEmbed)[];
152
146
  getModule(name: string): unknown;
153
- getSelection(focus: true): Range;
154
147
  getSelection(focus?: boolean): Range | null;
155
- getSemanticHTML(range: Range): string;
156
- getSemanticHTML(index?: number, length?: number): string;
157
- getText(range?: Range): string;
158
- getText(index?: number, length?: number): string;
148
+ getSemanticHTML(index?: Range | number, length?: number): string;
149
+ getText(index?: Range | number, length?: number): string;
159
150
  hasFocus(): boolean;
160
151
  insertEmbed(index: number, embed: string, value: unknown, source?: EmitterSource): Delta;
161
- insertText(index: number, text: string, source?: EmitterSource): Delta;
162
- insertText(index: number, text: string, formats: Record<string, unknown>, source?: EmitterSource): Delta;
163
- insertText(index: number, text: string, name: string, value: unknown, source?: EmitterSource): Delta;
152
+ insertText(index: number, text: string, name?: string | Record<string, unknown> | EmitterSource, value?: unknown, source?: EmitterSource): Delta;
164
153
  isEnabled(): boolean;
165
154
  off(...args: Parameters<(typeof Emitter)['prototype']['off']>): void;
166
- on(event: (typeof Emitter)['events']['TEXT_CHANGE'], handler: (delta: Delta, oldContent: Delta, source: EmitterSource) => void): Emitter;
167
- on(event: (typeof Emitter)['events']['SELECTION_CHANGE'], handler: (range: Range, oldRange: Range, source: EmitterSource) => void): Emitter;
168
- on(event: (typeof Emitter)['events']['EDITOR_CHANGE'], handler: (...args: [
169
- (typeof Emitter)['events']['TEXT_CHANGE'],
170
- Delta,
171
- Delta,
172
- EmitterSource
173
- ] | [
174
- (typeof Emitter)['events']['SELECTION_CHANGE'],
175
- Range,
176
- Range,
177
- EmitterSource
178
- ]) => void): Emitter;
179
- on(event: string, ...args: unknown[]): Emitter;
155
+ on(...args: Parameters<(typeof Emitter)['prototype']['on']>): Emitter;
180
156
  once(...args: Parameters<(typeof Emitter)['prototype']['once']>): void;
181
157
  removeFormat(index: number, length: number, source?: EmitterSource): Delta;
182
158
  scrollRectIntoView(rect: Rect, options?: ScrollRectIntoViewOptions): void;
@@ -190,10 +166,7 @@ declare class Rich {
190
166
  */
191
167
  scrollSelectionIntoView(options?: ScrollRectIntoViewOptions): void;
192
168
  setContents(delta: Delta | Op[], source?: EmitterSource): Delta;
193
- setSelection(range: Range | null, source?: EmitterSource): void;
194
- setSelection(index: number, source?: EmitterSource): void;
195
- setSelection(index: number, length?: number, source?: EmitterSource): void;
196
- setSelection(index: number, source?: EmitterSource): void;
169
+ setSelection(index: Range | null | number, length?: EmitterSource | number, source?: EmitterSource): void;
197
170
  setText(text: string, source?: EmitterSource): Delta;
198
171
  update(source?: EmitterSource): void;
199
172
  updateContents(delta: Delta | Op[], source?: EmitterSource): Delta;
@@ -205,13 +178,7 @@ type NormalizedIndexLength = [
205
178
  Record<string, unknown>,
206
179
  EmitterSource
207
180
  ];
208
- declare function overload(index: number, source?: EmitterSource): NormalizedIndexLength;
209
- declare function overload(index: number, length: number, source?: EmitterSource): NormalizedIndexLength;
210
- declare function overload(index: number, length: number, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
211
- declare function overload(index: number, length: number, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
212
- declare function overload(range: Range, source?: EmitterSource): NormalizedIndexLength;
213
- declare function overload(range: Range, format: string, value: unknown, source?: EmitterSource): NormalizedIndexLength;
214
- declare function overload(range: Range, format: Record<string, unknown>, source?: EmitterSource): NormalizedIndexLength;
181
+ declare function overload(index: Range | number, length?: number | string | Record<string, unknown> | EmitterSource, name?: string | unknown | Record<string, unknown> | EmitterSource, value?: unknown | EmitterSource, source?: EmitterSource): NormalizedIndexLength;
215
182
  export { Parchment, Range };
216
183
  export type { Bounds, DebugLevel, EmitterSource };
217
184
  export { Rich as default, expandConfig, globalRegistry, overload };
@@ -42,14 +42,7 @@ declare class Selection {
42
42
  handleDragging(): void;
43
43
  focus(): void;
44
44
  format(format: string, value: unknown): void;
45
- getBounds(index: number, length?: number): DOMRect | {
46
- bottom: number;
47
- height: number;
48
- left: number;
49
- right: number;
50
- top: number;
51
- width: number;
52
- } | null;
45
+ getBounds(index: number, length?: number): Bounds | null;
53
46
  getNativeRange(): NormalizedRange | null;
54
47
  getRange(): [Range, NormalizedRange] | [null, null];
55
48
  hasFocus(): boolean;
@@ -4,14 +4,17 @@ import type History from '../modules/history.js';
4
4
  import type Keyboard from '../modules/keyboard.js';
5
5
  import type { ToolbarProps } from '../modules/toolbar.js';
6
6
  import type Uploader from '../modules/uploader.js';
7
+ import Tooltip from '../ui/tooltip.js';
7
8
  export interface ThemeOptions {
8
9
  modules: Record<string, unknown> & {
9
10
  toolbar?: null | ToolbarProps;
10
11
  };
12
+ bounds?: HTMLElement;
11
13
  }
12
14
  declare class Theme {
13
15
  protected rich: Rich;
14
16
  protected options: ThemeOptions;
17
+ tooltip?: Tooltip;
15
18
  static DEFAULTS: ThemeOptions;
16
19
  static themes: {
17
20
  default: typeof Theme;
@@ -23,10 +23,8 @@ declare class ParentBlot extends ShadowBlot implements Parent {
23
23
  */
24
24
  build(): void;
25
25
  deleteAt(index: number, length: number): void;
26
- descendant<T extends Blot>(criteria: new (...args: any[]) => T, index: number): [T | null, number];
27
- descendant(criteria: (blot: Blot) => boolean, index: number): [Blot | null, number];
28
- descendants<T extends Blot>(criteria: new (...args: any[]) => T, index?: number, length?: number): T[];
29
- descendants(criteria: (blot: Blot) => boolean, index?: number, length?: number): Blot[];
26
+ descendant(criteria: any, index?: number): [Blot | null, number];
27
+ descendants(criteria: any, index?: number, length?: number): Blot[];
30
28
  detach(): void;
31
29
  enforceAllowedChildren(): void;
32
30
  formatAt(index: number, length: number, name: string, value: any): void;
@@ -6,6 +6,7 @@ import Theme from '../core/theme.js';
6
6
  import type Clipboard from '../modules/clipboard.js';
7
7
  import type History from '../modules/history.js';
8
8
  import type Keyboard from '../modules/keyboard.js';
9
+ import type Toolbar from '../modules/toolbar.js';
9
10
  import type Uploader from '../modules/uploader.js';
10
11
  import Picker from '../ui/picker.js';
11
12
  import Tooltip from '../ui/tooltip.js';
@@ -13,6 +14,7 @@ declare class BaseTheme extends Theme {
13
14
  pickers: Picker[];
14
15
  tooltip?: Tooltip;
15
16
  constructor(rich: Rich, options: ThemeOptions);
17
+ extendToolbar(toolbar: Toolbar): void;
16
18
  addModule(name: 'clipboard'): Clipboard;
17
19
  addModule(name: 'keyboard'): Keyboard;
18
20
  addModule(name: 'uploader'): Uploader;
@@ -25,6 +27,7 @@ declare class BaseTheme extends Theme {
25
27
  declare class BaseTooltip extends Tooltip {
26
28
  textbox: HTMLInputElement | null;
27
29
  linkRange?: Range;
30
+ static TEMPLATE: string;
28
31
  constructor(rich: Rich, boundsContainer?: HTMLElement);
29
32
  listen(): void;
30
33
  cancel(): void;
@@ -2,8 +2,8 @@ import Rich from '../core/rich.js';
2
2
  import type { ThemeOptions } from '../core/theme.js';
3
3
  import type Toolbar from '../modules/toolbar.js';
4
4
  import BaseTheme from './base.js';
5
- declare class SnowTheme extends BaseTheme {
5
+ declare class PqbTheme extends BaseTheme {
6
6
  constructor(rich: Rich, options: ThemeOptions);
7
7
  extendToolbar(toolbar: Toolbar): void;
8
8
  }
9
- export default SnowTheme;
9
+ export default PqbTheme;
@@ -4,9 +4,11 @@ declare class Tooltip {
4
4
  rich: Rich;
5
5
  boundsContainer: HTMLElement;
6
6
  root: HTMLDivElement;
7
+ static TEMPLATE: string;
7
8
  constructor(rich: Rich, boundsContainer?: HTMLElement);
8
9
  hide(): void;
9
10
  position(reference: Bounds): number;
10
11
  show(): void;
12
+ edit(mode?: string, preview?: string | null): void;
11
13
  }
12
14
  export default Tooltip;
@@ -0,0 +1 @@
1
+ export { default, default as emitter } from '../../common/utils/emitter';
@@ -19,7 +19,7 @@ export * from './lodash';
19
19
  export * from './math';
20
20
  export * from './mergedToString';
21
21
  export * from './mergeProps';
22
- export * from './mitt';
22
+ export * from './emitter';
23
23
  export * from './mutationObserver';
24
24
  export * from './names';
25
25
  export * from './omit';
@@ -1,7 +1,7 @@
1
1
  import { jsx as p, jsxs as ne, Fragment as ie } from "react/jsx-runtime";
2
2
  import re from "lodash/merge";
3
3
  import _, { forwardRef as le, useContext as pe, useRef as ae, useState as W, useEffect as ce, useImperativeHandle as me } from "react";
4
- import { a as de } from "../chunk/BcEZk8pT.js";
4
+ import { a as de } from "../chunk/C1vY8016.js";
5
5
  import { u as fe } from "../chunk/2vdCeheu.js";
6
6
  import { u as ue } from "../chunk/DfChiMIE.js";
7
7
  import he from "../popover/index.js";
@@ -10,7 +10,7 @@ import q from "@unicom-cloud/utils/class-name";
10
10
  import "../chunk/DsaQZE4X.js";
11
11
  import { m as ge } from "../chunk/B5RFT17G.js";
12
12
  import { o as Ce } from "../chunk/BKKEev13.js";
13
- import { r as xe } from "../chunk/B8W1N4er.js";
13
+ import { r as xe } from "../chunk/CHQ8c547.js";
14
14
  import Te from "../utils/throttleByRaf.js";
15
15
  import Se from "./EditContent.js";
16
16
  import Ne from "./Operations.js";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as g, Fragment as K, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as Q, useContext as U, useRef as v, useState as R, useMemo as V, useEffect as S, useCallback as X } from "react";
3
- import { a as Y } from "../chunk/BcEZk8pT.js";
3
+ import { a as Y } from "../chunk/C1vY8016.js";
4
4
  import Z from "../copy/index.js";
5
5
  import { u as tt } from "../chunk/FgWHhRFz.js";
6
6
  import { u as et } from "../chunk/2vdCeheu.js";
@@ -37,11 +37,11 @@ import "lodash/uniq";
37
37
  import "lodash/upperFirst";
38
38
  import "@unicom-cloud/utils/math";
39
39
  import { m as it } from "../chunk/B5RFT17G.js";
40
- import "@unicom-cloud/utils/mitt";
40
+ import "@unicom-cloud/utils/emitter";
41
41
  import "@unicom-cloud/utils/pinyin";
42
42
  import "../chunk/BJ9_azwQ.js";
43
43
  import "../chunk/CXrVhA6-.js";
44
- import { r as nt } from "../chunk/B8W1N4er.js";
44
+ import { r as nt } from "../chunk/CHQ8c547.js";
45
45
  import "../utils/responsiveObserve.js";
46
46
  import "@unicom-cloud/utils/file/saveAs";
47
47
  import "@unicom-cloud/utils/screenfull";
@@ -10,7 +10,7 @@ import "@unicom-cloud/utils/date";
10
10
  import "@unicom-cloud/utils/case-name";
11
11
  import "@unicom-cloud/utils/class-name";
12
12
  import "@unicom-cloud/utils/constant/ui";
13
- import "../chunk/BcEZk8pT.js";
13
+ import "../chunk/C1vY8016.js";
14
14
  import "@unicom-cloud/utils/clipboard-copy";
15
15
  import "../chunk/DS_deHpN.js";
16
16
  import "../chunk/d1c9z8T1.js";
@@ -38,7 +38,7 @@ import "lodash/uniq";
38
38
  import "lodash/upperFirst";
39
39
  import "@unicom-cloud/utils/math";
40
40
  import { m as g } from "../chunk/B5RFT17G.js";
41
- import "@unicom-cloud/utils/mitt";
41
+ import "@unicom-cloud/utils/emitter";
42
42
  import "@unicom-cloud/utils/pinyin";
43
43
  import "../chunk/BJ9_azwQ.js";
44
44
  import "../chunk/CXrVhA6-.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as p, useContext as c } from "react";
3
- import { a as f } from "../chunk/BcEZk8pT.js";
3
+ import { a as f } from "../chunk/C1vY8016.js";
4
4
  import i from "@unicom-cloud/utils/class-name";
5
5
  import l from "./Base.js";
6
6
  function g(a, s) {
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as c, useContext as l } from "react";
3
- import { a as f } from "../chunk/BcEZk8pT.js";
3
+ import { a as f } from "../chunk/C1vY8016.js";
4
4
  import i from "@unicom-cloud/utils/class-name";
5
5
  function y(o, s) {
6
6
  const { getPrefixCls: a } = l(f), t = a?.("typography"), { className: r, style: e, children: p } = o, m = i(t, r);
@@ -2,7 +2,7 @@ import { jsxs as F, jsx as y } from "react/jsx-runtime";
2
2
  import $ from "lodash/isNumber";
3
3
  import A from "lodash/isString";
4
4
  import U, { useRef as b, useState as H, useMemo as P } from "react";
5
- import { u as B } from "../chunk/CylJZkp8.js";
5
+ import { u as B } from "../chunk/CAA93JLq.js";
6
6
  import { u as T } from "../chunk/DfChiMIE.js";
7
7
  import ee from "../utils/throttleByRaf.js";
8
8
  const te = "hxj";
@@ -3,7 +3,7 @@ import h from "@unicom-cloud/icons/IconUiPlus";
3
3
  import w from "@unicom-cloud/icons/IconUiUpload";
4
4
  import N, { forwardRef as F, useContext as P, useState as E, useEffect as j } from "react";
5
5
  import A from "../button/index.js";
6
- import { a as G } from "../chunk/BcEZk8pT.js";
6
+ import { a as G } from "../chunk/C1vY8016.js";
7
7
  import { u as K } from "../chunk/Bvxzb1wd.js";
8
8
  import $ from "@unicom-cloud/utils/class-name";
9
9
  import { loopDirectory as L, getFiles as O } from "./util.js";
package/upload/Upload.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs as C, Fragment as F, jsx as t } from "react/jsx-runtime";
2
2
  import P from "lodash/isFunction";
3
3
  import ne from "lodash/isNumber";
4
4
  import { useContext as S, forwardRef as A, useState as w, useEffect as L, isValidElement as re, useRef as B, useImperativeHandle as le } from "react";
5
- import { a as D, I as se } from "../chunk/BcEZk8pT.js";
5
+ import { a as D, I as se } from "../chunk/C1vY8016.js";
6
6
  import { u as ae } from "../chunk/FgWHhRFz.js";
7
7
  import W from "@unicom-cloud/utils/class-name";
8
8
  import { o as ce } from "../chunk/BKKEev13.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { e as r, e as a } from "../chunk/BcEZk8pT.js";
2
+ import { e as r, e as a } from "../chunk/C1vY8016.js";
3
3
  export {
4
4
  r as ContextHolderElement,
5
5
  a as default
@@ -0,0 +1,5 @@
1
+ import { default as a, default as f } from "@unicom-cloud/utils/emitter";
2
+ export {
3
+ a as default,
4
+ f as emitter
5
+ };
package/utils/index.js CHANGED
@@ -2,7 +2,7 @@ export * from "@unicom-cloud/utils/date";
2
2
  import { default as o } from "@unicom-cloud/utils/case-name";
3
3
  import { default as m } from "@unicom-cloud/utils/class-name";
4
4
  import { newArray as l, pickTriggerPropsFromRest as p } from "./constant.js";
5
- import { e as d } from "../chunk/BcEZk8pT.js";
5
+ import { e as d } from "../chunk/C1vY8016.js";
6
6
  import { default as u, default as c } from "@unicom-cloud/utils/clipboard-copy";
7
7
  import { d as y, f as S, h as R, g as h, e as C, j as b, c as T, i as E, l as N, k as A, n as P, m as D, t as I, b as k, a as M } from "../chunk/DS_deHpN.js";
8
8
  import { c as v, g as B, i as V, a as j, o as w, b as F } from "../chunk/d1c9z8T1.js";
@@ -33,7 +33,7 @@ import { default as ke } from "lodash/upperFirst";
33
33
  import { div as Oe, default as ve, minus as Be, plus as Ve, times as je } from "@unicom-cloud/utils/math";
34
34
  import { m as Fe } from "../chunk/B5RFT17G.js";
35
35
  import { m as We } from "../chunk/DH7HTOV_.js";
36
- import { default as He } from "@unicom-cloud/utils/mitt";
36
+ import { default as He } from "@unicom-cloud/utils/emitter";
37
37
  import { COMPONENT_NAMES as Ue } from "./names.js";
38
38
  import { o as Ye } from "../chunk/BKKEev13.js";
39
39
  import { padEnd as Ke, padStart as Je } from "./pad.js";
@@ -95,6 +95,7 @@ export {
95
95
  fe as debounce,
96
96
  Oe as div,
97
97
  Qa as easing,
98
+ He as emitter,
98
99
  W as fileToURL,
99
100
  H as fillNBSP,
100
101
  oa as findDOMNode_,
@@ -211,7 +212,6 @@ export {
211
212
  Fe as mergedToString,
212
213
  D as methods,
213
214
  Be as minus,
214
- He as mitt,
215
215
  l as newArray,
216
216
  w as off,
217
217
  Ye as omit,
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunk/B8W1N4er.js";
1
+ import { r as e } from "../chunk/CHQ8c547.js";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as I, jsxs as N } from "react/jsx-runtime";
2
2
  import R, { forwardRef as b, useContext as w, useRef as F, createElement as j } from "react";
3
- import { a as z } from "../chunk/BcEZk8pT.js";
3
+ import { a as z } from "../chunk/C1vY8016.js";
4
4
  import { u as D } from "../chunk/FgWHhRFz.js";
5
5
  import E from "../input/InputElement.js";
6
6
  import p from "@unicom-cloud/utils/class-name";
package/version/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const I = "2025-08-28 18:45:52", t = "1756377952626", E = "2.66.5";
1
+ const I = "2025-09-01 13:54:19", t = "1756706059420", E = "2.66.5";
2
2
  export {
3
3
  E as VERSION,
4
4
  I as VERSION_BUILD_DATE,
@@ -4,10 +4,10 @@ import Tt from "lodash/isNumber";
4
4
  import rt, { useRef as R, useState as kt, useMemo as Ft, useEffect as A, useImperativeHandle as Ut } from "react";
5
5
  import { u as Vt } from "../chunk/BJeTDXdz.js";
6
6
  import { u as Dt } from "../chunk/oopARUrq.js";
7
- import { u as Kt } from "../chunk/CylJZkp8.js";
7
+ import { u as Kt } from "../chunk/CAA93JLq.js";
8
8
  import { u as jt } from "../chunk/8w-ItYb1.js";
9
9
  import { u as Bt } from "../chunk/BG6j6Ct7.js";
10
- import { r as Yt } from "../chunk/B8W1N4er.js";
10
+ import { r as Yt } from "../chunk/CHQ8c547.js";
11
11
  import xt from "./Filler.js";
12
12
  import { g as qt } from "../chunk/DKHXj8Kf.js";
13
13
  import { f as Gt } from "../chunk/CXrVhA6-.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as l, useContext as p, useRef as u, useCallback as g, useEffect as d } from "react";
3
- import { a as C } from "../chunk/BcEZk8pT.js";
3
+ import { a as C } from "../chunk/C1vY8016.js";
4
4
  import { useWatermark as h } from "../hooks/useWatermark.js";
5
5
  import { u as x } from "../chunk/FgWHhRFz.js";
6
6
  import k from "@unicom-cloud/utils/class-name";
package/chunk/BDgzrqDN.js DELETED
@@ -1,154 +0,0 @@
1
- import { useRef as f, useEffect as b, useState as L } from "react";
2
- import { u as h } from "./DfChiMIE.js";
3
- import { i as d } from "./Di5KBCVQ.js";
4
- import "./DsaQZE4X.js";
5
- import { isFunction as E } from "@unicom-cloud/utils/is";
6
- import { i as x } from "./CdXR6dj7.js";
7
- import { d as p } from "./CN7NKv_2.js";
8
- function A(e) {
9
- const t = f(e);
10
- return t.current = e, t;
11
- }
12
- function R(e, t) {
13
- if (!d)
14
- return;
15
- if (!e)
16
- return t;
17
- let n;
18
- return E(e) ? n = e() : "current" in e ? n = e.current : n = e, n;
19
- }
20
- const T = (e) => {
21
- x && (E(e) || console.error(
22
- `useUnmount expected parameter is a function, got ${typeof e}`
23
- ));
24
- const t = A(e);
25
- b(
26
- () => () => {
27
- t.current();
28
- },
29
- []
30
- );
31
- }, y = (e) => (n, s, u) => {
32
- const i = f(!1), r = f([]), c = f([]), o = f(void 0);
33
- e(() => {
34
- const l = (Array.isArray(u) ? u : [u]).map((N) => R(N));
35
- if (!i.current) {
36
- i.current = !0, r.current = l, c.current = s, o.current = n();
37
- return;
38
- }
39
- (l.length !== r.current.length || !p(r.current, l) || !p(c.current, s)) && (o.current?.(), r.current = l, c.current = s, o.current = n());
40
- }), T(() => {
41
- o.current?.(), i.current = !1;
42
- });
43
- }, W = y(b), B = (e, {
44
- manual: t,
45
- ready: n = !0,
46
- defaultParams: s = [],
47
- refreshDeps: u = [],
48
- refreshDepsAction: i
49
- }) => {
50
- const r = f(!1);
51
- return r.current = !1, h(() => {
52
- !t && n && (r.current = !0, e.run(...s));
53
- }, [n]), h(() => {
54
- r.current || t || (r.current = !0, i ? i() : e.refresh());
55
- }, [...u]), {
56
- onBefore: () => {
57
- if (!n)
58
- return {
59
- stopNow: !0
60
- };
61
- }
62
- };
63
- };
64
- B.onInit = ({ ready: e = !0, manual: t }) => ({
65
- loading: !t && e
66
- });
67
- function S() {
68
- return d ? document.visibilityState !== "hidden" : !0;
69
- }
70
- const m = /* @__PURE__ */ new Set();
71
- function P(e) {
72
- return m.add(e), function() {
73
- m.has(e) && m.delete(e);
74
- };
75
- }
76
- if (d) {
77
- const e = () => {
78
- S() && m.forEach((t) => t());
79
- };
80
- window.addEventListener("visibilitychange", e, !1);
81
- }
82
- const O = () => d && typeof navigator.onLine < "u" ? navigator.onLine : !0, g = /* @__PURE__ */ new Set();
83
- function V(e) {
84
- return g.add(e), function() {
85
- g.has(e) && g.delete(e);
86
- };
87
- }
88
- if (d) {
89
- const e = () => {
90
- !S() || !O() || g.forEach((t) => t());
91
- };
92
- window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
93
- }
94
- const w = {
95
- top: NaN,
96
- left: NaN,
97
- bottom: NaN,
98
- right: NaN,
99
- height: NaN,
100
- width: NaN
101
- }, v = {
102
- text: "",
103
- ...w
104
- };
105
- function U(e) {
106
- if (!e || e.rangeCount < 1)
107
- return w;
108
- const t = e.getRangeAt(0), { height: n, width: s, top: u, left: i, right: r, bottom: c } = t.getBoundingClientRect();
109
- return {
110
- height: n,
111
- width: s,
112
- top: u,
113
- left: i,
114
- right: r,
115
- bottom: c
116
- };
117
- }
118
- function k(e) {
119
- const [t, n] = L(v), s = f(t), u = f(!1);
120
- return s.current = t, W(
121
- () => {
122
- const i = R(e, document);
123
- if (!i)
124
- return;
125
- const r = () => {
126
- let o = null, a = "", l = w;
127
- window.getSelection && (o = window.getSelection(), a = o ? o.toString() : "", a && u.current && (l = U(o), n({ ...t, text: a, ...l })));
128
- }, c = (o) => {
129
- if (o.button === 2 || !window.getSelection)
130
- return;
131
- s.current.text && n({ ...v }), u.current = !1;
132
- const a = window.getSelection();
133
- a && (a.removeAllRanges(), u.current = i.contains(o.target));
134
- };
135
- return i.addEventListener("mouseup", r), document.addEventListener("mousedown", c), () => {
136
- i.removeEventListener("mouseup", r), document.removeEventListener("mousedown", c);
137
- };
138
- },
139
- [],
140
- e
141
- ), t;
142
- }
143
- export {
144
- k as a,
145
- T as b,
146
- W as c,
147
- V as d,
148
- B as e,
149
- y as f,
150
- R as g,
151
- S as i,
152
- P as s,
153
- A as u
154
- };
package/chunk/COc48wzV.js DELETED
@@ -1,64 +0,0 @@
1
- import { useState as i, useRef as l, useEffect as f } from "react";
2
- const a = {}, y = (t, s = {}) => {
3
- const n = document.querySelector(`script[src="${t}"]`);
4
- if (!n) {
5
- const e = document.createElement("script");
6
- return e.src = t, Object.keys(s).forEach((r) => {
7
- e[r] = s[r];
8
- }), e.setAttribute("data-status", "loading"), document.body.appendChild(e), {
9
- ref: e,
10
- status: "loading"
11
- };
12
- }
13
- return {
14
- ref: n,
15
- status: n.getAttribute("data-status") || "ready"
16
- };
17
- }, E = (t, s = {}) => {
18
- const n = document.querySelector(`link[href="${t}"]`);
19
- if (!n) {
20
- const e = document.createElement("link");
21
- return e.rel = "stylesheet", e.href = t, Object.keys(s).forEach((u) => {
22
- e[u] = s[u];
23
- }), "hideFocus" in e && e.relList && (e.rel = "preload", e.as = "style"), e.setAttribute("data-status", "loading"), document.head.appendChild(e), {
24
- ref: e,
25
- status: "loading"
26
- };
27
- }
28
- return {
29
- ref: n,
30
- status: n.getAttribute("data-status") || "ready"
31
- };
32
- }, v = (t, s) => {
33
- const [n, e] = i(t ? "loading" : "unset"), r = l(void 0);
34
- return f(() => {
35
- if (!t) {
36
- e("unset");
37
- return;
38
- }
39
- const u = t.replace(/[|#].*$/, "");
40
- if (s?.type === "css" || !s?.type && /(^css!|\.css$)/.test(u)) {
41
- const c = E(t, s?.css);
42
- r.current = c.ref, e(c.status);
43
- } else if (s?.type === "js" || !s?.type && /(^js!|\.js$)/.test(u)) {
44
- const c = y(t, s?.js);
45
- r.current = c.ref, e(c.status);
46
- } else
47
- console.error(
48
- "Cannot infer the type of external resource, and please provide a type ('js' | 'css'). "
49
- );
50
- if (!r.current)
51
- return;
52
- a[t] === void 0 ? a[t] = 1 : a[t] += 1;
53
- const o = (c) => {
54
- const d = c.type === "load" ? "ready" : "error";
55
- r.current?.setAttribute("data-status", d), e(d);
56
- };
57
- return r.current.addEventListener("load", o), r.current.addEventListener("error", o), () => {
58
- r.current?.removeEventListener("load", o), r.current?.removeEventListener("error", o), a[t] -= 1, a[t] === 0 && !s?.keepWhenUnused && r.current?.remove(), r.current = void 0;
59
- };
60
- }, [t]), n;
61
- };
62
- export {
63
- v as u
64
- };