@storyblok/nuxt 5.2.0 → 5.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/dist/module.d.ts CHANGED
@@ -1,38 +1,11 @@
1
- import { defineNuxtModule, createResolver, addComponentsDir, addPlugin, addImports, addImportsDir } from '@nuxt/kit';
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- var module = defineNuxtModule({
4
- meta: {
5
- name: "@storyblok/nuxt",
6
- configKey: "storyblok"
7
- },
8
- defaults: {
9
- usePlugin: true
10
- },
11
- setup(options, nuxt) {
12
- const resolver = createResolver(import.meta.url);
13
- nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
14
- nuxt.options.vite.optimizeDeps.include.push("@storyblok/nuxt");
15
- nuxt.options.vite.optimizeDeps.include.push("@storyblok/vue");
16
- addComponentsDir({ path: "~/storyblok", global: true, pathPrefix: false });
17
- nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
18
- nuxt.options.build.transpile.push("@storyblok/nuxt");
19
- nuxt.options.build.transpile.push("@storyblok/vue");
20
- nuxt.options.runtimeConfig.public.storyblok = options;
21
- if (options.usePlugin !== false) {
22
- addPlugin(resolver.resolve("./runtime/plugin"));
23
- }
24
- const names = [
25
- "useStoryblok",
26
- "useStoryblokApi",
27
- "useStoryblokBridge",
28
- "renderRichText",
29
- "RichTextSchema"
30
- ];
31
- for (const name of names) {
32
- addImports({ name, as: name, from: "@storyblok/vue" });
33
- }
34
- addImportsDir(resolver.resolve("./runtime/composables"));
35
- }
36
- });
3
+ interface ModuleOptions {
4
+ accessToken: string;
5
+ usePlugin: boolean;
6
+ bridge: boolean;
7
+ apiOptions: any;
8
+ }
9
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
37
10
 
38
- export { module as default };
11
+ export { ModuleOptions, _default as default };
package/dist/module.mjs CHANGED
@@ -6,7 +6,10 @@ const module = defineNuxtModule({
6
6
  configKey: "storyblok"
7
7
  },
8
8
  defaults: {
9
- usePlugin: true
9
+ accessToken: "",
10
+ usePlugin: true,
11
+ bridge: true,
12
+ apiOptions: {}
10
13
  },
11
14
  setup(options, nuxt) {
12
15
  const resolver = createResolver(import.meta.url);
@@ -1,2 +1,2 @@
1
- declare var _default: any;
1
+ declare const _default: any;
2
2
  export default _default;
@@ -1,6 +1,5 @@
1
1
  import { StoryblokVue, apiPlugin } from "@storyblok/vue";
2
2
  import { defineNuxtPlugin, useRuntimeConfig } from "#app";
3
-
4
3
  export default defineNuxtPlugin(({ vueApp }) => {
5
4
  let { storyblok } = useRuntimeConfig();
6
5
  storyblok = JSON.parse(JSON.stringify(storyblok));
package/dist/types.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
- import { } from './module'
2
+ import { ModuleOptions } from './module'
3
3
 
4
+ declare module '@nuxt/schema' {
5
+ interface NuxtConfig { ['storyblok']?: Partial<ModuleOptions> }
6
+ interface NuxtOptions { ['storyblok']?: ModuleOptions }
7
+ }
4
8
 
5
9
 
6
10
  export { default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/nuxt",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Storyblok Nuxt module",
5
5
  "type": "module",
6
6
  "exports": {