element-plus 2.3.14 → 2.4.0
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +1614 -1079
- package/dist/index.full.min.js +17 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +17 -17
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1614 -1079
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/autocomplete/index.d.ts +28 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/es/components/carousel/index.d.ts +5 -0
- package/es/components/carousel/src/carousel.vue.d.ts +5 -0
- package/es/components/carousel/src/carousel2.mjs +7 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +6 -0
- package/es/components/carousel/src/use-carousel.mjs +39 -5
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +150 -6
- package/es/components/cascader/src/cascader.vue.d.ts +75 -3
- package/es/components/checkbox/index.d.ts +12 -0
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox.d.ts +1 -0
- package/es/components/checkbox/src/checkbox.mjs +2 -1
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox2.mjs +8 -12
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +2 -2
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +1 -0
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +19 -2
- package/es/components/color-picker/src/color-picker.d.ts +2 -0
- package/es/components/color-picker/src/color-picker.mjs +3 -1
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +19 -2
- package/es/components/color-picker/src/color-picker2.mjs +84 -12
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +8 -0
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +269 -11
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +269 -11
- package/es/components/date-picker/src/date-picker.d.ts +4 -0
- package/es/components/date-picker/src/panel-utils.d.ts +538 -22
- package/es/components/date-picker/src/props/date-picker.d.ts +2 -0
- package/es/components/date-picker/src/props/panel-date-pick.d.ts +2 -0
- package/es/components/date-picker/src/props/panel-date-range.d.ts +2 -0
- package/es/components/date-picker/src/props/shared.d.ts +2 -0
- package/es/components/date-picker/src/props/shared.mjs +3 -1
- package/es/components/date-picker/src/props/shared.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +48 -140
- package/es/components/descriptions/index.mjs +3 -3
- package/es/components/descriptions/index.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +39 -69
- package/es/components/descriptions/src/description-item.mjs +39 -36
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +16 -10
- package/es/components/descriptions/src/description2.mjs +9 -8
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-cell.d.ts +9 -3
- package/es/components/descriptions/src/descriptions-cell.mjs +16 -11
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.d.ts +2 -1
- package/es/components/descriptions/src/descriptions-row.mjs +2 -2
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.vue.d.ts +10 -6
- package/es/components/descriptions/src/descriptions-row2.mjs +6 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +1 -1
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/image/index.d.ts +16 -0
- package/es/components/image/src/image.d.ts +2 -0
- package/es/components/image/src/image.mjs +8 -0
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +16 -0
- package/es/components/image/src/image2.mjs +3 -1
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/es/components/image-viewer/src/image-viewer.mjs +8 -0
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer2.mjs +3 -2
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/menu/index.d.ts +1 -0
- package/es/components/menu/index.mjs +1 -0
- package/es/components/menu/index.mjs.map +1 -1
- package/es/components/menu/src/instance.d.ts +12 -0
- package/es/components/menu/src/instance.mjs +2 -0
- package/es/components/menu/src/instance.mjs.map +1 -0
- package/es/components/menu/src/sub-menu.mjs +0 -22
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/es/components/popper/src/composables/use-content-dom.mjs +4 -2
- package/es/components/popper/src/composables/use-content-dom.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/es/components/scrollbar/src/scrollbar.mjs +7 -0
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +12 -8
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.d.ts +4 -0
- package/es/components/select/src/option.mjs +9 -1
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option.vue.d.ts +1 -0
- package/es/components/select/src/select.mjs +251 -228
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +98 -98
- package/es/components/select/src/useOption.mjs +6 -7
- package/es/components/select/src/useOption.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -0
- package/es/components/select/src/useSelect.mjs +4 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +2 -2
- package/es/components/select-v2/src/select-dropdown.mjs +4 -7
- package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.mjs +16 -15
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.mjs +15 -33
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs +33 -12
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.d.ts +4 -1
- package/es/components/tabs/src/tab-nav.mjs.map +1 -1
- package/es/components/tabs/src/tabs.d.ts +16 -29
- package/es/components/tabs/src/tabs.mjs +10 -10
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/text/index.d.ts +18 -0
- package/es/components/text/src/text.d.ts +6 -2
- package/es/components/text/src/text.mjs +3 -0
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text.vue.d.ts +32 -14
- package/es/components/text/src/text2.mjs +8 -4
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-picker/index.d.ts +8 -0
- package/es/components/time-picker/src/common/picker.mjs +2 -0
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +6 -0
- package/es/components/time-picker/src/common/props.d.ts +29 -18
- package/es/components/time-picker/src/common/props.mjs +2 -0
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/es/components/time-picker/src/time-picker.d.ts +4 -0
- package/es/components/time-select/index.d.ts +16 -0
- package/es/components/time-select/src/time-select.vue.d.ts +17 -3
- package/es/components/time-select/src/time-select2.mjs +3 -1
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +40 -0
- package/es/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/es/components/transfer/src/transfer.vue.d.ts +40 -0
- package/es/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/es/components/tree-v2/index.d.ts +8 -0
- package/es/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/es/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/es/components/watermark/index.d.ts +94 -0
- package/es/components/watermark/index.mjs +9 -0
- package/es/components/watermark/index.mjs.map +1 -0
- package/es/components/watermark/src/useClips.d.ts +7 -0
- package/es/components/watermark/src/useClips.mjs +82 -0
- package/es/components/watermark/src/useClips.mjs.map +1 -0
- package/es/components/watermark/src/utils.d.ts +8 -0
- package/es/components/watermark/src/utils.mjs +22 -0
- package/es/components/watermark/src/utils.mjs.map +1 -0
- package/es/components/watermark/src/watermark.d.ts +32 -0
- package/es/components/watermark/src/watermark.mjs +33 -0
- package/es/components/watermark/src/watermark.mjs.map +1 -0
- package/es/components/watermark/src/watermark.vue.d.ts +94 -0
- package/es/components/watermark/src/watermark2.mjs +202 -0
- package/es/components/watermark/src/watermark2.mjs.map +1 -0
- package/es/components/watermark/style/index.d.ts +0 -0
- package/es/components/watermark/style/index.mjs +2 -0
- package/es/components/watermark/style/index.mjs.map +1 -0
- package/es/hooks/use-focus-controller/index.d.ts +6 -1
- package/es/hooks/use-focus-controller/index.mjs +5 -2
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/autocomplete/index.d.ts +28 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/lib/components/carousel/index.d.ts +5 -0
- package/lib/components/carousel/src/carousel.vue.d.ts +5 -0
- package/lib/components/carousel/src/carousel2.js +7 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +6 -0
- package/lib/components/carousel/src/use-carousel.js +38 -4
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +150 -6
- package/lib/components/cascader/src/cascader.vue.d.ts +75 -3
- package/lib/components/checkbox/index.d.ts +12 -0
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox.d.ts +1 -0
- package/lib/components/checkbox/src/checkbox.js +2 -1
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox2.js +8 -12
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +1 -0
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +19 -2
- package/lib/components/color-picker/src/color-picker.d.ts +2 -0
- package/lib/components/color-picker/src/color-picker.js +3 -1
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +19 -2
- package/lib/components/color-picker/src/color-picker2.js +94 -22
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +8 -0
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +269 -11
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +269 -11
- package/lib/components/date-picker/src/date-picker.d.ts +4 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +538 -22
- package/lib/components/date-picker/src/props/date-picker.d.ts +2 -0
- package/lib/components/date-picker/src/props/panel-date-pick.d.ts +2 -0
- package/lib/components/date-picker/src/props/panel-date-range.d.ts +2 -0
- package/lib/components/date-picker/src/props/shared.d.ts +2 -0
- package/lib/components/date-picker/src/props/shared.js +3 -1
- package/lib/components/date-picker/src/props/shared.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +48 -140
- package/lib/components/descriptions/src/description-item.d.ts +39 -69
- package/lib/components/descriptions/src/description-item.js +39 -36
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +16 -10
- package/lib/components/descriptions/src/description2.js +9 -8
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-cell.d.ts +9 -3
- package/lib/components/descriptions/src/descriptions-cell.js +15 -10
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.d.ts +2 -1
- package/lib/components/descriptions/src/descriptions-row.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.vue.d.ts +10 -6
- package/lib/components/descriptions/src/descriptions-row2.js +6 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/form/src/form-item2.js +1 -1
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/image/index.d.ts +16 -0
- package/lib/components/image/src/image.d.ts +2 -0
- package/lib/components/image/src/image.js +8 -0
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +16 -0
- package/lib/components/image/src/image2.js +3 -1
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/lib/components/image-viewer/src/image-viewer.js +8 -0
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer2.js +3 -2
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/menu/index.d.ts +1 -0
- package/lib/components/menu/index.js +1 -0
- package/lib/components/menu/index.js.map +1 -1
- package/lib/components/menu/src/instance.d.ts +12 -0
- package/lib/components/menu/src/instance.js +3 -0
- package/lib/components/menu/src/instance.js.map +1 -0
- package/lib/components/menu/src/sub-menu.js +0 -22
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/lib/components/popper/src/composables/use-content-dom.js +4 -2
- package/lib/components/popper/src/composables/use-content-dom.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/lib/components/scrollbar/src/scrollbar.js +7 -0
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar2.js +12 -8
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.d.ts +4 -0
- package/lib/components/select/src/option.js +9 -1
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option.vue.d.ts +1 -0
- package/lib/components/select/src/select.js +251 -228
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +98 -98
- package/lib/components/select/src/useOption.js +3 -4
- package/lib/components/select/src/useOption.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -0
- package/lib/components/select/src/useSelect.js +4 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +2 -2
- package/lib/components/select-v2/src/select-dropdown.js +3 -6
- package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.js +16 -15
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/table/src/table-footer/index.js +15 -33
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table.js +33 -12
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.d.ts +4 -1
- package/lib/components/tabs/src/tab-nav.js.map +1 -1
- package/lib/components/tabs/src/tabs.d.ts +16 -29
- package/lib/components/tabs/src/tabs.js +10 -10
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/text/index.d.ts +18 -0
- package/lib/components/text/src/text.d.ts +6 -2
- package/lib/components/text/src/text.js +3 -0
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text.vue.d.ts +32 -14
- package/lib/components/text/src/text2.js +7 -3
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-picker/index.d.ts +8 -0
- package/lib/components/time-picker/src/common/picker.js +2 -0
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +6 -0
- package/lib/components/time-picker/src/common/props.d.ts +29 -18
- package/lib/components/time-picker/src/common/props.js +2 -0
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/lib/components/time-picker/src/time-picker.d.ts +4 -0
- package/lib/components/time-select/index.d.ts +16 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +17 -3
- package/lib/components/time-select/src/time-select2.js +5 -3
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +40 -0
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +40 -0
- package/lib/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/lib/components/tree-v2/index.d.ts +8 -0
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/lib/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/lib/components/watermark/index.d.ts +94 -0
- package/lib/components/watermark/index.js +15 -0
- package/lib/components/watermark/index.js.map +1 -0
- package/lib/components/watermark/src/useClips.d.ts +7 -0
- package/lib/components/watermark/src/useClips.js +87 -0
- package/lib/components/watermark/src/useClips.js.map +1 -0
- package/lib/components/watermark/src/utils.d.ts +8 -0
- package/lib/components/watermark/src/utils.js +29 -0
- package/lib/components/watermark/src/utils.js.map +1 -0
- package/lib/components/watermark/src/watermark.d.ts +32 -0
- package/lib/components/watermark/src/watermark.js +37 -0
- package/lib/components/watermark/src/watermark.js.map +1 -0
- package/lib/components/watermark/src/watermark.vue.d.ts +94 -0
- package/lib/components/watermark/src/watermark2.js +206 -0
- package/lib/components/watermark/src/watermark2.js.map +1 -0
- package/lib/components/watermark/style/index.d.ts +0 -0
- package/lib/components/watermark/style/index.js +3 -0
- package/lib/components/watermark/style/index.js.map +1 -0
- package/lib/hooks/use-focus-controller/index.d.ts +6 -1
- package/lib/hooks/use-focus-controller/index.js +5 -2
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +5 -2
- package/tags.json +1 -1
- package/theme-chalk/el-color-picker.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-text.css +1 -1
- package/theme-chalk/el-upload.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/color-picker.scss +8 -2
- package/theme-chalk/src/common/var.scss +3 -1
- package/theme-chalk/src/menu.scss +9 -4
- package/theme-chalk/src/message-box.scss +0 -12
- package/theme-chalk/src/table.scss +38 -15
- package/theme-chalk/src/text.scss +6 -0
- package/theme-chalk/src/upload.scss +1 -1
- package/web-types.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const FontGap = 3;
|
|
6
|
+
function prepareCanvas(width, height, ratio = 1) {
|
|
7
|
+
const canvas = document.createElement("canvas");
|
|
8
|
+
const ctx = canvas.getContext("2d");
|
|
9
|
+
const realWidth = width * ratio;
|
|
10
|
+
const realHeight = height * ratio;
|
|
11
|
+
canvas.setAttribute("width", `${realWidth}px`);
|
|
12
|
+
canvas.setAttribute("height", `${realHeight}px`);
|
|
13
|
+
ctx.save();
|
|
14
|
+
return [ctx, canvas, realWidth, realHeight];
|
|
15
|
+
}
|
|
16
|
+
function useClips() {
|
|
17
|
+
function getClips(content, rotate, ratio, width, height, font, gapX, gapY) {
|
|
18
|
+
const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
|
|
19
|
+
if (content instanceof HTMLImageElement) {
|
|
20
|
+
ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
|
|
21
|
+
} else {
|
|
22
|
+
const { color, fontSize, fontStyle, fontWeight, fontFamily } = font;
|
|
23
|
+
const mergedFontSize = Number(fontSize) * ratio;
|
|
24
|
+
ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
|
|
25
|
+
ctx.fillStyle = color;
|
|
26
|
+
ctx.textAlign = "center";
|
|
27
|
+
ctx.textBaseline = "top";
|
|
28
|
+
const contents = Array.isArray(content) ? content : [content];
|
|
29
|
+
contents == null ? void 0 : contents.forEach((item, index) => {
|
|
30
|
+
ctx.fillText(item != null ? item : "", contentWidth / 2, index * (mergedFontSize + FontGap * ratio));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const angle = Math.PI / 180 * Number(rotate);
|
|
34
|
+
const maxSize = Math.max(width, height);
|
|
35
|
+
const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
|
|
36
|
+
rCtx.translate(realMaxSize / 2, realMaxSize / 2);
|
|
37
|
+
rCtx.rotate(angle);
|
|
38
|
+
if (contentWidth > 0 && contentHeight > 0) {
|
|
39
|
+
rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
|
|
40
|
+
}
|
|
41
|
+
function getRotatePos(x, y) {
|
|
42
|
+
const targetX = x * Math.cos(angle) - y * Math.sin(angle);
|
|
43
|
+
const targetY = x * Math.sin(angle) + y * Math.cos(angle);
|
|
44
|
+
return [targetX, targetY];
|
|
45
|
+
}
|
|
46
|
+
let left = 0;
|
|
47
|
+
let right = 0;
|
|
48
|
+
let top = 0;
|
|
49
|
+
let bottom = 0;
|
|
50
|
+
const halfWidth = contentWidth / 2;
|
|
51
|
+
const halfHeight = contentHeight / 2;
|
|
52
|
+
const points = [
|
|
53
|
+
[0 - halfWidth, 0 - halfHeight],
|
|
54
|
+
[0 + halfWidth, 0 - halfHeight],
|
|
55
|
+
[0 + halfWidth, 0 + halfHeight],
|
|
56
|
+
[0 - halfWidth, 0 + halfHeight]
|
|
57
|
+
];
|
|
58
|
+
points.forEach(([x, y]) => {
|
|
59
|
+
const [targetX, targetY] = getRotatePos(x, y);
|
|
60
|
+
left = Math.min(left, targetX);
|
|
61
|
+
right = Math.max(right, targetX);
|
|
62
|
+
top = Math.min(top, targetY);
|
|
63
|
+
bottom = Math.max(bottom, targetY);
|
|
64
|
+
});
|
|
65
|
+
const cutLeft = left + realMaxSize / 2;
|
|
66
|
+
const cutTop = top + realMaxSize / 2;
|
|
67
|
+
const cutWidth = right - left;
|
|
68
|
+
const cutHeight = bottom - top;
|
|
69
|
+
const realGapX = gapX * ratio;
|
|
70
|
+
const realGapY = gapY * ratio;
|
|
71
|
+
const filledWidth = (cutWidth + realGapX) * 2;
|
|
72
|
+
const filledHeight = cutHeight + realGapY;
|
|
73
|
+
const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
|
|
74
|
+
function drawImg(targetX = 0, targetY = 0) {
|
|
75
|
+
fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY, cutWidth, cutHeight);
|
|
76
|
+
}
|
|
77
|
+
drawImg();
|
|
78
|
+
drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
|
|
79
|
+
drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
|
|
80
|
+
return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio];
|
|
81
|
+
}
|
|
82
|
+
return getClips;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
exports.FontGap = FontGap;
|
|
86
|
+
exports["default"] = useClips;
|
|
87
|
+
//# sourceMappingURL=useClips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClips.js","sources":["../../../../../../packages/components/watermark/src/useClips.ts"],"sourcesContent":["import type { WatermarkProps } from './watermark'\n\nexport const FontGap = 3\n\nfunction prepareCanvas(\n width: number,\n height: number,\n ratio = 1\n): [\n ctx: CanvasRenderingContext2D,\n canvas: HTMLCanvasElement,\n realWidth: number,\n realHeight: number\n] {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')!\n const realWidth = width * ratio\n const realHeight = height * ratio\n canvas.setAttribute('width', `${realWidth}px`)\n canvas.setAttribute('height', `${realHeight}px`)\n ctx.save()\n\n return [ctx, canvas, realWidth, realHeight]\n}\n\n/**\n * Get the clips of text content.\n * This is a lazy hook function since SSR no need this\n */\nexport default function useClips() {\n // Get single clips\n function getClips(\n content: NonNullable<WatermarkProps['content']> | HTMLImageElement,\n rotate: number,\n ratio: number,\n width: number,\n height: number,\n font: Required<NonNullable<WatermarkProps['font']>>,\n gapX: number,\n gapY: number\n ): [dataURL: string, finalWidth: number, finalHeight: number] {\n // ================= Text / Image =================\n const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(\n width,\n height,\n ratio\n )\n\n if (content instanceof HTMLImageElement) {\n // Image\n ctx.drawImage(content, 0, 0, contentWidth, contentHeight)\n } else {\n // Text\n const { color, fontSize, fontStyle, fontWeight, fontFamily } = font\n const mergedFontSize = Number(fontSize) * ratio\n\n ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`\n ctx.fillStyle = color\n ctx.textAlign = 'center'\n ctx.textBaseline = 'top'\n const contents = Array.isArray(content) ? content : [content]\n contents?.forEach((item, index) => {\n ctx.fillText(\n item ?? '',\n contentWidth / 2,\n index * (mergedFontSize + FontGap * ratio)\n )\n })\n }\n\n // ==================== Rotate ====================\n const angle = (Math.PI / 180) * Number(rotate)\n const maxSize = Math.max(width, height)\n const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio)\n\n // Copy from `ctx` and rotate\n rCtx.translate(realMaxSize / 2, realMaxSize / 2)\n rCtx.rotate(angle)\n if (contentWidth > 0 && contentHeight > 0) {\n rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2)\n }\n\n // Get boundary of rotated text\n function getRotatePos(x: number, y: number) {\n const targetX = x * Math.cos(angle) - y * Math.sin(angle)\n const targetY = x * Math.sin(angle) + y * Math.cos(angle)\n return [targetX, targetY]\n }\n\n let left = 0\n let right = 0\n let top = 0\n let bottom = 0\n\n const halfWidth = contentWidth / 2\n const halfHeight = contentHeight / 2\n const points = [\n [0 - halfWidth, 0 - halfHeight],\n [0 + halfWidth, 0 - halfHeight],\n [0 + halfWidth, 0 + halfHeight],\n [0 - halfWidth, 0 + halfHeight],\n ]\n points.forEach(([x, y]) => {\n const [targetX, targetY] = getRotatePos(x, y)\n left = Math.min(left, targetX)\n right = Math.max(right, targetX)\n top = Math.min(top, targetY)\n bottom = Math.max(bottom, targetY)\n })\n\n const cutLeft = left + realMaxSize / 2\n const cutTop = top + realMaxSize / 2\n const cutWidth = right - left\n const cutHeight = bottom - top\n\n // ================ Fill Alternate ================\n const realGapX = gapX * ratio\n const realGapY = gapY * ratio\n const filledWidth = (cutWidth + realGapX) * 2\n const filledHeight = cutHeight + realGapY\n\n const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight)\n\n function drawImg(targetX = 0, targetY = 0) {\n fCtx.drawImage(\n rCanvas,\n cutLeft,\n cutTop,\n cutWidth,\n cutHeight,\n targetX,\n targetY,\n cutWidth,\n cutHeight\n )\n }\n drawImg()\n drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2)\n drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2)\n\n return [fCanvas.toDataURL(), filledWidth / ratio, filledHeight / ratio]\n }\n\n return getClips\n}\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG,EAAE;AACzB,SAAS,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE;AACjD,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAClD,EAAE,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACtC,EAAE,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAClC,EAAE,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;AACpC,EAAE,MAAM,CAAC,YAAY,CAAC,OAA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AAW,GAAG,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC;AAC5E,GAAG;AACH,EAAE,OAAO,QAAQ,CAAC;AAClB;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
/** converting camel-cased strings to be lowercase and link it with Separato */
|
|
3
|
+
export declare function toLowercaseSeparator(key: string): string;
|
|
4
|
+
export declare function getStyleStr(style: CSSProperties): string;
|
|
5
|
+
/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
|
|
6
|
+
export declare function getPixelRatio(): number;
|
|
7
|
+
/** Whether to re-render the watermark */
|
|
8
|
+
export declare const reRendering: (mutation: MutationRecord, watermarkElement?: HTMLElement | undefined) => boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function toLowercaseSeparator(key) {
|
|
6
|
+
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
function getStyleStr(style) {
|
|
9
|
+
return Object.keys(style).map((key) => `${toLowercaseSeparator(key)}: ${style[key]};`).join(" ");
|
|
10
|
+
}
|
|
11
|
+
function getPixelRatio() {
|
|
12
|
+
return window.devicePixelRatio || 1;
|
|
13
|
+
}
|
|
14
|
+
const reRendering = (mutation, watermarkElement) => {
|
|
15
|
+
let flag = false;
|
|
16
|
+
if (mutation.removedNodes.length && watermarkElement) {
|
|
17
|
+
flag = Array.from(mutation.removedNodes).includes(watermarkElement);
|
|
18
|
+
}
|
|
19
|
+
if (mutation.type === "attributes" && mutation.target === watermarkElement) {
|
|
20
|
+
flag = true;
|
|
21
|
+
}
|
|
22
|
+
return flag;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.getPixelRatio = getPixelRatio;
|
|
26
|
+
exports.getStyleStr = getStyleStr;
|
|
27
|
+
exports.reRendering = reRendering;
|
|
28
|
+
exports.toLowercaseSeparator = toLowercaseSeparator;
|
|
29
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../packages/components/watermark/src/utils.ts"],"sourcesContent":["import type { CSSProperties } from 'vue'\n\n/** converting camel-cased strings to be lowercase and link it with Separato */\nexport function toLowercaseSeparator(key: string) {\n return key.replace(/([A-Z])/g, '-$1').toLowerCase()\n}\n\nexport function getStyleStr(style: CSSProperties): string {\n return Object.keys(style)\n .map(\n (key) =>\n `${toLowercaseSeparator(key)}: ${style[key as keyof CSSProperties]};`\n )\n .join(' ')\n}\n\n/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */\nexport function getPixelRatio() {\n return window.devicePixelRatio || 1\n}\n\n/** Whether to re-render the watermark */\nexport const reRendering = (\n mutation: MutationRecord,\n watermarkElement?: HTMLElement\n) => {\n let flag = false\n // Whether to delete the watermark node\n if (mutation.removedNodes.length && watermarkElement) {\n flag = Array.from(mutation.removedNodes).includes(watermarkElement)\n }\n // Whether the watermark dom property value has been modified\n if (mutation.type === 'attributes' && mutation.target === watermarkElement) {\n flag = true\n }\n return flag\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,oBAAoB,CAAC,GAAG,EAAE;AAC1C,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC;AACM,SAAS,WAAW,CAAC,KAAK,EAAE;AACnC,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnG,CAAC;AACM,SAAS,aAAa,GAAG;AAChC,EAAE,OAAO,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;AACtC,CAAC;AACW,MAAC,WAAW,GAAG,CAAC,QAAQ,EAAE,gBAAgB,KAAK;AAC3D,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC;AACnB,EAAE,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,IAAI,gBAAgB,EAAE;AACxD,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AACxE,GAAG;AACH,EAAE,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,EAAE;AAC9E,IAAI,IAAI,GAAG,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd;;;;;;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type Watermark from './watermark.vue';
|
|
3
|
+
export interface WatermarkFontType {
|
|
4
|
+
color?: string;
|
|
5
|
+
fontSize?: number | string;
|
|
6
|
+
fontWeight?: 'normal' | 'light' | 'weight' | number;
|
|
7
|
+
fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
|
|
8
|
+
fontFamily?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const watermarkProps: {
|
|
11
|
+
readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|
|
12
|
+
readonly rotate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>;
|
|
13
|
+
readonly width: NumberConstructor;
|
|
14
|
+
readonly height: NumberConstructor;
|
|
15
|
+
readonly image: StringConstructor;
|
|
16
|
+
readonly content: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown, "Element Plus", boolean>;
|
|
17
|
+
readonly font: {
|
|
18
|
+
readonly type: import("vue").PropType<WatermarkFontType>;
|
|
19
|
+
readonly required: false;
|
|
20
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
21
|
+
__epPropKey: true;
|
|
22
|
+
};
|
|
23
|
+
readonly gap: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | ((new (...args: any[]) => [number, number]) | (() => [number, number]))[], unknown, unknown, () => number[], boolean>;
|
|
24
|
+
readonly offset: {
|
|
25
|
+
readonly type: import("vue").PropType<[number, number]>;
|
|
26
|
+
readonly required: false;
|
|
27
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
28
|
+
__epPropKey: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare type WatermarkProps = ExtractPropTypes<typeof watermarkProps>;
|
|
32
|
+
export declare type WatermarkInstance = InstanceType<typeof Watermark>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
|
|
8
|
+
const watermarkProps = runtime.buildProps({
|
|
9
|
+
zIndex: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 9
|
|
12
|
+
},
|
|
13
|
+
rotate: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: -22
|
|
16
|
+
},
|
|
17
|
+
width: Number,
|
|
18
|
+
height: Number,
|
|
19
|
+
image: String,
|
|
20
|
+
content: {
|
|
21
|
+
type: runtime.definePropType([String, Array]),
|
|
22
|
+
default: "Element Plus"
|
|
23
|
+
},
|
|
24
|
+
font: {
|
|
25
|
+
type: runtime.definePropType(Object)
|
|
26
|
+
},
|
|
27
|
+
gap: {
|
|
28
|
+
type: runtime.definePropType(Array),
|
|
29
|
+
default: () => [100, 100]
|
|
30
|
+
},
|
|
31
|
+
offset: {
|
|
32
|
+
type: runtime.definePropType(Array)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
exports.watermarkProps = watermarkProps;
|
|
37
|
+
//# sourceMappingURL=watermark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watermark.js","sources":["../../../../../../packages/components/watermark/src/watermark.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Watermark from './watermark.vue'\n\nexport interface WatermarkFontType {\n color?: string\n fontSize?: number | string\n fontWeight?: 'normal' | 'light' | 'weight' | number\n fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'\n fontFamily?: string\n}\n\nexport const watermarkProps = buildProps({\n /**\n * @description The z-index of the appended watermark element\n */\n zIndex: {\n type: Number,\n default: 9,\n },\n /**\n * @description The rotation angle of the watermark\n */\n rotate: {\n type: Number,\n default: -22,\n },\n /**\n * @description The width of the watermark\n */\n width: Number,\n /**\n * @description The height of the watermark\n */\n height: Number,\n /**\n * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)\n */\n image: String,\n /**\n * @description Watermark text content\n */\n content: {\n type: definePropType<string | string[]>([String, Array]),\n default: 'Element Plus',\n },\n /**\n * @description Text style\n */\n font: {\n type: definePropType<WatermarkFontType>(Object),\n },\n /**\n * @description The spacing between watermarks\n */\n gap: {\n type: definePropType<[number, number]>(Array),\n default: () => [100, 100],\n },\n /**\n * @description The offset of the watermark from the upper left corner of the container. The default is gap/2\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n },\n} as const)\n\nexport type WatermarkProps = ExtractPropTypes<typeof watermarkProps>\nexport type WatermarkInstance = InstanceType<typeof Watermark>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,EAAE;AAChB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC;AAC7B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,CAAC;;;;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
readonly zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|
|
4
|
+
readonly rotate: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>;
|
|
5
|
+
readonly width: NumberConstructor;
|
|
6
|
+
readonly height: NumberConstructor;
|
|
7
|
+
readonly image: StringConstructor;
|
|
8
|
+
readonly content: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown, "Element Plus", boolean>;
|
|
9
|
+
readonly font: {
|
|
10
|
+
readonly type: import("vue").PropType<import("./watermark").WatermarkFontType>;
|
|
11
|
+
readonly required: false;
|
|
12
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
13
|
+
__epPropKey: true;
|
|
14
|
+
};
|
|
15
|
+
readonly gap: import("../../../utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | ((new (...args: any[]) => [number, number]) | (() => [number, number]))[], unknown, unknown, () => number[], boolean>;
|
|
16
|
+
readonly offset: {
|
|
17
|
+
readonly type: import("vue").PropType<[number, number]>;
|
|
18
|
+
readonly required: false;
|
|
19
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
20
|
+
__epPropKey: true;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
style: CSSProperties;
|
|
24
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
readonly zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|
|
26
|
+
readonly rotate: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>;
|
|
27
|
+
readonly width: NumberConstructor;
|
|
28
|
+
readonly height: NumberConstructor;
|
|
29
|
+
readonly image: StringConstructor;
|
|
30
|
+
readonly content: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown, "Element Plus", boolean>;
|
|
31
|
+
readonly font: {
|
|
32
|
+
readonly type: import("vue").PropType<import("./watermark").WatermarkFontType>;
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
|
+
__epPropKey: true;
|
|
36
|
+
};
|
|
37
|
+
readonly gap: import("../../../utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | ((new (...args: any[]) => [number, number]) | (() => [number, number]))[], unknown, unknown, () => number[], boolean>;
|
|
38
|
+
readonly offset: {
|
|
39
|
+
readonly type: import("vue").PropType<[number, number]>;
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
+
__epPropKey: true;
|
|
43
|
+
};
|
|
44
|
+
}>> & {
|
|
45
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
color: import("vue").ComputedRef<string>;
|
|
48
|
+
fontSize: import("vue").ComputedRef<string | number>;
|
|
49
|
+
fontWeight: import("vue").ComputedRef<number | "light" | "normal" | "weight">;
|
|
50
|
+
fontStyle: import("vue").ComputedRef<"none" | "normal" | "italic" | "oblique">;
|
|
51
|
+
fontFamily: import("vue").ComputedRef<string>;
|
|
52
|
+
gapX: import("vue").ComputedRef<number>;
|
|
53
|
+
gapY: import("vue").ComputedRef<number>;
|
|
54
|
+
gapXCenter: import("vue").ComputedRef<number>;
|
|
55
|
+
gapYCenter: import("vue").ComputedRef<number>;
|
|
56
|
+
offsetLeft: import("vue").ComputedRef<number>;
|
|
57
|
+
offsetTop: import("vue").ComputedRef<number>;
|
|
58
|
+
getMarkStyle: () => CSSProperties;
|
|
59
|
+
containerRef: import("vue").ShallowRef<HTMLDivElement | null>;
|
|
60
|
+
watermarkRef: import("vue").ShallowRef<HTMLDivElement | undefined>;
|
|
61
|
+
stopObservation: import("vue").Ref<boolean>;
|
|
62
|
+
destroyWatermark: () => void;
|
|
63
|
+
appendWatermark: (base64Url: string, markWidth: number) => void;
|
|
64
|
+
getMarkSize: (ctx: CanvasRenderingContext2D) => readonly [number, number];
|
|
65
|
+
getClips: (content: HTMLImageElement | import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown>, rotate: number, ratio: number, width: number, height: number, font: Required<import("./watermark").WatermarkFontType>, gapX: number, gapY: number) => [dataURL: string, finalWidth: number, finalHeight: number];
|
|
66
|
+
renderWatermark: () => void;
|
|
67
|
+
onMutate: (mutations: MutationRecord[]) => void;
|
|
68
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
69
|
+
readonly zIndex: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|
|
70
|
+
readonly rotate: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>;
|
|
71
|
+
readonly width: NumberConstructor;
|
|
72
|
+
readonly height: NumberConstructor;
|
|
73
|
+
readonly image: StringConstructor;
|
|
74
|
+
readonly content: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown, "Element Plus", boolean>;
|
|
75
|
+
readonly font: {
|
|
76
|
+
readonly type: import("vue").PropType<import("./watermark").WatermarkFontType>;
|
|
77
|
+
readonly required: false;
|
|
78
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
|
+
__epPropKey: true;
|
|
80
|
+
};
|
|
81
|
+
readonly gap: import("../../../utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | ((new (...args: any[]) => [number, number]) | (() => [number, number]))[], unknown, unknown, () => number[], boolean>;
|
|
82
|
+
readonly offset: {
|
|
83
|
+
readonly type: import("vue").PropType<[number, number]>;
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
86
|
+
__epPropKey: true;
|
|
87
|
+
};
|
|
88
|
+
}>>, {
|
|
89
|
+
readonly zIndex: number;
|
|
90
|
+
readonly content: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]) | ((new (...args: any[]) => (string | string[]) & {}) | (() => string | string[]))[], unknown, unknown>;
|
|
91
|
+
readonly rotate: number;
|
|
92
|
+
readonly gap: [number, number];
|
|
93
|
+
}>;
|
|
94
|
+
export default _default;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
7
|
+
var watermark = require('./watermark.js');
|
|
8
|
+
var utils = require('./utils.js');
|
|
9
|
+
var useClips = require('./useClips.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
|
|
12
|
+
const __default__ = vue.defineComponent({
|
|
13
|
+
name: "ElWatermark"
|
|
14
|
+
});
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
|
+
...__default__,
|
|
17
|
+
props: watermark.watermarkProps,
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const style = {
|
|
21
|
+
position: "relative"
|
|
22
|
+
};
|
|
23
|
+
const color = vue.computed(() => {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.color) != null ? _b : "rgba(0,0,0,.15)";
|
|
26
|
+
});
|
|
27
|
+
const fontSize = vue.computed(() => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontSize) != null ? _b : 16;
|
|
30
|
+
});
|
|
31
|
+
const fontWeight = vue.computed(() => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontWeight) != null ? _b : "normal";
|
|
34
|
+
});
|
|
35
|
+
const fontStyle = vue.computed(() => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : "normal";
|
|
38
|
+
});
|
|
39
|
+
const fontFamily = vue.computed(() => {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : "sans-serif";
|
|
42
|
+
});
|
|
43
|
+
const gapX = vue.computed(() => props.gap[0]);
|
|
44
|
+
const gapY = vue.computed(() => props.gap[1]);
|
|
45
|
+
const gapXCenter = vue.computed(() => gapX.value / 2);
|
|
46
|
+
const gapYCenter = vue.computed(() => gapY.value / 2);
|
|
47
|
+
const offsetLeft = vue.computed(() => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;
|
|
50
|
+
});
|
|
51
|
+
const offsetTop = vue.computed(() => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;
|
|
54
|
+
});
|
|
55
|
+
const getMarkStyle = () => {
|
|
56
|
+
const markStyle = {
|
|
57
|
+
zIndex: props.zIndex,
|
|
58
|
+
position: "absolute",
|
|
59
|
+
left: 0,
|
|
60
|
+
top: 0,
|
|
61
|
+
width: "100%",
|
|
62
|
+
height: "100%",
|
|
63
|
+
pointerEvents: "none",
|
|
64
|
+
backgroundRepeat: "repeat"
|
|
65
|
+
};
|
|
66
|
+
let positionLeft = offsetLeft.value - gapXCenter.value;
|
|
67
|
+
let positionTop = offsetTop.value - gapYCenter.value;
|
|
68
|
+
if (positionLeft > 0) {
|
|
69
|
+
markStyle.left = `${positionLeft}px`;
|
|
70
|
+
markStyle.width = `calc(100% - ${positionLeft}px)`;
|
|
71
|
+
positionLeft = 0;
|
|
72
|
+
}
|
|
73
|
+
if (positionTop > 0) {
|
|
74
|
+
markStyle.top = `${positionTop}px`;
|
|
75
|
+
markStyle.height = `calc(100% - ${positionTop}px)`;
|
|
76
|
+
positionTop = 0;
|
|
77
|
+
}
|
|
78
|
+
markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
|
|
79
|
+
return markStyle;
|
|
80
|
+
};
|
|
81
|
+
const containerRef = vue.shallowRef(null);
|
|
82
|
+
const watermarkRef = vue.shallowRef();
|
|
83
|
+
const stopObservation = vue.ref(false);
|
|
84
|
+
const destroyWatermark = () => {
|
|
85
|
+
if (watermarkRef.value) {
|
|
86
|
+
watermarkRef.value.remove();
|
|
87
|
+
watermarkRef.value = void 0;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const appendWatermark = (base64Url, markWidth) => {
|
|
91
|
+
var _a;
|
|
92
|
+
if (containerRef.value && watermarkRef.value) {
|
|
93
|
+
stopObservation.value = true;
|
|
94
|
+
watermarkRef.value.setAttribute("style", utils.getStyleStr({
|
|
95
|
+
...getMarkStyle(),
|
|
96
|
+
backgroundImage: `url('${base64Url}')`,
|
|
97
|
+
backgroundSize: `${Math.floor(markWidth)}px`
|
|
98
|
+
}));
|
|
99
|
+
(_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
stopObservation.value = false;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const getMarkSize = (ctx) => {
|
|
106
|
+
let defaultWidth = 120;
|
|
107
|
+
let defaultHeight = 64;
|
|
108
|
+
const image = props.image;
|
|
109
|
+
const content = props.content;
|
|
110
|
+
const width = props.width;
|
|
111
|
+
const height = props.height;
|
|
112
|
+
if (!image && ctx.measureText) {
|
|
113
|
+
ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
|
|
114
|
+
const contents = Array.isArray(content) ? content : [content];
|
|
115
|
+
const sizes = contents.map((item) => {
|
|
116
|
+
const metrics = ctx.measureText(item);
|
|
117
|
+
return [
|
|
118
|
+
metrics.width,
|
|
119
|
+
metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent
|
|
120
|
+
];
|
|
121
|
+
});
|
|
122
|
+
defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])));
|
|
123
|
+
defaultHeight = Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length + (contents.length - 1) * useClips.FontGap;
|
|
124
|
+
}
|
|
125
|
+
return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];
|
|
126
|
+
};
|
|
127
|
+
const getClips = useClips["default"]();
|
|
128
|
+
const renderWatermark = () => {
|
|
129
|
+
const canvas = document.createElement("canvas");
|
|
130
|
+
const ctx = canvas.getContext("2d");
|
|
131
|
+
const image = props.image;
|
|
132
|
+
const content = props.content;
|
|
133
|
+
const rotate = props.rotate;
|
|
134
|
+
if (ctx) {
|
|
135
|
+
if (!watermarkRef.value) {
|
|
136
|
+
watermarkRef.value = document.createElement("div");
|
|
137
|
+
}
|
|
138
|
+
const ratio = utils.getPixelRatio();
|
|
139
|
+
const [markWidth, markHeight] = getMarkSize(ctx);
|
|
140
|
+
const drawCanvas = (drawContent) => {
|
|
141
|
+
const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
|
|
142
|
+
color: color.value,
|
|
143
|
+
fontSize: fontSize.value,
|
|
144
|
+
fontStyle: fontStyle.value,
|
|
145
|
+
fontWeight: fontWeight.value,
|
|
146
|
+
fontFamily: fontFamily.value
|
|
147
|
+
}, gapX.value, gapY.value);
|
|
148
|
+
appendWatermark(textClips, clipWidth);
|
|
149
|
+
};
|
|
150
|
+
if (image) {
|
|
151
|
+
const img = new Image();
|
|
152
|
+
img.onload = () => {
|
|
153
|
+
drawCanvas(img);
|
|
154
|
+
};
|
|
155
|
+
img.onerror = () => {
|
|
156
|
+
drawCanvas(content);
|
|
157
|
+
};
|
|
158
|
+
img.crossOrigin = "anonymous";
|
|
159
|
+
img.referrerPolicy = "no-referrer";
|
|
160
|
+
img.src = image;
|
|
161
|
+
} else {
|
|
162
|
+
drawCanvas(content);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
vue.onMounted(() => {
|
|
167
|
+
renderWatermark();
|
|
168
|
+
});
|
|
169
|
+
vue.watch(() => props, () => {
|
|
170
|
+
renderWatermark();
|
|
171
|
+
}, {
|
|
172
|
+
deep: true,
|
|
173
|
+
flush: "post"
|
|
174
|
+
});
|
|
175
|
+
vue.onBeforeUnmount(() => {
|
|
176
|
+
destroyWatermark();
|
|
177
|
+
});
|
|
178
|
+
const onMutate = (mutations) => {
|
|
179
|
+
if (stopObservation.value) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
mutations.forEach((mutation) => {
|
|
183
|
+
if (utils.reRendering(mutation, watermarkRef.value)) {
|
|
184
|
+
destroyWatermark();
|
|
185
|
+
renderWatermark();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
core.useMutationObserver(containerRef, onMutate, {
|
|
190
|
+
attributes: true
|
|
191
|
+
});
|
|
192
|
+
return (_ctx, _cache) => {
|
|
193
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
194
|
+
ref_key: "containerRef",
|
|
195
|
+
ref: containerRef,
|
|
196
|
+
style: vue.normalizeStyle([style])
|
|
197
|
+
}, [
|
|
198
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
199
|
+
], 4);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
var Watermark = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/watermark/src/watermark.vue"]]);
|
|
204
|
+
|
|
205
|
+
exports["default"] = Watermark;
|
|
206
|
+
//# sourceMappingURL=watermark2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watermark2.js","sources":["../../../../../../packages/components/watermark/src/watermark.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" :style=\"[style]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { watermarkProps } from './watermark'\nimport { getPixelRatio, getStyleStr, reRendering } from './utils'\nimport useClips, { FontGap } from './useClips'\nimport type { WatermarkProps } from './watermark'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElWatermark',\n})\n\nconst style: CSSProperties = {\n position: 'relative',\n}\n\nconst props = defineProps(watermarkProps)\nconst color = computed(() => props.font?.color ?? 'rgba(0,0,0,.15)')\nconst fontSize = computed(() => props.font?.fontSize ?? 16)\nconst fontWeight = computed(() => props.font?.fontWeight ?? 'normal')\nconst fontStyle = computed(() => props.font?.fontStyle ?? 'normal')\nconst fontFamily = computed(() => props.font?.fontFamily ?? 'sans-serif')\n\nconst gapX = computed(() => props.gap[0])\nconst gapY = computed(() => props.gap[1])\nconst gapXCenter = computed(() => gapX.value / 2)\nconst gapYCenter = computed(() => gapY.value / 2)\nconst offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value)\nconst offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value)\n\nconst getMarkStyle = () => {\n const markStyle: CSSProperties = {\n zIndex: props.zIndex,\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n backgroundRepeat: 'repeat',\n }\n\n /** Calculate the style of the offset */\n let positionLeft = offsetLeft.value - gapXCenter.value\n let positionTop = offsetTop.value - gapYCenter.value\n if (positionLeft > 0) {\n markStyle.left = `${positionLeft}px`\n markStyle.width = `calc(100% - ${positionLeft}px)`\n positionLeft = 0\n }\n if (positionTop > 0) {\n markStyle.top = `${positionTop}px`\n markStyle.height = `calc(100% - ${positionTop}px)`\n positionTop = 0\n }\n markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`\n\n return markStyle\n}\n\nconst containerRef = shallowRef<HTMLDivElement | null>(null)\nconst watermarkRef = shallowRef<HTMLDivElement>()\nconst stopObservation = ref(false)\n\nconst destroyWatermark = () => {\n if (watermarkRef.value) {\n watermarkRef.value.remove()\n watermarkRef.value = undefined\n }\n}\nconst appendWatermark = (base64Url: string, markWidth: number) => {\n if (containerRef.value && watermarkRef.value) {\n stopObservation.value = true\n watermarkRef.value.setAttribute(\n 'style',\n getStyleStr({\n ...getMarkStyle(),\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`,\n })\n )\n containerRef.value?.append(watermarkRef.value)\n // Delayed execution\n setTimeout(() => {\n stopObservation.value = false\n })\n }\n}\n\n/**\n * Get the width and height of the watermark. The default values are as follows\n * Image: [120, 64]; Content: It's calculated by content;\n */\nconst getMarkSize = (ctx: CanvasRenderingContext2D) => {\n let defaultWidth = 120\n let defaultHeight = 64\n const image = props.image\n const content = props.content\n const width = props.width\n const height = props.height\n if (!image && ctx.measureText) {\n ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`\n const contents = Array.isArray(content) ? content : [content]\n const sizes = contents.map((item) => {\n const metrics = ctx.measureText(item!)\n\n return [\n metrics.width,\n metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent,\n ]\n })\n defaultWidth = Math.ceil(Math.max(...sizes.map((size) => size[0])))\n defaultHeight =\n Math.ceil(Math.max(...sizes.map((size) => size[1]))) * contents.length +\n (contents.length - 1) * FontGap\n }\n return [width ?? defaultWidth, height ?? defaultHeight] as const\n}\n\nconst getClips = useClips()\n\nconst renderWatermark = () => {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n const image = props.image\n const content = props.content\n const rotate = props.rotate\n\n if (ctx) {\n if (!watermarkRef.value) {\n watermarkRef.value = document.createElement('div')\n }\n\n const ratio = getPixelRatio()\n const [markWidth, markHeight] = getMarkSize(ctx)\n\n const drawCanvas = (\n drawContent?: NonNullable<WatermarkProps['content']> | HTMLImageElement\n ) => {\n const [textClips, clipWidth] = getClips(\n drawContent || '',\n rotate,\n ratio,\n markWidth,\n markHeight,\n {\n color: color.value,\n fontSize: fontSize.value,\n fontStyle: fontStyle.value,\n fontWeight: fontWeight.value,\n fontFamily: fontFamily.value,\n },\n gapX.value,\n gapY.value\n )\n\n appendWatermark(textClips, clipWidth)\n }\n\n if (image) {\n const img = new Image()\n img.onload = () => {\n drawCanvas(img)\n }\n img.onerror = () => {\n drawCanvas(content)\n }\n img.crossOrigin = 'anonymous'\n img.referrerPolicy = 'no-referrer'\n img.src = image\n } else {\n drawCanvas(content)\n }\n }\n}\n\nonMounted(() => {\n renderWatermark()\n})\n\nwatch(\n () => props,\n () => {\n renderWatermark()\n },\n {\n deep: true,\n flush: 'post',\n }\n)\n\nonBeforeUnmount(() => {\n destroyWatermark()\n})\n\nconst onMutate = (mutations: MutationRecord[]) => {\n if (stopObservation.value) {\n return\n }\n mutations.forEach((mutation) => {\n if (reRendering(mutation, watermarkRef.value)) {\n destroyWatermark()\n renderWatermark()\n }\n })\n}\n\nuseMutationObserver(containerRef, onMutate, {\n attributes: true,\n})\n</script>\n"],"names":["computed","shallowRef","ref","getStyleStr","FontGap","useClips","getPixelRatio","onMounted","watch"],"mappings":";;;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAA,MAAM,KAAuB,GAAA;AAAA,MAC3B,QAAU,EAAA,UAAA;AAAA,KACZ,CAAA;AAGA,IAAA,MAAM,QAAQA,YAAS,CAAA,MAAM;AAC7B,MAAA,IAAM;AACN,MAAA,mBAA4B,KAAA,CAAA,IAAA,KAAY,IAAA,GAAA,iBAAoB,KAAQ,IAAA,GAAA,EAAA,GAAA,iBAAA,CAAA;AACpE,KAAA,CAAA,CAAA;AACA,IAAA,MAAM,uBAAsB,CAAA,MAAA;AAE5B,MAAA,IAAM,EAAO,EAAA,EAAA,CAAA;AACb,MAAA,OAAa,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAe,CAAA,IAAA,SAAY,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,KAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA;AACxC,KAAA,CAAA,CAAA;AACA,IAAA,MAA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AAA,QAAA,CAAA,KAAA;AAEA,YAAA,SAAgB,EAAA,SAAA,CAAA,KAAA;AACd,YAAgB,UAAA,EAAA,UAAA,CAAA,KAAA;AAAA,YACjB,UAAA,EAAA,UAAA,CAAA,KAAA;AAED,WACE,EAAA,UACA,EAAM,IAAA,CAAA,KAAA,CAAA,CAAA;AACJ,UAAgB,eAAA,CAAA,SAAA,EAAA,SAAA,CAAA,CAAA;AAAA,SAElB,CAAA;AAAA,QACQ,IAAA,KAAA,EAAA;AAAA,UACC,MAAA,GAAA,GAAA,IAAA,KAAA,EAAA,CAAA;AAAA,UAEX,GAAA,CAAA,MAAA,GAAA,MAAA;AAEA,YAAA,UAAsB,CAAA,GAAA,CAAA,CAAA;AACpB,WAAiB,CAAA;AAAA,UAClB,GAAA,CAAA,OAAA,GAAA,MAAA;AAED,YAAM,UAAY,CAAgC,OAAA,CAAA,CAAA;AAChD;AACE,UAAA,GAAA,CAAA,WAAA,GAAA,WAAA,CAAA;AAAA,UACF,GAAA,CAAA,cAAA,GAAA,aAAA,CAAA;AACA,UAAU,GAAA,CAAA,GAAA,GAAA,KAAS,CAAa;AAC9B,SAAA,MAAgB;AACd,UAAiB,UAAA,CAAA,OAAA,CAAA,CAAA;AACjB,SAAgB;AAAA,OAClB;AAAA,KAAA,CACF;AAAC,IACHC,aAAA,CAAA,MAAA;AAEA,MAAA,eAAA,EAAA,CAAoB;AAAwB,KAAA,CAC1C,CAAY;AAAA,IACdC,SAAC,CAAA,MAAA,KAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { ShallowRef } from 'vue';
|
|
2
2
|
interface UseFocusControllerOptions {
|
|
3
3
|
afterFocus?: () => void;
|
|
4
|
+
/**
|
|
5
|
+
* return true to cancel blur
|
|
6
|
+
* @param event FocusEvent
|
|
7
|
+
*/
|
|
8
|
+
beforeBlur?: (event: FocusEvent) => boolean | undefined;
|
|
4
9
|
afterBlur?: () => void;
|
|
5
10
|
}
|
|
6
|
-
export declare function useFocusController<T extends HTMLElement>(target: ShallowRef<T | undefined>, { afterFocus, afterBlur }?: UseFocusControllerOptions): {
|
|
11
|
+
export declare function useFocusController<T extends HTMLElement>(target: ShallowRef<T | undefined>, { afterFocus, beforeBlur, afterBlur }?: UseFocusControllerOptions): {
|
|
7
12
|
wrapperRef: ShallowRef<HTMLElement | undefined>;
|
|
8
13
|
isFocused: import("vue").Ref<boolean>;
|
|
9
14
|
handleFocus: (event: FocusEvent) => void;
|
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var core = require('@vueuse/core');
|
|
7
|
+
require('../../utils/index.js');
|
|
8
|
+
var shared = require('@vue/shared');
|
|
7
9
|
|
|
8
|
-
function useFocusController(target, { afterFocus, afterBlur } = {}) {
|
|
10
|
+
function useFocusController(target, { afterFocus, beforeBlur, afterBlur } = {}) {
|
|
9
11
|
const instance = vue.getCurrentInstance();
|
|
10
12
|
const { emit } = instance;
|
|
11
13
|
const wrapperRef = vue.shallowRef();
|
|
@@ -19,7 +21,8 @@ function useFocusController(target, { afterFocus, afterBlur } = {}) {
|
|
|
19
21
|
};
|
|
20
22
|
const handleBlur = (event) => {
|
|
21
23
|
var _a;
|
|
22
|
-
|
|
24
|
+
const cancelBlur = shared.isFunction(beforeBlur) ? beforeBlur(event) : false;
|
|
25
|
+
if (cancelBlur || event.relatedTarget && ((_a = wrapperRef.value) == null ? void 0 : _a.contains(event.relatedTarget)))
|
|
23
26
|
return;
|
|
24
27
|
isFocused.value = false;
|
|
25
28
|
emit("blur", event);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-focus-controller/index.ts"],"sourcesContent":["import { getCurrentInstance, ref, shallowRef, watch } from 'vue'\nimport { useEventListener } from '@vueuse/core'\nimport type { ShallowRef } from 'vue'\n\ninterface UseFocusControllerOptions {\n afterFocus?: () => void\n afterBlur?: () => void\n}\n\nexport function useFocusController<T extends HTMLElement>(\n target: ShallowRef<T | undefined>,\n { afterFocus, afterBlur }: UseFocusControllerOptions = {}\n) {\n const instance = getCurrentInstance()!\n const { emit } = instance\n const wrapperRef = shallowRef<HTMLElement>()\n const isFocused = ref(false)\n\n const handleFocus = (event: FocusEvent) => {\n if (isFocused.value) return\n isFocused.value = true\n emit('focus', event)\n afterFocus?.()\n }\n\n const handleBlur = (event: FocusEvent) => {\n if (\n event.relatedTarget &&\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-focus-controller/index.ts"],"sourcesContent":["import { getCurrentInstance, ref, shallowRef, watch } from 'vue'\nimport { useEventListener } from '@vueuse/core'\nimport { isFunction } from '@element-plus/utils'\nimport type { ShallowRef } from 'vue'\n\ninterface UseFocusControllerOptions {\n afterFocus?: () => void\n /**\n * return true to cancel blur\n * @param event FocusEvent\n */\n beforeBlur?: (event: FocusEvent) => boolean | undefined\n afterBlur?: () => void\n}\n\nexport function useFocusController<T extends HTMLElement>(\n target: ShallowRef<T | undefined>,\n { afterFocus, beforeBlur, afterBlur }: UseFocusControllerOptions = {}\n) {\n const instance = getCurrentInstance()!\n const { emit } = instance\n const wrapperRef = shallowRef<HTMLElement>()\n const isFocused = ref(false)\n\n const handleFocus = (event: FocusEvent) => {\n if (isFocused.value) return\n isFocused.value = true\n emit('focus', event)\n afterFocus?.()\n }\n\n const handleBlur = (event: FocusEvent) => {\n const cancelBlur = isFunction(beforeBlur) ? beforeBlur(event) : false\n if (\n cancelBlur ||\n (event.relatedTarget &&\n wrapperRef.value?.contains(event.relatedTarget as Node))\n )\n return\n\n isFocused.value = false\n emit('blur', event)\n afterBlur?.()\n }\n\n const handleClick = () => {\n target.value?.focus()\n }\n\n watch(wrapperRef, (el) => {\n if (el) {\n el.setAttribute('tabindex', '-1')\n }\n })\n\n // TODO: using useEventListener will fail the test\n // useEventListener(target, 'focus', handleFocus)\n // useEventListener(target, 'blur', handleBlur)\n useEventListener(wrapperRef, 'click', handleClick)\n\n return {\n wrapperRef,\n isFocused,\n handleFocus,\n handleBlur,\n }\n}\n"],"names":["getCurrentInstance","shallowRef","ref","isFunction","watch","useEventListener"],"mappings":";;;;;;;;;AAGO,SAAS,kBAAkB,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE;AACvF,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;AAC5B,EAAE,MAAM,UAAU,GAAGC,cAAU,EAAE,CAAC;AAClC,EAAE,MAAM,SAAS,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACjC,IAAI,IAAI,SAAS,CAAC,KAAK;AACvB,MAAM,OAAO;AACb,IAAI,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACzB,IAAI,UAAU,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;AAC/C,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK;AAChC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,UAAU,GAAGC,iBAAU,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC1E,IAAI,IAAI,UAAU,IAAI,KAAK,CAAC,aAAa,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CA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