@embedpdf/plugin-annotation 2.11.1 → 2.12.1

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/dist/vue/index.js CHANGED
@@ -8,8 +8,8 @@ import { usePlugin, useCapability, useDocumentPermissions, useDocumentState } fr
8
8
  import { boundingRectOrEmpty, PdfAnnotationBorderStyle, PdfVerticalAlignment, textAlignmentToCss, standardFontCssProperties, ignore, PdfErrorCode, getContrastStrokeColor, PdfBlendMode, blendModeToCss, PdfAnnotationSubtype } from "@embedpdf/models";
9
9
  import { usePointerHandlers } from "@embedpdf/plugin-interaction-manager/vue";
10
10
  import { useSelectionCapability } from "@embedpdf/plugin-selection/vue";
11
- const _hoisted_1$e = ["src"];
12
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
11
+ const _hoisted_1$f = ["src"];
12
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
13
13
  __name: "appearance-image",
14
14
  props: {
15
15
  appearance: {},
@@ -52,7 +52,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
52
52
  userSelect: "none",
53
53
  ...__props.style
54
54
  })
55
- }, null, 44, _hoisted_1$e)) : createCommentVNode("", true);
55
+ }, null, 44, _hoisted_1$f)) : createCommentVNode("", true);
56
56
  };
57
57
  }
58
58
  });
@@ -119,12 +119,12 @@ function useIOSZoomPrevention(computedFontPx, active) {
119
119
  return { needsComp, adjustedFontPx, scaleComp, wrapperStyle };
120
120
  });
121
121
  }
122
- const _hoisted_1$d = ["width", "height", "stroke"];
122
+ const _hoisted_1$e = ["width", "height", "stroke"];
123
123
  const _hoisted_2$a = ["width", "height", "stroke"];
124
124
  const __default__$f = {
125
125
  inheritAttrs: false
126
126
  };
127
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
127
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
128
128
  ...__default__$f,
129
129
  __name: "annotation-container",
130
130
  props: {
@@ -689,7 +689,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
689
689
  annotation: childObject.value,
690
690
  appearanceActive: apActive.value
691
691
  }),
692
- ((_a = __props.appearance) == null ? void 0 : _a.normal) ? (openBlock(), createBlock(_sfc_main$N, {
692
+ ((_a = __props.appearance) == null ? void 0 : _a.normal) ? (openBlock(), createBlock(_sfc_main$O, {
693
693
  key: 0,
694
694
  appearance: __props.appearance.normal,
695
695
  style: normalizeStyle({ display: apActive.value ? "block" : "none" })
@@ -738,7 +738,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
738
738
  }, [..._cache[2] || (_cache[2] = [
739
739
  createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
740
740
  createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
741
- ])], 8, _hoisted_1$d))
741
+ ])], 8, _hoisted_1$e))
742
742
  ], 16)
743
743
  ]) : (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, rotationHandleBindings.value, { style: rotationHandleStyle.value }), [
744
744
  (openBlock(), createElementBlock("svg", {
@@ -873,14 +873,14 @@ function getAnnotationScreenBounds(annotation, scale, rotation) {
873
873
  bottom: top + maxY
874
874
  };
875
875
  }
876
- const _hoisted_1$c = {
876
+ const _hoisted_1$d = {
877
877
  key: 0,
878
878
  "data-group-selection-box": "",
879
879
  "data-no-interaction": ""
880
880
  };
881
881
  const _hoisted_2$9 = ["width", "height", "stroke"];
882
882
  const _hoisted_3$9 = ["width", "height", "stroke"];
883
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
883
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
884
884
  __name: "group-selection-box",
885
885
  props: {
886
886
  documentId: {},
@@ -1340,7 +1340,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1340
1340
  currentRotation: computed(() => liveRotation.value ?? 0)
1341
1341
  });
1342
1342
  return (_ctx, _cache) => {
1343
- return __props.selectedAnnotations.length >= 2 ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
1343
+ return __props.selectedAnnotations.length >= 2 ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
1344
1344
  createElementVNode("div", {
1345
1345
  style: normalizeStyle(outerStyle.value)
1346
1346
  }, [
@@ -1508,7 +1508,7 @@ function createRenderer(entry) {
1508
1508
  };
1509
1509
  }
1510
1510
  const __default__$e = { inheritAttrs: false };
1511
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
1511
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1512
1512
  ...__default__$e,
1513
1513
  __name: "link-locked",
1514
1514
  props: {
@@ -1543,7 +1543,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1543
1543
  };
1544
1544
  }
1545
1545
  });
1546
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
1546
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1547
1547
  __name: "link-preview",
1548
1548
  props: {
1549
1549
  data: {},
@@ -1569,11 +1569,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1569
1569
  };
1570
1570
  }
1571
1571
  });
1572
- const _hoisted_1$b = ["width", "height", "viewBox"];
1572
+ const _hoisted_1$c = ["width", "height", "viewBox"];
1573
1573
  const _hoisted_2$8 = ["d", "stroke-width"];
1574
1574
  const _hoisted_3$8 = ["d", "opacity"];
1575
1575
  const __default__$d = { inheritAttrs: false };
1576
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
1576
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1577
1577
  ...__default__$d,
1578
1578
  __name: "ink",
1579
1579
  props: {
@@ -1653,11 +1653,11 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1653
1653
  })
1654
1654
  }, null, 12, _hoisted_3$8);
1655
1655
  }), 128)) : createCommentVNode("", true)
1656
- ], 12, _hoisted_1$b);
1656
+ ], 12, _hoisted_1$c);
1657
1657
  };
1658
1658
  }
1659
1659
  });
1660
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
1660
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1661
1661
  __name: "ink-preview",
1662
1662
  props: {
1663
1663
  data: {},
@@ -1666,20 +1666,20 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1666
1666
  },
1667
1667
  setup(__props) {
1668
1668
  return (_ctx, _cache) => {
1669
- return openBlock(), createBlock(_sfc_main$I, mergeProps({
1669
+ return openBlock(), createBlock(_sfc_main$J, mergeProps({
1670
1670
  isSelected: false,
1671
1671
  scale: __props.scale
1672
1672
  }, __props.data), null, 16, ["scale"]);
1673
1673
  };
1674
1674
  }
1675
1675
  });
1676
- const _hoisted_1$a = ["width", "height", "viewBox"];
1676
+ const _hoisted_1$b = ["width", "height", "viewBox"];
1677
1677
  const _hoisted_2$7 = ["d", "stroke-width"];
1678
1678
  const _hoisted_3$7 = ["x", "y", "width", "height", "stroke-width"];
1679
1679
  const _hoisted_4$6 = ["d", "fill", "opacity"];
1680
1680
  const _hoisted_5$5 = ["x", "y", "width", "height", "fill", "opacity"];
1681
1681
  const __default__$c = { inheritAttrs: false };
1682
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
1682
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1683
1683
  ...__default__$c,
1684
1684
  __name: "square",
1685
1685
  props: {
@@ -1800,11 +1800,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1800
1800
  })
1801
1801
  }, null, 12, _hoisted_5$5))
1802
1802
  ], 64)) : createCommentVNode("", true)
1803
- ], 12, _hoisted_1$a);
1803
+ ], 12, _hoisted_1$b);
1804
1804
  };
1805
1805
  }
1806
1806
  });
1807
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
1807
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1808
1808
  __name: "square-preview",
1809
1809
  props: {
1810
1810
  data: {},
@@ -1813,20 +1813,20 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1813
1813
  },
1814
1814
  setup(__props) {
1815
1815
  return (_ctx, _cache) => {
1816
- return openBlock(), createBlock(_sfc_main$G, mergeProps({
1816
+ return openBlock(), createBlock(_sfc_main$H, mergeProps({
1817
1817
  isSelected: false,
1818
1818
  scale: __props.scale
1819
1819
  }, __props.data), null, 16, ["scale"]);
1820
1820
  };
1821
1821
  }
1822
1822
  });
1823
- const _hoisted_1$9 = ["width", "height", "viewBox"];
1823
+ const _hoisted_1$a = ["width", "height", "viewBox"];
1824
1824
  const _hoisted_2$6 = ["d", "stroke-width"];
1825
1825
  const _hoisted_3$6 = ["cx", "cy", "rx", "ry", "stroke-width"];
1826
1826
  const _hoisted_4$5 = ["d", "fill", "opacity"];
1827
1827
  const _hoisted_5$4 = ["cx", "cy", "rx", "ry", "fill", "opacity"];
1828
1828
  const __default__$b = { inheritAttrs: false };
1829
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
1829
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1830
1830
  ...__default__$b,
1831
1831
  __name: "circle",
1832
1832
  props: {
@@ -1949,11 +1949,11 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1949
1949
  })
1950
1950
  }, null, 12, _hoisted_5$4))
1951
1951
  ], 64)) : createCommentVNode("", true)
1952
- ], 12, _hoisted_1$9);
1952
+ ], 12, _hoisted_1$a);
1953
1953
  };
1954
1954
  }
1955
1955
  });
1956
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
1956
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1957
1957
  __name: "circle-preview",
1958
1958
  props: {
1959
1959
  data: {},
@@ -1962,14 +1962,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1962
1962
  },
1963
1963
  setup(__props) {
1964
1964
  return (_ctx, _cache) => {
1965
- return openBlock(), createBlock(_sfc_main$E, mergeProps({
1965
+ return openBlock(), createBlock(_sfc_main$F, mergeProps({
1966
1966
  isSelected: false,
1967
1967
  scale: __props.scale
1968
1968
  }, __props.data), null, 16, ["scale"]);
1969
1969
  };
1970
1970
  }
1971
1971
  });
1972
- const _hoisted_1$8 = ["width", "height", "viewBox"];
1972
+ const _hoisted_1$9 = ["width", "height", "viewBox"];
1973
1973
  const _hoisted_2$5 = ["x1", "y1", "x2", "y2", "stroke-width"];
1974
1974
  const _hoisted_3$5 = ["d", "transform", "stroke-width"];
1975
1975
  const _hoisted_4$4 = ["d", "transform", "stroke-width"];
@@ -1977,7 +1977,7 @@ const _hoisted_5$3 = ["x1", "y1", "x2", "y2", "opacity"];
1977
1977
  const _hoisted_6$2 = ["d", "transform", "stroke", "fill"];
1978
1978
  const _hoisted_7$1 = ["d", "transform", "stroke", "fill"];
1979
1979
  const __default__$a = { inheritAttrs: false };
1980
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
1980
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
1981
1981
  ...__default__$a,
1982
1982
  __name: "line",
1983
1983
  props: {
@@ -2132,11 +2132,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
2132
2132
  })
2133
2133
  }, null, 12, _hoisted_7$1)) : createCommentVNode("", true)
2134
2134
  ], 64)) : createCommentVNode("", true)
2135
- ], 12, _hoisted_1$8);
2135
+ ], 12, _hoisted_1$9);
2136
2136
  };
2137
2137
  }
2138
2138
  });
2139
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
2139
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
2140
2140
  __name: "line-preview",
2141
2141
  props: {
2142
2142
  data: {},
@@ -2145,14 +2145,14 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2145
2145
  },
2146
2146
  setup(__props) {
2147
2147
  return (_ctx, _cache) => {
2148
- return openBlock(), createBlock(_sfc_main$C, mergeProps({
2148
+ return openBlock(), createBlock(_sfc_main$D, mergeProps({
2149
2149
  isSelected: false,
2150
2150
  scale: __props.scale
2151
2151
  }, __props.data), null, 16, ["scale"]);
2152
2152
  };
2153
2153
  }
2154
2154
  });
2155
- const _hoisted_1$7 = ["width", "height", "viewBox"];
2155
+ const _hoisted_1$8 = ["width", "height", "viewBox"];
2156
2156
  const _hoisted_2$4 = ["d", "stroke-width"];
2157
2157
  const _hoisted_3$4 = ["d", "transform", "stroke-width"];
2158
2158
  const _hoisted_4$3 = ["d", "transform", "stroke-width"];
@@ -2160,7 +2160,7 @@ const _hoisted_5$2 = ["d", "opacity"];
2160
2160
  const _hoisted_6$1 = ["d", "transform", "stroke", "fill"];
2161
2161
  const _hoisted_7 = ["d", "transform", "stroke", "fill"];
2162
2162
  const __default__$9 = { inheritAttrs: false };
2163
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
2163
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2164
2164
  ...__default__$9,
2165
2165
  __name: "polyline",
2166
2166
  props: {
@@ -2329,11 +2329,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
2329
2329
  })
2330
2330
  }, null, 12, _hoisted_7)) : createCommentVNode("", true)
2331
2331
  ], 64)) : createCommentVNode("", true)
2332
- ], 12, _hoisted_1$7);
2332
+ ], 12, _hoisted_1$8);
2333
2333
  };
2334
2334
  }
2335
2335
  });
2336
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
2336
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
2337
2337
  __name: "polyline-preview",
2338
2338
  props: {
2339
2339
  data: {},
@@ -2342,21 +2342,21 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2342
2342
  },
2343
2343
  setup(__props) {
2344
2344
  return (_ctx, _cache) => {
2345
- return openBlock(), createBlock(_sfc_main$A, mergeProps({
2345
+ return openBlock(), createBlock(_sfc_main$B, mergeProps({
2346
2346
  isSelected: false,
2347
2347
  scale: __props.scale
2348
2348
  }, __props.data), null, 16, ["scale"]);
2349
2349
  };
2350
2350
  }
2351
2351
  });
2352
- const _hoisted_1$6 = ["width", "height", "viewBox"];
2352
+ const _hoisted_1$7 = ["width", "height", "viewBox"];
2353
2353
  const _hoisted_2$3 = ["d", "stroke-width"];
2354
2354
  const _hoisted_3$3 = ["d", "opacity"];
2355
2355
  const _hoisted_4$2 = ["d", "opacity"];
2356
2356
  const _hoisted_5$1 = ["d"];
2357
2357
  const _hoisted_6 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"];
2358
2358
  const __default__$8 = { inheritAttrs: false };
2359
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
2359
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2360
2360
  ...__default__$8,
2361
2361
  __name: "polygon",
2362
2362
  props: {
@@ -2493,11 +2493,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
2493
2493
  }, null, 8, _hoisted_6)) : createCommentVNode("", true)
2494
2494
  ], 64))
2495
2495
  ], 64)) : createCommentVNode("", true)
2496
- ], 12, _hoisted_1$6);
2496
+ ], 12, _hoisted_1$7);
2497
2497
  };
2498
2498
  }
2499
2499
  });
2500
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
2500
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
2501
2501
  __name: "polygon-preview",
2502
2502
  props: {
2503
2503
  data: {},
@@ -2506,14 +2506,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2506
2506
  },
2507
2507
  setup(__props) {
2508
2508
  return (_ctx, _cache) => {
2509
- return openBlock(), createBlock(_sfc_main$y, mergeProps({
2509
+ return openBlock(), createBlock(_sfc_main$z, mergeProps({
2510
2510
  isSelected: false,
2511
2511
  scale: __props.scale
2512
2512
  }, __props.data), null, 16, ["scale"]);
2513
2513
  };
2514
2514
  }
2515
2515
  });
2516
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
2516
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2517
2517
  __name: "free-text-preview",
2518
2518
  props: {
2519
2519
  data: {},
@@ -2535,6 +2535,34 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2535
2535
  };
2536
2536
  }
2537
2537
  });
2538
+ const _hoisted_1$6 = ["src"];
2539
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2540
+ __name: "stamp-preview",
2541
+ props: {
2542
+ data: {},
2543
+ bounds: {},
2544
+ scale: {}
2545
+ },
2546
+ setup(__props) {
2547
+ const props = __props;
2548
+ const rotationDeg = computed(() => (4 - props.data.pageRotation) % 4 * 90);
2549
+ const style = computed(() => ({
2550
+ width: "100%",
2551
+ height: "100%",
2552
+ opacity: 0.6,
2553
+ objectFit: "contain",
2554
+ pointerEvents: "none",
2555
+ transform: rotationDeg.value ? `rotate(${rotationDeg.value}deg)` : void 0
2556
+ }));
2557
+ return (_ctx, _cache) => {
2558
+ return openBlock(), createElementBlock("img", {
2559
+ src: __props.data.ghostUrl,
2560
+ style: normalizeStyle(style.value),
2561
+ alt: ""
2562
+ }, null, 12, _hoisted_1$6);
2563
+ };
2564
+ }
2565
+ });
2538
2566
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
2539
2567
  __name: "ink-renderer",
2540
2568
  props: {
@@ -2550,7 +2578,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2550
2578
  },
2551
2579
  setup(__props) {
2552
2580
  return (_ctx, _cache) => {
2553
- return openBlock(), createBlock(_sfc_main$I, mergeProps(__props.currentObject, {
2581
+ return openBlock(), createBlock(_sfc_main$J, mergeProps(__props.currentObject, {
2554
2582
  isSelected: __props.isSelected,
2555
2583
  scale: __props.scale,
2556
2584
  onClick: __props.onClick,
@@ -2574,7 +2602,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2574
2602
  },
2575
2603
  setup(__props) {
2576
2604
  return (_ctx, _cache) => {
2577
- return openBlock(), createBlock(_sfc_main$G, mergeProps(__props.currentObject, {
2605
+ return openBlock(), createBlock(_sfc_main$H, mergeProps(__props.currentObject, {
2578
2606
  isSelected: __props.isSelected,
2579
2607
  scale: __props.scale,
2580
2608
  onClick: __props.onClick,
@@ -2598,7 +2626,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2598
2626
  },
2599
2627
  setup(__props) {
2600
2628
  return (_ctx, _cache) => {
2601
- return openBlock(), createBlock(_sfc_main$E, mergeProps(__props.currentObject, {
2629
+ return openBlock(), createBlock(_sfc_main$F, mergeProps(__props.currentObject, {
2602
2630
  isSelected: __props.isSelected,
2603
2631
  scale: __props.scale,
2604
2632
  onClick: __props.onClick,
@@ -2622,7 +2650,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2622
2650
  },
2623
2651
  setup(__props) {
2624
2652
  return (_ctx, _cache) => {
2625
- return openBlock(), createBlock(_sfc_main$C, mergeProps(__props.currentObject, {
2653
+ return openBlock(), createBlock(_sfc_main$D, mergeProps(__props.currentObject, {
2626
2654
  isSelected: __props.isSelected,
2627
2655
  scale: __props.scale,
2628
2656
  onClick: __props.onClick,
@@ -2646,7 +2674,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2646
2674
  },
2647
2675
  setup(__props) {
2648
2676
  return (_ctx, _cache) => {
2649
- return openBlock(), createBlock(_sfc_main$A, mergeProps(__props.currentObject, {
2677
+ return openBlock(), createBlock(_sfc_main$B, mergeProps(__props.currentObject, {
2650
2678
  isSelected: __props.isSelected,
2651
2679
  scale: __props.scale,
2652
2680
  onClick: __props.onClick,
@@ -2670,7 +2698,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2670
2698
  },
2671
2699
  setup(__props) {
2672
2700
  return (_ctx, _cache) => {
2673
- return openBlock(), createBlock(_sfc_main$y, mergeProps(__props.currentObject, {
2701
+ return openBlock(), createBlock(_sfc_main$z, mergeProps(__props.currentObject, {
2674
2702
  isSelected: __props.isSelected,
2675
2703
  scale: __props.scale,
2676
2704
  onClick: __props.onClick,
@@ -3608,7 +3636,7 @@ const builtInRenderers = [
3608
3636
  matches: (a) => a.type === PdfAnnotationSubtype.INK,
3609
3637
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.INK,
3610
3638
  component: _sfc_main$v,
3611
- renderPreview: _sfc_main$H,
3639
+ renderPreview: _sfc_main$I,
3612
3640
  previewContainerStyle: ({ data }) => ({
3613
3641
  mixBlendMode: blendModeToCss(data.blendMode ?? PdfBlendMode.Normal)
3614
3642
  }),
@@ -3619,7 +3647,7 @@ const builtInRenderers = [
3619
3647
  matches: (a) => a.type === PdfAnnotationSubtype.SQUARE,
3620
3648
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.SQUARE,
3621
3649
  component: _sfc_main$u,
3622
- renderPreview: _sfc_main$F,
3650
+ renderPreview: _sfc_main$G,
3623
3651
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3624
3652
  }),
3625
3653
  createRenderer({
@@ -3627,7 +3655,7 @@ const builtInRenderers = [
3627
3655
  matches: (a) => a.type === PdfAnnotationSubtype.CIRCLE,
3628
3656
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.CIRCLE,
3629
3657
  component: _sfc_main$t,
3630
- renderPreview: _sfc_main$D,
3658
+ renderPreview: _sfc_main$E,
3631
3659
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3632
3660
  }),
3633
3661
  createRenderer({
@@ -3635,7 +3663,7 @@ const builtInRenderers = [
3635
3663
  matches: (a) => a.type === PdfAnnotationSubtype.LINE,
3636
3664
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.LINE,
3637
3665
  component: _sfc_main$s,
3638
- renderPreview: _sfc_main$B,
3666
+ renderPreview: _sfc_main$C,
3639
3667
  vertexConfig: {
3640
3668
  extractVertices: (a) => [a.linePoints.start, a.linePoints.end],
3641
3669
  transformAnnotation: (a, v) => ({
@@ -3650,7 +3678,7 @@ const builtInRenderers = [
3650
3678
  matches: (a) => a.type === PdfAnnotationSubtype.POLYLINE,
3651
3679
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.POLYLINE,
3652
3680
  component: _sfc_main$r,
3653
- renderPreview: _sfc_main$z,
3681
+ renderPreview: _sfc_main$A,
3654
3682
  vertexConfig: {
3655
3683
  extractVertices: (a) => a.vertices,
3656
3684
  transformAnnotation: (a, vertices) => ({ ...a, vertices })
@@ -3662,7 +3690,7 @@ const builtInRenderers = [
3662
3690
  matches: (a) => a.type === PdfAnnotationSubtype.POLYGON,
3663
3691
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.POLYGON,
3664
3692
  component: _sfc_main$q,
3665
- renderPreview: _sfc_main$x,
3693
+ renderPreview: _sfc_main$y,
3666
3694
  vertexConfig: {
3667
3695
  extractVertices: (a) => a.vertices,
3668
3696
  transformAnnotation: (a, vertices) => ({ ...a, vertices })
@@ -3715,7 +3743,7 @@ const builtInRenderers = [
3715
3743
  matches: (a) => a.type === PdfAnnotationSubtype.FREETEXT,
3716
3744
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.FREETEXT,
3717
3745
  component: _sfc_main$o,
3718
- renderPreview: _sfc_main$w,
3746
+ renderPreview: _sfc_main$x,
3719
3747
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true },
3720
3748
  isDraggable: (toolDraggable, { isEditing }) => toolDraggable && !isEditing,
3721
3749
  onDoubleClick: (id, setEditingId) => setEditingId(id)
@@ -3723,7 +3751,9 @@ const builtInRenderers = [
3723
3751
  createRenderer({
3724
3752
  id: "stamp",
3725
3753
  matches: (a) => a.type === PdfAnnotationSubtype.STAMP,
3754
+ matchesPreview: (p) => p.type === PdfAnnotationSubtype.STAMP,
3726
3755
  component: _sfc_main$l,
3756
+ renderPreview: _sfc_main$w,
3727
3757
  useAppearanceStream: false,
3728
3758
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3729
3759
  }),
@@ -3732,7 +3762,7 @@ const builtInRenderers = [
3732
3762
  matches: (a) => a.type === PdfAnnotationSubtype.LINK,
3733
3763
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.LINK,
3734
3764
  component: _sfc_main$j,
3735
- renderPreview: _sfc_main$J,
3765
+ renderPreview: _sfc_main$K,
3736
3766
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: false },
3737
3767
  useAppearanceStream: false,
3738
3768
  selectOverride: (e, annotation, helpers) => {
@@ -3750,7 +3780,7 @@ const builtInRenderers = [
3750
3780
  helpers.selectAnnotation(helpers.pageIndex, annotation.object.id);
3751
3781
  },
3752
3782
  hideSelectionMenu: (a) => !!a.inReplyToId,
3753
- renderLocked: _sfc_main$K
3783
+ renderLocked: _sfc_main$L
3754
3784
  })
3755
3785
  ];
3756
3786
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
@@ -4082,7 +4112,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4082
4112
  return openBlock(), createElementBlock(Fragment, null, [
4083
4113
  (openBlock(true), createElementBlock(Fragment, null, renderList(resolvedAnnotations.value, ({ annotation, renderer, locked }) => {
4084
4114
  var _a;
4085
- return openBlock(), createBlock(_sfc_main$M, mergeProps({
4115
+ return openBlock(), createBlock(_sfc_main$N, mergeProps({
4086
4116
  key: annotation.object.id,
4087
4117
  trackedAnnotation: annotation,
4088
4118
  isSelected: locked ? false : allSelectedIds.value.includes(annotation.object.id),
@@ -4134,7 +4164,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4134
4164
  } : void 0
4135
4165
  ]), 1040, ["trackedAnnotation", "isSelected", "isEditing", "isMultiSelected", "isDraggable", "isResizable", "lockAspectRatio", "isRotatable", "vertexConfig", "selectionMenu", "onSelect", "onDoubleClick", "zIndex", "blendMode", "style", "appearance"]);
4136
4166
  }), 128)),
4137
- allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$L, {
4167
+ allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$M, {
4138
4168
  key: 0,
4139
4169
  documentId: __props.documentId,
4140
4170
  pageIndex: __props.pageIndex,
@@ -4311,7 +4341,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4311
4341
  const { plugin: annotationPlugin } = useAnnotationPlugin();
4312
4342
  const previews = ref(/* @__PURE__ */ new Map());
4313
4343
  const fileInputRef = ref(null);
4314
- const canvasRef = ref(null);
4315
4344
  const services = computed(() => ({
4316
4345
  requestFile: ({ accept, onFile }) => {
4317
4346
  const input = fileInputRef.value;
@@ -4326,29 +4355,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4326
4355
  }
4327
4356
  };
4328
4357
  input.click();
4329
- },
4330
- processImage: ({ source, maxWidth, maxHeight, onComplete }) => {
4331
- const canvas = canvasRef.value;
4332
- if (!canvas || !canvas.getContext) return;
4333
- const ctx = canvas.getContext("2d");
4334
- if (!ctx) return;
4335
- const img = new Image();
4336
- img.crossOrigin = "Anonymous";
4337
- img.onload = () => {
4338
- let { naturalWidth: width, naturalHeight: height } = img;
4339
- const scaleX = maxWidth ? maxWidth / width : 1;
4340
- const scaleY = maxHeight ? maxHeight / height : 1;
4341
- const scaleFactor = Math.min(scaleX, scaleY, 1);
4342
- const finalWidth = width * scaleFactor;
4343
- const finalHeight = height * scaleFactor;
4344
- canvas.width = finalWidth;
4345
- canvas.height = finalHeight;
4346
- ctx.drawImage(img, 0, 0, finalWidth, finalHeight);
4347
- const imageData = ctx.getImageData(0, 0, finalWidth, finalHeight);
4348
- if (typeof source !== "string") URL.revokeObjectURL(img.src);
4349
- onComplete({ imageData, width: finalWidth, height: finalHeight });
4350
- };
4351
- img.src = typeof source === "string" ? source : URL.createObjectURL(source);
4352
4358
  }
4353
4359
  }));
4354
4360
  let unregister;
@@ -4384,11 +4390,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4384
4390
  type: "file",
4385
4391
  style: { "display": "none" }
4386
4392
  }, null, 512),
4387
- createElementVNode("canvas", {
4388
- ref_key: "canvasRef",
4389
- ref: canvasRef,
4390
- style: { "display": "none" }
4391
- }, null, 512),
4392
4393
  (openBlock(true), createElementBlock(Fragment, null, renderList(previews.value.entries(), ([toolId, preview]) => {
4393
4394
  return openBlock(), createBlock(_sfc_main$4, {
4394
4395
  key: toolId,
@@ -4556,24 +4557,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4556
4557
  });
4557
4558
  const AnnotationPluginPackage = createPluginPackage(AnnotationPluginPackage$1).addWrapper(_sfc_main$1).addUtility(_sfc_main).build();
4558
4559
  export {
4559
- _sfc_main$M as AnnotationContainer,
4560
+ _sfc_main$N as AnnotationContainer,
4560
4561
  _sfc_main$2 as AnnotationLayer,
4561
4562
  _sfc_main$3 as AnnotationPaintLayer,
4562
4563
  AnnotationPluginPackage,
4563
4564
  _sfc_main$6 as Annotations,
4564
- _sfc_main$E as Circle,
4565
+ _sfc_main$F as Circle,
4565
4566
  _sfc_main$p as FreeText,
4566
- _sfc_main$L as GroupSelectionBox,
4567
+ _sfc_main$M as GroupSelectionBox,
4567
4568
  _sfc_main$i as Highlight,
4568
- _sfc_main$I as Ink,
4569
- _sfc_main$C as Line,
4569
+ _sfc_main$J as Ink,
4570
+ _sfc_main$D as Line,
4570
4571
  _sfc_main$k as Link,
4571
- _sfc_main$y as Polygon,
4572
- _sfc_main$A as Polyline,
4572
+ _sfc_main$z as Polygon,
4573
+ _sfc_main$B as Polyline,
4573
4574
  _sfc_main$4 as PreviewRenderer,
4574
4575
  _sfc_main$n as RenderAnnotation,
4575
4576
  _sfc_main$1 as RendererRegistryProvider,
4576
- _sfc_main$G as Square,
4577
+ _sfc_main$H as Square,
4577
4578
  _sfc_main$c as Squiggly,
4578
4579
  _sfc_main$m as Stamp,
4579
4580
  _sfc_main$e as Strikeout,