@descope/web-components-ui 1.0.345 → 1.0.347
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/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/cjs/index.cjs.js
CHANGED
@@ -4565,7 +4565,7 @@ const ContainerClass = compose(
|
|
4565
4565
|
hostHeight: { selector: () => ':host', property: 'height' },
|
4566
4566
|
hostWidth: { selector: () => ':host', property: 'width' },
|
4567
4567
|
hostDirection: { selector: () => ':host', property: 'direction' },
|
4568
|
-
|
4568
|
+
itemsGrow: { selector: () => '::slotted(*)', property: 'flex-grow', fallback: '0' },
|
4569
4569
|
verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],
|
4570
4570
|
horizontalPadding: [{ property: 'padding-left' }, { property: 'padding-right' }],
|
4571
4571
|
|
@@ -4620,6 +4620,7 @@ const { shadowColor: shadowColor$1 } = helperRefs$2;
|
|
4620
4620
|
const container = {
|
4621
4621
|
...helperTheme$2,
|
4622
4622
|
|
4623
|
+
[compVars$4.itemsGrow]: '0',
|
4623
4624
|
[compVars$4.hostWidth]: '100%',
|
4624
4625
|
[compVars$4.boxShadow]: 'none',
|
4625
4626
|
[compVars$4.backgroundColor]: globalRefs$n.colors.surface.main,
|
@@ -4983,6 +4984,12 @@ const disableRules = [
|
|
4983
4984
|
'html_block',
|
4984
4985
|
];
|
4985
4986
|
|
4987
|
+
const decodeHTML = (html) => {
|
4988
|
+
const textArea = document.createElement('textarea');
|
4989
|
+
textArea.innerHTML = html;
|
4990
|
+
return textArea.value;
|
4991
|
+
};
|
4992
|
+
|
4986
4993
|
/* eslint-disable no-param-reassign */
|
4987
4994
|
|
4988
4995
|
const componentName$C = getComponentName('enriched-text');
|
@@ -5111,7 +5118,7 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
|
|
5111
5118
|
}
|
5112
5119
|
|
5113
5120
|
#initProcessor() {
|
5114
|
-
this.processor = new MarkdownIt();
|
5121
|
+
this.processor = new MarkdownIt('commonmark', { html: true });
|
5115
5122
|
this.#storeOrigRenderers();
|
5116
5123
|
this.#updateProcessorRules();
|
5117
5124
|
this.#customizeLinkRenderer();
|
@@ -5131,11 +5138,11 @@ let EnrichedText$2 = class EnrichedText extends createBaseClass({ componentName:
|
|
5131
5138
|
return;
|
5132
5139
|
}
|
5133
5140
|
|
5134
|
-
let html = this.
|
5141
|
+
let html = decodeHTML(this.innerHTML);
|
5135
5142
|
|
5136
5143
|
try {
|
5137
5144
|
const tokens = this.processor.parse(html, { references: undefined });
|
5138
|
-
html = this.processor.renderer.render(tokens, { breaks: true });
|
5145
|
+
html = this.processor.renderer.render(tokens, { html: true, breaks: true });
|
5139
5146
|
} catch (e) {
|
5140
5147
|
// eslint-disable-next-line no-console
|
5141
5148
|
console.warn('Not parsing invalid markdown token');
|
@@ -5161,7 +5168,10 @@ const EnrichedTextClass = compose(
|
|
5161
5168
|
fontSize: {},
|
5162
5169
|
fontFamily: {},
|
5163
5170
|
fontWeight: {},
|
5164
|
-
fontWeightBold:
|
5171
|
+
fontWeightBold: [
|
5172
|
+
{ selector: () => ':host strong', property: 'font-weight' },
|
5173
|
+
{ selector: () => ':host b', property: 'font-weight' },
|
5174
|
+
],
|
5165
5175
|
textColor: { property: 'color' },
|
5166
5176
|
textLineHeight: { property: 'line-height' },
|
5167
5177
|
textAlign: {},
|