@chaibuilder/sdk 2.2.0 → 2.2.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.
- package/dist/render.cjs +2 -2
- package/dist/render.d.ts +2 -0
- package/dist/render.js +119 -125
- package/package.json +3 -3
package/dist/render.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./chai-theme-helpers-BjWE6otR.cjs"),n=require("lodash-es"),$=require("@mhsdesign/jit-browser-tailwindcss"),R=require("@tailwindcss/aspect-ratio"),O=require("@tailwindcss/container-queries"),F=require("@tailwindcss/forms"),L=require("@tailwindcss/typography"),C=require("./plugin-BiiuylVf.cjs"),u=require("react/jsx-runtime"),E=require("@chaibuilder/runtime"),f=require("react"),M=require("tailwind-merge"),m=require("./getSplitClasses-DodqA_KW.cjs"),N=e=>{if(!e)return[];try{return JSON.parse(A(e)).filter(t=>!t._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function A(e){const i=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(i,t=>{const s=decodeURIComponent(t),a=s.indexOf("public");return a!==-1?s.substring(a+6):s})}async function I(e,i,t=[],s="",a){return await $.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:t,theme:{extend:C.getChaiBuilderTheme(e)},plugins:[F,L,R,O,C.chaiBuilderPlugin],corePlugins:{preflight:a},...s?{prefix:`${s}`}:{}}}).generateStylesFromContent(` ${a?"@tailwind base;":""}
|
|
2
2
|
@tailwind components;
|
|
3
|
-
@tailwind utilities;`,i)}const
|
|
3
|
+
@tailwind utilities;`,i)}const J=(e,i,t)=>{const s=JSON.stringify(e).replace(/#styles:([^"]*)/g,(a,c)=>`#styles:${c.replace(/,/g," ")}`.replace(/#styles:/g,""));return I(i,[s],[],"",t)},V=async(e,i=p.defaultThemeOptions,t=!1)=>await J(e,i,t);async function Y(e){const i=await e.dataProvider({pageProps:e.pageProps,block:e.block,lang:e.lang,draft:e.draft,inBuilder:e.inBuilder});return n.has(i,"$metadata")&&e.dataProviderMetadataCallback(e.block,i.$metadata),u.jsx(f.Suspense,{children:f.createElement(e.component,{...n.omit(e.props,["dataProvider","dataProviderMetadataCallback"]),...n.omit(i,"$metadata"),key:`${e.block._id}-async`})})}const K=n.memoize(e=>{const{baseClasses:i,classes:t}=m.getSplitChaiClasses(e);return M.twMerge(i,t).replace(m.STYLES_KEY,"").trim()}),P=(e,i)=>{const t=n.cloneDeep(e);return n.forEach(n.keys(t),s=>{if(n.isString(t[s])){let a=t[s];const c=/\{\{(.*?)\}\}/g,l=a.match(c);l&&l.forEach(o=>{const d=o.slice(2,-2),h=n.get(i,d,o);a=a.replace(o,h)}),t[s]=a}n.isObject(t[s])&&(t[s]=P(t[s],i))}),t};function z(e,i){const t=n.get(e,`${i}_attrs`,{}),s=n.keys(t).join(" ");return n.includes(s,"x-show")&&!n.includes(s,"x-transition")&&(t["x-transition"]=""),t}function U(e){const i={};return Object.keys(e).forEach(t=>{if(n.isString(e[t])&&e[t].startsWith(m.STYLES_KEY)){const s=K(e[t]);i[t]={className:s,...z(e,t)}}}),i}function W(e,i,t){if(n.isEmpty(i))return e;const s=n.cloneDeep(e),a=n.get(t,"i18nProps",[]);return n.forEach(n.keys(s),c=>{a.includes(c)&&!n.isEmpty(i)&&(s[c]=n.get(s,`${c}-${i}`,s[c]))}),s}const D=n.memoize(e=>{const i=E.getRegisteredChaiBlock(e),t=n.get(i,"schema.properties",{});return Object.fromEntries(Object.entries(t).filter(([,s])=>n.get(s,"runtime",!1)))}),H=(e,i,t)=>n.isEmpty(t)?{}:Object.entries(t).reduce((s,[a,c])=>{const l=[];let o=n.find(e,{_id:i});for(;o;)l.push(o),o=n.find(e,{_id:o._parent});const d=n.find(l,{_type:c.block});return d&&(s[a]=n.get(d,n.get(c,"prop"),null)),s},{}),G=()=>u.jsx("span",{children:"Loading..."});function Q(e){if(n.has(e,"metadata")&&console.warn(" metadata is deprecated and will be removed in upcoming version, use forwardProps instead"),n.isEmpty(e.lang)&&!n.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");const i=e.lang??"en",t=e.fallbackLang??i;return u.jsx(T,{...e,lang:i,fallbackLang:t})}function T({blocks:e,parent:i,externalData:t={},lang:s="en",fallbackLang:a="en",pageProps:c={},dataProviderMetadataCallback:l=()=>{},draft:o=!1}){const d=e,h=r=>U(r),b=i?n.filter(e,{_parent:i}):n.filter(e,r=>n.isEmpty(r._parent));return n.uniqBy(b,"_id").map((r,k)=>{const S={},j=n.filter(d,{_parent:r._id});S.children=j.length>0?u.jsx(T,{externalData:t,parent:r._id,blocks:d,lang:s,fallbackLang:a,pageProps:c,dataProviderMetadataCallback:l,draft:o},`${r._id}-children`):null;const g=E.getRegisteredChaiBlock(r._type);if(g!==null){let y=r;const w=g.component;y={...g.defaults,...r};const x=s===a?"":s,v=H(d,r._id,D(r._type)),_=P(W(r,x,g),t),B=n.omit({...y,..._,...h(_),...S,...v,index:k,lang:s,key:r._id,draft:o,pageProps:c,blockProps:{},inBuilder:!1},["_parent"]);if(n.has(g,"dataProvider")){const q=n.get(g,"suspenseFallback",G);return u.jsx(f.Suspense,{fallback:f.createElement(q),children:u.jsx(Y,{inBuilder:!1,dataProviderMetadataCallback:l,lang:s,pageProps:c,dataProvider:g.dataProvider,block:r,component:w,props:B,draft:o},`${r._id}-async`)},`${r._id}-suspense`)}return u.jsx(f.Suspense,{children:f.createElement(w,B)},`${r._id}-suspense`)}return u.jsxs("noscript",{children:[r._type," not found"]},`${r._id}-noscript`)})}exports.getChaiThemeCssVariables=p.getChaiThemeCssVariables;exports.getThemeFontsCSSImport=p.getThemeFontsCSSImport;exports.getThemeFontsLinkMarkup=p.getThemeFontsLinkMarkup;exports.RenderChaiBlocks=Q;exports.convertToBlocks=N;exports.getStylesForBlocks=V;
|
package/dist/render.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChaiFontViaUrl } from '@chaibuilder/runtime';
|
|
2
|
+
import { ChaiPageProps } from '@chaibuilder/runtime';
|
|
2
3
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
declare type BorderRadiusValue = false | string;
|
|
@@ -59,6 +60,7 @@ declare type RenderChaiBlocksProps = {
|
|
|
59
60
|
lang?: string;
|
|
60
61
|
fallbackLang?: string;
|
|
61
62
|
forwardProps?: Record<string, any>;
|
|
63
|
+
pageProps?: ChaiPageProps;
|
|
62
64
|
draft?: boolean;
|
|
63
65
|
dataProviderMetadataCallback?: (block: ChaiBlock, meta: Record<string, any>) => void;
|
|
64
66
|
metadata?: Record<string, any>;
|
package/dist/render.js
CHANGED
|
@@ -1,211 +1,205 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { a as
|
|
3
|
-
import { has as S, omit as _, memoize as x, get as
|
|
4
|
-
import { createTailwindcss as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { g as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { getRegisteredChaiBlock as
|
|
12
|
-
import
|
|
13
|
-
import { twMerge as
|
|
14
|
-
import { g as
|
|
15
|
-
const
|
|
1
|
+
import { d as q } from "./chai-theme-helpers-FO9vdd-R.js";
|
|
2
|
+
import { a as Re, b as je, c as Fe } from "./chai-theme-helpers-FO9vdd-R.js";
|
|
3
|
+
import { has as S, omit as _, memoize as x, get as c, isEmpty as m, filter as g, uniqBy as K, cloneDeep as E, forEach as O, keys as y, isString as T, isObject as U, find as h, includes as v } from "lodash-es";
|
|
4
|
+
import { createTailwindcss as W } from "@mhsdesign/jit-browser-tailwindcss";
|
|
5
|
+
import Y from "@tailwindcss/aspect-ratio";
|
|
6
|
+
import z from "@tailwindcss/container-queries";
|
|
7
|
+
import D from "@tailwindcss/forms";
|
|
8
|
+
import G from "@tailwindcss/typography";
|
|
9
|
+
import { g as H, c as Q } from "./plugin-B09c0d5S.js";
|
|
10
|
+
import { jsx as f, jsxs as X } from "react/jsx-runtime";
|
|
11
|
+
import { getRegisteredChaiBlock as k } from "@chaibuilder/runtime";
|
|
12
|
+
import R, { Suspense as w, createElement as Z } from "react";
|
|
13
|
+
import { twMerge as ee } from "tailwind-merge";
|
|
14
|
+
import { g as te, S as j } from "./getSplitClasses-DphwgQiE.js";
|
|
15
|
+
const xe = (e) => {
|
|
16
16
|
if (!e) return [];
|
|
17
17
|
try {
|
|
18
|
-
return JSON.parse(
|
|
18
|
+
return JSON.parse(ne(e)).filter((t) => !t._type.startsWith("@chai"));
|
|
19
19
|
} catch {
|
|
20
20
|
return [{ _type: "Paragraph", _id: "error", content: "Invalid JSON. Please check the JSON string." }];
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function ne(e) {
|
|
24
24
|
const s = /(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;
|
|
25
25
|
return e.replace(s, (t) => {
|
|
26
|
-
const n = decodeURIComponent(t),
|
|
27
|
-
return
|
|
26
|
+
const n = decodeURIComponent(t), i = n.indexOf("public");
|
|
27
|
+
return i !== -1 ? n.substring(i + 6) : n;
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
31
|
-
return await
|
|
30
|
+
async function se(e, s, t = [], n = "", i) {
|
|
31
|
+
return await W({
|
|
32
32
|
tailwindConfig: {
|
|
33
33
|
darkMode: "class",
|
|
34
34
|
safelist: t,
|
|
35
|
-
theme: { extend:
|
|
36
|
-
plugins: [G,
|
|
37
|
-
corePlugins: { preflight:
|
|
35
|
+
theme: { extend: H(e) },
|
|
36
|
+
plugins: [D, G, Y, z, Q],
|
|
37
|
+
corePlugins: { preflight: i },
|
|
38
38
|
...n ? { prefix: `${n}` } : {}
|
|
39
39
|
}
|
|
40
40
|
}).generateStylesFromContent(
|
|
41
|
-
` ${
|
|
41
|
+
` ${i ? "@tailwind base;" : ""}
|
|
42
42
|
@tailwind components;
|
|
43
43
|
@tailwind utilities;`,
|
|
44
44
|
s
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
47
|
const re = (e, s, t) => {
|
|
48
|
-
const n = JSON.stringify(e).replace(/#styles:([^"]*)/g, (
|
|
49
|
-
return
|
|
50
|
-
},
|
|
51
|
-
async function
|
|
52
|
-
const s =
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
const n = JSON.stringify(e).replace(/#styles:([^"]*)/g, (i, a) => `#styles:${a.replace(/,/g, " ")}`.replace(/#styles:/g, ""));
|
|
49
|
+
return se(s, [n], [], "", t);
|
|
50
|
+
}, Ee = async (e, s = q, t = !1) => await re(e, s, t);
|
|
51
|
+
async function ie(e) {
|
|
52
|
+
const s = await e.dataProvider({
|
|
53
|
+
pageProps: e.pageProps,
|
|
54
|
+
block: e.block,
|
|
55
55
|
lang: e.lang,
|
|
56
56
|
draft: e.draft,
|
|
57
57
|
inBuilder: e.inBuilder
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
e.lang,
|
|
61
|
-
e.metadata ?? {}
|
|
62
|
-
);
|
|
63
|
-
return S(s, "$metadata") && e.dataProviderMetadataCallback(e.block, s.$metadata), /* @__PURE__ */ m(w, { children: j.createElement(e.component, {
|
|
58
|
+
});
|
|
59
|
+
return S(s, "$metadata") && e.dataProviderMetadataCallback(e.block, s.$metadata), /* @__PURE__ */ f(w, { children: R.createElement(e.component, {
|
|
64
60
|
..._(e.props, ["dataProvider", "dataProviderMetadataCallback"]),
|
|
65
61
|
..._(s, "$metadata"),
|
|
66
62
|
key: `${e.block._id}-async`
|
|
67
63
|
}) });
|
|
68
64
|
}
|
|
69
|
-
const
|
|
70
|
-
const { baseClasses: s, classes: t } =
|
|
71
|
-
return
|
|
65
|
+
const ae = x((e) => {
|
|
66
|
+
const { baseClasses: s, classes: t } = te(e);
|
|
67
|
+
return ee(s, t).replace(j, "").trim();
|
|
72
68
|
}), F = (e, s) => {
|
|
73
|
-
const t =
|
|
74
|
-
return
|
|
75
|
-
if (
|
|
76
|
-
let
|
|
77
|
-
const a = /\{\{(.*?)\}\}/g,
|
|
78
|
-
|
|
79
|
-
const d = o.slice(2, -2),
|
|
80
|
-
|
|
81
|
-
}), t[n] =
|
|
69
|
+
const t = E(e);
|
|
70
|
+
return O(y(t), (n) => {
|
|
71
|
+
if (T(t[n])) {
|
|
72
|
+
let i = t[n];
|
|
73
|
+
const a = /\{\{(.*?)\}\}/g, l = i.match(a);
|
|
74
|
+
l && l.forEach((o) => {
|
|
75
|
+
const d = o.slice(2, -2), p = c(s, d, o);
|
|
76
|
+
i = i.replace(o, p);
|
|
77
|
+
}), t[n] = i;
|
|
82
78
|
}
|
|
83
|
-
|
|
79
|
+
U(t[n]) && (t[n] = F(t[n], s));
|
|
84
80
|
}), t;
|
|
85
81
|
};
|
|
86
|
-
function
|
|
87
|
-
const t =
|
|
82
|
+
function oe(e, s) {
|
|
83
|
+
const t = c(e, `${s}_attrs`, {}), n = y(t).join(" ");
|
|
88
84
|
return v(n, "x-show") && !v(n, "x-transition") && (t["x-transition"] = ""), t;
|
|
89
85
|
}
|
|
90
|
-
function
|
|
86
|
+
function ce(e) {
|
|
91
87
|
const s = {};
|
|
92
88
|
return Object.keys(e).forEach((t) => {
|
|
93
|
-
if (
|
|
94
|
-
const n =
|
|
89
|
+
if (T(e[t]) && e[t].startsWith(j)) {
|
|
90
|
+
const n = ae(e[t]);
|
|
95
91
|
s[t] = {
|
|
96
92
|
className: n,
|
|
97
|
-
...
|
|
93
|
+
...oe(e, t)
|
|
98
94
|
};
|
|
99
95
|
}
|
|
100
96
|
}), s;
|
|
101
97
|
}
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
const n =
|
|
105
|
-
return
|
|
106
|
-
|
|
98
|
+
function le(e, s, t) {
|
|
99
|
+
if (m(s)) return e;
|
|
100
|
+
const n = E(e), i = c(t, "i18nProps", []);
|
|
101
|
+
return O(y(n), (a) => {
|
|
102
|
+
i.includes(a) && !m(s) && (n[a] = c(n, `${a}-${s}`, n[a]));
|
|
107
103
|
}), n;
|
|
108
104
|
}
|
|
109
|
-
const
|
|
110
|
-
const s =
|
|
111
|
-
return Object.fromEntries(Object.entries(t).filter(([, n]) =>
|
|
112
|
-
}),
|
|
113
|
-
const
|
|
105
|
+
const de = x((e) => {
|
|
106
|
+
const s = k(e), t = c(s, "schema.properties", {});
|
|
107
|
+
return Object.fromEntries(Object.entries(t).filter(([, n]) => c(n, "runtime", !1)));
|
|
108
|
+
}), ue = (e, s, t) => m(t) ? {} : Object.entries(t).reduce((n, [i, a]) => {
|
|
109
|
+
const l = [];
|
|
114
110
|
let o = h(e, { _id: s });
|
|
115
111
|
for (; o; )
|
|
116
|
-
|
|
117
|
-
const d = h(
|
|
118
|
-
return d && (n[
|
|
119
|
-
}, {}), fe = () => /* @__PURE__ */
|
|
120
|
-
function
|
|
121
|
-
S(e, "metadata") && console.warn(" metadata is deprecated and will be removed in upcoming version, use forwardProps instead")
|
|
112
|
+
l.push(o), o = h(e, { _id: o._parent });
|
|
113
|
+
const d = h(l, { _type: a.block });
|
|
114
|
+
return d && (n[i] = c(d, c(a, "prop"), null)), n;
|
|
115
|
+
}, {}), fe = () => /* @__PURE__ */ f("span", { children: "Loading..." });
|
|
116
|
+
function Oe(e) {
|
|
117
|
+
if (S(e, "metadata") && console.warn(" metadata is deprecated and will be removed in upcoming version, use forwardProps instead"), m(e.lang) && !m(e.fallbackLang))
|
|
118
|
+
throw new Error("lang prop is required when fallbackLang is provided");
|
|
122
119
|
const s = e.lang ?? "en", t = e.fallbackLang ?? s;
|
|
123
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ f(L, { ...e, lang: s, fallbackLang: t });
|
|
124
121
|
}
|
|
125
|
-
function
|
|
122
|
+
function L({
|
|
126
123
|
blocks: e,
|
|
127
124
|
parent: s,
|
|
128
125
|
externalData: t = {},
|
|
129
126
|
lang: n = "en",
|
|
130
|
-
fallbackLang:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
dataProviderMetadataCallback: o = () => {
|
|
127
|
+
fallbackLang: i = "en",
|
|
128
|
+
pageProps: a = {},
|
|
129
|
+
dataProviderMetadataCallback: l = () => {
|
|
134
130
|
},
|
|
135
|
-
draft:
|
|
131
|
+
draft: o = !1
|
|
136
132
|
}) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
139
|
-
const B = {},
|
|
140
|
-
B.children =
|
|
141
|
-
|
|
133
|
+
const d = e, p = (r) => ce(r), N = s ? g(e, { _parent: s }) : g(e, (r) => m(r._parent));
|
|
134
|
+
return K(N, "_id").map((r, A) => {
|
|
135
|
+
const B = {}, I = g(d, { _parent: r._id });
|
|
136
|
+
B.children = I.length > 0 ? /* @__PURE__ */ f(
|
|
137
|
+
L,
|
|
142
138
|
{
|
|
143
139
|
externalData: t,
|
|
144
|
-
parent:
|
|
145
|
-
blocks:
|
|
140
|
+
parent: r._id,
|
|
141
|
+
blocks: d,
|
|
146
142
|
lang: n,
|
|
147
|
-
fallbackLang:
|
|
148
|
-
|
|
149
|
-
dataProviderMetadataCallback:
|
|
150
|
-
draft:
|
|
151
|
-
metadata: a
|
|
143
|
+
fallbackLang: i,
|
|
144
|
+
pageProps: a,
|
|
145
|
+
dataProviderMetadataCallback: l,
|
|
146
|
+
draft: o
|
|
152
147
|
},
|
|
153
|
-
`${
|
|
148
|
+
`${r._id}-children`
|
|
154
149
|
) : null;
|
|
155
|
-
const u =
|
|
150
|
+
const u = k(r._type);
|
|
156
151
|
if (u !== null) {
|
|
157
|
-
let P =
|
|
152
|
+
let P = r;
|
|
158
153
|
const C = u.component;
|
|
159
|
-
P = { ...u.defaults, ...
|
|
160
|
-
const
|
|
154
|
+
P = { ...u.defaults, ...r };
|
|
155
|
+
const J = n === i ? "" : n, M = ue(d, r._id, de(r._type)), b = F(le(r, J, u), t), $ = _(
|
|
161
156
|
{
|
|
162
|
-
...c,
|
|
163
157
|
...P,
|
|
164
|
-
|
|
165
|
-
...
|
|
158
|
+
...b,
|
|
159
|
+
...p(b),
|
|
166
160
|
...B,
|
|
167
|
-
...
|
|
168
|
-
index:
|
|
161
|
+
...M,
|
|
162
|
+
index: A,
|
|
169
163
|
lang: n,
|
|
170
|
-
key:
|
|
171
|
-
draft:
|
|
164
|
+
key: r._id,
|
|
165
|
+
draft: o,
|
|
166
|
+
pageProps: a,
|
|
172
167
|
blockProps: {},
|
|
173
168
|
inBuilder: !1
|
|
174
169
|
},
|
|
175
170
|
["_parent"]
|
|
176
171
|
);
|
|
177
172
|
if (S(u, "dataProvider")) {
|
|
178
|
-
const
|
|
179
|
-
return /* @__PURE__ */
|
|
180
|
-
|
|
173
|
+
const V = c(u, "suspenseFallback", fe);
|
|
174
|
+
return /* @__PURE__ */ f(w, { fallback: Z(V), children: /* @__PURE__ */ f(
|
|
175
|
+
ie,
|
|
181
176
|
{
|
|
182
177
|
inBuilder: !1,
|
|
183
|
-
dataProviderMetadataCallback:
|
|
178
|
+
dataProviderMetadataCallback: l,
|
|
184
179
|
lang: n,
|
|
185
|
-
|
|
180
|
+
pageProps: a,
|
|
186
181
|
dataProvider: u.dataProvider,
|
|
187
|
-
block:
|
|
182
|
+
block: r,
|
|
188
183
|
component: C,
|
|
189
|
-
props:
|
|
190
|
-
|
|
191
|
-
draft: d
|
|
184
|
+
props: $,
|
|
185
|
+
draft: o
|
|
192
186
|
},
|
|
193
|
-
`${
|
|
194
|
-
) }, `${
|
|
187
|
+
`${r._id}-async`
|
|
188
|
+
) }, `${r._id}-suspense`);
|
|
195
189
|
}
|
|
196
|
-
return /* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ f(w, { children: R.createElement(C, $) }, `${r._id}-suspense`);
|
|
197
191
|
}
|
|
198
|
-
return /* @__PURE__ */
|
|
199
|
-
|
|
192
|
+
return /* @__PURE__ */ X("noscript", { children: [
|
|
193
|
+
r._type,
|
|
200
194
|
" not found"
|
|
201
|
-
] }, `${
|
|
195
|
+
] }, `${r._id}-noscript`);
|
|
202
196
|
});
|
|
203
197
|
}
|
|
204
198
|
export {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
199
|
+
Oe as RenderChaiBlocks,
|
|
200
|
+
xe as convertToBlocks,
|
|
201
|
+
Re as getChaiThemeCssVariables,
|
|
202
|
+
Ee as getStylesForBlocks,
|
|
203
|
+
je as getThemeFontsCSSImport,
|
|
204
|
+
Fe as getThemeFontsLinkMarkup
|
|
211
205
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": "Suraj Air",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"homepage": "https://chaibuilder.com",
|
|
8
|
-
"version": "2.2.
|
|
8
|
+
"version": "2.2.1",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@chaibuilder/runtime": "2.0
|
|
56
|
+
"@chaibuilder/runtime": "2.1.0",
|
|
57
57
|
"@types/react": "*",
|
|
58
58
|
"@types/react-dom": "*",
|
|
59
59
|
"jotai": "2.12.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@ai-sdk/react": "^1.2.2",
|
|
73
|
-
"@chaibuilder/runtime": "2.0
|
|
73
|
+
"@chaibuilder/runtime": "2.1.0",
|
|
74
74
|
"@floating-ui/dom": "1.6.13",
|
|
75
75
|
"@floating-ui/react-dom": "2.1.2",
|
|
76
76
|
"@mhsdesign/jit-browser-tailwindcss": "0.4.2",
|