You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 lines
21 KiB

{"ast":null,"code":"import { defineComponent, computed, shallowRef, ref, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, renderSlot } from 'vue';\nimport { useMutationObserver } from '@vueuse/core';\nimport { watermarkProps } from './watermark.mjs';\nimport { reRendering, getStyleStr, getPixelRatio } from './utils.mjs';\nimport useClips, { FontGap } from './useClips.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport { isArray } from '@vue/shared';\nconst __default__ = defineComponent({\n name: \"ElWatermark\"\n});\nconst _sfc_main = /* @__PURE__ */defineComponent({\n ...__default__,\n props: watermarkProps,\n setup(__props) {\n const props = __props;\n const style = {\n position: \"relative\"\n };\n const color = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.color) != null ? _b : \"rgba(0,0,0,.15)\";\n });\n const fontSize = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.fontSize) != null ? _b : 16;\n });\n const fontWeight = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.fontWeight) != null ? _b : \"normal\";\n });\n const fontStyle = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.fontStyle) != null ? _b : \"normal\";\n });\n const fontFamily = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.fontFamily) != null ? _b : \"sans-serif\";\n });\n const textAlign = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.textAlign) != null ? _b : \"center\";\n });\n const textBaseline = computed(() => {\n var _a, _b;\n return (_b = (_a = props.font) == null ? void 0 : _a.textBaseline) != null ? _b : \"hanging\";\n });\n const gapX = computed(() => props.gap[0]);\n const gapY = computed(() => props.gap[1]);\n const gapXCenter = computed(() => gapX.value / 2);\n const gapYCenter = computed(() => gapY.value / 2);\n const offsetLeft = computed(() => {\n var _a, _b;\n return (_b = (_a = props.offset) == null ? void 0 : _a[0]) != null ? _b : gapXCenter.value;\n });\n const offsetTop = computed(() => {\n var _a, _b;\n return (_b = (_a = props.offset) == null ? void 0 : _a[1]) != null ? _b : gapYCenter.value;\n });\n const getMarkStyle = () => {\n const markStyle = {\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 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 return markStyle;\n };\n const containerRef = shallowRef(null);\n const watermarkRef = shallowRef();\n const stopObservation = ref(false);\n const destroyWatermark = () => {\n if (watermarkRef.value) {\n watermarkRef.value.remove();\n watermarkRef.value = void 0;\n }\n };\n const appendWatermark = (base64Url, markWidth) => {\n var _a;\n if (containerRef.value && watermarkRef.value) {\n stopObservation.value = true;\n watermarkRef.value.setAttribute(\"style\", getStyleStr({\n ...getMarkStyle(),\n backgroundImage: `url('${base64Url}')`,\n backgroundSize: `${Math.floor(markWidth)}px`\n }));\n (_a = containerRef.value) == null ? void 0 : _a.append(watermarkRef.value);\n setTimeout(() => {\n stopObservation.value = false;\n });\n }\n };\n const getMarkSize = ctx => {\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 = isArray(content) ? content : [content];\n const sizes = contents.map(item => {\n const metrics = ctx.measureText(item);\n return [metrics.width, metrics.fontBoundingBoxAscent !== void 0 ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent];\n });\n defaultWidth = Math.ceil(Math.max(...sizes.map(size => size[0])));\n defaultHeight = Math.ceil(Math.max(...sizes.map(size => size[1]))) * contents.length + (contents.length - 1) * FontGap;\n }\n return [width != null ? width : defaultWidth, height != null ? height : defaultHeight];\n };\n const getClips = useClips();\n const 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 if (ctx) {\n if (!watermarkRef.value) {\n watermarkRef.value = document.createElement(\"div\");\n }\n const ratio = getPixelRatio();\n const [markWidth, markHeight] = getMarkSize(ctx);\n const drawCanvas = drawContent => {\n const [textClips, clipWidth] = getClips(drawContent || \"\", rotate, ratio, markWidth, markHeight, {\n color: color.value,\n fontSize: fontSize.value,\n fontStyle: fontStyle.value,\n fontWeight: fontWeight.value,\n fontFamily: fontFamily.value,\n textAlign: textAlign.value,\n textBaseline: textBaseline.value\n }, gapX.value, gapY.value);\n appendWatermark(textClips, clipWidth);\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 onMounted(() => {\n renderWatermark();\n });\n watch(() => props, () => {\n renderWatermark();\n }, {\n deep: true,\n flush: \"post\"\n });\n onBeforeUnmount(() => {\n destroyWatermark();\n });\n const onMutate = mutations => {\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 useMutationObserver(containerRef, onMutate, {\n attributes: true,\n subtree: true,\n childList: true\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"containerRef\",\n ref: containerRef,\n style: normalizeStyle([style])\n }, [renderSlot(_ctx.$slots, \"default\")], 4);\n };\n }\n});\nvar Watermark = /* @__PURE__ */_export_sfc(_sfc_main, [[\"__file\", \"watermark.vue\"]]);\nexport { Watermark as default };","map":{"version":3,"names":["name","style","position","color","computed","_a","_b","props","font","fontSize","fontWeight","fontStyle","fontFamily","textAlign","textBaseline","gapX","gap","gapY","gapXCenter","value","gapYCenter","offsetLeft","offset","offsetTop","getMarkStyle","markStyle","zIndex","left","top","width","height","pointerEvents","backgroundRepeat","positionLeft","positionTop","backgroundPosition","containerRef","shallowRef","watermarkRef","stopObservation","ref","destroyWatermark","remove","appendWatermark","base64Url","markWidth","setAttribute","getStyleStr","backgroundImage","backgroundSize","Math","floor","append","setTimeout","getMarkSize","ctx","defaultWidth","defaultHeight","image","content","measureText","Number","contents","isArray","sizes","map","item","metrics","fontBoundingBoxAscent","fontBoundingBoxDescent","actualBoundingBoxAscent","actualBoundingBoxDescent","ceil","max","size","length","FontGap","getClips","useClips","renderWatermark","canvas","document","createElement","getContext","rotate","ratio","getPixelRatio","markHeight","drawCanvas","drawContent","textClips","clipWidth","img","Image","onload","onerror","crossOrigin","referrerPolicy","src","onMounted","watch","deep","flush","onBeforeUnmount","onMutate","mutations","forEach","mutation"],"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 { isArray } from '@element-plus/utils'\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')\nconst textAlign = computed(() => props.font?.textAlign ?? 'center')\nconst textBaseline = computed(() => props.font?.textBaseline ?? 'hanging')\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 = isArray(content) ? content : [content]\n const sizes = contents.map((item) => {\n const metrics = ctx.measureText(item!)\n\n return [\n metrics.width,\n // Using `actualBoundingBoxAscent` to be compatible with lower version browsers (eg: Firefox < 116)\n metrics.fontBoundingBoxAscent !== undefined\n ? metrics.fontBoundingBoxAscent + metrics.fontBoundingBoxDescent\n : metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent,\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 textAlign: textAlign.value,\n textBaseline: textBaseline.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 subtree: true,\n childList: true,\n})\n</script>\n"],"mappings":";;;;;;;mCAuBc;EACZA,IAAM;AACR;;;;;;IAEA,MAAMC,KAAuB;MAC3BC,QAAU;IAAA,CACZ;IAGA,MAAMC,KAAA,GAAQC,QAAS,OAAM;MAC7B,IAAMC,EAAA,EAAAC,EAAA;MACN,QAAAA,EAAA,IAAAD,EAAA,GAA4BE,KAAA,CAAAC,IAAA,KAAY,gBAAAH,EAAA,CAAAF,KAAoB,KAAQ,OAAAG,EAAA;IACpE;IACA,MAAMG,QAAA,GAAAL,QAAsB;MAC5B,IAAMC,EAAA,EAAAC,EAAA;MACN,QAAAA,EAAA,IAAAD,EAAA,GAAqBE,KAAS,CAAAC,IAAA,KAAM,IAAM,QAAM,IAAAH,EAAA,CAAAI,QAAA,KAAyB,OAAAH,EAAA;IAEzE;IACA,MAAMI,UAAgB,GAAAN,QAAA,CAAM,MAAM;MAClC,IAAMC,EAAa,EAAAC,EAAA;MACnB,OAAmB,CAAAA,EAAA,IAAAD,EAAA,GAAAE,KAAA,CAAAC,IAAe,iBAA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