@unicom-cloud/ui 0.8.111 → 0.8.113

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 (431) 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 +3 -47
  17. package/Countdown.js +9 -43
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Details.js +7 -43
  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 +8 -44
  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 +9 -44
  35. package/List.js +1 -1
  36. package/Loading.js +7 -43
  37. package/Marquee.js +10 -33
  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 +6 -42
  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 +7 -44
  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 +12 -13
  55. package/Segmented.js +8 -43
  56. package/Skeleton.js +1 -1
  57. package/Slider.js +1 -1
  58. package/Space.js +8 -44
  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 +10 -46
  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 +2 -2
  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 → 3t4FwEoB.js} +1 -1
  100. package/chunk/{Lyh0cz3R.js → BHAu6wbC.js} +1 -1
  101. package/chunk/{CgN4U7Ou.js → Bcl7dWlJ.js} +2 -2
  102. package/chunk/Bl3hZtxi.js +51 -0
  103. package/chunk/{n1tirBXA.js → Bzx5BueA.js} +4 -4
  104. package/chunk/CAA93JLq.js +6 -0
  105. package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
  106. package/chunk/CVMFAeSw.js +39 -0
  107. package/chunk/{BcEZk8pT.js → CYDaUML7.js} +73 -104
  108. package/chunk/{Dbw0YUY1.js → CbXCgtzv.js} +48 -82
  109. package/chunk/{BDgzrqDN.js → ClNkxEcR.js} +5 -5
  110. package/chunk/{BlflTd2i.js → CwLSam2p.js} +433 -470
  111. package/chunk/Cy26_CKq.js +33 -0
  112. package/chunk/D0dVE1v1.js +1839 -0
  113. package/chunk/{CFyN9Eio.js → DA5AMZwY.js} +4 -4
  114. package/chunk/{DSqW_efI.js → DB0hUIM1.js} +152 -156
  115. package/chunk/{BUNoUPLs.js → De8RLlOK.js} +1 -1
  116. package/chunk/{qsVvkBLU.js → DrYaod6k.js} +1 -1
  117. package/chunk/{BeHcDey_.js → DzlfiVe2.js} +1 -1
  118. package/chunk/gJsdBcpG.js +10 -0
  119. package/chunk/{BnUWOu3_.js → yWKJUe_w.js} +3 -3
  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 +22 -66
  134. package/countdown/index.js +34 -68
  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 +39 -75
  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 +30 -64
  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 +81 -81
  154. package/hooks/useId.js +1 -1
  155. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  156. package/hooks/useResizeObserver.js +15 -2
  157. package/hooks/useStateWithPromise.js +1 -1
  158. package/hooks/useWindowSize.js +1 -1
  159. package/icon/index.js +1 -1
  160. package/icon-hover/index.js +1 -1
  161. package/icons/file.js +1 -1
  162. package/image/Image.js +2 -2
  163. package/image/ImagePreview.js +10 -45
  164. package/image/ImagePreviewArrow.js +1 -1
  165. package/image/ImagePreviewGroup.js +1 -1
  166. package/image/index.js +1 -1
  167. package/index.js +215 -215
  168. package/input/Button.js +1 -1
  169. package/input/Group.js +1 -1
  170. package/input/Input.js +2 -2
  171. package/input/InputElement.js +2 -2
  172. package/input/Password.js +1 -1
  173. package/input/Search.js +1 -1
  174. package/input/Textarea.js +2 -2
  175. package/input-number/index.js +1 -1
  176. package/input-number/useSelectionRange.js +1 -1
  177. package/input-tag/InputTag.js +1 -1
  178. package/layout/Content.js +1 -1
  179. package/layout/Footer.js +1 -1
  180. package/layout/Header.js +1 -1
  181. package/layout/Sider.js +1 -1
  182. package/layout/index.js +1 -1
  183. package/link/index.js +1 -1
  184. package/liquid-fill/index.js +49 -84
  185. package/list/Item.js +1 -1
  186. package/list/Meta.js +1 -1
  187. package/list/index.js +1 -1
  188. package/loading/index.js +19 -55
  189. package/marquee/index.js +58 -81
  190. package/marquee-/index.js +60 -83
  191. package/mentions/index.js +1 -1
  192. package/menu/Menu.js +3 -3
  193. package/menu/OverflowWrap.js +2 -2
  194. package/menu/index.js +2 -2
  195. package/message/index.js +1 -1
  196. package/message/useMessage.js +1 -1
  197. package/modal/Confirm.js +2 -2
  198. package/modal/Modal.js +2 -2
  199. package/modal/index.js +2 -2
  200. package/notice/index.js +6 -42
  201. package/notification/index.js +1 -1
  202. package/notification/useNotification.js +1 -1
  203. package/overflow-ellipsis/OverflowItem.js +2 -2
  204. package/overflow-ellipsis/index.js +2 -2
  205. package/package.json +1 -1
  206. package/page-header/index.js +2 -2
  207. package/pagination/PageItem.js +1 -1
  208. package/pagination/PageJumper.js +1 -1
  209. package/pagination/PageOption.js +1 -1
  210. package/pagination/Pagination.js +1 -1
  211. package/picker/Input.js +1 -1
  212. package/picker/InputRange.js +1 -1
  213. package/popconfirm/index.js +1 -1
  214. package/popover/index.js +1 -1
  215. package/progress/CircleProgress.js +1 -1
  216. package/progress/index.js +1 -1
  217. package/qr-code/index.js +19 -56
  218. package/radio/Group.js +2 -2
  219. package/radio/GroupBlock.js +2 -2
  220. package/radio/Radio.js +2 -2
  221. package/radio/index.js +2 -2
  222. package/rate/index.js +1 -1
  223. package/resize-box/ResizeTrigger.js +2 -2
  224. package/resize-box/Split.js +2 -2
  225. package/resize-box/SplitGroup.js +1 -1
  226. package/resize-box/index.js +1 -1
  227. package/result/index.js +1 -1
  228. package/rich-text/index.js +6333 -78
  229. package/rich-text/lib/diff/index.d.ts +21 -0
  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 +111 -146
  234. package/select/Option.js +44 -41
  235. package/select/Select.js +11 -13
  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 +16 -52
  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 +18 -7
  251. package/table/index.js +77 -120
  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 +71 -107
  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/utils/isBrowser.d.ts +1 -1
  276. package/types/common/hooks/useResizeObserver.d.ts +1 -5
  277. package/types/common/hooks/useStateWithPromise.d.ts +1 -1
  278. package/types/common/hooks/useWindowSize.d.ts +1 -1
  279. package/types/common/utils/dom.d.ts +12 -0
  280. package/types/common/utils/emitter.d.ts +1 -0
  281. package/types/pc/carousel/interface.d.ts +2 -2
  282. package/types/pc/color-picker/Panel.d.ts +1 -1
  283. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  284. package/types/pc/index.d.ts +2 -2
  285. package/types/pc/list/interface.d.ts +2 -2
  286. package/types/pc/rich-text/index.d.ts +7 -4
  287. package/types/pc/rich-text/interface.d.ts +3 -2
  288. package/types/pc/rich-text/{blots → lib/blots}/scroll.d.ts +2 -8
  289. package/types/pc/rich-text/{core → lib/core}/editor.d.ts +1 -1
  290. package/types/pc/rich-text/{core → lib/core}/emitter.d.ts +2 -3
  291. package/types/pc/rich-text/{core → lib/core}/rich.d.ts +14 -51
  292. package/types/pc/rich-text/{core → lib/core}/selection.d.ts +2 -8
  293. package/types/pc/rich-text/{core → lib/core}/theme.d.ts +3 -0
  294. package/types/pc/rich-text/{core.d.ts → lib/core.d.ts} +1 -1
  295. package/types/pc/rich-text/lib/delta/AttributeMap.d.ts +15 -0
  296. package/types/pc/rich-text/lib/delta/Op.d.ts +13 -0
  297. package/types/pc/rich-text/lib/delta/OpIterator.d.ts +14 -0
  298. package/types/pc/rich-text/lib/delta/index.d.ts +53 -0
  299. package/types/pc/rich-text/lib/diff/index.d.ts +40 -0
  300. package/types/pc/rich-text/{formats → lib/formats}/bold.d.ts +1 -1
  301. package/types/pc/rich-text/{formats → lib/formats}/font.d.ts +1 -1
  302. package/types/pc/rich-text/lib/formats/hr.d.ts +5 -0
  303. package/types/pc/rich-text/lib/formats/image-resize/index.d.ts +27 -0
  304. package/types/pc/rich-text/lib/formats/image-resize/modules/BaseModule.d.ts +10 -0
  305. package/types/pc/rich-text/lib/formats/image-resize/modules/DisplaySize.d.ts +5 -0
  306. package/types/pc/rich-text/lib/formats/image-resize/modules/Resize.d.ts +13 -0
  307. package/types/pc/rich-text/lib/formats/image-resize/options.d.ts +7 -0
  308. package/types/pc/rich-text/lib/formats/liOl.d.ts +10 -0
  309. package/types/pc/rich-text/lib/formats/liUl.d.ts +10 -0
  310. package/types/pc/rich-text/lib/formats/lineHeight.d.ts +3 -0
  311. package/types/pc/rich-text/{formats → lib/formats}/list.d.ts +1 -0
  312. package/types/pc/rich-text/{formats → lib/formats}/table.d.ts +3 -3
  313. package/types/pc/rich-text/{modules → lib/modules}/clipboard.d.ts +2 -2
  314. package/types/pc/rich-text/{modules → lib/modules}/history.d.ts +1 -1
  315. package/types/pc/rich-text/{modules → lib/modules}/keyboard.d.ts +1 -1
  316. package/types/pc/rich-text/{modules → lib/modules}/syntax.d.ts +2 -2
  317. package/types/pc/rich-text/{modules → lib/modules}/tableEmbed.d.ts +3 -3
  318. package/types/pc/rich-text/{modules → lib/modules}/toolbar.d.ts +1 -1
  319. package/types/pc/rich-text/{parchment → lib/parchment}/attributor/attributor.d.ts +3 -3
  320. package/types/pc/rich-text/{parchment → lib/parchment}/attributor/style.d.ts +2 -2
  321. package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/parent.d.ts +2 -4
  322. package/types/pc/rich-text/{themes → lib/themes}/base.d.ts +3 -0
  323. package/types/pc/rich-text/{themes/snow.d.ts → lib/themes/pqb.d.ts} +2 -2
  324. package/types/pc/rich-text/{ui → lib/ui}/icons.d.ts +5 -1
  325. package/types/pc/rich-text/{ui → lib/ui}/picker.d.ts +1 -0
  326. package/types/pc/rich-text/{ui → lib/ui}/tooltip.d.ts +2 -0
  327. package/types/pc/tabs/hook/useDomSize.d.ts +2 -2
  328. package/types/pc/tabs/hook/useHeaderScroll.d.ts +2 -2
  329. package/types/pc/tree-select/hook/useStateValue.d.ts +2 -2
  330. package/types/pc/utils/date.d.ts +1 -0
  331. package/types/pc/utils/emitter.d.ts +1 -0
  332. package/types/pc/utils/index.d.ts +2 -2
  333. package/typography/Base.js +2 -2
  334. package/typography/Ellipsis.js +70 -114
  335. package/typography/Operations.js +29 -74
  336. package/typography/Paragraph.js +1 -1
  337. package/typography/Typography.js +1 -1
  338. package/typography/useEllipsis.js +1 -1
  339. package/upload/TriggerNode.js +1 -1
  340. package/upload/Upload.js +1 -1
  341. package/utils/contextHolder.js +1 -1
  342. package/utils/date.js +1 -0
  343. package/utils/emitter.js +5 -0
  344. package/utils/index.js +70 -70
  345. package/utils/resizeObserver.js +1 -1
  346. package/verification-code/VerificationCode.js +1 -1
  347. package/version/index.js +1 -1
  348. package/virtual-list/VirtualList.js +218 -217
  349. package/watermark/Watermark.js +1 -1
  350. package/chunk/BDMqvmVH.js +0 -4239
  351. package/chunk/BG6j6Ct7.js +0 -30
  352. package/chunk/BGJspFG9.js +0 -56
  353. package/chunk/B_c0gPsX.js +0 -83
  354. package/chunk/COsRZOz1.js +0 -1813
  355. package/chunk/CylJZkp8.js +0 -6
  356. package/chunk/Di5KBCVQ.js +0 -4
  357. package/chunk/cW_5U6dL.js +0 -28
  358. package/rich-text/core.js +0 -11
  359. package/rich-text/rich.js +0 -1877
  360. package/types/common/utils/index.d.ts +0 -47
  361. package/types/common/utils/keyboardCode.d.ts +0 -4
  362. package/types/common/utils/math.d.ts +0 -1
  363. package/types/common/utils/mitt.d.ts +0 -1
  364. package/types/common/utils/reactTransitionGroup.d.ts +0 -1
  365. package/types/common/utils/uuid.d.ts +0 -1
  366. package/types/common/utils/validate.d.ts +0 -1
  367. package/types/pc/rich-text/delta/AttributeMap.d.ts +0 -10
  368. package/types/pc/rich-text/delta/Op.d.ts +0 -11
  369. package/types/pc/rich-text/delta/OpIterator.d.ts +0 -13
  370. package/types/pc/rich-text/delta/index.d.ts +0 -45
  371. package/types/pc/rich-text/themes/bubble.d.ts +0 -18
  372. package/types/pc/utils/mitt.d.ts +0 -1
  373. package/utils/mitt.js +0 -5
  374. package/types/common/hooks/src/utils/{index.d.ts → is.d.ts} +0 -0
  375. package/types/pc/rich-text/{blots → lib/blots}/block.d.ts +0 -0
  376. package/types/pc/rich-text/{blots → lib/blots}/break.d.ts +0 -0
  377. package/types/pc/rich-text/{blots → lib/blots}/container.d.ts +0 -0
  378. package/types/pc/rich-text/{blots → lib/blots}/cursor.d.ts +0 -0
  379. package/types/pc/rich-text/{blots → lib/blots}/embed.d.ts +0 -0
  380. package/types/pc/rich-text/{blots → lib/blots}/inline.d.ts +0 -0
  381. package/types/pc/rich-text/{blots → lib/blots}/text.d.ts +0 -0
  382. package/types/pc/rich-text/{core → lib/core}/composition.d.ts +0 -0
  383. package/types/pc/rich-text/{core → lib/core}/instances.d.ts +0 -0
  384. package/types/pc/rich-text/{core → lib/core}/logger.d.ts +0 -0
  385. package/types/pc/rich-text/{core → lib/core}/module.d.ts +0 -0
  386. package/types/pc/rich-text/{core → lib/core}/utils/createRegistryWithFormats.d.ts +0 -0
  387. package/types/pc/rich-text/{core → lib/core}/utils/scrollRectIntoView.d.ts +0 -0
  388. package/types/pc/rich-text/{formats → lib/formats}/align.d.ts +0 -0
  389. package/types/pc/rich-text/{formats → lib/formats}/background.d.ts +0 -0
  390. package/types/pc/rich-text/{formats → lib/formats}/blockquote.d.ts +0 -0
  391. package/types/pc/rich-text/{formats → lib/formats}/code.d.ts +0 -0
  392. package/types/pc/rich-text/{formats → lib/formats}/color.d.ts +0 -0
  393. package/types/pc/rich-text/{formats → lib/formats}/direction.d.ts +0 -0
  394. package/types/pc/rich-text/{formats → lib/formats}/formula.d.ts +0 -0
  395. package/types/pc/rich-text/{formats → lib/formats}/header.d.ts +0 -0
  396. package/types/pc/rich-text/{formats → lib/formats}/image.d.ts +0 -0
  397. package/types/pc/rich-text/{formats → lib/formats}/indent.d.ts +0 -0
  398. package/types/pc/rich-text/{formats → lib/formats}/italic.d.ts +0 -0
  399. package/types/pc/rich-text/{formats → lib/formats}/link.d.ts +0 -0
  400. package/types/pc/rich-text/{formats → lib/formats}/script.d.ts +0 -0
  401. package/types/pc/rich-text/{formats → lib/formats}/size.d.ts +0 -0
  402. package/types/pc/rich-text/{formats → lib/formats}/strike.d.ts +0 -0
  403. package/types/pc/rich-text/{formats → lib/formats}/underline.d.ts +0 -0
  404. package/types/pc/rich-text/{formats → lib/formats}/video.d.ts +0 -0
  405. package/types/pc/rich-text/{rich.d.ts → lib/index.d.ts} +0 -0
  406. package/types/pc/rich-text/{modules → lib/modules}/input.d.ts +0 -0
  407. package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/index.d.ts +0 -0
  408. package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -0
  409. package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/msWord.d.ts +0 -0
  410. package/types/pc/rich-text/{modules → lib/modules}/table.d.ts +0 -0
  411. package/types/pc/rich-text/{modules → lib/modules}/uiNode.d.ts +0 -0
  412. package/types/pc/rich-text/{modules → lib/modules}/uploader.d.ts +0 -0
  413. package/types/pc/rich-text/{parchment → lib/parchment}/attributor/class.d.ts +0 -0
  414. package/types/pc/rich-text/{parchment → lib/parchment}/attributor/store.d.ts +0 -0
  415. package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/blot.d.ts +0 -0
  416. package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/container.d.ts +0 -0
  417. package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/leaf.d.ts +0 -0
  418. package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/shadow.d.ts +0 -0
  419. package/types/pc/rich-text/{parchment → lib/parchment}/blot/block.d.ts +0 -0
  420. package/types/pc/rich-text/{parchment → lib/parchment}/blot/embed.d.ts +0 -0
  421. package/types/pc/rich-text/{parchment → lib/parchment}/blot/inline.d.ts +0 -0
  422. package/types/pc/rich-text/{parchment → lib/parchment}/blot/scroll.d.ts +0 -0
  423. package/types/pc/rich-text/{parchment → lib/parchment}/blot/text.d.ts +0 -0
  424. package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-list.d.ts +0 -0
  425. package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-node.d.ts +0 -0
  426. package/types/pc/rich-text/{parchment → lib/parchment}/error.d.ts +0 -0
  427. package/types/pc/rich-text/{parchment → lib/parchment}/index.d.ts +1 -1
  428. /package/types/pc/rich-text/{parchment → lib/parchment}/registry.d.ts +0 -0
  429. /package/types/pc/rich-text/{parchment → lib/parchment}/scope.d.ts +0 -0
  430. /package/types/pc/rich-text/{ui → lib/ui}/color-picker.d.ts +0 -0
  431. /package/types/pc/rich-text/{ui → lib/ui}/icon-picker.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
- import type { EmitterSource } from './core/emitter';
3
- import Delta from './delta';
2
+ import type { EmitterSource } from './lib/core';
3
+ import type Delta from './lib/delta';
4
4
  /**
5
5
  * @title RichText
6
6
  */
@@ -10,6 +10,7 @@ export interface RichTextProps {
10
10
  readOnly?: boolean;
11
11
  defaultValue?: object | string;
12
12
  value?: object | string;
13
+ options?: object;
13
14
  onChange?: (value: Delta, delta: Delta, preValue: Delta, source: EmitterSource) => void;
14
15
  onTextChange?: (delta: Delta, preValue: Delta, source: EmitterSource) => void;
15
16
  onSelectionChange?: (...args: any[]) => void;
@@ -31,16 +31,10 @@ declare class Scroll extends ScrollBlot {
31
31
  leaf(index: number): [LeafBlot | null, number];
32
32
  line(index: number): [Block | BlockEmbed | null, number];
33
33
  lines(index?: number, length?: number): (Block | BlockEmbed)[];
34
- optimize(context?: {
35
- [key: string]: any;
36
- }): void;
37
- optimize(mutations?: MutationRecord[], context?: {
38
- [key: string]: any;
39
- }): void;
34
+ optimize(mutations?: never[], context?: {}): void;
40
35
  path(index: number): [Blot, number][];
41
36
  remove(): void;
42
- update(source?: EmitterSource): void;
43
- update(mutations?: MutationRecord[]): void;
37
+ update(mutations?: MutationRecord[] | EmitterSource): void;
44
38
  updateEmbedAt(index: number, key: string, change: unknown): void;
45
39
  protected handleDragStart(event: DragEvent): void;
46
40
  private deltaToRenderBlocks;
@@ -1,5 +1,5 @@
1
1
  import type Scroll from '../blots/scroll.js';
2
- import Delta from '../delta';
2
+ import Delta from '../delta/index.js';
3
3
  import { Range } from './selection.js';
4
4
  type SelectionInfo = {
5
5
  newRange: Range;
@@ -1,4 +1,5 @@
1
- declare class Emitter {
1
+ import EmitterBase from '@unicom-cloud/utils/emitter';
2
+ declare class Emitter extends EmitterBase {
2
3
  static events: {
3
4
  readonly EDITOR_CHANGE: "editor-change";
4
5
  readonly SCROLL_BEFORE_UPDATE: "scroll-before-update";
@@ -24,12 +25,10 @@ declare class Emitter {
24
25
  handler: Function;
25
26
  }[]>;
26
27
  constructor();
27
- private emitter;
28
28
  on(...args: any[]): void;
29
29
  once(...args: any[]): void;
30
30
  emit(...args: unknown[]): boolean;
31
31
  off(...args: any[]): void;
32
- offAll(...args: any[]): void;
33
32
  handleDOM(event: Event, ...args: unknown[]): void;
34
33
  listenDOM(eventName: string, node: Node, handler: EventListener): void;
35
34
  }
@@ -1,7 +1,7 @@
1
1
  import type Block from '../blots/block.js';
2
2
  import type { BlockEmbed } from '../blots/block.js';
3
3
  import type Scroll from '../blots/scroll.js';
4
- import type { Op } from '../delta/index.js';
4
+ import type { OpProps } from '../delta/index.js';
5
5
  import Delta from '../delta/index.js';
6
6
  import type Clipboard from '../modules/clipboard.js';
7
7
  import type History from '../modules/history.js';
@@ -95,10 +95,6 @@ declare class Rich {
95
95
  static imports: Record<string, unknown>;
96
96
  static debug(limit: DebugLevel | boolean): void;
97
97
  static find(node: Node, bubble?: boolean): Parchment.Blot | Rich | null;
98
- static import(name: 'core/module'): typeof Module;
99
- static import(name: `themes/${string}`): typeof Theme;
100
- static import(name: '../parchment'): typeof Parchment;
101
- static import(name: 'delta'): typeof Delta;
102
98
  static import(name: string): unknown;
103
99
  static register(targets: Record<string, Parchment.RegistryDefinition | Record<string, unknown> | Theme | Module | Function>, overwrite?: boolean): void;
104
100
  static register(target: Parchment.RegistryDefinition, overwrite?: boolean): void;
@@ -118,11 +114,9 @@ declare class Rich {
118
114
  uploader: Uploader;
119
115
  options: ExpandedRichOptions;
120
116
  constructor(container: HTMLElement | string, options?: RichOptions);
121
- addContainer(container: string, refNode?: Node | null): HTMLDivElement;
122
- addContainer(container: HTMLElement, refNode?: Node | null): HTMLElement;
117
+ addContainer(container: string | HTMLElement, refNode?: Node | null, parentElement?: HTMLElement): HTMLDivElement | HTMLElement;
123
118
  blur(): void;
124
- deleteText(range: Range, source?: EmitterSource): Delta;
125
- deleteText(index: number, length: number, source?: EmitterSource): Delta;
119
+ deleteText(index: number | Range, length?: number | EmitterSource, source?: EmitterSource): Delta;
126
120
  disable(): void;
127
121
  editReadOnly<T>(modifier: () => T): T;
128
122
  enable(enabled?: boolean): void;
@@ -130,11 +124,8 @@ declare class Rich {
130
124
  preventScroll?: boolean;
131
125
  }): void;
132
126
  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;
127
+ formatLine(index: number, length: number, name: string | Record<string, unknown>, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
128
+ formatText(index: number | Range, length: number | string, name: string | unknown, value?: unknown | EmitterSource, source?: EmitterSource): Delta;
138
129
  getBounds(index: number | Range, length?: number): Bounds | null;
139
130
  getContents(index?: number, length?: number): Delta;
140
131
  getFormat(index?: number, length?: number): {
@@ -147,36 +138,17 @@ declare class Rich {
147
138
  getLength(): number;
148
139
  getLeaf(index: number): [Parchment.LeafBlot | null, number];
149
140
  getLine(index: number): [Block | BlockEmbed | null, number];
150
- getLines(range: Range): (Block | BlockEmbed)[];
151
- getLines(index?: number, length?: number): (Block | BlockEmbed)[];
141
+ getLines(index?: Range | number, length?: number): (Block | BlockEmbed)[];
152
142
  getModule(name: string): unknown;
153
- getSelection(focus: true): Range;
154
143
  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;
144
+ getSemanticHTML(index?: Range | number, length?: number): string;
145
+ getText(index?: Range | number, length?: number): string;
159
146
  hasFocus(): boolean;
160
147
  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;
148
+ insertText(index: number, text: string, name?: string | Record<string, unknown> | EmitterSource, value?: unknown, source?: EmitterSource): Delta;
164
149
  isEnabled(): boolean;
165
150
  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;
151
+ on(...args: Parameters<(typeof Emitter)['prototype']['on']>): Emitter;
180
152
  once(...args: Parameters<(typeof Emitter)['prototype']['once']>): void;
181
153
  removeFormat(index: number, length: number, source?: EmitterSource): Delta;
182
154
  scrollRectIntoView(rect: Rect, options?: ScrollRectIntoViewOptions): void;
@@ -189,14 +161,11 @@ declare class Rich {
189
161
  * If the selection is already visible, no scrolling will occur.
190
162
  */
191
163
  scrollSelectionIntoView(options?: ScrollRectIntoViewOptions): void;
192
- 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;
164
+ setContents(delta: Delta | OpProps[], source?: EmitterSource): Delta;
165
+ setSelection(index: Range | null | number, length?: EmitterSource | number, source?: EmitterSource): void;
197
166
  setText(text: string, source?: EmitterSource): Delta;
198
167
  update(source?: EmitterSource): void;
199
- updateContents(delta: Delta | Op[], source?: EmitterSource): Delta;
168
+ updateContents(delta: Delta | OpProps[], source?: EmitterSource): Delta;
200
169
  }
201
170
  declare function expandConfig(containerOrSelector: HTMLElement | string, options: RichOptions): ExpandedRichOptions;
202
171
  type NormalizedIndexLength = [
@@ -205,13 +174,7 @@ type NormalizedIndexLength = [
205
174
  Record<string, unknown>,
206
175
  EmitterSource
207
176
  ];
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;
177
+ 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
178
  export { Parchment, Range };
216
179
  export type { Bounds, DebugLevel, EmitterSource };
217
180
  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;
@@ -66,6 +59,7 @@ declare class Selection {
66
59
  native: AbstractRange;
67
60
  } | null;
68
61
  rangeToNative(range: Range): [Node | null, number, Node | null, number];
62
+ setSelectionByNode(node: any): void;
69
63
  setNativeRange(startNode: Node | null, startOffset?: number, endNode?: Node | null, endOffset?: number | undefined, force?: boolean): void;
70
64
  setRange(range: Range | null, force: boolean, source?: EmitterSource): void;
71
65
  setRange(range: Range | null, source?: EmitterSource): void;
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import type { Bounds, DebugLevel, EmitterSource, ExpandedRichOptions, RichOptions } from './core/rich.js';
2
2
  import Rich, { Parchment, Range } from './core/rich.js';
3
- import Delta, { AttributeMap, Op, OpIterator } from './delta';
3
+ import Delta, { AttributeMap, Op, OpIterator } from './delta/index.js';
4
4
  export { default as Module } from './core/module.js';
5
5
  export { AttributeMap, Delta, Op, OpIterator, Parchment, Range };
6
6
  export type { Bounds, DebugLevel, EmitterSource, ExpandedRichOptions, RichOptions, };
@@ -0,0 +1,15 @@
1
+ interface AttributeMapProps {
2
+ [key: string]: unknown;
3
+ }
4
+ declare function compose(a?: AttributeMapProps, b?: AttributeMapProps, keepNull?: boolean): AttributeMapProps | undefined;
5
+ declare function diff(a?: AttributeMapProps, b?: AttributeMapProps): AttributeMapProps | undefined;
6
+ declare function invert(attr?: AttributeMapProps, base?: AttributeMapProps): AttributeMapProps;
7
+ declare function transform(a: AttributeMapProps | undefined, b: AttributeMapProps | undefined, priority?: boolean): AttributeMapProps | undefined;
8
+ export type { AttributeMapProps };
9
+ declare const _default: {
10
+ compose: typeof compose;
11
+ diff: typeof diff;
12
+ invert: typeof invert;
13
+ transform: typeof transform;
14
+ };
15
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { AttributeMapProps } from './AttributeMap';
2
+ interface OpProps {
3
+ insert?: string | Record<string, unknown>;
4
+ delete?: number;
5
+ retain?: number | Record<string, unknown>;
6
+ attributes?: AttributeMapProps;
7
+ }
8
+ declare function length(op: OpProps): number;
9
+ export type { OpProps };
10
+ declare const _default: {
11
+ length: typeof length;
12
+ };
13
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { OpProps } from './Op';
2
+ declare class OpIterator {
3
+ ops: OpProps[];
4
+ index: number;
5
+ offset: number;
6
+ constructor(ops: OpProps[]);
7
+ hasNext(): boolean;
8
+ next(length?: number): OpProps;
9
+ peek(): OpProps;
10
+ peekLength(): number;
11
+ peekType(): string;
12
+ rest(): OpProps[];
13
+ }
14
+ export default OpIterator;
@@ -0,0 +1,53 @@
1
+ import type { AttributeMapProps } from './AttributeMap';
2
+ import AttributeMap from './AttributeMap';
3
+ import type { OpProps } from './Op';
4
+ import Op from './Op';
5
+ import OpIterator from './OpIterator';
6
+ interface EmbedHandler<T> {
7
+ compose(a: T, b: T, keepNull: boolean): T;
8
+ invert(a: T, b: T): T;
9
+ transform(a: T, b: T, priority: boolean): T;
10
+ }
11
+ declare class Delta {
12
+ static Op: {
13
+ length: (op: OpProps) => number;
14
+ };
15
+ static OpIterator: typeof OpIterator;
16
+ static AttributeMap: {
17
+ compose: (a?: AttributeMapProps, b?: AttributeMapProps, keepNull?: boolean) => AttributeMapProps | undefined;
18
+ diff: (a?: AttributeMapProps, b?: AttributeMapProps) => AttributeMapProps | undefined;
19
+ invert: (attr?: AttributeMapProps, base?: AttributeMapProps) => AttributeMapProps;
20
+ transform: (a: AttributeMapProps | undefined, b: AttributeMapProps | undefined, priority?: boolean) => AttributeMapProps | undefined;
21
+ };
22
+ private static handlers;
23
+ static registerEmbed<T>(embedType: string, handler: EmbedHandler<T>): void;
24
+ static unregisterEmbed(embedType: string): void;
25
+ private static getHandler;
26
+ ops: OpProps[];
27
+ constructor(ops?: OpProps[] | {
28
+ ops: OpProps[];
29
+ });
30
+ insert(arg: string | Record<string, unknown>, attributes?: AttributeMapProps | null): this;
31
+ delete(length: number): this;
32
+ retain(length: number | Record<string, unknown>, attributes?: AttributeMapProps | null): this;
33
+ push(newOp: OpProps): this;
34
+ chop(): this;
35
+ filter(predicate: (op: OpProps, index: number) => boolean): OpProps[];
36
+ forEach(predicate: (op: OpProps, index: number) => void): void;
37
+ map<T>(predicate: (op: OpProps, index: number) => T): T[];
38
+ partition(predicate: (op: OpProps) => boolean): [OpProps[], OpProps[]];
39
+ reduce<T>(predicate: (accum: T, curr: OpProps, index: number) => T, initialValue: T): T;
40
+ changeLength(): number;
41
+ length(): number;
42
+ slice(start?: number, end?: number): Delta;
43
+ compose(other: Delta): Delta;
44
+ concat(other: Delta): Delta;
45
+ diff(other: Delta, cursor?: number | diff.CursorInfo): Delta;
46
+ eachLine(predicate: (line: Delta, attributes: AttributeMapProps, index: number) => boolean | void, newline?: string): void;
47
+ invert(base: Delta): Delta;
48
+ transform(index: number, priority?: boolean): number;
49
+ transform(other: Delta, priority?: boolean): Delta;
50
+ transformPosition(index: number, priority?: boolean): number;
51
+ }
52
+ export default Delta;
53
+ export { AttributeMap, AttributeMapProps, Op, OpIterator, OpProps };
@@ -0,0 +1,40 @@
1
+ export default diff;
2
+ /**
3
+ * This library modifies the diff-patch-match library by Neil Fraser
4
+ * by removing the patch and match functionality and certain advanced
5
+ * options in the diff function. The original license is as follows:
6
+ *
7
+ * ===
8
+ *
9
+ * Diff Match and Patch
10
+ *
11
+ * Copyright 2006 Google Inc.
12
+ * http://code.google.com/p/google-diff-match-patch/
13
+ *
14
+ * Licensed under the Apache License, Version 2.0 (the "License");
15
+ * you may not use this file except in compliance with the License.
16
+ * You may obtain a copy of the License at
17
+ *
18
+ * http://www.apache.org/licenses/LICENSE-2.0
19
+ *
20
+ * Unless required by applicable law or agreed to in writing, software
21
+ * distributed under the License is distributed on an "AS IS" BASIS,
22
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ * See the License for the specific language governing permissions and
24
+ * limitations under the License.
25
+ */
26
+ /**
27
+ * The data structure representing a diff is an array of tuples:
28
+ * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
29
+ * which means: delete 'Hello', add 'Goodbye' and keep ' world.'
30
+ */
31
+ declare let DIFF_DELETE: number;
32
+ declare let DIFF_EQUAL: number;
33
+ declare let DIFF_INSERT: number;
34
+ declare function diff(text1: any, text2: any, cursor_pos: any, cleanup: any): any[];
35
+ declare namespace diff {
36
+ export { DIFF_INSERT as INSERT };
37
+ export { DIFF_DELETE as DELETE };
38
+ export { DIFF_EQUAL as EQUAL };
39
+ }
40
+ export { DIFF_DELETE as DELETE, DIFF_EQUAL as EQUAL, DIFF_INSERT as INSERT };
@@ -5,7 +5,7 @@ declare class Bold extends Inline {
5
5
  static create(): HTMLElement;
6
6
  static formats(): boolean;
7
7
  optimize(context: {
8
- [key: string]: any;
8
+ [key: string]: unknown;
9
9
  }): void;
10
10
  }
11
11
  export default Bold;
@@ -1,7 +1,7 @@
1
1
  import { ClassAttributor, StyleAttributor } from '../parchment';
2
2
  declare const FontClass: ClassAttributor;
3
3
  declare class FontStyleAttributor extends StyleAttributor {
4
- value(node: HTMLElement): any;
4
+ value(node: HTMLElement): string;
5
5
  }
6
6
  declare const FontStyle: FontStyleAttributor;
7
7
  export { FontClass, FontStyle };
@@ -0,0 +1,5 @@
1
+ import { BlockEmbed } from '../blots/block.js';
2
+ declare class Hr extends BlockEmbed {
3
+ static create(value: any): HTMLHRElement;
4
+ }
5
+ export default Hr;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Custom module for quilljs to allow user to resize <img> elements
3
+ * (Works on Chrome, Edge, Safari and replaces Firefox's native resize behavior)
4
+ */
5
+ export default class ImageResize {
6
+ constructor(rich: any, options?: {});
7
+ rich: any;
8
+ options: any;
9
+ moduleClasses: any;
10
+ modules: any[];
11
+ initializeModules: () => void;
12
+ onUpdate: () => void;
13
+ removeModules: () => void;
14
+ handleClick: (evt: any) => void;
15
+ show: (img: any) => void;
16
+ img: any;
17
+ setSelectionByNode: () => void;
18
+ showOverlay: () => void;
19
+ overlay: HTMLDivElement | undefined;
20
+ overlayClickHanlder: () => void;
21
+ hideOverlay: () => void;
22
+ repositionElements: () => void;
23
+ hide: () => void;
24
+ destroy: () => void;
25
+ checkImage: (evt: any) => void;
26
+ rootScroll: (e: any) => void;
27
+ }
@@ -0,0 +1,10 @@
1
+ export class BaseModule {
2
+ constructor(resizer: any);
3
+ overlay: any;
4
+ img: any;
5
+ options: any;
6
+ requestUpdate: any;
7
+ onCreate: () => void;
8
+ onDestroy: () => void;
9
+ onUpdate: () => void;
10
+ }
@@ -0,0 +1,5 @@
1
+ export class DisplaySize extends BaseModule {
2
+ display: HTMLDivElement | undefined;
3
+ getCurrentSize: () => any[];
4
+ }
5
+ import { BaseModule } from './BaseModule';
@@ -0,0 +1,13 @@
1
+ export class Resize extends BaseModule {
2
+ boxes: any[] | undefined;
3
+ positionBoxes: () => void;
4
+ addBox: (cursor: any) => void;
5
+ handleMousedown: (evt: any) => void;
6
+ dragBox: any;
7
+ dragStartX: any;
8
+ preDragWidth: any;
9
+ handleMouseup: () => void;
10
+ handleDrag: (evt: any) => void;
11
+ setCursor: (value: any) => void;
12
+ }
13
+ import { BaseModule } from './BaseModule';
@@ -0,0 +1,7 @@
1
+ declare namespace _default {
2
+ let modules: string[];
3
+ let overlayStyles: {};
4
+ let handleStyles: {};
5
+ let displayStyles: {};
6
+ }
7
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import Block from '../blots/block.js';
2
+ import type Scroll from '../blots/scroll.js';
3
+ declare class ListItem extends Block {
4
+ static create(value: string): HTMLElement;
5
+ static formats(domNode: HTMLElement): string;
6
+ static register(): void;
7
+ constructor(scroll: Scroll, domNode: HTMLElement);
8
+ format(name: string, value: string): void;
9
+ }
10
+ export { ListItem as default };
@@ -0,0 +1,10 @@
1
+ import Block from '../blots/block.js';
2
+ import type Scroll from '../blots/scroll.js';
3
+ declare class ListItem extends Block {
4
+ static create(value: string): HTMLElement;
5
+ static formats(domNode: HTMLElement): string;
6
+ static register(): void;
7
+ constructor(scroll: Scroll, domNode: HTMLElement);
8
+ format(name: string, value: string): void;
9
+ }
10
+ export { ListItem as default };
@@ -0,0 +1,3 @@
1
+ import { StyleAttributor } from '../parchment';
2
+ declare const LineHeight: StyleAttributor;
3
+ export default LineHeight;
@@ -2,6 +2,7 @@ import Block from '../blots/block.js';
2
2
  import Container from '../blots/container.js';
3
3
  import type Scroll from '../blots/scroll.js';
4
4
  declare class ListContainer extends Container {
5
+ static create(value: string): HTMLElement;
5
6
  }
6
7
  declare class ListItem extends Block {
7
8
  static create(value: string): HTMLElement;
@@ -1,6 +1,6 @@
1
1
  import Block from '../blots/block.js';
2
2
  import Container from '../blots/container.js';
3
- import type { LinkedList } from '../parchment';
3
+ import type { LinkedList } from '../parchment/index.js';
4
4
  declare class TableCell extends Block {
5
5
  static blotName: string;
6
6
  static tagName: string;
@@ -11,7 +11,7 @@ declare class TableCell extends Block {
11
11
  format(name: string, value: string): void;
12
12
  row(): TableRow;
13
13
  rowOffset(): number;
14
- table(): import("../parchment").Parent;
14
+ table(): import("../parchment/index.js").Parent;
15
15
  }
16
16
  declare class TableRow extends Container {
17
17
  static blotName: string;
@@ -23,7 +23,7 @@ declare class TableRow extends Container {
23
23
  [key: string]: any;
24
24
  }): void;
25
25
  rowOffset(): number;
26
- table(): import("../parchment").Parent;
26
+ table(): import("../parchment/index.js").Parent;
27
27
  }
28
28
  declare class TableBody extends Container {
29
29
  static blotName: string;
@@ -2,8 +2,8 @@ import type { EmitterSource } from '../core/emitter.js';
2
2
  import Module from '../core/module.js';
3
3
  import Rich from '../core/rich.js';
4
4
  import type { Range } from '../core/selection.js';
5
- import Delta from '../delta';
6
- import type { ScrollBlot } from '../parchment';
5
+ import Delta from '../delta/index.js';
6
+ import type { ScrollBlot } from '../parchment/index.js';
7
7
  type Selector = string | Node['TEXT_NODE'] | Node['ELEMENT_NODE'];
8
8
  type Matcher = (node: Node, delta: Delta, scroll: ScrollBlot) => Delta;
9
9
  interface ClipboardOptions {
@@ -2,7 +2,7 @@ import type Scroll from '../blots/scroll.js';
2
2
  import Module from '../core/module.js';
3
3
  import Rich from '../core/rich.js';
4
4
  import type { Range } from '../core/selection.js';
5
- import type Delta from '../delta';
5
+ import type Delta from '../delta/index.js';
6
6
  export interface HistoryOptions {
7
7
  userOnly: boolean;
8
8
  delay: number;
@@ -2,7 +2,7 @@ import type { BlockEmbed } from '../blots/block.js';
2
2
  import Module from '../core/module.js';
3
3
  import Rich from '../core/rich.js';
4
4
  import type { Range } from '../core/selection.js';
5
- import type { BlockBlot } from '../parchment';
5
+ import type { BlockBlot } from '../parchment/index.js';
6
6
  declare const SHORTKEY: string;
7
7
  export interface Context {
8
8
  collapsed: boolean;
@@ -1,9 +1,9 @@
1
1
  import Inline from '../blots/inline.js';
2
2
  import Module from '../core/module.js';
3
3
  import Rich from '../core/rich.js';
4
- import Delta from '../delta';
4
+ import Delta from '../delta/index.js';
5
5
  import CodeBlock, { CodeBlockContainer } from '../formats/code.js';
6
- import type { Blot, ScrollBlot } from '../parchment';
6
+ import type { Blot, ScrollBlot } from '../parchment/index.js';
7
7
  declare class CodeToken extends Inline {
8
8
  static formats(node: Element, scroll: ScrollBlot): any;
9
9
  constructor(scroll: ScrollBlot, domNode: Node, value: unknown);
@@ -1,11 +1,11 @@
1
1
  import Module from '../core/module.js';
2
- import type { Op } from '../delta';
3
- import Delta from '../delta';
2
+ import type { OpProps } from '../delta/index.js';
3
+ import Delta from '../delta/index.js';
4
4
  export type CellData = {
5
5
  content?: Delta['ops'];
6
6
  attributes?: Record<string, unknown>;
7
7
  };
8
- export type TableRowColumnOp = Omit<Op, 'insert'> & {
8
+ export type TableRowColumnOp = Omit<OpProps, 'insert'> & {
9
9
  insert?: {
10
10
  id: string;
11
11
  };
@@ -1,7 +1,7 @@
1
1
  import Module from '../core/module.js';
2
2
  import Rich from '../core/rich.js';
3
3
  import type { Range } from '../core/selection.js';
4
- type Handler = (this: Toolbar, value: any) => void;
4
+ type Handler = (this: Toolbar, value: any, e?: PointerEvent) => void;
5
5
  export type ToolbarConfig = Array<string[] | Array<string | Record<string, unknown>>>;
6
6
  export interface ToolbarProps {
7
7
  container?: HTMLElement | ToolbarConfig | null;
@@ -1,17 +1,17 @@
1
1
  import Scope from '../scope.js';
2
2
  export interface AttributorOptions {
3
3
  scope?: Scope;
4
- whitelist?: string[];
4
+ whitelist?: string[] | number[];
5
5
  }
6
6
  export default class Attributor {
7
7
  readonly attrName: string;
8
8
  readonly keyName: string;
9
9
  static keys(node: HTMLElement): string[];
10
10
  scope: Scope;
11
- whitelist: string[] | undefined;
11
+ whitelist: string[] | number[] | undefined;
12
12
  constructor(attrName: string, keyName: string, options?: AttributorOptions);
13
13
  add(node: HTMLElement, value: any): boolean;
14
- canAdd(_node: HTMLElement, value: any): boolean;
14
+ canAdd(_node: HTMLElement, value: unknown): boolean;
15
15
  remove(node: HTMLElement): void;
16
16
  value(node: HTMLElement): any;
17
17
  }