@leavepulse/ui 0.83.0 → 0.85.0

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 (323) hide show
  1. package/README.md +22 -0
  2. package/dist/assets/{LpDropzone-DNbh_NFJ.css → LpDropzone-CfL3Vrx4.css} +10 -10
  3. package/dist/assets/{LpImageEditor-Bgu20XLs.css → LpImageEditor-y3B-aW3H.css} +6 -6
  4. package/dist/assets/{LpKeys-C5VMcBOW.css → LpKeys-5ijsXX-M.css} +6 -6
  5. package/dist/assets/{LpShortcutsDialog-C6uzPeMf.css → LpShortcutsDialog-BBdVWxZq.css} +7 -7
  6. package/dist/assets/LpVideoTrim-CMoUw3dJ.css +8 -0
  7. package/dist/chunks/{ContextMenuItems-h-apPY2d.js → ContextMenuItems-D15cGEw9.js} +1 -1
  8. package/dist/chunks/{DropzoneLinkField-_Op8b_ee.js → DropzoneLinkField-Dz7fIaLh.js} +1 -1
  9. package/dist/chunks/{FieldLeading-mOMcwNqi.js → FieldLeading-DZZLK02U.js} +1 -1
  10. package/dist/chunks/{FieldWrapper-DtT-AIcn.js → FieldWrapper-BDDw1F9H.js} +1 -1
  11. package/dist/chunks/{IconCloseButton-YmisskyZ.js → IconCloseButton-Cn_w4aN3.js} +1 -1
  12. package/dist/chunks/{LayoutCanvas-BrISZEBr.js → LayoutCanvas-Dr5eSfAu.js} +1 -1
  13. package/dist/chunks/{LayoutNode-CwMQ8ACa.js → LayoutNode-CViJnx6q.js} +1 -1
  14. package/dist/chunks/{LpActionBar-CVVC6YbC.js → LpActionBar-C0LK-Aqs.js} +1 -1
  15. package/dist/chunks/{LpAddressInput-tiuJ-bru.js → LpAddressInput-B9sSvodU.js} +7 -7
  16. package/dist/chunks/{LpAlert-8-x4H_Nk.js → LpAlert-Bpd7122M.js} +1 -1
  17. package/dist/chunks/{LpAppShell-BW2YMq-A.js → LpAppShell-DW8JmY1o.js} +4 -4
  18. package/dist/chunks/{LpAutocomplete-BZODIops.js → LpAutocomplete-CQID7Zc-.js} +4 -4
  19. package/dist/chunks/{LpAvatar-BZq4nH53.js → LpAvatar-DLkiMGKx.js} +1 -1
  20. package/dist/chunks/{LpBadge-Cz0pSSUu.js → LpBadge-RFp8uHFt.js} +1 -1
  21. package/dist/chunks/{LpBottomNav-DVdR5Mry.js → LpBottomNav-BcJVkAhh.js} +1 -1
  22. package/dist/chunks/{LpBreadcrumbs-B2jphAel.js → LpBreadcrumbs-DJ_DB45r.js} +1 -1
  23. package/dist/chunks/{LpCalendar-C0_N5LVT.js → LpCalendar-D6tfCr2G.js} +1 -1
  24. package/dist/chunks/{LpCheckbox-CwqLNdw4.js → LpCheckbox-DcXC2qd5.js} +2 -2
  25. package/dist/chunks/{LpCodeBlock-Dcss6bnl.js → LpCodeBlock-Dx0J9xlm.js} +2 -2
  26. package/dist/chunks/{LpCodeDisplay-CLms1zDY.js → LpCodeDisplay-BlN7U8Z-.js} +4 -4
  27. package/dist/chunks/{LpColorPicker-CbIY450X.js → LpColorPicker-Cjna_Bio.js} +3 -3
  28. package/dist/chunks/{LpConfirmDialog-RmP4z6va.js → LpConfirmDialog-bfcX5F9d.js} +2 -2
  29. package/dist/chunks/{LpConfirmHost-DheBgRMB.js → LpConfirmHost-DIgloymi.js} +1 -1
  30. package/dist/chunks/{LpContextMenu-DIYhlap8.js → LpContextMenu-CUFZIQX2.js} +2 -2
  31. package/dist/chunks/{LpContextSwitcher-fDA6ERl-.js → LpContextSwitcher-CMweLbv2.js} +2 -2
  32. package/dist/chunks/{LpCopyButton-DSqKFGEb.js → LpCopyButton-BrbvIVMG.js} +1 -1
  33. package/dist/chunks/{LpDataList-f9UjSx9m.js → LpDataList-DhETPjzv.js} +2 -2
  34. package/dist/chunks/{LpDatePicker-3kDQLVbg.js → LpDatePicker-B5gzwI3T.js} +5 -5
  35. package/dist/chunks/{LpDateRangePicker-DUPiTt0_.js → LpDateRangePicker-CwNnpyoL.js} +3 -3
  36. package/dist/chunks/{LpDisclosure-C5WZjhbQ.js → LpDisclosure-CsJ7nnFz.js} +1 -1
  37. package/dist/chunks/{LpDrawer-CkYvIGIa.js → LpDrawer-C1q2bl1r.js} +1 -1
  38. package/dist/chunks/{LpDropdownMenu-zSsK2Xra.js → LpDropdownMenu-DRABI-Bl.js} +2 -2
  39. package/dist/chunks/{LpEditable-CP7Y_lKg.js → LpEditable-DCPdDDBb.js} +2 -2
  40. package/dist/chunks/{LpEmptyState-dsc5x-ya.js → LpEmptyState-DT8U4R8L.js} +1 -1
  41. package/dist/chunks/{LpFieldNotice-TOTbWvgv.js → LpFieldNotice-mcmO-O-J.js} +1 -1
  42. package/dist/chunks/{LpFileTree-BPjnOTln.js → LpFileTree-wiXExcZI.js} +4 -4
  43. package/dist/chunks/{LpFileTreeNode-_-MiWmie.js → LpFileTreeNode-DfvIGmSz.js} +4 -4
  44. package/dist/chunks/{LpFormField-BJwD1iEF.js → LpFormField-C5GOuOY-.js} +1 -1
  45. package/dist/chunks/{LpHintLayer-CmfGnxYu.js → LpHintLayer-B0choo1r.js} +1 -1
  46. package/dist/chunks/{LpHints-C2Xvc1Fd.js → LpHints-BEetUVTl.js} +3 -3
  47. package/dist/chunks/{LpIcon-CoOLz1oJ.js → LpIcon-DCGhNsCU.js} +1 -1
  48. package/dist/chunks/{LpInfraNode-CW3qsM-U.js → LpInfraNode-BsExhdPE.js} +2 -2
  49. package/dist/chunks/{LpInput-BVWhkPuN.js → LpInput-CKMblRtp.js} +3 -3
  50. package/dist/chunks/{LpInspector-REmoX_es.js → LpInspector-CqPgVXrm.js} +4 -4
  51. package/dist/chunks/{LpLightbox-C3FFTYP5.js → LpLightbox-D7iJqdmH.js} +4 -4
  52. package/dist/chunks/{LpLogInspector-Cs8Z_fM0.js → LpLogInspector-Yj310k4n.js} +2 -2
  53. package/dist/chunks/{LpLogViewer-DQRGe-ZK.js → LpLogViewer-Bki-IdNC.js} +6 -6
  54. package/dist/chunks/{LpMapPicker-CQnQPgKm.js → LpMapPicker-CnpJhiY0.js} +1 -1
  55. package/dist/chunks/{LpMediaGallery-DkKqTy9P.js → LpMediaGallery-D6DyJDvL.js} +4 -4
  56. package/dist/chunks/{LpModal-DwejR7VP.js → LpModal-B5y9_LgA.js} +1 -1
  57. package/dist/chunks/{LpModalNav-D1-dSe6f.js → LpModalNav-BLvDVl2-.js} +3 -3
  58. package/dist/chunks/{LpNotificationBell-EKLkN0sp.js → LpNotificationBell-Bf0u3t5q.js} +4 -4
  59. package/dist/chunks/{LpNotificationFeed-Dc-yQ4NH.js → LpNotificationFeed-BPZM3zkS.js} +4 -4
  60. package/dist/chunks/{LpNumberField-DvUjEMp-.js → LpNumberField-BeYT7zzt.js} +3 -3
  61. package/dist/chunks/{LpOtpInput-xvDO14f4.js → LpOtpInput-DqwY-U5R.js} +1 -1
  62. package/dist/chunks/{LpPagination-BFZY8dFn.js → LpPagination-V1wEhu1K.js} +1 -1
  63. package/dist/chunks/{LpPaletteTheme-EBJv0Bwz.js → LpPaletteTheme-Bi6pD1GL.js} +2 -2
  64. package/dist/chunks/{LpPasswordInput-DRJR3fF1.js → LpPasswordInput-LaOXNYuV.js} +2 -2
  65. package/dist/chunks/{LpPhoneInput-BGOOtUoW.js → LpPhoneInput-D7Tq2iaz.js} +3 -3
  66. package/dist/chunks/{LpPie-Deyn8h5J.js → LpPie-Bzv8mnVR.js} +2 -2
  67. package/dist/chunks/{LpPipeline-9ChjeNh5.js → LpPipeline-D-uPcbMN.js} +2 -2
  68. package/dist/chunks/{LpQuota-CNh5eF_p.js → LpQuota-BR8ck2a9.js} +1 -1
  69. package/dist/chunks/{LpRadioGroup-Br2Nl9Gr.js → LpRadioGroup-DSOCL9MD.js} +2 -2
  70. package/dist/chunks/{LpRangeCalendar-D66Y3U_w.js → LpRangeCalendar-QepHrmba.js} +1 -1
  71. package/dist/chunks/{LpRangeSlider-eX-fIlOw.js → LpRangeSlider-BaAM7XIs.js} +1 -1
  72. package/dist/chunks/{LpRepeater-0XvnlVd_.js → LpRepeater-BKq5XPh4.js} +3 -3
  73. package/dist/chunks/{LpSecretField-1RCooChq.js → LpSecretField-_B2qPfk8.js} +5 -5
  74. package/dist/chunks/{LpSection-B9gbJJcP.js → LpSection-BGzlKIWO.js} +1 -1
  75. package/dist/chunks/{LpSegmented-hIjGzGTo.js → LpSegmented-CiaF9DUK.js} +2 -2
  76. package/dist/chunks/{LpSelect-DugubwTc.js → LpSelect-CB6Xbnfk.js} +4 -4
  77. package/dist/chunks/{LpSidebar-DevSoN8W.js → LpSidebar-DnqbKULj.js} +4 -4
  78. package/dist/chunks/{LpSidebarNav-DwQQ3KXe.js → LpSidebarNav-B3Eo_VIS.js} +4 -4
  79. package/dist/chunks/{LpSidebarRow-CAGgtJCS.js → LpSidebarRow-CDBnvvd8.js} +3 -3
  80. package/dist/chunks/{LpSlider-1fHpVxpB.js → LpSlider-DTb_Ivkm.js} +1 -1
  81. package/dist/chunks/{LpStat-Cm9-FaWQ.js → LpStat-BtxSto7K.js} +2 -2
  82. package/dist/chunks/{LpStatus-CE8FSAT1.js → LpStatus-_fIwWXQV.js} +1 -1
  83. package/dist/chunks/{LpStepMark-BWSlV69R.js → LpStepMark-iDZw1DYf.js} +1 -1
  84. package/dist/chunks/{LpStepper-1D0ZA7Nx.js → LpStepper-CjC3cp1F.js} +1 -1
  85. package/dist/chunks/{LpSwitch-D_kvE0oQ.js → LpSwitch-BNHyYDhX.js} +1 -1
  86. package/dist/chunks/{LpTabFace-CpbFKi-N.js → LpTabFace-gATEe9pQ.js} +2 -2
  87. package/dist/chunks/{LpTableFilter-BYHyCu38.js → LpTableFilter-B_BFoBqS.js} +2 -2
  88. package/dist/chunks/{LpTagsInput-Cqm38t5N.js → LpTagsInput-By7LMb47.js} +5 -5
  89. package/dist/chunks/{LpTextarea-DaSKBkiV.js → LpTextarea-Ck6RAfzu.js} +1 -1
  90. package/dist/chunks/{LpThemeStudio-BNdfi-Ds.js → LpThemeStudio-C1xKiv8C.js} +5 -5
  91. package/dist/chunks/{LpThemeSwitcher-CbC1nqBP.js → LpThemeSwitcher-Dk4Bk6u1.js} +3 -3
  92. package/dist/chunks/{LpTimeField-CCfPCWPT.js → LpTimeField-BTKJVeNt.js} +2 -2
  93. package/dist/chunks/{LpToaster-BhlI7h-h.js → LpToaster-C_CFWSys.js} +2 -2
  94. package/dist/chunks/{LpTopologyCanvas-DlKbu7E5.js → LpTopologyCanvas-paC1Dup-.js} +4 -4
  95. package/dist/chunks/{LpTour-CSLerA1B.js → LpTour-D_AN_SsZ.js} +1 -1
  96. package/dist/chunks/{LpTruncate-Ct26BSYB.js → LpTruncate-CBUKnr36.js} +1 -1
  97. package/dist/chunks/LpVideoCompress-DD2nShyT.js +242 -0
  98. package/dist/chunks/{LpVideoPlayer-DcWd9DDW.js → LpVideoPlayer-koYKHKkC.js} +4 -4
  99. package/dist/chunks/{LpWindow-YnF_knSj.js → LpWindow-Bo5qQgVY.js} +2 -2
  100. package/dist/chunks/{LpWorkspaceSwitcher-B-5UU6o4.js → LpWorkspaceSwitcher-D50sHs9N.js} +3 -3
  101. package/dist/chunks/{MenuTitle-BnZbFSwq.js → MenuTitle-DCHcfyPH.js} +1 -1
  102. package/dist/chunks/{OptionContent-D5e_eklA.js → OptionContent-o58kS7Zh.js} +1 -1
  103. package/dist/chunks/{PickerField-KpHiowNI.js → PickerField-DNo1k89A.js} +1 -1
  104. package/dist/chunks/{RevealToggle-CE1hAIJB.js → RevealToggle-w7-BMcgC.js} +1 -1
  105. package/dist/chunks/{TourCard-t2csiTDS.js → TourCard-0yYxSdd4.js} +1 -1
  106. package/dist/chunks/{VideoThumb-Csf9bUz3.js → VideoThumb-DL_QkAJY.js} +1 -1
  107. package/dist/chunks/{VideoVolume-B4_DNmNi.js → VideoVolume-D-2TmsVj.js} +2 -2
  108. package/dist/chunks/{icons-CdSlCrle.js → icons-V0k93Puc.js} +3 -3
  109. package/dist/component-names.d.ts +1 -1
  110. package/dist/components/ContextMenuItems.vue.js +1 -1
  111. package/dist/components/DropzoneLinkField.vue.js +1 -1
  112. package/dist/components/FieldLeading.vue.js +1 -1
  113. package/dist/components/FieldWrapper.vue.js +1 -1
  114. package/dist/components/HintSampleTag.vue.d.ts +5 -3
  115. package/dist/components/IconCloseButton.vue.js +1 -1
  116. package/dist/components/LayoutCanvas.vue.js +1 -1
  117. package/dist/components/LayoutNode.vue.js +1 -1
  118. package/dist/components/LpActionBar.vue.d.ts +5 -3
  119. package/dist/components/LpActionBar.vue.js +1 -1
  120. package/dist/components/LpActivityLine.vue.d.ts +6 -6
  121. package/dist/components/LpAddressInput.vue.js +1 -1
  122. package/dist/components/LpAlert.vue.d.ts +1 -1
  123. package/dist/components/LpAlert.vue.js +1 -1
  124. package/dist/components/LpAppShell.vue.d.ts +10 -14
  125. package/dist/components/LpAppShell.vue.js +1 -1
  126. package/dist/components/LpAutocomplete.vue.js +1 -1
  127. package/dist/components/LpAvatar.vue.js +1 -1
  128. package/dist/components/LpBadge.vue.d.ts +4 -0
  129. package/dist/components/LpBadge.vue.js +1 -1
  130. package/dist/components/LpBottomNav.vue.d.ts +6 -4
  131. package/dist/components/LpBottomNav.vue.js +1 -1
  132. package/dist/components/LpBreadcrumbs.vue.d.ts +6 -6
  133. package/dist/components/LpBreadcrumbs.vue.js +1 -1
  134. package/dist/components/LpButton.vue.d.ts +6 -6
  135. package/dist/components/LpCalendar.vue.js +1 -1
  136. package/dist/components/LpChart.vue.js +2 -2
  137. package/dist/components/LpCheckbox.vue.js +1 -1
  138. package/dist/components/LpCodeBlock.vue.d.ts +12 -2
  139. package/dist/components/LpCodeBlock.vue.js +1 -1
  140. package/dist/components/LpCodeDisplay.vue.d.ts +1 -1
  141. package/dist/components/LpCodeDisplay.vue.js +1 -1
  142. package/dist/components/LpColorPicker.vue.js +1 -1
  143. package/dist/components/LpCommandPalette.vue.d.ts +1 -1
  144. package/dist/components/LpCommandPalette.vue.js +2 -2
  145. package/dist/components/LpConfirmDialog.vue.js +1 -1
  146. package/dist/components/LpConfirmHost.vue.js +1 -1
  147. package/dist/components/LpContextMenu.vue.js +1 -1
  148. package/dist/components/LpContextSwitcher.vue.d.ts +6 -4
  149. package/dist/components/LpContextSwitcher.vue.js +1 -1
  150. package/dist/components/LpCopyButton.vue.js +1 -1
  151. package/dist/components/LpDataList.vue.js +1 -1
  152. package/dist/components/LpDatePicker.vue.js +1 -1
  153. package/dist/components/LpDateRangePicker.vue.js +1 -1
  154. package/dist/components/LpDisclosure.vue.js +1 -1
  155. package/dist/components/LpDock.vue.js +1 -1
  156. package/dist/components/LpDrawer.vue.d.ts +6 -6
  157. package/dist/components/LpDrawer.vue.js +1 -1
  158. package/dist/components/LpDropdownMenu.vue.js +1 -1
  159. package/dist/components/LpDropzone.vue.d.ts +10 -14
  160. package/dist/components/LpDropzone.vue.js +4 -4
  161. package/dist/components/LpEditable.vue.js +1 -1
  162. package/dist/components/LpEmptyState.vue.js +1 -1
  163. package/dist/components/LpFieldNotice.vue.js +1 -1
  164. package/dist/components/LpFileTree.vue.js +1 -1
  165. package/dist/components/LpFileTreeNode.vue.js +1 -1
  166. package/dist/components/LpFormField.vue.js +1 -1
  167. package/dist/components/LpHintExample.vue.d.ts +2 -3
  168. package/dist/components/LpHintLayer.vue.d.ts +7 -8
  169. package/dist/components/LpHintLayer.vue.js +1 -1
  170. package/dist/components/LpHints.vue.d.ts +6 -5
  171. package/dist/components/LpHints.vue.js +1 -1
  172. package/dist/components/LpIcon.vue.js +1 -1
  173. package/dist/components/LpImageEditor.vue.d.ts +14 -3
  174. package/dist/components/LpImageEditor.vue.js +3 -3
  175. package/dist/components/LpInfraNode.vue.js +1 -1
  176. package/dist/components/LpInput.vue.d.ts +6 -6
  177. package/dist/components/LpInput.vue.js +1 -1
  178. package/dist/components/LpInspector.vue.d.ts +8 -6
  179. package/dist/components/LpInspector.vue.js +1 -1
  180. package/dist/components/LpKeys.vue.js +2 -2
  181. package/dist/components/LpLightbox.vue.js +1 -1
  182. package/dist/components/LpLogInspector.vue.js +1 -1
  183. package/dist/components/LpLogViewer.vue.js +1 -1
  184. package/dist/components/LpMapPicker.vue.d.ts +8 -0
  185. package/dist/components/LpMapPicker.vue.js +1 -1
  186. package/dist/components/LpMediaGallery.vue.d.ts +3 -7
  187. package/dist/components/LpMediaGallery.vue.js +1 -1
  188. package/dist/components/LpModal.vue.d.ts +5 -3
  189. package/dist/components/LpModal.vue.js +1 -1
  190. package/dist/components/LpModalNav.vue.d.ts +4 -0
  191. package/dist/components/LpModalNav.vue.js +1 -1
  192. package/dist/components/LpNotificationBell.vue.js +1 -1
  193. package/dist/components/LpNotificationFeed.vue.js +1 -1
  194. package/dist/components/LpNumberField.vue.js +1 -1
  195. package/dist/components/LpOtpInput.vue.js +1 -1
  196. package/dist/components/LpPagination.vue.d.ts +8 -2
  197. package/dist/components/LpPagination.vue.js +1 -1
  198. package/dist/components/LpPaletteFacts.vue.js +1 -1
  199. package/dist/components/LpPaletteHeader.vue.js +2 -2
  200. package/dist/components/LpPaletteTheme.vue.d.ts +12 -0
  201. package/dist/components/LpPaletteTheme.vue.js +1 -1
  202. package/dist/components/LpPasswordInput.vue.js +1 -1
  203. package/dist/components/LpPhoneInput.vue.js +1 -1
  204. package/dist/components/LpPie.vue.js +1 -1
  205. package/dist/components/LpPipeline.vue.js +1 -1
  206. package/dist/components/LpQuota.vue.js +1 -1
  207. package/dist/components/LpRadioGroup.vue.js +1 -1
  208. package/dist/components/LpRangeCalendar.vue.js +1 -1
  209. package/dist/components/LpRangeSlider.vue.js +1 -1
  210. package/dist/components/LpRepeater.vue.d.ts +9 -7
  211. package/dist/components/LpRepeater.vue.js +1 -1
  212. package/dist/components/LpSecretField.vue.js +1 -1
  213. package/dist/components/LpSection.vue.js +1 -1
  214. package/dist/components/LpSegmented.vue.js +1 -1
  215. package/dist/components/LpSelect.vue.js +1 -1
  216. package/dist/components/LpShortcutsDialog.vue.d.ts +11 -1
  217. package/dist/components/LpShortcutsDialog.vue.js +3 -3
  218. package/dist/components/LpSidebar.vue.d.ts +13 -11
  219. package/dist/components/LpSidebar.vue.js +1 -1
  220. package/dist/components/LpSidebarNav.vue.js +1 -1
  221. package/dist/components/LpSidebarRow.vue.js +1 -1
  222. package/dist/components/LpSlider.vue.js +1 -1
  223. package/dist/components/LpSparkline.vue.d.ts +10 -1
  224. package/dist/components/LpStat.vue.js +1 -1
  225. package/dist/components/LpStatus.vue.js +1 -1
  226. package/dist/components/LpStepMark.vue.js +1 -1
  227. package/dist/components/LpStepper.vue.js +1 -1
  228. package/dist/components/LpSwitch.vue.js +1 -1
  229. package/dist/components/LpTabFace.vue.js +1 -1
  230. package/dist/components/LpTable.vue.js +9 -9
  231. package/dist/components/LpTableFilter.vue.js +1 -1
  232. package/dist/components/LpTableOfContents.vue.d.ts +5 -3
  233. package/dist/components/LpTabs.vue.js +2 -2
  234. package/dist/components/LpTagsInput.vue.js +1 -1
  235. package/dist/components/LpTextarea.vue.js +1 -1
  236. package/dist/components/LpThemeStudio.vue.js +1 -1
  237. package/dist/components/LpThemeSwitcher.vue.d.ts +8 -6
  238. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  239. package/dist/components/LpTimeField.vue.js +1 -1
  240. package/dist/components/LpToaster.vue.d.ts +7 -5
  241. package/dist/components/LpToaster.vue.js +1 -1
  242. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  243. package/dist/components/LpTour.vue.d.ts +13 -20
  244. package/dist/components/LpTour.vue.js +1 -1
  245. package/dist/components/LpTruncate.vue.js +1 -1
  246. package/dist/components/LpTypewriter.vue.d.ts +1 -1
  247. package/dist/components/LpUptimeBar.vue.d.ts +4 -2
  248. package/dist/components/LpVideoCompress.vue.d.ts +63 -0
  249. package/dist/components/LpVideoCompress.vue.js +4 -0
  250. package/dist/components/LpVideoPlayer.vue.d.ts +33 -3
  251. package/dist/components/LpVideoPlayer.vue.js +1 -1
  252. package/dist/components/LpVideoTrim.vue.d.ts +40 -3
  253. package/dist/components/LpVideoTrim.vue.js +6 -6
  254. package/dist/components/LpWindow.vue.d.ts +7 -8
  255. package/dist/components/LpWindow.vue.js +1 -1
  256. package/dist/components/LpWorkspaceSwitcher.vue.d.ts +13 -11
  257. package/dist/components/LpWorkspaceSwitcher.vue.js +1 -1
  258. package/dist/components/MenuTitle.vue.js +1 -1
  259. package/dist/components/OptionContent.vue.js +1 -1
  260. package/dist/components/PickerField.vue.js +1 -1
  261. package/dist/components/RevealToggle.vue.js +1 -1
  262. package/dist/components/TourCard.vue.js +1 -1
  263. package/dist/components/VideoFlash.vue.js +1 -1
  264. package/dist/components/VideoThumb.vue.js +1 -1
  265. package/dist/components/VideoVolume.vue.js +1 -1
  266. package/dist/components/menuWhen.js +1 -1
  267. package/dist/components/status.d.ts +3 -1
  268. package/dist/composables/usePaletteCommands.d.ts +4 -0
  269. package/dist/composables/videoTranscode.d.ts +55 -0
  270. package/dist/composables/videoTranscode.js +134 -0
  271. package/dist/icons-all.js +1 -1
  272. package/dist/index.d.ts +44 -10
  273. package/dist/index.js +748 -170
  274. package/dist/locales/uk.d.ts +165 -0
  275. package/package.json +6 -2
  276. package/src/component-names.ts +1 -0
  277. package/src/components/HintSampleTag.vue +7 -2
  278. package/src/components/LpActionBar.vue +7 -2
  279. package/src/components/LpActivityLine.vue +7 -2
  280. package/src/components/LpAppShell.vue +11 -2
  281. package/src/components/LpBadge.vue +6 -1
  282. package/src/components/LpBottomNav.vue +8 -2
  283. package/src/components/LpBreadcrumbs.vue +7 -2
  284. package/src/components/LpButton.vue +7 -2
  285. package/src/components/LpCodeBlock.vue +13 -2
  286. package/src/components/LpContextSwitcher.vue +8 -2
  287. package/src/components/LpDrawer.vue +7 -2
  288. package/src/components/LpDropzone.vue +11 -2
  289. package/src/components/LpHintExample.vue +2 -2
  290. package/src/components/LpHintLayer.vue +9 -3
  291. package/src/components/LpHints.vue +17 -3
  292. package/src/components/LpImageEditor.vue +14 -7
  293. package/src/components/LpInput.vue +7 -2
  294. package/src/components/LpInspector.vue +10 -2
  295. package/src/components/LpKeys.vue +2 -1
  296. package/src/components/LpMapPicker.vue +10 -1
  297. package/src/components/LpMediaGallery.vue +12 -3
  298. package/src/components/LpModal.vue +7 -2
  299. package/src/components/LpModalNav.vue +6 -1
  300. package/src/components/LpPagination.vue +9 -2
  301. package/src/components/LpPaletteTheme.vue +14 -1
  302. package/src/components/LpRepeater.vue +11 -2
  303. package/src/components/LpShortcutsDialog.vue +12 -1
  304. package/src/components/LpSidebar.vue +15 -12
  305. package/src/components/LpSparkline.vue +12 -2
  306. package/src/components/LpTableOfContents.vue +7 -2
  307. package/src/components/LpThemeSwitcher.vue +10 -2
  308. package/src/components/LpToaster.vue +9 -2
  309. package/src/components/LpTour.vue +15 -3
  310. package/src/components/LpUptimeBar.vue +5 -2
  311. package/src/components/LpVideoCompress.vue +237 -0
  312. package/src/components/LpVideoPlayer.vue +33 -7
  313. package/src/components/LpVideoTrim.vue +40 -9
  314. package/src/components/LpWindow.vue +8 -2
  315. package/src/components/LpWorkspaceSwitcher.vue +15 -12
  316. package/src/components/status.ts +4 -1
  317. package/src/composables/usePaletteCommands.ts +6 -1
  318. package/src/composables/videoTranscode.ts +192 -0
  319. package/src/index.ts +51 -10
  320. package/src/locales/uk.ts +746 -0
  321. package/src/nuxt.ts +5 -1
  322. package/src/theme/palette.ts +2 -1
  323. package/dist/assets/LpVideoTrim-BcGs3Sh0.css +0 -8
@@ -1,5 +1,35 @@
1
1
  import { type VideoErrorCause } from "../composables/useVideoMedia";
2
2
  import { type ContextMenuItemDef } from "./LpContextMenu.vue";
3
+ /** Wording of the video player. `{n}` is seconds, `{time}` the playhead's time. */
4
+ export type VideoPlayerLabels = {
5
+ player: string;
6
+ play: string;
7
+ pause: string;
8
+ replay: string;
9
+ mute: string;
10
+ unmute: string;
11
+ volume: string;
12
+ speed: string;
13
+ normalSpeed: string;
14
+ fullscreen: string;
15
+ exitFullscreen: string;
16
+ pip: string;
17
+ exitPip: string;
18
+ captions: string;
19
+ seek: string;
20
+ failed: string;
21
+ unsupported: string;
22
+ back: string;
23
+ forward: string;
24
+ rewind: string;
25
+ fastForward: string;
26
+ menuAt: string;
27
+ copyTime: string;
28
+ copyFrame: string;
29
+ copiedTime: string;
30
+ copiedFrame: string;
31
+ copyFailed: string;
32
+ };
3
33
  declare const _default: typeof __VLS_export;
4
34
  export default _default;
5
35
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -29,7 +59,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
29
59
  fit?: boolean;
30
60
  /** More items for the right-click menu. */
31
61
  menuItems?: () => ContextMenuItemDef[];
32
- labels?: Partial<Record<"player" | "play" | "pause" | "replay" | "mute" | "unmute" | "volume" | "speed" | "normalSpeed" | "fullscreen" | "exitFullscreen" | "pip" | "exitPip" | "captions" | "seek" | "failed" | "unsupported" | "back" | "forward" | "rewind" | "fastForward" | "menuAt" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
62
+ labels?: Partial<VideoPlayerLabels>;
33
63
  }, {
34
64
  play: () => void;
35
65
  pause: (options?: {
@@ -75,7 +105,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
75
105
  fit?: boolean;
76
106
  /** More items for the right-click menu. */
77
107
  menuItems?: () => ContextMenuItemDef[];
78
- labels?: Partial<Record<"player" | "play" | "pause" | "replay" | "mute" | "unmute" | "volume" | "speed" | "normalSpeed" | "fullscreen" | "exitFullscreen" | "pip" | "exitPip" | "captions" | "seek" | "failed" | "unsupported" | "back" | "forward" | "rewind" | "fastForward" | "menuAt" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
108
+ labels?: Partial<VideoPlayerLabels>;
79
109
  }> & Readonly<{
80
110
  onPause?: (() => any) | undefined;
81
111
  onPlay?: (() => any) | undefined;
@@ -87,7 +117,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
87
117
  }>, {
88
118
  title: string;
89
119
  poster: string;
90
- labels: Partial<Record<"player" | "play" | "pause" | "replay" | "mute" | "unmute" | "volume" | "speed" | "normalSpeed" | "fullscreen" | "exitFullscreen" | "pip" | "exitPip" | "captions" | "seek" | "failed" | "unsupported" | "back" | "forward" | "rewind" | "fastForward" | "menuAt" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
120
+ labels: Partial<VideoPlayerLabels>;
91
121
  menuItems: () => ContextMenuItemDef[];
92
122
  remember: boolean;
93
123
  preview: boolean;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpVideoPlayer-DcWd9DDW.js";
1
+ import { _ as _sfc_main } from "../chunks/LpVideoPlayer-koYKHKkC.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,42 @@
1
1
  import { type ContextMenuItemDef } from "./LpContextMenu.vue";
2
2
  import { type FrameRegion, type TimeRange, type VideoTrimErrorCause } from "./videoTrim";
3
+ /** Wording of the video trimmer. `{left}`, `{max}` and `{time}` are times. */
4
+ export type VideoTrimLabels = {
5
+ play: string;
6
+ pause: string;
7
+ stepBack: string;
8
+ stepForward: string;
9
+ mute: string;
10
+ unmute: string;
11
+ zoomIn: string;
12
+ zoomOut: string;
13
+ zoomFit: string;
14
+ start: string;
15
+ end: string;
16
+ position: string;
17
+ length: string;
18
+ left: string;
19
+ overview: string;
20
+ timeline: string;
21
+ region: string;
22
+ regionHint: string;
23
+ regionClear: string;
24
+ failed: string;
25
+ unsupported: string;
26
+ invalidTime: string;
27
+ menuAt: string;
28
+ setStart: string;
29
+ setEnd: string;
30
+ goStart: string;
31
+ goEnd: string;
32
+ zoomHere: string;
33
+ volume: string;
34
+ copyTime: string;
35
+ copyFrame: string;
36
+ copiedTime: string;
37
+ copiedFrame: string;
38
+ copyFailed: string;
39
+ };
3
40
  declare const _default: typeof __VLS_export;
4
41
  export default _default;
5
42
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
@@ -20,7 +57,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
20
57
  /** More items for the right-click menu, given the time it was opened at (under the pointer on the timeline, the playhead elsewhere). */
21
58
  menuItems?: (at: number) => ContextMenuItemDef[];
22
59
  disabled?: boolean;
23
- labels?: Partial<Record<"play" | "pause" | "stepBack" | "stepForward" | "mute" | "unmute" | "zoomIn" | "zoomOut" | "zoomFit" | "start" | "end" | "position" | "length" | "left" | "overview" | "timeline" | "region" | "regionHint" | "regionClear" | "failed" | "unsupported" | "invalidTime" | "menuAt" | "setStart" | "setEnd" | "goStart" | "goEnd" | "zoomHere" | "volume" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
60
+ labels?: Partial<VideoTrimLabels>;
24
61
  }, {
25
62
  play: () => void;
26
63
  pause: () => void;
@@ -53,7 +90,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
53
90
  /** More items for the right-click menu, given the time it was opened at (under the pointer on the timeline, the playhead elsewhere). */
54
91
  menuItems?: (at: number) => ContextMenuItemDef[];
55
92
  disabled?: boolean;
56
- labels?: Partial<Record<"play" | "pause" | "stepBack" | "stepForward" | "mute" | "unmute" | "zoomIn" | "zoomOut" | "zoomFit" | "start" | "end" | "position" | "length" | "left" | "overview" | "timeline" | "region" | "regionHint" | "regionClear" | "failed" | "unsupported" | "invalidTime" | "menuAt" | "setStart" | "setEnd" | "goStart" | "goEnd" | "zoomHere" | "volume" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
93
+ labels?: Partial<VideoTrimLabels>;
57
94
  }> & Readonly<{
58
95
  onChange?: ((value: TimeRange) => any) | undefined;
59
96
  onError?: ((error: {
@@ -66,7 +103,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
66
103
  poster: string;
67
104
  region: FrameRegion | null;
68
105
  range: TimeRange | null;
69
- labels: Partial<Record<"play" | "pause" | "stepBack" | "stepForward" | "mute" | "unmute" | "zoomIn" | "zoomOut" | "zoomFit" | "start" | "end" | "position" | "length" | "left" | "overview" | "timeline" | "region" | "regionHint" | "regionClear" | "failed" | "unsupported" | "invalidTime" | "menuAt" | "setStart" | "setEnd" | "goStart" | "goEnd" | "zoomHere" | "volume" | "copyTime" | "copyFrame" | "copiedTime" | "copiedFrame" | "copyFailed", string>>;
106
+ labels: Partial<VideoTrimLabels>;
70
107
  maxClip: number;
71
108
  minClip: number;
72
109
  frameRate: number;
@@ -7,12 +7,12 @@ import { useResizeObserver } from "../composables/useResizeObserver.js";
7
7
  import { usePrefersReducedMotion } from "../composables/useReducedMotion.js";
8
8
  import { useVideoMedia } from "../composables/useVideoMedia.js";
9
9
  import { _ as _sfc_main$3 } from "../chunks/LpButton-DSHioIfD.js";
10
- import { _ as _sfc_main$2 } from "../chunks/LpIcon-CoOLz1oJ.js";
11
- import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-DIYhlap8.js";
12
- import { _ as _sfc_main$6 } from "../chunks/LpInput-BVWhkPuN.js";
10
+ import { _ as _sfc_main$2 } from "../chunks/LpIcon-DCGhNsCU.js";
11
+ import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-CUFZIQX2.js";
12
+ import { _ as _sfc_main$6 } from "../chunks/LpInput-CKMblRtp.js";
13
13
  import { _ as _sfc_main$4 } from "../chunks/SteadyText-CwH-kduj.js";
14
14
  import VideoFlash from "./VideoFlash.vue.js";
15
- import { _ as _sfc_main$5 } from "../chunks/VideoVolume-B4_DNmNi.js";
15
+ import { _ as _sfc_main$5 } from "../chunks/VideoVolume-D-2TmsVj.js";
16
16
  import { FADE, FADE_SCALE, OVERLAY_BUTTON, ICON_SWAP } from "./videoMotion.js";
17
17
  import { useClipboard } from "../composables/useClipboard.js";
18
18
  import { useToast } from "../composables/useToast.js";
@@ -20,7 +20,7 @@ import { formatClipTime, widestClipTime } from "./videoBackdrop.js";
20
20
  import { stillSpan, FrameSampler } from "./videoFrames.js";
21
21
  import { normalizeRange, ticks, tickStep, containRect, setEnd, revealTime, zoomView, shiftView, adjustRegion, dragEnd, parseClipTime, regionBetween } from "./videoTrim.js";
22
22
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
23
- import '../assets/LpVideoTrim-BcGs3Sh0.css';const _hoisted_1 = ["data-disabled"];
23
+ import '../assets/LpVideoTrim-CMoUw3dJ.css';const _hoisted_1 = ["data-disabled"];
24
24
  const _hoisted_2 = ["src", "poster"];
25
25
  const _hoisted_3 = ["src"];
26
26
  const _hoisted_4 = ["data-live", "aria-label"];
@@ -1100,7 +1100,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1100
1100
  };
1101
1101
  }
1102
1102
  });
1103
- const LpVideoTrim = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-713835cc"]]);
1103
+ const LpVideoTrim = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ba15829e"]]);
1104
1104
  export {
1105
1105
  LpVideoTrim as default
1106
1106
  };
@@ -2,6 +2,11 @@ import { type CloseGuard } from "../composables/useCloseGuard";
2
2
  import { type WindowDock, type WindowRect } from "../composables/windowing";
3
3
  declare const _default: typeof __VLS_export;
4
4
  export default _default;
5
+ /** Wording of the window's controls. */
6
+ export type WindowLabels = {
7
+ close: string;
8
+ move: string;
9
+ };
5
10
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
6
11
  title?: string;
7
12
  /** Accessible name for a window without a visible `title`. */
@@ -24,10 +29,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
24
29
  guard?: CloseGuard;
25
30
  /** Frosted glass instead of a solid panel. Unset follows `provideGlass`. */
26
31
  glass?: boolean;
27
- labels?: Partial<{
28
- close: string;
29
- move: string;
30
- }>;
32
+ labels?: Partial<WindowLabels>;
31
33
  } & {
32
34
  open?: boolean;
33
35
  }, {
@@ -62,10 +64,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
62
64
  guard?: CloseGuard;
63
65
  /** Frosted glass instead of a solid panel. Unset follows `provideGlass`. */
64
66
  glass?: boolean;
65
- labels?: Partial<{
66
- close: string;
67
- move: string;
68
- }>;
67
+ labels?: Partial<WindowLabels>;
69
68
  } & {
70
69
  open?: boolean;
71
70
  }> & Readonly<{
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpWindow-YnF_knSj.js";
1
+ import { _ as _sfc_main } from "../chunks/LpWindow-Bo5qQgVY.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,17 +1,19 @@
1
1
  import type { UseWorkspaces } from "../layout/useWorkspaces";
2
+ /** Wording of the workspace switcher. */
3
+ export type WorkspaceSwitcherLabels = {
4
+ menu: string;
5
+ create: string;
6
+ duplicate: string;
7
+ rename: string;
8
+ remove: string;
9
+ name: string;
10
+ save: string;
11
+ cancel: string;
12
+ required: string;
13
+ };
2
14
  type __VLS_Props = {
3
15
  workspaces: UseWorkspaces;
4
- labels?: Partial<{
5
- menu: string;
6
- create: string;
7
- duplicate: string;
8
- rename: string;
9
- remove: string;
10
- name: string;
11
- save: string;
12
- cancel: string;
13
- required: string;
14
- }>;
16
+ labels?: Partial<WorkspaceSwitcherLabels>;
15
17
  };
16
18
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
19
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpWorkspaceSwitcher-B-5UU6o4.js";
1
+ import { _ as _sfc_main } from "../chunks/LpWorkspaceSwitcher-D50sHs9N.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/MenuTitle-BnZbFSwq.js";
1
+ import { _ as _sfc_main } from "../chunks/MenuTitle-DCHcfyPH.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/OptionContent-D5e_eklA.js";
1
+ import { _ as _sfc_main } from "../chunks/OptionContent-o58kS7Zh.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/PickerField-KpHiowNI.js";
1
+ import { _ as _sfc_main } from "../chunks/PickerField-DNo1k89A.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/RevealToggle-CE1hAIJB.js";
1
+ import { _ as _sfc_main } from "../chunks/RevealToggle-w7-BMcgC.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/TourCard-t2csiTDS.js";
1
+ import { _ as _sfc_main } from "../chunks/TourCard-0yYxSdd4.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createVNode, normalizeClass, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$1 } from "../chunks/LpIcon-CoOLz1oJ.js";
2
+ import { _ as _sfc_main$1 } from "../chunks/LpIcon-DCGhNsCU.js";
3
3
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
4
4
  import '../assets/VideoFlash-VuPkC7QV.css';const _hoisted_1 = {
5
5
  class: "pointer-events-none absolute inset-0 flex items-center justify-center motion-reduce:hidden",
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/VideoThumb-Csf9bUz3.js";
1
+ import { _ as _sfc_main } from "../chunks/VideoThumb-DL_QkAJY.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/VideoVolume-B4_DNmNi.js";
1
+ import { _ as _sfc_main } from "../chunks/VideoVolume-D-2TmsVj.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, h } from "vue";
2
- import { _ as _sfc_main } from "../chunks/LpContextMenu-DIYhlap8.js";
2
+ import { _ as _sfc_main } from "../chunks/LpContextMenu-CUFZIQX2.js";
3
3
  const MenuWhen = defineComponent({
4
4
  name: "MenuWhen",
5
5
  inheritAttrs: false,
@@ -11,4 +11,6 @@ export interface StatusLook {
11
11
  pulse: boolean;
12
12
  }
13
13
  export declare const STATUS_LOOK: Record<StatusKind, StatusLook>;
14
- export declare const STATUS_LABELS: Record<StatusKind, string>;
14
+ /** A name for each status, as LpStatus shows and announces it. */
15
+ export type StatusLabels = Record<StatusKind, string>;
16
+ export declare const STATUS_LABELS: StatusLabels;
@@ -1,6 +1,10 @@
1
1
  import { type Directive, type MaybeRefOrGetter } from "vue";
2
2
  import type { Command } from "../components/LpCommandPalette.vue";
3
3
  import type { ContextMenuItemDef } from "../components/LpContextMenu.vue";
4
+ /** Wording of the palette command a form control registers. */
5
+ export type PaletteControlLabels = {
6
+ focus: string;
7
+ };
4
8
  export interface PaletteRegistration {
5
9
  commands: () => readonly Command[];
6
10
  priority: number;
@@ -0,0 +1,55 @@
1
+ import type { TimeRange } from "../components/videoTrim";
2
+ export interface VideoInfo {
3
+ /** Seconds. */
4
+ duration: number;
5
+ /** Display size, after rotation. */
6
+ width: number;
7
+ height: number;
8
+ /** Bytes of the file as given. */
9
+ size: number;
10
+ hasAudio: boolean;
11
+ }
12
+ export interface TranscodeVideoOptions {
13
+ /** `[start, end]` in seconds; the whole video when unset. */
14
+ range?: TimeRange | null;
15
+ /** Scale down to this height when the video is taller; never scales up. */
16
+ maxHeight?: number | null;
17
+ /** Aim the result at this many bytes; the video bitrate is derived from it. */
18
+ targetBytes?: number | null;
19
+ /** Video bitrate in bits per second; ignored when `targetBytes` is set. */
20
+ videoBitrate?: number | null;
21
+ /** 0..1 as encoding goes. */
22
+ onProgress?: (fraction: number) => void;
23
+ /** Aborting stops the encoders and rejects with an `AbortError`. */
24
+ signal?: AbortSignal;
25
+ }
26
+ /** Audio rate the estimate and the encoder share. */
27
+ export declare const TRANSCODE_AUDIO_BITRATE = 96000;
28
+ /** A sensible video bitrate for a height, bits per second. */
29
+ export declare function bitrateForHeight(height: number): number;
30
+ /** The height the output will have: the source's, or `maxHeight` when the source is taller, always even. */
31
+ export declare function outputHeight(sourceHeight: number, maxHeight?: number | null): number;
32
+ /** Length of the clip that will be encoded, seconds. */
33
+ export declare function clipLength(duration: number, range?: TimeRange | null): number;
34
+ type Planned = Pick<VideoInfo, "duration" | "height" | "hasAudio"> & Partial<Pick<VideoInfo, "size">>;
35
+ /**
36
+ * The video bitrate an encode will use, bits per second. Never above the
37
+ * source's own: re-encoding adds no detail, only bytes.
38
+ */
39
+ export declare function plannedVideoBitrate(info: Planned, options?: TranscodeVideoOptions): number;
40
+ /** Roughly how many bytes an encode with these options will produce. */
41
+ export declare function estimateTranscodedBytes(info: Planned, options?: TranscodeVideoOptions): number;
42
+ /** Whether this browser can encode video at all (WebCodecs with an H.264, VP9 or AV1 encoder). */
43
+ export declare function canTranscodeVideo(): Promise<boolean>;
44
+ /** Length, size and whether there is sound, read from the file's headers without decoding it. */
45
+ export declare function probeVideo(file: Blob): Promise<VideoInfo>;
46
+ /** The file name with an `.mp4` extension, which is what comes out. */
47
+ export declare function transcodedName(name: string): string;
48
+ /**
49
+ * An MP4 with the range cut out, scaled down to `maxHeight` and encoded at the
50
+ * planned bitrate. Sound is kept and re-encoded (AAC, or Opus where the
51
+ * browser has no AAC encoder); a browser that can encode neither the picture
52
+ * nor the sound rejects instead of returning a silent or broken file.
53
+ */
54
+ export declare function transcodeVideo(file: File, options?: TranscodeVideoOptions): Promise<File>;
55
+ export {};
@@ -0,0 +1,134 @@
1
+ const TRANSCODE_AUDIO_BITRATE = 96e3;
2
+ const MIN_VIDEO_BITRATE = 25e4;
3
+ const TARGET_HEADROOM = 0.92;
4
+ const loadLib = () => import("mediabunny");
5
+ function bitrateForHeight(height) {
6
+ if (height <= 480) return 12e5;
7
+ if (height <= 720) return 25e5;
8
+ if (height <= 1080) return 5e6;
9
+ return 8e6;
10
+ }
11
+ function outputHeight(sourceHeight, maxHeight) {
12
+ const height = maxHeight && sourceHeight > maxHeight ? maxHeight : sourceHeight;
13
+ return Math.max(2, Math.round(height / 2) * 2);
14
+ }
15
+ function clipLength(duration, range) {
16
+ if (!range) return duration;
17
+ const start = Math.max(0, Math.min(range[0], range[1]));
18
+ const end = Math.min(duration, Math.max(range[0], range[1]));
19
+ return Math.max(0, end - start);
20
+ }
21
+ function sourceBitrate(info) {
22
+ if (!info.size || info.duration <= 0) return null;
23
+ const audio = info.hasAudio ? TRANSCODE_AUDIO_BITRATE : 0;
24
+ return Math.max(MIN_VIDEO_BITRATE, Math.floor(info.size * 8 / info.duration - audio));
25
+ }
26
+ function plannedVideoBitrate(info, options = {}) {
27
+ const length = clipLength(info.duration, options.range);
28
+ const ceiling = sourceBitrate(info) ?? Infinity;
29
+ if (options.targetBytes && length > 0) {
30
+ const audio = info.hasAudio ? TRANSCODE_AUDIO_BITRATE : 0;
31
+ return Math.min(ceiling, Math.max(MIN_VIDEO_BITRATE, Math.floor(options.targetBytes * 8 * TARGET_HEADROOM / length - audio)));
32
+ }
33
+ return Math.min(ceiling, options.videoBitrate ?? bitrateForHeight(outputHeight(info.height, options.maxHeight)));
34
+ }
35
+ function estimateTranscodedBytes(info, options = {}) {
36
+ const length = clipLength(info.duration, options.range);
37
+ const audio = info.hasAudio ? TRANSCODE_AUDIO_BITRATE : 0;
38
+ return Math.round((plannedVideoBitrate(info, options) + audio) * length / 8);
39
+ }
40
+ async function canTranscodeVideo() {
41
+ if (typeof globalThis.VideoEncoder === "undefined" || typeof globalThis.VideoDecoder === "undefined") return false;
42
+ try {
43
+ const lib = await loadLib();
44
+ return await lib.getFirstEncodableVideoCodec(["avc", "vp9", "av1"]) !== null;
45
+ } catch {
46
+ return false;
47
+ }
48
+ }
49
+ async function probeVideo(file) {
50
+ const lib = await loadLib();
51
+ const input = new lib.Input({ source: new lib.BlobSource(file), formats: lib.ALL_FORMATS });
52
+ try {
53
+ const video = await input.getPrimaryVideoTrack();
54
+ if (!video) throw new Error("The file has no video track");
55
+ const [duration, width, height, audio] = await Promise.all([
56
+ input.computeDuration(),
57
+ video.getDisplayWidth(),
58
+ video.getDisplayHeight(),
59
+ input.getPrimaryAudioTrack()
60
+ ]);
61
+ return { duration, width, height, size: file.size, hasAudio: audio !== null };
62
+ } finally {
63
+ input.dispose();
64
+ }
65
+ }
66
+ function abortError() {
67
+ return new DOMException("The video encode was aborted", "AbortError");
68
+ }
69
+ function transcodedName(name) {
70
+ const dot = name.lastIndexOf(".");
71
+ return `${dot > 0 ? name.slice(0, dot) : name || "video"}.mp4`;
72
+ }
73
+ async function transcodeVideo(file, options = {}) {
74
+ if (options.signal?.aborted) throw abortError();
75
+ const lib = await loadLib();
76
+ const info = await probeVideo(file);
77
+ const height = outputHeight(info.height, options.maxHeight);
78
+ const width = Math.max(2, Math.round(info.width * height / info.height / 2) * 2);
79
+ const bitrate = plannedVideoBitrate(info, options);
80
+ const videoCodec = await lib.getFirstEncodableVideoCodec(["avc", "vp9", "av1"], { width, height, quality: new lib.Quality({ bitrate }) });
81
+ if (!videoCodec) throw new Error("This browser can't encode video of this size");
82
+ const audioCodec = info.hasAudio ? await lib.getFirstEncodableAudioCodec(["aac", "opus"], { quality: new lib.Quality({ bitrate: TRANSCODE_AUDIO_BITRATE }) }) : null;
83
+ if (info.hasAudio && !audioCodec) throw new Error("This browser can't encode this video's sound");
84
+ const input = new lib.Input({ source: new lib.BlobSource(file), formats: lib.ALL_FORMATS });
85
+ const target = new lib.BufferTarget();
86
+ const output = new lib.Output({ format: new lib.Mp4OutputFormat({ fastStart: "in-memory" }), target });
87
+ try {
88
+ const range = options.range ?? null;
89
+ const conversion = await lib.Conversion.init({
90
+ input,
91
+ output,
92
+ trim: range ? { start: Math.min(range[0], range[1]), end: Math.max(range[0], range[1]) } : void 0,
93
+ video: {
94
+ height: height === info.height ? void 0 : height,
95
+ codec: videoCodec,
96
+ quality: new lib.Quality({ bitrate }),
97
+ forceTranscode: true
98
+ },
99
+ audio: audioCodec ? { codec: audioCodec, quality: new lib.Quality({ bitrate: TRANSCODE_AUDIO_BITRATE }) } : { discard: true }
100
+ });
101
+ if (!conversion.isValid) {
102
+ const reasons = conversion.discardedTracks.map((t) => t.reason).join(", ");
103
+ throw new Error(`This video can't be re-encoded here (${reasons || "unknown reason"})`);
104
+ }
105
+ const onAbort = () => void conversion.cancel();
106
+ options.signal?.addEventListener("abort", onAbort, { once: true });
107
+ conversion.onProgress = (progress) => options.onProgress?.(progress);
108
+ try {
109
+ await conversion.execute();
110
+ } catch (error) {
111
+ if (options.signal?.aborted) throw abortError();
112
+ throw error;
113
+ } finally {
114
+ options.signal?.removeEventListener("abort", onAbort);
115
+ }
116
+ if (!target.buffer) throw new Error("The encoder produced no file");
117
+ options.onProgress?.(1);
118
+ return new File([target.buffer], transcodedName(file.name), { type: "video/mp4", lastModified: Date.now() });
119
+ } finally {
120
+ input.dispose();
121
+ }
122
+ }
123
+ export {
124
+ TRANSCODE_AUDIO_BITRATE,
125
+ bitrateForHeight,
126
+ canTranscodeVideo,
127
+ clipLength,
128
+ estimateTranscodedBytes,
129
+ outputHeight,
130
+ plannedVideoBitrate,
131
+ probeVideo,
132
+ transcodeVideo,
133
+ transcodedName
134
+ };
package/dist/icons-all.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import lucide from "@iconify-json/lucide/icons.json";
2
- import { a as registerIconCollection } from "./chunks/icons-CdSlCrle.js";
2
+ import { a as registerIconCollection } from "./chunks/icons-V0k93Puc.js";
3
3
  registerIconCollection(lucide);