useblocks 1.1.85-dev.10 → 1.1.85-dev.11
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/README.md +70 -40
- package/compat-globals.js +1 -1
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/js/discussHandlers.sDXLf5I7.js +88 -0
- package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.714faf8a.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.js → iframe.body.714faf8a.js} +35 -35
- package/iframe/js/iframe.js +2 -2
- package/package.json +4 -1
- package/runtime/THIRD_PARTY_LICENSES.txt +49 -42
- package/runtime/package.json +4 -1
- package/runtime/react/index.js +1 -1
- package/runtime/uuid/index.js +21 -0
- package/static/core/11bc33e0.js +1 -0
- package/static/core/1ed86ed3.js +1 -0
- package/static/core/248de796.js +1 -0
- package/static/core/{e50b6f57.js → 274b5d7a.js} +1 -1
- package/static/core/4067c5be.js +1 -0
- package/static/core/453596ac.js +27 -0
- package/static/core/4b12ae50.js +1 -0
- package/static/core/{db82c42b.js → 50d547f6.js} +1 -1
- package/static/core/549c0ef1.js +1 -0
- package/static/core/{b29146b3.js → 563a690f.js} +5 -5
- package/static/core/{c1bf6439.js → 5c62f38b.js} +1 -1
- package/static/core/5f949f39.js +1 -0
- package/static/core/{e0d71533.js → 60aa31a3.js} +6 -6
- package/static/core/{79749848.js → 66619f08.js} +7 -7
- package/static/core/7052d050.js +28 -0
- package/static/core/{984e936f.js → 7555e955.js} +1 -1
- package/static/core/{55a38638.js → 7c89682e.js} +7 -7
- package/static/core/83c17079.js +2 -0
- package/static/core/{4c83d06a.js → 8c5284f6.js} +1 -1
- package/static/core/{e0e5c9b9.js → 958fe93e.js} +2 -2
- package/static/core/{6fcb3c31.js → a3f7b4c9.js} +1 -1
- package/static/core/{9560f31a.js → a494cc9f.js} +1 -1
- package/static/core/{a5996860.js → a6303cb2.js} +1 -1
- package/static/core/b8a0f663.js +1 -0
- package/static/core/bb65f553.js +1 -0
- package/static/core/{4c3f5897.js → c2f990cf.js} +2 -2
- package/static/core/{72d350ea.js → c8d6258e.js} +1 -1
- package/static/core/{3ece766f.js → d58ae4ac.js} +2 -2
- package/static/core/d61988e0.js +7 -0
- package/static/core/d887672a.js +1 -0
- package/static/core/dcc37768.js +1 -0
- package/static/core/{30841c46.js → e50f64f6.js} +1 -1
- package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
- package/static/esm/2490dab8.js +1 -0
- package/static/esm/971f1b2c.js +1 -0
- package/static/esm/ad8c16a9.js +1 -0
- package/static/esm/f76c9d9d.js +1 -0
- package/static/umd/6639d610.js +1 -0
- package/static/umd-runtime/B7h7P1Np.js +1 -0
- package/static/umd-runtime/{DHIkHsbq.js → BAqQTgiL.js} +1 -1
- package/static/umd-runtime/{DiNHpyis.js → BB6AXfHj.js} +1 -1
- package/static/umd-runtime/{CnUGCoaH.js → BauvM4c_.js} +1 -1
- package/static/umd-runtime/{cL_ha9ef.js → CgVJ4rE0.js} +1 -1
- package/static/umd-runtime/Cvm7BS4_.js +341 -0
- package/static/umd-runtime/{BnE05QKl.js → D7DggGzi.js} +1 -1
- package/static/umd-runtime/{2iAslXEF.js → DBbch1O-.js} +1 -1
- package/static/umd-runtime/{Bcqtk2f7.js → Dqoi-pC_.js} +2 -2
- package/static/umd-runtime/{CDTBLHGd.js → G2k8ELiO.js} +3 -3
- package/static/umd-runtime/{CVtPwspX.js → SFp4nbvq.js} +1 -1
- package/static/umd-runtime/{DVB_-O4B.js → UsRzAWs2.js} +1 -1
- package/static/umd-runtime/runtime.js +1 -1
- package/static/umd-runtime/ui-kit-icons.js +1 -1
- package/static/umd-runtime/ui-kit.js +2 -2
- package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
- package/useblocks-core.714faf8a.js +859 -0
- package/useblocks-esm.js +11 -11
- package/{useblocks-po.8098d114.js → useblocks-po.714faf8a.js} +1 -1
- package/useblocks.d.ts +109 -25
- package/useblocks.js +39 -15
- package/vendor/@rc-component/cascader/package.json +1 -1
- package/vendor/@rc-component/dialog/es/Dialog/Content/Panel.js +3 -2
- package/vendor/@rc-component/dialog/package.json +1 -1
- package/vendor/@rc-component/image/es/Preview/index.js +3 -3
- package/vendor/@rc-component/image/package.json +1 -1
- package/vendor/@rc-component/input/es/BaseInput.js +3 -3
- package/vendor/@rc-component/input/es/Input.js +20 -27
- package/vendor/@rc-component/{textarea → input}/es/ResizableTextArea.js +5 -4
- package/vendor/@rc-component/{textarea → input}/es/TextArea.js +30 -40
- package/vendor/@rc-component/{textarea → input}/es/calculateNodeHeight.js +4 -4
- package/vendor/@rc-component/input/es/hooks/useCountDisplay.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useCountExceed.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useMergedValue.js +13 -0
- package/vendor/@rc-component/input/es/index.js +3 -1
- package/vendor/@rc-component/input/package.json +1 -1
- package/vendor/@rc-component/mentions/es/DropdownMenu.js +1 -1
- package/vendor/@rc-component/mentions/es/Mentions.js +35 -8
- package/vendor/@rc-component/mentions/package.json +1 -1
- package/vendor/@rc-component/menu/es/Menu.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItem.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItemGroup.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/PopupTrigger.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/index.js +1 -0
- package/vendor/@rc-component/menu/es/context/MenuContext.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useAccessibility.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useKeyRecords.js +1 -0
- package/vendor/@rc-component/menu/es/utils/commonUtil.js +1 -0
- package/vendor/@rc-component/menu/es/utils/nodeUtil.js +2 -1
- package/vendor/@rc-component/menu/es/utils/warnUtil.js +1 -0
- package/vendor/@rc-component/menu/package.json +1 -1
- package/vendor/@rc-component/notification/LICENSE +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/LICENSE +22 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Children/toArray.js +15 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/canUseDom.js +6 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/contains.js +13 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/dynamicCSS.js +94 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/findDOMNode.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/focus.js +99 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/isVisible.js +18 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/shadow.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/styleChecker.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/KeyCode.js +499 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Portal.js +28 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/isFragment.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/render.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/getScrollBarSize.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useControlledState.js +3 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useDelayState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useEvent.js +9 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useId.js +23 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useLayoutEffect.js +26 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMemo.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMergedState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useState.js +24 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useSyncState.js +20 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/index.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/is.js +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isEqual.js +35 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isMobile.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/mergeProps.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/omit.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/pickAttrs.js +50 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/proxyObject.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/raf.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/ref.js +38 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/test/domHook.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/get.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/set.js +58 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/warning.js +46 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/package.json +6 -0
- package/vendor/@rc-component/notification/es/Notification.js +129 -0
- package/vendor/@rc-component/notification/es/NotificationList/Content.js +33 -0
- package/vendor/@rc-component/notification/es/NotificationList/index.js +174 -0
- package/vendor/@rc-component/notification/es/NotificationProvider.js +4 -3
- package/vendor/@rc-component/notification/es/Notifications.js +28 -31
- package/vendor/@rc-component/notification/es/Progress.js +10 -0
- package/vendor/@rc-component/notification/es/hooks/useClosable.js +30 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/index.js +50 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/useSizes.js +33 -0
- package/vendor/@rc-component/notification/es/hooks/useNoticeTimer.js +58 -0
- package/vendor/@rc-component/notification/es/hooks/useNotification.js +27 -18
- package/vendor/@rc-component/notification/es/hooks/useStack.js +4 -4
- package/vendor/@rc-component/notification/es/index.js +4 -2
- package/vendor/@rc-component/notification/package.json +1 -1
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js +13 -3
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/index.js +3 -1
- package/vendor/@rc-component/picker/es/PickerInput/SinglePicker.js +2 -1
- package/vendor/@rc-component/picker/package.json +1 -1
- package/vendor/@rc-component/table/LICENSE +21 -0
- package/vendor/@rc-component/table/es/Body/MeasureCell.js +1 -0
- package/vendor/@rc-component/table/es/Body/MeasureRow.js +1 -0
- package/vendor/@rc-component/table/es/Cell/useCellRender.js +1 -0
- package/vendor/@rc-component/table/es/FixedHolder/index.js +1 -0
- package/vendor/@rc-component/table/es/Table.js +17 -9
- package/vendor/@rc-component/table/es/VirtualTable/BodyGrid.js +10 -4
- package/vendor/@rc-component/table/es/VirtualTable/BodyLine.js +13 -5
- package/vendor/@rc-component/table/es/hooks/useColumns/index.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useExpand.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useFixedInfo.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useSticky.js +1 -0
- package/vendor/@rc-component/table/es/index.js +2 -1
- package/vendor/@rc-component/table/es/stickyScrollBar.js +1 -0
- package/vendor/@rc-component/table/es/utils/legacyUtil.js +1 -0
- package/vendor/@rc-component/table/es/utils/offsetUtil.js +1 -0
- package/vendor/@rc-component/table/package.json +1 -1
- package/vendor/@rc-component/tabs/es/TabNavList/OperationNode.js +4 -2
- package/vendor/@rc-component/tabs/es/TabNavList/TabNode.js +5 -4
- package/vendor/@rc-component/tabs/es/TabNavList/index.js +11 -4
- package/vendor/@rc-component/tabs/es/Tabs.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useIndicator.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useUpdate.js +1 -0
- package/vendor/@rc-component/tabs/package.json +1 -1
- package/vendor/@rc-component/tour/es/TourStep/DefaultPanel.js +4 -1
- package/vendor/@rc-component/tour/package.json +1 -1
- package/vendor/@rc-component/tree/es/MotionTreeNode.js +1 -0
- package/vendor/@rc-component/tree/es/NodeList.js +2 -2
- package/vendor/@rc-component/tree/es/Tree.js +4 -5
- package/vendor/@rc-component/tree/es/TreeNode.js +7 -2
- package/vendor/@rc-component/tree/es/index.js +3 -0
- package/vendor/@rc-component/tree/es/useUnmount.js +1 -0
- package/vendor/@rc-component/tree/es/util.js +1 -0
- package/vendor/@rc-component/tree/es/utils/conductUtil.js +1 -0
- package/vendor/@rc-component/tree/es/utils/treeUtil.js +1 -0
- package/vendor/@rc-component/tree/package.json +1 -1
- package/vendor/@rc-component/tree-select/package.json +1 -1
- package/vendor/@rc-component/util/es/index.js +10 -10
- package/vendor/antd/es/_util/ActionButton.js +2 -3
- package/vendor/antd/es/_util/ContextIsolator.js +1 -1
- package/vendor/antd/es/_util/PurePanel.js +7 -4
- package/vendor/antd/es/_util/convertToTooltipProps.js +2 -2
- package/vendor/antd/es/_util/fallbackProp.js +15 -0
- package/vendor/antd/es/_util/gapSize.js +2 -1
- package/vendor/antd/es/_util/getRenderPropValue.js +2 -1
- package/vendor/antd/es/_util/getScroll.js +4 -4
- package/vendor/antd/es/_util/hooks/index.js +2 -2
- package/vendor/antd/es/_util/hooks/useAllowClear.js +25 -0
- package/vendor/antd/es/_util/hooks/useClosable.js +6 -5
- package/vendor/antd/es/_util/hooks/{useMergeSemantic.js → useMergeSemantic/index.js} +14 -24
- package/vendor/antd/es/_util/hooks/useMergeSemantic/utils.js +14 -0
- package/vendor/antd/es/_util/hooks/useMergedMask.js +2 -1
- package/vendor/antd/es/_util/is.js +27 -0
- package/vendor/antd/es/_util/motion.js +8 -8
- package/vendor/antd/es/_util/normalizeIcon.js +9 -0
- package/vendor/antd/es/_util/placements.js +2 -1
- package/vendor/antd/es/_util/reactNode.js +2 -1
- package/vendor/antd/es/_util/responsiveObserver.js +3 -2
- package/vendor/antd/es/_util/scrollTo.js +3 -1
- package/vendor/antd/es/_util/styleChecker.js +1 -0
- package/vendor/antd/es/_util/throttleByAnimationFrame.js +1 -0
- package/vendor/antd/es/_util/toList.js +1 -1
- package/vendor/antd/es/_util/wave/WaveEffect.js +3 -1
- package/vendor/antd/es/_util/wave/index.js +14 -4
- package/vendor/antd/es/_util/wave/util.js +5 -3
- package/vendor/antd/es/alert/Alert.js +12 -10
- package/vendor/antd/es/alert/ErrorBoundary.js +1 -1
- package/vendor/antd/es/alert/style/index.js +16 -10
- package/vendor/antd/es/anchor/Anchor.js +23 -16
- package/vendor/antd/es/anchor/AnchorLink.js +4 -4
- package/vendor/antd/es/app/App.js +7 -3
- package/vendor/antd/es/auto-complete/AutoComplete.js +7 -8
- package/vendor/antd/es/avatar/Avatar.js +5 -3
- package/vendor/antd/es/back-top/index.js +1 -0
- package/vendor/antd/es/badge/Badge.js +5 -6
- package/vendor/antd/es/badge/Ribbon.js +1 -2
- package/vendor/antd/es/badge/style/index.js +4 -3
- package/vendor/antd/es/border-beam/BorderBeam.js +42 -0
- package/vendor/antd/es/border-beam/BorderBeamEffect.js +24 -0
- package/vendor/antd/es/border-beam/hooks/useBorderSize.js +37 -0
- package/vendor/antd/es/border-beam/hooks/useChildDom.js +24 -0
- package/vendor/antd/es/border-beam/index.js +7 -0
- package/vendor/antd/es/border-beam/style/index.js +60 -0
- package/vendor/antd/es/border-beam/util.js +26 -0
- package/vendor/antd/es/breadcrumb/Breadcrumb.js +1 -2
- package/vendor/antd/es/breadcrumb/BreadcrumbItem.js +1 -1
- package/vendor/antd/es/breadcrumb/useItemRender.js +3 -2
- package/vendor/antd/es/button/Button.js +7 -6
- package/vendor/antd/es/button/buttonHelpers.js +4 -8
- package/vendor/antd/es/button/index.js +2 -2
- package/vendor/antd/es/button/style/index.js +5 -0
- package/vendor/antd/es/calendar/generateCalendar.js +20 -8
- package/vendor/antd/es/card/Card.js +5 -7
- package/vendor/antd/es/card/CardMeta.js +1 -2
- package/vendor/antd/es/carousel/index.js +2 -1
- package/vendor/antd/es/cascader/Panel.js +1 -1
- package/vendor/antd/es/cascader/index.js +23 -16
- package/vendor/antd/es/cascader/style/columns.js +6 -2
- package/vendor/antd/es/checkbox/Checkbox.js +2 -3
- package/vendor/antd/es/checkbox/Group.js +2 -1
- package/vendor/antd/es/checkbox/style/index.js +1 -5
- package/vendor/antd/es/checkbox/useBubbleLock.js +1 -0
- package/vendor/antd/es/collapse/Collapse.js +3 -3
- package/vendor/antd/es/collapse/style/index.js +1 -4
- package/vendor/antd/es/color-picker/ColorPicker.js +1 -2
- package/vendor/antd/es/color-picker/ColorPickerPanel.js +2 -1
- package/vendor/antd/es/color-picker/components/ColorTrigger.js +3 -1
- package/vendor/antd/es/color-picker/components/PanelPicker/index.js +1 -0
- package/vendor/antd/es/config-provider/hooks/useSize.js +3 -2
- package/vendor/antd/es/config-provider/hooks/useTheme.js +2 -0
- package/vendor/antd/es/config-provider/index.js +11 -3
- package/vendor/antd/es/date-picker/generatePicker/generateRangePicker.js +20 -10
- package/vendor/antd/es/date-picker/generatePicker/generateSinglePicker.js +17 -8
- package/vendor/antd/es/date-picker/generatePicker/useSuffixIcon.js +1 -1
- package/vendor/antd/es/date-picker/hooks/useMergedPickerSemantic.js +1 -2
- package/vendor/antd/es/date-picker/style/index.js +13 -3
- package/vendor/antd/es/date-picker/style/multiple.js +3 -4
- package/vendor/antd/es/date-picker/style/panel.js +5 -20
- package/vendor/antd/es/date-picker/util.js +14 -13
- package/vendor/antd/es/descriptions/Cell.js +2 -3
- package/vendor/antd/es/descriptions/hooks/useItems.js +2 -1
- package/vendor/antd/es/descriptions/index.js +3 -3
- package/vendor/antd/es/divider/index.js +3 -2
- package/vendor/antd/es/drawer/Drawer.js +10 -5
- package/vendor/antd/es/drawer/DrawerPanel.js +3 -2
- package/vendor/antd/es/dropdown/dropdown.js +11 -8
- package/vendor/antd/es/dropdown/style/index.js +2 -6
- package/vendor/antd/es/empty/index.js +1 -2
- package/vendor/antd/es/flex/index.js +2 -2
- package/vendor/antd/es/float-button/BackTop.js +1 -0
- package/vendor/antd/es/float-button/FloatButton.js +3 -3
- package/vendor/antd/es/float-button/FloatButtonGroup.js +2 -2
- package/vendor/antd/es/form/ErrorList.js +13 -6
- package/vendor/antd/es/form/Form.js +7 -6
- package/vendor/antd/es/form/FormItem/ItemHolder.js +1 -1
- package/vendor/antd/es/form/FormItem/index.js +6 -6
- package/vendor/antd/es/form/FormItemInput.js +5 -3
- package/vendor/antd/es/form/FormItemLabel.js +2 -1
- package/vendor/antd/es/form/FormList.js +1 -0
- package/vendor/antd/es/form/hooks/useChildren.js +4 -3
- package/vendor/antd/es/form/hooks/useForm.js +3 -1
- package/vendor/antd/es/form/hooks/useFrameState.js +1 -0
- package/vendor/antd/es/form/hooks/useItemRef.js +7 -5
- package/vendor/antd/es/form/style/index.js +1 -3
- package/vendor/antd/es/grid/col.js +5 -7
- package/vendor/antd/es/grid/hooks/useBreakpoint.js +1 -0
- package/vendor/antd/es/grid/hooks/useGutter.js +2 -1
- package/vendor/antd/es/grid/row.js +7 -6
- package/vendor/antd/es/image/PreviewGroup.js +1 -2
- package/vendor/antd/es/image/Progress.js +58 -0
- package/vendor/antd/es/image/hooks/useMergedPreviewConfig.js +3 -1
- package/vendor/antd/es/image/hooks/usePlaceholderConfig.js +15 -0
- package/vendor/antd/es/image/hooks/usePreviewConfig.js +3 -2
- package/vendor/antd/es/image/index.js +36 -5
- package/vendor/antd/es/image/style/index.js +114 -4
- package/vendor/antd/es/image/style/progressAnimation.js +26 -0
- package/vendor/antd/es/index.js +2 -1
- package/vendor/antd/es/input/Input.js +9 -4
- package/vendor/antd/es/input/OTP/OTPInput.js +1 -0
- package/vendor/antd/es/input/OTP/index.js +3 -3
- package/vendor/antd/es/input/Password.js +45 -26
- package/vendor/antd/es/input/Search.js +6 -5
- package/vendor/antd/es/input/TextArea.js +13 -7
- package/vendor/antd/es/input/style/index.js +17 -11
- package/vendor/antd/es/input/style/otp.js +2 -1
- package/vendor/antd/es/input/style/variants.js +16 -10
- package/vendor/antd/es/input-number/index.js +3 -3
- package/vendor/antd/es/input-number/style/index.js +9 -9
- package/vendor/antd/es/layout/Sider.js +3 -2
- package/vendor/antd/es/list/index.js +5 -3
- package/vendor/antd/es/locale/en_US.js +3 -1
- package/vendor/antd/es/locale/ru_RU.js +3 -1
- package/vendor/antd/es/locale/useLocale.js +2 -1
- package/vendor/antd/es/masonry/Masonry.js +4 -3
- package/vendor/antd/es/mentions/index.js +28 -14
- package/vendor/antd/es/menu/MenuItem.js +2 -1
- package/vendor/antd/es/menu/OverrideContext.js +1 -0
- package/vendor/antd/es/menu/SubMenu.js +1 -1
- package/vendor/antd/es/menu/menu.js +5 -5
- package/vendor/antd/es/menu/style/index.js +21 -36
- package/vendor/antd/es/menu/style/vertical.js +2 -1
- package/vendor/antd/es/message/PureList.js +49 -0
- package/vendor/antd/es/message/PurePanel.js +28 -36
- package/vendor/antd/es/message/index.js +6 -3
- package/vendor/antd/es/message/style/index.js +102 -99
- package/vendor/antd/es/message/useMessage.js +29 -33
- package/vendor/antd/es/message/util.js +1 -1
- package/vendor/antd/es/modal/ConfirmDialog.js +11 -9
- package/vendor/antd/es/modal/Modal.js +12 -7
- package/vendor/antd/es/modal/PurePanel.js +1 -2
- package/vendor/antd/es/modal/confirm.js +4 -3
- package/vendor/antd/es/modal/shared.js +3 -2
- package/vendor/antd/es/modal/useModal/HookModal.js +2 -1
- package/vendor/antd/es/notification/PureList.js +46 -0
- package/vendor/antd/es/notification/PurePanel.js +37 -56
- package/vendor/antd/es/notification/hooks/useStackConfig.js +13 -0
- package/vendor/antd/es/notification/index.js +3 -1
- package/vendor/antd/es/notification/style/index.js +103 -170
- package/vendor/antd/es/notification/style/notification.js +191 -0
- package/vendor/antd/es/notification/style/placement.js +117 -60
- package/vendor/antd/es/notification/useNotification.js +37 -40
- package/vendor/antd/es/notification/util.js +9 -50
- package/vendor/antd/es/pagination/Pagination.js +1 -2
- package/vendor/antd/es/pagination/useShowSizeChanger.js +2 -1
- package/vendor/antd/es/popconfirm/PurePanel.js +4 -1
- package/vendor/antd/es/popconfirm/index.js +1 -2
- package/vendor/antd/es/popover/PurePanel.js +1 -2
- package/vendor/antd/es/popover/index.js +1 -2
- package/vendor/antd/es/progress/Circle.js +2 -1
- package/vendor/antd/es/progress/progress.js +3 -3
- package/vendor/antd/es/progress/utils.js +4 -3
- package/vendor/antd/es/qr-code/index.js +4 -4
- package/vendor/antd/es/radio/group.js +4 -3
- package/vendor/antd/es/radio/radio.js +2 -2
- package/vendor/antd/es/radio/style/index.js +1 -1
- package/vendor/antd/es/rate/index.js +2 -4
- package/vendor/antd/es/result/index.js +6 -5
- package/vendor/antd/es/result/style/index.js +10 -6
- package/vendor/antd/es/segmented/index.js +5 -3
- package/vendor/antd/es/select/index.js +23 -12
- package/vendor/antd/es/select/style/dropdown.js +1 -1
- package/vendor/antd/es/select/style/select-input.js +23 -15
- package/vendor/antd/es/select/useIcons.js +43 -26
- package/vendor/antd/es/skeleton/Element.js +2 -1
- package/vendor/antd/es/skeleton/Skeleton.js +3 -3
- package/vendor/antd/es/slider/SliderTooltip.js +1 -0
- package/vendor/antd/es/slider/index.js +5 -3
- package/vendor/antd/es/slider/useRafLock.js +1 -0
- package/vendor/antd/es/space/Compact.js +1 -1
- package/vendor/antd/es/space/Item.js +1 -1
- package/vendor/antd/es/space/index.js +2 -2
- package/vendor/antd/es/space/style/addon.js +5 -2
- package/vendor/antd/es/spin/Indicator/Progress.js +2 -1
- package/vendor/antd/es/spin/index.js +1 -2
- package/vendor/antd/es/splitter/Panel.js +7 -3
- package/vendor/antd/es/splitter/SplitBar.js +5 -4
- package/vendor/antd/es/splitter/Splitter.js +9 -6
- package/vendor/antd/es/splitter/hooks/useItems.js +2 -1
- package/vendor/antd/es/splitter/hooks/useSizes.js +1 -1
- package/vendor/antd/es/splitter/style/index.js +8 -6
- package/vendor/antd/es/statistic/Number.js +8 -4
- package/vendor/antd/es/statistic/Statistic.js +14 -10
- package/vendor/antd/es/steps/index.js +4 -4
- package/vendor/antd/es/style/compact-item-vertical.js +2 -1
- package/vendor/antd/es/style/compact-item.js +6 -6
- package/vendor/antd/es/switch/index.js +1 -2
- package/vendor/antd/es/table/InternalTable.js +23 -14
- package/vendor/antd/es/table/hooks/useFilledColumns.js +23 -0
- package/vendor/antd/es/table/hooks/useFilter/FilterDropdown.js +22 -16
- package/vendor/antd/es/table/hooks/useFilter/FilterWrapper.js +1 -0
- package/vendor/antd/es/table/hooks/useFilter/index.js +34 -18
- package/vendor/antd/es/table/hooks/useLazyKVMap.js +2 -1
- package/vendor/antd/es/table/hooks/usePagination.js +7 -4
- package/vendor/antd/es/table/hooks/useSelection.js +32 -21
- package/vendor/antd/es/table/hooks/useSorter.js +10 -5
- package/vendor/antd/es/table/style/bordered.js +5 -27
- package/vendor/antd/es/table/style/empty.js +1 -4
- package/vendor/antd/es/table/style/index.js +1 -4
- package/vendor/antd/es/table/util.js +6 -6
- package/vendor/antd/es/tabs/hooks/useAnimateConfig.js +2 -1
- package/vendor/antd/es/tabs/index.js +1 -2
- package/vendor/antd/es/tag/CheckableTagGroup.js +8 -5
- package/vendor/antd/es/tag/hooks/useColor.js +4 -3
- package/vendor/antd/es/tag/index.js +13 -7
- package/vendor/antd/es/theme/themes/dark/colors.js +2 -1
- package/vendor/antd/es/theme/themes/default/colors.js +2 -1
- package/vendor/antd/es/theme/useToken.js +2 -2
- package/vendor/antd/es/theme/util/alias.js +34 -29
- package/vendor/antd/es/timeline/Timeline.js +3 -4
- package/vendor/antd/es/tooltip/PurePanel.js +1 -2
- package/vendor/antd/es/tooltip/UniqueProvider/index.js +2 -1
- package/vendor/antd/es/tooltip/index.js +9 -7
- package/vendor/antd/es/tour/PurePanel.js +2 -2
- package/vendor/antd/es/tour/index.js +1 -1
- package/vendor/antd/es/tour/panelRender.js +4 -2
- package/vendor/antd/es/transfer/ListBody.js +3 -1
- package/vendor/antd/es/transfer/ListItem.js +2 -1
- package/vendor/antd/es/transfer/Section.js +17 -8
- package/vendor/antd/es/transfer/index.js +51 -16
- package/vendor/antd/es/transfer/style/index.js +5 -1
- package/vendor/antd/es/tree/Tree.js +1 -2
- package/vendor/antd/es/tree/style/index.js +5 -1
- package/vendor/antd/es/tree/utils/iconUtil.js +5 -4
- package/vendor/antd/es/tree-select/index.js +3 -3
- package/vendor/antd/es/typography/Base/CopyBtn.js +3 -2
- package/vendor/antd/es/typography/Base/Ellipsis.js +3 -3
- package/vendor/antd/es/typography/Base/index.js +38 -31
- package/vendor/antd/es/typography/Editable.js +10 -4
- package/vendor/antd/es/typography/Link.js +1 -0
- package/vendor/antd/es/typography/Text.js +2 -1
- package/vendor/antd/es/typography/Typography.js +20 -10
- package/vendor/antd/es/typography/hooks/useCopyClick.js +2 -1
- package/vendor/antd/es/typography/hooks/useMergedConfig.js +13 -7
- package/vendor/antd/es/typography/hooks/useTooltipProps.js +2 -1
- package/vendor/antd/es/typography/hooks/useTypographySemantic.js +33 -0
- package/vendor/antd/es/typography/style/index.js +12 -27
- package/vendor/antd/es/typography/style/mixins.js +46 -13
- package/vendor/antd/es/upload/Upload.js +13 -7
- package/vendor/antd/es/upload/UploadList/ListItem.js +6 -5
- package/vendor/antd/es/upload/UploadList/index.js +4 -3
- package/vendor/antd/es/upload/utils.js +18 -1
- package/vendor/antd/es/version/version.js +1 -1
- package/vendor/antd/es/watermark/index.js +6 -4
- package/vendor/antd/es/watermark/useSingletonCache.js +1 -0
- package/vendor/antd/es/watermark/useWatermark.js +3 -3
- package/vendor/antd/package.json +1 -1
- package/vendor/useblocks-ui-kit/es/components/DataEntry/Input/index.js +1 -1
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/iframe/js/discussHandlers.CCCXIEaO.js +0 -88
- package/static/core/1f101241.js +0 -1
- package/static/core/1fa93ad8.js +0 -28
- package/static/core/2007bc93.js +0 -1
- package/static/core/30ab7b1d.js +0 -1
- package/static/core/440a91be.js +0 -1
- package/static/core/44e96a78.js +0 -1
- package/static/core/823aedee.js +0 -1
- package/static/core/828583e1.js +0 -2
- package/static/core/8cc6e392.js +0 -1
- package/static/core/9aefcefb.js +0 -1
- package/static/core/a4f90443.js +0 -27
- package/static/core/a7ac37cd.js +0 -1
- package/static/core/df41de18.js +0 -7
- package/static/esm/349f9e2c.js +0 -1
- package/static/esm/50fbfdf6.js +0 -1
- package/static/media/icon-sets/lucide.json +0 -6275
- package/static/media/icon-sets/tabler.json +0 -19336
- package/static/umd-runtime/Cl8heeC3.js +0 -1
- package/static/umd-runtime/D0xo8o9c.js +0 -335
- package/useblocks-core.8098d114.js +0 -859
- package/vendor/@rc-component/notification/es/Notice.js +0 -106
- package/vendor/@rc-component/notification/es/NoticeList.js +0 -98
- package/vendor/@rc-component/textarea/LICENSE.md +0 -9
- package/vendor/@rc-component/textarea/es/index.js +0 -6
- package/vendor/@rc-component/textarea/package.json +0 -6
- package/vendor/antd/es/_util/extendsObject.js +0 -12
- package/vendor/antd/es/_util/getAllowClear.js +0 -12
- package/vendor/antd/es/_util/isNonNullable.js +0 -6
- package/vendor/antd/es/_util/isPrimitive.js +0 -4
- package/vendor/antd/es/notification/style/pure-panel.js +0 -18
- package/vendor/antd/es/notification/style/stack.js +0 -85
- /package/iframe/{iframe-eblock.8098d114.html → iframe-eblock.714faf8a.html} +0 -0
- /package/iframe/{iframe.8098d114.html → iframe.714faf8a.html} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import useEvent from "./hooks/useEvent.js";
|
|
2
|
+
import "./Dom/canUseDom.js";
|
|
3
|
+
import "./hooks/useLayoutEffect.js";
|
|
4
|
+
import "./hooks/useState.js";
|
|
5
|
+
import "./hooks/useMergedState.js";
|
|
6
|
+
import "./hooks/useControlledState.js";
|
|
7
|
+
import wrapperRaf from "./raf.js";
|
|
8
|
+
import "./hooks/useDelayState.js";
|
|
9
|
+
import "./hooks/useId.js";
|
|
10
|
+
import "./hooks/useMemo.js";
|
|
11
|
+
import "./hooks/useSyncState.js";
|
|
12
|
+
import { useComposeRef } from "./ref.js";
|
|
13
|
+
import "./Dom/contains.js";
|
|
14
|
+
import "./Dom/dynamicCSS.js";
|
|
15
|
+
import "./Dom/findDOMNode.js";
|
|
16
|
+
import "./Dom/isVisible.js";
|
|
17
|
+
import "./Dom/focus.js";
|
|
18
|
+
import "./Dom/shadow.js";
|
|
19
|
+
import "./Dom/styleChecker.js";
|
|
20
|
+
import "./KeyCode.js";
|
|
21
|
+
import "./getScrollBarSize.js";
|
|
22
|
+
import "./warning.js";
|
|
23
|
+
import "./isEqual.js";
|
|
24
|
+
import { isNonNullable, isReactRenderable } from "./is.js";
|
|
25
|
+
import "./isMobile.js";
|
|
26
|
+
import "./omit.js";
|
|
27
|
+
import pickAttrs from "./pickAttrs.js";
|
|
28
|
+
import "./proxyObject.js";
|
|
29
|
+
import "./Children/toArray.js";
|
|
30
|
+
import "./mergeProps.js";
|
|
31
|
+
import "./utils/get.js";
|
|
32
|
+
import "./utils/set.js";
|
|
33
|
+
import "./React/render.js";
|
|
34
|
+
import "./test/domHook.js";
|
|
35
|
+
import "./Portal.js";
|
|
36
|
+
export { isNonNullable, isReactRenderable, pickAttrs, wrapperRaf as raf, useComposeRef, useEvent };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/is.js
|
|
2
|
+
/**
|
|
3
|
+
* Check if a value is neither `null` nor `undefined`.
|
|
4
|
+
*/
|
|
5
|
+
function isNonNullable(value) {
|
|
6
|
+
return value !== void 0 && value !== null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Check whether a value should be treated as renderable content.
|
|
10
|
+
*
|
|
11
|
+
* Returns `false` only for `null`, `undefined`, `false`, and `''`; all other
|
|
12
|
+
* values, including `0` and `true`, are treated as renderable.
|
|
13
|
+
*
|
|
14
|
+
* This is a compatibility-oriented presence check, not a complete React node
|
|
15
|
+
* validator.
|
|
16
|
+
*/
|
|
17
|
+
function isReactRenderable(value) {
|
|
18
|
+
return isNonNullable(value) && value !== false && value !== "";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { isNonNullable, isReactRenderable };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import warningOnce from "./warning.js";
|
|
2
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/isEqual.js
|
|
3
|
+
/**
|
|
4
|
+
* Deeply compares two object literals.
|
|
5
|
+
* @param obj1 object 1
|
|
6
|
+
* @param obj2 object 2
|
|
7
|
+
* @param shallow shallow compare
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
function isEqual(obj1, obj2, shallow = false) {
|
|
11
|
+
const refSet = /* @__PURE__ */ new Set();
|
|
12
|
+
function deepEqual(a, b, level = 1) {
|
|
13
|
+
const circular = refSet.has(a);
|
|
14
|
+
warningOnce(!circular, "Warning: There may be circular references");
|
|
15
|
+
if (circular) return false;
|
|
16
|
+
if (a === b) return true;
|
|
17
|
+
if (shallow && level > 1) return false;
|
|
18
|
+
refSet.add(a);
|
|
19
|
+
const newLevel = level + 1;
|
|
20
|
+
if (Array.isArray(a)) {
|
|
21
|
+
if (!Array.isArray(b) || a.length !== b.length) return false;
|
|
22
|
+
for (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i], newLevel)) return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
if (a && b && typeof a === "object" && typeof b === "object") {
|
|
26
|
+
const keys = Object.keys(a);
|
|
27
|
+
if (keys.length !== Object.keys(b).length) return false;
|
|
28
|
+
return keys.every((key) => deepEqual(a[key], b[key], newLevel));
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return deepEqual(obj1, obj2);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { isEqual as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __toESM } from "../../../../../../_virtual/_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_is_mobile } from "../../../../../../is-mobile/index.js";
|
|
3
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/isMobile.js
|
|
4
|
+
var import_is_mobile = /* @__PURE__ */ __toESM(require_is_mobile());
|
|
5
|
+
let cached;
|
|
6
|
+
const getIsMobile = () => {
|
|
7
|
+
if (typeof cached === "undefined") cached = (0, import_is_mobile.default)();
|
|
8
|
+
return cached;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getIsMobile as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/mergeProps.js
|
|
2
|
+
/**
|
|
3
|
+
* Merges multiple props objects into one. Unlike `Object.assign()` or `{ ...a, ...b }`, it skips
|
|
4
|
+
* properties whose value is explicitly set to `undefined`.
|
|
5
|
+
*/
|
|
6
|
+
function mergeProps(...items) {
|
|
7
|
+
const ret = {};
|
|
8
|
+
for (const item of items) if (item) {
|
|
9
|
+
for (const key of Object.keys(item)) if (item[key] !== void 0) ret[key] = item[key];
|
|
10
|
+
}
|
|
11
|
+
return ret;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { mergeProps as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//#endregion
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const propList = `accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
2
|
+
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
3
|
+
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
4
|
+
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
5
|
+
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
6
|
+
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
7
|
+
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
8
|
+
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
9
|
+
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
10
|
+
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
11
|
+
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
12
|
+
summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
13
|
+
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
14
|
+
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
15
|
+
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
16
|
+
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
17
|
+
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
18
|
+
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad
|
|
19
|
+
onPointerDown onPointerMove onPointerUp onPointerCancel onPointerEnter onPointerLeave onPointerOver onPointerOut onGotPointerCapture onLostPointerCapture
|
|
20
|
+
onAnimationStart onAnimationEnd onAnimationIteration
|
|
21
|
+
onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
|
|
22
|
+
onBeforeInput onReset onInvalid
|
|
23
|
+
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`.split(/[\s\n]+/);
|
|
24
|
+
const ariaPrefix = "aria-";
|
|
25
|
+
const dataPrefix = "data-";
|
|
26
|
+
function match(key, prefix) {
|
|
27
|
+
return key.indexOf(prefix) === 0;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Picker props from exist props with filter
|
|
31
|
+
* @param props Passed props
|
|
32
|
+
* @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
|
|
33
|
+
*/
|
|
34
|
+
function pickAttrs(props, ariaOnly = false) {
|
|
35
|
+
let mergedConfig;
|
|
36
|
+
if (ariaOnly === false) mergedConfig = {
|
|
37
|
+
aria: true,
|
|
38
|
+
data: true,
|
|
39
|
+
attr: true
|
|
40
|
+
};
|
|
41
|
+
else if (ariaOnly === true) mergedConfig = { aria: true };
|
|
42
|
+
else mergedConfig = { ...ariaOnly };
|
|
43
|
+
const attrs = {};
|
|
44
|
+
Object.keys(props).forEach((key) => {
|
|
45
|
+
if (mergedConfig.aria && (key === "role" || match(key, ariaPrefix)) || mergedConfig.data && match(key, dataPrefix) || mergedConfig.attr && propList.includes(key)) attrs[key] = props[key];
|
|
46
|
+
});
|
|
47
|
+
return attrs;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { pickAttrs as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//#endregion
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/raf.js
|
|
2
|
+
let raf = (callback) => +setTimeout(callback, 16);
|
|
3
|
+
let caf = (num) => clearTimeout(num);
|
|
4
|
+
if (typeof window !== "undefined" && "requestAnimationFrame" in window) {
|
|
5
|
+
raf = (callback) => window.requestAnimationFrame(callback);
|
|
6
|
+
caf = (handle) => window.cancelAnimationFrame(handle);
|
|
7
|
+
}
|
|
8
|
+
let rafUUID = 0;
|
|
9
|
+
const rafIds = /* @__PURE__ */ new Map();
|
|
10
|
+
function cleanup(id) {
|
|
11
|
+
rafIds.delete(id);
|
|
12
|
+
}
|
|
13
|
+
const wrapperRaf = (callback, times = 1) => {
|
|
14
|
+
rafUUID += 1;
|
|
15
|
+
const id = rafUUID;
|
|
16
|
+
function callRef(leftTimes) {
|
|
17
|
+
if (leftTimes === 0) {
|
|
18
|
+
cleanup(id);
|
|
19
|
+
callback();
|
|
20
|
+
} else {
|
|
21
|
+
const realId = raf(() => {
|
|
22
|
+
callRef(leftTimes - 1);
|
|
23
|
+
});
|
|
24
|
+
rafIds.set(id, realId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
callRef(times);
|
|
28
|
+
return id;
|
|
29
|
+
};
|
|
30
|
+
wrapperRaf.cancel = (id) => {
|
|
31
|
+
const realId = rafIds.get(id);
|
|
32
|
+
cleanup(id);
|
|
33
|
+
return caf(realId);
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { wrapperRaf as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import useMemo$1 from "./hooks/useMemo.js";
|
|
2
|
+
import isFragment from "./React/isFragment.js";
|
|
3
|
+
import { isValidElement, version } from "../../../../../../react/index.js";
|
|
4
|
+
import { ForwardRef, isMemo } from "../../../../../../react-is/index.js";
|
|
5
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/ref.js
|
|
6
|
+
const ReactMajorVersion = Number(version.split(".")[0]);
|
|
7
|
+
const fillRef = (ref, node) => {
|
|
8
|
+
if (typeof ref === "function") ref(node);
|
|
9
|
+
else if (typeof ref === "object" && ref && "current" in ref) ref.current = node;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Merge refs into one ref function to support ref passing.
|
|
13
|
+
*/
|
|
14
|
+
const composeRef = (...refs) => {
|
|
15
|
+
const refList = refs.filter(Boolean);
|
|
16
|
+
if (refList.length <= 1) return refList[0];
|
|
17
|
+
return (node) => {
|
|
18
|
+
refs.forEach((ref) => {
|
|
19
|
+
fillRef(ref, node);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
const useComposeRef = (...refs) => {
|
|
24
|
+
return useMemo$1(() => composeRef(...refs), refs, (prev, next) => prev.length !== next.length || prev.every((ref, i) => ref !== next[i]));
|
|
25
|
+
};
|
|
26
|
+
const supportRef = (nodeOrComponent) => {
|
|
27
|
+
if (!nodeOrComponent) return false;
|
|
28
|
+
if (isReactElement(nodeOrComponent) && ReactMajorVersion >= 19) return true;
|
|
29
|
+
const type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
30
|
+
if (typeof type === "function" && !type.prototype?.render && type.$$typeof !== ForwardRef) return false;
|
|
31
|
+
if (typeof nodeOrComponent === "function" && !nodeOrComponent.prototype?.render && nodeOrComponent.$$typeof !== ForwardRef) return false;
|
|
32
|
+
return true;
|
|
33
|
+
};
|
|
34
|
+
function isReactElement(node) {
|
|
35
|
+
return /*#__PURE__*/ isValidElement(node) && !isFragment(node);
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { composeRef, fillRef, supportRef, useComposeRef };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/test/domHook.js
|
|
2
|
+
const NO_EXIST = { __NOT_EXIST: true };
|
|
3
|
+
function spyElementPrototypes(elementClass, properties) {
|
|
4
|
+
const propNames = Object.keys(properties);
|
|
5
|
+
const originDescriptors = {};
|
|
6
|
+
propNames.forEach((propName) => {
|
|
7
|
+
const originDescriptor = Object.getOwnPropertyDescriptor(elementClass.prototype, propName);
|
|
8
|
+
originDescriptors[propName] = originDescriptor || NO_EXIST;
|
|
9
|
+
const spyProp = properties[propName];
|
|
10
|
+
if (typeof spyProp === "function") elementClass.prototype[propName] = function spyFunc(...args) {
|
|
11
|
+
return spyProp.call(this, originDescriptor, ...args);
|
|
12
|
+
};
|
|
13
|
+
else Object.defineProperty(elementClass.prototype, propName, {
|
|
14
|
+
...spyProp,
|
|
15
|
+
set(value) {
|
|
16
|
+
if (spyProp.set) return spyProp.set.call(this, originDescriptor, value);
|
|
17
|
+
return originDescriptor.set(value);
|
|
18
|
+
},
|
|
19
|
+
get() {
|
|
20
|
+
if (spyProp.get) return spyProp.get.call(this, originDescriptor);
|
|
21
|
+
return originDescriptor.get();
|
|
22
|
+
},
|
|
23
|
+
configurable: true
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
return { mockRestore() {
|
|
27
|
+
propNames.forEach((propName) => {
|
|
28
|
+
const originDescriptor = originDescriptors[propName];
|
|
29
|
+
if (originDescriptor === NO_EXIST) delete elementClass.prototype[propName];
|
|
30
|
+
else if (typeof originDescriptor === "function") elementClass.prototype[propName] = originDescriptor;
|
|
31
|
+
else Object.defineProperty(elementClass.prototype, propName, originDescriptor);
|
|
32
|
+
});
|
|
33
|
+
} };
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { spyElementPrototypes };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/utils/get.js
|
|
2
|
+
function get(entity, path) {
|
|
3
|
+
let current = entity;
|
|
4
|
+
for (let i = 0; i < path.length; i += 1) {
|
|
5
|
+
if (current === null || current === void 0) return;
|
|
6
|
+
current = current[path[i]];
|
|
7
|
+
}
|
|
8
|
+
return current;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { get as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import get from "./get.js";
|
|
2
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/utils/set.js
|
|
3
|
+
function internalSet(entity, paths, value, removeIfUndefined) {
|
|
4
|
+
if (!paths.length) return value;
|
|
5
|
+
const [path, ...restPath] = paths;
|
|
6
|
+
let clone;
|
|
7
|
+
if (!entity && typeof path === "number") clone = [];
|
|
8
|
+
else if (Array.isArray(entity)) clone = [...entity];
|
|
9
|
+
else clone = { ...entity };
|
|
10
|
+
if (removeIfUndefined && value === void 0 && restPath.length === 1) delete clone[path][restPath[0]];
|
|
11
|
+
else clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
|
|
12
|
+
return clone;
|
|
13
|
+
}
|
|
14
|
+
function set(entity, paths, value, removeIfUndefined = false) {
|
|
15
|
+
if (paths.length && removeIfUndefined && value === void 0 && !get(entity, paths.slice(0, -1))) return entity;
|
|
16
|
+
return internalSet(entity, paths, value, removeIfUndefined);
|
|
17
|
+
}
|
|
18
|
+
function isObject(obj) {
|
|
19
|
+
return typeof obj === "object" && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
|
|
20
|
+
}
|
|
21
|
+
function createEmpty(source) {
|
|
22
|
+
return Array.isArray(source) ? [] : {};
|
|
23
|
+
}
|
|
24
|
+
const keys = typeof Reflect === "undefined" ? Object.keys : Reflect.ownKeys;
|
|
25
|
+
/**
|
|
26
|
+
* Merge multiple objects. Support custom merge logic.
|
|
27
|
+
* @param sources object sources
|
|
28
|
+
* @param config.prepareArray Customize array prepare function.
|
|
29
|
+
* It will return empty [] by default.
|
|
30
|
+
* So when match array, it will auto be override with next array in sources.
|
|
31
|
+
*/
|
|
32
|
+
function mergeWith(sources, config = {}) {
|
|
33
|
+
const { prepareArray } = config;
|
|
34
|
+
const finalPrepareArray = prepareArray || (() => []);
|
|
35
|
+
let clone = createEmpty(sources[0]);
|
|
36
|
+
sources.forEach((src) => {
|
|
37
|
+
function internalMerge(path, parentLoopSet) {
|
|
38
|
+
const loopSet = new Set(parentLoopSet);
|
|
39
|
+
const value = get(src, path);
|
|
40
|
+
const isArr = Array.isArray(value);
|
|
41
|
+
if (isArr || isObject(value)) {
|
|
42
|
+
if (!loopSet.has(value)) {
|
|
43
|
+
loopSet.add(value);
|
|
44
|
+
const originValue = get(clone, path);
|
|
45
|
+
if (isArr) clone = set(clone, path, finalPrepareArray(originValue, value));
|
|
46
|
+
else if (!originValue || typeof originValue !== "object") clone = set(clone, path, createEmpty(value));
|
|
47
|
+
keys(value).forEach((key) => {
|
|
48
|
+
if (Object.getOwnPropertyDescriptor(value, key).enumerable) internalMerge([...path, key], loopSet);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
} else clone = set(clone, path, value);
|
|
52
|
+
}
|
|
53
|
+
internalMerge([]);
|
|
54
|
+
});
|
|
55
|
+
return clone;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { set as default, mergeWith };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region node_modules/@rc-component/notification/node_modules/@rc-component/util/es/warning.js
|
|
2
|
+
let warned = {};
|
|
3
|
+
const preWarningFns = [];
|
|
4
|
+
/**
|
|
5
|
+
* Pre warning enable you to parse content before console.error.
|
|
6
|
+
* Modify to null will prevent warning.
|
|
7
|
+
*/
|
|
8
|
+
const preMessage = (fn) => {
|
|
9
|
+
preWarningFns.push(fn);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Warning if condition not match.
|
|
13
|
+
* @param valid Condition
|
|
14
|
+
* @param message Warning message
|
|
15
|
+
* @example
|
|
16
|
+
* ```js
|
|
17
|
+
* warning(false, 'some error'); // print some error
|
|
18
|
+
* warning(true, 'some error'); // print nothing
|
|
19
|
+
* warning(1 === 2, 'some error'); // print some error
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function warning(valid, message) {}
|
|
23
|
+
/** @see Similar to {@link warning} */
|
|
24
|
+
function note(valid, message) {}
|
|
25
|
+
function resetWarned() {
|
|
26
|
+
warned = {};
|
|
27
|
+
}
|
|
28
|
+
function call(method, valid, message) {
|
|
29
|
+
if (!valid && !warned[message]) {
|
|
30
|
+
method(false, message);
|
|
31
|
+
warned[message] = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** @see Same as {@link warning}, but only warn once for the same message */
|
|
35
|
+
function warningOnce(valid, message) {
|
|
36
|
+
call(warning, valid, message);
|
|
37
|
+
}
|
|
38
|
+
/** @see Same as {@link warning}, but only warn once for the same message */
|
|
39
|
+
function noteOnce(valid, message) {
|
|
40
|
+
call(note, valid, message);
|
|
41
|
+
}
|
|
42
|
+
warningOnce.preMessage = preMessage;
|
|
43
|
+
warningOnce.resetWarned = resetWarned;
|
|
44
|
+
warningOnce.noteOnce = noteOnce;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { call, warningOnce as default, warningOnce, note, noteOnce, preMessage, resetWarned, warning };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
2
|
+
import useEvent from "../_/@rc-component/util/es/hooks/useEvent.js";
|
|
3
|
+
import { isNonNullable, isReactRenderable } from "../_/@rc-component/util/es/is.js";
|
|
4
|
+
import "../_/@rc-component/util/es/index.js";
|
|
5
|
+
import useNoticeTimer from "./hooks/useNoticeTimer.js";
|
|
6
|
+
import useClosable from "./hooks/useClosable.js";
|
|
7
|
+
import Progress from "./Progress.js";
|
|
8
|
+
import * as React$1 from "../../../react/index.js";
|
|
9
|
+
//#region node_modules/@rc-component/notification/es/Notification.js
|
|
10
|
+
function _extends() {
|
|
11
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
12
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
+
var source = arguments[i];
|
|
14
|
+
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
15
|
+
}
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
return _extends.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
const Notification = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
21
|
+
const { prefixCls, className, style, classNames, styles, components, title, description, icon, actions, role, closable, offset, notificationIndex, stackInThreshold, props: rootProps, duration = 4.5, showProgress, hovering: forcedHovering, pauseOnHover = true, onClick, onMouseEnter, onMouseLeave, onClose } = props;
|
|
22
|
+
const [percent, setPercent] = React$1.useState(0);
|
|
23
|
+
const noticePrefixCls = `${prefixCls}-notice`;
|
|
24
|
+
const [mergedClosable, closableConfig, closeBtnAriaProps] = useClosable(closable);
|
|
25
|
+
const onInternalClose = useEvent(() => {
|
|
26
|
+
closableConfig.onClose?.();
|
|
27
|
+
onClose?.();
|
|
28
|
+
});
|
|
29
|
+
const [hovering, setHovering] = React$1.useState(false);
|
|
30
|
+
const [onResume, onPause] = useNoticeTimer(duration, onInternalClose, setPercent);
|
|
31
|
+
const validPercent = 100 - Math.min(Math.max(percent * 100, 0), 100);
|
|
32
|
+
const Progress$1 = components?.progress || Progress;
|
|
33
|
+
React$1.useEffect(() => {
|
|
34
|
+
if (!pauseOnHover) return;
|
|
35
|
+
if (forcedHovering) onPause();
|
|
36
|
+
else if (!hovering) onResume();
|
|
37
|
+
}, [
|
|
38
|
+
forcedHovering,
|
|
39
|
+
hovering,
|
|
40
|
+
onPause,
|
|
41
|
+
onResume,
|
|
42
|
+
pauseOnHover
|
|
43
|
+
]);
|
|
44
|
+
function onInternalMouseEnter(event) {
|
|
45
|
+
setHovering(true);
|
|
46
|
+
if (pauseOnHover) onPause();
|
|
47
|
+
onMouseEnter?.(event);
|
|
48
|
+
}
|
|
49
|
+
function onInternalMouseLeave(event) {
|
|
50
|
+
setHovering(false);
|
|
51
|
+
if (pauseOnHover && !forcedHovering) onResume();
|
|
52
|
+
onMouseLeave?.(event);
|
|
53
|
+
}
|
|
54
|
+
function onInternalCloseClick(event) {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
onInternalClose();
|
|
58
|
+
}
|
|
59
|
+
const destroy = useEvent(() => {
|
|
60
|
+
if (hovering) onInternalMouseLeave();
|
|
61
|
+
});
|
|
62
|
+
React$1.useEffect(() => destroy, [destroy]);
|
|
63
|
+
const offsetRef = React$1.useRef(offset);
|
|
64
|
+
if (offset !== void 0) offsetRef.current = offset;
|
|
65
|
+
const notificationIndexRef = React$1.useRef(notificationIndex);
|
|
66
|
+
if (notificationIndex !== void 0) notificationIndexRef.current = notificationIndex;
|
|
67
|
+
const mergedOffset = offset ?? offsetRef.current;
|
|
68
|
+
const mergedNotificationIndex = notificationIndex ?? notificationIndexRef.current ?? 0;
|
|
69
|
+
const titleNode = isNonNullable(title) ? /*#__PURE__*/ React$1.createElement("div", {
|
|
70
|
+
className: clsx(`${noticePrefixCls}-title`, classNames?.title),
|
|
71
|
+
style: styles?.title
|
|
72
|
+
}, title) : null;
|
|
73
|
+
const descNode = isNonNullable(description) ? /*#__PURE__*/ React$1.createElement("div", {
|
|
74
|
+
className: clsx(`${noticePrefixCls}-description`, classNames?.description),
|
|
75
|
+
style: styles?.description
|
|
76
|
+
}, description) : null;
|
|
77
|
+
const hasTitle = titleNode !== null;
|
|
78
|
+
const hasDescription = descNode !== null;
|
|
79
|
+
let contentNode;
|
|
80
|
+
if (hasTitle && hasDescription) contentNode = /*#__PURE__*/ React$1.createElement("div", {
|
|
81
|
+
className: clsx(`${noticePrefixCls}-section`, classNames?.section),
|
|
82
|
+
style: styles?.section
|
|
83
|
+
}, titleNode, descNode);
|
|
84
|
+
else contentNode = titleNode || descNode;
|
|
85
|
+
if (isNonNullable(icon)) contentNode = /*#__PURE__*/ React$1.createElement("div", {
|
|
86
|
+
className: clsx(`${noticePrefixCls}-wrapper`, classNames?.wrapper),
|
|
87
|
+
style: styles?.wrapper
|
|
88
|
+
}, /*#__PURE__*/ React$1.createElement("div", {
|
|
89
|
+
className: clsx(`${noticePrefixCls}-icon`, classNames?.icon),
|
|
90
|
+
style: styles?.icon
|
|
91
|
+
}, icon), contentNode);
|
|
92
|
+
const actionsNode = isReactRenderable(actions) ? /*#__PURE__*/ React$1.createElement("div", {
|
|
93
|
+
className: clsx(`${noticePrefixCls}-actions`, classNames?.actions),
|
|
94
|
+
style: styles?.actions
|
|
95
|
+
}, actions) : null;
|
|
96
|
+
const mergedStyle = {
|
|
97
|
+
"--notification-index": mergedNotificationIndex,
|
|
98
|
+
...styles?.root,
|
|
99
|
+
...style
|
|
100
|
+
};
|
|
101
|
+
if (mergedOffset !== void 0) mergedStyle["--notification-y"] = `${mergedOffset}px`;
|
|
102
|
+
const mergedRole = role ?? rootProps?.role ?? "alert";
|
|
103
|
+
return /*#__PURE__*/ React$1.createElement("div", _extends({}, rootProps, {
|
|
104
|
+
ref,
|
|
105
|
+
role: mergedRole,
|
|
106
|
+
"data-notification-index": mergedNotificationIndex,
|
|
107
|
+
className: clsx(noticePrefixCls, className, classNames?.root, {
|
|
108
|
+
[`${noticePrefixCls}-closable`]: mergedClosable,
|
|
109
|
+
[`${noticePrefixCls}-stack-in-threshold`]: stackInThreshold
|
|
110
|
+
}),
|
|
111
|
+
style: mergedStyle,
|
|
112
|
+
onClick,
|
|
113
|
+
onMouseEnter: onInternalMouseEnter,
|
|
114
|
+
onMouseLeave: onInternalMouseLeave
|
|
115
|
+
}), contentNode, actionsNode, mergedClosable && /*#__PURE__*/ React$1.createElement("button", _extends({
|
|
116
|
+
type: "button",
|
|
117
|
+
className: clsx(`${noticePrefixCls}-close`, classNames?.close),
|
|
118
|
+
"aria-label": "Close"
|
|
119
|
+
}, closeBtnAriaProps, {
|
|
120
|
+
style: styles?.close,
|
|
121
|
+
onClick: onInternalCloseClick
|
|
122
|
+
}), closableConfig.closeIcon), showProgress && typeof duration === "number" && duration > 0 && /*#__PURE__*/ React$1.createElement(Progress$1, {
|
|
123
|
+
className: clsx(`${noticePrefixCls}-progress`, classNames?.progress),
|
|
124
|
+
percent: validPercent,
|
|
125
|
+
style: styles?.progress
|
|
126
|
+
}));
|
|
127
|
+
});
|
|
128
|
+
//#endregion
|
|
129
|
+
export { Notification as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
2
|
+
import * as React$1 from "../../../../react/index.js";
|
|
3
|
+
//#region node_modules/@rc-component/notification/es/NotificationList/Content.js
|
|
4
|
+
function _extends() {
|
|
5
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
6
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7
|
+
var source = arguments[i];
|
|
8
|
+
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
return _extends.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
const Content = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
15
|
+
const { listPrefixCls, height, topNoticeHeight = 0, topNoticeWidth = 0, className, style, ...restProps } = props;
|
|
16
|
+
const contentPrefixCls = `${listPrefixCls}-content`;
|
|
17
|
+
const prevHeightRef = React$1.useRef(height);
|
|
18
|
+
const heightStatus = height < prevHeightRef.current ? "decrease" : "increase";
|
|
19
|
+
prevHeightRef.current = height;
|
|
20
|
+
const contentStyle = {
|
|
21
|
+
...style,
|
|
22
|
+
height,
|
|
23
|
+
"--top-notificiation-height": `${topNoticeHeight}px`,
|
|
24
|
+
"--top-notificiation-width": `${topNoticeWidth}px`
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/ React$1.createElement("div", _extends({}, restProps, {
|
|
27
|
+
className: clsx(contentPrefixCls, `${contentPrefixCls}-${heightStatus}`, className),
|
|
28
|
+
style: contentStyle,
|
|
29
|
+
ref
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Content as default };
|