@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
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
import { jsx as v, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as v, jsxs as wt, Fragment as Ct } from "react/jsx-runtime";
|
|
2
|
+
import kt from "lodash/isFunction";
|
|
3
3
|
import Tt from "lodash/isNumber";
|
|
4
|
-
import rt, { useRef as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { r as
|
|
4
|
+
import rt, { useRef as E, useState as Ft, useMemo as Ut, useEffect as A, useImperativeHandle as Vt } from "react";
|
|
5
|
+
import { u as Dt } from "../chunk/BJeTDXdz.js";
|
|
6
|
+
import { u as Kt } from "../chunk/oopARUrq.js";
|
|
7
|
+
import { u as jt } from "../chunk/CAA93JLq.js";
|
|
8
|
+
import { u as Bt } from "../chunk/8w-ItYb1.js";
|
|
9
|
+
import { u as Yt } from "../chunk/Cy26_CKq.js";
|
|
10
|
+
import { r as qt } from "../chunk/CHQ8c547.js";
|
|
11
11
|
import xt from "./Filler.js";
|
|
12
|
-
import { g as
|
|
13
|
-
import { f as
|
|
14
|
-
function
|
|
15
|
-
const
|
|
12
|
+
import { g as Gt } from "../chunk/DKHXj8Kf.js";
|
|
13
|
+
import { f as Wt } from "../chunk/exc7v_Hl.js";
|
|
14
|
+
function zt(o, s, r, e) {
|
|
15
|
+
const l = r - o, i = s - r, I = Math.min(l, i) * 2;
|
|
16
16
|
if (e <= I) {
|
|
17
17
|
const H = Math.floor(e / 2);
|
|
18
|
-
return e % 2 ?
|
|
18
|
+
return e % 2 ? r + H + 1 : r - H;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
20
|
+
return l > i ? r - (e - i) : r + (e - l);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const e =
|
|
24
|
-
let
|
|
25
|
-
if (e === 0 &&
|
|
22
|
+
function Xt(o, s, r) {
|
|
23
|
+
const e = o.length, l = s.length;
|
|
24
|
+
let i, I;
|
|
25
|
+
if (e === 0 && l === 0)
|
|
26
26
|
return null;
|
|
27
|
-
e <
|
|
27
|
+
e < l ? (i = o, I = s) : (i = s, I = o);
|
|
28
28
|
const H = { __EMPTY_ITEM__: !0 };
|
|
29
|
-
function b(T,
|
|
30
|
-
return T !== void 0 ?
|
|
29
|
+
function b(T, R) {
|
|
30
|
+
return T !== void 0 ? r(T, R) : H;
|
|
31
31
|
}
|
|
32
|
-
let
|
|
32
|
+
let P = null, x = Math.abs(e - l) !== 1;
|
|
33
33
|
for (let T = 0; T < I.length; T += 1) {
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
|
|
34
|
+
const R = b(i[T], T), z = b(I[T], T);
|
|
35
|
+
if (R !== z) {
|
|
36
|
+
P = T, x = x || R !== b(I[T + 1], T + 1);
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return P === null ? null : { index: P, multiple: x };
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
function St(
|
|
44
|
-
const
|
|
42
|
+
const $t = "__rc_ghost_item__";
|
|
43
|
+
function St(o, s) {
|
|
44
|
+
const r = Math.floor(o * s), e = r / s, l = (o - e) / (1 / s);
|
|
45
45
|
return {
|
|
46
|
-
index:
|
|
46
|
+
index: r,
|
|
47
47
|
// scrollPtg >= itemTopPtg,计算结果为元素应当补充的滚动距离相对自身高度的偏移量
|
|
48
|
-
offsetPtg: Number.isNaN(
|
|
48
|
+
offsetPtg: Number.isNaN(l) ? 0 : l
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function yt(
|
|
52
|
-
const
|
|
51
|
+
function yt(o, s = !1) {
|
|
52
|
+
const r = Wt(o);
|
|
53
53
|
let e = 0;
|
|
54
|
-
if (
|
|
55
|
-
const { marginTop:
|
|
56
|
-
e = Number(
|
|
54
|
+
if (s) {
|
|
55
|
+
const { marginTop: l, marginBottom: i } = window.getComputedStyle(o);
|
|
56
|
+
e = Number(l.replace(/\D/g, "")) + Number(i.replace(/\D/g, "")), e = isNaN(e) ? 0 : e;
|
|
57
57
|
}
|
|
58
|
-
return
|
|
58
|
+
return r ? r.offsetHeight + e : 0;
|
|
59
59
|
}
|
|
60
|
-
function ot(
|
|
61
|
-
return
|
|
60
|
+
function ot(o, s) {
|
|
61
|
+
return o < 0 ? 0 : o > s ? s : o;
|
|
62
62
|
}
|
|
63
63
|
function F({
|
|
64
|
-
scrollTop:
|
|
65
|
-
scrollHeight:
|
|
66
|
-
clientHeight:
|
|
64
|
+
scrollTop: o,
|
|
65
|
+
scrollHeight: s,
|
|
66
|
+
clientHeight: r
|
|
67
67
|
}) {
|
|
68
|
-
const e =
|
|
69
|
-
return e <= 0 ? 0 : ot(
|
|
68
|
+
const e = s - r;
|
|
69
|
+
return e <= 0 ? 0 : ot(o, e) / e;
|
|
70
70
|
}
|
|
71
|
-
function Ht(
|
|
72
|
-
const { index: e, offsetPtg:
|
|
71
|
+
function Ht(o, s, r) {
|
|
72
|
+
const { index: e, offsetPtg: l } = St(o, s), i = Math.ceil(o * r), I = Math.ceil((1 - o) * r);
|
|
73
73
|
return {
|
|
74
74
|
itemIndex: e,
|
|
75
|
-
itemOffsetPtg:
|
|
76
|
-
startIndex: Math.max(0, e -
|
|
77
|
-
endIndex: Math.min(
|
|
75
|
+
itemOffsetPtg: l,
|
|
76
|
+
startIndex: Math.max(0, e - i),
|
|
77
|
+
endIndex: Math.min(s - 1, e + I)
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function W({
|
|
81
|
-
itemHeight:
|
|
82
|
-
itemOffsetPtg:
|
|
83
|
-
scrollPtg:
|
|
81
|
+
itemHeight: o,
|
|
82
|
+
itemOffsetPtg: s,
|
|
83
|
+
scrollPtg: r,
|
|
84
84
|
clientHeight: e
|
|
85
85
|
}) {
|
|
86
|
-
return Math.floor(e *
|
|
86
|
+
return Math.floor(e * r - o * s);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function Jt({ scrollTop: o, ...s }) {
|
|
89
|
+
return o + W(s);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
locatedItemRelativeTop:
|
|
93
|
-
locatedItemIndex:
|
|
94
|
-
compareItemIndex:
|
|
91
|
+
function Qt({
|
|
92
|
+
locatedItemRelativeTop: o,
|
|
93
|
+
locatedItemIndex: s,
|
|
94
|
+
compareItemIndex: r,
|
|
95
95
|
startIndex: e,
|
|
96
|
-
endIndex:
|
|
97
|
-
getItemKey:
|
|
96
|
+
endIndex: l,
|
|
97
|
+
getItemKey: i,
|
|
98
98
|
itemElementHeights: I,
|
|
99
99
|
itemHeight: H
|
|
100
100
|
}) {
|
|
101
|
-
let b =
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
for (let x =
|
|
105
|
-
const
|
|
106
|
-
b -= I[
|
|
101
|
+
let b = o;
|
|
102
|
+
const P = i(r);
|
|
103
|
+
if (r <= s)
|
|
104
|
+
for (let x = s; x >= e && i(x) !== P; x -= 1) {
|
|
105
|
+
const R = i(x - 1);
|
|
106
|
+
b -= I[R] || H;
|
|
107
107
|
}
|
|
108
108
|
else
|
|
109
|
-
for (let x =
|
|
110
|
-
const T =
|
|
111
|
-
if (T ===
|
|
109
|
+
for (let x = s; x <= l; x += 1) {
|
|
110
|
+
const T = i(x);
|
|
111
|
+
if (T === P)
|
|
112
112
|
break;
|
|
113
113
|
b += I[T] || H;
|
|
114
114
|
}
|
|
115
115
|
return b;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
let
|
|
119
|
-
return
|
|
117
|
+
function Zt(o) {
|
|
118
|
+
let s = -1, r = 0;
|
|
119
|
+
return o.forEach((e, l) => {
|
|
120
120
|
if (e = typeof e == "string" ? e : e.props?.children, typeof e == "string") {
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const i = Gt(e);
|
|
122
|
+
i > r && (r = i, s = l);
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), s;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
const
|
|
126
|
+
const te = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`, ee = (o) => {
|
|
127
|
+
const s = Dt(), { current: r } = o;
|
|
128
128
|
A(() => {
|
|
129
|
-
Object.keys(
|
|
130
|
-
(e, [,
|
|
131
|
-
const H = e +
|
|
132
|
-
return
|
|
129
|
+
Object.keys(r).length && !r[U] && (r[U] = Object.entries(r).reduce(
|
|
130
|
+
(e, [, l], i, I) => {
|
|
131
|
+
const H = e + l;
|
|
132
|
+
return i === I.length - 1 ? Math.round(H / I.length) : H;
|
|
133
133
|
},
|
|
134
134
|
0
|
|
135
|
-
),
|
|
136
|
-
}, [Object.keys(
|
|
137
|
-
},
|
|
138
|
-
const
|
|
135
|
+
), s());
|
|
136
|
+
}, [Object.keys(r).length]);
|
|
137
|
+
}, ne = (o) => {
|
|
138
|
+
const s = E({}), r = E(o);
|
|
139
139
|
return A(() => {
|
|
140
|
-
|
|
141
|
-
}, [
|
|
142
|
-
},
|
|
140
|
+
r.current = o;
|
|
141
|
+
}, [o]), o !== r.current && (s.current = {}), (e, l, i) => (Object.prototype.hasOwnProperty.call(s.current, l) || (s.current[l] = o(e, l, i)), s.current[l]);
|
|
142
|
+
}, re = rt.forwardRef((o, s) => {
|
|
143
143
|
const {
|
|
144
|
-
style:
|
|
144
|
+
style: r,
|
|
145
145
|
className: e,
|
|
146
|
-
children:
|
|
147
|
-
data:
|
|
146
|
+
children: l,
|
|
147
|
+
data: i = [],
|
|
148
148
|
itemKey: I,
|
|
149
149
|
threshold: H = 100,
|
|
150
150
|
wrapper: b = "div",
|
|
151
|
-
height:
|
|
151
|
+
height: P = "100%",
|
|
152
152
|
isStaticItemHeight: x = !0,
|
|
153
153
|
itemHeight: T,
|
|
154
|
-
measureLongestItem:
|
|
154
|
+
measureLongestItem: R,
|
|
155
155
|
scrollOptions: z,
|
|
156
156
|
onScroll: st,
|
|
157
157
|
needFiller: Mt = !0,
|
|
@@ -159,18 +159,18 @@ const Zt = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`,
|
|
|
159
159
|
innerStyle: ct,
|
|
160
160
|
wrapperChild: X = rt.Fragment,
|
|
161
161
|
...bt
|
|
162
|
-
} =
|
|
163
|
-
|
|
164
|
-
const L =
|
|
165
|
-
if (
|
|
166
|
-
const t = (
|
|
162
|
+
} = o, B = r && r.maxHeight || P, V = E({}), [_t, Et] = Ft(200), lt = ne(l);
|
|
163
|
+
ee(V);
|
|
164
|
+
const L = i.length, N = T || V.current[U] || te, Y = Tt(B) ? B : _t, w = Math.ceil(Y / N), $ = N * L, _ = H !== null && L >= H && $ > Y, f = E(null), Pt = E({}), O = E(null), D = E(!1), ut = E(_), ft = Ut(() => {
|
|
165
|
+
if (f.current) {
|
|
166
|
+
const t = (n) => +window.getComputedStyle(f.current)[n].replace(/\D/g, "");
|
|
167
167
|
return {
|
|
168
168
|
top: t("paddingTop"),
|
|
169
169
|
bottom: t("paddingBottom")
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
return { top: 0, bottom: 0 };
|
|
173
|
-
}, [
|
|
173
|
+
}, [f.current]), [a, K] = Yt({
|
|
174
174
|
// measure status
|
|
175
175
|
status: "NONE",
|
|
176
176
|
// render range info
|
|
@@ -181,47 +181,47 @@ const Zt = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`,
|
|
|
181
181
|
// scroll info
|
|
182
182
|
startItemTop: 0,
|
|
183
183
|
scrollTop: 0
|
|
184
|
-
}), q =
|
|
185
|
-
if (t ===
|
|
186
|
-
return
|
|
187
|
-
const m =
|
|
184
|
+
}), q = Bt(i) || [], Rt = Kt(), j = (t, n) => typeof I == "function" ? I(t, n) : typeof I == "string" ? t[I] : t.key || n, S = (t, n = i) => {
|
|
185
|
+
if (t === n.length)
|
|
186
|
+
return $t;
|
|
187
|
+
const m = n[t];
|
|
188
188
|
return m !== void 0 ? j(m, t) : null;
|
|
189
|
-
}, M = (t) => V.current[t] || N,
|
|
190
|
-
const { itemIndex:
|
|
189
|
+
}, M = (t) => V.current[t] || N, at = (t) => {
|
|
190
|
+
const { itemIndex: n, relativeTop: m } = t, { scrollHeight: c, clientHeight: d } = f.current, p = a.scrollTop, u = c - d;
|
|
191
191
|
let g = Number.MAX_VALUE, h = null, y = null, C = null, k = null, dt = null, Q = 0;
|
|
192
192
|
for (let Z = 0; Z < u; Z++) {
|
|
193
|
-
const pt =
|
|
193
|
+
const pt = zt(0, u, p, Z), gt = F({
|
|
194
194
|
scrollTop: pt,
|
|
195
|
-
scrollHeight:
|
|
195
|
+
scrollHeight: c,
|
|
196
196
|
clientHeight: d
|
|
197
197
|
}), { itemIndex: tt, itemOffsetPtg: ht, startIndex: et, endIndex: nt } = Ht(
|
|
198
198
|
gt,
|
|
199
199
|
L,
|
|
200
200
|
w
|
|
201
201
|
);
|
|
202
|
-
if (et <=
|
|
203
|
-
const
|
|
202
|
+
if (et <= n && n <= nt) {
|
|
203
|
+
const Lt = W({
|
|
204
204
|
itemHeight: M(S(tt)),
|
|
205
205
|
itemOffsetPtg: ht,
|
|
206
206
|
clientHeight: d,
|
|
207
207
|
scrollPtg: gt
|
|
208
|
-
}),
|
|
209
|
-
locatedItemRelativeTop:
|
|
208
|
+
}), Nt = Qt({
|
|
209
|
+
locatedItemRelativeTop: Lt,
|
|
210
210
|
locatedItemIndex: tt,
|
|
211
|
-
compareItemIndex:
|
|
211
|
+
compareItemIndex: n,
|
|
212
212
|
startIndex: et,
|
|
213
213
|
endIndex: nt,
|
|
214
214
|
itemHeight: N,
|
|
215
215
|
getItemKey: S,
|
|
216
216
|
itemElementHeights: V.current
|
|
217
|
-
}), It = Math.abs(
|
|
217
|
+
}), It = Math.abs(Nt - m);
|
|
218
218
|
It < g ? (g = It, h = pt, y = tt, C = ht, k = et, dt = nt, Q = 0) : Q += 1;
|
|
219
219
|
}
|
|
220
220
|
if (Q > 10)
|
|
221
221
|
break;
|
|
222
222
|
}
|
|
223
|
-
h !== null && (D.current = !0,
|
|
224
|
-
...
|
|
223
|
+
h !== null && (D.current = !0, f.current.scrollTop = h, K({
|
|
224
|
+
...a,
|
|
225
225
|
status: "MEASURE_START",
|
|
226
226
|
scrollTop: h,
|
|
227
227
|
itemIndex: y,
|
|
@@ -231,31 +231,31 @@ const Zt = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`,
|
|
|
231
231
|
})), O.current = requestAnimationFrame(() => {
|
|
232
232
|
D.current = !1;
|
|
233
233
|
});
|
|
234
|
-
},
|
|
234
|
+
}, Ot = (t) => {
|
|
235
235
|
const {
|
|
236
|
-
scrollTop:
|
|
236
|
+
scrollTop: n,
|
|
237
237
|
clientHeight: m,
|
|
238
|
-
scrollHeight:
|
|
239
|
-
} =
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
scrollHeight: c
|
|
239
|
+
} = f.current, d = ot(
|
|
240
|
+
n,
|
|
241
|
+
c - m
|
|
242
242
|
), p = F({
|
|
243
243
|
scrollTop: d,
|
|
244
244
|
clientHeight: m,
|
|
245
|
-
scrollHeight:
|
|
245
|
+
scrollHeight: c
|
|
246
246
|
}), { index: u, offsetPtg: g } = St(p, L);
|
|
247
247
|
K({
|
|
248
|
-
...
|
|
248
|
+
...a,
|
|
249
249
|
scrollTop: d,
|
|
250
250
|
itemIndex: u,
|
|
251
251
|
itemOffsetPtg: g
|
|
252
252
|
}), t && st?.(t, { index: u });
|
|
253
|
-
}, mt = (t,
|
|
254
|
-
const m = $, { scrollTop:
|
|
255
|
-
|
|
253
|
+
}, mt = (t, n = !1) => {
|
|
254
|
+
const m = $, { scrollTop: c, clientHeight: d } = f.current, p = ot(
|
|
255
|
+
c,
|
|
256
256
|
m - d
|
|
257
257
|
);
|
|
258
|
-
if (!
|
|
258
|
+
if (!n && (p === a.scrollTop || D.current))
|
|
259
259
|
return;
|
|
260
260
|
const u = F({
|
|
261
261
|
scrollTop: p,
|
|
@@ -267,7 +267,7 @@ const Zt = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`,
|
|
|
267
267
|
w
|
|
268
268
|
);
|
|
269
269
|
K({
|
|
270
|
-
...
|
|
270
|
+
...a,
|
|
271
271
|
scrollTop: p,
|
|
272
272
|
itemIndex: g,
|
|
273
273
|
itemOffsetPtg: h,
|
|
@@ -279,213 +279,214 @@ const Zt = 32, U = `__virtual_item_height_${Math.random().toFixed(5).slice(2)}`,
|
|
|
279
279
|
A(() => () => {
|
|
280
280
|
O.current && cancelAnimationFrame(O.current);
|
|
281
281
|
}, []), A(() => {
|
|
282
|
-
|
|
282
|
+
f.current && (Rt && (f.current.scrollTop = 0), mt(null, !0));
|
|
283
283
|
}, [w]), A(() => {
|
|
284
|
-
if (!
|
|
284
|
+
if (!f.current)
|
|
285
285
|
return;
|
|
286
286
|
let t = null;
|
|
287
|
-
const
|
|
288
|
-
if (ut.current = _, Y && q.length !==
|
|
289
|
-
const m =
|
|
287
|
+
const n = ut.current !== _ ? _ ? "virtual" : "raw" : "";
|
|
288
|
+
if (ut.current = _, Y && q.length !== i.length) {
|
|
289
|
+
const m = Xt(q, i, j);
|
|
290
290
|
t = m ? m.index : null;
|
|
291
291
|
}
|
|
292
|
-
if (
|
|
293
|
-
const { clientHeight: m } =
|
|
292
|
+
if (n || _ && t) {
|
|
293
|
+
const { clientHeight: m } = f.current, c = W({
|
|
294
294
|
itemHeight: M(
|
|
295
|
-
S(
|
|
295
|
+
S(a.itemIndex, q)
|
|
296
296
|
),
|
|
297
|
-
itemOffsetPtg:
|
|
297
|
+
itemOffsetPtg: a.itemOffsetPtg,
|
|
298
298
|
scrollPtg: F({
|
|
299
|
-
scrollTop:
|
|
299
|
+
scrollTop: a.scrollTop,
|
|
300
300
|
scrollHeight: q.length * N,
|
|
301
301
|
clientHeight: m
|
|
302
302
|
}),
|
|
303
303
|
clientHeight: m
|
|
304
304
|
});
|
|
305
|
-
if (
|
|
306
|
-
let d =
|
|
307
|
-
for (let p = 0; p <
|
|
305
|
+
if (n === "raw") {
|
|
306
|
+
let d = c;
|
|
307
|
+
for (let p = 0; p < a.itemIndex; p++)
|
|
308
308
|
d -= M(S(p));
|
|
309
|
-
|
|
309
|
+
f.current.scrollTop = -d, D.current = !0, O.current = requestAnimationFrame(() => {
|
|
310
310
|
D.current = !1;
|
|
311
311
|
});
|
|
312
312
|
} else
|
|
313
|
-
|
|
314
|
-
itemIndex:
|
|
315
|
-
relativeTop:
|
|
313
|
+
at({
|
|
314
|
+
itemIndex: a.itemIndex,
|
|
315
|
+
relativeTop: c
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
}, [
|
|
319
|
-
if (
|
|
320
|
-
const { scrollTop: t, scrollHeight:
|
|
318
|
+
}, [i, _]), jt(() => {
|
|
319
|
+
if (a.status === "MEASURE_START" && f.current) {
|
|
320
|
+
const { scrollTop: t, scrollHeight: n, clientHeight: m } = f.current, c = F({
|
|
321
321
|
scrollTop: t,
|
|
322
|
-
scrollHeight:
|
|
322
|
+
scrollHeight: n,
|
|
323
323
|
clientHeight: m
|
|
324
324
|
});
|
|
325
|
-
let d =
|
|
326
|
-
scrollPtg:
|
|
325
|
+
let d = Jt({
|
|
326
|
+
scrollPtg: c,
|
|
327
327
|
clientHeight: m,
|
|
328
|
-
scrollTop: t - (
|
|
329
|
-
itemHeight: M(S(
|
|
330
|
-
itemOffsetPtg:
|
|
328
|
+
scrollTop: t - (ft.top + ft.bottom) * c,
|
|
329
|
+
itemHeight: M(S(a.itemIndex)),
|
|
330
|
+
itemOffsetPtg: a.itemOffsetPtg
|
|
331
331
|
});
|
|
332
|
-
for (let p =
|
|
332
|
+
for (let p = a.itemIndex - 1; p >= a.startIndex; p--)
|
|
333
333
|
d -= M(S(p));
|
|
334
334
|
K({
|
|
335
|
-
...
|
|
335
|
+
...a,
|
|
336
336
|
startItemTop: d,
|
|
337
337
|
status: "MEASURE_DONE"
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
}, [
|
|
341
|
-
|
|
340
|
+
}, [a]), Vt(
|
|
341
|
+
s,
|
|
342
342
|
() => ({
|
|
343
|
-
dom:
|
|
344
|
-
getRootDOMNode: () =>
|
|
343
|
+
dom: f.current,
|
|
344
|
+
getRootDOMNode: () => f.current,
|
|
345
345
|
// Scroll to a certain height or an element
|
|
346
346
|
scrollTo: (t) => {
|
|
347
347
|
O.current && cancelAnimationFrame(O.current), O.current = requestAnimationFrame(() => {
|
|
348
|
-
if (!
|
|
349
|
-
return;
|
|
348
|
+
if (!f.current) return;
|
|
350
349
|
if (typeof t == "number") {
|
|
351
|
-
|
|
350
|
+
f.current.scrollTop = t;
|
|
352
351
|
return;
|
|
353
352
|
}
|
|
354
|
-
|
|
353
|
+
let n = 0;
|
|
354
|
+
"index" in t ? n = t.index : "key" in t ? n = i.findIndex(
|
|
355
355
|
(u, g) => j(u, g) === t.key
|
|
356
|
-
) :
|
|
356
|
+
) : n = 0;
|
|
357
|
+
const m = i[n];
|
|
357
358
|
if (!m) return;
|
|
358
|
-
let
|
|
359
|
-
const { clientHeight: d, scrollTop: p } =
|
|
359
|
+
let c = typeof t == "object" && t.options?.block ? t.options.block : z?.block || "nearest";
|
|
360
|
+
const { clientHeight: d, scrollTop: p } = f.current;
|
|
360
361
|
if (_ && !x) {
|
|
361
|
-
if (
|
|
362
|
-
const { itemIndex: u, itemOffsetPtg: g } =
|
|
363
|
-
if (Math.abs(u -
|
|
362
|
+
if (c === "nearest") {
|
|
363
|
+
const { itemIndex: u, itemOffsetPtg: g } = a;
|
|
364
|
+
if (Math.abs(u - n) < w) {
|
|
364
365
|
let h = W({
|
|
365
366
|
itemHeight: M(S(u)),
|
|
366
367
|
itemOffsetPtg: g,
|
|
367
368
|
clientHeight: d,
|
|
368
|
-
scrollPtg: F(
|
|
369
|
+
scrollPtg: F(f.current)
|
|
369
370
|
});
|
|
370
|
-
if (
|
|
371
|
-
for (let y =
|
|
371
|
+
if (n < u)
|
|
372
|
+
for (let y = n; y < u; y++)
|
|
372
373
|
h -= M(S(y));
|
|
373
374
|
else
|
|
374
|
-
for (let y = u; y <
|
|
375
|
+
for (let y = u; y < n; y++)
|
|
375
376
|
h += M(S(y));
|
|
376
377
|
if (h < 0 || h > d)
|
|
377
|
-
|
|
378
|
+
c = h < 0 ? "start" : "end";
|
|
378
379
|
else
|
|
379
380
|
return;
|
|
380
381
|
} else
|
|
381
|
-
|
|
382
|
+
c = n < u ? "start" : "end";
|
|
382
383
|
}
|
|
383
384
|
K({
|
|
384
|
-
...
|
|
385
|
-
startIndex: Math.max(0,
|
|
386
|
-
endIndex: Math.min(L - 1,
|
|
385
|
+
...a,
|
|
386
|
+
startIndex: Math.max(0, n - w),
|
|
387
|
+
endIndex: Math.min(L - 1, n + w)
|
|
387
388
|
}).then(() => {
|
|
388
|
-
const u = M(j(m,
|
|
389
|
-
|
|
390
|
-
itemIndex:
|
|
391
|
-
relativeTop:
|
|
389
|
+
const u = M(j(m, n));
|
|
390
|
+
at({
|
|
391
|
+
itemIndex: n,
|
|
392
|
+
relativeTop: c === "start" ? 0 : (d - u) / (c === "center" ? 2 : 1)
|
|
392
393
|
});
|
|
393
394
|
});
|
|
394
395
|
} else {
|
|
395
396
|
const u = M(
|
|
396
|
-
S(
|
|
397
|
+
S(n)
|
|
397
398
|
);
|
|
398
399
|
let g = 0;
|
|
399
|
-
for (let k = 0; k <
|
|
400
|
+
for (let k = 0; k < n; k++)
|
|
400
401
|
g += M(S(k));
|
|
401
402
|
const h = g + u, y = g + u / 2;
|
|
402
403
|
if (y > p && y < d + p)
|
|
403
404
|
return;
|
|
404
|
-
|
|
405
|
+
c === "nearest" && (g < p ? c = "start" : h > p + d && (c = "end"));
|
|
405
406
|
const C = d - u;
|
|
406
|
-
|
|
407
|
+
f.current.scrollTop = g - (c === "start" ? 0 : C / (c === "center" ? 2 : 1));
|
|
407
408
|
}
|
|
408
409
|
});
|
|
409
410
|
}
|
|
410
411
|
}),
|
|
411
|
-
[
|
|
412
|
+
[i, N, a]
|
|
412
413
|
);
|
|
413
|
-
const J = (t,
|
|
414
|
-
const d =
|
|
414
|
+
const J = (t, n = 0) => t.map((m, c) => {
|
|
415
|
+
const d = n + c, p = lt(m, d, {
|
|
415
416
|
style: {},
|
|
416
|
-
itemIndex:
|
|
417
|
+
itemIndex: c
|
|
417
418
|
}), u = j(m, d);
|
|
418
419
|
return rt.cloneElement(p, {
|
|
419
420
|
key: u,
|
|
420
421
|
ref: (g) => {
|
|
421
422
|
const { current: h } = V;
|
|
422
|
-
g &&
|
|
423
|
+
g && (Pt.current[c] = g, a.status === "MEASURE_START" && (!x || h[u] === void 0) && (x ? (h[U] || (h[U] = yt(g, !0)), h[u] = h[U]) : h[u] = yt(g, !0))), kt(p?.ref) && p?.ref(g);
|
|
423
424
|
}
|
|
424
425
|
});
|
|
425
|
-
}), G =
|
|
426
|
+
}), G = E(null);
|
|
426
427
|
A(() => {
|
|
427
428
|
G.current = null;
|
|
428
|
-
}, [
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const t = G.current === null ?
|
|
432
|
-
return G.current = t,
|
|
429
|
+
}, [i]);
|
|
430
|
+
const vt = () => {
|
|
431
|
+
if (R) {
|
|
432
|
+
const t = G.current === null ? Zt(i) : G.current, n = i[t];
|
|
433
|
+
return G.current = t, n ? /* @__PURE__ */ v("div", { style: { height: 1, overflow: "hidden", opacity: 0 }, children: lt(n, t, { style: {} }) }) : null;
|
|
433
434
|
}
|
|
434
435
|
return null;
|
|
435
436
|
};
|
|
436
|
-
function
|
|
437
|
-
if (
|
|
438
|
-
const { clientHeight: t } =
|
|
437
|
+
function At() {
|
|
438
|
+
if (f.current && !Tt(B)) {
|
|
439
|
+
const { clientHeight: t } = f.current;
|
|
439
440
|
Et(t);
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
443
|
return A(() => {
|
|
443
|
-
const t =
|
|
444
|
+
const t = qt([f.current], At);
|
|
444
445
|
return () => {
|
|
445
446
|
t();
|
|
446
447
|
};
|
|
447
|
-
}, [
|
|
448
|
+
}, [f.current]), /* @__PURE__ */ v(
|
|
448
449
|
b,
|
|
449
450
|
{
|
|
450
|
-
ref:
|
|
451
|
+
ref: f,
|
|
451
452
|
style: {
|
|
452
453
|
overflowY: "auto",
|
|
453
454
|
scrollSnapType: "y mandatory",
|
|
454
455
|
overflowAnchor: "none",
|
|
455
|
-
...
|
|
456
|
+
...r,
|
|
456
457
|
maxHeight: B
|
|
457
458
|
},
|
|
458
459
|
className: e,
|
|
459
|
-
onScroll: _ ? mt :
|
|
460
|
+
onScroll: _ ? mt : Ot,
|
|
460
461
|
...bt,
|
|
461
|
-
children: _ ? /* @__PURE__ */
|
|
462
|
+
children: _ ? /* @__PURE__ */ wt(Ct, { children: [
|
|
462
463
|
/* @__PURE__ */ v(
|
|
463
464
|
xt,
|
|
464
465
|
{
|
|
465
466
|
height: $,
|
|
466
467
|
outerStyle: it,
|
|
467
468
|
innerStyle: ct,
|
|
468
|
-
offset:
|
|
469
|
+
offset: a.status === "MEASURE_DONE" ? a.startItemTop : 0,
|
|
469
470
|
children: /* @__PURE__ */ v(X, { children: J(
|
|
470
|
-
|
|
471
|
-
|
|
471
|
+
i.slice(a.startIndex, a.endIndex + 1),
|
|
472
|
+
a.startIndex
|
|
472
473
|
) })
|
|
473
474
|
}
|
|
474
475
|
),
|
|
475
|
-
|
|
476
|
+
vt()
|
|
476
477
|
] }) : Mt ? /* @__PURE__ */ v(
|
|
477
478
|
xt,
|
|
478
479
|
{
|
|
479
480
|
height: Y,
|
|
480
481
|
outerStyle: it,
|
|
481
482
|
innerStyle: ct,
|
|
482
|
-
children: /* @__PURE__ */ v(X, { children: J(
|
|
483
|
+
children: /* @__PURE__ */ v(X, { children: J(i, 0) })
|
|
483
484
|
}
|
|
484
|
-
) : /* @__PURE__ */ v(X, { children: J(
|
|
485
|
+
) : /* @__PURE__ */ v(X, { children: J(i, 0) })
|
|
485
486
|
}
|
|
486
487
|
);
|
|
487
488
|
});
|
|
488
|
-
|
|
489
|
+
re.displayName = "VirtualList";
|
|
489
490
|
export {
|
|
490
|
-
|
|
491
|
+
re as default
|
|
491
492
|
};
|