@happeouikit/content-renderer 3.3.0 → 3.3.2
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/ContentRenderer.d.ts +1 -1
- package/dist/ContentRenderer.types.d.ts +2 -0
- package/dist/index.cjs.js +193 -226
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2204 -3263
- package/dist/index.es.js.map +1 -1
- package/dist/utils.d.ts +9 -1
- package/package.json +5 -4
package/dist/utils.d.ts
CHANGED
|
@@ -24,4 +24,12 @@ declare const loadCodeFont: () => void;
|
|
|
24
24
|
declare const getNearestRelativeParent: (el: HTMLElement) => HTMLElement | null;
|
|
25
25
|
declare const removeSpecialCharacters: (str?: string) => string;
|
|
26
26
|
declare const replacePTagsInCodeBlocks: (html?: string) => string;
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Escapes standalone < characters that aren't part of valid HTML tags
|
|
29
|
+
* This prevents content like "< 50db" from breaking the rendering
|
|
30
|
+
* @param html The HTML string to process
|
|
31
|
+
* @returns The processed HTML with standalone < characters escaped
|
|
32
|
+
*/
|
|
33
|
+
declare const escapeInvalidTagStarts: (html: string) => string;
|
|
34
|
+
declare const scrollAndHighlight: (element: HTMLDivElement, hash: string, hashAutoscrollTopMargin: number) => void;
|
|
35
|
+
export { toHtml, toSafeText, loadCodeFont, decodeHtmlEntities, getNearestRelativeParent, removeSpecialCharacters, addColorSpanAfterColorCodes, replacePTagsInCodeBlocks, escapeInvalidTagStarts, scrollAndHighlight, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happeouikit/content-renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "Rendering html and markdown content",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"jsnext:main": "dist/index.es.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"linkify-html": "^4.1.3",
|
|
21
21
|
"linkifyjs": "^4.1.3",
|
|
22
22
|
"loadjs": "^4.3.0",
|
|
23
|
-
"react-dom": "^
|
|
23
|
+
"react-dom": "^18.0.0",
|
|
24
24
|
"showdown": "^2.1.0",
|
|
25
25
|
"xss": "^1.0.15"
|
|
26
26
|
},
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"@happeouikit/layout": "^1.1.11",
|
|
31
31
|
"@happeouikit/typography": "^1.1.0",
|
|
32
32
|
"prop-types": "^15.6.2",
|
|
33
|
-
"react": "^
|
|
33
|
+
"react": "^18.0.0",
|
|
34
|
+
"styled-components": "^5.3.3"
|
|
34
35
|
},
|
|
35
36
|
"publishConfig": {
|
|
36
37
|
"access": "public"
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/loadjs": "^4.0.4"
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f1d7ecf2eba424e331d1b76e49c9f3fc9f98abe5"
|
|
42
43
|
}
|