@embedpdf/vue 0.0.0-stage → 3.0.0-next.15

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 (405) hide show
  1. package/LICENSE +192 -0
  2. package/README.md +258 -2
  3. package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs +124 -0
  4. package/dist/Anchored.vue_vue_type_script_setup_true_lang-BEImlFso.cjs.map +1 -0
  5. package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js +125 -0
  6. package/dist/Anchored.vue_vue_type_script_setup_true_lang-Brhh5jyF.js.map +1 -0
  7. package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs +20 -0
  8. package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-BwtHXw73.cjs.map +1 -0
  9. package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js +21 -0
  10. package/dist/AnchoredScope.vue_vue_type_script_setup_true_lang-Ulkr3a6R.js.map +1 -0
  11. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js +191 -0
  12. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-CtTu1FGX.js.map +1 -0
  13. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs +190 -0
  14. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-loLSm4lV.cjs.map +1 -0
  15. package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs +682 -0
  16. package/dist/FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs.map +1 -0
  17. package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js +683 -0
  18. package/dist/FormLayer.vue_vue_type_script_setup_true_lang-DUqft-xs.js.map +1 -0
  19. package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs +174 -0
  20. package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs.map +1 -0
  21. package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js +175 -0
  22. package/dist/LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js.map +1 -0
  23. package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js +33 -0
  24. package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js.map +1 -0
  25. package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs +32 -0
  26. package/dist/PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs.map +1 -0
  27. package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs +151 -0
  28. package/dist/PageView.vue_vue_type_script_setup_true_lang-CjrpumX2.cjs.map +1 -0
  29. package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js +152 -0
  30. package/dist/PageView.vue_vue_type_script_setup_true_lang-O4AFc0_R.js.map +1 -0
  31. package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs +480 -0
  32. package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-DrOORC1H.cjs.map +1 -0
  33. package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js +481 -0
  34. package/dist/Scrollbar.vue_vue_type_script_setup_true_lang-HbCryx1B.js.map +1 -0
  35. package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js +118 -0
  36. package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-BlLIPH1B.js.map +1 -0
  37. package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs +117 -0
  38. package/dist/SearchLayer.vue_vue_type_script_setup_true_lang-CQozZCvB.cjs.map +1 -0
  39. package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js +302 -0
  40. package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C4TUDuyu.js.map +1 -0
  41. package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs +301 -0
  42. package/dist/SelectionClipboard.vue_vue_type_script_setup_true_lang-C8T9q6Kb.cjs.map +1 -0
  43. package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs +38 -0
  44. package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs.map +1 -0
  45. package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js +39 -0
  46. package/dist/SvgShapes.vue_vue_type_script_setup_true_lang-fOTs4aqv.js.map +1 -0
  47. package/dist/actions.cjs +42 -0
  48. package/dist/actions.cjs.map +1 -0
  49. package/dist/actions.d.cts +41 -0
  50. package/dist/actions.d.ts +41 -0
  51. package/dist/actions.js +37 -0
  52. package/dist/actions.js.map +1 -0
  53. package/dist/anchored/Anchored.vue.d.cts +40 -0
  54. package/dist/anchored/Anchored.vue.d.ts +40 -0
  55. package/dist/anchored/AnchoredScope.vue.d.cts +17 -0
  56. package/dist/anchored/AnchoredScope.vue.d.ts +17 -0
  57. package/dist/anchored/PlacedAnchored.vue.d.cts +19 -0
  58. package/dist/anchored/PlacedAnchored.vue.d.ts +19 -0
  59. package/dist/anchored/projector.d.cts +32 -0
  60. package/dist/anchored/projector.d.ts +32 -0
  61. package/dist/anchored.cjs +13 -0
  62. package/dist/anchored.cjs.map +1 -0
  63. package/dist/anchored.d.cts +15 -0
  64. package/dist/anchored.d.ts +15 -0
  65. package/dist/anchored.js +13 -0
  66. package/dist/anchored.js.map +1 -0
  67. package/dist/annotation/AnnotationChrome.vue.d.cts +20 -0
  68. package/dist/annotation/AnnotationChrome.vue.d.ts +20 -0
  69. package/dist/annotation/AnnotationDraftMenu.vue.d.cts +26 -0
  70. package/dist/annotation/AnnotationDraftMenu.vue.d.ts +26 -0
  71. package/dist/annotation/AnnotationFrame.vue.d.cts +25 -0
  72. package/dist/annotation/AnnotationFrame.vue.d.ts +25 -0
  73. package/dist/annotation/AnnotationLayer.vue.d.cts +23 -0
  74. package/dist/annotation/AnnotationLayer.vue.d.ts +23 -0
  75. package/dist/annotation/AnnotationLook.vue.d.cts +21 -0
  76. package/dist/annotation/AnnotationLook.vue.d.ts +21 -0
  77. package/dist/annotation/AnnotationMenu.vue.d.cts +23 -0
  78. package/dist/annotation/AnnotationMenu.vue.d.ts +23 -0
  79. package/dist/annotation/AnnotationRotationBadge.vue.d.cts +26 -0
  80. package/dist/annotation/AnnotationRotationBadge.vue.d.ts +26 -0
  81. package/dist/annotation/AnnotationScene.vue.d.cts +7 -0
  82. package/dist/annotation/AnnotationScene.vue.d.ts +7 -0
  83. package/dist/annotation/FreeTextBox.vue.d.cts +9 -0
  84. package/dist/annotation/FreeTextBox.vue.d.ts +9 -0
  85. package/dist/annotation/NativeDrawing.vue.d.cts +10 -0
  86. package/dist/annotation/NativeDrawing.vue.d.ts +10 -0
  87. package/dist/annotation/StampGhost.vue.d.cts +7 -0
  88. package/dist/annotation/StampGhost.vue.d.ts +7 -0
  89. package/dist/annotation/composables.d.cts +76 -0
  90. package/dist/annotation/composables.d.ts +76 -0
  91. package/dist/annotation/state.d.cts +19 -0
  92. package/dist/annotation/state.d.ts +19 -0
  93. package/dist/annotation/text-box.d.cts +27 -0
  94. package/dist/annotation/text-box.d.ts +27 -0
  95. package/dist/annotation/types.d.cts +154 -0
  96. package/dist/annotation/types.d.ts +154 -0
  97. package/dist/annotation.cjs +29 -0
  98. package/dist/annotation.cjs.map +1 -0
  99. package/dist/annotation.d.cts +35 -0
  100. package/dist/annotation.d.ts +35 -0
  101. package/dist/annotation.js +23 -0
  102. package/dist/annotation.js.map +1 -0
  103. package/dist/capabilities-C7YzgPCX.js +164 -0
  104. package/dist/capabilities-C7YzgPCX.js.map +1 -0
  105. package/dist/capabilities-DVNJmgy7.cjs +163 -0
  106. package/dist/capabilities-DVNJmgy7.cjs.map +1 -0
  107. package/dist/commands.cjs +81 -0
  108. package/dist/commands.cjs.map +1 -0
  109. package/dist/commands.d.cts +61 -0
  110. package/dist/commands.d.ts +61 -0
  111. package/dist/commands.js +76 -0
  112. package/dist/commands.js.map +1 -0
  113. package/dist/composables-BGBsNDf9.cjs +25 -0
  114. package/dist/composables-BGBsNDf9.cjs.map +1 -0
  115. package/dist/composables-BuHvnUlo.cjs +1003 -0
  116. package/dist/composables-BuHvnUlo.cjs.map +1 -0
  117. package/dist/composables-CIkhKwAg.js +1004 -0
  118. package/dist/composables-CIkhKwAg.js.map +1 -0
  119. package/dist/composables-DwsZdg06.js +26 -0
  120. package/dist/composables-DwsZdg06.js.map +1 -0
  121. package/dist/dev-CtMlvxjZ.js +17 -0
  122. package/dist/dev-CtMlvxjZ.js.map +1 -0
  123. package/dist/dev-eeIS2B4c.cjs +16 -0
  124. package/dist/dev-eeIS2B4c.cjs.map +1 -0
  125. package/dist/dev.d.cts +11 -0
  126. package/dist/dev.d.ts +11 -0
  127. package/dist/documents-DUu5H4yH.js +34 -0
  128. package/dist/documents-DUu5H4yH.js.map +1 -0
  129. package/dist/documents-TQ1fMdWI.cjs +33 -0
  130. package/dist/documents-TQ1fMdWI.cjs.map +1 -0
  131. package/dist/form/ButtonControl.vue.d.cts +11 -0
  132. package/dist/form/ButtonControl.vue.d.ts +11 -0
  133. package/dist/form/ComboControl.vue.d.cts +11 -0
  134. package/dist/form/ComboControl.vue.d.ts +11 -0
  135. package/dist/form/FieldPictures.vue.d.cts +3 -0
  136. package/dist/form/FieldPictures.vue.d.ts +3 -0
  137. package/dist/form/FormFocusRing.vue.d.cts +8 -0
  138. package/dist/form/FormFocusRing.vue.d.ts +8 -0
  139. package/dist/form/FormLayer.vue.d.cts +3 -0
  140. package/dist/form/FormLayer.vue.d.ts +3 -0
  141. package/dist/form/ListControl.vue.d.cts +11 -0
  142. package/dist/form/ListControl.vue.d.ts +11 -0
  143. package/dist/form/NativeListBox.vue.d.cts +27 -0
  144. package/dist/form/NativeListBox.vue.d.ts +27 -0
  145. package/dist/form/SignatureControl.vue.d.cts +11 -0
  146. package/dist/form/SignatureControl.vue.d.ts +11 -0
  147. package/dist/form/TextControl.vue.d.cts +11 -0
  148. package/dist/form/TextControl.vue.d.ts +11 -0
  149. package/dist/form/ToggleControl.vue.d.cts +11 -0
  150. package/dist/form/ToggleControl.vue.d.ts +11 -0
  151. package/dist/form/composables.d.cts +52 -0
  152. package/dist/form/composables.d.ts +52 -0
  153. package/dist/form/widget-box.d.cts +34 -0
  154. package/dist/form/widget-box.d.ts +34 -0
  155. package/dist/form.cjs +17 -0
  156. package/dist/form.cjs.map +1 -0
  157. package/dist/form.d.cts +12 -0
  158. package/dist/form.d.ts +12 -0
  159. package/dist/form.js +11 -0
  160. package/dist/form.js.map +1 -0
  161. package/dist/history.cjs +22 -0
  162. package/dist/history.cjs.map +1 -0
  163. package/dist/history.d.cts +31 -0
  164. package/dist/history.d.ts +31 -0
  165. package/dist/history.js +17 -0
  166. package/dist/history.js.map +1 -0
  167. package/dist/i18n.cjs +29 -0
  168. package/dist/i18n.cjs.map +1 -0
  169. package/dist/i18n.d.cts +36 -0
  170. package/dist/i18n.d.ts +36 -0
  171. package/dist/i18n.js +24 -0
  172. package/dist/i18n.js.map +1 -0
  173. package/dist/index.cjs +391 -0
  174. package/dist/index.cjs.map +1 -0
  175. package/dist/index.d.cts +30 -0
  176. package/dist/index.d.ts +30 -0
  177. package/dist/index.js +223 -0
  178. package/dist/index.js.map +1 -0
  179. package/dist/interaction/PagePointerSource.vue.d.cts +3 -0
  180. package/dist/interaction/PagePointerSource.vue.d.ts +3 -0
  181. package/dist/interaction.cjs +63 -0
  182. package/dist/interaction.cjs.map +1 -0
  183. package/dist/interaction.d.cts +40 -0
  184. package/dist/interaction.d.ts +40 -0
  185. package/dist/interaction.js +47 -0
  186. package/dist/interaction.js.map +1 -0
  187. package/dist/link/LinkAnchor.vue.d.cts +9 -0
  188. package/dist/link/LinkAnchor.vue.d.ts +9 -0
  189. package/dist/link/LinkLayer.vue.d.cts +22 -0
  190. package/dist/link/LinkLayer.vue.d.ts +22 -0
  191. package/dist/link/composables.d.cts +29 -0
  192. package/dist/link/composables.d.ts +29 -0
  193. package/dist/link.cjs +14 -0
  194. package/dist/link.cjs.map +1 -0
  195. package/dist/link.d.cts +11 -0
  196. package/dist/link.d.ts +11 -0
  197. package/dist/link.js +8 -0
  198. package/dist/link.js.map +1 -0
  199. package/dist/measurement.cjs +43 -0
  200. package/dist/measurement.cjs.map +1 -0
  201. package/dist/measurement.d.cts +51 -0
  202. package/dist/measurement.d.ts +51 -0
  203. package/dist/measurement.js +38 -0
  204. package/dist/measurement.js.map +1 -0
  205. package/dist/metadata.cjs +22 -0
  206. package/dist/metadata.cjs.map +1 -0
  207. package/dist/metadata.d.cts +31 -0
  208. package/dist/metadata.d.ts +31 -0
  209. package/dist/metadata.js +17 -0
  210. package/dist/metadata.js.map +1 -0
  211. package/dist/page-D9XIuLSj.js +16 -0
  212. package/dist/page-D9XIuLSj.js.map +1 -0
  213. package/dist/page-Doy4_Sdz.cjs +15 -0
  214. package/dist/page-Doy4_Sdz.cjs.map +1 -0
  215. package/dist/page-edit.cjs +15 -0
  216. package/dist/page-edit.cjs.map +1 -0
  217. package/dist/page-edit.d.cts +16 -0
  218. package/dist/page-edit.d.ts +16 -0
  219. package/dist/page-edit.js +10 -0
  220. package/dist/page-edit.js.map +1 -0
  221. package/dist/page-layers-c-CJYAUO.cjs +30 -0
  222. package/dist/page-layers-c-CJYAUO.cjs.map +1 -0
  223. package/dist/page-layers-rlh4-1qr.js +31 -0
  224. package/dist/page-layers-rlh4-1qr.js.map +1 -0
  225. package/dist/page-layers.d.cts +21 -0
  226. package/dist/page-layers.d.ts +21 -0
  227. package/dist/page-view/PageView.vue.d.cts +42 -0
  228. package/dist/page-view/PageView.vue.d.ts +42 -0
  229. package/dist/page-view.cjs +5 -0
  230. package/dist/page-view.cjs.map +1 -0
  231. package/dist/page-view.d.cts +10 -0
  232. package/dist/page-view.d.ts +10 -0
  233. package/dist/page-view.js +5 -0
  234. package/dist/page-view.js.map +1 -0
  235. package/dist/projector-CDZn1kh1.js +32 -0
  236. package/dist/projector-CDZn1kh1.js.map +1 -0
  237. package/dist/projector-Cf7879sx.cjs +31 -0
  238. package/dist/projector-Cf7879sx.cjs.map +1 -0
  239. package/dist/redaction.cjs +34 -0
  240. package/dist/redaction.cjs.map +1 -0
  241. package/dist/redaction.d.cts +44 -0
  242. package/dist/redaction.d.ts +44 -0
  243. package/dist/redaction.js +29 -0
  244. package/dist/redaction.js.map +1 -0
  245. package/dist/render/RenderLayer.vue.d.cts +23 -0
  246. package/dist/render/RenderLayer.vue.d.ts +23 -0
  247. package/dist/render/TileImage.vue.d.cts +13 -0
  248. package/dist/render/TileImage.vue.d.ts +13 -0
  249. package/dist/render/TilePlane.vue.d.cts +7 -0
  250. package/dist/render/TilePlane.vue.d.ts +7 -0
  251. package/dist/render.cjs +262 -0
  252. package/dist/render.cjs.map +1 -0
  253. package/dist/render.d.cts +16 -0
  254. package/dist/render.d.ts +16 -0
  255. package/dist/render.js +257 -0
  256. package/dist/render.js.map +1 -0
  257. package/dist/runtime/DocumentGate.vue.d.cts +24 -0
  258. package/dist/runtime/DocumentGate.vue.d.ts +24 -0
  259. package/dist/runtime/DocumentScope.vue.d.cts +16 -0
  260. package/dist/runtime/DocumentScope.vue.d.ts +16 -0
  261. package/dist/runtime/KernelProvider.vue.d.cts +17 -0
  262. package/dist/runtime/KernelProvider.vue.d.ts +17 -0
  263. package/dist/runtime/SvgShapes.vue.d.cts +7 -0
  264. package/dist/runtime/SvgShapes.vue.d.ts +7 -0
  265. package/dist/runtime/Viewer.vue.d.cts +57 -0
  266. package/dist/runtime/Viewer.vue.d.ts +57 -0
  267. package/dist/runtime/capabilities.d.cts +52 -0
  268. package/dist/runtime/capabilities.d.ts +52 -0
  269. package/dist/runtime/documents.d.cts +42 -0
  270. package/dist/runtime/documents.d.ts +42 -0
  271. package/dist/runtime/kernel.d.cts +36 -0
  272. package/dist/runtime/kernel.d.ts +36 -0
  273. package/dist/runtime/page.d.cts +15 -0
  274. package/dist/runtime/page.d.ts +15 -0
  275. package/dist/runtime/refs.d.cts +12 -0
  276. package/dist/runtime/refs.d.ts +12 -0
  277. package/dist/runtime/surface-box.d.cts +12 -0
  278. package/dist/runtime/surface-box.d.ts +12 -0
  279. package/dist/runtime.cjs +53 -0
  280. package/dist/runtime.cjs.map +1 -0
  281. package/dist/runtime.d.cts +24 -0
  282. package/dist/runtime.d.ts +24 -0
  283. package/dist/runtime.js +38 -0
  284. package/dist/runtime.js.map +1 -0
  285. package/dist/scope-BQA4toWB.cjs +17 -0
  286. package/dist/scope-BQA4toWB.cjs.map +1 -0
  287. package/dist/scope-BgdCqnYb.js +18 -0
  288. package/dist/scope-BgdCqnYb.js.map +1 -0
  289. package/dist/search/SearchLayer.vue.d.cts +17 -0
  290. package/dist/search/SearchLayer.vue.d.ts +17 -0
  291. package/dist/search/composables.d.cts +31 -0
  292. package/dist/search/composables.d.ts +31 -0
  293. package/dist/search.cjs +17 -0
  294. package/dist/search.cjs.map +1 -0
  295. package/dist/search.d.cts +10 -0
  296. package/dist/search.d.ts +10 -0
  297. package/dist/search.js +11 -0
  298. package/dist/search.js.map +1 -0
  299. package/dist/selection/SelectionClipboard.vue.d.cts +24 -0
  300. package/dist/selection/SelectionClipboard.vue.d.ts +24 -0
  301. package/dist/selection/SelectionHandles.vue.d.cts +8 -0
  302. package/dist/selection/SelectionHandles.vue.d.ts +8 -0
  303. package/dist/selection/SelectionLayer.vue.d.cts +3 -0
  304. package/dist/selection/SelectionLayer.vue.d.ts +3 -0
  305. package/dist/selection/SelectionMenu.vue.d.cts +23 -0
  306. package/dist/selection/SelectionMenu.vue.d.ts +23 -0
  307. package/dist/selection/composables.d.cts +24 -0
  308. package/dist/selection/composables.d.ts +24 -0
  309. package/dist/selection.cjs +24 -0
  310. package/dist/selection.cjs.map +1 -0
  311. package/dist/selection.d.cts +16 -0
  312. package/dist/selection.d.ts +16 -0
  313. package/dist/selection.js +15 -0
  314. package/dist/selection.js.map +1 -0
  315. package/dist/shell.cjs +72 -0
  316. package/dist/shell.cjs.map +1 -0
  317. package/dist/shell.d.cts +56 -0
  318. package/dist/shell.d.ts +56 -0
  319. package/dist/shell.js +67 -0
  320. package/dist/shell.js.map +1 -0
  321. package/dist/signature/composables.d.cts +39 -0
  322. package/dist/signature/composables.d.ts +39 -0
  323. package/dist/signature.cjs +16 -0
  324. package/dist/signature.cjs.map +1 -0
  325. package/dist/signature.d.cts +15 -0
  326. package/dist/signature.d.ts +15 -0
  327. package/dist/signature.js +10 -0
  328. package/dist/signature.js.map +1 -0
  329. package/dist/stage/PageSurface.vue.d.cts +29 -0
  330. package/dist/stage/PageSurface.vue.d.ts +29 -0
  331. package/dist/stage/Scrollbar.vue.d.cts +32 -0
  332. package/dist/stage/Scrollbar.vue.d.ts +32 -0
  333. package/dist/stage/Stage.vue.d.cts +44 -0
  334. package/dist/stage/Stage.vue.d.ts +44 -0
  335. package/dist/stage/StageScope.vue.d.cts +17 -0
  336. package/dist/stage/StageScope.vue.d.ts +17 -0
  337. package/dist/stage/composables.d.cts +41 -0
  338. package/dist/stage/composables.d.ts +41 -0
  339. package/dist/stage/scope.d.cts +12 -0
  340. package/dist/stage/scope.d.ts +12 -0
  341. package/dist/stage.cjs +21 -0
  342. package/dist/stage.cjs.map +1 -0
  343. package/dist/stage.d.cts +17 -0
  344. package/dist/stage.d.ts +17 -0
  345. package/dist/stage.js +15 -0
  346. package/dist/stage.js.map +1 -0
  347. package/dist/stamp.cjs +68 -0
  348. package/dist/stamp.cjs.map +1 -0
  349. package/dist/stamp.d.cts +61 -0
  350. package/dist/stamp.d.ts +61 -0
  351. package/dist/stamp.js +61 -0
  352. package/dist/stamp.js.map +1 -0
  353. package/dist/state-DZg8q3v6.js +52 -0
  354. package/dist/state-DZg8q3v6.js.map +1 -0
  355. package/dist/state-M22NDJQo.cjs +51 -0
  356. package/dist/state-M22NDJQo.cjs.map +1 -0
  357. package/dist/state.d.cts +32 -0
  358. package/dist/state.d.ts +32 -0
  359. package/dist/strip-BSDB39Xh.cjs +743 -0
  360. package/dist/strip-BSDB39Xh.cjs.map +1 -0
  361. package/dist/strip-C3wLonKB.js +744 -0
  362. package/dist/strip-C3wLonKB.js.map +1 -0
  363. package/dist/surface-box-B9oa4YoG.js +12 -0
  364. package/dist/surface-box-B9oa4YoG.js.map +1 -0
  365. package/dist/surface-box-C7EvUOXp.cjs +11 -0
  366. package/dist/surface-box-C7EvUOXp.cjs.map +1 -0
  367. package/dist/theme.d.cts +13 -0
  368. package/dist/theme.d.ts +13 -0
  369. package/dist/toolbar/DefaultCollapsed.vue.d.cts +9 -0
  370. package/dist/toolbar/DefaultCollapsed.vue.d.ts +9 -0
  371. package/dist/toolbar/DefaultCommand.vue.d.cts +8 -0
  372. package/dist/toolbar/DefaultCommand.vue.d.ts +8 -0
  373. package/dist/toolbar/DefaultGroupTrigger.vue.d.cts +9 -0
  374. package/dist/toolbar/DefaultGroupTrigger.vue.d.ts +9 -0
  375. package/dist/toolbar/DefaultOverflowMenu.vue.d.cts +9 -0
  376. package/dist/toolbar/DefaultOverflowMenu.vue.d.ts +9 -0
  377. package/dist/toolbar/DefaultOverflowTrigger.vue.d.cts +10 -0
  378. package/dist/toolbar/DefaultOverflowTrigger.vue.d.ts +10 -0
  379. package/dist/toolbar/Measured.vue.d.cts +21 -0
  380. package/dist/toolbar/Measured.vue.d.ts +21 -0
  381. package/dist/toolbar/NativeSlotSocket.vue.d.cts +22 -0
  382. package/dist/toolbar/NativeSlotSocket.vue.d.ts +22 -0
  383. package/dist/toolbar/Toolbar.vue.d.cts +82 -0
  384. package/dist/toolbar/Toolbar.vue.d.ts +82 -0
  385. package/dist/toolbar/ToolbarPart.vue.d.cts +42 -0
  386. package/dist/toolbar/ToolbarPart.vue.d.ts +42 -0
  387. package/dist/toolbar/paint.d.cts +3 -0
  388. package/dist/toolbar/paint.d.ts +3 -0
  389. package/dist/toolbar/strip.d.cts +14 -0
  390. package/dist/toolbar/strip.d.ts +14 -0
  391. package/dist/toolbar/views.d.cts +15 -0
  392. package/dist/toolbar/views.d.ts +15 -0
  393. package/dist/toolbar.cjs +27 -0
  394. package/dist/toolbar.cjs.map +1 -0
  395. package/dist/toolbar.d.cts +14 -0
  396. package/dist/toolbar.d.ts +14 -0
  397. package/dist/toolbar.js +12 -0
  398. package/dist/toolbar.js.map +1 -0
  399. package/dist/view-manager.cjs +22 -0
  400. package/dist/view-manager.cjs.map +1 -0
  401. package/dist/view-manager.d.cts +24 -0
  402. package/dist/view-manager.d.ts +24 -0
  403. package/dist/view-manager.js +17 -0
  404. package/dist/view-manager.js.map +1 -0
  405. package/package.json +169 -3
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pluginInteraction = require("@embedpdf/plugin-interaction");
4
+ const web = require("@embedpdf/web");
5
+ const vue = require("vue");
6
+ const host = require("@embedpdf/plugin-interaction/contract/host");
7
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
8
+ const state = require("./state-M22NDJQo.cjs");
9
+ const PagePointerSource_vue_vue_type_script_setup_true_lang = require("./PagePointerSource.vue_vue_type_script_setup_true_lang-Cw29c8Oa.cjs");
10
+ function useInteraction() {
11
+ return capabilities.useCapability(pluginInteraction.InteractionToken);
12
+ }
13
+ function useInteractionEvent(select, handler) {
14
+ capabilities.useCapabilityEvent(pluginInteraction.InteractionToken, select, handler);
15
+ }
16
+ const useInteractionState = state.stateComposable(pluginInteraction.interactionState);
17
+ const useInteractionSettings = state.settingsComposable(pluginInteraction.InteractionToken);
18
+ function useToolCursor(spec) {
19
+ const interaction = capabilities.useOptionalCapability(host.InteractionToken);
20
+ const key = vue.computed(() => {
21
+ const current = vue.toValue(spec);
22
+ return current ? JSON.stringify(current) : null;
23
+ });
24
+ vue.watch(
25
+ [interaction, key],
26
+ ([hub, json], _previous, onCleanup) => {
27
+ if (!hub || !json) return;
28
+ const { toolId, cursors } = JSON.parse(json);
29
+ hub.setToolCursor(toolId, web.toolCursorsOf(cursors));
30
+ onCleanup(() => hub.setToolCursor(toolId, null));
31
+ },
32
+ { immediate: true }
33
+ );
34
+ }
35
+ Object.defineProperty(exports, "createClickCounter", {
36
+ enumerable: true,
37
+ get: () => web.createClickCounter
38
+ });
39
+ Object.defineProperty(exports, "svgCursor", {
40
+ enumerable: true,
41
+ get: () => web.svgCursor
42
+ });
43
+ Object.defineProperty(exports, "vibrationFeedback", {
44
+ enumerable: true,
45
+ get: () => web.vibrationFeedback
46
+ });
47
+ Object.defineProperty(exports, "wkFeedback", {
48
+ enumerable: true,
49
+ get: () => web.wkFeedback
50
+ });
51
+ exports.PagePointerSource = PagePointerSource_vue_vue_type_script_setup_true_lang._sfc_main;
52
+ exports.useInteraction = useInteraction;
53
+ exports.useInteractionEvent = useInteractionEvent;
54
+ exports.useInteractionSettings = useInteractionSettings;
55
+ exports.useInteractionState = useInteractionState;
56
+ exports.useToolCursor = useToolCursor;
57
+ Object.keys(pluginInteraction).forEach((k) => {
58
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
59
+ enumerable: true,
60
+ get: () => pluginInteraction[k]
61
+ });
62
+ });
63
+ //# sourceMappingURL=interaction.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.cjs","sources":["../src/interaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/interaction: the Vue surface of `@embedpdf/plugin-interaction`.\n * `<PagePointerSource>` is a page's one pointer listener; the composables switch\n * tools, read the tools' state and settings, follow the hub's events, and give\n * a tool its own cursor.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-interaction';\n// The browser helpers live in @embedpdf/web (the plugin is DOM-free); they are\n// re-exported here so app code has one import for the feature.\nexport { createClickCounter, svgCursor, vibrationFeedback, wkFeedback } from '@embedpdf/web';\nexport type { SvgCursorOptions, ToolCursorImage, ToolCursorSpec } from '@embedpdf/web';\nimport { computed, toValue, watch } from 'vue';\nimport type { MaybeRefOrGetter } from 'vue';\nimport { InteractionToken as InteractionHostToken } from '@embedpdf/plugin-interaction/contract/host';\nimport { InteractionToken, interactionState } from '@embedpdf/plugin-interaction';\nimport type { InteractionCapability } from '@embedpdf/plugin-interaction';\nimport type { EventHook } from '@embedpdf/core';\nimport { toolCursorsOf } from '@embedpdf/web';\nimport type { ToolCursorSpec } from '@embedpdf/web';\nimport { useCapability, useCapabilityEvent, useOptionalCapability } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\n\nexport { default as PagePointerSource } from './interaction/PagePointerSource.vue';\n\n/** The interaction API: switch tools, add your own, set their cursors. The object never changes. */\nexport function useInteraction(): InteractionCapability {\n return useCapability(InteractionToken);\n}\n\n/** Subscribe to one interaction event while the component lives: `useInteractionEvent((interaction) => interaction.onGestureStarted, handler)`. */\nexport function useInteractionEvent<Event>(\n select: (interaction: InteractionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(InteractionToken, select, handler);\n}\n\n/**\n * The tools' state as refs: the active tool's id and every tool you can\n * switch to (the page's State table, declared once in `interactionState`).\n * With a selector, one ref. Without a document there is no active tool\n * (`null`) and no tool.\n */\nexport const useInteractionState = stateComposable(interactionState);\n\n/** The interaction settings (`defaultTool`, `tools`), with or without a document, as refs. Takes a selector. */\nexport const useInteractionSettings = settingsComposable(InteractionToken);\n\n/**\n * Give a tool image cursors: the armed-tool indicator. The hub already decides\n * which cursor shows (hover claims over annotations and text win, the gaps\n * between pages show the tool's `gapCursor`), so nothing chases the pointer in\n * the DOM. Pass a getter to follow your values: a new spec rebuilds the cursor\n * (a color picked in your toolbar), and the component's unmount restores the\n * tool's own cursors. `null` installs nothing; without a document it installs\n * nothing until one is ready.\n */\nexport function useToolCursor(spec: MaybeRefOrGetter<ToolCursorSpec | null>): void {\n const interaction = useOptionalCapability(InteractionHostToken);\n // By value: a getter builds a new object each time, and an equal one must\n // not rebuild the cursor.\n const key = computed(() => {\n const current = toValue(spec);\n return current ? JSON.stringify(current) : null;\n });\n watch(\n [interaction, key],\n ([hub, json], _previous, onCleanup) => {\n if (!hub || !json) return;\n const { toolId, cursors } = JSON.parse(json) as ToolCursorSpec;\n hub.setToolCursor(toolId, toolCursorsOf(cursors));\n onCleanup(() => hub.setToolCursor(toolId, null));\n },\n { immediate: true },\n );\n}\n"],"names":["useCapability","InteractionToken","useCapabilityEvent","stateComposable","interactionState","settingsComposable","useOptionalCapability","InteractionHostToken","computed","toValue","watch","toolCursorsOf"],"mappings":";;;;;;;;;AA2BO,SAAS,iBAAwC;AACtD,SAAOA,aAAAA,cAAcC,kBAAAA,gBAAgB;AACvC;AAGO,SAAS,oBACd,QACA,SACM;AACNC,kCAAmBD,kBAAAA,kBAAkB,QAAQ,OAAO;AACtD;AAQO,MAAM,sBAAsBE,MAAAA,gBAAgBC,kBAAAA,gBAAgB;AAG5D,MAAM,yBAAyBC,MAAAA,mBAAmBJ,kBAAAA,gBAAgB;AAWlE,SAAS,cAAc,MAAqD;AACjF,QAAM,cAAcK,aAAAA,sBAAsBC,qBAAoB;AAG9D,QAAM,MAAMC,IAAAA,SAAS,MAAM;AACzB,UAAM,UAAUC,IAAAA,QAAQ,IAAI;AAC5B,WAAO,UAAU,KAAK,UAAU,OAAO,IAAI;AAAA,EAC7C,CAAC;AACDC,MAAAA;AAAAA,IACE,CAAC,aAAa,GAAG;AAAA,IACjB,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,cAAc;AACrC,UAAI,CAAC,OAAO,CAAC,KAAM;AACnB,YAAM,EAAE,QAAQ,QAAA,IAAY,KAAK,MAAM,IAAI;AAC3C,UAAI,cAAc,QAAQC,IAAAA,cAAc,OAAO,CAAC;AAChD,gBAAU,MAAM,IAAI,cAAc,QAAQ,IAAI,CAAC;AAAA,IACjD;AAAA,IACA,EAAE,WAAW,KAAA;AAAA,EAAK;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @embedpdf/vue/interaction: the Vue surface of `@embedpdf/plugin-interaction`.
3
+ * `<PagePointerSource>` is a page's one pointer listener; the composables switch
4
+ * tools, read the tools' state and settings, follow the hub's events, and give
5
+ * a tool its own cursor.
6
+ */
7
+ export * from '@embedpdf/plugin-interaction';
8
+ export { createClickCounter, svgCursor, vibrationFeedback, wkFeedback } from '@embedpdf/web';
9
+ export type { SvgCursorOptions, ToolCursorImage, ToolCursorSpec } from '@embedpdf/web';
10
+ import type { MaybeRefOrGetter } from 'vue';
11
+ import type { InteractionCapability } from '@embedpdf/plugin-interaction';
12
+ import type { EventHook } from '@embedpdf/core';
13
+ import type { ToolCursorSpec } from '@embedpdf/web';
14
+ export { default as PagePointerSource } from './interaction/PagePointerSource.vue.cjs';
15
+ /** The interaction API: switch tools, add your own, set their cursors. The object never changes. */
16
+ export declare function useInteraction(): InteractionCapability;
17
+ /** Subscribe to one interaction event while the component lives: `useInteractionEvent((interaction) => interaction.onGestureStarted, handler)`. */
18
+ export declare function useInteractionEvent<Event>(select: (interaction: InteractionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
19
+ /**
20
+ * The tools' state as refs: the active tool's id and every tool you can
21
+ * switch to (the page's State table, declared once in `interactionState`).
22
+ * With a selector, one ref. Without a document there is no active tool
23
+ * (`null`) and no tool.
24
+ */
25
+ export declare const useInteractionState: import("./state.cjs").StateComposable<{
26
+ activeToolId: import("@embedpdf/plugin-interaction").ToolId | null;
27
+ tools: readonly import("@embedpdf/plugin-interaction").Tool[];
28
+ }>;
29
+ /** The interaction settings (`defaultTool`, `tools`), with or without a document, as refs. Takes a selector. */
30
+ export declare const useInteractionSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-interaction").InteractionSettings & object>;
31
+ /**
32
+ * Give a tool image cursors: the armed-tool indicator. The hub already decides
33
+ * which cursor shows (hover claims over annotations and text win, the gaps
34
+ * between pages show the tool's `gapCursor`), so nothing chases the pointer in
35
+ * the DOM. Pass a getter to follow your values: a new spec rebuilds the cursor
36
+ * (a color picked in your toolbar), and the component's unmount restores the
37
+ * tool's own cursors. `null` installs nothing; without a document it installs
38
+ * nothing until one is ready.
39
+ */
40
+ export declare function useToolCursor(spec: MaybeRefOrGetter<ToolCursorSpec | null>): void;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @embedpdf/vue/interaction: the Vue surface of `@embedpdf/plugin-interaction`.
3
+ * `<PagePointerSource>` is a page's one pointer listener; the composables switch
4
+ * tools, read the tools' state and settings, follow the hub's events, and give
5
+ * a tool its own cursor.
6
+ */
7
+ export * from '@embedpdf/plugin-interaction';
8
+ export { createClickCounter, svgCursor, vibrationFeedback, wkFeedback } from '@embedpdf/web';
9
+ export type { SvgCursorOptions, ToolCursorImage, ToolCursorSpec } from '@embedpdf/web';
10
+ import type { MaybeRefOrGetter } from 'vue';
11
+ import type { InteractionCapability } from '@embedpdf/plugin-interaction';
12
+ import type { EventHook } from '@embedpdf/core';
13
+ import type { ToolCursorSpec } from '@embedpdf/web';
14
+ export { default as PagePointerSource } from './interaction/PagePointerSource.vue.js';
15
+ /** The interaction API: switch tools, add your own, set their cursors. The object never changes. */
16
+ export declare function useInteraction(): InteractionCapability;
17
+ /** Subscribe to one interaction event while the component lives: `useInteractionEvent((interaction) => interaction.onGestureStarted, handler)`. */
18
+ export declare function useInteractionEvent<Event>(select: (interaction: InteractionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
19
+ /**
20
+ * The tools' state as refs: the active tool's id and every tool you can
21
+ * switch to (the page's State table, declared once in `interactionState`).
22
+ * With a selector, one ref. Without a document there is no active tool
23
+ * (`null`) and no tool.
24
+ */
25
+ export declare const useInteractionState: import("./state.js").StateComposable<{
26
+ activeToolId: import("@embedpdf/plugin-interaction").ToolId | null;
27
+ tools: readonly import("@embedpdf/plugin-interaction").Tool[];
28
+ }>;
29
+ /** The interaction settings (`defaultTool`, `tools`), with or without a document, as refs. Takes a selector. */
30
+ export declare const useInteractionSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-interaction").InteractionSettings & object>;
31
+ /**
32
+ * Give a tool image cursors: the armed-tool indicator. The hub already decides
33
+ * which cursor shows (hover claims over annotations and text win, the gaps
34
+ * between pages show the tool's `gapCursor`), so nothing chases the pointer in
35
+ * the DOM. Pass a getter to follow your values: a new spec rebuilds the cursor
36
+ * (a color picked in your toolbar), and the component's unmount restores the
37
+ * tool's own cursors. `null` installs nothing; without a document it installs
38
+ * nothing until one is ready.
39
+ */
40
+ export declare function useToolCursor(spec: MaybeRefOrGetter<ToolCursorSpec | null>): void;
@@ -0,0 +1,47 @@
1
+ import { InteractionToken, interactionState } from "@embedpdf/plugin-interaction";
2
+ export * from "@embedpdf/plugin-interaction";
3
+ import { toolCursorsOf } from "@embedpdf/web";
4
+ import { createClickCounter, svgCursor, vibrationFeedback, wkFeedback } from "@embedpdf/web";
5
+ import { computed, toValue, watch } from "vue";
6
+ import { InteractionToken as InteractionToken$1 } from "@embedpdf/plugin-interaction/contract/host";
7
+ import { a as useCapability, b as useCapabilityEvent, h as useOptionalCapability } from "./capabilities-C7YzgPCX.js";
8
+ import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
9
+ import { _ } from "./PagePointerSource.vue_vue_type_script_setup_true_lang-CJt3vdBW.js";
10
+ function useInteraction() {
11
+ return useCapability(InteractionToken);
12
+ }
13
+ function useInteractionEvent(select, handler) {
14
+ useCapabilityEvent(InteractionToken, select, handler);
15
+ }
16
+ const useInteractionState = stateComposable(interactionState);
17
+ const useInteractionSettings = settingsComposable(InteractionToken);
18
+ function useToolCursor(spec) {
19
+ const interaction = useOptionalCapability(InteractionToken$1);
20
+ const key = computed(() => {
21
+ const current = toValue(spec);
22
+ return current ? JSON.stringify(current) : null;
23
+ });
24
+ watch(
25
+ [interaction, key],
26
+ ([hub, json], _previous, onCleanup) => {
27
+ if (!hub || !json) return;
28
+ const { toolId, cursors } = JSON.parse(json);
29
+ hub.setToolCursor(toolId, toolCursorsOf(cursors));
30
+ onCleanup(() => hub.setToolCursor(toolId, null));
31
+ },
32
+ { immediate: true }
33
+ );
34
+ }
35
+ export {
36
+ _ as PagePointerSource,
37
+ createClickCounter,
38
+ svgCursor,
39
+ useInteraction,
40
+ useInteractionEvent,
41
+ useInteractionSettings,
42
+ useInteractionState,
43
+ useToolCursor,
44
+ vibrationFeedback,
45
+ wkFeedback
46
+ };
47
+ //# sourceMappingURL=interaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.js","sources":["../src/interaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/interaction: the Vue surface of `@embedpdf/plugin-interaction`.\n * `<PagePointerSource>` is a page's one pointer listener; the composables switch\n * tools, read the tools' state and settings, follow the hub's events, and give\n * a tool its own cursor.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-interaction';\n// The browser helpers live in @embedpdf/web (the plugin is DOM-free); they are\n// re-exported here so app code has one import for the feature.\nexport { createClickCounter, svgCursor, vibrationFeedback, wkFeedback } from '@embedpdf/web';\nexport type { SvgCursorOptions, ToolCursorImage, ToolCursorSpec } from '@embedpdf/web';\nimport { computed, toValue, watch } from 'vue';\nimport type { MaybeRefOrGetter } from 'vue';\nimport { InteractionToken as InteractionHostToken } from '@embedpdf/plugin-interaction/contract/host';\nimport { InteractionToken, interactionState } from '@embedpdf/plugin-interaction';\nimport type { InteractionCapability } from '@embedpdf/plugin-interaction';\nimport type { EventHook } from '@embedpdf/core';\nimport { toolCursorsOf } from '@embedpdf/web';\nimport type { ToolCursorSpec } from '@embedpdf/web';\nimport { useCapability, useCapabilityEvent, useOptionalCapability } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\n\nexport { default as PagePointerSource } from './interaction/PagePointerSource.vue';\n\n/** The interaction API: switch tools, add your own, set their cursors. The object never changes. */\nexport function useInteraction(): InteractionCapability {\n return useCapability(InteractionToken);\n}\n\n/** Subscribe to one interaction event while the component lives: `useInteractionEvent((interaction) => interaction.onGestureStarted, handler)`. */\nexport function useInteractionEvent<Event>(\n select: (interaction: InteractionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(InteractionToken, select, handler);\n}\n\n/**\n * The tools' state as refs: the active tool's id and every tool you can\n * switch to (the page's State table, declared once in `interactionState`).\n * With a selector, one ref. Without a document there is no active tool\n * (`null`) and no tool.\n */\nexport const useInteractionState = stateComposable(interactionState);\n\n/** The interaction settings (`defaultTool`, `tools`), with or without a document, as refs. Takes a selector. */\nexport const useInteractionSettings = settingsComposable(InteractionToken);\n\n/**\n * Give a tool image cursors: the armed-tool indicator. The hub already decides\n * which cursor shows (hover claims over annotations and text win, the gaps\n * between pages show the tool's `gapCursor`), so nothing chases the pointer in\n * the DOM. Pass a getter to follow your values: a new spec rebuilds the cursor\n * (a color picked in your toolbar), and the component's unmount restores the\n * tool's own cursors. `null` installs nothing; without a document it installs\n * nothing until one is ready.\n */\nexport function useToolCursor(spec: MaybeRefOrGetter<ToolCursorSpec | null>): void {\n const interaction = useOptionalCapability(InteractionHostToken);\n // By value: a getter builds a new object each time, and an equal one must\n // not rebuild the cursor.\n const key = computed(() => {\n const current = toValue(spec);\n return current ? JSON.stringify(current) : null;\n });\n watch(\n [interaction, key],\n ([hub, json], _previous, onCleanup) => {\n if (!hub || !json) return;\n const { toolId, cursors } = JSON.parse(json) as ToolCursorSpec;\n hub.setToolCursor(toolId, toolCursorsOf(cursors));\n onCleanup(() => hub.setToolCursor(toolId, null));\n },\n { immediate: true },\n );\n}\n"],"names":["InteractionHostToken"],"mappings":";;;;;;;;;AA2BO,SAAS,iBAAwC;AACtD,SAAO,cAAc,gBAAgB;AACvC;AAGO,SAAS,oBACd,QACA,SACM;AACN,qBAAmB,kBAAkB,QAAQ,OAAO;AACtD;AAQO,MAAM,sBAAsB,gBAAgB,gBAAgB;AAG5D,MAAM,yBAAyB,mBAAmB,gBAAgB;AAWlE,SAAS,cAAc,MAAqD;AACjF,QAAM,cAAc,sBAAsBA,kBAAoB;AAG9D,QAAM,MAAM,SAAS,MAAM;AACzB,UAAM,UAAU,QAAQ,IAAI;AAC5B,WAAO,UAAU,KAAK,UAAU,OAAO,IAAI;AAAA,EAC7C,CAAC;AACD;AAAA,IACE,CAAC,aAAa,GAAG;AAAA,IACjB,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,cAAc;AACrC,UAAI,CAAC,OAAO,CAAC,KAAM;AACnB,YAAM,EAAE,QAAQ,QAAA,IAAY,KAAK,MAAM,IAAI;AAC3C,UAAI,cAAc,QAAQ,cAAc,OAAO,CAAC;AAChD,gBAAU,MAAM,IAAI,cAAc,QAAQ,IAAI,CAAC;AAAA,IACjD;AAAA,IACA,EAAE,WAAW,KAAA;AAAA,EAAK;AAEtB;"}
@@ -0,0 +1,9 @@
1
+ import type { Link } from '@embedpdf/plugin-link';
2
+ import type { LinkLayerContext } from './composables.cjs';
3
+ type __VLS_Props = {
4
+ item: Link;
5
+ layer: LinkLayerContext;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { Link } from '@embedpdf/plugin-link';
2
+ import type { LinkLayerContext } from './composables.js';
3
+ type __VLS_Props = {
4
+ item: Link;
5
+ layer: LinkLayerContext;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import type { FunctionalComponent } from 'vue';
2
+ import type { Link } from '@embedpdf/plugin-link';
3
+ type __VLS_Slots = {
4
+ /**
5
+ * Draw a link yourself, usually around `native`, the layer's own clickable
6
+ * area: `<component :is="native" />` keeps what a click does. For a link you
7
+ * don't want to change, show `native` alone.
8
+ */
9
+ link?(props: {
10
+ link: Link;
11
+ native: FunctionalComponent;
12
+ }): unknown;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,22 @@
1
+ import type { FunctionalComponent } from 'vue';
2
+ import type { Link } from '@embedpdf/plugin-link';
3
+ type __VLS_Slots = {
4
+ /**
5
+ * Draw a link yourself, usually around `native`, the layer's own clickable
6
+ * area: `<component :is="native" />` keeps what a click does. For a link you
7
+ * don't want to change, show `native` alone.
8
+ */
9
+ link?(props: {
10
+ link: Link;
11
+ native: FunctionalComponent;
12
+ }): unknown;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,29 @@
1
+ import type { EventHook } from '@embedpdf/core';
2
+ import type { ActionsCapability, HoverPump } from '@embedpdf/plugin-actions/contract';
3
+ import type { LinkCapability } from '@embedpdf/plugin-link';
4
+ import type { StageCapability } from '@embedpdf/plugin-stage/contract';
5
+ /** What every anchor of one `<LinkLayer>` shares. */
6
+ export interface LinkLayerContext {
7
+ link: LinkCapability;
8
+ /** The view a page destination moves, when the page is on a Stage. */
9
+ stage: StageCapability | null;
10
+ /** The actions plugin, for the links' own PDF events; null without it. */
11
+ actions: ActionsCapability | null;
12
+ /** One per layer, so leaving one link and entering the next stay in order. */
13
+ pump: HoverPump | null;
14
+ }
15
+ /**
16
+ * Hand the link plugin this binding's website opener (`openExternalUri`)
17
+ * while the component lives: an allowed address opens in a new tab, anything
18
+ * else is refused and the plugin reports it. Registered again for another
19
+ * document.
20
+ */
21
+ export declare function useUriOpener(): void;
22
+ /**
23
+ * The link API (`listLinks`, `activate`, …) for app code. The object never
24
+ * changes. While a component uses it, `activate()` opens a website in a new
25
+ * tab.
26
+ */
27
+ export declare function useLink(): LinkCapability;
28
+ /** Subscribe to one link event while the component lives: `useLinkEvent((link) => link.onActivated, handler)`. */
29
+ export declare function useLinkEvent<Event>(select: (link: LinkCapability) => EventHook<Event>, handler: (event: Event) => void): void;
@@ -0,0 +1,29 @@
1
+ import type { EventHook } from '@embedpdf/core';
2
+ import type { ActionsCapability, HoverPump } from '@embedpdf/plugin-actions/contract';
3
+ import type { LinkCapability } from '@embedpdf/plugin-link';
4
+ import type { StageCapability } from '@embedpdf/plugin-stage/contract';
5
+ /** What every anchor of one `<LinkLayer>` shares. */
6
+ export interface LinkLayerContext {
7
+ link: LinkCapability;
8
+ /** The view a page destination moves, when the page is on a Stage. */
9
+ stage: StageCapability | null;
10
+ /** The actions plugin, for the links' own PDF events; null without it. */
11
+ actions: ActionsCapability | null;
12
+ /** One per layer, so leaving one link and entering the next stay in order. */
13
+ pump: HoverPump | null;
14
+ }
15
+ /**
16
+ * Hand the link plugin this binding's website opener (`openExternalUri`)
17
+ * while the component lives: an allowed address opens in a new tab, anything
18
+ * else is refused and the plugin reports it. Registered again for another
19
+ * document.
20
+ */
21
+ export declare function useUriOpener(): void;
22
+ /**
23
+ * The link API (`listLinks`, `activate`, …) for app code. The object never
24
+ * changes. While a component uses it, `activate()` opens a website in a new
25
+ * tab.
26
+ */
27
+ export declare function useLink(): LinkCapability;
28
+ /** Subscribe to one link event while the component lives: `useLinkEvent((link) => link.onActivated, handler)`. */
29
+ export declare function useLinkEvent<Event>(select: (link: LinkCapability) => EventHook<Event>, handler: (event: Event) => void): void;
package/dist/link.cjs ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pluginLink = require("@embedpdf/plugin-link");
4
+ const LinkLayer_vue_vue_type_script_setup_true_lang = require("./LinkLayer.vue_vue_type_script_setup_true_lang-C5-eQD34.cjs");
5
+ exports.LinkLayer = LinkLayer_vue_vue_type_script_setup_true_lang._sfc_main;
6
+ exports.useLink = LinkLayer_vue_vue_type_script_setup_true_lang.useLink;
7
+ exports.useLinkEvent = LinkLayer_vue_vue_type_script_setup_true_lang.useLinkEvent;
8
+ Object.keys(pluginLink).forEach((k) => {
9
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => pluginLink[k]
12
+ });
13
+ });
14
+ //# sourceMappingURL=link.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @embedpdf/vue/link: the Vue surface of `@embedpdf/plugin-link`.
3
+ *
4
+ * `<LinkLayer>` makes a page's links clickable while a navigation tool is
5
+ * active, with a `#link` slot to draw them yourself; `useLink()` follows links
6
+ * from code (and opens websites while a component uses it), and
7
+ * `useLinkEvent()` follows the plugin's events.
8
+ */
9
+ export * from '@embedpdf/plugin-link';
10
+ export { default as LinkLayer } from './link/LinkLayer.vue.cjs';
11
+ export { useLink, useLinkEvent } from './link/composables.cjs';
package/dist/link.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @embedpdf/vue/link: the Vue surface of `@embedpdf/plugin-link`.
3
+ *
4
+ * `<LinkLayer>` makes a page's links clickable while a navigation tool is
5
+ * active, with a `#link` slot to draw them yourself; `useLink()` follows links
6
+ * from code (and opens websites while a component uses it), and
7
+ * `useLinkEvent()` follows the plugin's events.
8
+ */
9
+ export * from '@embedpdf/plugin-link';
10
+ export { default as LinkLayer } from './link/LinkLayer.vue.js';
11
+ export { useLink, useLinkEvent } from './link/composables.js';
package/dist/link.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from "@embedpdf/plugin-link";
2
+ import { _, u, a } from "./LinkLayer.vue_vue_type_script_setup_true_lang-EzLaOP3g.js";
3
+ export {
4
+ _ as LinkLayer,
5
+ u as useLink,
6
+ a as useLinkEvent
7
+ };
8
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pluginMeasurement = require("@embedpdf/plugin-measurement");
4
+ const vue = require("vue");
5
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
6
+ const state = require("./state-M22NDJQo.cjs");
7
+ function useMeasurement() {
8
+ return capabilities.useCapability(pluginMeasurement.MeasurementToken);
9
+ }
10
+ function useMeasurementEvent(select, handler) {
11
+ capabilities.useCapabilityEvent(pluginMeasurement.MeasurementToken, select, handler);
12
+ }
13
+ const useMeasurementState = state.stateComposable(pluginMeasurement.measurementState);
14
+ const useMeasurementSettings = state.settingsComposable(pluginMeasurement.MeasurementToken);
15
+ function usePageScale(page) {
16
+ const scope = capabilities.useDocumentScope();
17
+ return capabilities.useKernelValue((kernel) => {
18
+ var _a;
19
+ const wanted = vue.toValue(page);
20
+ if (wanted === null) return null;
21
+ return ((_a = kernel.tryCapability(pluginMeasurement.MeasurementToken, scope.value ?? void 0)) == null ? void 0 : _a.getPageScale(wanted)) ?? pluginMeasurement.NO_PAGE_SCALE;
22
+ });
23
+ }
24
+ function useMeasurementReadout(ref) {
25
+ return capabilities.useOptionalSelector(
26
+ pluginMeasurement.MeasurementToken,
27
+ (measurement) => measurement.getReadout(vue.toValue(ref)),
28
+ pluginMeasurement.NO_READOUT
29
+ );
30
+ }
31
+ exports.useMeasurement = useMeasurement;
32
+ exports.useMeasurementEvent = useMeasurementEvent;
33
+ exports.useMeasurementReadout = useMeasurementReadout;
34
+ exports.useMeasurementSettings = useMeasurementSettings;
35
+ exports.useMeasurementState = useMeasurementState;
36
+ exports.usePageScale = usePageScale;
37
+ Object.keys(pluginMeasurement).forEach((k) => {
38
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
39
+ enumerable: true,
40
+ get: () => pluginMeasurement[k]
41
+ });
42
+ });
43
+ //# sourceMappingURL=measurement.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement.cjs","sources":["../src/measurement.ts"],"sourcesContent":["/**\n * @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.\n * The four composables every plugin has, plus one per page scale and one per\n * measurement, so a template updates only for its own page or measurement.\n * Every one works before a document opens.\n *\n * const measurement = useMeasurement();\n * const scale = usePageScale(0); // the cover's, as a ref\n * const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-measurement';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook, PageRef } from '@embedpdf/core';\nimport {\n MeasurementToken,\n measurementState,\n NO_PAGE_SCALE,\n NO_READOUT,\n} from '@embedpdf/plugin-measurement';\nimport type {\n AnnotationRef,\n MeasurementCapability,\n MeasurementReadout,\n MeasurementUnavailable,\n PageScale,\n} from '@embedpdf/plugin-measurement';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { useDocumentScope, useKernelValue } from './runtime/kernel';\nimport { settingsComposable, stateComposable } from './state';\n\n/**\n * The measurement API (scales, calibration, readouts, creating measurements)\n * of the nearest `<DocumentScope>`'s document, else the active one. The object\n * never changes; outside a document every method throws `not-ready`.\n */\nexport function useMeasurement(): MeasurementCapability {\n return useCapability(MeasurementToken);\n}\n\n/** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */\nexport function useMeasurementEvent<Event>(\n select: (measurement: MeasurementCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(MeasurementToken, select, handler);\n}\n\n/**\n * The measurement state as refs: whether a scale change runs, the\n * calibration request waiting for its length, and the last change's reports\n * (the page's State table, declared once in `measurementState`). With a\n * selector, one ref that updates only when the value it picks changes.\n */\nexport const useMeasurementState = stateComposable(measurementState);\n\n/** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */\nexport const useMeasurementSettings = settingsComposable(MeasurementToken);\n\n/**\n * A page's measurement scale (its ref or its index; a getter to follow a\n * prop), as a ref: for a scale bar or a \"1:100\" badge. Accepts `null` (no\n * current page) and answers `null` then, so chrome can stay mounted without\n * inventing a page.\n */\nexport function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>>;\nexport function usePageScale(\n page: MaybeRefOrGetter<PageRef | number | null>,\n): Readonly<Ref<PageScale | null>> {\n const scope = useDocumentScope();\n // Scales are reference-stable in the plugin, so the ref updates only when this page's changes.\n return useKernelValue((kernel) => {\n const wanted = toValue(page);\n if (wanted === null) return null;\n return (\n kernel.tryCapability(MeasurementToken, scope.value ?? undefined)?.getPageScale(wanted) ??\n NO_PAGE_SCALE\n );\n });\n}\n\n/**\n * A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`\n * with why there's none. Pass a getter to follow a prop:\n * `useMeasurementReadout(() => props.annotation)`. Readouts are\n * reference-stable in the plugin, so the ref updates only when the\n * measurement's changes.\n */\nexport function useMeasurementReadout(\n ref: MaybeRefOrGetter<AnnotationRef>,\n): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>> {\n return useOptionalSelector(\n MeasurementToken,\n (measurement) => measurement.getReadout(toValue(ref)),\n NO_READOUT as MeasurementReadout | MeasurementUnavailable,\n );\n}\n"],"names":["useCapability","MeasurementToken","useCapabilityEvent","stateComposable","measurementState","settingsComposable","useDocumentScope","useKernelValue","toValue","NO_PAGE_SCALE","useOptionalSelector","NO_READOUT"],"mappings":";;;;;;AAsCO,SAAS,iBAAwC;AACtD,SAAOA,aAAAA,cAAcC,kBAAAA,gBAAgB;AACvC;AAGO,SAAS,oBACd,QACA,SACM;AACNC,kCAAmBD,kBAAAA,kBAAkB,QAAQ,OAAO;AACtD;AAQO,MAAM,sBAAsBE,MAAAA,gBAAgBC,kBAAAA,gBAAgB;AAG5D,MAAM,yBAAyBC,MAAAA,mBAAmBJ,kBAAAA,gBAAgB;AAYlE,SAAS,aACd,MACiC;AACjC,QAAM,QAAQK,aAAAA,iBAAA;AAEd,SAAOC,aAAAA,eAAe,CAAC,WAAW;;AAChC,UAAM,SAASC,IAAAA,QAAQ,IAAI;AAC3B,QAAI,WAAW,KAAM,QAAO;AAC5B,aACE,YAAO,cAAcP,kBAAAA,kBAAkB,MAAM,SAAS,MAAS,MAA/D,mBAAkE,aAAa,YAC/EQ,kBAAAA;AAAAA,EAEJ,CAAC;AACH;AASO,SAAS,sBACd,KAC4D;AAC5D,SAAOC,aAAAA;AAAAA,IACLT,kBAAAA;AAAAA,IACA,CAAC,gBAAgB,YAAY,WAAWO,IAAAA,QAAQ,GAAG,CAAC;AAAA,IACpDG,kBAAAA;AAAAA,EAAA;AAEJ;;;;;;;;;;;;;"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.
3
+ * The four composables every plugin has, plus one per page scale and one per
4
+ * measurement, so a template updates only for its own page or measurement.
5
+ * Every one works before a document opens.
6
+ *
7
+ * const measurement = useMeasurement();
8
+ * const scale = usePageScale(0); // the cover's, as a ref
9
+ * const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }
10
+ */
11
+ export * from '@embedpdf/plugin-measurement';
12
+ import type { MaybeRefOrGetter, Ref } from 'vue';
13
+ import type { EventHook, PageRef } from '@embedpdf/core';
14
+ import type { AnnotationRef, MeasurementCapability, MeasurementReadout, MeasurementUnavailable, PageScale } from '@embedpdf/plugin-measurement';
15
+ /**
16
+ * The measurement API (scales, calibration, readouts, creating measurements)
17
+ * of the nearest `<DocumentScope>`'s document, else the active one. The object
18
+ * never changes; outside a document every method throws `not-ready`.
19
+ */
20
+ export declare function useMeasurement(): MeasurementCapability;
21
+ /** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */
22
+ export declare function useMeasurementEvent<Event>(select: (measurement: MeasurementCapability) => EventHook<Event>, handler: (event: Event) => void): void;
23
+ /**
24
+ * The measurement state as refs: whether a scale change runs, the
25
+ * calibration request waiting for its length, and the last change's reports
26
+ * (the page's State table, declared once in `measurementState`). With a
27
+ * selector, one ref that updates only when the value it picks changes.
28
+ */
29
+ export declare const useMeasurementState: import("./state.cjs").StateComposable<{
30
+ busy: boolean;
31
+ calibrationRequest: import("@embedpdf/plugin-measurement").CalibrationRequest | null;
32
+ lastReports: readonly import("@embedpdf/plugin-measurement").ScaleChangeReport[];
33
+ }>;
34
+ /** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */
35
+ export declare const useMeasurementSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-measurement").MeasurementSettings & object>;
36
+ /**
37
+ * A page's measurement scale (its ref or its index; a getter to follow a
38
+ * prop), as a ref: for a scale bar or a "1:100" badge. Accepts `null` (no
39
+ * current page) and answers `null` then, so chrome can stay mounted without
40
+ * inventing a page.
41
+ */
42
+ export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;
43
+ export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number | null>): Readonly<Ref<PageScale | null>>;
44
+ /**
45
+ * A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`
46
+ * with why there's none. Pass a getter to follow a prop:
47
+ * `useMeasurementReadout(() => props.annotation)`. Readouts are
48
+ * reference-stable in the plugin, so the ref updates only when the
49
+ * measurement's changes.
50
+ */
51
+ export declare function useMeasurementReadout(ref: MaybeRefOrGetter<AnnotationRef>): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @embedpdf/vue/measurement: the Vue view of `@embedpdf/plugin-measurement`.
3
+ * The four composables every plugin has, plus one per page scale and one per
4
+ * measurement, so a template updates only for its own page or measurement.
5
+ * Every one works before a document opens.
6
+ *
7
+ * const measurement = useMeasurement();
8
+ * const scale = usePageScale(0); // the cover's, as a ref
9
+ * const readout = useMeasurementReadout(() => props.annotation); // { kind, value, label }
10
+ */
11
+ export * from '@embedpdf/plugin-measurement';
12
+ import type { MaybeRefOrGetter, Ref } from 'vue';
13
+ import type { EventHook, PageRef } from '@embedpdf/core';
14
+ import type { AnnotationRef, MeasurementCapability, MeasurementReadout, MeasurementUnavailable, PageScale } from '@embedpdf/plugin-measurement';
15
+ /**
16
+ * The measurement API (scales, calibration, readouts, creating measurements)
17
+ * of the nearest `<DocumentScope>`'s document, else the active one. The object
18
+ * never changes; outside a document every method throws `not-ready`.
19
+ */
20
+ export declare function useMeasurement(): MeasurementCapability;
21
+ /** Subscribe to one measurement event while the component lives: `useMeasurementEvent((measurement) => measurement.onScaleChanged, handler)`. */
22
+ export declare function useMeasurementEvent<Event>(select: (measurement: MeasurementCapability) => EventHook<Event>, handler: (event: Event) => void): void;
23
+ /**
24
+ * The measurement state as refs: whether a scale change runs, the
25
+ * calibration request waiting for its length, and the last change's reports
26
+ * (the page's State table, declared once in `measurementState`). With a
27
+ * selector, one ref that updates only when the value it picks changes.
28
+ */
29
+ export declare const useMeasurementState: import("./state.js").StateComposable<{
30
+ busy: boolean;
31
+ calibrationRequest: import("@embedpdf/plugin-measurement").CalibrationRequest | null;
32
+ lastReports: readonly import("@embedpdf/plugin-measurement").ScaleChangeReport[];
33
+ }>;
34
+ /** The measurement settings (`defaultScale`, `presets`), with or without a document, as refs. Takes a selector. */
35
+ export declare const useMeasurementSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-measurement").MeasurementSettings & object>;
36
+ /**
37
+ * A page's measurement scale (its ref or its index; a getter to follow a
38
+ * prop), as a ref: for a scale bar or a "1:100" badge. Accepts `null` (no
39
+ * current page) and answers `null` then, so chrome can stay mounted without
40
+ * inventing a page.
41
+ */
42
+ export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number>): Readonly<Ref<PageScale>>;
43
+ export declare function usePageScale(page: MaybeRefOrGetter<PageRef | number | null>): Readonly<Ref<PageScale | null>>;
44
+ /**
45
+ * A measurement's `{ kind, value, label }` as a ref, or `{ unavailable }`
46
+ * with why there's none. Pass a getter to follow a prop:
47
+ * `useMeasurementReadout(() => props.annotation)`. Readouts are
48
+ * reference-stable in the plugin, so the ref updates only when the
49
+ * measurement's changes.
50
+ */
51
+ export declare function useMeasurementReadout(ref: MaybeRefOrGetter<AnnotationRef>): Readonly<Ref<MeasurementReadout | MeasurementUnavailable>>;
@@ -0,0 +1,38 @@
1
+ import { MeasurementToken, NO_PAGE_SCALE, measurementState, NO_READOUT } from "@embedpdf/plugin-measurement";
2
+ export * from "@embedpdf/plugin-measurement";
3
+ import { toValue } from "vue";
4
+ import { a as useCapability, b as useCapabilityEvent, i as useOptionalSelector, e as useDocumentScope, g as useKernelValue } from "./capabilities-C7YzgPCX.js";
5
+ import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
6
+ function useMeasurement() {
7
+ return useCapability(MeasurementToken);
8
+ }
9
+ function useMeasurementEvent(select, handler) {
10
+ useCapabilityEvent(MeasurementToken, select, handler);
11
+ }
12
+ const useMeasurementState = stateComposable(measurementState);
13
+ const useMeasurementSettings = settingsComposable(MeasurementToken);
14
+ function usePageScale(page) {
15
+ const scope = useDocumentScope();
16
+ return useKernelValue((kernel) => {
17
+ var _a;
18
+ const wanted = toValue(page);
19
+ if (wanted === null) return null;
20
+ return ((_a = kernel.tryCapability(MeasurementToken, scope.value ?? void 0)) == null ? void 0 : _a.getPageScale(wanted)) ?? NO_PAGE_SCALE;
21
+ });
22
+ }
23
+ function useMeasurementReadout(ref) {
24
+ return useOptionalSelector(
25
+ MeasurementToken,
26
+ (measurement) => measurement.getReadout(toValue(ref)),
27
+ NO_READOUT
28
+ );
29
+ }
30
+ export {
31
+ useMeasurement,
32
+ useMeasurementEvent,
33
+ useMeasurementReadout,
34
+ useMeasurementSettings,
35
+ useMeasurementState,
36
+ usePageScale
37
+ };
38
+ //# sourceMappingURL=measurement.js.map