@leavepulse/ui 0.85.0 → 0.85.2

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.
@@ -9,7 +9,7 @@ import { isVideoItem, fileNameOf } from "../components/lightbox.js";
9
9
  import { _ as _sfc_main$2 } from "./LpCopyButton-BrbvIVMG.js";
10
10
  import { _ as _sfc_main$1 } from "./LpIcon-DCGhNsCU.js";
11
11
  import { _ as _sfc_main$4 } from "./LpLoader-Bf1yZwaU.js";
12
- import { _ as _sfc_main$3 } from "./LpVideoPlayer-koYKHKkC.js";
12
+ import { _ as _sfc_main$3 } from "./LpVideoPlayer--87I5Kqu.js";
13
13
  import { _ as _sfc_main$5 } from "./VideoThumb-DL_QkAJY.js";
14
14
  import { useModalLayer } from "../components/modalDepth.js";
15
15
  import { inTextField } from "../composables/textEntry.js";
@@ -4,7 +4,7 @@ import { useMergedAttrs } from "../composables/useMergedClass.js";
4
4
  import { useLabels } from "../composables/useLpConfig.js";
5
5
  import { _ as _sfc_main$1 } from "./LpContextMenu-CUFZIQX2.js";
6
6
  import { _ as _sfc_main$3 } from "./LpIcon-DCGhNsCU.js";
7
- import { _ as _sfc_main$4 } from "./LpLightbox-D7iJqdmH.js";
7
+ import { _ as _sfc_main$4 } from "./LpLightbox-Bg1LW_ED.js";
8
8
  import { _ as _sfc_main$2 } from "./VideoThumb-DL_QkAJY.js";
9
9
  const _hoisted_1 = { key: 0 };
10
10
  const _hoisted_2 = ["aria-label"];
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, useModel, computed, ref, shallowRef, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, createVNode, createElementVNode, toDisplayString, unref, withCtx, createBlock, createTextVNode, Fragment, createCommentVNode, mergeModels } from "vue";
2
+ import { useLocale } from "../composables/useLocale.js";
2
3
  import { useLabels } from "../composables/useLpConfig.js";
3
4
  import { canTranscodeVideo, estimateTranscodedBytes, clipLength, probeVideo, transcodeVideo } from "../composables/videoTranscode.js";
4
5
  import { formatBytes } from "../components/format.js";
@@ -77,12 +78,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
78
  },
78
79
  () => props.labels
79
80
  );
81
+ const locale = useLocale();
82
+ const size = (bytes) => formatBytes(bytes, locale.value);
80
83
  const choices = computed(() => props.presets ?? [
81
84
  { key: "original", label: text.value.original },
82
85
  { key: "p1080", label: text.value.p1080, maxHeight: 1080 },
83
86
  { key: "p720", label: text.value.p720, maxHeight: 720 },
84
87
  { key: "p480", label: text.value.p480, maxHeight: 480 },
85
- { key: "fit", label: text.value.fit.replace("{size}", formatBytes(FIT_BYTES)), maxHeight: 720, targetBytes: FIT_BYTES }
88
+ { key: "fit", label: text.value.fit.replace("{size}", size(FIT_BYTES)), maxHeight: 720, targetBytes: FIT_BYTES }
86
89
  ]);
87
90
  const url = ref("");
88
91
  const info = shallowRef(null);
@@ -130,7 +133,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
133
  const estimateLine = computed(() => {
131
134
  if (estimate.value === null) return text.value.probing;
132
135
  if (!worthIt.value) return text.value.bigger;
133
- return text.value.estimate.replace("{size}", formatBytes(estimate.value)).replace("{original}", formatBytes(props.file.size));
136
+ return text.value.estimate.replace("{size}", size(estimate.value)).replace("{original}", size(props.file.size));
134
137
  });
135
138
  const busy = computed(() => progress.value !== null);
136
139
  watch(busy, (value) => emit("busy", value));
@@ -460,7 +460,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
460
460
  }, {
461
461
  default: withCtx(() => [
462
462
  createElementVNode("div", {
463
- class: normalizeClass(["@container", __props.fit && !fullscreen.value ? FRAME : ""]),
463
+ class: normalizeClass(["@container", fullscreen.value ? "w-full" : __props.fit ? FRAME : ""]),
464
464
  style: normalizeStyle(frameStyle.value),
465
465
  "data-lp-video-frame": ""
466
466
  }, [
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpLightbox-D7iJqdmH.js";
1
+ import { _ as _sfc_main } from "../chunks/LpLightbox-Bg1LW_ED.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpMediaGallery-D6DyJDvL.js";
1
+ import { _ as _sfc_main } from "../chunks/LpMediaGallery-pX-znMeP.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpVideoCompress-DD2nShyT.js";
1
+ import { _ as _sfc_main } from "../chunks/LpVideoCompress-BfulQ8Rs.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpVideoPlayer-koYKHKkC.js";
1
+ import { _ as _sfc_main } from "../chunks/LpVideoPlayer--87I5Kqu.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
package/dist/index.js CHANGED
@@ -56,14 +56,14 @@ import { i, b, a, c } from "./chunks/icons-V0k93Puc.js";
56
56
  import { default as default10 } from "./components/LpImageEditor.vue.js";
57
57
  import { _ as _33 } from "./chunks/LpInfraNode-BsExhdPE.js";
58
58
  import { _ as _34 } from "./chunks/LpInput-CKMblRtp.js";
59
- import { _ as _35 } from "./chunks/LpLightbox-D7iJqdmH.js";
59
+ import { _ as _35 } from "./chunks/LpLightbox-Bg1LW_ED.js";
60
60
  import { fileNameOf, isVideoItem } from "./components/lightbox.js";
61
61
  import { _ as _36 } from "./chunks/LpLink-Krkjhe_y.js";
62
62
  import { _ as _37 } from "./chunks/LpLogViewer-Bki-IdNC.js";
63
63
  import { _ as _38 } from "./chunks/LpLogInspector-Yj310k4n.js";
64
64
  import { compilePattern, findIds, messageShape, structuredPayload, timeMs } from "./components/logTools.js";
65
65
  import { countLevels, matchPositions, matchesTerm, ringWindow, stepMatch } from "./components/logSearch.js";
66
- import { _ as _39 } from "./chunks/LpMediaGallery-D6DyJDvL.js";
66
+ import { _ as _39 } from "./chunks/LpMediaGallery-pX-znMeP.js";
67
67
  import { _ as _40 } from "./chunks/LpModal-B5y9_LgA.js";
68
68
  import { _ as _41 } from "./chunks/LpModalNav-BLvDVl2-.js";
69
69
  import { _ as _42 } from "./chunks/LpNotificationBell-Bf0u3t5q.js";
@@ -101,9 +101,9 @@ import { _ as _70 } from "./chunks/LpRangeSlider-BaAM7XIs.js";
101
101
  import { _ as _71 } from "./chunks/LpVideoBackdrop-57i8RY8g.js";
102
102
  import { formatClipTime, isNativeLoop, planLoop, seamProgress, seamReached } from "./components/videoBackdrop.js";
103
103
  import { default as default12 } from "./components/LpVideoTrim.vue.js";
104
- import { _ as _72 } from "./chunks/LpVideoCompress-DD2nShyT.js";
104
+ import { _ as _72 } from "./chunks/LpVideoCompress-BfulQ8Rs.js";
105
105
  import { bitrateForHeight, canTranscodeVideo, estimateTranscodedBytes, probeVideo, transcodeVideo, transcodedName } from "./composables/videoTranscode.js";
106
- import { _ as _73 } from "./chunks/LpVideoPlayer-koYKHKkC.js";
106
+ import { _ as _73 } from "./chunks/LpVideoPlayer--87I5Kqu.js";
107
107
  import { useVideoMedia } from "./composables/useVideoMedia.js";
108
108
  import { dragEnd, normalizeRange as normalizeRange2, parseClipTime, setEnd } from "./components/videoTrim.js";
109
109
  import { _ as _74 } from "./chunks/LpSparkline-CExIRDb3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leavepulse/ui",
3
- "version": "0.85.0",
3
+ "version": "0.85.2",
4
4
  "type": "module",
5
5
  "description": "LeavePulse token-driven Vue component kit.",
6
6
  "repository": {
@@ -15,6 +15,7 @@
15
15
  */
16
16
  import { computed, onBeforeUnmount, onMounted, ref, shallowRef, watch } from "vue"
17
17
 
18
+ import { useLocale } from "../composables/useLocale"
18
19
  import { useLabels } from "../composables/useLpConfig"
19
20
  import {
20
21
  canTranscodeVideo,
@@ -108,13 +109,15 @@ const text = useLabels<VideoCompressLabels>(
108
109
  )
109
110
 
110
111
  const FIT_BYTES = 10 * 1024 * 1024
112
+ const locale = useLocale()
113
+ const size = (bytes: number) => formatBytes(bytes, locale.value)
111
114
 
112
115
  const choices = computed<VideoCompressPreset[]>(() => props.presets ?? [
113
116
  { key: "original", label: text.value.original },
114
117
  { key: "p1080", label: text.value.p1080, maxHeight: 1080 },
115
118
  { key: "p720", label: text.value.p720, maxHeight: 720 },
116
119
  { key: "p480", label: text.value.p480, maxHeight: 480 },
117
- { key: "fit", label: text.value.fit.replace("{size}", formatBytes(FIT_BYTES)), maxHeight: 720, targetBytes: FIT_BYTES },
120
+ { key: "fit", label: text.value.fit.replace("{size}", size(FIT_BYTES)), maxHeight: 720, targetBytes: FIT_BYTES },
118
121
  ])
119
122
 
120
123
  const url = ref("")
@@ -167,7 +170,7 @@ const worthIt = computed(() => estimate.value !== null && (estimate.value < prop
167
170
  const estimateLine = computed(() => {
168
171
  if (estimate.value === null) return text.value.probing
169
172
  if (!worthIt.value) return text.value.bigger
170
- return text.value.estimate.replace("{size}", formatBytes(estimate.value)).replace("{original}", formatBytes(props.file.size))
173
+ return text.value.estimate.replace("{size}", size(estimate.value)).replace("{original}", size(props.file.size))
171
174
  })
172
175
 
173
176
  const busy = computed(() => progress.value !== null)
@@ -610,7 +610,7 @@ const frameStyle = computed(() => {
610
610
  <!-- The menu's trigger is a wrapper of its own: reka's as-child puts its ref on the element it wraps. -->
611
611
  <LpContextMenu :items="menu" :title="menuTitle" always>
612
612
  <!-- A size container, so the bar gives up what does not fit a narrow player (see the controls below). -->
613
- <div class="@container" :class="fit && !fullscreen ? FRAME : ''" :style="frameStyle" data-lp-video-frame>
613
+ <div class="@container" :class="fullscreen ? 'w-full' : fit ? FRAME : ''" :style="frameStyle" data-lp-video-frame>
614
614
  <div class="relative w-full" :class="fullscreen ? 'h-dvh' : ''" :style="fullscreen ? undefined : { aspectRatio: aspect }">
615
615
  <video
616
616
  ref="videoEl"