@chaibuilder/sdk 1.3.1 → 1.3.2

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.
@@ -3,7 +3,7 @@ import C from "@monaco-editor/react";
3
3
  import { B as x } from "./context-menu-BtcwqA6V.js";
4
4
  import { useTranslation as v } from "react-i18next";
5
5
  import { useState as r, useCallback as g, useEffect as y } from "react";
6
- import { u as N, a as T, b as w, c as B } from "./index-CtaCbdYK.js";
6
+ import { u as N, a as T, b as w, c as B } from "./index-Coh4Y4tF.js";
7
7
  import { Cross2Icon as E } from "@radix-ui/react-icons";
8
8
  import { useThrottledCallback as I } from "@react-hookz/web";
9
9
  const d = (l) => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@monaco-editor/react"),j=require("./context-menu-CYk-Ms8j.cjs"),g=require("react-i18next"),l=require("react"),c=require("./index-CSuRg8Z3.cjs"),v=require("@radix-ui/react-icons"),y=require("@react-hookz/web"),d=o=>{const n=document.createElement("div");return n.innerHTML=o,n.innerHTML};function T(){const{t:o}=g.useTranslation(),[n,u]=l.useState(!1),[r,m]=l.useState(""),[t,i]=c.useCodeEditor(),[a]=c.useSelectedBlockIds(),x=c.useUpdateBlocksProps(),f=c.useUpdateBlocksPropsRealtime(),h=y.useThrottledCallback(s=>{const k=d(s);f([t.blockId],{[t.blockProp]:k})},[],300),b=l.useCallback(()=>{if(n){const s=d(r);x([t.blockId],{[t.blockProp]:s})}},[n,r]);l.useEffect(()=>{a.includes(t==null?void 0:t.blockId)||(b(),i(null))},[a]);const p=()=>{i(null)};return e.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsx("button",{onClick:p,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsx("span",{children:o("HTML Code Editor |")}),e.jsx("span",{className:"text-xs text-gray-400",children:o("Scripts will be only executed in preview and live mode.")})]}),e.jsx("div",{className:"flex gap-x-2",children:e.jsx(j.Button,{onClick:()=>i(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsx(v.Cross2Icon,{})})})]}),e.jsx(C,{onMount:s=>{s.setValue(t.initialCode)},onChange:s=>{u(!0),m(s),h(s)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@monaco-editor/react"),j=require("./context-menu-CYk-Ms8j.cjs"),g=require("react-i18next"),l=require("react"),c=require("./index-MwShWj1c.cjs"),v=require("@radix-ui/react-icons"),y=require("@react-hookz/web"),d=o=>{const n=document.createElement("div");return n.innerHTML=o,n.innerHTML};function T(){const{t:o}=g.useTranslation(),[n,u]=l.useState(!1),[r,m]=l.useState(""),[t,i]=c.useCodeEditor(),[a]=c.useSelectedBlockIds(),x=c.useUpdateBlocksProps(),f=c.useUpdateBlocksPropsRealtime(),h=y.useThrottledCallback(s=>{const k=d(s);f([t.blockId],{[t.blockProp]:k})},[],300),b=l.useCallback(()=>{if(n){const s=d(r);x([t.blockId],{[t.blockProp]:s})}},[n,r]);l.useEffect(()=>{a.includes(t==null?void 0:t.blockId)||(b(),i(null))},[a]);const p=()=>{i(null)};return e.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsx("button",{onClick:p,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsx("span",{children:o("HTML Code Editor |")}),e.jsx("span",{className:"text-xs text-gray-400",children:o("Scripts will be only executed in preview and live mode.")})]}),e.jsx("div",{className:"flex gap-x-2",children:e.jsx(j.Button,{onClick:()=>i(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsx(v.Cross2Icon,{})})})]}),e.jsx(C,{onMount:s=>{s.setValue(t.initialCode)},onChange:s=>{u(!0),m(s),h(s)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=T;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import m, { useMemo as S, Suspense as d } from "react";
3
3
  import { B as x, a6 as y, a7 as k, a8 as A, a9 as D, aq as u, al as f } from "./context-menu-BtcwqA6V.js";
4
- import { e as P, F as B, d as o, f as L, g as M, L as h, h as v, i as E } from "./index-CtaCbdYK.js";
4
+ import { e as P, F as B, d as o, f as L, g as M, L as h, h as v, i as E } from "./index-Coh4Y4tF.js";
5
5
  import { useTranslation as b } from "react-i18next";
6
6
  import { c as w } from "./iconBase-DHfFLkem.js";
7
7
  import { EyeOpenIcon as I, ChevronDownIcon as G } from "@radix-ui/react-icons";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),a=require("./context-menu-CYk-Ms8j.cjs"),s=require("./index-CSuRg8Z3.cjs"),m=require("react-i18next"),h=require("./iconBase-Cn2BsTrq.cjs"),p=require("@radix-ui/react-icons"),c=require("lodash-es");require("@chaibuilder/runtime");const j=()=>{const{savePage:l,saveState:n}=s.useSavePage(),{t:r}=m.useTranslation(),i=e.jsxs(a.Button,{disabled:n==="SAVING",onClick:t=>{t.preventDefault(),l()},className:h.cn("flex h-auto w-fit items-center gap-x-2 p-1 px-2","bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",{"animate-pulse bg-gray-300 text-gray-900":n==="SAVING","bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white":n==="SAVED"}),size:"sm",variant:"outline",children:[e.jsx(s.FaCheck,{className:"text-sm text-white"}),e.jsx("span",{className:"text-sm",children:r(n==="SAVING"?"Saving":n==="SAVED"?"Saved":"Unsaved")})]});return e.jsx("div",{className:"flex items-center",children:i})},v=function(){const n=s.useBuilderProp("previewComponent"),[,r]=s.usePreviewMode(),{t:i}=m.useTranslation();return n?e.jsxs(a.Button,{onClick:t=>{t.preventDefault(),r(!0)},className:"flex h-auto w-fit items-center gap-x-2 p-1 px-2",size:"sm",variant:"outline",children:[e.jsx(p.EyeOpenIcon,{className:"text-xs"}),e.jsx("span",{className:"text-sm",children:i("Preview")})]}):null},f=()=>{const{fallbackLang:l,languages:n,selectedLang:r,setSelectedLang:i}=s.useLanguages(),t=(r==null?void 0:r.length)>0?r:l,g=x.useMemo(()=>{const o=[];return c.forEach(c.uniq([l,...n]),u=>{const d=c.get(s.LANGUAGES,u);d&&o.push({key:u,value:d,default:u===l})}),o},[l,n]);return c.isEmpty(n)&&t==="en"?null:c.isEmpty(n)&&t!=="en"?e.jsxs("div",{className:"flex items-center gap-x-1 text-sm text-blue-500 hover:text-blue-600",children:[e.jsx(s.FaLanguage,{className:"h-4 w-4"}),c.get(s.LANGUAGES,t)]}):e.jsxs(a.DropdownMenu,{children:[e.jsx(a.DropdownMenuTrigger,{asChild:!0,children:e.jsxs(a.Button,{size:"sm",variant:"outline",className:"flex items-center gap-x-1 text-blue-500 hover:text-blue-600",children:[e.jsx(s.FaLanguage,{className:"h-4 w-4"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{children:[" ",c.get(s.LANGUAGES,t)]}),e.jsx(p.ChevronDownIcon,{className:"h-4 w-4"})]})]})}),e.jsx(a.DropdownMenuContent,{className:"border-border",children:c.map(g,o=>e.jsxs(a.DropdownMenuItem,{className:h.cn("flex cursor-pointer items-center text-sm",o.key===t&&"!bg-blue-500 text-white hover:!text-white"),onClick:()=>i(o.key),children:[e.jsx("div",{children:o.value}),o.key===l?e.jsx(s.FaStar,{className:"ml-2 h-4 w-4 text-yellow-400"}):null]}))})]})},N=()=>{const l=s.useBuilderProp("topBarComponents.left",[]),n=s.useBuilderProp("topBarComponents.center",[]),r=s.useBuilderProp("topBarComponents.right",[]),i=s.useBuilderProp("editable",!0);return e.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("div",{className:"flex items-center space-x-2 font-bold",children:x.Children.toArray(l.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))})}),e.jsx("div",{className:"flex items-center space-x-2",children:x.Children.toArray(n.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(f,{}),e.jsx(a.Separator,{orientation:"vertical"}),e.jsx(v,{}),e.jsx(a.Separator,{orientation:"vertical"}),i?e.jsx(j,{}):null,x.Children.toArray(r.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))]})]})};exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),a=require("./context-menu-CYk-Ms8j.cjs"),s=require("./index-MwShWj1c.cjs"),m=require("react-i18next"),h=require("./iconBase-Cn2BsTrq.cjs"),p=require("@radix-ui/react-icons"),c=require("lodash-es");require("@chaibuilder/runtime");const j=()=>{const{savePage:l,saveState:n}=s.useSavePage(),{t:r}=m.useTranslation(),i=e.jsxs(a.Button,{disabled:n==="SAVING",onClick:t=>{t.preventDefault(),l()},className:h.cn("flex h-auto w-fit items-center gap-x-2 p-1 px-2","bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",{"animate-pulse bg-gray-300 text-gray-900":n==="SAVING","bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white":n==="SAVED"}),size:"sm",variant:"outline",children:[e.jsx(s.FaCheck,{className:"text-sm text-white"}),e.jsx("span",{className:"text-sm",children:r(n==="SAVING"?"Saving":n==="SAVED"?"Saved":"Unsaved")})]});return e.jsx("div",{className:"flex items-center",children:i})},v=function(){const n=s.useBuilderProp("previewComponent"),[,r]=s.usePreviewMode(),{t:i}=m.useTranslation();return n?e.jsxs(a.Button,{onClick:t=>{t.preventDefault(),r(!0)},className:"flex h-auto w-fit items-center gap-x-2 p-1 px-2",size:"sm",variant:"outline",children:[e.jsx(p.EyeOpenIcon,{className:"text-xs"}),e.jsx("span",{className:"text-sm",children:i("Preview")})]}):null},f=()=>{const{fallbackLang:l,languages:n,selectedLang:r,setSelectedLang:i}=s.useLanguages(),t=(r==null?void 0:r.length)>0?r:l,g=x.useMemo(()=>{const o=[];return c.forEach(c.uniq([l,...n]),u=>{const d=c.get(s.LANGUAGES,u);d&&o.push({key:u,value:d,default:u===l})}),o},[l,n]);return c.isEmpty(n)&&t==="en"?null:c.isEmpty(n)&&t!=="en"?e.jsxs("div",{className:"flex items-center gap-x-1 text-sm text-blue-500 hover:text-blue-600",children:[e.jsx(s.FaLanguage,{className:"h-4 w-4"}),c.get(s.LANGUAGES,t)]}):e.jsxs(a.DropdownMenu,{children:[e.jsx(a.DropdownMenuTrigger,{asChild:!0,children:e.jsxs(a.Button,{size:"sm",variant:"outline",className:"flex items-center gap-x-1 text-blue-500 hover:text-blue-600",children:[e.jsx(s.FaLanguage,{className:"h-4 w-4"}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("div",{children:[" ",c.get(s.LANGUAGES,t)]}),e.jsx(p.ChevronDownIcon,{className:"h-4 w-4"})]})]})}),e.jsx(a.DropdownMenuContent,{className:"border-border",children:c.map(g,o=>e.jsxs(a.DropdownMenuItem,{className:h.cn("flex cursor-pointer items-center text-sm",o.key===t&&"!bg-blue-500 text-white hover:!text-white"),onClick:()=>i(o.key),children:[e.jsx("div",{children:o.value}),o.key===l?e.jsx(s.FaStar,{className:"ml-2 h-4 w-4 text-yellow-400"}):null]}))})]})},N=()=>{const l=s.useBuilderProp("topBarComponents.left",[]),n=s.useBuilderProp("topBarComponents.center",[]),r=s.useBuilderProp("topBarComponents.right",[]),i=s.useBuilderProp("editable",!0);return e.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("div",{className:"flex items-center space-x-2 font-bold",children:x.Children.toArray(l.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))})}),e.jsx("div",{className:"flex items-center space-x-2",children:x.Children.toArray(n.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(f,{}),e.jsx(a.Separator,{orientation:"vertical"}),e.jsx(v,{}),e.jsx(a.Separator,{orientation:"vertical"}),i?e.jsx(j,{}):null,x.Children.toArray(r.map(t=>e.jsx(x.Suspense,{fallback:e.jsx(a.Skeleton,{className:"h-10"}),children:e.jsx(t,{})})))]})]})};exports.default=N;
@@ -4,7 +4,7 @@ import { isEmpty as h } from "lodash-es";
4
4
  import { createApi as T } from "unsplash-js";
5
5
  import { I as D, S as E, B as F } from "./context-menu-BtcwqA6V.js";
6
6
  import { useTranslation as K } from "react-i18next";
7
- import { d as U, C as P } from "./index-CtaCbdYK.js";
7
+ import { d as U, C as P } from "./index-Coh4Y4tF.js";
8
8
  import { useDebouncedState as V } from "@react-hookz/web";
9
9
  import { Loader as W } from "lucide-react";
10
10
  const A = async (g, b) => new Promise((t, o) => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("lodash-es"),_=require("unsplash-js"),v=require("./context-menu-CYk-Ms8j.cjs"),T=require("react-i18next"),b=require("./index-CSuRg8Z3.cjs"),B=require("@react-hookz/web"),L=require("lucide-react"),y=async(x,g)=>new Promise((n,l)=>{_.createApi({accessKey:g}).search.getPhotos(x).then(o=>{n(o)}).catch(o=>l(o))}),D=({isModalView:x,onSelect:g})=>{const n=b.useBuilderProp("unsplashAccessKey",""),[l,f]=r.useState([]),[o,j]=r.useState(0),[c,C]=r.useState(),[i,P]=r.useState(),[E,N]=r.useState(0),[p,I]=B.useDebouncedState("",1e3),[m,d]=r.useState(!1),{t:q}=T.useTranslation(),A=async a=>{if(h.isEmpty(p))return;let t=o+1;d(!0),j(t);const u={query:p,page:t};c&&(u.orientation=c),i&&(u.color=i),y(u,n).then(s=>{var S,w,k;f(t===1?((S=s==null?void 0:s.response)==null?void 0:S.results)||[]:[...l,...((w=s==null?void 0:s.response)==null?void 0:w.results)||[]]),N((k=s==null?void 0:s.response)==null?void 0:k.total_pages),d(!1)}).catch(()=>{d(!1)})};return r.useEffect(()=>{if(!h.isEmpty(p)&&n){d(!0);const a={query:p,page:1};c&&(a.orientation=c),i&&(a.color=i),j(1),y(a,n).then(t=>{var u,s;f(((u=t==null?void 0:t.response)==null?void 0:u.results)||[]),N((s=t==null?void 0:t.response)==null?void 0:s.total_pages),d(!1)}).catch(()=>{d(!1)})}},[c,i,p,n]),h.isEmpty(n)?e.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:e.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"px-1 underline hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("form",{className:"flex items-center gap-x-2 rounded-md border border-border bg-background p-px",children:[e.jsx(v.Input,{type:"text",name:"query",className:"text-foreground",placeholder:'Try "dog" or "apple"',onChange:a=>I(a.target.value)}),e.jsx("div",{children:e.jsx(b.ChaiSelect,{className:"w-40",placeholder:q("Orientation"),options:[{value:"",label:"All"},{value:"landscape",label:"Landscape"},{value:"portrait",label:"Portrait"},{value:"squarish",label:"Square"}],defaultValue:c,onValueChange:a=>C(a)})}),e.jsx("div",{children:e.jsx(b.ChaiSelect,{placeholder:q("Color"),options:[{value:"",label:"All"},{value:"black_and_white",label:"Black and White"},{value:"black",label:"Black"},{value:"white",label:"White"},{value:"night",label:"Night"},{value:"warm",label:"Warm"},{value:"cool",label:"Cool"},{value:"sepia",label:"Sepia"}],defaultValue:i,onValueChange:a=>P(a)})})]}),e.jsxs(v.ScrollArea,{className:`h-full ${x&&!h.isEmpty(l)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[h.isEmpty(l)&&!m&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsx("div",{className:"font-medium",children:"No Data"}),e.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),x?e.jsx("div",{className:"h-full columns-5 py-2",children:l.map(a=>e.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>g(a.urls.regular),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:a.alt_description,src:a.urls.small})})},a.id))}):l.map(a=>e.jsx("div",{className:"w-full px-2 py-1",children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:a.alt_description,src:a.urls.small})})},a.id)),m&&e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(L.Loader,{className:"h-6 w-6 animate-spin"}),"  Loading..."]}),!h.isEmpty(l)&&o<E&&!m&&e.jsx(v.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>A(),disabled:m,children:m?"":"Load More"})]})]})};exports.default=D;exports.fetchImage=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("lodash-es"),_=require("unsplash-js"),v=require("./context-menu-CYk-Ms8j.cjs"),T=require("react-i18next"),b=require("./index-MwShWj1c.cjs"),B=require("@react-hookz/web"),L=require("lucide-react"),y=async(x,g)=>new Promise((n,l)=>{_.createApi({accessKey:g}).search.getPhotos(x).then(o=>{n(o)}).catch(o=>l(o))}),D=({isModalView:x,onSelect:g})=>{const n=b.useBuilderProp("unsplashAccessKey",""),[l,f]=r.useState([]),[o,j]=r.useState(0),[c,C]=r.useState(),[i,P]=r.useState(),[E,N]=r.useState(0),[p,I]=B.useDebouncedState("",1e3),[m,d]=r.useState(!1),{t:q}=T.useTranslation(),A=async a=>{if(h.isEmpty(p))return;let t=o+1;d(!0),j(t);const u={query:p,page:t};c&&(u.orientation=c),i&&(u.color=i),y(u,n).then(s=>{var S,w,k;f(t===1?((S=s==null?void 0:s.response)==null?void 0:S.results)||[]:[...l,...((w=s==null?void 0:s.response)==null?void 0:w.results)||[]]),N((k=s==null?void 0:s.response)==null?void 0:k.total_pages),d(!1)}).catch(()=>{d(!1)})};return r.useEffect(()=>{if(!h.isEmpty(p)&&n){d(!0);const a={query:p,page:1};c&&(a.orientation=c),i&&(a.color=i),j(1),y(a,n).then(t=>{var u,s;f(((u=t==null?void 0:t.response)==null?void 0:u.results)||[]),N((s=t==null?void 0:t.response)==null?void 0:s.total_pages),d(!1)}).catch(()=>{d(!1)})}},[c,i,p,n]),h.isEmpty(n)?e.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:e.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"px-1 underline hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("form",{className:"flex items-center gap-x-2 rounded-md border border-border bg-background p-px",children:[e.jsx(v.Input,{type:"text",name:"query",className:"text-foreground",placeholder:'Try "dog" or "apple"',onChange:a=>I(a.target.value)}),e.jsx("div",{children:e.jsx(b.ChaiSelect,{className:"w-40",placeholder:q("Orientation"),options:[{value:"",label:"All"},{value:"landscape",label:"Landscape"},{value:"portrait",label:"Portrait"},{value:"squarish",label:"Square"}],defaultValue:c,onValueChange:a=>C(a)})}),e.jsx("div",{children:e.jsx(b.ChaiSelect,{placeholder:q("Color"),options:[{value:"",label:"All"},{value:"black_and_white",label:"Black and White"},{value:"black",label:"Black"},{value:"white",label:"White"},{value:"night",label:"Night"},{value:"warm",label:"Warm"},{value:"cool",label:"Cool"},{value:"sepia",label:"Sepia"}],defaultValue:i,onValueChange:a=>P(a)})})]}),e.jsxs(v.ScrollArea,{className:`h-full ${x&&!h.isEmpty(l)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[h.isEmpty(l)&&!m&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsx("div",{className:"font-medium",children:"No Data"}),e.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),x?e.jsx("div",{className:"h-full columns-5 py-2",children:l.map(a=>e.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>g(a.urls.regular),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:a.alt_description,src:a.urls.small})})},a.id))}):l.map(a=>e.jsx("div",{className:"w-full px-2 py-1",children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:a.alt_description,src:a.urls.small})})},a.id)),m&&e.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsx(L.Loader,{className:"h-6 w-6 animate-spin"}),"  Loading..."]}),!h.isEmpty(l)&&o<E&&!m&&e.jsx(v.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>A(),disabled:m,children:m?"":"Load More"})]})]})};exports.default=D;exports.fetchImage=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),i=require("lodash-es"),N=require("jotai"),S=require("./context-menu-CYk-Ms8j.cjs"),q=require("react-i18next"),b=require("./index-CSuRg8Z3.cjs"),y=require("lucide-react"),F=N.atom([]),U=({isModalView:r,onSelect:c})=>{const{t}=q.useTranslation(),x=b.useBuilderProp("uploadMediaCallback"),d=b.useBuilderProp("fetchMediaCallback"),[n,m]=N.useAtom(F),[v,h]=l.useState(!1),[f,p]=l.useState(!1),[,I]=l.useState(),[g,u]=l.useState("");l.useEffect(()=>{(async()=>{if(!d)return;p(!0);const s=await d();m(s||[]),p(!1)})()},[]);const w=s=>{var a,o;if(u(""),s&&((o=(a=s==null?void 0:s.target)==null?void 0:a.files)==null?void 0:o.length)>0){const j=s.target.files[0];j.type.startsWith("image")?k(j):u(t("Please select an image"))}},k=async s=>{if(x){h(!0);try{const{url:a}=await x(s);c(a),I(void 0);const o=await d();m(o)}catch(a){m([]),u((a==null?void 0:a.message)||"Something went wrong.")}h(!1)}};return e.jsxs("div",{children:[e.jsxs("label",{htmlFor:r?"upload-in-modal":"upload-in-panel",children:[e.jsx("div",{className:"flex flex-col items-center rounded-lg",children:e.jsxs("label",{htmlFor:"image-upload",className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-border",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[e.jsx(y.Upload,{className:"mb-3 h-10 w-10 text-gray-400"}),e.jsx("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsx("span",{className:"font-semibold",children:t("Click to upload")})}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("SVG, PNG, JPG or GIF (Max. 2mb)")})]}),v?e.jsxs("div",{className:"flex h-full w-full items-center justify-center",children:[e.jsx(y.Loader,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"ml-2 text-sm text-gray-500",children:t("Uploading...")})]}):null,g&&e.jsx("p",{className:"pb-2 text-xs text-red-500",children:g||t("Something went wrong")})]})}),e.jsx("input",{type:"file",id:"image-upload",accept:"image/*",hidden:!0,onChange:w})]}),e.jsxs(S.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${r?"px-2":""} pt-2`,children:[i.isEmpty(n)&&f&&e.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsx("div",{className:"animate-pulse font-medium",children:t("Fetching...")})}),i.isEmpty(n)&&!f&&e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"mb-4 h-12 rounded-full p-6"}),e.jsx("h3",{className:"mb-2 text-sm font-semibold",children:t("No images found")}),e.jsx("p",{className:"mb-4 max-w-sm text-muted-foreground",children:t("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.")})]}),r?e.jsx("div",{className:"h-full columns-5 py-2",children:i.map(n,s=>e.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>c(s.url),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.thumbUrl})})},s.id))}):i.map(n,s=>e.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>c(s.url),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.url})})},s.id))]})]})};exports.default=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),i=require("lodash-es"),N=require("jotai"),S=require("./context-menu-CYk-Ms8j.cjs"),q=require("react-i18next"),b=require("./index-MwShWj1c.cjs"),y=require("lucide-react"),F=N.atom([]),U=({isModalView:r,onSelect:c})=>{const{t}=q.useTranslation(),x=b.useBuilderProp("uploadMediaCallback"),d=b.useBuilderProp("fetchMediaCallback"),[n,m]=N.useAtom(F),[v,h]=l.useState(!1),[f,p]=l.useState(!1),[,I]=l.useState(),[g,u]=l.useState("");l.useEffect(()=>{(async()=>{if(!d)return;p(!0);const s=await d();m(s||[]),p(!1)})()},[]);const w=s=>{var a,o;if(u(""),s&&((o=(a=s==null?void 0:s.target)==null?void 0:a.files)==null?void 0:o.length)>0){const j=s.target.files[0];j.type.startsWith("image")?k(j):u(t("Please select an image"))}},k=async s=>{if(x){h(!0);try{const{url:a}=await x(s);c(a),I(void 0);const o=await d();m(o)}catch(a){m([]),u((a==null?void 0:a.message)||"Something went wrong.")}h(!1)}};return e.jsxs("div",{children:[e.jsxs("label",{htmlFor:r?"upload-in-modal":"upload-in-panel",children:[e.jsx("div",{className:"flex flex-col items-center rounded-lg",children:e.jsxs("label",{htmlFor:"image-upload",className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-border",children:[e.jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[e.jsx(y.Upload,{className:"mb-3 h-10 w-10 text-gray-400"}),e.jsx("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsx("span",{className:"font-semibold",children:t("Click to upload")})}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("SVG, PNG, JPG or GIF (Max. 2mb)")})]}),v?e.jsxs("div",{className:"flex h-full w-full items-center justify-center",children:[e.jsx(y.Loader,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"ml-2 text-sm text-gray-500",children:t("Uploading...")})]}):null,g&&e.jsx("p",{className:"pb-2 text-xs text-red-500",children:g||t("Something went wrong")})]})}),e.jsx("input",{type:"file",id:"image-upload",accept:"image/*",hidden:!0,onChange:w})]}),e.jsxs(S.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${r?"px-2":""} pt-2`,children:[i.isEmpty(n)&&f&&e.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsx("div",{className:"animate-pulse font-medium",children:t("Fetching...")})}),i.isEmpty(n)&&!f&&e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsx("div",{className:"mb-4 h-12 rounded-full p-6"}),e.jsx("h3",{className:"mb-2 text-sm font-semibold",children:t("No images found")}),e.jsx("p",{className:"mb-4 max-w-sm text-muted-foreground",children:t("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.")})]}),r?e.jsx("div",{className:"h-full columns-5 py-2",children:i.map(n,s=>e.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>c(s.url),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.thumbUrl})})},s.id))}):i.map(n,s=>e.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>c(s.url),children:e.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.name,src:s.url})})},s.id))]})]})};exports.default=U;
@@ -4,7 +4,7 @@ import { isEmpty as N, map as y } from "lodash-es";
4
4
  import { atom as U, useAtom as C } from "jotai";
5
5
  import { S } from "./context-menu-BtcwqA6V.js";
6
6
  import { useTranslation as G } from "react-i18next";
7
- import { d as v } from "./index-CtaCbdYK.js";
7
+ import { d as v } from "./index-Coh4Y4tF.js";
8
8
  import { Upload as P, Loader as A } from "lucide-react";
9
9
  const E = U([]), z = ({ isModalView: r, onSelect: d }) => {
10
10
  const { t: a } = G(), f = v("uploadMediaCallback"), c = v("fetchMediaCallback"), [o, m] = C(E), [w, p] = i(!1), [h, g] = i(!1), [, I] = i(), [x, u] = i("");
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CSuRg8Z3.cjs"),s=require("./iconBase-Cn2BsTrq.cjs"),o=require("@chaibuilder/runtime"),l=require("react-i18next"),t=require("i18next");exports.AISetContext=e.AISetContext;exports.AIUserPrompt=e.AIUserPrompt;exports.AddBlocksDialog=e.AddBlocksDialog;exports.AddBlocksPanel=e.AddBlocksPanel;exports.BlockAttributesEditor=e.BlockAttributesEditor;exports.BlockPropsEditor=e.BlockSettings;exports.BlockStyleEditor=e.BlockStyling;exports.CHAI_BUILDER_EVENTS=e.CHAI_BUILDER_EVENTS;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiDraggableBlock=e.ChaiDraggableBlock;exports.DarkModeSwitcher=e.DarkMode;exports.DefaultChaiBlocks=e.DefaultChaiBlocks;exports.ImportHTML=e.ImportHTML;exports.Outline=e.ListTree;exports.ScreenSizes=e.Breakpoints;exports.ThemeOptions=e.ThemeConfigPanel;exports.UILibraries=e.UILibrariesPanel;exports.UndoRedo=e.UndoRedo;exports.emitChaiBuilderMsg=e.emitChaiBuilderMsg;exports.getBlocksFromHTML=e.getBlocksFromHTML;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.useAddBlock=e.useAddBlock;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useBlockHighlight=e.useBlockHighlight;exports.useBlocksStore=e.useBlocksStore;exports.useBlocksStoreUndoableActions=e.useBlocksStoreUndoableActions;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useChaiBuilderMsgListener=e.useChaiBuilderMsgListener;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGlobalBlocksList=e.useGlobalBlocksList;exports.useGlobalBlocksStore=e.useGlobalBlocksStore;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLanguages=e.useLanguages;exports.useLayoutVariant=e.useLayoutVariant;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;exports.generateBlockId=s.generateUUID;exports.mergeClasses=s.cn;Object.defineProperty(exports,"registerChaiBlock",{enumerable:!0,get:()=>o.registerChaiBlock});Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>l.useTranslation});exports.i18n=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-MwShWj1c.cjs"),s=require("./iconBase-Cn2BsTrq.cjs"),o=require("@chaibuilder/runtime"),l=require("react-i18next"),t=require("i18next");exports.AISetContext=e.AISetContext;exports.AIUserPrompt=e.AIUserPrompt;exports.AddBlocksDialog=e.AddBlocksDialog;exports.AddBlocksPanel=e.AddBlocksPanel;exports.BlockAttributesEditor=e.BlockAttributesEditor;exports.BlockPropsEditor=e.BlockSettings;exports.BlockStyleEditor=e.BlockStyling;exports.CHAI_BUILDER_EVENTS=e.CHAI_BUILDER_EVENTS;exports.ChaiBuilderCanvas=e.CanvasArea;exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.ChaiDraggableBlock=e.ChaiDraggableBlock;exports.DarkModeSwitcher=e.DarkMode;exports.DefaultChaiBlocks=e.DefaultChaiBlocks;exports.ImportHTML=e.ImportHTML;exports.Outline=e.ListTree;exports.ScreenSizes=e.Breakpoints;exports.ThemeOptions=e.ThemeConfigPanel;exports.UILibraries=e.UILibrariesPanel;exports.UndoRedo=e.UndoRedo;exports.emitChaiBuilderMsg=e.emitChaiBuilderMsg;exports.getBlocksFromHTML=e.getBlocksFromHTML;exports.getClassValueAndUnit=e.getClassValueAndUnit;exports.useAddBlock=e.useAddBlock;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useBlockHighlight=e.useBlockHighlight;exports.useBlocksStore=e.useBlocksStore;exports.useBlocksStoreUndoableActions=e.useBlocksStoreUndoableActions;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;exports.useChaiBuilderMsgListener=e.useChaiBuilderMsgListener;exports.useCodeEditor=e.useCodeEditor;exports.useCopyBlockIds=e.useCopyBlockIds;exports.useCopyToClipboard=e.useCopyToClipboard;exports.useCurrentPage=e.useCurrentPage;exports.useCutBlockIds=e.useCutBlockIds;exports.useDarkMode=e.useDarkMode;exports.useDuplicateBlocks=e.useDuplicateBlocks;exports.useGlobalBlocksList=e.useGlobalBlocksList;exports.useGlobalBlocksStore=e.useGlobalBlocksStore;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.useLanguages=e.useLanguages;exports.useLayoutVariant=e.useLayoutVariant;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useRemoveBlocks=e.useRemoveBlocks;exports.useRemoveClassesFromBlocks=e.useRemoveClassesFromBlocks;exports.useSavePage=e.useSavePage;exports.useSelectedBlock=e.useSelectedBlock;exports.useSelectedBlockAllClasses=e.useSelectedBlockAllClasses;exports.useSelectedBlockCurrentClasses=e.useSelectedBlockCurrentClasses;exports.useSelectedBlockIds=e.useSelectedBlockIds;exports.useSelectedBlocksDisplayChild=e.useSelectedBlocksDisplayChild;exports.useSelectedBreakpoints=e.useSelectedBreakpoints;exports.useSelectedStylingBlocks=e.useSelectedStylingBlocks;exports.useStylingBreakpoint=e.useStylingBreakpoint;exports.useStylingState=e.useStylingState;exports.useUILibraryBlocks=e.useUILibraryBlocks;exports.useUndoManager=e.useUndoManager;exports.useUpdateBlocksProps=e.useUpdateBlocksProps;exports.useUpdateBlocksPropsRealtime=e.useUpdateBlocksPropsRealtime;exports.generateBlockId=s.generateUUID;exports.mergeClasses=s.cn;Object.defineProperty(exports,"registerChaiBlock",{enumerable:!0,get:()=>o.registerChaiBlock});Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>l.useTranslation});exports.i18n=t;
package/dist/core.d.ts CHANGED
@@ -17,8 +17,9 @@ declare type AddBlocks = {
17
17
 
18
18
  export declare const AddBlocksDialog: () => JSX_2.Element;
19
19
 
20
- export declare const AddBlocksPanel: ({ className, showHeading, parentId, }: {
20
+ export declare const AddBlocksPanel: ({ className, showHeading, parentId, position, }: {
21
21
  parentId?: string;
22
+ position?: number;
22
23
  showHeading?: boolean;
23
24
  className?: string;
24
25
  }) => JSX_2.Element;
@@ -260,13 +261,14 @@ declare type ChaiBuilderInstance = {
260
261
  * It handles the drag start event by setting the dragged block and emitting a message to close the add block panel.
261
262
  * block, blocks, html
262
263
  */
263
- export declare const ChaiDraggableBlock: ({ block, html, blocks, children }: ChaiDraggableBlockProps) => JSX_2.Element;
264
+ export declare const ChaiDraggableBlock: ({ block, html, blocks, children, dropParentId }: ChaiDraggableBlockProps) => JSX_2.Element;
264
265
 
265
266
  declare type ChaiDraggableBlockProps = {
266
267
  html?: string | (() => Promise<any>);
267
268
  block?: any | (() => Promise<any>);
268
269
  blocks?: any | (() => Promise<any>);
269
270
  children: default_2.ReactNode;
271
+ dropParentId?: null | undefined | string;
270
272
  };
271
273
 
272
274
  declare type ChaiPage = {
@@ -313,8 +315,9 @@ declare type DataProvider = {
313
315
  args: Record<string, any>;
314
316
  };
315
317
 
316
- export declare const DefaultChaiBlocks: ({ parentId, gridCols }: {
318
+ export declare const DefaultChaiBlocks: ({ parentId, position, gridCols, }: {
317
319
  parentId?: string;
320
+ position: number;
318
321
  gridCols?: string;
319
322
  }) => JSX_2.Element;
320
323
 
@@ -353,8 +356,9 @@ declare type GlobalBlockList = Record<string, {
353
356
 
354
357
  export { i18n }
355
358
 
356
- export declare const ImportHTML: ({ parentId }: {
359
+ export declare const ImportHTML: ({ parentId, position }: {
357
360
  parentId?: string;
361
+ position: number;
358
362
  }) => JSX_2.Element;
359
363
 
360
364
  declare type LayoutVariant = "SINGLE_SIDE_PANEL" | "DUAL_SIDE_PANEL" | "DUAL_SIDE_PANEL_ADVANCED";
@@ -401,8 +405,9 @@ declare type TStyleBlock = {
401
405
  prop: string;
402
406
  };
403
407
 
404
- export declare const UILibraries: ({ parentId }: {
408
+ export declare const UILibraries: ({ parentId, position }: {
405
409
  parentId?: string;
410
+ position: number;
406
411
  }) => JSX_2.Element;
407
412
 
408
413
  declare interface UILibrary {
@@ -514,7 +519,7 @@ export declare const useGlobalBlocksList: () => {
514
519
  };
515
520
 
516
521
  export declare const useGlobalBlocksStore: () => {
517
- getGlobalBlocks: (block: ChaiBlock) => any;
522
+ getGlobalBlocks: (globalBlockId: string) => any;
518
523
  reset: () => void;
519
524
  };
520
525
 
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as a, s as o, n as l, A as t, t as r, B as u, l as i, q as d, j as c, v as B, m as k, w as n, D as C, I as g, k as p, x as S, T as m, U as h, y as I, o as A, E as P, z as U, N as b, O as y, $ as D, J as E, ae as L, a1 as M, d as f, M as v, P as T, Q as x, p as H, u as R, R as O, S as V, V as w, W as G, X as _, Y as z, G as F, H as N, Z as W, _ as Z, g as j, ad as q, a0 as J, f as K, a2 as Q, a3 as X, e as Y, a6 as $, a5 as ss, a4 as es, a as as, aa as os, ab as ls, ac as ts, a7 as rs, a9 as us, a8 as is, K as ds, b as cs, c as Bs } from "./index-CtaCbdYK.js";
1
+ import { r as a, s as o, n as l, A as t, t as r, B as u, l as i, q as d, j as c, v as B, m as k, w as n, D as C, I as g, k as p, x as S, T as m, U as h, y as I, o as A, E as P, z as U, N as b, O as y, $ as D, J as E, ae as L, a1 as M, d as f, M as v, P as T, Q as x, p as H, u as R, R as O, S as V, V as w, W as G, X as _, Y as z, G as F, H as N, Z as W, _ as Z, g as j, ad as q, a0 as J, f as K, a2 as Q, a3 as X, e as Y, a6 as $, a5 as ss, a4 as es, a as as, aa as os, ab as ls, ac as ts, a7 as rs, a9 as us, a8 as is, K as ds, b as cs, c as Bs } from "./index-Coh4Y4tF.js";
2
2
  import { g as ns, c as Cs } from "./iconBase-DHfFLkem.js";
3
3
  import { registerChaiBlock as ps } from "@chaibuilder/runtime";
4
4
  import { useTranslation as ms } from "react-i18next";