zartui 3.0.1 → 3.0.3
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/es/action-sheet/ActionSheet.d.ts +194 -0
- package/es/action-sheet/ActionSheet.mjs +142 -0
- package/es/action-sheet/index.css +1 -0
- package/es/action-sheet/index.d.ts +135 -0
- package/es/action-sheet/index.mjs +10 -0
- package/es/action-sheet/style/index.d.ts +1 -0
- package/es/action-sheet/style/index.mjs +7 -0
- package/es/avatar/Avatar.d.ts +55 -0
- package/es/avatar/Avatar.mjs +65 -0
- package/es/avatar/index.css +1 -0
- package/es/avatar/index.d.ts +43 -0
- package/es/avatar/index.mjs +8 -0
- package/es/avatar/style/index.d.ts +1 -0
- package/es/avatar/style/index.mjs +5 -0
- package/es/avatar/types.d.ts +2 -0
- package/es/avatar/types.mjs +0 -0
- package/es/badge/Badge.d.ts +11 -5
- package/es/badge/Badge.mjs +13 -6
- package/es/badge/index.css +1 -1
- package/es/badge/index.d.ts +7 -3
- package/es/button/Button.d.ts +1 -1
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +1 -1
- package/es/calendar/Calendar.d.ts +302 -0
- package/es/calendar/Calendar.mjs +419 -0
- package/es/calendar/CalendarDay.d.ts +32 -0
- package/es/calendar/CalendarDay.mjs +108 -0
- package/es/calendar/CalendarHeader.d.ts +26 -0
- package/es/calendar/CalendarHeader.mjs +58 -0
- package/es/calendar/CalendarMonth.d.ts +86 -0
- package/es/calendar/CalendarMonth.mjs +201 -0
- package/es/calendar/index.css +1 -0
- package/es/calendar/index.d.ts +217 -0
- package/es/calendar/index.mjs +10 -0
- package/es/calendar/style/index.d.ts +1 -0
- package/es/calendar/style/index.mjs +9 -0
- package/es/calendar/types.d.ts +28 -0
- package/es/calendar/types.mjs +0 -0
- package/es/calendar/utils.d.ts +12 -0
- package/es/calendar/utils.mjs +56 -0
- package/es/cascader/Cascader.d.ts +171 -0
- package/es/cascader/Cascader.mjs +284 -0
- package/es/cascader/index.css +1 -0
- package/es/cascader/index.d.ts +126 -0
- package/es/cascader/index.mjs +10 -0
- package/es/cascader/style/index.d.ts +1 -0
- package/es/cascader/style/index.mjs +14 -0
- package/es/cascader/types.d.ts +19 -0
- package/es/cascader/types.mjs +0 -0
- package/es/cell/Cell.d.ts +49 -26
- package/es/cell/Cell.mjs +71 -31
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +29 -15
- package/es/cell/types.d.ts +1 -0
- package/es/cell/types.mjs +0 -0
- package/es/cell-group/CellGroup.d.ts +29 -0
- package/es/cell-group/CellGroup.mjs +43 -0
- package/es/cell-group/index.css +1 -0
- package/es/cell-group/index.d.ts +25 -0
- package/es/cell-group/index.mjs +8 -0
- package/es/cell-group/style/index.d.ts +1 -0
- package/es/cell-group/style/index.mjs +2 -0
- package/es/checkbox/Checkbox.d.ts +64 -0
- package/es/checkbox/Checkbox.mjs +81 -0
- package/es/checkbox/Checker.d.ts +85 -0
- package/es/checkbox/Checker.mjs +113 -0
- package/es/checkbox/index.css +1 -0
- package/es/checkbox/index.d.ts +51 -0
- package/es/checkbox/index.mjs +8 -0
- package/es/checkbox/style/index.d.ts +1 -0
- package/es/checkbox/style/index.mjs +5 -0
- package/es/checkbox/types.d.ts +13 -0
- package/es/checkbox/types.mjs +0 -0
- package/es/checkbox-group/CheckboxGroup.d.ts +54 -0
- package/es/checkbox-group/CheckboxGroup.mjs +71 -0
- package/es/checkbox-group/index.css +1 -0
- package/es/checkbox-group/index.d.ts +42 -0
- package/es/checkbox-group/index.mjs +8 -0
- package/es/checkbox-group/style/index.d.ts +1 -0
- package/es/checkbox-group/style/index.mjs +2 -0
- package/es/checkbox-group/types.d.ts +16 -0
- package/es/checkbox-group/types.mjs +0 -0
- package/es/col/Col.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +55 -0
- package/es/collapse/Collapse.mjs +109 -0
- package/es/collapse/index.d.ts +36 -0
- package/es/collapse/index.mjs +10 -0
- package/es/collapse/style/index.d.ts +1 -0
- package/es/collapse/style/index.mjs +1 -0
- package/es/collapse-item/CollapseItem.d.ts +34 -0
- package/es/collapse-item/CollapseItem.mjs +135 -0
- package/es/collapse-item/index.css +1 -0
- package/es/collapse-item/index.d.ts +30 -0
- package/es/collapse-item/index.mjs +10 -0
- package/es/collapse-item/style/index.d.ts +1 -0
- package/es/collapse-item/style/index.mjs +4 -0
- package/es/collapse-item/types.d.ts +6 -0
- package/es/collapse-item/types.mjs +0 -0
- package/es/composables/use-route.d.ts +1 -4
- package/es/composables/use-route.mjs +1 -3
- package/es/config-provider/ConfigProvider.mjs +2 -2
- package/es/date-time-picker/DateTimePicker.d.ts +242 -0
- package/es/date-time-picker/DateTimePicker.mjs +248 -0
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +334 -0
- package/es/date-time-picker/DateTimePickerWrapper.mjs +254 -0
- package/es/date-time-picker/index.css +1 -0
- package/es/date-time-picker/index.d.ts +247 -0
- package/es/date-time-picker/index.mjs +10 -0
- package/es/date-time-picker/style/index.d.ts +1 -0
- package/es/date-time-picker/style/index.mjs +12 -0
- package/es/date-time-picker/types.d.ts +5 -0
- package/es/date-time-picker/types.mjs +0 -0
- package/es/date-time-picker/utils.d.ts +53 -0
- package/es/date-time-picker/utils.mjs +42 -0
- package/es/dialog/Dialog.d.ts +187 -0
- package/es/dialog/Dialog.mjs +197 -0
- package/es/dialog/function-call.d.ts +6 -0
- package/es/dialog/function-call.mjs +85 -0
- package/es/dialog/index.css +1 -0
- package/es/dialog/index.d.ts +138 -0
- package/es/dialog/index.mjs +22 -0
- package/es/dialog/style/index.d.ts +1 -0
- package/es/dialog/style/index.mjs +8 -0
- package/es/dialog/types.d.ts +32 -0
- package/es/dialog/types.mjs +0 -0
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.css +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +78 -0
- package/es/dropdown-item/DropdownItem.mjs +302 -0
- package/es/dropdown-item/index.css +1 -0
- package/es/dropdown-item/index.d.ts +64 -0
- package/es/dropdown-item/index.mjs +10 -0
- package/es/dropdown-item/style/index.d.ts +1 -0
- package/es/dropdown-item/style/index.mjs +12 -0
- package/es/dropdown-item/types.d.ts +23 -0
- package/es/dropdown-item/types.mjs +0 -0
- package/es/dropdown-menu/DropdownMenu.d.ts +82 -0
- package/es/dropdown-menu/DropdownMenu.mjs +142 -0
- package/es/dropdown-menu/index.css +1 -0
- package/es/dropdown-menu/index.d.ts +63 -0
- package/es/dropdown-menu/index.mjs +10 -0
- package/es/dropdown-menu/style/index.d.ts +1 -0
- package/es/dropdown-menu/style/index.mjs +4 -0
- package/es/dropdown-menu/types.d.ts +8 -0
- package/es/dropdown-menu/types.mjs +0 -0
- package/es/empty/Empty.d.ts +2 -1
- package/es/empty/Empty.mjs +10 -5
- package/es/empty/Images.d.ts +7 -2
- package/es/empty/Images.mjs +855 -2004
- package/es/empty/index.css +1 -1
- package/es/field/Field.d.ts +364 -0
- package/es/field/Field.mjs +510 -0
- package/es/field/index.css +1 -0
- package/es/field/index.d.ts +230 -0
- package/es/field/index.mjs +8 -0
- package/es/field/style/index.d.ts +1 -0
- package/es/field/style/index.mjs +5 -0
- package/es/field/types.d.ts +44 -0
- package/es/field/types.mjs +0 -0
- package/es/field/utils.d.ts +15 -0
- package/es/field/utils.mjs +107 -0
- package/es/form/Form.d.ts +88 -0
- package/es/form/Form.mjs +158 -0
- package/es/form/index.d.ts +69 -0
- package/es/form/index.mjs +8 -0
- package/es/form/style/index.d.ts +1 -0
- package/es/form/style/index.mjs +1 -0
- package/es/form/types.d.ts +15 -0
- package/es/form/types.mjs +0 -0
- package/es/grid/Grid.d.ts +74 -0
- package/es/grid/Grid.mjs +48 -0
- package/es/grid/index.css +1 -0
- package/es/grid/index.d.ts +54 -0
- package/es/grid/index.mjs +10 -0
- package/es/grid/style/index.d.ts +1 -0
- package/es/grid/style/index.mjs +2 -0
- package/es/grid-item/GridItem.d.ts +45 -0
- package/es/grid-item/GridItem.mjs +146 -0
- package/es/grid-item/index.css +1 -0
- package/es/grid-item/index.d.ts +36 -0
- package/es/grid-item/index.mjs +10 -0
- package/es/grid-item/style/index.d.ts +1 -0
- package/es/grid-item/style/index.mjs +5 -0
- package/es/icon/config.mjs +7 -0
- package/es/icon/index.css +1 -1
- package/es/image/Image.d.ts +105 -0
- package/es/image/Image.mjs +151 -0
- package/es/image/index.css +1 -0
- package/es/image/index.d.ts +77 -0
- package/es/image/index.mjs +8 -0
- package/es/image/style/index.d.ts +1 -0
- package/es/image/style/index.mjs +4 -0
- package/es/image-preview/ImagePreview.d.ts +188 -0
- package/es/image-preview/ImagePreview.mjs +178 -0
- package/es/image-preview/ImagePreviewItem.d.ts +47 -0
- package/es/image-preview/ImagePreviewItem.mjs +257 -0
- package/es/image-preview/function-call.d.ts +3 -0
- package/es/image-preview/function-call.mjs +76 -0
- package/es/image-preview/index.css +1 -0
- package/es/image-preview/index.d.ts +139 -0
- package/es/image-preview/index.mjs +12 -0
- package/es/image-preview/style/index.d.ts +1 -0
- package/es/image-preview/style/index.mjs +10 -0
- package/es/image-preview/types.d.ts +43 -0
- package/es/image-preview/types.mjs +0 -0
- package/es/index.d.ts +39 -1
- package/es/index.mjs +114 -2
- package/es/lazyload/index.d.ts +3 -0
- package/es/lazyload/index.mjs +6 -0
- package/es/lazyload/style/index.d.ts +1 -0
- package/es/lazyload/style/index.mjs +1 -0
- package/es/lazyload/vue-lazyload/index.d.ts +55 -0
- package/es/lazyload/vue-lazyload/index.mjs +31 -0
- package/es/lazyload/vue-lazyload/lazy-component.mjs +51 -0
- package/es/lazyload/vue-lazyload/lazy-container.mjs +74 -0
- package/es/lazyload/vue-lazyload/lazy-image.mjs +100 -0
- package/es/lazyload/vue-lazyload/lazy.mjs +364 -0
- package/es/lazyload/vue-lazyload/listener.mjs +173 -0
- package/es/lazyload/vue-lazyload/util.mjs +166 -0
- package/es/list/List.d.ts +2 -2
- package/es/list/List.mjs +2 -1
- package/es/list/index.css +1 -1
- package/es/list/index.d.ts +1 -1
- package/es/loading/index.css +1 -1
- package/es/locale/lang/zh-CN.mjs +1 -1
- package/es/media-picker/MediaPicker.d.ts +242 -0
- package/es/media-picker/MediaPicker.mjs +649 -0
- package/es/media-picker/image/DefaultAudioIcon.d.ts +2 -0
- package/es/media-picker/image/DefaultAudioIcon.mjs +98 -0
- package/es/media-picker/image/DefaultFileIcon.d.ts +2 -0
- package/es/media-picker/image/DefaultFileIcon.mjs +87 -0
- package/es/media-picker/image/DefaultVideoIcon.d.ts +2 -0
- package/es/media-picker/image/DefaultVideoIcon.mjs +119 -0
- package/es/media-picker/image/DeleteIcon.d.ts +2 -0
- package/es/media-picker/image/DeleteIcon.mjs +30 -0
- package/es/media-picker/image/PickFileIcon.d.ts +2 -0
- package/es/media-picker/image/PickFileIcon.mjs +27 -0
- package/es/media-picker/image/PickPhotoIcon.d.ts +2 -0
- package/es/media-picker/image/PickPhotoIcon.mjs +27 -0
- package/es/media-picker/image/TakeAudioIcon.d.ts +2 -0
- package/es/media-picker/image/TakeAudioIcon.mjs +27 -0
- package/es/media-picker/image/TakePhotoIcon.d.ts +2 -0
- package/es/media-picker/image/TakePhotoIcon.mjs +27 -0
- package/es/media-picker/image/TakeVideoIcon.d.ts +2 -0
- package/es/media-picker/image/TakeVideoIcon.mjs +27 -0
- package/es/media-picker/index.css +1 -0
- package/es/media-picker/index.d.ts +153 -0
- package/es/media-picker/index.mjs +8 -0
- package/es/media-picker/style/index.d.ts +1 -0
- package/es/media-picker/style/index.mjs +16 -0
- package/es/media-picker/type.d.ts +22 -0
- package/es/media-picker/type.mjs +0 -0
- package/es/media-picker/util/media-util.d.ts +71 -0
- package/es/media-picker/util/media-util.mjs +139 -0
- package/es/media-picker/util/orientation-util.d.ts +37 -0
- package/es/media-picker/util/orientation-util.mjs +118 -0
- package/es/media-picker/watermark/compress-options.d.ts +5 -0
- package/es/media-picker/watermark/compress-options.mjs +15 -0
- package/es/media-picker/watermark/image-processor.d.ts +12 -0
- package/es/media-picker/watermark/image-processor.mjs +55 -0
- package/es/media-picker/watermark/resize-options.d.ts +4 -0
- package/es/media-picker/watermark/resize-options.mjs +19 -0
- package/es/media-picker/watermark/watermark.d.ts +42 -0
- package/es/media-picker/watermark/watermark.mjs +641 -0
- package/es/media-player/MediaPlayer.d.ts +42 -0
- package/es/media-player/MediaPlayer.mjs +105 -0
- package/es/media-player/index.css +1 -0
- package/es/media-player/index.d.ts +34 -0
- package/es/media-player/index.mjs +8 -0
- package/es/media-player/style/index.d.ts +1 -0
- package/es/media-player/style/index.mjs +6 -0
- package/es/multiple-picker/MultiplePicker.d.ts +167 -0
- package/es/multiple-picker/MultiplePicker.mjs +170 -0
- package/es/multiple-picker/MultiplePickerOptions.d.ts +85 -0
- package/es/multiple-picker/MultiplePickerOptions.mjs +106 -0
- package/es/multiple-picker/index.css +1 -0
- package/es/multiple-picker/index.d.ts +123 -0
- package/es/multiple-picker/index.mjs +8 -0
- package/es/multiple-picker/style/index.d.ts +1 -0
- package/es/multiple-picker/style/index.mjs +8 -0
- package/es/multiple-picker/types.d.ts +14 -0
- package/es/multiple-picker/types.mjs +0 -0
- package/es/nav-bar/NavBar.d.ts +72 -0
- package/es/nav-bar/NavBar.mjs +114 -0
- package/es/nav-bar/index.css +1 -0
- package/es/nav-bar/index.d.ts +56 -0
- package/es/nav-bar/index.mjs +8 -0
- package/es/nav-bar/style/index.d.ts +1 -0
- package/es/nav-bar/style/index.mjs +4 -0
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/index.css +1 -1
- package/es/notify/index.d.ts +2 -2
- package/es/number-keyboard/NumberKeyboard.d.ts +6 -6
- package/es/number-keyboard/NumberKeyboard.mjs +1 -2
- package/es/number-keyboard/NumberKeyboardKey.mjs +2 -2
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +5 -5
- package/es/number-keyboard/style/index.mjs +2 -2
- package/es/overlay/index.css +1 -1
- package/es/password-input/PasswordInput.d.ts +1 -1
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/password-input/index.css +1 -1
- package/es/picker/Picker.d.ts +224 -0
- package/es/picker/Picker.mjs +244 -0
- package/es/picker/PickerColumn.d.ts +69 -0
- package/es/picker/PickerColumn.mjs +211 -0
- package/es/picker/PickerToolbar.d.ts +18 -0
- package/es/picker/PickerToolbar.mjs +54 -0
- package/es/picker/index.css +1 -0
- package/es/picker/index.d.ts +142 -0
- package/es/picker/index.mjs +10 -0
- package/es/picker/style/index.d.ts +1 -0
- package/es/picker/style/index.mjs +9 -0
- package/es/picker/types.d.ts +44 -0
- package/es/picker/types.mjs +0 -0
- package/es/picker/utils.d.ts +13 -0
- package/es/picker/utils.mjs +80 -0
- package/es/popover/Popover.d.ts +164 -0
- package/es/popover/Popover.mjs +186 -0
- package/es/popover/index.css +1 -0
- package/es/popover/index.d.ts +121 -0
- package/es/popover/index.mjs +10 -0
- package/es/popover/style/index.d.ts +1 -0
- package/es/popover/style/index.mjs +6 -0
- package/es/popover/types.d.ts +11 -0
- package/es/popover/types.mjs +0 -0
- package/es/popup/Popup.d.ts +22 -5
- package/es/popup/Popup.mjs +85 -3
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +16 -4
- package/es/pull-refresh/PullRefresh.d.ts +3 -3
- package/es/pull-refresh/PullRefresh.mjs +7 -2
- package/es/pull-refresh/index.css +1 -1
- package/es/pull-refresh/index.d.ts +2 -2
- package/es/radio/Radio.d.ts +37 -0
- package/es/radio/Radio.mjs +41 -0
- package/es/radio/index.css +1 -0
- package/es/radio/index.d.ts +38 -0
- package/es/radio/index.mjs +8 -0
- package/es/radio/style/index.d.ts +1 -0
- package/es/radio/style/index.mjs +6 -0
- package/es/radio-group/RadioGroup.d.ts +45 -0
- package/es/radio-group/RadioGroup.mjs +44 -0
- package/es/radio-group/index.css +1 -0
- package/es/radio-group/index.d.ts +32 -0
- package/es/radio-group/index.mjs +8 -0
- package/es/radio-group/style/index.d.ts +1 -0
- package/es/radio-group/style/index.mjs +2 -0
- package/es/rate/Rate.d.ts +4 -4
- package/es/rate/Rate.mjs +1 -1
- package/es/rate/index.css +1 -1
- package/es/rate/index.d.ts +3 -3
- package/es/row/Row.d.ts +1 -1
- package/es/search/Search.d.ts +217 -0
- package/es/search/Search.mjs +136 -0
- package/es/search/index.css +1 -0
- package/es/search/index.d.ts +159 -0
- package/es/search/index.mjs +10 -0
- package/es/search/style/index.d.ts +1 -0
- package/es/search/style/index.mjs +6 -0
- package/es/search/types.d.ts +8 -0
- package/es/search/types.mjs +0 -0
- package/es/signature/Signature.d.ts +109 -0
- package/es/signature/Signature.mjs +232 -0
- package/es/signature/force-landscape.d.ts +16 -0
- package/es/signature/force-landscape.mjs +72 -0
- package/es/signature/index.css +1 -0
- package/es/signature/index.d.ts +83 -0
- package/es/signature/index.mjs +10 -0
- package/es/signature/style/index.d.ts +1 -0
- package/es/signature/style/index.mjs +10 -0
- package/es/signature/types.d.ts +1 -0
- package/es/signature/types.mjs +0 -0
- package/es/skeleton/Skeleton.d.ts +104 -0
- package/es/skeleton/Skeleton.mjs +116 -0
- package/es/skeleton/index.css +1 -0
- package/es/skeleton/index.d.ts +78 -0
- package/es/skeleton/index.mjs +10 -0
- package/es/skeleton/style/index.d.ts +1 -0
- package/es/skeleton/style/index.mjs +2 -0
- package/es/step/Step.d.ts +15 -0
- package/es/step/Step.mjs +137 -0
- package/es/step/index.css +1 -0
- package/es/step/index.d.ts +15 -0
- package/es/step/index.mjs +8 -0
- package/es/step/style/index.d.ts +1 -0
- package/es/step/style/index.mjs +5 -0
- package/es/stepper/Stepper.d.ts +3 -3
- package/es/stepper/Stepper.mjs +1 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +2 -2
- package/es/steps/Steps.d.ts +67 -0
- package/es/steps/Steps.mjs +49 -0
- package/es/steps/index.css +1 -0
- package/es/steps/index.d.ts +48 -0
- package/es/steps/index.mjs +10 -0
- package/es/steps/style/index.d.ts +1 -0
- package/es/steps/style/index.mjs +2 -0
- package/es/sticky/Sticky.d.ts +2 -2
- package/es/sticky/Sticky.mjs +2 -1
- package/es/sticky/index.css +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/style/normalize.css +1 -1
- package/es/swipe/Swipe.d.ts +4 -1
- package/es/swipe/Swipe.mjs +31 -12
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.d.ts +2 -0
- package/es/swipe-item/SwipeItem.mjs +1 -1
- package/es/switch/Switch.d.ts +2 -2
- package/es/switch/index.css +1 -1
- package/es/switch/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/Tab.mjs +1 -1
- package/es/tab/style/index.mjs +1 -1
- package/es/tabbar/Tabbar.d.ts +90 -0
- package/es/tabbar/Tabbar.mjs +84 -0
- package/es/tabbar/image/common-normal.png +0 -0
- package/es/tabbar/image/common-selected.png +0 -0
- package/es/tabbar/index.css +1 -0
- package/es/tabbar/index.d.ts +64 -0
- package/es/tabbar/index.mjs +8 -0
- package/es/tabbar/style/index.d.ts +1 -0
- package/es/tabbar/style/index.mjs +2 -0
- package/es/tabbar-item/TabbarItem.d.ts +44 -0
- package/es/tabbar-item/TabbarItem.mjs +122 -0
- package/es/tabbar-item/index.css +1 -0
- package/es/tabbar-item/index.d.ts +35 -0
- package/es/tabbar-item/index.mjs +8 -0
- package/es/tabbar-item/style/index.d.ts +1 -0
- package/es/tabbar-item/style/index.mjs +5 -0
- package/es/tabs/Tabs.d.ts +6 -6
- package/es/tabs/Tabs.mjs +35 -4
- package/es/tabs/TabsTitle.d.ts +10 -1
- package/es/tabs/TabsTitle.mjs +8 -2
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.d.ts +4 -4
- package/es/tag/Tag.d.ts +102 -0
- package/es/tag/Tag.mjs +101 -0
- package/es/tag/index.css +1 -0
- package/es/tag/index.d.ts +77 -0
- package/es/tag/index.mjs +10 -0
- package/es/tag/style/index.d.ts +1 -0
- package/es/tag/style/index.mjs +4 -0
- package/es/time-picker/Arrow.d.ts +4 -0
- package/es/time-picker/Arrow.mjs +27 -0
- package/es/time-picker/TimePicker.d.ts +286 -0
- package/es/time-picker/TimePicker.mjs +172 -0
- package/es/time-picker/TimePickerColumn.d.ts +71 -0
- package/es/time-picker/TimePickerColumn.mjs +233 -0
- package/es/time-picker/index.css +1 -0
- package/es/time-picker/index.d.ts +205 -0
- package/es/time-picker/index.mjs +10 -0
- package/es/time-picker/style/index.d.ts +1 -0
- package/es/time-picker/style/index.mjs +11 -0
- package/es/toast/Toast.d.ts +2 -2
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +6 -1
- package/es/toast/style/index.mjs +1 -1
- package/es/uploader/Uploader.d.ts +214 -0
- package/es/uploader/Uploader.mjs +249 -0
- package/es/uploader/UploaderPreviewItem.d.ts +36 -0
- package/es/uploader/UploaderPreviewItem.mjs +128 -0
- package/es/uploader/index.css +1 -0
- package/es/uploader/index.d.ts +155 -0
- package/es/uploader/index.mjs +10 -0
- package/es/uploader/style/index.d.ts +1 -0
- package/es/uploader/style/index.mjs +11 -0
- package/es/uploader/types.d.ts +31 -0
- package/es/uploader/types.mjs +0 -0
- package/es/uploader/utils.d.ts +11 -0
- package/es/uploader/utils.mjs +69 -0
- package/es/utils/basic.mjs +2 -1
- package/es/utils/constant.d.ts +4 -0
- package/es/utils/constant.mjs +4 -0
- package/es/utils/create.mjs +4 -1
- package/es/utils/date.d.ts +29 -0
- package/es/utils/date.mjs +96 -0
- package/es/utils/format.d.ts +1 -1
- package/es/utils/parse.d.ts +12 -0
- package/es/utils/parse.mjs +18 -0
- package/es/utils/props.d.ts +2 -2
- package/es/utils/props.mjs +2 -2
- package/es/utils/validate.d.ts +6 -1
- package/es/utils/validate.mjs +11 -1
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/es/vue-tsx-shim.d.ts +7 -0
- package/lib/action-sheet/ActionSheet.d.ts +194 -0
- package/lib/action-sheet/ActionSheet.js +161 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.d.ts +135 -0
- package/lib/action-sheet/index.js +35 -0
- package/lib/action-sheet/style/index.d.ts +1 -0
- package/lib/action-sheet/style/index.js +7 -0
- package/lib/avatar/Avatar.d.ts +55 -0
- package/lib/avatar/Avatar.js +90 -0
- package/lib/avatar/index.css +1 -0
- package/lib/avatar/index.d.ts +43 -0
- package/lib/avatar/index.js +33 -0
- package/lib/avatar/style/index.d.ts +1 -0
- package/lib/avatar/style/index.js +5 -0
- package/lib/avatar/types.d.ts +2 -0
- package/lib/avatar/types.js +15 -0
- package/lib/badge/Badge.d.ts +11 -5
- package/lib/badge/Badge.js +13 -6
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.d.ts +7 -3
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/calendar/Calendar.d.ts +302 -0
- package/lib/calendar/Calendar.js +444 -0
- package/lib/calendar/CalendarDay.d.ts +32 -0
- package/lib/calendar/CalendarDay.js +127 -0
- package/lib/calendar/CalendarHeader.d.ts +26 -0
- package/lib/calendar/CalendarHeader.js +77 -0
- package/lib/calendar/CalendarMonth.d.ts +86 -0
- package/lib/calendar/CalendarMonth.js +226 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.d.ts +217 -0
- package/lib/calendar/index.js +35 -0
- package/lib/calendar/style/index.d.ts +1 -0
- package/lib/calendar/style/index.js +9 -0
- package/lib/calendar/types.d.ts +28 -0
- package/lib/calendar/types.js +15 -0
- package/lib/calendar/utils.d.ts +12 -0
- package/lib/calendar/utils.js +75 -0
- package/lib/cascader/Cascader.d.ts +171 -0
- package/lib/cascader/Cascader.js +309 -0
- package/lib/cascader/index.css +1 -0
- package/lib/cascader/index.d.ts +126 -0
- package/lib/cascader/index.js +35 -0
- package/lib/cascader/style/index.d.ts +1 -0
- package/lib/cascader/style/index.js +14 -0
- package/lib/cascader/types.d.ts +19 -0
- package/lib/cascader/types.js +15 -0
- package/lib/cell/Cell.d.ts +49 -26
- package/lib/cell/Cell.js +70 -30
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +29 -15
- package/lib/cell/types.d.ts +1 -0
- package/lib/cell/types.js +15 -0
- package/lib/cell-group/CellGroup.d.ts +29 -0
- package/lib/cell-group/CellGroup.js +62 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.d.ts +25 -0
- package/lib/cell-group/index.js +33 -0
- package/lib/cell-group/style/index.d.ts +1 -0
- package/lib/cell-group/style/index.js +2 -0
- package/lib/checkbox/Checkbox.d.ts +64 -0
- package/lib/checkbox/Checkbox.js +106 -0
- package/lib/checkbox/Checker.d.ts +85 -0
- package/lib/checkbox/Checker.js +132 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.d.ts +51 -0
- package/lib/checkbox/index.js +33 -0
- package/lib/checkbox/style/index.d.ts +1 -0
- package/lib/checkbox/style/index.js +5 -0
- package/lib/checkbox/types.d.ts +13 -0
- package/lib/checkbox/types.js +15 -0
- package/lib/checkbox-group/CheckboxGroup.d.ts +54 -0
- package/lib/checkbox-group/CheckboxGroup.js +90 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.d.ts +42 -0
- package/lib/checkbox-group/index.js +33 -0
- package/lib/checkbox-group/style/index.d.ts +1 -0
- package/lib/checkbox-group/style/index.js +2 -0
- package/lib/checkbox-group/types.d.ts +16 -0
- package/lib/checkbox-group/types.js +15 -0
- package/lib/col/Col.d.ts +1 -1
- package/lib/collapse/Collapse.d.ts +55 -0
- package/lib/collapse/Collapse.js +128 -0
- package/lib/collapse/index.d.ts +36 -0
- package/lib/collapse/index.js +35 -0
- package/lib/collapse/style/index.d.ts +1 -0
- package/lib/collapse/style/index.js +1 -0
- package/lib/collapse-item/CollapseItem.d.ts +34 -0
- package/lib/collapse-item/CollapseItem.js +160 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.d.ts +30 -0
- package/lib/collapse-item/index.js +35 -0
- package/lib/collapse-item/style/index.d.ts +1 -0
- package/lib/collapse-item/style/index.js +4 -0
- package/lib/collapse-item/types.d.ts +6 -0
- package/lib/collapse-item/types.js +15 -0
- package/lib/composables/use-route.d.ts +1 -4
- package/lib/config-provider/ConfigProvider.js +2 -2
- package/lib/date-time-picker/DateTimePicker.d.ts +242 -0
- package/lib/date-time-picker/DateTimePicker.js +273 -0
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +334 -0
- package/lib/date-time-picker/DateTimePickerWrapper.js +279 -0
- package/lib/date-time-picker/index.css +1 -0
- package/lib/date-time-picker/index.d.ts +247 -0
- package/lib/date-time-picker/index.js +35 -0
- package/lib/date-time-picker/style/index.d.ts +1 -0
- package/lib/date-time-picker/style/index.js +12 -0
- package/lib/date-time-picker/types.d.ts +5 -0
- package/lib/date-time-picker/types.js +15 -0
- package/lib/date-time-picker/utils.d.ts +53 -0
- package/lib/date-time-picker/utils.js +61 -0
- package/lib/dialog/Dialog.d.ts +187 -0
- package/lib/dialog/Dialog.js +216 -0
- package/lib/dialog/function-call.d.ts +6 -0
- package/lib/dialog/function-call.js +110 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.d.ts +138 -0
- package/lib/dialog/index.js +41 -0
- package/lib/dialog/style/index.d.ts +1 -0
- package/lib/dialog/style/index.js +8 -0
- package/lib/dialog/types.d.ts +32 -0
- package/lib/dialog/types.js +15 -0
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.css +1 -1
- package/lib/dropdown-item/DropdownItem.d.ts +78 -0
- package/lib/dropdown-item/DropdownItem.js +321 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.d.ts +64 -0
- package/lib/dropdown-item/index.js +35 -0
- package/lib/dropdown-item/style/index.d.ts +1 -0
- package/lib/dropdown-item/style/index.js +12 -0
- package/lib/dropdown-item/types.d.ts +23 -0
- package/lib/dropdown-item/types.js +15 -0
- package/lib/dropdown-menu/DropdownMenu.d.ts +82 -0
- package/lib/dropdown-menu/DropdownMenu.js +167 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.d.ts +63 -0
- package/lib/dropdown-menu/index.js +35 -0
- package/lib/dropdown-menu/style/index.d.ts +1 -0
- package/lib/dropdown-menu/style/index.js +4 -0
- package/lib/dropdown-menu/types.d.ts +8 -0
- package/lib/dropdown-menu/types.js +15 -0
- package/lib/empty/Empty.d.ts +2 -1
- package/lib/empty/Empty.js +9 -4
- package/lib/empty/Images.d.ts +7 -2
- package/lib/empty/Images.js +854 -2003
- package/lib/empty/index.css +1 -1
- package/lib/field/Field.d.ts +364 -0
- package/lib/field/Field.js +529 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.d.ts +230 -0
- package/lib/field/index.js +33 -0
- package/lib/field/style/index.d.ts +1 -0
- package/lib/field/style/index.js +5 -0
- package/lib/field/types.d.ts +44 -0
- package/lib/field/types.js +15 -0
- package/lib/field/utils.d.ts +15 -0
- package/lib/field/utils.js +120 -0
- package/lib/form/Form.d.ts +88 -0
- package/lib/form/Form.js +177 -0
- package/lib/form/index.d.ts +69 -0
- package/lib/form/index.js +33 -0
- package/lib/form/style/index.d.ts +1 -0
- package/lib/form/style/index.js +1 -0
- package/lib/form/types.d.ts +15 -0
- package/lib/form/types.js +15 -0
- package/lib/grid/Grid.d.ts +74 -0
- package/lib/grid/Grid.js +67 -0
- package/lib/grid/index.css +1 -0
- package/lib/grid/index.d.ts +54 -0
- package/lib/grid/index.js +35 -0
- package/lib/grid/style/index.d.ts +1 -0
- package/lib/grid/style/index.js +2 -0
- package/lib/grid-item/GridItem.d.ts +45 -0
- package/lib/grid-item/GridItem.js +165 -0
- package/lib/grid-item/index.css +1 -0
- package/lib/grid-item/index.d.ts +36 -0
- package/lib/grid-item/index.js +35 -0
- package/lib/grid-item/style/index.d.ts +1 -0
- package/lib/grid-item/style/index.js +5 -0
- package/lib/icon/config.js +7 -0
- package/lib/icon/index.css +1 -1
- package/lib/image/Image.d.ts +105 -0
- package/lib/image/Image.js +170 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.d.ts +77 -0
- package/lib/image/index.js +33 -0
- package/lib/image/style/index.d.ts +1 -0
- package/lib/image/style/index.js +4 -0
- package/lib/image-preview/ImagePreview.d.ts +188 -0
- package/lib/image-preview/ImagePreview.js +203 -0
- package/lib/image-preview/ImagePreviewItem.d.ts +47 -0
- package/lib/image-preview/ImagePreviewItem.js +276 -0
- package/lib/image-preview/function-call.d.ts +3 -0
- package/lib/image-preview/function-call.js +101 -0
- package/lib/image-preview/index.css +1 -0
- package/lib/image-preview/index.d.ts +139 -0
- package/lib/image-preview/index.js +37 -0
- package/lib/image-preview/style/index.d.ts +1 -0
- package/lib/image-preview/style/index.js +10 -0
- package/lib/image-preview/types.d.ts +43 -0
- package/lib/image-preview/types.js +15 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +39 -1
- package/lib/index.js +114 -2
- package/lib/lazyload/index.d.ts +3 -0
- package/lib/lazyload/index.js +25 -0
- package/lib/lazyload/style/index.d.ts +1 -0
- package/lib/lazyload/style/index.js +1 -0
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -0
- package/lib/lazyload/vue-lazyload/index.js +56 -0
- package/lib/lazyload/vue-lazyload/lazy-component.js +70 -0
- package/lib/lazyload/vue-lazyload/lazy-container.js +93 -0
- package/lib/lazyload/vue-lazyload/lazy-image.js +119 -0
- package/lib/lazyload/vue-lazyload/lazy.js +378 -0
- package/lib/lazyload/vue-lazyload/listener.js +192 -0
- package/lib/lazyload/vue-lazyload/util.js +185 -0
- package/lib/list/List.d.ts +2 -2
- package/lib/list/List.js +2 -1
- package/lib/list/index.css +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/loading/index.css +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/media-picker/MediaPicker.d.ts +242 -0
- package/lib/media-picker/MediaPicker.js +674 -0
- package/lib/media-picker/image/DefaultAudioIcon.d.ts +2 -0
- package/lib/media-picker/image/DefaultAudioIcon.js +117 -0
- package/lib/media-picker/image/DefaultFileIcon.d.ts +2 -0
- package/lib/media-picker/image/DefaultFileIcon.js +106 -0
- package/lib/media-picker/image/DefaultVideoIcon.d.ts +2 -0
- package/lib/media-picker/image/DefaultVideoIcon.js +138 -0
- package/lib/media-picker/image/DeleteIcon.d.ts +2 -0
- package/lib/media-picker/image/DeleteIcon.js +49 -0
- package/lib/media-picker/image/PickFileIcon.d.ts +2 -0
- package/lib/media-picker/image/PickFileIcon.js +46 -0
- package/lib/media-picker/image/PickPhotoIcon.d.ts +2 -0
- package/lib/media-picker/image/PickPhotoIcon.js +46 -0
- package/lib/media-picker/image/TakeAudioIcon.d.ts +2 -0
- package/lib/media-picker/image/TakeAudioIcon.js +46 -0
- package/lib/media-picker/image/TakePhotoIcon.d.ts +2 -0
- package/lib/media-picker/image/TakePhotoIcon.js +46 -0
- package/lib/media-picker/image/TakeVideoIcon.d.ts +2 -0
- package/lib/media-picker/image/TakeVideoIcon.js +46 -0
- package/lib/media-picker/index.css +1 -0
- package/lib/media-picker/index.d.ts +153 -0
- package/lib/media-picker/index.js +33 -0
- package/lib/media-picker/style/index.d.ts +1 -0
- package/lib/media-picker/style/index.js +16 -0
- package/lib/media-picker/type.d.ts +22 -0
- package/lib/media-picker/type.js +15 -0
- package/lib/media-picker/util/media-util.d.ts +71 -0
- package/lib/media-picker/util/media-util.js +158 -0
- package/lib/media-picker/util/orientation-util.d.ts +37 -0
- package/lib/media-picker/util/orientation-util.js +137 -0
- package/lib/media-picker/watermark/compress-options.d.ts +5 -0
- package/lib/media-picker/watermark/compress-options.js +34 -0
- package/lib/media-picker/watermark/image-processor.d.ts +12 -0
- package/lib/media-picker/watermark/image-processor.js +74 -0
- package/lib/media-picker/watermark/resize-options.d.ts +4 -0
- package/lib/media-picker/watermark/resize-options.js +38 -0
- package/lib/media-picker/watermark/watermark.d.ts +42 -0
- package/lib/media-picker/watermark/watermark.js +653 -0
- package/lib/media-player/MediaPlayer.d.ts +42 -0
- package/lib/media-player/MediaPlayer.js +130 -0
- package/lib/media-player/index.css +1 -0
- package/lib/media-player/index.d.ts +34 -0
- package/lib/media-player/index.js +33 -0
- package/lib/media-player/style/index.d.ts +1 -0
- package/lib/media-player/style/index.js +6 -0
- package/lib/multiple-picker/MultiplePicker.d.ts +167 -0
- package/lib/multiple-picker/MultiplePicker.js +195 -0
- package/lib/multiple-picker/MultiplePickerOptions.d.ts +85 -0
- package/lib/multiple-picker/MultiplePickerOptions.js +125 -0
- package/lib/multiple-picker/index.css +1 -0
- package/lib/multiple-picker/index.d.ts +123 -0
- package/lib/multiple-picker/index.js +33 -0
- package/lib/multiple-picker/style/index.d.ts +1 -0
- package/lib/multiple-picker/style/index.js +8 -0
- package/lib/multiple-picker/types.d.ts +14 -0
- package/lib/multiple-picker/types.js +15 -0
- package/lib/nav-bar/NavBar.d.ts +72 -0
- package/lib/nav-bar/NavBar.js +133 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.d.ts +56 -0
- package/lib/nav-bar/index.js +33 -0
- package/lib/nav-bar/style/index.d.ts +1 -0
- package/lib/nav-bar/style/index.js +4 -0
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.d.ts +2 -2
- package/lib/number-keyboard/NumberKeyboard.d.ts +6 -6
- package/lib/number-keyboard/NumberKeyboard.js +1 -2
- package/lib/number-keyboard/NumberKeyboardKey.js +2 -2
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +5 -5
- package/lib/number-keyboard/style/index.js +2 -2
- package/lib/overlay/index.css +1 -1
- package/lib/password-input/PasswordInput.d.ts +1 -1
- package/lib/password-input/PasswordInput.js +1 -1
- package/lib/password-input/index.css +1 -1
- package/lib/picker/Picker.d.ts +224 -0
- package/lib/picker/Picker.js +269 -0
- package/lib/picker/PickerColumn.d.ts +69 -0
- package/lib/picker/PickerColumn.js +230 -0
- package/lib/picker/PickerToolbar.d.ts +18 -0
- package/lib/picker/PickerToolbar.js +73 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.d.ts +142 -0
- package/lib/picker/index.js +35 -0
- package/lib/picker/style/index.d.ts +1 -0
- package/lib/picker/style/index.js +9 -0
- package/lib/picker/types.d.ts +44 -0
- package/lib/picker/types.js +15 -0
- package/lib/picker/utils.d.ts +13 -0
- package/lib/picker/utils.js +99 -0
- package/lib/popover/Popover.d.ts +164 -0
- package/lib/popover/Popover.js +205 -0
- package/lib/popover/index.css +1 -0
- package/lib/popover/index.d.ts +121 -0
- package/lib/popover/index.js +35 -0
- package/lib/popover/style/index.d.ts +1 -0
- package/lib/popover/style/index.js +6 -0
- package/lib/popover/types.d.ts +11 -0
- package/lib/popover/types.js +15 -0
- package/lib/popup/Popup.d.ts +22 -5
- package/lib/popup/Popup.js +84 -2
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +16 -4
- package/lib/pull-refresh/PullRefresh.d.ts +3 -3
- package/lib/pull-refresh/PullRefresh.js +6 -1
- package/lib/pull-refresh/index.css +1 -1
- package/lib/pull-refresh/index.d.ts +2 -2
- package/lib/radio/Radio.d.ts +37 -0
- package/lib/radio/Radio.js +66 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.d.ts +38 -0
- package/lib/radio/index.js +33 -0
- package/lib/radio/style/index.d.ts +1 -0
- package/lib/radio/style/index.js +6 -0
- package/lib/radio-group/RadioGroup.d.ts +45 -0
- package/lib/radio-group/RadioGroup.js +63 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.d.ts +32 -0
- package/lib/radio-group/index.js +33 -0
- package/lib/radio-group/style/index.d.ts +1 -0
- package/lib/radio-group/style/index.js +2 -0
- package/lib/rate/Rate.d.ts +4 -4
- package/lib/rate/Rate.js +1 -1
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.d.ts +3 -3
- package/lib/row/Row.d.ts +1 -1
- package/lib/search/Search.d.ts +217 -0
- package/lib/search/Search.js +155 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.d.ts +159 -0
- package/lib/search/index.js +35 -0
- package/lib/search/style/index.d.ts +1 -0
- package/lib/search/style/index.js +6 -0
- package/lib/search/types.d.ts +8 -0
- package/lib/search/types.js +15 -0
- package/lib/signature/Signature.d.ts +109 -0
- package/lib/signature/Signature.js +257 -0
- package/lib/signature/force-landscape.d.ts +16 -0
- package/lib/signature/force-landscape.js +91 -0
- package/lib/signature/index.css +1 -0
- package/lib/signature/index.d.ts +83 -0
- package/lib/signature/index.js +35 -0
- package/lib/signature/style/index.d.ts +1 -0
- package/lib/signature/style/index.js +10 -0
- package/lib/signature/types.d.ts +1 -0
- package/lib/signature/types.js +15 -0
- package/lib/skeleton/Skeleton.d.ts +104 -0
- package/lib/skeleton/Skeleton.js +135 -0
- package/lib/skeleton/index.css +1 -0
- package/lib/skeleton/index.d.ts +78 -0
- package/lib/skeleton/index.js +35 -0
- package/lib/skeleton/style/index.d.ts +1 -0
- package/lib/skeleton/style/index.js +2 -0
- package/lib/step/Step.d.ts +15 -0
- package/lib/step/Step.js +156 -0
- package/lib/step/index.css +1 -0
- package/lib/step/index.d.ts +15 -0
- package/lib/step/index.js +33 -0
- package/lib/step/style/index.d.ts +1 -0
- package/lib/step/style/index.js +5 -0
- package/lib/stepper/Stepper.d.ts +3 -3
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +2 -2
- package/lib/steps/Steps.d.ts +67 -0
- package/lib/steps/Steps.js +68 -0
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.d.ts +48 -0
- package/lib/steps/index.js +35 -0
- package/lib/steps/style/index.d.ts +1 -0
- package/lib/steps/style/index.js +2 -0
- package/lib/sticky/Sticky.d.ts +2 -2
- package/lib/sticky/Sticky.js +2 -1
- package/lib/sticky/index.css +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/style/normalize.css +1 -1
- package/lib/swipe/Swipe.d.ts +4 -1
- package/lib/swipe/Swipe.js +31 -12
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.d.ts +2 -0
- package/lib/swipe-item/SwipeItem.js +1 -1
- package/lib/switch/Switch.d.ts +2 -2
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.d.ts +1 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/Tab.js +1 -1
- package/lib/tab/style/index.js +1 -1
- package/lib/tabbar/Tabbar.d.ts +90 -0
- package/lib/tabbar/Tabbar.js +103 -0
- package/lib/tabbar/image/common-normal.png +0 -0
- package/lib/tabbar/image/common-selected.png +0 -0
- package/lib/tabbar/index.css +1 -0
- package/lib/tabbar/index.d.ts +64 -0
- package/lib/tabbar/index.js +33 -0
- package/lib/tabbar/style/index.d.ts +1 -0
- package/lib/tabbar/style/index.js +2 -0
- package/lib/tabbar-item/TabbarItem.d.ts +44 -0
- package/lib/tabbar-item/TabbarItem.js +141 -0
- package/lib/tabbar-item/index.css +1 -0
- package/lib/tabbar-item/index.d.ts +35 -0
- package/lib/tabbar-item/index.js +33 -0
- package/lib/tabbar-item/style/index.d.ts +1 -0
- package/lib/tabbar-item/style/index.js +5 -0
- package/lib/tabs/Tabs.d.ts +6 -6
- package/lib/tabs/Tabs.js +35 -4
- package/lib/tabs/TabsTitle.d.ts +10 -1
- package/lib/tabs/TabsTitle.js +8 -2
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.d.ts +4 -4
- package/lib/tag/Tag.d.ts +102 -0
- package/lib/tag/Tag.js +120 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.d.ts +77 -0
- package/lib/tag/index.js +35 -0
- package/lib/tag/style/index.d.ts +1 -0
- package/lib/tag/style/index.js +4 -0
- package/lib/time-picker/Arrow.d.ts +4 -0
- package/lib/time-picker/Arrow.js +46 -0
- package/lib/time-picker/TimePicker.d.ts +286 -0
- package/lib/time-picker/TimePicker.js +197 -0
- package/lib/time-picker/TimePickerColumn.d.ts +71 -0
- package/lib/time-picker/TimePickerColumn.js +258 -0
- package/lib/time-picker/index.css +1 -0
- package/lib/time-picker/index.d.ts +205 -0
- package/lib/time-picker/index.js +35 -0
- package/lib/time-picker/style/index.d.ts +1 -0
- package/lib/time-picker/style/index.js +11 -0
- package/lib/toast/Toast.d.ts +2 -2
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +6 -1
- package/lib/toast/style/index.js +1 -1
- package/lib/uploader/Uploader.d.ts +214 -0
- package/lib/uploader/Uploader.js +274 -0
- package/lib/uploader/UploaderPreviewItem.d.ts +36 -0
- package/lib/uploader/UploaderPreviewItem.js +147 -0
- package/lib/uploader/index.css +1 -0
- package/lib/uploader/index.d.ts +155 -0
- package/lib/uploader/index.js +35 -0
- package/lib/uploader/style/index.d.ts +1 -0
- package/lib/uploader/style/index.js +11 -0
- package/lib/uploader/types.d.ts +31 -0
- package/lib/uploader/types.js +15 -0
- package/lib/uploader/utils.d.ts +11 -0
- package/lib/uploader/utils.js +88 -0
- package/lib/utils/basic.js +2 -1
- package/lib/utils/constant.d.ts +4 -0
- package/lib/utils/constant.js +4 -0
- package/lib/utils/create.js +4 -1
- package/lib/utils/date.d.ts +29 -0
- package/lib/utils/date.js +115 -0
- package/lib/utils/format.d.ts +1 -1
- package/lib/utils/parse.d.ts +12 -0
- package/lib/utils/parse.js +37 -0
- package/lib/utils/props.d.ts +2 -2
- package/lib/utils/props.js +2 -2
- package/lib/utils/validate.d.ts +6 -1
- package/lib/utils/validate.js +11 -1
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vue-tsx-shim.d.ts +7 -0
- package/lib/web-types.json +1 -3197
- package/lib/zartui.cjs.js +14724 -5172
- package/lib/zartui.es.js +14726 -5174
- package/lib/zartui.js +15738 -5305
- package/lib/zartui.min.js +1 -1
- package/package.json +14 -14
- package/README.md +0 -25
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
TextScanner: () => TextScanner,
|
|
21
|
+
checkWatermarkConfigSupported: () => checkWatermarkConfigSupported,
|
|
22
|
+
renderWatermark: () => renderWatermark
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
25
|
+
var import_utils = require("../../utils");
|
|
26
|
+
var import_parse = require("../../utils/parse");
|
|
27
|
+
var import_date = require("../../utils/date");
|
|
28
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
29
|
+
const subString = (str, startIndex, length) => {
|
|
30
|
+
if (!(0, import_utils.isDef)(length)) {
|
|
31
|
+
return str.substring(startIndex);
|
|
32
|
+
}
|
|
33
|
+
return str.substring(startIndex, startIndex + length);
|
|
34
|
+
};
|
|
35
|
+
var WatermarkPosition = /* @__PURE__ */ ((WatermarkPosition2) => {
|
|
36
|
+
WatermarkPosition2["LeftTop"] = "lefttop";
|
|
37
|
+
WatermarkPosition2["CenterTop"] = "centertop";
|
|
38
|
+
WatermarkPosition2["RightTop"] = "righttop";
|
|
39
|
+
WatermarkPosition2["LeftCenter"] = "leftcenter";
|
|
40
|
+
WatermarkPosition2["Center"] = "center";
|
|
41
|
+
WatermarkPosition2["RightCenter"] = "rightcenter";
|
|
42
|
+
WatermarkPosition2["LeftBottom"] = "leftbottom";
|
|
43
|
+
WatermarkPosition2["CenterBottom"] = "centerbottom";
|
|
44
|
+
WatermarkPosition2["RightBottom"] = "rightbottom";
|
|
45
|
+
return WatermarkPosition2;
|
|
46
|
+
})(WatermarkPosition || {});
|
|
47
|
+
var WatermarkFontWeight = /* @__PURE__ */ ((WatermarkFontWeight2) => {
|
|
48
|
+
WatermarkFontWeight2["Normal"] = "normal";
|
|
49
|
+
WatermarkFontWeight2["Bold"] = "bold";
|
|
50
|
+
return WatermarkFontWeight2;
|
|
51
|
+
})(WatermarkFontWeight || {});
|
|
52
|
+
var WatermarkContent = /* @__PURE__ */ ((WatermarkContent2) => {
|
|
53
|
+
WatermarkContent2["Raw"] = "";
|
|
54
|
+
WatermarkContent2["Date"] = "date{(.*?)}|date";
|
|
55
|
+
WatermarkContent2["Time"] = "time";
|
|
56
|
+
WatermarkContent2["Address"] = "address";
|
|
57
|
+
WatermarkContent2["HumanName"] = "humanname";
|
|
58
|
+
WatermarkContent2["ProjectName"] = "projectName";
|
|
59
|
+
WatermarkContent2["Logo"] = "{logo}";
|
|
60
|
+
return WatermarkContent2;
|
|
61
|
+
})(WatermarkContent || {});
|
|
62
|
+
const ColorMap = {
|
|
63
|
+
transparent: "#00000000",
|
|
64
|
+
white: "#FFFFFF",
|
|
65
|
+
black: "#000000",
|
|
66
|
+
darkgray: "#444444",
|
|
67
|
+
gray: "#888888",
|
|
68
|
+
lightgray: "#CCCCCC",
|
|
69
|
+
darkgrey: "#444444",
|
|
70
|
+
grey: "#888888",
|
|
71
|
+
lightgrey: "#CCCCCC",
|
|
72
|
+
red: "#FF0000",
|
|
73
|
+
green: "#00FF00",
|
|
74
|
+
blue: "#0000FF",
|
|
75
|
+
yellow: "#FFFF00",
|
|
76
|
+
cyan: "#00FFFF",
|
|
77
|
+
magenta: "#FF00FF",
|
|
78
|
+
aqua: "#00FFFF",
|
|
79
|
+
fuchsia: "#FF00FF",
|
|
80
|
+
lime: "#00FF00",
|
|
81
|
+
maroon: "#800000",
|
|
82
|
+
navy: "#000080",
|
|
83
|
+
olive: "#808000",
|
|
84
|
+
purple: "#800080",
|
|
85
|
+
silver: "#C0C0C0",
|
|
86
|
+
teal: "#008080",
|
|
87
|
+
orange: "#FF9933"
|
|
88
|
+
};
|
|
89
|
+
function getColorValue(key) {
|
|
90
|
+
for (const k of Object.getOwnPropertyNames(ColorMap)) {
|
|
91
|
+
if (k === key) {
|
|
92
|
+
return ColorMap[k];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const CONTENT_PADDING = 10;
|
|
98
|
+
const DEFAULT_PADDING = 2;
|
|
99
|
+
const DEFAULT_FONT_SIZE = 25;
|
|
100
|
+
const DEFAULT_CANVAS_SIZE = 480;
|
|
101
|
+
const DEFAULT_BACKGROUND_OPACITY = 128;
|
|
102
|
+
function getHeitiFontFamily() {
|
|
103
|
+
if ((0, import_utils.isAndroid)()) {
|
|
104
|
+
return "'Roboto Black', 'Droid Sans'";
|
|
105
|
+
} else if ((0, import_utils.isIOS)()) {
|
|
106
|
+
return "'PingFang SC Medium'";
|
|
107
|
+
}
|
|
108
|
+
return '"PingFang SC Medium", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif';
|
|
109
|
+
}
|
|
110
|
+
function parseWatermarkStyle(styleString, canvasSize) {
|
|
111
|
+
if (!(0, import_utils.isValidString)(styleString)) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const styleParts = styleString.split("$");
|
|
115
|
+
if (styleParts.length <= 0) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const scale = Math.min(canvasSize.width, canvasSize.height) / DEFAULT_CANVAS_SIZE;
|
|
119
|
+
if ((0, import_parse.parseNumber)(styleParts[0], -1) !== -1) {
|
|
120
|
+
const fontSize2 = Math.round(
|
|
121
|
+
(0, import_parse.parseDecimal)(styleParts[0], DEFAULT_FONT_SIZE) * scale
|
|
122
|
+
);
|
|
123
|
+
let position2 = "lefttop" /* LeftTop */;
|
|
124
|
+
if (styleParts[1]) {
|
|
125
|
+
position2 = styleParts[1];
|
|
126
|
+
}
|
|
127
|
+
let paddingTop2 = DEFAULT_PADDING * scale;
|
|
128
|
+
let paddingBottom2 = DEFAULT_PADDING * scale;
|
|
129
|
+
if (styleParts[2]) {
|
|
130
|
+
const paddingParts = styleParts[2].split("_");
|
|
131
|
+
paddingTop2 = (0, import_parse.parseNumber)(paddingParts[0], DEFAULT_PADDING) * scale;
|
|
132
|
+
if (paddingParts[1]) {
|
|
133
|
+
paddingBottom2 = (0, import_parse.parseNumber)(paddingParts[1], DEFAULT_PADDING) * scale;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const fontName2 = getHeitiFontFamily();
|
|
137
|
+
const fontWeight2 = "normal" /* Normal */;
|
|
138
|
+
const fontColor2 = ColorMap.transparent;
|
|
139
|
+
const backgroundColor2 = ColorMap.transparent;
|
|
140
|
+
const backgroundOpacity2 = 128;
|
|
141
|
+
return {
|
|
142
|
+
fontName: fontName2,
|
|
143
|
+
fontWeight: fontWeight2,
|
|
144
|
+
fontColor: fontColor2,
|
|
145
|
+
fontSize: fontSize2,
|
|
146
|
+
backgroundColor: backgroundColor2,
|
|
147
|
+
backgroundOpacity: backgroundOpacity2,
|
|
148
|
+
paddingTop: paddingTop2,
|
|
149
|
+
paddingBottom: paddingBottom2,
|
|
150
|
+
position: position2,
|
|
151
|
+
scale,
|
|
152
|
+
simplified: true
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
const fontName = styleParts[0] + ", " + getHeitiFontFamily();
|
|
156
|
+
let fontWeight = "normal" /* Normal */;
|
|
157
|
+
if (styleParts[1]) {
|
|
158
|
+
fontWeight = styleParts[1];
|
|
159
|
+
}
|
|
160
|
+
let fontColor = ColorMap.white;
|
|
161
|
+
if (styleParts[2]) {
|
|
162
|
+
const color = getColorValue(styleParts[2]);
|
|
163
|
+
if (color) {
|
|
164
|
+
fontColor = color;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
let fontSize = Math.round(DEFAULT_FONT_SIZE * scale);
|
|
168
|
+
if (styleParts[3]) {
|
|
169
|
+
fontSize = Math.round(
|
|
170
|
+
(0, import_parse.parseDecimal)(styleParts[3], DEFAULT_FONT_SIZE) * scale
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
let backgroundColor = ColorMap.blue;
|
|
174
|
+
if (styleParts[4]) {
|
|
175
|
+
const color = getColorValue(styleParts[4]);
|
|
176
|
+
if (color) {
|
|
177
|
+
backgroundColor = color;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
let position = "lefttop" /* LeftTop */;
|
|
181
|
+
if (styleParts[5]) {
|
|
182
|
+
position = styleParts[5];
|
|
183
|
+
}
|
|
184
|
+
let backgroundOpacity = 255;
|
|
185
|
+
if (styleParts[6]) {
|
|
186
|
+
let opacity = (0, import_parse.parseNumber)(styleParts[6], DEFAULT_BACKGROUND_OPACITY);
|
|
187
|
+
opacity = clamp(opacity, 0, 255);
|
|
188
|
+
backgroundOpacity = opacity;
|
|
189
|
+
}
|
|
190
|
+
let paddingTop = DEFAULT_PADDING * scale;
|
|
191
|
+
let paddingBottom = DEFAULT_PADDING * scale;
|
|
192
|
+
if (styleParts[7]) {
|
|
193
|
+
const paddingParts = styleParts[7].split("_");
|
|
194
|
+
paddingTop = (0, import_parse.parseNumber)(paddingParts[0], DEFAULT_PADDING) * scale;
|
|
195
|
+
if (paddingParts[1]) {
|
|
196
|
+
paddingBottom = (0, import_parse.parseNumber)(paddingParts[1], DEFAULT_PADDING) * scale;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
fontName,
|
|
201
|
+
fontWeight,
|
|
202
|
+
fontColor,
|
|
203
|
+
fontSize,
|
|
204
|
+
backgroundColor,
|
|
205
|
+
backgroundOpacity,
|
|
206
|
+
paddingTop,
|
|
207
|
+
paddingBottom,
|
|
208
|
+
position,
|
|
209
|
+
scale,
|
|
210
|
+
simplified: false
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
class TextScanner {
|
|
214
|
+
constructor(text) {
|
|
215
|
+
this.text = text;
|
|
216
|
+
this.cursor = 0;
|
|
217
|
+
}
|
|
218
|
+
hasNext(obj) {
|
|
219
|
+
if (!(0, import_utils.isDef)(obj)) {
|
|
220
|
+
return this.cursor < this.text.length;
|
|
221
|
+
} else if ((0, import_utils.isString)(obj)) {
|
|
222
|
+
const str = obj;
|
|
223
|
+
const current = subString(this.text, this.cursor, str.length);
|
|
224
|
+
if (current === str) {
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
} else if ((0, import_utils.isRegExp)(obj)) {
|
|
228
|
+
const regex = obj;
|
|
229
|
+
const subText = subString(this.text, this.cursor);
|
|
230
|
+
const matchResults = subText.match(regex);
|
|
231
|
+
if (matchResults) {
|
|
232
|
+
if (matchResults.index === 0) {
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
next(obj) {
|
|
240
|
+
if (!(0, import_utils.isDef)(obj)) {
|
|
241
|
+
return subString(this.text, this.cursor, 1);
|
|
242
|
+
} else if ((0, import_utils.isString)(obj)) {
|
|
243
|
+
const str = obj;
|
|
244
|
+
if (subString(this.text, this.cursor, str.length) === str) {
|
|
245
|
+
return str;
|
|
246
|
+
}
|
|
247
|
+
} else if ((0, import_utils.isRegExp)(obj)) {
|
|
248
|
+
const regex = obj;
|
|
249
|
+
const subText = subString(this.text, this.cursor);
|
|
250
|
+
const matchResults = subText.match(regex);
|
|
251
|
+
if (matchResults) {
|
|
252
|
+
if (matchResults.index === 0) {
|
|
253
|
+
return matchResults;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
skip(obj) {
|
|
260
|
+
if (!(0, import_utils.isDef)(obj)) {
|
|
261
|
+
this.cursor += 1;
|
|
262
|
+
} else if ((0, import_utils.isValidString)(obj)) {
|
|
263
|
+
const str = obj;
|
|
264
|
+
this.cursor += str.length;
|
|
265
|
+
}
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function buildContent(contentConfigString, watermarkContext) {
|
|
270
|
+
let content = "";
|
|
271
|
+
const scanner = new TextScanner(contentConfigString);
|
|
272
|
+
let steps = 0;
|
|
273
|
+
while (scanner.hasNext() && steps < contentConfigString.length) {
|
|
274
|
+
const dateRegex = new RegExp("date{(.*?)}|date" /* Date */);
|
|
275
|
+
if (scanner.hasNext(dateRegex)) {
|
|
276
|
+
const regexResult = scanner.next(dateRegex);
|
|
277
|
+
if (regexResult) {
|
|
278
|
+
const matchResults = regexResult;
|
|
279
|
+
let format = import_date.FORMAT.FORMAT_YMD;
|
|
280
|
+
if (matchResults && matchResults.length >= 2) {
|
|
281
|
+
if ((0, import_utils.isValidString)(matchResults[1])) {
|
|
282
|
+
format = matchResults[1];
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (watermarkContext) {
|
|
286
|
+
content += (0, import_date.formatDate)(watermarkContext.watermarkTime, format);
|
|
287
|
+
}
|
|
288
|
+
scanner.skip(matchResults.input);
|
|
289
|
+
}
|
|
290
|
+
} else if (scanner.hasNext("time" /* Time */)) {
|
|
291
|
+
if (watermarkContext) {
|
|
292
|
+
const value = (0, import_date.formatDate)(
|
|
293
|
+
watermarkContext.watermarkTime,
|
|
294
|
+
import_date.FORMAT.FORMAT_HM
|
|
295
|
+
);
|
|
296
|
+
content += value;
|
|
297
|
+
}
|
|
298
|
+
scanner.skip("time" /* Time */);
|
|
299
|
+
} else if (scanner.hasNext("address" /* Address */)) {
|
|
300
|
+
if (watermarkContext) {
|
|
301
|
+
content += watermarkContext.address;
|
|
302
|
+
}
|
|
303
|
+
scanner.skip("address" /* Address */);
|
|
304
|
+
} else if (scanner.hasNext("humanname" /* HumanName */)) {
|
|
305
|
+
if (watermarkContext) {
|
|
306
|
+
content += watermarkContext.humanName;
|
|
307
|
+
}
|
|
308
|
+
scanner.skip("humanname" /* HumanName */);
|
|
309
|
+
} else if (scanner.hasNext("projectName" /* ProjectName */)) {
|
|
310
|
+
if (watermarkContext) {
|
|
311
|
+
content += watermarkContext.projectName;
|
|
312
|
+
}
|
|
313
|
+
scanner.skip("projectName" /* ProjectName */);
|
|
314
|
+
} else if (scanner.hasNext("{logo}" /* Logo */)) {
|
|
315
|
+
console.error("watermark logo ignored");
|
|
316
|
+
scanner.skip("{logo}" /* Logo */);
|
|
317
|
+
} else {
|
|
318
|
+
const nextChar = scanner.next();
|
|
319
|
+
if ((0, import_utils.isString)(nextChar)) {
|
|
320
|
+
content += nextChar;
|
|
321
|
+
}
|
|
322
|
+
scanner.skip();
|
|
323
|
+
}
|
|
324
|
+
steps++;
|
|
325
|
+
}
|
|
326
|
+
return content;
|
|
327
|
+
}
|
|
328
|
+
function parseWatermarks(watermarkConfigString, canvasSize, watermarkContext) {
|
|
329
|
+
const watermarks = [];
|
|
330
|
+
const configStringArray = watermarkConfigString.split("###");
|
|
331
|
+
for (let i = 0; i < configStringArray.length; i++) {
|
|
332
|
+
const configString = configStringArray[i];
|
|
333
|
+
const configParts = configString.split("*#*");
|
|
334
|
+
if (configParts.length === 2) {
|
|
335
|
+
const styleString = configParts[0];
|
|
336
|
+
const contentString = configParts[1];
|
|
337
|
+
const style = parseWatermarkStyle(styleString, canvasSize);
|
|
338
|
+
const content = buildContent(contentString, watermarkContext);
|
|
339
|
+
if (style && content) {
|
|
340
|
+
const watermark = {
|
|
341
|
+
content,
|
|
342
|
+
style
|
|
343
|
+
};
|
|
344
|
+
watermarks.push(watermark);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return watermarks;
|
|
349
|
+
}
|
|
350
|
+
function getCanvasScale(canvas, len) {
|
|
351
|
+
const min = Math.min(canvas.width, canvas.height);
|
|
352
|
+
return min / DEFAULT_CANVAS_SIZE * len;
|
|
353
|
+
}
|
|
354
|
+
function buildTile(canvas, content, style) {
|
|
355
|
+
const origin = {
|
|
356
|
+
x: 0,
|
|
357
|
+
y: 0
|
|
358
|
+
};
|
|
359
|
+
const size = {
|
|
360
|
+
width: 0,
|
|
361
|
+
height: 0
|
|
362
|
+
};
|
|
363
|
+
const lines = [];
|
|
364
|
+
const ctx = canvas.getContext("2d");
|
|
365
|
+
if (!ctx) {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
ctx.font = `${style.fontWeight} ${style.fontSize}px ${style.fontName}`;
|
|
369
|
+
const contentPadding = getCanvasScale(canvas, CONTENT_PADDING);
|
|
370
|
+
const contentWidth = canvas.width - contentPadding * 2;
|
|
371
|
+
const lineHeight = ctx.measureText("M").width;
|
|
372
|
+
const lineWidths = [];
|
|
373
|
+
let temp = "";
|
|
374
|
+
let lastWidth = 0;
|
|
375
|
+
for (let i = 0; i < content.length; i++) {
|
|
376
|
+
const lineWidth = ctx.measureText(temp).width;
|
|
377
|
+
if (lineWidth >= contentWidth) {
|
|
378
|
+
lines.push(temp);
|
|
379
|
+
lineWidths.push(lineWidth);
|
|
380
|
+
temp = "";
|
|
381
|
+
}
|
|
382
|
+
lastWidth = lineWidth;
|
|
383
|
+
temp += content[i];
|
|
384
|
+
}
|
|
385
|
+
lines.push(temp);
|
|
386
|
+
lineWidths.push(lastWidth);
|
|
387
|
+
size.width = contentWidth;
|
|
388
|
+
size.height = lines.length * lineHeight;
|
|
389
|
+
return { origin, size, lineHeight, lineWidths, lines, style };
|
|
390
|
+
}
|
|
391
|
+
function getAxisPoint(canvasWidth, origin, style) {
|
|
392
|
+
const padding = (CONTENT_PADDING + DEFAULT_PADDING) * style.scale;
|
|
393
|
+
let axisPoint = { x: padding, y: origin.y };
|
|
394
|
+
if (style.position.startsWith("center")) {
|
|
395
|
+
axisPoint = { x: canvasWidth / 2, y: origin.y };
|
|
396
|
+
} else if (style.position.startsWith("right")) {
|
|
397
|
+
axisPoint = { x: canvasWidth - padding, y: origin.y };
|
|
398
|
+
}
|
|
399
|
+
return axisPoint;
|
|
400
|
+
}
|
|
401
|
+
function getTextAlign(style) {
|
|
402
|
+
let align = "left";
|
|
403
|
+
if (style.position.startsWith("center")) {
|
|
404
|
+
align = "center";
|
|
405
|
+
} else if (style.position.startsWith("right")) {
|
|
406
|
+
align = "right";
|
|
407
|
+
}
|
|
408
|
+
return align;
|
|
409
|
+
}
|
|
410
|
+
function drawLine(canvas, line, origin, style) {
|
|
411
|
+
const ctx = canvas.getContext("2d");
|
|
412
|
+
if (!ctx) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
ctx.textBaseline = "top";
|
|
416
|
+
ctx.font = `${style.fontWeight} ${style.fontSize}px ${style.fontName}`;
|
|
417
|
+
const axisPoint = getAxisPoint(canvas.width, origin, style);
|
|
418
|
+
ctx.textAlign = getTextAlign(style);
|
|
419
|
+
if (style.simplified) {
|
|
420
|
+
ctx.shadowBlur = 4;
|
|
421
|
+
ctx.shadowColor = "rgba(0, 0, 0, 0.5)";
|
|
422
|
+
const offset = clamp(style.fontSize / 40, 2, 4);
|
|
423
|
+
ctx.shadowOffsetY = offset;
|
|
424
|
+
ctx.shadowOffsetX = offset;
|
|
425
|
+
ctx.fillStyle = "rgba(255,255,255, 0.5)";
|
|
426
|
+
} else {
|
|
427
|
+
ctx.fillStyle = style.fontColor;
|
|
428
|
+
}
|
|
429
|
+
ctx.fillText(line, Math.round(axisPoint.x), Math.round(axisPoint.y));
|
|
430
|
+
}
|
|
431
|
+
function hexToRGB(hex, alpha) {
|
|
432
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
433
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
434
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
435
|
+
if (alpha) {
|
|
436
|
+
return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
|
|
437
|
+
}
|
|
438
|
+
return "rgb(" + r + ", " + g + ", " + b + ")";
|
|
439
|
+
}
|
|
440
|
+
function drawBackground(canvas, tile) {
|
|
441
|
+
const ctx = canvas.getContext("2d");
|
|
442
|
+
if (!ctx) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
let { backgroundColor } = tile.style;
|
|
446
|
+
let backgroundOpacity = (0, import_parse.parseDecimal)(
|
|
447
|
+
String(tile.style.backgroundOpacity),
|
|
448
|
+
-1
|
|
449
|
+
);
|
|
450
|
+
if (backgroundOpacity > 255) {
|
|
451
|
+
backgroundOpacity = 255;
|
|
452
|
+
}
|
|
453
|
+
const paddingTop = 2;
|
|
454
|
+
const paddingBottom = 10;
|
|
455
|
+
if (backgroundColor !== "transparent") {
|
|
456
|
+
if (backgroundColor.startsWith("#") && backgroundOpacity >= 0) {
|
|
457
|
+
backgroundColor = hexToRGB(backgroundColor, backgroundOpacity / 255);
|
|
458
|
+
}
|
|
459
|
+
ctx.fillStyle = backgroundColor;
|
|
460
|
+
const { style } = tile;
|
|
461
|
+
const padding = (CONTENT_PADDING + DEFAULT_PADDING) * style.scale;
|
|
462
|
+
const paddingScale = tile.style.fontSize / DEFAULT_FONT_SIZE;
|
|
463
|
+
for (let j = 0; j < tile.lineWidths.length; j++) {
|
|
464
|
+
const { lineHeight } = tile;
|
|
465
|
+
const lineWidth = tile.lineWidths[j];
|
|
466
|
+
let paddingRight = 30 * paddingScale;
|
|
467
|
+
let paddingLeft = 10 * paddingScale;
|
|
468
|
+
let axisPoint = {
|
|
469
|
+
x: padding - paddingLeft,
|
|
470
|
+
y: tile.origin.y
|
|
471
|
+
};
|
|
472
|
+
if (style.position.startsWith("center")) {
|
|
473
|
+
paddingLeft = 20 * paddingScale;
|
|
474
|
+
paddingRight = 20 * paddingScale;
|
|
475
|
+
axisPoint = {
|
|
476
|
+
x: (canvas.width - lineWidth) / 2 - paddingLeft,
|
|
477
|
+
y: tile.origin.y
|
|
478
|
+
};
|
|
479
|
+
} else if (style.position.startsWith("right")) {
|
|
480
|
+
paddingLeft = 30 * paddingScale;
|
|
481
|
+
paddingRight = 10 * paddingScale;
|
|
482
|
+
axisPoint = {
|
|
483
|
+
x: canvas.width - lineWidth - padding - paddingLeft,
|
|
484
|
+
y: tile.origin.y
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
if (j === 0) {
|
|
488
|
+
ctx.fillRect(
|
|
489
|
+
axisPoint.x,
|
|
490
|
+
axisPoint.y - paddingTop > 0 ? axisPoint.y - paddingTop : 0,
|
|
491
|
+
paddingLeft + lineWidth + paddingRight,
|
|
492
|
+
paddingTop
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
ctx.fillRect(
|
|
496
|
+
axisPoint.x,
|
|
497
|
+
axisPoint.y + j * lineHeight,
|
|
498
|
+
paddingLeft + lineWidth + paddingRight,
|
|
499
|
+
lineHeight
|
|
500
|
+
);
|
|
501
|
+
if (j === tile.lineWidths.length - 1) {
|
|
502
|
+
ctx.fillRect(
|
|
503
|
+
axisPoint.x,
|
|
504
|
+
axisPoint.y + (j + 1) * lineHeight,
|
|
505
|
+
paddingLeft + lineWidth + paddingRight,
|
|
506
|
+
paddingBottom
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function drawTile(canvas, tile) {
|
|
513
|
+
if (!tile.style.simplified) {
|
|
514
|
+
drawBackground(canvas, tile);
|
|
515
|
+
}
|
|
516
|
+
for (let i = 0; i < tile.lines.length; i++) {
|
|
517
|
+
const origin = {
|
|
518
|
+
x: tile.origin.x,
|
|
519
|
+
y: i * tile.lineHeight + tile.origin.y
|
|
520
|
+
};
|
|
521
|
+
drawLine(canvas, tile.lines[i], origin, tile.style);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
var GroupPosition = /* @__PURE__ */ ((GroupPosition2) => {
|
|
525
|
+
GroupPosition2["Top"] = "top";
|
|
526
|
+
GroupPosition2["Center"] = "center";
|
|
527
|
+
GroupPosition2["Bottom"] = "bottom";
|
|
528
|
+
return GroupPosition2;
|
|
529
|
+
})(GroupPosition || {});
|
|
530
|
+
function drawGroupedWatermarks(canvas, watermarks, groupPosition) {
|
|
531
|
+
if (!watermarks || watermarks.length === 0) {
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
const tiles = [];
|
|
535
|
+
let totalHeight = 0;
|
|
536
|
+
for (let i = 0; i < watermarks.length; i++) {
|
|
537
|
+
const watermark = watermarks[i];
|
|
538
|
+
const tile = buildTile(canvas, watermark.content, watermark.style);
|
|
539
|
+
if (tile) {
|
|
540
|
+
tiles.push(tile);
|
|
541
|
+
totalHeight += tile.size.height;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (totalHeight <= 0) {
|
|
545
|
+
console.error("watermarks height " + totalHeight);
|
|
546
|
+
console.error(JSON.stringify(watermarks));
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
const contentPadding = getCanvasScale(canvas, CONTENT_PADDING);
|
|
550
|
+
let baseOrigin = { x: contentPadding, y: contentPadding };
|
|
551
|
+
if (groupPosition === "center" /* Center */) {
|
|
552
|
+
baseOrigin = {
|
|
553
|
+
x: contentPadding,
|
|
554
|
+
y: Math.round((canvas.height - totalHeight) / 2)
|
|
555
|
+
};
|
|
556
|
+
} else if (groupPosition === "bottom" /* Bottom */) {
|
|
557
|
+
baseOrigin = {
|
|
558
|
+
x: contentPadding,
|
|
559
|
+
y: canvas.height - totalHeight - contentPadding
|
|
560
|
+
};
|
|
561
|
+
} else if (groupPosition === "top" /* Top */) {
|
|
562
|
+
baseOrigin = { x: contentPadding, y: contentPadding };
|
|
563
|
+
}
|
|
564
|
+
let lastMarginTop = 0;
|
|
565
|
+
for (let i = 0; i < tiles.length; i++) {
|
|
566
|
+
const tile = tiles[i];
|
|
567
|
+
lastMarginTop += tile.style.paddingTop;
|
|
568
|
+
tile.origin = {
|
|
569
|
+
x: tile.origin.x + baseOrigin.x,
|
|
570
|
+
y: lastMarginTop + baseOrigin.y
|
|
571
|
+
};
|
|
572
|
+
lastMarginTop += tile.size.height;
|
|
573
|
+
lastMarginTop += tile.style.paddingBottom;
|
|
574
|
+
}
|
|
575
|
+
for (let i = 0; i < tiles.length; i++) {
|
|
576
|
+
const tile = tiles[i];
|
|
577
|
+
drawTile(canvas, tile);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function groupingWatermarks(watermarks) {
|
|
581
|
+
const topList = [];
|
|
582
|
+
const centerList = [];
|
|
583
|
+
const bottomList = [];
|
|
584
|
+
for (let i = 0; i < watermarks.length; i++) {
|
|
585
|
+
const watermark = watermarks[i];
|
|
586
|
+
if (watermark.style.position.endsWith("top")) {
|
|
587
|
+
topList.push(watermark);
|
|
588
|
+
} else if (watermark.style.position.endsWith("center")) {
|
|
589
|
+
centerList.push(watermark);
|
|
590
|
+
} else if (watermark.style.position.endsWith("bottom")) {
|
|
591
|
+
bottomList.push(watermark);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return {
|
|
595
|
+
["top" /* Top */]: topList,
|
|
596
|
+
["center" /* Center */]: centerList,
|
|
597
|
+
["bottom" /* Bottom */]: bottomList
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
function renderWatermark(canvas, options) {
|
|
601
|
+
if (!options.enabled || options.watermarkConfigString === "no") {
|
|
602
|
+
return Promise.resolve(canvas);
|
|
603
|
+
}
|
|
604
|
+
let { watermarkConfigString } = options;
|
|
605
|
+
if (!(0, import_utils.isDef)(watermarkConfigString) || watermarkConfigString === "default") {
|
|
606
|
+
watermarkConfigString = "50$lefttop$50*#*time###25$lefttop*#*date";
|
|
607
|
+
}
|
|
608
|
+
const watermarks = parseWatermarks(
|
|
609
|
+
watermarkConfigString,
|
|
610
|
+
{
|
|
611
|
+
width: canvas.width,
|
|
612
|
+
height: canvas.height
|
|
613
|
+
},
|
|
614
|
+
options.context
|
|
615
|
+
);
|
|
616
|
+
const groupedWatermarks = groupingWatermarks(watermarks);
|
|
617
|
+
drawGroupedWatermarks(
|
|
618
|
+
canvas,
|
|
619
|
+
groupedWatermarks["top" /* Top */],
|
|
620
|
+
"top" /* Top */
|
|
621
|
+
);
|
|
622
|
+
drawGroupedWatermarks(
|
|
623
|
+
canvas,
|
|
624
|
+
groupedWatermarks["center" /* Center */],
|
|
625
|
+
"center" /* Center */
|
|
626
|
+
);
|
|
627
|
+
drawGroupedWatermarks(
|
|
628
|
+
canvas,
|
|
629
|
+
groupedWatermarks["bottom" /* Bottom */],
|
|
630
|
+
"bottom" /* Bottom */
|
|
631
|
+
);
|
|
632
|
+
return Promise.resolve(canvas);
|
|
633
|
+
}
|
|
634
|
+
function checkWatermarkConfigSupported(watermarkConfigString) {
|
|
635
|
+
if (watermarkConfigString.indexOf("{logo}") > -1) {
|
|
636
|
+
console.error("\u6C34\u5370\u4E0D\u652F\u6301logo");
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
const configStringArray = watermarkConfigString.split("###");
|
|
640
|
+
for (let i = 0; i < configStringArray.length; i++) {
|
|
641
|
+
const configString = configStringArray[i];
|
|
642
|
+
const configParts = configString.split("*#*");
|
|
643
|
+
if (configParts.length === 2) {
|
|
644
|
+
const styleString = configParts[0];
|
|
645
|
+
const styleParts = styleString.split("$");
|
|
646
|
+
if (styleParts.length <= 0) {
|
|
647
|
+
console.error("\u6C34\u5370\u914D\u7F6E\u4E0D\u5408\u6CD5");
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return true;
|
|
653
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { MediaType } from '../media-picker/type';
|
|
2
|
+
import { ExtractPropTypes } from 'vue';
|
|
3
|
+
declare const mediaPlayerProps: {
|
|
4
|
+
show: BooleanConstructor;
|
|
5
|
+
mediaType: {
|
|
6
|
+
type: import("vue").PropType<MediaType>;
|
|
7
|
+
default: MediaType;
|
|
8
|
+
};
|
|
9
|
+
mediaUrl: {
|
|
10
|
+
type: import("vue").PropType<string>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare type MediaPlayerProps = ExtractPropTypes<typeof mediaPlayerProps>;
|
|
15
|
+
declare const _default: import("vue").DefineComponent<{
|
|
16
|
+
show: BooleanConstructor;
|
|
17
|
+
mediaType: {
|
|
18
|
+
type: import("vue").PropType<MediaType>;
|
|
19
|
+
default: MediaType;
|
|
20
|
+
};
|
|
21
|
+
mediaUrl: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
26
|
+
show: BooleanConstructor;
|
|
27
|
+
mediaType: {
|
|
28
|
+
type: import("vue").PropType<MediaType>;
|
|
29
|
+
default: MediaType;
|
|
30
|
+
};
|
|
31
|
+
mediaUrl: {
|
|
32
|
+
type: import("vue").PropType<string>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
}>> & {
|
|
36
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
show: boolean;
|
|
39
|
+
mediaType: MediaType;
|
|
40
|
+
mediaUrl: string;
|
|
41
|
+
}>;
|
|
42
|
+
export default _default;
|