sm-click-library-ui 0.0.615 → 0.0.616-dev.78

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
@@ -1209,9 +1209,6 @@ video {
1209
1209
  .h-\[200px\] {
1210
1210
  height: 200px;
1211
1211
  }
1212
- .h-\[350px\] {
1213
- height: 350px;
1214
- }
1215
1212
  .h-\[50vh\] {
1216
1213
  height: 50vh;
1217
1214
  }
@@ -1248,6 +1245,9 @@ video {
1248
1245
  .max-h-\[224px\] {
1249
1246
  max-height: 224px;
1250
1247
  }
1248
+ .max-h-\[240px\] {
1249
+ max-height: 240px;
1250
+ }
1251
1251
  .max-h-\[250px\] {
1252
1252
  max-height: 250px;
1253
1253
  }
@@ -2105,6 +2105,9 @@ video {
2105
2105
  --tw-bg-opacity: 1;
2106
2106
  background-color: rgb(var(--bg-base-300) / var(--tw-bg-opacity, 1));
2107
2107
  }
2108
+ .bg-base-300\/30 {
2109
+ background-color: rgb(var(--bg-base-300) / 0.3);
2110
+ }
2108
2111
  .bg-base-300\/70 {
2109
2112
  background-color: rgb(var(--bg-base-300) / 0.7);
2110
2113
  }
@@ -2173,10 +2176,6 @@ video {
2173
2176
  .bg-gray-800\/80 {
2174
2177
  background-color: rgb(31 41 55 / 0.8);
2175
2178
  }
2176
- .bg-gray-900 {
2177
- --tw-bg-opacity: 1;
2178
- background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
2179
- }
2180
2179
  .bg-gray-900\/80 {
2181
2180
  background-color: rgb(17 24 39 / 0.8);
2182
2181
  }
@@ -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-CosEUIqX.js";
2
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./index-xJ8KtM_J.js";
3
3
  var lottie = { exports: {} };
4
4
  (function(module, exports) {
5
5
  typeof navigator < "u" && function(t, e) {
@@ -1,5 +1,5 @@
1
- import { W as P, b as x } from "./index-CosEUIqX.js";
2
- import { E } from "./web-DE0KXegQ.js";
1
+ import { W as P, b as x } from "./index-xJ8KtM_J.js";
2
+ import { E } from "./web-DDm7zRan.js";
3
3
  function m(w) {
4
4
  const e = w.split("/").filter((t) => t !== "."), r = [];
5
5
  return e.forEach((t) => {
@@ -1,4 +1,4 @@
1
- import { r as le, C as ge, g as me, W as we } from "./index-CosEUIqX.js";
1
+ import { r as le, C as ge, g as me, W as we } from "./index-xJ8KtM_J.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-BpB8ON_s.js").then((n) => new n.FilesystemWeb())
61
+ web: () => import("./web-B4R0fcQj.js").then((n) => new n.FilesystemWeb())
62
62
  });
63
63
  Ee();
64
64
  const _e = le("BlobWriter");
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "dist",
6
6
  "src/test-utils"
7
7
  ],
8
- "version": "0.0.615",
8
+ "version": "0.0.616-dev.78",
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",
@@ -70,6 +70,7 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@chromatic-com/storybook": "1.6.1",
73
+ "@playwright/test": "1.63.0",
73
74
  "@storybook/addon-essentials": "^8.2.3",
74
75
  "@storybook/addon-interactions": "^8.2.3",
75
76
  "@storybook/addon-links": "^8.2.3",
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, vi, beforeEach } from "vitest";
2
- import { mount } from "@vue/test-utils";
2
+ import { mount, flushPromises } from "@vue/test-utils";
3
3
  import { createPinia, setActivePinia } from "pinia";
4
4
 
5
5
  // Wavesurfer real precisa de fetch/decode. O dublê reproduz o que importa: toca o
@@ -7,6 +7,17 @@ import { createPinia, setActivePinia } from "pinia";
7
7
  // (como as versões < 7.4) — era isso que cortava o áudio na troca de conversa.
8
8
  const instances = [];
9
9
  const seeks = [];
10
+ const peakState = vi.hoisted(() => ({ pending: null }));
11
+ vi.mock("~/utils/audioPeaks", () => ({
12
+ resolveAudioPeaks: () => peakState.pending || Promise.resolve(null)
13
+ }));
14
+ // jsdom não calcula layout: o portão de viewport nunca intersectaria, e a onda é o objeto do teste.
15
+ vi.mock("~/utils/viewportGate", () => ({
16
+ onceInViewport: (el, callback) => {
17
+ callback();
18
+ return () => {};
19
+ }
20
+ }));
10
21
  vi.mock("wavesurfer.js", () => ({
11
22
  default: {
12
23
  create(options) {
@@ -57,6 +68,7 @@ import { useAudioPlaybackStore } from "~/stores/audioPlaybackStore";
57
68
 
58
69
  // jsdom não implementa play/pause de mídia.
59
70
  beforeEach(() => {
71
+ peakState.pending = null;
60
72
  instances.length = 0;
61
73
  seeks.length = 0;
62
74
  Object.defineProperty(HTMLMediaElement.prototype, "paused", {
@@ -92,6 +104,19 @@ async function mountAudio(trackId = "m1") {
92
104
  }
93
105
 
94
106
  describe("áudio da mensagem fora da árvore da bolha", () => {
107
+ it("não instala observers depois de desmontar durante a carga", async () => {
108
+ let finish;
109
+ peakState.pending = new Promise((resolve) => {
110
+ finish = resolve;
111
+ });
112
+ const wrapper = await mountAudio();
113
+ wrapper.unmount();
114
+ const observe = vi.spyOn(MutationObserver.prototype, "observe");
115
+ finish(null);
116
+ await flushPromises();
117
+ expect(observe).not.toHaveBeenCalled();
118
+ observe.mockRestore();
119
+ });
95
120
  it("continua tocando depois que a bolha desmonta", async () => {
96
121
  const store = useAudioPlaybackStore();
97
122
  const wrapper = await mountAudio();