@embedpdf/plugin-annotation 2.15.0 → 3.0.0-next.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 (348) hide show
  1. package/LICENSE +192 -21
  2. package/dist/capability-fghl0JmE.js +2680 -0
  3. package/dist/capability-fghl0JmE.js.map +1 -0
  4. package/dist/capability-hb2AU0f6.cjs +2739 -0
  5. package/dist/capability-hb2AU0f6.cjs.map +1 -0
  6. package/dist/index.cjs +593 -2
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +65 -0
  9. package/dist/index.d.ts +65 -1
  10. package/dist/index.js +562 -6998
  11. package/dist/index.js.map +1 -1
  12. package/dist/internal.cjs +5 -0
  13. package/dist/internal.d.cts +13 -0
  14. package/dist/internal.d.ts +13 -0
  15. package/dist/internal.js +2 -0
  16. package/dist/types-BhWgqgbX.d.cts +879 -0
  17. package/dist/types-Da6JRmhw.d.ts +879 -0
  18. package/package.json +26 -66
  19. package/dist/lib/actions.d.ts +0 -192
  20. package/dist/lib/annotation-plugin.d.ts +0 -310
  21. package/dist/lib/geometry/cloudy-border.d.ts +0 -90
  22. package/dist/lib/geometry/index.d.ts +0 -2
  23. package/dist/lib/geometry/rotation.d.ts +0 -32
  24. package/dist/lib/handlers/callout-free-text.handler.d.ts +0 -3
  25. package/dist/lib/handlers/circle.handler.d.ts +0 -3
  26. package/dist/lib/handlers/click-detector.d.ts +0 -27
  27. package/dist/lib/handlers/free-text.handler.d.ts +0 -3
  28. package/dist/lib/handlers/index.d.ts +0 -14
  29. package/dist/lib/handlers/ink.handler.d.ts +0 -3
  30. package/dist/lib/handlers/insert-text.handler.d.ts +0 -8
  31. package/dist/lib/handlers/line.handler.d.ts +0 -3
  32. package/dist/lib/handlers/link.handler.d.ts +0 -3
  33. package/dist/lib/handlers/polygon.handler.d.ts +0 -3
  34. package/dist/lib/handlers/polyline.handler.d.ts +0 -3
  35. package/dist/lib/handlers/replace-text.handler.d.ts +0 -9
  36. package/dist/lib/handlers/selection-utils.d.ts +0 -7
  37. package/dist/lib/handlers/square.handler.d.ts +0 -3
  38. package/dist/lib/handlers/stamp.handler.d.ts +0 -3
  39. package/dist/lib/handlers/text-markup.handler.d.ts +0 -7
  40. package/dist/lib/handlers/text.handler.d.ts +0 -3
  41. package/dist/lib/handlers/types.d.ts +0 -176
  42. package/dist/lib/helpers.d.ts +0 -46
  43. package/dist/lib/index.d.ts +0 -21
  44. package/dist/lib/manifest.d.ts +0 -4
  45. package/dist/lib/patching/base-patch.d.ts +0 -87
  46. package/dist/lib/patching/index.d.ts +0 -6
  47. package/dist/lib/patching/insert-upright.d.ts +0 -20
  48. package/dist/lib/patching/line-ending-handlers.d.ts +0 -20
  49. package/dist/lib/patching/line-endings.d.ts +0 -13
  50. package/dist/lib/patching/patch-registry.d.ts +0 -40
  51. package/dist/lib/patching/patch-utils.d.ts +0 -97
  52. package/dist/lib/patching/patches/callout-freetext.patch.d.ts +0 -3
  53. package/dist/lib/patching/patches/circle.patch.d.ts +0 -3
  54. package/dist/lib/patching/patches/freetext.patch.d.ts +0 -3
  55. package/dist/lib/patching/patches/index.d.ts +0 -9
  56. package/dist/lib/patching/patches/ink.patch.d.ts +0 -3
  57. package/dist/lib/patching/patches/line.patch.d.ts +0 -3
  58. package/dist/lib/patching/patches/polygon.patch.d.ts +0 -3
  59. package/dist/lib/patching/patches/polyline.patch.d.ts +0 -3
  60. package/dist/lib/patching/patches/square.patch.d.ts +0 -3
  61. package/dist/lib/patching/patches/stamp.patch.d.ts +0 -3
  62. package/dist/lib/reducer.d.ts +0 -6
  63. package/dist/lib/selectors.d.ts +0 -139
  64. package/dist/lib/tools/default-tools.d.ts +0 -521
  65. package/dist/lib/tools/tools-utils.d.ts +0 -453
  66. package/dist/lib/tools/types.d.ts +0 -209
  67. package/dist/lib/types.d.ts +0 -671
  68. package/dist/lib/utils/index.d.ts +0 -1
  69. package/dist/lib/utils/use-state.d.ts +0 -12
  70. package/dist/preact/adapter.d.ts +0 -14
  71. package/dist/preact/core.d.ts +0 -1
  72. package/dist/preact/index.cjs +0 -2
  73. package/dist/preact/index.cjs.map +0 -1
  74. package/dist/preact/index.d.ts +0 -1
  75. package/dist/preact/index.js +0 -4013
  76. package/dist/preact/index.js.map +0 -1
  77. package/dist/preact/interaction-manager.d.ts +0 -1
  78. package/dist/preact/selection.d.ts +0 -1
  79. package/dist/preact/utils.d.ts +0 -1
  80. package/dist/react/adapter.d.ts +0 -6
  81. package/dist/react/core.d.ts +0 -1
  82. package/dist/react/index.cjs +0 -2
  83. package/dist/react/index.cjs.map +0 -1
  84. package/dist/react/index.d.ts +0 -1
  85. package/dist/react/index.js +0 -4014
  86. package/dist/react/index.js.map +0 -1
  87. package/dist/react/interaction-manager.d.ts +0 -1
  88. package/dist/react/selection.d.ts +0 -1
  89. package/dist/react/utils.d.ts +0 -1
  90. package/dist/shared/annotation-bounds.d.ts +0 -14
  91. package/dist/shared/components/annotation-container.d.ts +0 -71
  92. package/dist/shared/components/annotation-layer.d.ts +0 -33
  93. package/dist/shared/components/annotation-navigation-handler.d.ts +0 -1
  94. package/dist/shared/components/annotation-paint-layer.d.ts +0 -7
  95. package/dist/shared/components/annotations/callout-free-text-preview.d.ts +0 -15
  96. package/dist/shared/components/annotations/callout-free-text.d.ts +0 -15
  97. package/dist/shared/components/annotations/caret.d.ts +0 -24
  98. package/dist/shared/components/annotations/circle.d.ts +0 -35
  99. package/dist/shared/components/annotations/free-text.d.ts +0 -17
  100. package/dist/shared/components/annotations/ink.d.ts +0 -27
  101. package/dist/shared/components/annotations/line.d.ts +0 -35
  102. package/dist/shared/components/annotations/link-locked.d.ts +0 -3
  103. package/dist/shared/components/annotations/link.d.ts +0 -28
  104. package/dist/shared/components/annotations/polygon.d.ts +0 -23
  105. package/dist/shared/components/annotations/polyline.d.ts +0 -23
  106. package/dist/shared/components/annotations/square.d.ts +0 -35
  107. package/dist/shared/components/annotations/stamp.d.ts +0 -13
  108. package/dist/shared/components/annotations/text.d.ts +0 -14
  109. package/dist/shared/components/annotations.d.ts +0 -22
  110. package/dist/shared/components/appearance-image.d.ts +0 -12
  111. package/dist/shared/components/built-in-renderers.d.ts +0 -2
  112. package/dist/shared/components/group-selection-box.d.ts +0 -40
  113. package/dist/shared/components/index.d.ts +0 -2
  114. package/dist/shared/components/preview-renderer.d.ts +0 -8
  115. package/dist/shared/components/render-annotation.d.ts +0 -13
  116. package/dist/shared/components/text-markup/highlight.d.ts +0 -16
  117. package/dist/shared/components/text-markup/squiggly.d.ts +0 -16
  118. package/dist/shared/components/text-markup/strikeout.d.ts +0 -16
  119. package/dist/shared/components/text-markup/underline.d.ts +0 -16
  120. package/dist/shared/components/text-markup.d.ts +0 -7
  121. package/dist/shared/components/types.d.ts +0 -253
  122. package/dist/shared/context/index.d.ts +0 -1
  123. package/dist/shared/context/renderer-registry.d.ts +0 -21
  124. package/dist/shared/hooks/index.d.ts +0 -2
  125. package/dist/shared/hooks/use-annotation.d.ts +0 -19
  126. package/dist/shared/hooks/use-ios-zoom-prevention.d.ts +0 -16
  127. package/dist/shared/index.d.ts +0 -6
  128. package/dist/shared/types.d.ts +0 -10
  129. package/dist/shared-preact/annotation-bounds.d.ts +0 -14
  130. package/dist/shared-preact/components/annotation-container.d.ts +0 -71
  131. package/dist/shared-preact/components/annotation-layer.d.ts +0 -33
  132. package/dist/shared-preact/components/annotation-navigation-handler.d.ts +0 -1
  133. package/dist/shared-preact/components/annotation-paint-layer.d.ts +0 -7
  134. package/dist/shared-preact/components/annotations/callout-free-text-preview.d.ts +0 -15
  135. package/dist/shared-preact/components/annotations/callout-free-text.d.ts +0 -15
  136. package/dist/shared-preact/components/annotations/caret.d.ts +0 -24
  137. package/dist/shared-preact/components/annotations/circle.d.ts +0 -35
  138. package/dist/shared-preact/components/annotations/free-text.d.ts +0 -17
  139. package/dist/shared-preact/components/annotations/ink.d.ts +0 -27
  140. package/dist/shared-preact/components/annotations/line.d.ts +0 -35
  141. package/dist/shared-preact/components/annotations/link-locked.d.ts +0 -3
  142. package/dist/shared-preact/components/annotations/link.d.ts +0 -28
  143. package/dist/shared-preact/components/annotations/polygon.d.ts +0 -23
  144. package/dist/shared-preact/components/annotations/polyline.d.ts +0 -23
  145. package/dist/shared-preact/components/annotations/square.d.ts +0 -35
  146. package/dist/shared-preact/components/annotations/stamp.d.ts +0 -13
  147. package/dist/shared-preact/components/annotations/text.d.ts +0 -14
  148. package/dist/shared-preact/components/annotations.d.ts +0 -22
  149. package/dist/shared-preact/components/appearance-image.d.ts +0 -12
  150. package/dist/shared-preact/components/built-in-renderers.d.ts +0 -2
  151. package/dist/shared-preact/components/group-selection-box.d.ts +0 -40
  152. package/dist/shared-preact/components/index.d.ts +0 -2
  153. package/dist/shared-preact/components/preview-renderer.d.ts +0 -8
  154. package/dist/shared-preact/components/render-annotation.d.ts +0 -13
  155. package/dist/shared-preact/components/text-markup/highlight.d.ts +0 -16
  156. package/dist/shared-preact/components/text-markup/squiggly.d.ts +0 -16
  157. package/dist/shared-preact/components/text-markup/strikeout.d.ts +0 -16
  158. package/dist/shared-preact/components/text-markup/underline.d.ts +0 -16
  159. package/dist/shared-preact/components/text-markup.d.ts +0 -7
  160. package/dist/shared-preact/components/types.d.ts +0 -253
  161. package/dist/shared-preact/context/index.d.ts +0 -1
  162. package/dist/shared-preact/context/renderer-registry.d.ts +0 -21
  163. package/dist/shared-preact/hooks/index.d.ts +0 -2
  164. package/dist/shared-preact/hooks/use-annotation.d.ts +0 -19
  165. package/dist/shared-preact/hooks/use-ios-zoom-prevention.d.ts +0 -15
  166. package/dist/shared-preact/index.d.ts +0 -6
  167. package/dist/shared-preact/types.d.ts +0 -10
  168. package/dist/shared-react/annotation-bounds.d.ts +0 -14
  169. package/dist/shared-react/components/annotation-container.d.ts +0 -71
  170. package/dist/shared-react/components/annotation-layer.d.ts +0 -33
  171. package/dist/shared-react/components/annotation-navigation-handler.d.ts +0 -1
  172. package/dist/shared-react/components/annotation-paint-layer.d.ts +0 -7
  173. package/dist/shared-react/components/annotations/callout-free-text-preview.d.ts +0 -15
  174. package/dist/shared-react/components/annotations/callout-free-text.d.ts +0 -15
  175. package/dist/shared-react/components/annotations/caret.d.ts +0 -24
  176. package/dist/shared-react/components/annotations/circle.d.ts +0 -35
  177. package/dist/shared-react/components/annotations/free-text.d.ts +0 -17
  178. package/dist/shared-react/components/annotations/ink.d.ts +0 -27
  179. package/dist/shared-react/components/annotations/line.d.ts +0 -35
  180. package/dist/shared-react/components/annotations/link-locked.d.ts +0 -3
  181. package/dist/shared-react/components/annotations/link.d.ts +0 -28
  182. package/dist/shared-react/components/annotations/polygon.d.ts +0 -23
  183. package/dist/shared-react/components/annotations/polyline.d.ts +0 -23
  184. package/dist/shared-react/components/annotations/square.d.ts +0 -35
  185. package/dist/shared-react/components/annotations/stamp.d.ts +0 -13
  186. package/dist/shared-react/components/annotations/text.d.ts +0 -14
  187. package/dist/shared-react/components/annotations.d.ts +0 -22
  188. package/dist/shared-react/components/appearance-image.d.ts +0 -12
  189. package/dist/shared-react/components/built-in-renderers.d.ts +0 -2
  190. package/dist/shared-react/components/group-selection-box.d.ts +0 -40
  191. package/dist/shared-react/components/index.d.ts +0 -2
  192. package/dist/shared-react/components/preview-renderer.d.ts +0 -8
  193. package/dist/shared-react/components/render-annotation.d.ts +0 -13
  194. package/dist/shared-react/components/text-markup/highlight.d.ts +0 -16
  195. package/dist/shared-react/components/text-markup/squiggly.d.ts +0 -16
  196. package/dist/shared-react/components/text-markup/strikeout.d.ts +0 -16
  197. package/dist/shared-react/components/text-markup/underline.d.ts +0 -16
  198. package/dist/shared-react/components/text-markup.d.ts +0 -7
  199. package/dist/shared-react/components/types.d.ts +0 -253
  200. package/dist/shared-react/context/index.d.ts +0 -1
  201. package/dist/shared-react/context/renderer-registry.d.ts +0 -21
  202. package/dist/shared-react/hooks/index.d.ts +0 -2
  203. package/dist/shared-react/hooks/use-annotation.d.ts +0 -19
  204. package/dist/shared-react/hooks/use-ios-zoom-prevention.d.ts +0 -16
  205. package/dist/shared-react/index.d.ts +0 -6
  206. package/dist/shared-react/types.d.ts +0 -10
  207. package/dist/shared-vue/annotation-bounds.d.ts +0 -14
  208. package/dist/svelte/components/AnnotationContainer.svelte.d.ts +0 -26
  209. package/dist/svelte/components/AnnotationLayer.svelte.d.ts +0 -40
  210. package/dist/svelte/components/AnnotationNavigationHandler.svelte.d.ts +0 -3
  211. package/dist/svelte/components/AnnotationPaintLayer.svelte.d.ts +0 -8
  212. package/dist/svelte/components/Annotations.svelte.d.ts +0 -28
  213. package/dist/svelte/components/AppearanceImage.svelte.d.ts +0 -8
  214. package/dist/svelte/components/GroupSelectionBox.svelte.d.ts +0 -40
  215. package/dist/svelte/components/PreviewRenderer.svelte.d.ts +0 -9
  216. package/dist/svelte/components/RenderAnnotation.svelte.d.ts +0 -14
  217. package/dist/svelte/components/RendererRegistryProvider.svelte.d.ts +0 -7
  218. package/dist/svelte/components/TextMarkup.svelte.d.ts +0 -8
  219. package/dist/svelte/components/annotations/CalloutFreeText.svelte.d.ts +0 -15
  220. package/dist/svelte/components/annotations/CalloutFreeTextPreview.svelte.d.ts +0 -10
  221. package/dist/svelte/components/annotations/Caret.svelte.d.ts +0 -13
  222. package/dist/svelte/components/annotations/Circle.svelte.d.ts +0 -19
  223. package/dist/svelte/components/annotations/CirclePreview.svelte.d.ts +0 -10
  224. package/dist/svelte/components/annotations/FreeText.svelte.d.ts +0 -16
  225. package/dist/svelte/components/annotations/FreeTextPreview.svelte.d.ts +0 -10
  226. package/dist/svelte/components/annotations/Ink.svelte.d.ts +0 -15
  227. package/dist/svelte/components/annotations/InkPreview.svelte.d.ts +0 -10
  228. package/dist/svelte/components/annotations/Line.svelte.d.ts +0 -19
  229. package/dist/svelte/components/annotations/LinePreview.svelte.d.ts +0 -10
  230. package/dist/svelte/components/annotations/Link.svelte.d.ts +0 -24
  231. package/dist/svelte/components/annotations/LinkLockedMode.svelte.d.ts +0 -5
  232. package/dist/svelte/components/annotations/LinkPreview.svelte.d.ts +0 -10
  233. package/dist/svelte/components/annotations/Polygon.svelte.d.ts +0 -21
  234. package/dist/svelte/components/annotations/PolygonPreview.svelte.d.ts +0 -10
  235. package/dist/svelte/components/annotations/Polyline.svelte.d.ts +0 -19
  236. package/dist/svelte/components/annotations/PolylinePreview.svelte.d.ts +0 -10
  237. package/dist/svelte/components/annotations/Square.svelte.d.ts +0 -19
  238. package/dist/svelte/components/annotations/SquarePreview.svelte.d.ts +0 -10
  239. package/dist/svelte/components/annotations/Stamp.svelte.d.ts +0 -13
  240. package/dist/svelte/components/annotations/StampPreview.svelte.d.ts +0 -10
  241. package/dist/svelte/components/annotations/Text.svelte.d.ts +0 -10
  242. package/dist/svelte/components/annotations/index.d.ts +0 -10
  243. package/dist/svelte/components/built-in-renderers.d.ts +0 -2
  244. package/dist/svelte/components/index.d.ts +0 -11
  245. package/dist/svelte/components/renderers/CalloutFreeTextRenderer.svelte.d.ts +0 -5
  246. package/dist/svelte/components/renderers/CaretRenderer.svelte.d.ts +0 -5
  247. package/dist/svelte/components/renderers/CircleRenderer.svelte.d.ts +0 -5
  248. package/dist/svelte/components/renderers/FreeTextRenderer.svelte.d.ts +0 -5
  249. package/dist/svelte/components/renderers/HighlightRenderer.svelte.d.ts +0 -5
  250. package/dist/svelte/components/renderers/InkRenderer.svelte.d.ts +0 -5
  251. package/dist/svelte/components/renderers/LineRenderer.svelte.d.ts +0 -5
  252. package/dist/svelte/components/renderers/LinkRenderer.svelte.d.ts +0 -5
  253. package/dist/svelte/components/renderers/PolygonRenderer.svelte.d.ts +0 -5
  254. package/dist/svelte/components/renderers/PolylineRenderer.svelte.d.ts +0 -5
  255. package/dist/svelte/components/renderers/SquareRenderer.svelte.d.ts +0 -5
  256. package/dist/svelte/components/renderers/SquigglyRenderer.svelte.d.ts +0 -5
  257. package/dist/svelte/components/renderers/StampRenderer.svelte.d.ts +0 -5
  258. package/dist/svelte/components/renderers/StrikeoutRenderer.svelte.d.ts +0 -5
  259. package/dist/svelte/components/renderers/TextRenderer.svelte.d.ts +0 -5
  260. package/dist/svelte/components/renderers/UnderlineRenderer.svelte.d.ts +0 -5
  261. package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +0 -16
  262. package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +0 -16
  263. package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +0 -16
  264. package/dist/svelte/components/text-markup/Underline.svelte.d.ts +0 -16
  265. package/dist/svelte/components/text-markup/index.d.ts +0 -4
  266. package/dist/svelte/components/types.d.ts +0 -66
  267. package/dist/svelte/context/index.d.ts +0 -2
  268. package/dist/svelte/context/renderer-registry.svelte.d.ts +0 -20
  269. package/dist/svelte/context/types.d.ts +0 -129
  270. package/dist/svelte/hooks/index.d.ts +0 -2
  271. package/dist/svelte/hooks/use-annotation.svelte.d.ts +0 -21
  272. package/dist/svelte/hooks/use-ios-zoom-prevention.svelte.d.ts +0 -6
  273. package/dist/svelte/index.cjs +0 -2
  274. package/dist/svelte/index.cjs.map +0 -1
  275. package/dist/svelte/index.d.ts +0 -6
  276. package/dist/svelte/index.js +0 -5257
  277. package/dist/svelte/index.js.map +0 -1
  278. package/dist/svelte/types.d.ts +0 -126
  279. package/dist/vue/components/annotation-container.vue.d.ts +0 -134
  280. package/dist/vue/components/annotation-layer.vue.d.ts +0 -99
  281. package/dist/vue/components/annotation-navigation-handler.vue.d.ts +0 -3
  282. package/dist/vue/components/annotation-paint-layer.vue.d.ts +0 -8
  283. package/dist/vue/components/annotations/callout-free-text-preview.vue.d.ts +0 -10
  284. package/dist/vue/components/annotations/callout-free-text.vue.d.ts +0 -25
  285. package/dist/vue/components/annotations/caret.vue.d.ts +0 -24
  286. package/dist/vue/components/annotations/circle-preview.vue.d.ts +0 -10
  287. package/dist/vue/components/annotations/circle.vue.d.ts +0 -37
  288. package/dist/vue/components/annotations/free-text-preview.vue.d.ts +0 -10
  289. package/dist/vue/components/annotations/free-text.vue.d.ts +0 -25
  290. package/dist/vue/components/annotations/index.d.ts +0 -10
  291. package/dist/vue/components/annotations/ink-preview.vue.d.ts +0 -10
  292. package/dist/vue/components/annotations/ink.vue.d.ts +0 -27
  293. package/dist/vue/components/annotations/line-preview.vue.d.ts +0 -10
  294. package/dist/vue/components/annotations/line.vue.d.ts +0 -38
  295. package/dist/vue/components/annotations/link-locked.vue.d.ts +0 -5
  296. package/dist/vue/components/annotations/link-preview.vue.d.ts +0 -10
  297. package/dist/vue/components/annotations/link.vue.d.ts +0 -47
  298. package/dist/vue/components/annotations/polygon-preview.vue.d.ts +0 -10
  299. package/dist/vue/components/annotations/polygon.vue.d.ts +0 -43
  300. package/dist/vue/components/annotations/polyline-preview.vue.d.ts +0 -10
  301. package/dist/vue/components/annotations/polyline.vue.d.ts +0 -38
  302. package/dist/vue/components/annotations/square-preview.vue.d.ts +0 -10
  303. package/dist/vue/components/annotations/square.vue.d.ts +0 -37
  304. package/dist/vue/components/annotations/stamp-preview.vue.d.ts +0 -10
  305. package/dist/vue/components/annotations/stamp.vue.d.ts +0 -19
  306. package/dist/vue/components/annotations/text.vue.d.ts +0 -14
  307. package/dist/vue/components/annotations.vue.d.ts +0 -111
  308. package/dist/vue/components/appearance-image.vue.d.ts +0 -9
  309. package/dist/vue/components/built-in-renderers.d.ts +0 -2
  310. package/dist/vue/components/group-selection-box.vue.d.ts +0 -98
  311. package/dist/vue/components/index.d.ts +0 -11
  312. package/dist/vue/components/preview-renderer.vue.d.ts +0 -9
  313. package/dist/vue/components/render-annotation.vue.d.ts +0 -16
  314. package/dist/vue/components/renderer-registry-provider.vue.d.ts +0 -13
  315. package/dist/vue/components/renderers/callout-free-text-renderer.vue.d.ts +0 -6
  316. package/dist/vue/components/renderers/caret-renderer.vue.d.ts +0 -6
  317. package/dist/vue/components/renderers/circle-renderer.vue.d.ts +0 -6
  318. package/dist/vue/components/renderers/free-text-renderer.vue.d.ts +0 -6
  319. package/dist/vue/components/renderers/highlight-renderer.vue.d.ts +0 -6
  320. package/dist/vue/components/renderers/ink-renderer.vue.d.ts +0 -6
  321. package/dist/vue/components/renderers/line-renderer.vue.d.ts +0 -6
  322. package/dist/vue/components/renderers/link-renderer.vue.d.ts +0 -6
  323. package/dist/vue/components/renderers/polygon-renderer.vue.d.ts +0 -6
  324. package/dist/vue/components/renderers/polyline-renderer.vue.d.ts +0 -6
  325. package/dist/vue/components/renderers/square-renderer.vue.d.ts +0 -6
  326. package/dist/vue/components/renderers/squiggly-renderer.vue.d.ts +0 -6
  327. package/dist/vue/components/renderers/stamp-renderer.vue.d.ts +0 -6
  328. package/dist/vue/components/renderers/strikeout-renderer.vue.d.ts +0 -6
  329. package/dist/vue/components/renderers/text-renderer.vue.d.ts +0 -6
  330. package/dist/vue/components/renderers/underline-renderer.vue.d.ts +0 -6
  331. package/dist/vue/components/text-markup/highlight.vue.d.ts +0 -27
  332. package/dist/vue/components/text-markup/index.d.ts +0 -4
  333. package/dist/vue/components/text-markup/squiggly.vue.d.ts +0 -27
  334. package/dist/vue/components/text-markup/strikeout.vue.d.ts +0 -27
  335. package/dist/vue/components/text-markup/underline.vue.d.ts +0 -27
  336. package/dist/vue/components/text-markup.vue.d.ts +0 -8
  337. package/dist/vue/context/index.d.ts +0 -2
  338. package/dist/vue/context/renderer-registry.d.ts +0 -26
  339. package/dist/vue/context/types.d.ts +0 -129
  340. package/dist/vue/hooks/index.d.ts +0 -2
  341. package/dist/vue/hooks/use-annotation.d.ts +0 -50
  342. package/dist/vue/hooks/use-ios-zoom-prevention.d.ts +0 -7
  343. package/dist/vue/index.cjs +0 -2
  344. package/dist/vue/index.cjs.map +0 -1
  345. package/dist/vue/index.d.ts +0 -6
  346. package/dist/vue/index.js +0 -4984
  347. package/dist/vue/index.js.map +0 -1
  348. package/dist/vue/types.d.ts +0 -94
@@ -1,13 +0,0 @@
1
- import { PdfAnnotationLineEnding } from '@embedpdf/models';
2
- export interface SvgEnding {
3
- d: string;
4
- transform: string;
5
- filled: boolean;
6
- }
7
- /**
8
- * Factory that returns SVG path data and transform attributes for a given line ending.
9
- * It uses a central handler for each ending type to ensure consistency.
10
- */
11
- export declare function createEnding(ending: PdfAnnotationLineEnding | undefined, strokeWidth: number, rad: number, // direction angle in radians of the line segment
12
- px: number, // x-coordinate of the line's endpoint
13
- py: number): SvgEnding | null;
@@ -1,40 +0,0 @@
1
- import { PdfAnnotationObject, PdfAnnotationSubtype } from '@embedpdf/models';
2
- export interface TransformContext<T extends PdfAnnotationObject = PdfAnnotationObject> {
3
- /** The type of transformation being applied */
4
- type: 'move' | 'resize' | 'vertex-edit' | 'rotate' | 'property-update';
5
- /** The changes being applied - can be any properties of the annotation */
6
- changes: Partial<T>;
7
- /** Optional metadata about the transformation */
8
- metadata?: {
9
- maintainAspectRatio?: boolean;
10
- /** Rotation angle in degrees (for 'rotate' transform type) */
11
- rotationAngle?: number;
12
- /** Delta from the initial rotation angle in degrees */
13
- rotationDelta?: number;
14
- /** Center point for rotation (defaults to rect center) */
15
- rotationCenter?: {
16
- x: number;
17
- y: number;
18
- };
19
- /** Whether the rotation input is currently snapped */
20
- isSnapped?: boolean;
21
- /** Snap target angle when isSnapped is true */
22
- snappedAngle?: number;
23
- [key: string]: any;
24
- };
25
- }
26
- export type PatchFunction<T extends PdfAnnotationObject> = (original: T, context: TransformContext<T>) => Partial<T>;
27
- /**
28
- * Registry for annotation-specific patch functions.
29
- * Each patch function knows how to transform its annotation type.
30
- */
31
- export declare class PatchRegistry {
32
- private patches;
33
- register<T extends PdfAnnotationObject>(type: PdfAnnotationSubtype, patchFn: PatchFunction<T>): void;
34
- /**
35
- * Transform an annotation based on the context.
36
- * Returns the transformed properties or just the changes if no patch function exists.
37
- */
38
- transform<T extends PdfAnnotationObject>(annotation: T, context: TransformContext<T>): Partial<T>;
39
- }
40
- export declare const patchRegistry: PatchRegistry;
@@ -1,97 +0,0 @@
1
- import { Rect, Position, LineEndings, PdfAnnotationLineEnding, PdfRectDifferences, PdfFreeTextAnnoObject, getRectCenter, rotatePointAround, rotateVertices, calculateRotatedRectAABB, calculateRotatedRectAABBAroundPoint } from '@embedpdf/models';
2
- export { rotatePointAround as rotatePointAroundCenter, rotateVertices, getRectCenter, calculateRotatedRectAABB, calculateRotatedRectAABBAroundPoint, };
3
- /**
4
- * Calculate the axis-aligned bounding box for rotated vertices.
5
- * @param vertices - The rotated vertices
6
- * @param padding - Optional padding to add around the bounding box
7
- * @returns The axis-aligned bounding box
8
- */
9
- export declare function calculateAABBFromVertices(vertices: Position[], padding?: number): Rect;
10
- /**
11
- * Computes the exact bounding box for a line or polyline, including its endings and stroke width.
12
- * This function uses the central `LINE_ENDING_HANDLERS` to ensure calculations are
13
- * perfectly in sync with the rendering logic.
14
- */
15
- export declare function lineRectWithEndings(vertices: Position[], strokeWidth: number, endings: LineEndings | undefined): Rect;
16
- /**
17
- * Build rect patches for vertex editing.
18
- * For rotated annotations, the tight rect is kept as unrotatedRect and the AABB is
19
- * computed around the new content center so rotation UI follows the edited geometry.
20
- */
21
- export declare function resolveVertexEditRects(original: {
22
- rect: Rect;
23
- unrotatedRect?: Rect;
24
- rotation?: number;
25
- }, tightRect: Rect): {
26
- rect: Rect;
27
- unrotatedRect?: Rect;
28
- };
29
- /**
30
- * Resolve an annotation's effective rotation center in page coordinates.
31
- */
32
- export declare function resolveAnnotationRotationCenter(original: {
33
- rect: Rect;
34
- unrotatedRect?: Rect;
35
- rotation?: number;
36
- }): Position;
37
- /**
38
- * Build rotate patches while preserving an annotation's effective rotation center.
39
- * The incoming unrotated rect may already include a translation (group rotation/orbit).
40
- */
41
- export declare function resolveRotateRects(original: {
42
- rect: Rect;
43
- unrotatedRect?: Rect;
44
- rotation?: number;
45
- }, nextUnrotatedRect: Rect, angleDegrees: number): {
46
- rect: Rect;
47
- unrotatedRect: Rect;
48
- };
49
- /**
50
- * Compensate vertices for rotated vertex editing so the dragged point tracks the cursor
51
- * while the rotation center follows edited geometry.
52
- *
53
- * Without this compensation, changing the tight bounds center during a rotated vertex edit
54
- * applies an additional translation to all points, which appears as opposite-end drift.
55
- */
56
- export declare function compensateRotatedVertexEdit(original: {
57
- rect: Rect;
58
- unrotatedRect?: Rect;
59
- rotation?: number;
60
- }, vertices: Position[], tightRect: Rect): Position[];
61
- /**
62
- * Derive the text box rect from the annotation's overall rect and RD inset.
63
- */
64
- export declare function computeTextBoxFromRD(rect: Rect, rd: PdfRectDifferences | undefined): Rect;
65
- /**
66
- * Compute the RD inset from the overall rect to the text box.
67
- */
68
- export declare function computeRDFromTextBox(overallRect: Rect, textBox: Rect): PdfRectDifferences;
69
- /**
70
- * Auto-compute the callout connection point on the text box edge.
71
- * Uses the knee's position relative to the text box center, scaled by aspect ratio,
72
- * to choose the nearest edge midpoint (top, right, bottom, left).
73
- */
74
- export declare function computeCalloutConnectionPoint(knee: Position, textBox: Rect): Position;
75
- /**
76
- * Compute the overall bounding rect for a callout FreeText, encompassing
77
- * the text box, callout line, and line ending geometry.
78
- *
79
- * The text box border grows inward (stroke outer edge = textBox boundary),
80
- * so no outward padding is added for the text box. The callout line and
81
- * arrow stroke extend outward and miter joins at the knee can protrude
82
- * further, so they get strokeWidth padding (half for stroke + half for
83
- * miter/join clearance).
84
- */
85
- export declare function computeCalloutOverallRect(textBox: Rect, calloutLine: Position[], lineEnding: PdfAnnotationLineEnding | undefined, strokeWidth: number): Rect;
86
- export declare const calloutVertexConfig: {
87
- extractVertices: (a: PdfFreeTextAnnoObject) => Position[];
88
- transformAnnotation: (a: PdfFreeTextAnnoObject, vertices: Position[]) => {
89
- calloutLine?: undefined;
90
- rect?: undefined;
91
- rectangleDifferences?: undefined;
92
- } | {
93
- calloutLine: Position[];
94
- rect: Rect;
95
- rectangleDifferences: PdfRectDifferences;
96
- };
97
- };
@@ -1,3 +0,0 @@
1
- import { PdfFreeTextAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchCalloutFreeText: PatchFunction<PdfFreeTextAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfCircleAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchCircle: PatchFunction<PdfCircleAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfFreeTextAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchFreeText: PatchFunction<PdfFreeTextAnnoObject>;
@@ -1,9 +0,0 @@
1
- export * from './ink.patch';
2
- export * from './line.patch';
3
- export * from './polyline.patch';
4
- export * from './polygon.patch';
5
- export * from './circle.patch';
6
- export * from './square.patch';
7
- export * from './freetext.patch';
8
- export * from './callout-freetext.patch';
9
- export * from './stamp.patch';
@@ -1,3 +0,0 @@
1
- import { PdfInkAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchInk: PatchFunction<PdfInkAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfLineAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchLine: PatchFunction<PdfLineAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfPolygonAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchPolygon: PatchFunction<PdfPolygonAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfPolylineAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchPolyline: PatchFunction<PdfPolylineAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfSquareAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchSquare: PatchFunction<PdfSquareAnnoObject>;
@@ -1,3 +0,0 @@
1
- import { PdfStampAnnoObject } from '@embedpdf/models';
2
- import { PatchFunction } from '../patch-registry';
3
- export declare const patchStamp: PatchFunction<PdfStampAnnoObject>;
@@ -1,6 +0,0 @@
1
- import { Reducer } from '@embedpdf/core';
2
- import { AnnotationAction } from './actions';
3
- import { AnnotationPluginConfig, AnnotationState, AnnotationDocumentState } from './types';
4
- export declare const initialDocumentState: (cfg?: AnnotationPluginConfig) => AnnotationDocumentState;
5
- export declare const initialState: (cfg: AnnotationPluginConfig) => AnnotationState;
6
- export declare const reducer: Reducer<AnnotationState, AnnotationAction>;
@@ -1,139 +0,0 @@
1
- import { AnnotationState, AnnotationDocumentState, SidebarAnnotationEntry, TrackedAnnotation, GroupingAction } from './types';
2
- import { PdfAnnotationSubtype, PdfAnnotationObject } from '@embedpdf/models';
3
- import { ToolMap } from './tools/tools-utils';
4
- /** All annotations _objects_ on a single page (order preserved). */
5
- export declare const getAnnotationsByPageIndex: (s: AnnotationDocumentState, page: number) => TrackedAnnotation<PdfAnnotationObject>[];
6
- /** Shortcut: every page → list of annotation objects. */
7
- export declare const getAnnotations: (s: AnnotationDocumentState) => Record<number, TrackedAnnotation<PdfAnnotationObject>[]>;
8
- /**
9
- * The full `TrackedAnnotation` for the current selection.
10
- * @deprecated Use getSelectedAnnotations() for multi-select support. Returns first selected or null.
11
- */
12
- export declare const getSelectedAnnotation: (s: AnnotationDocumentState) => TrackedAnnotation | null;
13
- /** Get all selected TrackedAnnotations */
14
- export declare const getSelectedAnnotations: (s: AnnotationDocumentState) => TrackedAnnotation[];
15
- /** Get the IDs of all selected annotations */
16
- export declare const getSelectedAnnotationIds: (s: AnnotationDocumentState) => string[];
17
- /** Get a tracked annotation by its ID */
18
- export declare const getAnnotationByUid: (s: AnnotationDocumentState, uid: string) => TrackedAnnotation<PdfAnnotationObject>;
19
- /**
20
- * Get selected annotation on a specific page (single, for backward compatibility)
21
- * @deprecated Use getSelectedAnnotationsByPageIndex() for multi-select support.
22
- */
23
- export declare const getSelectedAnnotationByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation | null;
24
- /** Get all selected annotations on a specific page */
25
- export declare const getSelectedAnnotationsByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation[];
26
- /** Check if a given annotation is in the current selection. */
27
- export declare const isAnnotationSelected: (s: AnnotationDocumentState, id: string) => boolean;
28
- /** Check if multiple annotations are selected */
29
- export declare const hasMultipleSelected: (s: AnnotationDocumentState) => boolean;
30
- /**
31
- * Returns the current defaults for a specific tool by its ID.
32
- * This is fully type-safe and infers the correct return type.
33
- *
34
- * @param state The annotation plugin's state.
35
- * @param toolId The ID of the tool (e.g., 'highlight', 'pen').
36
- * @returns The tool's current `defaults` object, or `undefined` if not found.
37
- */
38
- export declare function getToolDefaultsById<K extends keyof ToolMap>(state: AnnotationState, toolId: K): ToolMap[K]['defaults'] | undefined;
39
- /**
40
- * Collect every sidebar-eligible annotation and attach its TEXT replies,
41
- * grouped by page for efficient rendering.
42
- *
43
- * Annotations linked via IRT / RT=Group are collapsed: the group leader
44
- * becomes the sidebar entry and its non-LINK group members are attached
45
- * as `groupMembers`. This keeps the sidebar compact for tools like
46
- * Replace Text (Caret + StrikeOut pair).
47
- *
48
- * Result shape:
49
- * {
50
- * 0: [{ page: 0, annotation: <TrackedAnnotation>, replies: [ … ], groupMembers: [ … ] }, ...],
51
- * 1: [{ page: 1, annotation: <TrackedAnnotation>, replies: [ … ] }, ...],
52
- * …
53
- * }
54
- */
55
- export declare const getSidebarAnnotationsWithRepliesGroupedByPage: (s: AnnotationDocumentState) => Record<number, SidebarAnnotationEntry[]>;
56
- /**
57
- * Collect every sidebar-eligible annotation and attach its TEXT replies.
58
- *
59
- * Result shape:
60
- * [
61
- * { page: 0, annotation: <TrackedAnnotation>, replies: [ … ] },
62
- * { page: 1, annotation: <TrackedAnnotation>, replies: [ … ] },
63
- * …
64
- * ]
65
- */
66
- export declare const getSidebarAnnotationsWithReplies: (s: AnnotationDocumentState) => SidebarAnnotationEntry[];
67
- /**
68
- * Get all IRT child annotation info for cascade delete.
69
- * Returns array of { id, pageIndex } for each annotation that references parentId.
70
- */
71
- export declare const getIRTChildIds: (s: AnnotationDocumentState, parentId: string) => {
72
- id: string;
73
- pageIndex: number;
74
- }[];
75
- /**
76
- * Check if an annotation has any IRT children (links, replies, etc.)
77
- */
78
- export declare const hasIRTChildren: (s: AnnotationDocumentState, parentId: string) => boolean;
79
- /**
80
- * Get IRT children filtered by annotation type (e.g., only LINK).
81
- * @param s - The annotation document state
82
- * @param parentId - The parent annotation ID
83
- * @param types - Array of annotation subtypes to include
84
- */
85
- export declare const getIRTChildrenByType: (s: AnnotationDocumentState, parentId: string, types: PdfAnnotationSubtype[]) => TrackedAnnotation[];
86
- /**
87
- * Get link annotations attached to a parent annotation via IRT relationship.
88
- * @param s - The annotation document state
89
- * @param parentId - The parent annotation ID
90
- */
91
- export declare const getAttachedLinks: (s: AnnotationDocumentState, parentId: string) => TrackedAnnotation[];
92
- /**
93
- * Check if an annotation has attached link children.
94
- * @param s - The annotation document state
95
- * @param parentId - The parent annotation ID
96
- */
97
- export declare const hasAttachedLinks: (s: AnnotationDocumentState, parentId: string) => boolean;
98
- /**
99
- * Get the leader ID of a group.
100
- * If the annotation has inReplyToId with replyType = Group, return the inReplyToId.
101
- * Otherwise, the annotation itself is the leader.
102
- *
103
- * @param s - The annotation document state
104
- * @param annotationId - The annotation ID to find the group leader for
105
- * @returns The leader annotation ID, or undefined if annotation not found
106
- */
107
- export declare const getGroupLeaderId: (s: AnnotationDocumentState, annotationId: string) => string | undefined;
108
- /**
109
- * Get all annotations in the same group as the given annotation.
110
- * Returns the leader plus all annotations with inReplyToId pointing to leader and replyType = Group.
111
- * Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
112
- * in the user-facing sense.
113
- *
114
- * @param s - The annotation document state
115
- * @param annotationId - Any annotation ID in the group
116
- * @returns Array of TrackedAnnotations in the group (including the annotation itself)
117
- */
118
- export declare const getGroupMembers: (s: AnnotationDocumentState, annotationId: string) => TrackedAnnotation<PdfAnnotationObject>[];
119
- /**
120
- * Check if an annotation is part of a group.
121
- * An annotation is in a group if:
122
- * - It has inReplyToId with replyType = Group (it's a group member), OR
123
- * - It has at least one other annotation pointing to it with replyType = Group (it's a group leader)
124
- *
125
- * Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
126
- * in the user-facing sense. An annotation with only attached links is NOT considered "in a group".
127
- *
128
- * @param s - The annotation document state
129
- * @param annotationId - The annotation ID to check
130
- * @returns true if the annotation is part of a group
131
- */
132
- export declare const isInGroup: (s: AnnotationDocumentState, annotationId: string) => boolean;
133
- /**
134
- * Determine what grouping action is available for the current selection.
135
- *
136
- * @param s - The annotation document state
137
- * @returns The available grouping action
138
- */
139
- export declare const getSelectionGroupingAction: (s: AnnotationDocumentState) => GroupingAction;