@penwin/discord-components-core 4.3.5 → 4.3.6
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/custom-elements.json +914 -914
- package/dist/bundle/index.mjs +28 -3
- package/dist/bundle/index.mjs.map +1 -1
- package/dist/components/discord-code/DiscordCode.js +1 -1
- package/dist/components/discord-embed/DiscordEmbed.d.ts.map +1 -1
- package/dist/components/discord-embed/DiscordEmbed.js +2 -0
- package/dist/components/discord-embed/DiscordEmbed.js.map +1 -1
- package/dist/components/discord-embed-description/DiscordEmbedDescription.d.ts.map +1 -1
- package/dist/components/discord-embed-description/DiscordEmbedDescription.js +1 -0
- package/dist/components/discord-embed-description/DiscordEmbedDescription.js.map +1 -1
- package/dist/components/discord-embed-field/DiscordEmbedField.d.ts.map +1 -1
- package/dist/components/discord-embed-field/DiscordEmbedField.js +19 -1
- package/dist/components/discord-embed-field/DiscordEmbedField.js.map +1 -1
- package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.d.ts.map +1 -1
- package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js +4 -0
- package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js.map +1 -1
- package/dist/components/discord-message/DiscordMessage.js +1 -1
- package/package.json +1 -1
package/dist/bundle/index.mjs
CHANGED
|
@@ -2358,7 +2358,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
2358
2358
|
}
|
|
2359
2359
|
|
|
2360
2360
|
code {
|
|
2361
|
-
padding: 0.2em;
|
|
2361
|
+
padding: 0.1em 0.2em;
|
|
2362
2362
|
margin: -0.2em;
|
|
2363
2363
|
border-radius: 3px;
|
|
2364
2364
|
border: none;
|
|
@@ -3332,6 +3332,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
3332
3332
|
grid-column: 1 / 1;
|
|
3333
3333
|
margin-top: 8px;
|
|
3334
3334
|
min-width: 0;
|
|
3335
|
+
max-width: 400px;
|
|
3335
3336
|
}
|
|
3336
3337
|
|
|
3337
3338
|
:host .discord-embed-title a {
|
|
@@ -3355,6 +3356,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
3355
3356
|
border-radius: 4px;
|
|
3356
3357
|
max-width: 300px;
|
|
3357
3358
|
max-height: 300px;
|
|
3359
|
+
min-width: 100%;
|
|
3358
3360
|
}
|
|
3359
3361
|
|
|
3360
3362
|
:host .discord-embed-media {
|
|
@@ -3419,6 +3421,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
3419
3421
|
line-height: 1.125rem;
|
|
3420
3422
|
margin-top: 8px;
|
|
3421
3423
|
min-width: 0;
|
|
3424
|
+
max-width: 400px;
|
|
3422
3425
|
}
|
|
3423
3426
|
|
|
3424
3427
|
::slotted(discord-code) {
|
|
@@ -3436,7 +3439,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
3436
3439
|
slot::slotted(discord-header:first-child) {
|
|
3437
3440
|
--margin-top: 0px;
|
|
3438
3441
|
}
|
|
3439
|
-
`,m([z({context:q,subscribe:!0}),u({type:Boolean,reflect:!0,attribute:"light-theme"})],Ri.prototype,"lightTheme",2),Ri=m([w("discord-embed-description")],Ri);var yt=class extends L{constructor(){super(...arguments);this.embedFieldEmojisMap={};this.inline=!1;this.inlineIndex=void 0;this.lightTheme=!1;this.validInlineIndices=new Set([1,2,3])}checkInlineIndex(){if(this.inlineIndex){let t=Number(this.inlineIndex);if(!Number.isNaN(t)&&!this.validInlineIndices.has(t))throw new RangeError("DiscordEmbedField `inlineIndex` prop must be one of: 1, 2, or 3")}}render(){this.checkInlineIndex();let t=this.parseTitle(this.fieldTitle),n=y(t,()=>_`<div class="discord-field-title"
|
|
3442
|
+
`,m([z({context:q,subscribe:!0}),u({type:Boolean,reflect:!0,attribute:"light-theme"})],Ri.prototype,"lightTheme",2),Ri=m([w("discord-embed-description")],Ri);var yt=class extends L{constructor(){super(...arguments);this.embedFieldEmojisMap={};this.inline=!1;this.inlineIndex=void 0;this.lightTheme=!1;this.validInlineIndices=new Set([1,2,3])}checkInlineIndex(){if(this.inlineIndex){let t=Number(this.inlineIndex);if(!Number.isNaN(t)&&!this.validInlineIndices.has(t))throw new RangeError("DiscordEmbedField `inlineIndex` prop must be one of: 1, 2, or 3")}}render(){this.checkInlineIndex();let t=this.parseTitle(this.fieldTitle),n=y(t,()=>_`<div class="discord-field-title">
|
|
3443
|
+
<slot name="field-title">${[...t]}</slot>
|
|
3444
|
+
</div>`);return _`${n}<slot></slot>`}parseTitle(t){if(!t)return null;let n=[],r="";for(let o of t.split(`
|
|
3440
3445
|
`)){for(let s of o.split(" ")){let l=Jn(s)??this.embedFieldEmojisMap[s]??{};l.name?n.push(_`<discord-custom-emoji name=${l.name} url=${B(l.url)} embed-emoji></discord-custom-emoji>`):r+=`${s} `,r===" "&&n.push(_`<br />`)}n.push(r),r=""}return n.map(o=>typeof o=="string"?_`<span>${o}</span>`:o)}};a(yt,"DiscordEmbedField"),yt.styles=I`
|
|
3441
3446
|
:host {
|
|
3442
3447
|
font-size: 0.875rem;
|
|
@@ -3465,6 +3470,22 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
3465
3470
|
:host([light-theme]) .discord-field-title {
|
|
3466
3471
|
color: #313338;
|
|
3467
3472
|
}
|
|
3473
|
+
|
|
3474
|
+
::slotted(discord-code),
|
|
3475
|
+
slot[name='field-title']::slotted(discord-code),
|
|
3476
|
+
discord-code {
|
|
3477
|
+
margin: 0px 2px;
|
|
3478
|
+
--background-color: color-mix(in oklab, hsl(230 calc(1 * 6.383%) 18.431% /1) 100%, #000 0%);
|
|
3479
|
+
--border: none;
|
|
3480
|
+
}
|
|
3481
|
+
|
|
3482
|
+
:host([light-theme]),
|
|
3483
|
+
slot[name='field-title']::slotted(discord-code),
|
|
3484
|
+
discord-code {
|
|
3485
|
+
::slotted(discord-code) {
|
|
3486
|
+
--background-color: #f3f3f4;
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3468
3489
|
`,m([u({reflect:!0,attribute:"field-title"})],yt.prototype,"fieldTitle",2),m([u({attribute:!1})],yt.prototype,"embedFieldEmojisMap",2),m([u({type:Boolean,reflect:!0,attribute:"inline"})],yt.prototype,"inline",2),m([u({type:Number,reflect:!0,attribute:"inline-index"})],yt.prototype,"inlineIndex",2),m([z({context:q,subscribe:!0}),u({type:Boolean,reflect:!0,attribute:"light-theme"})],yt.prototype,"lightTheme",2),yt=m([w("discord-embed-field")],yt);var Qi=class extends L{render(){return _`<slot></slot>`}};a(Qi,"DiscordEmbedFields"),Qi.styles=I`
|
|
3469
3490
|
:host {
|
|
3470
3491
|
display: grid;
|
|
@@ -4637,7 +4658,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
4637
4658
|
:host([has-thread]):after {
|
|
4638
4659
|
width: 2rem;
|
|
4639
4660
|
left: 2.2rem;
|
|
4640
|
-
top:
|
|
4661
|
+
top: 3.2rem;
|
|
4641
4662
|
border-left: 2px solid #4f545c !important;
|
|
4642
4663
|
border-bottom: 2px solid #4f545c !important;
|
|
4643
4664
|
border-bottom-left-radius: 8px !important;
|
|
@@ -4853,6 +4874,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ee=D,K=Y),V===void 0&&
|
|
|
4853
4874
|
</nav>
|
|
4854
4875
|
</div>
|
|
4855
4876
|
`}};a(rt,"DiscordMediaFullscreenPreviewer"),rt.styles=I`
|
|
4877
|
+
:host {
|
|
4878
|
+
display: contents;
|
|
4879
|
+
}
|
|
4880
|
+
|
|
4856
4881
|
.media-fullscreen-previewer {
|
|
4857
4882
|
position: fixed;
|
|
4858
4883
|
inset: 0;
|