@embedpdf/plugin-annotation 2.12.1 → 2.14.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.
Files changed (41) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +1912 -1456
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/handlers/callout-free-text.handler.d.ts +3 -0
  6. package/dist/lib/handlers/index.d.ts +1 -0
  7. package/dist/lib/handlers/types.d.ts +7 -1
  8. package/dist/lib/patching/index.d.ts +1 -0
  9. package/dist/lib/patching/patch-utils.d.ts +38 -1
  10. package/dist/lib/patching/patches/callout-freetext.patch.d.ts +3 -0
  11. package/dist/lib/patching/patches/index.d.ts +1 -0
  12. package/dist/lib/tools/default-tools.d.ts +35 -0
  13. package/dist/preact/index.cjs +1 -1
  14. package/dist/preact/index.cjs.map +1 -1
  15. package/dist/preact/index.js +395 -14
  16. package/dist/preact/index.js.map +1 -1
  17. package/dist/react/index.cjs +1 -1
  18. package/dist/react/index.cjs.map +1 -1
  19. package/dist/react/index.js +395 -14
  20. package/dist/react/index.js.map +1 -1
  21. package/dist/shared/components/annotations/callout-free-text-preview.d.ts +15 -0
  22. package/dist/shared/components/annotations/callout-free-text.d.ts +15 -0
  23. package/dist/shared-preact/components/annotations/callout-free-text-preview.d.ts +15 -0
  24. package/dist/shared-preact/components/annotations/callout-free-text.d.ts +15 -0
  25. package/dist/shared-react/components/annotations/callout-free-text-preview.d.ts +15 -0
  26. package/dist/shared-react/components/annotations/callout-free-text.d.ts +15 -0
  27. package/dist/svelte/components/annotations/CalloutFreeText.svelte.d.ts +15 -0
  28. package/dist/svelte/components/annotations/CalloutFreeTextPreview.svelte.d.ts +10 -0
  29. package/dist/svelte/components/renderers/CalloutFreeTextRenderer.svelte.d.ts +5 -0
  30. package/dist/svelte/index.cjs +1 -1
  31. package/dist/svelte/index.cjs.map +1 -1
  32. package/dist/svelte/index.js +497 -86
  33. package/dist/svelte/index.js.map +1 -1
  34. package/dist/vue/components/annotations/callout-free-text-preview.vue.d.ts +10 -0
  35. package/dist/vue/components/annotations/callout-free-text.vue.d.ts +25 -0
  36. package/dist/vue/components/renderers/callout-free-text-renderer.vue.d.ts +6 -0
  37. package/dist/vue/index.cjs +1 -1
  38. package/dist/vue/index.cjs.map +1 -1
  39. package/dist/vue/index.js +544 -170
  40. package/dist/vue/index.js.map +1 -1
  41. package/package.json +12 -12
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$f = ["src"];
12
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
11
+ const _hoisted_1$h = ["src"];
12
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
13
13
  __name: "appearance-image",
14
14
  props: {
15
15
  appearance: {},
@@ -52,7 +52,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
52
52
  userSelect: "none",
53
53
  ...__props.style
54
54
  })
55
- }, null, 44, _hoisted_1$f)) : createCommentVNode("", true);
55
+ }, null, 44, _hoisted_1$h)) : createCommentVNode("", true);
56
56
  };
57
57
  }
58
58
  });
@@ -119,13 +119,13 @@ function useIOSZoomPrevention(computedFontPx, active) {
119
119
  return { needsComp, adjustedFontPx, scaleComp, wrapperStyle };
120
120
  });
121
121
  }
122
- const _hoisted_1$e = ["width", "height", "stroke"];
123
- const _hoisted_2$a = ["width", "height", "stroke"];
124
- const __default__$f = {
122
+ const _hoisted_1$g = ["width", "height", "stroke"];
123
+ const _hoisted_2$c = ["width", "height", "stroke"];
124
+ const __default__$g = {
125
125
  inheritAttrs: false
126
126
  };
127
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
128
- ...__default__$f,
127
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
128
+ ...__default__$g,
129
129
  __name: "annotation-container",
130
130
  props: {
131
131
  scale: {},
@@ -689,7 +689,7 @@ const _sfc_main$N = /* @__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$O, {
692
+ ((_a = __props.appearance) == null ? void 0 : _a.normal) ? (openBlock(), createBlock(_sfc_main$R, {
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$N = /* @__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$e))
741
+ ])], 8, _hoisted_1$g))
742
742
  ], 16)
743
743
  ]) : (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, rotationHandleBindings.value, { style: rotationHandleStyle.value }), [
744
744
  (openBlock(), createElementBlock("svg", {
@@ -753,7 +753,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
753
753
  }, [..._cache[3] || (_cache[3] = [
754
754
  createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
755
755
  createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
756
- ])], 8, _hoisted_2$a))
756
+ ])], 8, _hoisted_2$c))
757
757
  ], 16))
758
758
  ], 32)) : createCommentVNode("", true),
759
759
  createElementVNode("div", mergeProps({ ...effectiveIsDraggable.value && __props.isSelected ? unref(dragProps) : {}, ...unref(doubleProps) }, { style: innerRotatedStyle.value }), [
@@ -873,14 +873,14 @@ function getAnnotationScreenBounds(annotation, scale, rotation) {
873
873
  bottom: top + maxY
874
874
  };
875
875
  }
876
- const _hoisted_1$d = {
876
+ const _hoisted_1$f = {
877
877
  key: 0,
878
878
  "data-group-selection-box": "",
879
879
  "data-no-interaction": ""
880
880
  };
881
- const _hoisted_2$9 = ["width", "height", "stroke"];
882
- const _hoisted_3$9 = ["width", "height", "stroke"];
883
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
881
+ const _hoisted_2$b = ["width", "height", "stroke"];
882
+ const _hoisted_3$b = ["width", "height", "stroke"];
883
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
884
884
  __name: "group-selection-box",
885
885
  props: {
886
886
  documentId: {},
@@ -1340,7 +1340,7 @@ const _sfc_main$M = /* @__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$d, [
1343
+ return __props.selectedAnnotations.length >= 2 ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
1344
1344
  createElementVNode("div", {
1345
1345
  style: normalizeStyle(outerStyle.value)
1346
1346
  }, [
@@ -1383,7 +1383,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
1383
1383
  }, [..._cache[2] || (_cache[2] = [
1384
1384
  createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
1385
1385
  createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
1386
- ])], 8, _hoisted_2$9))
1386
+ ])], 8, _hoisted_2$b))
1387
1387
  ], 16)
1388
1388
  ]) : (openBlock(), createElementBlock("div", mergeProps({ key: 2 }, rotationHandleBindings.value, { style: rotationHandleStyle.value }), [
1389
1389
  (openBlock(), createElementBlock("svg", {
@@ -1398,7 +1398,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
1398
1398
  }, [..._cache[3] || (_cache[3] = [
1399
1399
  createElementVNode("path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" }, null, -1),
1400
1400
  createElementVNode("path", { d: "M21 3v5h-5" }, null, -1)
1401
- ])], 8, _hoisted_3$9))
1401
+ ])], 8, _hoisted_3$b))
1402
1402
  ], 16))
1403
1403
  ], 32)) : createCommentVNode("", true),
1404
1404
  createElementVNode("div", mergeProps(
@@ -1507,9 +1507,9 @@ function createRenderer(entry) {
1507
1507
  renderLocked: entry.renderLocked ? markRaw(entry.renderLocked) : void 0
1508
1508
  };
1509
1509
  }
1510
- const __default__$e = { inheritAttrs: false };
1511
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
1512
- ...__default__$e,
1510
+ const __default__$f = { inheritAttrs: false };
1511
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
1512
+ ...__default__$f,
1513
1513
  __name: "link-locked",
1514
1514
  props: {
1515
1515
  annotation: {},
@@ -1543,7 +1543,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1543
1543
  };
1544
1544
  }
1545
1545
  });
1546
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
1546
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
1547
1547
  __name: "link-preview",
1548
1548
  props: {
1549
1549
  data: {},
@@ -1569,12 +1569,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1569
1569
  };
1570
1570
  }
1571
1571
  });
1572
- const _hoisted_1$c = ["width", "height", "viewBox"];
1573
- const _hoisted_2$8 = ["d", "stroke-width"];
1574
- const _hoisted_3$8 = ["d", "opacity"];
1575
- const __default__$d = { inheritAttrs: false };
1576
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
1577
- ...__default__$d,
1572
+ const _hoisted_1$e = ["width", "height", "viewBox"];
1573
+ const _hoisted_2$a = ["d", "stroke-width"];
1574
+ const _hoisted_3$a = ["d", "opacity"];
1575
+ const __default__$e = { inheritAttrs: false };
1576
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
1577
+ ...__default__$e,
1578
1578
  __name: "ink",
1579
1579
  props: {
1580
1580
  isSelected: { type: Boolean },
@@ -1636,7 +1636,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1636
1636
  strokeLinecap: "round",
1637
1637
  strokeLinejoin: "round"
1638
1638
  })
1639
- }, null, 44, _hoisted_2$8);
1639
+ }, null, 44, _hoisted_2$a);
1640
1640
  }), 128)),
1641
1641
  !__props.appearanceActive ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(paths.value, (d, i) => {
1642
1642
  return openBlock(), createElementBlock("path", {
@@ -1651,13 +1651,13 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1651
1651
  strokeLinecap: "round",
1652
1652
  strokeLinejoin: "round"
1653
1653
  })
1654
- }, null, 12, _hoisted_3$8);
1654
+ }, null, 12, _hoisted_3$a);
1655
1655
  }), 128)) : createCommentVNode("", true)
1656
- ], 12, _hoisted_1$c);
1656
+ ], 12, _hoisted_1$e);
1657
1657
  };
1658
1658
  }
1659
1659
  });
1660
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
1660
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1661
1661
  __name: "ink-preview",
1662
1662
  props: {
1663
1663
  data: {},
@@ -1666,21 +1666,21 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1666
1666
  },
1667
1667
  setup(__props) {
1668
1668
  return (_ctx, _cache) => {
1669
- return openBlock(), createBlock(_sfc_main$J, mergeProps({
1669
+ return openBlock(), createBlock(_sfc_main$M, 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$b = ["width", "height", "viewBox"];
1677
- const _hoisted_2$7 = ["d", "stroke-width"];
1678
- const _hoisted_3$7 = ["x", "y", "width", "height", "stroke-width"];
1679
- const _hoisted_4$6 = ["d", "fill", "opacity"];
1680
- const _hoisted_5$5 = ["x", "y", "width", "height", "fill", "opacity"];
1681
- const __default__$c = { inheritAttrs: false };
1682
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
1683
- ...__default__$c,
1676
+ const _hoisted_1$d = ["width", "height", "viewBox"];
1677
+ const _hoisted_2$9 = ["d", "stroke-width"];
1678
+ const _hoisted_3$9 = ["x", "y", "width", "height", "stroke-width"];
1679
+ const _hoisted_4$8 = ["d", "fill", "opacity"];
1680
+ const _hoisted_5$6 = ["x", "y", "width", "height", "fill", "opacity"];
1681
+ const __default__$d = { inheritAttrs: false };
1682
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1683
+ ...__default__$d,
1684
1684
  __name: "square",
1685
1685
  props: {
1686
1686
  isSelected: { type: Boolean },
@@ -1754,7 +1754,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1754
1754
  cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
1755
1755
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
1756
1756
  })
1757
- }, null, 44, _hoisted_2$7)) : (openBlock(), createElementBlock("rect", {
1757
+ }, null, 44, _hoisted_2$9)) : (openBlock(), createElementBlock("rect", {
1758
1758
  key: 1,
1759
1759
  x: geometry.value.x,
1760
1760
  y: geometry.value.y,
@@ -1769,7 +1769,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1769
1769
  cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
1770
1770
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
1771
1771
  })
1772
- }, null, 44, _hoisted_3$7)),
1772
+ }, null, 44, _hoisted_3$9)),
1773
1773
  !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1774
1774
  isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
1775
1775
  key: 0,
@@ -1782,7 +1782,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1782
1782
  strokeWidth: __props.strokeWidth,
1783
1783
  strokeLinejoin: "round"
1784
1784
  })
1785
- }, null, 12, _hoisted_4$6)) : (openBlock(), createElementBlock("rect", {
1785
+ }, null, 12, _hoisted_4$8)) : (openBlock(), createElementBlock("rect", {
1786
1786
  key: 1,
1787
1787
  x: geometry.value.x,
1788
1788
  y: geometry.value.y,
@@ -1798,13 +1798,13 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1798
1798
  strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
1799
1799
  }
1800
1800
  })
1801
- }, null, 12, _hoisted_5$5))
1801
+ }, null, 12, _hoisted_5$6))
1802
1802
  ], 64)) : createCommentVNode("", true)
1803
- ], 12, _hoisted_1$b);
1803
+ ], 12, _hoisted_1$d);
1804
1804
  };
1805
1805
  }
1806
1806
  });
1807
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
1807
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1808
1808
  __name: "square-preview",
1809
1809
  props: {
1810
1810
  data: {},
@@ -1813,21 +1813,21 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1813
1813
  },
1814
1814
  setup(__props) {
1815
1815
  return (_ctx, _cache) => {
1816
- return openBlock(), createBlock(_sfc_main$H, mergeProps({
1816
+ return openBlock(), createBlock(_sfc_main$K, 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$a = ["width", "height", "viewBox"];
1824
- const _hoisted_2$6 = ["d", "stroke-width"];
1825
- const _hoisted_3$6 = ["cx", "cy", "rx", "ry", "stroke-width"];
1826
- const _hoisted_4$5 = ["d", "fill", "opacity"];
1827
- const _hoisted_5$4 = ["cx", "cy", "rx", "ry", "fill", "opacity"];
1828
- const __default__$b = { inheritAttrs: false };
1829
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
1830
- ...__default__$b,
1823
+ const _hoisted_1$c = ["width", "height", "viewBox"];
1824
+ const _hoisted_2$8 = ["d", "stroke-width"];
1825
+ const _hoisted_3$8 = ["cx", "cy", "rx", "ry", "stroke-width"];
1826
+ const _hoisted_4$7 = ["d", "fill", "opacity"];
1827
+ const _hoisted_5$5 = ["cx", "cy", "rx", "ry", "fill", "opacity"];
1828
+ const __default__$c = { inheritAttrs: false };
1829
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1830
+ ...__default__$c,
1831
1831
  __name: "circle",
1832
1832
  props: {
1833
1833
  isSelected: { type: Boolean },
@@ -1903,7 +1903,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1903
1903
  cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
1904
1904
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
1905
1905
  })
1906
- }, null, 44, _hoisted_2$6)) : (openBlock(), createElementBlock("ellipse", {
1906
+ }, null, 44, _hoisted_2$8)) : (openBlock(), createElementBlock("ellipse", {
1907
1907
  key: 1,
1908
1908
  cx: geometry.value.cx,
1909
1909
  cy: geometry.value.cy,
@@ -1918,7 +1918,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1918
1918
  cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
1919
1919
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : __props.color === "transparent" ? "visibleStroke" : "visible"
1920
1920
  })
1921
- }, null, 44, _hoisted_3$6)),
1921
+ }, null, 44, _hoisted_3$8)),
1922
1922
  !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1923
1923
  isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
1924
1924
  key: 0,
@@ -1931,7 +1931,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1931
1931
  strokeWidth: __props.strokeWidth,
1932
1932
  strokeLinejoin: "round"
1933
1933
  })
1934
- }, null, 12, _hoisted_4$5)) : (openBlock(), createElementBlock("ellipse", {
1934
+ }, null, 12, _hoisted_4$7)) : (openBlock(), createElementBlock("ellipse", {
1935
1935
  key: 1,
1936
1936
  cx: geometry.value.cx,
1937
1937
  cy: geometry.value.cy,
@@ -1947,13 +1947,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1947
1947
  strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
1948
1948
  }
1949
1949
  })
1950
- }, null, 12, _hoisted_5$4))
1950
+ }, null, 12, _hoisted_5$5))
1951
1951
  ], 64)) : createCommentVNode("", true)
1952
- ], 12, _hoisted_1$a);
1952
+ ], 12, _hoisted_1$c);
1953
1953
  };
1954
1954
  }
1955
1955
  });
1956
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
1956
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1957
1957
  __name: "circle-preview",
1958
1958
  props: {
1959
1959
  data: {},
@@ -1962,23 +1962,23 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1962
1962
  },
1963
1963
  setup(__props) {
1964
1964
  return (_ctx, _cache) => {
1965
- return openBlock(), createBlock(_sfc_main$F, mergeProps({
1965
+ return openBlock(), createBlock(_sfc_main$I, 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$9 = ["width", "height", "viewBox"];
1973
- const _hoisted_2$5 = ["x1", "y1", "x2", "y2", "stroke-width"];
1974
- const _hoisted_3$5 = ["d", "transform", "stroke-width"];
1975
- const _hoisted_4$4 = ["d", "transform", "stroke-width"];
1976
- const _hoisted_5$3 = ["x1", "y1", "x2", "y2", "opacity"];
1977
- const _hoisted_6$2 = ["d", "transform", "stroke", "fill"];
1978
- const _hoisted_7$1 = ["d", "transform", "stroke", "fill"];
1979
- const __default__$a = { inheritAttrs: false };
1980
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
1981
- ...__default__$a,
1972
+ const _hoisted_1$b = ["width", "height", "viewBox"];
1973
+ const _hoisted_2$7 = ["x1", "y1", "x2", "y2", "stroke-width"];
1974
+ const _hoisted_3$7 = ["d", "transform", "stroke-width"];
1975
+ const _hoisted_4$6 = ["d", "transform", "stroke-width"];
1976
+ const _hoisted_5$4 = ["x1", "y1", "x2", "y2", "opacity"];
1977
+ const _hoisted_6$3 = ["d", "transform", "stroke", "fill"];
1978
+ const _hoisted_7$2 = ["d", "transform", "stroke", "fill"];
1979
+ const __default__$b = { inheritAttrs: false };
1980
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1981
+ ...__default__$b,
1982
1982
  __name: "line",
1983
1983
  props: {
1984
1984
  color: { default: "transparent" },
@@ -2053,7 +2053,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2053
2053
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : "visibleStroke",
2054
2054
  strokeLinecap: "butt"
2055
2055
  })
2056
- }, null, 44, _hoisted_2$5),
2056
+ }, null, 44, _hoisted_2$7),
2057
2057
  endings.value.start ? (openBlock(), createElementBlock("path", {
2058
2058
  key: 0,
2059
2059
  d: endings.value.start.d,
@@ -2068,7 +2068,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2068
2068
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : endings.value.start.filled ? "visible" : "visibleStroke",
2069
2069
  strokeLinecap: "butt"
2070
2070
  })
2071
- }, null, 44, _hoisted_3$5)) : createCommentVNode("", true),
2071
+ }, null, 44, _hoisted_3$7)) : createCommentVNode("", true),
2072
2072
  endings.value.end ? (openBlock(), createElementBlock("path", {
2073
2073
  key: 1,
2074
2074
  d: endings.value.end.d,
@@ -2083,7 +2083,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2083
2083
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : endings.value.end.filled ? "visible" : "visibleStroke",
2084
2084
  strokeLinecap: "butt"
2085
2085
  })
2086
- }, null, 44, _hoisted_4$4)) : createCommentVNode("", true),
2086
+ }, null, 44, _hoisted_4$6)) : createCommentVNode("", true),
2087
2087
  !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
2088
2088
  createElementVNode("line", {
2089
2089
  x1: localLine.value.x1,
@@ -2100,7 +2100,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2100
2100
  strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
2101
2101
  }
2102
2102
  })
2103
- }, null, 12, _hoisted_5$3),
2103
+ }, null, 12, _hoisted_5$4),
2104
2104
  endings.value.start ? (openBlock(), createElementBlock("path", {
2105
2105
  key: 0,
2106
2106
  d: endings.value.start.d,
@@ -2115,7 +2115,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2115
2115
  strokeDasharray: (_b = __props.strokeDashArray) == null ? void 0 : _b.join(",")
2116
2116
  }
2117
2117
  })
2118
- }, null, 12, _hoisted_6$2)) : createCommentVNode("", true),
2118
+ }, null, 12, _hoisted_6$3)) : createCommentVNode("", true),
2119
2119
  endings.value.end ? (openBlock(), createElementBlock("path", {
2120
2120
  key: 1,
2121
2121
  d: endings.value.end.d,
@@ -2130,13 +2130,13 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2130
2130
  strokeDasharray: (_c = __props.strokeDashArray) == null ? void 0 : _c.join(",")
2131
2131
  }
2132
2132
  })
2133
- }, null, 12, _hoisted_7$1)) : createCommentVNode("", true)
2133
+ }, null, 12, _hoisted_7$2)) : createCommentVNode("", true)
2134
2134
  ], 64)) : createCommentVNode("", true)
2135
- ], 12, _hoisted_1$9);
2135
+ ], 12, _hoisted_1$b);
2136
2136
  };
2137
2137
  }
2138
2138
  });
2139
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
2139
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
2140
2140
  __name: "line-preview",
2141
2141
  props: {
2142
2142
  data: {},
@@ -2145,23 +2145,23 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
2145
2145
  },
2146
2146
  setup(__props) {
2147
2147
  return (_ctx, _cache) => {
2148
- return openBlock(), createBlock(_sfc_main$D, mergeProps({
2148
+ return openBlock(), createBlock(_sfc_main$G, 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$8 = ["width", "height", "viewBox"];
2156
- const _hoisted_2$4 = ["d", "stroke-width"];
2157
- const _hoisted_3$4 = ["d", "transform", "stroke-width"];
2158
- const _hoisted_4$3 = ["d", "transform", "stroke-width"];
2159
- const _hoisted_5$2 = ["d", "opacity"];
2160
- const _hoisted_6$1 = ["d", "transform", "stroke", "fill"];
2161
- const _hoisted_7 = ["d", "transform", "stroke", "fill"];
2162
- const __default__$9 = { inheritAttrs: false };
2163
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
2164
- ...__default__$9,
2155
+ const _hoisted_1$a = ["width", "height", "viewBox"];
2156
+ const _hoisted_2$6 = ["d", "stroke-width"];
2157
+ const _hoisted_3$6 = ["d", "transform", "stroke-width"];
2158
+ const _hoisted_4$5 = ["d", "transform", "stroke-width"];
2159
+ const _hoisted_5$3 = ["d", "opacity"];
2160
+ const _hoisted_6$2 = ["d", "transform", "stroke", "fill"];
2161
+ const _hoisted_7$1 = ["d", "transform", "stroke", "fill"];
2162
+ const __default__$a = { inheritAttrs: false };
2163
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
2164
+ ...__default__$a,
2165
2165
  __name: "polyline",
2166
2166
  props: {
2167
2167
  rect: {},
@@ -2251,7 +2251,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2251
2251
  strokeLinecap: "butt",
2252
2252
  strokeLinejoin: "miter"
2253
2253
  })
2254
- }, null, 44, _hoisted_2$4),
2254
+ }, null, 44, _hoisted_2$6),
2255
2255
  endings.value.start ? (openBlock(), createElementBlock("path", {
2256
2256
  key: 0,
2257
2257
  d: endings.value.start.d,
@@ -2266,7 +2266,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2266
2266
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : endings.value.start.filled ? "visible" : "visibleStroke",
2267
2267
  strokeLinecap: "butt"
2268
2268
  })
2269
- }, null, 44, _hoisted_3$4)) : createCommentVNode("", true),
2269
+ }, null, 44, _hoisted_3$6)) : createCommentVNode("", true),
2270
2270
  endings.value.end ? (openBlock(), createElementBlock("path", {
2271
2271
  key: 1,
2272
2272
  d: endings.value.end.d,
@@ -2281,7 +2281,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2281
2281
  pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : endings.value.end.filled ? "visible" : "visibleStroke",
2282
2282
  strokeLinecap: "butt"
2283
2283
  })
2284
- }, null, 44, _hoisted_4$3)) : createCommentVNode("", true),
2284
+ }, null, 44, _hoisted_4$5)) : createCommentVNode("", true),
2285
2285
  !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
2286
2286
  createElementVNode("path", {
2287
2287
  d: pathData.value,
@@ -2297,7 +2297,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2297
2297
  strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
2298
2298
  }
2299
2299
  })
2300
- }, null, 12, _hoisted_5$2),
2300
+ }, null, 12, _hoisted_5$3),
2301
2301
  endings.value.start ? (openBlock(), createElementBlock("path", {
2302
2302
  key: 0,
2303
2303
  d: endings.value.start.d,
@@ -2312,7 +2312,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2312
2312
  strokeDasharray: (_b = __props.strokeDashArray) == null ? void 0 : _b.join(",")
2313
2313
  }
2314
2314
  })
2315
- }, null, 12, _hoisted_6$1)) : createCommentVNode("", true),
2315
+ }, null, 12, _hoisted_6$2)) : createCommentVNode("", true),
2316
2316
  endings.value.end ? (openBlock(), createElementBlock("path", {
2317
2317
  key: 1,
2318
2318
  d: endings.value.end.d,
@@ -2327,13 +2327,13 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2327
2327
  strokeDasharray: (_c = __props.strokeDashArray) == null ? void 0 : _c.join(",")
2328
2328
  }
2329
2329
  })
2330
- }, null, 12, _hoisted_7)) : createCommentVNode("", true)
2330
+ }, null, 12, _hoisted_7$1)) : createCommentVNode("", true)
2331
2331
  ], 64)) : createCommentVNode("", true)
2332
- ], 12, _hoisted_1$8);
2332
+ ], 12, _hoisted_1$a);
2333
2333
  };
2334
2334
  }
2335
2335
  });
2336
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
2336
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
2337
2337
  __name: "polyline-preview",
2338
2338
  props: {
2339
2339
  data: {},
@@ -2342,22 +2342,22 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
2342
2342
  },
2343
2343
  setup(__props) {
2344
2344
  return (_ctx, _cache) => {
2345
- return openBlock(), createBlock(_sfc_main$B, mergeProps({
2345
+ return openBlock(), createBlock(_sfc_main$E, 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$7 = ["width", "height", "viewBox"];
2353
- const _hoisted_2$3 = ["d", "stroke-width"];
2354
- const _hoisted_3$3 = ["d", "opacity"];
2355
- const _hoisted_4$2 = ["d", "opacity"];
2356
- const _hoisted_5$1 = ["d"];
2357
- const _hoisted_6 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"];
2358
- const __default__$8 = { inheritAttrs: false };
2359
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
2360
- ...__default__$8,
2352
+ const _hoisted_1$9 = ["width", "height", "viewBox"];
2353
+ const _hoisted_2$5 = ["d", "stroke-width"];
2354
+ const _hoisted_3$5 = ["d", "opacity"];
2355
+ const _hoisted_4$4 = ["d", "opacity"];
2356
+ const _hoisted_5$2 = ["d"];
2357
+ const _hoisted_6$1 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"];
2358
+ const __default__$9 = { inheritAttrs: false };
2359
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
2360
+ ...__default__$9,
2361
2361
  __name: "polygon",
2362
2362
  props: {
2363
2363
  rect: {},
@@ -2438,7 +2438,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2438
2438
  strokeLinecap: "butt",
2439
2439
  strokeLinejoin: "miter"
2440
2440
  })
2441
- }, null, 44, _hoisted_2$3),
2441
+ }, null, 44, _hoisted_2$5),
2442
2442
  !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2443
2443
  isCloudy.value && cloudyPath.value ? (openBlock(), createElementBlock("path", {
2444
2444
  key: 0,
@@ -2451,7 +2451,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2451
2451
  pointerEvents: "none",
2452
2452
  strokeLinejoin: "round"
2453
2453
  })
2454
- }, null, 12, _hoisted_3$3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2454
+ }, null, 12, _hoisted_3$5)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2455
2455
  createElementVNode("path", {
2456
2456
  d: pathData.value,
2457
2457
  opacity: __props.opacity,
@@ -2466,7 +2466,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2466
2466
  strokeDasharray: (_a = __props.strokeDashArray) == null ? void 0 : _a.join(",")
2467
2467
  }
2468
2468
  })
2469
- }, null, 12, _hoisted_4$2),
2469
+ }, null, 12, _hoisted_4$4),
2470
2470
  isPreviewing.value && localPts.value.length > 1 ? (openBlock(), createElementBlock("path", {
2471
2471
  key: 0,
2472
2472
  d: `M ${localPts.value[localPts.value.length - 1].x} ${localPts.value[localPts.value.length - 1].y} L ${localPts.value[0].x} ${localPts.value[0].y}`,
@@ -2478,7 +2478,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2478
2478
  opacity: 0.7,
2479
2479
  pointerEvents: "none"
2480
2480
  })
2481
- }, null, 12, _hoisted_5$1)) : createCommentVNode("", true),
2481
+ }, null, 12, _hoisted_5$2)) : createCommentVNode("", true),
2482
2482
  isPreviewing.value && localPts.value.length >= 2 ? (openBlock(), createElementBlock("rect", {
2483
2483
  key: 1,
2484
2484
  x: localPts.value[0].x - __props.handleSize / __props.scale / 2,
@@ -2490,14 +2490,14 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2490
2490
  stroke: __props.strokeColor,
2491
2491
  "stroke-width": __props.strokeWidth / 2,
2492
2492
  style: { "pointer-events": "none" }
2493
- }, null, 8, _hoisted_6)) : createCommentVNode("", true)
2493
+ }, null, 8, _hoisted_6$1)) : createCommentVNode("", true)
2494
2494
  ], 64))
2495
2495
  ], 64)) : createCommentVNode("", true)
2496
- ], 12, _hoisted_1$7);
2496
+ ], 12, _hoisted_1$9);
2497
2497
  };
2498
2498
  }
2499
2499
  });
2500
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
2500
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
2501
2501
  __name: "polygon-preview",
2502
2502
  props: {
2503
2503
  data: {},
@@ -2506,14 +2506,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
2506
2506
  },
2507
2507
  setup(__props) {
2508
2508
  return (_ctx, _cache) => {
2509
- return openBlock(), createBlock(_sfc_main$z, mergeProps({
2509
+ return openBlock(), createBlock(_sfc_main$C, 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$x = /* @__PURE__ */ defineComponent({
2516
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
2517
2517
  __name: "free-text-preview",
2518
2518
  props: {
2519
2519
  data: {},
@@ -2535,8 +2535,87 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2535
2535
  };
2536
2536
  }
2537
2537
  });
2538
- const _hoisted_1$6 = ["src"];
2539
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
2538
+ const _hoisted_1$8 = ["width", "height", "viewBox"];
2539
+ const _hoisted_2$4 = ["points", "stroke", "stroke-width", "opacity"];
2540
+ const _hoisted_3$4 = ["d", "transform", "stroke", "fill", "stroke-width", "opacity"];
2541
+ const _hoisted_4$3 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "opacity"];
2542
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
2543
+ __name: "callout-free-text-preview",
2544
+ props: {
2545
+ data: {},
2546
+ bounds: {},
2547
+ scale: {}
2548
+ },
2549
+ setup(__props) {
2550
+ const props = __props;
2551
+ const cl = computed(() => props.data.calloutLine);
2552
+ const sw = computed(() => props.data.strokeWidth ?? 1);
2553
+ const sc = computed(() => props.data.strokeColor ?? "#000000");
2554
+ const op = computed(() => props.data.opacity ?? 1);
2555
+ const w = computed(() => props.bounds.size.width);
2556
+ const h = computed(() => props.bounds.size.height);
2557
+ const ox = computed(() => props.bounds.origin.x);
2558
+ const oy = computed(() => props.bounds.origin.y);
2559
+ const lineCoords = computed(() => {
2560
+ const line = cl.value;
2561
+ if (!line || line.length < 2) return null;
2562
+ return line.map((p) => ({ x: p.x - ox.value, y: p.y - oy.value }));
2563
+ });
2564
+ const ending = computed(() => {
2565
+ const lc = lineCoords.value;
2566
+ if (!lc || lc.length < 2) return null;
2567
+ const angle = Math.atan2(lc[1].y - lc[0].y, lc[1].x - lc[0].x);
2568
+ return patching.createEnding(props.data.lineEnding, sw.value, angle + Math.PI, lc[0].x, lc[0].y);
2569
+ });
2570
+ const halfSw = computed(() => sw.value / 2);
2571
+ const tb = computed(() => props.data.textBox);
2572
+ return (_ctx, _cache) => {
2573
+ return lineCoords.value ? (openBlock(), createElementBlock("svg", {
2574
+ key: 0,
2575
+ style: normalizeStyle({
2576
+ position: "absolute",
2577
+ width: `${w.value * __props.scale}px`,
2578
+ height: `${h.value * __props.scale}px`,
2579
+ pointerEvents: "none",
2580
+ overflow: "visible"
2581
+ }),
2582
+ width: w.value * __props.scale,
2583
+ height: h.value * __props.scale,
2584
+ viewBox: `0 0 ${w.value} ${h.value}`
2585
+ }, [
2586
+ createElementVNode("polyline", {
2587
+ points: lineCoords.value.map((p) => `${p.x},${p.y}`).join(" "),
2588
+ fill: "none",
2589
+ stroke: sc.value,
2590
+ "stroke-width": sw.value,
2591
+ opacity: op.value
2592
+ }, null, 8, _hoisted_2$4),
2593
+ ending.value ? (openBlock(), createElementBlock("path", {
2594
+ key: 0,
2595
+ d: ending.value.d,
2596
+ transform: ending.value.transform,
2597
+ stroke: sc.value,
2598
+ fill: ending.value.filled ? __props.data.color ?? "transparent" : "none",
2599
+ "stroke-width": sw.value,
2600
+ opacity: op.value
2601
+ }, null, 8, _hoisted_3$4)) : createCommentVNode("", true),
2602
+ tb.value ? (openBlock(), createElementBlock("rect", {
2603
+ key: 1,
2604
+ x: tb.value.origin.x - ox.value + halfSw.value,
2605
+ y: tb.value.origin.y - oy.value + halfSw.value,
2606
+ width: tb.value.size.width - sw.value,
2607
+ height: tb.value.size.height - sw.value,
2608
+ fill: __props.data.color ?? __props.data.backgroundColor ?? "transparent",
2609
+ stroke: sc.value,
2610
+ "stroke-width": sw.value,
2611
+ opacity: op.value
2612
+ }, null, 8, _hoisted_4$3)) : createCommentVNode("", true)
2613
+ ], 12, _hoisted_1$8)) : createCommentVNode("", true);
2614
+ };
2615
+ }
2616
+ });
2617
+ const _hoisted_1$7 = ["src"];
2618
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
2540
2619
  __name: "stamp-preview",
2541
2620
  props: {
2542
2621
  data: {},
@@ -2559,11 +2638,11 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2559
2638
  src: __props.data.ghostUrl,
2560
2639
  style: normalizeStyle(style.value),
2561
2640
  alt: ""
2562
- }, null, 12, _hoisted_1$6);
2641
+ }, null, 12, _hoisted_1$7);
2563
2642
  };
2564
2643
  }
2565
2644
  });
2566
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
2645
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
2567
2646
  __name: "ink-renderer",
2568
2647
  props: {
2569
2648
  annotation: {},
@@ -2578,7 +2657,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2578
2657
  },
2579
2658
  setup(__props) {
2580
2659
  return (_ctx, _cache) => {
2581
- return openBlock(), createBlock(_sfc_main$J, mergeProps(__props.currentObject, {
2660
+ return openBlock(), createBlock(_sfc_main$M, mergeProps(__props.currentObject, {
2582
2661
  isSelected: __props.isSelected,
2583
2662
  scale: __props.scale,
2584
2663
  onClick: __props.onClick,
@@ -2587,7 +2666,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2587
2666
  };
2588
2667
  }
2589
2668
  });
2590
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
2669
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
2591
2670
  __name: "square-renderer",
2592
2671
  props: {
2593
2672
  annotation: {},
@@ -2602,7 +2681,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2602
2681
  },
2603
2682
  setup(__props) {
2604
2683
  return (_ctx, _cache) => {
2605
- return openBlock(), createBlock(_sfc_main$H, mergeProps(__props.currentObject, {
2684
+ return openBlock(), createBlock(_sfc_main$K, mergeProps(__props.currentObject, {
2606
2685
  isSelected: __props.isSelected,
2607
2686
  scale: __props.scale,
2608
2687
  onClick: __props.onClick,
@@ -2611,7 +2690,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2611
2690
  };
2612
2691
  }
2613
2692
  });
2614
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
2693
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2615
2694
  __name: "circle-renderer",
2616
2695
  props: {
2617
2696
  annotation: {},
@@ -2626,7 +2705,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2626
2705
  },
2627
2706
  setup(__props) {
2628
2707
  return (_ctx, _cache) => {
2629
- return openBlock(), createBlock(_sfc_main$F, mergeProps(__props.currentObject, {
2708
+ return openBlock(), createBlock(_sfc_main$I, mergeProps(__props.currentObject, {
2630
2709
  isSelected: __props.isSelected,
2631
2710
  scale: __props.scale,
2632
2711
  onClick: __props.onClick,
@@ -2635,7 +2714,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2635
2714
  };
2636
2715
  }
2637
2716
  });
2638
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
2717
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2639
2718
  __name: "line-renderer",
2640
2719
  props: {
2641
2720
  annotation: {},
@@ -2650,7 +2729,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2650
2729
  },
2651
2730
  setup(__props) {
2652
2731
  return (_ctx, _cache) => {
2653
- return openBlock(), createBlock(_sfc_main$D, mergeProps(__props.currentObject, {
2732
+ return openBlock(), createBlock(_sfc_main$G, mergeProps(__props.currentObject, {
2654
2733
  isSelected: __props.isSelected,
2655
2734
  scale: __props.scale,
2656
2735
  onClick: __props.onClick,
@@ -2659,7 +2738,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2659
2738
  };
2660
2739
  }
2661
2740
  });
2662
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
2741
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2663
2742
  __name: "polyline-renderer",
2664
2743
  props: {
2665
2744
  annotation: {},
@@ -2674,7 +2753,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2674
2753
  },
2675
2754
  setup(__props) {
2676
2755
  return (_ctx, _cache) => {
2677
- return openBlock(), createBlock(_sfc_main$B, mergeProps(__props.currentObject, {
2756
+ return openBlock(), createBlock(_sfc_main$E, mergeProps(__props.currentObject, {
2678
2757
  isSelected: __props.isSelected,
2679
2758
  scale: __props.scale,
2680
2759
  onClick: __props.onClick,
@@ -2683,7 +2762,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2683
2762
  };
2684
2763
  }
2685
2764
  });
2686
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
2765
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2687
2766
  __name: "polygon-renderer",
2688
2767
  props: {
2689
2768
  annotation: {},
@@ -2698,7 +2777,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2698
2777
  },
2699
2778
  setup(__props) {
2700
2779
  return (_ctx, _cache) => {
2701
- return openBlock(), createBlock(_sfc_main$z, mergeProps(__props.currentObject, {
2780
+ return openBlock(), createBlock(_sfc_main$C, mergeProps(__props.currentObject, {
2702
2781
  isSelected: __props.isSelected,
2703
2782
  scale: __props.scale,
2704
2783
  onClick: __props.onClick,
@@ -2707,10 +2786,10 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2707
2786
  };
2708
2787
  }
2709
2788
  });
2710
- const _hoisted_1$5 = ["contenteditable"];
2711
- const __default__$7 = { inheritAttrs: false };
2712
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
2713
- ...__default__$7,
2789
+ const _hoisted_1$6 = ["contenteditable"];
2790
+ const __default__$8 = { inheritAttrs: false };
2791
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2792
+ ...__default__$8,
2714
2793
  __name: "free-text",
2715
2794
  props: {
2716
2795
  documentId: {},
@@ -2815,12 +2894,12 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
2815
2894
  tabindex: "0",
2816
2895
  style: normalizeStyle(editorStyle.value),
2817
2896
  contenteditable: __props.isEditing
2818
- }, toDisplayString(__props.annotation.object.contents), 45, _hoisted_1$5)
2897
+ }, toDisplayString(__props.annotation.object.contents), 45, _hoisted_1$6)
2819
2898
  ], 36);
2820
2899
  };
2821
2900
  }
2822
2901
  });
2823
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
2902
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2824
2903
  __name: "free-text-renderer",
2825
2904
  props: {
2826
2905
  annotation: {},
@@ -2833,6 +2912,290 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2833
2912
  onClick: { type: Function },
2834
2913
  appearanceActive: { type: Boolean }
2835
2914
  },
2915
+ setup(__props) {
2916
+ return (_ctx, _cache) => {
2917
+ return openBlock(), createBlock(_sfc_main$r, {
2918
+ documentId: __props.documentId,
2919
+ isSelected: __props.isSelected,
2920
+ isEditing: __props.isEditing,
2921
+ annotation: { ...__props.annotation, object: __props.currentObject },
2922
+ pageIndex: __props.pageIndex,
2923
+ scale: __props.scale,
2924
+ onClick: __props.onClick,
2925
+ appearanceActive: __props.appearanceActive
2926
+ }, null, 8, ["documentId", "isSelected", "isEditing", "annotation", "pageIndex", "scale", "onClick", "appearanceActive"]);
2927
+ };
2928
+ }
2929
+ });
2930
+ const _hoisted_1$5 = ["width", "height", "viewBox"];
2931
+ const _hoisted_2$3 = ["points", "stroke-width"];
2932
+ const _hoisted_3$3 = ["d", "transform", "stroke-width"];
2933
+ const _hoisted_4$2 = ["points", "stroke", "stroke-width", "opacity"];
2934
+ const _hoisted_5$1 = ["d", "transform", "stroke", "fill", "stroke-width", "opacity"];
2935
+ const _hoisted_6 = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "opacity"];
2936
+ const _hoisted_7 = ["contenteditable"];
2937
+ const __default__$7 = { inheritAttrs: false };
2938
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
2939
+ ...__default__$7,
2940
+ __name: "callout-free-text",
2941
+ props: {
2942
+ documentId: {},
2943
+ isSelected: { type: Boolean },
2944
+ isEditing: { type: Boolean },
2945
+ annotation: {},
2946
+ pageIndex: {},
2947
+ scale: {},
2948
+ onClick: {},
2949
+ appearanceActive: { type: Boolean, default: false }
2950
+ },
2951
+ setup(__props) {
2952
+ const props = __props;
2953
+ const obj = computed(() => props.annotation.object);
2954
+ const strokeWidth = computed(() => obj.value.strokeWidth ?? 1);
2955
+ const strokeColor = computed(() => obj.value.strokeColor ?? "#000000");
2956
+ const editorRef = ref(null);
2957
+ const editingRef = ref(false);
2958
+ const { provides: annotationCapability } = useAnnotationCapability();
2959
+ const annotationProvides = computed(
2960
+ () => {
2961
+ var _a;
2962
+ return ((_a = annotationCapability.value) == null ? void 0 : _a.forDocument(props.documentId)) ?? null;
2963
+ }
2964
+ );
2965
+ const textBox = computed(
2966
+ () => patching.computeTextBoxFromRD(obj.value.rect, obj.value.rectangleDifferences)
2967
+ );
2968
+ const textBoxRelative = computed(() => ({
2969
+ left: (textBox.value.origin.x - obj.value.rect.origin.x + strokeWidth.value / 2) * props.scale,
2970
+ top: (textBox.value.origin.y - obj.value.rect.origin.y + strokeWidth.value / 2) * props.scale,
2971
+ width: (textBox.value.size.width - strokeWidth.value) * props.scale,
2972
+ height: (textBox.value.size.height - strokeWidth.value) * props.scale
2973
+ }));
2974
+ const lineCoords = computed(() => {
2975
+ const cl = obj.value.calloutLine;
2976
+ if (!cl || cl.length < 3) return null;
2977
+ return cl.map((p) => ({
2978
+ x: p.x - obj.value.rect.origin.x,
2979
+ y: p.y - obj.value.rect.origin.y
2980
+ }));
2981
+ });
2982
+ const ending = computed(() => {
2983
+ const lc = lineCoords.value;
2984
+ if (!lc || lc.length < 2) return null;
2985
+ const angle = Math.atan2(lc[1].y - lc[0].y, lc[1].x - lc[0].x);
2986
+ return patching.createEnding(
2987
+ obj.value.lineEnding,
2988
+ strokeWidth.value,
2989
+ angle + Math.PI,
2990
+ lc[0].x,
2991
+ lc[0].y
2992
+ );
2993
+ });
2994
+ const visualLineCoords = computed(() => {
2995
+ const lc = lineCoords.value;
2996
+ if (!lc || lc.length < 2) return lc;
2997
+ const pts = lc.map((p) => ({ ...p }));
2998
+ const last = pts.length - 1;
2999
+ const prev = last - 1;
3000
+ const dx = pts[last].x - pts[prev].x;
3001
+ const dy = pts[last].y - pts[prev].y;
3002
+ const len = Math.sqrt(dx * dx + dy * dy);
3003
+ if (len > 0) {
3004
+ const halfBw = strokeWidth.value / 2;
3005
+ pts[last].x += dx / len * halfBw;
3006
+ pts[last].y += dy / len * halfBw;
3007
+ }
3008
+ return pts;
3009
+ });
3010
+ const ios = useIOSZoomPrevention(
3011
+ () => obj.value.fontSize * props.scale,
3012
+ () => props.isEditing
3013
+ );
3014
+ const width = computed(() => obj.value.rect.size.width * props.scale);
3015
+ const height = computed(() => obj.value.rect.size.height * props.scale);
3016
+ const hitStrokeWidth = computed(() => Math.max(strokeWidth.value, 20 / props.scale));
3017
+ watch(
3018
+ () => props.isEditing,
3019
+ async (editing) => {
3020
+ var _a, _b;
3021
+ if (!editing) return;
3022
+ await nextTick();
3023
+ if (!editorRef.value) return;
3024
+ editingRef.value = true;
3025
+ const editor = editorRef.value;
3026
+ editor.focus();
3027
+ const tool = (_a = annotationProvides.value) == null ? void 0 : _a.findToolForAnnotation(obj.value);
3028
+ const isDefaultContent = ((_b = tool == null ? void 0 : tool.defaults) == null ? void 0 : _b.contents) != null && obj.value.contents === tool.defaults.contents;
3029
+ const selection = window.getSelection();
3030
+ if (selection) {
3031
+ const range = document.createRange();
3032
+ range.selectNodeContents(editor);
3033
+ if (!isDefaultContent) {
3034
+ range.collapse(false);
3035
+ }
3036
+ selection.removeAllRanges();
3037
+ selection.addRange(range);
3038
+ }
3039
+ },
3040
+ { immediate: true }
3041
+ );
3042
+ const handleBlur = () => {
3043
+ if (!editingRef.value) return;
3044
+ editingRef.value = false;
3045
+ if (!annotationProvides.value || !editorRef.value) return;
3046
+ annotationProvides.value.updateAnnotation(props.pageIndex, obj.value.id, {
3047
+ contents: editorRef.value.innerText.replace(/\u00A0/g, " ")
3048
+ });
3049
+ };
3050
+ const editorStyle = computed(() => {
3051
+ const { adjustedFontPx } = ios.value;
3052
+ const tbr = textBoxRelative.value;
3053
+ return {
3054
+ position: "absolute",
3055
+ left: `${tbr.left}px`,
3056
+ top: `${tbr.top}px`,
3057
+ width: `${tbr.width}px`,
3058
+ height: `${tbr.height}px`,
3059
+ color: obj.value.fontColor,
3060
+ fontSize: `${adjustedFontPx}px`,
3061
+ ...standardFontCssProperties(obj.value.fontFamily),
3062
+ textAlign: textAlignmentToCss(obj.value.textAlign),
3063
+ flexDirection: "column",
3064
+ justifyContent: obj.value.verticalAlign === PdfVerticalAlignment.Top ? "flex-start" : obj.value.verticalAlign === PdfVerticalAlignment.Middle ? "center" : "flex-end",
3065
+ display: "flex",
3066
+ padding: `${strokeWidth.value * props.scale / 2 + 2 * props.scale}px`,
3067
+ opacity: obj.value.opacity,
3068
+ lineHeight: "1.18",
3069
+ overflow: "hidden",
3070
+ cursor: props.isEditing ? "text" : "default",
3071
+ outline: "none",
3072
+ pointerEvents: props.isEditing ? "auto" : "none"
3073
+ };
3074
+ });
3075
+ return (_ctx, _cache) => {
3076
+ return openBlock(), createElementBlock("div", {
3077
+ style: normalizeStyle({
3078
+ position: "absolute",
3079
+ width: `${width.value}px`,
3080
+ height: `${height.value}px`,
3081
+ cursor: __props.isSelected && !__props.isEditing ? "move" : "default",
3082
+ pointerEvents: "none",
3083
+ zIndex: 2,
3084
+ opacity: __props.appearanceActive ? 0 : 1
3085
+ })
3086
+ }, [
3087
+ (openBlock(), createElementBlock("svg", {
3088
+ style: normalizeStyle({
3089
+ position: "absolute",
3090
+ width: `${width.value}px`,
3091
+ height: `${height.value}px`,
3092
+ pointerEvents: "none",
3093
+ overflow: "visible"
3094
+ }),
3095
+ width: width.value,
3096
+ height: height.value,
3097
+ viewBox: `0 0 ${obj.value.rect.size.width} ${obj.value.rect.size.height}`
3098
+ }, [
3099
+ lineCoords.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3100
+ createElementVNode("polyline", {
3101
+ points: lineCoords.value.map((p) => `${p.x},${p.y}`).join(" "),
3102
+ fill: "none",
3103
+ stroke: "transparent",
3104
+ "stroke-width": hitStrokeWidth.value,
3105
+ onPointerdown: _cache[0] || (_cache[0] = //@ts-ignore
3106
+ (...args) => __props.onClick && __props.onClick(...args)),
3107
+ style: normalizeStyle({
3108
+ cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
3109
+ pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : "visibleStroke"
3110
+ })
3111
+ }, null, 44, _hoisted_2$3),
3112
+ ending.value ? (openBlock(), createElementBlock("path", {
3113
+ key: 0,
3114
+ d: ending.value.d,
3115
+ transform: ending.value.transform,
3116
+ fill: "transparent",
3117
+ stroke: "transparent",
3118
+ "stroke-width": hitStrokeWidth.value,
3119
+ onPointerdown: _cache[1] || (_cache[1] = //@ts-ignore
3120
+ (...args) => __props.onClick && __props.onClick(...args)),
3121
+ style: normalizeStyle({
3122
+ cursor: __props.isSelected ? "move" : __props.onClick ? "pointer" : "default",
3123
+ pointerEvents: !__props.onClick ? "none" : __props.isSelected ? "none" : ending.value.filled ? "visible" : "visibleStroke"
3124
+ })
3125
+ }, null, 44, _hoisted_3$3)) : createCommentVNode("", true)
3126
+ ], 64)) : createCommentVNode("", true),
3127
+ !__props.appearanceActive ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3128
+ visualLineCoords.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3129
+ createElementVNode("polyline", {
3130
+ points: visualLineCoords.value.map((p) => `${p.x},${p.y}`).join(" "),
3131
+ fill: "none",
3132
+ stroke: strokeColor.value,
3133
+ "stroke-width": strokeWidth.value,
3134
+ opacity: obj.value.opacity,
3135
+ style: { "pointer-events": "none" }
3136
+ }, null, 8, _hoisted_4$2),
3137
+ ending.value ? (openBlock(), createElementBlock("path", {
3138
+ key: 0,
3139
+ d: ending.value.d,
3140
+ transform: ending.value.transform,
3141
+ stroke: strokeColor.value,
3142
+ fill: ending.value.filled ? obj.value.color ?? "transparent" : "none",
3143
+ "stroke-width": strokeWidth.value,
3144
+ opacity: obj.value.opacity,
3145
+ style: { "pointer-events": "none" }
3146
+ }, null, 8, _hoisted_5$1)) : createCommentVNode("", true)
3147
+ ], 64)) : createCommentVNode("", true),
3148
+ createElementVNode("rect", {
3149
+ x: textBox.value.origin.x - obj.value.rect.origin.x + strokeWidth.value / 2,
3150
+ y: textBox.value.origin.y - obj.value.rect.origin.y + strokeWidth.value / 2,
3151
+ width: textBox.value.size.width - strokeWidth.value,
3152
+ height: textBox.value.size.height - strokeWidth.value,
3153
+ fill: obj.value.color ?? obj.value.backgroundColor ?? "transparent",
3154
+ stroke: strokeColor.value,
3155
+ "stroke-width": strokeWidth.value,
3156
+ opacity: obj.value.opacity,
3157
+ style: { "pointer-events": "none" }
3158
+ }, null, 8, _hoisted_6)
3159
+ ], 64)) : createCommentVNode("", true)
3160
+ ], 12, _hoisted_1$5)),
3161
+ createElementVNode("div", {
3162
+ onPointerdown: _cache[2] || (_cache[2] = //@ts-ignore
3163
+ (...args) => __props.onClick && __props.onClick(...args)),
3164
+ style: normalizeStyle({
3165
+ position: "absolute",
3166
+ left: `${(textBox.value.origin.x - obj.value.rect.origin.x) * __props.scale}px`,
3167
+ top: `${(textBox.value.origin.y - obj.value.rect.origin.y) * __props.scale}px`,
3168
+ width: `${textBox.value.size.width * __props.scale}px`,
3169
+ height: `${textBox.value.size.height * __props.scale}px`,
3170
+ cursor: __props.isSelected && !__props.isEditing ? "move" : __props.onClick ? "pointer" : "default",
3171
+ pointerEvents: !__props.onClick ? "none" : __props.isSelected && !__props.isEditing ? "none" : "auto"
3172
+ })
3173
+ }, null, 36),
3174
+ createElementVNode("span", {
3175
+ ref_key: "editorRef",
3176
+ ref: editorRef,
3177
+ onBlur: handleBlur,
3178
+ tabindex: "0",
3179
+ style: normalizeStyle(editorStyle.value),
3180
+ contenteditable: __props.isEditing
3181
+ }, toDisplayString(obj.value.contents), 45, _hoisted_7)
3182
+ ], 4);
3183
+ };
3184
+ }
3185
+ });
3186
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
3187
+ __name: "callout-free-text-renderer",
3188
+ props: {
3189
+ annotation: {},
3190
+ currentObject: {},
3191
+ isSelected: { type: Boolean },
3192
+ isEditing: { type: Boolean },
3193
+ scale: {},
3194
+ pageIndex: {},
3195
+ documentId: {},
3196
+ onClick: { type: Function },
3197
+ appearanceActive: { type: Boolean }
3198
+ },
2836
3199
  setup(__props) {
2837
3200
  return (_ctx, _cache) => {
2838
3201
  return openBlock(), createBlock(_sfc_main$p, {
@@ -3635,8 +3998,8 @@ const builtInRenderers = [
3635
3998
  id: "ink",
3636
3999
  matches: (a) => a.type === PdfAnnotationSubtype.INK,
3637
4000
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.INK,
3638
- component: _sfc_main$v,
3639
- renderPreview: _sfc_main$I,
4001
+ component: _sfc_main$x,
4002
+ renderPreview: _sfc_main$L,
3640
4003
  previewContainerStyle: ({ data }) => ({
3641
4004
  mixBlendMode: blendModeToCss(data.blendMode ?? PdfBlendMode.Normal)
3642
4005
  }),
@@ -3646,24 +4009,24 @@ const builtInRenderers = [
3646
4009
  id: "square",
3647
4010
  matches: (a) => a.type === PdfAnnotationSubtype.SQUARE,
3648
4011
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.SQUARE,
3649
- component: _sfc_main$u,
3650
- renderPreview: _sfc_main$G,
4012
+ component: _sfc_main$w,
4013
+ renderPreview: _sfc_main$J,
3651
4014
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3652
4015
  }),
3653
4016
  createRenderer({
3654
4017
  id: "circle",
3655
4018
  matches: (a) => a.type === PdfAnnotationSubtype.CIRCLE,
3656
4019
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.CIRCLE,
3657
- component: _sfc_main$t,
3658
- renderPreview: _sfc_main$E,
4020
+ component: _sfc_main$v,
4021
+ renderPreview: _sfc_main$H,
3659
4022
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3660
4023
  }),
3661
4024
  createRenderer({
3662
4025
  id: "line",
3663
4026
  matches: (a) => a.type === PdfAnnotationSubtype.LINE,
3664
4027
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.LINE,
3665
- component: _sfc_main$s,
3666
- renderPreview: _sfc_main$C,
4028
+ component: _sfc_main$u,
4029
+ renderPreview: _sfc_main$F,
3667
4030
  vertexConfig: {
3668
4031
  extractVertices: (a) => [a.linePoints.start, a.linePoints.end],
3669
4032
  transformAnnotation: (a, v) => ({
@@ -3677,8 +4040,8 @@ const builtInRenderers = [
3677
4040
  id: "polyline",
3678
4041
  matches: (a) => a.type === PdfAnnotationSubtype.POLYLINE,
3679
4042
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.POLYLINE,
3680
- component: _sfc_main$r,
3681
- renderPreview: _sfc_main$A,
4043
+ component: _sfc_main$t,
4044
+ renderPreview: _sfc_main$D,
3682
4045
  vertexConfig: {
3683
4046
  extractVertices: (a) => a.vertices,
3684
4047
  transformAnnotation: (a, vertices) => ({ ...a, vertices })
@@ -3689,8 +4052,8 @@ const builtInRenderers = [
3689
4052
  id: "polygon",
3690
4053
  matches: (a) => a.type === PdfAnnotationSubtype.POLYGON,
3691
4054
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.POLYGON,
3692
- component: _sfc_main$q,
3693
- renderPreview: _sfc_main$y,
4055
+ component: _sfc_main$s,
4056
+ renderPreview: _sfc_main$B,
3694
4057
  vertexConfig: {
3695
4058
  extractVertices: (a) => a.vertices,
3696
4059
  transformAnnotation: (a, vertices) => ({ ...a, vertices })
@@ -3739,11 +4102,22 @@ const builtInRenderers = [
3739
4102
  interactionDefaults: { isDraggable: false, isResizable: false, isRotatable: false }
3740
4103
  }),
3741
4104
  createRenderer({
3742
- id: "freeText",
3743
- matches: (a) => a.type === PdfAnnotationSubtype.FREETEXT,
3744
- matchesPreview: (p) => p.type === PdfAnnotationSubtype.FREETEXT,
4105
+ id: "freeTextCallout",
4106
+ matches: (a) => a.type === PdfAnnotationSubtype.FREETEXT && a.intent === "FreeTextCallout",
4107
+ matchesPreview: (p) => p.type === PdfAnnotationSubtype.FREETEXT && !!p.data.calloutLine,
3745
4108
  component: _sfc_main$o,
3746
- renderPreview: _sfc_main$x,
4109
+ renderPreview: _sfc_main$z,
4110
+ vertexConfig: patching.calloutVertexConfig,
4111
+ interactionDefaults: { isDraggable: true, isResizable: false, isRotatable: false },
4112
+ isDraggable: (toolDraggable, { isEditing }) => toolDraggable && !isEditing,
4113
+ onDoubleClick: (id, setEditingId) => setEditingId(id)
4114
+ }),
4115
+ createRenderer({
4116
+ id: "freeText",
4117
+ matches: (a) => a.type === PdfAnnotationSubtype.FREETEXT && a.intent !== "FreeTextCallout",
4118
+ matchesPreview: (p) => p.type === PdfAnnotationSubtype.FREETEXT && !p.data.calloutLine,
4119
+ component: _sfc_main$q,
4120
+ renderPreview: _sfc_main$A,
3747
4121
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true },
3748
4122
  isDraggable: (toolDraggable, { isEditing }) => toolDraggable && !isEditing,
3749
4123
  onDoubleClick: (id, setEditingId) => setEditingId(id)
@@ -3753,7 +4127,7 @@ const builtInRenderers = [
3753
4127
  matches: (a) => a.type === PdfAnnotationSubtype.STAMP,
3754
4128
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.STAMP,
3755
4129
  component: _sfc_main$l,
3756
- renderPreview: _sfc_main$w,
4130
+ renderPreview: _sfc_main$y,
3757
4131
  useAppearanceStream: false,
3758
4132
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: true }
3759
4133
  }),
@@ -3762,7 +4136,7 @@ const builtInRenderers = [
3762
4136
  matches: (a) => a.type === PdfAnnotationSubtype.LINK,
3763
4137
  matchesPreview: (p) => p.type === PdfAnnotationSubtype.LINK,
3764
4138
  component: _sfc_main$j,
3765
- renderPreview: _sfc_main$K,
4139
+ renderPreview: _sfc_main$N,
3766
4140
  interactionDefaults: { isDraggable: true, isResizable: true, isRotatable: false },
3767
4141
  useAppearanceStream: false,
3768
4142
  selectOverride: (e, annotation, helpers) => {
@@ -3780,7 +4154,7 @@ const builtInRenderers = [
3780
4154
  helpers.selectAnnotation(helpers.pageIndex, annotation.object.id);
3781
4155
  },
3782
4156
  hideSelectionMenu: (a) => !!a.inReplyToId,
3783
- renderLocked: _sfc_main$L
4157
+ renderLocked: _sfc_main$O
3784
4158
  })
3785
4159
  ];
3786
4160
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
@@ -4112,7 +4486,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4112
4486
  return openBlock(), createElementBlock(Fragment, null, [
4113
4487
  (openBlock(true), createElementBlock(Fragment, null, renderList(resolvedAnnotations.value, ({ annotation, renderer, locked }) => {
4114
4488
  var _a;
4115
- return openBlock(), createBlock(_sfc_main$N, mergeProps({
4489
+ return openBlock(), createBlock(_sfc_main$Q, mergeProps({
4116
4490
  key: annotation.object.id,
4117
4491
  trackedAnnotation: annotation,
4118
4492
  isSelected: locked ? false : allSelectedIds.value.includes(annotation.object.id),
@@ -4164,7 +4538,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4164
4538
  } : void 0
4165
4539
  ]), 1040, ["trackedAnnotation", "isSelected", "isEditing", "isMultiSelected", "isDraggable", "isResizable", "lockAspectRatio", "isRotatable", "vertexConfig", "selectionMenu", "onSelect", "onDoubleClick", "zIndex", "blendMode", "style", "appearance"]);
4166
4540
  }), 128)),
4167
- allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$M, {
4541
+ allSelectedOnSamePage.value && selectedAnnotationsOnPage.value.length >= 2 ? (openBlock(), createBlock(_sfc_main$P, {
4168
4542
  key: 0,
4169
4543
  documentId: __props.documentId,
4170
4544
  pageIndex: __props.pageIndex,
@@ -4557,24 +4931,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4557
4931
  });
4558
4932
  const AnnotationPluginPackage = createPluginPackage(AnnotationPluginPackage$1).addWrapper(_sfc_main$1).addUtility(_sfc_main).build();
4559
4933
  export {
4560
- _sfc_main$N as AnnotationContainer,
4934
+ _sfc_main$Q as AnnotationContainer,
4561
4935
  _sfc_main$2 as AnnotationLayer,
4562
4936
  _sfc_main$3 as AnnotationPaintLayer,
4563
4937
  AnnotationPluginPackage,
4564
4938
  _sfc_main$6 as Annotations,
4565
- _sfc_main$F as Circle,
4566
- _sfc_main$p as FreeText,
4567
- _sfc_main$M as GroupSelectionBox,
4939
+ _sfc_main$I as Circle,
4940
+ _sfc_main$r as FreeText,
4941
+ _sfc_main$P as GroupSelectionBox,
4568
4942
  _sfc_main$i as Highlight,
4569
- _sfc_main$J as Ink,
4570
- _sfc_main$D as Line,
4943
+ _sfc_main$M as Ink,
4944
+ _sfc_main$G as Line,
4571
4945
  _sfc_main$k as Link,
4572
- _sfc_main$z as Polygon,
4573
- _sfc_main$B as Polyline,
4946
+ _sfc_main$C as Polygon,
4947
+ _sfc_main$E as Polyline,
4574
4948
  _sfc_main$4 as PreviewRenderer,
4575
4949
  _sfc_main$n as RenderAnnotation,
4576
4950
  _sfc_main$1 as RendererRegistryProvider,
4577
- _sfc_main$H as Square,
4951
+ _sfc_main$K as Square,
4578
4952
  _sfc_main$c as Squiggly,
4579
4953
  _sfc_main$m as Stamp,
4580
4954
  _sfc_main$e as Strikeout,