@unicom-cloud/ui 0.8.112 → 0.8.114
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.
- package/Affix.js +2 -2
- package/Alert.js +2 -2
- package/AutoComplete.js +1 -1
- package/BackTop.js +3 -3
- package/Badge.js +2 -2
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -47
- package/Countdown.js +17 -51
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +15 -51
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +2 -2
- package/Empty.js +1 -1
- package/Flex.js +16 -52
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +17 -52
- package/List.js +1 -1
- package/Loading.js +15 -51
- package/Marquee.js +24 -46
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +14 -50
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +16 -53
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +2 -2
- package/Result.js +1 -1
- package/RichText.js +12 -13
- package/Segmented.js +16 -51
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +16 -52
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +2 -2
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +18 -54
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/affix/index.js +2 -2
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +3 -3
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +3 -3
- package/badge/Count.js +1 -1
- package/badge/index.js +2 -2
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{BiZSULcr.js → BGb_jT2S.js} +640 -672
- package/chunk/{C6A94b7f.js → BcWPf1id.js} +1 -1
- package/chunk/BcdTSJks.js +48 -0
- package/chunk/{CrOzsnI0.js → Bl3hZtxi.js} +1 -1
- package/chunk/{RjJoagzL.js → CEAeR6xB.js} +1 -1
- package/chunk/{Cx92e1S8.js → CKojyqln.js} +5 -5
- package/chunk/{C3kH2ES3.js → CRgtPpMG.js} +1 -1
- package/chunk/CVMFAeSw.js +39 -0
- package/chunk/{0BhDjhcd.js → CVjWKHBo.js} +1 -1
- package/chunk/{DfbO4QTS.js → CYPFoLks.js} +4 -4
- package/chunk/{BfVlSL8A.js → Ch4iApRQ.js} +4 -4
- package/chunk/ClNkxEcR.js +154 -0
- package/chunk/{CYssV-zz.js → Cs9GrNJa.js} +66 -100
- package/chunk/{DfUcAhyT.js → CwLSam2p.js} +2 -2
- package/chunk/CxbF1opI.js +231 -0
- package/chunk/Cy26_CKq.js +33 -0
- package/chunk/{CRdegvoa.js → D3F0iWPu.js} +1 -1
- package/chunk/{CylbdYce.js → D6I1_o6O.js} +1 -1
- package/chunk/{CtCFA4ht.js → DPDyV8yt.js} +4 -4
- package/chunk/{B--6x-RL.js → DQ8_XXrH.js} +1 -1
- package/chunk/{hc_ufgVf.js → DmHIX8hU.js} +166 -121
- package/chunk/{C1vY8016.js → DstheLSK.js} +79 -110
- package/chunk/{KPBMJlOB.js → HFPyZ48d.js} +37 -35
- package/chunk/{DhAvt6tJ.js → efH9HX0H.js} +3 -3
- package/chunk/exc7v_Hl.js +53 -0
- package/chunk/gJsdBcpG.js +10 -0
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +22 -66
- package/countdown/index.js +42 -76
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +47 -83
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +89 -93
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +2 -2
- package/empty/index.js +1 -1
- package/flex/index.js +38 -72
- package/form/Control.js +115 -103
- package/form/Form.js +2 -2
- package/form/FormItem.js +2 -2
- package/form/index.js +1 -1
- package/form/promisify.js +10 -19
- package/form/store.js +3 -3
- package/form/util.js +62 -52
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +9 -9
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useResizeObserver.js +7 -50
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWatermark.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/addFromIconFontCn.js +1 -1
- package/icon/index.js +2 -2
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +3 -3
- package/image/ImagePreview.js +18 -53
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +703 -690
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +29 -20
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +2 -2
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +57 -92
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +27 -63
- package/locale/en-US.js +5 -3
- package/locale/tr-TR.js +5 -3
- package/marquee/index.js +71 -93
- package/marquee-/index.js +74 -96
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +2 -2
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +5 -5
- package/modal/index.js +2 -2
- package/notice/index.js +14 -50
- package/notification/index.js +2 -2
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +1243 -92
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +2 -2
- package/resize-box/index.js +2 -2
- package/result/index.js +1 -1
- package/rich-text/index.js +6332 -77
- package/rich-text/lib/diff/index.d.ts +21 -0
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/segmented/index.js +126 -161
- package/select/Option.js +44 -41
- package/select/Select.js +10 -12
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/index.js +2 -2
- package/space/index.js +24 -60
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +2 -2
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +2 -2
- package/table/Table.js +14 -53
- package/table/index.js +77 -120
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +81 -117
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/getPopupStyle.js +1 -1
- package/trigger/index.js +145 -145
- package/types/common/hooks/src/use-theme/index.d.ts +2 -2
- package/types/common/hooks/useStateWithPromise.d.ts +1 -1
- package/types/common/hooks/useWindowSize.d.ts +4 -4
- package/types/common/utils/dom.d.ts +13 -1
- package/types/common/utils/lodash.d.ts +2 -1
- package/types/common/utils/reactDOM.d.ts +10 -1
- package/types/common/utils/validate.d.ts +2 -1
- package/types/pc/carousel/interface.d.ts +2 -2
- package/types/pc/color-picker/Panel.d.ts +1 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/form/interface.d.ts +6 -1
- package/types/pc/form/promisify.d.ts +5 -0
- package/types/pc/form/store.d.ts +1 -1
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/index.d.ts +1 -1
- package/types/pc/input/autoSizeTextAreaHeight.d.ts +4 -2
- package/types/pc/list/interface.d.ts +2 -2
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/qr-code/examples/demo.d.ts +1 -0
- package/types/pc/qr-code/examples/download.d.ts +2 -0
- package/types/pc/qr-code/examples/full.d.ts +2 -0
- package/types/pc/qr-code/examples/image.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +2 -0
- package/types/pc/qr-code/src/index.d.ts +116 -0
- package/types/pc/qr-code/src/qrcodegen.d.ts +95 -0
- package/types/pc/qr-code/src/qrcodegen2.d.ts +325 -0
- package/types/pc/rich-text/index.d.ts +7 -4
- package/types/pc/rich-text/interface.d.ts +3 -2
- package/types/pc/rich-text/{core → lib/core}/editor.d.ts +1 -1
- package/types/pc/rich-text/{core → lib/core}/rich.d.ts +3 -7
- package/types/pc/rich-text/{core → lib/core}/selection.d.ts +1 -0
- package/types/pc/rich-text/{core.d.ts → lib/core.d.ts} +1 -1
- package/types/pc/rich-text/lib/delta/AttributeMap.d.ts +15 -0
- package/types/pc/rich-text/lib/delta/Op.d.ts +13 -0
- package/types/pc/rich-text/lib/delta/OpIterator.d.ts +14 -0
- package/types/pc/rich-text/lib/delta/index.d.ts +53 -0
- package/types/pc/rich-text/lib/diff/index.d.ts +40 -0
- package/types/pc/rich-text/{formats → lib/formats}/bold.d.ts +1 -1
- package/types/pc/rich-text/{formats → lib/formats}/font.d.ts +1 -1
- package/types/pc/rich-text/lib/formats/hr.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/index.d.ts +27 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/BaseModule.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/DisplaySize.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/Resize.d.ts +13 -0
- package/types/pc/rich-text/lib/formats/image-resize/options.d.ts +7 -0
- package/types/pc/rich-text/lib/formats/liOl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/liUl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/lineHeight.d.ts +3 -0
- package/types/pc/rich-text/{formats → lib/formats}/list.d.ts +1 -0
- package/types/pc/rich-text/{formats → lib/formats}/table.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/clipboard.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/history.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/keyboard.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/syntax.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/tableEmbed.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/toolbar.d.ts +1 -1
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/attributor.d.ts +3 -3
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/style.d.ts +2 -2
- package/types/pc/rich-text/{ui → lib/ui}/icons.d.ts +5 -1
- package/types/pc/rich-text/{ui → lib/ui}/picker.d.ts +1 -0
- package/types/pc/tabs/hook/useDomSize.d.ts +2 -2
- package/types/pc/tabs/hook/useHeaderScroll.d.ts +2 -2
- package/types/pc/tree-select/hook/useStateValue.d.ts +2 -2
- package/types/pc/utils/date.d.ts +1 -0
- package/types/pc/utils/index.d.ts +2 -2
- package/types/pc/utils/validate.d.ts +1 -1
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +70 -114
- package/typography/Operations.js +29 -74
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +2 -2
- package/upload/Uploader.js +1 -1
- package/upload/request_.js +1972 -41
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/date.js +1 -0
- package/utils/dom.js +1 -1
- package/utils/index.js +248 -236
- package/utils/lodash.js +33 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/validate.js +15 -5
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +218 -217
- package/watermark/Watermark.js +1 -1
- package/chunk/BCmfDFV4.js +0 -4237
- package/chunk/BG6j6Ct7.js +0 -30
- package/chunk/C5CbL5ku.js +0 -56
- package/chunk/CXrVhA6-.js +0 -54
- package/chunk/DMv8Hn4u.js +0 -231
- package/chunk/DsuIQH0F.js +0 -200
- package/chunk/d1c9z8T1.js +0 -49
- package/chunk/vP3qfmKM.js +0 -84
- package/rich-text/core.js +0 -11
- package/rich-text/rich.js +0 -1347
- package/types/common/utils/index.d.ts +0 -47
- package/types/common/utils/keyboardCode.d.ts +0 -4
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/pc/rich-text/delta/AttributeMap.d.ts +0 -10
- package/types/pc/rich-text/delta/Op.d.ts +0 -11
- package/types/pc/rich-text/delta/OpIterator.d.ts +0 -13
- package/types/pc/rich-text/delta/index.d.ts +0 -45
- package/types/common/hooks/src/utils/{index.d.ts → is.d.ts} +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/block.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/break.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/container.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/cursor.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/embed.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/inline.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/scroll.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/text.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/composition.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/emitter.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/instances.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/logger.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/module.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/theme.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/createRegistryWithFormats.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/scrollRectIntoView.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/align.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/background.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/blockquote.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/code.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/color.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/direction.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/formula.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/header.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/image.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/indent.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/italic.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/link.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/script.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/size.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/strike.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/underline.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/video.d.ts +0 -0
- package/types/pc/rich-text/{rich.d.ts → lib/index.d.ts} +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/input.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/index.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/msWord.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/table.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uiNode.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uploader.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/class.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/store.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/blot.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/container.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/leaf.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/parent.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/shadow.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/block.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/embed.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/inline.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/scroll.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/text.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-list.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-node.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/error.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/index.d.ts +1 -1
- /package/types/pc/rich-text/{parchment → lib/parchment}/registry.d.ts +0 -0
- /package/types/pc/rich-text/{parchment → lib/parchment}/scope.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/base.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/pqb.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/color-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/icon-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/tooltip.d.ts +0 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
export type Bit = number;
|
|
2
|
+
export type Byte = number;
|
|
3
|
+
export type Int = number;
|
|
4
|
+
/**
|
|
5
|
+
* QR Code 错误纠正级别。
|
|
6
|
+
* 枚举值表示容忍错误的能力,从低到高。
|
|
7
|
+
*/
|
|
8
|
+
export declare enum ErrorCorrectionLevel {
|
|
9
|
+
/** 低纠错级别:约可恢复 7% 的数据错误 */
|
|
10
|
+
LOW = 0,
|
|
11
|
+
/** 中纠错级别:约可恢复 15% 的数据错误 */
|
|
12
|
+
MEDIUM = 1,
|
|
13
|
+
/** 四分位纠错级别:约可恢复 25% 的数据错误 */
|
|
14
|
+
QUARTILE = 2,
|
|
15
|
+
/** 高纠错级别:约可恢复 30% 的数据错误 */
|
|
16
|
+
HIGH = 3
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* QR Code 数据编码模式。
|
|
20
|
+
* 枚举值表示不同的数据编码方式。
|
|
21
|
+
*/
|
|
22
|
+
export declare enum Mode {
|
|
23
|
+
/** 数字模式:仅编码数字 0-9 */
|
|
24
|
+
NUMERIC = 1,
|
|
25
|
+
/** 字母数字模式:编码数字、大写字母和一些符号 */
|
|
26
|
+
ALPHANUMERIC = 2,
|
|
27
|
+
/** 字节模式:编码任意字节数据 */
|
|
28
|
+
BYTE = 4,
|
|
29
|
+
/** 日文汉字模式:编码日文汉字字符 */
|
|
30
|
+
KANJI = 8,
|
|
31
|
+
/** ECI 模式:扩展信道解释 */
|
|
32
|
+
ECI = 7
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* QR Code 数据段接口。
|
|
36
|
+
* 表示 QR Code 中的一段数据,包含模式、字符数和数据位。
|
|
37
|
+
*/
|
|
38
|
+
export interface QRSegment {
|
|
39
|
+
/** 数据编码模式 */
|
|
40
|
+
mode: Mode;
|
|
41
|
+
/** 字符数量 */
|
|
42
|
+
numChars: Int;
|
|
43
|
+
/** 获取数据位数组 */
|
|
44
|
+
getData(): Bit[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* QR Code 数据段实现类。
|
|
48
|
+
* 表示 QR Code 中的一段数据,包含模式、字符数和数据位。
|
|
49
|
+
*/
|
|
50
|
+
export declare class QRSegmentImpl implements QRSegment {
|
|
51
|
+
readonly mode: Mode;
|
|
52
|
+
readonly numChars: Int;
|
|
53
|
+
private readonly bitData;
|
|
54
|
+
/**
|
|
55
|
+
* 创建 QR 段实例
|
|
56
|
+
* @param mode 数据编码模式
|
|
57
|
+
* @param numChars 字符数量
|
|
58
|
+
* @param bitData 数据位数组
|
|
59
|
+
*/
|
|
60
|
+
constructor(mode: Mode, numChars: Int, bitData: Bit[]);
|
|
61
|
+
/**
|
|
62
|
+
* 获取数据位的副本
|
|
63
|
+
* @returns 数据位数组
|
|
64
|
+
*/
|
|
65
|
+
getData(): Bit[];
|
|
66
|
+
/**
|
|
67
|
+
* 创建字节模式的数据段
|
|
68
|
+
* @param data 字节数组
|
|
69
|
+
* @returns 字节模式的 QR 段
|
|
70
|
+
*/
|
|
71
|
+
static makeBytes(data: Byte[]): QRSegmentImpl;
|
|
72
|
+
/**
|
|
73
|
+
* 创建数字模式的数据段
|
|
74
|
+
* @param digits 数字字符串
|
|
75
|
+
* @returns 数字模式的 QR 段
|
|
76
|
+
*/
|
|
77
|
+
static makeNumeric(digits: string): QRSegmentImpl;
|
|
78
|
+
/**
|
|
79
|
+
* 创建字母数字模式的数据段
|
|
80
|
+
* @param text 字母数字字符串
|
|
81
|
+
* @returns 字母数字模式的 QR 段
|
|
82
|
+
*/
|
|
83
|
+
static makeAlphanumeric(text: string): QRSegmentImpl;
|
|
84
|
+
/**
|
|
85
|
+
* 为给定文本创建最优的数据段列表
|
|
86
|
+
* @param text 要编码的文本
|
|
87
|
+
* @returns QR 段数组
|
|
88
|
+
*/
|
|
89
|
+
static makeSegments(text: string): QRSegmentImpl[];
|
|
90
|
+
/**
|
|
91
|
+
* 创建 ECI(扩展信道解释)数据段
|
|
92
|
+
* @param assignVal ECI 分配值
|
|
93
|
+
* @returns ECI 模式的 QR 段
|
|
94
|
+
*/
|
|
95
|
+
static makeEci(assignVal: Int): QRSegmentImpl;
|
|
96
|
+
/**
|
|
97
|
+
* 检查字符串是否可编码为数字模式
|
|
98
|
+
* @param text 要检查的字符串
|
|
99
|
+
* @returns 如果字符串仅包含数字则返回 true
|
|
100
|
+
*/
|
|
101
|
+
static isNumeric(text: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 检查字符串是否可编码为字母数字模式
|
|
104
|
+
* @param text 要检查的字符串
|
|
105
|
+
* @returns 如果字符串仅包含字母数字字符则返回 true
|
|
106
|
+
*/
|
|
107
|
+
static isAlphanumeric(text: string): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 计算给定版本下所有段所需的总位数
|
|
110
|
+
* @param segs 段数组
|
|
111
|
+
* @param version QR 码版本
|
|
112
|
+
* @returns 所需的总位数
|
|
113
|
+
*/
|
|
114
|
+
static getTotalBits(segs: QRSegment[], version: Int): number;
|
|
115
|
+
/**
|
|
116
|
+
* 将字符串转换为 UTF-8 字节数组
|
|
117
|
+
* @param str 要转换的字符串
|
|
118
|
+
* @returns UTF-8 字节数组
|
|
119
|
+
*/
|
|
120
|
+
private static toUtf8ByteArray;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* QR Code 符号接口。
|
|
124
|
+
* 表示一个 QR Code 符号,包含版本、错误纠正级别、大小和模块数据。
|
|
125
|
+
*/
|
|
126
|
+
export interface QRCode {
|
|
127
|
+
/** 版本号 (1-40) */
|
|
128
|
+
version: Int;
|
|
129
|
+
/** 错误纠正级别 */
|
|
130
|
+
errorCorrectionLevel: ErrorCorrectionLevel;
|
|
131
|
+
/** QR Code 大小(模块数) */
|
|
132
|
+
size: Int;
|
|
133
|
+
/** 使用的掩模模式 (0-7) */
|
|
134
|
+
mask: Int;
|
|
135
|
+
/** 获取指定位置的模块颜色 */
|
|
136
|
+
getModule(x: Int, y: Int): boolean;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* QR Code 符号实现类。
|
|
140
|
+
* 表示一个二维条码符号,包含暗色和浅色单元的不可变方形网格。
|
|
141
|
+
*/
|
|
142
|
+
export declare class QRCodeImpl implements QRCode {
|
|
143
|
+
readonly version: Int;
|
|
144
|
+
readonly errorCorrectionLevel: ErrorCorrectionLevel;
|
|
145
|
+
/** QR Code 大小(模块数) */
|
|
146
|
+
readonly size: Int;
|
|
147
|
+
/** 使用的掩模模式 (0-7) */
|
|
148
|
+
mask: Int;
|
|
149
|
+
/** 模块数据(false = 浅色,true = 暗色) */
|
|
150
|
+
private modules;
|
|
151
|
+
/** 指示功能模块(不受掩模影响) */
|
|
152
|
+
private isFunction;
|
|
153
|
+
/** 支持的最小版本号 */
|
|
154
|
+
static readonly MIN_VERSION: Int;
|
|
155
|
+
/** 支持的最大版本号 */
|
|
156
|
+
static readonly MAX_VERSION: Int;
|
|
157
|
+
/** 惩罚分数系数 N1 */
|
|
158
|
+
static readonly PENALTY_N1: Int;
|
|
159
|
+
/** 惩罚分数系数 N2 */
|
|
160
|
+
static readonly PENALTY_N2: Int;
|
|
161
|
+
/** 惩罚分数系数 N3 */
|
|
162
|
+
static readonly PENALTY_N3: Int;
|
|
163
|
+
/** 惩罚分数系数 N4 */
|
|
164
|
+
static readonly PENALTY_N4: Int;
|
|
165
|
+
static readonly ECC_CODEWORDS_PER_BLOCK: Int[][];
|
|
166
|
+
static readonly NUM_ERROR_CORRECTION_BLOCKS: Int[][];
|
|
167
|
+
/**
|
|
168
|
+
* 创建 QR Code 实例(低级 API)
|
|
169
|
+
* @param version 版本号 (1-40)
|
|
170
|
+
* @param errorCorrectionLevel 错误纠正级别
|
|
171
|
+
* @param dataCodewords 数据码字字节数组
|
|
172
|
+
* @param msk 掩模模式 (-1 表示自动选择,0-7 表示指定掩模)
|
|
173
|
+
*/
|
|
174
|
+
constructor(version: Int, errorCorrectionLevel: ErrorCorrectionLevel, dataCodewords: Byte[], msk: Int);
|
|
175
|
+
/**
|
|
176
|
+
* 从文本创建 QR Code(高级 API)
|
|
177
|
+
* @param text 要编码的文本
|
|
178
|
+
* @param ecl 错误纠正级别
|
|
179
|
+
* @returns QR Code 实例
|
|
180
|
+
*/
|
|
181
|
+
static encodeText(text: string, ecl: ErrorCorrectionLevel): QRCodeImpl;
|
|
182
|
+
/**
|
|
183
|
+
* 从二进制数据创建 QR Code(高级 API)
|
|
184
|
+
* @param data 要编码的字节数组
|
|
185
|
+
* @param ecl 错误纠正级别
|
|
186
|
+
* @returns QR Code 实例
|
|
187
|
+
*/
|
|
188
|
+
static encodeBinary(data: Byte[], ecl: ErrorCorrectionLevel): QRCodeImpl;
|
|
189
|
+
/**
|
|
190
|
+
* 从数据段创建 QR Code(中级 API)
|
|
191
|
+
* @param segs 数据段数组
|
|
192
|
+
* @param ecl 错误纠正级别
|
|
193
|
+
* @param minVersion 最小版本号(默认 1)
|
|
194
|
+
* @param maxVersion 最大版本号(默认 40)
|
|
195
|
+
* @param mask 掩模模式(默认 -1 表示自动选择)
|
|
196
|
+
* @param boostEcl 是否提升错误纠正级别(默认 true)
|
|
197
|
+
* @returns QR Code 实例
|
|
198
|
+
*/
|
|
199
|
+
static encodeSegments(segs: QRSegment[], ecl: ErrorCorrectionLevel, minVersion?: Int, maxVersion?: Int, mask?: Int, boostEcl?: boolean): QRCodeImpl;
|
|
200
|
+
/**
|
|
201
|
+
* 获取指定位置的模块颜色
|
|
202
|
+
* @param x 水平坐标(0 为左上角)
|
|
203
|
+
* @param y 垂直坐标(0 为左上角)
|
|
204
|
+
* @returns 模块颜色(false 表示浅色,true 表示暗色)
|
|
205
|
+
*/
|
|
206
|
+
getModule(x: Int, y: Int): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* 绘制所有功能模块
|
|
209
|
+
*/
|
|
210
|
+
private drawFunctionPatterns;
|
|
211
|
+
/**
|
|
212
|
+
* 绘制格式信息位
|
|
213
|
+
* @param mask 掩模模式
|
|
214
|
+
*/
|
|
215
|
+
private drawFormatBits;
|
|
216
|
+
/**
|
|
217
|
+
* 绘制版本信息位(版本 7+)
|
|
218
|
+
*/
|
|
219
|
+
private drawVersion;
|
|
220
|
+
/**
|
|
221
|
+
* 绘制查找器模式(包括边框分隔符)
|
|
222
|
+
* @param x 中心模块的水平坐标
|
|
223
|
+
* @param y 中心模块的垂直坐标
|
|
224
|
+
*/
|
|
225
|
+
private drawFinderPattern;
|
|
226
|
+
/**
|
|
227
|
+
* 绘制对齐模式
|
|
228
|
+
* @param x 中心模块的水平坐标
|
|
229
|
+
* @param y 中心模块的垂直坐标
|
|
230
|
+
*/
|
|
231
|
+
private drawAlignmentPattern;
|
|
232
|
+
/**
|
|
233
|
+
* 设置模块颜色并标记为功能模块
|
|
234
|
+
* @param x 水平坐标
|
|
235
|
+
* @param y 垂直坐标
|
|
236
|
+
* @param isDark 是否为暗色
|
|
237
|
+
*/
|
|
238
|
+
private setFunctionModule;
|
|
239
|
+
/**
|
|
240
|
+
* 添加错误纠正码并交织数据
|
|
241
|
+
* @param data 数据码字
|
|
242
|
+
* @returns 包含数据和错误纠正码的码字数组
|
|
243
|
+
*/
|
|
244
|
+
private addEccAndInterleave;
|
|
245
|
+
/**
|
|
246
|
+
* 绘制码字数据到 QR Code 的整个数据区域
|
|
247
|
+
* @param data 包含数据和错误纠正码的码字数组
|
|
248
|
+
*/
|
|
249
|
+
private drawCodewords;
|
|
250
|
+
/**
|
|
251
|
+
* 应用掩模模式到 QR Code 的码字模块
|
|
252
|
+
* @param mask 掩模模式
|
|
253
|
+
*/
|
|
254
|
+
private applyMask;
|
|
255
|
+
/**
|
|
256
|
+
* 计算并返回当前模块状态的惩罚分数
|
|
257
|
+
* @returns 惩罚分数
|
|
258
|
+
*/
|
|
259
|
+
private getPenaltyScore;
|
|
260
|
+
/**
|
|
261
|
+
* 返回此版本号的对齐模式位置列表
|
|
262
|
+
* @returns 对齐模式位置数组
|
|
263
|
+
*/
|
|
264
|
+
private getAlignmentPatternPositions;
|
|
265
|
+
/**
|
|
266
|
+
* 计算查找器模式惩罚分数
|
|
267
|
+
* @param runHistory 运行历史数组
|
|
268
|
+
* @returns 惩罚模式数量
|
|
269
|
+
*/
|
|
270
|
+
private finderPenaltyCountPatterns;
|
|
271
|
+
/**
|
|
272
|
+
* 终止运行并计算惩罚分数
|
|
273
|
+
* @param currentRunColor 当前运行颜色
|
|
274
|
+
* @param currentRunLength 当前运行长度
|
|
275
|
+
* @param runHistory 运行历史数组
|
|
276
|
+
* @returns 惩罚模式数量
|
|
277
|
+
*/
|
|
278
|
+
private finderPenaltyTerminateAndCount;
|
|
279
|
+
/**
|
|
280
|
+
* 添加运行历史记录
|
|
281
|
+
* @param currentRunLength 当前运行长度
|
|
282
|
+
* @param runHistory 运行历史数组
|
|
283
|
+
*/
|
|
284
|
+
private finderPenaltyAddHistory;
|
|
285
|
+
/**
|
|
286
|
+
* 获取原始数据模块数量
|
|
287
|
+
* @param ver 版本号
|
|
288
|
+
* @returns 原始数据模块数量
|
|
289
|
+
*/
|
|
290
|
+
private static getNumRawDataModules;
|
|
291
|
+
/**
|
|
292
|
+
* 获取数据码字数量
|
|
293
|
+
* @param ver 版本号
|
|
294
|
+
* @param ecl 错误纠正级别
|
|
295
|
+
* @returns 数据码字数量
|
|
296
|
+
*/
|
|
297
|
+
private static getNumDataCodewords;
|
|
298
|
+
/**
|
|
299
|
+
* 计算 Reed-Solomon 错误纠正除数多项式
|
|
300
|
+
* @param degree 度数
|
|
301
|
+
* @returns 除数多项式系数
|
|
302
|
+
*/
|
|
303
|
+
private static reedSolomonComputeDivisor;
|
|
304
|
+
/**
|
|
305
|
+
* 计算 Reed-Solomon 错误纠正余数
|
|
306
|
+
* @param data 数据多项式系数
|
|
307
|
+
* @param divisor 除数多项式系数
|
|
308
|
+
* @returns 余数多项式系数
|
|
309
|
+
*/
|
|
310
|
+
private static reedSolomonComputeRemainder;
|
|
311
|
+
/**
|
|
312
|
+
* Reed-Solomon 有限域乘法
|
|
313
|
+
* @param x 第一个域元素
|
|
314
|
+
* @param y 第二个域元素
|
|
315
|
+
* @returns 乘积结果
|
|
316
|
+
*/
|
|
317
|
+
private static reedSolomonMultiply;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* 从文本创建 QR Code 的便捷函数
|
|
321
|
+
* @param text 要编码的文本
|
|
322
|
+
* @param errorCorrectionLevel 错误纠正级别(默认为中)
|
|
323
|
+
* @returns QR Code 实例
|
|
324
|
+
*/
|
|
325
|
+
export declare function createQRCode(text: string, errorCorrectionLevel?: ErrorCorrectionLevel): QRCode;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import Rich from './
|
|
2
|
-
export * from './
|
|
3
|
-
export type { Bounds, DebugLevel, EmitterSource, ExpandedRichOptions, RichOptions, } from './
|
|
1
|
+
import Rich, { Delta } from './lib';
|
|
2
|
+
export * from './lib';
|
|
3
|
+
export type { Bounds, DebugLevel, EmitterSource, ExpandedRichOptions, RichOptions, } from './lib';
|
|
4
4
|
export { Rich };
|
|
5
|
-
declare const RichText: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<
|
|
5
|
+
declare const RichText: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<{
|
|
6
|
+
rich: Rich;
|
|
7
|
+
contents: Delta;
|
|
8
|
+
}>>;
|
|
6
9
|
export default RichText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import type { EmitterSource } from './core
|
|
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;
|
|
@@ -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 {
|
|
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;
|
|
@@ -165,11 +161,11 @@ declare class Rich {
|
|
|
165
161
|
* If the selection is already visible, no scrolling will occur.
|
|
166
162
|
*/
|
|
167
163
|
scrollSelectionIntoView(options?: ScrollRectIntoViewOptions): void;
|
|
168
|
-
setContents(delta: Delta |
|
|
164
|
+
setContents(delta: Delta | OpProps[], source?: EmitterSource): Delta;
|
|
169
165
|
setSelection(index: Range | null | number, length?: EmitterSource | number, source?: EmitterSource): void;
|
|
170
166
|
setText(text: string, source?: EmitterSource): Delta;
|
|
171
167
|
update(source?: EmitterSource): void;
|
|
172
|
-
updateContents(delta: Delta |
|
|
168
|
+
updateContents(delta: Delta | OpProps[], source?: EmitterSource): Delta;
|
|
173
169
|
}
|
|
174
170
|
declare function expandConfig(containerOrSelector: HTMLElement | string, options: RichOptions): ExpandedRichOptions;
|
|
175
171
|
type NormalizedIndexLength = [
|
|
@@ -59,6 +59,7 @@ declare class Selection {
|
|
|
59
59
|
native: AbstractRange;
|
|
60
60
|
} | null;
|
|
61
61
|
rangeToNative(range: Range): [Node | null, number, Node | null, number];
|
|
62
|
+
setSelectionByNode(node: any): void;
|
|
62
63
|
setNativeRange(startNode: Node | null, startOffset?: number, endNode?: Node | null, endOffset?: number | undefined, force?: boolean): void;
|
|
63
64
|
setRange(range: Range | null, force: boolean, source?: EmitterSource): void;
|
|
64
65
|
setRange(range: Range | null, source?: EmitterSource): void;
|
|
@@ -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 };
|
|
@@ -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):
|
|
4
|
+
value(node: HTMLElement): string;
|
|
5
5
|
}
|
|
6
6
|
declare const FontStyle: FontStyleAttributor;
|
|
7
7
|
export { FontClass, FontStyle };
|
|
@@ -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,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,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 };
|