@webiny/app-website-builder 6.0.0-alpha.2 → 6.0.0-alpha.3
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.
|
@@ -11,7 +11,7 @@ export const InlineSvg = ({
|
|
|
11
11
|
if (className.length > 0) {
|
|
12
12
|
svgElement.documentElement.classList.add(...className.split(" "));
|
|
13
13
|
}
|
|
14
|
-
ref.current.
|
|
14
|
+
ref.current.innerHTML = svgElement.documentElement.outerHTML;
|
|
15
15
|
}
|
|
16
16
|
}, []);
|
|
17
17
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useRef","InlineSvg","src","className","ref","setSvg","svg","current","domParser","DOMParser","svgElement","parseFromString","length","documentElement","classList","add","split","outerHTML","startsWith","base64","atob","fetch","then","res","text","catch","console","error","createElement"],"sources":["InlineSvg.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\n\ninterface InlineSvgProps {\n src: string;\n className?: string;\n}\n\nexport const InlineSvg = ({ src, className = \"\" }: InlineSvgProps) => {\n const ref = useRef<HTMLObjectElement | null>(null);\n\n const setSvg = useCallback((svg: string) => {\n if (ref.current) {\n const domParser = new DOMParser();\n const svgElement = domParser.parseFromString(svg, \"image/svg+xml\");\n\n if (className.length > 0) {\n svgElement.documentElement.classList.add(...className.split(\" \"));\n }\n ref.current.
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useRef","InlineSvg","src","className","ref","setSvg","svg","current","domParser","DOMParser","svgElement","parseFromString","length","documentElement","classList","add","split","innerHTML","outerHTML","startsWith","base64","atob","fetch","then","res","text","catch","console","error","createElement"],"sources":["InlineSvg.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\n\ninterface InlineSvgProps {\n src: string;\n className?: string;\n}\n\nexport const InlineSvg = ({ src, className = \"\" }: InlineSvgProps) => {\n const ref = useRef<HTMLObjectElement | null>(null);\n\n const setSvg = useCallback((svg: string) => {\n if (ref.current) {\n const domParser = new DOMParser();\n const svgElement = domParser.parseFromString(svg, \"image/svg+xml\");\n\n if (className.length > 0) {\n svgElement.documentElement.classList.add(...className.split(\" \"));\n }\n ref.current.innerHTML = svgElement.documentElement.outerHTML;\n }\n }, []);\n\n useEffect(() => {\n if (src.startsWith(\"<svg\") && ref.current) {\n setSvg(src);\n return;\n }\n\n if (src.startsWith(\"data:image/svg+xml\")) {\n const base64 = src.split(\",\")[1];\n setSvg(atob(base64));\n return;\n }\n\n fetch(src)\n .then(res => res.text())\n .then(svg => setSvg(svg))\n .catch(console.error);\n }, [src]);\n\n return <div ref={ref} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAO7D,OAAO,MAAMC,SAAS,GAAGA,CAAC;EAAEC,GAAG;EAAEC,SAAS,GAAG;AAAmB,CAAC,KAAK;EAClE,MAAMC,GAAG,GAAGJ,MAAM,CAA2B,IAAI,CAAC;EAElD,MAAMK,MAAM,GAAGP,WAAW,CAAEQ,GAAW,IAAK;IACxC,IAAIF,GAAG,CAACG,OAAO,EAAE;MACb,MAAMC,SAAS,GAAG,IAAIC,SAAS,CAAC,CAAC;MACjC,MAAMC,UAAU,GAAGF,SAAS,CAACG,eAAe,CAACL,GAAG,EAAE,eAAe,CAAC;MAElE,IAAIH,SAAS,CAACS,MAAM,GAAG,CAAC,EAAE;QACtBF,UAAU,CAACG,eAAe,CAACC,SAAS,CAACC,GAAG,CAAC,GAAGZ,SAAS,CAACa,KAAK,CAAC,GAAG,CAAC,CAAC;MACrE;MACAZ,GAAG,CAACG,OAAO,CAACU,SAAS,GAAGP,UAAU,CAACG,eAAe,CAACK,SAAS;IAChE;EACJ,CAAC,EAAE,EAAE,CAAC;EAENnB,SAAS,CAAC,MAAM;IACZ,IAAIG,GAAG,CAACiB,UAAU,CAAC,MAAM,CAAC,IAAIf,GAAG,CAACG,OAAO,EAAE;MACvCF,MAAM,CAACH,GAAG,CAAC;MACX;IACJ;IAEA,IAAIA,GAAG,CAACiB,UAAU,CAAC,oBAAoB,CAAC,EAAE;MACtC,MAAMC,MAAM,GAAGlB,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;MAChCX,MAAM,CAACgB,IAAI,CAACD,MAAM,CAAC,CAAC;MACpB;IACJ;IAEAE,KAAK,CAACpB,GAAG,CAAC,CACLqB,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACvBF,IAAI,CAACjB,GAAG,IAAID,MAAM,CAACC,GAAG,CAAC,CAAC,CACxBoB,KAAK,CAACC,OAAO,CAACC,KAAK,CAAC;EAC7B,CAAC,EAAE,CAAC1B,GAAG,CAAC,CAAC;EAET,oBAAOL,KAAA,CAAAgC,aAAA;IAAKzB,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC5B,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-website-builder",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
"@monaco-editor/react": "4.7.0",
|
|
17
17
|
"@svgr/webpack": "6.5.1",
|
|
18
18
|
"@types/react": "18.2.79",
|
|
19
|
-
"@webiny/admin-ui": "6.0.0-alpha.
|
|
20
|
-
"@webiny/app": "6.0.0-alpha.
|
|
21
|
-
"@webiny/app-aco": "6.0.0-alpha.
|
|
22
|
-
"@webiny/app-admin": "6.0.0-alpha.
|
|
23
|
-
"@webiny/app-headless-cms-common": "6.0.0-alpha.
|
|
24
|
-
"@webiny/app-i18n": "6.0.0-alpha.
|
|
25
|
-
"@webiny/app-security": "6.0.0-alpha.
|
|
26
|
-
"@webiny/app-tenancy": "6.0.0-alpha.
|
|
27
|
-
"@webiny/app-utils": "6.0.0-alpha.
|
|
28
|
-
"@webiny/error": "6.0.0-alpha.
|
|
29
|
-
"@webiny/form": "6.0.0-alpha.
|
|
30
|
-
"@webiny/icons": "6.0.0-alpha.
|
|
31
|
-
"@webiny/lexical-converter": "6.0.0-alpha.
|
|
32
|
-
"@webiny/lexical-editor": "6.0.0-alpha.
|
|
33
|
-
"@webiny/lexical-nodes": "6.0.0-alpha.
|
|
34
|
-
"@webiny/lexical-theme": "6.0.0-alpha.
|
|
35
|
-
"@webiny/react-composition": "6.0.0-alpha.
|
|
36
|
-
"@webiny/react-properties": "6.0.0-alpha.
|
|
37
|
-
"@webiny/react-router": "6.0.0-alpha.
|
|
38
|
-
"@webiny/ui": "6.0.0-alpha.
|
|
39
|
-
"@webiny/utils": "6.0.0-alpha.
|
|
40
|
-
"@webiny/validation": "6.0.0-alpha.
|
|
41
|
-
"@webiny/website-builder-sdk": "6.0.0-alpha.
|
|
19
|
+
"@webiny/admin-ui": "6.0.0-alpha.3",
|
|
20
|
+
"@webiny/app": "6.0.0-alpha.3",
|
|
21
|
+
"@webiny/app-aco": "6.0.0-alpha.3",
|
|
22
|
+
"@webiny/app-admin": "6.0.0-alpha.3",
|
|
23
|
+
"@webiny/app-headless-cms-common": "6.0.0-alpha.3",
|
|
24
|
+
"@webiny/app-i18n": "6.0.0-alpha.3",
|
|
25
|
+
"@webiny/app-security": "6.0.0-alpha.3",
|
|
26
|
+
"@webiny/app-tenancy": "6.0.0-alpha.3",
|
|
27
|
+
"@webiny/app-utils": "6.0.0-alpha.3",
|
|
28
|
+
"@webiny/error": "6.0.0-alpha.3",
|
|
29
|
+
"@webiny/form": "6.0.0-alpha.3",
|
|
30
|
+
"@webiny/icons": "6.0.0-alpha.3",
|
|
31
|
+
"@webiny/lexical-converter": "6.0.0-alpha.3",
|
|
32
|
+
"@webiny/lexical-editor": "6.0.0-alpha.3",
|
|
33
|
+
"@webiny/lexical-nodes": "6.0.0-alpha.3",
|
|
34
|
+
"@webiny/lexical-theme": "6.0.0-alpha.3",
|
|
35
|
+
"@webiny/react-composition": "6.0.0-alpha.3",
|
|
36
|
+
"@webiny/react-properties": "6.0.0-alpha.3",
|
|
37
|
+
"@webiny/react-router": "6.0.0-alpha.3",
|
|
38
|
+
"@webiny/ui": "6.0.0-alpha.3",
|
|
39
|
+
"@webiny/utils": "6.0.0-alpha.3",
|
|
40
|
+
"@webiny/validation": "6.0.0-alpha.3",
|
|
41
|
+
"@webiny/website-builder-sdk": "6.0.0-alpha.3",
|
|
42
42
|
"apollo-cache": "1.3.5",
|
|
43
43
|
"apollo-client": "2.6.10",
|
|
44
44
|
"apollo-link": "1.2.14",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@types/react-virtualized": "9.22.0",
|
|
75
75
|
"@types/resize-observer-browser": "0.1.7",
|
|
76
76
|
"@types/store": "2.0.2",
|
|
77
|
-
"@webiny/cli": "6.0.0-alpha.
|
|
78
|
-
"@webiny/project-utils": "6.0.0-alpha.
|
|
77
|
+
"@webiny/cli": "6.0.0-alpha.3",
|
|
78
|
+
"@webiny/project-utils": "6.0.0-alpha.3",
|
|
79
79
|
"execa": "5.1.1",
|
|
80
80
|
"rimraf": "6.0.1",
|
|
81
81
|
"typescript": "5.3.3"
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "8b6c57b56947ee57acf428f703bc1b8c35617a95"
|
|
99
99
|
}
|