@studiocms/wysiwyg 0.1.0-experimental.4 → 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.
@@ -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.13",
11
- pageTypes: [
12
- {
13
- identifier: "studiocms/wysiwyg/studio",
14
- label: "GrapesJS StudioSDK",
15
- rendererComponent: resolve("./components/Render.astro"),
16
- pageContentComponent: resolve("./components/StudioSDKEditor.astro")
17
- }
18
- ],
19
- integration: {
20
- name: packageIdentifier,
21
- hooks: {
22
- "astro:config:setup": (params) => {
23
- addVirtualImports(params, {
24
- name: packageIdentifier,
25
- imports: {
26
- "studiocms:wysiwyg/studio/client": `
27
- export const licenseKey = ${JSON.stringify(options.licenseKey)};
28
- export const youtubeAPIKey = ${JSON.stringify(options.youtubeAPIKey)};
29
- export const googleFontsAPIKey = ${JSON.stringify(options.googleFontsAPIKey)};
30
- export * from '${resolve("./utils.js")}';
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
- params.injectRoute({
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
  });
@@ -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.13",
11
- pageTypes: [
12
- {
13
- identifier: "studiocms/wysiwyg",
14
- label: "WYSIWYG",
15
- rendererComponent: resolve("./components/Render.astro"),
16
- pageContentComponent: resolve("./components/Editor.astro")
17
- }
18
- ],
19
- integration: {
20
- name: packageIdentifier,
21
- hooks: {
22
- "astro:config:setup": (params) => {
23
- params.injectRoute({
24
- entrypoint: resolve("./routes/partial.astro"),
25
- pattern: "/studiocms_api/wysiwyg_editor/partial",
26
- prerender: false
27
- });
28
- },
29
- "astro:config:done": () => {
30
- shared.sanitize = options?.sanitize || {};
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.4",
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",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "peerDependencies": {
73
73
  "astro": "^5.7.1",
74
- "studiocms": ">=0.1.0-beta.14",
74
+ "studiocms": ">=0.1.0-beta.18",
75
75
  "vite": "^6.2.5"
76
76
  },
77
77
  "scripts": {