@embedpdf/plugin-annotation 2.14.4 → 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 -5237
  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,16 +0,0 @@
1
- import { CSSProperties, MouseEvent } from '../../../react/adapter.ts';
2
- import { Rect } from '@embedpdf/models';
3
- type UnderlineProps = {
4
- /** Stroke/markup color */
5
- strokeColor?: string;
6
- opacity?: number;
7
- segmentRects: Rect[];
8
- rect?: Rect;
9
- scale: number;
10
- onClick?: (e: MouseEvent<HTMLDivElement>) => void;
11
- style?: CSSProperties;
12
- /** When true, AP image provides the visual; only render hit area */
13
- appearanceActive?: boolean;
14
- };
15
- export declare function Underline({ strokeColor, opacity, segmentRects, rect, scale, onClick, style, appearanceActive, }: UnderlineProps): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,7 +0,0 @@
1
- interface TextMarkupProps {
2
- documentId: string;
3
- pageIndex: number;
4
- scale: number;
5
- }
6
- export declare function TextMarkup({ documentId, pageIndex, scale }: TextMarkupProps): import("react/jsx-runtime").JSX.Element | null;
7
- export {};
@@ -1,253 +0,0 @@
1
- import { PdfAnnotationObject, PdfBlendMode, Rect } from '@embedpdf/models';
2
- import { TrackedAnnotation, PreviewState } from '../../index.ts';
3
- import { HandleElementProps, SelectionMenuPropsBase, SelectionMenuRenderFn } from '../../react/utils.ts';
4
- import { JSX, CSSProperties, MouseEvent } from '../../react/adapter.ts';
5
- import { VertexConfig } from '../types';
6
- export type ResizeDirection = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
7
- export interface AnnotationSelectionContext {
8
- type: 'annotation';
9
- annotation: TrackedAnnotation;
10
- pageIndex: number;
11
- /**
12
- * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
13
- * Consumers should disable move/resize/rotate/delete/property-change menu items
14
- * when this is true.
15
- */
16
- structurallyLocked: boolean;
17
- /**
18
- * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
19
- * Consumers should disable content-editing menu items (e.g. FreeText text edit)
20
- * when this is true.
21
- */
22
- contentLocked: boolean;
23
- }
24
- export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
25
- export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
26
- export interface GroupSelectionContext {
27
- type: 'group';
28
- annotations: TrackedAnnotation[];
29
- pageIndex: number;
30
- }
31
- export type GroupSelectionMenuProps = SelectionMenuPropsBase<GroupSelectionContext>;
32
- export type GroupSelectionMenuRenderFn = SelectionMenuRenderFn<GroupSelectionContext>;
33
- export type HandleProps = HandleElementProps & {
34
- backgroundColor?: string;
35
- };
36
- /** UI customization for resize handles */
37
- export interface ResizeHandleUI {
38
- /** Handle size in CSS px (default: 12) */
39
- size?: number;
40
- /** Default background color for the handle (used by default renderer) */
41
- color?: string;
42
- /** Custom renderer for each handle (overrides default) */
43
- component?: (p: HandleProps) => JSX.Element;
44
- }
45
- /** UI customization for vertex handles */
46
- export interface VertexHandleUI {
47
- /** Handle size in CSS px (default: 12) */
48
- size?: number;
49
- /** Default background color for the handle (used by default renderer) */
50
- color?: string;
51
- /** Custom renderer for each vertex (overrides default) */
52
- component?: (p: HandleProps) => JSX.Element;
53
- }
54
- /** Props for the rotation handle component */
55
- export interface RotationHandleComponentProps extends HandleProps {
56
- /** Props for the connector line element */
57
- connectorStyle?: CSSProperties;
58
- /** Whether to show the connector line */
59
- showConnector?: boolean;
60
- /** Color for the icon inside the handle (default: '#007ACC') */
61
- iconColor?: string;
62
- /** Resolved border configuration */
63
- border?: RotationHandleBorder;
64
- }
65
- export type BorderStyle = 'solid' | 'dashed' | 'dotted';
66
- export interface SelectionOutline {
67
- /** Outline color (default: '#007ACC') */
68
- color?: string;
69
- /** Outline style (default: 'solid' for single, 'dashed' for group) */
70
- style?: BorderStyle;
71
- /** Outline width in px (default: 1 for single, 2 for group) */
72
- width?: number;
73
- /** Outline offset in px (default: 1 for single, 2 for group) */
74
- offset?: number;
75
- }
76
- /** Border configuration for the rotation handle */
77
- export interface RotationHandleBorder {
78
- /** Border color (default: '#007ACC') */
79
- color?: string;
80
- /** Border style (default: 'solid') */
81
- style?: BorderStyle;
82
- /** Border width in px (default: 1) */
83
- width?: number;
84
- }
85
- /** UI customization for rotation handle */
86
- export interface RotationHandleUI {
87
- /** Handle size in CSS px (default: 16) */
88
- size?: number;
89
- /** Gap in CSS px between the bounding box edge and the rotation handle center (default: 20) */
90
- margin?: number;
91
- /** Default background color for the handle (default: 'white') */
92
- color?: string;
93
- /** Color for the connector line (default: '#007ACC') */
94
- connectorColor?: string;
95
- /** Whether to show the connector line (default: true) */
96
- showConnector?: boolean;
97
- /** Color for the icon inside the handle (default: '#007ACC') */
98
- iconColor?: string;
99
- /** Border configuration for the handle */
100
- border?: RotationHandleBorder;
101
- /** Custom renderer for the rotation handle (overrides default) */
102
- component?: (p: RotationHandleComponentProps) => JSX.Element;
103
- }
104
- /**
105
- * Props for the custom annotation renderer
106
- */
107
- export interface CustomAnnotationRendererProps<T extends PdfAnnotationObject> {
108
- annotation: T;
109
- children: JSX.Element;
110
- isSelected: boolean;
111
- scale: number;
112
- rotation: number;
113
- pageWidth: number;
114
- pageHeight: number;
115
- pageIndex: number;
116
- onSelect: (event: any) => void;
117
- }
118
- /**
119
- * Custom renderer for an annotation
120
- */
121
- export type CustomAnnotationRenderer<T extends PdfAnnotationObject> = (props: CustomAnnotationRendererProps<T>) => JSX.Element | null;
122
- /**
123
- * Properly typed event for annotation interactions (click, select, etc.)
124
- */
125
- export type AnnotationInteractionEvent = MouseEvent<Element>;
126
- /**
127
- * Props for an annotation renderer entry
128
- */
129
- export interface AnnotationRendererProps<T extends PdfAnnotationObject = PdfAnnotationObject> {
130
- annotation: TrackedAnnotation<T>;
131
- currentObject: T;
132
- isSelected: boolean;
133
- isEditing: boolean;
134
- scale: number;
135
- pageIndex: number;
136
- documentId: string;
137
- onClick?: (e: AnnotationInteractionEvent) => void;
138
- /** When true, AP canvas provides the visual; component should only render hit area */
139
- appearanceActive: boolean;
140
- }
141
- /**
142
- * Helpers passed to selectOverride for custom selection behavior.
143
- */
144
- export interface SelectOverrideHelpers {
145
- defaultSelect: (e: AnnotationInteractionEvent, annotation: TrackedAnnotation) => void;
146
- selectAnnotation: (pageIndex: number, id: string) => void;
147
- clearSelection: () => void;
148
- allAnnotations: TrackedAnnotation[];
149
- pageIndex: number;
150
- }
151
- /**
152
- * Entry for a custom annotation renderer that handles specific annotation types.
153
- * This allows external plugins to provide their own rendering for annotation subtypes.
154
- * Used at definition time for type safety.
155
- */
156
- export interface AnnotationRendererEntry<T extends PdfAnnotationObject = PdfAnnotationObject, P = never> {
157
- /** Unique identifier for this renderer (usually matches tool id) */
158
- id: string;
159
- /** Returns true if this renderer should handle the annotation. Optional for preview-only renderers. */
160
- matches?: (annotation: PdfAnnotationObject) => annotation is T;
161
- /** The component to render the annotation. Optional for preview-only renderers. */
162
- render?: (props: AnnotationRendererProps<T>) => JSX.Element;
163
- /** Returns true if this renderer should handle the given preview state */
164
- matchesPreview?: (preview: PreviewState) => boolean;
165
- /** Render a preview during drag-to-create. P is the preview data type. */
166
- renderPreview?: (props: {
167
- data: P;
168
- bounds: Rect;
169
- scale: number;
170
- }) => JSX.Element;
171
- /** Extra styles merged onto the preview container div (e.g. mixBlendMode for ink). */
172
- previewContainerStyle?: (props: {
173
- data: P;
174
- bounds: Rect;
175
- scale: number;
176
- }) => CSSProperties;
177
- /** Vertex configuration for annotations with draggable vertices (line, polyline, polygon) */
178
- vertexConfig?: VertexConfig<T>;
179
- /** z-index for the annotation container (default: 1, text markup uses 0) */
180
- zIndex?: number;
181
- /** Default blend mode for this annotation type (used when annotation.blendMode is not set) */
182
- defaultBlendMode?: PdfBlendMode;
183
- /** Style applied to the annotation container — overrides the default blend-mode style. */
184
- containerStyle?: (annotation: T) => CSSProperties;
185
- /** Type-specific interaction fallbacks used when the tool doesn't define a property */
186
- interactionDefaults?: {
187
- isDraggable?: boolean;
188
- isResizable?: boolean;
189
- isRotatable?: boolean;
190
- lockAspectRatio?: boolean;
191
- };
192
- /** Whether this annotation type uses AP rendering before editing (default: true) */
193
- useAppearanceStream?: boolean;
194
- /** Override resolved isDraggable (e.g., FreeText disables drag while editing) */
195
- isDraggable?: (toolDraggable: boolean, context: {
196
- isEditing: boolean;
197
- }) => boolean;
198
- /** Handle double-click on the annotation container */
199
- onDoubleClick?: (annotationId: string, setEditingId: (id: string) => void) => void;
200
- /** Override default selection behavior (e.g., Link IRT parent resolution) */
201
- selectOverride?: (e: AnnotationInteractionEvent, annotation: TrackedAnnotation<T>, helpers: SelectOverrideHelpers) => void;
202
- /** Return true to hide the selection menu for this annotation */
203
- hideSelectionMenu?: (annotation: T) => boolean;
204
- /** When true, the annotation is completely hidden when locked (e.g., form widgets defer to the form-filling layer). */
205
- hiddenWhenLocked?: boolean;
206
- /** Optional locked-mode renderer. When the annotation is locked, this replaces `render` inside the container. */
207
- renderLocked?: (props: AnnotationRendererProps<T>) => JSX.Element;
208
- }
209
- /**
210
- * Boxed renderer that encapsulates type safety internally.
211
- * The generic is erased -- this is what the registry actually stores.
212
- */
213
- export interface BoxedAnnotationRenderer {
214
- id: string;
215
- matches: (annotation: PdfAnnotationObject) => boolean;
216
- render: (props: AnnotationRendererProps) => JSX.Element;
217
- matchesPreview?: (preview: PreviewState) => boolean;
218
- renderPreview?: (props: {
219
- data: unknown;
220
- bounds: Rect;
221
- scale: number;
222
- }) => JSX.Element;
223
- previewContainerStyle?: (props: {
224
- data: unknown;
225
- bounds: Rect;
226
- scale: number;
227
- }) => CSSProperties;
228
- vertexConfig?: VertexConfig<PdfAnnotationObject>;
229
- zIndex?: number;
230
- defaultBlendMode?: PdfBlendMode;
231
- /** Style applied to the annotation container — overrides the default blend-mode style. */
232
- containerStyle?: (annotation: PdfAnnotationObject) => CSSProperties;
233
- interactionDefaults?: {
234
- isDraggable?: boolean;
235
- isResizable?: boolean;
236
- isRotatable?: boolean;
237
- lockAspectRatio?: boolean;
238
- };
239
- useAppearanceStream?: boolean;
240
- isDraggable?: (toolDraggable: boolean, context: {
241
- isEditing: boolean;
242
- }) => boolean;
243
- onDoubleClick?: (annotationId: string, setEditingId: (id: string) => void) => void;
244
- selectOverride?: (e: AnnotationInteractionEvent, annotation: TrackedAnnotation, helpers: SelectOverrideHelpers) => void;
245
- hideSelectionMenu?: (annotation: PdfAnnotationObject) => boolean;
246
- hiddenWhenLocked?: boolean;
247
- renderLocked?: (props: AnnotationRendererProps) => JSX.Element;
248
- }
249
- /**
250
- * Creates a boxed renderer from a typed entry.
251
- * Type safety is enforced at definition time, then erased for storage.
252
- */
253
- export declare function createRenderer<T extends PdfAnnotationObject, P = never>(entry: AnnotationRendererEntry<T, P>): BoxedAnnotationRenderer;
@@ -1 +0,0 @@
1
- export * from './renderer-registry';
@@ -1,21 +0,0 @@
1
- import { ReactNode } from '../../react/adapter.ts';
2
- import { BoxedAnnotationRenderer } from '../components/types';
3
- type RegisterFn = (entries: BoxedAnnotationRenderer[]) => () => void;
4
- export declare function AnnotationRendererProvider({ children }: {
5
- children: ReactNode;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- /**
8
- * Hook to register annotation renderers. Handles all registration lifecycle internally.
9
- * Plugin authors just call this with their renderers array.
10
- */
11
- export declare function useRegisterRenderers(renderers: BoxedAnnotationRenderer[]): void;
12
- /**
13
- * Hook to get all registered renderers (for rendering components).
14
- */
15
- export declare function useRegisteredRenderers(): BoxedAnnotationRenderer[];
16
- /**
17
- * Low-level hook if someone needs direct access to register function.
18
- * Most plugins should use useRegisterRenderers instead.
19
- */
20
- export declare function useRendererRegistry(): RegisterFn | null;
21
- export {};
@@ -1,2 +0,0 @@
1
- export * from './use-annotation';
2
- export * from './use-ios-zoom-prevention';
@@ -1,19 +0,0 @@
1
- import { AnnotationPlugin, AnnotationDocumentState } from '../../index.ts';
2
- export declare const useAnnotationPlugin: () => {
3
- plugin: AnnotationPlugin | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- export declare const useAnnotationCapability: () => {
8
- provides: Readonly<import('../../index.ts').AnnotationCapability<import('../../index.ts').AnnotationToolMap>> | null;
9
- isLoading: boolean;
10
- ready: Promise<void>;
11
- };
12
- /**
13
- * Hook for annotation state for a specific document
14
- * @param documentId Document ID
15
- */
16
- export declare const useAnnotation: (documentId: string) => {
17
- state: AnnotationDocumentState;
18
- provides: import('../../index.ts').AnnotationScope<import('../../index.ts').AnnotationToolMap> | null;
19
- };
@@ -1,16 +0,0 @@
1
- import { CSSProperties } from '../../react/adapter.ts';
2
- /**
3
- * Prevents iOS Safari from auto-zooming when a focused input's computed
4
- * font-size is below 16px. Returns an adjusted font size and optional
5
- * wrapper style that uses `transform: scale()` to visually match the
6
- * intended size while keeping the real font at >= 16px.
7
- *
8
- * @param computedFontPx - The intended on-screen font size (fontSize * scale)
9
- * @param active - Whether compensation should apply (e.g. isEditing, or always true for form inputs)
10
- */
11
- export declare function useIOSZoomPrevention(computedFontPx: number, active: boolean): {
12
- needsComp: boolean;
13
- adjustedFontPx: number;
14
- scaleComp: number;
15
- wrapperStyle: CSSProperties | undefined;
16
- };
@@ -1,6 +0,0 @@
1
- export * from './hooks';
2
- export * from './components';
3
- export * from './components/types';
4
- export * from './context';
5
- export * from '../index.ts';
6
- export declare const AnnotationPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../index.ts').AnnotationPlugin, import('../index.ts').AnnotationPluginConfig, import('../index.ts').AnnotationState, import('../lib/actions').AnnotationAction>>;
@@ -1,10 +0,0 @@
1
- import { PdfAnnotationObject, Position } from '@embedpdf/models';
2
- /**
3
- * Interface for vertex configuration - handles annotation-specific vertex logic
4
- */
5
- export interface VertexConfig<T extends PdfAnnotationObject> {
6
- /** Extract vertices from annotation - handles different vertex formats */
7
- extractVertices: (annotation: T) => Position[];
8
- /** Transform annotation when vertices change */
9
- transformAnnotation: (annotation: T, vertices: Position[]) => Partial<T>;
10
- }
@@ -1,14 +0,0 @@
1
- import { Rotation } from '@embedpdf/models';
2
- import { TrackedAnnotation } from '../lib/index.ts';
3
- export interface ScreenBounds {
4
- left: number;
5
- top: number;
6
- right: number;
7
- bottom: number;
8
- }
9
- /**
10
- * Compute the screen-space bounding box of an annotation, correctly accounting
11
- * for `noZoom` (constant pixel size regardless of zoom) and `noRotate`
12
- * (visually upright regardless of page rotation) annotation flags.
13
- */
14
- export declare function getAnnotationScreenBounds(annotation: TrackedAnnotation, scale: number, rotation: Rotation): ScreenBounds;
@@ -1,71 +0,0 @@
1
- import { PdfAnnotationObject, AnnotationAppearances, CssBlendMode } from '@embedpdf/models';
2
- import { TrackedAnnotation } from '../../lib/index.ts';
3
- import { JSX, CSSProperties } from '../../preact/adapter.ts';
4
- import { CustomAnnotationRenderer, ResizeHandleUI, AnnotationSelectionMenuRenderFn, AnnotationInteractionEvent, VertexHandleUI, RotationHandleUI, GroupSelectionMenuRenderFn, BoxedAnnotationRenderer, SelectionOutline } from './types';
5
- import { VertexConfig } from '../types';
6
- interface AnnotationContainerProps<T extends PdfAnnotationObject> {
7
- scale: number;
8
- documentId: string;
9
- pageIndex: number;
10
- rotation: number;
11
- pageWidth: number;
12
- pageHeight: number;
13
- trackedAnnotation: TrackedAnnotation<T>;
14
- children: JSX.Element | ((annotation: T, options: {
15
- appearanceActive: boolean;
16
- }) => JSX.Element);
17
- isSelected: boolean;
18
- /** Whether the annotation is in editing mode (e.g., FreeText text editing) */
19
- isEditing?: boolean;
20
- /** Whether multiple annotations are selected (container becomes passive) */
21
- isMultiSelected?: boolean;
22
- isDraggable: boolean;
23
- isResizable: boolean;
24
- isRotatable?: boolean;
25
- lockAspectRatio?: boolean;
26
- style?: CSSProperties;
27
- vertexConfig?: VertexConfig<T>;
28
- selectionMenu?: AnnotationSelectionMenuRenderFn;
29
- /**
30
- * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
31
- * Threaded into the selection menu context so custom menus can disable move/
32
- * resize/rotate/delete/property-change items without recomputing flags.
33
- */
34
- structurallyLocked?: boolean;
35
- /**
36
- * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
37
- * Threaded into the selection menu context so custom menus can disable content
38
- * edit items without recomputing flags.
39
- */
40
- contentLocked?: boolean;
41
- /** @deprecated Use `selectionOutline.offset` instead */
42
- outlineOffset?: number;
43
- onDoubleClick?: (event: any) => void;
44
- onSelect: (event: AnnotationInteractionEvent) => void;
45
- /** Pre-rendered appearance stream images for AP mode rendering */
46
- appearance?: AnnotationAppearances<Blob> | null;
47
- /** Blend mode applied only to the visual content (children + AP image), not to interaction handles */
48
- blendMode?: CssBlendMode;
49
- zIndex?: number;
50
- resizeUI?: ResizeHandleUI;
51
- vertexUI?: VertexHandleUI;
52
- rotationUI?: RotationHandleUI;
53
- /** @deprecated Use `selectionOutline.color` instead */
54
- selectionOutlineColor?: string;
55
- /** Customize the selection outline (color, style, width, offset) */
56
- selectionOutline?: SelectionOutline;
57
- customAnnotationRenderer?: CustomAnnotationRenderer<T>;
58
- /** Passed from parent but not used - destructured to prevent DOM spread */
59
- groupSelectionMenu?: GroupSelectionMenuRenderFn;
60
- /** Passed from parent but not used - destructured to prevent DOM spread */
61
- groupSelectionOutline?: SelectionOutline;
62
- /** Passed from parent but not used - destructured to prevent DOM spread */
63
- annotationRenderers?: BoxedAnnotationRenderer[];
64
- }
65
- /**
66
- * AnnotationContainer wraps individual annotations with interaction handles.
67
- * When isMultiSelected is true, the container becomes passive - drag/resize
68
- * is handled by the GroupSelectionBox instead.
69
- */
70
- export declare function AnnotationContainer<T extends PdfAnnotationObject>({ scale, documentId, pageIndex, rotation, pageWidth, pageHeight, trackedAnnotation, children, isSelected, isEditing, isMultiSelected, isDraggable, isResizable, isRotatable, lockAspectRatio, style, blendMode, vertexConfig, selectionMenu, structurallyLocked, contentLocked, outlineOffset, onDoubleClick, onSelect, appearance, zIndex, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, customAnnotationRenderer, groupSelectionMenu: _groupSelectionMenu, groupSelectionOutline: _groupSelectionOutline, annotationRenderers: _annotationRenderers, ...props }: AnnotationContainerProps<T>): JSX.Element;
71
- export {};
@@ -1,33 +0,0 @@
1
- import { HTMLAttributes, CSSProperties } from '../../preact/adapter.ts';
2
- import { ResizeHandleUI, VertexHandleUI, RotationHandleUI, SelectionOutline, CustomAnnotationRenderer, AnnotationSelectionMenuRenderFn, GroupSelectionMenuRenderFn, BoxedAnnotationRenderer } from './types';
3
- import { PdfAnnotationObject } from '@embedpdf/models';
4
- type AnnotationLayerProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
5
- /** The ID of the document that this layer displays annotations for */
6
- documentId: string;
7
- pageIndex: number;
8
- scale?: number;
9
- rotation?: number;
10
- /** Customize selection menu across all annotations on this layer */
11
- selectionMenu?: AnnotationSelectionMenuRenderFn;
12
- /** Customize group selection menu across all annotations on this layer */
13
- groupSelectionMenu?: GroupSelectionMenuRenderFn;
14
- style?: CSSProperties;
15
- /** Customize resize handles */
16
- resizeUI?: ResizeHandleUI;
17
- /** Customize vertex handles */
18
- vertexUI?: VertexHandleUI;
19
- /** Customize rotation handle */
20
- rotationUI?: RotationHandleUI;
21
- /** @deprecated Use `selectionOutline` instead */
22
- selectionOutlineColor?: string;
23
- /** Customize the selection outline for individual annotations */
24
- selectionOutline?: SelectionOutline;
25
- /** Customize the selection outline for the group selection box (falls back to selectionOutline) */
26
- groupSelectionOutline?: SelectionOutline;
27
- /** Customize annotation renderer */
28
- customAnnotationRenderer?: CustomAnnotationRenderer<PdfAnnotationObject>;
29
- /** Custom renderers for specific annotation types (provided by external plugins) */
30
- annotationRenderers?: BoxedAnnotationRenderer[];
31
- };
32
- export declare function AnnotationLayer({ style, documentId, pageIndex, scale: overrideScale, rotation: overrideRotation, selectionMenu, groupSelectionMenu, resizeUI, vertexUI, rotationUI, selectionOutlineColor, selectionOutline, groupSelectionOutline, customAnnotationRenderer, annotationRenderers, ...props }: AnnotationLayerProps): import("preact").JSX.Element;
33
- export {};
@@ -1 +0,0 @@
1
- export declare function AnnotationNavigationHandler(): null;
@@ -1,7 +0,0 @@
1
- interface Props {
2
- documentId: string;
3
- pageIndex: number;
4
- scale: number;
5
- }
6
- export declare function AnnotationPaintLayer({ documentId, pageIndex, scale }: Props): import("preact").JSX.Element;
7
- export {};
@@ -1,15 +0,0 @@
1
- import { Rect, PdfAnnotationLineEnding, Position } from '@embedpdf/models';
2
- interface CalloutFreeTextPreviewProps {
3
- calloutLine?: Position[];
4
- textBox?: Rect;
5
- bounds: Rect;
6
- scale: number;
7
- strokeColor?: string;
8
- strokeWidth?: number;
9
- color?: string;
10
- backgroundColor?: string;
11
- opacity?: number;
12
- lineEnding?: PdfAnnotationLineEnding;
13
- }
14
- export declare function CalloutFreeTextPreview({ calloutLine, textBox, bounds, scale, strokeColor, strokeWidth, color, backgroundColor, opacity, lineEnding, }: CalloutFreeTextPreviewProps): import("preact").JSX.Element;
15
- export {};
@@ -1,15 +0,0 @@
1
- import { MouseEvent } from '../../../preact/adapter.ts';
2
- import { PdfFreeTextAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '../../../lib/index.ts';
4
- interface CalloutFreeTextProps {
5
- documentId: string;
6
- isSelected: boolean;
7
- isEditing: boolean;
8
- annotation: TrackedAnnotation<PdfFreeTextAnnoObject>;
9
- pageIndex: number;
10
- scale: number;
11
- onClick?: (e: MouseEvent<Element>) => void;
12
- appearanceActive?: boolean;
13
- }
14
- export declare function CalloutFreeText({ documentId, isSelected, isEditing, annotation, pageIndex, scale, onClick, appearanceActive, }: CalloutFreeTextProps): import("preact").JSX.Element;
15
- export {};
@@ -1,24 +0,0 @@
1
- import { MouseEvent } from '../../../preact/adapter.ts';
2
- import { Rect } from '@embedpdf/models';
3
- interface CaretProps {
4
- /** Whether the annotation is selected */
5
- isSelected: boolean;
6
- /** Stroke colour */
7
- strokeColor?: string;
8
- /** 0 – 1 */
9
- opacity?: number;
10
- /** Bounding box of the annotation (PDF units) */
11
- rect: Rect;
12
- /** Current page zoom factor */
13
- scale: number;
14
- /** Click handler (used for selection) */
15
- onClick?: (e: MouseEvent<SVGElement>) => void;
16
- /** When true, AP canvas provides the visual; only render hit area */
17
- appearanceActive?: boolean;
18
- }
19
- /**
20
- * Renders a PDF Caret annotation as an SVG ^ symbol using bezier curves
21
- * that mirror the C++ appearance stream.
22
- */
23
- export declare function Caret({ isSelected, strokeColor, opacity, rect, scale, onClick, appearanceActive, }: CaretProps): JSX.Element;
24
- export {};
@@ -1,35 +0,0 @@
1
- import { MouseEvent } from '../../../preact/adapter.ts';
2
- import { PdfAnnotationBorderStyle, PdfRectDifferences, Rect } from '@embedpdf/models';
3
- interface CircleProps {
4
- /** Whether the annotation is selected */
5
- isSelected: boolean;
6
- /** Fill colour – defaults to PDFium's black if omitted */
7
- color?: string;
8
- /** Stroke colour – defaults to same as fill when omitted */
9
- strokeColor?: string;
10
- /** 0 – 1 */
11
- opacity?: number;
12
- /** Stroke width in PDF units */
13
- strokeWidth: number;
14
- /** Stroke type – defaults to solid when omitted */
15
- strokeStyle?: PdfAnnotationBorderStyle;
16
- /** Stroke dash array – defaults to undefined when omitted */
17
- strokeDashArray?: number[];
18
- /** Bounding box of the annotation */
19
- rect: Rect;
20
- /** Current page zoom factor */
21
- scale: number;
22
- /** Click handler (used for selection) */
23
- onClick?: (e: MouseEvent<SVGElement>) => void;
24
- /** When true, AP canvas provides the visual; only render hit area */
25
- appearanceActive?: boolean;
26
- /** Cloudy border intensity (0 = no cloud, typically 1 or 2) */
27
- cloudyBorderIntensity?: number;
28
- /** Rectangle differences – inset from Rect to drawn area */
29
- rectangleDifferences?: PdfRectDifferences;
30
- }
31
- /**
32
- * Renders a PDF Circle annotation (ellipse) as SVG.
33
- */
34
- export declare function Circle({ color, strokeColor, opacity, strokeWidth, strokeStyle, strokeDashArray, rect, scale, onClick, isSelected, appearanceActive, cloudyBorderIntensity, rectangleDifferences, }: CircleProps): JSX.Element;
35
- export {};
@@ -1,17 +0,0 @@
1
- import { MouseEvent } from '../../../preact/adapter.ts';
2
- import { PdfFreeTextAnnoObject } from '@embedpdf/models';
3
- import { TrackedAnnotation } from '../../../lib/index.ts';
4
- interface FreeTextProps {
5
- documentId: string;
6
- isSelected: boolean;
7
- isEditing: boolean;
8
- annotation: TrackedAnnotation<PdfFreeTextAnnoObject>;
9
- pageIndex: number;
10
- scale: number;
11
- onClick?: (e: MouseEvent<HTMLDivElement>) => void;
12
- onDoubleClick?: (event: MouseEvent<HTMLDivElement>) => void;
13
- /** When true, AP canvas provides the visual; hide text content */
14
- appearanceActive?: boolean;
15
- }
16
- export declare function FreeText({ documentId, isSelected, isEditing, annotation, pageIndex, scale, onClick, appearanceActive, }: FreeTextProps): import("preact").JSX.Element;
17
- export {};
@@ -1,27 +0,0 @@
1
- import { MouseEvent } from '../../../preact/adapter.ts';
2
- import { PdfInkListObject, Rect } from '@embedpdf/models';
3
- interface InkProps {
4
- /** Whether the annotation is selected */
5
- isSelected: boolean;
6
- /** Stroke color */
7
- strokeColor?: string;
8
- /** 0 – 1 */
9
- opacity?: number;
10
- /** Line width in PDF units */
11
- strokeWidth: number;
12
- /** Array of strokes — exactly as in your JSON */
13
- inkList: PdfInkListObject[];
14
- /** Bounding box of the whole annotation */
15
- rect: Rect;
16
- /** Page zoom factor */
17
- scale: number;
18
- /** Callback for when the annotation is clicked */
19
- onClick?: (e: MouseEvent<SVGPathElement>) => void;
20
- /** When true, AP canvas provides the visual; only render hit area */
21
- appearanceActive?: boolean;
22
- }
23
- /**
24
- * Renders a PDF Ink annotation (free-hand drawing) as SVG.
25
- */
26
- export declare function Ink({ isSelected, strokeColor, opacity, strokeWidth, inkList, rect, scale, onClick, appearanceActive, }: InkProps): JSX.Element;
27
- export {};