@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
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { html, svg } from 'lit';
|
|
2
2
|
import { spread } from '../../../spread.js';
|
|
3
|
-
const svgContent = svg `
|
|
4
|
-
<path d="M6.125 1.75v-.437h-.438V.875h-.438V.438H2.625v.438H1.75v.438h-.437v.438H.875v.875H.438v2.188h.438v.438h.438v.438h.438v.438h.438v.438h2.188v-.438h.875v-.438h.438v-.438h.438v-.875h.438V1.75z" fill="#bcef42"/>
|
|
5
|
-
<path d="M6.563.438h-.875v.438h.875z" fill="#f0f0f0"/>
|
|
6
|
-
<path d="M1.313 5.688H.438v.438h.875z" fill="#bcef42"/>
|
|
7
|
-
<path d="M1.75 6.125H.438v.438h1.313z" fill="#7fb134"/>
|
|
8
|
-
<path d="M6.563 3.5h-.438v.875h.438z" fill="#816bee"/>
|
|
9
|
-
<path d="M5.25.438H2.625v.438H5.25z" fill="#f0f0f0"/>
|
|
10
|
-
<path d="M5.25.875H2.625v.438H5.25z" fill="#b79cf8"/>
|
|
11
|
-
<path d="M4.375 6.125H2.188v.438h2.188z" fill="#816bee"/>
|
|
12
|
-
<path d="M6.563.875h-.438v.438h.438z" fill="#bcef42"/>
|
|
13
|
-
<path d="M2.625 2.188h-.437v.438h.438zM1.313 1.75H.875v.438h.438zm.438-.438h-.438v.438h.438z" fill="#f0f0f0"/>
|
|
14
|
-
<path d="M2.625 1.313h-.437v.438h.438zm3.063 0H5.25v.438h.438z" fill="#b79cf8"/>
|
|
15
|
-
<path d="M2.188.875H1.75v.438h.438zm.875 1.75h-.438v.438h.438zM.875 5.25H.438v.438h.438z" fill="#f0f0f0"/>
|
|
16
|
-
<path d="M6.125 4.813h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438z" fill="#816bee"/>
|
|
17
|
-
<path d="M6.563.438v.875h-.438V.875h-.438v.438h.438v.438h.438v2.625h.438V.438zm-5.25.875H.875v.438h.438zm.438-.438h.875V.438H1.75zh-.438v.438h.438zm4.813 3.5h-.438v.875h.438zM.875 1.75H.438v.875h.438zM5.25 6.125h-.875v.438h.875zm.875-.875h-.438v.438h.438zm-4.812 0H.875v.438h.438zm.438.438h-.438v.438h.438zm-.875-.875H.438v.438h.438zm4.813.875h-.438v.438h.438zM.438 2.625H0v3.938h.438z" fill="#000"/>
|
|
18
|
-
<path d="M5.25.875h.438V.438h.875V0H2.625v.438H5.25zM2.188 6.563v-.438H1.75v.438H.438v.438h3.938v-.438z" fill="#000"/>
|
|
19
|
-
<path d="M.875 2.625H.438V3.5h.438z" fill="#f0f0f0"/>
|
|
20
|
-
<path d="M4.375 2.625H3.5v.438h.875zm-.438 1.75h-.874v.438h.875zm.875-1.313h-.438v.875h.438zm-3.5 1.75h.875v-.438H1.75V2.188h-.437zm3.5-3.063H3.063v.438h1.75zm-.438 3.5H2.625v.438h1.75zm2.188-3.063h-.438v1.313h.438zM.875 3.5H.438v1.313h.438zm1.313-1.75H1.75v.438h.438zm1.313 1.313h-.438v.438h.438zm-.438.875h-.438v.438h.438zm-.438.875h-.437v.438h.438zm1.75-.875h-.437v.438h.438zm.438.875h-.438v.438h.438zm.438-.438h-.438v.438h.438zm-2.188-1.75v-.437h-.438v.438h-.437v1.313h.438V2.625zm3.063-.875h-.438v.438h.438zm-.875.438h-.438v.438h.438zm.438.438h-.438v1.75h.438zM1.313 4.813H.875v.438h.438zm.438.438h-.438v.438h.438zm.438.438H1.75v.438h.438z" fill="#b79cf8"/>
|
|
3
|
+
const svgContent = svg `
|
|
4
|
+
<path d="M6.125 1.75v-.437h-.438V.875h-.438V.438H2.625v.438H1.75v.438h-.437v.438H.875v.875H.438v2.188h.438v.438h.438v.438h.438v.438h.438v.438h2.188v-.438h.875v-.438h.438v-.438h.438v-.875h.438V1.75z" fill="#bcef42"/>
|
|
5
|
+
<path d="M6.563.438h-.875v.438h.875z" fill="#f0f0f0"/>
|
|
6
|
+
<path d="M1.313 5.688H.438v.438h.875z" fill="#bcef42"/>
|
|
7
|
+
<path d="M1.75 6.125H.438v.438h1.313z" fill="#7fb134"/>
|
|
8
|
+
<path d="M6.563 3.5h-.438v.875h.438z" fill="#816bee"/>
|
|
9
|
+
<path d="M5.25.438H2.625v.438H5.25z" fill="#f0f0f0"/>
|
|
10
|
+
<path d="M5.25.875H2.625v.438H5.25z" fill="#b79cf8"/>
|
|
11
|
+
<path d="M4.375 6.125H2.188v.438h2.188z" fill="#816bee"/>
|
|
12
|
+
<path d="M6.563.875h-.438v.438h.438z" fill="#bcef42"/>
|
|
13
|
+
<path d="M2.625 2.188h-.437v.438h.438zM1.313 1.75H.875v.438h.438zm.438-.438h-.438v.438h.438z" fill="#f0f0f0"/>
|
|
14
|
+
<path d="M2.625 1.313h-.437v.438h.438zm3.063 0H5.25v.438h.438z" fill="#b79cf8"/>
|
|
15
|
+
<path d="M2.188.875H1.75v.438h.438zm.875 1.75h-.438v.438h.438zM.875 5.25H.438v.438h.438z" fill="#f0f0f0"/>
|
|
16
|
+
<path d="M6.125 4.813h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438z" fill="#816bee"/>
|
|
17
|
+
<path d="M6.563.438v.875h-.438V.875h-.438v.438h.438v.438h.438v2.625h.438V.438zm-5.25.875H.875v.438h.438zm.438-.438h.875V.438H1.75zh-.438v.438h.438zm4.813 3.5h-.438v.875h.438zM.875 1.75H.438v.875h.438zM5.25 6.125h-.875v.438h.875zm.875-.875h-.438v.438h.438zm-4.812 0H.875v.438h.438zm.438.438h-.438v.438h.438zm-.875-.875H.438v.438h.438zm4.813.875h-.438v.438h.438zM.438 2.625H0v3.938h.438z" fill="#000"/>
|
|
18
|
+
<path d="M5.25.875h.438V.438h.875V0H2.625v.438H5.25zM2.188 6.563v-.438H1.75v.438H.438v.438h3.938v-.438z" fill="#000"/>
|
|
19
|
+
<path d="M.875 2.625H.438V3.5h.438z" fill="#f0f0f0"/>
|
|
20
|
+
<path d="M4.375 2.625H3.5v.438h.875zm-.438 1.75h-.874v.438h.875zm.875-1.313h-.438v.875h.438zm-3.5 1.75h.875v-.438H1.75V2.188h-.437zm3.5-3.063H3.063v.438h1.75zm-.438 3.5H2.625v.438h1.75zm2.188-3.063h-.438v1.313h.438zM.875 3.5H.438v1.313h.438zm1.313-1.75H1.75v.438h.438zm1.313 1.313h-.438v.438h.438zm-.438.875h-.438v.438h.438zm-.438.875h-.437v.438h.438zm1.75-.875h-.437v.438h.438zm.438.875h-.438v.438h.438zm.438-.438h-.438v.438h.438zm-2.188-1.75v-.437h-.438v.438h-.437v1.313h.438V2.625zm3.063-.875h-.438v.438h.438zm-.875.438h-.438v.438h.438zm.438.438h-.438v1.75h.438zM1.313 4.813H.875v.438h.438zm.438.438h-.438v.438h.438zm.438.438H1.75v.438h.438z" fill="#b79cf8"/>
|
|
21
21
|
`;
|
|
22
22
|
export default function Shell(props = {}) {
|
|
23
|
-
return html `<svg
|
|
24
|
-
${spread(props)}
|
|
25
|
-
aria-hidden="true"
|
|
26
|
-
role="img"
|
|
27
|
-
width="14"
|
|
28
|
-
height="14"
|
|
29
|
-
viewBox="0 0 7 7"
|
|
30
|
-
fill="none"
|
|
31
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
-
>
|
|
33
|
-
${svgContent}
|
|
23
|
+
return html `<svg
|
|
24
|
+
${spread(props)}
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
role="img"
|
|
27
|
+
width="14"
|
|
28
|
+
height="14"
|
|
29
|
+
viewBox="0 0 7 7"
|
|
30
|
+
fill="none"
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
>
|
|
33
|
+
${svgContent}
|
|
34
34
|
</svg>`;
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=Shell.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { html, svg } from 'lit';
|
|
2
2
|
import { spread } from '../../../spread.js';
|
|
3
|
-
const svgContent = svg `
|
|
4
|
-
<path d="M6.125 1.75v-.437h-.438V.875h-.438V.438H1.75v.438h-.437v.438H.875v.438H.438v2.625h.438v.438h.438v.438h.438v.875h.438v.438h2.625v-.438h.438v-.875h.438v-.438h.438v-.438h.438V1.75z" fill="#d1cdd5"/>
|
|
5
|
-
<path d="M1.75.438h-.437v.438h.438zm-.437.437H.875v.438h.438zm-.438.438H.438v.438h.438zm.875 3.938h-.437v.875h.438zm-.438-.438H.875v.438h.438zm.875 1.313H1.75v.438h.438zM.874 4.376H.438v.438h.438z" fill="#000"/>
|
|
6
|
-
<path d="M1.75 4.813h-.437v.438h.438zm.438.875H1.75v.438h.438zm-.875-1.313H.875v.438h.438zm1.75-1.313H1.75v1.313h1.313z" fill="#847d8b"/>
|
|
7
|
-
<path d="M3.063 3.5h-.875v.875h.875z" fill="#57595f"/>
|
|
8
|
-
<path d="M5.25 3.063H3.938v1.313h1.313z" fill="#847d8b"/>
|
|
9
|
-
<path d="M5.25 3.5h-.875v.875h.875z" fill="#57595f"/>
|
|
10
|
-
<path d="M5.25 5.254h.438v-.438H5.25zm-.438.875h.438v-.438h-.438zm.875-1.313h.438v-.438h-.438z" fill="#847d8b"/>
|
|
11
|
-
<path d="M.438 1.75H0v2.625h.438z" fill="#000"/>
|
|
12
|
-
<path d="M.875 1.75H.438v2.625h.438z" fill="#fff"/>
|
|
13
|
-
<path d="M5.25.879h.438V.441H5.25zm.438.438h.438V.879h-.438zm.438.438h.438v-.438h-.438zM5.251 6.13h.438v-.875h-.438zm.438-.875h.438v-.438h-.438zm-.875 1.313h.438V6.13h-.438zm1.313-1.75h.438V4.38h-.438zm.438-.438h.438V1.755h-.438z" fill="#000"/>
|
|
14
|
-
<path d="M6.125 4.379h.438V1.754h-.438z" fill="#847d8b"/>
|
|
15
|
-
<path d="M1.75 0v.438h3.5V0z" fill="#000"/>
|
|
16
|
-
<path d="M1.75.875h-.437v.438h.438zm-.437.438H.875v.438h.438zm.438.438h-.438v.438h.438zm3.5-.433h.438V.88h-.438zm.438.438h.438v-.438h-.438zM1.75.438v.438h3.5V.438z" fill="#fff"/>
|
|
17
|
-
<path d="M2.188 6.563v.438h2.625v-.438z" fill="#000"/>
|
|
18
|
-
<path d="M2.188 6.125v.438h2.625v-.438z" fill="#847d8b"/>
|
|
19
|
-
<path d="M3.063 5.688h-.438v.875h.438zm1.313 0h-.438v.875h.438z" fill="#57595f"/>
|
|
3
|
+
const svgContent = svg `
|
|
4
|
+
<path d="M6.125 1.75v-.437h-.438V.875h-.438V.438H1.75v.438h-.437v.438H.875v.438H.438v2.625h.438v.438h.438v.438h.438v.875h.438v.438h2.625v-.438h.438v-.875h.438v-.438h.438v-.438h.438V1.75z" fill="#d1cdd5"/>
|
|
5
|
+
<path d="M1.75.438h-.437v.438h.438zm-.437.437H.875v.438h.438zm-.438.438H.438v.438h.438zm.875 3.938h-.437v.875h.438zm-.438-.438H.875v.438h.438zm.875 1.313H1.75v.438h.438zM.874 4.376H.438v.438h.438z" fill="#000"/>
|
|
6
|
+
<path d="M1.75 4.813h-.437v.438h.438zm.438.875H1.75v.438h.438zm-.875-1.313H.875v.438h.438zm1.75-1.313H1.75v1.313h1.313z" fill="#847d8b"/>
|
|
7
|
+
<path d="M3.063 3.5h-.875v.875h.875z" fill="#57595f"/>
|
|
8
|
+
<path d="M5.25 3.063H3.938v1.313h1.313z" fill="#847d8b"/>
|
|
9
|
+
<path d="M5.25 3.5h-.875v.875h.875z" fill="#57595f"/>
|
|
10
|
+
<path d="M5.25 5.254h.438v-.438H5.25zm-.438.875h.438v-.438h-.438zm.875-1.313h.438v-.438h-.438z" fill="#847d8b"/>
|
|
11
|
+
<path d="M.438 1.75H0v2.625h.438z" fill="#000"/>
|
|
12
|
+
<path d="M.875 1.75H.438v2.625h.438z" fill="#fff"/>
|
|
13
|
+
<path d="M5.25.879h.438V.441H5.25zm.438.438h.438V.879h-.438zm.438.438h.438v-.438h-.438zM5.251 6.13h.438v-.875h-.438zm.438-.875h.438v-.438h-.438zm-.875 1.313h.438V6.13h-.438zm1.313-1.75h.438V4.38h-.438zm.438-.438h.438V1.755h-.438z" fill="#000"/>
|
|
14
|
+
<path d="M6.125 4.379h.438V1.754h-.438z" fill="#847d8b"/>
|
|
15
|
+
<path d="M1.75 0v.438h3.5V0z" fill="#000"/>
|
|
16
|
+
<path d="M1.75.875h-.437v.438h.438zm-.437.438H.875v.438h.438zm.438.438h-.438v.438h.438zm3.5-.433h.438V.88h-.438zm.438.438h.438v-.438h-.438zM1.75.438v.438h3.5V.438z" fill="#fff"/>
|
|
17
|
+
<path d="M2.188 6.563v.438h2.625v-.438z" fill="#000"/>
|
|
18
|
+
<path d="M2.188 6.125v.438h2.625v-.438z" fill="#847d8b"/>
|
|
19
|
+
<path d="M3.063 5.688h-.438v.875h.438zm1.313 0h-.438v.875h.438z" fill="#57595f"/>
|
|
20
20
|
`;
|
|
21
21
|
export default function Skull(props = {}) {
|
|
22
|
-
return html `<svg
|
|
23
|
-
${spread(props)}
|
|
24
|
-
aria-hidden="true"
|
|
25
|
-
role="img"
|
|
26
|
-
width="14"
|
|
27
|
-
height="14"
|
|
28
|
-
viewBox="0 0 7 7"
|
|
29
|
-
fill="none"
|
|
30
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
-
>
|
|
32
|
-
${svgContent}
|
|
22
|
+
return html `<svg
|
|
23
|
+
${spread(props)}
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
role="img"
|
|
26
|
+
width="14"
|
|
27
|
+
height="14"
|
|
28
|
+
viewBox="0 0 7 7"
|
|
29
|
+
fill="none"
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
>
|
|
32
|
+
${svgContent}
|
|
33
33
|
</svg>`;
|
|
34
34
|
}
|
|
35
35
|
//# sourceMappingURL=Skull.js.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { html, svg } from 'lit';
|
|
2
2
|
import { spread } from '../../../spread.js';
|
|
3
|
-
const svgContent = svg `
|
|
4
|
-
<path d="M3.063 0H1.75v.438h1.313zm1.75.438h-1.75v.438h1.75zm-.875 2.187H3.5v1.75h.438zm-3.5-.437H0v2.625h.438zM6.563.875h-1.75v.438h1.75z" fill="#000"/>
|
|
5
|
-
<path d="M3.063.438H1.75v.438h1.313zm1.75.438h-1.75v.438h1.75zm1.75.438h-1.75v.438h1.75z" fill="#f0f0f0"/>
|
|
6
|
-
<path d="M3.063 6.563H1.75v.438h1.313z" fill="#000"/>
|
|
7
|
-
<path d="M2.625 6.125v-.438h-.437v-.875H1.75V2.188h.438v-.875h.438V.875H1.75v.438H.875v1.75H.438v1.75h.438v.875h.438v.438h.438v.438h1.313v-.438z" fill="#ffe361"/>
|
|
8
|
-
<path d="M3.063 6.125H1.75v.438h1.313z" fill="#ffb84b"/>
|
|
9
|
-
<path d="M4.813 6.125h-1.75v.438h1.75z" fill="#000"/>
|
|
10
|
-
<path d="M4.375 5.688V5.25h-.437v-.875H3.5v-1.75h.438V1.75h.438v-.437H3.063v.438h-.438v1.313h-.437v1.75h.438v.875h.438v.438h1.75v-.438z" fill="#ffe361"/>
|
|
11
|
-
<path d="M6.563 5.688h-1.75v.438h1.75zM1.75.438h-.437v.438h.438zm-.437.437H.875v.438h.438zm-.438.438H.438v.875h.438zm6.125 0h-.438v.438H7zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.875h.438zm.875 3.063h-.438v.438h.438zm-.438-.438h-.438v.438h.438zm-.438-.875h-.438v.875h.438zm-.438-.875h-.438v.875h.438zM1.747 6.127h-.434v.438h.438zm-.438-.438H.875v.438h.438zm-.438-.875H.438v.875h.438zm1.313-2.625H1.75v2.625h.438zM3.059.876h-.434v.438h.438zm-.434.437h-.437v.875h.438z" fill="#000"/>
|
|
12
|
-
<path d="M.875 2.188H.438v.875h.438zm1.75 0h-.437v.875h.438z" fill="#f0f0f0"/>
|
|
13
|
-
<path d="M2.188 1.313H1.75v.875h.438z" fill="#ffb84b"/>
|
|
14
|
-
<path d="M4.813 1.313h-.438v.438h.438z" fill="#000"/>
|
|
15
|
-
<path d="M1.75.875h-.437v.438h.438z" fill="#f0f0f0"/>
|
|
16
|
-
<path d="M2.625.875h-.437v.438h.438zm1.313.875H3.5v.875h.438zm.438-.438h-.438v.438h.438zm-2.188 3.5H1.75v.438h.438zm-.438.875h-.437v.438h.438zm-.438-.875H.875v.875h.438zm2.188.875v-.438h-.437v-.438h-.438v.875h.438v.438h1.75v-.438zm.438-1.313H3.5v.438h.438z" fill="#ffb84b"/>
|
|
17
|
-
<path d="M4.375 5.688V5.25h-.437v-.875H3.5v-1.75h.438V1.75h.438v-.437H3.063v.438h-.438v1.313h-.437v1.75h.438v.875h.438v.438h1.75v-.438z" fill="url(#a)"/>
|
|
18
|
-
<path d="M6.125 5.25v-.438h-.438v-.874h-.438v-.875h.438v-.875h.438V1.75H4.812v.438h-.438v.438h-.436v1.75h.438v.875h.438v.438h1.75v-.438z" fill="#ff2c52"/>
|
|
19
|
-
<path d="M5.688 2.188H5.25v.875h.438zm.438-.438h-.438v.438h.438zm-.438 2.188H5.25v.438h.438zM5.25 5.251v-.438h-.875v.438h.438v.438h1.75v-.438z" fill="#be0351"/>
|
|
20
|
-
<path d="M1.313 1.313H.875v.438h.438zm0 1.75H.875v.438h.438zm1.75-1.75h-.438v.438h.438zm1.75.438h-.438v.438h.438zm-.438.875h-.437v.438h.438z" fill="#f0f0f0"/>
|
|
21
|
-
<path d="M4.375 1.75h-.437v.875h.438zM3.062 5.688h-.437v.438h.438zm-.438-.875h-.436v.875h.438zm2.188.438h-.438v.438h.438zm-.438-.875h-.436v.875h.438z" fill="#000"/>
|
|
22
|
-
<defs>
|
|
23
|
-
<radialGradient id="a" cx=".75" cy=".5" r="1" fx=".75" fy=".5">
|
|
24
|
-
<stop stop-color="#ff2c52" offset="30%"/>
|
|
25
|
-
<stop stop-color="#ffe361" offset="70%"/>
|
|
26
|
-
</radialGradient>
|
|
27
|
-
</defs>
|
|
3
|
+
const svgContent = svg `
|
|
4
|
+
<path d="M3.063 0H1.75v.438h1.313zm1.75.438h-1.75v.438h1.75zm-.875 2.187H3.5v1.75h.438zm-3.5-.437H0v2.625h.438zM6.563.875h-1.75v.438h1.75z" fill="#000"/>
|
|
5
|
+
<path d="M3.063.438H1.75v.438h1.313zm1.75.438h-1.75v.438h1.75zm1.75.438h-1.75v.438h1.75z" fill="#f0f0f0"/>
|
|
6
|
+
<path d="M3.063 6.563H1.75v.438h1.313z" fill="#000"/>
|
|
7
|
+
<path d="M2.625 6.125v-.438h-.437v-.875H1.75V2.188h.438v-.875h.438V.875H1.75v.438H.875v1.75H.438v1.75h.438v.875h.438v.438h.438v.438h1.313v-.438z" fill="#ffe361"/>
|
|
8
|
+
<path d="M3.063 6.125H1.75v.438h1.313z" fill="#ffb84b"/>
|
|
9
|
+
<path d="M4.813 6.125h-1.75v.438h1.75z" fill="#000"/>
|
|
10
|
+
<path d="M4.375 5.688V5.25h-.437v-.875H3.5v-1.75h.438V1.75h.438v-.437H3.063v.438h-.438v1.313h-.437v1.75h.438v.875h.438v.438h1.75v-.438z" fill="#ffe361"/>
|
|
11
|
+
<path d="M6.563 5.688h-1.75v.438h1.75zM1.75.438h-.437v.438h.438zm-.437.437H.875v.438h.438zm-.438.438H.438v.875h.438zm6.125 0h-.438v.438H7zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.875h.438zm.875 3.063h-.438v.438h.438zm-.438-.438h-.438v.438h.438zm-.438-.875h-.438v.875h.438zm-.438-.875h-.438v.875h.438zM1.747 6.127h-.434v.438h.438zm-.438-.438H.875v.438h.438zm-.438-.875H.438v.875h.438zm1.313-2.625H1.75v2.625h.438zM3.059.876h-.434v.438h.438zm-.434.437h-.437v.875h.438z" fill="#000"/>
|
|
12
|
+
<path d="M.875 2.188H.438v.875h.438zm1.75 0h-.437v.875h.438z" fill="#f0f0f0"/>
|
|
13
|
+
<path d="M2.188 1.313H1.75v.875h.438z" fill="#ffb84b"/>
|
|
14
|
+
<path d="M4.813 1.313h-.438v.438h.438z" fill="#000"/>
|
|
15
|
+
<path d="M1.75.875h-.437v.438h.438z" fill="#f0f0f0"/>
|
|
16
|
+
<path d="M2.625.875h-.437v.438h.438zm1.313.875H3.5v.875h.438zm.438-.438h-.438v.438h.438zm-2.188 3.5H1.75v.438h.438zm-.438.875h-.437v.438h.438zm-.438-.875H.875v.875h.438zm2.188.875v-.438h-.437v-.438h-.438v.875h.438v.438h1.75v-.438zm.438-1.313H3.5v.438h.438z" fill="#ffb84b"/>
|
|
17
|
+
<path d="M4.375 5.688V5.25h-.437v-.875H3.5v-1.75h.438V1.75h.438v-.437H3.063v.438h-.438v1.313h-.437v1.75h.438v.875h.438v.438h1.75v-.438z" fill="url(#a)"/>
|
|
18
|
+
<path d="M6.125 5.25v-.438h-.438v-.874h-.438v-.875h.438v-.875h.438V1.75H4.812v.438h-.438v.438h-.436v1.75h.438v.875h.438v.438h1.75v-.438z" fill="#ff2c52"/>
|
|
19
|
+
<path d="M5.688 2.188H5.25v.875h.438zm.438-.438h-.438v.438h.438zm-.438 2.188H5.25v.438h.438zM5.25 5.251v-.438h-.875v.438h.438v.438h1.75v-.438z" fill="#be0351"/>
|
|
20
|
+
<path d="M1.313 1.313H.875v.438h.438zm0 1.75H.875v.438h.438zm1.75-1.75h-.438v.438h.438zm1.75.438h-.438v.438h.438zm-.438.875h-.437v.438h.438z" fill="#f0f0f0"/>
|
|
21
|
+
<path d="M4.375 1.75h-.437v.875h.438zM3.062 5.688h-.437v.438h.438zm-.438-.875h-.436v.875h.438zm2.188.438h-.438v.438h.438zm-.438-.875h-.436v.875h.438z" fill="#000"/>
|
|
22
|
+
<defs>
|
|
23
|
+
<radialGradient id="a" cx=".75" cy=".5" r="1" fx=".75" fy=".5">
|
|
24
|
+
<stop stop-color="#ff2c52" offset="30%"/>
|
|
25
|
+
<stop stop-color="#ffe361" offset="70%"/>
|
|
26
|
+
</radialGradient>
|
|
27
|
+
</defs>
|
|
28
28
|
`;
|
|
29
29
|
export default function Sun(props = {}) {
|
|
30
|
-
return html `<svg
|
|
31
|
-
${spread(props)}
|
|
32
|
-
aria-hidden="true"
|
|
33
|
-
role="img"
|
|
34
|
-
width="14"
|
|
35
|
-
height="14"
|
|
36
|
-
viewBox="0 0 7 7"
|
|
37
|
-
fill="none"
|
|
38
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
-
>
|
|
40
|
-
${svgContent}
|
|
30
|
+
return html `<svg
|
|
31
|
+
${spread(props)}
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
role="img"
|
|
34
|
+
width="14"
|
|
35
|
+
height="14"
|
|
36
|
+
viewBox="0 0 7 7"
|
|
37
|
+
fill="none"
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
>
|
|
40
|
+
${svgContent}
|
|
41
41
|
</svg>`;
|
|
42
42
|
}
|
|
43
43
|
//# sourceMappingURL=Sun.js.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { html, svg } from 'lit';
|
|
2
2
|
import { spread } from '../../../spread.js';
|
|
3
|
-
const svgContent = svg `
|
|
4
|
-
<path d="M4.813.438v.438h-.438v.438h-.437v.438H3.5v.438h-.437v.875h-.438v.438H3.5v.875h.438v-.44h.875V3.5h.438v-.437h.438v-.438h.438v-.437h.438V.438z" fill="#d1cdd5"/>
|
|
5
|
-
<path d="M1.313 3.938h.438v.438h.875v.875h.438v.438h.875v.438h.875v-.875h-.876v-.438H3.5v-.438h-.437v-.438h-.438V3.5h-.437v-.437H1.75v-.875H.875v.875h.438z" fill="#ffe361"/>
|
|
6
|
-
<path d="M2.188 4.813h-.875v.875h.875zm-.875.875H.438v.875h.875z" fill="#ffe361"/>
|
|
7
|
-
<path d="M4.813.438h-.438v.438h.438zm-.438.438h-.437v.438h.438zm-.437.437H3.5v.438h.438zM3.5 1.75h-.437v.438h.438zm-.437.438h-.438v.875h.438zm-.875 0H1.75v.875h.438zm-1.313 0H.438v.875h.438zm.438.875H.875v.875h.438zm3.5.875h-.875v.438h.875zm0 .875h-.875v.438h.875zm.438.438h-.438v.875h.438z" fill="#000"/>
|
|
8
|
-
<path d="M6.563.438h-.438v1.75h.438z" fill="#847d8b"/>
|
|
9
|
-
<path d="M.438 5.688H0v.875h.438zm4.375.438h-.875v.438h.875zm-.875-.438h-.875v.438h.875z" fill="#000"/>
|
|
10
|
-
<path d="M2.188 5.25h-.875v.438h.875zm-.875.875H.438v.438h.875z" fill="#ffb84b"/>
|
|
11
|
-
<path d="M1.313 6.125v.438h.438v-.438h.438v-.438h-.876zm1.313-.875v-.875H1.75v-.437h-.437v.875h.875v.875h.875V5.25zm-1.313 0v-.438H.875v.438H.438v.438h.875zm0 1.313H.438v.438h.875zM1.75 1.75H.875v.438h.875zm1.313 2.188v.438h.438V3.5h-.876v.438z" fill="#000"/>
|
|
12
|
-
<path d="M5.688 1.313H5.25v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.436v.438h.438zm-.436.436H3.5v.438h.438z" fill="#847d8b"/>
|
|
13
|
-
<path d="M3.063 3.063h-.438v.438h.438z" fill="#f0f0f0"/>
|
|
14
|
-
<path d="M1.75 3.5h-.437v.438h.438zm-.437-.875H.875v.438h.438zm.875 1.313H1.75v.438h.438zm.875.875h-.438v.438h.438zm.438.438h-.438v.438h.438zm.875.438h-.438v.438h.438z" fill="#ffb84b"/>
|
|
15
|
-
<path d="M3.938 4.375H3.5v.438h.438zM2.625 3.063h-.437v.438h.438zm3.938-.875h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438-3.5V.44h1.75v1.75h.438V0z" fill="#000"/>
|
|
16
|
-
<path d="M4.813 5.25h-.438v.438h.438zm-.875-.438H3.5v.438h.438zM3.5 4.374h-.437v.438h.438zm-.437-.436h-.438v.438h.438zM2.625 3.5h-.437v.438h.438zm-.437-.437H1.75v.438h.438zM3.5 2.188h-.437v.438h1.313v-.438h-.438V1.75H3.5zM4.375.875v.438h-.437v.438h1.313v-.438h-.438V.875zm1.75-.438H4.812v.438h1.313z" fill="#f0f0f0"/>
|
|
17
|
-
<path d="M6.125 2.188h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.873.436H3.5v.438h.438z" fill="#847d8b"/>
|
|
18
|
-
<path d="M1.75 2.188h-.437v.438h.438zm0 2.625h-.437v.438h.438zm-.875.875H.438v.438h.438z" fill="#f0f0f0"/>
|
|
3
|
+
const svgContent = svg `
|
|
4
|
+
<path d="M4.813.438v.438h-.438v.438h-.437v.438H3.5v.438h-.437v.875h-.438v.438H3.5v.875h.438v-.44h.875V3.5h.438v-.437h.438v-.438h.438v-.437h.438V.438z" fill="#d1cdd5"/>
|
|
5
|
+
<path d="M1.313 3.938h.438v.438h.875v.875h.438v.438h.875v.438h.875v-.875h-.876v-.438H3.5v-.438h-.437v-.438h-.438V3.5h-.437v-.437H1.75v-.875H.875v.875h.438z" fill="#ffe361"/>
|
|
6
|
+
<path d="M2.188 4.813h-.875v.875h.875zm-.875.875H.438v.875h.875z" fill="#ffe361"/>
|
|
7
|
+
<path d="M4.813.438h-.438v.438h.438zm-.438.438h-.437v.438h.438zm-.437.437H3.5v.438h.438zM3.5 1.75h-.437v.438h.438zm-.437.438h-.438v.875h.438zm-.875 0H1.75v.875h.438zm-1.313 0H.438v.875h.438zm.438.875H.875v.875h.438zm3.5.875h-.875v.438h.875zm0 .875h-.875v.438h.875zm.438.438h-.438v.875h.438z" fill="#000"/>
|
|
8
|
+
<path d="M6.563.438h-.438v1.75h.438z" fill="#847d8b"/>
|
|
9
|
+
<path d="M.438 5.688H0v.875h.438zm4.375.438h-.875v.438h.875zm-.875-.438h-.875v.438h.875z" fill="#000"/>
|
|
10
|
+
<path d="M2.188 5.25h-.875v.438h.875zm-.875.875H.438v.438h.875z" fill="#ffb84b"/>
|
|
11
|
+
<path d="M1.313 6.125v.438h.438v-.438h.438v-.438h-.876zm1.313-.875v-.875H1.75v-.437h-.437v.875h.875v.875h.875V5.25zm-1.313 0v-.438H.875v.438H.438v.438h.875zm0 1.313H.438v.438h.875zM1.75 1.75H.875v.438h.875zm1.313 2.188v.438h.438V3.5h-.876v.438z" fill="#000"/>
|
|
12
|
+
<path d="M5.688 1.313H5.25v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.436v.438h.438zm-.436.436H3.5v.438h.438z" fill="#847d8b"/>
|
|
13
|
+
<path d="M3.063 3.063h-.438v.438h.438z" fill="#f0f0f0"/>
|
|
14
|
+
<path d="M1.75 3.5h-.437v.438h.438zm-.437-.875H.875v.438h.438zm.875 1.313H1.75v.438h.438zm.875.875h-.438v.438h.438zm.438.438h-.438v.438h.438zm.875.438h-.438v.438h.438z" fill="#ffb84b"/>
|
|
15
|
+
<path d="M3.938 4.375H3.5v.438h.438zM2.625 3.063h-.437v.438h.438zm3.938-.875h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438-3.5V.44h1.75v1.75h.438V0z" fill="#000"/>
|
|
16
|
+
<path d="M4.813 5.25h-.438v.438h.438zm-.875-.438H3.5v.438h.438zM3.5 4.374h-.437v.438h.438zm-.437-.436h-.438v.438h.438zM2.625 3.5h-.437v.438h.438zm-.437-.437H1.75v.438h.438zM3.5 2.188h-.437v.438h1.313v-.438h-.438V1.75H3.5zM4.375.875v.438h-.437v.438h1.313v-.438h-.438V.875zm1.75-.438H4.812v.438h1.313z" fill="#f0f0f0"/>
|
|
17
|
+
<path d="M6.125 2.188h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.438.438h-.438v.438h.438zm-.873.436H3.5v.438h.438z" fill="#847d8b"/>
|
|
18
|
+
<path d="M1.75 2.188h-.437v.438h.438zm0 2.625h-.437v.438h.438zm-.875.875H.438v.438h.438z" fill="#f0f0f0"/>
|
|
19
19
|
`;
|
|
20
20
|
export default function Sword(props = {}) {
|
|
21
|
-
return html `<svg
|
|
22
|
-
${spread(props)}
|
|
23
|
-
aria-hidden="true"
|
|
24
|
-
role="img"
|
|
25
|
-
width="14"
|
|
26
|
-
height="14"
|
|
27
|
-
viewBox="0 0 7 7"
|
|
28
|
-
fill="none"
|
|
29
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
-
>
|
|
31
|
-
${svgContent}
|
|
21
|
+
return html `<svg
|
|
22
|
+
${spread(props)}
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
role="img"
|
|
25
|
+
width="14"
|
|
26
|
+
height="14"
|
|
27
|
+
viewBox="0 0 7 7"
|
|
28
|
+
fill="none"
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
>
|
|
31
|
+
${svgContent}
|
|
32
32
|
</svg>`;
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=Sword.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { html, svg } from 'lit';
|
|
2
2
|
import { spread } from '../../../spread.js';
|
|
3
|
-
const svgContent = svg `
|
|
4
|
-
<path d="M5.688 2.625v-.437H5.25V1.75h-.438v-.437h-.438V.875h-.436V.438h-.875v.438h-.438v.438h-.437v.438H1.75v.438h-.437v.438H.875v.875H.438v2.188h.438v.438h.875v.438h3.5v-.438h.875v-.438h.438V3.5h-.438v-.875z" fill="#0abbff"/>
|
|
5
|
-
<path d="M3.063 0v.438h.875V0zm-.438.438v.438h.438V.438zm1.313 0v.438h.438V.438zm.438.438v.438h.438V.875zm.438.438v.438h.438v-.439zm.438.438v.438h.438v-.44zm.438.438v.438h.438v-.44zm.438.438v.875h.438v-.878zm-5.69-.003V3.5h.438v-.875zM0 3.5v2.188h.438V3.5zm6.563 0v2.188h.438V3.5zM2.188.875v.438h.438V.875zm-.438.438v.438h.438v-.438zm-.437.437v.438h.438V1.75zm-.438.438v.438h.438v-.438zm-.438 3.5v.438h.438v-.438zm5.688 0v.438h.438v-.438zm-4.375.875v.438h3.5v-.438z" fill="#000"/>
|
|
6
|
-
<path d="M1.75 6.125v.438h3.5v-.438z" fill="#4282d8"/>
|
|
7
|
-
<path d="M.875 6.125v.438h.875v-.438zm5.25.438v-.438H5.25v.438z" fill="#000"/>
|
|
8
|
-
<path d="M3.063.438v.438h.875V.438z" fill="#fff"/>
|
|
9
|
-
<path opacity=".5" d="M4.813 3.5v-.437h-.438v-.438h-.437v-.437h-.875v.438h-.438v.438h-.437v.438H1.75v1.313h.438v.438h2.625v-.438h.438V3.5z" fill="#fff"/>
|
|
10
|
-
<path d="M2.625.875v.438h.438V.875zm-.437.438v.438h.438v-.438zm.438.438v.438h.438V1.75zM1.75 1.75v.438h.438V1.75zm-.437.438v.438h.438v-.438zm-.438.437V3.5h.438v-.875zM.438 3.5v.875h.438V3.5z" fill="#fff"/>
|
|
11
|
-
<path d="M5.25 2.188v.438h.438v-.438zm.438.438v.875h.438v-.876zm.438.875v1.75h-.438v.438H5.25v.438h.875v-.438h.438V3.5zM.875 6.125h.875v-.438H.875z" fill="#4282d8"/>
|
|
3
|
+
const svgContent = svg `
|
|
4
|
+
<path d="M5.688 2.625v-.437H5.25V1.75h-.438v-.437h-.438V.875h-.436V.438h-.875v.438h-.438v.438h-.437v.438H1.75v.438h-.437v.438H.875v.875H.438v2.188h.438v.438h.875v.438h3.5v-.438h.875v-.438h.438V3.5h-.438v-.875z" fill="#0abbff"/>
|
|
5
|
+
<path d="M3.063 0v.438h.875V0zm-.438.438v.438h.438V.438zm1.313 0v.438h.438V.438zm.438.438v.438h.438V.875zm.438.438v.438h.438v-.439zm.438.438v.438h.438v-.44zm.438.438v.438h.438v-.44zm.438.438v.875h.438v-.878zm-5.69-.003V3.5h.438v-.875zM0 3.5v2.188h.438V3.5zm6.563 0v2.188h.438V3.5zM2.188.875v.438h.438V.875zm-.438.438v.438h.438v-.438zm-.437.437v.438h.438V1.75zm-.438.438v.438h.438v-.438zm-.438 3.5v.438h.438v-.438zm5.688 0v.438h.438v-.438zm-4.375.875v.438h3.5v-.438z" fill="#000"/>
|
|
6
|
+
<path d="M1.75 6.125v.438h3.5v-.438z" fill="#4282d8"/>
|
|
7
|
+
<path d="M.875 6.125v.438h.875v-.438zm5.25.438v-.438H5.25v.438z" fill="#000"/>
|
|
8
|
+
<path d="M3.063.438v.438h.875V.438z" fill="#fff"/>
|
|
9
|
+
<path opacity=".5" d="M4.813 3.5v-.437h-.438v-.438h-.437v-.437h-.875v.438h-.438v.438h-.437v.438H1.75v1.313h.438v.438h2.625v-.438h.438V3.5z" fill="#fff"/>
|
|
10
|
+
<path d="M2.625.875v.438h.438V.875zm-.437.438v.438h.438v-.438zm.438.438v.438h.438V1.75zM1.75 1.75v.438h.438V1.75zm-.437.438v.438h.438v-.438zm-.438.437V3.5h.438v-.875zM.438 3.5v.875h.438V3.5z" fill="#fff"/>
|
|
11
|
+
<path d="M5.25 2.188v.438h.438v-.438zm.438.438v.875h.438v-.876zm.438.875v1.75h-.438v.438H5.25v.438h.875v-.438h.438V3.5zM.875 6.125h.875v-.438H.875z" fill="#4282d8"/>
|
|
12
12
|
`;
|
|
13
13
|
export default function Water(props = {}) {
|
|
14
|
-
return html `<svg
|
|
15
|
-
${spread(props)}
|
|
16
|
-
aria-hidden="true"
|
|
17
|
-
role="img"
|
|
18
|
-
width="14"
|
|
19
|
-
height="14"
|
|
20
|
-
viewBox="0 0 7 7"
|
|
21
|
-
fill="none"
|
|
22
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
-
>
|
|
24
|
-
${svgContent}
|
|
14
|
+
return html `<svg
|
|
15
|
+
${spread(props)}
|
|
16
|
+
aria-hidden="true"
|
|
17
|
+
role="img"
|
|
18
|
+
width="14"
|
|
19
|
+
height="14"
|
|
20
|
+
viewBox="0 0 7 7"
|
|
21
|
+
fill="none"
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
>
|
|
24
|
+
${svgContent}
|
|
25
25
|
</svg>`;
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=Water.js.map
|
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Avatars, DiscordMessageOptions, Profile } from './types.js';
|
|
2
2
|
export declare function getConfig(): DiscordMessageOptions;
|
|
3
|
-
export declare function setConfig(partialConfig: Partial<DiscordMessageOptions>): void;
|
|
4
3
|
export declare const defaultDiscordAvatars: Omit<Avatars, 'default'>;
|
|
5
4
|
export declare const avatars: Avatars;
|
|
6
5
|
export declare const profiles: {
|
|
7
6
|
[key: string]: Profile;
|
|
8
7
|
};
|
|
8
|
+
export declare function setConfig(partialConfig: Partial<DiscordMessageOptions>): void;
|
|
9
9
|
export declare const defaultTheme: string;
|
|
10
10
|
export declare const defaultMode: string;
|
|
11
11
|
export declare const defaultBackground: string;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1E,wBAAgB,SAAS,IAAI,qBAAqB,CAEjD;AAED,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1E,wBAAgB,SAAS,IAAI,qBAAqB,CAEjD;AAED,eAAO,MAAM,qBAAqB,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAO1D,CAAC;AAIF,eAAO,MAAM,OAAO,EAAE,OAEpB,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAA+B,CAAC;AAE/E,wBAAgB,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAO7E;AAED,eAAO,MAAM,YAAY,EAAE,MAAgE,CAAC;AAE5F,eAAO,MAAM,WAAW,EAAE,MAAmE,CAAC;AAE9F,eAAO,MAAM,iBAAiB,EAAE,MAAsE,CAAC;AAEvG,eAAO,MAAM,KAAK,qBAsBhB,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -3,9 +3,6 @@ let config = globalThis.$discordMessage ?? {};
|
|
|
3
3
|
export function getConfig() {
|
|
4
4
|
return config;
|
|
5
5
|
}
|
|
6
|
-
export function setConfig(partialConfig) {
|
|
7
|
-
config = Object.assign(config, partialConfig);
|
|
8
|
-
}
|
|
9
6
|
export const defaultDiscordAvatars = {
|
|
10
7
|
blue: 'https://cdn.discordapp.com/embed/avatars/0.png',
|
|
11
8
|
gray: 'https://cdn.discordapp.com/embed/avatars/1.png',
|
|
@@ -19,6 +16,15 @@ export const avatars = Object.assign(defaultDiscordAvatars, globalAvatars, {
|
|
|
19
16
|
default: defaultDiscordAvatars[globalAvatars.default] ?? globalAvatars.default ?? defaultDiscordAvatars.blue
|
|
20
17
|
});
|
|
21
18
|
export const profiles = getConfig().profiles ?? {};
|
|
19
|
+
export function setConfig(partialConfig) {
|
|
20
|
+
config = Object.assign(config, partialConfig);
|
|
21
|
+
// Keep the derived collections live, so config supplied after this module has loaded — e.g.
|
|
22
|
+
// server-side before an SSR render, or on the client — is seen by components that read them.
|
|
23
|
+
if (partialConfig.profiles)
|
|
24
|
+
Object.assign(profiles, partialConfig.profiles);
|
|
25
|
+
if (partialConfig.avatars)
|
|
26
|
+
Object.assign(avatars, partialConfig.avatars);
|
|
27
|
+
}
|
|
22
28
|
export const defaultTheme = getConfig().defaultTheme === 'light' ? 'light' : 'dark';
|
|
23
29
|
export const defaultMode = getConfig().defaultMode === 'compact' ? 'compact' : 'cozy';
|
|
24
30
|
export const defaultBackground = getConfig().defaultBackground === 'none' ? 'none' : 'discord';
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EACN,KAAK,EACL,GAAG,EACH,IAAI,EACJ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,GAAG,EACH,KAAK,EACL,KAAK,EACL,MAAM,uCAAuC,CAAC;AAG/C,IAAI,MAAM,GAA0B,UAAU,CAAC,eAAe,IAAI,EAAE,CAAC;AAErE,MAAM,UAAU,SAAS;IACxB,OAAO,MAAM,CAAC;AACf,CAAC;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side rendering entry point.
|
|
3
|
+
*
|
|
4
|
+
* Registering every component here and rendering through Lit SSR pre-renders the components to
|
|
5
|
+
* HTML with declarative shadow DOM, so a transcript displays correctly with no client JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* Profiles, avatars and the other options are read from the global config. Either set
|
|
8
|
+
* `globalThis.$discordMessage` before importing this module, or call {@link setConfig} afterwards
|
|
9
|
+
* — `setConfig` keeps the live `profiles`/`avatars` collections in sync — then render:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { html, renderToString, setConfig } from '@penwin/discord-components-core/hydrate';
|
|
13
|
+
*
|
|
14
|
+
* setConfig({ profiles: { '1': { author: 'User' } } });
|
|
15
|
+
* const out = await renderToString(html`<discord-messages>…</discord-messages>`);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { render } from '@lit-labs/ssr';
|
|
19
|
+
import '../index.js';
|
|
20
|
+
export { html } from 'lit';
|
|
21
|
+
export { render } from '@lit-labs/ssr';
|
|
22
|
+
export { collectResult } from '@lit-labs/ssr/lib/render-result.js';
|
|
23
|
+
export { setConfig } from '../config.js';
|
|
24
|
+
/**
|
|
25
|
+
* Render a Lit template to an HTML string with declarative shadow DOM.
|
|
26
|
+
*
|
|
27
|
+
* @param value - The Lit `TemplateResult` (or renderable) to render.
|
|
28
|
+
* @returns The rendered HTML.
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderToString(value: Parameters<typeof render>[0]): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Render a server-rendered HTML string (custom-element markup, e.g. from React SSR) to HTML with
|
|
33
|
+
* declarative shadow DOM. Lit SSR expands every registered custom element found in the markup, so
|
|
34
|
+
* the transcript displays correctly without any client JavaScript.
|
|
35
|
+
*
|
|
36
|
+
* @param markup - The HTML string to expand.
|
|
37
|
+
* @returns The rendered HTML.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderMarkup(markup: string): Promise<string>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hydrate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAMvC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAEzF;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAElE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side rendering entry point.
|
|
3
|
+
*
|
|
4
|
+
* Registering every component here and rendering through Lit SSR pre-renders the components to
|
|
5
|
+
* HTML with declarative shadow DOM, so a transcript displays correctly with no client JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* Profiles, avatars and the other options are read from the global config. Either set
|
|
8
|
+
* `globalThis.$discordMessage` before importing this module, or call {@link setConfig} afterwards
|
|
9
|
+
* — `setConfig` keeps the live `profiles`/`avatars` collections in sync — then render:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { html, renderToString, setConfig } from '@penwin/discord-components-core/hydrate';
|
|
13
|
+
*
|
|
14
|
+
* setConfig({ profiles: { '1': { author: 'User' } } });
|
|
15
|
+
* const out = await renderToString(html`<discord-messages>…</discord-messages>`);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
import { render } from '@lit-labs/ssr';
|
|
19
|
+
import { collectResult } from '@lit-labs/ssr/lib/render-result.js';
|
|
20
|
+
import { html } from 'lit';
|
|
21
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
22
|
+
// Side-effect import: registers every custom element so Lit SSR can render them.
|
|
23
|
+
import '../index.js';
|
|
24
|
+
export { html } from 'lit';
|
|
25
|
+
export { render } from '@lit-labs/ssr';
|
|
26
|
+
export { collectResult } from '@lit-labs/ssr/lib/render-result.js';
|
|
27
|
+
export { setConfig } from '../config.js';
|
|
28
|
+
/**
|
|
29
|
+
* Render a Lit template to an HTML string with declarative shadow DOM.
|
|
30
|
+
*
|
|
31
|
+
* @param value - The Lit `TemplateResult` (or renderable) to render.
|
|
32
|
+
* @returns The rendered HTML.
|
|
33
|
+
*/
|
|
34
|
+
export async function renderToString(value) {
|
|
35
|
+
return collectResult(render(value));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Render a server-rendered HTML string (custom-element markup, e.g. from React SSR) to HTML with
|
|
39
|
+
* declarative shadow DOM. Lit SSR expands every registered custom element found in the markup, so
|
|
40
|
+
* the transcript displays correctly without any client JavaScript.
|
|
41
|
+
*
|
|
42
|
+
* @param markup - The HTML string to expand.
|
|
43
|
+
* @returns The rendered HTML.
|
|
44
|
+
*/
|
|
45
|
+
export async function renderMarkup(markup) {
|
|
46
|
+
return collectResult(render(html `${unsafeHTML(markup)}`));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hydrate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,iFAAiF;AACjF,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAmC;IACvE,OAAO,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc;IAChD,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,CAAA,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|