@mptw/skylens-ui 1.4.84 → 1.4.86

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.
@@ -243,6 +243,20 @@ export default defineComponent({
243
243
  }
244
244
  }
245
245
 
246
+ async function copyImageToClipboard() {
247
+ if (!navigator.clipboard) {
248
+ console.log("Can not copy image to clipboard!");
249
+ return;
250
+ }
251
+ const dataURL = await domToPngDataUrl(imageTarget.value, customFilter.value, customStyle.value, padding.value, dateRanges.value, watermark.value, WatermarkImage);
252
+ if (!dataURL) {
253
+ console.log("Can not generate data URL!");
254
+ return;
255
+ }
256
+
257
+ await navigator.clipboard.writeText(dataURL);
258
+ }
259
+
246
260
  onMounted(() => {
247
261
  nextTick(() => {
248
262
  if (buttonEl.value && popupEl.value) {
@@ -266,6 +280,7 @@ export default defineComponent({
266
280
  popupEl,
267
281
  onClickedToggle,
268
282
  onClickedOption,
283
+ copyImageToClipboard,
269
284
  };
270
285
  },
271
286
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.84",
4
+ "version": "1.4.86",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",