@unicom-cloud/ui 0.8.133 → 0.8.134
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 +1 -1
- package/Alert.js +1 -1
- package/Anchor.js +1 -1
- package/App.js +1 -1
- package/AutoComplete.js +1 -1
- package/Avatar.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +1 -1
- 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/Collapse.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Constant.js +1 -1
- package/Copy.js +2 -2
- package/Countdown.js +1 -1
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +1 -1
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Drawer.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +1 -1
- package/Form.js +1 -1
- package/Grid.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/Input.js +1 -1
- package/InputNumber.js +1 -1
- package/InputTag.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +1 -1
- package/List.js +1 -1
- package/Loading.js +1 -1
- package/Marquee.js +1 -1
- package/Masonry.js +1 -1
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Picker.js +1 -1
- package/Popconfirm.js +2 -2
- package/Popover.js +3 -11
- package/Portal.js +3 -7
- package/Progress.js +1 -1
- package/Progress2.js +1 -1
- package/QrCode.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +2 -2
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +33 -24
- package/RowCol.js +1 -1
- package/Segmented.js +1 -1
- package/Select.js +1 -1
- package/SelectView.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Splitter.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/SuspenseFallbackTest.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/TimePicker.js +1 -1
- package/Timeline.js +1 -1
- package/Timer.js +1 -1
- package/Tooltip.js +3 -13
- package/Tour.js +1 -1
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/Upload.js +1 -1
- package/VerificationCode.js +1 -1
- package/VirtualList.js +1 -1
- package/Watermark.js +1 -1
- package/affix/Affix.js +1 -1
- package/affix/index.js +1 -1
- package/alert/Alert.js +1 -1
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/anchor/context.js +1 -1
- package/anchor/index.js +1 -1
- package/anchor/utils.js +1 -1
- package/app/App.js +1 -1
- package/app/context.js +1 -1
- package/app/index.js +1 -1
- package/app/useApp.js +1 -1
- package/auto-complete/AutoComplete.js +1 -1
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +2 -2
- package/avatar/context.js +1 -1
- package/avatar/index.js +1 -1
- package/back-top/BackTop.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/Badge.js +1 -1
- package/badge/Count.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Item.js +1 -1
- package/breadcrumb/index.js +1 -1
- package/button/Button.js +33 -32
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/Lunar.js +1 -1
- package/calendar/Month.js +1 -1
- package/calendar/WeekList.js +1 -1
- package/calendar/Year.js +1 -1
- package/calendar/header/Panel.js +1 -1
- package/calendar/header/index.js +1 -1
- package/calendar/hook/useCellClassName.js +1 -1
- package/calendar/index.js +1 -1
- 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 +1 -1
- package/cascader/base/node.js +1 -1
- package/cascader/base/store.js +1 -1
- package/cascader/hook/useRefCurrent.js +1 -1
- package/cascader/index.js +1 -1
- package/cascader/panel/List.js +1 -1
- package/cascader/panel/Option.js +1 -1
- package/cascader/panel/Search.js +1 -1
- package/cascader/utils.js +1 -1
- package/checkbox/Checkbox.js +1 -1
- package/checkbox/Group.js +1 -1
- package/checkbox/GroupBlock.js +1 -1
- package/checkbox/IconCheck.js +1 -1
- package/checkbox/index.js +1 -1
- package/checkbox/useCheckbox.js +1 -1
- package/collapse/Collapse.js +1 -1
- package/collapse/Item.js +1 -1
- package/collapse/index.js +1 -1
- 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/Mode.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/colors.js +1 -1
- package/color-picker/hooks/useColorPicker.js +1 -1
- package/color-picker/hooks/useControlBlock.js +1 -1
- package/color-picker/index.js +66 -68
- package/color-picker/interface.js +1 -1
- package/color-picker/utils.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 +1 -1
- package/constant/index.js +1 -1
- package/copy/index.js +2 -2
- package/countdown/index.js +1 -1
- package/countdown/utils.js +1 -1
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +1 -1
- package/date-picker/context.js +1 -1
- package/date-picker/hook/useCellClassName.js +1 -1
- package/date-picker/index.js +1 -1
- package/date-picker/panel/Body.js +1 -1
- package/date-picker/panel/Footer.js +1 -1
- package/date-picker/panel/Header.js +1 -1
- package/date-picker/panel/Shortcut.js +1 -1
- package/date-picker/panel/WeekList.js +1 -1
- package/date-picker/panel/date/index.js +1 -1
- package/date-picker/panel/month/index.js +1 -1
- package/date-picker/panel/quarter/index.js +1 -1
- package/date-picker/panel/range/index.js +1 -1
- package/date-picker/panel/week/index.js +1 -1
- package/date-picker/panel/year/index.js +1 -1
- package/date-picker/utils.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +1 -1
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/Item.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +44 -38
- package/drawer/index.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 +1 -1
- package/form/Control.js +1 -1
- package/form/Form.js +1 -1
- package/form/FormItem.js +1 -1
- package/form/FormLabel.js +2 -2
- package/form/FormList.js +1 -1
- package/form/FormProvider.js +1 -1
- package/form/context.js +1 -1
- package/form/hook/useContext.js +1 -1
- package/form/hook/useForm.js +1 -1
- package/form/hook/useState.js +1 -1
- package/form/hook/useWatch.js +1 -1
- package/form/index.js +1 -1
- package/form/interface.js +1 -1
- package/form/promisify.js +1 -1
- package/form/store.js +1 -1
- package/form/utils.js +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/grid/context.js +1 -1
- package/grid/index.js +1 -1
- package/grid/utils.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/use-breakpoint/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-view/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.js +1 -1
- package/hooks/use-interval/index.js +1 -1
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-move/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +1 -1
- package/hooks/use-override-ref/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +1 -1
- package/hooks/use-responsive-state/index.js +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-verification-code/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-watermark/index.js +1 -1
- package/hooks/use-watermark/utils.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/useBreakpoint.js +1 -1
- package/hooks/useComputedState.js +1 -1
- package/hooks/useCreate.js +1 -1
- package/hooks/useCreation.js +1 -1
- package/hooks/useEvent.js +1 -1
- package/hooks/useForceUpdate.js +1 -1
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useIntersectionObservers.js +1 -1
- package/hooks/useInterval.js +1 -1
- package/hooks/useIsFirstRender.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useLatest.js +1 -1
- package/hooks/useListenWindowResize.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useMove.js +1 -1
- package/hooks/useMutationObservers.js +1 -1
- package/hooks/useOnlineStatus.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/hooks/useResizeObservers.js +1 -1
- package/hooks/useResponsiveState.js +1 -1
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useUpdateLayoutEffect.js +1 -1
- package/hooks/useVerificationCode.js +1 -1
- package/hooks/useWatch.js +1 -1
- package/hooks/useWatermark.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/Icon.js +1 -1
- package/icon/addIconFromCdn.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file/index.js +1 -1
- package/icons/file.js +1 -1
- package/icons.js +1 -1
- package/image/Image.js +1 -1
- package/image/ImageFooter.js +1 -1
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/ImagePreviewToolbar.js +2 -2
- package/image/TriggerForToolbar.js +1 -1
- package/image/index.js +1 -1
- package/image/previewGroupContext.js +1 -1
- package/image/utils/getFixTranslate.js +1 -1
- package/image/utils/getScale.js +1 -1
- package/image/utils/hook/useImageStatus.js +1 -1
- package/image/utils/hook/useShowFooter.js +1 -1
- package/index.js +4 -4
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +1 -1
- package/input/InputElement.js +1 -1
- package/input/Number.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Tag.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +1 -1
- package/input/index.js +1 -1
- package/input/useComposition.js +1 -1
- package/input-number/decimal.js +1 -1
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-number/utils.js +1 -1
- package/input-tag/InputTag.js +2 -2
- package/input-tag/index.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 +1 -1
- package/liquid-fill/index.js +1 -1
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +1 -1
- package/locale/ar-EG.js +1 -1
- package/locale/de-DE.js +1 -1
- package/locale/default.js +1 -1
- package/locale/en-US.js +1 -1
- package/locale/es-ES.js +1 -1
- package/locale/fr-FR.js +1 -1
- package/locale/id-ID.js +1 -1
- package/locale/it-IT.js +1 -1
- package/locale/ja-JP.js +1 -1
- package/locale/ko-KR.js +1 -1
- package/locale/ms-MY.js +1 -1
- package/locale/pt-BR.js +1 -1
- package/locale/pt-PT.js +1 -1
- package/locale/ru-RU.js +1 -1
- package/locale/th-TH.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/locale/vi-VN.js +1 -1
- package/locale/zh-CN.js +1 -1
- package/locale/zh-HK.js +1 -1
- package/locale/zh-TW.js +1 -1
- package/marquee/index.js +36 -48
- package/masonry/Masonry.js +1 -1
- package/masonry/MasonryItem.js +1 -1
- package/masonry/hooks/useDelay.js +1 -1
- package/masonry/hooks/useGutter.js +1 -1
- package/masonry/hooks/usePositions.js +1 -1
- package/masonry/hooks/useRefs.js +1 -1
- package/masonry/index.js +1 -1
- package/mentions/index.js +1 -1
- package/mentions/utils.js +1 -1
- package/menu/Indent.js +1 -1
- package/menu/Item.js +2 -2
- package/menu/ItemGroup.js +1 -1
- package/menu/Menu.js +1 -1
- package/menu/OverflowWrap.js +1 -1
- package/menu/context.js +1 -1
- package/menu/index.js +1 -1
- package/menu/sub-menu/Inline.js +1 -1
- package/menu/sub-menu/Pop.js +1 -1
- package/menu/sub-menu/index.js +1 -1
- package/menu/utils.js +1 -1
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +1 -1
- package/modal/Modal.js +2 -2
- package/modal/config.js +1 -1
- package/modal/index.js +1 -1
- package/modal/use-modal/Hook.js +1 -1
- package/modal/use-modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/notification/withNotification.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/pagination/index.js +1 -1
- package/pagination/interface.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/picker/index.js +1 -1
- package/popconfirm/index.js +2 -2
- package/popover/Popover.js +75 -0
- package/popover/index.js +3 -73
- package/portal/Portal.js +28 -0
- package/portal/index.js +3 -21
- package/progress/CircleProgress.js +2 -2
- package/progress/LineProgess.js +1 -1
- package/progress/StepProgress.js +1 -1
- package/progress/index.js +1 -1
- package/progress2/index.js +1 -1
- package/qr-code/index.js +1 -1
- package/qr-code/src/index.js +1 -1
- package/qr-code/src/qrcodegen.js +1 -1
- package/radio/Group.js +1 -1
- package/radio/GroupBlock.js +1 -1
- package/radio/Radio.js +1 -1
- package/radio/index.js +1 -1
- package/rate/index.js +2 -2
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +1 -1
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/403.js +1 -1
- package/result/404.js +1 -1
- package/result/500.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/Toolbar.js +498 -413
- package/rich-text/constant.js +1 -1
- package/rich-text/index.js +369 -336
- package/rich-text/lib/blots/block.js +1 -1
- package/rich-text/lib/blots/break.js +1 -1
- package/rich-text/lib/blots/container.js +1 -1
- package/rich-text/lib/blots/cursor.js +1 -1
- package/rich-text/lib/blots/embed.js +1 -1
- package/rich-text/lib/blots/inline.js +1 -1
- package/rich-text/lib/blots/scroll.js +1 -1
- package/rich-text/lib/blots/text.js +1 -1
- package/rich-text/lib/core/composition.js +1 -1
- package/rich-text/lib/core/editor.js +3 -1
- package/rich-text/lib/core/emitter.js +15 -33
- package/rich-text/lib/core/logger.js +1 -1
- package/rich-text/lib/core/module.js +1 -1
- package/rich-text/lib/core/rich.js +180 -174
- package/rich-text/lib/core/selection.js +114 -99
- package/rich-text/lib/core/theme.js +5 -4
- package/rich-text/lib/core/utils/createRegistryWithFormats.js +1 -1
- package/rich-text/lib/core/utils/scrollRectIntoView.js +1 -1
- package/rich-text/lib/core.js +21 -21
- package/rich-text/lib/delta/AttributeMap.js +1 -1
- package/rich-text/lib/delta/Op.js +1 -1
- package/rich-text/lib/delta/OpIterator.js +1 -1
- package/rich-text/lib/delta/index.js +1 -1
- package/rich-text/lib/diff/index.js +1 -1
- package/rich-text/lib/formats/align.js +16 -15
- package/rich-text/lib/formats/background.js +11 -10
- package/rich-text/lib/formats/blockquote.js +1 -1
- package/rich-text/lib/formats/bold.js +2 -2
- package/rich-text/lib/formats/code.js +1 -1
- package/rich-text/lib/formats/color.js +15 -13
- package/rich-text/lib/formats/direction.js +12 -11
- package/rich-text/lib/formats/emoji.js +19 -0
- package/rich-text/lib/formats/font.js +51 -16
- package/rich-text/lib/formats/formula.js +1 -1
- package/rich-text/lib/formats/header.js +15 -7
- package/rich-text/lib/formats/hr.js +18 -12
- package/rich-text/lib/formats/image.js +1 -1
- package/rich-text/lib/formats/indent.js +11 -10
- package/rich-text/lib/formats/italic.js +2 -2
- package/rich-text/lib/formats/lineHeight.js +2 -1
- package/rich-text/lib/formats/link.js +1 -1
- package/rich-text/lib/formats/list.js +1 -1
- package/rich-text/lib/formats/script.js +5 -3
- package/rich-text/lib/formats/size.js +17 -15
- package/rich-text/lib/formats/strike.js +1 -1
- package/rich-text/lib/formats/table.js +2 -2
- package/rich-text/lib/formats/underline.js +1 -1
- package/rich-text/lib/formats/video.js +1 -1
- package/rich-text/lib/index.js +48 -43
- package/rich-text/lib/modules/clipboard.js +1 -1
- package/rich-text/lib/modules/history.js +13 -16
- package/rich-text/lib/{formats → modules}/image-resize/index.js +9 -8
- package/rich-text/lib/{formats/image-resize/modules/BaseModule.js → modules/image-resize/modules/Base.js} +4 -4
- package/rich-text/lib/{formats → modules}/image-resize/modules/DisplaySize.js +2 -2
- package/rich-text/lib/{formats → modules}/image-resize/modules/Resize.js +2 -2
- package/rich-text/lib/{formats → modules}/image-resize/options.js +1 -1
- package/rich-text/lib/modules/input.js +36 -30
- package/rich-text/lib/modules/keyboard.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/index.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/normalizers/googleDocs.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/normalizers/msWord.js +1 -1
- package/rich-text/lib/modules/table.js +58 -55
- package/rich-text/lib/modules/toolbar.js +1 -1
- package/rich-text/lib/modules/uiNode.js +1 -1
- package/rich-text/lib/modules/uploader.js +1 -1
- package/rich-text/lib/parchment/attributor/attributor.js +1 -1
- package/rich-text/lib/parchment/attributor/class.js +1 -1
- package/rich-text/lib/parchment/attributor/store.js +1 -1
- package/rich-text/lib/parchment/attributor/style.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/container.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/leaf.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/parent.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/shadow.js +1 -1
- package/rich-text/lib/parchment/blot/block.js +1 -1
- package/rich-text/lib/parchment/blot/embed.js +1 -1
- package/rich-text/lib/parchment/blot/inline.js +1 -1
- package/rich-text/lib/parchment/blot/scroll.js +1 -1
- package/rich-text/lib/parchment/blot/text.js +1 -1
- package/rich-text/lib/parchment/collection/linked-list.js +1 -1
- package/rich-text/lib/parchment/error.js +1 -1
- package/rich-text/lib/parchment/index.js +1 -1
- package/rich-text/lib/parchment/registry.js +1 -1
- package/rich-text/lib/parchment/scope.js +1 -1
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/row-col/context.js +1 -1
- package/row-col/index.js +1 -1
- package/segmented/index.js +1 -1
- package/select/OptGroup.js +1 -1
- package/select/Option.js +1 -1
- package/select/Select.js +1 -1
- package/select/index.js +1 -1
- package/select/utils.js +1 -1
- package/select-view/Core.js +2 -2
- package/select-view/index.js +1 -1
- package/skeleton/Image.js +1 -1
- package/skeleton/Text.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/Dot.js +1 -1
- package/slider/Input.js +1 -1
- package/slider/Mark.js +1 -1
- package/slider/Tick.js +1 -1
- package/slider/hook/useInterval.js +1 -1
- package/slider/hook/useLegalValue.js +1 -1
- package/slider/index.js +1 -1
- package/slider/utils.js +1 -1
- package/space/index.js +1 -1
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +1 -1
- package/splitter/Splitter.js +1 -1
- package/splitter/hooks/useItems.js +1 -1
- package/splitter/hooks/useResizable.js +1 -1
- package/splitter/hooks/useResize.js +1 -1
- package/splitter/hooks/useSizes.js +1 -1
- package/splitter/index.js +1 -1
- package/statistic/index.js +1 -1
- package/statistic/interface.js +1 -1
- package/steps/Step.js +1 -1
- package/steps/index.js +1 -1
- package/style/normalize.less +6 -6
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +1 -1
- package/switch/index.js +1 -1
- package/table/ColGroup.js +1 -1
- package/table/Table.js +1 -1
- package/table/constant.js +1 -1
- package/table/context.js +1 -1
- package/table/hook/useColumns.js +1 -1
- package/table/hook/useComponent.js +1 -1
- package/table/hook/useExpand.js +1 -1
- package/table/hook/useRowSelection.js +1 -1
- package/table/hook/useSorter.js +1 -1
- package/table/hook/useStickyClassNames.js +1 -1
- package/table/hook/useStickyOffsets.js +1 -1
- package/table/hook/useThResizable.js +1 -1
- package/table/index.js +1 -1
- package/table/summary/Cell.js +1 -1
- package/table/summary/Row.js +1 -1
- package/table/summary/context.js +1 -1
- package/table/summary/index.js +1 -1
- package/table/tbody/Td.js +2 -2
- package/table/tbody/Tr.js +1 -1
- package/table/tbody/index.js +1 -1
- package/table/tfoot/index.js +1 -1
- package/table/th-resizable/index.js +1 -1
- package/table/thead/Column.js +2 -2
- package/table/thead/index.js +1 -1
- package/table/utils.js +1 -1
- package/tabs/Tab.js +1 -1
- package/tabs/TabContent.js +1 -1
- package/tabs/TabPane.js +1 -1
- package/tabs/hook/useDomSize.js +1 -1
- package/tabs/hook/useHeaderScroll.js +1 -1
- package/tabs/index.js +1 -1
- package/tabs/tab-header/DropdownIcon.js +1 -1
- package/tabs/tab-header/TabInk.js +1 -1
- package/tabs/tab-header/TabNavIcon.js +1 -1
- package/tabs/tab-header/TabTitle.js +1 -1
- package/tabs/tab-header/index.js +1 -1
- package/tabs/utils.js +1 -1
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/RangePicker.js +1 -1
- package/time-picker/TimeColumn.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/time-picker/context.js +1 -1
- package/time-picker/index.js +1 -1
- package/time-picker/utils.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/timeline/index.js +1 -1
- package/timer/index.js +1 -1
- package/tooltip/Tooltip.js +139 -0
- package/tooltip/index.js +3 -141
- package/tour/index.js +1 -1
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -1
- package/transfer/index.js +1 -1
- package/tree/Animation.js +1 -1
- package/tree/Context.js +1 -1
- package/tree/Node.js +1 -1
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +1 -1
- package/tree/index.js +1 -1
- package/tree/utils.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +1 -1
- package/tree-select/hook/useKeyCache.js +1 -1
- package/tree-select/hook/useStateValue.js +1 -1
- package/tree-select/hook/useTreeData.js +1 -1
- package/tree-select/index.js +1 -1
- package/tree-select/interface.js +1 -1
- package/tree-select/utils.js +1 -1
- package/trigger/getPopupStyle.js +1 -1
- package/trigger/index.js +1 -1
- package/types/popover/Popover.d.ts +6 -0
- package/types/popover/index.d.ts +3 -6
- package/types/portal/Portal.d.ts +4 -0
- package/types/portal/index.d.ts +4 -4
- package/types/portal/interface.d.ts +0 -1
- package/types/rich-text/interface.d.ts +7 -0
- package/types/rich-text/lib/core/editor.d.ts +1 -0
- package/types/rich-text/lib/core/emitter.d.ts +8 -8
- package/types/rich-text/lib/core/rich.d.ts +5 -2
- package/types/rich-text/lib/core/selection.d.ts +5 -0
- package/types/rich-text/lib/core/theme.d.ts +1 -1
- package/types/rich-text/lib/delta/index.d.ts +1 -0
- package/types/rich-text/lib/formats/align.d.ts +2 -1
- package/types/rich-text/lib/formats/background.d.ts +2 -1
- package/types/rich-text/lib/formats/color.d.ts +2 -1
- package/types/rich-text/lib/formats/direction.d.ts +2 -1
- package/types/rich-text/lib/formats/emoji.d.ts +7 -0
- package/types/rich-text/lib/formats/font.d.ts +6 -1
- package/types/rich-text/lib/formats/header.d.ts +5 -0
- package/types/rich-text/lib/formats/hr.d.ts +3 -0
- package/types/rich-text/lib/formats/indent.d.ts +2 -0
- package/types/rich-text/lib/formats/liOl.d.ts +2 -2
- package/types/rich-text/lib/formats/liUl.d.ts +2 -2
- package/types/rich-text/lib/formats/lineHeight.d.ts +2 -0
- package/types/rich-text/lib/formats/list.d.ts +2 -2
- package/types/rich-text/lib/formats/size.d.ts +3 -1
- package/types/rich-text/lib/formats/table.d.ts +3 -3
- package/types/rich-text/lib/modules/history.d.ts +1 -0
- package/types/rich-text/lib/{formats → modules}/image-resize/index.d.ts +2 -3
- package/types/rich-text/lib/{formats/image-resize/modules/BaseModule.d.ts → modules/image-resize/modules/Base.d.ts} +2 -1
- package/types/rich-text/lib/{formats → modules}/image-resize/modules/DisplaySize.d.ts +1 -1
- package/types/rich-text/lib/{formats → modules}/image-resize/modules/Resize.d.ts +1 -1
- package/types/rich-text/lib/modules/input.d.ts +1 -0
- package/types/rich-text/lib/modules/table.d.ts +4 -2
- package/types/tooltip/Tooltip.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -10
- package/types/tooltip/interface.d.ts +4 -0
- package/typography/Base.js +3 -3
- package/typography/EditContent.js +1 -1
- package/typography/Ellipsis.js +2 -2
- package/typography/Operations.js +2 -2
- package/typography/Paragraph.js +1 -1
- package/typography/Text.js +1 -1
- package/typography/Title.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/index.js +1 -1
- package/typography/useCssEllipsis.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/upload/Uploader.js +1 -1
- package/upload/constant.js +1 -1
- package/upload/index.js +1 -1
- package/upload/list/PictureItem.js +1 -1
- package/upload/list/TextItem.js +2 -2
- package/upload/list/UploadProgress.js +2 -2
- package/upload/list/index.js +1 -1
- package/upload/list/utils.js +1 -1
- package/upload/request.js +1 -1
- package/upload/utils.js +1 -1
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +1 -1
- package/utils/emitter.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +1 -1
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.js +1 -1
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +1 -1
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/names.js +1 -1
- package/utils/omit.js +1 -1
- package/utils/pad.js +1 -1
- package/utils/pick.js +1 -1
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +1 -1
- package/utils/responsiveObserve.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/setCreateRoot.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRaf.js +1 -1
- package/utils/throttleByRaf2.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/verification-code/index.js +1 -1
- package/version/index.js +2 -2
- package/virtual-list/Filler.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/virtual-list/constant.js +1 -1
- package/virtual-list/hook/useCacheChildrenNodes.js +1 -1
- package/virtual-list/hook/useComputeVirtualItemHeight.js +1 -1
- package/virtual-list/index.js +1 -1
- package/virtual-list/utils/algorithm.js +1 -1
- package/virtual-list/utils/item.js +1 -1
- package/watermark/Watermark.js +1 -1
- package/watermark/index.js +1 -1
- package/rich-text/lib/diff/index.d.ts +0 -21
- /package/types/rich-text/lib/{formats → modules}/image-resize/options.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
2
|
import g from "lodash/cloneDeep";
|
|
3
3
|
import { isString as v, isEqual as E } from "@unicom-cloud/ui-common/utils/is";
|
|
4
4
|
import "../parchment/blot/abstract/container.js";
|
|
@@ -8,65 +8,71 @@ import "../parchment/blot/block.js";
|
|
|
8
8
|
import "../parchment/blot/inline.js";
|
|
9
9
|
import "../parchment/blot/scroll.js";
|
|
10
10
|
import "../parchment/blot/text.js";
|
|
11
|
-
import
|
|
11
|
+
import O from "../parchment/scope.js";
|
|
12
12
|
import "../parchment/registry.js";
|
|
13
13
|
import l from "./emitter.js";
|
|
14
|
-
import
|
|
15
|
-
const
|
|
14
|
+
import S from "./logger.js";
|
|
15
|
+
const u = S("rich:selection");
|
|
16
16
|
class p {
|
|
17
17
|
constructor(t, n = 0) {
|
|
18
18
|
this.index = t, this.length = n;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class x {
|
|
22
22
|
constructor(t, n) {
|
|
23
|
-
this.
|
|
24
|
-
!this.mouseDown && !this.composing && setTimeout(this.update.bind(this, l.sources.USER), 1);
|
|
25
|
-
}), this.emitter.on(l.events.SCROLL_BEFORE_UPDATE, () => {
|
|
23
|
+
this.scrollBeforeUpdate = () => {
|
|
26
24
|
if (!this.hasFocus()) return;
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
const e = this.getNativeRange();
|
|
26
|
+
e != null && e.start.node !== this.cursor.textNode && this.emitter.once(
|
|
29
27
|
l.events.SCROLL_UPDATE,
|
|
30
|
-
(
|
|
28
|
+
(s, o) => {
|
|
31
29
|
try {
|
|
32
|
-
this.root.contains(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
this.root.contains(e.start.node) && this.root.contains(e.end.node) && this.setNativeRange(
|
|
31
|
+
e.start.node,
|
|
32
|
+
e.start.offset,
|
|
33
|
+
e.end.node,
|
|
34
|
+
e.end.offset
|
|
37
35
|
);
|
|
38
36
|
const i = o.some(
|
|
39
37
|
(r) => r.type === "characterData" || r.type === "childList" || r.type === "attributes" && r.target === this.root
|
|
40
38
|
);
|
|
41
|
-
this.update(i ? l.sources.SILENT :
|
|
39
|
+
this.update(i ? l.sources.SILENT : s);
|
|
42
40
|
} catch {
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
);
|
|
46
|
-
}
|
|
47
|
-
if (
|
|
48
|
-
const { startNode: o, startOffset: i, endNode: r, endOffset: a } =
|
|
44
|
+
}, this.scrollOptimize = (e, s) => {
|
|
45
|
+
if (s.range) {
|
|
46
|
+
const { startNode: o, startOffset: i, endNode: r, endOffset: a } = s.range;
|
|
49
47
|
this.setNativeRange(o, i, r, a), this.update(l.sources.SILENT);
|
|
50
48
|
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
handleComposition() {
|
|
54
|
-
this.emitter.on(l.events.COMPOSITION_BEFORE_START, () => {
|
|
49
|
+
}, this.compositionBeforeStart = () => {
|
|
55
50
|
this.composing = !0;
|
|
56
|
-
}
|
|
51
|
+
}, this.compositionEnd = () => {
|
|
57
52
|
if (this.composing = !1, this.cursor.parent) {
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
53
|
+
const e = this.cursor.restore();
|
|
54
|
+
if (!e) return;
|
|
60
55
|
setTimeout(() => {
|
|
61
56
|
this.setNativeRange(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
e.startNode,
|
|
58
|
+
e.startOffset,
|
|
59
|
+
e.endNode,
|
|
60
|
+
e.endOffset
|
|
66
61
|
);
|
|
67
62
|
}, 1);
|
|
68
63
|
}
|
|
69
|
-
})
|
|
64
|
+
}, this.emitter = n, this.scroll = t, this.composing = !1, this.mouseDown = !1, this.root = this.scroll.domNode, this.cursor = this.scroll.create("cursor", this), this.savedRange = new p(0, 0), this.lastRange = this.savedRange, this.lastNative = null, this.handleComposition(), this.handleDragging(), this.emitter.listenDOM("selectionchange", document, () => {
|
|
65
|
+
!this.mouseDown && !this.composing && setTimeout(this.update.bind(this, l.sources.USER), 1);
|
|
66
|
+
}), this.emitter.on(
|
|
67
|
+
l.events.SCROLL_BEFORE_UPDATE,
|
|
68
|
+
this.scrollBeforeUpdate
|
|
69
|
+
), this.emitter.on(l.events.SCROLL_OPTIMIZE, this.scrollOptimize), this.update(l.sources.SILENT);
|
|
70
|
+
}
|
|
71
|
+
handleComposition() {
|
|
72
|
+
this.emitter.on(
|
|
73
|
+
l.events.COMPOSITION_BEFORE_START,
|
|
74
|
+
this.compositionBeforeStart
|
|
75
|
+
), this.emitter.on(l.events.COMPOSITION_END, this.compositionEnd);
|
|
70
76
|
}
|
|
71
77
|
handleDragging() {
|
|
72
78
|
this.emitter.listenDOM("mousedown", document.body, () => {
|
|
@@ -80,52 +86,52 @@ class P {
|
|
|
80
86
|
}
|
|
81
87
|
format(t, n) {
|
|
82
88
|
this.scroll.update();
|
|
83
|
-
const
|
|
84
|
-
if (!(
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
if (
|
|
89
|
-
const o =
|
|
90
|
-
|
|
89
|
+
const e = this.getNativeRange();
|
|
90
|
+
if (!(e == null || !e.native.collapsed || this.scroll.query(t, O.BLOCK))) {
|
|
91
|
+
if (e.start.node !== this.cursor.textNode) {
|
|
92
|
+
const s = this.scroll.find(e.start.node, !1);
|
|
93
|
+
if (s == null) return;
|
|
94
|
+
if (s instanceof m) {
|
|
95
|
+
const o = s.split(e.start.offset);
|
|
96
|
+
s.parent.insertBefore(this.cursor, o);
|
|
91
97
|
} else
|
|
92
|
-
|
|
98
|
+
s.insertBefore(this.cursor, e.start.node);
|
|
93
99
|
this.cursor.attach();
|
|
94
100
|
}
|
|
95
101
|
this.cursor.format(t, n), this.scroll.optimize(), this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length), this.update();
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
getBounds(t, n = 0) {
|
|
99
|
-
const
|
|
100
|
-
t = Math.min(t,
|
|
101
|
-
let
|
|
105
|
+
const e = this.scroll.length();
|
|
106
|
+
t = Math.min(t, e - 1), n = Math.min(t + n, e - 1) - t;
|
|
107
|
+
let s, [o, i] = this.scroll.leaf(t);
|
|
102
108
|
if (o == null) return null;
|
|
103
109
|
if (n > 0 && i === o.length()) {
|
|
104
|
-
const [
|
|
105
|
-
if (
|
|
110
|
+
const [c] = this.scroll.leaf(t + 1);
|
|
111
|
+
if (c) {
|
|
106
112
|
const [R] = this.scroll.line(t), [N] = this.scroll.line(t + 1);
|
|
107
|
-
R === N && (o =
|
|
113
|
+
R === N && (o = c, i = 0);
|
|
108
114
|
}
|
|
109
115
|
}
|
|
110
|
-
[
|
|
116
|
+
[s, i] = o.position(i, !0);
|
|
111
117
|
const r = document.createRange();
|
|
112
118
|
if (n > 0)
|
|
113
|
-
return r.setStart(
|
|
114
|
-
let a = "left",
|
|
115
|
-
if (
|
|
116
|
-
if (!
|
|
119
|
+
return r.setStart(s, i), [o, i] = this.scroll.leaf(t + n), o == null ? null : ([s, i] = o.position(i, !0), r.setEnd(s, i), r.getBoundingClientRect());
|
|
120
|
+
let a = "left", h;
|
|
121
|
+
if (s instanceof Text) {
|
|
122
|
+
if (!s.data.length)
|
|
117
123
|
return null;
|
|
118
|
-
i <
|
|
124
|
+
i < s.data.length ? (r.setStart(s, i), r.setEnd(s, i + 1)) : (r.setStart(s, i - 1), r.setEnd(s, i), a = "right"), h = r.getBoundingClientRect();
|
|
119
125
|
} else {
|
|
120
126
|
if (!(o.domNode instanceof Element)) return null;
|
|
121
|
-
|
|
127
|
+
h = o.domNode.getBoundingClientRect(), i > 0 && (a = "right");
|
|
122
128
|
}
|
|
123
129
|
return {
|
|
124
|
-
bottom:
|
|
125
|
-
height:
|
|
126
|
-
left:
|
|
127
|
-
right:
|
|
128
|
-
top:
|
|
130
|
+
bottom: h.top + h.height,
|
|
131
|
+
height: h.height,
|
|
132
|
+
left: h[a],
|
|
133
|
+
right: h[a],
|
|
134
|
+
top: h.top,
|
|
129
135
|
width: 0
|
|
130
136
|
};
|
|
131
137
|
}
|
|
@@ -134,8 +140,8 @@ class P {
|
|
|
134
140
|
if (t == null || t.rangeCount <= 0) return null;
|
|
135
141
|
const n = t.getRangeAt(0);
|
|
136
142
|
if (n == null) return null;
|
|
137
|
-
const
|
|
138
|
-
return
|
|
143
|
+
const e = this.normalizeNative(n);
|
|
144
|
+
return u.info("getNativeRange", e), e;
|
|
139
145
|
}
|
|
140
146
|
getRange() {
|
|
141
147
|
const t = this.scroll.domNode;
|
|
@@ -152,11 +158,11 @@ class P {
|
|
|
152
158
|
[t.start.node, t.start.offset]
|
|
153
159
|
];
|
|
154
160
|
t.native.collapsed || n.push([t.end.node, t.end.offset]);
|
|
155
|
-
const
|
|
156
|
-
const [r, a] = i,
|
|
157
|
-
return a === 0 ?
|
|
158
|
-
}),
|
|
159
|
-
return new p(o,
|
|
161
|
+
const e = n.map((i) => {
|
|
162
|
+
const [r, a] = i, h = this.scroll.find(r, !0), c = h.offset(this.scroll);
|
|
163
|
+
return a === 0 ? c : h instanceof m ? c + h.index(r, a) : c + h.length();
|
|
164
|
+
}), s = Math.min(Math.max(...e), this.scroll.length() - 1), o = Math.min(s, ...e);
|
|
165
|
+
return new p(o, s - o);
|
|
160
166
|
}
|
|
161
167
|
normalizeNative(t) {
|
|
162
168
|
if (!d(this.root, t.startContainer) || !t.collapsed && !d(this.root, t.endContainer))
|
|
@@ -169,65 +175,65 @@ class P {
|
|
|
169
175
|
end: { node: t.endContainer, offset: t.endOffset },
|
|
170
176
|
native: t
|
|
171
177
|
};
|
|
172
|
-
return [n.start, n.end].forEach((
|
|
173
|
-
let { node:
|
|
174
|
-
for (; !(
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
else if (
|
|
178
|
-
|
|
178
|
+
return [n.start, n.end].forEach((e) => {
|
|
179
|
+
let { node: s, offset: o } = e;
|
|
180
|
+
for (; !(s instanceof Text) && s.childNodes.length > 0; )
|
|
181
|
+
if (s.childNodes.length > o)
|
|
182
|
+
s = s.childNodes[o], o = 0;
|
|
183
|
+
else if (s.childNodes.length === o)
|
|
184
|
+
s = s.lastChild, s instanceof Text ? o = s.data.length : s.childNodes.length > 0 ? o = s.childNodes.length : o = s.childNodes.length + 1;
|
|
179
185
|
else
|
|
180
186
|
break;
|
|
181
|
-
|
|
187
|
+
e.node = s, e.offset = o;
|
|
182
188
|
}), n;
|
|
183
189
|
}
|
|
184
190
|
rangeToNative(t) {
|
|
185
|
-
const n = this.scroll.length(),
|
|
186
|
-
|
|
187
|
-
const [i, r] = this.scroll.leaf(
|
|
191
|
+
const n = this.scroll.length(), e = (s, o) => {
|
|
192
|
+
s = Math.min(n - 1, s);
|
|
193
|
+
const [i, r] = this.scroll.leaf(s);
|
|
188
194
|
return i ? i.position(r, o) : [null, -1];
|
|
189
195
|
};
|
|
190
196
|
return [
|
|
191
|
-
...
|
|
192
|
-
...
|
|
197
|
+
...e(t.index, !1),
|
|
198
|
+
...e(t.index + t.length, !0)
|
|
193
199
|
];
|
|
194
200
|
}
|
|
195
201
|
setSelectionByNode(t) {
|
|
196
|
-
const n = window.getSelection(),
|
|
197
|
-
|
|
202
|
+
const n = window.getSelection(), e = document.createRange();
|
|
203
|
+
e.selectNode(t), n.removeAllRanges(), n.addRange(e);
|
|
198
204
|
}
|
|
199
|
-
setNativeRange(t, n,
|
|
200
|
-
if (
|
|
205
|
+
setNativeRange(t, n, e = t, s = n, o = !1) {
|
|
206
|
+
if (u.info("setNativeRange", t, n, e, s), t != null && (this.root.parentNode == null || t.parentNode == null || e.parentNode == null))
|
|
201
207
|
return;
|
|
202
208
|
const i = window.getSelection();
|
|
203
209
|
if (i != null)
|
|
204
210
|
if (t != null) {
|
|
205
211
|
this.hasFocus() || this.root.focus({ preventScroll: !0 });
|
|
206
212
|
const { native: r } = this.getNativeRange() || {};
|
|
207
|
-
if (r == null || o || t !== r.startContainer || n !== r.startOffset ||
|
|
213
|
+
if (r == null || o || t !== r.startContainer || n !== r.startOffset || e !== r.endContainer || s !== r.endOffset) {
|
|
208
214
|
t instanceof Element && t.tagName === "BR" && (n = Array.from(t.parentNode.childNodes).indexOf(
|
|
209
215
|
t
|
|
210
|
-
), t = t.parentNode),
|
|
211
|
-
|
|
212
|
-
),
|
|
216
|
+
), t = t.parentNode), e instanceof Element && e.tagName === "BR" && (s = Array.from(e.parentNode.childNodes).indexOf(
|
|
217
|
+
e
|
|
218
|
+
), e = e.parentNode);
|
|
213
219
|
const a = document.createRange();
|
|
214
|
-
a.setStart(t, n), a.setEnd(
|
|
220
|
+
a.setStart(t, n), a.setEnd(e, s), i.removeAllRanges(), i.addRange(a);
|
|
215
221
|
}
|
|
216
222
|
} else
|
|
217
223
|
i.removeAllRanges(), this.root.blur();
|
|
218
224
|
}
|
|
219
|
-
setRange(t, n = !1,
|
|
220
|
-
if (v(n) && (
|
|
221
|
-
const
|
|
222
|
-
this.setNativeRange(...
|
|
225
|
+
setRange(t, n = !1, e = l.sources.API) {
|
|
226
|
+
if (v(n) && (e = n, n = !1), u.info("setRange", t), t != null) {
|
|
227
|
+
const s = this.rangeToNative(t);
|
|
228
|
+
this.setNativeRange(...s, n);
|
|
223
229
|
} else
|
|
224
230
|
this.setNativeRange(null);
|
|
225
|
-
this.update(
|
|
231
|
+
this.update(e);
|
|
226
232
|
}
|
|
227
233
|
update(t = l.sources.USER) {
|
|
228
|
-
const n = this.lastRange, [
|
|
229
|
-
if (this.lastRange =
|
|
230
|
-
if (!this.composing &&
|
|
234
|
+
const n = this.lastRange, [e, s] = this.getRange();
|
|
235
|
+
if (this.lastRange = e, this.lastNative = s, this.lastRange != null && (this.savedRange = this.lastRange), !E(n, this.lastRange)) {
|
|
236
|
+
if (!this.composing && s != null && s.native.collapsed && s.start.node !== this.cursor.textNode) {
|
|
231
237
|
const i = this.cursor.restore();
|
|
232
238
|
i && this.setNativeRange(
|
|
233
239
|
i.startNode,
|
|
@@ -245,16 +251,25 @@ class P {
|
|
|
245
251
|
this.emitter.emit(l.events.EDITOR_CHANGE, ...o), t !== l.sources.SILENT && this.emitter.emit(...o);
|
|
246
252
|
}
|
|
247
253
|
}
|
|
254
|
+
destroy() {
|
|
255
|
+
this.emitter.off(
|
|
256
|
+
l.events.SCROLL_BEFORE_UPDATE,
|
|
257
|
+
this.scrollBeforeUpdate
|
|
258
|
+
), this.emitter.off(l.events.SCROLL_OPTIMIZE, this.scrollOptimize), this.emitter.off(
|
|
259
|
+
l.events.COMPOSITION_BEFORE_START,
|
|
260
|
+
this.compositionBeforeStart
|
|
261
|
+
), this.emitter.off(l.events.COMPOSITION_END, this.compositionEnd);
|
|
262
|
+
}
|
|
248
263
|
}
|
|
249
|
-
function d(
|
|
264
|
+
function d(f, t) {
|
|
250
265
|
try {
|
|
251
266
|
t.parentNode;
|
|
252
267
|
} catch {
|
|
253
268
|
return !1;
|
|
254
269
|
}
|
|
255
|
-
return
|
|
270
|
+
return f.contains(t);
|
|
256
271
|
}
|
|
257
272
|
export {
|
|
258
273
|
p as Range,
|
|
259
|
-
|
|
274
|
+
x as default
|
|
260
275
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
|
+
import "../core.js";
|
|
3
|
+
import i from "./rich.js";
|
|
3
4
|
class o {
|
|
4
5
|
constructor(s, t) {
|
|
5
6
|
this.rich = s, this.options = t, this.modules = {};
|
|
@@ -20,7 +21,7 @@ class o {
|
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
addModule(s) {
|
|
23
|
-
const t =
|
|
24
|
+
const t = i.import(`modules/${s}`);
|
|
24
25
|
return this.modules[s] = new t(
|
|
25
26
|
this.rich,
|
|
26
27
|
this.options.modules[s] || {}
|
|
@@ -28,7 +29,7 @@ class o {
|
|
|
28
29
|
}
|
|
29
30
|
destroy() {
|
|
30
31
|
Object.entries(this.modules).forEach(([s, t], e, d) => {
|
|
31
|
-
|
|
32
|
+
t.destroy();
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
2
|
const a = (t) => t.parentElement || t.getRootNode().host || null, y = (t) => {
|
|
3
3
|
const o = t.getBoundingClientRect(), s = "offsetWidth" in t && Math.abs(o.width) / t.offsetWidth || 1, e = "offsetHeight" in t && Math.abs(o.height) / t.offsetHeight || 1;
|
|
4
4
|
return {
|
package/rich-text/lib/core.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import o from "./
|
|
3
|
-
import
|
|
4
|
-
import t from "./blots/
|
|
5
|
-
import e from "./blots/
|
|
6
|
-
import l from "./blots/
|
|
7
|
-
import i from "./blots/
|
|
8
|
-
import p from "./blots/
|
|
9
|
-
import s from "./blots/
|
|
10
|
-
import d from "./
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
|
+
import o, { BlockEmbed as r } from "./blots/block.js";
|
|
3
|
+
import m from "./blots/break.js";
|
|
4
|
+
import t from "./blots/container.js";
|
|
5
|
+
import e from "./blots/cursor.js";
|
|
6
|
+
import l from "./blots/embed.js";
|
|
7
|
+
import i from "./blots/inline.js";
|
|
8
|
+
import p from "./blots/scroll.js";
|
|
9
|
+
import s from "./blots/text.js";
|
|
10
|
+
import d from "./core/rich.js";
|
|
11
11
|
import { default as T } from "./delta/index.js";
|
|
12
12
|
import b from "./modules/clipboard.js";
|
|
13
13
|
import f from "./modules/history.js";
|
|
@@ -16,16 +16,16 @@ import u from "./modules/keyboard.js";
|
|
|
16
16
|
import c from "./modules/uiNode.js";
|
|
17
17
|
import n from "./modules/uploader.js";
|
|
18
18
|
import { default as q } from "./core/module.js";
|
|
19
|
-
|
|
20
|
-
"blots/block":
|
|
21
|
-
"blots/block/embed":
|
|
22
|
-
"blots/break":
|
|
23
|
-
"blots/container":
|
|
24
|
-
"blots/cursor":
|
|
25
|
-
"blots/embed":
|
|
26
|
-
"blots/inline":
|
|
27
|
-
"blots/scroll":
|
|
28
|
-
"blots/text":
|
|
19
|
+
d.register({
|
|
20
|
+
"blots/block": o,
|
|
21
|
+
"blots/block/embed": r,
|
|
22
|
+
"blots/break": m,
|
|
23
|
+
"blots/container": t,
|
|
24
|
+
"blots/cursor": e,
|
|
25
|
+
"blots/embed": l,
|
|
26
|
+
"blots/inline": i,
|
|
27
|
+
"blots/scroll": p,
|
|
28
|
+
"blots/text": s,
|
|
29
29
|
"modules/clipboard": b,
|
|
30
30
|
"modules/history": f,
|
|
31
31
|
"modules/keyboard": u,
|
|
@@ -36,5 +36,5 @@ o.register({
|
|
|
36
36
|
export {
|
|
37
37
|
T as Delta,
|
|
38
38
|
q as Module,
|
|
39
|
-
|
|
39
|
+
d as default
|
|
40
40
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
2
|
import { isNumber as t, isObjectLike as r, isString as i } from "@unicom-cloud/ui-common/utils/is";
|
|
3
3
|
function n(e) {
|
|
4
4
|
return t(e.delete) ? e.delete : t(e.retain) ? e.retain : r(e.retain) ? 1 : i(e.insert) ? e.insert.length : 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import { RICH_TEXT_CLASS_NAME_PREFIX as
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
|
+
import { RICH_TEXT_CLASS_NAME_PREFIX as o } from "../../constant.js";
|
|
3
3
|
import "../parchment/blot/abstract/container.js";
|
|
4
4
|
import "../parchment/blot/abstract/leaf.js";
|
|
5
5
|
import "../parchment/blot/abstract/parent.js";
|
|
@@ -7,21 +7,22 @@ import "../parchment/blot/block.js";
|
|
|
7
7
|
import "../parchment/blot/inline.js";
|
|
8
8
|
import "../parchment/blot/scroll.js";
|
|
9
9
|
import "../parchment/blot/text.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import r from "../parchment/attributor/attributor.js";
|
|
11
|
+
import m from "../parchment/attributor/class.js";
|
|
12
12
|
import "../parchment/registry.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import n from "../parchment/scope.js";
|
|
14
|
+
import e from "../parchment/attributor/style.js";
|
|
15
15
|
const t = {
|
|
16
|
-
scope:
|
|
17
|
-
whitelist: ["right", "center", "justify"]
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
`${
|
|
16
|
+
scope: n.BLOCK,
|
|
17
|
+
whitelist: ["left", "right", "center", "justify"]
|
|
18
|
+
}, i = "align", _ = new r(i, "align", t), y = new m(
|
|
19
|
+
i,
|
|
20
|
+
`${o}-align`,
|
|
21
21
|
t
|
|
22
|
-
),
|
|
22
|
+
), E = new e(i, "text-align", t);
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
y as
|
|
24
|
+
_ as AlignAttribute,
|
|
25
|
+
i as AlignAttributorName,
|
|
26
|
+
y as AlignClass,
|
|
27
|
+
E as AlignStyle
|
|
27
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
import { RICH_TEXT_CLASS_NAME_PREFIX as
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
|
+
import { RICH_TEXT_CLASS_NAME_PREFIX as t } from "../../constant.js";
|
|
3
3
|
import "../parchment/blot/abstract/container.js";
|
|
4
4
|
import "../parchment/blot/abstract/leaf.js";
|
|
5
5
|
import "../parchment/blot/abstract/parent.js";
|
|
@@ -9,19 +9,20 @@ import "../parchment/blot/scroll.js";
|
|
|
9
9
|
import "../parchment/blot/text.js";
|
|
10
10
|
import "@unicom-cloud/ui-common/utils/is";
|
|
11
11
|
import o from "../parchment/scope.js";
|
|
12
|
-
import
|
|
12
|
+
import m from "../parchment/attributor/class.js";
|
|
13
13
|
import "../parchment/registry.js";
|
|
14
|
-
import { ColorAttributor as
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
`${
|
|
14
|
+
import { ColorAttributor as p } from "./color.js";
|
|
15
|
+
const r = "background", d = new m(
|
|
16
|
+
r,
|
|
17
|
+
`${t}-bg`,
|
|
18
18
|
{
|
|
19
19
|
scope: o.INLINE
|
|
20
20
|
}
|
|
21
|
-
),
|
|
21
|
+
), k = new p(r, "background-color", {
|
|
22
22
|
scope: o.INLINE
|
|
23
23
|
});
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
d as BackgroundClass,
|
|
26
|
+
r as BackgroundColorAttributorName,
|
|
27
|
+
k as BackgroundStyle
|
|
27
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
2
|
import { RICH_TEXT_CLASS_NAME_PREFIX as e } from "../../constant.js";
|
|
3
3
|
import a from "../blots/inline.js";
|
|
4
4
|
class s extends a {
|
|
@@ -6,7 +6,7 @@ class s extends a {
|
|
|
6
6
|
this.blotName = "bold";
|
|
7
7
|
}
|
|
8
8
|
static {
|
|
9
|
-
this.tagName = ["
|
|
9
|
+
this.tagName = ["B", "STRONG"];
|
|
10
10
|
}
|
|
11
11
|
static create() {
|
|
12
12
|
return super.create();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* 2026-01-04 16:21:01 */
|
|
2
2
|
import { RICH_TEXT_CLASS_NAME_PREFIX as p } from "../../constant.js";
|
|
3
3
|
import "../parchment/blot/abstract/container.js";
|
|
4
4
|
import "../parchment/blot/abstract/leaf.js";
|
|
@@ -9,26 +9,28 @@ import "../parchment/blot/scroll.js";
|
|
|
9
9
|
import "../parchment/blot/text.js";
|
|
10
10
|
import "@unicom-cloud/ui-common/utils/is";
|
|
11
11
|
import r from "../parchment/scope.js";
|
|
12
|
-
import
|
|
12
|
+
import l from "../parchment/attributor/class.js";
|
|
13
13
|
import "../parchment/registry.js";
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
import s from "../parchment/attributor/style.js";
|
|
15
|
+
const t = "color";
|
|
16
|
+
class m extends s {
|
|
17
|
+
value(e) {
|
|
18
|
+
let o = super.value(e);
|
|
19
|
+
return o.startsWith("rgb(") ? (o = o.replace(/^[^\d]+/, "").replace(/[^\d]+$/, ""), `#${o.split(",").map((i) => `00${parseInt(i, 10).toString(16)}`.slice(-2)).join("")}`) : o;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
22
|
+
const d = new l(
|
|
23
|
+
t,
|
|
23
24
|
`${p}-color`,
|
|
24
25
|
{
|
|
25
26
|
scope: r.INLINE
|
|
26
27
|
}
|
|
27
|
-
),
|
|
28
|
+
), h = new m(t, "color", {
|
|
28
29
|
scope: r.INLINE
|
|
29
30
|
});
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
d as
|
|
32
|
+
m as ColorAttributor,
|
|
33
|
+
t as ColorAttributorName,
|
|
34
|
+
d as ColorClass,
|
|
35
|
+
h as ColorStyle
|
|
34
36
|
};
|