@sixbell-telco/sdk 1.6.0 → 2.1.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.
Files changed (209) hide show
  1. package/CHANGELOG.md +260 -711
  2. package/README.md +337 -278
  3. package/_index.css +3 -3
  4. package/components/accordion/accordion-item/accordion-item.component.d.ts +3 -4
  5. package/components/audio-player/audio-timeline/audio-timeline.component.d.ts +29 -2
  6. package/components/audio-player/services/audio.service.d.ts +14 -14
  7. package/components/audio-player/src/audio-player.component.d.ts +7 -3
  8. package/components/audio-player/volume-control/volume-control.component.d.ts +28 -1
  9. package/components/button/src/button.component.d.ts +46 -1
  10. package/components/countdown/src/countdown.component.d.ts +1 -1
  11. package/components/data-table/data-table-empty-actions/data-table-empty-actions.component.d.ts +5 -0
  12. package/components/data-table/public-api.d.ts +1 -0
  13. package/components/data-table/src/data-table.component.d.ts +11 -3
  14. package/components/dialog/src/dialog.component.d.ts +51 -5
  15. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +2 -1
  16. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +37 -1
  17. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +33 -1
  18. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +33 -1
  19. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +53 -2
  20. package/components/dropdown/src/dropdown.component.d.ts +2 -2
  21. package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +2 -1
  22. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +33 -1
  23. package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +33 -1
  24. package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +33 -1
  25. package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +1 -3
  26. package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +4 -4
  27. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +33 -1
  28. package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +2 -1
  29. package/components/dual-list/src/dual-list.component.d.ts +4 -2
  30. package/components/file-upload/file-dropzone/file-dropzone.component.d.ts +53 -8
  31. package/components/file-upload/file-uploader/file-uploader.component.d.ts +40 -9
  32. package/components/forms/checkbox/src/checkbox.component.d.ts +46 -2
  33. package/components/forms/combobox/src/combobox.component.d.ts +40 -5
  34. package/components/forms/date-picker/src/date-picker.component.d.ts +11 -1
  35. package/components/forms/form-group/README.md +114 -0
  36. package/components/forms/form-group/index.d.ts +5 -0
  37. package/components/forms/form-group/public-api.d.ts +1 -0
  38. package/components/forms/form-group/src/form-group.component.d.ts +150 -0
  39. package/components/forms/form-item/README.md +17 -0
  40. package/components/forms/form-item/index.d.ts +5 -0
  41. package/components/forms/form-item/public-api.d.ts +1 -0
  42. package/components/forms/form-item/src/form-item.component.d.ts +5 -0
  43. package/components/forms/input/src/input.component.d.ts +45 -2
  44. package/components/forms/radio/src/radio.component.d.ts +46 -2
  45. package/components/forms/range/src/range.component.d.ts +38 -1
  46. package/components/forms/select/src/select.component.d.ts +40 -5
  47. package/components/forms/switch/src/switch.component.d.ts +46 -2
  48. package/components/forms/textarea/src/textarea.component.d.ts +62 -12
  49. package/components/forms/toggle/src/toggle.component.d.ts +46 -1
  50. package/components/link/src/link.component.d.ts +0 -3
  51. package/components/overlay/overlay-content/overlay-content.component.d.ts +2 -1
  52. package/components/overlay/overlay-trigger/overlay-trigger.component.d.ts +37 -5
  53. package/components/overlay/src/overlay.component.d.ts +4 -5
  54. package/components/paginator/components/pagination-item/pagination-item.component.d.ts +37 -1
  55. package/components/tab/directives/tab-content/tab-content.directive.d.ts +5 -6
  56. package/components/tab/directives/tab-header/tab-header.directive.d.ts +2 -2
  57. package/components/table/public-api.d.ts +1 -0
  58. package/components/table/src/table.component.d.ts +36 -4
  59. package/components/table/table-empty-actions/table-empty-actions.component.d.ts +5 -0
  60. package/components/table/table-header-checkbox/table-header-checkbox.component.d.ts +5 -11
  61. package/components/table/table-row-checkbox/table-row-checkbox.component.d.ts +5 -11
  62. package/components/toast/toast-message/toast-message.component.d.ts +42 -1
  63. package/components/tooltip/src/tooltip.component.d.ts +10 -1
  64. package/components/wizard/services/wizard.service.d.ts +5 -5
  65. package/components/wizard/wizard-marker/wizard-marker.component.d.ts +2 -3
  66. package/directives/auto-focus/public-api.d.ts +1 -1
  67. package/directives/auto-focus/src/{autofocus.directive.d.ts → auto-focus.directive.d.ts} +9 -15
  68. package/directives/click-outside/src/click-outside.directive.d.ts +1 -3
  69. package/directives/only-numbers/public-api.d.ts +6 -1
  70. package/directives/only-numbers/src/only-numbers.directive.d.ts +36 -0
  71. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +6 -9
  72. package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
  73. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs +133 -51
  74. package/fesm2022/sixbell-telco-sdk-components-audio-player.mjs.map +1 -1
  75. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +1 -1
  76. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  77. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +2 -2
  78. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  79. package/fesm2022/sixbell-telco-sdk-components-button.mjs +78 -4
  80. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  81. package/fesm2022/sixbell-telco-sdk-components-countdown.mjs.map +1 -1
  82. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs +1 -1
  83. package/fesm2022/sixbell-telco-sdk-components-data-table-sub-component-toggle.mjs.map +1 -1
  84. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs +53 -27
  85. package/fesm2022/sixbell-telco-sdk-components-data-table.mjs.map +1 -1
  86. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +82 -12
  87. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -1
  88. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +166 -13
  89. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -1
  90. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +68 -24
  91. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -1
  92. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +283 -16
  93. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  94. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +12 -9
  95. package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
  96. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs +151 -10
  97. package/fesm2022/sixbell-telco-sdk-components-file-upload.mjs.map +1 -1
  98. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +69 -3
  99. package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
  100. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +96 -19
  101. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  102. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +15 -3
  103. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -1
  104. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +2 -2
  105. package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
  106. package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs +159 -0
  107. package/fesm2022/sixbell-telco-sdk-components-forms-form-group.mjs.map +1 -0
  108. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs +20 -0
  109. package/fesm2022/sixbell-telco-sdk-components-forms-form-item.mjs.map +1 -0
  110. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +62 -6
  111. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  112. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +69 -3
  113. package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
  114. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +57 -4
  115. package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
  116. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +91 -20
  117. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  118. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +80 -6
  119. package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
  120. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +131 -13
  121. package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
  122. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +69 -3
  123. package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
  124. package/fesm2022/sixbell-telco-sdk-components-link.mjs +2 -7
  125. package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
  126. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs +94 -42
  127. package/fesm2022/sixbell-telco-sdk-components-overlay.mjs.map +1 -1
  128. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +71 -10
  129. package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
  130. package/fesm2022/sixbell-telco-sdk-components-tab.mjs +5 -9
  131. package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
  132. package/fesm2022/sixbell-telco-sdk-components-table.mjs +131 -47
  133. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  134. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +69 -4
  135. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  136. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +15 -3
  137. package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
  138. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +4 -4
  139. package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
  140. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +29 -49
  141. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  142. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs +7 -10
  143. package/fesm2022/sixbell-telco-sdk-directives-click-outside.mjs.map +1 -1
  144. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs +48 -17
  145. package/fesm2022/sixbell-telco-sdk-directives-only-numbers.mjs.map +1 -1
  146. package/fesm2022/sixbell-telco-sdk-utils-date.mjs +1 -1
  147. package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
  148. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs +1 -1
  149. package/fesm2022/sixbell-telco-sdk-utils-pipes-to-bytes-extesion.mjs.map +1 -1
  150. package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs +339 -0
  151. package/fesm2022/sixbell-telco-sdk-utils-runtime-config.mjs.map +1 -0
  152. package/fesm2022/sixbell-telco-sdk-utils-sync.mjs +1 -1
  153. package/fesm2022/sixbell-telco-sdk-utils-sync.mjs.map +1 -1
  154. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +1062 -730
  155. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  156. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +350 -267
  157. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  158. package/package.json +55 -46
  159. package/utils/runtime-config/README.md +235 -0
  160. package/utils/{resource-loader → runtime-config}/index.d.ts +1 -1
  161. package/utils/runtime-config/public-api.d.ts +5 -0
  162. package/utils/runtime-config/src/http-client.d.ts +11 -0
  163. package/utils/runtime-config/src/runtime-config-loader.d.ts +23 -0
  164. package/utils/runtime-config/src/runtime-config-store.d.ts +11 -0
  165. package/utils/runtime-config/src/runtime-update-adapter.d.ts +15 -0
  166. package/utils/runtime-config/src/types.d.ts +66 -0
  167. package/utils/theme/README.md +324 -986
  168. package/utils/theme/public-api.d.ts +4 -4
  169. package/utils/theme/src/constants.d.ts +6 -12
  170. package/utils/theme/src/models/theme.d.ts +46 -173
  171. package/utils/theme/src/providers/theme.provider.d.ts +0 -10
  172. package/utils/theme/src/providers/theme.provider.types.d.ts +16 -15
  173. package/utils/theme/src/theme-assets/theme-assets.service.d.ts +16 -12
  174. package/utils/theme/src/theme-dom/theme-dom.service.d.ts +10 -3
  175. package/utils/theme/src/theme.service.d.ts +24 -27
  176. package/utils/theme/src/utils/utils.d.ts +2 -10
  177. package/utils/translation/README.md +170 -1390
  178. package/utils/translation/public-api.d.ts +3 -3
  179. package/utils/translation/src/constants.d.ts +7 -9
  180. package/utils/translation/src/models/translation.d.ts +9 -10
  181. package/utils/translation/src/providers/translation.provider.d.ts +17 -28
  182. package/utils/translation/src/providers/translation.provider.types.d.ts +13 -6
  183. package/utils/translation/src/translation-dom/translation-dom.service.d.ts +2 -3
  184. package/utils/translation/src/translation.service.d.ts +37 -9
  185. package/directives/only-numbers/src/just-numbers.directive.d.ts +0 -9
  186. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs +0 -1222
  187. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs.map +0 -1
  188. package/utils/resource-loader/README.md +0 -460
  189. package/utils/resource-loader/public-api.d.ts +0 -1
  190. package/utils/resource-loader/src/cache/index.d.ts +0 -2
  191. package/utils/resource-loader/src/cache/layers/factory.d.ts +0 -38
  192. package/utils/resource-loader/src/cache/layers/index.d.ts +0 -3
  193. package/utils/resource-loader/src/cache/layers/indexed-db-cache.d.ts +0 -118
  194. package/utils/resource-loader/src/cache/layers/local-storage-cache.d.ts +0 -86
  195. package/utils/resource-loader/src/cache/layers/memory-cache.d.ts +0 -76
  196. package/utils/resource-loader/src/cache/types.d.ts +0 -107
  197. package/utils/resource-loader/src/config/index.d.ts +0 -1
  198. package/utils/resource-loader/src/config/load-config.d.ts +0 -32
  199. package/utils/resource-loader/src/constants.d.ts +0 -38
  200. package/utils/resource-loader/src/http/index.d.ts +0 -1
  201. package/utils/resource-loader/src/http/retryable-client.d.ts +0 -43
  202. package/utils/resource-loader/src/index.d.ts +0 -1
  203. package/utils/resource-loader/src/resource-loader.d.ts +0 -67
  204. package/utils/resource-loader/src/types.d.ts +0 -152
  205. package/utils/resource-loader/src/utils/cache-validator.d.ts +0 -72
  206. package/utils/resource-loader/src/utils/helpers.d.ts +0 -15
  207. package/utils/resource-loader/src/utils/index.d.ts +0 -2
  208. package/utils/theme/src/providers/constants.d.ts +0 -7
  209. package/utils/translation/src/providers/constants.d.ts +0 -11
@@ -1,6 +1,6 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, signal, computed, Injectable, input, output, ChangeDetectionStrategy, Component, viewChild, HostListener, model, effect } from '@angular/core';
3
+ import { inject, signal, computed, Injectable, input, output, ChangeDetectionStrategy, Component, viewChild, DestroyRef, model, effect } from '@angular/core';
4
4
  import { matPlayArrow, matPause, matSkipPrevious, matSkipNext } from '@ng-icons/material-icons/baseline';
5
5
  import { ButtonComponent } from '@sixbell-telco/sdk/components/button';
6
6
  import { IconComponent } from '@sixbell-telco/sdk/components/icon';
@@ -85,7 +85,7 @@ class AudioPlayerService {
85
85
  // Wait for audio to be ready
86
86
  await new Promise((resolve, reject) => {
87
87
  this.audio.addEventListener('canplay', () => resolve(), { once: true });
88
- this.audio.addEventListener('error', (e) => reject(e), { once: true });
88
+ this.audio.addEventListener('error', () => reject(new Error('Failed to load audio')), { once: true });
89
89
  });
90
90
  await this.audio.play();
91
91
  }
@@ -106,7 +106,9 @@ class AudioPlayerService {
106
106
  cleanup() {
107
107
  this.audio.pause();
108
108
  this.audio.src = '';
109
- this.objectUrls.forEach((url) => URL.revokeObjectURL(url));
109
+ for (const url of this.objectUrls.values()) {
110
+ URL.revokeObjectURL(url);
111
+ }
110
112
  this.objectUrls.clear();
111
113
  // reset signals
112
114
  this._tracks.set([]);
@@ -263,16 +265,16 @@ class ButtonPlayComponent {
263
265
  this.isHovered.set(isHovered);
264
266
  }
265
267
  async handleTogglePlay() {
266
- if (this.trackIndex() !== undefined && this.trackIndex() !== this.audioService.currentTrackIndex()) {
267
- await this.audioService.playTrack(this.trackIndex());
268
+ if (this.trackIndex() === this.audioService.currentTrackIndex()) {
269
+ await this.audioService.togglePlay();
268
270
  }
269
271
  else {
270
- await this.audioService.togglePlay();
272
+ await this.audioService.playTrack(this.trackIndex());
271
273
  }
272
274
  this.togglePlay.emit();
273
275
  }
274
276
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ButtonPlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ButtonPlayComponent, isStandalone: true, selector: "st-button-play", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, circle: { classPropertyName: "circle", publicName: "circle", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null }, glass: { classPropertyName: "glass", publicName: "glass", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, asButton: { classPropertyName: "asButton", publicName: "asButton", isSignal: true, isRequired: false, transformFunction: null }, trackIndex: { classPropertyName: "trackIndex", publicName: "trackIndex", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { togglePlay: "togglePlay" }, ngImport: i0, template: "@let waveBarsVar = waveBarsClass();\n@let iconClassVar = iconClass();\n@let iconVar = icon();\n\n@if (!asButton()) {\n\t<div\n\t\tclass=\"from-primary to-primary-gradient relative grid h-10 min-h-10 w-10 min-w-10 place-content-center rounded-sm bg-linear-to-br text-lg text-white\"\n\t\t(mouseenter)=\"handleHover(true)\"\n\t\t(mouseleave)=\"handleHover(false)\"\n\t>\n\t\t<st-icon [icon]=\"iconMusicNote\"></st-icon>\n\n\t\t<div [class]=\"buttonClass()\">\n\t\t\t<st-button [circle]=\"true\" size=\"sm\" [shadow]=\"true\" variant=\"secondary\" (click)=\"handleTogglePlay()\">\n\t\t\t\t<div class=\"relative h-full w-full\">\n\t\t\t\t\t<div [class]=\"waveBarsVar\">\n\t\t\t\t\t\t<div class=\"flex h-full w-full items-center justify-between\">\n\t\t\t\t\t\t\t@for (bar of waveBars; track $index) {\n\t\t\t\t\t\t\t\t<div [class]=\"bar.class\" [style.--i]=\"bar.delay\"></div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div [class]=\"iconClassVar\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconVar\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</st-button>\n\t\t</div>\n\t</div>\n} @else {\n\t<st-button\n\t\t[variant]=\"variant()\"\n\t\t[ghost]=\"ghost()\"\n\t\t[outline]=\"outline()\"\n\t\t[circle]=\"circle()\"\n\t\t[square]=\"square()\"\n\t\t[glass]=\"glass()\"\n\t\t[size]=\"size()\"\n\t\t[shadow]=\"shadow()\"\n\t\t(click)=\"handleTogglePlay()\"\n\t\t(mouseenter)=\"handleHover(true)\"\n\t\t(mouseleave)=\"handleHover(false)\"\n\t>\n\t\t<div class=\"relative h-full w-full\">\n\t\t\t<div [class]=\"waveBarsVar\">\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-between\">\n\t\t\t\t\t@for (bar of waveBars; track $index) {\n\t\t\t\t\t\t<div [class]=\"bar.class\" [style.--i]=\"bar.delay\"></div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div [class]=\"iconClassVar\">\n\t\t\t\t<st-icon [icon]=\"iconVar\"></st-icon>\n\t\t\t</div>\n\t\t</div>\n\t</st-button>\n}\n", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
277
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ButtonPlayComponent, isStandalone: true, selector: "st-button-play", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ghost: { classPropertyName: "ghost", publicName: "ghost", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, circle: { classPropertyName: "circle", publicName: "circle", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null }, glass: { classPropertyName: "glass", publicName: "glass", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, asButton: { classPropertyName: "asButton", publicName: "asButton", isSignal: true, isRequired: false, transformFunction: null }, trackIndex: { classPropertyName: "trackIndex", publicName: "trackIndex", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { togglePlay: "togglePlay" }, ngImport: i0, template: "@let waveBarsVar = waveBarsClass();\n@let iconClassVar = iconClass();\n@let iconVar = icon();\n\n@if (!asButton()) {\n\t<div\n\t\tclass=\"from-primary to-primary-gradient relative grid h-10 min-h-10 w-10 min-w-10 place-content-center rounded-sm bg-linear-to-br text-lg text-white\"\n\t\t(mouseenter)=\"handleHover(true)\"\n\t\t(mouseleave)=\"handleHover(false)\"\n\t>\n\t\t<st-icon [icon]=\"iconMusicNote\"></st-icon>\n\n\t\t<div [class]=\"buttonClass()\">\n\t\t\t<st-button [circle]=\"true\" size=\"sm\" [shadow]=\"true\" variant=\"secondary\" (click)=\"handleTogglePlay()\">\n\t\t\t\t<div class=\"relative h-full w-full\">\n\t\t\t\t\t<div [class]=\"waveBarsVar\">\n\t\t\t\t\t\t<div class=\"flex h-full w-full items-center justify-between\">\n\t\t\t\t\t\t\t@for (bar of waveBars; track $index) {\n\t\t\t\t\t\t\t\t<div [class]=\"bar.class\" [style.--i]=\"bar.delay\"></div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div [class]=\"iconClassVar\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconVar\"></st-icon>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</st-button>\n\t\t</div>\n\t</div>\n} @else {\n\t<st-button\n\t\t[variant]=\"variant()\"\n\t\t[ghost]=\"ghost()\"\n\t\t[outline]=\"outline()\"\n\t\t[circle]=\"circle()\"\n\t\t[square]=\"square()\"\n\t\t[glass]=\"glass()\"\n\t\t[size]=\"size()\"\n\t\t[shadow]=\"shadow()\"\n\t\t(click)=\"handleTogglePlay()\"\n\t\t(mouseenter)=\"handleHover(true)\"\n\t\t(mouseleave)=\"handleHover(false)\"\n\t>\n\t\t<div class=\"relative h-full w-full\">\n\t\t\t<div [class]=\"waveBarsVar\">\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-between\">\n\t\t\t\t\t@for (bar of waveBars; track $index) {\n\t\t\t\t\t\t<div [class]=\"bar.class\" [style.--i]=\"bar.delay\"></div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div [class]=\"iconClassVar\">\n\t\t\t\t<st-icon [icon]=\"iconVar\"></st-icon>\n\t\t\t</div>\n\t\t</div>\n\t</st-button>\n}\n", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
276
278
  }
277
279
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ButtonPlayComponent, decorators: [{
278
280
  type: Component,
@@ -281,11 +283,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
281
283
 
282
284
  class AudioTimelineComponent {
283
285
  timeline = viewChild('timeline');
286
+ /**
287
+ * Stop event propagation for activation events
288
+ * @defaultValue false
289
+ */
290
+ stopPropagation = input(false);
291
+ /**
292
+ * Event emitted on click
293
+ */
294
+ clicked = output();
295
+ /**
296
+ * Event emitted on pointer down
297
+ */
298
+ pointerDown = output();
299
+ /**
300
+ * Event emitted on activation (click or pointer down)
301
+ */
302
+ triggered = output();
284
303
  audioService = inject(AudioPlayerService);
285
304
  isDragging = signal(false);
286
305
  isHovered = signal(false);
287
- timelineClass = computed(() => cn('relative h-1 w-full cursor-pointer rounded-full bg-neutral ', { 'h-[6px]': this.isHovered() || this.isDragging() }));
288
- timelineCircleClass = computed(() => cn('transition-opacity duration-200 absolute top-1/2 h-3 w-3 -translate-y-1/2 transform cursor-grab rounded-full bg-tertiary shadow-main', this.isHovered() || this.isDragging() ? 'opacity-100' : 'opacity-0'));
306
+ timelineClass = computed(() => cn('bg-neutral relative h-1 w-full cursor-pointer rounded-full', { 'h-[6px]': this.isHovered() || this.isDragging() }));
307
+ timelineCircleClass = computed(() => cn('bg-tertiary shadow-main absolute top-1/2 h-3 w-3 -translate-y-1/2 transform cursor-grab rounded-full transition-opacity duration-200', this.isHovered() || this.isDragging() ? 'opacity-100' : 'opacity-0'));
289
308
  // Handle timeline hover
290
309
  handleTimelineHover(isHovered) {
291
310
  this.isHovered.set(isHovered);
@@ -293,7 +312,9 @@ class AudioTimelineComponent {
293
312
  // Start dragging
294
313
  startDrag(event) {
295
314
  event.preventDefault(); // Prevent default behavior
296
- event.stopPropagation(); // Stop event propagation
315
+ if (this.stopPropagation()) {
316
+ event.stopPropagation(); // Stop event propagation
317
+ }
297
318
  this.isDragging.set(true);
298
319
  this.updateProgress(event);
299
320
  }
@@ -324,25 +345,41 @@ class AudioTimelineComponent {
324
345
  this.updateProgress(event);
325
346
  }
326
347
  }
348
+ /**
349
+ * @internal
350
+ * Handle pointer down activation
351
+ */
352
+ handlePointerDown(event) {
353
+ if (this.stopPropagation()) {
354
+ event.stopPropagation();
355
+ }
356
+ this.pointerDown.emit(event);
357
+ this.triggered.emit();
358
+ }
359
+ /**
360
+ * @internal
361
+ * Handle click activation
362
+ */
363
+ handleClick(event) {
364
+ if (this.stopPropagation()) {
365
+ event.stopPropagation();
366
+ }
367
+ this.clicked.emit(event);
368
+ this.triggered.emit();
369
+ this.seek(event);
370
+ }
327
371
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AudioTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
328
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: AudioTimelineComponent, isStandalone: true, selector: "st-timeline", host: { listeners: { "document:mousemove": "onDrag($event)", "document:touchmove": "onDrag($event)", "document:mouseup": "stopDrag()", "document:touchend": "stopDrag()" } }, viewQueries: [{ propertyName: "timeline", first: true, predicate: ["timeline"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Progress Bar -->\n<div class=\"grid w-full grid-cols-[1fr_5fr_1fr] items-center gap-4\">\n\t<!-- Current Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-end align-top select-none\">\n\t\t@if (!audioService.isInitializing()) {\n\t\t\t@if (audioService.isBuffering()) {\n\t\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t\t} @else {\n\t\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.currentTime() | time }}</span>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t<div [class]=\"timelineClass()\" (click)=\"seek($event)\" #timeline (mouseenter)=\"handleTimelineHover(true)\" (mouseleave)=\"handleTimelineHover(false)\">\n\t\t<!-- Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"(audioService.currentTime() / audioService.duration()) * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Circle -->\n\t\t<div\n\t\t\t[style.left]=\"\n\t\t\t\t'calc(' +\n\t\t\t\t(audioService.currentTime() / audioService.duration()) * 100 +\n\t\t\t\t'% - ' +\n\t\t\t\t(audioService.currentTime() / audioService.duration() === 1 ? '6px' : '3px') +\n\t\t\t\t')'\n\t\t\t\"\n\t\t\t[class]=\"timelineCircleClass()\"\n\t\t\t#circle\n\t\t\t(mousedown)=\"startDrag($event)\"\n\t\t\t(touchstart)=\"startDrag($event)\"\n\t\t></div>\n\t</div>\n\n\t<!-- Total Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-start align-top select-none\">\n\t\t@if (audioService.isInitializing()) {\n\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t} @else {\n\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.duration() | time }}</span>\n\t\t}\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TimePipe, name: "time" }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
372
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: AudioTimelineComponent, isStandalone: true, selector: "st-timeline", inputs: { stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", pointerDown: "pointerDown", triggered: "triggered" }, host: { listeners: { "document:mousemove": "onDrag($event)", "document:touchmove": "onDrag($event)", "document:mouseup": "stopDrag()", "document:touchend": "stopDrag()" } }, viewQueries: [{ propertyName: "timeline", first: true, predicate: ["timeline"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Progress Bar -->\n<div class=\"grid w-full grid-cols-[1fr_5fr_1fr] items-center gap-4\">\n\t<!-- Current Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-end align-top select-none\">\n\t\t@if (!audioService.isInitializing()) {\n\t\t\t@if (audioService.isBuffering()) {\n\t\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t\t} @else {\n\t\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.currentTime() | time }}</span>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t<div\n\t\t[class]=\"timelineClass()\"\n\t\t(click)=\"handleClick($event)\"\n\t\t#timeline\n\t\t(mouseenter)=\"handleTimelineHover(true)\"\n\t\t(mouseleave)=\"handleTimelineHover(false)\"\n\t>\n\t\t<!-- Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"(audioService.currentTime() / audioService.duration()) * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Circle -->\n\t\t<div\n\t\t\t[style.left]=\"\n\t\t\t\t'calc(' +\n\t\t\t\t(audioService.currentTime() / audioService.duration()) * 100 +\n\t\t\t\t'% - ' +\n\t\t\t\t(audioService.currentTime() / audioService.duration() === 1 ? '6px' : '3px') +\n\t\t\t\t')'\n\t\t\t\"\n\t\t\t[class]=\"timelineCircleClass()\"\n\t\t\t#circle\n\t\t\t(pointerdown)=\"handlePointerDown($event); startDrag($event)\"\n\t\t></div>\n\t</div>\n\n\t<!-- Total Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-start align-top select-none\">\n\t\t@if (audioService.isInitializing()) {\n\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t} @else {\n\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.duration() | time }}</span>\n\t\t}\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TimePipe, name: "time" }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
329
373
  }
330
374
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AudioTimelineComponent, decorators: [{
331
375
  type: Component,
332
- args: [{ selector: 'st-timeline', imports: [CommonModule, TimePipe, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Progress Bar -->\n<div class=\"grid w-full grid-cols-[1fr_5fr_1fr] items-center gap-4\">\n\t<!-- Current Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-end align-top select-none\">\n\t\t@if (!audioService.isInitializing()) {\n\t\t\t@if (audioService.isBuffering()) {\n\t\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t\t} @else {\n\t\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.currentTime() | time }}</span>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t<div [class]=\"timelineClass()\" (click)=\"seek($event)\" #timeline (mouseenter)=\"handleTimelineHover(true)\" (mouseleave)=\"handleTimelineHover(false)\">\n\t\t<!-- Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"(audioService.currentTime() / audioService.duration()) * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Circle -->\n\t\t<div\n\t\t\t[style.left]=\"\n\t\t\t\t'calc(' +\n\t\t\t\t(audioService.currentTime() / audioService.duration()) * 100 +\n\t\t\t\t'% - ' +\n\t\t\t\t(audioService.currentTime() / audioService.duration() === 1 ? '6px' : '3px') +\n\t\t\t\t')'\n\t\t\t\"\n\t\t\t[class]=\"timelineCircleClass()\"\n\t\t\t#circle\n\t\t\t(mousedown)=\"startDrag($event)\"\n\t\t\t(touchstart)=\"startDrag($event)\"\n\t\t></div>\n\t</div>\n\n\t<!-- Total Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-start align-top select-none\">\n\t\t@if (audioService.isInitializing()) {\n\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t} @else {\n\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.duration() | time }}</span>\n\t\t}\n\t</div>\n</div>\n" }]
333
- }], propDecorators: { onDrag: [{
334
- type: HostListener,
335
- args: ['document:mousemove', ['$event']]
336
- }, {
337
- type: HostListener,
338
- args: ['document:touchmove', ['$event']]
339
- }], stopDrag: [{
340
- type: HostListener,
341
- args: ['document:mouseup']
342
- }, {
343
- type: HostListener,
344
- args: ['document:touchend']
345
- }] } });
376
+ args: [{ selector: 'st-timeline', imports: [CommonModule, TimePipe, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
377
+ '(document:mousemove)': 'onDrag($event)',
378
+ '(document:touchmove)': 'onDrag($event)',
379
+ '(document:mouseup)': 'stopDrag()',
380
+ '(document:touchend)': 'stopDrag()',
381
+ }, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Progress Bar -->\n<div class=\"grid w-full grid-cols-[1fr_5fr_1fr] items-center gap-4\">\n\t<!-- Current Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-end align-top select-none\">\n\t\t@if (!audioService.isInitializing()) {\n\t\t\t@if (audioService.isBuffering()) {\n\t\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t\t} @else {\n\t\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.currentTime() | time }}</span>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t<div\n\t\t[class]=\"timelineClass()\"\n\t\t(click)=\"handleClick($event)\"\n\t\t#timeline\n\t\t(mouseenter)=\"handleTimelineHover(true)\"\n\t\t(mouseleave)=\"handleTimelineHover(false)\"\n\t>\n\t\t<!-- Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"(audioService.currentTime() / audioService.duration()) * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Circle -->\n\t\t<div\n\t\t\t[style.left]=\"\n\t\t\t\t'calc(' +\n\t\t\t\t(audioService.currentTime() / audioService.duration()) * 100 +\n\t\t\t\t'% - ' +\n\t\t\t\t(audioService.currentTime() / audioService.duration() === 1 ? '6px' : '3px') +\n\t\t\t\t')'\n\t\t\t\"\n\t\t\t[class]=\"timelineCircleClass()\"\n\t\t\t#circle\n\t\t\t(pointerdown)=\"handlePointerDown($event); startDrag($event)\"\n\t\t></div>\n\t</div>\n\n\t<!-- Total Time Display -->\n\t<div class=\"text-tertiary inline-flex min-h-5 items-center justify-start align-top select-none\">\n\t\t@if (audioService.isInitializing()) {\n\t\t\t<span class=\"loading loading-ring loading-xs\"></span>\n\t\t} @else {\n\t\t\t<span typography tyVariant=\"body-xxs\">{{ audioService.duration() | time }}</span>\n\t\t}\n\t</div>\n</div>\n" }]
382
+ }] });
346
383
 
347
384
  class TrackInfoComponent {
348
385
  currentTrack = input();
@@ -358,18 +395,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
358
395
  class VolumeControlComponent {
359
396
  volumeTimeline = viewChild('volumeTimeline');
360
397
  audioService = inject(AudioPlayerService);
398
+ /**
399
+ * Stop event propagation for activation events
400
+ * @defaultValue false
401
+ */
402
+ stopPropagation = input(false);
403
+ /**
404
+ * Event emitted on click
405
+ */
406
+ clicked = output();
407
+ /**
408
+ * Event emitted on pointer down
409
+ */
410
+ pointerDown = output();
411
+ /**
412
+ * Event emitted on activation (click or pointer down)
413
+ */
414
+ triggered = output();
361
415
  isVolumeDragging = signal(false);
362
416
  isVolumeHovered = signal(false);
363
417
  iconVolumeUp = matVolumeUpOutline;
364
418
  iconVolumeDown = matVolumeDownOutline;
365
419
  iconVolumeMute = matVolumeMuteOutline;
366
420
  volumeTimelineClass = computed(() => {
367
- return cn('relative h-1 w-20 cursor-pointer rounded-full bg-neutral', {
421
+ return cn('bg-neutral relative h-1 w-20 cursor-pointer rounded-full', {
368
422
  'h-[6px]': this.isVolumeHovered() || this.isVolumeDragging(),
369
423
  });
370
424
  });
371
425
  volumeTimelineCircleClass = computed(() => {
372
- return cn('absolute top-1/2 h-3 w-3 -translate-y-1/2 transform cursor-grab rounded-full bg-tertiary shadow-main transition-opacity duration-200', this.isVolumeHovered() || this.isVolumeDragging() ? 'opacity-100' : 'opacity-0');
426
+ return cn('bg-tertiary shadow-main absolute top-1/2 h-3 w-3 -translate-y-1/2 transform cursor-grab rounded-full transition-opacity duration-200', this.isVolumeHovered() || this.isVolumeDragging() ? 'opacity-100' : 'opacity-0');
373
427
  });
374
428
  // Handle volume hover
375
429
  handleVolumeHover(isHovered) {
@@ -378,7 +432,9 @@ class VolumeControlComponent {
378
432
  // Start volume drag
379
433
  startVolumeDrag(event) {
380
434
  event.preventDefault(); // Prevent default behavior
381
- event.stopPropagation(); // Prevent event propagation
435
+ if (this.stopPropagation()) {
436
+ event.stopPropagation(); // Prevent event propagation
437
+ }
382
438
  this.isVolumeDragging.set(true);
383
439
  this.updateVolume(event);
384
440
  }
@@ -409,31 +465,48 @@ class VolumeControlComponent {
409
465
  this.updateVolume(event);
410
466
  }
411
467
  }
468
+ /**
469
+ * @internal
470
+ * Handle pointer down activation
471
+ */
472
+ handlePointerDown(event) {
473
+ if (this.stopPropagation()) {
474
+ event.stopPropagation();
475
+ }
476
+ this.pointerDown.emit(event);
477
+ this.triggered.emit();
478
+ }
479
+ /**
480
+ * @internal
481
+ * Handle click activation
482
+ */
483
+ handleClick(event) {
484
+ if (this.stopPropagation()) {
485
+ event.stopPropagation();
486
+ }
487
+ this.clicked.emit(event);
488
+ this.triggered.emit();
489
+ this.seekVolume(event);
490
+ }
412
491
  toggleMute() {
413
492
  this.audioService.setMuted(!this.audioService.isMuted());
414
493
  }
415
494
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: VolumeControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
416
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: VolumeControlComponent, isStandalone: true, selector: "st-volume-control", host: { listeners: { "document:mousemove": "onVolumeDrag($event)", "document:touchmove": "onVolumeDrag($event)", "document:mouseup": "stopVolumeDrag()", "document:touchend": "stopVolumeDrag()" } }, viewQueries: [{ propertyName: "volumeTimeline", first: true, predicate: ["volumeTimeline"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Volume Control -->\n<div class=\"flex items-center justify-end gap-2\">\n\t<!-- Mute/Unmute Button -->\n\t<st-button [ghost]=\"true\" size=\"sm\" [circle]=\"true\" (click)=\"toggleMute()\">\n\t\t@if (audioService.volume() === 0) {\n\t\t\t<st-icon [icon]=\"iconVolumeMute\" size=\"sm\"></st-icon>\n\t\t} @else if (audioService.volume() > 0.5) {\n\t\t\t<st-icon [icon]=\"iconVolumeUp\" size=\"sm\"></st-icon>\n\t\t} @else {\n\t\t\t<st-icon [icon]=\"iconVolumeDown\" size=\"sm\"></st-icon>\n\t\t}\n\t</st-button>\n\n\t<!-- Custom Volume Progress Bar -->\n\t<div\n\t\t[class]=\"volumeTimelineClass()\"\n\t\t(click)=\"seekVolume($event)\"\n\t\t#volumeTimeline\n\t\t(mouseenter)=\"handleVolumeHover(true)\"\n\t\t(mouseleave)=\"handleVolumeHover(false)\"\n\t>\n\t\t<!-- Volume Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"audioService.volume() * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Volume Circle -->\n\t\t<div\n\t\t\t[style.left]=\"'calc(' + audioService.volume() * 100 + '% - ' + (audioService.volume() === 1 ? '6px' : '3px') + ')'\"\n\t\t\t[class]=\"volumeTimelineCircleClass()\"\n\t\t\t#volumeCircle\n\t\t\t(mousedown)=\"startVolumeDrag($event)\"\n\t\t\t(touchstart)=\"startVolumeDrag($event)\"\n\t\t></div>\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
495
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: VolumeControlComponent, isStandalone: true, selector: "st-volume-control", inputs: { stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", pointerDown: "pointerDown", triggered: "triggered" }, host: { listeners: { "document:mousemove": "onVolumeDrag($event)", "document:touchmove": "onVolumeDrag($event)", "document:mouseup": "stopVolumeDrag()", "document:touchend": "stopVolumeDrag()" } }, viewQueries: [{ propertyName: "volumeTimeline", first: true, predicate: ["volumeTimeline"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Volume Control -->\n<div class=\"flex items-center justify-end gap-2\">\n\t<!-- Mute/Unmute Button -->\n\t<st-button [ghost]=\"true\" size=\"sm\" [circle]=\"true\" (click)=\"toggleMute()\">\n\t\t@if (audioService.volume() === 0) {\n\t\t\t<st-icon [icon]=\"iconVolumeMute\" size=\"sm\"></st-icon>\n\t\t} @else if (audioService.volume() > 0.5) {\n\t\t\t<st-icon [icon]=\"iconVolumeUp\" size=\"sm\"></st-icon>\n\t\t} @else {\n\t\t\t<st-icon [icon]=\"iconVolumeDown\" size=\"sm\"></st-icon>\n\t\t}\n\t</st-button>\n\n\t<!-- Custom Volume Progress Bar -->\n\t<div\n\t\t[class]=\"volumeTimelineClass()\"\n\t\t(click)=\"handleClick($event)\"\n\t\t#volumeTimeline\n\t\t(mouseenter)=\"handleVolumeHover(true)\"\n\t\t(mouseleave)=\"handleVolumeHover(false)\"\n\t>\n\t\t<!-- Volume Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"audioService.volume() * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Volume Circle -->\n\t\t<div\n\t\t\t[style.left]=\"'calc(' + audioService.volume() * 100 + '% - ' + (audioService.volume() === 1 ? '6px' : '3px') + ')'\"\n\t\t\t[class]=\"volumeTimelineCircleClass()\"\n\t\t\t#volumeCircle\n\t\t\t(pointerdown)=\"handlePointerDown($event); startVolumeDrag($event)\"\n\t\t></div>\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
417
496
  }
418
497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: VolumeControlComponent, decorators: [{
419
498
  type: Component,
420
- args: [{ selector: 'st-volume-control', imports: [IconComponent, CommonModule, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Volume Control -->\n<div class=\"flex items-center justify-end gap-2\">\n\t<!-- Mute/Unmute Button -->\n\t<st-button [ghost]=\"true\" size=\"sm\" [circle]=\"true\" (click)=\"toggleMute()\">\n\t\t@if (audioService.volume() === 0) {\n\t\t\t<st-icon [icon]=\"iconVolumeMute\" size=\"sm\"></st-icon>\n\t\t} @else if (audioService.volume() > 0.5) {\n\t\t\t<st-icon [icon]=\"iconVolumeUp\" size=\"sm\"></st-icon>\n\t\t} @else {\n\t\t\t<st-icon [icon]=\"iconVolumeDown\" size=\"sm\"></st-icon>\n\t\t}\n\t</st-button>\n\n\t<!-- Custom Volume Progress Bar -->\n\t<div\n\t\t[class]=\"volumeTimelineClass()\"\n\t\t(click)=\"seekVolume($event)\"\n\t\t#volumeTimeline\n\t\t(mouseenter)=\"handleVolumeHover(true)\"\n\t\t(mouseleave)=\"handleVolumeHover(false)\"\n\t>\n\t\t<!-- Volume Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"audioService.volume() * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Volume Circle -->\n\t\t<div\n\t\t\t[style.left]=\"'calc(' + audioService.volume() * 100 + '% - ' + (audioService.volume() === 1 ? '6px' : '3px') + ')'\"\n\t\t\t[class]=\"volumeTimelineCircleClass()\"\n\t\t\t#volumeCircle\n\t\t\t(mousedown)=\"startVolumeDrag($event)\"\n\t\t\t(touchstart)=\"startVolumeDrag($event)\"\n\t\t></div>\n\t</div>\n</div>\n" }]
421
- }], propDecorators: { onVolumeDrag: [{
422
- type: HostListener,
423
- args: ['document:mousemove', ['$event']]
424
- }, {
425
- type: HostListener,
426
- args: ['document:touchmove', ['$event']]
427
- }], stopVolumeDrag: [{
428
- type: HostListener,
429
- args: ['document:mouseup']
430
- }, {
431
- type: HostListener,
432
- args: ['document:touchend']
433
- }] } });
499
+ args: [{ selector: 'st-volume-control', imports: [IconComponent, CommonModule, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
500
+ '(document:mousemove)': 'onVolumeDrag($event)',
501
+ '(document:touchmove)': 'onVolumeDrag($event)',
502
+ '(document:mouseup)': 'stopVolumeDrag()',
503
+ '(document:touchend)': 'stopVolumeDrag()',
504
+ }, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n\n<!-- Volume Control -->\n<div class=\"flex items-center justify-end gap-2\">\n\t<!-- Mute/Unmute Button -->\n\t<st-button [ghost]=\"true\" size=\"sm\" [circle]=\"true\" (click)=\"toggleMute()\">\n\t\t@if (audioService.volume() === 0) {\n\t\t\t<st-icon [icon]=\"iconVolumeMute\" size=\"sm\"></st-icon>\n\t\t} @else if (audioService.volume() > 0.5) {\n\t\t\t<st-icon [icon]=\"iconVolumeUp\" size=\"sm\"></st-icon>\n\t\t} @else {\n\t\t\t<st-icon [icon]=\"iconVolumeDown\" size=\"sm\"></st-icon>\n\t\t}\n\t</st-button>\n\n\t<!-- Custom Volume Progress Bar -->\n\t<div\n\t\t[class]=\"volumeTimelineClass()\"\n\t\t(click)=\"handleClick($event)\"\n\t\t#volumeTimeline\n\t\t(mouseenter)=\"handleVolumeHover(true)\"\n\t\t(mouseleave)=\"handleVolumeHover(false)\"\n\t>\n\t\t<!-- Volume Progress Bar Background -->\n\t\t<div class=\"bg-primary absolute h-full rounded-full\" [style.width]=\"audioService.volume() * 100 + '%'\"></div>\n\n\t\t<!-- Draggable Volume Circle -->\n\t\t<div\n\t\t\t[style.left]=\"'calc(' + audioService.volume() * 100 + '% - ' + (audioService.volume() === 1 ? '6px' : '3px') + ')'\"\n\t\t\t[class]=\"volumeTimelineCircleClass()\"\n\t\t\t#volumeCircle\n\t\t\t(pointerdown)=\"handlePointerDown($event); startVolumeDrag($event)\"\n\t\t></div>\n\t</div>\n</div>\n" }]
505
+ }] });
434
506
 
435
507
  class AudioPlayerComponent {
436
508
  audioPlayerService = inject(AudioPlayerService);
509
+ destroyRef = inject(DestroyRef);
437
510
  variant = input('default');
438
511
  shadow = input(false);
439
512
  opened = model(false);
@@ -450,16 +523,16 @@ class AudioPlayerComponent {
450
523
  iconPause = matPause;
451
524
  iconMusicNote = heroMusicalNoteMini;
452
525
  offScreen = signal(false);
453
- playerClass = computed(() => cn('grid w-full grid-cols-[minmax(0,1fr)_minmax(0,2fr)_minmax(0,1fr)] items-center gap-4 relative translate-y-0', {
526
+ playerClass = computed(() => cn('relative grid w-full translate-y-0 grid-cols-[minmax(0,1fr)_minmax(0,2fr)_minmax(0,1fr)] items-center gap-4', {
454
527
  'shadow-main': this.shadow(),
455
528
  }, {
456
- 'fixed bottom-0 left-0 bg-base-200 p-4 z-50 border-t border-neutral transform transition-transform duration-300': this.variant() === 'fixed',
529
+ 'bg-base-200 border-neutral fixed bottom-0 left-0 z-50 transform border-t p-4 transition-transform duration-300': this.variant() === 'fixed',
457
530
  }, {
458
531
  'animate-fade-in-up animate-steps-modern animate-duration-300': this.opened() && this.variant() === 'fixed',
459
532
  }, {
460
533
  'animate-fade-out-down animate-steps-modern animate-duration-300': !this.opened() && this.variant() === 'fixed',
461
534
  }, {
462
- 'invisible pointer-events-none -z-10 fixed bottom-5': this.offScreen() && this.variant() === 'fixed',
535
+ 'pointer-events-none invisible fixed bottom-5 -z-10': this.offScreen() && this.variant() === 'fixed',
463
536
  }));
464
537
  constructor() {
465
538
  // Sync tracks with service
@@ -470,6 +543,9 @@ class AudioPlayerComponent {
470
543
  effect(() => {
471
544
  this.currentTrackIndex.set(this.audioPlayerService.currentTrackIndex());
472
545
  });
546
+ this.destroyRef.onDestroy(() => {
547
+ this.audioPlayerService.cleanup();
548
+ });
473
549
  }
474
550
  entering = signal(false);
475
551
  leaving = signal(false);
@@ -508,17 +584,23 @@ class AudioPlayerComponent {
508
584
  async next() {
509
585
  await this.audioPlayerService.next();
510
586
  }
587
+ /**
588
+ * @internal
589
+ * Handles timeline/volume interactions
590
+ */
591
+ handleInteraction() {
592
+ if (this.variant() === 'fixed' && !this.opened()) {
593
+ this.opened.set(true);
594
+ }
595
+ }
511
596
  handleOpen() {
512
597
  this.opened.set(true);
513
598
  }
514
599
  handleClose() {
515
600
  this.opened.set(false);
516
601
  }
517
- ngOnDestroy() {
518
- this.audioPlayerService.cleanup();
519
- }
520
602
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AudioPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
521
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: AudioPlayerComponent, isStandalone: true, selector: "st-audio-player", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, tracks: { classPropertyName: "tracks", publicName: "tracks", isSignal: true, isRequired: false, transformFunction: null }, showTrackList: { classPropertyName: "showTrackList", publicName: "showTrackList", isSignal: true, isRequired: false, transformFunction: null }, currentTrackIndex: { classPropertyName: "currentTrackIndex", publicName: "currentTrackIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", currentTrackIndex: "currentTrackIndexChange" }, ngImport: i0, template: "<div class=\"flex w-full flex-col gap-4\">\n\t<!-- Track List -->\n\t@if (showTrackList()) {\n\t\t<div class=\"rounded-box border-neutral shadow-main mb-4 border\">\n\t\t\t<div class=\"p-4\">\n\t\t\t\t<h4 typography tyVariant=\"h4\">{{ 'sdk.audioPlayer.trackListTitle' | translate }}</h4>\n\t\t\t\t<div class=\"max-h-[300px] space-y-2 overflow-y-auto\">\n\t\t\t\t\t@for (track of tracks(); track $index; let i = $index) {\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"rounded-field hover:bg-base-300 flex cursor-pointer items-center gap-2 p-2\"\n\t\t\t\t\t\t\t[class.bg-base-300]=\"audioPlayerService.currentTrackIndex() === i\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<st-button-play [trackIndex]=\"i\" (click)=\"handleOpen()\"> </st-button-play>\n\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body\">{{ track.title }}</div>\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body-sm\">{{ track.description }}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<div [class]=\"playerClass()\" (animationend)=\"handleAnimationEnd($event)\" (animationstart)=\"handleAnimationStart($event)\">\n\t\t<!-- close button -->\n\t\t@if (variant() === 'fixed') {\n\t\t\t<div\n\t\t\t\tclass=\"group/close btn btn-ghost btn-square btn-primary btn-xs absolute top-1 right-1 grid place-content-center gap-0 hover:cursor-pointer\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t(click)=\"handleClose()\"\n\t\t\t\t(keydown.enter)=\"handleClose()\"\n\t\t\t\taria-label=\"Close player\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content relative h-0.5 w-4 translate-y-0.5 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:rotate-45 group-hover/close:rotate-45 group-active/close:rotate-45\"\n\t\t\t\t></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content h-0.5 w-4 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:-rotate-45 group-hover/close:-rotate-45 group-active/close:-rotate-45\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t}\n\n\t\t<!-- track info -->\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Added min-w-0 to prevent overflow -->\n\t\t\t<st-track-info [currentTrack]=\"currentTrack()\"></st-track-info>\n\t\t</div>\n\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Center section -->\n\t\t\t<!-- Your controls content -->\n\t\t\t<div class=\"grid items-center\">\n\t\t\t\t<!-- Controls -->\n\t\t\t\t<div class=\"flex items-center justify-center gap-2\">\n\t\t\t\t\t<st-button (click)=\"previous()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipPrevious\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"togglePlay()\" [circle]=\"true\" size=\"sm\" [shadow]=\"true\">\n\t\t\t\t\t\t<st-icon [icon]=\"audioPlayerService.isPlaying() ? iconPause : iconPlay\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"next()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipNext\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Progress Bar -->\n\t\t\t\t<st-timeline></st-timeline>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Volume Control -->\n\t\t<div class=\"min-w-0 justify-self-end\">\n\t\t\t<!-- Right-aligned -->\n\t\t\t<st-volume-control></st-volume-control>\n\t\t</div>\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }, { kind: "component", type: VolumeControlComponent, selector: "st-volume-control" }, { kind: "component", type: TrackInfoComponent, selector: "st-track-info", inputs: ["currentTrack"] }, { kind: "component", type: AudioTimelineComponent, selector: "st-timeline" }, { kind: "component", type: ButtonPlayComponent, selector: "st-button-play", inputs: ["variant", "ghost", "outline", "circle", "square", "glass", "size", "shadow", "asButton", "trackIndex"], outputs: ["togglePlay"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
603
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: AudioPlayerComponent, isStandalone: true, selector: "st-audio-player", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, tracks: { classPropertyName: "tracks", publicName: "tracks", isSignal: true, isRequired: false, transformFunction: null }, showTrackList: { classPropertyName: "showTrackList", publicName: "showTrackList", isSignal: true, isRequired: false, transformFunction: null }, currentTrackIndex: { classPropertyName: "currentTrackIndex", publicName: "currentTrackIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", currentTrackIndex: "currentTrackIndexChange" }, ngImport: i0, template: "<div class=\"flex w-full flex-col gap-4\">\n\t<!-- Track List -->\n\t@if (showTrackList()) {\n\t\t<div class=\"rounded-box border-neutral shadow-main mb-4 border\">\n\t\t\t<div class=\"p-4\">\n\t\t\t\t<h4 typography tyVariant=\"h4\">{{ 'sdk.audioPlayer.trackListTitle' | translate }}</h4>\n\t\t\t\t<div class=\"max-h-[300px] space-y-2 overflow-y-auto\">\n\t\t\t\t\t@for (track of tracks(); track $index; let i = $index) {\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"rounded-field hover:bg-base-300 flex cursor-pointer items-center gap-2 p-2\"\n\t\t\t\t\t\t\t[class.bg-base-300]=\"audioPlayerService.currentTrackIndex() === i\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<st-button-play [trackIndex]=\"i\" (click)=\"handleOpen()\"> </st-button-play>\n\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body\">{{ track.title }}</div>\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body-sm\">{{ track.description }}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<div [class]=\"playerClass()\" (animationend)=\"handleAnimationEnd($event)\" (animationstart)=\"handleAnimationStart($event)\">\n\t\t<!-- close button -->\n\t\t@if (variant() === 'fixed') {\n\t\t\t<div\n\t\t\t\tclass=\"group/close btn btn-ghost btn-square btn-primary btn-xs absolute top-1 right-1 grid place-content-center gap-0 hover:cursor-pointer\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t(click)=\"handleClose()\"\n\t\t\t\t(keydown.enter)=\"handleClose()\"\n\t\t\t\taria-label=\"Close player\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content relative h-0.5 w-4 translate-y-0.5 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:rotate-45 group-hover/close:rotate-45 group-active/close:rotate-45\"\n\t\t\t\t></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content h-0.5 w-4 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:-rotate-45 group-hover/close:-rotate-45 group-active/close:-rotate-45\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t}\n\n\t\t<!-- track info -->\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Added min-w-0 to prevent overflow -->\n\t\t\t<st-track-info [currentTrack]=\"currentTrack()\"></st-track-info>\n\t\t</div>\n\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Center section -->\n\t\t\t<!-- Your controls content -->\n\t\t\t<div class=\"grid items-center\">\n\t\t\t\t<!-- Controls -->\n\t\t\t\t<div class=\"flex items-center justify-center gap-2\">\n\t\t\t\t\t<st-button (click)=\"previous()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipPrevious\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"togglePlay()\" [circle]=\"true\" size=\"sm\" [shadow]=\"true\">\n\t\t\t\t\t\t<st-icon [icon]=\"audioPlayerService.isPlaying() ? iconPause : iconPlay\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"next()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipNext\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Progress Bar -->\n\t\t\t\t<st-timeline (triggered)=\"handleInteraction()\"></st-timeline>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Volume Control -->\n\t\t<div class=\"min-w-0 justify-self-end\">\n\t\t\t<!-- Right-aligned -->\n\t\t\t<st-volume-control (triggered)=\"handleInteraction()\"></st-volume-control>\n\t\t</div>\n\t</div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "st-button", inputs: ["variant", "ghost", "outline", "link", "soft", "dash", "wide", "circle", "square", "glass", "block", "loader", "size", "shadow", "focusable", "icon", "iconPosition", "type", "disabled", "stopPropagation"], outputs: ["clicked", "pointerDown", "keyDownEnter", "keyDownSpace", "triggered"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }, { kind: "component", type: VolumeControlComponent, selector: "st-volume-control", inputs: ["stopPropagation"], outputs: ["clicked", "pointerDown", "triggered"] }, { kind: "component", type: TrackInfoComponent, selector: "st-track-info", inputs: ["currentTrack"] }, { kind: "component", type: AudioTimelineComponent, selector: "st-timeline", inputs: ["stopPropagation"], outputs: ["clicked", "pointerDown", "triggered"] }, { kind: "component", type: ButtonPlayComponent, selector: "st-button-play", inputs: ["variant", "ghost", "outline", "circle", "square", "glass", "size", "shadow", "asButton", "trackIndex"], outputs: ["togglePlay"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
522
604
  }
523
605
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AudioPlayerComponent, decorators: [{
524
606
  type: Component,
@@ -532,7 +614,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
532
614
  ButtonPlayComponent,
533
615
  TranslatePipe,
534
616
  IconComponent,
535
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex w-full flex-col gap-4\">\n\t<!-- Track List -->\n\t@if (showTrackList()) {\n\t\t<div class=\"rounded-box border-neutral shadow-main mb-4 border\">\n\t\t\t<div class=\"p-4\">\n\t\t\t\t<h4 typography tyVariant=\"h4\">{{ 'sdk.audioPlayer.trackListTitle' | translate }}</h4>\n\t\t\t\t<div class=\"max-h-[300px] space-y-2 overflow-y-auto\">\n\t\t\t\t\t@for (track of tracks(); track $index; let i = $index) {\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"rounded-field hover:bg-base-300 flex cursor-pointer items-center gap-2 p-2\"\n\t\t\t\t\t\t\t[class.bg-base-300]=\"audioPlayerService.currentTrackIndex() === i\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<st-button-play [trackIndex]=\"i\" (click)=\"handleOpen()\"> </st-button-play>\n\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body\">{{ track.title }}</div>\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body-sm\">{{ track.description }}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<div [class]=\"playerClass()\" (animationend)=\"handleAnimationEnd($event)\" (animationstart)=\"handleAnimationStart($event)\">\n\t\t<!-- close button -->\n\t\t@if (variant() === 'fixed') {\n\t\t\t<div\n\t\t\t\tclass=\"group/close btn btn-ghost btn-square btn-primary btn-xs absolute top-1 right-1 grid place-content-center gap-0 hover:cursor-pointer\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t(click)=\"handleClose()\"\n\t\t\t\t(keydown.enter)=\"handleClose()\"\n\t\t\t\taria-label=\"Close player\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content relative h-0.5 w-4 translate-y-0.5 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:rotate-45 group-hover/close:rotate-45 group-active/close:rotate-45\"\n\t\t\t\t></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content h-0.5 w-4 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:-rotate-45 group-hover/close:-rotate-45 group-active/close:-rotate-45\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t}\n\n\t\t<!-- track info -->\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Added min-w-0 to prevent overflow -->\n\t\t\t<st-track-info [currentTrack]=\"currentTrack()\"></st-track-info>\n\t\t</div>\n\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Center section -->\n\t\t\t<!-- Your controls content -->\n\t\t\t<div class=\"grid items-center\">\n\t\t\t\t<!-- Controls -->\n\t\t\t\t<div class=\"flex items-center justify-center gap-2\">\n\t\t\t\t\t<st-button (click)=\"previous()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipPrevious\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"togglePlay()\" [circle]=\"true\" size=\"sm\" [shadow]=\"true\">\n\t\t\t\t\t\t<st-icon [icon]=\"audioPlayerService.isPlaying() ? iconPause : iconPlay\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"next()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipNext\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Progress Bar -->\n\t\t\t\t<st-timeline></st-timeline>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Volume Control -->\n\t\t<div class=\"min-w-0 justify-self-end\">\n\t\t\t<!-- Right-aligned -->\n\t\t\t<st-volume-control></st-volume-control>\n\t\t</div>\n\t</div>\n</div>\n" }]
617
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex w-full flex-col gap-4\">\n\t<!-- Track List -->\n\t@if (showTrackList()) {\n\t\t<div class=\"rounded-box border-neutral shadow-main mb-4 border\">\n\t\t\t<div class=\"p-4\">\n\t\t\t\t<h4 typography tyVariant=\"h4\">{{ 'sdk.audioPlayer.trackListTitle' | translate }}</h4>\n\t\t\t\t<div class=\"max-h-[300px] space-y-2 overflow-y-auto\">\n\t\t\t\t\t@for (track of tracks(); track $index; let i = $index) {\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"rounded-field hover:bg-base-300 flex cursor-pointer items-center gap-2 p-2\"\n\t\t\t\t\t\t\t[class.bg-base-300]=\"audioPlayerService.currentTrackIndex() === i\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<st-button-play [trackIndex]=\"i\" (click)=\"handleOpen()\"> </st-button-play>\n\t\t\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body\">{{ track.title }}</div>\n\t\t\t\t\t\t\t\t<div typography tyVariant=\"body-sm\">{{ track.description }}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t}\n\n\t<div [class]=\"playerClass()\" (animationend)=\"handleAnimationEnd($event)\" (animationstart)=\"handleAnimationStart($event)\">\n\t\t<!-- close button -->\n\t\t@if (variant() === 'fixed') {\n\t\t\t<div\n\t\t\t\tclass=\"group/close btn btn-ghost btn-square btn-primary btn-xs absolute top-1 right-1 grid place-content-center gap-0 hover:cursor-pointer\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t(click)=\"handleClose()\"\n\t\t\t\t(keydown.enter)=\"handleClose()\"\n\t\t\t\taria-label=\"Close player\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content relative h-0.5 w-4 translate-y-0.5 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:rotate-45 group-hover/close:rotate-45 group-active/close:rotate-45\"\n\t\t\t\t></div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bg-primary group-hover/close:bg-primary-content group-active/close:bg-primary-content group-focus-within/close:bg-primary-content h-0.5 w-4 rounded-full transition-transform duration-300 ease-in-out group-focus-within/close:-rotate-45 group-hover/close:-rotate-45 group-active/close:-rotate-45\"\n\t\t\t\t></div>\n\t\t\t</div>\n\t\t}\n\n\t\t<!-- track info -->\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Added min-w-0 to prevent overflow -->\n\t\t\t<st-track-info [currentTrack]=\"currentTrack()\"></st-track-info>\n\t\t</div>\n\n\t\t<div class=\"min-w-0\">\n\t\t\t<!-- Center section -->\n\t\t\t<!-- Your controls content -->\n\t\t\t<div class=\"grid items-center\">\n\t\t\t\t<!-- Controls -->\n\t\t\t\t<div class=\"flex items-center justify-center gap-2\">\n\t\t\t\t\t<st-button (click)=\"previous()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipPrevious\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"togglePlay()\" [circle]=\"true\" size=\"sm\" [shadow]=\"true\">\n\t\t\t\t\t\t<st-icon [icon]=\"audioPlayerService.isPlaying() ? iconPause : iconPlay\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\n\t\t\t\t\t<st-button (click)=\"next()\" [ghost]=\"true\" [circle]=\"true\" size=\"sm\">\n\t\t\t\t\t\t<st-icon [icon]=\"iconSkipNext\" size=\"sm\"></st-icon>\n\t\t\t\t\t</st-button>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Progress Bar -->\n\t\t\t\t<st-timeline (triggered)=\"handleInteraction()\"></st-timeline>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Volume Control -->\n\t\t<div class=\"min-w-0 justify-self-end\">\n\t\t\t<!-- Right-aligned -->\n\t\t\t<st-volume-control (triggered)=\"handleInteraction()\"></st-volume-control>\n\t\t</div>\n\t</div>\n</div>\n" }]
536
618
  }], ctorParameters: () => [] });
537
619
 
538
620
  /**