@limetech/lime-elements 38.36.0 → 38.37.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 +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-button.cjs.entry.js +1 -1
- package/dist/cjs/limel-button.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js +8 -2
- package/dist/cjs/limel-markdown.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-parser-1dfc4556.js → markdown-parser-932d9b41.js} +106 -7
- package/dist/cjs/{markdown-parser-1dfc4556.js.map → markdown-parser-932d9b41.js.map} +1 -1
- package/dist/collection/components/button/button.css +7 -7
- package/dist/collection/components/input-field/input-field.js +1 -1
- package/dist/collection/components/input-field/input-field.js.map +1 -1
- package/dist/collection/components/markdown/markdown-parser.js +2 -0
- package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
- package/dist/collection/components/markdown/markdown.js +29 -2
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/components/markdown/remove-empty-paragraphs-plugin.js +98 -0
- package/dist/collection/components/markdown/remove-empty-paragraphs-plugin.js.map +1 -0
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js.map +1 -1
- package/dist/esm/limel-button.entry.js +1 -1
- package/dist/esm/limel-button.entry.js.map +1 -1
- package/dist/esm/limel-markdown.entry.js +8 -2
- package/dist/esm/limel-markdown.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{markdown-parser-bd7fcc7f.js → markdown-parser-b2d5dad4.js} +106 -7
- package/dist/esm/markdown-parser-b2d5dad4.js.map +1 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-c6aaf532.entry.js → p-4a9a6e16.entry.js} +2 -2
- package/dist/lime-elements/{p-c6aaf532.entry.js.map → p-4a9a6e16.entry.js.map} +1 -1
- package/dist/lime-elements/p-668e583c.entry.js.map +1 -1
- package/dist/lime-elements/{p-f2206d1b.js → p-7192af6b.js} +2 -2
- package/dist/lime-elements/p-7192af6b.js.map +1 -0
- package/dist/lime-elements/{p-5eaa6f69.entry.js → p-b80a7353.entry.js} +2 -2
- package/dist/lime-elements/{p-9fc23e05.entry.js → p-c2f922ba.entry.js} +2 -2
- package/dist/lime-elements/p-c2f922ba.entry.js.map +1 -0
- package/dist/types/components/input-field/input-field.d.ts +4 -1
- package/dist/types/components/markdown/markdown-parser.d.ts +1 -0
- package/dist/types/components/markdown/markdown.d.ts +10 -1
- package/dist/types/components/markdown/remove-empty-paragraphs-plugin.d.ts +3 -0
- package/dist/types/components.d.ts +18 -6
- package/package.json +1 -1
- package/dist/esm/markdown-parser-bd7fcc7f.js.map +0 -1
- package/dist/lime-elements/p-9fc23e05.entry.js.map +0 -1
- package/dist/lime-elements/p-f2206d1b.js.map +0 -1
- /package/dist/lime-elements/{p-5eaa6f69.entry.js.map → p-b80a7353.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as t}from"./p-288f0842.js";import{m as o}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as t}from"./p-288f0842.js";import{m as o}from"./p-7192af6b.js";import{g as r}from"./p-2c35fb9d.js";import"./p-4e9b4087.js";class a{constructor(e){this.handleIntersection=e=>{for(const t of e){if(t.isIntersecting){const e=t.target;const o=e.dataset.src;if(o){e.setAttribute("src",o);delete e.dataset.src}this.observer.unobserve(e)}}};this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t){this.observer.observe(e)}}disconnect(){this.observer.disconnect()}}const l='@charset "UTF-8";code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--limel-theme-default-small-font-size);letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;display:inline-block;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem;overflow:auto;white-space:pre-wrap}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul li{position:relative;margin-left:0.75rem}ul li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}img{max-width:100%;border-radius:0.25rem}kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}';const n=class{constructor(t){e(this,t);this.imageIntersectionObserver=null;this.value="";this.whitelist=r.markdownWhitelist;this.lazyLoadImages=false;this.removeEmptyParagraphs=true}async textChanged(){var e;try{this.cleanupImageIntersectionObserver();const t=await o(this.value,{forceHardLineBreaks:true,whitelist:(e=this.whitelist)!==null&&e!==void 0?e:[],lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});this.rootElement.innerHTML=t;this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleRemoveEmptyParagraphsChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return[t("div",{id:"markdown",ref:e=>this.rootElement=e})]}setupImageIntersectionObserver(){if(this.lazyLoadImages){this.imageIntersectionObserver=new a(this.rootElement)}}cleanupImageIntersectionObserver(){if(this.imageIntersectionObserver){this.imageIntersectionObserver.disconnect();this.imageIntersectionObserver=null}}static get watchers(){return{value:["textChanged"],removeEmptyParagraphs:["handleRemoveEmptyParagraphsChange"]}}};n.style=l;export{n as limel_markdown};
|
|
2
|
+
//# sourceMappingURL=p-c2f922ba.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ImageIntersectionObserver","constructor","containerElement","this","handleIntersection","entries","entry","isIntersecting","img","target","dataSrc","dataset","src","setAttribute","observer","unobserve","IntersectionObserver","images","querySelectorAll","observe","disconnect","markdownCss","Markdown","imageIntersectionObserver","globalConfig","markdownWhitelist","async","cleanupImageIntersectionObserver","html","markdownToHTML","value","forceHardLineBreaks","whitelist","_a","lazyLoadImages","removeEmptyParagraphs","rootElement","innerHTML","setupImageIntersectionObserver","error","console","handleRemoveEmptyParagraphsChange","textChanged","disconnectedCallback","render","h","id","ref","el"],"sources":["./src/components/markdown/image-intersection-observer.ts","./src/components/markdown/markdown.scss?tag=limel-markdown&encapsulation=shadow","./src/components/markdown/markdown.tsx"],"sourcesContent":["export class ImageIntersectionObserver {\n private observer: IntersectionObserver;\n\n /**\n * @param containerElement - The element containing images to observe.\n */\n public constructor(containerElement: HTMLElement) {\n this.observer = new IntersectionObserver(this.handleIntersection);\n\n const images = containerElement.querySelectorAll('img');\n for (const img of images) {\n this.observer.observe(img);\n }\n }\n\n public disconnect() {\n this.observer.disconnect();\n }\n\n private readonly handleIntersection = (\n entries: IntersectionObserverEntry[]\n ) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n const img = entry.target as HTMLImageElement;\n const dataSrc = img.dataset.src;\n\n if (dataSrc) {\n img.setAttribute('src', dataSrc);\n delete img.dataset.src;\n }\n\n this.observer.unobserve(img);\n }\n }\n };\n}\n","/**\n* @prop --markdown-hyperlink-color: color of text for hyperlinks. Defaults to `--color-blue-dark`;\n* @prop --markdown-hyperlink-color--hovered: color of text for hyperlinks when hovered. Defaults to `--color-blue-default`;\n*/\n\n@forward './partial-styles/pre-code';\n@forward './partial-styles/headings';\n@forward './partial-styles/body-text';\n@forward './partial-styles/lists';\n@forward './partial-styles/tables';\n@forward './partial-styles/blockquotes';\n@forward './partial-styles/definition-lists';\n@forward './partial-styles/img';\n@forward './partial-styles/kbd';\n@forward './partial-styles/_adjust-for-table-cell';\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n\n & :where(:not(img, video, svg, canvas, iframe)) {\n min-width: 0;\n min-height: 0;\n }\n}\n\n// body-text\nhr {\n border-top: 1px solid rgb(var(--contrast-700));\n}\n\n.MsoNormal {\n margin: 0;\n}\n\n:host(limel-markdown.reset-img-height) {\n // This is not a publicly documented helper class, intended for CRM's internal use.\n // Reset image height to auto to avoid issues with fixed heights in some markdown content\n // e.g., content copied from MS Word or emails that are sent from a user that has\n // added fixed heights to images that appear in the activity feed.\n #markdown {\n img {\n height: auto;\n }\n }\n}\n","import { Component, h, Prop, Watch } from '@stencil/core';\nimport { markdownToHTML } from './markdown-parser';\nimport { globalConfig } from '../../global/config';\nimport { CustomElementDefinition } from '../../global/shared-types/custom-element.types';\nimport { ImageIntersectionObserver } from './image-intersection-observer';\n\n/**\n * The Markdown component receives markdown syntax\n * and renders it as HTML.\n *\n * @exampleComponent limel-example-markdown-headings\n * @exampleComponent limel-example-markdown-emphasis\n * @exampleComponent limel-example-markdown-lists\n * @exampleComponent limel-example-markdown-links\n * @exampleComponent limel-example-markdown-images\n * @exampleComponent limel-example-markdown-code\n * @exampleComponent limel-example-markdown-footnotes\n * @exampleComponent limel-example-markdown-tables\n * @exampleComponent limel-example-markdown-html\n * @exampleComponent limel-example-markdown-keys\n * @exampleComponent limel-example-markdown-blockquotes\n * @exampleComponent limel-example-markdown-horizontal-rule\n * @exampleComponent limel-example-markdown-custom-component\n * @exampleComponent limel-example-markdown-remove-empty-paragraphs\n * @exampleComponent limel-example-markdown-composite\n */\n@Component({\n tag: 'limel-markdown',\n styleUrl: 'markdown.scss',\n shadow: true,\n})\nexport class Markdown {\n /**\n * The input text. Treated as GitHub Flavored Markdown, with the addition\n * that any included HTML will be parsed and rendered as HTML, rather than\n * as text.\n */\n @Prop()\n public value: string = '';\n\n /**\n * Whitelisted html elements.\n *\n * Any custom element added here will not be sanitized and thus rendered.\n * Can also be set via `limel-config`. Setting this property will override\n * the global config.\n * @alpha\n */\n @Prop()\n public whitelist?: CustomElementDefinition[] =\n globalConfig.markdownWhitelist;\n\n /**\n * Enable lazy loading for images\n */\n @Prop({ reflect: true })\n public lazyLoadImages = false;\n\n /**\n * Set to `false` to preserve empty paragraphs before rendering.\n * Empty paragraphs are paragraphs that do not contain\n * any meaningful content (text, images, etc.), or only contain\n * whitespace (`<br />` or ` `).\n */\n @Prop({ reflect: true })\n public removeEmptyParagraphs = true;\n\n @Watch('value')\n public async textChanged() {\n try {\n this.cleanupImageIntersectionObserver();\n\n const html = await markdownToHTML(this.value, {\n forceHardLineBreaks: true,\n whitelist: this.whitelist ?? [],\n lazyLoadImages: this.lazyLoadImages,\n removeEmptyParagraphs: this.removeEmptyParagraphs,\n });\n\n this.rootElement.innerHTML = html;\n\n this.setupImageIntersectionObserver();\n } catch (error) {\n console.error(error);\n }\n }\n\n @Watch('removeEmptyParagraphs')\n public handleRemoveEmptyParagraphsChange() {\n return this.textChanged();\n }\n\n private rootElement: HTMLDivElement;\n private imageIntersectionObserver: ImageIntersectionObserver | null = null;\n\n public async componentDidLoad() {\n this.textChanged();\n }\n\n public disconnectedCallback() {\n this.cleanupImageIntersectionObserver();\n }\n\n public render() {\n return [\n <div\n id=\"markdown\"\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\n />,\n ];\n }\n\n private setupImageIntersectionObserver() {\n if (this.lazyLoadImages) {\n this.imageIntersectionObserver = new ImageIntersectionObserver(\n this.rootElement\n );\n }\n }\n\n private cleanupImageIntersectionObserver() {\n if (this.imageIntersectionObserver) {\n this.imageIntersectionObserver.disconnect();\n this.imageIntersectionObserver = null;\n }\n }\n}\n"],"mappings":"iJAAaA,EAMTC,YAAmBC,GAaFC,KAAAC,mBACbC,IAEA,IAAK,MAAMC,KAASD,EAAS,CACzB,GAAIC,EAAMC,eAAgB,CACtB,MAAMC,EAAMF,EAAMG,OAClB,MAAMC,EAAUF,EAAIG,QAAQC,IAE5B,GAAIF,EAAS,CACTF,EAAIK,aAAa,MAAOH,UACjBF,EAAIG,QAAQC,G,CAGvBT,KAAKW,SAASC,UAAUP,E,IAzBhCL,KAAKW,SAAW,IAAIE,qBAAqBb,KAAKC,oBAE9C,MAAMa,EAASf,EAAiBgB,iBAAiB,OACjD,IAAK,MAAMV,KAAOS,EAAQ,CACtBd,KAAKW,SAASK,QAAQX,E,EAIvBY,aACHjB,KAAKW,SAASM,Y,EChBtB,MAAMC,EAAc,o0O,MC+BPC,EAAQ,M,yBA8DTnB,KAAAoB,0BAA8D,K,WAvD/C,G,eAYnBC,EAAaC,kB,oBAMO,M,2BASO,I,CAGxBC,oB,MACH,IACIvB,KAAKwB,mCAEL,MAAMC,QAAaC,EAAe1B,KAAK2B,MAAO,CAC1CC,oBAAqB,KACrBC,WAAWC,EAAA9B,KAAK6B,aAAS,MAAAC,SAAA,EAAAA,EAAI,GAC7BC,eAAgB/B,KAAK+B,eACrBC,sBAAuBhC,KAAKgC,wBAGhChC,KAAKiC,YAAYC,UAAYT,EAE7BzB,KAAKmC,gC,CACP,MAAOC,GACLC,QAAQD,MAAMA,E,EAKfE,oCACH,OAAOtC,KAAKuC,a,CAMThB,yBACHvB,KAAKuC,a,CAGFC,uBACHxC,KAAKwB,kC,CAGFiB,SACH,MAAO,CACHC,EAAA,OACIC,GAAG,WACHC,IAAMC,GAAQ7C,KAAKiC,YAAcY,I,CAKrCV,iCACJ,GAAInC,KAAK+B,eAAgB,CACrB/B,KAAKoB,0BAA4B,IAAIvB,EACjCG,KAAKiC,Y,EAKTT,mCACJ,GAAIxB,KAAKoB,0BAA2B,CAChCpB,KAAKoB,0BAA0BH,aAC/BjB,KAAKoB,0BAA4B,I"}
|
|
@@ -100,7 +100,10 @@ export declare class InputField {
|
|
|
100
100
|
*/
|
|
101
101
|
formatNumber: boolean;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Defines which numeric values are valid and the increment/decrement interval.
|
|
104
|
+
* For example, `step={0.1}` allows decimals and steps by 0.1.
|
|
105
|
+
* Set to `'any'` to allow any numeric value.
|
|
106
|
+
* Only applies when `type` is `number`.
|
|
104
107
|
*/
|
|
105
108
|
step: number | 'any';
|
|
106
109
|
/**
|
|
@@ -15,8 +15,9 @@ import { CustomElementDefinition } from '../../global/shared-types/custom-elemen
|
|
|
15
15
|
* @exampleComponent limel-example-markdown-keys
|
|
16
16
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
17
17
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
18
|
-
* @exampleComponent limel-example-markdown-composite
|
|
19
18
|
* @exampleComponent limel-example-markdown-custom-component
|
|
19
|
+
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
20
|
+
* @exampleComponent limel-example-markdown-composite
|
|
20
21
|
*/
|
|
21
22
|
export declare class Markdown {
|
|
22
23
|
/**
|
|
@@ -38,7 +39,15 @@ export declare class Markdown {
|
|
|
38
39
|
* Enable lazy loading for images
|
|
39
40
|
*/
|
|
40
41
|
lazyLoadImages: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Set to `false` to preserve empty paragraphs before rendering.
|
|
44
|
+
* Empty paragraphs are paragraphs that do not contain
|
|
45
|
+
* any meaningful content (text, images, etc.), or only contain
|
|
46
|
+
* whitespace (`<br />` or ` `).
|
|
47
|
+
*/
|
|
48
|
+
removeEmptyParagraphs: boolean;
|
|
41
49
|
textChanged(): Promise<void>;
|
|
50
|
+
handleRemoveEmptyParagraphsChange(): Promise<void>;
|
|
42
51
|
private rootElement;
|
|
43
52
|
private imageIntersectionObserver;
|
|
44
53
|
componentDidLoad(): Promise<void>;
|
|
@@ -1952,7 +1952,7 @@ export namespace Components {
|
|
|
1952
1952
|
*/
|
|
1953
1953
|
"showLink": boolean;
|
|
1954
1954
|
/**
|
|
1955
|
-
*
|
|
1955
|
+
* Defines which numeric values are valid and the increment/decrement interval. For example, `step={0.1}` allows decimals and steps by 0.1. Set to `'any'` to allow any numeric value. Only applies when `type` is `number`.
|
|
1956
1956
|
*/
|
|
1957
1957
|
"step": number | 'any';
|
|
1958
1958
|
/**
|
|
@@ -2138,14 +2138,19 @@ export namespace Components {
|
|
|
2138
2138
|
* @exampleComponent limel-example-markdown-keys
|
|
2139
2139
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
2140
2140
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
2141
|
-
* @exampleComponent limel-example-markdown-composite
|
|
2142
2141
|
* @exampleComponent limel-example-markdown-custom-component
|
|
2142
|
+
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
2143
|
+
* @exampleComponent limel-example-markdown-composite
|
|
2143
2144
|
*/
|
|
2144
2145
|
interface LimelMarkdown {
|
|
2145
2146
|
/**
|
|
2146
2147
|
* Enable lazy loading for images
|
|
2147
2148
|
*/
|
|
2148
2149
|
"lazyLoadImages": boolean;
|
|
2150
|
+
/**
|
|
2151
|
+
* Set to `false` to preserve empty paragraphs before rendering. Empty paragraphs are paragraphs that do not contain any meaningful content (text, images, etc.), or only contain whitespace (`<br />` or ` `).
|
|
2152
|
+
*/
|
|
2153
|
+
"removeEmptyParagraphs": boolean;
|
|
2149
2154
|
/**
|
|
2150
2155
|
* The input text. Treated as GitHub Flavored Markdown, with the addition that any included HTML will be parsed and rendered as HTML, rather than as text.
|
|
2151
2156
|
*/
|
|
@@ -4613,8 +4618,9 @@ declare global {
|
|
|
4613
4618
|
* @exampleComponent limel-example-markdown-keys
|
|
4614
4619
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
4615
4620
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
4616
|
-
* @exampleComponent limel-example-markdown-composite
|
|
4617
4621
|
* @exampleComponent limel-example-markdown-custom-component
|
|
4622
|
+
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
4623
|
+
* @exampleComponent limel-example-markdown-composite
|
|
4618
4624
|
*/
|
|
4619
4625
|
interface HTMLLimelMarkdownElement extends Components.LimelMarkdown, HTMLStencilElement {
|
|
4620
4626
|
}
|
|
@@ -7295,7 +7301,7 @@ declare namespace LocalJSX {
|
|
|
7295
7301
|
*/
|
|
7296
7302
|
"showLink"?: boolean;
|
|
7297
7303
|
/**
|
|
7298
|
-
*
|
|
7304
|
+
* Defines which numeric values are valid and the increment/decrement interval. For example, `step={0.1}` allows decimals and steps by 0.1. Set to `'any'` to allow any numeric value. Only applies when `type` is `number`.
|
|
7299
7305
|
*/
|
|
7300
7306
|
"step"?: number | 'any';
|
|
7301
7307
|
/**
|
|
@@ -7493,14 +7499,19 @@ declare namespace LocalJSX {
|
|
|
7493
7499
|
* @exampleComponent limel-example-markdown-keys
|
|
7494
7500
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
7495
7501
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
7496
|
-
* @exampleComponent limel-example-markdown-composite
|
|
7497
7502
|
* @exampleComponent limel-example-markdown-custom-component
|
|
7503
|
+
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
7504
|
+
* @exampleComponent limel-example-markdown-composite
|
|
7498
7505
|
*/
|
|
7499
7506
|
interface LimelMarkdown {
|
|
7500
7507
|
/**
|
|
7501
7508
|
* Enable lazy loading for images
|
|
7502
7509
|
*/
|
|
7503
7510
|
"lazyLoadImages"?: boolean;
|
|
7511
|
+
/**
|
|
7512
|
+
* Set to `false` to preserve empty paragraphs before rendering. Empty paragraphs are paragraphs that do not contain any meaningful content (text, images, etc.), or only contain whitespace (`<br />` or ` `).
|
|
7513
|
+
*/
|
|
7514
|
+
"removeEmptyParagraphs"?: boolean;
|
|
7504
7515
|
/**
|
|
7505
7516
|
* The input text. Treated as GitHub Flavored Markdown, with the addition that any included HTML will be parsed and rendered as HTML, rather than as text.
|
|
7506
7517
|
*/
|
|
@@ -9813,8 +9824,9 @@ declare module "@stencil/core" {
|
|
|
9813
9824
|
* @exampleComponent limel-example-markdown-keys
|
|
9814
9825
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
9815
9826
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
9816
|
-
* @exampleComponent limel-example-markdown-composite
|
|
9817
9827
|
* @exampleComponent limel-example-markdown-custom-component
|
|
9828
|
+
* @exampleComponent limel-example-markdown-remove-empty-paragraphs
|
|
9829
|
+
* @exampleComponent limel-example-markdown-composite
|
|
9818
9830
|
*/
|
|
9819
9831
|
"limel-markdown": LocalJSX.LimelMarkdown & JSXBase.HTMLAttributes<HTMLLimelMarkdownElement>;
|
|
9820
9832
|
/**
|