@webiny/app-website-builder 6.4.4 → 6.4.5-beta.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { CompositionScope, LexicalEditor } from "@webiny/app-admin";
|
|
2
|
+
import { AdminConfig, CompositionScope, LexicalEditor } from "@webiny/app-admin";
|
|
3
3
|
import { StaticToolbar } from "@webiny/lexical-editor";
|
|
4
4
|
import { createLexicalTokens } from "@webiny/lexical-theme/createLexicalEditorTokens.js";
|
|
5
5
|
import { useWebsiteBuilderTheme } from "../../BaseEditor/components/index.js";
|
|
@@ -23,13 +23,16 @@ const styles = {
|
|
|
23
23
|
fontFamily: "var(--wb-theme-font-family)"
|
|
24
24
|
};
|
|
25
25
|
const lexicalTokens = createLexicalTokens("wb-lx-");
|
|
26
|
+
const { useAdminConfig: useAdminConfig } = AdminConfig;
|
|
26
27
|
const LexicalEditorComponent = (props)=>{
|
|
27
28
|
const { theme } = useWebsiteBuilderTheme();
|
|
29
|
+
const { lexicalTheme } = useAdminConfig();
|
|
28
30
|
const editorTheme = {
|
|
29
31
|
colors: theme?.colors ?? [],
|
|
30
32
|
typography: theme?.typography ?? {},
|
|
31
33
|
fontSizes: theme?.fontSizes ?? [],
|
|
32
|
-
tokens: lexicalTokens
|
|
34
|
+
tokens: lexicalTokens,
|
|
35
|
+
allowCustomColors: theme?.allowCustomColors ?? lexicalTheme.allowCustomColors
|
|
33
36
|
};
|
|
34
37
|
return /*#__PURE__*/ react.createElement(LexicalEditor, {
|
|
35
38
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditor.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditor as BaseLexicalEditor } from \"@webiny/app-admin\";\nimport { StaticToolbar } from \"@webiny/lexical-editor\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\nimport { useWebsiteBuilderTheme } from \"~/BaseEditor/components/index.js\";\nimport \"./wbStaticToolbar.css\";\nimport { CompositionScope } from \"@webiny/app-admin\";\n\nconst placeholderStyles: React.CSSProperties = { position: \"absolute\", top: 40, left: 25 };\n\nconst contentEditableStyles: React.CSSProperties = {\n minHeight: 200,\n display: \"block\",\n padding: 10\n};\n\nconst styles: React.CSSProperties = {\n backgroundColor: \"#fff\",\n border: \"1px solid #e1e1e1\",\n padding: \"10px 14px\",\n minHeight: 200,\n maxHeight: 350,\n fontFamily: \"var(--wb-theme-font-family)\"\n};\n\nconst lexicalTokens = createLexicalTokens(\"wb-lx-\");\n\nexport type LexicalEditorProps = Omit<React.ComponentProps<typeof BaseLexicalEditor>, \"theme\">;\n\nconst LexicalEditorComponent = (props: LexicalEditorProps) => {\n const { theme } = useWebsiteBuilderTheme();\n\n const editorTheme: EditorTheme = {\n colors: theme?.colors ?? [],\n typography: theme?.typography ?? {},\n fontSizes: theme?.fontSizes ?? [],\n tokens: lexicalTokens\n };\n\n return (\n <BaseLexicalEditor\n {...props}\n staticToolbar={<StaticToolbar className={\"wb-static-toolbar\"} />}\n tag={\"p\"}\n placeholder={props?.placeholder || \"Enter your text here...\"}\n placeholderStyles={placeholderStyles}\n contentEditableStyles={contentEditableStyles}\n styles={styles}\n theme={editorTheme}\n />\n );\n};\n\nconst ExpandedLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"expanded\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nconst CompactLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"compact\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nexport const LexicalEditor = {\n Expanded: ExpandedLexicalEditor,\n Compact: CompactLexicalEditor\n};\n"],"names":["placeholderStyles","contentEditableStyles","styles","lexicalTokens","createLexicalTokens","LexicalEditorComponent","props","theme","useWebsiteBuilderTheme","editorTheme","BaseLexicalEditor","StaticToolbar","ExpandedLexicalEditor","CompositionScope","CompactLexicalEditor","LexicalEditor"],"mappings":";;;;;;AASA,MAAMA,oBAAyC;IAAE,UAAU;IAAY,KAAK;IAAI,MAAM;AAAG;AAEzF,MAAMC,wBAA6C;IAC/C,WAAW;IACX,SAAS;IACT,SAAS;AACb;AAEA,MAAMC,SAA8B;IAChC,iBAAiB;IACjB,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;AAChB;AAEA,MAAMC,gBAAgBC,oBAAoB;AAI1C,MAAMC,yBAAyB,CAACC;IAC5B,MAAM,EAAEC,KAAK,EAAE,GAAGC;
|
|
1
|
+
{"version":3,"file":"inputRenderers/LexicalInput/LexicalEditor.js","sources":["../../../src/inputRenderers/LexicalInput/LexicalEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { LexicalEditor as BaseLexicalEditor, AdminConfig } from \"@webiny/app-admin\";\nimport { StaticToolbar } from \"@webiny/lexical-editor\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\nimport { useWebsiteBuilderTheme } from \"~/BaseEditor/components/index.js\";\nimport \"./wbStaticToolbar.css\";\nimport { CompositionScope } from \"@webiny/app-admin\";\n\nconst placeholderStyles: React.CSSProperties = { position: \"absolute\", top: 40, left: 25 };\n\nconst contentEditableStyles: React.CSSProperties = {\n minHeight: 200,\n display: \"block\",\n padding: 10\n};\n\nconst styles: React.CSSProperties = {\n backgroundColor: \"#fff\",\n border: \"1px solid #e1e1e1\",\n padding: \"10px 14px\",\n minHeight: 200,\n maxHeight: 350,\n fontFamily: \"var(--wb-theme-font-family)\"\n};\n\nconst lexicalTokens = createLexicalTokens(\"wb-lx-\");\n\nexport type LexicalEditorProps = Omit<React.ComponentProps<typeof BaseLexicalEditor>, \"theme\">;\n\nconst { useAdminConfig } = AdminConfig;\n\nconst LexicalEditorComponent = (props: LexicalEditorProps) => {\n const { theme } = useWebsiteBuilderTheme();\n const { lexicalTheme } = useAdminConfig();\n\n const editorTheme: EditorTheme = {\n colors: theme?.colors ?? [],\n typography: theme?.typography ?? {},\n fontSizes: theme?.fontSizes ?? [],\n tokens: lexicalTokens,\n allowCustomColors: theme?.allowCustomColors ?? lexicalTheme.allowCustomColors\n };\n\n return (\n <BaseLexicalEditor\n {...props}\n staticToolbar={<StaticToolbar className={\"wb-static-toolbar\"} />}\n tag={\"p\"}\n placeholder={props?.placeholder || \"Enter your text here...\"}\n placeholderStyles={placeholderStyles}\n contentEditableStyles={contentEditableStyles}\n styles={styles}\n theme={editorTheme}\n />\n );\n};\n\nconst ExpandedLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"expanded\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nconst CompactLexicalEditor = (props: LexicalEditorProps) => {\n return (\n <CompositionScope name={\"compact\"}>\n <LexicalEditorComponent {...props} />\n </CompositionScope>\n );\n};\n\nexport const LexicalEditor = {\n Expanded: ExpandedLexicalEditor,\n Compact: CompactLexicalEditor\n};\n"],"names":["placeholderStyles","contentEditableStyles","styles","lexicalTokens","createLexicalTokens","useAdminConfig","AdminConfig","LexicalEditorComponent","props","theme","useWebsiteBuilderTheme","lexicalTheme","editorTheme","BaseLexicalEditor","StaticToolbar","ExpandedLexicalEditor","CompositionScope","CompactLexicalEditor","LexicalEditor"],"mappings":";;;;;;AASA,MAAMA,oBAAyC;IAAE,UAAU;IAAY,KAAK;IAAI,MAAM;AAAG;AAEzF,MAAMC,wBAA6C;IAC/C,WAAW;IACX,SAAS;IACT,SAAS;AACb;AAEA,MAAMC,SAA8B;IAChC,iBAAiB;IACjB,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;AAChB;AAEA,MAAMC,gBAAgBC,oBAAoB;AAI1C,MAAM,EAAEC,gBAAAA,cAAc,EAAE,GAAGC;AAE3B,MAAMC,yBAAyB,CAACC;IAC5B,MAAM,EAAEC,KAAK,EAAE,GAAGC;IAClB,MAAM,EAAEC,YAAY,EAAE,GAAGN;IAEzB,MAAMO,cAA2B;QAC7B,QAAQH,OAAO,UAAU,EAAE;QAC3B,YAAYA,OAAO,cAAc,CAAC;QAClC,WAAWA,OAAO,aAAa,EAAE;QACjC,QAAQN;QACR,mBAAmBM,OAAO,qBAAqBE,aAAa,iBAAiB;IACjF;IAEA,OAAO,WAAP,GACI,oBAACE,eAAiBA;QACb,GAAGL,KAAK;QACT,6BAAe,oBAACM,eAAaA;YAAC,WAAW;;QACzC,KAAK;QACL,aAAaN,OAAO,eAAe;QACnC,mBAAmBR;QACnB,uBAAuBC;QACvB,QAAQC;QACR,OAAOU;;AAGnB;AAEA,MAAMG,wBAAwB,CAACP,QACpB,WAAP,GACI,oBAACQ,kBAAgBA;QAAC,MAAM;qBACpB,oBAACT,wBAA2BC;AAKxC,MAAMS,uBAAuB,CAACT,QACnB,WAAP,GACI,oBAACQ,kBAAgBA;QAAC,MAAM;qBACpB,oBAACT,wBAA2BC;AAKjC,MAAMU,8BAAgB;IACzB,UAAUH;IACV,SAASE;AACb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-website-builder",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.5-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -21,28 +21,28 @@
|
|
|
21
21
|
"@monaco-editor/react": "4.7.0",
|
|
22
22
|
"@svgr/webpack": "8.1.0",
|
|
23
23
|
"@types/react": "18.3.31",
|
|
24
|
-
"@webiny/admin-ui": "6.4.
|
|
25
|
-
"@webiny/app": "6.4.
|
|
26
|
-
"@webiny/app-aco": "6.4.
|
|
27
|
-
"@webiny/app-admin": "6.4.
|
|
28
|
-
"@webiny/app-headless-cms-common": "6.4.
|
|
29
|
-
"@webiny/app-trash-bin": "6.4.
|
|
30
|
-
"@webiny/app-utils": "6.4.
|
|
24
|
+
"@webiny/admin-ui": "6.4.5-beta.0",
|
|
25
|
+
"@webiny/app": "6.4.5-beta.0",
|
|
26
|
+
"@webiny/app-aco": "6.4.5-beta.0",
|
|
27
|
+
"@webiny/app-admin": "6.4.5-beta.0",
|
|
28
|
+
"@webiny/app-headless-cms-common": "6.4.5-beta.0",
|
|
29
|
+
"@webiny/app-trash-bin": "6.4.5-beta.0",
|
|
30
|
+
"@webiny/app-utils": "6.4.5-beta.0",
|
|
31
31
|
"@webiny/di": "1.0.2",
|
|
32
|
-
"@webiny/error": "6.4.
|
|
33
|
-
"@webiny/feature": "6.4.
|
|
34
|
-
"@webiny/form": "6.4.
|
|
35
|
-
"@webiny/icons": "6.4.
|
|
36
|
-
"@webiny/languages": "6.4.
|
|
37
|
-
"@webiny/lexical-converter": "6.4.
|
|
38
|
-
"@webiny/lexical-editor": "6.4.
|
|
39
|
-
"@webiny/lexical-nodes": "6.4.
|
|
40
|
-
"@webiny/lexical-theme": "6.4.
|
|
41
|
-
"@webiny/react-composition": "6.4.
|
|
42
|
-
"@webiny/react-properties": "6.4.
|
|
43
|
-
"@webiny/utils": "6.4.
|
|
44
|
-
"@webiny/validation": "6.4.
|
|
45
|
-
"@webiny/website-builder-sdk": "6.4.
|
|
32
|
+
"@webiny/error": "6.4.5-beta.0",
|
|
33
|
+
"@webiny/feature": "6.4.5-beta.0",
|
|
34
|
+
"@webiny/form": "6.4.5-beta.0",
|
|
35
|
+
"@webiny/icons": "6.4.5-beta.0",
|
|
36
|
+
"@webiny/languages": "6.4.5-beta.0",
|
|
37
|
+
"@webiny/lexical-converter": "6.4.5-beta.0",
|
|
38
|
+
"@webiny/lexical-editor": "6.4.5-beta.0",
|
|
39
|
+
"@webiny/lexical-nodes": "6.4.5-beta.0",
|
|
40
|
+
"@webiny/lexical-theme": "6.4.5-beta.0",
|
|
41
|
+
"@webiny/react-composition": "6.4.5-beta.0",
|
|
42
|
+
"@webiny/react-properties": "6.4.5-beta.0",
|
|
43
|
+
"@webiny/utils": "6.4.5-beta.0",
|
|
44
|
+
"@webiny/validation": "6.4.5-beta.0",
|
|
45
|
+
"@webiny/website-builder-sdk": "6.4.5-beta.0",
|
|
46
46
|
"apollo-cache": "1.3.5",
|
|
47
47
|
"apollo-client": "2.6.10",
|
|
48
48
|
"apollo-link": "1.2.14",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/deep-equal": "1.0.4",
|
|
71
71
|
"@types/is-hotkey": "0.1.10",
|
|
72
|
-
"@webiny/build-tools": "6.4.
|
|
72
|
+
"@webiny/build-tools": "6.4.5-beta.0",
|
|
73
73
|
"execa": "5.1.1",
|
|
74
74
|
"rimraf": "6.1.3",
|
|
75
75
|
"typescript": "6.0.3",
|