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

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 (417) 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-C-7yeEGh.js +192 -0
  12. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-C-7yeEGh.js.map +1 -0
  13. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.cjs +191 -0
  14. package/dist/DocumentScope.vue_vue_type_script_setup_true_lang-czzeUzPl.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 +28 -0
  94. package/dist/annotation/text-box.d.ts +28 -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/attachment.cjs +22 -0
  104. package/dist/attachment.cjs.map +1 -0
  105. package/dist/attachment.d.cts +34 -0
  106. package/dist/attachment.d.ts +34 -0
  107. package/dist/attachment.js +17 -0
  108. package/dist/attachment.js.map +1 -0
  109. package/dist/capabilities-C7YzgPCX.js +164 -0
  110. package/dist/capabilities-C7YzgPCX.js.map +1 -0
  111. package/dist/capabilities-DVNJmgy7.cjs +163 -0
  112. package/dist/capabilities-DVNJmgy7.cjs.map +1 -0
  113. package/dist/commands.cjs +81 -0
  114. package/dist/commands.cjs.map +1 -0
  115. package/dist/commands.d.cts +61 -0
  116. package/dist/commands.d.ts +61 -0
  117. package/dist/commands.js +76 -0
  118. package/dist/commands.js.map +1 -0
  119. package/dist/composables-BGBsNDf9.cjs +25 -0
  120. package/dist/composables-BGBsNDf9.cjs.map +1 -0
  121. package/dist/composables-Bi6QvJpj.cjs +978 -0
  122. package/dist/composables-Bi6QvJpj.cjs.map +1 -0
  123. package/dist/composables-DK3lwh38.js +979 -0
  124. package/dist/composables-DK3lwh38.js.map +1 -0
  125. package/dist/composables-DwsZdg06.js +26 -0
  126. package/dist/composables-DwsZdg06.js.map +1 -0
  127. package/dist/dev-CtMlvxjZ.js +17 -0
  128. package/dist/dev-CtMlvxjZ.js.map +1 -0
  129. package/dist/dev-eeIS2B4c.cjs +16 -0
  130. package/dist/dev-eeIS2B4c.cjs.map +1 -0
  131. package/dist/dev.d.cts +11 -0
  132. package/dist/dev.d.ts +11 -0
  133. package/dist/documents-DUu5H4yH.js +34 -0
  134. package/dist/documents-DUu5H4yH.js.map +1 -0
  135. package/dist/documents-TQ1fMdWI.cjs +33 -0
  136. package/dist/documents-TQ1fMdWI.cjs.map +1 -0
  137. package/dist/form/ButtonControl.vue.d.cts +11 -0
  138. package/dist/form/ButtonControl.vue.d.ts +11 -0
  139. package/dist/form/ComboControl.vue.d.cts +11 -0
  140. package/dist/form/ComboControl.vue.d.ts +11 -0
  141. package/dist/form/FieldPictures.vue.d.cts +3 -0
  142. package/dist/form/FieldPictures.vue.d.ts +3 -0
  143. package/dist/form/FormFocusRing.vue.d.cts +8 -0
  144. package/dist/form/FormFocusRing.vue.d.ts +8 -0
  145. package/dist/form/FormLayer.vue.d.cts +3 -0
  146. package/dist/form/FormLayer.vue.d.ts +3 -0
  147. package/dist/form/ListControl.vue.d.cts +11 -0
  148. package/dist/form/ListControl.vue.d.ts +11 -0
  149. package/dist/form/NativeListBox.vue.d.cts +27 -0
  150. package/dist/form/NativeListBox.vue.d.ts +27 -0
  151. package/dist/form/SignatureControl.vue.d.cts +11 -0
  152. package/dist/form/SignatureControl.vue.d.ts +11 -0
  153. package/dist/form/TextControl.vue.d.cts +11 -0
  154. package/dist/form/TextControl.vue.d.ts +11 -0
  155. package/dist/form/ToggleControl.vue.d.cts +11 -0
  156. package/dist/form/ToggleControl.vue.d.ts +11 -0
  157. package/dist/form/composables.d.cts +52 -0
  158. package/dist/form/composables.d.ts +52 -0
  159. package/dist/form/widget-box.d.cts +34 -0
  160. package/dist/form/widget-box.d.ts +34 -0
  161. package/dist/form.cjs +17 -0
  162. package/dist/form.cjs.map +1 -0
  163. package/dist/form.d.cts +12 -0
  164. package/dist/form.d.ts +12 -0
  165. package/dist/form.js +11 -0
  166. package/dist/form.js.map +1 -0
  167. package/dist/history.cjs +22 -0
  168. package/dist/history.cjs.map +1 -0
  169. package/dist/history.d.cts +31 -0
  170. package/dist/history.d.ts +31 -0
  171. package/dist/history.js +17 -0
  172. package/dist/history.js.map +1 -0
  173. package/dist/i18n.cjs +29 -0
  174. package/dist/i18n.cjs.map +1 -0
  175. package/dist/i18n.d.cts +36 -0
  176. package/dist/i18n.d.ts +36 -0
  177. package/dist/i18n.js +24 -0
  178. package/dist/i18n.js.map +1 -0
  179. package/dist/index.cjs +414 -0
  180. package/dist/index.cjs.map +1 -0
  181. package/dist/index.d.cts +32 -0
  182. package/dist/index.d.ts +32 -0
  183. package/dist/index.js +234 -0
  184. package/dist/index.js.map +1 -0
  185. package/dist/interaction/PagePointerSource.vue.d.cts +3 -0
  186. package/dist/interaction/PagePointerSource.vue.d.ts +3 -0
  187. package/dist/interaction.cjs +63 -0
  188. package/dist/interaction.cjs.map +1 -0
  189. package/dist/interaction.d.cts +40 -0
  190. package/dist/interaction.d.ts +40 -0
  191. package/dist/interaction.js +47 -0
  192. package/dist/interaction.js.map +1 -0
  193. package/dist/link/LinkAnchor.vue.d.cts +9 -0
  194. package/dist/link/LinkAnchor.vue.d.ts +9 -0
  195. package/dist/link/LinkLayer.vue.d.cts +22 -0
  196. package/dist/link/LinkLayer.vue.d.ts +22 -0
  197. package/dist/link/composables.d.cts +29 -0
  198. package/dist/link/composables.d.ts +29 -0
  199. package/dist/link.cjs +14 -0
  200. package/dist/link.cjs.map +1 -0
  201. package/dist/link.d.cts +11 -0
  202. package/dist/link.d.ts +11 -0
  203. package/dist/link.js +8 -0
  204. package/dist/link.js.map +1 -0
  205. package/dist/measurement.cjs +43 -0
  206. package/dist/measurement.cjs.map +1 -0
  207. package/dist/measurement.d.cts +51 -0
  208. package/dist/measurement.d.ts +51 -0
  209. package/dist/measurement.js +38 -0
  210. package/dist/measurement.js.map +1 -0
  211. package/dist/metadata.cjs +22 -0
  212. package/dist/metadata.cjs.map +1 -0
  213. package/dist/metadata.d.cts +31 -0
  214. package/dist/metadata.d.ts +31 -0
  215. package/dist/metadata.js +17 -0
  216. package/dist/metadata.js.map +1 -0
  217. package/dist/outline.cjs +22 -0
  218. package/dist/outline.cjs.map +1 -0
  219. package/dist/outline.d.cts +36 -0
  220. package/dist/outline.d.ts +36 -0
  221. package/dist/outline.js +17 -0
  222. package/dist/outline.js.map +1 -0
  223. package/dist/page-D9XIuLSj.js +16 -0
  224. package/dist/page-D9XIuLSj.js.map +1 -0
  225. package/dist/page-Doy4_Sdz.cjs +15 -0
  226. package/dist/page-Doy4_Sdz.cjs.map +1 -0
  227. package/dist/page-edit.cjs +18 -0
  228. package/dist/page-edit.cjs.map +1 -0
  229. package/dist/page-edit.d.cts +28 -0
  230. package/dist/page-edit.d.ts +28 -0
  231. package/dist/page-edit.js +13 -0
  232. package/dist/page-edit.js.map +1 -0
  233. package/dist/page-layers-c-CJYAUO.cjs +30 -0
  234. package/dist/page-layers-c-CJYAUO.cjs.map +1 -0
  235. package/dist/page-layers-rlh4-1qr.js +31 -0
  236. package/dist/page-layers-rlh4-1qr.js.map +1 -0
  237. package/dist/page-layers.d.cts +21 -0
  238. package/dist/page-layers.d.ts +21 -0
  239. package/dist/page-view/PageView.vue.d.cts +42 -0
  240. package/dist/page-view/PageView.vue.d.ts +42 -0
  241. package/dist/page-view.cjs +5 -0
  242. package/dist/page-view.cjs.map +1 -0
  243. package/dist/page-view.d.cts +10 -0
  244. package/dist/page-view.d.ts +10 -0
  245. package/dist/page-view.js +5 -0
  246. package/dist/page-view.js.map +1 -0
  247. package/dist/projector-CDZn1kh1.js +32 -0
  248. package/dist/projector-CDZn1kh1.js.map +1 -0
  249. package/dist/projector-Cf7879sx.cjs +31 -0
  250. package/dist/projector-Cf7879sx.cjs.map +1 -0
  251. package/dist/redaction.cjs +34 -0
  252. package/dist/redaction.cjs.map +1 -0
  253. package/dist/redaction.d.cts +44 -0
  254. package/dist/redaction.d.ts +44 -0
  255. package/dist/redaction.js +29 -0
  256. package/dist/redaction.js.map +1 -0
  257. package/dist/render/RenderLayer.vue.d.cts +23 -0
  258. package/dist/render/RenderLayer.vue.d.ts +23 -0
  259. package/dist/render/TileImage.vue.d.cts +13 -0
  260. package/dist/render/TileImage.vue.d.ts +13 -0
  261. package/dist/render/TilePlane.vue.d.cts +7 -0
  262. package/dist/render/TilePlane.vue.d.ts +7 -0
  263. package/dist/render.cjs +262 -0
  264. package/dist/render.cjs.map +1 -0
  265. package/dist/render.d.cts +16 -0
  266. package/dist/render.d.ts +16 -0
  267. package/dist/render.js +257 -0
  268. package/dist/render.js.map +1 -0
  269. package/dist/runtime/DocumentGate.vue.d.cts +24 -0
  270. package/dist/runtime/DocumentGate.vue.d.ts +24 -0
  271. package/dist/runtime/DocumentScope.vue.d.cts +16 -0
  272. package/dist/runtime/DocumentScope.vue.d.ts +16 -0
  273. package/dist/runtime/KernelProvider.vue.d.cts +17 -0
  274. package/dist/runtime/KernelProvider.vue.d.ts +17 -0
  275. package/dist/runtime/SvgShapes.vue.d.cts +7 -0
  276. package/dist/runtime/SvgShapes.vue.d.ts +7 -0
  277. package/dist/runtime/Viewer.vue.d.cts +57 -0
  278. package/dist/runtime/Viewer.vue.d.ts +57 -0
  279. package/dist/runtime/capabilities.d.cts +52 -0
  280. package/dist/runtime/capabilities.d.ts +52 -0
  281. package/dist/runtime/documents.d.cts +42 -0
  282. package/dist/runtime/documents.d.ts +42 -0
  283. package/dist/runtime/kernel.d.cts +36 -0
  284. package/dist/runtime/kernel.d.ts +36 -0
  285. package/dist/runtime/page.d.cts +15 -0
  286. package/dist/runtime/page.d.ts +15 -0
  287. package/dist/runtime/refs.d.cts +12 -0
  288. package/dist/runtime/refs.d.ts +12 -0
  289. package/dist/runtime/surface-box.d.cts +12 -0
  290. package/dist/runtime/surface-box.d.ts +12 -0
  291. package/dist/runtime.cjs +53 -0
  292. package/dist/runtime.cjs.map +1 -0
  293. package/dist/runtime.d.cts +24 -0
  294. package/dist/runtime.d.ts +24 -0
  295. package/dist/runtime.js +38 -0
  296. package/dist/runtime.js.map +1 -0
  297. package/dist/scope-BQA4toWB.cjs +17 -0
  298. package/dist/scope-BQA4toWB.cjs.map +1 -0
  299. package/dist/scope-BgdCqnYb.js +18 -0
  300. package/dist/scope-BgdCqnYb.js.map +1 -0
  301. package/dist/search/SearchLayer.vue.d.cts +17 -0
  302. package/dist/search/SearchLayer.vue.d.ts +17 -0
  303. package/dist/search/composables.d.cts +31 -0
  304. package/dist/search/composables.d.ts +31 -0
  305. package/dist/search.cjs +17 -0
  306. package/dist/search.cjs.map +1 -0
  307. package/dist/search.d.cts +10 -0
  308. package/dist/search.d.ts +10 -0
  309. package/dist/search.js +11 -0
  310. package/dist/search.js.map +1 -0
  311. package/dist/selection/SelectionClipboard.vue.d.cts +24 -0
  312. package/dist/selection/SelectionClipboard.vue.d.ts +24 -0
  313. package/dist/selection/SelectionHandles.vue.d.cts +8 -0
  314. package/dist/selection/SelectionHandles.vue.d.ts +8 -0
  315. package/dist/selection/SelectionLayer.vue.d.cts +3 -0
  316. package/dist/selection/SelectionLayer.vue.d.ts +3 -0
  317. package/dist/selection/SelectionMenu.vue.d.cts +23 -0
  318. package/dist/selection/SelectionMenu.vue.d.ts +23 -0
  319. package/dist/selection/composables.d.cts +24 -0
  320. package/dist/selection/composables.d.ts +24 -0
  321. package/dist/selection.cjs +24 -0
  322. package/dist/selection.cjs.map +1 -0
  323. package/dist/selection.d.cts +16 -0
  324. package/dist/selection.d.ts +16 -0
  325. package/dist/selection.js +15 -0
  326. package/dist/selection.js.map +1 -0
  327. package/dist/shell.cjs +72 -0
  328. package/dist/shell.cjs.map +1 -0
  329. package/dist/shell.d.cts +56 -0
  330. package/dist/shell.d.ts +56 -0
  331. package/dist/shell.js +67 -0
  332. package/dist/shell.js.map +1 -0
  333. package/dist/signature/composables.d.cts +39 -0
  334. package/dist/signature/composables.d.ts +39 -0
  335. package/dist/signature.cjs +16 -0
  336. package/dist/signature.cjs.map +1 -0
  337. package/dist/signature.d.cts +15 -0
  338. package/dist/signature.d.ts +15 -0
  339. package/dist/signature.js +10 -0
  340. package/dist/signature.js.map +1 -0
  341. package/dist/stage/PageSurface.vue.d.cts +29 -0
  342. package/dist/stage/PageSurface.vue.d.ts +29 -0
  343. package/dist/stage/Scrollbar.vue.d.cts +32 -0
  344. package/dist/stage/Scrollbar.vue.d.ts +32 -0
  345. package/dist/stage/Stage.vue.d.cts +44 -0
  346. package/dist/stage/Stage.vue.d.ts +44 -0
  347. package/dist/stage/StageScope.vue.d.cts +17 -0
  348. package/dist/stage/StageScope.vue.d.ts +17 -0
  349. package/dist/stage/composables.d.cts +41 -0
  350. package/dist/stage/composables.d.ts +41 -0
  351. package/dist/stage/scope.d.cts +12 -0
  352. package/dist/stage/scope.d.ts +12 -0
  353. package/dist/stage.cjs +21 -0
  354. package/dist/stage.cjs.map +1 -0
  355. package/dist/stage.d.cts +17 -0
  356. package/dist/stage.d.ts +17 -0
  357. package/dist/stage.js +15 -0
  358. package/dist/stage.js.map +1 -0
  359. package/dist/stamp.cjs +68 -0
  360. package/dist/stamp.cjs.map +1 -0
  361. package/dist/stamp.d.cts +61 -0
  362. package/dist/stamp.d.ts +61 -0
  363. package/dist/stamp.js +61 -0
  364. package/dist/stamp.js.map +1 -0
  365. package/dist/state-DZg8q3v6.js +52 -0
  366. package/dist/state-DZg8q3v6.js.map +1 -0
  367. package/dist/state-M22NDJQo.cjs +51 -0
  368. package/dist/state-M22NDJQo.cjs.map +1 -0
  369. package/dist/state.d.cts +32 -0
  370. package/dist/state.d.ts +32 -0
  371. package/dist/strip-BSDB39Xh.cjs +743 -0
  372. package/dist/strip-BSDB39Xh.cjs.map +1 -0
  373. package/dist/strip-C3wLonKB.js +744 -0
  374. package/dist/strip-C3wLonKB.js.map +1 -0
  375. package/dist/surface-box-B9oa4YoG.js +12 -0
  376. package/dist/surface-box-B9oa4YoG.js.map +1 -0
  377. package/dist/surface-box-C7EvUOXp.cjs +11 -0
  378. package/dist/surface-box-C7EvUOXp.cjs.map +1 -0
  379. package/dist/theme.d.cts +13 -0
  380. package/dist/theme.d.ts +13 -0
  381. package/dist/toolbar/DefaultCollapsed.vue.d.cts +9 -0
  382. package/dist/toolbar/DefaultCollapsed.vue.d.ts +9 -0
  383. package/dist/toolbar/DefaultCommand.vue.d.cts +8 -0
  384. package/dist/toolbar/DefaultCommand.vue.d.ts +8 -0
  385. package/dist/toolbar/DefaultGroupTrigger.vue.d.cts +9 -0
  386. package/dist/toolbar/DefaultGroupTrigger.vue.d.ts +9 -0
  387. package/dist/toolbar/DefaultOverflowMenu.vue.d.cts +9 -0
  388. package/dist/toolbar/DefaultOverflowMenu.vue.d.ts +9 -0
  389. package/dist/toolbar/DefaultOverflowTrigger.vue.d.cts +10 -0
  390. package/dist/toolbar/DefaultOverflowTrigger.vue.d.ts +10 -0
  391. package/dist/toolbar/Measured.vue.d.cts +21 -0
  392. package/dist/toolbar/Measured.vue.d.ts +21 -0
  393. package/dist/toolbar/NativeSlotSocket.vue.d.cts +22 -0
  394. package/dist/toolbar/NativeSlotSocket.vue.d.ts +22 -0
  395. package/dist/toolbar/Toolbar.vue.d.cts +82 -0
  396. package/dist/toolbar/Toolbar.vue.d.ts +82 -0
  397. package/dist/toolbar/ToolbarPart.vue.d.cts +42 -0
  398. package/dist/toolbar/ToolbarPart.vue.d.ts +42 -0
  399. package/dist/toolbar/paint.d.cts +3 -0
  400. package/dist/toolbar/paint.d.ts +3 -0
  401. package/dist/toolbar/strip.d.cts +14 -0
  402. package/dist/toolbar/strip.d.ts +14 -0
  403. package/dist/toolbar/views.d.cts +15 -0
  404. package/dist/toolbar/views.d.ts +15 -0
  405. package/dist/toolbar.cjs +27 -0
  406. package/dist/toolbar.cjs.map +1 -0
  407. package/dist/toolbar.d.cts +14 -0
  408. package/dist/toolbar.d.ts +14 -0
  409. package/dist/toolbar.js +12 -0
  410. package/dist/toolbar.js.map +1 -0
  411. package/dist/view-manager.cjs +22 -0
  412. package/dist/view-manager.cjs.map +1 -0
  413. package/dist/view-manager.d.cts +24 -0
  414. package/dist/view-manager.d.ts +24 -0
  415. package/dist/view-manager.js +17 -0
  416. package/dist/view-manager.js.map +1 -0
  417. package/package.json +179 -3
@@ -0,0 +1,743 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const coreUi = require("@embedpdf/core-ui");
4
+ const host = require("@embedpdf/plugin-commands/contract/host");
5
+ const contract = require("@embedpdf/plugin-commands/contract");
6
+ const web = require("@embedpdf/web");
7
+ const capabilities = require("./capabilities-DVNJmgy7.cjs");
8
+ const SURFACE = web.paintDefault("toolbar-surface");
9
+ const BORDER = web.paintDefault("toolbar-border");
10
+ const ACTIVE = web.paintDefault("toolbar-active");
11
+ const _hoisted_1$5 = ["role", "aria-checked", "disabled", "onClick"];
12
+ const _hoisted_2$2 = { key: 0 };
13
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
14
+ __name: "DefaultOverflowMenu",
15
+ props: {
16
+ view: {},
17
+ orientation: {}
18
+ },
19
+ setup(__props) {
20
+ const props = __props;
21
+ const menu = vue.ref(null);
22
+ vue.watch(
23
+ [menu, () => props.view.isOpen],
24
+ ([element, isOpen], _previous, onCleanup) => {
25
+ if (!isOpen || !element) return;
26
+ const container = element.parentElement ?? element;
27
+ const trigger = web.focusablesIn(container).find((candidate) => !element.contains(candidate)) ?? null;
28
+ const close = () => props.view.close();
29
+ const stopOutside = web.observeOutsidePress(container, close);
30
+ const detachKeys = web.attachMenuKeys(element, { trigger, close });
31
+ onCleanup(() => {
32
+ stopOutside();
33
+ detachKeys();
34
+ });
35
+ },
36
+ { immediate: true, flush: "post" }
37
+ );
38
+ const placement = vue.computed(
39
+ () => props.orientation === "vertical" ? { top: 0, insetInlineStart: "100%" } : { top: "100%", insetInlineEnd: 0 }
40
+ );
41
+ const sections = vue.computed(
42
+ () => props.view.sections.map((section) => ({
43
+ radio: section.role === "radio",
44
+ rows: section.rows.flatMap((row) => {
45
+ const command = props.view.resolve(row.command);
46
+ return command ? [{ row, command }] : [];
47
+ })
48
+ }))
49
+ );
50
+ function choose(row) {
51
+ props.view.execute(row.command);
52
+ if (row.type !== "submenu") props.view.close();
53
+ }
54
+ return (_ctx, _cache) => {
55
+ return __props.view.isOpen ? (vue.openBlock(), vue.createElementBlock("div", {
56
+ key: 0,
57
+ ref_key: "menu",
58
+ ref: menu,
59
+ role: "menu",
60
+ style: vue.normalizeStyle({
61
+ position: "absolute",
62
+ ...placement.value,
63
+ zIndex: 41,
64
+ minWidth: "200px",
65
+ padding: "4px",
66
+ background: vue.unref(SURFACE),
67
+ border: `1px solid ${vue.unref(BORDER)}`,
68
+ borderRadius: "6px",
69
+ boxShadow: "0 4px 16px rgba(0,0,0,0.15)"
70
+ })
71
+ }, [
72
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sections.value, (section, index) => {
73
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
74
+ index > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
75
+ key: 0,
76
+ style: vue.normalizeStyle({ height: "1px", background: vue.unref(BORDER), margin: "4px 0" })
77
+ }, null, 4)) : vue.createCommentVNode("", true),
78
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(section.rows, ({ row, command }) => {
79
+ return vue.openBlock(), vue.createElementBlock("button", {
80
+ key: row.command,
81
+ type: "button",
82
+ role: section.radio ? "menuitemradio" : "menuitem",
83
+ "aria-checked": section.radio ? command.active : void 0,
84
+ disabled: !command.enabled,
85
+ tabindex: "-1",
86
+ style: vue.normalizeStyle({
87
+ display: "flex",
88
+ width: "100%",
89
+ alignItems: "center",
90
+ justifyContent: "space-between",
91
+ gap: "16px",
92
+ padding: "6px 8px",
93
+ border: "none",
94
+ color: "inherit",
95
+ font: "inherit",
96
+ background: "transparent",
97
+ cursor: command.enabled ? "pointer" : "default",
98
+ opacity: command.enabled ? 1 : 0.4,
99
+ whiteSpace: "nowrap"
100
+ }),
101
+ onClick: ($event) => choose(row)
102
+ }, [
103
+ vue.createElementVNode("span", null, vue.toDisplayString(command.active && section.radio ? "• " : "") + vue.toDisplayString(command.label), 1),
104
+ row.type === "submenu" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, "▸")) : vue.createCommentVNode("", true)
105
+ ], 12, _hoisted_1$5);
106
+ }), 128))
107
+ ], 64);
108
+ }), 128))
109
+ ], 4)) : vue.createCommentVNode("", true);
110
+ };
111
+ }
112
+ });
113
+ const _hoisted_1$4 = ["aria-expanded"];
114
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
115
+ __name: "DefaultOverflowTrigger",
116
+ props: {
117
+ isOpen: { type: Boolean }
118
+ },
119
+ emits: ["toggle"],
120
+ setup(__props, { emit: __emit }) {
121
+ const emit = __emit;
122
+ return (_ctx, _cache) => {
123
+ return vue.openBlock(), vue.createElementBlock("button", {
124
+ type: "button",
125
+ "aria-haspopup": "menu",
126
+ "aria-expanded": __props.isOpen,
127
+ title: "More",
128
+ style: vue.normalizeStyle({
129
+ display: "inline-flex",
130
+ alignItems: "center",
131
+ padding: "4px 8px",
132
+ color: "inherit",
133
+ font: "inherit",
134
+ border: `1px solid ${vue.unref(BORDER)}`,
135
+ borderRadius: "4px",
136
+ background: __props.isOpen ? vue.unref(ACTIVE) : "transparent",
137
+ cursor: "pointer"
138
+ }),
139
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
140
+ }, " ⋯ ", 12, _hoisted_1$4);
141
+ };
142
+ }
143
+ });
144
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
145
+ __name: "Measured",
146
+ props: {
147
+ measureKey: {},
148
+ orientation: {}
149
+ },
150
+ emits: ["length"],
151
+ setup(__props, { emit: __emit }) {
152
+ const props = __props;
153
+ const emit = __emit;
154
+ const element = vue.ref(null);
155
+ vue.watch(
156
+ [element, () => props.measureKey, () => props.orientation],
157
+ ([measured, key, orientation], _previous, onCleanup) => {
158
+ if (measured) {
159
+ onCleanup(web.observeLength(measured, orientation, (length) => emit("length", key, length)));
160
+ }
161
+ },
162
+ { immediate: true, flush: "post" }
163
+ );
164
+ return (_ctx, _cache) => {
165
+ return vue.openBlock(), vue.createElementBlock("span", {
166
+ ref_key: "element",
167
+ ref: element,
168
+ style: { display: "inline-flex", flexShrink: 0 }
169
+ }, [
170
+ vue.renderSlot(_ctx.$slots, "default")
171
+ ], 512);
172
+ };
173
+ }
174
+ });
175
+ const _hoisted_1$3 = ["value"];
176
+ const _hoisted_2$1 = ["value", "disabled"];
177
+ const _hoisted_3 = {
178
+ key: 1,
179
+ style: { position: "relative", display: "inline-flex" }
180
+ };
181
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
182
+ __name: "DefaultCollapsed",
183
+ props: {
184
+ view: {},
185
+ orientation: {}
186
+ },
187
+ setup(__props) {
188
+ const props = __props;
189
+ const active = vue.computed(() => {
190
+ var _a;
191
+ return ((_a = props.view.commands.find((command) => command.active)) == null ? void 0 : _a.id) ?? "";
192
+ });
193
+ const isOpen = vue.ref(false);
194
+ const menu = vue.computed(() => coreUi.groupMenuView(props.view, isOpen.value, () => isOpen.value = false));
195
+ function onChange(event) {
196
+ props.view.execute(event.target.value);
197
+ }
198
+ return (_ctx, _cache) => {
199
+ return __props.view.collapse === "select" ? (vue.openBlock(), vue.createElementBlock("select", {
200
+ key: 0,
201
+ value: active.value,
202
+ style: vue.normalizeStyle({
203
+ padding: "4px 6px",
204
+ font: "inherit",
205
+ borderRadius: "4px",
206
+ border: `1px solid ${vue.unref(BORDER)}`,
207
+ background: vue.unref(SURFACE)
208
+ }),
209
+ onChange
210
+ }, [
211
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.view.commands, (command) => {
212
+ return vue.openBlock(), vue.createElementBlock("option", {
213
+ key: command.id,
214
+ value: command.id,
215
+ disabled: !command.enabled
216
+ }, vue.toDisplayString(command.label), 9, _hoisted_2$1);
217
+ }), 128))
218
+ ], 44, _hoisted_1$3)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, [
219
+ vue.createVNode(_sfc_main$7, {
220
+ "is-open": isOpen.value,
221
+ onToggle: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
222
+ }, null, 8, ["is-open"]),
223
+ vue.createVNode(_sfc_main$8, {
224
+ view: menu.value,
225
+ orientation: __props.orientation
226
+ }, null, 8, ["view", "orientation"])
227
+ ]));
228
+ };
229
+ }
230
+ });
231
+ const _hoisted_1$2 = ["disabled", "aria-pressed", "aria-haspopup", "title"];
232
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
233
+ __name: "DefaultCommand",
234
+ props: {
235
+ command: {},
236
+ run: { type: Function }
237
+ },
238
+ setup(__props) {
239
+ return (_ctx, _cache) => {
240
+ return vue.openBlock(), vue.createElementBlock("button", {
241
+ type: "button",
242
+ disabled: !__props.command.enabled,
243
+ "aria-pressed": __props.command.active || void 0,
244
+ "aria-haspopup": __props.command.menu ? "menu" : void 0,
245
+ title: __props.command.label,
246
+ style: vue.normalizeStyle({
247
+ display: "inline-flex",
248
+ alignItems: "center",
249
+ gap: "4px",
250
+ padding: "4px 8px",
251
+ whiteSpace: "nowrap",
252
+ color: "inherit",
253
+ font: "inherit",
254
+ background: __props.command.active ? vue.unref(ACTIVE) : "transparent",
255
+ border: `1px solid ${vue.unref(BORDER)}`,
256
+ borderRadius: "4px",
257
+ cursor: __props.command.enabled ? "pointer" : "default",
258
+ opacity: __props.command.enabled ? 1 : 0.4
259
+ }),
260
+ onClick: _cache[0] || (_cache[0] = ($event) => __props.run())
261
+ }, vue.toDisplayString(__props.command.label), 13, _hoisted_1$2);
262
+ };
263
+ }
264
+ });
265
+ const _hoisted_1$1 = { style: { position: "relative", display: "inline-flex" } };
266
+ const _hoisted_2 = ["aria-expanded"];
267
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
268
+ __name: "DefaultGroupTrigger",
269
+ props: {
270
+ view: {},
271
+ orientation: {}
272
+ },
273
+ setup(__props) {
274
+ const props = __props;
275
+ const isOpen = vue.ref(false);
276
+ const someActive = vue.computed(() => props.view.commands.some((command) => command.active));
277
+ const menu = vue.computed(() => coreUi.groupMenuView(props.view, isOpen.value, () => isOpen.value = false));
278
+ return (_ctx, _cache) => {
279
+ return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$1, [
280
+ vue.createElementVNode("button", {
281
+ type: "button",
282
+ "aria-haspopup": "menu",
283
+ "aria-expanded": isOpen.value,
284
+ title: "More",
285
+ style: vue.normalizeStyle({
286
+ display: "inline-flex",
287
+ alignItems: "center",
288
+ padding: "4px 6px",
289
+ color: "inherit",
290
+ font: "inherit",
291
+ border: `1px solid ${vue.unref(BORDER)}`,
292
+ borderRadius: "4px",
293
+ background: isOpen.value || someActive.value ? vue.unref(ACTIVE) : "transparent",
294
+ cursor: "pointer"
295
+ }),
296
+ onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
297
+ }, " ▾ ", 12, _hoisted_2),
298
+ vue.createVNode(_sfc_main$8, {
299
+ view: menu.value,
300
+ orientation: __props.orientation
301
+ }, null, 8, ["view", "orientation"])
302
+ ]);
303
+ };
304
+ }
305
+ });
306
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
307
+ __name: "NativeSlotSocket",
308
+ props: {
309
+ name: {},
310
+ measureKey: {},
311
+ orientation: {}
312
+ },
313
+ emits: ["length"],
314
+ setup(__props, { emit: __emit }) {
315
+ const props = __props;
316
+ const emit = __emit;
317
+ const socket = vue.ref(null);
318
+ vue.watch(
319
+ [socket, () => props.measureKey, () => props.orientation],
320
+ ([element, key, orientation], _previous, onCleanup) => {
321
+ if (element) {
322
+ onCleanup(web.observeLength(element, orientation, (length) => emit("length", key, length)));
323
+ }
324
+ },
325
+ { immediate: true, flush: "post" }
326
+ );
327
+ return (_ctx, _cache) => {
328
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent("slot"), {
329
+ ref_key: "socket",
330
+ ref: socket,
331
+ name: __props.name,
332
+ style: { display: "inline-flex", alignItems: "center", flexShrink: 0 }
333
+ }, {
334
+ default: vue.withCtx(() => [
335
+ vue.renderSlot(_ctx.$slots, "default")
336
+ ]),
337
+ _: 3
338
+ }, 8, ["name"]);
339
+ };
340
+ }
341
+ });
342
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
343
+ __name: "ToolbarPart",
344
+ props: {
345
+ part: {},
346
+ layer: {},
347
+ orientation: {}
348
+ },
349
+ emits: ["length"],
350
+ setup(__props, { emit: __emit }) {
351
+ const props = __props;
352
+ const emit = __emit;
353
+ const measure = (length) => {
354
+ if (props.part.kind === "custom") emit("length", props.part.measureKey, length);
355
+ };
356
+ return (_ctx, _cache) => {
357
+ return __props.part.kind === "command" ? vue.renderSlot(_ctx.$slots, "command", {
358
+ command: __props.part.command,
359
+ variant: __props.part.variant,
360
+ run: __props.part.run
361
+ }, () => [
362
+ vue.createVNode(_sfc_main$4, {
363
+ command: __props.part.command,
364
+ run: __props.part.run
365
+ }, null, 8, ["command", "run"])
366
+ ], void 0, 0) : __props.part.kind === "custom" && _ctx.$slots.custom ? vue.renderSlot(_ctx.$slots, "custom", vue.normalizeProps(vue.guardReactiveProps({ name: __props.part.name, variant: __props.part.variant, layer: __props.layer, measure })), () => [
367
+ __props.part.terminal ? vue.renderSlot(_ctx.$slots, "command", {
368
+ command: __props.part.terminal,
369
+ variant: "icon",
370
+ run: __props.part.runTerminal
371
+ }, () => [
372
+ vue.createVNode(_sfc_main$4, {
373
+ command: __props.part.terminal,
374
+ run: __props.part.runTerminal
375
+ }, null, 8, ["command", "run"])
376
+ ], void 0, 0) : vue.createCommentVNode("", true)
377
+ ], void 0, 1) : __props.part.kind === "custom" ? (vue.openBlock(), vue.createBlock(_sfc_main$2, {
378
+ key: 2,
379
+ name: __props.part.name,
380
+ "measure-key": __props.part.measureKey,
381
+ orientation: __props.orientation,
382
+ onLength: _cache[0] || (_cache[0] = (key, length) => emit("length", key, length))
383
+ }, {
384
+ default: vue.withCtx(() => [
385
+ __props.part.terminal ? vue.renderSlot(_ctx.$slots, "command", {
386
+ command: __props.part.terminal,
387
+ variant: "icon",
388
+ run: __props.part.runTerminal
389
+ }, () => [
390
+ vue.createVNode(_sfc_main$4, {
391
+ command: __props.part.terminal,
392
+ run: __props.part.runTerminal
393
+ }, null, 8, ["command", "run"])
394
+ ], void 0, 0) : vue.createCommentVNode("", true)
395
+ ]),
396
+ _: 3
397
+ }, 8, ["name", "measure-key", "orientation"])) : __props.part.kind === "collapsed" ? vue.renderSlot(_ctx.$slots, "collapsed", {
398
+ view: __props.part.view
399
+ }, () => [
400
+ vue.createVNode(_sfc_main$5, {
401
+ view: __props.part.view,
402
+ orientation: __props.orientation
403
+ }, null, 8, ["view", "orientation"])
404
+ ], void 0, 3) : vue.renderSlot(_ctx.$slots, "group-trigger", {
405
+ view: __props.part.view
406
+ }, () => [
407
+ vue.createVNode(_sfc_main$3, {
408
+ view: __props.part.view,
409
+ orientation: __props.orientation
410
+ }, null, 8, ["view", "orientation"])
411
+ ], void 0, 4);
412
+ };
413
+ }
414
+ });
415
+ const _hoisted_1 = ["aria-orientation", "aria-label"];
416
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
417
+ __name: "Toolbar",
418
+ props: {
419
+ bar: {},
420
+ orientation: { default: "horizontal" },
421
+ gap: { default: 8 },
422
+ separatorWidth: { default: 1 },
423
+ "aria-label": {}
424
+ },
425
+ setup(__props) {
426
+ const props = __props;
427
+ const slots = vue.useSlots();
428
+ const { track } = capabilities.useViewerBinding();
429
+ const commands = capabilities.useCapability(host.CommandsToken);
430
+ const documentId = capabilities.useDocumentId();
431
+ const vertical = vue.computed(() => props.orientation === "vertical");
432
+ const ariaLabel = vue.computed(
433
+ () => props.ariaLabel
434
+ );
435
+ const container = vue.ref(null);
436
+ const containerLength = vue.ref(0);
437
+ vue.watch(
438
+ [container, () => props.orientation],
439
+ ([element, orientation], _previous, onCleanup) => {
440
+ if (element) {
441
+ onCleanup(
442
+ web.observeContentLength(element, orientation, (length) => containerLength.value = length)
443
+ );
444
+ }
445
+ },
446
+ { immediate: true, flush: "post" }
447
+ );
448
+ const lengths = web.createToolbarLengths();
449
+ const measured = vue.ref(0);
450
+ function onLength(key, length) {
451
+ if (lengths.report(props.orientation, key, length)) measured.value += 1;
452
+ }
453
+ let roving = null;
454
+ vue.watch(
455
+ [container, () => props.orientation],
456
+ ([element, orientation], _previous, onCleanup) => {
457
+ if (!element) return;
458
+ const focus = web.attachToolbarFocus(element, orientation);
459
+ roving = focus;
460
+ onCleanup(() => {
461
+ focus.detach();
462
+ roving = null;
463
+ });
464
+ },
465
+ { immediate: true, flush: "post" }
466
+ );
467
+ vue.onUpdated(() => roving == null ? void 0 : roving.refresh());
468
+ const normalized = vue.computed(() => coreUi.normalizeBar(props.bar));
469
+ const resolve = (id) => commands.resolveCommand(id, documentId.value ?? void 0);
470
+ const execute = (id) => void commands.execute(id, { documentId: documentId.value ?? void 0 });
471
+ const layout = vue.computed(() => {
472
+ track();
473
+ void measured.value;
474
+ return coreUi.layoutToolbar({
475
+ bar: normalized.value,
476
+ resolve,
477
+ unregistered: contract.unregisteredCommand,
478
+ execute,
479
+ menuTarget: (id) => commands.getMenuTarget(id),
480
+ metrics: lengths.metrics(props.orientation, props.gap, props.separatorWidth),
481
+ measureKey: web.toolbarMeasureKey,
482
+ containerLength: containerLength.value,
483
+ orientation: props.orientation
484
+ });
485
+ });
486
+ const overflowOpen = vue.ref(false);
487
+ const toggleOverflow = () => overflowOpen.value = !overflowOpen.value;
488
+ const noop = () => {
489
+ };
490
+ vue.watch(
491
+ () => layout.value.hasOverflow,
492
+ (hasOverflow) => {
493
+ if (!hasOverflow) overflowOpen.value = false;
494
+ }
495
+ );
496
+ const overflowView = vue.computed(
497
+ () => ({
498
+ sections: layout.value.overflow,
499
+ isOpen: overflowOpen.value,
500
+ close: () => overflowOpen.value = false,
501
+ resolve,
502
+ execute
503
+ })
504
+ );
505
+ const sectionStyle = (name) => ({
506
+ display: "flex",
507
+ flexDirection: vertical.value ? "column" : "row",
508
+ alignItems: "center",
509
+ gap: `${props.gap}px`,
510
+ flex: "0 0 auto",
511
+ ...name !== "center" ? null : vertical.value ? { marginTop: "auto", marginBottom: "auto" } : { marginLeft: "auto", marginRight: "auto" }
512
+ });
513
+ const separatorStyle = vue.computed(() => ({
514
+ ...vertical.value ? { height: "1px" } : { width: "1px" },
515
+ alignSelf: "stretch",
516
+ background: "currentColor",
517
+ opacity: 0.2
518
+ }));
519
+ const TOOLBAR_ITEM = { [web.TOOLBAR_ITEM_ATTRIBUTE]: "" };
520
+ const ITEM_STYLE = { display: "contents" };
521
+ function draws(content) {
522
+ return (Array.isArray(content) ? content : [content]).some((node) => {
523
+ if (node === null || node === void 0 || typeof node === "boolean") return false;
524
+ if (!vue.isVNode(node)) return true;
525
+ if (node.type === vue.Comment) return false;
526
+ if (node.type === vue.Fragment) return draws(node.children);
527
+ return true;
528
+ });
529
+ }
530
+ function measuredHere(part) {
531
+ if (part.kind !== "custom") return true;
532
+ const custom = slots.custom;
533
+ if (!custom) return false;
534
+ const scope = { name: part.name, variant: part.variant, measure: noop };
535
+ return draws(custom({ ...scope, layer: "measure" })) || !draws(custom({ ...scope, layer: "live" }));
536
+ }
537
+ const measureLayerStyle = vue.computed(() => ({
538
+ position: "absolute",
539
+ left: 0,
540
+ top: 0,
541
+ height: 0,
542
+ overflow: "hidden",
543
+ visibility: "hidden",
544
+ pointerEvents: "none",
545
+ display: "flex",
546
+ whiteSpace: "nowrap",
547
+ ...vertical.value ? { flexDirection: "column", alignItems: "flex-start" } : null
548
+ }));
549
+ return (_ctx, _cache) => {
550
+ return vue.openBlock(), vue.createElementBlock("div", {
551
+ ref_key: "container",
552
+ ref: container,
553
+ role: "toolbar",
554
+ "aria-orientation": __props.orientation,
555
+ "aria-label": ariaLabel.value,
556
+ style: vue.normalizeStyle({
557
+ position: "relative",
558
+ display: "flex",
559
+ flexDirection: vertical.value ? "column" : "row",
560
+ alignItems: "center"
561
+ })
562
+ }, [
563
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(layout.value.sections, (section) => {
564
+ return vue.openBlock(), vue.createElementBlock("div", {
565
+ key: section.name,
566
+ style: vue.normalizeStyle(sectionStyle(section.name))
567
+ }, [
568
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(section.groups, (group, index) => {
569
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
570
+ key: group.id
571
+ }, [
572
+ index > 0 ? vue.renderSlot(_ctx.$slots, "separator", {}, () => [
573
+ vue.createElementVNode("span", {
574
+ style: vue.normalizeStyle(separatorStyle.value)
575
+ }, null, 4)
576
+ ], void 0, 0) : vue.createCommentVNode("", true),
577
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.parts, (part) => {
578
+ return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
579
+ key: part.key
580
+ }, { ref_for: true }, TOOLBAR_ITEM, { style: ITEM_STYLE }), [
581
+ vue.createVNode(_sfc_main$1, {
582
+ part,
583
+ layer: "live",
584
+ orientation: __props.orientation,
585
+ onLength
586
+ }, vue.createSlots({ _: 2 }, [
587
+ _ctx.$slots.command ? {
588
+ name: "command",
589
+ fn: vue.withCtx((scope) => [
590
+ vue.renderSlot(_ctx.$slots, "command", vue.mergeProps({ ref_for: true }, scope))
591
+ ]),
592
+ key: "0"
593
+ } : void 0,
594
+ _ctx.$slots.custom ? {
595
+ name: "custom",
596
+ fn: vue.withCtx((scope) => [
597
+ vue.renderSlot(_ctx.$slots, "custom", vue.mergeProps({ ref_for: true }, scope))
598
+ ]),
599
+ key: "1"
600
+ } : void 0,
601
+ _ctx.$slots.collapsed ? {
602
+ name: "collapsed",
603
+ fn: vue.withCtx((scope) => [
604
+ vue.renderSlot(_ctx.$slots, "collapsed", vue.mergeProps({ ref_for: true }, scope))
605
+ ]),
606
+ key: "2"
607
+ } : void 0,
608
+ _ctx.$slots["group-trigger"] ? {
609
+ name: "group-trigger",
610
+ fn: vue.withCtx((scope) => [
611
+ vue.renderSlot(_ctx.$slots, "group-trigger", vue.mergeProps({ ref_for: true }, scope))
612
+ ]),
613
+ key: "3"
614
+ } : void 0
615
+ ]), 1032, ["part", "orientation"])
616
+ ], 16);
617
+ }), 128))
618
+ ], 64);
619
+ }), 128)),
620
+ section.name === "end" && layout.value.hasOverflow ? (vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
621
+ key: 0,
622
+ ref_for: true
623
+ }, TOOLBAR_ITEM, { style: { position: "relative", display: "inline-flex" } }), [
624
+ vue.renderSlot(_ctx.$slots, "overflow-trigger", {
625
+ isOpen: overflowOpen.value,
626
+ toggle: toggleOverflow
627
+ }, () => [
628
+ vue.createVNode(_sfc_main$7, {
629
+ "is-open": overflowOpen.value,
630
+ onToggle: toggleOverflow
631
+ }, null, 8, ["is-open"])
632
+ ]),
633
+ vue.renderSlot(_ctx.$slots, "overflow-menu", { view: overflowView.value }, () => [
634
+ vue.createVNode(_sfc_main$8, {
635
+ view: overflowView.value,
636
+ orientation: __props.orientation
637
+ }, null, 8, ["view", "orientation"])
638
+ ])
639
+ ], 16)) : vue.createCommentVNode("", true)
640
+ ], 4);
641
+ }), 128)),
642
+ vue.createElementVNode("div", {
643
+ "aria-hidden": "true",
644
+ inert: "",
645
+ style: vue.normalizeStyle(measureLayerStyle.value)
646
+ }, [
647
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(layout.value.measured, (part) => {
648
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
649
+ key: part.measureKey
650
+ }, [
651
+ measuredHere(part) ? (vue.openBlock(), vue.createBlock(_sfc_main$6, {
652
+ key: 0,
653
+ "measure-key": part.measureKey,
654
+ orientation: __props.orientation,
655
+ onLength
656
+ }, {
657
+ default: vue.withCtx(() => [
658
+ vue.createVNode(_sfc_main$1, {
659
+ part,
660
+ layer: "measure",
661
+ orientation: __props.orientation,
662
+ onLength
663
+ }, vue.createSlots({ _: 2 }, [
664
+ _ctx.$slots.command ? {
665
+ name: "command",
666
+ fn: vue.withCtx((scope) => [
667
+ vue.renderSlot(_ctx.$slots, "command", vue.mergeProps({ ref_for: true }, scope))
668
+ ]),
669
+ key: "0"
670
+ } : void 0,
671
+ _ctx.$slots.custom ? {
672
+ name: "custom",
673
+ fn: vue.withCtx((scope) => [
674
+ vue.renderSlot(_ctx.$slots, "custom", vue.mergeProps({ ref_for: true }, scope))
675
+ ]),
676
+ key: "1"
677
+ } : void 0,
678
+ _ctx.$slots.collapsed ? {
679
+ name: "collapsed",
680
+ fn: vue.withCtx((scope) => [
681
+ vue.renderSlot(_ctx.$slots, "collapsed", vue.mergeProps({ ref_for: true }, scope))
682
+ ]),
683
+ key: "2"
684
+ } : void 0,
685
+ _ctx.$slots["group-trigger"] ? {
686
+ name: "group-trigger",
687
+ fn: vue.withCtx((scope) => [
688
+ vue.renderSlot(_ctx.$slots, "group-trigger", vue.mergeProps({ ref_for: true }, scope))
689
+ ]),
690
+ key: "3"
691
+ } : void 0
692
+ ]), 1032, ["part", "orientation"])
693
+ ]),
694
+ _: 2
695
+ }, 1032, ["measure-key", "orientation"])) : vue.createCommentVNode("", true)
696
+ ], 64);
697
+ }), 128)),
698
+ vue.createVNode(_sfc_main$6, {
699
+ "measure-key": vue.unref(web.toolbarMeasureKey).overflowTrigger,
700
+ orientation: __props.orientation,
701
+ onLength
702
+ }, {
703
+ default: vue.withCtx(() => [
704
+ vue.renderSlot(_ctx.$slots, "overflow-trigger", {
705
+ isOpen: false,
706
+ toggle: noop
707
+ }, () => [
708
+ vue.createVNode(_sfc_main$7, { "is-open": false })
709
+ ])
710
+ ]),
711
+ _: 3
712
+ }, 8, ["measure-key", "orientation"])
713
+ ], 4)
714
+ ], 12, _hoisted_1);
715
+ };
716
+ }
717
+ });
718
+ const sameGroups = (left, right) => coreUi.sameStripGroups(left, right, contract.resolvedCommandsEqual);
719
+ const NO_GROUPS = Object.freeze([]);
720
+ function useStripView(bar) {
721
+ const commands = capabilities.useCapability(host.CommandsToken);
722
+ const documentId = capabilities.useDocumentId();
723
+ const normalized = vue.computed(() => {
724
+ const schema = vue.toValue(bar);
725
+ return schema ? coreUi.normalizeBar(schema) : null;
726
+ });
727
+ const groups = capabilities.useKernelValue(
728
+ () => normalized.value ? coreUi.stripGroupsOf(
729
+ normalized.value,
730
+ (id) => commands.resolveCommand(id, documentId.value ?? void 0)
731
+ ) : NO_GROUPS,
732
+ sameGroups
733
+ );
734
+ return vue.computed(
735
+ () => groups.value.length === 0 ? null : {
736
+ groups: groups.value,
737
+ execute: (id) => void commands.execute(id, { documentId: documentId.value ?? void 0 })
738
+ }
739
+ );
740
+ }
741
+ exports._sfc_main = _sfc_main;
742
+ exports.useStripView = useStripView;
743
+ //# sourceMappingURL=strip-BSDB39Xh.cjs.map