@penwin/discord-components-core 4.3.8 → 4.3.9-dev-32918495512.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 +1976 -1976
- 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
|
@@ -48,44 +48,44 @@ let DiscordEmbedField = class DiscordEmbedField extends LitElement {
|
|
|
48
48
|
/**
|
|
49
49
|
* @internal
|
|
50
50
|
*/
|
|
51
|
-
static { this.styles = css `
|
|
52
|
-
:host {
|
|
53
|
-
font-size: 0.875rem;
|
|
54
|
-
line-height: 1.125rem;
|
|
55
|
-
min-width: 0;
|
|
56
|
-
font-weight: 400;
|
|
57
|
-
grid-column: 1/13;
|
|
58
|
-
word-break: break-word;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host .discord-field-title {
|
|
62
|
-
color: #ffffff;
|
|
63
|
-
font-weight: 600;
|
|
64
|
-
font-size: 0.875rem;
|
|
65
|
-
line-height: 1.125rem;
|
|
66
|
-
min-width: 0;
|
|
67
|
-
margin-bottom: 2px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host .discord-inline-field {
|
|
71
|
-
flex-grow: 1;
|
|
72
|
-
flex-basis: auto;
|
|
73
|
-
min-width: 150px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([light-theme]) .discord-field-title {
|
|
77
|
-
color: #313338;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
:host {
|
|
81
|
-
/* margin: 0px 2px; */
|
|
82
|
-
--discord-code-background-color: color-mix(in oklab, hsl(230 calc(1 * 6.383%) 18.431% /1) 100%, #000 0%);
|
|
83
|
-
--discord-code-border: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:host([light-theme]) {
|
|
87
|
-
--discord-code-background-color: #f3f3f4;
|
|
88
|
-
}
|
|
51
|
+
static { this.styles = css `
|
|
52
|
+
:host {
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
line-height: 1.125rem;
|
|
55
|
+
min-width: 0;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
grid-column: 1/13;
|
|
58
|
+
word-break: break-word;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:host .discord-field-title {
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
font-size: 0.875rem;
|
|
65
|
+
line-height: 1.125rem;
|
|
66
|
+
min-width: 0;
|
|
67
|
+
margin-bottom: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host .discord-inline-field {
|
|
71
|
+
flex-grow: 1;
|
|
72
|
+
flex-basis: auto;
|
|
73
|
+
min-width: 150px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([light-theme]) .discord-field-title {
|
|
77
|
+
color: #313338;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host {
|
|
81
|
+
/* margin: 0px 2px; */
|
|
82
|
+
--discord-code-background-color: color-mix(in oklab, hsl(230 calc(1 * 6.383%) 18.431% /1) 100%, #000 0%);
|
|
83
|
+
--discord-code-border: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([light-theme]) {
|
|
87
|
+
--discord-code-background-color: #f3f3f4;
|
|
88
|
+
}
|
|
89
89
|
`; }
|
|
90
90
|
checkInlineIndex() {
|
|
91
91
|
if (this.inlineIndex) {
|
|
@@ -99,8 +99,8 @@ let DiscordEmbedField = class DiscordEmbedField extends LitElement {
|
|
|
99
99
|
this.checkInlineIndex();
|
|
100
100
|
const emojiParsedEmbedFieldTitle = this.parseTitle(this.fieldTitle);
|
|
101
101
|
const content = [...emojiParsedEmbedFieldTitle];
|
|
102
|
-
const component = html `<div class="discord-field-title">
|
|
103
|
-
<discord-white-space><slot name="field-title">${content}</slot></discord-white-space>
|
|
102
|
+
const component = html `<div class="discord-field-title">
|
|
103
|
+
<discord-white-space><slot name="field-title">${content}</slot></discord-white-space>
|
|
104
104
|
</div>`;
|
|
105
105
|
return html `${component}<discord-white-space><slot></slot></discord-white-space>`;
|
|
106
106
|
}
|
|
@@ -10,25 +10,25 @@ let DiscordEmbedFields = class DiscordEmbedFields extends LitElement {
|
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
static { this.styles = css `
|
|
14
|
-
:host {
|
|
15
|
-
display: grid;
|
|
16
|
-
grid-column: 1/1;
|
|
17
|
-
margin-top: 8px;
|
|
18
|
-
grid-gap: 8px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
::slotted([inline-index='1']) {
|
|
22
|
-
grid-column: 1/5 !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
::slotted([inline-index='2']) {
|
|
26
|
-
grid-column: 5/9 !important;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
::slotted([inline-index='3']) {
|
|
30
|
-
grid-column: 9/13 !important;
|
|
31
|
-
}
|
|
13
|
+
static { this.styles = css `
|
|
14
|
+
:host {
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-column: 1/1;
|
|
17
|
+
margin-top: 8px;
|
|
18
|
+
grid-gap: 8px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
::slotted([inline-index='1']) {
|
|
22
|
+
grid-column: 1/5 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
::slotted([inline-index='2']) {
|
|
26
|
+
grid-column: 5/9 !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
::slotted([inline-index='3']) {
|
|
30
|
+
grid-column: 9/13 !important;
|
|
31
|
+
}
|
|
32
32
|
`; }
|
|
33
33
|
render() {
|
|
34
34
|
return html `<slot></slot>`;
|
|
@@ -22,39 +22,39 @@ let DiscordEmbedFooter = class DiscordEmbedFooter extends LitElement {
|
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
static { this.styles = css `
|
|
26
|
-
:host {
|
|
27
|
-
-webkit-box-align: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
display: flex;
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
line-height: 16px;
|
|
32
|
-
font-weight: 500;
|
|
33
|
-
margin-top: 8px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([light-theme]) {
|
|
37
|
-
color: #747f8d;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host .discord-footer-image {
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
flex-shrink: 0;
|
|
43
|
-
height: 20px;
|
|
44
|
-
margin-right: 8px;
|
|
45
|
-
width: 20px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host .discord-footer-separator {
|
|
49
|
-
color: #dcddde;
|
|
50
|
-
font-weight: 500;
|
|
51
|
-
display: inline-block;
|
|
52
|
-
margin: 0 4px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host([light-theme]) .discord-footer-separator {
|
|
56
|
-
color: #5c5e66;
|
|
57
|
-
}
|
|
25
|
+
static { this.styles = css `
|
|
26
|
+
:host {
|
|
27
|
+
-webkit-box-align: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
display: flex;
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
line-height: 16px;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
margin-top: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([light-theme]) {
|
|
37
|
+
color: #747f8d;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host .discord-footer-image {
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
height: 20px;
|
|
44
|
+
margin-right: 8px;
|
|
45
|
+
width: 20px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host .discord-footer-separator {
|
|
49
|
+
color: #dcddde;
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
display: inline-block;
|
|
52
|
+
margin: 0 4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([light-theme]) .discord-footer-separator {
|
|
56
|
+
color: #5c5e66;
|
|
57
|
+
}
|
|
58
58
|
`; }
|
|
59
59
|
updateTimestamp(value) {
|
|
60
60
|
if (value && !Number.isNaN(new Date(value).getTime())) {
|
|
@@ -63,9 +63,9 @@ let DiscordEmbedFooter = class DiscordEmbedFooter extends LitElement {
|
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
65
|
this.updateTimestamp(this.timestamp);
|
|
66
|
-
return html `${when(this.footerImage, () => html `<img src=${ifDefined(this.footerImage)} alt=${ifDefined(this.footerImageAlt)} class="discord-footer-image" />`)}
|
|
67
|
-
<slot></slot>
|
|
68
|
-
${when(this.timestamp, () => html `<span class="discord-footer-separator">•</span>`)}
|
|
66
|
+
return html `${when(this.footerImage, () => html `<img src=${ifDefined(this.footerImage)} alt=${ifDefined(this.footerImageAlt)} class="discord-footer-image" />`)}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${when(this.timestamp, () => html `<span class="discord-footer-separator">•</span>`)}
|
|
69
69
|
${when(this.timestamp, () => ` ${this.timestamp}`, () => null)}`;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
@@ -28,209 +28,209 @@ let DiscordFileAttachment = class DiscordFileAttachment extends LitElement {
|
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
30
|
static { this.styles = [
|
|
31
|
-
css `
|
|
32
|
-
:host {
|
|
33
|
-
display: inline-grid;
|
|
34
|
-
height: -moz-fit-content;
|
|
35
|
-
height: fit-content;
|
|
36
|
-
grid-auto-flow: row;
|
|
37
|
-
grid-row-gap: 0.25rem;
|
|
38
|
-
grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
|
|
39
|
-
text-indent: 0;
|
|
40
|
-
min-height: 0;
|
|
41
|
-
min-width: 0;
|
|
42
|
-
position: relative;
|
|
43
|
-
border-radius: 8px;
|
|
44
|
-
--shadow-color: hsl(none 0% 0%/0.14);
|
|
45
|
-
box-shadow: 0 1px 4px 0 var(--shadow-color);
|
|
46
|
-
margin-top: var(--media-item-container-margin-top, 8px);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([light-theme]) {
|
|
50
|
-
--shadow-color: hsl(none 0% 0%/0.08);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host > * {
|
|
54
|
-
justify-self: start;
|
|
55
|
-
align-self: start;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.discord-file-attachment-non-visual-media-item-container:hover .discord-button-download-attachment {
|
|
59
|
-
display: block !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.discord-button-download-attachment {
|
|
63
|
-
display: none;
|
|
64
|
-
position: absolute;
|
|
65
|
-
top: -8px;
|
|
66
|
-
right: -8px;
|
|
67
|
-
border-radius: 5px;
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
outline: 1px solid color-mix(in oklab, hsl(231.429 calc(1 * 6.542%) 20.98% /1) 100%, #000 0%);
|
|
70
|
-
background-color: color-mix(in oklab, hsl(232.5 calc(1 * 6.897%) 22.745% /1) 100%, #000 0%);
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
background-color: #3c3d43;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
:host:has(discord-media-spoileable-cover:not([is-revealed])) .discord-button-download-attachment {
|
|
78
|
-
display: none !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.discord-link-download-attachment {
|
|
82
|
-
color: color-mix(in oklab, hsl(215 calc(1 * 8.8%) 73.3% / 1) 100%, black 0%);
|
|
83
|
-
display: flex;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.discord-icon-download {
|
|
87
|
-
padding: 6px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.discord-file-attachment-non-visual-media-item-container {
|
|
91
|
-
max-width: 100%;
|
|
92
|
-
display: flex;
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
position: relative;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.discord-file-attachment-non-visual-media-item {
|
|
98
|
-
width: -moz-fit-content;
|
|
99
|
-
width: fit-content;
|
|
100
|
-
max-width: 100%;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.discord-file-attachment-mosaic-item-media {
|
|
104
|
-
position: relative;
|
|
105
|
-
max-height: inherit;
|
|
106
|
-
border-radius: 2px;
|
|
107
|
-
width: 100%;
|
|
108
|
-
align-items: center;
|
|
109
|
-
display: flex;
|
|
110
|
-
flex-flow: row nowrap;
|
|
111
|
-
max-width: 100%;
|
|
112
|
-
height: 100%;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.discord-file-attachment-mosaic-style {
|
|
117
|
-
padding: 16px;
|
|
118
|
-
border-radius: 8px;
|
|
119
|
-
width: 432px;
|
|
120
|
-
max-width: 100%;
|
|
121
|
-
flex: auto;
|
|
122
|
-
background-color: var(--background, #393a41);
|
|
123
|
-
align-items: center;
|
|
124
|
-
flex-direction: row;
|
|
125
|
-
display: flex;
|
|
126
|
-
box-sizing: border-box;
|
|
127
|
-
letter-spacing: 0;
|
|
128
|
-
border: 1px solid var(--border-color, #44454c);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.discord-file-attachment-light-theme.discord-file-attachment-mosaic-style {
|
|
132
|
-
--background: color-mix(in oklab, hsl(0 calc(1 * 0%) 100% /1) 100%, #000 0%);
|
|
133
|
-
--border-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.2784313725490196) 100%, hsl(0 0% 0% /0.2784313725490196) 0%);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.discord-file-attachment-icon {
|
|
137
|
-
width: 30px;
|
|
138
|
-
height: 40px;
|
|
139
|
-
margin-right: 8px;
|
|
140
|
-
flex-shrink: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.discord-file-attachment-inner {
|
|
144
|
-
flex: 1;
|
|
145
|
-
white-space: nowrap;
|
|
146
|
-
text-overflow: ellipsis;
|
|
147
|
-
overflow: hidden;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.discord-file-attachment-filename-link-wrapper {
|
|
151
|
-
white-space: nowrap;
|
|
152
|
-
text-overflow: ellipsis;
|
|
153
|
-
overflow: hidden;
|
|
154
|
-
font-size: 16px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.discord-file-attachment-metadata {
|
|
158
|
-
line-height: 16px;
|
|
159
|
-
font-size: 12px;
|
|
160
|
-
font-weight: 400;
|
|
161
|
-
color: #adaeb4;
|
|
162
|
-
margin-right: 8px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.discord-file-attachment-light-theme .discord-file-attachment-metadata {
|
|
166
|
-
color: #6d6e77;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.discord-button-download-attachment-light-theme {
|
|
170
|
-
outline-color: #fbfbfb;
|
|
171
|
-
.discord-link-download-attachment {
|
|
172
|
-
background-color: #fbfbfb;
|
|
173
|
-
color: #5f606a;
|
|
174
|
-
}
|
|
175
|
-
&:hover {
|
|
176
|
-
outline-color: #e4e4e4 !important;
|
|
177
|
-
.discord-link-download-attachment {
|
|
178
|
-
background-color: #e4e4e4;
|
|
179
|
-
color: #2e2f34;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
31
|
+
css `
|
|
32
|
+
:host {
|
|
33
|
+
display: inline-grid;
|
|
34
|
+
height: -moz-fit-content;
|
|
35
|
+
height: fit-content;
|
|
36
|
+
grid-auto-flow: row;
|
|
37
|
+
grid-row-gap: 0.25rem;
|
|
38
|
+
grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
|
|
39
|
+
text-indent: 0;
|
|
40
|
+
min-height: 0;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
position: relative;
|
|
43
|
+
border-radius: 8px;
|
|
44
|
+
--shadow-color: hsl(none 0% 0%/0.14);
|
|
45
|
+
box-shadow: 0 1px 4px 0 var(--shadow-color);
|
|
46
|
+
margin-top: var(--media-item-container-margin-top, 8px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([light-theme]) {
|
|
50
|
+
--shadow-color: hsl(none 0% 0%/0.08);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host > * {
|
|
54
|
+
justify-self: start;
|
|
55
|
+
align-self: start;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.discord-file-attachment-non-visual-media-item-container:hover .discord-button-download-attachment {
|
|
59
|
+
display: block !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.discord-button-download-attachment {
|
|
63
|
+
display: none;
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: -8px;
|
|
66
|
+
right: -8px;
|
|
67
|
+
border-radius: 5px;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
outline: 1px solid color-mix(in oklab, hsl(231.429 calc(1 * 6.542%) 20.98% /1) 100%, #000 0%);
|
|
70
|
+
background-color: color-mix(in oklab, hsl(232.5 calc(1 * 6.897%) 22.745% /1) 100%, #000 0%);
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background-color: #3c3d43;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host:has(discord-media-spoileable-cover:not([is-revealed])) .discord-button-download-attachment {
|
|
78
|
+
display: none !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.discord-link-download-attachment {
|
|
82
|
+
color: color-mix(in oklab, hsl(215 calc(1 * 8.8%) 73.3% / 1) 100%, black 0%);
|
|
83
|
+
display: flex;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.discord-icon-download {
|
|
87
|
+
padding: 6px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.discord-file-attachment-non-visual-media-item-container {
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
position: relative;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.discord-file-attachment-non-visual-media-item {
|
|
98
|
+
width: -moz-fit-content;
|
|
99
|
+
width: fit-content;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.discord-file-attachment-mosaic-item-media {
|
|
104
|
+
position: relative;
|
|
105
|
+
max-height: inherit;
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
width: 100%;
|
|
108
|
+
align-items: center;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-flow: row nowrap;
|
|
111
|
+
max-width: 100%;
|
|
112
|
+
height: 100%;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.discord-file-attachment-mosaic-style {
|
|
117
|
+
padding: 16px;
|
|
118
|
+
border-radius: 8px;
|
|
119
|
+
width: 432px;
|
|
120
|
+
max-width: 100%;
|
|
121
|
+
flex: auto;
|
|
122
|
+
background-color: var(--background, #393a41);
|
|
123
|
+
align-items: center;
|
|
124
|
+
flex-direction: row;
|
|
125
|
+
display: flex;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
letter-spacing: 0;
|
|
128
|
+
border: 1px solid var(--border-color, #44454c);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.discord-file-attachment-light-theme.discord-file-attachment-mosaic-style {
|
|
132
|
+
--background: color-mix(in oklab, hsl(0 calc(1 * 0%) 100% /1) 100%, #000 0%);
|
|
133
|
+
--border-color: color-mix(in oklab, hsl(240 calc(1 * 4%) 60.784% /0.2784313725490196) 100%, hsl(0 0% 0% /0.2784313725490196) 0%);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.discord-file-attachment-icon {
|
|
137
|
+
width: 30px;
|
|
138
|
+
height: 40px;
|
|
139
|
+
margin-right: 8px;
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.discord-file-attachment-inner {
|
|
144
|
+
flex: 1;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
text-overflow: ellipsis;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.discord-file-attachment-filename-link-wrapper {
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
text-overflow: ellipsis;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
font-size: 16px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.discord-file-attachment-metadata {
|
|
158
|
+
line-height: 16px;
|
|
159
|
+
font-size: 12px;
|
|
160
|
+
font-weight: 400;
|
|
161
|
+
color: #adaeb4;
|
|
162
|
+
margin-right: 8px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.discord-file-attachment-light-theme .discord-file-attachment-metadata {
|
|
166
|
+
color: #6d6e77;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.discord-button-download-attachment-light-theme {
|
|
170
|
+
outline-color: #fbfbfb;
|
|
171
|
+
.discord-link-download-attachment {
|
|
172
|
+
background-color: #fbfbfb;
|
|
173
|
+
color: #5f606a;
|
|
174
|
+
}
|
|
175
|
+
&:hover {
|
|
176
|
+
outline-color: #e4e4e4 !important;
|
|
177
|
+
.discord-link-download-attachment {
|
|
178
|
+
background-color: #e4e4e4;
|
|
179
|
+
color: #2e2f34;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
183
|
`,
|
|
184
184
|
DiscordMediaSpoileableCover.hostStyles
|
|
185
185
|
]; }
|
|
186
186
|
render() {
|
|
187
|
-
return html ` <div class="discord-file-attachment-non-visual-media-item-container">
|
|
188
|
-
<div class="discord-file-attachment-non-visual-media-item">
|
|
189
|
-
<div class="discord-file-attachment-mosaic-item-media">
|
|
190
|
-
${DiscordMediaSpoileableCover.inject(this.spoiler, this.lightTheme)}
|
|
191
|
-
<div class=${classMap({ 'discord-file-attachment-mosaic-style': true, 'discord-file-attachment-light-theme': this.lightTheme })}>
|
|
187
|
+
return html ` <div class="discord-file-attachment-non-visual-media-item-container">
|
|
188
|
+
<div class="discord-file-attachment-non-visual-media-item">
|
|
189
|
+
<div class="discord-file-attachment-mosaic-item-media">
|
|
190
|
+
${DiscordMediaSpoileableCover.inject(this.spoiler, this.lightTheme)}
|
|
191
|
+
<div class=${classMap({ 'discord-file-attachment-mosaic-style': true, 'discord-file-attachment-light-theme': this.lightTheme })}>
|
|
192
192
|
${FileAttachment({
|
|
193
193
|
class: 'discord-file-attachment-icon',
|
|
194
194
|
alt: 'Attachment file type: unknown',
|
|
195
195
|
title: 'unknown',
|
|
196
196
|
type: this.type
|
|
197
|
-
})}
|
|
198
|
-
<div class="discord-file-attachment-inner">
|
|
199
|
-
<div class="discord-file-attachment-filename-link-wrapper">
|
|
200
|
-
<discord-link
|
|
201
|
-
href=${ifDefined(this.href)}
|
|
202
|
-
rel=${ifDefined(this.rel)}
|
|
203
|
-
target=${ifDefined(this.target)}
|
|
204
|
-
type=${ifDefined(this.type)}
|
|
205
|
-
>
|
|
206
|
-
${this.name}
|
|
207
|
-
</discord-link>
|
|
208
|
-
</div>
|
|
209
|
-
<div class="discord-file-attachment-metadata">
|
|
210
|
-
${this.bytes}${when(this.bytesUnit, () => html ` ${this.bytesUnit}`, () => null)}
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
<div
|
|
197
|
+
})}
|
|
198
|
+
<div class="discord-file-attachment-inner">
|
|
199
|
+
<div class="discord-file-attachment-filename-link-wrapper">
|
|
200
|
+
<discord-link
|
|
201
|
+
href=${ifDefined(this.href)}
|
|
202
|
+
rel=${ifDefined(this.rel)}
|
|
203
|
+
target=${ifDefined(this.target)}
|
|
204
|
+
type=${ifDefined(this.type)}
|
|
205
|
+
>
|
|
206
|
+
${this.name}
|
|
207
|
+
</discord-link>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="discord-file-attachment-metadata">
|
|
210
|
+
${this.bytes}${when(this.bytesUnit, () => html ` ${this.bytesUnit}`, () => null)}
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div
|
|
217
217
|
class=${classMap({
|
|
218
218
|
'discord-button-download-attachment': true,
|
|
219
219
|
'discord-button-download-attachment-light-theme': this.lightTheme
|
|
220
|
-
})}
|
|
221
|
-
>
|
|
222
|
-
<a
|
|
223
|
-
class="discord-link-download-attachment"
|
|
224
|
-
aria-label="Download"
|
|
225
|
-
href="${ifDefined(this.href)}"
|
|
226
|
-
rel="noreferrer noopener"
|
|
227
|
-
target="_blank"
|
|
228
|
-
role="button"
|
|
229
|
-
tabindex="0"
|
|
230
|
-
>
|
|
231
|
-
${AttachmentDownloadButton()}
|
|
232
|
-
</a>
|
|
233
|
-
</div>
|
|
220
|
+
})}
|
|
221
|
+
>
|
|
222
|
+
<a
|
|
223
|
+
class="discord-link-download-attachment"
|
|
224
|
+
aria-label="Download"
|
|
225
|
+
href="${ifDefined(this.href)}"
|
|
226
|
+
rel="noreferrer noopener"
|
|
227
|
+
target="_blank"
|
|
228
|
+
role="button"
|
|
229
|
+
tabindex="0"
|
|
230
|
+
>
|
|
231
|
+
${AttachmentDownloadButton()}
|
|
232
|
+
</a>
|
|
233
|
+
</div>
|
|
234
234
|
</div>`;
|
|
235
235
|
}
|
|
236
236
|
};
|