@limetech/lime-elements 37.57.6 → 37.58.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 +8 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js +4 -1
- 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-38bfbd42.js → markdown-parser-23fa389f.js} +13 -2
- package/dist/cjs/{markdown-parser-38bfbd42.js.map → markdown-parser-23fa389f.js.map} +1 -1
- package/dist/collection/components/form/form.js +1 -1
- package/dist/collection/components/markdown/markdown-parser.js +12 -1
- package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
- package/dist/collection/components/markdown/markdown.js +27 -0
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/global/shared-types/custom-element.types.js +2 -0
- package/dist/collection/global/shared-types/custom-element.types.js.map +1 -0
- package/dist/collection/interface.js +1 -0
- package/dist/collection/interface.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-markdown.entry.js +4 -1
- 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-a51f65f6.js → markdown-parser-4a4cd2c9.js} +13 -2
- package/dist/esm/{markdown-parser-a51f65f6.js.map → markdown-parser-4a4cd2c9.js.map} +1 -1
- 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-379b68fd.js → p-31ebf375.js} +2 -2
- package/dist/lime-elements/p-31ebf375.js.map +1 -0
- package/dist/lime-elements/{p-1bbb0dca.entry.js → p-75cfe1e5.entry.js} +2 -2
- package/dist/lime-elements/p-75cfe1e5.entry.js.map +1 -0
- package/dist/lime-elements/{p-b054f9de.entry.js → p-8da06871.entry.js} +2 -2
- package/dist/types/components/markdown/markdown-parser.d.ts +2 -0
- package/dist/types/components/markdown/markdown.d.ts +9 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/global/shared-types/custom-element.types.d.ts +10 -0
- package/dist/types/interface.d.ts +1 -0
- package/package.json +5 -5
- package/dist/lime-elements/p-1bbb0dca.entry.js.map +0 -1
- package/dist/lime-elements/p-379b68fd.js.map +0 -1
- /package/dist/lime-elements/{p-b054f9de.entry.js.map → p-8da06871.entry.js.map} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CustomElement } from '../../global/shared-types/custom-element.types';
|
|
1
2
|
/**
|
|
2
3
|
* Takes a string as input and returns a new string
|
|
3
4
|
* where the text has been converted to HTML.
|
|
@@ -21,5 +22,6 @@ export interface markdownToHTMLOptions {
|
|
|
21
22
|
* Set to `true` to convert all soft line breaks to hard line breaks.
|
|
22
23
|
*/
|
|
23
24
|
forceHardLineBreaks?: boolean;
|
|
25
|
+
whitelist?: CustomElement[];
|
|
24
26
|
}
|
|
25
27
|
//# sourceMappingURL=markdown-parser.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CustomElement } from '../../global/shared-types/custom-element.types';
|
|
1
2
|
/**
|
|
2
3
|
* The Markdown component receives markdown syntax
|
|
3
4
|
* and renders it as HTML.
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
15
16
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
16
17
|
* @exampleComponent limel-example-markdown-composite
|
|
18
|
+
* @exampleComponent limel-example-markdown-custom-component
|
|
17
19
|
*/
|
|
18
20
|
export declare class Markdown {
|
|
19
21
|
/**
|
|
@@ -22,6 +24,13 @@ export declare class Markdown {
|
|
|
22
24
|
* as text.
|
|
23
25
|
*/
|
|
24
26
|
value: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whitelisted html elements.
|
|
29
|
+
*
|
|
30
|
+
* Any custom element added here will not be sanitized and thus rendered.
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
whitelist?: CustomElement[];
|
|
25
34
|
textChanged(): Promise<void>;
|
|
26
35
|
componentDidLoad(): Promise<void>;
|
|
27
36
|
private rootElement;
|
|
@@ -32,6 +32,7 @@ import { IconSize } from "./components/icon/icon.types";
|
|
|
32
32
|
import { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
33
33
|
import { InputType } from "./components/input-field/input-field.types";
|
|
34
34
|
import { ListType } from "./components/list/list.types";
|
|
35
|
+
import { CustomElement } from "./global/shared-types/custom-element.types";
|
|
35
36
|
import { MenuListType } from "./components/menu-list/menu-list.types";
|
|
36
37
|
import { PickerValue } from "./components/picker/value.types";
|
|
37
38
|
import { Searcher } from "./components/picker/searcher.types";
|
|
@@ -70,6 +71,7 @@ export { IconSize } from "./components/icon/icon.types";
|
|
|
70
71
|
export { InfoTileProgress } from "./components/info-tile/info-tile.types";
|
|
71
72
|
export { InputType } from "./components/input-field/input-field.types";
|
|
72
73
|
export { ListType } from "./components/list/list.types";
|
|
74
|
+
export { CustomElement } from "./global/shared-types/custom-element.types";
|
|
73
75
|
export { MenuListType } from "./components/menu-list/menu-list.types";
|
|
74
76
|
export { PickerValue } from "./components/picker/value.types";
|
|
75
77
|
export { Searcher } from "./components/picker/searcher.types";
|
|
@@ -1727,12 +1729,18 @@ export namespace Components {
|
|
|
1727
1729
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
1728
1730
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
1729
1731
|
* @exampleComponent limel-example-markdown-composite
|
|
1732
|
+
* @exampleComponent limel-example-markdown-custom-component
|
|
1730
1733
|
*/
|
|
1731
1734
|
interface LimelMarkdown {
|
|
1732
1735
|
/**
|
|
1733
1736
|
* 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.
|
|
1734
1737
|
*/
|
|
1735
1738
|
"value": string;
|
|
1739
|
+
/**
|
|
1740
|
+
* Whitelisted html elements. Any custom element added here will not be sanitized and thus rendered.
|
|
1741
|
+
* @alpha
|
|
1742
|
+
*/
|
|
1743
|
+
"whitelist"?: CustomElement[];
|
|
1736
1744
|
}
|
|
1737
1745
|
/**
|
|
1738
1746
|
* @exampleComponent limel-example-menu-basic
|
|
@@ -3750,6 +3758,7 @@ declare global {
|
|
|
3750
3758
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
3751
3759
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
3752
3760
|
* @exampleComponent limel-example-markdown-composite
|
|
3761
|
+
* @exampleComponent limel-example-markdown-custom-component
|
|
3753
3762
|
*/
|
|
3754
3763
|
interface HTMLLimelMarkdownElement extends Components.LimelMarkdown, HTMLStencilElement {
|
|
3755
3764
|
}
|
|
@@ -6097,12 +6106,18 @@ declare namespace LocalJSX {
|
|
|
6097
6106
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
6098
6107
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
6099
6108
|
* @exampleComponent limel-example-markdown-composite
|
|
6109
|
+
* @exampleComponent limel-example-markdown-custom-component
|
|
6100
6110
|
*/
|
|
6101
6111
|
interface LimelMarkdown {
|
|
6102
6112
|
/**
|
|
6103
6113
|
* 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.
|
|
6104
6114
|
*/
|
|
6105
6115
|
"value"?: string;
|
|
6116
|
+
/**
|
|
6117
|
+
* Whitelisted html elements. Any custom element added here will not be sanitized and thus rendered.
|
|
6118
|
+
* @alpha
|
|
6119
|
+
*/
|
|
6120
|
+
"whitelist"?: CustomElement[];
|
|
6106
6121
|
}
|
|
6107
6122
|
/**
|
|
6108
6123
|
* @exampleComponent limel-example-menu-basic
|
|
@@ -7929,6 +7944,7 @@ declare module "@stencil/core" {
|
|
|
7929
7944
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
7930
7945
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
7931
7946
|
* @exampleComponent limel-example-markdown-composite
|
|
7947
|
+
* @exampleComponent limel-example-markdown-custom-component
|
|
7932
7948
|
*/
|
|
7933
7949
|
"limel-markdown": LocalJSX.LimelMarkdown & JSXBase.HTMLAttributes<HTMLLimelMarkdownElement>;
|
|
7934
7950
|
/**
|
|
@@ -11,6 +11,7 @@ export * from './components/dialog/dialog.types';
|
|
|
11
11
|
export * from './components/dock/dock.types';
|
|
12
12
|
export * from './global/shared-types/file.types';
|
|
13
13
|
export * from './components/flex-container/flex-container.types';
|
|
14
|
+
export * from './global/shared-types/custom-element.types';
|
|
14
15
|
export { EventEmitter, ValidationStatus, FormError, ValidationError, FormComponent, FormInfo, LimeSchemaOptions, LimeLayoutOptions, FormComponentOptions, FormLayoutOptions, GridLayoutOptions, RowLayoutOptions, FormLayoutType, ReplaceObjectType, FormSchemaArrayItem, FormSubKeySchema, } from './components/form/form.types';
|
|
15
16
|
export * from './components/help/help.types';
|
|
16
17
|
export * from './components/icon/icon.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.58.0",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"generate": "stencil generate"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@commitlint/config-conventional": "^19.
|
|
46
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
47
47
|
"@eslint/eslintrc": "^3.1.0",
|
|
48
|
-
"@eslint/js": "^9.
|
|
49
|
-
"@microsoft/api-extractor": "^7.47.
|
|
48
|
+
"@eslint/js": "^9.10.0",
|
|
49
|
+
"@microsoft/api-extractor": "^7.47.8",
|
|
50
50
|
"@popperjs/core": "^2.11.8",
|
|
51
51
|
"@rjsf/core": "^2.4.2",
|
|
52
52
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"replace-in-file": "^7.2.0",
|
|
104
104
|
"shelljs": "0.8.5",
|
|
105
105
|
"shx": "^0.3.3",
|
|
106
|
-
"style-to-object": "^1.0.
|
|
106
|
+
"style-to-object": "^1.0.8",
|
|
107
107
|
"tabulator-tables": "^4.9.3",
|
|
108
108
|
"typescript": "^4.9.5",
|
|
109
109
|
"unified": "^11.0.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["markdownCss","Markdown","async","html","markdownToHTML","this","value","forceHardLineBreaks","rootElement","innerHTML","error","console","textChanged","render","h","id","ref","el"],"sources":["./src/components/markdown/markdown.scss?tag=limel-markdown&encapsulation=shadow","./src/components/markdown/markdown.tsx"],"sourcesContent":["/**\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@import './partial-styles/pre-code.scss';\n@import './partial-styles/headings.scss';\n@import './partial-styles/body-text.scss';\n@import './partial-styles/lists.scss';\n@import './partial-styles/tables.scss';\n@import './partial-styles/blockquotes.scss';\n@import './partial-styles/definition-lists.scss';\n\n// body-text\nhr {\n border-top: 1px solid rgb(var(--contrast-700));\n}\n\nimg {\n max-width: 100%;\n}\n\n.MsoNormal {\n margin: 0;\n}\n","import { Component, h, Prop, Watch } from '@stencil/core';\nimport { markdownToHTML } from './markdown-parser';\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-blockquotes\n * @exampleComponent limel-example-markdown-horizontal-rule\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 @Watch('value')\n public async textChanged() {\n try {\n const html = await markdownToHTML(this.value, {\n forceHardLineBreaks: true,\n });\n this.rootElement.innerHTML = html;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n\n public async componentDidLoad() {\n this.textChanged();\n }\n\n private rootElement: HTMLDivElement;\n\n public render() {\n return [\n <div\n id=\"markdown\"\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\n />,\n ];\n }\n}\n"],"mappings":"uGAAA,MAAMA,EAAc,umI,MCyBPC,EAAQ,M,8CAUVC,oBACH,IACI,MAAMC,QAAaC,EAAeC,KAAKC,MAAO,CAC1CC,oBAAqB,OAEzBF,KAAKG,YAAYC,UAAYN,C,CAC/B,MAAOO,GAELC,QAAQD,MAAMA,E,EAIfR,yBACHG,KAAKO,a,CAKFC,SACH,MAAO,CACHC,EAAA,OACIC,GAAG,WACHC,IAAMC,GAAQZ,KAAKG,YAAcS,I"}
|