{"version":3,"file":"watermark.mjs","names":[],"sources":["../../../../../../packages/components/watermark/src/watermark.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type Watermark from './watermark.vue'\n\nexport interface WatermarkFontType {\n  color?: string\n  fontSize?: number | string\n  fontWeight?: 'normal' | 'bold' | 'lighter' | 'bolder' | number\n  fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'\n  fontFamily?: string\n  fontGap?: number\n  textAlign?: 'start' | 'end' | 'left' | 'right' | 'center'\n  textBaseline?:\n    | 'top'\n    | 'hanging'\n    | 'middle'\n    | 'alphabetic'\n    | 'ideographic'\n    | 'bottom'\n}\n\nexport interface WatermarkProps {\n  /**\n   * @description The z-index of the appended watermark element\n   */\n  zIndex?: number\n  /**\n   * @description The rotation angle of the watermark\n   */\n  rotate?: number\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?: string | string[]\n  /**\n   * @description Text style\n   */\n  font?: WatermarkFontType\n  /**\n   * @description The spacing between watermarks\n   */\n  gap?: [number, number]\n  /**\n   * @description The offset of the watermark from the upper left corner of the container. The default is gap/2\n   */\n  offset?: [number, number]\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead.\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\n/**\n * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead.\n */\nexport type WatermarkPropsPublic = ExtractPublicPropTypes<typeof watermarkProps>\nexport type WatermarkInstance = InstanceType<typeof Watermark> & unknown\n"],"mappings":";;;;;;AAgEA,MAAa,iBAAiB,WAAW;CAIvC,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,OAAO;CAIP,QAAQ;CAIR,OAAO;CAIP,SAAS;EACP,MAAM,eAAkC,CAAC,QAAQ,MAAM,CAAC;EACxD,SAAS;EACV;CAID,MAAM,EACJ,MAAM,eAAkC,OAAO,EAChD;CAID,KAAK;EACH,MAAM,eAAiC,MAAM;EAC7C,eAAe,CAAC,KAAK,IAAI;EAC1B;CAID,QAAQ,EACN,MAAM,eAAiC,MAAM,EAC9C;CACF,CAAU"}