@descope/web-components-ui 1.0.345 → 1.0.347
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +15 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-enriched-text-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-container/ContainerClass.js +1 -1
- package/src/components/descope-enriched-text/EnrichedTextClass.js +8 -4
- package/src/components/descope-enriched-text/helpers.js +5 -0
- package/src/theme/components/container.js +1 -0
package/dist/index.esm.js
CHANGED
@@ -2303,7 +2303,7 @@ const ContainerClass = compose(
|
|
2303
2303
|
hostHeight: { selector: () => ':host', property: 'height' },
|
2304
2304
|
hostWidth: { selector: () => ':host', property: 'width' },
|
2305
2305
|
hostDirection: { selector: () => ':host', property: 'direction' },
|
2306
|
-
|
2306
|
+
itemsGrow: { selector: () => '::slotted(*)', property: 'flex-grow', fallback: '0' },
|
2307
2307
|
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
2308
2308
|
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
2309
2309
|
|
@@ -3660,6 +3660,12 @@ const disableRules = [
|
|
3660
3660
|
'html_block',
|
3661
3661
|
];
|
3662
3662
|
|
3663
|
+
const decodeHTML = (html) => {
|
3664
|
+
const textArea = document.createElement('textarea');
|
3665
|
+
textArea.innerHTML = html;
|
3666
|
+
return textArea.value;
|
3667
|
+
};
|
3668
|
+
|
3663
3669
|
/* eslint-disable no-param-reassign */
|
3664
3670
|
|
3665
3671
|
const componentName$C = getComponentName('enriched-text');
|
@@ -3788,7 +3794,7 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
|
|
3788
3794
|
}
|
3789
3795
|
|
3790
3796
|
#initProcessor() {
|
3791
|
-
this.processor = new MarkdownIt();
|
3797
|
+
this.processor = new MarkdownIt('commonmark', { html: true });
|
3792
3798
|
this.#storeOrigRenderers();
|
3793
3799
|
this.#updateProcessorRules();
|
3794
3800
|
this.#customizeLinkRenderer();
|
@@ -3808,11 +3814,11 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
|
|
3808
3814
|
return;
|
3809
3815
|
}
|
3810
3816
|
|
3811
|
-
let html = this.
|
3817
|
+
let html = decodeHTML(this.innerHTML);
|
3812
3818
|
|
3813
3819
|
try {
|
3814
3820
|
const tokens = this.processor.parse(html, { references: undefined });
|
3815
|
-
html = this.processor.renderer.render(tokens, { breaks: true });
|
3821
|
+
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
3816
3822
|
} catch (e) {
|
3817
3823
|
// eslint-disable-next-line no-console
|
3818
3824
|
console.warn('Not parsing invalid markdown token');
|
@@ -3838,7 +3844,10 @@ const EnrichedTextClass = compose(
|
|
3838
3844
|
fontSize: {},
|
3839
3845
|
fontFamily: {},
|
3840
3846
|
fontWeight: {},
|
3841
|
-
fontWeightBold:
|
3847
|
+
fontWeightBold: [
|
3848
|
+
{ selector: () => ':host strong', property: 'font-weight' },
|
3849
|
+
{ selector: () => ':host b', property: 'font-weight' },
|
3850
|
+
],
|
3842
3851
|
textColor: { property: 'color' },
|
3843
3852
|
textLineHeight: { property: 'line-height' },
|
3844
3853
|
textAlign: {},
|
@@ -12527,6 +12536,7 @@ const { shadowColor: shadowColor$1 } = helperRefs$2;
|
|
12527
12536
|
const container = {
|
12528
12537
|
...helperTheme$2,
|
12529
12538
|
|
12539
|
+
[compVars$4.itemsGrow]: '0',
|
12530
12540
|
[compVars$4.hostWidth]: '100%',
|
12531
12541
|
[compVars$4.boxShadow]: 'none',
|
12532
12542
|
[compVars$4.backgroundColor]: globalRefs$n.colors.surface.main,
|