@storyblok/astro 7.3.9 → 8.0.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/index.d.ts CHANGED
@@ -5,6 +5,6 @@ export type { IntegrationOptions } from './lib/storyblok-integration';
5
5
  export { handleStoryblokMessage } from './live-preview/handleStoryblokMessage';
6
6
  export * from './types';
7
7
  export { toCamelCase } from './utils/toCamelCase';
8
- export { loadStoryblokBridge, renderRichText, richTextResolver, storyblokEditable, } from '@storyblok/js';
8
+ export { loadStoryblokBridge, renderRichText, richTextResolver, segmentStoryblokRichText, storyblokEditable, } from '@storyblok/js';
9
9
  export { storyblokIntegration as storyblok };
10
10
  export { apiPlugin, storyblokInit } from '@storyblok/js';
@@ -1,2 +1 @@
1
- export { richTextToHTML } from './richTextToHTML';
2
1
  export { storyblokApiInstance as storyblokApi } from 'virtual:storyblok-init';
@@ -1,3 +1 @@
1
- export { richTextToHTML } from './richTextToHTML';
2
-
3
1
  export { storyblokApiInstance as storyblokApi } from 'virtual:storyblok-init';
@@ -1,15 +1,15 @@
1
- import { StoryblokRichTextNode, StoryblokRichTextResolvers } from '@storyblok/js';
1
+ import { StoryblokRichTextNode, StoryblokRichTextOptions } from '@storyblok/js';
2
2
  /**
3
3
  * @experimental Converts a Storyblok RichText field into an HTML string.
4
4
  *
5
5
  * This API is still under development and may change in future releases.
6
- * It also relies on Astros experimental
6
+ * It also relies on Astro's experimental
7
7
  * [experimental_AstroContainer](https://docs.astro.build/en/reference/container-reference/) feature.
8
8
  *
9
9
  * @async
10
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.
11
+ * @param {StoryblokRichTextOptions['tiptapExtensions']} [tiptapExtensions] - Optional custom
12
+ * tiptap extensions for customizing how specific nodes or marks are rendered.
13
13
  * @returns {Promise<string>} A promise that resolves to the HTML string representation
14
14
  * of the provided RichText content.
15
15
  *
@@ -24,4 +24,4 @@ import { StoryblokRichTextNode, StoryblokRichTextResolvers } from '@storyblok/js
24
24
  * <div set:html={renderedRichText} />
25
25
  * ```
26
26
  */
27
- export declare const richTextToHTML: (richTextField: StoryblokRichTextNode, customResolvers?: StoryblokRichTextResolvers) => Promise<string>;
27
+ export declare const richTextToHTML: (richTextField: StoryblokRichTextNode, tiptapExtensions?: StoryblokRichTextOptions["tiptapExtensions"]) => Promise<string>;
package/dist/public.d.ts CHANGED
@@ -17,40 +17,7 @@ declare module '@storyblok/astro/StoryblokComponent.astro' {
17
17
  export default StoryblokComponent;
18
18
  }
19
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>;
20
+ import type { StoryblokClient } from '@storyblok/astro';
54
21
 
55
22
  /**
56
23
  * Provides direct access to the initialized Storyblok API client instance.