@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,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pluginRedaction = require("@embedpdf/plugin-redaction");
4
+ const vue = require("vue");
5
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
6
+ const state = require("./state-M22NDJQo.cjs");
7
+ function useRedaction() {
8
+ return capabilities.useCapability(pluginRedaction.RedactionToken);
9
+ }
10
+ function useRedactionEvent(select, handler) {
11
+ capabilities.useCapabilityEvent(pluginRedaction.RedactionToken, select, handler);
12
+ }
13
+ const useRedactionState = state.stateComposable(pluginRedaction.redactionState);
14
+ const useRedactionSettings = state.settingsComposable(pluginRedaction.RedactionToken);
15
+ const NO_MARKS = Object.freeze([]);
16
+ function usePendingRedactions(filter) {
17
+ return capabilities.useOptionalSelector(
18
+ pluginRedaction.RedactionToken,
19
+ (redaction) => redaction.listPending(vue.toValue(filter)),
20
+ NO_MARKS
21
+ );
22
+ }
23
+ exports.usePendingRedactions = usePendingRedactions;
24
+ exports.useRedaction = useRedaction;
25
+ exports.useRedactionEvent = useRedactionEvent;
26
+ exports.useRedactionSettings = useRedactionSettings;
27
+ exports.useRedactionState = useRedactionState;
28
+ Object.keys(pluginRedaction).forEach((k) => {
29
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
30
+ enumerable: true,
31
+ get: () => pluginRedaction[k]
32
+ });
33
+ });
34
+ //# sourceMappingURL=redaction.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redaction.cjs","sources":["../src/redaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The\n * four composables every plugin has, plus the pending marks. Marking rides\n * the annotation plane (the composed `redact` tool); these composables surface\n * the workflow around it.\n *\n * const redaction = useRedaction();\n * const { pendingCount, applying } = useRedactionState();\n * await redaction.applyAll(); // irreversible: confirm first\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-redaction';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook } from '@embedpdf/core';\nimport { RedactionToken, redactionState } from '@embedpdf/plugin-redaction';\nimport type {\n RedactionCapability,\n RedactionMark,\n RedactionMarkFilter,\n} from '@embedpdf/plugin-redaction';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\nimport type { StateComposable } from './state';\n\n/**\n * The redaction API (marking, the pending marks, applying them) of the\n * nearest `<DocumentScope>`'s document, else the active one. The object never\n * changes; outside a document every method throws `not-ready`.\n */\nexport function useRedaction(): RedactionCapability {\n return useCapability(RedactionToken);\n}\n\n/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */\nexport function useRedactionEvent<Event>(\n select: (redaction: RedactionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RedactionToken, select, handler);\n}\n\n/**\n * The redaction state as refs: how many marks wait, whether marks are being\n * applied, and the last apply's result (the page's State table, declared once\n * in `redactionState`). With a selector, one ref that updates only when the\n * value it picks changes.\n *\n * Typed through the declaration, so the published types name it from\n * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the\n * engine package `lastResult`'s type comes from, which isn't one.\n */\nexport const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>> =\n stateComposable(redactionState);\n\n/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */\nexport const useRedactionSettings = settingsComposable(RedactionToken);\n\nconst NO_MARKS: readonly RedactionMark[] = Object.freeze([]);\n\n/**\n * The marks waiting to be applied, in page order, or one page's (its ref or\n * its index; a getter to follow a prop), as a ref. The plugin's lists are\n * reference-stable, so the ref updates only when the marks change. Empty\n * without a document.\n */\nexport function usePendingRedactions(\n filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>,\n): Readonly<Ref<readonly RedactionMark[]>> {\n return useOptionalSelector(\n RedactionToken,\n (redaction) => redaction.listPending(toValue(filter)),\n NO_MARKS,\n );\n}\n"],"names":["useCapability","RedactionToken","useCapabilityEvent","stateComposable","redactionState","settingsComposable","useOptionalSelector","toValue"],"mappings":";;;;;;AA+BO,SAAS,eAAoC;AAClD,SAAOA,aAAAA,cAAcC,gBAAAA,cAAc;AACrC;AAGO,SAAS,kBACd,QACA,SACM;AACNC,kCAAmBD,gBAAAA,gBAAgB,QAAQ,OAAO;AACpD;AAYO,MAAM,oBACXE,MAAAA,gBAAgBC,gBAAAA,cAAc;AAGzB,MAAM,uBAAuBC,MAAAA,mBAAmBJ,gBAAAA,cAAc;AAErE,MAAM,WAAqC,OAAO,OAAO,EAAE;AAQpD,SAAS,qBACd,QACyC;AACzC,SAAOK,aAAAA;AAAAA,IACLL,gBAAAA;AAAAA,IACA,CAAC,cAAc,UAAU,YAAYM,IAAAA,QAAQ,MAAM,CAAC;AAAA,IACpD;AAAA,EAAA;AAEJ;;;;;;;;;;;;"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The
3
+ * four composables every plugin has, plus the pending marks. Marking rides
4
+ * the annotation plane (the composed `redact` tool); these composables surface
5
+ * the workflow around it.
6
+ *
7
+ * const redaction = useRedaction();
8
+ * const { pendingCount, applying } = useRedactionState();
9
+ * await redaction.applyAll(); // irreversible: confirm first
10
+ */
11
+ export * from '@embedpdf/plugin-redaction';
12
+ import type { MaybeRefOrGetter, Ref } from 'vue';
13
+ import type { EventHook } from '@embedpdf/core';
14
+ import { redactionState } from '@embedpdf/plugin-redaction';
15
+ import type { RedactionCapability, RedactionMark, RedactionMarkFilter } from '@embedpdf/plugin-redaction';
16
+ import type { StateComposable } from './state.cjs';
17
+ /**
18
+ * The redaction API (marking, the pending marks, applying them) of the
19
+ * nearest `<DocumentScope>`'s document, else the active one. The object never
20
+ * changes; outside a document every method throws `not-ready`.
21
+ */
22
+ export declare function useRedaction(): RedactionCapability;
23
+ /** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */
24
+ export declare function useRedactionEvent<Event>(select: (redaction: RedactionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
25
+ /**
26
+ * The redaction state as refs: how many marks wait, whether marks are being
27
+ * applied, and the last apply's result (the page's State table, declared once
28
+ * in `redactionState`). With a selector, one ref that updates only when the
29
+ * value it picks changes.
30
+ *
31
+ * Typed through the declaration, so the published types name it from
32
+ * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the
33
+ * engine package `lastResult`'s type comes from, which isn't one.
34
+ */
35
+ export declare const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>>;
36
+ /** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */
37
+ export declare const useRedactionSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-redaction").RedactionSettings & object>;
38
+ /**
39
+ * The marks waiting to be applied, in page order, or one page's (its ref or
40
+ * its index; a getter to follow a prop), as a ref. The plugin's lists are
41
+ * reference-stable, so the ref updates only when the marks change. Empty
42
+ * without a document.
43
+ */
44
+ export declare function usePendingRedactions(filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>): Readonly<Ref<readonly RedactionMark[]>>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The
3
+ * four composables every plugin has, plus the pending marks. Marking rides
4
+ * the annotation plane (the composed `redact` tool); these composables surface
5
+ * the workflow around it.
6
+ *
7
+ * const redaction = useRedaction();
8
+ * const { pendingCount, applying } = useRedactionState();
9
+ * await redaction.applyAll(); // irreversible: confirm first
10
+ */
11
+ export * from '@embedpdf/plugin-redaction';
12
+ import type { MaybeRefOrGetter, Ref } from 'vue';
13
+ import type { EventHook } from '@embedpdf/core';
14
+ import { redactionState } from '@embedpdf/plugin-redaction';
15
+ import type { RedactionCapability, RedactionMark, RedactionMarkFilter } from '@embedpdf/plugin-redaction';
16
+ import type { StateComposable } from './state.js';
17
+ /**
18
+ * The redaction API (marking, the pending marks, applying them) of the
19
+ * nearest `<DocumentScope>`'s document, else the active one. The object never
20
+ * changes; outside a document every method throws `not-ready`.
21
+ */
22
+ export declare function useRedaction(): RedactionCapability;
23
+ /** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */
24
+ export declare function useRedactionEvent<Event>(select: (redaction: RedactionCapability) => EventHook<Event>, handler: (event: Event) => void): void;
25
+ /**
26
+ * The redaction state as refs: how many marks wait, whether marks are being
27
+ * applied, and the last apply's result (the page's State table, declared once
28
+ * in `redactionState`). With a selector, one ref that updates only when the
29
+ * value it picks changes.
30
+ *
31
+ * Typed through the declaration, so the published types name it from
32
+ * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the
33
+ * engine package `lastResult`'s type comes from, which isn't one.
34
+ */
35
+ export declare const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>>;
36
+ /** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */
37
+ export declare const useRedactionSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-redaction").RedactionSettings & object>;
38
+ /**
39
+ * The marks waiting to be applied, in page order, or one page's (its ref or
40
+ * its index; a getter to follow a prop), as a ref. The plugin's lists are
41
+ * reference-stable, so the ref updates only when the marks change. Empty
42
+ * without a document.
43
+ */
44
+ export declare function usePendingRedactions(filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>): Readonly<Ref<readonly RedactionMark[]>>;
@@ -0,0 +1,29 @@
1
+ import { RedactionToken, redactionState } from "@embedpdf/plugin-redaction";
2
+ export * from "@embedpdf/plugin-redaction";
3
+ import { toValue } from "vue";
4
+ import { i as useOptionalSelector, a as useCapability, b as useCapabilityEvent } from "./capabilities-C7YzgPCX.js";
5
+ import { s as settingsComposable, a as stateComposable } from "./state-DZg8q3v6.js";
6
+ function useRedaction() {
7
+ return useCapability(RedactionToken);
8
+ }
9
+ function useRedactionEvent(select, handler) {
10
+ useCapabilityEvent(RedactionToken, select, handler);
11
+ }
12
+ const useRedactionState = stateComposable(redactionState);
13
+ const useRedactionSettings = settingsComposable(RedactionToken);
14
+ const NO_MARKS = Object.freeze([]);
15
+ function usePendingRedactions(filter) {
16
+ return useOptionalSelector(
17
+ RedactionToken,
18
+ (redaction) => redaction.listPending(toValue(filter)),
19
+ NO_MARKS
20
+ );
21
+ }
22
+ export {
23
+ usePendingRedactions,
24
+ useRedaction,
25
+ useRedactionEvent,
26
+ useRedactionSettings,
27
+ useRedactionState
28
+ };
29
+ //# sourceMappingURL=redaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redaction.js","sources":["../src/redaction.ts"],"sourcesContent":["/**\n * @embedpdf/vue/redaction: the Vue view of `@embedpdf/plugin-redaction`. The\n * four composables every plugin has, plus the pending marks. Marking rides\n * the annotation plane (the composed `redact` tool); these composables surface\n * the workflow around it.\n *\n * const redaction = useRedaction();\n * const { pendingCount, applying } = useRedactionState();\n * await redaction.applyAll(); // irreversible: confirm first\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-redaction';\nimport { toValue } from 'vue';\nimport type { MaybeRefOrGetter, Ref } from 'vue';\nimport type { EventHook } from '@embedpdf/core';\nimport { RedactionToken, redactionState } from '@embedpdf/plugin-redaction';\nimport type {\n RedactionCapability,\n RedactionMark,\n RedactionMarkFilter,\n} from '@embedpdf/plugin-redaction';\nimport { useCapability, useCapabilityEvent, useOptionalSelector } from './runtime/capabilities';\nimport { settingsComposable, stateComposable } from './state';\nimport type { StateComposable } from './state';\n\n/**\n * The redaction API (marking, the pending marks, applying them) of the\n * nearest `<DocumentScope>`'s document, else the active one. The object never\n * changes; outside a document every method throws `not-ready`.\n */\nexport function useRedaction(): RedactionCapability {\n return useCapability(RedactionToken);\n}\n\n/** Subscribe to one redaction event while the component lives: `useRedactionEvent((redaction) => redaction.onApplied, handler)`. */\nexport function useRedactionEvent<Event>(\n select: (redaction: RedactionCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RedactionToken, select, handler);\n}\n\n/**\n * The redaction state as refs: how many marks wait, whether marks are being\n * applied, and the last apply's result (the page's State table, declared once\n * in `redactionState`). With a selector, one ref that updates only when the\n * value it picks changes.\n *\n * Typed through the declaration, so the published types name it from\n * `@embedpdf/plugin-redaction`, a dependency of this package, and not from the\n * engine package `lastResult`'s type comes from, which isn't one.\n */\nexport const useRedactionState: StateComposable<ReturnType<typeof redactionState.read>> =\n stateComposable(redactionState);\n\n/** The redaction settings (`overlay`), with or without a document, as refs. Takes a selector. */\nexport const useRedactionSettings = settingsComposable(RedactionToken);\n\nconst NO_MARKS: readonly RedactionMark[] = Object.freeze([]);\n\n/**\n * The marks waiting to be applied, in page order, or one page's (its ref or\n * its index; a getter to follow a prop), as a ref. The plugin's lists are\n * reference-stable, so the ref updates only when the marks change. Empty\n * without a document.\n */\nexport function usePendingRedactions(\n filter?: MaybeRefOrGetter<RedactionMarkFilter | undefined>,\n): Readonly<Ref<readonly RedactionMark[]>> {\n return useOptionalSelector(\n RedactionToken,\n (redaction) => redaction.listPending(toValue(filter)),\n NO_MARKS,\n );\n}\n"],"names":[],"mappings":";;;;;AA+BO,SAAS,eAAoC;AAClD,SAAO,cAAc,cAAc;AACrC;AAGO,SAAS,kBACd,QACA,SACM;AACN,qBAAmB,gBAAgB,QAAQ,OAAO;AACpD;AAYO,MAAM,oBACX,gBAAgB,cAAc;AAGzB,MAAM,uBAAuB,mBAAmB,cAAc;AAErE,MAAM,WAAqC,OAAO,OAAO,EAAE;AAQpD,SAAS,qBACd,QACyC;AACzC,SAAO;AAAA,IACL;AAAA,IACA,CAAC,cAAc,UAAU,YAAY,QAAQ,MAAM,CAAC;AAAA,IACpD;AAAA,EAAA;AAEJ;"}
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ /**
3
+ * Draw the annotations into the page's picture (`true`) or leave them out
4
+ * (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`
5
+ * on the page, and otherwise draws them when the user may read them.
6
+ */
7
+ annotations?: boolean;
8
+ /** The same for the form fields, which a `<FormLayer>` paints. */
9
+ formFields?: boolean;
10
+ /**
11
+ * Mount the tile plane. Whether it spends anything is the plugin's
12
+ * arithmetic: leave it on, and pass `false` only for a view that must never
13
+ * tile, even at deep zoom.
14
+ */
15
+ tiles?: boolean;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ annotations: boolean;
19
+ formFields: boolean;
20
+ tiles: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ /**
3
+ * Draw the annotations into the page's picture (`true`) or leave them out
4
+ * (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`
5
+ * on the page, and otherwise draws them when the user may read them.
6
+ */
7
+ annotations?: boolean;
8
+ /** The same for the form fields, which a `<FormLayer>` paints. */
9
+ formFields?: boolean;
10
+ /**
11
+ * Mount the tile plane. Whether it spends anything is the plugin's
12
+ * arithmetic: leave it on, and pass `false` only for a view that must never
13
+ * tile, even at deep zoom.
14
+ */
15
+ tiles?: boolean;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ annotations: boolean;
19
+ formFields: boolean;
20
+ tiles: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { PageRef } from '@embedpdf/core';
2
+ import type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';
3
+ type __VLS_Props = {
4
+ source: TilePaintSource;
5
+ /** The view's tile surface, told when this tile is painted and when it leaves. */
6
+ view: ViewDemand;
7
+ page: PageRef;
8
+ /** View px per page point. */
9
+ viewScale: number;
10
+ };
11
+ 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>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { PageRef } from '@embedpdf/core';
2
+ import type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';
3
+ type __VLS_Props = {
4
+ source: TilePaintSource;
5
+ /** The view's tile surface, told when this tile is painted and when it leaves. */
6
+ view: ViewDemand;
7
+ page: PageRef;
8
+ /** View px per page point. */
9
+ viewScale: number;
10
+ };
11
+ 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>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { PageLayerOptions } from '@embedpdf/plugin-render/contract/host';
2
+ type __VLS_Props = {
3
+ layers: PageLayerOptions;
4
+ };
5
+ 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>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { PageLayerOptions } from '@embedpdf/plugin-render/contract/host';
2
+ type __VLS_Props = {
3
+ layers: PageLayerOptions;
4
+ };
5
+ 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>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pluginRender = require("@embedpdf/plugin-render");
4
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
5
+ const state = require("./state-M22NDJQo.cjs");
6
+ const vue = require("vue");
7
+ const host = require("@embedpdf/plugin-render/contract/host");
8
+ const web = require("@embedpdf/web");
9
+ const dev = require("./dev-eeIS2B4c.cjs");
10
+ const pageLayers = require("./page-layers-c-CJYAUO.cjs");
11
+ const page = require("./page-Doy4_Sdz.cjs");
12
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
13
+ __name: "TileImage",
14
+ props: {
15
+ source: {},
16
+ view: {},
17
+ page: {},
18
+ viewScale: {}
19
+ },
20
+ setup(__props) {
21
+ const props = __props;
22
+ const image = vue.ref(null);
23
+ vue.watch(
24
+ [image, () => props.source.handle],
25
+ ([element, handle], _previous, onCleanup) => {
26
+ if (!element) return;
27
+ const { view, page: page2, source } = props;
28
+ onCleanup(
29
+ web.bindPaintedImage(element, handle, {
30
+ onPainted: () => view.markPainted(page2, source.key),
31
+ onUnpainted: () => view.markUnpainted(page2, source.key)
32
+ })
33
+ );
34
+ },
35
+ { immediate: true, flush: "post" }
36
+ );
37
+ function checkSize(event) {
38
+ const naturalWidth = event.currentTarget.naturalWidth;
39
+ if (naturalWidth <= 0) return;
40
+ const expected = Math.round(props.source.rect.width * props.source.scale);
41
+ if (Math.abs(naturalWidth - expected) > 1) {
42
+ dev.devWarn(
43
+ "tile-size",
44
+ `tile bitmap ${naturalWidth}px wide does not match its rect (expected ~${expected}px) — stale raster identity? key=${props.source.key}`
45
+ );
46
+ }
47
+ }
48
+ const style = vue.computed(() => {
49
+ const { rect, z } = props.source;
50
+ const scale = props.viewScale;
51
+ return {
52
+ position: "absolute",
53
+ left: `${rect.x * scale}px`,
54
+ top: `${rect.y * scale}px`,
55
+ width: `${rect.width * scale}px`,
56
+ height: `${rect.height * scale}px`,
57
+ zIndex: z
58
+ };
59
+ });
60
+ return (_ctx, _cache) => {
61
+ return vue.openBlock(), vue.createElementBlock("img", {
62
+ ref_key: "image",
63
+ ref: image,
64
+ alt: "",
65
+ draggable: "false",
66
+ style: vue.normalizeStyle(style.value),
67
+ onLoad: checkSize
68
+ }, null, 36);
69
+ };
70
+ }
71
+ });
72
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
73
+ __name: "TilePlane",
74
+ props: {
75
+ layers: {}
76
+ },
77
+ setup(__props) {
78
+ const props = __props;
79
+ const page$1 = page.usePage();
80
+ const render = capabilities.useOptionalCapability(host.RenderToken);
81
+ const view = vue.shallowRef(null);
82
+ const pageRef = vue.computed(() => page$1.value.ref);
83
+ const viewId = vue.computed(() => page$1.value.view);
84
+ vue.watch(
85
+ [view, pageRef],
86
+ ([handle, ref], _previous, onCleanup) => {
87
+ if (handle) onCleanup(() => handle.release(ref));
88
+ },
89
+ { immediate: true }
90
+ );
91
+ vue.watch(
92
+ [render, viewId],
93
+ ([lens, id], _previous, onCleanup) => {
94
+ if (!lens) {
95
+ view.value = null;
96
+ return;
97
+ }
98
+ const handle = lens.createViewDemand(id);
99
+ view.value = handle;
100
+ onCleanup(() => handle.dispose());
101
+ },
102
+ { immediate: true }
103
+ );
104
+ const demand = capabilities.useKernelValue(
105
+ () => {
106
+ var _a, _b;
107
+ return ((_b = (_a = page$1.value).getViewDemand) == null ? void 0 : _b.call(_a)) ?? { desiredDeviceWidth: page$1.value.transform.deviceWidth };
108
+ },
109
+ host.samePageViewDemand
110
+ );
111
+ vue.watch(
112
+ [view, demand, pageRef, () => props.layers],
113
+ ([handle, wanted, ref, layers]) => {
114
+ handle == null ? void 0 : handle.setDemand(ref, wanted, layers);
115
+ },
116
+ { immediate: true }
117
+ );
118
+ const plan = capabilities.useKernelValue(() => {
119
+ var _a;
120
+ return ((_a = view.value) == null ? void 0 : _a.getPlan(pageRef.value)) ?? null;
121
+ });
122
+ const planeStyle = vue.computed(
123
+ () => ({
124
+ position: "absolute",
125
+ left: 0,
126
+ top: 0,
127
+ width: `${page$1.value.transform.contentWidth}px`,
128
+ height: `${page$1.value.transform.contentHeight}px`,
129
+ pointerEvents: "none",
130
+ // Tiles carry z ranks (coarse under fine) while generations mix, mid-zoom.
131
+ // A stacking context of its own keeps those ranks inside the plane, below
132
+ // annotations, page chrome and menus.
133
+ isolation: "isolate"
134
+ })
135
+ );
136
+ return (_ctx, _cache) => {
137
+ return view.value && vue.unref(plan) && vue.unref(plan).paint.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
138
+ key: 0,
139
+ style: vue.normalizeStyle(planeStyle.value)
140
+ }, [
141
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(plan).paint, (source) => {
142
+ return vue.openBlock(), vue.createBlock(_sfc_main$2, {
143
+ key: source.key,
144
+ source,
145
+ view: view.value,
146
+ page: vue.unref(page$1).ref,
147
+ "view-scale": vue.unref(page$1).transform.viewScale
148
+ }, null, 8, ["source", "view", "page", "view-scale"]);
149
+ }), 128))
150
+ ], 4)) : vue.createCommentVNode("", true);
151
+ };
152
+ }
153
+ });
154
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
155
+ __name: "RenderLayer",
156
+ props: {
157
+ annotations: { type: Boolean, default: void 0 },
158
+ formFields: { type: Boolean, default: void 0 },
159
+ tiles: { type: Boolean, default: true }
160
+ },
161
+ setup(__props) {
162
+ const props = __props;
163
+ const page$1 = page.usePage();
164
+ const render = capabilities.useOptionalCapability(host.RenderToken);
165
+ const NO_PAINT = { tiles: false };
166
+ const settings = capabilities.useOptionalSelector(host.RenderToken, (lens) => lens.getPaintSettings(), NO_PAINT);
167
+ const pageRef = vue.computed(() => page$1.value.ref);
168
+ const parts = vue.computed(() => ({ annotations: props.annotations, formFields: props.formFields }));
169
+ const painted = pageLayers.usePaintedParts(pageRef);
170
+ const may = capabilities.useOptionalSelector(host.RenderToken, (lens) => lens.getLayerRights(), null);
171
+ const layers = vue.computed(
172
+ () => painted.value && may.value ? web.pictureLayerOptionsOf(painted.value, parts.value, may.value) : null
173
+ );
174
+ vue.watch([painted, parts], ([current, asked]) => {
175
+ if (current && web.partsDrawnTwice(current, asked).length > 0) {
176
+ dev.devWarn(
177
+ "render-layer-draws-what-a-layer-paints",
178
+ "<RenderLayer :annotations> or <RenderLayer :form-fields> draws what an <AnnotationLayer> or a <FormLayer> on the page paints too, so it shows twice. Leave the prop out: the picture leaves out what a layer paints."
179
+ );
180
+ }
181
+ });
182
+ const sourceKey = capabilities.useOptionalSelector(
183
+ host.RenderToken,
184
+ (lens) => layers.value ? lens.getSourceKey(page$1.value.ref, {
185
+ scale: page$1.value.transform.renderScale,
186
+ ...layers.value
187
+ }) : null,
188
+ null
189
+ );
190
+ const image = vue.ref(null);
191
+ vue.watch(
192
+ [render, pageRef, sourceKey, layers],
193
+ ([lens, shown, _key, drawn], _previous, onCleanup) => {
194
+ if (!lens || !drawn) return;
195
+ const controller = new AbortController();
196
+ let revoke;
197
+ onCleanup(() => {
198
+ controller.abort();
199
+ revoke == null ? void 0 : revoke();
200
+ });
201
+ void (async () => {
202
+ try {
203
+ const picture = await lens.renderSource(shown, {
204
+ scale: page$1.value.transform.renderScale,
205
+ ...drawn,
206
+ view: page$1.value.view,
207
+ signal: controller.signal
208
+ });
209
+ const object = await picture.objectUrl().abortWith(controller.signal);
210
+ if (controller.signal.aborted) {
211
+ object.revoke();
212
+ return;
213
+ }
214
+ revoke = object.revoke;
215
+ if (image.value) image.value.src = object.url;
216
+ } catch {
217
+ }
218
+ })();
219
+ },
220
+ { immediate: true, flush: "post" }
221
+ );
222
+ return (_ctx, _cache) => {
223
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
224
+ vue.createElementVNode("img", {
225
+ ref_key: "image",
226
+ ref: image,
227
+ alt: "",
228
+ draggable: "false",
229
+ style: {
230
+ position: "absolute",
231
+ inset: 0,
232
+ width: "100%",
233
+ height: "100%",
234
+ pointerEvents: "none"
235
+ }
236
+ }, null, 512),
237
+ __props.tiles && vue.unref(settings).tiles && layers.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
238
+ key: 0,
239
+ layers: layers.value
240
+ }, null, 8, ["layers"])) : vue.createCommentVNode("", true)
241
+ ], 64);
242
+ };
243
+ }
244
+ });
245
+ function useRender() {
246
+ return capabilities.useCapability(pluginRender.RenderToken);
247
+ }
248
+ const useRenderSettings = state.settingsComposable(pluginRender.RenderToken);
249
+ function useRenderEvent(select, handler) {
250
+ capabilities.useCapabilityEvent(pluginRender.RenderToken, select, handler);
251
+ }
252
+ exports.RenderLayer = _sfc_main;
253
+ exports.useRender = useRender;
254
+ exports.useRenderEvent = useRenderEvent;
255
+ exports.useRenderSettings = useRenderSettings;
256
+ Object.keys(pluginRender).forEach((k) => {
257
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
258
+ enumerable: true,
259
+ get: () => pluginRender[k]
260
+ });
261
+ });
262
+ //# sourceMappingURL=render.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.cjs","sources":["../src/render/TileImage.vue","../src/render/TilePlane.vue","../src/render/RenderLayer.vue","../src/render.ts"],"sourcesContent":["<!--\n One tile: its place in view space, and the shared browser image binding,\n which hides the image until it is complete, reports painted after its first\n chance to be shown, and reports the inverse when it leaves.\n-->\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport type { CSSProperties } from 'vue';\nimport type { PageRef } from '@embedpdf/core';\nimport type { TilePaintSource, ViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport { bindPaintedImage } from '@embedpdf/web';\nimport { devWarn } from '../dev';\n\nconst props = defineProps<{\n source: TilePaintSource;\n /** The view's tile surface, told when this tile is painted and when it leaves. */\n view: ViewDemand;\n page: PageRef;\n /** View px per page point. */\n viewScale: number;\n}>();\n\nconst image = ref<HTMLImageElement | null>(null);\n\n// The handle is the bitmap's identity; the reports go to the view that planned it.\nwatch(\n [image, () => props.source.handle],\n ([element, handle], _previous, onCleanup) => {\n if (!element) return;\n const { view, page, source } = props;\n onCleanup(\n bindPaintedImage(element, handle, {\n onPainted: () => view.markPainted(page, source.key),\n onUnpainted: () => view.markUnpainted(page, source.key),\n }),\n );\n },\n { immediate: true, flush: 'post' },\n);\n\n/** A raster whose size disagrees with its rect would be stretched into place: a stale picture. */\nfunction checkSize(event: Event) {\n const naturalWidth = (event.currentTarget as HTMLImageElement).naturalWidth;\n if (naturalWidth <= 0) return;\n const expected = Math.round(props.source.rect.width * props.source.scale);\n if (Math.abs(naturalWidth - expected) > 1) {\n devWarn(\n 'tile-size',\n `tile bitmap ${naturalWidth}px wide does not match its rect ` +\n `(expected ~${expected}px) — stale raster identity? key=${props.source.key}`,\n );\n }\n}\n\nconst style = computed((): CSSProperties => {\n const { rect, z } = props.source;\n const scale = props.viewScale;\n return {\n position: 'absolute',\n left: `${rect.x * scale}px`,\n top: `${rect.y * scale}px`,\n width: `${rect.width * scale}px`,\n height: `${rect.height * scale}px`,\n zIndex: z,\n };\n});\n</script>\n\n<template>\n <img ref=\"image\" alt=\"\" draggable=\"false\" :style=\"style\" @load=\"checkSize\" />\n</template>\n","<!--\n The sharp plane above the base picture: the plugin's tile plan for this view,\n as keyed <img>s. Each tile reports painted after its first chance to be shown\n (and the inverse when it leaves), so coarser tiles are released only once\n their replacement can really be composited.\n\n Tiles are placed in view (CSS px) space, never in page points under a scaled\n container: browsers round layout lengths to 1/64 CSS px before transforms\n apply, so a point-space rect under a ×25 zoom would be off by 0.4px or more\n per tile, showing seams. In view space the rounding stays 1/64 px at every zoom.\n-->\n<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from 'vue';\nimport type { CSSProperties } from 'vue';\nimport { RenderToken, samePageViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport type { PageLayerOptions, ViewDemand } from '@embedpdf/plugin-render/contract/host';\nimport { useOptionalCapability } from '../runtime/capabilities';\nimport { useKernelValue } from '../runtime/kernel';\nimport { usePage } from '../runtime/page';\nimport TileImage from './TileImage.vue';\n\nconst props = defineProps<{ layers: PageLayerOptions }>();\n\nconst page = usePage();\nconst render = useOptionalCapability(RenderToken);\n\n// This view's tile surface: planned per view and page, so a thumbnail rail's\n// demand can't disturb the main view's tiles. The handle is shared per view\n// and counted: one `dispose` for every `createViewDemand`.\nconst view = shallowRef<ViewDemand | null>(null);\n\n// Which page and which view this plane plans for. The page context is a new\n// value on every zoom; these change only when the page or the view does, so\n// the handle and the page's claim on it follow ownership, never the camera.\nconst pageRef = computed(() => page.value.ref);\nconst viewId = computed(() => page.value.view);\n\n// Declared before the handle's own watcher, so on unmount the page is released\n// before the handle is disposed. Releasing stops in-flight fetches; resolved\n// pictures stay cached.\nwatch(\n [view, pageRef],\n ([handle, ref], _previous, onCleanup) => {\n if (handle) onCleanup(() => handle.release(ref));\n },\n { immediate: true },\n);\nwatch(\n [render, viewId],\n ([lens, id], _previous, onCleanup) => {\n if (!lens) {\n view.value = null;\n return;\n }\n const handle = lens.createViewDemand(id);\n view.value = handle;\n onCleanup(() => handle.dispose());\n },\n { immediate: true },\n);\n\n// The demand: the host's live view (a Stage page's visible part) or the whole\n// page. Read on every kernel change, so a pan re-plans; level settling is the\n// plugin's.\nconst demand = useKernelValue(\n () => page.value.getViewDemand?.() ?? { desiredDeviceWidth: page.value.transform.deviceWidth },\n samePageViewDemand,\n);\n\n// Demand in, plan out: setting the demand is the one call that fetches and\n// re-plans; reading the plan is pure. Before the render, so a camera move\n// re-plans in the same update.\nwatch(\n [view, demand, pageRef, () => props.layers],\n ([handle, wanted, ref, layers]) => {\n handle?.setDemand(ref, wanted, layers);\n },\n { immediate: true },\n);\nconst plan = useKernelValue(() => view.value?.getPlan(pageRef.value) ?? null);\n\nconst planeStyle = computed(\n (): CSSProperties => ({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `${page.value.transform.contentWidth}px`,\n height: `${page.value.transform.contentHeight}px`,\n pointerEvents: 'none',\n // Tiles carry z ranks (coarse under fine) while generations mix, mid-zoom.\n // A stacking context of its own keeps those ranks inside the plane, below\n // annotations, page chrome and menus.\n isolation: 'isolate',\n }),\n);\n</script>\n\n<template>\n <div v-if=\"view && plan && plan.paint.length > 0\" :style=\"planeStyle\">\n <TileImage\n v-for=\"source in plan.paint\"\n :key=\"source.key\"\n :source=\"source\"\n :view=\"view\"\n :page=\"page.ref\"\n :view-scale=\"page.transform.viewScale\"\n />\n </div>\n</template>\n","<!--\n <RenderLayer>: the page's picture, in two planes. The base plane is a\n whole-page <img> at the plugin's resolved size, always there, the instant\n backdrop. The tile plane above it paints the plugin's tile plan when the view\n wants more pixels than the base may spend; a thumbnail-sized view engages\n none. The layer only paints: every decision (sizes, tiles, caching, release)\n is the render plugin's, and anything mid-gesture scales with CSS until the\n plugin hands down new pixels.\n-->\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { RenderToken } from '@embedpdf/plugin-render/contract/host';\nimport type { PaintSettings } from '@embedpdf/plugin-render/contract/host';\nimport { partsDrawnTwice, pictureLayerOptionsOf } from '@embedpdf/web';\nimport { devWarn } from '../dev';\nimport { usePaintedParts } from '../page-layers';\nimport { useOptionalCapability, useOptionalSelector } from '../runtime/capabilities';\nimport { usePage } from '../runtime/page';\nimport TilePlane from './TilePlane.vue';\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Draw the annotations into the page's picture (`true`) or leave them out\n * (`false`). Left unset, the picture leaves them to an `<AnnotationLayer>`\n * on the page, and otherwise draws them when the user may read them.\n */\n annotations?: boolean;\n /** The same for the form fields, which a `<FormLayer>` paints. */\n formFields?: boolean;\n /**\n * Mount the tile plane. Whether it spends anything is the plugin's\n * arithmetic: leave it on, and pass `false` only for a view that must never\n * tile, even at deep zoom.\n */\n tiles?: boolean;\n }>(),\n // Unset stays unset: a boolean prop would otherwise read `false`.\n { annotations: undefined, formFields: undefined, tiles: true },\n);\n\nconst page = usePage();\n// The layer is a host of the render plugin: it paints conformed sources. The\n// host lens is the same runtime token, typed wider.\nconst render = useOptionalCapability(RenderToken);\nconst NO_PAINT: PaintSettings = { tiles: false };\n// The same object until a setting it reads changes.\nconst settings = useOptionalSelector(RenderToken, (lens) => lens.getPaintSettings(), NO_PAINT);\n\nconst pageRef = computed(() => page.value.ref);\nconst parts = computed(() => ({ annotations: props.annotations, formFields: props.formFields }));\nconst painted = usePaintedParts(pageRef);\nconst may = useOptionalSelector(RenderToken, (lens) => lens.getLayerRights(), null);\n/** The parts the picture draws; `null` until the page's layers have said what they paint. */\nconst layers = computed(() =>\n painted.value && may.value ? pictureLayerOptionsOf(painted.value, parts.value, may.value) : null,\n);\nwatch([painted, parts], ([current, asked]) => {\n if (current && partsDrawnTwice(current, asked).length > 0) {\n devWarn(\n 'render-layer-draws-what-a-layer-paints',\n '<RenderLayer :annotations> or <RenderLayer :form-fields> draws what an <AnnotationLayer> ' +\n 'or a <FormLayer> on the page paints too, so it shows twice. Leave the prop out: the ' +\n 'picture leaves out what a layer paints.',\n );\n }\n});\n\n// The raster's identity: its conformed width, the parts it draws and the\n// page's epoch. Above the budget it stays put while zooming, so the deep-zoom\n// backdrop never fetches again.\nconst sourceKey = useOptionalSelector(\n RenderToken,\n (lens) =>\n layers.value\n ? lens.getSourceKey(page.value.ref, {\n scale: page.value.transform.renderScale,\n ...layers.value,\n })\n : null,\n null,\n);\n\nconst image = ref<HTMLImageElement | null>(null);\nwatch(\n [render, pageRef, sourceKey, layers],\n ([lens, shown, _key, drawn], _previous, onCleanup) => {\n if (!lens || !drawn) return;\n const controller = new AbortController();\n let revoke: (() => void) | undefined;\n onCleanup(() => {\n controller.abort();\n revoke?.();\n });\n void (async () => {\n try {\n // The plugin conforms this to its resolved size and collapses asks for\n // the same key, so any scale that maps to this key asks for this key.\n const picture = await lens.renderSource(shown, {\n scale: page.value.transform.renderScale,\n ...drawn,\n view: page.value.view,\n signal: controller.signal,\n });\n const object = await picture.objectUrl().abortWith(controller.signal);\n if (controller.signal.aborted) {\n object.revoke();\n return;\n }\n revoke = object.revoke;\n // Set on a lasting element: the browser keeps the old picture until the\n // new one decodes, and never asks for the old URL again, so revoking it\n // on cleanup is safe.\n if (image.value) image.value.src = object.url;\n } catch {\n // Aborted (the view moved, or the layer unmounted), or the render failed.\n }\n })();\n },\n { immediate: true, flush: 'post' },\n);\n</script>\n\n<template>\n <img\n ref=\"image\"\n alt=\"\"\n draggable=\"false\"\n :style=\"{\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n }\"\n />\n <TilePlane v-if=\"tiles && settings.tiles && layers\" :layers=\"layers\" />\n</template>\n","/**\n * @embedpdf/vue/render: the Vue view of `@embedpdf/plugin-render`.\n * `<RenderLayer>` draws a page; `useRender()` renders pages yourself, for\n * previews and exports; `useRenderSettings()` and `useRenderEvent()` read and\n * follow the plugin.\n */\n\n// One line per feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-render';\nimport { RenderToken } from '@embedpdf/plugin-render';\nimport type { RenderCapability } from '@embedpdf/plugin-render';\nimport type { EventHook } from '@embedpdf/core';\nimport { useCapability, useCapabilityEvent } from './runtime/capabilities';\nimport { settingsComposable } from './state';\n\nexport { default as RenderLayer } from './render/RenderLayer.vue';\n\n/** The render API (renderPage, renderThumbnail, invalidation, settings) for app code. The object never changes. */\nexport function useRender(): RenderCapability {\n return useCapability(RenderToken);\n}\n\n/** The render settings (`fullPage`, `tiles`, `format`, …), with or without a document, as refs. Takes a selector. */\nexport const useRenderSettings = settingsComposable(RenderToken);\n\n/** Subscribe to one render event while the component lives: `useRenderEvent((render) => render.onInvalidated, handler)`. */\nexport function useRenderEvent<Event>(\n select: (render: RenderCapability) => EventHook<Event>,\n handler: (event: Event) => void,\n): void {\n useCapabilityEvent(RenderToken, select, handler);\n}\n"],"names":["ref","watch","page","bindPaintedImage","devWarn","computed","_createElementBlock","usePage","useOptionalCapability","RenderToken","shallowRef","useKernelValue","samePageViewDemand","_unref","_openBlock","_Fragment","_renderList","_createBlock","TileImage","useOptionalSelector","usePaintedParts","pictureLayerOptionsOf","partsDrawnTwice","_createElementVNode","TilePlane","useCapability","settingsComposable","useCapabilityEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,UAAM,QAAQ;AASd,UAAM,QAAQA,IAAAA,IAA6B,IAAI;AAG/CC,QAAAA;AAAAA,MACE,CAAC,OAAO,MAAM,MAAM,OAAO,MAAM;AAAA,MACjC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,cAAc;AAC3C,YAAI,CAAC,QAAS;AACd,cAAM,EAAE,MAAM,MAAAC,OAAM,OAAA,IAAW;AAC/B;AAAA,UACEC,IAAAA,iBAAiB,SAAS,QAAQ;AAAA,YAChC,WAAW,MAAM,KAAK,YAAYD,OAAM,OAAO,GAAG;AAAA,YAClD,aAAa,MAAM,KAAK,cAAcA,OAAM,OAAO,GAAG;AAAA,UAAA,CACv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O;AAAA;;;;;;QAMP;QAEc,QAAA,SAASV,UAAA,QAAA,EAAS,SAAS,OAAA,0BAA5CI,IAAAA,YAAuEO,aAAA;AAAA;UAAlB,QAAQ,OAAA;AAAA,QAAA;;;;;ACtHxD,SAAS,YAA8B;AAC5C,SAAOC,aAAAA,cAAchB,aAAAA,WAAW;AAClC;AAGO,MAAM,oBAAoBiB,MAAAA,mBAAmBjB,aAAAA,WAAW;AAGxD,SAAS,eACd,QACA,SACM;AACNkB,kCAAmBlB,aAAAA,aAAa,QAAQ,OAAO;AACjD;;;;;;;;;;;"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @embedpdf/vue/render: the Vue view of `@embedpdf/plugin-render`.
3
+ * `<RenderLayer>` draws a page; `useRender()` renders pages yourself, for
4
+ * previews and exports; `useRenderSettings()` and `useRenderEvent()` read and
5
+ * follow the plugin.
6
+ */
7
+ export * from '@embedpdf/plugin-render';
8
+ import type { RenderCapability } from '@embedpdf/plugin-render';
9
+ import type { EventHook } from '@embedpdf/core';
10
+ export { default as RenderLayer } from './render/RenderLayer.vue.cjs';
11
+ /** The render API (renderPage, renderThumbnail, invalidation, settings) for app code. The object never changes. */
12
+ export declare function useRender(): RenderCapability;
13
+ /** The render settings (`fullPage`, `tiles`, `format`, …), with or without a document, as refs. Takes a selector. */
14
+ export declare const useRenderSettings: import("./state.cjs").SettingsComposable<import("@embedpdf/plugin-render").RenderSettings & object>;
15
+ /** Subscribe to one render event while the component lives: `useRenderEvent((render) => render.onInvalidated, handler)`. */
16
+ export declare function useRenderEvent<Event>(select: (render: RenderCapability) => EventHook<Event>, handler: (event: Event) => void): void;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @embedpdf/vue/render: the Vue view of `@embedpdf/plugin-render`.
3
+ * `<RenderLayer>` draws a page; `useRender()` renders pages yourself, for
4
+ * previews and exports; `useRenderSettings()` and `useRenderEvent()` read and
5
+ * follow the plugin.
6
+ */
7
+ export * from '@embedpdf/plugin-render';
8
+ import type { RenderCapability } from '@embedpdf/plugin-render';
9
+ import type { EventHook } from '@embedpdf/core';
10
+ export { default as RenderLayer } from './render/RenderLayer.vue.js';
11
+ /** The render API (renderPage, renderThumbnail, invalidation, settings) for app code. The object never changes. */
12
+ export declare function useRender(): RenderCapability;
13
+ /** The render settings (`fullPage`, `tiles`, `format`, …), with or without a document, as refs. Takes a selector. */
14
+ export declare const useRenderSettings: import("./state.js").SettingsComposable<import("@embedpdf/plugin-render").RenderSettings & object>;
15
+ /** Subscribe to one render event while the component lives: `useRenderEvent((render) => render.onInvalidated, handler)`. */
16
+ export declare function useRenderEvent<Event>(select: (render: RenderCapability) => EventHook<Event>, handler: (event: Event) => void): void;