@storyblok/svelte 3.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +26 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -69,20 +69,34 @@ storyblokInit({
69
69
  components: {
70
70
  teaser: Teaser,
71
71
  },
72
- // if you are using a space located in US region
73
- // you have to use apiOptions.region:
74
- /*
75
- apiOptions: {
76
- region: "us" // region code here
77
- }
78
- */
79
72
  });
80
73
  ```
81
74
 
82
- The best place to initialize the Stroyblok library is in the `main.ts.` or `main.js` file if you are using `svelte` or in the `load()` function in the `src/routes/+layout.js` file if you are using `SvelteKit`.
75
+ The best place to initialize the Storyblok library is in the `main.ts.` or `main.js` file if you are using `svelte` or in the `load()` function in the `src/routes/+layout.js` file if you are using `SvelteKit`.
83
76
 
84
77
  List all your components to the components object in the storyblokInit function. You can load all of them by adding them to the list.
85
78
 
79
+ #### Region parameter
80
+
81
+ Possible values:
82
+
83
+ - `eu` (default): For spaces created in the EU
84
+ - `us`: For spaces created in the US
85
+ - `cn`: For spaces created in China
86
+
87
+ Full example for a space created in the US:
88
+
89
+ ```js
90
+ {
91
+ accessToken: "<your-access-token>",
92
+ apiOptions: {
93
+ region: "us"
94
+ }
95
+ }
96
+ ```
97
+
98
+ > Note: For spaces created in the United States or China, the `region` parameter **must** be specified.
99
+
86
100
  ## Getting started
87
101
 
88
102
  ### 1. Fetching Content
@@ -335,6 +349,10 @@ Another option might also be using npm / yarn workspaces.
335
349
 
336
350
  ⚠️ This SDK uses the Fetch API under the hood. If your environment doesn't support it, you need to install a polyfill like [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). More info on [storyblok-js-client docs](https://github.com/storyblok/storyblok-js-client#fetch-use-polyfill-if-needed---version-5).
337
351
 
352
+ ## The Storyblok JavaScript SDK Ecosystem
353
+
354
+ ![A visual representation of the Storyblok JavaScript SDK Ecosystem](https://a.storyblok.com/f/88751/2400x1350/be4a4a4180/sdk-ecosystem.png/m/1200x0)
355
+
338
356
  ## ℹ️ More Resources
339
357
 
340
358
  Please follow the step-by-step instructions available in [Ultimate Tutorial Series](https://www.storyblok.com/tp/the-storyblok-sveltekit-ultimate-tutorial). You can find all the different parts on this overview page and take it from here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/svelte",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "type": "module",
5
5
  "description": "Storyblok SDK to connect Storyblok with Svelte",
6
6
  "main": "./dist/index.js",
@@ -26,18 +26,18 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@storyblok/js": "^2.1.3",
29
- "svelte": "^3.0.0"
29
+ "svelte": "^3.59.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@babel/core": "^7.21.0",
32
+ "@babel/core": "^7.21.8",
33
33
  "@sveltejs/package": "^2.0.2",
34
34
  "@tsconfig/svelte": "^4.0.0",
35
35
  "babel-jest": "^29",
36
36
  "eslint-plugin-jest": "^27.2.0",
37
37
  "jest": "^29.5.0",
38
38
  "svelte-preprocess": "^5.0.1",
39
- "typescript": "^5.0.0",
40
- "vite": "^4.1.4"
39
+ "typescript": "^5.0.4",
40
+ "vite": "^4.3.4"
41
41
  },
42
42
  "eslintConfig": {
43
43
  "env": {