sm-click-library-ui 0.0.622-dev.87 → 0.0.622-dev.90

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/tailwind.css CHANGED
@@ -917,6 +917,9 @@ video {
917
917
  .me-auto {
918
918
  margin-inline-end: auto;
919
919
  }
920
+ .ml-0\.5 {
921
+ margin-left: 0.125rem;
922
+ }
920
923
  .ml-1 {
921
924
  margin-left: 0.25rem;
922
925
  }
@@ -1329,6 +1332,12 @@ video {
1329
1332
  .w-10 {
1330
1333
  width: 2.5rem;
1331
1334
  }
1335
+ .w-10\/12 {
1336
+ width: 83.333333%;
1337
+ }
1338
+ .w-11\/12 {
1339
+ width: 91.666667%;
1340
+ }
1332
1341
  .w-12 {
1333
1342
  width: 3rem;
1334
1343
  }
@@ -1368,6 +1377,9 @@ video {
1368
1377
  .w-4 {
1369
1378
  width: 1rem;
1370
1379
  }
1380
+ .w-4\/5 {
1381
+ width: 80%;
1382
+ }
1371
1383
  .w-40 {
1372
1384
  width: 10rem;
1373
1385
  }
@@ -1741,6 +1753,20 @@ video {
1741
1753
  .gap-\[2px\] {
1742
1754
  gap: 2px;
1743
1755
  }
1756
+ .gap-x-3 {
1757
+ -moz-column-gap: 0.75rem;
1758
+ column-gap: 0.75rem;
1759
+ }
1760
+ .gap-x-4 {
1761
+ -moz-column-gap: 1rem;
1762
+ column-gap: 1rem;
1763
+ }
1764
+ .gap-y-1 {
1765
+ row-gap: 0.25rem;
1766
+ }
1767
+ .gap-y-1\.5 {
1768
+ row-gap: 0.375rem;
1769
+ }
1744
1770
  .space-x-1 > :not([hidden]) ~ :not([hidden]) {
1745
1771
  --tw-space-x-reverse: 0;
1746
1772
  margin-right: calc(0.25rem * var(--tw-space-x-reverse));
@@ -1791,6 +1817,9 @@ video {
1791
1817
  --tw-divide-opacity: 1;
1792
1818
  border-color: rgb(var(--bg-base-200) / var(--tw-divide-opacity, 1));
1793
1819
  }
1820
+ .divide-base-content\/10 > :not([hidden]) ~ :not([hidden]) {
1821
+ border-color: rgb(var(--text-base) / 0.1);
1822
+ }
1794
1823
  .self-end {
1795
1824
  align-self: flex-end;
1796
1825
  }
@@ -2083,6 +2112,9 @@ video {
2083
2112
  .bg-base-200\/40 {
2084
2113
  background-color: rgb(var(--bg-base-200) / 0.4);
2085
2114
  }
2115
+ .bg-base-200\/60 {
2116
+ background-color: rgb(var(--bg-base-200) / 0.6);
2117
+ }
2086
2118
  .bg-base-200\/70 {
2087
2119
  background-color: rgb(var(--bg-base-200) / 0.7);
2088
2120
  }
@@ -2105,6 +2137,9 @@ video {
2105
2137
  .bg-base-300\/80 {
2106
2138
  background-color: rgb(var(--bg-base-300) / 0.8);
2107
2139
  }
2140
+ .bg-base-content\/10 {
2141
+ background-color: rgb(var(--text-base) / 0.1);
2142
+ }
2108
2143
  .bg-black {
2109
2144
  --tw-bg-opacity: 1;
2110
2145
  background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
@@ -2414,6 +2449,9 @@ video {
2414
2449
  .p-3 {
2415
2450
  padding: 0.75rem;
2416
2451
  }
2452
+ .p-3\.5 {
2453
+ padding: 0.875rem;
2454
+ }
2417
2455
  .p-4 {
2418
2456
  padding: 1rem;
2419
2457
  }
@@ -2587,6 +2625,9 @@ video {
2587
2625
  .pt-2 {
2588
2626
  padding-top: 0.5rem;
2589
2627
  }
2628
+ .pt-3 {
2629
+ padding-top: 0.75rem;
2630
+ }
2590
2631
  .text-left {
2591
2632
  text-align: left;
2592
2633
  }
@@ -2802,6 +2843,9 @@ video {
2802
2843
  .text-base-content\/85 {
2803
2844
  color: rgb(var(--text-base) / 0.85);
2804
2845
  }
2846
+ .text-base-content\/90 {
2847
+ color: rgb(var(--text-base) / 0.9);
2848
+ }
2805
2849
  .text-black {
2806
2850
  --tw-text-opacity: 1;
2807
2851
  color: rgb(0 0 0 / var(--tw-text-opacity, 1));
@@ -4195,6 +4239,11 @@ video {
4195
4239
  .sm\:p-0 {
4196
4240
  padding: 0px;
4197
4241
  }
4242
+
4243
+ .sm\:text-sm {
4244
+ font-size: 0.875rem;
4245
+ line-height: 1.25rem;
4246
+ }
4198
4247
  }
4199
4248
  @media (min-width: 864px) {
4200
4249
 
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watchEffect, computed, watch, createElementBlock, openBlock, normalizeStyle } from "vue";
2
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./index-W-o-nVSG.js";
2
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./index-DpqoSQ1j.js";
3
3
  var lottie = { exports: {} };
4
4
  (function(module, exports) {
5
5
  typeof navigator < "u" && function(t, e) {
@@ -1,4 +1,4 @@
1
- import { r as le, C as ge, g as me, W as we } from "./index-W-o-nVSG.js";
1
+ import { r as le, C as ge, g as me, W as we } from "./index-DpqoSQ1j.js";
2
2
  const F = {
3
3
  RECORDING: "RECORDING",
4
4
  PAUSED: "PAUSED",
@@ -58,7 +58,7 @@ var te;
58
58
  n.UTF8 = "utf8", n.ASCII = "ascii", n.UTF16 = "utf16";
59
59
  })(te || (te = {}));
60
60
  const k = le("Filesystem", {
61
- web: () => import("./web-eB_2ey6s.js").then((n) => new n.FilesystemWeb())
61
+ web: () => import("./web-CyQoGjvD.js").then((n) => new n.FilesystemWeb())
62
62
  });
63
63
  Ee();
64
64
  const _e = le("BlobWriter");
@@ -1,5 +1,5 @@
1
- import { W as P, b as x } from "./index-W-o-nVSG.js";
2
- import { E } from "./web-BnbAM2S_.js";
1
+ import { W as P, b as x } from "./index-DpqoSQ1j.js";
2
+ import { E } from "./web-CTiz49Iv.js";
3
3
  function m(w) {
4
4
  const e = w.split("/").filter((t) => t !== "."), r = [];
5
5
  return e.forEach((t) => {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "dist",
6
6
  "src/test-utils"
7
7
  ],
8
- "version": "0.0.622-dev.87",
8
+ "version": "0.0.622-dev.90",
9
9
  "main": "dist/sm-click-library-ui.es.js",
10
10
  "module": "dist/sm-click-library-ui.umd.js",
11
11
  "style": "dist/style.css",
@@ -9,12 +9,15 @@ const instances = [];
9
9
  const seeks = [];
10
10
  const peakState = vi.hoisted(() => ({ pending: null }));
11
11
  vi.mock("~/utils/audioPeaks", () => ({
12
- resolveAudioPeaks: () => peakState.pending || Promise.resolve(null)
12
+ resolveAudioPeaks: () => peakState.pending || Promise.resolve(null),
13
+ prioritizeAudioPeaks: () => {}
13
14
  }));
14
15
  // jsdom não calcula layout: o portão de viewport nunca intersectaria, e a onda é o objeto do teste.
16
+ const gateState = vi.hoisted(() => ({ immediate: true, pending: [] }));
15
17
  vi.mock("~/utils/viewportGate", () => ({
16
18
  onceInViewport: (el, callback) => {
17
- callback();
19
+ if (gateState.immediate) callback();
20
+ else gateState.pending.push(callback);
18
21
  return () => {};
19
22
  }
20
23
  }));
@@ -68,6 +71,8 @@ import { useAudioPlaybackStore } from "~/stores/audioPlaybackStore";
68
71
 
69
72
  // jsdom não implementa play/pause de mídia.
70
73
  beforeEach(() => {
74
+ gateState.immediate = true;
75
+ gateState.pending = [];
71
76
  peakState.pending = null;
72
77
  instances.length = 0;
73
78
  seeks.length = 0;
@@ -247,3 +252,52 @@ describe("seek por gesto na onda", () => {
247
252
  wrapper.unmount();
248
253
  });
249
254
  });
255
+
256
+ describe("custo da bolha de áudio parada", () => {
257
+ it("não anima o equalizador enquanto a bolha não chega perto da viewport", async () => {
258
+ gateState.immediate = false;
259
+ const wrapper = await mountAudio();
260
+
261
+ expect(instances).toHaveLength(0);
262
+ expect(wrapper.find(".loading-equalizer").classes()).toContain("is-idle");
263
+
264
+ gateState.pending.forEach((callback) => callback());
265
+ await new Promise((resolve) => setTimeout(resolve));
266
+ await flushPromises();
267
+
268
+ expect(instances).toHaveLength(1);
269
+ wrapper.unmount();
270
+ });
271
+
272
+ it("emite o tempo só quando vira o segundo", async () => {
273
+ const wrapper = await mountAudio();
274
+ const ws = instances[0];
275
+
276
+ ws.media.currentTime = 0.3;
277
+ ws.emit("audioprocess");
278
+ expect(wrapper.emitted("currentTime")).toBeUndefined();
279
+
280
+ ws.media.currentTime = 0.9;
281
+ ws.emit("audioprocess");
282
+ expect(wrapper.emitted("currentTime")).toBeUndefined();
283
+
284
+ ws.media.currentTime = 1.05;
285
+ ws.emit("audioprocess");
286
+ expect(wrapper.emitted("currentTime")).toHaveLength(1);
287
+
288
+ wrapper.unmount();
289
+ });
290
+ });
291
+
292
+ describe("duração da onda", () => {
293
+ it("posiciona o cursor pela duração decodificada, não pela do elemento", async () => {
294
+ // O dublê responde 12 em `getDuration`, como o `media.duration` errado que alguns containers dão no WebView do Android.
295
+ peakState.pending = Promise.resolve({ peaks: [new Float32Array(8)], duration: 30 });
296
+ const wrapper = await mountAudio();
297
+ await flushPromises();
298
+
299
+ expect(instances[0].getDuration()).toBe(30);
300
+ expect(wrapper.emitted("duration").at(-1)).toEqual([30]);
301
+ wrapper.unmount();
302
+ });
303
+ });