@bettercms-ai/nuxt 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bettercms-ai/nuxt
2
2
 
3
- BetterCMS for Nuxt.
3
+ BetterCMS for Nuxt. Your own components stay your own: they bind a few attributes onto their elements, and every element becomes editable in the BetterCMS visual editor. Pages stay current when content is published.
4
4
 
5
5
  ```bash
6
6
  npm i @bettercms-ai/nuxt
@@ -10,20 +10,99 @@ npm i @bettercms-ai/nuxt
10
10
  // server/utils/bcms.ts
11
11
  export const bcms = createBcms({ env: process.env });
12
12
 
13
- // server/api/sections/[slug].get.ts
14
- export default defineEventHandler((e) => bcms.sections(getRouterParam(e, "slug")!));
13
+ // server/plugins/bcms.ts: <html data-bcms-draft> in drafts, <meta name="generator">
14
+ export default defineNitroPlugin(bcmsNitroPlugin(bcms));
15
15
 
16
- // pages/index.vue
17
- const { data } = await useFetch("/api/sections/home");
18
- <div v-bcms-sections v-html="sectionsMarkup(data)" />
16
+ // plugins/bcms.client.ts: a publish, and the editor's re-render request, refetch the page's data
17
+ export default defineNuxtPlugin(() => {
18
+ startBcmsLive({ refresh: () => refreshNuxtData(), src: useRuntimeConfig().public.bcmsLiveUrl });
19
+ });
19
20
 
20
- // server/routes/api/draft.get.ts — the path the editor's "Preview on site" opens
21
+ // server/routes/api/draft.get.ts: the path the editor's "Preview on site" opens
21
22
  export default defineEventHandler((e) => bcms.draftEnable(toWebRequest(e)));
23
+
24
+ // server/api/post/[slug].get.ts: drafts while the editor previews
25
+ export default defineEventHandler(async (e) => (await bcms.client(toWebRequest(e))).getEntry(getRouterParam(e, "slug")!));
26
+ ```
27
+
28
+ ```vue
29
+ <!-- your own markup, bound to its content -->
30
+ <script setup>
31
+ import { entryAttrs, entryField, imageAttrs, rich } from "@bettercms-ai/nuxt";
32
+ const { data: post } = await useFetch("/api/post/hello-world");
33
+ </script>
34
+ <template>
35
+ <article v-bind="entryAttrs(post)">
36
+ <h1 v-bind="entryField(post, 'title')">{{ post.data.title }}</h1>
37
+ <img v-bind="{ ...imageAttrs(post.data.cover, { sizes: '100vw' }), ...entryField(post, 'cover') }" class="cover" />
38
+ <div v-bind="entryField(post, 'body')" v-html="rich(post.data.body)" />
39
+ </article>
40
+ </template>
41
+ ```
42
+
43
+ | Helper | What it binds |
44
+ |---|---|
45
+ | `fieldAttrs(path, page.fieldStyles)` | A page field. It also applies the field's stored style, which turns on the editor's Align, Size and Weight controls. |
46
+ | `entryAttrs(entry)` | A collection entry's card. |
47
+ | `entryField(entry, path)` | A field of that entry. |
48
+ | `sectionRootAttrs(block)` | A section root (its spacing and design). |
49
+ | `sectionColumnAttrs(block)` | The section's content column. |
50
+ | `imageAttrs(value, { path, sizes })` | An optimized `<img>` with a srcset, alt text, the focal point and the field binding. |
51
+ | `rich(value)`, `lines(value)`, `plain(value)` | Rich text as HTML, a one-line value, or plain text for attributes. |
52
+
53
+ ## Sections
54
+
55
+ A page built from sections in BetterCMS renders as the hosted renderer draws it, so forms, sliders and tabs work exactly as they do on a BetterCMS-hosted site. Pass the request and the editor's session gets the draft, with every section and value clickable:
56
+
57
+ ```ts
58
+ // server/api/sections/[slug].get.ts
59
+ export default defineEventHandler((e) => bcms.sections(getRouterParam(e, "slug")!, undefined, toWebRequest(e)));
60
+ ```
61
+
62
+ ```vue
63
+ <div v-bcms-sections v-html="sectionsMarkup(sections)" />
64
+ ```
65
+
66
+ ### Your own sections in the CMS order
67
+
68
+ A page that draws its own sections can let BetterCMS order them, and draw sections added in the editor between them: name the page's sections (`slots`, in source order) and loop over `sectionItems`. `npx @bettercms-ai/convert --sections` writes this for you.
69
+
70
+ ```ts
71
+ // server/api/bcms-sections/[slug].get.ts
72
+ export default defineEventHandler((e) =>
73
+ bcms.sections(getRouterParam(e, "slug")!, undefined, toWebRequest(e), { slots: String(getQuery(e).slots ?? "").split(",").filter(Boolean) }));
22
74
  ```
23
75
 
24
- Settings: options, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*` (the same precedence as every adapter). The sections are the hosted renderer's own markup, so forms, sliders and tabs work as on a BetterCMS-hosted site; `vBcmsSections` runs their scripts after a client-side navigation.
76
+ ```vue
77
+ <script setup>
78
+ import { sectionItems, vBcmsSections } from "@bettercms-ai/nuxt";
79
+ const bcmsSlots = ["hero", "code:features"];
80
+ const { data } = await useFetch("/api/bcms-sections/home", { query: { slots: bcmsSlots.join(",") } });
81
+ const bcmsSections = computed(() => sectionItems(data.value, bcmsSlots, "home"));
82
+ </script>
83
+
84
+ <template>
85
+ <template v-for="item in bcmsSections" :key="item.key">
86
+ <template v-if="item.slot === 'hero'"><section class="hero" v-bind="item.root">…</section></template>
87
+ <template v-else-if="item.slot === 'code:features'"><div v-bind="item.box"><Features /></div></template>
88
+ <div v-else-if="item.slot === null" data-bcms-rendered="platform" v-bcms-sections v-html="item.html" />
89
+ </template>
90
+ </template>
91
+ ```
92
+
93
+ `root` goes on a section's own root element (its placement's `data-bcms-block` and style); `box` on a wrapper when the section is a component. With no answer, every slot renders in source order.
94
+
95
+ ## Settings
96
+
97
+ Options are read first, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*`, the same precedence as every adapter:
98
+
99
+ | Variable | Purpose |
100
+ |---|---|
101
+ | `NUXT_PUBLIC_BCMS_API_URL` | The API to read from. |
102
+ | `NUXT_PUBLIC_BCMS_WORKSPACE` | Your workspace. |
103
+ | `NUXT_PUBLIC_BCMS_PROJECT_ID` | Your project. |
104
+ | `BCMS_DRAFT_SECRET` | Signs the draft cookie. |
25
105
 
26
- Notes:
106
+ Don't put a page that a draft session can render behind a shared `routeRules` cache (`swr`, `isr`). The draft marker would be cached and served to visitors.
27
107
 
28
- - The sections run small inline scripts (forms, sliders, tabs). They are safe to run more than once, and the action/directive runs every `<script>` inside its element, so give it an element that holds only the sections. A Content-Security-Policy must allow inline scripts for them.
29
- - Sections are the PUBLISHED page. Draft mode switches the read client (`await bcms.client(request)`) to drafts; the sections fragment shows drafts in a later release.
108
+ The sections run small inline scripts (forms, sliders and tabs), so a Content-Security-Policy must allow inline scripts.
package/dist/index.d.ts CHANGED
@@ -1,26 +1,39 @@
1
1
  import { BcmsSite } from '@bettercms-ai/sdk/sections';
2
- export { BcmsSite, SectionsFragment, sectionsMarkup } from '@bettercms-ai/sdk/sections';
2
+ export { BcmsSite, SectionItem, SectionsFragment, SectionsFragmentItem, sectionItems, sectionsMarkup } from '@bettercms-ai/sdk/sections';
3
3
  import { BcmsSiteOptions } from '@bettercms-ai/sdk/config';
4
+ export * from '@bettercms-ai/sdk/bindings';
5
+ export { BcmsChangeEvent, StartBcmsLiveOptions, inEditor, liveSrc, onContentApplied, startBcmsLive } from '@bettercms-ai/sdk/live';
6
+ export { lines, plain, rich } from '@bettercms-ai/sdk/read';
4
7
 
5
8
  /**
6
- * @bettercms-ai/nuxt — BetterCMS for Nuxt.
9
+ * @bettercms-ai/nuxt — BetterCMS for Nuxt: the site's own markup bound to its content, so every
10
+ * element is editable in the BetterCMS visual editor, and the site stays live on publish.
7
11
  *
8
12
  * // server/utils/bcms.ts
9
13
  * export const bcms = createBcms({ env: process.env });
10
14
  *
11
- * // server/api/sections/[slug].get.ts
12
- * export default defineEventHandler((e) => bcms.sections(getRouterParam(e, "slug")!));
15
+ * // server/plugins/bcms.ts — `<html data-bcms-draft>` in drafts, `<meta name="generator">`
16
+ * export default defineNitroPlugin(bcmsNitroPlugin(bcms));
13
17
  *
14
- * // pages/index.vue
15
- * const { data } = await useFetch("/api/sections/home");
16
- * <div v-bcms-sections v-html="sectionsMarkup(data)" />
18
+ * // plugins/bcms.client.ts — a publish, and the editor's re-render request, refetch the data
19
+ * export default defineNuxtPlugin(() => { startBcmsLive({ refresh: () => refreshNuxtData() }) });
20
+ *
21
+ * // server/api/page/[slug].get.ts — drafts while the editor previews
22
+ * export default defineEventHandler(async (e) => (await bcms.client(toWebRequest(e))).getPage(getRouterParam(e, "slug")!));
23
+ *
24
+ * // pages/index.vue — the site's OWN markup, bound to its fields
25
+ * const { data: page } = await useFetch("/api/page/home");
26
+ * <h1 v-bind="fieldAttrs('hero-title', page.fieldStyles)">{{ page.data["hero-title"] }}</h1>
27
+ * <img v-bind="imageAttrs(page.data.cover, { path: 'cover', sizes: '100vw' })" class="cover" />
28
+ * <div v-bind="fieldAttrs('body')" v-html="rich(page.data.body)" />
29
+ *
30
+ * // or a page's sections as the hosted renderer draws them
31
+ * <div v-bcms-sections v-html="sectionsMarkup(sections)" />
17
32
  *
18
33
  * // server/routes/api/draft.get.ts — the path the editor's "Preview on site" opens
19
34
  * export default defineEventHandler((e) => bcms.draftEnable(toWebRequest(e)));
20
35
  *
21
- * Settings: options, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*` (the same precedence as every
22
- * adapter). The sections are the hosted renderer's own markup, so forms, sliders and tabs work as
23
- * on a BetterCMS-hosted site; `vBcmsSections` runs their scripts after a client-side navigation.
36
+ * Settings: options, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*` (the same precedence as every adapter).
24
37
  */
25
38
 
26
39
  /** Build the site's BetterCMS access from its settings (pass `process.env` on the server). */
@@ -28,10 +41,34 @@ declare function createBcms(options?: BcmsSiteOptions & {
28
41
  env?: Record<string, string | undefined>;
29
42
  draftSecret?: string;
30
43
  }): BcmsSite;
44
+ /** The least of Nitro this needs, so the package carries no nitropack types. */
45
+ interface NitroLike {
46
+ hooks: {
47
+ hook(name: "render:html", fn: (html: {
48
+ htmlAttrs: string[];
49
+ head: string[];
50
+ }, ctx: {
51
+ event: {
52
+ headers?: Headers;
53
+ node?: {
54
+ req?: {
55
+ headers?: Record<string, string | string[] | undefined>;
56
+ };
57
+ };
58
+ };
59
+ }) => unknown): unknown;
60
+ };
61
+ }
62
+ /**
63
+ * The Nitro plugin: every server-rendered page names BetterCMS in its `<head>` and, while the
64
+ * request previews drafts, carries `<html data-bcms-draft="1">`, the canvas's proof that the
65
+ * frame renders drafts (and what `startBcmsLive` reads to load the click-to-edit overlay).
66
+ */
67
+ declare function bcmsNitroPlugin(bcms: BcmsSite): (nitroApp: NitroLike) => void;
31
68
  /** Vue directive for the element holding `v-html="sectionsMarkup(…)"`: its scripts run on every page. */
32
69
  declare const vBcmsSections: {
33
70
  mounted: (el: Element) => void;
34
71
  updated: (el: Element) => void;
35
72
  };
36
73
 
37
- export { createBcms, vBcmsSections };
74
+ export { bcmsNitroPlugin, createBcms, vBcmsSections };
package/dist/index.js CHANGED
@@ -1,16 +1,39 @@
1
1
  // src/index.ts
2
2
  import { createBcmsSite, runSectionScripts } from "@bettercms-ai/sdk/sections";
3
- import { sectionsMarkup } from "@bettercms-ai/sdk/sections";
3
+ import { GENERATOR_META } from "@bettercms-ai/sdk/live";
4
+ import { sectionsMarkup, sectionItems } from "@bettercms-ai/sdk/sections";
5
+ export * from "@bettercms-ai/sdk/bindings";
6
+ import { startBcmsLive, liveSrc, inEditor, onContentApplied } from "@bettercms-ai/sdk/live";
7
+ import { plain, rich, lines } from "@bettercms-ai/sdk/read";
4
8
  function createBcms(options = {}) {
5
9
  return createBcmsSite({ ...options, prefixes: ["NUXT_PUBLIC_"], adapter: "@bettercms-ai/nuxt" });
6
10
  }
11
+ function bcmsNitroPlugin(bcms) {
12
+ return (nitroApp) => {
13
+ nitroApp.hooks.hook("render:html", async (html, { event }) => {
14
+ html.head.push(GENERATOR_META);
15
+ const raw = event.headers?.get("cookie") ?? event.node?.req?.headers?.cookie;
16
+ const cookie = Array.isArray(raw) ? raw.join("; ") : raw;
17
+ if (cookie && await bcms.isDraft(new Request("http://bcms.local/", { headers: { cookie } }))) html.htmlAttrs.push('data-bcms-draft="1"');
18
+ });
19
+ };
20
+ }
7
21
  var vBcmsSections = {
8
22
  mounted: (el) => runSectionScripts(el),
9
23
  updated: (el) => runSectionScripts(el)
10
24
  };
11
25
  export {
26
+ bcmsNitroPlugin,
12
27
  createBcms,
28
+ inEditor,
29
+ lines,
30
+ liveSrc,
31
+ onContentApplied,
32
+ plain,
33
+ rich,
34
+ sectionItems,
13
35
  sectionsMarkup,
36
+ startBcmsLive,
14
37
  vBcmsSections
15
38
  };
16
39
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/// <reference lib=\"dom\" />\n/**\n * @bettercms-ai/nuxt — BetterCMS for Nuxt.\n *\n * // server/utils/bcms.ts\n * export const bcms = createBcms({ env: process.env });\n *\n * // server/api/sections/[slug].get.ts\n * export default defineEventHandler((e) => bcms.sections(getRouterParam(e, \"slug\")!));\n *\n * // pages/index.vue\n * const { data } = await useFetch(\"/api/sections/home\");\n * <div v-bcms-sections v-html=\"sectionsMarkup(data)\" />\n *\n * // server/routes/api/draft.get.ts — the path the editor's \"Preview on site\" opens\n * export default defineEventHandler((e) => bcms.draftEnable(toWebRequest(e)));\n *\n * Settings: options, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*` (the same precedence as every\n * adapter). The sections are the hosted renderer's own markup, so forms, sliders and tabs work as\n * on a BetterCMS-hosted site; `vBcmsSections` runs their scripts after a client-side navigation.\n */\nimport { createBcmsSite, runSectionScripts, type BcmsSite } from \"@bettercms-ai/sdk/sections\";\nimport type { BcmsSiteOptions } from \"@bettercms-ai/sdk/config\";\n\nexport { sectionsMarkup, type SectionsFragment, type BcmsSite } from \"@bettercms-ai/sdk/sections\";\n\n/** Build the site's BetterCMS access from its settings (pass `process.env` on the server). */\nexport function createBcms(options: BcmsSiteOptions & { env?: Record<string, string | undefined>; draftSecret?: string } = {}): BcmsSite {\n return createBcmsSite({ ...options, prefixes: [\"NUXT_PUBLIC_\"], adapter: \"@bettercms-ai/nuxt\" });\n}\n\n/** Vue directive for the element holding `v-html=\"sectionsMarkup(…)\"`: its scripts run on every page. */\nexport const vBcmsSections = {\n mounted: (el: Element) => runSectionScripts(el),\n updated: (el: Element) => runSectionScripts(el),\n};\n"],"mappings":";AAqBA,SAAS,gBAAgB,yBAAwC;AAGjE,SAAS,sBAA4D;AAG9D,SAAS,WAAW,UAAgG,CAAC,GAAa;AACvI,SAAO,eAAe,EAAE,GAAG,SAAS,UAAU,CAAC,cAAc,GAAG,SAAS,qBAAqB,CAAC;AACjG;AAGO,IAAM,gBAAgB;AAAA,EAC3B,SAAS,CAAC,OAAgB,kBAAkB,EAAE;AAAA,EAC9C,SAAS,CAAC,OAAgB,kBAAkB,EAAE;AAChD;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/// <reference lib=\"dom\" />\n/**\n * @bettercms-ai/nuxt — BetterCMS for Nuxt: the site's own markup bound to its content, so every\n * element is editable in the BetterCMS visual editor, and the site stays live on publish.\n *\n * // server/utils/bcms.ts\n * export const bcms = createBcms({ env: process.env });\n *\n * // server/plugins/bcms.ts — `<html data-bcms-draft>` in drafts, `<meta name=\"generator\">`\n * export default defineNitroPlugin(bcmsNitroPlugin(bcms));\n *\n * // plugins/bcms.client.ts — a publish, and the editor's re-render request, refetch the data\n * export default defineNuxtPlugin(() => { startBcmsLive({ refresh: () => refreshNuxtData() }) });\n *\n * // server/api/page/[slug].get.ts — drafts while the editor previews\n * export default defineEventHandler(async (e) => (await bcms.client(toWebRequest(e))).getPage(getRouterParam(e, \"slug\")!));\n *\n * // pages/index.vue — the site's OWN markup, bound to its fields\n * const { data: page } = await useFetch(\"/api/page/home\");\n * <h1 v-bind=\"fieldAttrs('hero-title', page.fieldStyles)\">{{ page.data[\"hero-title\"] }}</h1>\n * <img v-bind=\"imageAttrs(page.data.cover, { path: 'cover', sizes: '100vw' })\" class=\"cover\" />\n * <div v-bind=\"fieldAttrs('body')\" v-html=\"rich(page.data.body)\" />\n *\n * // or a page's sections as the hosted renderer draws them\n * <div v-bcms-sections v-html=\"sectionsMarkup(sections)\" />\n *\n * // server/routes/api/draft.get.ts — the path the editor's \"Preview on site\" opens\n * export default defineEventHandler((e) => bcms.draftEnable(toWebRequest(e)));\n *\n * Settings: options, then `NUXT_PUBLIC_BCMS_*`, then `BCMS_*` (the same precedence as every adapter).\n */\nimport { createBcmsSite, runSectionScripts, type BcmsSite } from \"@bettercms-ai/sdk/sections\";\nimport type { BcmsSiteOptions } from \"@bettercms-ai/sdk/config\";\nimport { GENERATOR_META } from \"@bettercms-ai/sdk/live\";\n\nexport { sectionsMarkup, sectionItems, type SectionsFragment, type SectionsFragmentItem, type SectionItem, type BcmsSite } from \"@bettercms-ai/sdk/sections\";\nexport * from \"@bettercms-ai/sdk/bindings\";\nexport { startBcmsLive, liveSrc, inEditor, onContentApplied, type BcmsChangeEvent, type StartBcmsLiveOptions } from \"@bettercms-ai/sdk/live\";\nexport { plain, rich, lines } from \"@bettercms-ai/sdk/read\";\n\n/** Build the site's BetterCMS access from its settings (pass `process.env` on the server). */\nexport function createBcms(options: BcmsSiteOptions & { env?: Record<string, string | undefined>; draftSecret?: string } = {}): BcmsSite {\n return createBcmsSite({ ...options, prefixes: [\"NUXT_PUBLIC_\"], adapter: \"@bettercms-ai/nuxt\" });\n}\n\n/** The least of Nitro this needs, so the package carries no nitropack types. */\ninterface NitroLike {\n hooks: {\n hook(\n name: \"render:html\",\n fn: (html: { htmlAttrs: string[]; head: string[] }, ctx: { event: { headers?: Headers; node?: { req?: { headers?: Record<string, string | string[] | undefined> } } } }) => unknown,\n ): unknown;\n };\n}\n\n/**\n * The Nitro plugin: every server-rendered page names BetterCMS in its `<head>` and, while the\n * request previews drafts, carries `<html data-bcms-draft=\"1\">`, the canvas's proof that the\n * frame renders drafts (and what `startBcmsLive` reads to load the click-to-edit overlay).\n */\nexport function bcmsNitroPlugin(bcms: BcmsSite) {\n return (nitroApp: NitroLike): void => {\n nitroApp.hooks.hook(\"render:html\", async (html, { event }) => {\n html.head.push(GENERATOR_META);\n const raw = event.headers?.get(\"cookie\") ?? event.node?.req?.headers?.cookie;\n const cookie = Array.isArray(raw) ? raw.join(\"; \") : raw;\n if (cookie && (await bcms.isDraft(new Request(\"http://bcms.local/\", { headers: { cookie } })))) html.htmlAttrs.push('data-bcms-draft=\"1\"');\n });\n };\n}\n\n/** Vue directive for the element holding `v-html=\"sectionsMarkup(…)\"`: its scripts run on every page. */\nexport const vBcmsSections = {\n mounted: (el: Element) => runSectionScripts(el),\n updated: (el: Element) => runSectionScripts(el),\n};\n"],"mappings":";AA+BA,SAAS,gBAAgB,yBAAwC;AAEjE,SAAS,sBAAsB;AAE/B,SAAS,gBAAgB,oBAAuG;AAChI,cAAc;AACd,SAAS,eAAe,SAAS,UAAU,wBAAyE;AACpH,SAAS,OAAO,MAAM,aAAa;AAG5B,SAAS,WAAW,UAAgG,CAAC,GAAa;AACvI,SAAO,eAAe,EAAE,GAAG,SAAS,UAAU,CAAC,cAAc,GAAG,SAAS,qBAAqB,CAAC;AACjG;AAiBO,SAAS,gBAAgB,MAAgB;AAC9C,SAAO,CAAC,aAA8B;AACpC,aAAS,MAAM,KAAK,eAAe,OAAO,MAAM,EAAE,MAAM,MAAM;AAC5D,WAAK,KAAK,KAAK,cAAc;AAC7B,YAAM,MAAM,MAAM,SAAS,IAAI,QAAQ,KAAK,MAAM,MAAM,KAAK,SAAS;AACtE,YAAM,SAAS,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,IAAI,IAAI;AACrD,UAAI,UAAW,MAAM,KAAK,QAAQ,IAAI,QAAQ,sBAAsB,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,EAAI,MAAK,UAAU,KAAK,qBAAqB;AAAA,IAC3I,CAAC;AAAA,EACH;AACF;AAGO,IAAM,gBAAgB;AAAA,EAC3B,SAAS,CAAC,OAAgB,kBAAkB,EAAE;AAAA,EAC9C,SAAS,CAAC,OAAgB,kBAAkB,EAAE;AAChD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bettercms-ai/nuxt",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "BetterCMS for Nuxt: settings from NUXT_PUBLIC_BCMS_*, the read client per request with draft mode, the editor's draft routes, and the page sections server-rendered by BetterCMS.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -19,7 +19,7 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "@bettercms-ai/sdk": "^1.35.0"
22
+ "@bettercms-ai/sdk": "^1.40.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "vue": ">=3"