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