@storyblok/react 6.1.10 → 7.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.
@@ -1,33 +0,0 @@
1
- import t from "react";
2
- import { ComponentBlok as l, richTextResolver as p } from "@storyblok/js";
3
- function d(o, {
4
- isServerContext: n = !1
5
- } = {}) {
6
- return function(r) {
7
- const { tiptapExtensions: c, ...i } = r, s = {
8
- ...n ? r : {},
9
- renderFn: t.createElement,
10
- textFn: (e) => t.createElement(t.Fragment, {
11
- key: Math.random().toString(36).substring(2, 15)
12
- }, e),
13
- keyedResolvers: !0,
14
- ...n ? {} : i,
15
- tiptapExtensions: {
16
- blok: l.configure({
17
- renderComponent: (e, a) => {
18
- const m = a || (n ? `fallback-key-${JSON.stringify(e)}` : void 0);
19
- return t.createElement(o, {
20
- blok: e,
21
- key: m
22
- });
23
- }
24
- }),
25
- ...c
26
- }
27
- };
28
- return p(s);
29
- };
30
- }
31
- export {
32
- d as createRichTextHook
33
- };
@@ -1 +0,0 @@
1
- "use strict";const c=require("react/jsx-runtime"),i=require("react"),u=require("../utils.js"),l=require("./richtext.js"),x=i.forwardRef(({doc:t,tiptapExtensions:e},r)=>{if(!t)return null;const{render:n}=l.useStoryblokServerRichText({tiptapExtensions:e}),s=n(t),o=u.convertAttributesInElement(s);return c.jsx("div",{ref:r,children:o})});module.exports=x;
@@ -1,17 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { convertAttributesInElement as l } from "../utils.mjs";
4
- import { useStoryblokServerRichText as s } from "./richtext.mjs";
5
- const a = f(
6
- ({ doc: r, tiptapExtensions: t }, o) => {
7
- if (!r)
8
- return null;
9
- const { render: e } = s({
10
- tiptapExtensions: t
11
- }), m = e(r), n = l(m);
12
- return /* @__PURE__ */ i("div", { ref: o, children: n });
13
- }
14
- );
15
- export {
16
- a as default
17
- };