@unicom-cloud/ui 0.8.109 → 0.8.110
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 +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- 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 +6 -4
- package/Countdown.js +42 -8
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +42 -6
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +43 -7
- package/Form.js +21 -16
- 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 +2 -2
- package/LiquidFill.js +12 -10
- package/List.js +1 -1
- package/Loading.js +42 -6
- package/Marquee.js +12 -10
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +41 -5
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +12 -10
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +76 -0
- package/Segmented.js +42 -7
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +43 -7
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +2 -2
- package/Tooltip.js +1 -1
- package/Tour.js +13 -11
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/affix/index.js +2 -2
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +2 -2
- 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 +2 -2
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +3 -3
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +2 -2
- 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/BDMqvmVH.js +4239 -0
- package/chunk/BDgzrqDN.js +154 -0
- package/chunk/BG6j6Ct7.js +30 -0
- package/chunk/BGJspFG9.js +56 -0
- package/chunk/BO_5qdS_.js +13 -0
- package/chunk/{DblEjsQ8.js → BUNoUPLs.js} +1 -1
- package/chunk/B_c0gPsX.js +83 -0
- package/chunk/BcEZk8pT.js +837 -0
- package/chunk/{DGSfSsAY.js → BeHcDey_.js} +1 -1
- package/chunk/{Bm3gJPkz.js → BnUWOu3_.js} +5 -5
- package/chunk/Bvxzb1wd.js +16 -0
- package/chunk/{DryCfcSV.js → CFyN9Eio.js} +4 -4
- package/chunk/CN7NKv_2.js +11 -0
- package/chunk/COc48wzV.js +64 -0
- package/chunk/{BDKb_-wj.js → COsRZOz1.js} +4 -4
- package/chunk/CT7ury1Z.js +13 -0
- package/chunk/Ca6eMq_Y.js +8 -0
- package/chunk/{p9jiLDTk.js → CgN4U7Ou.js} +2 -2
- package/chunk/{Bg3uJGPu.js → CsqGBZv1.js} +1 -1
- package/chunk/CylJZkp8.js +6 -0
- package/chunk/{9WWq1a0I.js → DSqW_efI.js} +1 -1
- package/chunk/{Bz3KT4sO.js → Dbw0YUY1.js} +81 -47
- package/chunk/Dh-zFF65.js +15 -0
- package/chunk/Di5KBCVQ.js +4 -0
- package/chunk/{DjPTURUf.js → Lyh0cz3R.js} +3 -3
- package/chunk/{DgWzb7M5.js → Y_GQsZUt.js} +1 -1
- package/chunk/{BfBHo0RR.js → n1tirBXA.js} +7 -7
- package/chunk/{DYc9a7tm.js → qsVvkBLU.js} +1 -1
- package/chunk/zFFM4RBT.js +2100 -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 +10 -8
- package/countdown/index.js +67 -33
- 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 +74 -38
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +63 -29
- package/form/Form.js +3 -3
- package/form/FormItem.js +1 -1
- package/form/index.js +85 -77
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +128 -133
- package/hooks/useCreation.js +4 -0
- package/hooks/useId.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWatch.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +3 -3
- package/image/ImagePreview.js +44 -9
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +718 -717
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +3 -3
- package/input/InputElement.js +2 -2
- package/input/Password.js +2 -2
- package/input/Search.js +1 -1
- package/input/Textarea.js +2 -2
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-tag/InputTag.js +1 -1
- 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 +2 -2
- package/liquid-fill/index.js +17 -15
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +54 -18
- package/marquee/index.js +19 -17
- package/marquee-/index.js +17 -15
- package/mentions/index.js +1 -1
- package/menu/Menu.js +4 -4
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +4 -3
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +41 -5
- package/notification/index.js +1 -1
- 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 +120 -81
- package/pagination/PageItem.js +2 -2
- 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 +2 -2
- package/progress/index.js +1 -1
- package/qr-code/index.js +15 -13
- 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 +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/constant.js +5 -0
- package/rich-text/core.js +11 -0
- package/rich-text/eventemitter/index.d.ts +135 -0
- package/rich-text/index.js +182 -0
- package/rich-text/interface.js +1 -0
- package/rich-text/rich.js +1877 -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 +145 -110
- package/select/Option.js +1 -1
- package/select/Select.js +235 -227
- package/select-view/Core.js +2 -2
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/index.js +1 -1
- package/space/index.js +51 -15
- 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 +1 -1
- package/table/Table.js +3 -3
- package/table/index.js +41 -39
- 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 +2 -2
- 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 +20 -18
- package/transfer/Item.js +3 -3
- package/transfer/List.js +3 -3
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- 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 +4 -4
- package/tree-select/index.js +1 -1
- package/trigger/index.js +1 -1
- package/types/common/hooks/src/index.d.ts +1 -5
- package/types/common/hooks/src/use-url-state/index.d.ts +1 -1
- package/types/common/hooks/useId.d.ts +1 -1
- package/types/common/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
- package/types/common/hooks/useKeyboardEvent.d.ts +1 -1
- package/types/common/hooks/{useListenResize.d.ts → useListenWindowResize.d.ts} +4 -6
- package/types/common/hooks/useWatch.d.ts +1 -1
- package/types/common/hooks/useWindowSize.d.ts +2 -2
- package/types/common/utils/index.d.ts +47 -0
- package/types/common/utils/keyboardCode.d.ts +4 -0
- package/types/common/utils/math.d.ts +1 -0
- package/types/common/utils/mitt.d.ts +1 -0
- package/types/common/utils/pinyin.d.ts +1 -0
- package/types/common/utils/reactTransitionGroup.d.ts +1 -0
- package/types/common/utils/uuid.d.ts +1 -0
- package/types/common/utils/validate.d.ts +1 -0
- package/types/pc/config-provider/interface.d.ts +2 -0
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/form/index.d.ts +6 -1
- package/types/pc/hooks/index.d.ts +2 -2
- package/types/pc/hooks/useCreation.d.ts +1 -0
- package/types/pc/hooks/useListenWindowResize.d.ts +1 -0
- package/types/pc/index.d.ts +2 -0
- package/types/pc/message/index.d.ts +1 -0
- package/types/pc/message/interface.d.ts +2 -2
- package/types/pc/page-header/interface.d.ts +3 -0
- package/types/pc/rich-text/blots/block.d.ts +34 -0
- package/types/pc/rich-text/blots/break.d.ts +8 -0
- package/types/pc/rich-text/blots/container.d.ts +4 -0
- package/types/pc/rich-text/blots/cursor.d.ts +26 -0
- package/types/pc/rich-text/blots/embed.d.ts +18 -0
- package/types/pc/rich-text/blots/inline.d.ts +12 -0
- package/types/pc/rich-text/blots/scroll.d.ts +49 -0
- package/types/pc/rich-text/blots/text.d.ts +5 -0
- package/types/pc/rich-text/constant.d.ts +1 -0
- package/types/pc/rich-text/core/composition.d.ts +12 -0
- package/types/pc/rich-text/core/editor.d.ts +28 -0
- package/types/pc/rich-text/core/emitter.d.ts +37 -0
- package/types/pc/rich-text/core/instances.d.ts +3 -0
- package/types/pc/rich-text/core/logger.d.ts +7 -0
- package/types/pc/rich-text/core/module.d.ts +8 -0
- package/types/pc/rich-text/core/rich.d.ts +217 -0
- package/types/pc/rich-text/core/selection.d.ts +74 -0
- package/types/pc/rich-text/core/theme.d.ts +32 -0
- package/types/pc/rich-text/core/utils/createRegistryWithFormats.d.ts +5 -0
- package/types/pc/rich-text/core/utils/scrollRectIntoView.d.ts +11 -0
- package/types/pc/rich-text/core.d.ts +7 -0
- package/types/pc/rich-text/delta/AttributeMap.d.ts +10 -0
- package/types/pc/rich-text/delta/Op.d.ts +11 -0
- package/types/pc/rich-text/delta/OpIterator.d.ts +13 -0
- package/types/pc/rich-text/delta/index.d.ts +45 -0
- package/types/pc/rich-text/eventemitter/index.d.ts +101 -0
- package/types/pc/rich-text/formats/align.d.ts +5 -0
- package/types/pc/rich-text/formats/background.d.ts +5 -0
- package/types/pc/rich-text/formats/blockquote.d.ts +6 -0
- package/types/pc/rich-text/formats/bold.d.ts +11 -0
- package/types/pc/rich-text/formats/code.d.ts +15 -0
- package/types/pc/rich-text/formats/color.d.ts +7 -0
- package/types/pc/rich-text/formats/direction.d.ts +5 -0
- package/types/pc/rich-text/formats/font.d.ts +7 -0
- package/types/pc/rich-text/formats/formula.d.ts +10 -0
- package/types/pc/rich-text/formats/header.d.ts +7 -0
- package/types/pc/rich-text/formats/image.d.ts +13 -0
- package/types/pc/rich-text/formats/indent.d.ts +8 -0
- package/types/pc/rich-text/formats/italic.d.ts +6 -0
- package/types/pc/rich-text/formats/link.d.ts +13 -0
- package/types/pc/rich-text/formats/list.d.ts +13 -0
- package/types/pc/rich-text/formats/script.d.ts +8 -0
- package/types/pc/rich-text/formats/size.d.ts +4 -0
- package/types/pc/rich-text/formats/strike.d.ts +6 -0
- package/types/pc/rich-text/formats/table.d.ts +45 -0
- package/types/pc/rich-text/formats/underline.d.ts +6 -0
- package/types/pc/rich-text/formats/video.d.ts +14 -0
- package/types/pc/rich-text/index.d.ts +6 -0
- package/types/pc/rich-text/interface.d.ts +17 -0
- package/types/pc/rich-text/modules/clipboard.d.ts +43 -0
- package/types/pc/rich-text/modules/history.d.ts +36 -0
- package/types/pc/rich-text/modules/input.d.ts +10 -0
- package/types/pc/rich-text/modules/keyboard.d.ts +58 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/index.d.ts +2 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
- package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
- package/types/pc/rich-text/modules/syntax.d.ts +50 -0
- package/types/pc/rich-text/modules/table.d.ts +20 -0
- package/types/pc/rich-text/modules/tableEmbed.d.ts +27 -0
- package/types/pc/rich-text/modules/toolbar.d.ts +24 -0
- package/types/pc/rich-text/modules/uiNode.d.ts +19 -0
- package/types/pc/rich-text/modules/uploader.d.ts +15 -0
- package/types/pc/rich-text/parchment/attributor/attributor.d.ts +17 -0
- package/types/pc/rich-text/parchment/attributor/class.d.ts +8 -0
- package/types/pc/rich-text/parchment/attributor/store.d.ts +15 -0
- package/types/pc/rich-text/parchment/attributor/style.d.ts +8 -0
- package/types/pc/rich-text/parchment/blot/abstract/blot.d.ts +115 -0
- package/types/pc/rich-text/parchment/blot/abstract/container.d.ts +18 -0
- package/types/pc/rich-text/parchment/blot/abstract/leaf.d.ts +29 -0
- package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +50 -0
- package/types/pc/rich-text/parchment/blot/abstract/shadow.d.ts +37 -0
- package/types/pc/rich-text/parchment/blot/block.d.ts +25 -0
- package/types/pc/rich-text/parchment/blot/embed.d.ts +11 -0
- package/types/pc/rich-text/parchment/blot/inline.d.ts +28 -0
- package/types/pc/rich-text/parchment/blot/scroll.d.ts +34 -0
- package/types/pc/rich-text/parchment/blot/text.d.ts +26 -0
- package/types/pc/rich-text/parchment/collection/linked-list.d.ts +21 -0
- package/types/pc/rich-text/parchment/collection/linked-node.d.ts +6 -0
- package/types/pc/rich-text/parchment/error.d.ts +6 -0
- package/types/pc/rich-text/parchment/index.d.ts +21 -0
- package/types/pc/rich-text/parchment/registry.d.ts +21 -0
- package/types/pc/rich-text/parchment/scope.d.ts +14 -0
- package/types/pc/rich-text/rich.d.ts +5 -0
- package/types/pc/rich-text/themes/base.d.ts +35 -0
- package/types/pc/rich-text/themes/bubble.d.ts +18 -0
- package/types/pc/rich-text/themes/snow.d.ts +9 -0
- package/types/pc/rich-text/ui/color-picker.d.ts +7 -0
- package/types/pc/rich-text/ui/icon-picker.d.ts +7 -0
- package/types/pc/rich-text/ui/icons.d.ts +51 -0
- package/types/pc/rich-text/ui/picker.d.ts +16 -0
- package/types/pc/rich-text/ui/tooltip.d.ts +12 -0
- package/types/pc/select/interface.d.ts +4 -0
- package/types/pc/utils/index.d.ts +2 -0
- package/types/pc/utils/mitt.d.ts +1 -0
- package/types/pc/utils/names.d.ts +107 -91
- package/types/pc/utils/pinyin.d.ts +1 -0
- package/types/pc/version/index.d.ts +1 -1
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +5 -3
- package/typography/Operations.js +6 -4
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +2 -2
- package/upload/Upload.js +2 -2
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +167 -163
- package/utils/mitt.js +5 -0
- package/utils/names.js +12 -2
- package/utils/pinyin.js +5 -0
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +2 -2
- package/watermark/Watermark.js +1 -1
- package/chunk/5_U1CBIu.js +0 -8
- package/chunk/B9YvSTvI.js +0 -2321
- package/chunk/BLOlsa0k.js +0 -11
- package/chunk/BTLlOOe9.js +0 -189
- package/chunk/C6Aw3qIJ.js +0 -16
- package/chunk/CMl7m9nA.js +0 -6
- package/chunk/COqvRD0G.js +0 -11
- package/chunk/DXlwLh0Y.js +0 -806
- package/chunk/DlSv5Vu0.js +0 -16
- package/chunk/DmDh7NRL.js +0 -14
- package/chunk/Duezix3m.js +0 -25
- package/chunk/siEVY1s5.js +0 -33
- package/hooks/useCreate.js +0 -4
- package/types/common/hooks/src/use-dynamic-list/index.d.ts +0 -18
- package/types/common/hooks/src/use-event-emitter/index.d.ts +0 -11
- package/types/common/hooks/src/use-map/index.d.ts +0 -8
- package/types/common/hooks/src/use-set/index.d.ts +0 -6
- package/types/common/hooks/useCreate.d.ts +0 -2
- package/types/pc/hooks/useCreate.d.ts +0 -1
- package/types/pc/hooks/useListenResize.d.ts +0 -1
- /package/hooks/{useListenResize.js → useListenWindowResize.js} +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { useRef as f, useEffect as b, useState as L } from "react";
|
|
2
|
+
import { u as h } from "./DfChiMIE.js";
|
|
3
|
+
import { i as d } from "./Di5KBCVQ.js";
|
|
4
|
+
import "./DsaQZE4X.js";
|
|
5
|
+
import { isFunction as E } from "@unicom-cloud/utils/is";
|
|
6
|
+
import { i as x } from "./CdXR6dj7.js";
|
|
7
|
+
import { d as p } from "./CN7NKv_2.js";
|
|
8
|
+
function A(e) {
|
|
9
|
+
const t = f(e);
|
|
10
|
+
return t.current = e, t;
|
|
11
|
+
}
|
|
12
|
+
function R(e, t) {
|
|
13
|
+
if (!d)
|
|
14
|
+
return;
|
|
15
|
+
if (!e)
|
|
16
|
+
return t;
|
|
17
|
+
let n;
|
|
18
|
+
return E(e) ? n = e() : "current" in e ? n = e.current : n = e, n;
|
|
19
|
+
}
|
|
20
|
+
const T = (e) => {
|
|
21
|
+
x && (E(e) || console.error(
|
|
22
|
+
`useUnmount expected parameter is a function, got ${typeof e}`
|
|
23
|
+
));
|
|
24
|
+
const t = A(e);
|
|
25
|
+
b(
|
|
26
|
+
() => () => {
|
|
27
|
+
t.current();
|
|
28
|
+
},
|
|
29
|
+
[]
|
|
30
|
+
);
|
|
31
|
+
}, y = (e) => (n, s, u) => {
|
|
32
|
+
const i = f(!1), r = f([]), c = f([]), o = f(void 0);
|
|
33
|
+
e(() => {
|
|
34
|
+
const l = (Array.isArray(u) ? u : [u]).map((N) => R(N));
|
|
35
|
+
if (!i.current) {
|
|
36
|
+
i.current = !0, r.current = l, c.current = s, o.current = n();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
(l.length !== r.current.length || !p(r.current, l) || !p(c.current, s)) && (o.current?.(), r.current = l, c.current = s, o.current = n());
|
|
40
|
+
}), T(() => {
|
|
41
|
+
o.current?.(), i.current = !1;
|
|
42
|
+
});
|
|
43
|
+
}, W = y(b), B = (e, {
|
|
44
|
+
manual: t,
|
|
45
|
+
ready: n = !0,
|
|
46
|
+
defaultParams: s = [],
|
|
47
|
+
refreshDeps: u = [],
|
|
48
|
+
refreshDepsAction: i
|
|
49
|
+
}) => {
|
|
50
|
+
const r = f(!1);
|
|
51
|
+
return r.current = !1, h(() => {
|
|
52
|
+
!t && n && (r.current = !0, e.run(...s));
|
|
53
|
+
}, [n]), h(() => {
|
|
54
|
+
r.current || t || (r.current = !0, i ? i() : e.refresh());
|
|
55
|
+
}, [...u]), {
|
|
56
|
+
onBefore: () => {
|
|
57
|
+
if (!n)
|
|
58
|
+
return {
|
|
59
|
+
stopNow: !0
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
B.onInit = ({ ready: e = !0, manual: t }) => ({
|
|
65
|
+
loading: !t && e
|
|
66
|
+
});
|
|
67
|
+
function S() {
|
|
68
|
+
return d ? document.visibilityState !== "hidden" : !0;
|
|
69
|
+
}
|
|
70
|
+
const m = /* @__PURE__ */ new Set();
|
|
71
|
+
function P(e) {
|
|
72
|
+
return m.add(e), function() {
|
|
73
|
+
m.has(e) && m.delete(e);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (d) {
|
|
77
|
+
const e = () => {
|
|
78
|
+
S() && m.forEach((t) => t());
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener("visibilitychange", e, !1);
|
|
81
|
+
}
|
|
82
|
+
const O = () => d && typeof navigator.onLine < "u" ? navigator.onLine : !0, g = /* @__PURE__ */ new Set();
|
|
83
|
+
function V(e) {
|
|
84
|
+
return g.add(e), function() {
|
|
85
|
+
g.has(e) && g.delete(e);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (d) {
|
|
89
|
+
const e = () => {
|
|
90
|
+
!S() || !O() || g.forEach((t) => t());
|
|
91
|
+
};
|
|
92
|
+
window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
|
|
93
|
+
}
|
|
94
|
+
const w = {
|
|
95
|
+
top: NaN,
|
|
96
|
+
left: NaN,
|
|
97
|
+
bottom: NaN,
|
|
98
|
+
right: NaN,
|
|
99
|
+
height: NaN,
|
|
100
|
+
width: NaN
|
|
101
|
+
}, v = {
|
|
102
|
+
text: "",
|
|
103
|
+
...w
|
|
104
|
+
};
|
|
105
|
+
function U(e) {
|
|
106
|
+
if (!e || e.rangeCount < 1)
|
|
107
|
+
return w;
|
|
108
|
+
const t = e.getRangeAt(0), { height: n, width: s, top: u, left: i, right: r, bottom: c } = t.getBoundingClientRect();
|
|
109
|
+
return {
|
|
110
|
+
height: n,
|
|
111
|
+
width: s,
|
|
112
|
+
top: u,
|
|
113
|
+
left: i,
|
|
114
|
+
right: r,
|
|
115
|
+
bottom: c
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function k(e) {
|
|
119
|
+
const [t, n] = L(v), s = f(t), u = f(!1);
|
|
120
|
+
return s.current = t, W(
|
|
121
|
+
() => {
|
|
122
|
+
const i = R(e, document);
|
|
123
|
+
if (!i)
|
|
124
|
+
return;
|
|
125
|
+
const r = () => {
|
|
126
|
+
let o = null, a = "", l = w;
|
|
127
|
+
window.getSelection && (o = window.getSelection(), a = o ? o.toString() : "", a && u.current && (l = U(o), n({ ...t, text: a, ...l })));
|
|
128
|
+
}, c = (o) => {
|
|
129
|
+
if (o.button === 2 || !window.getSelection)
|
|
130
|
+
return;
|
|
131
|
+
s.current.text && n({ ...v }), u.current = !1;
|
|
132
|
+
const a = window.getSelection();
|
|
133
|
+
a && (a.removeAllRanges(), u.current = i.contains(o.target));
|
|
134
|
+
};
|
|
135
|
+
return i.addEventListener("mouseup", r), document.addEventListener("mousedown", c), () => {
|
|
136
|
+
i.removeEventListener("mouseup", r), document.removeEventListener("mousedown", c);
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
[],
|
|
140
|
+
e
|
|
141
|
+
), t;
|
|
142
|
+
}
|
|
143
|
+
export {
|
|
144
|
+
k as a,
|
|
145
|
+
T as b,
|
|
146
|
+
W as c,
|
|
147
|
+
V as d,
|
|
148
|
+
B as e,
|
|
149
|
+
y as f,
|
|
150
|
+
R as g,
|
|
151
|
+
S as i,
|
|
152
|
+
P as s,
|
|
153
|
+
A as u
|
|
154
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useState as u, useEffect as s } from "react";
|
|
2
|
+
function m(o) {
|
|
3
|
+
const [t, r] = u({
|
|
4
|
+
value: o,
|
|
5
|
+
resolve: (e) => {
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
return s(() => {
|
|
9
|
+
const e = window.requestAnimationFrame(() => {
|
|
10
|
+
t.resolve(t.value);
|
|
11
|
+
});
|
|
12
|
+
return () => {
|
|
13
|
+
window.cancelAnimationFrame(e);
|
|
14
|
+
};
|
|
15
|
+
}, [t]), [
|
|
16
|
+
t.value,
|
|
17
|
+
(e) => new Promise((a) => {
|
|
18
|
+
r((i) => {
|
|
19
|
+
let n = e;
|
|
20
|
+
return typeof e == "function" && (n = e(i.value)), {
|
|
21
|
+
value: n,
|
|
22
|
+
resolve: a
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
m as u
|
|
30
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import o from "react";
|
|
2
|
+
import "@unicom-cloud/utils/date";
|
|
3
|
+
import "@unicom-cloud/utils/case-name";
|
|
4
|
+
import "@unicom-cloud/utils/class-name";
|
|
5
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
6
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
7
|
+
import "./DS_deHpN.js";
|
|
8
|
+
import "./d1c9z8T1.js";
|
|
9
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
10
|
+
import "react/jsx-runtime";
|
|
11
|
+
import "lodash/escapeRegExp";
|
|
12
|
+
import "lodash/isArray";
|
|
13
|
+
import "lodash/isNumber";
|
|
14
|
+
import "lodash/isString";
|
|
15
|
+
import "lodash/isFunction";
|
|
16
|
+
import "lodash/throttle";
|
|
17
|
+
import "./DsaQZE4X.js";
|
|
18
|
+
import "lodash/camelCase";
|
|
19
|
+
import "lodash/capitalize";
|
|
20
|
+
import "lodash/cloneDeep";
|
|
21
|
+
import "lodash/debounce";
|
|
22
|
+
import "lodash/get";
|
|
23
|
+
import "lodash/has";
|
|
24
|
+
import "lodash/kebabCase";
|
|
25
|
+
import "lodash/merge";
|
|
26
|
+
import "lodash/mergeWith";
|
|
27
|
+
import "lodash/set";
|
|
28
|
+
import "lodash/setWith";
|
|
29
|
+
import "lodash/snakeCase";
|
|
30
|
+
import "lodash/startCase";
|
|
31
|
+
import "lodash/uniq";
|
|
32
|
+
import "lodash/upperFirst";
|
|
33
|
+
import "@unicom-cloud/utils/math";
|
|
34
|
+
import "lodash/isPlainObject";
|
|
35
|
+
import "@unicom-cloud/utils/mitt";
|
|
36
|
+
import "@unicom-cloud/utils/pinyin";
|
|
37
|
+
import "./BJ9_azwQ.js";
|
|
38
|
+
import "./CXrVhA6-.js";
|
|
39
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
40
|
+
import "@unicom-cloud/utils/screenfull";
|
|
41
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
42
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
43
|
+
import "@unicom-cloud/utils/ui-color";
|
|
44
|
+
import "react-is";
|
|
45
|
+
import "@unicom-cloud/utils/tree";
|
|
46
|
+
import { isString as i } from "@unicom-cloud/utils/is";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "./hc_ufgVf.js";
|
|
49
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
50
|
+
function _(r) {
|
|
51
|
+
const t = o.useId();
|
|
52
|
+
return i(r) ? `${r}-${t}` : t;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
_ as u
|
|
56
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRef as r } from "react";
|
|
2
|
+
import { d as t } from "./CN7NKv_2.js";
|
|
3
|
+
const n = (o, e) => {
|
|
4
|
+
const { current: i } = r({
|
|
5
|
+
deps: e,
|
|
6
|
+
obj: void 0,
|
|
7
|
+
initialized: !1
|
|
8
|
+
});
|
|
9
|
+
return (i.initialized === !1 || !t(i.deps, e)) && (i.deps = e, i.obj = o(), i.initialized = !0), i.obj;
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
n as u
|
|
13
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as x, Fragment as H } from "react/jsx-runtime";
|
|
|
2
2
|
import T from "lodash/isFunction";
|
|
3
3
|
import L from "lodash/isNil";
|
|
4
4
|
import Q, { createContext as S, useContext as y, useRef as q } from "react";
|
|
5
|
-
import { a as B, I as J } from "./
|
|
5
|
+
import { a as B, I as J } from "./BcEZk8pT.js";
|
|
6
6
|
import { u as E } from "./FgWHhRFz.js";
|
|
7
7
|
import { u as j } from "./2vdCeheu.js";
|
|
8
8
|
import R from "@unicom-cloud/utils/class-name";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import s from "lodash/debounce";
|
|
2
|
+
import { useState as c, useDeferredValue as f, useMemo as a, useEffect as l } from "react";
|
|
3
|
+
import "@unicom-cloud/utils/date";
|
|
4
|
+
import "@unicom-cloud/utils/case-name";
|
|
5
|
+
import "@unicom-cloud/utils/class-name";
|
|
6
|
+
import "@unicom-cloud/utils/constant/ui";
|
|
7
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
8
|
+
import "./DS_deHpN.js";
|
|
9
|
+
import "./d1c9z8T1.js";
|
|
10
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
11
|
+
import "react/jsx-runtime";
|
|
12
|
+
import "lodash/escapeRegExp";
|
|
13
|
+
import "lodash/isArray";
|
|
14
|
+
import "lodash/isNumber";
|
|
15
|
+
import "lodash/isString";
|
|
16
|
+
import "lodash/isFunction";
|
|
17
|
+
import "lodash/throttle";
|
|
18
|
+
import "./DsaQZE4X.js";
|
|
19
|
+
import "lodash/camelCase";
|
|
20
|
+
import "lodash/capitalize";
|
|
21
|
+
import "lodash/cloneDeep";
|
|
22
|
+
import "lodash/get";
|
|
23
|
+
import "lodash/has";
|
|
24
|
+
import "lodash/kebabCase";
|
|
25
|
+
import "lodash/merge";
|
|
26
|
+
import "lodash/mergeWith";
|
|
27
|
+
import "lodash/set";
|
|
28
|
+
import "lodash/setWith";
|
|
29
|
+
import "lodash/snakeCase";
|
|
30
|
+
import "lodash/startCase";
|
|
31
|
+
import "lodash/uniq";
|
|
32
|
+
import "lodash/upperFirst";
|
|
33
|
+
import "@unicom-cloud/utils/math";
|
|
34
|
+
import "lodash/isPlainObject";
|
|
35
|
+
import "@unicom-cloud/utils/mitt";
|
|
36
|
+
import "@unicom-cloud/utils/pinyin";
|
|
37
|
+
import "./BJ9_azwQ.js";
|
|
38
|
+
import "./CXrVhA6-.js";
|
|
39
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
40
|
+
import "@unicom-cloud/utils/screenfull";
|
|
41
|
+
import "@unicom-cloud/utils/constant/ui.js";
|
|
42
|
+
import "@unicom-cloud/utils/tinycolor";
|
|
43
|
+
import "@unicom-cloud/utils/ui-color";
|
|
44
|
+
import "react-is";
|
|
45
|
+
import "@unicom-cloud/utils/tree";
|
|
46
|
+
import { isFunction as d } from "@unicom-cloud/utils/is";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "./hc_ufgVf.js";
|
|
49
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
50
|
+
import { u as h } from "./BL9DMeor.js";
|
|
51
|
+
function at(m = !1) {
|
|
52
|
+
const [e, p] = c({
|
|
53
|
+
...i(null)
|
|
54
|
+
}), n = f(
|
|
55
|
+
e
|
|
56
|
+
// 延迟一个值与防抖和节流之间有什么不同?
|
|
57
|
+
// 防抖(Debounce) 是指在用户停止输入一段时间(例如一秒钟)之后再更新列表。
|
|
58
|
+
// 节流(Throttle) 是指每隔一段时间(例如最多每秒一次)更新列表。
|
|
59
|
+
// 虽然这些技术在某些情况下是有用的,但 useDeferredValue 更适合优化渲染,因为它与 React 自身深度集成,并且能够适应用户的设备。
|
|
60
|
+
// 与防抖或节流不同,useDeferredValue 不需要选择任何固定延迟时间。如果用户的设备很快(比如性能强劲的笔记本电脑),延迟的重渲染几乎会立即发生并且不会被察觉。如果用户的设备较慢,那么列表会相应地“滞后”于输入,滞后的程度与设备的速度有关。
|
|
61
|
+
// 此外,与防抖或节流不同,useDeferredValue 执行的延迟重新渲染默认是可中断的。这意味着,如果 React 正在重新渲染一个大型列表,但用户进行了另一次键盘输入,React 会放弃该重新渲染,先处理键盘输入,然后再次开始在后台渲染。相比之下,防抖和节流仍会产生不顺畅的体验,因为它们是阻塞的:它们仅仅是将渲染阻塞键盘输入的时刻推迟了。
|
|
62
|
+
// 如果你要优化的工作不是在渲染期间发生的,那么防抖和节流仍然非常有用。例如,它们可以让你减少网络请求的次数。你也可以同时使用这些技术。
|
|
63
|
+
);
|
|
64
|
+
function i(r) {
|
|
65
|
+
const { innerWidth: o = 0, innerHeight: u = 0 } = r?.currentTarget ?? r?.target ?? window;
|
|
66
|
+
return {
|
|
67
|
+
width: o,
|
|
68
|
+
height: u
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const t = a(() => {
|
|
72
|
+
function r(o) {
|
|
73
|
+
p(i(o));
|
|
74
|
+
}
|
|
75
|
+
return m ? s(r, 123) : r;
|
|
76
|
+
}, [m]);
|
|
77
|
+
return h(t, [t]), l(() => (p(i(null)), () => {
|
|
78
|
+
"cancel" in t && d(t.cancel) && t.cancel();
|
|
79
|
+
}), []), n;
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
at as u
|
|
83
|
+
};
|