@leavepulse/ui 0.82.0 → 0.83.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.
- package/dist/assets/LpVideoTrim-BcGs3Sh0.css +8 -0
- package/dist/assets/VideoFlash-VuPkC7QV.css +23 -0
- package/dist/chunks/{ContextMenuItems-kRVTuSZd.js → ContextMenuItems-h-apPY2d.js} +1 -1
- package/dist/chunks/{DropzoneLinkField-CvMUu8HQ.js → DropzoneLinkField-_Op8b_ee.js} +1 -1
- package/dist/chunks/{FieldLeading-CNN_5Dp1.js → FieldLeading-mOMcwNqi.js} +1 -1
- package/dist/chunks/{FieldWrapper-BBJPEVHr.js → FieldWrapper-DtT-AIcn.js} +1 -1
- package/dist/chunks/{IconCloseButton-C59_etp2.js → IconCloseButton-YmisskyZ.js} +1 -1
- package/dist/chunks/{LayoutCanvas-BIY74SUe.js → LayoutCanvas-BrISZEBr.js} +1 -1
- package/dist/chunks/{LayoutNode-CTlKlhb-.js → LayoutNode-CwMQ8ACa.js} +1 -1
- package/dist/chunks/{LpActionBar-Cowb-28D.js → LpActionBar-CVVC6YbC.js} +1 -1
- package/dist/chunks/{LpAddressInput-nTJlUQ6K.js → LpAddressInput-tiuJ-bru.js} +7 -7
- package/dist/chunks/{LpAlert-DhZdjekN.js → LpAlert-8-x4H_Nk.js} +1 -1
- package/dist/chunks/{LpAppShell-CK9hTgQ1.js → LpAppShell-BW2YMq-A.js} +4 -4
- package/dist/chunks/{LpAutocomplete--PaZkQoU.js → LpAutocomplete-BZODIops.js} +4 -4
- package/dist/chunks/{LpAvatar-DVCld_L2.js → LpAvatar-BZq4nH53.js} +1 -1
- package/dist/chunks/{LpBadge-DXvpxk6z.js → LpBadge-Cz0pSSUu.js} +1 -1
- package/dist/chunks/{LpBottomNav-COQiBNUN.js → LpBottomNav-DVdR5Mry.js} +1 -1
- package/dist/chunks/{LpBreadcrumbs-Dt1O5G4O.js → LpBreadcrumbs-B2jphAel.js} +1 -1
- package/dist/chunks/{LpCalendar-C8Xlukd2.js → LpCalendar-C0_N5LVT.js} +1 -1
- package/dist/chunks/{LpCheckbox-Dpybd3oV.js → LpCheckbox-CwqLNdw4.js} +2 -2
- package/dist/chunks/{LpCodeBlock-C1Hu5RyT.js → LpCodeBlock-Dcss6bnl.js} +2 -2
- package/dist/chunks/{LpCodeDisplay-BVruT3-A.js → LpCodeDisplay-CLms1zDY.js} +4 -4
- package/dist/chunks/{LpColorPicker-BK-NRaGK.js → LpColorPicker-CbIY450X.js} +3 -3
- package/dist/chunks/{LpConfirmDialog-2CQFKtqU.js → LpConfirmDialog-RmP4z6va.js} +2 -2
- package/dist/chunks/{LpConfirmHost-CTkSytVl.js → LpConfirmHost-DheBgRMB.js} +1 -1
- package/dist/chunks/{LpContextMenu-DcHPdW-t.js → LpContextMenu-DIYhlap8.js} +2 -2
- package/dist/chunks/{LpContextSwitcher-C_nnDbeI.js → LpContextSwitcher-fDA6ERl-.js} +2 -2
- package/dist/chunks/{LpCopyButton-De7_elaO.js → LpCopyButton-DSqKFGEb.js} +1 -1
- package/dist/chunks/{LpDataList-BjZPfQjO.js → LpDataList-f9UjSx9m.js} +2 -2
- package/dist/chunks/{LpDatePicker-wOrHd0fg.js → LpDatePicker-3kDQLVbg.js} +5 -5
- package/dist/chunks/{LpDateRangePicker-CVMvvo5t.js → LpDateRangePicker-DUPiTt0_.js} +3 -3
- package/dist/chunks/{LpDisclosure-CtQ63LeO.js → LpDisclosure-C5WZjhbQ.js} +1 -1
- package/dist/chunks/{LpDrawer-TZBPzyOM.js → LpDrawer-CkYvIGIa.js} +1 -1
- package/dist/chunks/{LpDropdownMenu-DL9LgkS8.js → LpDropdownMenu-zSsK2Xra.js} +6 -3
- package/dist/chunks/{LpEditable-DuPE2tkl.js → LpEditable-CP7Y_lKg.js} +2 -2
- package/dist/chunks/{LpEmptyState-W1U_tKg-.js → LpEmptyState-dsc5x-ya.js} +1 -1
- package/dist/chunks/{LpFieldNotice-BLKlYLwu.js → LpFieldNotice-TOTbWvgv.js} +1 -1
- package/dist/chunks/{LpFileTree-CEiRIpj1.js → LpFileTree-BPjnOTln.js} +4 -4
- package/dist/chunks/{LpFileTreeNode-C0292AU2.js → LpFileTreeNode-_-MiWmie.js} +4 -4
- package/dist/chunks/{LpFormField-Bhgi0idH.js → LpFormField-BJwD1iEF.js} +1 -1
- package/dist/chunks/{LpHintLayer-D8ZKsvsT.js → LpHintLayer-CmfGnxYu.js} +1 -1
- package/dist/chunks/{LpHints-DbIV-wk4.js → LpHints-C2Xvc1Fd.js} +3 -3
- package/dist/chunks/{LpIcon-CytpcLmS.js → LpIcon-CoOLz1oJ.js} +1 -1
- package/dist/chunks/{LpInfraNode-8cGoY87Q.js → LpInfraNode-CW3qsM-U.js} +2 -2
- package/dist/chunks/{LpInput-P2C12X7s.js → LpInput-BVWhkPuN.js} +3 -3
- package/dist/chunks/{LpInspector-DjfMa4tD.js → LpInspector-REmoX_es.js} +4 -4
- package/dist/chunks/{LpLightbox-BEQtCz0m.js → LpLightbox-C3FFTYP5.js} +65 -20
- package/dist/chunks/{LpLogInspector-CyxK1d-V.js → LpLogInspector-Cs8Z_fM0.js} +2 -2
- package/dist/chunks/{LpLogViewer-CZrc_HG7.js → LpLogViewer-DQRGe-ZK.js} +6 -6
- package/dist/chunks/{LpMapPicker-CbTfFcEu.js → LpMapPicker-CQnQPgKm.js} +1 -1
- package/dist/chunks/{LpMediaGallery-C_SwNR4y.js → LpMediaGallery-DkKqTy9P.js} +20 -8
- package/dist/chunks/{LpModal-B6Yt0G7E.js → LpModal-DwejR7VP.js} +1 -1
- package/dist/chunks/{LpModalNav-CMYWEiUs.js → LpModalNav-D1-dSe6f.js} +3 -3
- package/dist/chunks/{LpNotificationBell-BJKPx0X1.js → LpNotificationBell-EKLkN0sp.js} +4 -4
- package/dist/chunks/{LpNotificationFeed-orWISVez.js → LpNotificationFeed-Dc-yQ4NH.js} +4 -4
- package/dist/chunks/{LpNumberField-C5MeLsoE.js → LpNumberField-DvUjEMp-.js} +3 -3
- package/dist/chunks/{LpOtpInput-6SCQ64uK.js → LpOtpInput-xvDO14f4.js} +1 -1
- package/dist/chunks/{LpPagination-CkwbdFa9.js → LpPagination-BFZY8dFn.js} +1 -1
- package/dist/chunks/{LpPaletteTheme-RWgbWFOz.js → LpPaletteTheme-EBJv0Bwz.js} +2 -2
- package/dist/chunks/{LpPasswordInput-DJBRo5lt.js → LpPasswordInput-DRJR3fF1.js} +2 -2
- package/dist/chunks/{LpPhoneInput-DcmcJwos.js → LpPhoneInput-BGOOtUoW.js} +3 -3
- package/dist/chunks/{LpPie-DmMlhgo2.js → LpPie-Deyn8h5J.js} +2 -2
- package/dist/chunks/{LpPipeline-BXcp2shV.js → LpPipeline-9ChjeNh5.js} +2 -2
- package/dist/chunks/{LpQuota-CtEiqRg4.js → LpQuota-CNh5eF_p.js} +1 -1
- package/dist/chunks/{LpRadioGroup-Ubkk_eSq.js → LpRadioGroup-Br2Nl9Gr.js} +2 -2
- package/dist/chunks/{LpRangeCalendar-DCswVYbU.js → LpRangeCalendar-D66Y3U_w.js} +1 -1
- package/dist/chunks/{LpRangeSlider-DM1qy5Tp.js → LpRangeSlider-eX-fIlOw.js} +1 -1
- package/dist/chunks/{LpRepeater-BMo2Eabn.js → LpRepeater-0XvnlVd_.js} +2 -2
- package/dist/chunks/{LpSecretField-SSRGVqRc.js → LpSecretField-1RCooChq.js} +5 -5
- package/dist/chunks/{LpSection-C3bTxD7t.js → LpSection-B9gbJJcP.js} +1 -1
- package/dist/chunks/{LpSegmented-C1DF6m6A.js → LpSegmented-hIjGzGTo.js} +2 -2
- package/dist/chunks/{LpSelect-DvDr1VPn.js → LpSelect-DugubwTc.js} +4 -4
- package/dist/chunks/{LpSidebar-Bql881r6.js → LpSidebar-DevSoN8W.js} +4 -4
- package/dist/chunks/{LpSidebarNav-CKx2KJvr.js → LpSidebarNav-DwQQ3KXe.js} +3 -3
- package/dist/chunks/{LpSidebarRow-BMOL9kOG.js → LpSidebarRow-CAGgtJCS.js} +3 -3
- package/dist/chunks/{LpSlider-DsSMe4b5.js → LpSlider-1fHpVxpB.js} +1 -1
- package/dist/chunks/{LpStat-CQYYDMS6.js → LpStat-Cm9-FaWQ.js} +2 -2
- package/dist/chunks/{LpStatus-g5nSJfU3.js → LpStatus-CE8FSAT1.js} +1 -1
- package/dist/chunks/{LpStepMark-seVNOuNJ.js → LpStepMark-BWSlV69R.js} +1 -1
- package/dist/chunks/{LpStepper-D6qEXihZ.js → LpStepper-1D0ZA7Nx.js} +1 -1
- package/dist/chunks/{LpSwitch-DM5CVm31.js → LpSwitch-D_kvE0oQ.js} +1 -1
- package/dist/chunks/{LpTabFace-ZWwelqRU.js → LpTabFace-CpbFKi-N.js} +2 -2
- package/dist/chunks/{LpTableFilter-CWU9Dmk-.js → LpTableFilter-BYHyCu38.js} +2 -2
- package/dist/chunks/{LpTagsInput-C2qVF2ax.js → LpTagsInput-Cqm38t5N.js} +5 -5
- package/dist/chunks/{LpTextarea-C3EoV_xv.js → LpTextarea-DaSKBkiV.js} +1 -1
- package/dist/chunks/{LpThemeStudio-BIBahaIs.js → LpThemeStudio-BNdfi-Ds.js} +5 -5
- package/dist/chunks/{LpThemeSwitcher-D4MqFLGS.js → LpThemeSwitcher-CbC1nqBP.js} +3 -3
- package/dist/chunks/{LpTimeField-DPOkbvyP.js → LpTimeField-CCfPCWPT.js} +2 -2
- package/dist/chunks/{LpToaster-Dj1VKxFv.js → LpToaster-BhlI7h-h.js} +2 -2
- package/dist/chunks/{LpTopologyCanvas-Bspzwm7x.js → LpTopologyCanvas-DlKbu7E5.js} +4 -4
- package/dist/chunks/{LpTour-CwpVdVN-.js → LpTour-CSLerA1B.js} +1 -1
- package/dist/chunks/{LpTruncate-JSaIW25q.js → LpTruncate-Ct26BSYB.js} +1 -1
- package/dist/chunks/{LpVideoBackdrop-Ct4St4ZL.js → LpVideoBackdrop-57i8RY8g.js} +1 -2
- package/dist/chunks/LpVideoPlayer-DcWd9DDW.js +813 -0
- package/dist/chunks/{LpWindow-RVcP436Z.js → LpWindow-YnF_knSj.js} +2 -2
- package/dist/chunks/{LpWorkspaceSwitcher-D0WOz1Fg.js → LpWorkspaceSwitcher-B-5UU6o4.js} +3 -3
- package/dist/chunks/{MenuTitle-D8Umab23.js → MenuTitle-BnZbFSwq.js} +1 -1
- package/dist/chunks/{OptionContent-DCnX_KRK.js → OptionContent-D5e_eklA.js} +1 -1
- package/dist/chunks/{PickerField-ChjY27bm.js → PickerField-KpHiowNI.js} +1 -1
- package/dist/chunks/{RevealToggle-MaL7PEjr.js → RevealToggle-CE1hAIJB.js} +1 -1
- package/dist/chunks/SteadyText-CwH-kduj.js +25 -0
- package/dist/chunks/{TourCard-oXZSpHKb.js → TourCard-t2csiTDS.js} +1 -1
- package/dist/chunks/VideoThumb-Csf9bUz3.js +67 -0
- package/dist/chunks/VideoVolume-B4_DNmNi.js +68 -0
- package/dist/chunks/icons-CdSlCrle.js +59 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.js +1 -1
- package/dist/components/DropzoneLinkField.vue.js +1 -1
- package/dist/components/FieldLeading.vue.js +1 -1
- package/dist/components/FieldWrapper.vue.js +1 -1
- package/dist/components/IconCloseButton.vue.js +1 -1
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.js +1 -1
- package/dist/components/LpBottomNav.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpChart.vue.js +2 -2
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpCodeDisplay.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +2 -2
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpContextSwitcher.vue.js +1 -1
- package/dist/components/LpCopyButton.vue.js +1 -1
- package/dist/components/LpDataList.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.js +1 -1
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDock.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.d.ts +5 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +2 -2
- package/dist/components/LpEditable.vue.js +1 -1
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.js +1 -1
- package/dist/components/LpHints.vue.js +1 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +1 -1
- package/dist/components/LpInfraNode.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpInspector.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogInspector.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.d.ts +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNotificationFeed.vue.js +1 -1
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPaletteFacts.vue.js +1 -1
- package/dist/components/LpPaletteHeader.vue.js +2 -2
- package/dist/components/LpPaletteTheme.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPipeline.vue.js +1 -1
- package/dist/components/LpQuota.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.js +1 -1
- package/dist/components/LpRangeSlider.vue.js +1 -1
- package/dist/components/LpRepeater.vue.js +1 -1
- package/dist/components/LpSecretField.vue.js +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSidebarRow.vue.js +1 -1
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStatus.vue.js +1 -1
- package/dist/components/LpStepMark.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTabFace.vue.js +1 -1
- package/dist/components/LpTable.vue.js +9 -9
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTabs.vue.js +2 -2
- package/dist/components/LpTagsInput.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeStudio.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpTour.vue.js +1 -1
- package/dist/components/LpTruncate.vue.js +1 -1
- package/dist/components/LpVideoBackdrop.vue.js +1 -1
- package/dist/components/LpVideoPlayer.vue.d.ts +111 -0
- package/dist/components/LpVideoPlayer.vue.js +4 -0
- package/dist/components/LpVideoTrim.vue.d.ts +19 -5
- package/dist/components/LpVideoTrim.vue.js +596 -445
- package/dist/components/LpWindow.vue.js +1 -1
- package/dist/components/LpWorkspaceSwitcher.vue.js +1 -1
- package/dist/components/MenuTitle.vue.js +1 -1
- package/dist/components/OptionContent.vue.js +1 -1
- package/dist/components/PickerField.vue.js +1 -1
- package/dist/components/RevealToggle.vue.js +1 -1
- package/dist/components/SteadyText.vue.d.ts +7 -0
- package/dist/components/SteadyText.vue.js +4 -0
- package/dist/components/TourCard.vue.js +1 -1
- package/dist/components/VideoFlash.vue.d.ts +10 -0
- package/dist/components/VideoFlash.vue.js +33 -0
- package/dist/components/VideoThumb.vue.d.ts +12 -0
- package/dist/components/VideoThumb.vue.js +4 -0
- package/dist/components/VideoVolume.vue.d.ts +15 -0
- package/dist/components/VideoVolume.vue.js +4 -0
- package/dist/components/lightbox.d.ts +13 -0
- package/dist/components/lightbox.js +11 -1
- package/dist/components/menuWhen.js +1 -1
- package/dist/components/videoBackdrop.d.ts +15 -2
- package/dist/components/videoBackdrop.js +8 -2
- package/dist/components/videoMotion.d.ts +28 -0
- package/dist/components/videoMotion.js +26 -0
- package/dist/components/videoTrim.d.ts +2 -9
- package/dist/components/videoTrim.js +0 -6
- package/dist/composables/useVideoMedia.d.ts +74 -0
- package/dist/composables/useVideoMedia.js +291 -0
- package/dist/icons-all.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +173 -168
- package/package.json +1 -1
- package/src/component-names.ts +1 -0
- package/src/components/LpDropdownMenu.vue +4 -0
- package/src/components/LpLightbox.vue +61 -8
- package/src/components/LpMediaGallery.vue +19 -2
- package/src/components/LpVideoBackdrop.vue +1 -7
- package/src/components/LpVideoPlayer.vue +774 -0
- package/src/components/LpVideoTrim.vue +437 -295
- package/src/components/SteadyText.vue +21 -0
- package/src/components/VideoFlash.vue +52 -0
- package/src/components/VideoThumb.vue +66 -0
- package/src/components/VideoVolume.vue +63 -0
- package/src/components/lightbox.ts +23 -0
- package/src/components/videoBackdrop.ts +20 -3
- package/src/components/videoMotion.ts +38 -0
- package/src/components/videoTrim.ts +2 -14
- package/src/composables/useVideoMedia.ts +411 -0
- package/src/index.ts +4 -1
- package/src/kit-icons.ts +1 -1
- package/dist/assets/LpVideoTrim-Ci6IIHW0.css +0 -8
- package/dist/chunks/icons-BOdqDUii.js +0 -59
|
@@ -27,10 +27,12 @@ import { computed, nextTick, onBeforeUnmount, ref, watch } from "vue"
|
|
|
27
27
|
import { useLabels } from "../composables/useLpConfig"
|
|
28
28
|
import { useZoomPan } from "../composables/useZoomPan"
|
|
29
29
|
import { clickLink } from "./exportData"
|
|
30
|
-
import { fileNameOf, type LightboxItem } from "./lightbox"
|
|
30
|
+
import { fileNameOf, isVideoItem, type LightboxItem } from "./lightbox"
|
|
31
31
|
import LpCopyButton from "./LpCopyButton.vue"
|
|
32
32
|
import LpIcon from "./LpIcon.vue"
|
|
33
33
|
import LpLoader from "./LpLoader.vue"
|
|
34
|
+
import LpVideoPlayer from "./LpVideoPlayer.vue"
|
|
35
|
+
import VideoThumb from "./VideoThumb.vue"
|
|
34
36
|
import { useModalLayer } from "./modalDepth"
|
|
35
37
|
import { inTextField } from "../composables/textEntry"
|
|
36
38
|
import { nodeWindow, useOutsideGuard, usePortalTarget, useView, viewDocument } from "../composables/useView"
|
|
@@ -160,6 +162,16 @@ const item = computed<LightboxItem | undefined>(() => props.items[current.value]
|
|
|
160
162
|
const total = computed(() => props.items.length)
|
|
161
163
|
const showStrip = computed(() => props.filmstrip ?? total.value > 1)
|
|
162
164
|
|
|
165
|
+
/*
|
|
166
|
+
* A video item plays in LpVideoPlayer on the stage. The picture's own tools
|
|
167
|
+
* (zoom, pan, rotation) are left out for it, its keys and drags stay its own
|
|
168
|
+
* while it has them, and it stops when it is paged past or the viewer closes:
|
|
169
|
+
* the player is keyed on the item, so leaving unmounts it and its stream.
|
|
170
|
+
*/
|
|
171
|
+
const isVideo = computed(() => !!item.value && isVideoItem(item.value))
|
|
172
|
+
const player = ref<InstanceType<typeof LpVideoPlayer> | null>(null)
|
|
173
|
+
const inPlayer = (target: EventTarget | null) => !!(target as Element | null)?.closest?.("[data-lp-video-frame]")
|
|
174
|
+
|
|
163
175
|
const rotation = ref(0)
|
|
164
176
|
const loading = ref(false)
|
|
165
177
|
const failed = ref(false)
|
|
@@ -213,7 +225,7 @@ let wheelTimer: ReturnType<typeof setTimeout> | undefined
|
|
|
213
225
|
const WHEEL_STEP = 60
|
|
214
226
|
|
|
215
227
|
function onStageWheel(e: WheelEvent) {
|
|
216
|
-
const overImage = (e.target as HTMLElement | null)?.closest("[data-lightbox-image]")
|
|
228
|
+
const overImage = !isVideo.value && (e.target as HTMLElement | null)?.closest("[data-lightbox-image]")
|
|
217
229
|
if (overImage || isZoomed.value) {
|
|
218
230
|
zoom.onWheel(e)
|
|
219
231
|
return
|
|
@@ -249,7 +261,7 @@ watch(
|
|
|
249
261
|
zoom.reset()
|
|
250
262
|
rotation.value = 0
|
|
251
263
|
failed.value = false
|
|
252
|
-
loading.value =
|
|
264
|
+
loading.value = !isVideo.value
|
|
253
265
|
if (props.open) nextTick(scrollThumbIntoView)
|
|
254
266
|
},
|
|
255
267
|
)
|
|
@@ -297,6 +309,14 @@ const OWNS_KEYS =
|
|
|
297
309
|
function onKeydown(e: KeyboardEvent) {
|
|
298
310
|
if (e.defaultPrevented || e.ctrlKey || e.metaKey || e.altKey) return
|
|
299
311
|
if (inTextField(e.target, OWNS_KEYS)) return
|
|
312
|
+
// A video plays on Space or K from anywhere in the viewer; with the player focused it answers that itself.
|
|
313
|
+
if (isVideo.value && (e.key === " " || e.key === "k") && !inPlayer(e.target)) {
|
|
314
|
+
e.preventDefault()
|
|
315
|
+
player.value?.toggle()
|
|
316
|
+
return
|
|
317
|
+
}
|
|
318
|
+
// The picture's tools are not a video's.
|
|
319
|
+
if (isVideo.value && ["+", "=", "-", "0", "r"].includes(e.key)) return
|
|
300
320
|
switch (e.key) {
|
|
301
321
|
case "ArrowRight":
|
|
302
322
|
e.preventDefault()
|
|
@@ -346,12 +366,17 @@ function rotate() {
|
|
|
346
366
|
let swipeStart: { x: number; y: number } | null = null
|
|
347
367
|
|
|
348
368
|
function onPointerDown(e: PointerEvent) {
|
|
369
|
+
if (isVideo.value) {
|
|
370
|
+
// A drag on the player's bar is a seek or a volume change, never a page.
|
|
371
|
+
swipeStart = (e.target as Element).closest?.("[data-lp-player-controls]") ? null : { x: e.clientX, y: e.clientY }
|
|
372
|
+
return
|
|
373
|
+
}
|
|
349
374
|
zoom.onPointerDown(e)
|
|
350
375
|
swipeStart = zoom.zoomed.value ? null : { x: e.clientX, y: e.clientY }
|
|
351
376
|
}
|
|
352
377
|
|
|
353
378
|
function onPointerUp(e: PointerEvent) {
|
|
354
|
-
zoom.onPointerUp(e)
|
|
379
|
+
if (!isVideo.value) zoom.onPointerUp(e)
|
|
355
380
|
if (!swipeStart) return
|
|
356
381
|
const dx = e.clientX - swipeStart.x
|
|
357
382
|
const dy = e.clientY - swipeStart.y
|
|
@@ -363,6 +388,8 @@ function onPointerUp(e: PointerEvent) {
|
|
|
363
388
|
}
|
|
364
389
|
|
|
365
390
|
function onDoubleClick(e: MouseEvent) {
|
|
391
|
+
// On a video a double click is the player's: full screen.
|
|
392
|
+
if (isVideo.value) return
|
|
366
393
|
zoom.toggleZoom({ x: e.clientX, y: e.clientY })
|
|
367
394
|
}
|
|
368
395
|
|
|
@@ -428,6 +455,11 @@ let copyTarget: LightboxItem | undefined
|
|
|
428
455
|
async function imageToCopy(): Promise<Blob> {
|
|
429
456
|
const target = (copyTarget = item.value)
|
|
430
457
|
if (!target) throw new Error("No image")
|
|
458
|
+
if (isVideo.value) {
|
|
459
|
+
const frame = await player.value?.captureFrame()
|
|
460
|
+
if (!frame) throw new Error("No frame")
|
|
461
|
+
return frame
|
|
462
|
+
}
|
|
431
463
|
const win = viewerWindow()
|
|
432
464
|
const response = await win.fetch(resolved(target.src).href)
|
|
433
465
|
const blob = await response.blob()
|
|
@@ -525,14 +557,14 @@ const guardOutside = useOutsideGuard()
|
|
|
525
557
|
<div class="ml-auto flex items-center gap-1">
|
|
526
558
|
<slot name="actions" :item="item!" :index="current" />
|
|
527
559
|
|
|
528
|
-
<button :class="BTN" type="button" :title="text.zoomOut" @click="zoom.zoomBy(1 / 1.3)">
|
|
560
|
+
<button v-if="!isVideo" :class="BTN" type="button" :title="text.zoomOut" @click="zoom.zoomBy(1 / 1.3)">
|
|
529
561
|
<LpIcon name="lucide:zoom-out" :size="18" />
|
|
530
562
|
</button>
|
|
531
|
-
<button :class="BTN" type="button" :title="text.zoomIn" @click="zoom.zoomBy(1.3)">
|
|
563
|
+
<button v-if="!isVideo" :class="BTN" type="button" :title="text.zoomIn" @click="zoom.zoomBy(1.3)">
|
|
532
564
|
<LpIcon name="lucide:zoom-in" :size="18" />
|
|
533
565
|
</button>
|
|
534
566
|
<button
|
|
535
|
-
v-if="rotatable"
|
|
567
|
+
v-if="rotatable && !isVideo"
|
|
536
568
|
:class="BTN"
|
|
537
569
|
type="button"
|
|
538
570
|
:title="text.rotate"
|
|
@@ -608,6 +640,19 @@ const guardOutside = useOutsideGuard()
|
|
|
608
640
|
{{ text.reveal }}
|
|
609
641
|
</button>
|
|
610
642
|
</div>
|
|
643
|
+
<!-- A video plays in the kit's player, fitted to the stage at its own
|
|
644
|
+
proportions. Keyed like the image, so paging away unmounts it:
|
|
645
|
+
it stops, and stops fetching. It starts on its own, the click or
|
|
646
|
+
key that opened it being the go-ahead for sound. -->
|
|
647
|
+
<div
|
|
648
|
+
v-else-if="item && isVideo"
|
|
649
|
+
:key="`${current}:${item.src}`"
|
|
650
|
+
data-lightbox-image
|
|
651
|
+
class="size-full px-14 py-2 animate-[lightbox-frame-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none max-sm:px-2"
|
|
652
|
+
:style="{ '--frame-from': `${direction * 24}px` }"
|
|
653
|
+
>
|
|
654
|
+
<LpVideoPlayer ref="player" fit autoplay :src="item.src" :poster="item.poster" :title="item.title ?? position(current)" />
|
|
655
|
+
</div>
|
|
611
656
|
<!-- Keyed on position and src so paging remounts the img and replays
|
|
612
657
|
the slide, even between two items with the same source (whose
|
|
613
658
|
load event would otherwise never fire, leaving the spinner up). -->
|
|
@@ -671,12 +716,20 @@ const guardOutside = useOutsideGuard()
|
|
|
671
716
|
:data-index="i"
|
|
672
717
|
type="button"
|
|
673
718
|
:style="{ '--thumb-delay': `${Math.min(i * 30, 240)}ms` }"
|
|
674
|
-
class="size-14 shrink-0 overflow-hidden rounded-control outline-none ring-2 transition-[opacity,box-shadow,scale] duration-[var(--duration-fast)] hover:scale-105 focus-visible:ring-ring animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_both] [animation-delay:var(--thumb-delay)] motion-reduce:animate-none"
|
|
719
|
+
class="relative size-14 shrink-0 overflow-hidden rounded-control outline-none ring-2 transition-[opacity,box-shadow,scale] duration-[var(--duration-fast)] hover:scale-105 focus-visible:ring-ring animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_both] [animation-delay:var(--thumb-delay)] motion-reduce:animate-none"
|
|
675
720
|
:class="i === current ? 'opacity-100 ring-brand' : 'opacity-45 ring-transparent hover:opacity-80'"
|
|
676
721
|
:aria-label="entry.title ?? position(i)"
|
|
677
722
|
@click="go(i)"
|
|
678
723
|
>
|
|
724
|
+
<VideoThumb
|
|
725
|
+
v-if="isVideoItem(entry)"
|
|
726
|
+
:item="entry"
|
|
727
|
+
compact
|
|
728
|
+
:alt="entry.title ?? ''"
|
|
729
|
+
:media-class="covered(i) ? 'scale-110 blur-md' : undefined"
|
|
730
|
+
/>
|
|
679
731
|
<img
|
|
732
|
+
v-else
|
|
680
733
|
:src="entry.thumb ?? entry.src"
|
|
681
734
|
:alt="entry.title ?? ''"
|
|
682
735
|
class="size-full object-cover"
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
* usually mixed — one marked screenshot among plain ones.
|
|
26
26
|
*/
|
|
27
27
|
import { computed, ref, watch } from "vue"
|
|
28
|
-
import type
|
|
28
|
+
import { isVideoItem, type LightboxItem } from "./lightbox"
|
|
29
29
|
import { useMergedAttrs } from "../composables/useMergedClass"
|
|
30
30
|
import { useLabels } from "../composables/useLpConfig"
|
|
31
31
|
import LpContextMenu, { type ContextMenuItemDef } from "./LpContextMenu.vue"
|
|
32
32
|
import LpIcon from "./LpIcon.vue"
|
|
33
33
|
import LpLightbox from "./LpLightbox.vue"
|
|
34
|
+
import VideoThumb from "./VideoThumb.vue"
|
|
34
35
|
|
|
35
36
|
const DEFAULT_LABELS = {
|
|
36
37
|
/** Accessible name of the grid. */
|
|
@@ -306,7 +307,7 @@ defineExpose({
|
|
|
306
307
|
:key="item.src + i"
|
|
307
308
|
:items="itemMenu?.(item, i) ?? []"
|
|
308
309
|
:title="menuTitle(item, i)"
|
|
309
|
-
:title-image="isHidden(item) ? undefined : item.thumb || item.src"
|
|
310
|
+
:title-image="isHidden(item) ? undefined : isVideoItem(item) ? item.poster ?? item.thumb : item.thumb || item.src"
|
|
310
311
|
:subtitle="isHidden(item) ? undefined : item.description"
|
|
311
312
|
>
|
|
312
313
|
<button
|
|
@@ -343,7 +344,23 @@ defineExpose({
|
|
|
343
344
|
image's own edge, so its outermost pixels fade toward transparent
|
|
344
345
|
and the tile gets a soft translucent rim. Growing the image a
|
|
345
346
|
little pushes that feathered edge outside the clip. -->
|
|
347
|
+
<!-- A video shows its poster or first frame under a play badge, the cover and the overflow dimming riding on it as on a picture. -->
|
|
348
|
+
<VideoThumb
|
|
349
|
+
v-if="isVideoItem(item)"
|
|
350
|
+
:item="item"
|
|
351
|
+
:alt="isHidden(item) ? '' : item.title || ''"
|
|
352
|
+
:media-class="[
|
|
353
|
+
'transition-transform duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] group-hover:scale-[1.03] motion-reduce:transition-none motion-reduce:group-hover:scale-100',
|
|
354
|
+
isHidden(item)
|
|
355
|
+
? 'scale-[1.12] blur-[18px] brightness-[0.6] saturate-[1.1] group-hover:scale-[1.12]'
|
|
356
|
+
: '',
|
|
357
|
+
!isHidden(item) && hiddenCount && i === visible.length - 1
|
|
358
|
+
? 'scale-[1.06] blur-[2px] brightness-[0.45] group-hover:scale-[1.06]'
|
|
359
|
+
: '',
|
|
360
|
+
]"
|
|
361
|
+
/>
|
|
346
362
|
<img
|
|
363
|
+
v-else
|
|
347
364
|
:src="item.thumb || item.src"
|
|
348
365
|
:alt="isHidden(item) ? '' : item.title || ''"
|
|
349
366
|
loading="lazy"
|
|
@@ -39,7 +39,7 @@ import { usePrefersReducedMotion } from "../composables/useReducedMotion"
|
|
|
39
39
|
import { useView } from "../composables/useView"
|
|
40
40
|
import { useInView } from "../composables/useInView"
|
|
41
41
|
import { useMergedAttrs } from "../composables/useMergedClass"
|
|
42
|
-
import { isNativeLoop, planLoop, seamProgress, seamReached } from "./videoBackdrop"
|
|
42
|
+
import { isNativeLoop, planLoop, seamProgress, seamReached, SLOWEST_RATE } from "./videoBackdrop"
|
|
43
43
|
|
|
44
44
|
const props = withDefaults(
|
|
45
45
|
defineProps<{
|
|
@@ -97,12 +97,6 @@ const running = ref(false)
|
|
|
97
97
|
/** Share of `rate` played at, 0 to 1: below 1 while easing into or out of a pause. */
|
|
98
98
|
const throttle = ref(1)
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* The slowest rate a pause eases down to before the element is paused.
|
|
102
|
-
* Chromium refuses a rate below a sixteenth; past that point the picture is
|
|
103
|
-
* all but still anyway.
|
|
104
|
-
*/
|
|
105
|
-
const SLOWEST_RATE = 1 / 16
|
|
106
100
|
|
|
107
101
|
// Read now as well: the live query reports only after mount, and a first paint
|
|
108
102
|
// must not start a video the viewer asked not to see.
|