@studiocms/wysiwyg 0.1.0-experimental.3 → 0.1.0-experimental.5
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/studio/index.js +40 -32
- package/dist/wysiwyg/index.js +30 -22
- package/package.json +4 -4
package/dist/studio/index.js
CHANGED
|
@@ -7,39 +7,47 @@ function studiocmsWYSIWYGStudio(options) {
|
|
|
7
7
|
return definePlugin({
|
|
8
8
|
identifier: packageIdentifier,
|
|
9
9
|
name: "StudioCMS WYSIWYG (GrapesJS StudioSDK)",
|
|
10
|
-
studiocmsMinimumVersion: "0.1.0-beta.
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
studiocmsMinimumVersion: "0.1.0-beta.18",
|
|
11
|
+
hooks: {
|
|
12
|
+
"studiocms:astro:config": ({ addIntegrations }) => {
|
|
13
|
+
addIntegrations({
|
|
14
|
+
name: packageIdentifier,
|
|
15
|
+
hooks: {
|
|
16
|
+
"astro:config:setup": (params) => {
|
|
17
|
+
addVirtualImports(params, {
|
|
18
|
+
name: packageIdentifier,
|
|
19
|
+
imports: {
|
|
20
|
+
"studiocms:wysiwyg/studio/client": `
|
|
21
|
+
export const licenseKey = ${JSON.stringify(options.licenseKey)};
|
|
22
|
+
export const youtubeAPIKey = ${JSON.stringify(options.youtubeAPIKey)};
|
|
23
|
+
export const googleFontsAPIKey = ${JSON.stringify(options.googleFontsAPIKey)};
|
|
24
|
+
export * from '${resolve("./utils.js")}';
|
|
25
|
+
`
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
params.injectRoute({
|
|
29
|
+
entrypoint: resolve("./routes/partial.astro"),
|
|
30
|
+
pattern: "/studiocms_api/wysiwyg_editor/studiosdk/partial",
|
|
31
|
+
prerender: false
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
"astro:config:done": () => {
|
|
35
|
+
shared.sanitize = options.sanitize || {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
"studiocms:config:setup": ({ setRendering }) => {
|
|
41
|
+
setRendering({
|
|
42
|
+
pageTypes: [
|
|
43
|
+
{
|
|
44
|
+
identifier: "studiocms/wysiwyg/studio",
|
|
45
|
+
label: "GrapesJS StudioSDK",
|
|
46
|
+
rendererComponent: resolve("./components/Render.astro"),
|
|
47
|
+
pageContentComponent: resolve("./components/StudioSDKEditor.astro")
|
|
32
48
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
entrypoint: resolve("./routes/partial.astro"),
|
|
36
|
-
pattern: "/studiocms_api/wysiwyg_editor/studiosdk/partial",
|
|
37
|
-
prerender: false
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
"astro:config:done": () => {
|
|
41
|
-
shared.sanitize = options.sanitize || {};
|
|
42
|
-
}
|
|
49
|
+
]
|
|
50
|
+
});
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
53
|
});
|
package/dist/wysiwyg/index.js
CHANGED
|
@@ -7,28 +7,36 @@ function studiocmsWYSIWYG(options) {
|
|
|
7
7
|
return definePlugin({
|
|
8
8
|
identifier: packageIdentifier,
|
|
9
9
|
name: "StudioCMS WYSIWYG Editor",
|
|
10
|
-
studiocmsMinimumVersion: "0.1.0-beta.
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
studiocmsMinimumVersion: "0.1.0-beta.18",
|
|
11
|
+
hooks: {
|
|
12
|
+
"studiocms:astro:config": ({ addIntegrations }) => {
|
|
13
|
+
addIntegrations({
|
|
14
|
+
name: packageIdentifier,
|
|
15
|
+
hooks: {
|
|
16
|
+
"astro:config:setup": (params) => {
|
|
17
|
+
params.injectRoute({
|
|
18
|
+
entrypoint: resolve("./routes/partial.astro"),
|
|
19
|
+
pattern: "/studiocms_api/wysiwyg_editor/partial",
|
|
20
|
+
prerender: false
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
"astro:config:done": () => {
|
|
24
|
+
shared.sanitize = options?.sanitize || {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
"studiocms:config:setup": ({ setRendering }) => {
|
|
30
|
+
setRendering({
|
|
31
|
+
pageTypes: [
|
|
32
|
+
{
|
|
33
|
+
identifier: "studiocms/wysiwyg",
|
|
34
|
+
label: "WYSIWYG",
|
|
35
|
+
rendererComponent: resolve("./components/Render.astro"),
|
|
36
|
+
pageContentComponent: resolve("./components/Editor.astro")
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiocms/wysiwyg",
|
|
3
|
-
"version": "0.1.0-experimental.
|
|
3
|
+
"version": "0.1.0-experimental.5",
|
|
4
4
|
"description": "Add A WYSIWYG Editor to your StudioCMS project with ease!",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Matthiesen | Jacob Jenkins | Paul Valladares",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@types/node": "^22.0.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"astro": "^5.
|
|
74
|
-
"studiocms": "0.1.0-beta.
|
|
75
|
-
"vite": "^6.2.
|
|
73
|
+
"astro": "^5.7.1",
|
|
74
|
+
"studiocms": ">=0.1.0-beta.18",
|
|
75
|
+
"vite": "^6.2.5"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "build-scripts build 'src/**/*.{ts,astro,css,js}'",
|