@storyblok/astro 2.0.12 → 2.0.14

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.
@@ -0,0 +1,39 @@
1
+ import { StoryblokClient } from "@storyblok/js";
2
+ import type { AstroIntegration } from "astro";
3
+ import type { ISbConfig, ISbRichtext, SbRichTextOptions } from "./types";
4
+ export { storyblokEditable, loadStoryblokBridge, RichTextResolver, RichTextSchema, } from "@storyblok/js";
5
+ export declare function useStoryblokApi(): StoryblokClient;
6
+ export declare function renderRichText(data: ISbRichtext, options?: SbRichTextOptions): string;
7
+ export type IntegrationOptions = {
8
+ /**
9
+ * The access token from your space.
10
+ */
11
+ accessToken: string;
12
+ /**
13
+ * If you want to use your own method to fetch data from Storyblok, you can disable this behavior by setting `useCustomApi` to `true`, resulting in an optimized final bundle.
14
+ */
15
+ useCustomApi?: boolean;
16
+ /**
17
+ * Set custom API options here (cache, region, and more). All options are documented [here](https://github.com/storyblok/storyblok-js-client#class-storyblok).
18
+ */
19
+ apiOptions?: ISbConfig;
20
+ /**
21
+ * A boolean to enable/disable the Storyblok JavaScript Bridge. Enabled by default.
22
+ */
23
+ bridge?: boolean;
24
+ /**
25
+ * An object containing your Astro components to their Storyblok equivalents.
26
+ * Example:
27
+ * ```js
28
+ * components: {
29
+ * page: "storyblok/Page",
30
+ * feature: "storyblok/Feature",
31
+ * grid: "storyblok/Grid",
32
+ * teaser: "storyblok/Teaser",
33
+ * },
34
+ * ```
35
+ */
36
+ components?: object;
37
+ };
38
+ export default function storyblokIntegration(options: IntegrationOptions): AstroIntegration;
39
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ export type { SbPluginFactory, SbBlokKeyDataTypes, SbBlokData, SbRichTextOptions, SbSDKOptions, StoryblokClient, StoryblokBridgeV2, StoryblokBridgeConfigV2, ISbConfig, // previously StoryblokConfig
2
+ ISbCache, // previously StoryblokCache
3
+ ISbResult, // previously StoryblokResult
4
+ ISbResponse, ISbError, ISbNode, ISbSchema, ThrottleFn, AsyncFn, ArrayFn, ISbContentMangmntAPI, ISbManagmentApiResult, // previously StoryblokManagmentApiResult
5
+ ISbStories, // previously Stories
6
+ ISbStory, // previously Story
7
+ ISbDimensions, StoryblokComponentType, ISbStoryData, // previously StoryData
8
+ ISbAlternateObject, // previously AlternateObject
9
+ ISbStoriesParams, // previously StoriesParams
10
+ ISbStoryParams, // previously StoryParams
11
+ ISbRichtext, // previously Richtext
12
+ ISbEventPayload, } from "@storyblok/js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/astro",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "description": "Official Astro integration for the Storyblok Headless CMS",
5
5
  "main": "./dist/storyblok-astro.js",
6
6
  "module": "./dist/storyblok-astro.mjs",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "./StoryblokComponent.astro": "./StoryblokComponent.astro"
17
17
  },
18
- "types": "./dist/index.d.ts",
18
+ "types": "./dist/types/index.d.ts",
19
19
  "scripts": {
20
20
  "dev": "vite build --watch",
21
21
  "build": "vite build",
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@cypress/vite-dev-server": "^5.0.4",
36
36
  "@rollup/plugin-dynamic-import-vars": "^2.0.3",
37
- "@types/node": "18.14.6",
37
+ "@types/node": "18.15.2",
38
38
  "astro": "2.1.0",
39
39
  "cypress": "^12.7.0",
40
40
  "eslint-plugin-cypress": "^2.12.1",