@buildinams/react-storyblok
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@buildinams/react-storyblok", | ||
"description": "Opinionated Reactjs Storyblok wrapper", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"license": "MIT", | ||
"author": "Build in Amsterdam <development@buildinamsterdam.com> (https://www.buildinamsterdam.com/)", | ||
"main": "./dist/client/index.js", | ||
"types": "./dist/client/index.d.ts", | ||
"main": "dist/client/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": "./dist/client/index.js", | ||
"./server": "./dist/server/index.js", | ||
@@ -11,0 +12,0 @@ "./client": "./dist/client/index.js" |
@@ -1,3 +0,2 @@ | ||
export { default as getSectionsRenderer } from "./getSectionsRenderer"; | ||
export * from "./types"; | ||
export { default as withStoryblokPreviewHOC } from "./withStoryblokPreviewHOC"; | ||
export { getSectionsRenderer } from "./getSectionsRenderer"; | ||
export { withStoryblokPreviewHOC } from "./withStoryblokPreviewHOC"; |
import { loadStoryblokBridge, useStoryblokBridge } from "@storyblok/js"; | ||
import { ContentTypeData, StoryData } from "../../server/types"; | ||
import { ContentTypeData, StoryData } from "../../types"; | ||
@@ -14,3 +14,3 @@ loadStoryblokBridge(); | ||
*/ | ||
export const storyblokBridge = <T extends ContentTypeData>( | ||
const storyblokBridge = <T extends ContentTypeData>( | ||
storyID: number, | ||
@@ -23,1 +23,3 @@ resolveRelations: string[] | undefined, | ||
}; | ||
export { storyblokBridge }; |
@@ -15,3 +15,3 @@ import { | ||
TagEntry, | ||
} from "../types"; | ||
} from "../../types"; | ||
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
class StoryblokAdaptor { | ||
export class StoryblokAdaptor { | ||
#customAdaptors: Partial<AllAdaptors>; | ||
@@ -177,3 +177,1 @@ #storyPathHandler: StoryPathHandler; | ||
} | ||
export default StoryblokAdaptor; |
import StoryblokClient, { ISbCache } from "storyblok-js-client"; | ||
import StoryblokAdaptor from "../adaptor"; | ||
import { | ||
@@ -16,3 +15,4 @@ DatasourceData, | ||
TagsResponse, | ||
} from "../types"; | ||
} from "../../types"; | ||
import { StoryblokAdaptor } from "../"; | ||
@@ -28,3 +28,3 @@ const IS_BROWSER = typeof window !== "undefined"; | ||
*/ | ||
class StoryblokFetcher { | ||
export class StoryblokFetcher { | ||
#client: StoryblokClient; | ||
@@ -254,3 +254,1 @@ #storiesPerPage: number; | ||
} | ||
export default StoryblokFetcher; |
@@ -1,3 +0,2 @@ | ||
export { default as StoryblokAdaptor } from "./adaptor"; | ||
export { default as StoryblokFetcher } from "./fetcher"; | ||
export * from "./types"; | ||
export { StoryblokAdaptor } from "./adaptor"; | ||
export { StoryblokFetcher } from "./fetcher"; |
@@ -5,3 +5,3 @@ import { StoryblokAdaptor, StoryblokFetcher } from "../dist/server"; | ||
const createFetcher = (adaptor?: StoryblokAdaptor) => { | ||
export const createFetcher = (adaptor?: StoryblokAdaptor) => { | ||
return new StoryblokFetcher({ | ||
@@ -13,3 +13,1 @@ accessToken: ACCESS_TOKEN, | ||
}; | ||
export default createFetcher; |
import { expectTypeOf } from "expect-type"; | ||
import { | ||
ContentTypeAdaptor, | ||
StoryblokAdaptor, | ||
StoryResponse, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { ContentTypeAdaptor, StoryResponse } from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
import { Feature, Teaser } from "./types"; | ||
@@ -10,0 +7,0 @@ |
import { expectTypeOf } from "expect-type"; | ||
import { | ||
DatasourceEntry, | ||
DatasourceResponse, | ||
StoryblokAdaptor, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { DatasourceEntry, DatasourceResponse } from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
@@ -10,0 +7,0 @@ interface AdaptedDatasourceEntry { |
import { expectTypeOf } from "expect-type"; | ||
import { | ||
FieldTypeAdaptor, | ||
StoryblokAdaptor, | ||
StoryResponse, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { FieldTypeAdaptor, StoryResponse } from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
import { Asset } from "./types"; | ||
@@ -10,0 +7,0 @@ |
import { expectTypeOf } from "expect-type"; | ||
import { | ||
PluginAdaptor, | ||
StoryblokAdaptor, | ||
StoryResponse, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { PluginAdaptor, StoryResponse } from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
import { ColorPicker } from "./types"; | ||
@@ -10,0 +7,0 @@ |
import { expectTypeOf } from "expect-type"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { | ||
@@ -8,6 +9,5 @@ Adaptor, | ||
StoryAdaptor, | ||
StoryblokAdaptor, | ||
StoryResponse, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
} from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
import { HomeContent } from "./types"; | ||
@@ -14,0 +14,0 @@ |
import { expectTypeOf } from "expect-type"; | ||
import { StoryblokAdaptor, TagEntry, TagsResponse } from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
import { StoryblokAdaptor } from "../../dist/server"; | ||
import { TagEntry, TagsResponse } from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
@@ -6,0 +7,0 @@ type AdaptedTagsData = string[]; |
@@ -1,2 +0,2 @@ | ||
import { ContentTypeData, FieldTypeData, PluginData } from "../../dist/server"; | ||
import { ContentTypeData, FieldTypeData, PluginData } from "../../dist/types"; | ||
@@ -3,0 +3,0 @@ export interface Feature extends ContentTypeData { |
@@ -9,4 +9,4 @@ import { expectTypeOf } from "expect-type"; | ||
TagsResponse, | ||
} from "../../dist/server"; | ||
import createFetcher from "../createFetcher"; | ||
} from "../../dist/types"; | ||
import { createFetcher } from "../createFetcher"; | ||
import { HomeContent } from "../withCustomAdaptors/types"; | ||
@@ -13,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
97310
51
1856