@webiny/react-rich-text-lexical-renderer 0.0.0-unstable.c7dec08bb0 → 5.36.2-beta.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/index.js.map +1 -1
- package/package.json +9 -9
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LexicalRenderer","props","useTheme","theme","getValue","value","JSON","stringify","nodes","RichTextLexicalRenderer"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalNode, LexicalValue, Klass } from \"@webiny/lexical-editor/types\";\nimport { LexicalHtmlRenderer } from \"@webiny/lexical-editor\";\nimport { ThemeProvider, useTheme } from \"@webiny/app-theme\";\n\ntype RendererLexicalValue = LexicalValue | Record<string, any> | null | undefined;\n\ninterface RichTextLexicalRenderer {\n value: RendererLexicalValue;\n theme?: Record<string, any>;\n nodes?: Klass<LexicalNode>[];\n}\n\nconst LexicalRenderer: React.FC<RichTextLexicalRenderer> = props => {\n const { theme } = useTheme();\n\n const getValue = (value: RendererLexicalValue): string | null => {\n if (!value) {\n return null;\n }\n return typeof props?.value === \"string\" ? props.value : JSON.stringify(props.value);\n };\n\n return (\n <LexicalHtmlRenderer\n value={getValue(props?.value)}\n theme={{ ...props?.theme, ...theme }}\n nodes={props.nodes}\n />\n );\n};\n\nexport const RichTextLexicalRenderer: React.FC<RichTextLexicalRenderer> = props => {\n return (\n <ThemeProvider>\n <LexicalRenderer {...props} />\n </ThemeProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA;AAEA;AACA;AAUA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_lexicalEditor","_appTheme","LexicalRenderer","props","_useTheme","useTheme","theme","getValue","value","JSON","stringify","default","createElement","LexicalHtmlRenderer","_objectSpread2","nodes","RichTextLexicalRenderer","ThemeProvider","exports"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalNode, LexicalValue, Klass } from \"@webiny/lexical-editor/types\";\nimport { LexicalHtmlRenderer } from \"@webiny/lexical-editor\";\nimport { ThemeProvider, useTheme } from \"@webiny/app-theme\";\n\ntype RendererLexicalValue = LexicalValue | Record<string, any> | null | undefined;\n\ninterface RichTextLexicalRenderer {\n value: RendererLexicalValue;\n theme?: Record<string, any>;\n nodes?: Klass<LexicalNode>[];\n}\n\nconst LexicalRenderer: React.FC<RichTextLexicalRenderer> = props => {\n const { theme } = useTheme();\n\n const getValue = (value: RendererLexicalValue): string | null => {\n if (!value) {\n return null;\n }\n return typeof props?.value === \"string\" ? props.value : JSON.stringify(props.value);\n };\n\n return (\n <LexicalHtmlRenderer\n value={getValue(props?.value)}\n theme={{ ...props?.theme, ...theme }}\n nodes={props.nodes}\n />\n );\n};\n\nexport const RichTextLexicalRenderer: React.FC<RichTextLexicalRenderer> = props => {\n return (\n <ThemeProvider>\n <LexicalRenderer {...props} />\n </ThemeProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAUA,IAAMG,eAAkD,GAAG,SAArDA,eAAkDA,CAAGC,KAAK,EAAI;EAChE,IAAAC,SAAA,GAAkB,IAAAC,kBAAQ,EAAC,CAAC;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK;EAEb,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,KAA2B,EAAoB;IAC7D,IAAI,CAACA,KAAK,EAAE;MACR,OAAO,IAAI;IACf;IACA,OAAO,QAAOL,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEK,KAAK,MAAK,QAAQ,GAAGL,KAAK,CAACK,KAAK,GAAGC,IAAI,CAACC,SAAS,CAACP,KAAK,CAACK,KAAK,CAAC;EACvF,CAAC;EAED,oBACIX,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACZ,cAAA,CAAAa,mBAAmB;IAChBL,KAAK,EAAED,QAAQ,CAACJ,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEK,KAAK,CAAE;IAC9BF,KAAK,MAAAQ,cAAA,CAAAH,OAAA,MAAAG,cAAA,CAAAH,OAAA,MAAOR,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEG,KAAK,GAAKA,KAAK,CAAG;IACrCS,KAAK,EAAEZ,KAAK,CAACY;EAAM,CACtB,CAAC;AAEV,CAAC;AAEM,IAAMC,uBAA0D,GAAG,SAA7DA,uBAA0DA,CAAGb,KAAK,EAAI;EAC/E,oBACIN,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACX,SAAA,CAAAgB,aAAa,qBACVpB,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACV,eAAe,EAAKC,KAAQ,CAClB,CAAC;AAExB,CAAC;AAACe,OAAA,CAAAF,uBAAA,GAAAA,uBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/react-rich-text-lexical-renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.36.2-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
"author": "Webiny Ltd",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@babel/runtime": "7.
|
|
12
|
+
"@babel/runtime": "7.22.6",
|
|
13
13
|
"@types/react": "17.0.39",
|
|
14
|
-
"@webiny/app-theme": "
|
|
15
|
-
"@webiny/lexical-editor": "
|
|
14
|
+
"@webiny/app-theme": "5.36.2-beta.2",
|
|
15
|
+
"@webiny/lexical-editor": "5.36.2-beta.2",
|
|
16
16
|
"react": "17.0.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@testing-library/react": "12.1.5",
|
|
20
|
-
"@webiny/cli": "
|
|
21
|
-
"@webiny/project-utils": "
|
|
22
|
-
"@webiny/react-composition": "
|
|
20
|
+
"@webiny/cli": "5.36.2-beta.2",
|
|
21
|
+
"@webiny/project-utils": "5.36.2-beta.2",
|
|
22
|
+
"@webiny/react-composition": "5.36.2-beta.2",
|
|
23
23
|
"identity-obj-proxy": "3.0.0",
|
|
24
|
-
"prettier": "2.8.
|
|
24
|
+
"prettier": "2.8.8",
|
|
25
25
|
"theme": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"build": "yarn webiny run build",
|
|
33
33
|
"watch": "yarn webiny run watch"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d2abd21541abdcb3b0672e204adcece56bf2a20d"
|
|
36
36
|
}
|