@storyblok/astro 7.2.8 → 7.3.1

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { SbBlokData } from "@storyblok/js";
2
+ import type { SbBlokData } from '@storyblok/astro';
3
3
 
4
4
  export interface Props {
5
5
  blok: SbBlokData;
@@ -1,6 +1,6 @@
1
1
  import { SbBlokData } from '@storyblok/js';
2
- declare const FallbackComponent: (_props: {
2
+ declare function FallbackComponent(_props: Record<string, unknown> & {
3
+ /** The Storyblok blok data for this component (required) */
3
4
  blok: SbBlokData;
4
- [prop: string]: unknown;
5
- }) => any;
5
+ }): any;
6
6
  export default FallbackComponent;
@@ -1,15 +1,13 @@
1
1
  ---
2
- import components from "virtual:storyblok-components";
3
- import options from "virtual:storyblok-options";
4
- import { toCamelCase } from "@storyblok/astro";
5
- import type { SbBlokData } from "@storyblok/js";
6
- import type { AstroComponentFactory } from "astro/runtime/server/index.js";
2
+ import options from 'virtual:storyblok-options';
3
+ import { toCamelCase, type SbBlokData } from '@storyblok/astro';
4
+ import type { AstroComponentFactory } from 'astro/runtime/server/index.js';
5
+ import { storyblokComponents } from 'virtual:import-storyblok-components';
7
6
 
8
7
  export interface Props {
9
8
  blok: SbBlokData;
10
9
  [prop: string]: unknown;
11
10
  }
12
-
13
11
  const { blok, ...props } = Astro.props;
14
12
 
15
13
  if (!blok) {
@@ -17,26 +15,29 @@ if (!blok) {
17
15
  "Cannot render StoryblokComponent. 'blok' prop is undefined."
18
16
  );
19
17
  }
20
-
21
18
  /**
22
- * convert blok components to camel case to match vite-plugin-storyblok-components
19
+ * convert blok components to camel case to match vite-plugin-import-storyblok-components
23
20
  */
24
21
  let key = toCamelCase(blok.component as string);
25
22
 
26
- const componentFound: boolean = key in components;
23
+ const componentFound: boolean = key in storyblokComponents;
27
24
 
28
25
  let Component: AstroComponentFactory;
29
26
 
30
27
  if (!componentFound) {
31
28
  if (!options.enableFallbackComponent)
32
29
  throw new Error(
33
- `Component could not be found for blok "${blok.component}"! Is it defined in astro.config.mjs?`
30
+ `No component found for blok "${blok.component}".
31
+ Make sure the component is:
32
+ • Registered in your astro.config.mjs, or
33
+ • Placed in the "/${options.componentsDir}/storyblok" folder, or
34
+ • Enable the "fallbackComponent" option to handle missing components.`
34
35
  );
35
36
  else {
36
- Component = components["FallbackComponent"];
37
+ Component = storyblokComponents['FallbackComponent'];
37
38
  }
38
39
  } else {
39
- Component = components[key];
40
+ Component = storyblokComponents[key];
40
41
  }
41
42
  ---
42
43
 
@@ -1,3 +1,3 @@
1
- export declare const storyblokLogo = "<svg width=\"45px\" height=\"53px\" viewBox=\"0 0 45 53\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <g id=\"storyblok-logo-kit\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"storyblok-partner-logo\" transform=\"translate(-59.000000, -169.000000)\" fill-rule=\"nonzero\">\n <g id=\"storyblok-symbol\" transform=\"translate(59.000000, 169.000000)\">\n <path d=\"M2.32662261,0 C1.03405449,0 0,1.0331384 0,2.27290448 L0,42.8752437 C0,44.1150097 1.03405449,44.8898635 2.27491989,44.8898635 L8.27243596,44.8898635 L8.27243596,53 L15.7176283,44.9415205 L42.9132615,44.9415205 C44.1541269,44.9415205 44.9296678,44.1666667 44.9296678,42.8752437 L44.9296678,2.3245614 C44.9296678,1.08479532 44.2058296,0 42.9132615,0 L2.32662261,0 Z\" id=\"Shape-path-Copy\" fill=\"#0AB3AF\"></path>\n <path d=\"M29.1016723,8.11483254 C30.1351059,8.11483254 31.0135245,8.32132604 31.8402713,8.78593643 C32.6153465,9.19892344 33.33875,9.76678059 33.9071385,10.4378845 C35.0647615,11.8482391 35.6869248,13.6215753 35.6639755,15.445352 C35.6639755,16.7875598 35.3022738,18.0781442 34.630542,19.3171053 C33.9341248,20.5632996 32.8438147,21.5436614 31.5302412,22.1047676 C33.183735,22.569378 34.4755269,23.395352 35.4572888,24.5826897 C36.387379,25.8216507 36.8524241,27.4219754 36.8524241,29.4352871 C36.8524241,30.7258715 36.6168825,31.8756998 36.1290206,32.7391832 C35.6123039,33.668404 34.8372287,34.4427546 33.9071385,35.0106118 C32.9253766,35.6300923 31.8402713,36.1979494 30.600151,36.4560663 C29.3600307,36.7658066 28.0165671,37.0239234 26.6214318,37.0239234 L8.32965751,37.0239234 L8.32965751,8.11483254 L29.1016723,8.11483254 Z M26.1340815,24.271851 L15.77813,24.271851 L15.77813,29.1552028 L25.8851404,29.1552028 C26.4825991,29.1552028 27.0302696,28.9110352 27.4783637,28.5203671 C27.8766695,28.1296989 28.1256107,27.5436967 28.1256107,26.811194 C28.140051,26.1827412 27.948041,25.5663945 27.5779401,25.0531873 C27.1796343,24.5648522 26.7315403,24.271851 26.1340815,24.271851 Z M25.2876816,14.5051475 L15.77813,14.5051475 L15.77813,18.9001641 L25.0885287,18.9001641 C25.586411,18.9001641 26.0842933,18.6559965 26.4825991,18.3629954 C26.9306932,18.0699943 27.1298461,17.4351586 27.1298461,16.6049888 C27.1298461,15.872486 26.9306932,15.3353173 26.5821756,14.9934827 C26.233658,14.7004816 25.7855639,14.5051475 25.2876816,14.5051475 Z\" id=\"Combined-Shape-Copy-3\" fill=\"#FFFFFF\"></path>\n </g>\n </g>\n </g>\n</svg>";
1
+ export declare const storyblokLogo = "\n<svg class=\"logo-storyblok logo-storyblok--dark\" role=\"img\" aria-label=\"Storyblok Official Logo\" viewBox=\"0 0 19 22\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29.0287 14.9132C28.2686 14.9132 27.5302 14.8018 26.7918 14.5568C26.0988 14.3265 25.462 13.9468 24.924 13.4432L25.9013 11.7504C26.4443 12.1291 26.9655 12.4186 27.4867 12.6414C27.9862 12.8641 28.4858 12.9532 28.9636 12.9532C29.3111 12.9532 29.5934 12.8864 29.7888 12.7527C29.9843 12.6414 30.0712 12.4409 30.0712 12.1959C30.0712 11.9732 29.9626 11.7504 29.702 11.6168C29.2938 11.4162 28.8636 11.2666 28.4206 11.1714L26.9003 10.6591C26.4877 10.4809 26.1619 10.3027 25.9013 10.1023C25.6407 9.92408 25.4452 9.67908 25.3366 9.43408C25.2184 9.1529 25.1592 8.84935 25.1629 8.54317C25.1502 7.66646 25.5255 6.83107 26.1836 6.27136C26.4877 6.00408 26.8786 5.80363 27.313 5.64772C27.7473 5.49181 28.2251 5.42499 28.7247 5.42499C29.3979 5.42499 30.0277 5.51408 30.6141 5.69226C31.2005 5.89272 31.7652 6.22681 32.3081 6.71681L31.244 8.38726C30.8236 8.07881 30.3722 7.81747 29.8974 7.60772C29.4848 7.42954 29.1156 7.36272 28.7247 7.36272C28.4423 7.36272 28.1817 7.40726 27.9862 7.5409C27.7691 7.65226 27.6822 7.85272 27.6822 8.11999C27.6822 8.38726 27.7908 8.56545 28.008 8.69908C28.2251 8.83272 28.6595 8.96635 29.2459 9.12226C29.7903 9.26289 30.3268 9.4339 30.853 9.63454C31.2874 9.81272 31.6349 10.0132 31.9172 10.2136C32.4511 10.6169 32.7463 11.2726 32.6991 11.9509C32.6991 12.8641 32.3733 13.5768 31.7 14.1114C31.0485 14.6459 30.1798 14.9132 29.0287 14.9132ZM39.7792 14.2673C39.41 14.4232 38.9756 14.5791 38.4978 14.7127C38.02 14.8464 37.5422 14.9354 37.0427 14.9354C36.6952 14.9354 36.3911 14.8909 36.0871 14.8018C35.7915 14.7134 35.5176 14.5616 35.2835 14.3564C35.0663 14.1782 34.8926 13.9109 34.7623 13.6214C34.632 13.3095 34.5451 12.9309 34.5451 12.4854V7.69681H33.4158V5.60317H34.5668V2.68545H37.2599V5.5809H39.0842V7.69681H37.2599V11.5277C37.2599 11.8173 37.325 12.04 37.4771 12.1959C37.6291 12.3073 37.8245 12.3741 38.0417 12.3741C38.2589 12.3741 38.4761 12.3518 38.6715 12.2627C38.8887 12.1959 39.0842 12.1291 39.2362 12.04L39.7575 14.2673H39.7792ZM44.8612 14.9132C44.1701 14.9255 43.4835 14.7968 42.8414 14.5345C41.7112 14.076 40.8261 13.1439 40.409 11.9732C39.9823 10.8102 39.9823 9.52792 40.409 8.36499C40.8261 7.19423 41.7112 6.26214 42.8414 5.80363C43.4278 5.55863 44.1011 5.42499 44.8612 5.42499C46.1833 5.36117 47.4671 5.88947 48.3795 6.87272C48.7922 7.2959 49.0962 7.80817 49.3134 8.36499C49.758 9.5322 49.758 10.8282 49.3134 11.9954C48.8937 13.1518 48.0186 14.0734 46.9027 14.5345C46.2538 14.7998 45.5596 14.9285 44.8612 14.9132ZM42.9066 10.1914C42.9066 10.9041 43.0803 11.4832 43.4495 11.9064C43.8405 12.3518 44.3183 12.5745 44.8829 12.5745C45.4284 12.5853 45.9487 12.3391 46.2946 11.9064C46.4683 11.6836 46.5987 11.4609 46.7072 11.1491C46.8158 10.8595 46.8593 10.5254 46.8593 10.1914C46.8593 9.45636 46.6638 8.87726 46.2946 8.45408C45.9254 8.00863 45.4476 7.78589 44.8829 7.78589C44.3394 7.78464 43.8229 8.02909 43.4712 8.45408C43.2975 8.67681 43.1455 8.89954 43.0369 9.21136C42.939 9.52794 42.8949 9.85944 42.9066 10.1914ZM56.6541 7.98636C56.0026 7.98636 55.3945 8.09772 54.8515 8.32045C54.3736 8.48572 53.9666 8.81646 53.7005 9.2559V14.7573H50.9857V5.60317H53.4833V7.42954C53.7873 6.8059 54.1783 6.3159 54.6778 5.98181C55.1556 5.62545 55.6551 5.44726 56.1981 5.42499H56.4804L56.6541 5.44726V7.96408V7.98636ZM57.8486 16.1159C58.2263 16.2505 58.6217 16.3256 59.0214 16.3386C59.3472 16.3386 59.6078 16.2273 59.8033 16.0045C59.977 15.7818 60.129 15.3364 60.2811 14.7573L56.893 5.60317H59.6947L61.7579 12.3518L63.5605 5.60317H66.1015L62.6918 16.2273C62.1569 18.0318 60.3638 19.1157 58.5653 18.7218C58.3481 18.6773 58.0875 18.6104 57.8486 18.4991V16.1159ZM72.5301 14.9133C71.8568 14.9133 71.2487 14.7795 70.7492 14.4677C70.2417 14.1818 69.8208 13.758 69.533 13.2427V14.7573H67.1657V2.01727H69.9022V7.09545C70.4962 6.02938 71.6157 5.38681 72.8124 5.42499C73.3771 5.42499 73.8983 5.53636 74.3761 5.80363C74.8539 6.02636 75.2448 6.38272 75.614 6.8059C76.6831 8.32739 76.974 10.2831 76.3959 12.0623C76.1787 12.6414 75.8746 13.1536 75.5054 13.5768C74.7429 14.4342 73.6616 14.9198 72.5301 14.9133ZM71.7699 12.5745C72.6515 12.5764 73.4369 12.0037 73.7245 11.1491C74.043 10.2518 73.887 9.24956 73.3119 8.49863C72.9724 8.0401 72.4398 7.7753 71.8785 7.7859C71.4659 7.7859 71.0749 7.94181 70.7057 8.23136C70.3582 8.54317 70.0759 8.92181 69.8805 9.38954V11.305C70.2309 12.0628 70.9738 12.5476 71.7916 12.5523L71.7699 12.5745ZM78.0247 2.01727H80.7395V11.4832C80.7395 12.1959 81.0218 12.53 81.6082 12.53C81.9183 12.5309 82.2239 12.4545 82.4987 12.3073L82.8679 14.3786C82.1072 14.7203 81.2875 14.902 80.4572 14.9132C79.6753 14.9132 79.0672 14.6904 78.6546 14.2895C78.2202 13.8441 78.003 13.265 78.003 12.4632V2.01727H78.0247ZM87.9933 14.9132C87.3023 14.9255 86.6157 14.7968 85.9736 14.5345C84.8367 14.0789 83.9437 13.1469 83.5194 11.9732C82.8914 10.2226 83.2408 8.26037 84.4316 6.85045C84.8659 6.40499 85.3437 6.0709 85.9518 5.80363C86.5382 5.55863 87.2115 5.42499 87.9716 5.42499C89.2937 5.36117 90.5776 5.88947 91.49 6.87272C91.9243 7.2959 92.2066 7.80817 92.4238 8.36499C93.0767 10.1133 92.7249 12.0889 91.5117 13.4877C91.099 13.9332 90.5995 14.2895 89.9914 14.5345C89.3493 14.7968 88.6627 14.9255 87.9716 14.9132H87.9933ZM86.017 10.1914C86.017 10.9041 86.1907 11.4832 86.5599 11.9064C86.9509 12.3518 87.4287 12.5745 87.9933 12.5745C88.5382 12.5821 89.0571 12.3364 89.405 11.9064C89.5788 11.6836 89.7091 11.4609 89.8177 11.1491C89.9262 10.8595 89.9697 10.5254 89.9697 10.1914C89.9697 9.45636 89.7742 8.87726 89.405 8.45408C89.0358 8.00863 88.558 7.78589 87.9933 7.78589C87.4498 7.78464 86.9334 8.02909 86.5817 8.45408C86.4079 8.67681 86.2559 8.89954 86.1473 9.21136C86.0387 9.52317 86.017 9.83499 86.017 10.1914ZM100.112 14.7573L97.7882 11.06L96.8326 12.0845V14.7573H94.1178V2.01727H96.8326V9.38954L99.8514 5.60317H102.74L99.5256 9.54545L103.001 14.7573H100.112Z\" fill=\"currentColor\"></path>\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0 1.71089C0 0.76599 0.76599 0 1.71089 0H17.1089C18.0538 0 18.8198 0.76599 18.8198 1.71089V17.1089C18.8198 18.0538 18.0538 18.8198 17.1089 18.8198H7.13145L4.57616 20.9297C4.24445 21.2036 3.74366 20.9676 3.74366 20.5375V18.8198H1.71089C0.76599 18.8198 0 18.0538 0 17.1089V1.71089ZM3.74233 3.10946H11.9675C13.7438 3.10946 15.1839 4.5495 15.1839 6.32587C15.1839 7.74936 14.2592 8.95687 12.9777 9.38045C14.4761 9.65447 15.6117 10.9667 15.6117 12.5443C15.6117 14.3207 14.1717 15.7607 12.3953 15.7607H3.74247V9.54229H3.74233V3.10946ZM10.583 6.00384H6.73607V7.93369H10.583C11.1159 7.93369 11.5479 7.50168 11.5479 6.96877C11.5479 6.43585 11.1159 6.00384 10.583 6.00384ZM6.73607 10.2925H10.9035C11.4956 10.2925 11.9757 10.7725 11.9757 11.3647C11.9757 11.9568 11.4956 12.4368 10.9035 12.4368H6.73607V10.2925Z\" fill=\"currentColor\"></path>\n</svg>\n";
2
2
  declare const _default: import('astro').DevToolbarApp;
3
3
  export default _default;
@@ -4,29 +4,19 @@ import {
4
4
  } from 'astro/runtime/client/dev-toolbar/ui-library/icons.js';
5
5
  import { defineToolbarApp } from 'astro/toolbar';
6
6
 
7
- export const storyblokLogo = `<svg width="45px" height="53px" viewBox="0 0 45 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
8
- <g id="storyblok-logo-kit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9
- <g id="storyblok-partner-logo" transform="translate(-59.000000, -169.000000)" fill-rule="nonzero">
10
- <g id="storyblok-symbol" transform="translate(59.000000, 169.000000)">
11
- <path d="M2.32662261,0 C1.03405449,0 0,1.0331384 0,2.27290448 L0,42.8752437 C0,44.1150097 1.03405449,44.8898635 2.27491989,44.8898635 L8.27243596,44.8898635 L8.27243596,53 L15.7176283,44.9415205 L42.9132615,44.9415205 C44.1541269,44.9415205 44.9296678,44.1666667 44.9296678,42.8752437 L44.9296678,2.3245614 C44.9296678,1.08479532 44.2058296,0 42.9132615,0 L2.32662261,0 Z" id="Shape-path-Copy" fill="#0AB3AF"></path>
12
- <path d="M29.1016723,8.11483254 C30.1351059,8.11483254 31.0135245,8.32132604 31.8402713,8.78593643 C32.6153465,9.19892344 33.33875,9.76678059 33.9071385,10.4378845 C35.0647615,11.8482391 35.6869248,13.6215753 35.6639755,15.445352 C35.6639755,16.7875598 35.3022738,18.0781442 34.630542,19.3171053 C33.9341248,20.5632996 32.8438147,21.5436614 31.5302412,22.1047676 C33.183735,22.569378 34.4755269,23.395352 35.4572888,24.5826897 C36.387379,25.8216507 36.8524241,27.4219754 36.8524241,29.4352871 C36.8524241,30.7258715 36.6168825,31.8756998 36.1290206,32.7391832 C35.6123039,33.668404 34.8372287,34.4427546 33.9071385,35.0106118 C32.9253766,35.6300923 31.8402713,36.1979494 30.600151,36.4560663 C29.3600307,36.7658066 28.0165671,37.0239234 26.6214318,37.0239234 L8.32965751,37.0239234 L8.32965751,8.11483254 L29.1016723,8.11483254 Z M26.1340815,24.271851 L15.77813,24.271851 L15.77813,29.1552028 L25.8851404,29.1552028 C26.4825991,29.1552028 27.0302696,28.9110352 27.4783637,28.5203671 C27.8766695,28.1296989 28.1256107,27.5436967 28.1256107,26.811194 C28.140051,26.1827412 27.948041,25.5663945 27.5779401,25.0531873 C27.1796343,24.5648522 26.7315403,24.271851 26.1340815,24.271851 Z M25.2876816,14.5051475 L15.77813,14.5051475 L15.77813,18.9001641 L25.0885287,18.9001641 C25.586411,18.9001641 26.0842933,18.6559965 26.4825991,18.3629954 C26.9306932,18.0699943 27.1298461,17.4351586 27.1298461,16.6049888 C27.1298461,15.872486 26.9306932,15.3353173 26.5821756,14.9934827 C26.233658,14.7004816 25.7855639,14.5051475 25.2876816,14.5051475 Z" id="Combined-Shape-Copy-3" fill="#FFFFFF"></path>
13
- </g>
14
- </g>
15
- </g>
16
- </svg>`;
7
+ export const storyblokLogo = `
8
+ <svg class="logo-storyblok logo-storyblok--dark" role="img" aria-label="Storyblok Official Logo" viewBox="0 0 19 22" xmlns="http://www.w3.org/2000/svg">
9
+ <path d="M29.0287 14.9132C28.2686 14.9132 27.5302 14.8018 26.7918 14.5568C26.0988 14.3265 25.462 13.9468 24.924 13.4432L25.9013 11.7504C26.4443 12.1291 26.9655 12.4186 27.4867 12.6414C27.9862 12.8641 28.4858 12.9532 28.9636 12.9532C29.3111 12.9532 29.5934 12.8864 29.7888 12.7527C29.9843 12.6414 30.0712 12.4409 30.0712 12.1959C30.0712 11.9732 29.9626 11.7504 29.702 11.6168C29.2938 11.4162 28.8636 11.2666 28.4206 11.1714L26.9003 10.6591C26.4877 10.4809 26.1619 10.3027 25.9013 10.1023C25.6407 9.92408 25.4452 9.67908 25.3366 9.43408C25.2184 9.1529 25.1592 8.84935 25.1629 8.54317C25.1502 7.66646 25.5255 6.83107 26.1836 6.27136C26.4877 6.00408 26.8786 5.80363 27.313 5.64772C27.7473 5.49181 28.2251 5.42499 28.7247 5.42499C29.3979 5.42499 30.0277 5.51408 30.6141 5.69226C31.2005 5.89272 31.7652 6.22681 32.3081 6.71681L31.244 8.38726C30.8236 8.07881 30.3722 7.81747 29.8974 7.60772C29.4848 7.42954 29.1156 7.36272 28.7247 7.36272C28.4423 7.36272 28.1817 7.40726 27.9862 7.5409C27.7691 7.65226 27.6822 7.85272 27.6822 8.11999C27.6822 8.38726 27.7908 8.56545 28.008 8.69908C28.2251 8.83272 28.6595 8.96635 29.2459 9.12226C29.7903 9.26289 30.3268 9.4339 30.853 9.63454C31.2874 9.81272 31.6349 10.0132 31.9172 10.2136C32.4511 10.6169 32.7463 11.2726 32.6991 11.9509C32.6991 12.8641 32.3733 13.5768 31.7 14.1114C31.0485 14.6459 30.1798 14.9132 29.0287 14.9132ZM39.7792 14.2673C39.41 14.4232 38.9756 14.5791 38.4978 14.7127C38.02 14.8464 37.5422 14.9354 37.0427 14.9354C36.6952 14.9354 36.3911 14.8909 36.0871 14.8018C35.7915 14.7134 35.5176 14.5616 35.2835 14.3564C35.0663 14.1782 34.8926 13.9109 34.7623 13.6214C34.632 13.3095 34.5451 12.9309 34.5451 12.4854V7.69681H33.4158V5.60317H34.5668V2.68545H37.2599V5.5809H39.0842V7.69681H37.2599V11.5277C37.2599 11.8173 37.325 12.04 37.4771 12.1959C37.6291 12.3073 37.8245 12.3741 38.0417 12.3741C38.2589 12.3741 38.4761 12.3518 38.6715 12.2627C38.8887 12.1959 39.0842 12.1291 39.2362 12.04L39.7575 14.2673H39.7792ZM44.8612 14.9132C44.1701 14.9255 43.4835 14.7968 42.8414 14.5345C41.7112 14.076 40.8261 13.1439 40.409 11.9732C39.9823 10.8102 39.9823 9.52792 40.409 8.36499C40.8261 7.19423 41.7112 6.26214 42.8414 5.80363C43.4278 5.55863 44.1011 5.42499 44.8612 5.42499C46.1833 5.36117 47.4671 5.88947 48.3795 6.87272C48.7922 7.2959 49.0962 7.80817 49.3134 8.36499C49.758 9.5322 49.758 10.8282 49.3134 11.9954C48.8937 13.1518 48.0186 14.0734 46.9027 14.5345C46.2538 14.7998 45.5596 14.9285 44.8612 14.9132ZM42.9066 10.1914C42.9066 10.9041 43.0803 11.4832 43.4495 11.9064C43.8405 12.3518 44.3183 12.5745 44.8829 12.5745C45.4284 12.5853 45.9487 12.3391 46.2946 11.9064C46.4683 11.6836 46.5987 11.4609 46.7072 11.1491C46.8158 10.8595 46.8593 10.5254 46.8593 10.1914C46.8593 9.45636 46.6638 8.87726 46.2946 8.45408C45.9254 8.00863 45.4476 7.78589 44.8829 7.78589C44.3394 7.78464 43.8229 8.02909 43.4712 8.45408C43.2975 8.67681 43.1455 8.89954 43.0369 9.21136C42.939 9.52794 42.8949 9.85944 42.9066 10.1914ZM56.6541 7.98636C56.0026 7.98636 55.3945 8.09772 54.8515 8.32045C54.3736 8.48572 53.9666 8.81646 53.7005 9.2559V14.7573H50.9857V5.60317H53.4833V7.42954C53.7873 6.8059 54.1783 6.3159 54.6778 5.98181C55.1556 5.62545 55.6551 5.44726 56.1981 5.42499H56.4804L56.6541 5.44726V7.96408V7.98636ZM57.8486 16.1159C58.2263 16.2505 58.6217 16.3256 59.0214 16.3386C59.3472 16.3386 59.6078 16.2273 59.8033 16.0045C59.977 15.7818 60.129 15.3364 60.2811 14.7573L56.893 5.60317H59.6947L61.7579 12.3518L63.5605 5.60317H66.1015L62.6918 16.2273C62.1569 18.0318 60.3638 19.1157 58.5653 18.7218C58.3481 18.6773 58.0875 18.6104 57.8486 18.4991V16.1159ZM72.5301 14.9133C71.8568 14.9133 71.2487 14.7795 70.7492 14.4677C70.2417 14.1818 69.8208 13.758 69.533 13.2427V14.7573H67.1657V2.01727H69.9022V7.09545C70.4962 6.02938 71.6157 5.38681 72.8124 5.42499C73.3771 5.42499 73.8983 5.53636 74.3761 5.80363C74.8539 6.02636 75.2448 6.38272 75.614 6.8059C76.6831 8.32739 76.974 10.2831 76.3959 12.0623C76.1787 12.6414 75.8746 13.1536 75.5054 13.5768C74.7429 14.4342 73.6616 14.9198 72.5301 14.9133ZM71.7699 12.5745C72.6515 12.5764 73.4369 12.0037 73.7245 11.1491C74.043 10.2518 73.887 9.24956 73.3119 8.49863C72.9724 8.0401 72.4398 7.7753 71.8785 7.7859C71.4659 7.7859 71.0749 7.94181 70.7057 8.23136C70.3582 8.54317 70.0759 8.92181 69.8805 9.38954V11.305C70.2309 12.0628 70.9738 12.5476 71.7916 12.5523L71.7699 12.5745ZM78.0247 2.01727H80.7395V11.4832C80.7395 12.1959 81.0218 12.53 81.6082 12.53C81.9183 12.5309 82.2239 12.4545 82.4987 12.3073L82.8679 14.3786C82.1072 14.7203 81.2875 14.902 80.4572 14.9132C79.6753 14.9132 79.0672 14.6904 78.6546 14.2895C78.2202 13.8441 78.003 13.265 78.003 12.4632V2.01727H78.0247ZM87.9933 14.9132C87.3023 14.9255 86.6157 14.7968 85.9736 14.5345C84.8367 14.0789 83.9437 13.1469 83.5194 11.9732C82.8914 10.2226 83.2408 8.26037 84.4316 6.85045C84.8659 6.40499 85.3437 6.0709 85.9518 5.80363C86.5382 5.55863 87.2115 5.42499 87.9716 5.42499C89.2937 5.36117 90.5776 5.88947 91.49 6.87272C91.9243 7.2959 92.2066 7.80817 92.4238 8.36499C93.0767 10.1133 92.7249 12.0889 91.5117 13.4877C91.099 13.9332 90.5995 14.2895 89.9914 14.5345C89.3493 14.7968 88.6627 14.9255 87.9716 14.9132H87.9933ZM86.017 10.1914C86.017 10.9041 86.1907 11.4832 86.5599 11.9064C86.9509 12.3518 87.4287 12.5745 87.9933 12.5745C88.5382 12.5821 89.0571 12.3364 89.405 11.9064C89.5788 11.6836 89.7091 11.4609 89.8177 11.1491C89.9262 10.8595 89.9697 10.5254 89.9697 10.1914C89.9697 9.45636 89.7742 8.87726 89.405 8.45408C89.0358 8.00863 88.558 7.78589 87.9933 7.78589C87.4498 7.78464 86.9334 8.02909 86.5817 8.45408C86.4079 8.67681 86.2559 8.89954 86.1473 9.21136C86.0387 9.52317 86.017 9.83499 86.017 10.1914ZM100.112 14.7573L97.7882 11.06L96.8326 12.0845V14.7573H94.1178V2.01727H96.8326V9.38954L99.8514 5.60317H102.74L99.5256 9.54545L103.001 14.7573H100.112Z" fill="currentColor"></path>
10
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.71089C0 0.76599 0.76599 0 1.71089 0H17.1089C18.0538 0 18.8198 0.76599 18.8198 1.71089V17.1089C18.8198 18.0538 18.0538 18.8198 17.1089 18.8198H7.13145L4.57616 20.9297C4.24445 21.2036 3.74366 20.9676 3.74366 20.5375V18.8198H1.71089C0.76599 18.8198 0 18.0538 0 17.1089V1.71089ZM3.74233 3.10946H11.9675C13.7438 3.10946 15.1839 4.5495 15.1839 6.32587C15.1839 7.74936 14.2592 8.95687 12.9777 9.38045C14.4761 9.65447 15.6117 10.9667 15.6117 12.5443C15.6117 14.3207 14.1717 15.7607 12.3953 15.7607H3.74247V9.54229H3.74233V3.10946ZM10.583 6.00384H6.73607V7.93369H10.583C11.1159 7.93369 11.5479 7.50168 11.5479 6.96877C11.5479 6.43585 11.1159 6.00384 10.583 6.00384ZM6.73607 10.2925H10.9035C11.4956 10.2925 11.9757 10.7725 11.9757 11.3647C11.9757 11.9568 11.4956 12.4368 10.9035 12.4368H6.73607V10.2925Z" fill="currentColor"></path>
11
+ </svg>
12
+ `;
17
13
 
18
- const storyblokLogoFull = `<svg width="180px" height="38px" viewBox="0 0 251 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
19
- <g id="storyblok-logo-kit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
20
- <g id="storyblok-partner-logo" transform="translate(-59.000000, -105.000000)" fill-rule="nonzero">
21
- <g id="sb-partner-logo" transform="translate(59.000000, 105.000000)">
22
- <path d="M72.9131069,37.088562 C71.0830889,37.088562 69.3053572,36.8267055 67.5276254,36.2506214 C65.8593684,35.7091705 64.3261491,34.816314 63.0310098,33.6320569 L65.3838901,29.6518391 C66.6910458,30.5421508 67.9459152,31.2229776 69.2007847,31.7466906 C70.403368,32.2704033 71.6059512,32.4798885 72.7562482,32.4798885 C73.5928279,32.4798885 74.2725488,32.3227747 74.7431249,32.0085468 C75.2137009,31.7466906 75.4228459,31.2753489 75.4228459,30.6992648 C75.4228459,30.1755518 75.1614147,29.6518391 74.53398,29.3376112 C73.5513119,28.8658917 72.5155832,28.5142261 71.4490925,28.2901855 L67.7890565,27.0856459 C66.7956182,26.6666756 66.0113248,26.2477053 65.3838901,25.7763637 C64.7564553,25.3573933 64.2858793,24.7813092 64.0244481,24.205225 C63.7398624,23.5440587 63.5973455,22.830315 63.6061583,22.1103735 C63.5755508,20.0489068 64.4792085,18.0845869 66.063611,16.7685021 C66.7956182,16.1400466 67.7367703,15.668705 68.7824949,15.302106 C69.8282194,14.935507 70.9785165,14.7783931 72.1810997,14.7783931 C73.8019728,14.7783931 75.3182734,14.9878783 76.7300015,15.4068486 C78.1417297,15.8781902 79.5011716,16.6637595 80.8083274,17.8159279 L78.2463022,21.7437745 C77.2342235,21.0184947 76.1474315,20.403985 75.004556,19.9107794 C74.0111177,19.4918091 73.1222518,19.3346952 72.1810997,19.3346952 C71.5013787,19.3346952 70.873944,19.4394378 70.403368,19.7536655 C69.8805057,20.015522 69.6713608,20.4868636 69.6713608,21.115319 C69.6713608,21.7437745 69.9327919,22.1627448 70.4556542,22.4769725 C70.9785165,22.7912002 72.024241,23.105428 73.4359692,23.472027 C74.7466265,23.802691 76.0382768,24.204803 77.3051501,24.6765666 C78.3508746,25.0955369 79.1874543,25.5668785 79.8671753,26.0382201 C81.1526056,26.9863531 81.8631074,28.528278 81.7494795,30.1231805 C81.7494795,32.2704033 80.965186,33.9462845 79.344313,35.2031954 C77.7757261,36.4601065 75.684277,37.088562 72.9131069,37.088562 Z M98.7947898,35.5697946 C97.905924,35.9363936 96.8601995,36.3029925 95.7099025,36.6172204 C94.5596054,36.931448 93.4093084,37.1409331 92.206725,37.1409331 C91.3701454,37.1409331 90.6381382,37.0361907 89.906131,36.8267055 C89.1944263,36.6188813 88.534979,36.2618433 87.9715407,35.7792798 C87.4486783,35.3603095 87.0303885,34.731854 86.7166711,34.0510272 C86.4029538,33.3178291 86.1938088,32.4275174 86.1938088,31.3800914 L86.1938088,20.1202645 L83.4749251,20.1202645 L83.4749251,15.1973634 L86.2460951,15.1973634 L86.2460951,8.33672469 L92.7295874,8.33672469 L92.7295874,15.1449921 L97.1216305,15.1449921 L97.1216305,20.1202645 L92.7295874,20.1202645 L92.7295874,29.1281261 C92.7295874,29.8089529 92.8864461,30.3326656 93.2524496,30.6992648 C93.6184532,30.9611211 94.0890292,31.1182351 94.6118916,31.1182351 C95.134754,31.1182351 95.6576161,31.0658638 96.1281921,30.8563786 C96.6510545,30.6992648 97.1216305,30.5421508 97.4876341,30.3326656 L98.7425037,35.5697946 L98.7947898,35.5697946 Z M111.029767,37.088562 C109.365992,37.1176567 107.713055,36.8150153 106.167148,36.19825 C103.446225,35.1201312 101.315176,32.9284411 100.311091,30.1755518 C99.2838371,27.4410902 99.2838371,24.4258648 100.311091,21.6914032 C101.315176,18.938514 103.446225,16.7468239 106.167148,15.668705 C107.578876,15.0926209 109.199749,14.7783931 111.029767,14.7783931 C114.212605,14.6283289 117.303553,15.8705417 119.500136,18.1825269 C120.493575,19.1775813 121.225582,20.382121 121.748444,21.6914032 C122.818748,24.4359365 122.818748,27.4833897 121.748444,30.2279232 C120.737974,32.946857 118.631284,35.1140038 115.944673,36.19825 C114.382482,36.8218907 112.711079,37.1246574 111.029767,37.088562 Z M106.324007,25.9858488 C106.324007,27.66173 106.742296,29.0233836 107.631162,30.018438 C108.572315,31.0658638 109.722612,31.5895765 111.082053,31.5895765 C112.395396,31.6149923 113.647896,31.0359748 114.480658,30.018438 C114.898948,29.494725 115.212665,28.9710123 115.474097,28.2378141 C115.735528,27.5569874 115.8401,26.7714181 115.8401,25.9858488 C115.8401,24.2575963 115.369524,22.8959428 114.480658,21.9008883 C113.591792,20.8534626 112.441495,20.3297269 111.082053,20.3297269 C109.773507,20.3267828 108.530154,20.9015714 107.683449,21.9008883 C107.265159,22.4246012 106.899155,22.9483141 106.637724,23.6815121 C106.401978,24.4259172 106.295858,25.2053995 106.324007,25.9858488 Z M139.421189,20.8010913 C137.852602,20.8010913 136.388588,21.0629477 135.081432,21.5866606 C133.930721,21.9752826 132.950942,22.752974 132.310262,23.7862547 L132.310262,36.7219628 L125.774484,36.7219628 L125.774484,15.1973634 L131.7874,15.1973634 L131.7874,19.4918091 C132.519407,18.025413 133.460559,16.8732447 134.663142,16.0876753 C135.813439,15.2497347 137.016023,14.8307644 138.323178,14.7783931 L139.002899,14.7783931 L139.421189,14.8307644 L139.421189,20.74872 L139.421189,20.8010913 Z M142.296932,39.9166114 C143.20622,40.2332226 144.158207,40.4098033 145.120388,40.4403244 C145.904681,40.4403244 146.532116,40.1784679 147.002692,39.6547549 C147.420982,39.1310422 147.786986,38.0836164 148.152989,36.7219628 L139.996338,15.1973634 L146.741261,15.1973634 L151.708453,31.0658638 L156.04821,15.1973634 L162.165698,15.1973634 L153.95676,40.1784679 C152.669117,44.4215044 148.352245,46.9703268 144.022377,46.0440521 C143.499515,45.9393096 142.87208,45.7821958 142.296932,45.5203393 L142.296932,39.9166114 Z M177.642422,37.0888768 C176.021549,37.0888768 174.557535,36.7743342 173.354951,36.041136 C172.133117,35.3688863 171.119985,34.3722266 170.426922,33.1607153 L170.426922,36.7219628 L164.727723,36.7219628 L164.727723,6.76558605 L171.315788,6.76558605 L171.315788,18.7062398 C172.745953,16.1995254 175.441074,14.6886082 178.322143,14.7783931 C179.681585,14.7783931 180.936454,15.0402496 182.086751,15.668705 C183.237048,16.1924179 184.178201,17.0303585 185.067066,18.025413 C187.640848,21.6029896 188.341185,26.201555 186.949371,30.385037 C186.426508,31.7466906 185.694501,32.9512301 184.805635,33.9462845 C182.969765,35.9623126 180.366637,37.1042233 177.642422,37.0888768 Z M175.812404,31.5895988 C177.93482,31.5940555 179.82559,30.247321 180.518164,28.2378141 C181.28484,26.1280819 180.909166,23.7713492 179.524726,22.0056309 C178.707315,20.9274559 177.425216,20.3048211 176.073835,20.3297497 C175.080397,20.3297497 174.139245,20.6963487 173.250379,21.3771755 C172.413799,22.1103735 171.734078,23.0006854 171.263502,24.1004824 L171.263502,28.6044133 C172.107299,30.3862656 173.89579,31.5262481 175.86469,31.5372054 L175.812404,31.5895988 Z M190.870838,6.76558605 L197.406616,6.76558605 L197.406616,29.0233836 C197.406616,30.6992648 198.086337,31.4848341 199.498065,31.4848341 C200.244476,31.4870105 200.98021,31.3072714 201.641801,30.9611211 L202.530666,35.8316509 C200.699408,36.6349957 198.725918,37.0623904 196.726895,37.088562 C194.844591,37.088562 193.380576,36.564849 192.387138,35.6221657 C191.341414,34.57474 190.818551,33.2130866 190.818551,31.3277203 L190.818551,6.76558605 L190.870838,6.76558605 Z M214.870216,37.088562 C213.206441,37.1176567 211.553504,36.8150153 210.007597,36.19825 C207.270596,35.1267709 205.120814,32.9353803 204.099253,30.1755518 C202.587276,26.0594002 203.428464,21.4454016 206.295275,18.1301556 C207.341,17.0827298 208.491297,16.2971605 209.955311,15.668705 C211.367039,15.0926209 212.987912,14.7783931 214.81793,14.7783931 C218.000768,14.6283289 221.091716,15.8705417 223.288299,18.1825269 C224.334024,19.1775813 225.013745,20.382121 225.536607,21.6914032 C227.108274,25.8022039 226.261346,30.4476897 223.340585,33.7367994 C222.347147,34.7842251 221.144564,35.6221657 219.680549,36.19825 C218.134643,36.8150153 216.481705,37.1176567 214.81793,37.088562 L214.870216,37.088562 Z M210.11217,25.9858488 C210.11217,27.66173 210.530459,29.0233836 211.419325,30.018438 C212.360477,31.0658638 213.510774,31.5895765 214.870216,31.5895765 C216.181936,31.6072894 217.43126,31.0297402 218.268821,30.018438 C218.687111,29.494725 219.000828,28.9710123 219.262259,28.2378141 C219.523691,27.5569874 219.628263,26.7714181 219.628263,25.9858488 C219.628263,24.2575963 219.157687,22.8959428 218.268821,21.9008883 C217.379955,20.8534626 216.229658,20.3297269 214.870216,20.3297269 C213.561669,20.3267828 212.318317,20.9015714 211.471611,21.9008883 C211.053322,22.4246012 210.687318,22.9483141 210.425887,23.6815121 C210.164456,24.4147102 210.11217,25.1479082 210.11217,25.9858488 Z M244.045932,36.7219628 L238.451305,28.028329 L236.150711,30.4374083 L236.150711,36.7219628 L229.614933,36.7219628 L229.614933,6.76558605 L236.150711,6.76558605 L236.150711,24.1004824 L243.418497,15.1973634 L250.372565,15.1973634 L242.634204,24.4670814 L251,36.7219628 L244.045932,36.7219628 Z" id="Shape" fill="#FFFFFF"></path>
23
- <g id="storyblok-symbol">
24
- <path d="M2.32662261,0 C1.03405449,0 0,1.0331384 0,2.27290448 L0,42.8752437 C0,44.1150097 1.03405449,44.8898635 2.27491989,44.8898635 L8.27243596,44.8898635 L8.27243596,53 L15.7176283,44.9415205 L42.9132615,44.9415205 C44.1541269,44.9415205 44.9296678,44.1666667 44.9296678,42.8752437 L44.9296678,2.3245614 C44.9296678,1.08479532 44.2058296,0 42.9132615,0 L2.32662261,0 Z" id="Shape-path-Copy" fill="#0AB3AF"></path>
25
- <path d="M29.1016723,8.11483254 C30.1351059,8.11483254 31.0135245,8.32132604 31.8402713,8.78593643 C32.6153465,9.19892344 33.33875,9.76678059 33.9071385,10.4378845 C35.0647615,11.8482391 35.6869248,13.6215753 35.6639755,15.445352 C35.6639755,16.7875598 35.3022738,18.0781442 34.630542,19.3171053 C33.9341248,20.5632996 32.8438147,21.5436614 31.5302412,22.1047676 C33.183735,22.569378 34.4755269,23.395352 35.4572888,24.5826897 C36.387379,25.8216507 36.8524241,27.4219754 36.8524241,29.4352871 C36.8524241,30.7258715 36.6168825,31.8756998 36.1290206,32.7391832 C35.6123039,33.668404 34.8372287,34.4427546 33.9071385,35.0106118 C32.9253766,35.6300923 31.8402713,36.1979494 30.600151,36.4560663 C29.3600307,36.7658066 28.0165671,37.0239234 26.6214318,37.0239234 L8.32965751,37.0239234 L8.32965751,8.11483254 L29.1016723,8.11483254 Z M26.1340815,24.271851 L15.77813,24.271851 L15.77813,29.1552028 L25.8851404,29.1552028 C26.4825991,29.1552028 27.0302696,28.9110352 27.4783637,28.5203671 C27.8766695,28.1296989 28.1256107,27.5436967 28.1256107,26.811194 C28.140051,26.1827412 27.948041,25.5663945 27.5779401,25.0531873 C27.1796343,24.5648522 26.7315403,24.271851 26.1340815,24.271851 Z M25.2876816,14.5051475 L15.77813,14.5051475 L15.77813,18.9001641 L25.0885287,18.9001641 C25.586411,18.9001641 26.0842933,18.6559965 26.4825991,18.3629954 C26.9306932,18.0699943 27.1298461,17.4351586 27.1298461,16.6049888 C27.1298461,15.872486 26.9306932,15.3353173 26.5821756,14.9934827 C26.233658,14.7004816 25.7855639,14.5051475 25.2876816,14.5051475 Z" id="Combined-Shape-Copy-3" fill="#FFFFFF"></path>
26
- </g>
27
- </g>
28
- </g>
29
- </g>
14
+ const storyblokLogoFull = `
15
+ <svg xmlns="http://www.w3.org/2000/svg" width="103" height="22" viewBox="0 0 103 22" fill="none">
16
+ <g id="sb-logo">
17
+ <path id="storyblok-text" d="M29.0285 14.9131C28.2684 14.9131 27.53 14.8018 26.7916 14.5568C26.0986 14.3265 25.4618 13.9468 24.9238 13.4431L25.9011 11.7504C26.4441 12.129 26.9653 12.4186 27.4866 12.6413C27.9861 12.864 28.4856 12.9531 28.9634 12.9531C29.3109 12.9531 29.5932 12.8863 29.7887 12.7527C29.9841 12.6413 30.071 12.4408 30.071 12.1958C30.071 11.9731 29.9624 11.7504 29.7018 11.6168C29.2936 11.4161 28.8634 11.2666 28.4204 11.1713L26.9002 10.659C26.4875 10.4808 26.1618 10.3027 25.9011 10.1022C25.6405 9.92403 25.4451 9.67903 25.3365 9.43403C25.2183 9.15284 25.1591 8.8493 25.1627 8.54312C25.15 7.66641 25.5254 6.83101 26.1835 6.2713C26.4875 6.00403 26.8785 5.80357 27.3128 5.64767C27.7472 5.49176 28.225 5.42494 28.7245 5.42494C29.3978 5.42494 30.0276 5.51403 30.614 5.69221C31.2004 5.89267 31.765 6.22676 32.308 6.71676L31.2438 8.38721C30.8234 8.07876 30.372 7.81742 29.8973 7.60767C29.4846 7.42948 29.1154 7.36267 28.7245 7.36267C28.4422 7.36267 28.1815 7.40721 27.9861 7.54085C27.7689 7.65221 27.682 7.85266 27.682 8.11994C27.682 8.38721 27.7906 8.56539 28.0078 8.69903C28.225 8.83266 28.6593 8.9663 29.2457 9.12221C29.7901 9.26284 30.3266 9.43385 30.8529 9.63448C31.2872 9.81266 31.6347 10.0131 31.9171 10.2136C32.451 10.6168 32.7461 11.2726 32.6989 11.9508C32.6989 12.864 32.3731 13.5768 31.6999 14.1113C31.0483 14.6458 30.1796 14.9131 29.0285 14.9131ZM39.779 14.2672C39.4098 14.4231 38.9754 14.579 38.4976 14.7127C38.0198 14.8463 37.542 14.9354 37.0425 14.9354C36.695 14.9354 36.391 14.8908 36.0869 14.8018C35.7913 14.7134 35.5174 14.5615 35.2834 14.3563C35.0662 14.1781 34.8924 13.9108 34.7621 13.6213C34.6318 13.3095 34.5449 12.9308 34.5449 12.4854V7.69676H33.4156V5.60312H34.5667V2.68539H37.2597V5.58085H39.084V7.69676H37.2597V11.5277C37.2597 11.8172 37.3249 12.0399 37.4769 12.1958C37.6289 12.3072 37.8244 12.374 38.0416 12.374C38.2587 12.374 38.4759 12.3518 38.6714 12.2627C38.8886 12.1958 39.084 12.129 39.2361 12.0399L39.7573 14.2672H39.779ZM44.861 14.9131C44.17 14.9255 43.4834 14.7968 42.8413 14.5345C41.7111 14.076 40.8259 13.1439 40.4088 11.9731C39.9821 10.8102 39.9821 9.52786 40.4088 8.36494C40.8259 7.19418 41.7111 6.26208 42.8413 5.80357C43.4276 5.55857 44.1009 5.42494 44.861 5.42494C46.1831 5.36112 47.467 5.88941 48.3794 6.87267C48.792 7.29585 49.0961 7.80812 49.3132 8.36494C49.7578 9.53215 49.7578 10.8282 49.3132 11.9954C48.8935 13.1517 48.0185 14.0734 46.9025 14.5345C46.2537 14.7997 45.5594 14.9285 44.861 14.9131ZM42.9064 10.1913C42.9064 10.904 43.0802 11.4831 43.4494 11.9063C43.8403 12.3518 44.3181 12.5745 44.8828 12.5745C45.4283 12.5853 45.9485 12.339 46.2944 11.9063C46.4682 11.6836 46.5985 11.4608 46.7071 11.149C46.8157 10.8595 46.8591 10.5254 46.8591 10.1913C46.8591 9.4563 46.6636 8.87721 46.2944 8.45403C45.9252 8.00857 45.4474 7.78584 44.8828 7.78584C44.3392 7.78459 43.8228 8.02903 43.4711 8.45403C43.2973 8.67676 43.1453 8.89948 43.0367 9.2113C42.9388 9.52789 42.8947 9.85939 42.9064 10.1913ZM56.654 7.9863C56.0024 7.9863 55.3943 8.09767 54.8514 8.32039C54.3734 8.48567 53.9664 8.81641 53.7003 9.25585V14.7572H50.9855V5.60312H53.4831V7.42948C53.7872 6.80585 54.1781 6.31585 54.6776 5.98176C55.1554 5.62539 55.6549 5.44721 56.1979 5.42494H56.4802L56.654 5.44721V7.96403V7.9863ZM57.8485 16.1158C58.2262 16.2505 58.6216 16.3256 59.0212 16.3386C59.347 16.3386 59.6076 16.2272 59.8031 16.0045C59.9768 15.7818 60.1289 15.3363 60.2809 14.7572L56.8929 5.60312H59.6945L61.7577 12.3518L63.5603 5.60312H66.1013L62.6916 16.2272C62.1567 18.0317 60.3636 19.1157 58.5652 18.7218C58.348 18.6772 58.0874 18.6104 57.8485 18.499V16.1158ZM72.5299 14.9133C71.8566 14.9133 71.2485 14.7795 70.749 14.4677C70.2415 14.1818 69.8207 13.7579 69.5328 13.2427V14.7572H67.1655V2.01721H69.902V7.09539C70.496 6.02932 71.6155 5.38675 72.8122 5.42494C73.3769 5.42494 73.8981 5.5363 74.3759 5.80357C74.8537 6.0263 75.2446 6.38267 75.6139 6.80585C76.6829 8.32734 76.9738 10.283 76.3957 12.0622C76.1785 12.6413 75.8745 13.1536 75.5053 13.5768C74.7427 14.4341 73.6614 14.9198 72.5299 14.9133ZM71.7698 12.5745C72.6513 12.5764 73.4367 12.0036 73.7244 11.149C74.0428 10.2518 73.8868 9.24951 73.3117 8.49857C72.9722 8.04004 72.4397 7.77525 71.8783 7.78585C71.4657 7.78585 71.0748 7.94176 70.7056 8.2313C70.3581 8.54312 70.0757 8.92176 69.8803 9.38948V11.3049C70.2308 12.0627 70.9737 12.5475 71.7915 12.5522L71.7698 12.5745ZM78.0246 2.01721H80.7393V11.4831C80.7393 12.1958 81.0217 12.5299 81.6081 12.5299C81.9181 12.5309 82.2237 12.4544 82.4985 12.3072L82.8677 14.3786C82.1071 14.7202 81.2873 14.902 80.457 14.9131C79.6751 14.9131 79.067 14.6904 78.6544 14.2895C78.22 13.844 78.0028 13.2649 78.0028 12.4631V2.01721H78.0246ZM87.9932 14.9131C87.3021 14.9255 86.6155 14.7968 85.9734 14.5345C84.8365 14.0788 83.9436 13.1468 83.5192 11.9731C82.8912 10.2226 83.2406 8.26032 84.4314 6.85039C84.8658 6.40494 85.3436 6.07085 85.9517 5.80357C86.5381 5.55857 87.2113 5.42494 87.9715 5.42494C89.2935 5.36112 90.5774 5.88941 91.4898 6.87267C91.9241 7.29585 92.2065 7.80812 92.4237 8.36494C93.0765 10.1132 92.7247 12.0889 91.5115 13.4877C91.0989 13.9331 90.5993 14.2895 89.9912 14.5345C89.3491 14.7968 88.6625 14.9255 87.9715 14.9131H87.9932ZM86.0168 10.1913C86.0168 10.904 86.1906 11.4831 86.5598 11.9063C86.9507 12.3518 87.4285 12.5745 87.9932 12.5745C88.538 12.582 89.0569 12.3364 89.4048 11.9063C89.5786 11.6836 89.7089 11.4608 89.8175 11.149C89.9261 10.8595 89.9695 10.5254 89.9695 10.1913C89.9695 9.4563 89.774 8.87721 89.4048 8.45403C89.0356 8.00857 88.5578 7.78584 87.9932 7.78584C87.4496 7.78459 86.9332 8.02903 86.5815 8.45403C86.4077 8.67676 86.2557 8.89948 86.1471 9.2113C86.0385 9.52312 86.0168 9.83494 86.0168 10.1913ZM100.112 14.7572L97.788 11.0599L96.8324 12.0845V14.7572H94.1177V2.01721H96.8324V9.38948L99.8512 5.60312H102.74L99.5255 9.54539L103 14.7572H100.112Z" fill="#FFFFFF" />
18
+ <path id="b-shape" fill-rule="evenodd" clip-rule="evenodd" d="M0 1.71089C0 0.76599 0.76599 0 1.71089 0H17.1089C18.0538 0 18.8198 0.76599 18.8198 1.71089V17.1089C18.8198 18.0538 18.0538 18.8198 17.1089 18.8198H7.13145L4.57616 20.9297C4.24445 21.2036 3.74366 20.9676 3.74366 20.5375V18.8198H1.71089C0.76599 18.8198 0 18.0538 0 17.1089V1.71089ZM3.74233 3.10946H11.9675C13.7438 3.10946 15.1839 4.5495 15.1839 6.32587C15.1839 7.74936 14.2592 8.95687 12.9777 9.38045C14.4761 9.65447 15.6117 10.9667 15.6117 12.5443C15.6117 14.3207 14.1717 15.7607 12.3953 15.7607H3.74247V9.54229H3.74233V3.10946ZM10.583 6.00384H6.73607V7.93369H10.583C11.1159 7.93369 11.5479 7.50168 11.5479 6.96877C11.5479 6.43585 11.1159 6.00384 10.583 6.00384ZM6.73607 10.2925H10.9035C11.4956 10.2925 11.9757 10.7725 11.9757 11.3647C11.9757 11.9568 11.4956 12.4368 10.9035 12.4368H6.73607V10.2925Z" fill="#FFFFFF" />
19
+ </g>
30
20
  </svg>`;
31
21
 
32
22
  function createWindowElement(content: string) {
@@ -44,9 +34,9 @@ interface LinkItem {
44
34
  const links: LinkItem[] = [
45
35
  {
46
36
  icon: 'star',
47
- name: 'Ultimate Tutorial',
37
+ name: 'Astro Tutorial',
48
38
  description: 'Practical step-by-step guide.',
49
- link: 'https://www.storyblok.com/tp/the-storyblok-astro-ultimate-tutorial',
39
+ link: 'https://www.storyblok.com/docs/guides/astro/',
50
40
  },
51
41
  {
52
42
  icon: 'lightbulb',
@@ -56,9 +46,9 @@ const links: LinkItem[] = [
56
46
  },
57
47
  {
58
48
  icon: 'file-search',
59
- name: 'API Docs',
60
- description: 'Storyblok\'s Content Delivery and Management APIs.',
61
- link: 'https://www.storyblok.com/docs#api-documentations',
49
+ name: 'Storyblok Docs',
50
+ description: 'Find your way through Storyblok\'s documentation.',
51
+ link: 'https://www.storyblok.com/docs',
62
52
  },
63
53
  {
64
54
  icon: 'astro:logo',
@@ -76,7 +66,7 @@ const links: LinkItem[] = [
76
66
  icon: 'bug',
77
67
  name: 'Report a Bug',
78
68
  description: 'Help us make @storyblok/astro even better.',
79
- link: 'https://github.com/withastro/astro/issues/new/choose',
69
+ link: 'https://github.com/storyblok/monoblok/issues',
80
70
  },
81
71
  ];
82
72
  function createCanvas() {
@@ -146,8 +136,8 @@ function createCanvas() {
146
136
  </a>
147
137
  <a href="https://github.com/storyblok/storyblok-astro" target="_blank">
148
138
  <img
149
- src="https://img.shields.io/npm/v/@storyblok/astro?color=40C6C4&label=Astro&labelColor=1B243F&logo=storyblok"
150
- alt="Storyblok Astro Version v.3.0.1."
139
+ src="https://img.shields.io/npm/v/@storyblok/astro?color=FFFFFF&label=Astro&labelColor=1B243F&logo=storyblok&logoColor=FFFFFF"
140
+ alt="Storyblok Astro Version v.7.2.5"
151
141
  />
152
142
  </a>
153
143
  </header>
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ /// <reference path="./public.d.ts" />
1
2
  import { default as storyblokIntegration } from './lib/storyblok-integration';
2
3
  export { getLiveStory, useStoryblokApi } from './lib/helpers';
4
+ export type { IntegrationOptions } from './lib/storyblok-integration';
3
5
  export { handleStoryblokMessage } from './live-preview/handleStoryblokMessage';
4
6
  export * from './types';
5
7
  export { toCamelCase } from './utils/toCamelCase';
6
8
  export { loadStoryblokBridge, renderRichText, richTextResolver, storyblokEditable, } from '@storyblok/js';
7
9
  export { storyblokIntegration as storyblok };
10
+ export { apiPlugin, storyblokInit } from '@storyblok/js';
@@ -0,0 +1,2 @@
1
+ export { richTextToHTML } from './richTextToHTML';
2
+ export { storyblokApiInstance as storyblokApi } from 'virtual:storyblok-init';
@@ -0,0 +1,3 @@
1
+ export { richTextToHTML } from './richTextToHTML';
2
+
3
+ export { storyblokApiInstance as storyblokApi } from 'virtual:storyblok-init';
@@ -1,7 +1,39 @@
1
1
  import { ISbStoryData, StoryblokBridgeConfigV2, StoryblokClient } from '../types';
2
2
  import { AstroGlobal } from 'astro';
3
+ /**
4
+ * Returns the Storyblok API client instance.
5
+ *
6
+ * This function gives you access to the `StoryblokClient` that is initialized
7
+ * when setting up the Storyblok SDK in your Astro configuration.
8
+ *
9
+ * @throws {Error} If the `storyblokApiInstance` has not been initialized in Astro config.
10
+ * @returns {StoryblokClient} The initialized Storyblok API client instance.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // In an Astro route or integration code:
15
+ * const storyblokApi = useStoryblokApi();
16
+ * const { data } = await storyblokApi.get('cdn/stories/home');
17
+ * ```
18
+ */
3
19
  export declare function useStoryblokApi(): StoryblokClient;
4
- export declare function getLiveStory(Astro: Readonly<AstroGlobal>): Promise<ISbStoryData<import('storyblok-js-client').ISbComponentType<string> & {
5
- [index: string]: any;
6
- }> | null>;
20
+ /**
21
+ * Retrieves the live Storyblok story from Astro's `locals` during preview mode.
22
+ *
23
+ * This function is primarily useful when working with the Storyblok Visual Editor
24
+ * and live preview updates in an Astro project.
25
+ *
26
+ * @param {Readonly<AstroGlobal>} Astro - The Astro global object.
27
+ * @returns {Promise<ISbStoryData | null>} The Storyblok story data if available,
28
+ * otherwise `null`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const story = await getLiveStory(Astro);
33
+ * if (story) {
34
+ * console.log('Previewing story:', story.name);
35
+ * }
36
+ * ```
37
+ */
38
+ export declare function getLiveStory(Astro: Readonly<AstroGlobal>): Promise<ISbStoryData | null>;
7
39
  export declare function initStoryblokBridge(config: boolean | StoryblokBridgeConfigV2): string;
@@ -0,0 +1,27 @@
1
+ import { StoryblokRichTextNode, StoryblokRichTextResolvers } from '@storyblok/js';
2
+ /**
3
+ * @experimental Converts a Storyblok RichText field into an HTML string.
4
+ *
5
+ * This API is still under development and may change in future releases.
6
+ * It also relies on Astro’s experimental
7
+ * [experimental_AstroContainer](https://docs.astro.build/en/reference/container-reference/) feature.
8
+ *
9
+ * @async
10
+ * @param {StoryblokRichTextNode} richTextField - The root RichText node to convert.
11
+ * @param {StoryblokRichTextResolvers} [customResolvers] - Optional custom resolvers
12
+ * for customizing how specific nodes or marks are transformed into HTML.
13
+ * @returns {Promise<string>} A promise that resolves to the HTML string representation
14
+ * of the provided RichText content.
15
+ *
16
+ * @example
17
+ * ```astro
18
+ * ---
19
+ * import { richTextToHTML } from '@storyblok/astro/client';
20
+ * const { blok } = Astro.props;
21
+ * const renderedRichText = await richTextToHTML(blok.text);
22
+ * ---
23
+ *
24
+ * <div set:html={renderedRichText} />
25
+ * ```
26
+ */
27
+ export declare const richTextToHTML: (richTextField: StoryblokRichTextNode, customResolvers?: StoryblokRichTextResolvers) => Promise<string>;
@@ -0,0 +1,103 @@
1
+ import {
2
+ richTextResolver,
3
+ type StoryblokRichTextNode,
4
+ type StoryblokRichTextResolvers,
5
+ } from '@storyblok/js';
6
+ import { experimental_AstroContainer } from 'astro/container';
7
+ import StoryblokComponent from '@storyblok/astro/StoryblokComponent.astro';
8
+
9
+ // Lazily initialized Astro container (for rendering blok components)
10
+ let container: null | experimental_AstroContainer = null;
11
+
12
+ /**
13
+ * @experimental Converts a Storyblok RichText field into an HTML string.
14
+ *
15
+ * This API is still under development and may change in future releases.
16
+ * It also relies on Astro’s experimental
17
+ * [experimental_AstroContainer](https://docs.astro.build/en/reference/container-reference/) feature.
18
+ *
19
+ * @async
20
+ * @param {StoryblokRichTextNode} richTextField - The root RichText node to convert.
21
+ * @param {StoryblokRichTextResolvers} [customResolvers] - Optional custom resolvers
22
+ * for customizing how specific nodes or marks are transformed into HTML.
23
+ * @returns {Promise<string>} A promise that resolves to the HTML string representation
24
+ * of the provided RichText content.
25
+ *
26
+ * @example
27
+ * ```astro
28
+ * ---
29
+ * import { richTextToHTML } from '@storyblok/astro/client';
30
+ * const { blok } = Astro.props;
31
+ * const renderedRichText = await richTextToHTML(blok.text);
32
+ * ---
33
+ *
34
+ * <div set:html={renderedRichText} />
35
+ * ```
36
+ */
37
+ export const richTextToHTML = async (
38
+ richTextField: StoryblokRichTextNode,
39
+ customResolvers?: StoryblokRichTextResolvers,
40
+ ): Promise<string> => {
41
+ // Create Astro container only once
42
+ if (!container) {
43
+ container = await experimental_AstroContainer.create();
44
+ }
45
+
46
+ // Collect async render results keyed by placeholder ID
47
+ const asyncReplacements: Promise<{ id: string; result: string }>[] = [];
48
+ // Build the resolvers object
49
+ const resolvers: StoryblokRichTextResolvers = {
50
+ // Handle async components
51
+ blok: (node) => {
52
+ const componentBody = node.attrs?.body;
53
+ if (!Array.isArray(componentBody)) {
54
+ return '';
55
+ }
56
+
57
+ return componentBody
58
+ .map((blok) => {
59
+ if (!blok || typeof blok !== 'object' || !container) {
60
+ return '';
61
+ }
62
+
63
+ // Generate unique placeholder ID
64
+ const id = crypto.randomUUID();
65
+ const placeholder = `<!--ASYNC-${id}-->`;
66
+
67
+ // Queue async render
68
+ const promise = container
69
+ .renderToString(StoryblokComponent, {
70
+ props: { blok },
71
+ })
72
+ .then(result => ({ id, result }))
73
+ .catch((err) => {
74
+ console.error('Component rendering failed:', err);
75
+ return { id, result: '<!-- Component render error -->' };
76
+ });
77
+
78
+ asyncReplacements.push(promise);
79
+ return placeholder;
80
+ })
81
+ .join('\n');
82
+ },
83
+
84
+ // Add custom resolvers if provided
85
+ ...customResolvers,
86
+ };
87
+
88
+ const resolver = richTextResolver({ resolvers });
89
+
90
+ let html = resolver.render(richTextField);
91
+ // Wait for all async renders
92
+ const results = await Promise.all(asyncReplacements);
93
+ const replacements = new Map(
94
+ results.map(({ id, result }) => [id, result ?? '']),
95
+ );
96
+
97
+ // Single-pass replacement using regex
98
+ html = html.replace(/<!--ASYNC-([\w-]+)-->/g, (_, id: string) => {
99
+ return replacements.get(id) ?? '';
100
+ });
101
+
102
+ return html;
103
+ };
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Public type declarations bundled with the Storyblok Astro SDK.
3
+ * Provides IntelliSense, JSDoc, and type safety for SDK consumers.
4
+ */
5
+
6
+ declare module '@storyblok/astro/StoryblokComponent.astro' {
7
+ import type { SbBlokData } from '@storyblok/astro';
8
+
9
+ function StoryblokComponent(
10
+ _props: Record<string, unknown> & {
11
+ /** The Storyblok blok data for this component (required) */
12
+ blok: SbBlokData;
13
+ }
14
+ ): any;
15
+
16
+ /** Renders a dynamic Storyblok component */
17
+ export default StoryblokComponent;
18
+ }
19
+ declare module '@storyblok/astro/client' {
20
+ import type {
21
+ StoryblokClient,
22
+ StoryblokRichTextNode,
23
+ StoryblokRichTextResolvers,
24
+ } from '@storyblok/astro';
25
+ /**
26
+ * @experimental Converts a Storyblok RichText field into an HTML string.
27
+ *
28
+ * This API is still under development and may change in future releases.
29
+ * It also relies on Astro’s experimental
30
+ * [experimental_AstroContainer](https://docs.astro.build/en/reference/container-reference/) feature.
31
+ *
32
+ * @async
33
+ * @param {StoryblokRichTextNode} richTextField - The root RichText node to convert.
34
+ * @param {StoryblokRichTextResolvers} [customResolvers] - Optional custom resolvers
35
+ * for customizing how specific nodes or marks are transformed into HTML.
36
+ * @returns {Promise<string>} A promise that resolves to the HTML string representation
37
+ * of the provided RichText content.
38
+ *
39
+ * @example
40
+ * ```astro
41
+ * ---
42
+ * import { richTextToHTML } from '@storyblok/astro/client';
43
+ * const { blok } = Astro.props;
44
+ * const renderedRichText = await richTextToHTML(blok.text);
45
+ * ---
46
+ *
47
+ * <div set:html={renderedRichText} />
48
+ * ```
49
+ */
50
+ export function richTextToHTML(
51
+ richTextField: StoryblokRichTextNode,
52
+ customResolvers?: StoryblokRichTextResolvers
53
+ ): Promise<string>;
54
+
55
+ /**
56
+ * Provides direct access to the initialized Storyblok API client instance.
57
+ *
58
+ * This is useful when you need to call the Storyblok CDN API directly,
59
+ * for example inside an Astro API route, integration, or page code.
60
+ *
61
+ * @returns {StoryblokClient} The initialized Storyblok API client instance.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { storyblokApi } from '@storyblok/astro/client';
66
+ *
67
+ * const { data } = await storyblokApi.get('cdn/stories/home');
68
+ * ```
69
+ */
70
+ export const storyblokApi: StoryblokClient;
71
+ }