@webitel/ui-sdk 26.4.75 → 26.4.76

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 (63) hide show
  1. package/dist/{contacts-DJGHt6GB.js → contacts-eFuSbv3m.js} +2 -2
  2. package/dist/{index-D1ST4Xd3.js → index-CaY0ocAF.js} +1 -1
  3. package/dist/{index-eDz9LBqZ.js → index-TiiXs7ZO.js} +1 -1
  4. package/dist/{install-DvhxDbmg.js → install-Bd5HfFTV.js} +38 -38
  5. package/dist/{isObject-BFPfEBVn.js → isObject-BV09j4E1.js} +1 -1
  6. package/dist/ui-sdk.js +1 -1
  7. package/dist/ui-sdk.umd.cjs +1 -1
  8. package/dist/{useVidstackSrc-COA47ZXh.js → useVidstackSrc-BGxC2kR5.js} +11 -14
  9. package/dist/{vidstack-Bq6c3Bam-BkIRsrqo.js → vidstack-Bq6c3Bam-jeTFOXk6.js} +3 -3
  10. package/dist/{vidstack-D2pY00kU-VVjkuuBN.js → vidstack-D2pY00kU-I-LJsKk8.js} +3 -3
  11. package/dist/{vidstack-DDXt6fpN-Y9ZMM_4k.js → vidstack-DDXt6fpN-W_Ix9vbH.js} +2 -2
  12. package/dist/{vidstack-D_-9AA6_-DJ_O1mNn.js → vidstack-D_-9AA6_-27F2Mv_5.js} +2 -2
  13. package/dist/{vidstack-DqAw8m9J-BKCKqeAp.js → vidstack-DqAw8m9J-BxfLqlFs.js} +1 -1
  14. package/dist/{vidstack-audio-By3G_Nz1.js → vidstack-audio-CvjDPPuQ.js} +2 -2
  15. package/dist/{vidstack-dash-BvIFTy7j.js → vidstack-dash-rV4ryZh2.js} +4 -4
  16. package/dist/{vidstack-google-cast-CuFjaPe-.js → vidstack-google-cast-Cb8t34m4.js} +4 -4
  17. package/dist/{vidstack-hls-Dax5imdM.js → vidstack-hls-C2zZ7COz.js} +4 -4
  18. package/dist/{vidstack-video-8cUxQUYv.js → vidstack-video-DzItbHtm.js} +3 -3
  19. package/dist/{vidstack-vimeo-D6n35l2Q.js → vidstack-vimeo-BpKsHwp4.js} +4 -4
  20. package/dist/{vidstack-youtube-DI91idL3.js → vidstack-youtube--6zpNJz6.js} +3 -3
  21. package/dist/{wt-action-bar-CaJdVAce.js → wt-action-bar-Df57KUsc.js} +1 -1
  22. package/dist/{wt-button-select-D-CBhs4t.js → wt-button-select-ymdOC5NH.js} +1 -1
  23. package/dist/{wt-call-media-action-9fj5aYbO.js → wt-call-media-action-D4CP3oZl.js} +1 -1
  24. package/dist/{wt-chat-emoji-ApRqJ_kj.js → wt-chat-emoji-CUjHxdzV.js} +2 -2
  25. package/dist/{wt-confirm-dialog-B5O7cbN6.js → wt-confirm-dialog-CNwpPdgE.js} +1 -1
  26. package/dist/{wt-context-menu-DE51smiG.js → wt-context-menu-CToKHamf.js} +1 -1
  27. package/dist/{wt-copy-action-Bf7D-5Bi.js → wt-copy-action-Dd0tVB7g.js} +1 -1
  28. package/dist/{wt-datepicker-DXBrkBxI.js → wt-datepicker-B7sKwJlh.js} +1 -1
  29. package/dist/{wt-display-chip-items-gknVBLQb.js → wt-display-chip-items-IGBh7VMV.js} +1 -1
  30. package/dist/{wt-dual-panel-B_j0pZaN.js → wt-dual-panel-CqN6YB0F.js} +1 -1
  31. package/dist/{wt-dummy-CeCE8EiS.js → wt-dummy-OrcannPM.js} +1 -1
  32. package/dist/{wt-error-page-h1aTirAB.js → wt-error-page-BMpoQdQl.js} +1 -1
  33. package/dist/{wt-expansion-card-B6Rrnewo.js → wt-expansion-card-DEDM3Znr.js} +1 -1
  34. package/dist/{wt-expansion-panel-wD9hdosQ.js → wt-expansion-panel-YCSPf-eq.js} +1 -1
  35. package/dist/{wt-filters-panel-wrapper-CFhzi02w.js → wt-filters-panel-wrapper-Ck2bF7qg.js} +1 -1
  36. package/dist/{wt-galleria-BC1tIqTA.js → wt-galleria-CNDkujRu.js} +1 -1
  37. package/dist/{wt-inline-add-panel-lRG-gsCE.js → wt-inline-add-panel-BSEdS7eW.js} +1 -1
  38. package/dist/{wt-navigation-menu-BV5PonzK.js → wt-navigation-menu-igJBYaxO.js} +1 -1
  39. package/dist/{wt-notifications-bar-DQ5em84I.js → wt-notifications-bar-C0M5LC4G.js} +2 -2
  40. package/dist/{wt-pagination-CvvuUU6L.js → wt-pagination-BXDqQ9YV.js} +1 -1
  41. package/dist/{wt-player-lr3IN5Yh.js → wt-player-A13mN2qk.js} +2 -2
  42. package/dist/{wt-screen-recordings-action-BJLZWtDk.js → wt-screen-recordings-action-BQPS--RV.js} +1 -1
  43. package/dist/{wt-search-bar-UYjx6-GT.js → wt-search-bar-Cvt_urUF.js} +1 -1
  44. package/dist/{wt-selection-popup-DMyXEGoJ.js → wt-selection-popup-CcAfc6T6.js} +1 -1
  45. package/dist/{wt-send-message-popup-BCjxWJ4l.js → wt-send-message-popup-pN9zzJpT.js} +3 -3
  46. package/dist/{wt-start-page-CM_-31hv.js → wt-start-page-DaotE9Vi.js} +1 -1
  47. package/dist/{wt-status-select-D-qQBcF4.js → wt-status-select-Dhw-c6FB.js} +1 -1
  48. package/dist/{wt-stepper-Bwbwm6fp.js → wt-stepper-DyM6hf_l.js} +1 -1
  49. package/dist/{wt-table-CLwgN_Km.js → wt-table-Do6tizZl.js} +1 -1
  50. package/dist/{wt-table-actions-OnOdD7G3.js → wt-table-actions-Stm_KC06.js} +1 -1
  51. package/dist/{wt-table-column-select-CO1EfkQg.js → wt-table-column-select-DaGMSlL1.js} +2 -2
  52. package/dist/{wt-tabs-Dm7eDxJN.js → wt-tabs-CTv4GgX8.js} +1 -1
  53. package/dist/{wt-tags-input-CRgSJ3wf.js → wt-tags-input-DJhQrEdL.js} +2 -2
  54. package/dist/{wt-timepicker-DgHYjszd.js → wt-timepicker-98DhU-ME.js} +1 -1
  55. package/dist/{wt-tree-DC1u3bfd.js → wt-tree-CfkLw1SI.js} +2 -2
  56. package/dist/{wt-tree-table-C7g4cQ-Z.js → wt-tree-table-DDyxMFbz.js} +1 -1
  57. package/dist/{wt-type-extension-value-input-D_cMaZOj.js → wt-type-extension-value-input-B2CwLd8p.js} +3 -3
  58. package/dist/{wt-vidstack-player-aDbKB1qs.js → wt-vidstack-player-BduaN7w2.js} +10 -10
  59. package/package.json +1 -1
  60. package/src/components/wt-vidstack-player/composables/useVidstackSrc.ts +2 -81
  61. package/src/components/wt-vidstack-player/utils/normalizeVidstackMediaSrc.ts +106 -0
  62. package/types/components/wt-vidstack-player/composables/useVidstackSrc.d.ts +0 -17
  63. package/types/components/wt-vidstack-player/utils/normalizeVidstackMediaSrc.d.ts +28 -0
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as lt, inject as Zt, createElementBlock as mt, openBlock as U, normalizeClass as te, unref as Z, createElementVNode as nt, renderSlot as ut, createVNode as W, computed as Ds, onMounted as Ii, onBeforeUnmount as Vi, createBlock as Ut, createCommentVNode as Kt, toDisplayString as Di, createSlots as Rs, withCtx as Qt, resolveComponent as Ri, useTemplateRef as Oi, ref as us, provide as Ni, toRefs as Hi } from "vue";
2
- import { a as _, c as ft, i as G, b as Ve, d as S, e as rt, f as De, l as O, s as ee, g as Os, E as Ns, D as q, h as z, o as P, j as Fi, k as f, m as l, n as L, p as Hs, q as Bi, r as de, t as j, V as tt, v as w, C as b, S as gt, w as Vt, x as p, y as ot, z as Y, I as Fs, A as Gi, B as Ui, F as st, G as Ue, H as Bs, J as ps, K as Ke, L as Gs, M as kt, N as Qe, O as pe, P as Ki, Q as Ct, R as Qi, U as zi, W as Wi, X as ji, Y as Yi, Z as Xi, _ as Ji, $ as Zi, a0 as ta, a1 as Us, a2 as T, a3 as I, a4 as me, a5 as ea, a6 as Dt, a7 as K, a8 as sa, a9 as ia, aa, ab as na, ac as ms, ad as ra, ae as oa, af as v, ag as y, ah as ha, ai as la, T as da, u as ca } from "./useVidstackSrc-COA47ZXh.js";
3
- import { T as ua, U as pa, V as ma, X as fa, _ as yt, Q as fe, C as Q, Y as ga } from "./install-DvhxDbmg.js";
2
+ import { a as _, c as ft, i as G, b as Ve, d as S, e as rt, f as De, l as O, s as ee, g as Os, E as Ns, D as q, h as z, o as P, j as Fi, k as f, m as l, n as L, p as Hs, q as Bi, r as de, t as j, V as tt, v as w, C as b, S as gt, w as Vt, x as p, y as ot, z as Y, I as Fs, A as Gi, B as Ui, F as st, G as Ue, H as Bs, J as ps, K as Ke, L as Gs, M as kt, N as Qe, O as pe, P as Ki, Q as Ct, R as Qi, U as zi, W as Wi, X as ji, Y as Yi, Z as Xi, _ as Ji, $ as Zi, a0 as ta, a1 as Us, a2 as T, a3 as I, a4 as me, a5 as ea, a6 as Dt, a7 as K, a8 as sa, a9 as ia, aa, ab as na, ac as ms, ad as ra, ae as oa, af as v, ag as y, ah as ha, ai as la, T as da, u as ca } from "./useVidstackSrc-BGxC2kR5.js";
3
+ import { T as ua, U as pa, V as ma, X as fa, _ as yt, Q as fe, C as Q, Y as ga } from "./install-Bd5HfFTV.js";
4
4
  import { _ as ya } from "./wt-slider.vue_vue_type_script_setup_true_lang-DlaRDHxo.js";
5
5
  const Ks = ft();
6
6
  function $() {
@@ -2070,7 +2070,7 @@ class pn {
2070
2070
  return "audio";
2071
2071
  }
2072
2072
  async load(t) {
2073
- return new (await import("./vidstack-audio-By3G_Nz1.js")).AudioProvider(this.target, t);
2073
+ return new (await import("./vidstack-audio-CvjDPPuQ.js")).AudioProvider(this.target, t);
2074
2074
  }
2075
2075
  }
2076
2076
  class Ye {
@@ -2083,7 +2083,7 @@ class Ye {
2083
2083
  return "video";
2084
2084
  }
2085
2085
  async load(t) {
2086
- return new (await import("./vidstack-video-8cUxQUYv.js")).VideoProvider(this.target, t);
2086
+ return new (await import("./vidstack-video-DzItbHtm.js")).VideoProvider(this.target, t);
2087
2087
  }
2088
2088
  }
2089
2089
  class Xe extends Ye {
@@ -2093,7 +2093,7 @@ class Xe extends Ye {
2093
2093
  return Xe.supported && Ue(t);
2094
2094
  }
2095
2095
  async load(t) {
2096
- return new (await import("./vidstack-hls-Dax5imdM.js")).HLSProvider(this.target, t);
2096
+ return new (await import("./vidstack-hls-C2zZ7COz.js")).HLSProvider(this.target, t);
2097
2097
  }
2098
2098
  }
2099
2099
  class Je extends Ye {
@@ -2103,7 +2103,7 @@ class Je extends Ye {
2103
2103
  return Je.supported && Ke(t);
2104
2104
  }
2105
2105
  async load(t) {
2106
- return new (await import("./vidstack-dash-BvIFTy7j.js")).DASHProvider(this.target, t);
2106
+ return new (await import("./vidstack-dash-rV4ryZh2.js")).DASHProvider(this.target, t);
2107
2107
  }
2108
2108
  }
2109
2109
  class mn {
@@ -2125,7 +2125,7 @@ class mn {
2125
2125
  return "video";
2126
2126
  }
2127
2127
  async load(t) {
2128
- return new (await import("./vidstack-vimeo-D6n35l2Q.js")).VimeoProvider(this.target, t);
2128
+ return new (await import("./vidstack-vimeo-BpKsHwp4.js")).VimeoProvider(this.target, t);
2129
2129
  }
2130
2130
  async loadPoster(t, e, s) {
2131
2131
  const { resolveVimeoVideoId: i, getVimeoVideoInfo: n } = await import("./vidstack-krOAtKMi-C50BTxmn.js");
@@ -2157,7 +2157,7 @@ class fn {
2157
2157
  return "video";
2158
2158
  }
2159
2159
  async load(t) {
2160
- return new (await import("./vidstack-youtube-DI91idL3.js")).YouTubeProvider(this.target, t);
2160
+ return new (await import("./vidstack-youtube--6zpNJz6.js")).YouTubeProvider(this.target, t);
2161
2161
  }
2162
2162
  async loadPoster(t, e, s) {
2163
2163
  const { findYouTubePoster: i, resolveYouTubeVideoId: n } = await import("./vidstack-Dm1xEU9Q-CXHNvShT.js"), r = S(t.src) && n(t.src);
@@ -2625,7 +2625,7 @@ class $n extends xt {
2625
2625
  throw i.code = "CAST_NOT_AVAILABLE", i;
2626
2626
  }
2627
2627
  if (se("https://www.gstatic.com"), !this.#v) {
2628
- const i = await import("./vidstack-D2pY00kU-VVjkuuBN.js").then((n) => n.v);
2628
+ const i = await import("./vidstack-D2pY00kU-I-LJsKk8.js").then((n) => n.v);
2629
2629
  this.#v = new i.GoogleCastLoader();
2630
2630
  }
2631
2631
  await this.#v.prompt(this.#s), t && this.#e.queue.enqueue("media-google-cast-request", t);
@@ -8022,7 +8022,7 @@ class qr extends v(HTMLElement, ni) {
8022
8022
  if (this.#e?.classList.contains("vds-google-cast"))
8023
8023
  return this.#e;
8024
8024
  const t = document.createElement("div");
8025
- return t.classList.add("vds-google-cast"), import("./vidstack-D_-9AA6_-DJ_O1mNn.js").then(({ insertContent: e }) => {
8025
+ return t.classList.add("vds-google-cast"), import("./vidstack-D_-9AA6_-27F2Mv_5.js").then(({ insertContent: e }) => {
8026
8026
  e(t, this.#t.$state);
8027
8027
  }), t;
8028
8028
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.4.75",
3
+ "version": "26.4.76",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run biome:format:all || true) && npm run publish-lib",
@@ -1,9 +1,7 @@
1
- import {
2
- isAudioSrc as vidstackNativeIsAudioCheck,
3
- isVideoSrc as vidstackNativeIsVideoCheck,
4
- } from 'vidstack';
5
1
  import { computed, toRef } from 'vue';
6
2
 
3
+ import { normalizeVidstackMediaSrc } from '../utils/normalizeVidstackMediaSrc';
4
+
7
5
  export const useVidstackSrc = ({ src, type, stream }) => {
8
6
  const srcRef = toRef(src);
9
7
  const typeRef = toRef(type);
@@ -35,80 +33,3 @@ export const useVidstackSrc = ({ src, type, stream }) => {
35
33
  normalizedSrcObject,
36
34
  };
37
35
  };
38
-
39
- /**
40
- * https://webitel.atlassian.net/browse/WTEL-8723?focusedCommentId=733255
41
- * https://github.com/vidstack/player/issues/1453
42
- *
43
- * vidstack doesn't recognize some audio/video types as audio/video,
44
- * so we need to normalize them to default audio/video formats
45
- *
46
- * for instance, type: "audio/wav" won't be recognized as audio by vidstack,
47
- * so we need to fallback it to "audio/mp3"
48
- */
49
- export function normalizeVidstackMediaSrc({
50
- src,
51
- type,
52
- }: {
53
- src: string | unknown; // "string" for url, "unknown" for JS objects like MediaStream or Blob
54
- type: string;
55
- }) {
56
- // if vidstack parses src and type correctly, no need to normalize
57
- if (
58
- vidstackNativeIsAudioCheck({
59
- src,
60
- type,
61
- }) ||
62
- vidstackNativeIsVideoCheck({
63
- src,
64
- type,
65
- })
66
- ) {
67
- return {
68
- src,
69
- type,
70
- };
71
- }
72
-
73
- // handle "video/object" or "audio/object" types
74
- if (
75
- isObjectSrcType({
76
- src,
77
- type,
78
- })
79
- ) {
80
- return {
81
- src,
82
- type,
83
- };
84
- }
85
-
86
- // normalize to default audio format, if vidstack doesn't recognize this type as audio
87
- if (type?.includes('audio')) {
88
- return {
89
- src,
90
- type: 'audio/mp3',
91
- };
92
- }
93
-
94
- // normalize to default video format, if vidstack doesn't recognize this type as video
95
- if (type?.includes('video')) {
96
- return {
97
- src,
98
- type: 'video/mp4',
99
- };
100
- }
101
-
102
- // unknown. hz, ebites' sami
103
- return {
104
- src,
105
- type,
106
- };
107
- }
108
-
109
- /**
110
- * "video/object" or "audio/object" types represent JS objects like MediaStream or file Blob
111
- */
112
- function isObjectSrcType({ type }: { src: unknown; type: string }) {
113
- return type?.includes('/object');
114
- }
@@ -0,0 +1,106 @@
1
+ import {
2
+ isAudioSrc as vidstackNativeIsAudioCheck,
3
+ isVideoSrc as vidstackNativeIsVideoCheck,
4
+ } from 'vidstack';
5
+
6
+ export type SrcInput = {
7
+ src: string | unknown; // "string" for url, "unknown" for JS objects like MediaStream or Blob
8
+ type: string;
9
+ };
10
+
11
+ /**
12
+ * https://webitel.atlassian.net/browse/WTEL-8723?focusedCommentId=733255
13
+ * https://github.com/vidstack/player/issues/1453
14
+ *
15
+ * vidstack doesn't recognize some audio/video types as audio/video,
16
+ * so we need to normalize them to default audio/video formats
17
+ *
18
+ * for instance, type: "audio/wav" won't be recognized as audio by vidstack,
19
+ * so we need to fallback it to "audio/mp3"
20
+ */
21
+ export function normalizeVidstackMediaSrc({ src, type }: SrcInput) {
22
+ // if vidstack parses src and type correctly, no need to normalize
23
+ if (
24
+ vidstackNativeIsAudioCheck({
25
+ src,
26
+ type,
27
+ }) ||
28
+ vidstackNativeIsVideoCheck({
29
+ src,
30
+ type,
31
+ })
32
+ ) {
33
+ return {
34
+ src,
35
+ type,
36
+ };
37
+ }
38
+
39
+ // handle "video/object" or "audio/object" types
40
+ if (
41
+ isObjectSrcType({
42
+ src,
43
+ type,
44
+ })
45
+ ) {
46
+ return {
47
+ src,
48
+ type,
49
+ };
50
+ }
51
+
52
+ // normalize to default audio format, if vidstack doesn't recognize this type as audio
53
+ if (type?.includes('audio')) {
54
+ return {
55
+ src,
56
+ type: 'audio/mp3',
57
+ };
58
+ }
59
+
60
+ // normalize to default video format, if vidstack doesn't recognize this type as video
61
+ if (type?.includes('video')) {
62
+ return {
63
+ src,
64
+ type: 'video/mp4',
65
+ };
66
+ }
67
+
68
+ // unknown. hz, ebites' sami
69
+ return {
70
+ src,
71
+ type,
72
+ };
73
+ }
74
+
75
+ /**
76
+ * Assume that the src and type are supported by vidstack
77
+ * by normalizing its type and then re-checking it using vidstack's native check function
78
+ */
79
+ export function assumeVidstackSupportedAudioType({ src, type }: SrcInput) {
80
+ const normalizedSrc = normalizeVidstackMediaSrc({
81
+ src,
82
+ type,
83
+ });
84
+
85
+ return vidstackNativeIsAudioCheck(normalizedSrc);
86
+ }
87
+
88
+ /**
89
+ * Assume that the src and type are supported by vidstack
90
+ * by normalizing its type and then re-checking it using vidstack's native check function
91
+ */
92
+ export function assumeVidstackSupportedVideoType({ src, type }: SrcInput) {
93
+ const normalizedSrc = normalizeVidstackMediaSrc({
94
+ src,
95
+ type,
96
+ });
97
+
98
+ return vidstackNativeIsVideoCheck(normalizedSrc);
99
+ }
100
+
101
+ /**
102
+ * "video/object" or "audio/object" types represent JS objects like MediaStream or file Blob
103
+ */
104
+ function isObjectSrcType({ type }: SrcInput) {
105
+ return type?.includes('/object');
106
+ }
@@ -8,20 +8,3 @@ export declare const useVidstackSrc: ({ src, type, stream }: {
8
8
  type: string;
9
9
  }>;
10
10
  };
11
- /**
12
- * https://webitel.atlassian.net/browse/WTEL-8723?focusedCommentId=733255
13
- * https://github.com/vidstack/player/issues/1453
14
- *
15
- * vidstack doesn't recognize some audio/video types as audio/video,
16
- * so we need to normalize them to default audio/video formats
17
- *
18
- * for instance, type: "audio/wav" won't be recognized as audio by vidstack,
19
- * so we need to fallback it to "audio/mp3"
20
- */
21
- export declare function normalizeVidstackMediaSrc({ src, type, }: {
22
- src: string | unknown;
23
- type: string;
24
- }): {
25
- src: unknown;
26
- type: string;
27
- };
@@ -0,0 +1,28 @@
1
+ export type SrcInput = {
2
+ src: string | unknown;
3
+ type: string;
4
+ };
5
+ /**
6
+ * https://webitel.atlassian.net/browse/WTEL-8723?focusedCommentId=733255
7
+ * https://github.com/vidstack/player/issues/1453
8
+ *
9
+ * vidstack doesn't recognize some audio/video types as audio/video,
10
+ * so we need to normalize them to default audio/video formats
11
+ *
12
+ * for instance, type: "audio/wav" won't be recognized as audio by vidstack,
13
+ * so we need to fallback it to "audio/mp3"
14
+ */
15
+ export declare function normalizeVidstackMediaSrc({ src, type }: SrcInput): {
16
+ src: unknown;
17
+ type: string;
18
+ };
19
+ /**
20
+ * Assume that the src and type are supported by vidstack
21
+ * by normalizing its type and then re-checking it using vidstack's native check function
22
+ */
23
+ export declare function assumeVidstackSupportedAudioType({ src, type }: SrcInput): boolean;
24
+ /**
25
+ * Assume that the src and type are supported by vidstack
26
+ * by normalizing its type and then re-checking it using vidstack's native check function
27
+ */
28
+ export declare function assumeVidstackSupportedVideoType({ src, type }: SrcInput): boolean;