@storyblok/nuxt 4.1.3 → 4.2.2

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
@@ -7,11 +7,11 @@
7
7
  </div>
8
8
 
9
9
  <p align="center">
10
- <a href="https://npmjs.com/package/@storyblok/nuxt-2">
11
- <img src="https://img.shields.io/npm/v/@storyblok/nuxt-2/latest.svg?style=flat-square" alt="Storyblok JS Client" />
10
+ <a href="https://npmjs.com/package/@storyblok/nuxt">
11
+ <img src="https://img.shields.io/npm/v/@storyblok/nuxt/latest.svg?style=flat-square" alt="Storyblok JS Client" />
12
12
  </a>
13
- <a href="https://npmjs.com/package/@storyblok/nuxt-2" rel="nofollow">
14
- <img src="https://img.shields.io/npm/dt/@storyblok/nuxt-2.svg?style=flat-square" alt="npm">
13
+ <a href="https://npmjs.com/package/@storyblok/nuxt" rel="nofollow">
14
+ <img src="https://img.shields.io/npm/dt/@storyblok/nuxt.svg?style=flat-square" alt="npm">
15
15
  </a>
16
16
  </p>
17
17
 
@@ -165,7 +165,7 @@ You can easily render rich text by using the `renderRichText` function that come
165
165
 
166
166
  #### useStoryblok(slug, apiOptions, bridgeOptions)
167
167
 
168
- Check the available [apiOptions](https://github.com/storyblok/storyblok-js-client#class-storyblok) (passed to `storyblok-js-client`) and [bridgeOptions](https://www.storyblok.com/docs/Guides/storyblok-latest-js?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt-beta) (passed to the Storyblok Bridge).
168
+ Check the available [apiOptions](https://github.com/storyblok/storyblok-js-client#class-storyblok) (passed to `storyblok-js-client`) and [bridgeOptions](https://www.storyblok.com/docs/Guides/storyblok-latest-js?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt) (passed to the Storyblok Bridge).
169
169
 
170
170
  #### useStoryblokApi()
171
171
 
@@ -178,7 +178,7 @@ Use this one-line function to cover the most common use case: updating the story
178
178
  ## 🔗 Related Links
179
179
 
180
180
  - **[Live Demo on Stackblitz](https://stackblitz.com/edit/nuxt-3-sdk-demo?file=pages%2Findex.vue&terminal=dev)**
181
- - **[Nuxt.js Hub](https://www.storyblok.com/tc/nuxtjs?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt-beta)**: Learn how to develop your own Nuxt.js applications that use Storyblok APIs to retrieve and manage content;
181
+ - **[Nuxt.js Hub](https://www.storyblok.com/tc/nuxtjs?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt)**: Learn how to develop your own Nuxt.js applications that use Storyblok APIs to retrieve and manage content;
182
182
  - **[Storyblok & Nuxt.js on GitHub](https://github.com/search?q=org%3Astoryblok+topic%3Anuxt)**: Check all of our Nuxt.js open source repos;
183
183
  - **[Storyblok CLI](https://github.com/storyblok/storyblok)**: A simple CLI for scaffolding Storyblok projects and fieldtypes.
184
184
 
@@ -192,5 +192,5 @@ Use this one-line function to cover the most common use case: updating the story
192
192
 
193
193
  ### Contributing
194
194
 
195
- Please see our [contributing guidelines](https://github.com/storyblok/.github/blob/master/contributing.md) and our [code of conduct](https://www.storyblok.com/trust-center#code-of-conduct?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt-beta).
195
+ Please see our [contributing guidelines](https://github.com/storyblok/.github/blob/master/contributing.md) and our [code of conduct](https://www.storyblok.com/trust-center#code-of-conduct?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-nuxt).
196
196
  This project use [semantic-release](https://semantic-release.gitbook.io/semantic-release/) for generate new versions by using commit messages and we use the Angular Convention to naming the commits. Check [this question](https://semantic-release.gitbook.io/semantic-release/support/faq#how-can-i-change-the-type-of-commits-that-trigger-a-release) about it in semantic-release FAQ.
package/dist/module.d.ts CHANGED
@@ -28,7 +28,8 @@ var module = defineNuxtModule({
28
28
  const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
29
29
  nuxt.options.build.transpile.push(runtimeDir);
30
30
  nuxt.options.runtimeConfig.public.storyblok = options;
31
- addPlugin(resolve(__dirname, "runtime", `./plugin`));
31
+ if (options.usePlugin !== false)
32
+ addPlugin(resolve(__dirname, "runtime", `./plugin`));
32
33
  const names = [
33
34
  "useStoryblok",
34
35
  "useStoryblokApi",
package/dist/module.mjs CHANGED
@@ -28,7 +28,8 @@ const module = defineNuxtModule({
28
28
  const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
29
29
  nuxt.options.build.transpile.push(runtimeDir);
30
30
  nuxt.options.runtimeConfig.public.storyblok = options;
31
- addPlugin(resolve(__dirname, "runtime", `./plugin`));
31
+ if (options.usePlugin !== false)
32
+ addPlugin(resolve(__dirname, "runtime", `./plugin`));
32
33
  const names = [
33
34
  "useStoryblok",
34
35
  "useStoryblokApi",
@@ -2,6 +2,7 @@ import { StoryblokVue, apiPlugin } from "@storyblok/vue";
2
2
  import { defineNuxtPlugin, useRuntimeConfig } from "#app";
3
3
 
4
4
  export default defineNuxtPlugin(({ vueApp }) => {
5
- const { storyblok } = useRuntimeConfig();
5
+ let { storyblok } = useRuntimeConfig();
6
+ storyblok = JSON.parse(JSON.stringify(storyblok));
6
7
  vueApp.use(StoryblokVue, { ...storyblok, use: [apiPlugin] });
7
8
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/nuxt",
3
- "version": "4.1.3",
3
+ "version": "4.2.2",
4
4
  "description": "Storyblok Nuxt.js module",
5
5
  "main": "./src/module.js",
6
6
  "module": "./src/module.js",
package/src/module.js CHANGED
@@ -33,7 +33,8 @@ export default defineNuxtModule({
33
33
 
34
34
  // Add plugin
35
35
  nuxt.options.runtimeConfig.public.storyblok = options;
36
- addPlugin(resolve(__dirname, "runtime", `./plugin`));
36
+ if (options.usePlugin !== false)
37
+ addPlugin(resolve(__dirname, "runtime", `./plugin`));
37
38
 
38
39
  // Autoimports
39
40
  const names = [
@@ -2,6 +2,7 @@ import { StoryblokVue, apiPlugin } from "@storyblok/vue";
2
2
  import { defineNuxtPlugin, useRuntimeConfig } from "#app";
3
3
 
4
4
  export default defineNuxtPlugin(({ vueApp }) => {
5
- const { storyblok } = useRuntimeConfig();
5
+ let { storyblok } = useRuntimeConfig();
6
+ storyblok = JSON.parse(JSON.stringify(storyblok));
6
7
  vueApp.use(StoryblokVue, { ...storyblok, use: [apiPlugin] });
7
8
  });