@chaibuilder/sdk 2.0.0-beta.9 → 2.0.0-beta.90

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 (56) hide show
  1. package/README.md +1 -3
  2. package/dist/ChaiThemeFn-DcE5RdLQ.cjs +236 -0
  3. package/dist/ChaiThemeFn-DzirXKjI.js +237 -0
  4. package/dist/CodeEditor-C8_JzwHn.cjs +81 -0
  5. package/dist/CodeEditor-DdIk_PEV.js +81 -0
  6. package/dist/Topbar-62QmCKWL.cjs +18 -0
  7. package/dist/Topbar-Cqt0j3Yt.js +18 -0
  8. package/dist/chaibuilder-logo.png +0 -0
  9. package/dist/context-menu-DHla8ofZ.js +893 -0
  10. package/dist/context-menu-DawHUIXd.cjs +923 -0
  11. package/dist/core.cjs +11592 -18
  12. package/dist/core.d.ts +108 -47
  13. package/dist/core.js +9554 -6675
  14. package/dist/getSplitClasses-BuALfSLX.js +54 -0
  15. package/dist/getSplitClasses-mbQmvwI3.cjs +53 -0
  16. package/dist/iconBase-BSrIcOaG.cjs +146 -0
  17. package/dist/iconBase-CWgVxu0A.js +147 -0
  18. package/dist/mockServiceWorker.js +39 -24
  19. package/dist/plugin-BcTnEZwx.cjs +26 -0
  20. package/dist/plugin-DGEKY3uC.js +27 -0
  21. package/dist/render.cjs +247 -2
  22. package/dist/render.d.ts +41 -16
  23. package/dist/render.js +224 -142
  24. package/dist/runtime.cjs +9 -1
  25. package/dist/runtime.d.ts +6 -1
  26. package/dist/runtime.js +0 -20
  27. package/dist/sdk.css +1341 -0
  28. package/dist/tailwind.cjs +78 -1
  29. package/dist/tailwind.d.ts +37 -26
  30. package/dist/tailwind.js +21 -21
  31. package/dist/ui.cjs +378 -1
  32. package/dist/ui.d.ts +12 -51
  33. package/dist/ui.js +262 -349
  34. package/dist/web-blocks.cjs +1679 -2
  35. package/dist/web-blocks.d.ts +6 -0
  36. package/dist/web-blocks.js +1502 -856
  37. package/package.json +135 -132
  38. package/dist/CodeEditor-19TqmVgI.cjs +0 -1
  39. package/dist/CodeEditor-b5DU6y6j.js +0 -126
  40. package/dist/STRINGS-Xxstm-7I.js +0 -7
  41. package/dist/STRINGS-Yl7cSWDc.cjs +0 -1
  42. package/dist/Topbar-lGFRGO4j.js +0 -73
  43. package/dist/Topbar-ql6BS8c6.cjs +0 -1
  44. package/dist/context-menu-MPtzs1fu.cjs +0 -1
  45. package/dist/context-menu-XEyVy2qm.js +0 -903
  46. package/dist/controls-lEwMTdPQ.js +0 -234
  47. package/dist/controls-p9IwFnPx.cjs +0 -1
  48. package/dist/iconBase-Ief2hJUZ.js +0 -130
  49. package/dist/iconBase-aZzpqff_.cjs +0 -1
  50. package/dist/jsx-runtime-JYMCiFoE.cjs +0 -27
  51. package/dist/jsx-runtime-Sp0orL4X.js +0 -631
  52. package/dist/plugin-Dm5EFGnP.cjs +0 -1
  53. package/dist/plugin-KIpT3NWi.cjs +0 -1
  54. package/dist/plugin-PFjzFeON.js +0 -97
  55. package/dist/plugin-ooqqxWRQ.js +0 -55
  56. package/dist/style.css +0 -6
package/dist/render.cjs CHANGED
@@ -1,3 +1,248 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("lodash-es"),a=require("./STRINGS-Yl7cSWDc.cjs"),d=require("./jsx-runtime-JYMCiFoE.cjs"),y=require("react"),x=require("tailwind-merge"),T=require("@chaibuilder/runtime"),B=require("@mhsdesign/jit-browser-tailwindcss"),C=require("@tailwindcss/forms"),q=require("@tailwindcss/typography"),R=require("@tailwindcss/aspect-ratio"),j=require("./plugin-Dm5EFGnP.cjs");require("./plugin-KIpT3NWi.cjs");const Y=(t,n="")=>{const s=t.replace(a.STYLES_KEY,"").split(",").map(i=>i.split(" ").map(l=>{if(l==="")return"";if(l.includes(":")){const u=l.split(":");return u[u.length-1]=n+r.last(u),u.join(":")}return`${n}${l}`}).join(" "));return r.flattenDeep(s).join(" ")},O=t=>{if(!t)return[];try{return JSON.parse(A(t)).filter(e=>!e._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function A(t){const n=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return t.replace(n,e=>{const s=decodeURIComponent(e),i=s.indexOf("public");return i!==-1?s.substring(i+6):s})}const K=t=>{const n={};return Object.keys(t).forEach(e=>{r.isString(t[e])&&t[e].startsWith(a.SLOT_KEY)&&(n[e]=t[e].replace(a.SLOT_KEY,"").split(","))}),n},L=r.memoize((t,n)=>{const e=t.replace(a.STYLES_KEY,"").split(","),s=x.twMerge(e[0],e[1]);return n===""?s.replace(a.STYLES_KEY,"").trim():Y(s,n).replace(a.STYLES_KEY,"").trim()});function N(t,n){const e=r.get(t,`${n}_attrs`,{});r.has(e,"data-ai-key")&&delete e["data-ai-key"];const s=r.keys(e).join(" ");return r.includes(s,"x-show")&&!r.includes(s,"x-transition")&&(e["x-transition"]=""),e}function $(t,n){const e={};return Object.keys(t).forEach(s=>{if(r.isString(t[s])&&t[s].startsWith(a.STYLES_KEY)){const i=L(t[s],n);e[s]={className:i,...N(t,s)}}}),e}function P(t,n){const e=r.get(t,"_bindings",{});return r.isEmpty(e)?{...t}:(r.each(e,(s,i)=>{r.isString(s)&&r.get(n,s,null)&&(t[i]=r.get(n,s,null))}),t)}function v(t,n,e){if(r.isEmpty(n))return t;const s=r.cloneDeep(t);return r.forEach(r.keys(s),i=>{r.get(e,["props",i,"i18n"])&&!r.isEmpty(n)&&(s[i]=r.get(s,`${i}-${n}`,s[i]))}),s}function E({blocks:t,parent:n,classPrefix:e="",externalData:s={},blockModifierCallback:i,lang:p}){const g=t,l=o=>$(o,e),u=n?r.filter(t,{_parent:n}):r.filter(t,o=>r.isEmpty(o._parent));return d.jsxRuntimeExports.jsx(d.jsxRuntimeExports.Fragment,{children:y.Children.toArray(u.map((o,_)=>{const m=K(o),h={};r.isEmpty(m)||Object.keys(m).forEach(c=>{h[c]=y.Children.toArray(m[c].map(S=>d.jsxRuntimeExports.jsx(E,{externalData:s,classPrefix:e,blocks:g,parent:S,lang:p})))});const w=r.filter(g,{_parent:o._id});h.children=w.length>0?d.jsxRuntimeExports.jsx(E,{externalData:s,classPrefix:e,parent:o._id,blocks:g,lang:p}):null;const f=T.getBlockComponent(o._type);if(f!==null){let c=o;const S=f.component;return c={...f.defaults,...o},i&&(c=i(c)),y.createElement(S,r.omit({blockProps:{},inBuilder:!1,...c,index:_,...P(v(o,p,f),s),...l(c),...h},["_parent"]))}return d.jsxRuntimeExports.jsxs("noscript",{children:[o._type," not found"]})}))})}async function I(t,n,e=[],s="",i=!1){return await B.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:e,theme:{extend:j.getChaiBuilderTheme(t)},plugins:[C,q,R,j.chaiBuilderPlugin],corePlugins:{preflight:i},...s?{prefix:`${s}`}:{}}}).generateStylesFromContent(` ${i?"@tailwind base;":""}
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ChaiThemeFn = require("./ChaiThemeFn-DcE5RdLQ.cjs");
4
+ const lodashEs = require("lodash-es");
5
+ const getSplitClasses = require("./getSplitClasses-mbQmvwI3.cjs");
6
+ const jitBrowserTailwindcss = require("@mhsdesign/jit-browser-tailwindcss");
7
+ const aspectRatio = require("@tailwindcss/aspect-ratio");
8
+ const containerQueries = require("@tailwindcss/container-queries");
9
+ const forms = require("@tailwindcss/forms");
10
+ const typography = require("@tailwindcss/typography");
11
+ const plugin = require("./plugin-BcTnEZwx.cjs");
12
+ const jsxRuntime = require("react/jsx-runtime");
13
+ const runtime = require("@chaibuilder/runtime");
14
+ const React = require("react");
15
+ const tailwindMerge = require("tailwind-merge");
16
+ const addPrefixToClasses = (classes, prefix = "") => {
17
+ const { classes: classesString } = getSplitClasses.getSplitChaiClasses(classes);
18
+ const array = classesString.split(" ").map((item) => {
19
+ const classes2 = item.split(" ");
20
+ const newClasses = classes2.map((item2) => {
21
+ if (item2 === "") return "";
22
+ if (item2.includes(":")) {
23
+ const values = item2.split(":");
24
+ values[values.length - 1] = prefix + lodashEs.last(values);
25
+ return values.join(":");
26
+ }
27
+ return `${prefix}${item2}`;
28
+ });
29
+ return newClasses.join(" ");
30
+ });
31
+ return lodashEs.flattenDeep(array).join(" ");
32
+ };
33
+ const convertToBlocks = (chaiFormatContent) => {
34
+ if (!chaiFormatContent) return [];
35
+ try {
36
+ const blocks = JSON.parse(removeAssetPrefix(chaiFormatContent));
37
+ return blocks.filter((block) => !block._type.startsWith("@chai"));
38
+ } catch (error) {
39
+ return [{ _type: "Paragraph", _id: "error", content: "Invalid JSON. Please check the JSON string." }];
40
+ }
41
+ };
42
+ function removeAssetPrefix(input) {
43
+ const regex = /(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;
44
+ return input.replace(regex, (match) => {
45
+ const decodedUrl = decodeURIComponent(match);
46
+ const publicIndex = decodedUrl.indexOf("public");
47
+ if (publicIndex !== -1) {
48
+ return decodedUrl.substring(publicIndex + 6);
49
+ }
50
+ return decodedUrl;
51
+ });
52
+ }
53
+ async function getTailwindCSS(themeOptions, markupString, safelist = [], prefix = "", includeBaseStyles) {
54
+ const tailwind = jitBrowserTailwindcss.createTailwindcss({
55
+ tailwindConfig: {
56
+ darkMode: "class",
57
+ safelist,
58
+ theme: { extend: plugin.getChaiBuilderTheme(themeOptions) },
59
+ plugins: [forms, typography, aspectRatio, containerQueries, plugin.chaiBuilderPlugin],
60
+ corePlugins: { preflight: includeBaseStyles },
61
+ ...prefix ? { prefix: `${prefix}` } : {}
62
+ }
63
+ });
64
+ return await tailwind.generateStylesFromContent(
65
+ ` ${includeBaseStyles ? "@tailwind base;" : ""}
2
66
  @tailwind components;
3
- @tailwind utilities;`,n)}const J=(t,n,e=!1)=>I(n,[r.replace(JSON.stringify(t),/#styles:,?/g,"")],[],"",e),F=async(t,n={},e=!0)=>await J(t,n,e);exports.RenderChaiBlocks=E;exports.convertToBlocks=O;exports.getStylesForBlocks=F;
67
+ @tailwind utilities;`,
68
+ markupString
69
+ );
70
+ }
71
+ const getBlocksTailwindCSS = (blocks, themeOptions, includeBaseStyles) => {
72
+ const blocksString = JSON.stringify(blocks).replace(/#styles:([^"]*)/g, (_match, content) => {
73
+ return `#styles:${content.replace(/,/g, " ")}`.replace(/#styles:/g, "");
74
+ });
75
+ return getTailwindCSS(themeOptions, [blocksString], [], "", includeBaseStyles);
76
+ };
77
+ const getStylesForBlocks = async (blocks, themeOptions = ChaiThemeFn.defaultThemeOptions, includeBaseStyles = false) => {
78
+ return await getBlocksTailwindCSS(blocks, themeOptions, includeBaseStyles);
79
+ };
80
+ async function AsyncPropsBlock(props) {
81
+ const dataProps = await (props == null ? void 0 : props.dataProvider(props.block, props.lang, props.metadata));
82
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: React.createElement(props.component, { ...props.props, ...dataProps }) });
83
+ }
84
+ const generateClassNames = lodashEs.memoize((styles, classPrefix) => {
85
+ const { baseClasses, classes: classesString } = getSplitClasses.getSplitChaiClasses(styles);
86
+ const classes = tailwindMerge.twMerge(baseClasses, classesString);
87
+ if (classPrefix === "") return classes.replace(getSplitClasses.STYLES_KEY, "").trim();
88
+ return addPrefixToClasses(classes, classPrefix).replace(getSplitClasses.STYLES_KEY, "").trim();
89
+ });
90
+ const applyBinding = (block, pageExternalData) => {
91
+ const clonedBlock = lodashEs.cloneDeep(block);
92
+ lodashEs.forEach(lodashEs.keys(clonedBlock), (key) => {
93
+ if (lodashEs.isString(clonedBlock[key])) {
94
+ let value = clonedBlock[key];
95
+ const bindingRegex = /\{\{(.*?)\}\}/g;
96
+ const matches = value.match(bindingRegex);
97
+ if (matches) {
98
+ matches.forEach((match) => {
99
+ const binding = match.slice(2, -2);
100
+ const bindingValue = lodashEs.get(pageExternalData, binding, match);
101
+ value = value.replace(match, bindingValue);
102
+ });
103
+ }
104
+ clonedBlock[key] = value;
105
+ }
106
+ });
107
+ return clonedBlock;
108
+ };
109
+ function getElementAttrs(block, key) {
110
+ const attrs = lodashEs.get(block, `${key}_attrs`, {});
111
+ const attrsKeys = lodashEs.keys(attrs).join(" ");
112
+ if (lodashEs.includes(attrsKeys, "x-show") && !lodashEs.includes(attrsKeys, "x-transition")) {
113
+ attrs["x-transition"] = "";
114
+ }
115
+ return attrs;
116
+ }
117
+ function getStyleAttrs(block, classPrefix) {
118
+ const styles = {};
119
+ Object.keys(block).forEach((key) => {
120
+ if (lodashEs.isString(block[key]) && block[key].startsWith(getSplitClasses.STYLES_KEY)) {
121
+ const classes = generateClassNames(block[key], classPrefix);
122
+ styles[key] = {
123
+ className: classes,
124
+ ...getElementAttrs(block, key)
125
+ };
126
+ }
127
+ });
128
+ return styles;
129
+ }
130
+ function applyLanguage(_block, lang, blockDefinition) {
131
+ if (lodashEs.isEmpty(lang)) return _block;
132
+ const block = lodashEs.cloneDeep(_block);
133
+ const i18nProps = lodashEs.get(blockDefinition, "i18nProps", []);
134
+ lodashEs.forEach(lodashEs.keys(block), (key) => {
135
+ if (i18nProps.includes(key) && !lodashEs.isEmpty(lang)) {
136
+ block[key] = lodashEs.get(block, `${key}-${lang}`, block[key]);
137
+ }
138
+ });
139
+ return block;
140
+ }
141
+ const getRuntimeProps = lodashEs.memoize((blockType) => {
142
+ const chaiBlock = runtime.getRegisteredChaiBlock(blockType);
143
+ const props = lodashEs.get(chaiBlock, "schema.properties", {});
144
+ return Object.fromEntries(Object.entries(props).filter(([, value]) => lodashEs.get(value, "runtime", false)));
145
+ });
146
+ const getRuntimePropValues = (allBlocks, blockId, runtimeProps) => {
147
+ if (lodashEs.isEmpty(runtimeProps)) return {};
148
+ return Object.entries(runtimeProps).reduce((acc, [key, schema]) => {
149
+ const hierarchy = [];
150
+ let block = lodashEs.find(allBlocks, { _id: blockId });
151
+ while (block) {
152
+ hierarchy.push(block);
153
+ block = lodashEs.find(allBlocks, { _id: block._parent });
154
+ }
155
+ const matchingBlock = lodashEs.find(hierarchy, { _type: schema.block });
156
+ if (matchingBlock) {
157
+ acc[key] = lodashEs.get(matchingBlock, lodashEs.get(schema, "prop"), null);
158
+ }
159
+ return acc;
160
+ }, {});
161
+ };
162
+ const SuspenseFallback = () => /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Loading..." });
163
+ function RenderChaiBlocks({
164
+ blocks,
165
+ parent,
166
+ classPrefix = "",
167
+ externalData = {},
168
+ blockModifierCallback = null,
169
+ lang = "",
170
+ fallbackLang = "",
171
+ metadata = {}
172
+ }) {
173
+ const allBlocks = blocks;
174
+ const getStyles = (block) => getStyleAttrs(block, classPrefix);
175
+ const filteredBlocks = parent ? lodashEs.filter(blocks, { _parent: parent }) : lodashEs.filter(blocks, (block) => lodashEs.isEmpty(block._parent));
176
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: React.Children.toArray(
177
+ filteredBlocks.map((block, index) => {
178
+ const attrs = {};
179
+ const blocks2 = lodashEs.filter(allBlocks, { _parent: block._id });
180
+ attrs.children = blocks2.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
181
+ RenderChaiBlocks,
182
+ {
183
+ externalData,
184
+ classPrefix,
185
+ parent: block._id,
186
+ blocks: allBlocks,
187
+ lang: lang || fallbackLang,
188
+ metadata
189
+ }
190
+ ) : null;
191
+ const blockDefinition = runtime.getRegisteredChaiBlock(block._type);
192
+ if (blockDefinition !== null) {
193
+ let syncedBlock = block;
194
+ const Component = blockDefinition.component;
195
+ syncedBlock = { ...blockDefinition.defaults, ...block };
196
+ if (blockModifierCallback) {
197
+ syncedBlock = blockModifierCallback(syncedBlock);
198
+ }
199
+ const langToUse = lang === fallbackLang ? "" : lang;
200
+ const runtimeProps = getRuntimePropValues(allBlocks, block._id, getRuntimeProps(block._type));
201
+ const props = lodashEs.omit(
202
+ {
203
+ blockProps: {},
204
+ inBuilder: false,
205
+ ...syncedBlock,
206
+ index,
207
+ ...applyBinding(applyLanguage(block, langToUse, blockDefinition), externalData),
208
+ ...getStyles(syncedBlock),
209
+ ...attrs,
210
+ ...runtimeProps,
211
+ metadata,
212
+ lang: lang || fallbackLang
213
+ },
214
+ ["_parent"]
215
+ );
216
+ if (lodashEs.has(blockDefinition, "dataProvider")) {
217
+ const suspenseFallback = lodashEs.get(
218
+ blockDefinition,
219
+ "suspenseFallback",
220
+ SuspenseFallback
221
+ );
222
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: React.createElement(suspenseFallback), children: /* @__PURE__ */ jsxRuntime.jsx(
223
+ AsyncPropsBlock,
224
+ {
225
+ lang: lang || fallbackLang,
226
+ metadata,
227
+ dataProvider: blockDefinition.dataProvider,
228
+ block,
229
+ component: Component,
230
+ props
231
+ }
232
+ ) });
233
+ }
234
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { children: React.createElement(Component, props) });
235
+ }
236
+ return /* @__PURE__ */ jsxRuntime.jsxs("noscript", { children: [
237
+ block._type,
238
+ " not found"
239
+ ] });
240
+ })
241
+ ) });
242
+ }
243
+ exports.getChaiThemeCssVariables = ChaiThemeFn.getChaiThemeCssVariables;
244
+ exports.getThemeFontsCSSImport = ChaiThemeFn.getThemeFontsCSSImport;
245
+ exports.getThemeFontsLinkMarkup = ChaiThemeFn.getThemeFontsLinkMarkup;
246
+ exports.RenderChaiBlocks = RenderChaiBlocks;
247
+ exports.convertToBlocks = convertToBlocks;
248
+ exports.getStylesForBlocks = getStylesForBlocks;
package/dist/render.d.ts CHANGED
@@ -1,40 +1,65 @@
1
1
  import { JSX as JSX_2 } from 'react/jsx-runtime';
2
2
 
3
- declare type ChaiBlock = {
3
+ declare type BorderRadiusValue = false | string;
4
+
5
+ declare type ChaiBlock<T = Record<string, any>> = {
4
6
  _id: string;
5
- _type: string;
6
7
  _name?: string;
7
8
  _parent?: string | null | undefined;
8
9
  _bindings?: Record<string, string>;
9
- } & Record<string, any>;
10
-
11
- declare type ChaiBuilderTailwindTheme<T extends Record<string, unknown> = Record<string, unknown>> = {
12
- primaryColor: string;
13
- secondaryColor: string;
14
- headingFont: string;
15
- bodyFont: string;
16
- roundedCorners: string;
17
- bodyBgLightColor: string;
18
- bodyBgDarkColor: string;
19
- bodyTextLightColor: string;
20
- bodyTextDarkColor: string;
10
+ _type: string;
21
11
  } & T;
22
12
 
13
+ declare type ChaiBuilderThemeOptions = {
14
+ fontFamily: false | Record<VariableKey, string>;
15
+ borderRadius: BorderRadiusValue;
16
+ colors: false | {
17
+ group: string;
18
+ items: Record<VariableKey, [HSLColor, HSLColor]>;
19
+ }[];
20
+ };
21
+
22
+ declare type ChaiBuilderThemeValues = {
23
+ fontFamily: Record<string, string>;
24
+ borderRadius: string;
25
+ colors: Record<string, string[]>;
26
+ };
27
+
23
28
  /**
24
29
  * This function converts the chai format content to chai blocks
25
30
  * @param chaiFormatContent
26
31
  */
27
32
  export declare const convertToBlocks: (chaiFormatContent: string) => ChaiBlock[];
28
33
 
29
- export declare const getStylesForBlocks: (blocks: ChaiBlock[], theme?: ChaiBuilderTailwindTheme | Record<string, string>, includeBaseStyles?: boolean) => Promise<string>;
34
+ export declare const getChaiThemeCssVariables: (chaiTheme: Partial<ChaiBuilderThemeValues>) => string;
30
35
 
31
- export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, blockModifierCallback, lang, }: {
36
+ export declare const getStylesForBlocks: (blocks: ChaiBlock[], themeOptions?: ChaiBuilderThemeOptions, includeBaseStyles?: boolean) => Promise<string>;
37
+
38
+ export declare const getThemeFontsCSSImport: (chaiTheme: {
39
+ fontFamily: Record<string, string>;
40
+ }) => any;
41
+
42
+ export declare const getThemeFontsLinkMarkup: (chaiTheme: Pick<Partial<ChaiBuilderThemeValues>, "fontFamily">) => any;
43
+
44
+ declare type HSLColor = string;
45
+
46
+ export declare function RenderChaiBlocks({ blocks, parent, classPrefix, externalData, blockModifierCallback, lang, fallbackLang, metadata, }: {
32
47
  blocks: ChaiBlock[];
33
48
  parent?: string;
34
49
  classPrefix?: string;
35
50
  externalData?: Record<string, any>;
36
51
  blockModifierCallback?: (block: ChaiBlock) => ChaiBlock;
37
52
  lang?: string;
53
+ fallbackLang?: string;
54
+ metadata?: Record<string, any>;
38
55
  }): JSX_2.Element;
39
56
 
57
+ declare type VariableKey = string;
58
+
40
59
  export { }
60
+
61
+ declare global {
62
+ interface Window {
63
+ clarity: any;
64
+ }
65
+ }