@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,682 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const core = require("@embedpdf/core");
4
+ const host = require("@embedpdf/plugin-form/contract/host");
5
+ const host$2 = require("@embedpdf/plugin-interaction/contract/host");
6
+ const pageLayers = require("./page-layers-c-CJYAUO.cjs");
7
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
8
+ const page = require("./page-Doy4_Sdz.cjs");
9
+ const web = require("@embedpdf/web");
10
+ const pluginForm = require("@embedpdf/plugin-form");
11
+ const documents = require("./documents-TQ1fMdWI.cjs");
12
+ const state = require("./state-M22NDJQo.cjs");
13
+ const coreAnnotation = require("@embedpdf/core-annotation");
14
+ const host$1 = require("@embedpdf/plugin-render/contract/host");
15
+ const SvgShapes_vue_vue_type_script_setup_true_lang = require("./SvgShapes.vue_vue_type_script_setup_true_lang-D_c-wINF.cjs");
16
+ const contract = require("@embedpdf/plugin-signature/contract");
17
+ function useForm() {
18
+ return capabilities.useCapability(pluginForm.FormToken);
19
+ }
20
+ function useFormEvent(select, handler) {
21
+ capabilities.useCapabilityEvent(pluginForm.FormToken, select, handler);
22
+ }
23
+ const useFormState = state.stateComposable(pluginForm.formState);
24
+ const useFormSettings = state.settingsComposable(pluginForm.FormToken);
25
+ function useFormValue(field) {
26
+ return capabilities.useOptionalSelector(pluginForm.FormToken, (form) => form.getValue(vue.toValue(field)), null);
27
+ }
28
+ function useFormColors() {
29
+ const accent = documents.useViewerSettings((settings) => settings.accent);
30
+ const focus = useFormSettings((settings) => settings.focus);
31
+ const fields = useFormSettings((settings) => settings.fields);
32
+ return vue.computed(() => web.formColorsOf({ focus: focus.value, fields: fields.value }, accent.value));
33
+ }
34
+ function useWidgetActivation(widget) {
35
+ const form = capabilities.useCapability(host.FormToken);
36
+ return () => {
37
+ const target = widget();
38
+ if (target) void form.activateWidget(target);
39
+ };
40
+ }
41
+ function useWidgetBox(item, colors, options = {}) {
42
+ const page$1 = page.usePage();
43
+ const form = capabilities.useCapability(host.FormToken);
44
+ const element = vue.ref(null);
45
+ const edge = options.edge ?? true;
46
+ vue.watch(
47
+ element,
48
+ (box, _previous, onCleanup) => {
49
+ if (!box) return;
50
+ const release = web.isolatePointerDown(box);
51
+ const unbind = web.bindWidgetEvents(box, (event) => {
52
+ const { fieldRef, annotationRef } = item();
53
+ if (annotationRef) form.notifyWidgetEvent(fieldRef, annotationRef, event);
54
+ });
55
+ onCleanup(() => {
56
+ release();
57
+ unbind();
58
+ });
59
+ },
60
+ { immediate: true, flush: "post" }
61
+ );
62
+ const frame = vue.computed(() => web.rectInPixels(item().box, page$1.value.transform));
63
+ const style = vue.computed(
64
+ () => web.widgetBoxStyleOf(item(), frame.value, colors(), { edge })
65
+ );
66
+ return { element, frame, style };
67
+ }
68
+ const _hoisted_1$7 = ["aria-label", "disabled"];
69
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
70
+ __name: "ButtonControl",
71
+ props: {
72
+ item: {},
73
+ colors: {}
74
+ },
75
+ setup(__props) {
76
+ const props = __props;
77
+ const activate = useWidgetActivation(() => props.item.annotationRef);
78
+ const { element: box, style: boxStyle } = useWidgetBox(
79
+ () => props.item,
80
+ () => props.colors,
81
+ { edge: false }
82
+ );
83
+ return (_ctx, _cache) => {
84
+ return vue.openBlock(), vue.createElementBlock("div", {
85
+ ref_key: "box",
86
+ ref: box,
87
+ style: vue.normalizeStyle([vue.unref(boxStyle), { cursor: __props.item.disabled ? "default" : "pointer" }])
88
+ }, [
89
+ vue.createElementVNode("button", {
90
+ type: "button",
91
+ "aria-label": __props.item.label,
92
+ disabled: __props.item.disabled,
93
+ style: vue.normalizeStyle({
94
+ ...vue.unref(web.FORM_CONTROL_FILL),
95
+ padding: "0",
96
+ border: "0",
97
+ background: "transparent",
98
+ cursor: "inherit",
99
+ pointerEvents: __props.item.disabled ? "none" : "auto"
100
+ }),
101
+ onClick: _cache[0] || (_cache[0] = //@ts-ignore
102
+ (...args) => vue.unref(activate) && vue.unref(activate)(...args))
103
+ }, null, 12, _hoisted_1$7)
104
+ ], 4);
105
+ };
106
+ }
107
+ });
108
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
109
+ __name: "FormFocusRing",
110
+ props: {
111
+ visible: { type: Boolean },
112
+ color: {}
113
+ },
114
+ setup(__props) {
115
+ return (_ctx, _cache) => {
116
+ return __props.visible ? (vue.openBlock(), vue.createElementBlock("span", {
117
+ key: 0,
118
+ "aria-hidden": "true",
119
+ "data-embedpdf-form-focus-ring": "",
120
+ style: vue.normalizeStyle(vue.unref(web.formFocusRingStyleOf)(__props.color))
121
+ }, null, 4)) : vue.createCommentVNode("", true);
122
+ };
123
+ }
124
+ });
125
+ const _hoisted_1$6 = ["value", "aria-label", "disabled"];
126
+ const _hoisted_2$3 = {
127
+ key: 0,
128
+ value: ""
129
+ };
130
+ const _hoisted_3 = ["value"];
131
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
132
+ __name: "ComboControl",
133
+ props: {
134
+ item: {},
135
+ colors: {}
136
+ },
137
+ setup(__props) {
138
+ const props = __props;
139
+ const form = capabilities.useCapability(host.FormToken);
140
+ const activate = useWidgetActivation(() => props.item.annotationRef);
141
+ const { element: box, style: boxStyle } = useWidgetBox(
142
+ () => props.item,
143
+ () => props.colors
144
+ );
145
+ const focused = vue.ref(false);
146
+ const selectionKey = vue.computed(() => props.item.selected.join("\0"));
147
+ function onChange(event) {
148
+ const value = event.currentTarget.value;
149
+ void form.setValue(props.item.fieldRef, { value: value || null });
150
+ }
151
+ return (_ctx, _cache) => {
152
+ return vue.openBlock(), vue.createElementBlock("div", {
153
+ ref_key: "box",
154
+ ref: box,
155
+ style: vue.normalizeStyle(vue.unref(boxStyle)),
156
+ onClick: _cache[2] || (_cache[2] = //@ts-ignore
157
+ (...args) => vue.unref(activate) && vue.unref(activate)(...args))
158
+ }, [
159
+ (vue.openBlock(), vue.createElementBlock("select", {
160
+ key: selectionKey.value,
161
+ value: __props.item.selected[0] ?? "",
162
+ "aria-label": __props.item.label,
163
+ disabled: __props.item.disabled,
164
+ style: vue.normalizeStyle({
165
+ ...vue.unref(web.FORM_CONTROL_FILL),
166
+ opacity: 0,
167
+ cursor: __props.item.disabled ? "default" : "pointer",
168
+ ...__props.item.disabled ? { pointerEvents: "none" } : {}
169
+ }),
170
+ onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
171
+ onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false),
172
+ onChange
173
+ }, [
174
+ __props.item.selected.length === 0 ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_2$3)) : vue.createCommentVNode("", true),
175
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.item.options, (option, index) => {
176
+ return vue.openBlock(), vue.createElementBlock("option", {
177
+ key: index,
178
+ value: option.value
179
+ }, vue.toDisplayString(option.label), 9, _hoisted_3);
180
+ }), 128))
181
+ ], 44, _hoisted_1$6)),
182
+ vue.createVNode(_sfc_main$8, {
183
+ visible: focused.value,
184
+ color: __props.colors.focus
185
+ }, null, 8, ["visible", "color"])
186
+ ], 4);
187
+ };
188
+ }
189
+ });
190
+ const _hoisted_1$5 = ["src"];
191
+ const _hoisted_2$2 = ["viewBox"];
192
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
193
+ __name: "FieldPictures",
194
+ setup(__props) {
195
+ const NO_WIDGETS = Object.freeze([]);
196
+ const page$1 = page.usePage();
197
+ const form = capabilities.useOptionalCapability(host.FormToken);
198
+ const widgets = capabilities.useOptionalSelector(
199
+ host.FormToken,
200
+ (form2) => form2.listShownWidgets(page$1.value.ref),
201
+ NO_WIDGETS,
202
+ core.shallowEqual
203
+ );
204
+ const epoch = capabilities.useOptionalSelector(
205
+ host.FormToken,
206
+ (form2) => form2.getAppearanceEpoch(page$1.value.ref),
207
+ ""
208
+ );
209
+ const scale = capabilities.useOptionalSelector(
210
+ host$1.RenderToken,
211
+ (lens) => lens.getAppearanceScale(page$1.value.transform.renderScale),
212
+ 0
213
+ );
214
+ const urls = vue.shallowRef(null);
215
+ const shown = web.createShownUrls();
216
+ vue.onUnmounted(() => shown.release());
217
+ vue.watch(
218
+ [form, () => page$1.value.ref, scale, epoch],
219
+ ([host2, pageRef, at], _previous, onCleanup) => {
220
+ if (!host2 || !at) return;
221
+ onCleanup(
222
+ web.loadAppearanceUrls(
223
+ shown,
224
+ (signal) => host2.renderAppearances(pageRef, at, signal),
225
+ core.annotationKey,
226
+ (loaded) => urls.value = loaded
227
+ )
228
+ );
229
+ },
230
+ { immediate: true }
231
+ );
232
+ const looks = vue.computed(
233
+ () => widgets.value.flatMap((widget) => {
234
+ const key = core.annotationKey(widget.ref);
235
+ const look = web.pictureOrPainting({
236
+ pending: widget.pending,
237
+ picture: urls.value && web.shownAppearance(urls.value, key, widget.appearanceState),
238
+ version: widget.pictureVersion,
239
+ loaded: urls.value !== null,
240
+ paint: () => {
241
+ var _a;
242
+ return ((_a = form.value) == null ? void 0 : _a.getWidgetPainting(widget.ref)) ?? null;
243
+ }
244
+ });
245
+ if (!look) return [];
246
+ if (look.kind === "picture") {
247
+ return [
248
+ {
249
+ kind: "picture",
250
+ key,
251
+ url: look.picture.url,
252
+ frame: web.rectInPixels(look.picture.box, page$1.value.transform)
253
+ }
254
+ ];
255
+ }
256
+ const { x, y, width, height } = widget.rect;
257
+ return [
258
+ {
259
+ kind: "painting",
260
+ key,
261
+ viewBox: `${x} ${y} ${width} ${height}`,
262
+ shapes: web.svgShapesOf(look.painting.scene, { miterLimit: coreAnnotation.MITER_LIMIT }),
263
+ frame: web.rectInPixels(widget.rect, page$1.value.transform)
264
+ }
265
+ ];
266
+ })
267
+ );
268
+ return (_ctx, _cache) => {
269
+ return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(looks.value, (look) => {
270
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
271
+ key: look.key
272
+ }, [
273
+ look.kind === "picture" ? (vue.openBlock(), vue.createElementBlock("img", {
274
+ key: 0,
275
+ src: look.url,
276
+ alt: "",
277
+ draggable: "false",
278
+ style: vue.normalizeStyle({
279
+ position: "absolute",
280
+ left: `${look.frame.left}px`,
281
+ top: `${look.frame.top}px`,
282
+ width: `${look.frame.width}px`,
283
+ height: `${look.frame.height}px`,
284
+ // A global `img { max-width: 100% }` reset would clamp it.
285
+ maxWidth: "none",
286
+ maxHeight: "none",
287
+ pointerEvents: "none"
288
+ })
289
+ }, null, 12, _hoisted_1$5)) : (vue.openBlock(), vue.createElementBlock("svg", {
290
+ key: 1,
291
+ viewBox: look.viewBox,
292
+ style: vue.normalizeStyle({
293
+ position: "absolute",
294
+ left: `${look.frame.left}px`,
295
+ top: `${look.frame.top}px`,
296
+ width: `${look.frame.width}px`,
297
+ height: `${look.frame.height}px`,
298
+ overflow: "visible",
299
+ pointerEvents: "none"
300
+ })
301
+ }, [
302
+ vue.createVNode(SvgShapes_vue_vue_type_script_setup_true_lang._sfc_main, {
303
+ shapes: look.shapes
304
+ }, null, 8, ["shapes"])
305
+ ], 12, _hoisted_2$2))
306
+ ], 64);
307
+ }), 128);
308
+ };
309
+ }
310
+ });
311
+ const _hoisted_1$4 = ["aria-label", "multiple", "size", "disabled"];
312
+ const _hoisted_2$1 = ["value"];
313
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
314
+ __name: "NativeListBox",
315
+ props: {
316
+ label: {},
317
+ disabled: { type: Boolean },
318
+ multi: { type: Boolean },
319
+ options: {},
320
+ selected: {},
321
+ onSelect: { type: Function }
322
+ },
323
+ emits: ["focus", "blur"],
324
+ setup(__props, { emit: __emit }) {
325
+ const props = __props;
326
+ const emit = __emit;
327
+ const selection = web.createOptimisticSelection(props.selected);
328
+ const shown = vue.shallowRef(selection.get());
329
+ vue.onUnmounted(selection.subscribe(() => shown.value = selection.get()));
330
+ vue.watch(
331
+ () => props.selected,
332
+ (values) => selection.setConfirmed(values)
333
+ );
334
+ const control = vue.ref(null);
335
+ vue.watch(
336
+ control,
337
+ (element, _previous, onCleanup) => {
338
+ if (element) onCleanup(web.isolateWheel(element));
339
+ },
340
+ { immediate: true, flush: "post" }
341
+ );
342
+ vue.watch(
343
+ [control, shown, () => props.options],
344
+ ([element, values]) => {
345
+ if (element) web.showSelectedOptions(element, values);
346
+ },
347
+ { immediate: true, flush: "post" }
348
+ );
349
+ function onChange(event) {
350
+ const element = event.currentTarget;
351
+ selection.choose(
352
+ Array.from(element.selectedOptions).map((option) => option.value),
353
+ props.onSelect
354
+ );
355
+ }
356
+ return (_ctx, _cache) => {
357
+ return vue.openBlock(), vue.createElementBlock("select", {
358
+ ref_key: "control",
359
+ ref: control,
360
+ "aria-label": __props.label,
361
+ multiple: __props.multi,
362
+ size: Math.max(2, __props.options.length),
363
+ disabled: __props.disabled,
364
+ onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus")),
365
+ onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur")),
366
+ onChange
367
+ }, [
368
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option, index) => {
369
+ return vue.openBlock(), vue.createElementBlock("option", {
370
+ key: index,
371
+ value: option.value
372
+ }, vue.toDisplayString(option.label), 9, _hoisted_2$1);
373
+ }), 128))
374
+ ], 40, _hoisted_1$4);
375
+ };
376
+ }
377
+ });
378
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
379
+ __name: "ListControl",
380
+ props: {
381
+ item: {},
382
+ colors: {}
383
+ },
384
+ setup(__props) {
385
+ const props = __props;
386
+ const form = capabilities.useCapability(host.FormToken);
387
+ const activate = useWidgetActivation(() => props.item.annotationRef);
388
+ const {
389
+ element: box,
390
+ frame,
391
+ style: boxStyle
392
+ } = useWidgetBox(
393
+ () => props.item,
394
+ () => props.colors,
395
+ { edge: false }
396
+ );
397
+ const focused = vue.ref(false);
398
+ const select = (values) => form.setValue(props.item.fieldRef, { selectedValues: values });
399
+ const listStyle = vue.computed(() => web.listBoxControlStyleOf(props.item, frame.value, props.colors));
400
+ return (_ctx, _cache) => {
401
+ return vue.openBlock(), vue.createElementBlock("div", {
402
+ ref_key: "box",
403
+ ref: box,
404
+ style: vue.normalizeStyle(vue.unref(boxStyle)),
405
+ onClick: _cache[2] || (_cache[2] = //@ts-ignore
406
+ (...args) => vue.unref(activate) && vue.unref(activate)(...args))
407
+ }, [
408
+ vue.createVNode(_sfc_main$5, {
409
+ label: __props.item.label,
410
+ disabled: __props.item.disabled,
411
+ multi: __props.item.multi,
412
+ options: __props.item.options,
413
+ selected: __props.item.selected,
414
+ "on-select": select,
415
+ style: vue.normalizeStyle(listStyle.value),
416
+ onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
417
+ onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false)
418
+ }, null, 8, ["label", "disabled", "multi", "options", "selected", "style"]),
419
+ vue.createVNode(_sfc_main$8, {
420
+ visible: focused.value,
421
+ color: __props.colors.focus
422
+ }, null, 8, ["visible", "color"])
423
+ ], 4);
424
+ };
425
+ }
426
+ });
427
+ const _hoisted_1$3 = ["aria-label", "data-signed"];
428
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
429
+ __name: "SignatureControl",
430
+ props: {
431
+ item: {},
432
+ colors: {}
433
+ },
434
+ setup(__props) {
435
+ const props = __props;
436
+ const { element: box, style: boxStyle } = useWidgetBox(
437
+ () => props.item,
438
+ () => props.colors
439
+ );
440
+ const signature = capabilities.useOptionalCapability(contract.SignatureToken);
441
+ const known = capabilities.useOptionalSelector(
442
+ contract.SignatureToken,
443
+ (capability) => {
444
+ var _a;
445
+ return ((_a = capability.getSignature(props.item.fieldRef)) == null ? void 0 : _a.signed) ?? null;
446
+ },
447
+ null
448
+ );
449
+ const signed = vue.computed(() => known.value ?? props.item.signed);
450
+ const actionable = vue.computed(
451
+ () => signature.value !== null && (signed.value || !props.item.disabled)
452
+ );
453
+ function onClick() {
454
+ const plugin = signature.value;
455
+ if (!plugin) return;
456
+ if (signed.value) plugin.requestInspection(props.item.fieldRef);
457
+ else plugin.setTarget(props.item.fieldRef);
458
+ }
459
+ return (_ctx, _cache) => {
460
+ return vue.openBlock(), vue.createElementBlock("div", {
461
+ ref_key: "box",
462
+ ref: box,
463
+ style: vue.normalizeStyle([vue.unref(boxStyle), { cursor: actionable.value ? "pointer" : "default" }])
464
+ }, [
465
+ actionable.value ? (vue.openBlock(), vue.createElementBlock("button", {
466
+ key: 0,
467
+ type: "button",
468
+ "aria-label": __props.item.label,
469
+ "data-signed": signed.value ? "" : void 0,
470
+ style: vue.normalizeStyle({
471
+ ...vue.unref(web.FORM_CONTROL_FILL),
472
+ padding: "0",
473
+ border: "0",
474
+ background: "transparent",
475
+ cursor: "inherit"
476
+ }),
477
+ onClick
478
+ }, null, 12, _hoisted_1$3)) : vue.createCommentVNode("", true)
479
+ ], 4);
480
+ };
481
+ }
482
+ });
483
+ const _hoisted_1$2 = ["value", "maxlength", "aria-label", "disabled"];
484
+ const _hoisted_2 = ["type", "value", "maxlength", "aria-label", "disabled"];
485
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
486
+ __name: "TextControl",
487
+ props: {
488
+ item: {},
489
+ colors: {}
490
+ },
491
+ setup(__props) {
492
+ const props = __props;
493
+ const form = capabilities.useCapability(host.FormToken);
494
+ const activate = useWidgetActivation(() => props.item.annotationRef);
495
+ const { element: box, frame, style: boxStyle } = useWidgetBox(
496
+ () => props.item,
497
+ () => props.colors
498
+ );
499
+ const editor = web.createTextFieldEditor(form, props.item.fieldRef, props.item.value);
500
+ const state2 = vue.shallowRef(editor.getState());
501
+ vue.onUnmounted(editor.subscribe(() => state2.value = editor.getState()));
502
+ vue.watch(
503
+ () => props.item.value,
504
+ (value) => editor.setValue(value)
505
+ );
506
+ const layout = vue.computed(
507
+ () => props.item.annotationRef ? form.getTextEditorLayout(props.item.annotationRef, state2.value.draft) : null
508
+ );
509
+ const mounts = web.createFontMounts();
510
+ vue.onUnmounted(() => mounts.release());
511
+ vue.watchEffect(() => {
512
+ if (layout.value) mounts.mount([layout.value.program]);
513
+ });
514
+ const editorStyle = vue.computed(
515
+ () => web.textFieldEditorStyleOf(props.item, frame.value, props.colors, state2.value.focused, layout.value)
516
+ );
517
+ const onInput = (event) => editor.input(event.target.value);
518
+ function onKeydown(event) {
519
+ if (editor.keyDown(event.key, props.item.multiline)) {
520
+ event.currentTarget.blur();
521
+ }
522
+ }
523
+ return (_ctx, _cache) => {
524
+ return vue.openBlock(), vue.createElementBlock("div", {
525
+ ref_key: "box",
526
+ ref: box,
527
+ style: vue.normalizeStyle(vue.unref(boxStyle)),
528
+ onClick: _cache[4] || (_cache[4] = //@ts-ignore
529
+ (...args) => vue.unref(activate) && vue.unref(activate)(...args))
530
+ }, [
531
+ __props.item.multiline ? (vue.openBlock(), vue.createElementBlock("textarea", {
532
+ key: 0,
533
+ value: state2.value.draft,
534
+ maxlength: __props.item.maxLength ?? void 0,
535
+ "aria-label": __props.item.label,
536
+ disabled: __props.item.disabled,
537
+ style: vue.normalizeStyle(editorStyle.value),
538
+ onFocus: _cache[0] || (_cache[0] = //@ts-ignore
539
+ (...args) => vue.unref(editor).focus && vue.unref(editor).focus(...args)),
540
+ onInput,
541
+ onBlur: _cache[1] || (_cache[1] = //@ts-ignore
542
+ (...args) => vue.unref(editor).blur && vue.unref(editor).blur(...args)),
543
+ onKeydown
544
+ }, null, 44, _hoisted_1$2)) : (vue.openBlock(), vue.createElementBlock("input", {
545
+ key: 1,
546
+ type: __props.item.password ? "password" : "text",
547
+ value: state2.value.draft,
548
+ maxlength: __props.item.maxLength ?? void 0,
549
+ "aria-label": __props.item.label,
550
+ disabled: __props.item.disabled,
551
+ style: vue.normalizeStyle(editorStyle.value),
552
+ onFocus: _cache[2] || (_cache[2] = //@ts-ignore
553
+ (...args) => vue.unref(editor).focus && vue.unref(editor).focus(...args)),
554
+ onInput,
555
+ onBlur: _cache[3] || (_cache[3] = //@ts-ignore
556
+ (...args) => vue.unref(editor).blur && vue.unref(editor).blur(...args)),
557
+ onKeydown
558
+ }, null, 44, _hoisted_2))
559
+ ], 4);
560
+ };
561
+ }
562
+ });
563
+ const _hoisted_1$1 = ["role", "aria-checked", "aria-label", "tabindex"];
564
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
565
+ __name: "ToggleControl",
566
+ props: {
567
+ item: {},
568
+ colors: {}
569
+ },
570
+ setup(__props) {
571
+ const props = __props;
572
+ const form = capabilities.useCapability(host.FormToken);
573
+ const activate = useWidgetActivation(() => props.item.annotationRef);
574
+ const { element: box, style: boxStyle } = useWidgetBox(
575
+ () => props.item,
576
+ () => props.colors
577
+ );
578
+ const focused = vue.ref(false);
579
+ const press = () => web.pressToggle(form, props.item, activate);
580
+ function onKeydown(event) {
581
+ if (event.key !== " " && event.key !== "Enter") return;
582
+ event.preventDefault();
583
+ press();
584
+ }
585
+ return (_ctx, _cache) => {
586
+ return vue.openBlock(), vue.createElementBlock("div", {
587
+ ref_key: "box",
588
+ ref: box,
589
+ role: __props.item.kind === "checkbox" ? "checkbox" : "radio",
590
+ "aria-checked": __props.item.checked,
591
+ "aria-label": __props.item.label,
592
+ tabindex: __props.item.disabled ? -1 : 0,
593
+ style: vue.normalizeStyle([vue.unref(boxStyle), { cursor: __props.item.disabled ? "default" : "pointer", outline: "none" }]),
594
+ onClick: press,
595
+ onKeydown,
596
+ onFocus: _cache[0] || (_cache[0] = ($event) => focused.value = true),
597
+ onBlur: _cache[1] || (_cache[1] = ($event) => focused.value = false)
598
+ }, [
599
+ vue.createVNode(_sfc_main$8, {
600
+ visible: focused.value,
601
+ color: __props.colors.focus
602
+ }, null, 8, ["visible", "color"])
603
+ ], 44, _hoisted_1$1);
604
+ };
605
+ }
606
+ });
607
+ const _hoisted_1 = { style: { position: "absolute", inset: "0", pointerEvents: "none" } };
608
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
609
+ __name: "FormLayer",
610
+ setup(__props) {
611
+ const NO_WIDGETS = Object.freeze([]);
612
+ const page$1 = page.usePage();
613
+ const form = capabilities.useOptionalCapability(host.FormToken);
614
+ pageLayers.usePaintsPagePart(
615
+ vue.computed(() => form.value ? page$1.value.ref : null),
616
+ "formFields"
617
+ );
618
+ const colors = useFormColors();
619
+ const active = capabilities.useOptionalSelector(
620
+ host$2.InteractionToken,
621
+ (interaction) => interaction.activeToolEnables("form-fill"),
622
+ false
623
+ );
624
+ const items = capabilities.useOptionalSelector(
625
+ host.FormToken,
626
+ (lens) => lens.listWidgets(page$1.value.ref),
627
+ NO_WIDGETS,
628
+ core.shallowEqual
629
+ );
630
+ vue.watch(
631
+ [form, () => page$1.value.ref],
632
+ ([lens, pageRef]) => {
633
+ if (lens) void lens.ensureLoaded(pageRef);
634
+ },
635
+ { immediate: true }
636
+ );
637
+ const keyOf = (item) => `${item.key}:${item.annotObjectNumber}`;
638
+ return (_ctx, _cache) => {
639
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
640
+ vue.createVNode(_sfc_main$6),
641
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(active) ? vue.unref(items) : [], (item) => {
642
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
643
+ key: keyOf(item)
644
+ }, [
645
+ item.control === "text" ? (vue.openBlock(), vue.createBlock(_sfc_main$2, {
646
+ key: 0,
647
+ item,
648
+ colors: vue.unref(colors)
649
+ }, null, 8, ["item", "colors"])) : item.control === "toggle" ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
650
+ key: 1,
651
+ item,
652
+ colors: vue.unref(colors)
653
+ }, null, 8, ["item", "colors"])) : item.control === "choice" && item.kind === "list" ? (vue.openBlock(), vue.createBlock(_sfc_main$4, {
654
+ key: 2,
655
+ item,
656
+ colors: vue.unref(colors)
657
+ }, null, 8, ["item", "colors"])) : item.control === "choice" ? (vue.openBlock(), vue.createBlock(_sfc_main$7, {
658
+ key: 3,
659
+ item,
660
+ colors: vue.unref(colors)
661
+ }, null, 8, ["item", "colors"])) : item.control === "button" ? (vue.openBlock(), vue.createBlock(_sfc_main$9, {
662
+ key: 4,
663
+ item,
664
+ colors: vue.unref(colors)
665
+ }, null, 8, ["item", "colors"])) : item.control === "signature" ? (vue.openBlock(), vue.createBlock(_sfc_main$3, {
666
+ key: 5,
667
+ item,
668
+ colors: vue.unref(colors)
669
+ }, null, 8, ["item", "colors"])) : vue.createCommentVNode("", true)
670
+ ], 64);
671
+ }), 128))
672
+ ]);
673
+ };
674
+ }
675
+ });
676
+ exports._sfc_main = _sfc_main;
677
+ exports.useForm = useForm;
678
+ exports.useFormEvent = useFormEvent;
679
+ exports.useFormSettings = useFormSettings;
680
+ exports.useFormState = useFormState;
681
+ exports.useFormValue = useFormValue;
682
+ //# sourceMappingURL=FormLayer.vue_vue_type_script_setup_true_lang-BA0_VwFc.cjs.map