@penwin/discord-components-core 4.3.8 → 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.
- package/CHANGELOG.md +826 -826
- package/LICENSE.md +20 -0
- package/README.md +673 -673
- package/custom-elements.json +1803 -1708
- package/dist/bundle/index.mjs +1898 -1981
- package/dist/bundle/index.mjs.map +1 -1
- package/dist/bundle/styles/base.css +1 -2
- package/dist/components/_private/BaseDiscordSelectMenuOption.js +72 -72
- package/dist/components/_private/DiscordMediaAttachmentStyles.js +114 -114
- package/dist/components/_private/DiscordPlaybackControlStyles.js +153 -153
- package/dist/components/_private/DiscordVolumeControlStyles.js +158 -158
- package/dist/components/_private/DiscordWhiteSpace.js +4 -4
- package/dist/components/discord-action-row/DiscordActionRow.js +6 -6
- package/dist/components/discord-attachments/DiscordAttachments.js +18 -18
- package/dist/components/discord-audio-attachment/DiscordAudioAttachment.js +202 -202
- package/dist/components/discord-author-info/DiscordAuthorInfo.d.ts.map +1 -1
- package/dist/components/discord-author-info/DiscordAuthorInfo.js +156 -156
- package/dist/components/discord-author-info/DiscordAuthorInfo.js.map +1 -1
- package/dist/components/discord-bold/DiscordBold.js +4 -4
- package/dist/components/discord-button/DiscordButton.d.ts.map +1 -1
- package/dist/components/discord-button/DiscordButton.js +131 -128
- package/dist/components/discord-button/DiscordButton.js.map +1 -1
- package/dist/components/discord-channel-select-menu-option/DiscordChannelSelectMenuOption.js +131 -131
- package/dist/components/discord-code/DiscordCode.js +64 -64
- package/dist/components/discord-code-block/DiscordCodeBlock.js +2 -2
- package/dist/components/discord-command/DiscordCommand.js +109 -109
- package/dist/components/discord-components-column/DiscordComponentsColumn.js +18 -18
- package/dist/components/discord-container/DiscordContainer.js +47 -47
- package/dist/components/discord-custom-emoji/DiscordCustomEmoji.js +36 -36
- package/dist/components/discord-embed/DiscordEmbed.d.ts.map +1 -1
- package/dist/components/discord-embed/DiscordEmbed.js +285 -285
- package/dist/components/discord-embed/DiscordEmbed.js.map +1 -1
- package/dist/components/discord-embed-description/DiscordEmbedDescription.js +25 -25
- package/dist/components/discord-embed-field/DiscordEmbedField.js +40 -40
- package/dist/components/discord-embed-fields/DiscordEmbedFields.js +19 -19
- package/dist/components/discord-embed-footer/DiscordEmbedFooter.js +36 -36
- package/dist/components/discord-file-attachment/DiscordFileAttachment.js +191 -191
- package/dist/components/discord-forwarded-message/DiscordForwardedMessage.js +126 -126
- package/dist/components/discord-header/DiscordHeader.js +27 -27
- package/dist/components/discord-image-attachment/DiscordImageAttachment.js +38 -38
- package/dist/components/discord-input-text/DiscordInputText.js +284 -284
- package/dist/components/discord-invite/DiscordInvite.js +225 -225
- package/dist/components/discord-italic/DiscordItalic.js +4 -4
- package/dist/components/discord-link/DiscordLink.js +19 -19
- package/dist/components/discord-list-item/DiscordListItem.d.ts.map +1 -1
- package/dist/components/discord-list-item/DiscordListItem.js +8 -5
- package/dist/components/discord-list-item/DiscordListItem.js.map +1 -1
- package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js +463 -463
- package/dist/components/discord-media-gallery/DiscordMediaGallery.js +219 -219
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.d.ts.map +1 -1
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js +102 -99
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js.map +1 -1
- package/dist/components/discord-media-spoileable-cover/DiscordMediaSpoileableCover.js +65 -65
- package/dist/components/discord-mention/DiscordMention.js +66 -66
- package/dist/components/discord-message/DiscordMessage.d.ts.map +1 -1
- package/dist/components/discord-message/DiscordMessage.js +338 -335
- package/dist/components/discord-message/DiscordMessage.js.map +1 -1
- package/dist/components/discord-messages/DiscordMessages.js +77 -77
- package/dist/components/discord-modal/DiscordModal.js +465 -465
- package/dist/components/discord-ordered-list/DiscordOrderedList.d.ts.map +1 -1
- package/dist/components/discord-ordered-list/DiscordOrderedList.js +20 -14
- package/dist/components/discord-ordered-list/DiscordOrderedList.js.map +1 -1
- package/dist/components/discord-poll/DiscordPoll.js +157 -157
- package/dist/components/discord-poll-answer/DiscordPollAnswer.js +227 -227
- package/dist/components/discord-pre/DiscordPre.js +18 -18
- package/dist/components/discord-quote/DiscordQuote.js +31 -31
- package/dist/components/discord-reaction/DiscordReaction.js +73 -73
- package/dist/components/discord-reactions/DiscordReactions.js +9 -9
- package/dist/components/discord-reply/DiscordReply.d.ts.map +1 -1
- package/dist/components/discord-reply/DiscordReply.js +246 -246
- package/dist/components/discord-reply/DiscordReply.js.map +1 -1
- package/dist/components/discord-role-select-menu-option/DiscordRoleSelectMenuOption.js +75 -75
- package/dist/components/discord-section/DiscordSection.js +6 -6
- package/dist/components/discord-section-components/DiscordSectionComponents.js +14 -14
- package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.js +30 -30
- package/dist/components/discord-separator/DiscordSeparator.js +9 -9
- package/dist/components/discord-spoiler/DiscordSpoiler.js +31 -31
- package/dist/components/discord-string-select-menu/DiscordStringSelectMenu.js +192 -192
- package/dist/components/discord-string-select-menu-option/DiscordStringSelectMenuOption.js +45 -45
- package/dist/components/discord-subscript/DiscordSubscript.js +15 -15
- package/dist/components/discord-system-message/DiscordSystemMessage.d.ts.map +1 -1
- package/dist/components/discord-system-message/DiscordSystemMessage.js +134 -131
- package/dist/components/discord-system-message/DiscordSystemMessage.js.map +1 -1
- package/dist/components/discord-tenor-video/DiscordTenorVideo.js +76 -76
- package/dist/components/discord-text-display/DiscordTextDisplay.js +10 -10
- package/dist/components/discord-text-file-attachment-previewer/DiscordTextFileAttachmentPreviewer.js +55 -55
- package/dist/components/discord-thread/DiscordThread.js +81 -81
- package/dist/components/discord-thread-message/DiscordThreadMessage.js +90 -90
- package/dist/components/discord-thumbnail/DiscordThumbnail.js +20 -20
- package/dist/components/discord-time/DiscordTime.js +7 -7
- package/dist/components/discord-transcript-header/DiscordTranscriptHeader.js +51 -51
- package/dist/components/discord-unordered-list/DiscordUnorderedList.d.ts.map +1 -1
- package/dist/components/discord-unordered-list/DiscordUnorderedList.js +18 -15
- package/dist/components/discord-unordered-list/DiscordUnorderedList.js.map +1 -1
- package/dist/components/discord-user-select-menu-option/DiscordUserSelectMenuOption.js +58 -58
- package/dist/components/discord-verified-author-tag/DiscordVerifiedAuthorTag.js +36 -36
- package/dist/components/discord-video-attachment/DiscordVideoAttachment.js +494 -494
- package/dist/components/discord-voice-message/DiscordVoiceMessage.js +255 -255
- package/dist/components/svgs/AttachmentDownloadButton.js +67 -67
- package/dist/components/svgs/AttachmentReply.js +5 -5
- package/dist/components/svgs/Boost.js +3 -3
- package/dist/components/svgs/ChannelForum.js +19 -19
- package/dist/components/svgs/ChannelIcon.js +17 -17
- package/dist/components/svgs/ChannelThread.js +15 -15
- package/dist/components/svgs/ChannelsAndRoles.js +23 -23
- package/dist/components/svgs/CommandIcon.js +4 -4
- package/dist/components/svgs/CommandIconName.js +5 -5
- package/dist/components/svgs/CommandReply.js +9 -9
- package/dist/components/svgs/CustomizeCommunity.js +17 -17
- package/dist/components/svgs/DMCall.js +6 -6
- package/dist/components/svgs/DMEdit.js +8 -8
- package/dist/components/svgs/DMMissedCall.js +8 -8
- package/dist/components/svgs/Ephemeral.js +21 -21
- package/dist/components/svgs/ExpandMore.js +4 -4
- package/dist/components/svgs/FileAttachment.js +10 -10
- package/dist/components/svgs/GuildBadge.js +8 -8
- package/dist/components/svgs/LaunchIcon.js +9 -9
- package/dist/components/svgs/LockedVoiceChannel.js +17 -17
- package/dist/components/svgs/MediaPauseIcon.js +2 -2
- package/dist/components/svgs/MediaPlayIcon.js +2 -2
- package/dist/components/svgs/MediaRestartIcon.js +2 -2
- package/dist/components/svgs/MediaVolumeAbove50PercentIcon.js +3 -3
- package/dist/components/svgs/MediaVolumeBelow50PercentIcon.js +2 -2
- package/dist/components/svgs/MediaVolumeMutedIcon.js +2 -2
- package/dist/components/svgs/MessageIcon.js +3 -3
- package/dist/components/svgs/ModalClose.js +4 -4
- package/dist/components/svgs/ModalWarning.js +5 -5
- package/dist/components/svgs/PartnerBadgeOverlay.js +11 -11
- package/dist/components/svgs/Pin.js +5 -5
- package/dist/components/svgs/PremiumIcon.js +6 -6
- package/dist/components/svgs/ReplyIcon.js +5 -5
- package/dist/components/svgs/ServerGuide.js +17 -17
- package/dist/components/svgs/ServerUpgrade.js +7 -7
- package/dist/components/svgs/SystemAlert.js +7 -7
- package/dist/components/svgs/SystemError.js +6 -6
- package/dist/components/svgs/Thread.js +9 -9
- package/dist/components/svgs/UserJoin.js +5 -5
- package/dist/components/svgs/UserLeave.js +5 -5
- package/dist/components/svgs/VerifiedBadgeOverlay.js +4 -4
- package/dist/components/svgs/VerifiedTick.js +13 -13
- package/dist/components/svgs/VideoFullScreenIcon.js +8 -8
- package/dist/components/svgs/VideoPausePopIcon.js +2 -2
- package/dist/components/svgs/VideoPlayPopIcon.js +2 -2
- package/dist/components/svgs/VoiceChannel.js +19 -19
- package/dist/components/svgs/clan-icons/Crystal.js +27 -27
- package/dist/components/svgs/clan-icons/Diamond.js +35 -35
- package/dist/components/svgs/clan-icons/Explosion.js +30 -30
- package/dist/components/svgs/clan-icons/Flame.js +23 -23
- package/dist/components/svgs/clan-icons/Flower.js +18 -18
- package/dist/components/svgs/clan-icons/Heart.js +19 -19
- package/dist/components/svgs/clan-icons/Key.js +32 -32
- package/dist/components/svgs/clan-icons/Leaf.js +23 -23
- package/dist/components/svgs/clan-icons/Lightning.js +25 -25
- package/dist/components/svgs/clan-icons/Magic.js +34 -34
- package/dist/components/svgs/clan-icons/Moon.js +21 -21
- package/dist/components/svgs/clan-icons/Mushroom.js +33 -33
- package/dist/components/svgs/clan-icons/Mythical.js +32 -32
- package/dist/components/svgs/clan-icons/Ornament.js +48 -48
- package/dist/components/svgs/clan-icons/Plasma.js +23 -23
- package/dist/components/svgs/clan-icons/Rock.js +20 -20
- package/dist/components/svgs/clan-icons/Shell.js +29 -29
- package/dist/components/svgs/clan-icons/Skull.js +28 -28
- package/dist/components/svgs/clan-icons/Sun.js +36 -36
- package/dist/components/svgs/clan-icons/Sword.js +27 -27
- package/dist/components/svgs/clan-icons/Water.js +20 -20
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -3
- package/dist/config.js.map +1 -1
- package/dist/hydrate/index.d.ts +40 -0
- package/dist/hydrate/index.d.ts.map +1 -0
- package/dist/hydrate/index.js +48 -0
- package/dist/hydrate/index.js.map +1 -0
- package/package.json +222 -219
- package/dist/bundle/styles/base.css.map +0 -1
- package/dist/components/discord-container copy/DiscordContainer.d.ts +0 -22
- package/dist/components/discord-container copy/DiscordContainer.d.ts.map +0 -1
- package/dist/components/discord-container copy/DiscordContainer.js +0 -159
- package/dist/components/discord-container copy/DiscordContainer.js.map +0 -1
- package/dist/components/discord-media-fullscreen-previewer/context.d.ts +0 -10
- package/dist/components/discord-media-fullscreen-previewer/context.d.ts.map +0 -1
- package/dist/components/discord-media-fullscreen-previewer/context.js +0 -3
- package/dist/components/discord-media-fullscreen-previewer/context.js.map +0 -1
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts +0 -26
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts.map +0 -1
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js +0 -183
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js.map +0 -1
- package/dist/components/discord-section/DiscordContainer.d.ts +0 -22
- package/dist/components/discord-section/DiscordContainer.d.ts.map +0 -1
- package/dist/components/discord-section/DiscordContainer.js +0 -159
- package/dist/components/discord-section/DiscordContainer.js.map +0 -1
- package/dist/components/discord-section copy/DiscordSection.d.ts +0 -15
- package/dist/components/discord-section copy/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-section copy/DiscordSection.js +0 -77
- package/dist/components/discord-section copy/DiscordSection.js.map +0 -1
- package/dist/components/discord-section-components/DiscordSection.d.ts +0 -15
- package/dist/components/discord-section-components/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-section-components/DiscordSection.js +0 -77
- package/dist/components/discord-section-components/DiscordSection.js.map +0 -1
- package/dist/components/discord-text-display/DiscordSection.d.ts +0 -15
- package/dist/components/discord-text-display/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-text-display/DiscordSection.js +0 -79
- package/dist/components/discord-text-display/DiscordSection.js.map +0 -1
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts +0 -71
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts.map +0 -1
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js +0 -238
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js.map +0 -1
|
@@ -49,183 +49,183 @@ let DiscordVoiceMessage = class DiscordVoiceMessage extends DiscordMediaLifecycl
|
|
|
49
49
|
DiscordVolumeControlStyles,
|
|
50
50
|
DiscordPlaybackControlStyles,
|
|
51
51
|
DiscordMediaAttachmentStyles,
|
|
52
|
-
css `
|
|
53
|
-
:host {
|
|
54
|
-
--seek-before-width: 0%;
|
|
55
|
-
--buffered-width: 0%;
|
|
56
|
-
--volume-slider-opacity: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.discord-audio-attachment-non-visual-media-item {
|
|
60
|
-
width: -moz-fit-content;
|
|
61
|
-
width: fit-content;
|
|
62
|
-
max-width: 100%;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.discord-media-attachment-mosaic-item-media {
|
|
66
|
-
width: 100%;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.discord-audio-attachment-wrapper-audio {
|
|
70
|
-
background-color: hsl(240 calc(1 * 4%) 60.784% /0.0784313725490196);
|
|
71
|
-
border-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039) 100%, hsl(0 0% 0% /0.12156862745098039) 0%);
|
|
72
|
-
border-radius: 24px;
|
|
73
|
-
border-style: solid;
|
|
74
|
-
border-width: 1px;
|
|
75
|
-
box-sizing: border-box;
|
|
76
|
-
color: hsl(0 calc(1 * 0%) 100% / 1);
|
|
77
|
-
display: flex;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
flex: auto;
|
|
80
|
-
height: auto;
|
|
81
|
-
justify-content: space-between;
|
|
82
|
-
max-width: 100%;
|
|
83
|
-
overflow: visible;
|
|
84
|
-
padding: 12px 9px;
|
|
85
|
-
position: relative;
|
|
86
|
-
user-select: none;
|
|
87
|
-
min-width: 240px;
|
|
88
|
-
width: var(--target-width, auto);
|
|
89
|
-
max-width: 480px;
|
|
90
|
-
|
|
91
|
-
transition: background-color 0.2s ease-in;
|
|
92
|
-
|
|
93
|
-
.discord-media-attachment-video-button {
|
|
94
|
-
background-color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
95
|
-
border-radius: 50%;
|
|
96
|
-
color: hsl(0 calc(1 * 0%) 100% /1);
|
|
97
|
-
|
|
98
|
-
svg {
|
|
99
|
-
width: 16px;
|
|
100
|
-
height: 16px;
|
|
101
|
-
margin: 4px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.discord-media-attachment-control-icon {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&.isPlaying {
|
|
110
|
-
background-color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
111
|
-
|
|
112
|
-
.discord-media-attachment-video-button {
|
|
113
|
-
background-color: white;
|
|
114
|
-
color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.discord-media-attachment-button {
|
|
119
|
-
svg {
|
|
120
|
-
opacity: 0.7;
|
|
121
|
-
}
|
|
122
|
-
&:hover svg {
|
|
123
|
-
opacity: 1;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&.discord-audio-attachment-light-theme {
|
|
128
|
-
border-color: #dcdcdf;
|
|
129
|
-
background-color: linear-gradient(
|
|
130
|
-
151.11deg,
|
|
131
|
-
hsl(231.298 calc(1 * 90.345%) 71.569% /1) 0,
|
|
132
|
-
hsl(234.935 calc(1 * 85.556%) 64.706% /1) 100%
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
&:not(.isPlaying) {
|
|
136
|
-
.discord-media-attachment-duration-time-display {
|
|
137
|
-
color: #5f606a;
|
|
138
|
-
}
|
|
139
|
-
.discord-media-attachment-button {
|
|
140
|
-
color: #2f3035;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.discord-media-attachment-speed-display {
|
|
144
|
-
background-color: color-mix(
|
|
145
|
-
in oklab,
|
|
146
|
-
hsl(240 calc(1 * 4%) 60.784% /0.2784313725490196) 100%,
|
|
147
|
-
hsl(0 0% 0% /0.2784313725490196) 0%
|
|
148
|
-
);
|
|
149
|
-
color: color-mix(in oklab, hsl(234.545 calc(1 * 5.473%) 39.412% /1) 100%, #000 0%);
|
|
150
|
-
|
|
151
|
-
&:hover {
|
|
152
|
-
background-color: hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039);
|
|
153
|
-
color: color-mix(in oklab, hsl(230 calc(1 * 6%) 19.608% /1) 100%, #000 0%);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.discord-audio-attachment-audio-element {
|
|
161
|
-
display: none !important;
|
|
162
|
-
position: absolute;
|
|
163
|
-
width: 0;
|
|
164
|
-
height: 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.discord-media-attachment-controls {
|
|
168
|
-
margin: 0px;
|
|
169
|
-
height: 24px;
|
|
170
|
-
display: grid;
|
|
171
|
-
gap: 6px;
|
|
172
|
-
align-content: center;
|
|
173
|
-
grid-template-columns: auto 1fr auto auto;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.discord-media-attachment-horizontal {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
|
|
180
|
-
& > div:not(:first-child) {
|
|
181
|
-
width: 100%;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.discord-media-attachment-duration-time-wrapper {
|
|
186
|
-
font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
187
|
-
font-size: 14px;
|
|
188
|
-
font-weight: 400;
|
|
189
|
-
color: color-mix(in oklab, hsl(228 calc(1 * 4.425%) 77.843% /1) 100%, #000 0%);
|
|
190
|
-
display: flex;
|
|
191
|
-
align-items: center;
|
|
192
|
-
gap: 12px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.discord-media-attachment-media-bar-interaction {
|
|
196
|
-
display: none;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.discord-media-attachment-speed-display {
|
|
200
|
-
display: inline-flex;
|
|
201
|
-
align-items: center;
|
|
202
|
-
font-weight: 600;
|
|
203
|
-
justify-content: center;
|
|
204
|
-
font-size: 12px;
|
|
205
|
-
font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
206
|
-
background-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039) 100%, hsl(0 0% 0% /0.12156862745098039) 0%);
|
|
207
|
-
color: color-mix(in oklab, hsl(228 calc(1 * 4.425%) 77.843% /1) 100%, #000 0%);
|
|
208
|
-
width: 32px;
|
|
209
|
-
border-radius: 4px;
|
|
210
|
-
text-align: center;
|
|
211
|
-
transition:
|
|
212
|
-
background-color 0.2s ease-in,
|
|
213
|
-
color 0.2s ease-in;
|
|
214
|
-
|
|
215
|
-
border: none;
|
|
216
|
-
cursor: pointer;
|
|
217
|
-
white-space: nowrap;
|
|
218
|
-
|
|
219
|
-
&:hover {
|
|
220
|
-
background-color: hsl(240 calc(1 * 4%) 60.784% /0.0784313725490196);
|
|
221
|
-
color: color-mix(in oklab, hsl(0 calc(1 * 0%) 100% /1) 100%, #000 0%);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
:focus-visible {
|
|
226
|
-
outline: 2px solid hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
227
|
-
outline-offset: 2px;
|
|
228
|
-
}
|
|
52
|
+
css `
|
|
53
|
+
:host {
|
|
54
|
+
--seek-before-width: 0%;
|
|
55
|
+
--buffered-width: 0%;
|
|
56
|
+
--volume-slider-opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.discord-audio-attachment-non-visual-media-item {
|
|
60
|
+
width: -moz-fit-content;
|
|
61
|
+
width: fit-content;
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.discord-media-attachment-mosaic-item-media {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.discord-audio-attachment-wrapper-audio {
|
|
70
|
+
background-color: hsl(240 calc(1 * 4%) 60.784% /0.0784313725490196);
|
|
71
|
+
border-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039) 100%, hsl(0 0% 0% /0.12156862745098039) 0%);
|
|
72
|
+
border-radius: 24px;
|
|
73
|
+
border-style: solid;
|
|
74
|
+
border-width: 1px;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
color: hsl(0 calc(1 * 0%) 100% / 1);
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
flex: auto;
|
|
80
|
+
height: auto;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
overflow: visible;
|
|
84
|
+
padding: 12px 9px;
|
|
85
|
+
position: relative;
|
|
86
|
+
user-select: none;
|
|
87
|
+
min-width: 240px;
|
|
88
|
+
width: var(--target-width, auto);
|
|
89
|
+
max-width: 480px;
|
|
90
|
+
|
|
91
|
+
transition: background-color 0.2s ease-in;
|
|
92
|
+
|
|
93
|
+
.discord-media-attachment-video-button {
|
|
94
|
+
background-color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
color: hsl(0 calc(1 * 0%) 100% /1);
|
|
97
|
+
|
|
98
|
+
svg {
|
|
99
|
+
width: 16px;
|
|
100
|
+
height: 16px;
|
|
101
|
+
margin: 4px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.discord-media-attachment-control-icon {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.isPlaying {
|
|
110
|
+
background-color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
111
|
+
|
|
112
|
+
.discord-media-attachment-video-button {
|
|
113
|
+
background-color: white;
|
|
114
|
+
color: hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.discord-media-attachment-button {
|
|
119
|
+
svg {
|
|
120
|
+
opacity: 0.7;
|
|
121
|
+
}
|
|
122
|
+
&:hover svg {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.discord-audio-attachment-light-theme {
|
|
128
|
+
border-color: #dcdcdf;
|
|
129
|
+
background-color: linear-gradient(
|
|
130
|
+
151.11deg,
|
|
131
|
+
hsl(231.298 calc(1 * 90.345%) 71.569% /1) 0,
|
|
132
|
+
hsl(234.935 calc(1 * 85.556%) 64.706% /1) 100%
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
&:not(.isPlaying) {
|
|
136
|
+
.discord-media-attachment-duration-time-display {
|
|
137
|
+
color: #5f606a;
|
|
138
|
+
}
|
|
139
|
+
.discord-media-attachment-button {
|
|
140
|
+
color: #2f3035;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.discord-media-attachment-speed-display {
|
|
144
|
+
background-color: color-mix(
|
|
145
|
+
in oklab,
|
|
146
|
+
hsl(240 calc(1 * 4%) 60.784% /0.2784313725490196) 100%,
|
|
147
|
+
hsl(0 0% 0% /0.2784313725490196) 0%
|
|
148
|
+
);
|
|
149
|
+
color: color-mix(in oklab, hsl(234.545 calc(1 * 5.473%) 39.412% /1) 100%, #000 0%);
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
background-color: hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039);
|
|
153
|
+
color: color-mix(in oklab, hsl(230 calc(1 * 6%) 19.608% /1) 100%, #000 0%);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.discord-audio-attachment-audio-element {
|
|
161
|
+
display: none !important;
|
|
162
|
+
position: absolute;
|
|
163
|
+
width: 0;
|
|
164
|
+
height: 0;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.discord-media-attachment-controls {
|
|
168
|
+
margin: 0px;
|
|
169
|
+
height: 24px;
|
|
170
|
+
display: grid;
|
|
171
|
+
gap: 6px;
|
|
172
|
+
align-content: center;
|
|
173
|
+
grid-template-columns: auto 1fr auto auto;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.discord-media-attachment-horizontal {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
|
|
180
|
+
& > div:not(:first-child) {
|
|
181
|
+
width: 100%;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.discord-media-attachment-duration-time-wrapper {
|
|
186
|
+
font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
187
|
+
font-size: 14px;
|
|
188
|
+
font-weight: 400;
|
|
189
|
+
color: color-mix(in oklab, hsl(228 calc(1 * 4.425%) 77.843% /1) 100%, #000 0%);
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
gap: 12px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.discord-media-attachment-media-bar-interaction {
|
|
196
|
+
display: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.discord-media-attachment-speed-display {
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
206
|
+
background-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.12156862745098039) 100%, hsl(0 0% 0% /0.12156862745098039) 0%);
|
|
207
|
+
color: color-mix(in oklab, hsl(228 calc(1 * 4.425%) 77.843% /1) 100%, #000 0%);
|
|
208
|
+
width: 32px;
|
|
209
|
+
border-radius: 4px;
|
|
210
|
+
text-align: center;
|
|
211
|
+
transition:
|
|
212
|
+
background-color 0.2s ease-in,
|
|
213
|
+
color 0.2s ease-in;
|
|
214
|
+
|
|
215
|
+
border: none;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
white-space: nowrap;
|
|
218
|
+
|
|
219
|
+
&:hover {
|
|
220
|
+
background-color: hsl(240 calc(1 * 4%) 60.784% /0.0784313725490196);
|
|
221
|
+
color: color-mix(in oklab, hsl(0 calc(1 * 0%) 100% /1) 100%, #000 0%);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
:focus-visible {
|
|
226
|
+
outline: 2px solid hsl(234.935 calc(1 * 85.556%) 64.706% /1);
|
|
227
|
+
outline-offset: 2px;
|
|
228
|
+
}
|
|
229
229
|
`
|
|
230
230
|
]; }
|
|
231
231
|
get mediaAttachmentHorizontal() {
|
|
@@ -345,92 +345,92 @@ let DiscordVoiceMessage = class DiscordVoiceMessage extends DiscordMediaLifecycl
|
|
|
345
345
|
this.patchWaveColors();
|
|
346
346
|
}
|
|
347
347
|
render() {
|
|
348
|
-
return html `<div class="discord-media-attachment-non-visual-media-item-container discord-voice-message">
|
|
349
|
-
<div class="discord-audio-attachment-non-visual-media-item">
|
|
350
|
-
<div class="discord-media-attachment-mosaic-item-media">
|
|
351
|
-
<div
|
|
348
|
+
return html `<div class="discord-media-attachment-non-visual-media-item-container discord-voice-message">
|
|
349
|
+
<div class="discord-audio-attachment-non-visual-media-item">
|
|
350
|
+
<div class="discord-media-attachment-mosaic-item-media">
|
|
351
|
+
<div
|
|
352
352
|
class=${classMap({
|
|
353
353
|
'discord-audio-attachment-wrapper-audio': true,
|
|
354
354
|
'discord-audio-attachment-light-theme': this.lightTheme,
|
|
355
355
|
isPlaying: this.isPlaying
|
|
356
|
-
})}
|
|
357
|
-
>
|
|
358
|
-
<audio
|
|
359
|
-
${ref(this.mediaComponentRef)}
|
|
360
|
-
class="discord-audio-attachment-audio-element"
|
|
361
|
-
preload="metadata"
|
|
362
|
-
@progress=${this.displayBufferedAmount}
|
|
363
|
-
@ended=${this.handleEnded}
|
|
364
|
-
>
|
|
365
|
-
<source src=${ifDefined(this.href)} />
|
|
366
|
-
</audio>
|
|
367
|
-
<div class="discord-media-attachment-controls no-background" style="transform: translateY(0%)">
|
|
368
|
-
<div
|
|
369
|
-
class="discord-media-attachment-video-button"
|
|
370
|
-
tabindex="0"
|
|
371
|
-
aria-label="${this.isPlaying ? 'Pause' : 'Play'}"
|
|
372
|
-
role="button"
|
|
373
|
-
@click=${this.handleClickPlayPauseIcon}
|
|
374
|
-
@keydown=${this.handleSpaceToPlayPause}
|
|
375
|
-
>
|
|
376
|
-
${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' })))}
|
|
377
|
-
</div>
|
|
378
|
-
|
|
379
|
-
<div class="discord-media-attachment-horizontal">
|
|
380
|
-
<div class="discord-media-attachment-media-bar-interaction">
|
|
381
|
-
<input
|
|
382
|
-
type="range"
|
|
383
|
-
${ref(this.seekSliderRef)}
|
|
384
|
-
class="discord-media-attachment-playback-control"
|
|
385
|
-
@input=${this.handleSeekSliderInput}
|
|
386
|
-
@change=${this.handleSeekSliderChange}
|
|
387
|
-
max="100"
|
|
388
|
-
value="0"
|
|
389
|
-
/>
|
|
390
|
-
</div>
|
|
391
|
-
</div>
|
|
392
|
-
<div class="discord-media-attachment-duration-time-wrapper">
|
|
393
|
-
<span role="status" class="discord-media-attachment-duration-time-display">${this.leftPlaybackPosition}</span>
|
|
394
|
-
<button class="discord-media-attachment-speed-display" @click=${this.nextSpeed}>
|
|
395
|
-
${this.speed < 1 ? this.speed.toString().slice(1) : this.speed}X
|
|
396
|
-
</button>
|
|
397
|
-
</div>
|
|
398
|
-
<div class="discord-media-attachment-flex discord-volume-container">
|
|
399
|
-
<div class="discord-media-attachment-flex-container">
|
|
400
|
-
<button
|
|
401
|
-
aria-label="Control volume"
|
|
402
|
-
type="button"
|
|
403
|
-
class="discord-media-attachment-button"
|
|
404
|
-
@focus=${this.handleVolumeVerticalFocus}
|
|
405
|
-
@blur=${this.handleVolumeVerticalBlur}
|
|
406
|
-
@click=${this.handleClickMuteIcon}
|
|
407
|
-
>
|
|
408
|
-
<div class="discord-media-attachment-button-content">
|
|
356
|
+
})}
|
|
357
|
+
>
|
|
358
|
+
<audio
|
|
359
|
+
${ref(this.mediaComponentRef)}
|
|
360
|
+
class="discord-audio-attachment-audio-element"
|
|
361
|
+
preload="metadata"
|
|
362
|
+
@progress=${this.displayBufferedAmount}
|
|
363
|
+
@ended=${this.handleEnded}
|
|
364
|
+
>
|
|
365
|
+
<source src=${ifDefined(this.href)} />
|
|
366
|
+
</audio>
|
|
367
|
+
<div class="discord-media-attachment-controls no-background" style="transform: translateY(0%)">
|
|
368
|
+
<div
|
|
369
|
+
class="discord-media-attachment-video-button"
|
|
370
|
+
tabindex="0"
|
|
371
|
+
aria-label="${this.isPlaying ? 'Pause' : 'Play'}"
|
|
372
|
+
role="button"
|
|
373
|
+
@click=${this.handleClickPlayPauseIcon}
|
|
374
|
+
@keydown=${this.handleSpaceToPlayPause}
|
|
375
|
+
>
|
|
376
|
+
${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' })))}
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<div class="discord-media-attachment-horizontal">
|
|
380
|
+
<div class="discord-media-attachment-media-bar-interaction">
|
|
381
|
+
<input
|
|
382
|
+
type="range"
|
|
383
|
+
${ref(this.seekSliderRef)}
|
|
384
|
+
class="discord-media-attachment-playback-control"
|
|
385
|
+
@input=${this.handleSeekSliderInput}
|
|
386
|
+
@change=${this.handleSeekSliderChange}
|
|
387
|
+
max="100"
|
|
388
|
+
value="0"
|
|
389
|
+
/>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
<div class="discord-media-attachment-duration-time-wrapper">
|
|
393
|
+
<span role="status" class="discord-media-attachment-duration-time-display">${this.leftPlaybackPosition}</span>
|
|
394
|
+
<button class="discord-media-attachment-speed-display" @click=${this.nextSpeed}>
|
|
395
|
+
${this.speed < 1 ? this.speed.toString().slice(1) : this.speed}X
|
|
396
|
+
</button>
|
|
397
|
+
</div>
|
|
398
|
+
<div class="discord-media-attachment-flex discord-volume-container">
|
|
399
|
+
<div class="discord-media-attachment-flex-container">
|
|
400
|
+
<button
|
|
401
|
+
aria-label="Control volume"
|
|
402
|
+
type="button"
|
|
403
|
+
class="discord-media-attachment-button"
|
|
404
|
+
@focus=${this.handleVolumeVerticalFocus}
|
|
405
|
+
@blur=${this.handleVolumeVerticalBlur}
|
|
406
|
+
@click=${this.handleClickMuteIcon}
|
|
407
|
+
>
|
|
408
|
+
<div class="discord-media-attachment-button-content">
|
|
409
409
|
${when(this.currentVolume === 0 || this.isMuted, () => MediaVolumeMutedIcon({ class: 'discord-media-attachment-button-control-icon' }), () => when(this.currentVolume <= 0.5, () => MediaVolumeBelow50PercentIcon({
|
|
410
410
|
class: 'discord-media-attachment-button-control-icon'
|
|
411
411
|
}), () => MediaVolumeAbove50PercentIcon({
|
|
412
412
|
class: 'discord-media-attachment-button-control-icon'
|
|
413
|
-
})))}
|
|
414
|
-
</div>
|
|
415
|
-
</button>
|
|
416
|
-
<div ${ref(this.volumeControlRef)} class="discord-media-attachment-button-slider">
|
|
417
|
-
<div class="discord-media-attachment-volume-vertical">
|
|
418
|
-
<input
|
|
419
|
-
${ref(this.volumeControlInputRef)}
|
|
420
|
-
type="range"
|
|
421
|
-
class="discord-media-attachment-volume-slider"
|
|
422
|
-
@input=${this.handleVolumeSliderInput}
|
|
423
|
-
max="100"
|
|
424
|
-
value="100"
|
|
425
|
-
/>
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
</div>
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
413
|
+
})))}
|
|
414
|
+
</div>
|
|
415
|
+
</button>
|
|
416
|
+
<div ${ref(this.volumeControlRef)} class="discord-media-attachment-button-slider">
|
|
417
|
+
<div class="discord-media-attachment-volume-vertical">
|
|
418
|
+
<input
|
|
419
|
+
${ref(this.volumeControlInputRef)}
|
|
420
|
+
type="range"
|
|
421
|
+
class="discord-media-attachment-volume-slider"
|
|
422
|
+
@input=${this.handleVolumeSliderInput}
|
|
423
|
+
max="100"
|
|
424
|
+
value="100"
|
|
425
|
+
/>
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
434
|
</div>`;
|
|
435
435
|
}
|
|
436
436
|
};
|