@penwin/discord-components-core 4.3.7 → 4.3.9-dev-32917005672.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 (212) hide show
  1. package/CHANGELOG.md +826 -826
  2. package/LICENSE.md +20 -0
  3. package/README.md +673 -673
  4. package/custom-elements.json +1781 -1630
  5. package/dist/bundle/index.mjs +1912 -1991
  6. package/dist/bundle/index.mjs.map +1 -1
  7. package/dist/bundle/styles/base.css +1 -2
  8. package/dist/components/_private/BaseDiscordSelectMenuOption.js +72 -72
  9. package/dist/components/_private/DiscordMediaAttachmentStyles.js +114 -114
  10. package/dist/components/_private/DiscordPlaybackControlStyles.js +153 -153
  11. package/dist/components/_private/DiscordVolumeControlStyles.js +158 -158
  12. package/dist/components/_private/DiscordWhiteSpace.js +4 -4
  13. package/dist/components/discord-action-row/DiscordActionRow.js +6 -6
  14. package/dist/components/discord-attachments/DiscordAttachments.js +18 -18
  15. package/dist/components/discord-audio-attachment/DiscordAudioAttachment.js +202 -202
  16. package/dist/components/discord-author-info/DiscordAuthorInfo.d.ts.map +1 -1
  17. package/dist/components/discord-author-info/DiscordAuthorInfo.js +156 -156
  18. package/dist/components/discord-author-info/DiscordAuthorInfo.js.map +1 -1
  19. package/dist/components/discord-bold/DiscordBold.js +4 -4
  20. package/dist/components/discord-button/DiscordButton.d.ts.map +1 -1
  21. package/dist/components/discord-button/DiscordButton.js +131 -128
  22. package/dist/components/discord-button/DiscordButton.js.map +1 -1
  23. package/dist/components/discord-channel-select-menu-option/DiscordChannelSelectMenuOption.js +131 -131
  24. package/dist/components/discord-code/DiscordCode.js +64 -64
  25. package/dist/components/discord-code-block/DiscordCodeBlock.js +2 -2
  26. package/dist/components/discord-command/DiscordCommand.js +109 -109
  27. package/dist/components/discord-components-column/DiscordComponentsColumn.js +18 -18
  28. package/dist/components/discord-container/DiscordContainer.js +47 -47
  29. package/dist/components/discord-custom-emoji/DiscordCustomEmoji.js +36 -36
  30. package/dist/components/discord-embed/DiscordEmbed.d.ts.map +1 -1
  31. package/dist/components/discord-embed/DiscordEmbed.js +285 -285
  32. package/dist/components/discord-embed/DiscordEmbed.js.map +1 -1
  33. package/dist/components/discord-embed-description/DiscordEmbedDescription.js +25 -25
  34. package/dist/components/discord-embed-field/DiscordEmbedField.js +40 -40
  35. package/dist/components/discord-embed-fields/DiscordEmbedFields.js +19 -19
  36. package/dist/components/discord-embed-footer/DiscordEmbedFooter.js +36 -36
  37. package/dist/components/discord-file-attachment/DiscordFileAttachment.js +191 -191
  38. package/dist/components/discord-forwarded-message/DiscordForwardedMessage.js +126 -126
  39. package/dist/components/discord-header/DiscordHeader.js +27 -27
  40. package/dist/components/discord-image-attachment/DiscordImageAttachment.js +38 -38
  41. package/dist/components/discord-input-text/DiscordInputText.js +284 -284
  42. package/dist/components/discord-invite/DiscordInvite.js +225 -225
  43. package/dist/components/discord-italic/DiscordItalic.js +4 -4
  44. package/dist/components/discord-link/DiscordLink.js +19 -19
  45. package/dist/components/discord-list-item/DiscordListItem.d.ts.map +1 -1
  46. package/dist/components/discord-list-item/DiscordListItem.js +8 -5
  47. package/dist/components/discord-list-item/DiscordListItem.js.map +1 -1
  48. package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js +463 -463
  49. package/dist/components/discord-media-gallery/DiscordMediaGallery.js +219 -219
  50. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.d.ts.map +1 -1
  51. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js +102 -99
  52. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js.map +1 -1
  53. package/dist/components/discord-media-spoileable-cover/DiscordMediaSpoileableCover.js +65 -65
  54. package/dist/components/discord-mention/DiscordMention.js +66 -66
  55. package/dist/components/discord-message/DiscordMessage.d.ts.map +1 -1
  56. package/dist/components/discord-message/DiscordMessage.js +338 -335
  57. package/dist/components/discord-message/DiscordMessage.js.map +1 -1
  58. package/dist/components/discord-messages/DiscordMessages.js +77 -77
  59. package/dist/components/discord-modal/DiscordModal.js +465 -465
  60. package/dist/components/discord-ordered-list/DiscordOrderedList.d.ts.map +1 -1
  61. package/dist/components/discord-ordered-list/DiscordOrderedList.js +20 -14
  62. package/dist/components/discord-ordered-list/DiscordOrderedList.js.map +1 -1
  63. package/dist/components/discord-poll/DiscordPoll.js +157 -157
  64. package/dist/components/discord-poll-answer/DiscordPollAnswer.js +227 -227
  65. package/dist/components/discord-pre/DiscordPre.js +18 -18
  66. package/dist/components/discord-quote/DiscordQuote.d.ts.map +1 -1
  67. package/dist/components/discord-quote/DiscordQuote.js +31 -31
  68. package/dist/components/discord-quote/DiscordQuote.js.map +1 -1
  69. package/dist/components/discord-reaction/DiscordReaction.js +73 -73
  70. package/dist/components/discord-reactions/DiscordReactions.js +9 -9
  71. package/dist/components/discord-reply/DiscordReply.d.ts.map +1 -1
  72. package/dist/components/discord-reply/DiscordReply.js +246 -246
  73. package/dist/components/discord-reply/DiscordReply.js.map +1 -1
  74. package/dist/components/discord-role-select-menu-option/DiscordRoleSelectMenuOption.js +75 -75
  75. package/dist/components/discord-section/DiscordSection.js +6 -6
  76. package/dist/components/discord-section-components/DiscordSectionComponents.js +14 -14
  77. package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.d.ts +5 -1
  78. package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.d.ts.map +1 -1
  79. package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.js +53 -28
  80. package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.js.map +1 -1
  81. package/dist/components/discord-separator/DiscordSeparator.js +9 -9
  82. package/dist/components/discord-spoiler/DiscordSpoiler.js +31 -31
  83. package/dist/components/discord-string-select-menu/DiscordStringSelectMenu.js +192 -192
  84. package/dist/components/discord-string-select-menu-option/DiscordStringSelectMenuOption.js +45 -45
  85. package/dist/components/discord-subscript/DiscordSubscript.js +15 -15
  86. package/dist/components/discord-system-message/DiscordSystemMessage.d.ts.map +1 -1
  87. package/dist/components/discord-system-message/DiscordSystemMessage.js +134 -131
  88. package/dist/components/discord-system-message/DiscordSystemMessage.js.map +1 -1
  89. package/dist/components/discord-tenor-video/DiscordTenorVideo.js +76 -76
  90. package/dist/components/discord-text-display/DiscordTextDisplay.js +10 -10
  91. package/dist/components/discord-text-file-attachment-previewer/DiscordTextFileAttachmentPreviewer.js +55 -55
  92. package/dist/components/discord-thread/DiscordThread.js +81 -81
  93. package/dist/components/discord-thread-message/DiscordThreadMessage.js +90 -90
  94. package/dist/components/discord-thumbnail/DiscordThumbnail.js +20 -20
  95. package/dist/components/discord-time/DiscordTime.js +7 -7
  96. package/dist/components/discord-transcript-header/DiscordTranscriptHeader.js +51 -51
  97. package/dist/components/discord-unordered-list/DiscordUnorderedList.d.ts.map +1 -1
  98. package/dist/components/discord-unordered-list/DiscordUnorderedList.js +18 -15
  99. package/dist/components/discord-unordered-list/DiscordUnorderedList.js.map +1 -1
  100. package/dist/components/discord-user-select-menu-option/DiscordUserSelectMenuOption.js +58 -58
  101. package/dist/components/discord-verified-author-tag/DiscordVerifiedAuthorTag.js +36 -36
  102. package/dist/components/discord-video-attachment/DiscordVideoAttachment.js +494 -494
  103. package/dist/components/discord-voice-message/DiscordVoiceMessage.js +255 -255
  104. package/dist/components/svgs/AttachmentDownloadButton.js +67 -67
  105. package/dist/components/svgs/AttachmentReply.js +5 -5
  106. package/dist/components/svgs/Boost.js +3 -3
  107. package/dist/components/svgs/ChannelForum.js +19 -19
  108. package/dist/components/svgs/ChannelIcon.js +17 -17
  109. package/dist/components/svgs/ChannelThread.js +15 -15
  110. package/dist/components/svgs/ChannelsAndRoles.js +23 -23
  111. package/dist/components/svgs/CommandIcon.js +4 -4
  112. package/dist/components/svgs/CommandIconName.js +5 -5
  113. package/dist/components/svgs/CommandReply.js +9 -9
  114. package/dist/components/svgs/CustomizeCommunity.js +17 -17
  115. package/dist/components/svgs/DMCall.js +6 -6
  116. package/dist/components/svgs/DMEdit.js +8 -8
  117. package/dist/components/svgs/DMMissedCall.js +8 -8
  118. package/dist/components/svgs/Ephemeral.js +21 -21
  119. package/dist/components/svgs/ExpandMore.js +4 -4
  120. package/dist/components/svgs/FileAttachment.js +10 -10
  121. package/dist/components/svgs/GuildBadge.js +8 -8
  122. package/dist/components/svgs/LaunchIcon.js +9 -9
  123. package/dist/components/svgs/LockedVoiceChannel.js +17 -17
  124. package/dist/components/svgs/MediaPauseIcon.js +2 -2
  125. package/dist/components/svgs/MediaPlayIcon.js +2 -2
  126. package/dist/components/svgs/MediaRestartIcon.js +2 -2
  127. package/dist/components/svgs/MediaVolumeAbove50PercentIcon.js +3 -3
  128. package/dist/components/svgs/MediaVolumeBelow50PercentIcon.js +2 -2
  129. package/dist/components/svgs/MediaVolumeMutedIcon.js +2 -2
  130. package/dist/components/svgs/MessageIcon.js +3 -3
  131. package/dist/components/svgs/ModalClose.js +4 -4
  132. package/dist/components/svgs/ModalWarning.js +5 -5
  133. package/dist/components/svgs/PartnerBadgeOverlay.js +11 -11
  134. package/dist/components/svgs/Pin.js +5 -5
  135. package/dist/components/svgs/PremiumIcon.js +6 -6
  136. package/dist/components/svgs/ReplyIcon.js +5 -5
  137. package/dist/components/svgs/ServerGuide.js +17 -17
  138. package/dist/components/svgs/ServerUpgrade.js +7 -7
  139. package/dist/components/svgs/SystemAlert.js +7 -7
  140. package/dist/components/svgs/SystemError.js +6 -6
  141. package/dist/components/svgs/Thread.js +9 -9
  142. package/dist/components/svgs/UserJoin.js +5 -5
  143. package/dist/components/svgs/UserLeave.js +5 -5
  144. package/dist/components/svgs/VerifiedBadgeOverlay.js +4 -4
  145. package/dist/components/svgs/VerifiedTick.js +13 -13
  146. package/dist/components/svgs/VideoFullScreenIcon.js +8 -8
  147. package/dist/components/svgs/VideoPausePopIcon.js +2 -2
  148. package/dist/components/svgs/VideoPlayPopIcon.js +2 -2
  149. package/dist/components/svgs/VoiceChannel.js +19 -19
  150. package/dist/components/svgs/clan-icons/Crystal.js +27 -27
  151. package/dist/components/svgs/clan-icons/Diamond.js +35 -35
  152. package/dist/components/svgs/clan-icons/Explosion.js +30 -30
  153. package/dist/components/svgs/clan-icons/Flame.js +23 -23
  154. package/dist/components/svgs/clan-icons/Flower.js +18 -18
  155. package/dist/components/svgs/clan-icons/Heart.js +19 -19
  156. package/dist/components/svgs/clan-icons/Key.js +32 -32
  157. package/dist/components/svgs/clan-icons/Leaf.js +23 -23
  158. package/dist/components/svgs/clan-icons/Lightning.js +25 -25
  159. package/dist/components/svgs/clan-icons/Magic.js +34 -34
  160. package/dist/components/svgs/clan-icons/Moon.js +21 -21
  161. package/dist/components/svgs/clan-icons/Mushroom.js +33 -33
  162. package/dist/components/svgs/clan-icons/Mythical.js +32 -32
  163. package/dist/components/svgs/clan-icons/Ornament.js +48 -48
  164. package/dist/components/svgs/clan-icons/Plasma.js +23 -23
  165. package/dist/components/svgs/clan-icons/Rock.js +20 -20
  166. package/dist/components/svgs/clan-icons/Shell.js +29 -29
  167. package/dist/components/svgs/clan-icons/Skull.js +28 -28
  168. package/dist/components/svgs/clan-icons/Sun.js +36 -36
  169. package/dist/components/svgs/clan-icons/Sword.js +27 -27
  170. package/dist/components/svgs/clan-icons/Water.js +20 -20
  171. package/dist/config.d.ts +1 -1
  172. package/dist/config.d.ts.map +1 -1
  173. package/dist/config.js +9 -3
  174. package/dist/config.js.map +1 -1
  175. package/dist/hydrate/index.d.ts +40 -0
  176. package/dist/hydrate/index.d.ts.map +1 -0
  177. package/dist/hydrate/index.js +48 -0
  178. package/dist/hydrate/index.js.map +1 -0
  179. package/package.json +222 -219
  180. package/dist/bundle/styles/base.css.map +0 -1
  181. package/dist/components/discord-container copy/DiscordContainer.d.ts +0 -22
  182. package/dist/components/discord-container copy/DiscordContainer.d.ts.map +0 -1
  183. package/dist/components/discord-container copy/DiscordContainer.js +0 -159
  184. package/dist/components/discord-container copy/DiscordContainer.js.map +0 -1
  185. package/dist/components/discord-media-fullscreen-previewer/context.d.ts +0 -10
  186. package/dist/components/discord-media-fullscreen-previewer/context.d.ts.map +0 -1
  187. package/dist/components/discord-media-fullscreen-previewer/context.js +0 -3
  188. package/dist/components/discord-media-fullscreen-previewer/context.js.map +0 -1
  189. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts +0 -26
  190. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts.map +0 -1
  191. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js +0 -183
  192. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js.map +0 -1
  193. package/dist/components/discord-section/DiscordContainer.d.ts +0 -22
  194. package/dist/components/discord-section/DiscordContainer.d.ts.map +0 -1
  195. package/dist/components/discord-section/DiscordContainer.js +0 -159
  196. package/dist/components/discord-section/DiscordContainer.js.map +0 -1
  197. package/dist/components/discord-section copy/DiscordSection.d.ts +0 -15
  198. package/dist/components/discord-section copy/DiscordSection.d.ts.map +0 -1
  199. package/dist/components/discord-section copy/DiscordSection.js +0 -77
  200. package/dist/components/discord-section copy/DiscordSection.js.map +0 -1
  201. package/dist/components/discord-section-components/DiscordSection.d.ts +0 -15
  202. package/dist/components/discord-section-components/DiscordSection.d.ts.map +0 -1
  203. package/dist/components/discord-section-components/DiscordSection.js +0 -77
  204. package/dist/components/discord-section-components/DiscordSection.js.map +0 -1
  205. package/dist/components/discord-text-display/DiscordSection.d.ts +0 -15
  206. package/dist/components/discord-text-display/DiscordSection.d.ts.map +0 -1
  207. package/dist/components/discord-text-display/DiscordSection.js +0 -79
  208. package/dist/components/discord-text-display/DiscordSection.js.map +0 -1
  209. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts +0 -71
  210. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts.map +0 -1
  211. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js +0 -238
  212. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js.map +0 -1
@@ -10,24 +10,24 @@ let DiscordAttachments = class DiscordAttachments extends LitElement {
10
10
  /**
11
11
  * @internal
12
12
  */
13
- static { this.styles = css `
14
- :host {
15
- display: flex;
16
- flex-direction: column;
17
- row-gap: 0.25rem;
18
- text-indent: 0;
19
- min-height: 0;
20
- min-width: 0;
21
- padding-top: 0.125rem;
22
- padding-bottom: 0.125rem;
23
- position: relative;
24
- }
25
-
26
- :host > * {
27
- justify-self: start;
28
- -ms-flex-item-align: start;
29
- align-self: start;
30
- }
13
+ static { this.styles = css `
14
+ :host {
15
+ display: flex;
16
+ flex-direction: column;
17
+ row-gap: 0.25rem;
18
+ text-indent: 0;
19
+ min-height: 0;
20
+ min-width: 0;
21
+ padding-top: 0.125rem;
22
+ padding-bottom: 0.125rem;
23
+ position: relative;
24
+ }
25
+
26
+ :host > * {
27
+ justify-self: start;
28
+ -ms-flex-item-align: start;
29
+ align-self: start;
30
+ }
31
31
  `; }
32
32
  render() {
33
33
  return html `<slot></slot>`;
@@ -39,216 +39,216 @@ let DiscordAudioAttachment = class DiscordAudioAttachment extends DiscordMediaLi
39
39
  DiscordVolumeControlStyles,
40
40
  DiscordPlaybackControlStyles,
41
41
  DiscordMediaAttachmentStyles,
42
- css `
43
- :host {
44
- display: grid;
45
- height: -moz-fit-content;
46
- height: fit-content;
47
- grid-auto-flow: row;
48
- grid-row-gap: 0.25rem;
49
- grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
50
- text-indent: 0;
51
- min-height: 0;
52
- min-width: 0;
53
- padding-top: 0.125rem;
54
- padding-bottom: 0.125rem;
55
- position: relative;
56
-
57
- --seek-before-width: 0%;
58
- --buffered-width: 0%;
59
- --volume-slider-opacity: 0;
60
- }
61
-
62
- .discord-audio-attachment-non-visual-media-item {
63
- width: -moz-fit-content;
64
- width: fit-content;
65
- max-width: 100%;
66
- }
67
-
68
- .discord-media-attachment-mosaic-item-media {
69
- width: 100%;
70
- }
71
-
72
- .discord-audio-attachment-wrapper-audio {
73
- background-color: color-mix(in oklab, hsl(231.429 calc(1 * 6.542%) 20.98% /1) 100%, #000 0%);
74
- border-color: color-mix(in oklab, hsl(240 calc(1 * 6.494%) 15.098% /1) 100%, #000 0%);
75
- border-radius: 8px;
76
- border-style: solid;
77
- border-width: 1px;
78
- box-sizing: border-box;
79
- color: hsl(0 calc(1 * 0%) 100% / 1);
80
- display: flex;
81
- flex-direction: column;
82
- flex: auto;
83
- height: auto;
84
- justify-content: space-between;
85
- max-width: 100%;
86
- overflow: visible;
87
- padding: 16px;
88
- position: relative;
89
- user-select: none;
90
- width: 432px;
91
- }
92
-
93
- .discord-audio-attachment-light-theme.discord-audio-attachment-wrapper-audio {
94
- border-color: #ebebed;
95
- background-color: #f9f9f9;
96
- }
97
-
98
- .discord-audio-attachment-audio-metadata {
99
- display: flex;
100
- }
101
-
102
- .discord-audio-attachment-audio-metadata::before {
103
- width: 24px;
104
- height: 40px;
105
- content: '';
106
- background-image: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9Ijk2IiB2aWV3Qm94PSIwIDAgNzIgOTYiIHdpZHRoPSI3MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNzIgMjkuM3Y2MC4zYzAgMi4yNCAwIDMuMzYtLjQ0IDQuMjItLjM4Ljc0LTEgMS4zNi0xLjc0IDEuNzQtLjg2LjQ0LTEuOTguNDQtNC4yMi40NGgtNTkuMmMtMi4yNCAwLTMuMzYgMC00LjIyLS40NC0uNzQtLjM4LTEuMzYtMS0xLjc0LTEuNzQtLjQ0LS44Ni0uNDQtMS45OC0uNDQtNC4yMnYtODMuMmMwLTIuMjQgMC0zLjM2LjQ0LTQuMjIuMzgtLjc0IDEtMS4zNiAxLjc0LTEuNzQuODYtLjQ0IDEuOTgtLjQ0IDQuMjItLjQ0aDM2LjNjMS45NiAwIDIuOTQgMCAzLjg2LjIyLjUuMTIuOTguMjggMS40NC41djE2Ljg4YzAgMi4yNCAwIDMuMzYuNDQgNC4yMi4zOC43NCAxIDEuMzYgMS43NCAxLjc0Ljg2LjQ0IDEuOTguNDQgNC4yMi40NGgxNi44OGMuMjIuNDYuMzguOTQuNSAxLjQ0LjIyLjkyLjIyIDEuOS4yMiAzLjg2eiIgZmlsbD0iI2QzZDZmZCIvPjxwYXRoIGQ9Im02OC4yNiAyMC4yNmMxLjM4IDEuMzggMi4wNiAyLjA2IDIuNTYgMi44OC4xOC4yOC4zMi41Ni40Ni44NmgtMTYuODhjLTIuMjQgMC0zLjM2IDAtNC4yMi0uNDQtLjc0LS4zOC0xLjM2LTEtMS43NC0xLjc0LS40NC0uODYtLjQ0LTEuOTgtLjQ0LTQuMjJ2LTE2Ljg4MDAyOWMuMy4xNC41OC4yOC44Ni40NTk5OTkuODIuNSAxLjUgMS4xOCAyLjg4IDIuNTZ6IiBmaWxsPSIjOTM5YmY5Ii8+PHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJtMzQuNzYgNDIuMTZjLS43NC0uMy0xLjYtLjE0LTIuMTguNDRsLTguNTggOS40aC02Yy0xLjEgMC0yIC45LTIgMnYxMmMwIDEuMS45IDIgMiAyaDZsOC41OCA5LjQyYy41OC41OCAxLjQ0Ljc0IDIuMTguNDQuNzYtLjMyIDEuMjQtMS4wNiAxLjI0LTEuODZ2LTMyYzAtLjgtLjQ4LTEuNTQtMS4yNC0xLjg0em01LjI0IDMuODR2NGM1LjUyIDAgMTAgNC40OCAxMCAxMHMtNC40OCAxMC0xMCAxMHY0YzcuNzIgMCAxNC02LjI4IDE0LTE0cy02LjI4LTE0LTE0LTE0em0wIDhjMy4zIDAgNiAyLjcgNiA2cy0yLjcgNi02IDZ2LTRjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yeiIgZmlsbD0iIzU4NjVmMiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+');
107
- background-size: 100%auto;
108
- background-repeat: no-repeat;
109
- }
110
-
111
- .discord-audio-attachment-audio-metadata-content {
112
- padding: 0 8px;
113
- flex: 1 1 auto;
114
- white-space: nowrap;
115
- overflow: hidden;
116
- }
117
-
118
- .discord-audio-attachment-audio-metadata-size {
119
- color: color-mix(in oklab, hsl(214 calc(1 * 8.1%) 61.2% / 1) 100%, black 0%);
120
- font-size: 12px;
121
- line-height: 16px;
122
- font-weight: 500;
123
- opacity: 0.7;
124
- white-space: nowrap;
125
- text-overflow: ellipsis;
126
- overflow: hidden;
127
- }
128
-
129
- .discord-audio-attachment-audio-element {
130
- display: none !important;
131
- position: absolute;
132
- width: 0;
133
- height: 0;
134
- }
42
+ css `
43
+ :host {
44
+ display: grid;
45
+ height: -moz-fit-content;
46
+ height: fit-content;
47
+ grid-auto-flow: row;
48
+ grid-row-gap: 0.25rem;
49
+ grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
50
+ text-indent: 0;
51
+ min-height: 0;
52
+ min-width: 0;
53
+ padding-top: 0.125rem;
54
+ padding-bottom: 0.125rem;
55
+ position: relative;
56
+
57
+ --seek-before-width: 0%;
58
+ --buffered-width: 0%;
59
+ --volume-slider-opacity: 0;
60
+ }
61
+
62
+ .discord-audio-attachment-non-visual-media-item {
63
+ width: -moz-fit-content;
64
+ width: fit-content;
65
+ max-width: 100%;
66
+ }
67
+
68
+ .discord-media-attachment-mosaic-item-media {
69
+ width: 100%;
70
+ }
71
+
72
+ .discord-audio-attachment-wrapper-audio {
73
+ background-color: color-mix(in oklab, hsl(231.429 calc(1 * 6.542%) 20.98% /1) 100%, #000 0%);
74
+ border-color: color-mix(in oklab, hsl(240 calc(1 * 6.494%) 15.098% /1) 100%, #000 0%);
75
+ border-radius: 8px;
76
+ border-style: solid;
77
+ border-width: 1px;
78
+ box-sizing: border-box;
79
+ color: hsl(0 calc(1 * 0%) 100% / 1);
80
+ display: flex;
81
+ flex-direction: column;
82
+ flex: auto;
83
+ height: auto;
84
+ justify-content: space-between;
85
+ max-width: 100%;
86
+ overflow: visible;
87
+ padding: 16px;
88
+ position: relative;
89
+ user-select: none;
90
+ width: 432px;
91
+ }
92
+
93
+ .discord-audio-attachment-light-theme.discord-audio-attachment-wrapper-audio {
94
+ border-color: #ebebed;
95
+ background-color: #f9f9f9;
96
+ }
97
+
98
+ .discord-audio-attachment-audio-metadata {
99
+ display: flex;
100
+ }
101
+
102
+ .discord-audio-attachment-audio-metadata::before {
103
+ width: 24px;
104
+ height: 40px;
105
+ content: '';
106
+ background-image: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9Ijk2IiB2aWV3Qm94PSIwIDAgNzIgOTYiIHdpZHRoPSI3MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNzIgMjkuM3Y2MC4zYzAgMi4yNCAwIDMuMzYtLjQ0IDQuMjItLjM4Ljc0LTEgMS4zNi0xLjc0IDEuNzQtLjg2LjQ0LTEuOTguNDQtNC4yMi40NGgtNTkuMmMtMi4yNCAwLTMuMzYgMC00LjIyLS40NC0uNzQtLjM4LTEuMzYtMS0xLjc0LTEuNzQtLjQ0LS44Ni0uNDQtMS45OC0uNDQtNC4yMnYtODMuMmMwLTIuMjQgMC0zLjM2LjQ0LTQuMjIuMzgtLjc0IDEtMS4zNiAxLjc0LTEuNzQuODYtLjQ0IDEuOTgtLjQ0IDQuMjItLjQ0aDM2LjNjMS45NiAwIDIuOTQgMCAzLjg2LjIyLjUuMTIuOTguMjggMS40NC41djE2Ljg4YzAgMi4yNCAwIDMuMzYuNDQgNC4yMi4zOC43NCAxIDEuMzYgMS43NCAxLjc0Ljg2LjQ0IDEuOTguNDQgNC4yMi40NGgxNi44OGMuMjIuNDYuMzguOTQuNSAxLjQ0LjIyLjkyLjIyIDEuOS4yMiAzLjg2eiIgZmlsbD0iI2QzZDZmZCIvPjxwYXRoIGQ9Im02OC4yNiAyMC4yNmMxLjM4IDEuMzggMi4wNiAyLjA2IDIuNTYgMi44OC4xOC4yOC4zMi41Ni40Ni44NmgtMTYuODhjLTIuMjQgMC0zLjM2IDAtNC4yMi0uNDQtLjc0LS4zOC0xLjM2LTEtMS43NC0xLjc0LS40NC0uODYtLjQ0LTEuOTgtLjQ0LTQuMjJ2LTE2Ljg4MDAyOWMuMy4xNC41OC4yOC44Ni40NTk5OTkuODIuNSAxLjUgMS4xOCAyLjg4IDIuNTZ6IiBmaWxsPSIjOTM5YmY5Ii8+PHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJtMzQuNzYgNDIuMTZjLS43NC0uMy0xLjYtLjE0LTIuMTguNDRsLTguNTggOS40aC02Yy0xLjEgMC0yIC45LTIgMnYxMmMwIDEuMS45IDIgMiAyaDZsOC41OCA5LjQyYy41OC41OCAxLjQ0Ljc0IDIuMTguNDQuNzYtLjMyIDEuMjQtMS4wNiAxLjI0LTEuODZ2LTMyYzAtLjgtLjQ4LTEuNTQtMS4yNC0xLjg0em01LjI0IDMuODR2NGM1LjUyIDAgMTAgNC40OCAxMCAxMHMtNC40OCAxMC0xMCAxMHY0YzcuNzIgMCAxNC02LjI4IDE0LTE0cy02LjI4LTE0LTE0LTE0em0wIDhjMy4zIDAgNiAyLjcgNiA2cy0yLjcgNi02IDZ2LTRjMS4xIDAgMi0uOSAyLTJzLS45LTItMi0yeiIgZmlsbD0iIzU4NjVmMiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+');
107
+ background-size: 100%auto;
108
+ background-repeat: no-repeat;
109
+ }
110
+
111
+ .discord-audio-attachment-audio-metadata-content {
112
+ padding: 0 8px;
113
+ flex: 1 1 auto;
114
+ white-space: nowrap;
115
+ overflow: hidden;
116
+ }
117
+
118
+ .discord-audio-attachment-audio-metadata-size {
119
+ color: color-mix(in oklab, hsl(214 calc(1 * 8.1%) 61.2% / 1) 100%, black 0%);
120
+ font-size: 12px;
121
+ line-height: 16px;
122
+ font-weight: 500;
123
+ opacity: 0.7;
124
+ white-space: nowrap;
125
+ text-overflow: ellipsis;
126
+ overflow: hidden;
127
+ }
128
+
129
+ .discord-audio-attachment-audio-element {
130
+ display: none !important;
131
+ position: absolute;
132
+ width: 0;
133
+ height: 0;
134
+ }
135
135
  `
136
136
  ]; }
137
137
  render() {
138
138
  const parsedName = this.name?.replaceAll(/\s/g, '_')?.replaceAll(/[^\w-]/g, '');
139
- return html `<div class="discord-media-attachment-non-visual-media-item-container">
140
- <div class="discord-audio-attachment-non-visual-media-item">
141
- <div class="discord-media-attachment-mosaic-item-media">
142
- <div
143
- class=${classMap({ 'discord-audio-attachment-wrapper-audio': true, 'discord-audio-attachment-light-theme': this.lightTheme })}
144
- >
145
- <div class="discord-audio-attachment-audio-metadata">
146
- <div class="discord-audio-attachment-audio-metadata-content">
147
- <discord-link
148
- href=${ifDefined(this.href)}
149
- ref="noreferrer noopener"
150
- target="_blank"
151
- role="button"
152
- aria-label="Download"
153
- >
154
- ${parsedName}
155
- </discord-link>
156
- <div class="discord-audio-attachment-audio-metadata-size">
157
- ${this.bytes}${when(this.bytesUnit, () => html ` ${this.bytesUnit}`, () => null)}
158
- </div>
159
- </div>
160
- </div>
161
- <audio
162
- ${ref(this.mediaComponentRef)}
163
- class="discord-audio-attachment-audio-element"
164
- preload="metadata"
165
- @progress=${this.displayBufferedAmount}
166
- @ended=${this.handleEnded}
167
- >
168
- <source src=${ifDefined(this.href)} />
169
- </audio>
170
- <div class="discord-media-attachment-controls" style="transform: translateY(0%)">
171
- <div
172
- class="discord-media-attachment-video-button"
173
- tabindex="0"
174
- aria-label="${this.isPlaying ? 'Pause' : 'Play'}"
175
- role="button"
176
- @click=${this.handleClickPlayPauseIcon}
177
- @keydown=${this.handleSpaceToPlayPause}
178
- >
179
- ${when(this.hasEnded, () => MediaRestartIcon({ class: 'discord-media-attachment-control-icon' }), () => when(this.isPlaying, () => MediaPauseIcon({ class: 'discord-media-attachment-control-icon' }), () => MediaPlayIcon({ class: 'discord-media-attachment-control-icon' })))}
180
- </div>
181
- <div class="discord-media-attachment-duration-time-wrapper">
182
- <span role="status" class="discord-media-attachment-duration-time-display">${this.currentPlaybackPosition}</span>
183
- <span
184
- role="separator"
185
- class="discord-media-attachment-duration-time-display discord-media-attachment-duration-time-separator"
186
- >/</span
187
- >
188
- <span class="discord-media-attachment-duration-time-display">${this.totalMediaDuration}</span>
189
- </div>
190
- <div class="discord-media-attachment-horizontal">
191
- <div class="discord-media-attachment-media-bar-interaction">
192
- <input
193
- type="range"
194
- ${ref(this.seekSliderRef)}
195
- class="discord-media-attachment-playback-control"
196
- @input=${this.handleSeekSliderInput}
197
- @change=${this.handleSeekSliderChange}
198
- max="100"
199
- value="0"
200
- />
201
- </div>
202
- </div>
203
- <div class="discord-media-attachment-flex discord-volume-container">
204
- <div class="discord-media-attachment-flex-container">
205
- <button
206
- aria-label="Control volume"
207
- type="button"
208
- class="discord-media-attachment-button"
209
- @focus=${this.handleVolumeVerticalFocus}
210
- @blur=${this.handleVolumeVerticalBlur}
211
- @click=${this.handleClickMuteIcon}
212
- >
213
- <div class="discord-media-attachment-button-content">
139
+ return html `<div class="discord-media-attachment-non-visual-media-item-container">
140
+ <div class="discord-audio-attachment-non-visual-media-item">
141
+ <div class="discord-media-attachment-mosaic-item-media">
142
+ <div
143
+ class=${classMap({ 'discord-audio-attachment-wrapper-audio': true, 'discord-audio-attachment-light-theme': this.lightTheme })}
144
+ >
145
+ <div class="discord-audio-attachment-audio-metadata">
146
+ <div class="discord-audio-attachment-audio-metadata-content">
147
+ <discord-link
148
+ href=${ifDefined(this.href)}
149
+ ref="noreferrer noopener"
150
+ target="_blank"
151
+ role="button"
152
+ aria-label="Download"
153
+ >
154
+ ${parsedName}
155
+ </discord-link>
156
+ <div class="discord-audio-attachment-audio-metadata-size">
157
+ ${this.bytes}${when(this.bytesUnit, () => html ` ${this.bytesUnit}`, () => null)}
158
+ </div>
159
+ </div>
160
+ </div>
161
+ <audio
162
+ ${ref(this.mediaComponentRef)}
163
+ class="discord-audio-attachment-audio-element"
164
+ preload="metadata"
165
+ @progress=${this.displayBufferedAmount}
166
+ @ended=${this.handleEnded}
167
+ >
168
+ <source src=${ifDefined(this.href)} />
169
+ </audio>
170
+ <div class="discord-media-attachment-controls" style="transform: translateY(0%)">
171
+ <div
172
+ class="discord-media-attachment-video-button"
173
+ tabindex="0"
174
+ aria-label="${this.isPlaying ? 'Pause' : 'Play'}"
175
+ role="button"
176
+ @click=${this.handleClickPlayPauseIcon}
177
+ @keydown=${this.handleSpaceToPlayPause}
178
+ >
179
+ ${when(this.hasEnded, () => MediaRestartIcon({ class: 'discord-media-attachment-control-icon' }), () => when(this.isPlaying, () => MediaPauseIcon({ class: 'discord-media-attachment-control-icon' }), () => MediaPlayIcon({ class: 'discord-media-attachment-control-icon' })))}
180
+ </div>
181
+ <div class="discord-media-attachment-duration-time-wrapper">
182
+ <span role="status" class="discord-media-attachment-duration-time-display">${this.currentPlaybackPosition}</span>
183
+ <span
184
+ role="separator"
185
+ class="discord-media-attachment-duration-time-display discord-media-attachment-duration-time-separator"
186
+ >/</span
187
+ >
188
+ <span class="discord-media-attachment-duration-time-display">${this.totalMediaDuration}</span>
189
+ </div>
190
+ <div class="discord-media-attachment-horizontal">
191
+ <div class="discord-media-attachment-media-bar-interaction">
192
+ <input
193
+ type="range"
194
+ ${ref(this.seekSliderRef)}
195
+ class="discord-media-attachment-playback-control"
196
+ @input=${this.handleSeekSliderInput}
197
+ @change=${this.handleSeekSliderChange}
198
+ max="100"
199
+ value="0"
200
+ />
201
+ </div>
202
+ </div>
203
+ <div class="discord-media-attachment-flex discord-volume-container">
204
+ <div class="discord-media-attachment-flex-container">
205
+ <button
206
+ aria-label="Control volume"
207
+ type="button"
208
+ class="discord-media-attachment-button"
209
+ @focus=${this.handleVolumeVerticalFocus}
210
+ @blur=${this.handleVolumeVerticalBlur}
211
+ @click=${this.handleClickMuteIcon}
212
+ >
213
+ <div class="discord-media-attachment-button-content">
214
214
  ${when(this.currentVolume === 0 || this.isMuted, () => MediaVolumeMutedIcon({ class: 'discord-media-attachment-button-control-icon' }), () => when(this.currentVolume <= 0.5, () => MediaVolumeBelow50PercentIcon({
215
215
  class: 'discord-media-attachment-button-control-icon'
216
216
  }), () => MediaVolumeAbove50PercentIcon({
217
217
  class: 'discord-media-attachment-button-control-icon'
218
- })))}
219
- </div>
220
- </button>
221
- <div ${ref(this.volumeControlRef)} class="discord-media-attachment-button-slider">
222
- <div class="discord-media-attachment-volume-vertical">
223
- <input
224
- ${ref(this.volumeControlInputRef)}
225
- type="range"
226
- class="discord-media-attachment-volume-slider"
227
- @input=${this.handleVolumeSliderInput}
228
- max="100"
229
- value="100"
230
- />
231
- </div>
232
- </div>
233
- </div>
234
- </div>
235
- </div>
236
- </div>
237
- </div>
238
- </div>
239
- <div class="discord-button-download-attachment">
240
- <a
241
- class="discord-link-download-attachment"
242
- aria-label="Download"
243
- href="${ifDefined(this.href)}"
244
- rel="noreferrer noopener"
245
- target="_blank"
246
- role="button"
247
- tabindex="0"
248
- >
249
- ${AttachmentDownloadButton()}
250
- </a>
251
- </div>
218
+ })))}
219
+ </div>
220
+ </button>
221
+ <div ${ref(this.volumeControlRef)} class="discord-media-attachment-button-slider">
222
+ <div class="discord-media-attachment-volume-vertical">
223
+ <input
224
+ ${ref(this.volumeControlInputRef)}
225
+ type="range"
226
+ class="discord-media-attachment-volume-slider"
227
+ @input=${this.handleVolumeSliderInput}
228
+ max="100"
229
+ value="100"
230
+ />
231
+ </div>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ <div class="discord-button-download-attachment">
240
+ <a
241
+ class="discord-link-download-attachment"
242
+ aria-label="Download"
243
+ href="${ifDefined(this.href)}"
244
+ rel="noreferrer noopener"
245
+ target="_blank"
246
+ role="button"
247
+ tabindex="0"
248
+ >
249
+ ${AttachmentDownloadButton()}
250
+ </a>
251
+ </div>
252
252
  </div>`;
253
253
  }
254
254
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DiscordAuthorInfo.d.ts","sourceRoot":"","sources":["../../../src/components/discord-author-info/DiscordAuthorInfo.ts"],"names":[],"mappings":"AAAA,OAAO,4DAA4D,CAAC;AAGpE,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAS5C,qBACa,iBAAkB,SAAQ,UAAU;IAChD;;OAEG;IACH,gBAAgC,MAAM,0BAyIpC;IAEF;;OAEG;IAEI,MAAM,EAAE,MAAM,GAAG,SAAS,CAAa;IAE9C;;OAEG;IAEI,GAAG,UAAS;IAEnB;;OAEG;IAEI,MAAM,UAAS;IAEtB;;OAEG;IAEI,WAAW,UAAS;IAE3B;;OAEG;IAEI,EAAE,UAAS;IAElB;;OAEG;IAEI,SAAS,EAAE,MAAM,GAAG,SAAS,CAAa;IAEjD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IAE/C;;OAEG;IAEI,QAAQ,UAAS;IAExB;;OAEG;IAGI,WAAW,UAAS;IAIpB,UAAU,UAAS;cAEP,MAAM;CA+CzB;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,iBAAiB,CAAC;KACzC;CACD"}
1
+ {"version":3,"file":"DiscordAuthorInfo.d.ts","sourceRoot":"","sources":["../../../src/components/discord-author-info/DiscordAuthorInfo.ts"],"names":[],"mappings":"AAAA,OAAO,4DAA4D,CAAC;AAGpE,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAS5C,qBACa,iBAAkB,SAAQ,UAAU;IAChD;;OAEG;IACH,gBAAgC,MAAM,0BAyIpC;IAEF;;OAEG;IAEI,MAAM,EAAE,MAAM,GAAG,SAAS,CAAa;IAE9C;;OAEG;IAEI,GAAG,UAAS;IAEnB;;OAEG;IAEI,MAAM,UAAS;IAEtB;;OAEG;IAEI,WAAW,UAAS;IAE3B;;OAEG;IAEI,EAAE,UAAS;IAElB;;OAEG;IAEI,SAAS,EAAE,MAAM,GAAG,SAAS,CAAa;IAEjD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEhD;;OAEG;IAEI,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IAE/C;;OAEG;IAEI,QAAQ,UAAS;IAExB;;OAEG;IAGI,WAAW,UAAS;IAIpB,UAAU,UAAS;cAEP,MAAM;CAiDzB;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,qBAAqB,EAAE,iBAAiB,CAAC;KACzC;CACD"}