@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
@@ -3,7 +3,7 @@ import { RICH_TEXT_CLASS_NAME_PREFIX as L } from "../rich-text/constant.js";
3
3
  import lt from "@unicom-cloud/utils/diff";
4
4
  import W from "lodash/cloneDeep";
5
5
  import X from "lodash/isEqual";
6
- import ue from "@unicom-cloud/utils/mitt";
6
+ import ue from "@unicom-cloud/utils/emitter";
7
7
  import { isMacOS as fe } from "@unicom-cloud/utils/constant/platform";
8
8
  var kt;
9
9
  ((r) => {
@@ -1357,10 +1357,7 @@ Ee.forEach((r) => {
1357
1357
  });
1358
1358
  });
1359
1359
  });
1360
- class m {
1361
- constructor() {
1362
- this.emitter = ue(), this.domListeners = {}, this.on("error", Nt.error);
1363
- }
1360
+ class m extends ue {
1364
1361
  static {
1365
1362
  this.events = {
1366
1363
  EDITOR_CHANGE: "editor-change",
@@ -1385,20 +1382,20 @@ class m {
1385
1382
  USER: "user"
1386
1383
  };
1387
1384
  }
1385
+ constructor() {
1386
+ super(), this.domListeners = {}, this.on("error", Nt.error);
1387
+ }
1388
1388
  on(...t) {
1389
- return this.emitter.on(...t);
1389
+ return super.on(...t);
1390
1390
  }
1391
1391
  once(...t) {
1392
- return this.emitter.once(...t);
1392
+ return super.once(...t);
1393
1393
  }
1394
1394
  emit(...t) {
1395
- return Nt.log.call(Nt, ...t), this.emitter.emit(...t);
1395
+ return Nt.log.call(Nt, ...t), super.emit(...t);
1396
1396
  }
1397
1397
  off(...t) {
1398
- return this.emitter.off(...t);
1399
- }
1400
- offAll(...t) {
1401
- return this.emitter.offAll(...t);
1398
+ return super.off(...t);
1402
1399
  }
1403
1400
  handleDOM(t, ...e) {
1404
1401
  (this.domListeners[t.type] || []).forEach(({ node: s, handler: i }) => {
@@ -2346,14 +2343,14 @@ class u {
2346
2343
  return this.imports[t] == null && tt.error(`Cannot import ${t}. Are you sure it was registered?`), this.imports[t];
2347
2344
  }
2348
2345
  static register(...t) {
2349
- if (typeof t[0] != "string") {
2350
- const e = t[0], s = !!t[1], i = "attrName" in e ? e.attrName : e.blotName;
2351
- typeof i == "string" ? this.register(`formats/${i}`, e, s) : Object.keys(e).forEach((n) => {
2352
- this.register(n, e[n], s);
2353
- });
2354
- } else {
2346
+ if (typeof t[0] == "string") {
2355
2347
  const e = t[0], s = t[1], i = !!t[2];
2356
2348
  this.imports[e] != null && !i && tt.warn(`Overwriting ${e} with`, s), this.imports[e] = s, (e.startsWith("blots/") || e.startsWith("formats/")) && s && typeof s != "boolean" && s.blotName !== "abstract" && ht.register(s), typeof s.register == "function" && s.register(ht);
2349
+ } else {
2350
+ const e = t[0], s = !!t[1], i = "attrName" in e ? e.attrName : e.blotName;
2351
+ typeof i == "string" ? this.register(`formats/${i}`, e, s) : Object.entries(e).forEach(([n, o], l, a) => {
2352
+ this.register(n, o, s);
2353
+ });
2357
2354
  }
2358
2355
  }
2359
2356
  constructor(t, e = {}) {
@@ -2403,12 +2400,12 @@ class u {
2403
2400
  }
2404
2401
  this.history.clear(), this.options.placeholder && this.root.setAttribute("data-placeholder", this.options.placeholder), this.options.readOnly && this.disable(), this.allowReadOnlyEdits = !1;
2405
2402
  }
2406
- addContainer(t, e = null) {
2403
+ addContainer(t, e = null, s) {
2407
2404
  if (typeof t == "string") {
2408
- const s = t;
2409
- t = document.createElement("div"), t.classList.add(s);
2405
+ const i = t;
2406
+ t = document.createElement("div"), t.classList.add(i);
2410
2407
  }
2411
- return this.container.insertBefore(t, e), t;
2408
+ return s instanceof HTMLElement ? s.appendChild(t) : this.container.insertBefore(t, e), t;
2412
2409
  }
2413
2410
  blur() {
2414
2411
  this.selection.setRange(null);
@@ -2443,21 +2440,22 @@ class u {
2443
2440
  return S.call(
2444
2441
  this,
2445
2442
  () => {
2446
- const i = this.getSelection(!0);
2447
- let n = new f();
2448
- if (i == null) return n;
2443
+ const n = this.getSelection(!0);
2444
+ let o = new f();
2445
+ if (n == null)
2446
+ return o;
2449
2447
  if (this.scroll.query(t, p.BLOCK))
2450
- n = this.editor.formatLine(i.index, i.length, {
2448
+ o = this.editor.formatLine(n.index, n.length, {
2451
2449
  [t]: e
2452
2450
  });
2453
2451
  else {
2454
- if (i.length === 0)
2455
- return this.selection.format(t, e), n;
2456
- n = this.editor.formatText(i.index, i.length, {
2452
+ if (n.length === 0)
2453
+ return this.selection.format(t, e), o;
2454
+ o = this.editor.formatText(n.index, n.length, {
2457
2455
  [t]: e
2458
2456
  });
2459
2457
  }
2460
- return this.setSelection(i, m.sources.SILENT), n;
2458
+ return this.setSelection(n, m.sources.SILENT), o;
2461
2459
  },
2462
2460
  s
2463
2461
  );
@@ -3,9 +3,9 @@ import Ke from "@unicom-cloud/icons/IconUiMenuFold";
3
3
  import De from "@unicom-cloud/icons/IconUiMenuUnfold";
4
4
  import Re from "lodash/isPlainObject";
5
5
  import H, { useContext as A, useState as me, forwardRef as fe, useEffect as oe, useRef as ne, useMemo as _e } from "react";
6
- import { a as he } from "./BcEZk8pT.js";
6
+ import { a as he } from "./C1vY8016.js";
7
7
  import { u as Ae } from "./BJeTDXdz.js";
8
- import { u as te } from "./BGJspFG9.js";
8
+ import { u as te } from "./C5CbL5ku.js";
9
9
  import { u as Te } from "./Bvxzb1wd.js";
10
10
  import { u as Ue } from "./FgWHhRFz.js";
11
11
  import { u as Z } from "./2vdCeheu.js";
@@ -15,7 +15,7 @@ import { o as Y } from "./BKKEev13.js";
15
15
  import z from "../menu/context.js";
16
16
  import ze from "../menu/Item.js";
17
17
  import Be from "../menu/ItemGroup.js";
18
- import { r as He } from "./B8W1N4er.js";
18
+ import { r as He } from "./CHQ8c547.js";
19
19
  import { getStyle as ue } from "../utils/style.js";
20
20
  import ge from "@unicom-cloud/icons/IconUiDown";
21
21
  import { u as Ve } from "./BG6j6Ct7.js";