@chaibuilder/sdk 1.2.30 → 1.2.32
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/{AddBlocks-u1FkSHNj.js → AddBlocks-0eVRNr1d.js} +1 -1
- package/dist/{AddBlocks-UxJOFB9M.cjs → AddBlocks-t0hKDSud.cjs} +1 -1
- package/dist/{BrandingOptions-RDn_Nhcq.cjs → BrandingOptions-NVmCxZfD.cjs} +1 -1
- package/dist/{BrandingOptions-A3_c_sd7.js → BrandingOptions-yYAznnw2.js} +1 -1
- package/dist/{CanvasArea-3D9rpjpk.js → CanvasArea-2b4oSjRx.js} +68 -70
- package/dist/{CanvasArea-e829y1ts.cjs → CanvasArea-OzyCq6UU.cjs} +4 -4
- package/dist/{CurrentPage-VbdmddMv.js → CurrentPage-1v40uk8K.js} +3 -3
- package/dist/{CurrentPage-5xKDQqvg.cjs → CurrentPage-YBMhEBZG.cjs} +1 -1
- package/dist/{ListTree-c9Z0kWbN.js → ListTree-0ZrRreCs.js} +1 -1
- package/dist/{ListTree-pdQ14QJC.cjs → ListTree-jPwxgI6R.cjs} +1 -1
- package/dist/{PagesPanel-_VzJ1__k.js → PagesPanel-AxQX-BX2.js} +4 -4
- package/dist/{PagesPanel-wex1zGzm.cjs → PagesPanel-ivEL9tIQ.cjs} +1 -1
- package/dist/{ProjectPanel-rPNO2QsE.js → ProjectPanel-GYdge5v9.js} +4 -4
- package/dist/{ProjectPanel-N6iWd_4Z.cjs → ProjectPanel-shgvg_yT.cjs} +1 -1
- package/dist/{Settings-jTl7IOPc.js → Settings-9JAzGHau.js} +5 -5
- package/dist/Settings-MMwEBADN.cjs +1 -0
- package/dist/{SidePanels-jYJEFpxC.js → SidePanels-bLwsW29O.js} +3 -3
- package/dist/{SidePanels-mx5TyZBn.cjs → SidePanels-iaaRCUeQ.cjs} +1 -1
- package/dist/{Topbar-VCFW9uNI.js → Topbar-0Ql8pHVc.js} +1 -1
- package/dist/{Topbar-J2tb4SA1.cjs → Topbar-CkUhCnSW.cjs} +1 -1
- package/dist/{UnsplashImages-N9h0avWO.js → UnsplashImages-NYwOOgYa.js} +1 -1
- package/dist/{UnsplashImages-XwjKheek.cjs → UnsplashImages-juwtWvXe.cjs} +1 -1
- package/dist/{UploadImages-y7LAQVrT.cjs → UploadImages-4_jmnoVi.cjs} +1 -1
- package/dist/{UploadImages-e70AeNGX.js → UploadImages-vpZeW-YW.js} +1 -1
- package/dist/{add-page-modal-v5smARyL.cjs → add-page-modal-2ZPjc54F.cjs} +1 -1
- package/dist/{add-page-modal-o1euqbsp.js → add-page-modal-hDyzsEU7.js} +4 -4
- package/dist/{confirm-alert-EDOFRmH8.js → confirm-alert-FGQKKQJU.js} +1 -1
- package/dist/{confirm-alert-4OQlXZTJ.cjs → confirm-alert-QRxOc76t.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-DNjqQuop.cjs → delete-page-modal--N1nPPIL.cjs} +1 -1
- package/dist/{delete-page-modal-QzRkBAct.js → delete-page-modal-KxeyBri2.js} +3 -3
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-yw3Uuk6v.js → form-77dY98bF.js} +1 -1
- package/dist/{form-jQj7E-hS.cjs → form-hT5dGoJH.cjs} +1 -1
- package/dist/functions-I6BoMqqb.js +21 -0
- package/dist/functions-r3ExvGGf.cjs +1 -0
- package/dist/{index-DtBYhldP.js → index-5zkCTSAM.js} +3 -3
- package/dist/{index-SEJRE2ab.js → index-AJalHhkO.js} +2 -2
- package/dist/index-FPBudsRF.cjs +1 -0
- package/dist/{index-5c_rU-9B.cjs → index-JIcsKKoG.cjs} +1 -1
- package/dist/{index-HiiWSXkE.js → index-hH5SIZ29.js} +358 -358
- package/dist/{index-DHwvjZ5z.cjs → index-sJ9Uc9UY.cjs} +2 -2
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +1126 -96
- package/dist/{page-viewer-87wtE0pN.cjs → page-viewer-k-g15j8B.cjs} +1 -1
- package/dist/{page-viewer-1vswRGpL.js → page-viewer-umQaut1j.js} +4 -4
- package/dist/{project-general-setting-RSG7ZQSx.cjs → project-general-setting-1leAiCJQ.cjs} +1 -1
- package/dist/{project-general-setting-SE9QJ6mF.js → project-general-setting-uuCemMCU.js} +4 -4
- package/dist/{project-seo-setting-x3peNgla.js → project-seo-setting-asvbPQiI.js} +2 -2
- package/dist/{project-seo-setting-q2953ybQ.cjs → project-seo-setting-kDBSOzgX.cjs} +1 -1
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +0 -2
- package/dist/render.js +125 -166
- package/dist/{single-page-detail-bels-Cjo.js → single-page-detail-F6pKWyq1.js} +5 -5
- package/dist/{single-page-detail-8Arndzmw.cjs → single-page-detail-IFtVxwl5.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/useCanvasSettings-Am2o80hW.cjs +1 -0
- package/dist/{useCanvasSettings-unTQUdlP.js → useCanvasSettings-ikt217kv.js} +1 -1
- package/package.json +2 -2
- package/dist/Settings-mlh0i_1M.cjs +0 -1
- package/dist/defaultTheme-7VqqhOcp.cjs +0 -1
- package/dist/defaultTheme-D8B4-wHO.js +0 -1053
- package/dist/index-12HbDLon.cjs +0 -1
- package/dist/useCanvasSettings-MR0Glu1b.cjs +0 -1
|
@@ -3,7 +3,7 @@ import y, { createElement as D, useState as g, useCallback as O, useMemo as U, u
|
|
|
3
3
|
import { has as F, isFunction as W, first as h, omit as Y, noop as J, isEmpty as b, filter as v, values as k, groupBy as w, mergeWith as K, isArray as L, keys as Q, get as X, map as A, uniq as Z, includes as $, find as ee, reject as I } from "lodash-es";
|
|
4
4
|
import { useAtom as N } from "jotai";
|
|
5
5
|
import { useTranslation as H } from "react-i18next";
|
|
6
|
-
import { L as _, r as S, Y as se, at as P, ap as te, aq as re, ar as oe, h as T, a3 as G, aj as le, ak as ae, al as ie, am as ce, an as E, bo as ne, bp as de, bq as me, br as pe, aB as ue, bs as xe, bt as he, B as fe, bu as ge, bv as je, bw as be, au as ve, av as ke, aw as C, bi as ye, bb as Be, bc as Ne, bd as Ce, be as we, S as Ae } from "./index-
|
|
6
|
+
import { L as _, r as S, Y as se, at as P, ap as te, aq as re, ar as oe, h as T, a3 as G, aj as le, ak as ae, al as ie, am as ce, an as E, bo as ne, bp as de, bq as me, br as pe, aB as ue, bs as xe, bt as he, B as fe, bu as ge, bv as je, bw as be, au as ve, av as ke, aw as C, bi as ye, bb as Be, bc as Ne, bd as Ce, be as we, S as Ae } from "./index-hH5SIZ29.js";
|
|
7
7
|
import { BoxIcon as Te } from "@radix-ui/react-icons";
|
|
8
8
|
import { syncBlocksWithDefaults as M, useChaiBlocks as q } from "@chaibuilder/runtime";
|
|
9
9
|
import { useFeature as _e } from "flagged";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),t=require("lodash-es"),y=require("jotai"),v=require("react-i18next"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),t=require("lodash-es"),y=require("jotai"),v=require("react-i18next"),s=require("./index-FPBudsRF.cjs"),B=require("@radix-ui/react-icons"),b=require("@chaibuilder/runtime"),q=require("flagged"),R=require("./STRINGS-gPz7CUOk.cjs"),N=require("lucide-react"),C=require("./html-to-json-Xhu27KFD.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("himalaya");const T=({block:r})=>{const{type:i,icon:u,label:c}=r,{addCoreBlock:m,addPredefinedBlock:d}=s.useAddBlock(),[x,o]=s.useSelectedBlockIds(),[,j]=s.useHighlightBlockId(),[,p]=y.useAtom(s.activePanelAtom),l=()=>{if(t.has(r,"blocks")){const h=t.isFunction(r.blocks)?r.blocks():r.blocks;d(b.syncBlocksWithDefaults(h),t.first(x))}else m(r,t.first(x));p(R.OUTLINE_KEY)},a=q.useFeature("dnd");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs(s.Tooltip,{children:[e.jsxRuntimeExports.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{onClick:l,type:"button",onDragStart:h=>{h.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{o([]),j(null),p(R.OUTLINE_KEY)},200)},draggable:a?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(a?"cursor-grab":"cursor-pointer"),children:[n.createElement(u||B.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:c||i})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:c||i})})]})})},A=({block:r,closePopover:i})=>{const[u,c]=n.useState(!1),m=s.useBuilderProp("getExternalPredefinedBlock",t.noop()),{addCoreBlock:d,addPredefinedBlock:x}=s.useAddBlock(),[o]=s.useSelectedBlockIds(),j=n.useCallback(async p=>{if(p.stopPropagation(),t.has(r,"component")){d(r,t.first(o)),i();return}c(!0);const l=await m(r);t.isEmpty(l)||x(b.syncBlocksWithDefaults(l),t.first(o)),i()},[r]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",{onClick:u?()=>{}:j,className:"relative cursor-pointer overflow-hidden rounded-md border border-transparent duration-200 hover:scale-x-105 hover:border-foreground/20 hover:shadow-2xl",children:[u&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black bg-opacity-70",children:[e.jsxRuntimeExports.jsx(N.Loader,{className:"animate-spin",size:15,color:"white"})," ",e.jsxRuntimeExports.jsx("span",{className:"pl-2 text-sm text-white",children:"Adding..."})]}),r.preview?e.jsxRuntimeExports.jsx("img",{src:r.preview,className:"min-h-[50px] w-full rounded-md border border-gray-300",alt:r.label}):e.jsxRuntimeExports.jsx("div",{className:"flex h-20 items-center justify-center rounded-md border border-border border-gray-300 bg-gray-200",children:e.jsxRuntimeExports.jsx("p",{className:"max-w-xs text-center text-sm text-gray-700",children:r.label})})]})})},w=()=>{const{data:r}=s.useUILibraryBlocks(),i=b.useChaiBlocks(),u=t.filter(t.values(i),{category:"custom"}),c=t.groupBy(u,"group"),m=t.groupBy(r,"group"),d=n.useMemo(()=>t.mergeWith(c,m,(l,a)=>{if(t.isArray(l)&&t.isArray(a))return[...l,...a]}),[c,m]),[x,o]=n.useState(t.first(t.keys(d))||""),[,j]=y.useAtom(s.activePanelAtom),p=t.get(d,x,[]);return e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full flex-col overflow-hidden py-2",children:[e.jsxRuntimeExports.jsx("div",{className:"sticky top-0 flex w-full items-center p-3",children:e.jsxRuntimeExports.jsxs(s.Select,{value:x,onValueChange:l=>o(l),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:"Select a provider"})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:"Choose"}),n.Children.toArray(t.map(d,(l,a)=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:a,children:a},a)))]})]})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-full space-y-2 overflow-y-auto px-2",children:n.Children.toArray(p.map(l=>e.jsxRuntimeExports.jsx(A,{block:l,closePopover:()=>j(R.OUTLINE_KEY)})))})]})},S=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState(""),{addPredefinedBlock:c}=s.useAddBlock(),[m]=s.useSelectedBlockIds(),[,d]=y.useAtom(s.activePanelAtom),x=()=>{const o=C.getBlocksFromHTML(i);c([...o],t.first(m)||null),u(""),d(R.OUTLINE_KEY)};return e.jsxRuntimeExports.jsxs(s.Card,{className:"border-border/0 p-0 shadow-none",children:[e.jsxRuntimeExports.jsx(s.CardHeader,{className:"p-3",children:e.jsxRuntimeExports.jsx(s.CardDescription,{children:r("html_snippet_description")})}),e.jsxRuntimeExports.jsx(s.CardContent,{className:"space-y-2 px-3 py-0",children:e.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[e.jsxRuntimeExports.jsx(s.Label,{htmlFor:"current",className:"text-sm",children:r("tailwind_html_snippet")}),e.jsxRuntimeExports.jsx(s.Textarea,{autoFocus:!0,tabIndex:1,ref:o=>o&&o.focus(),onChange:o=>u(o.target.value),rows:12,value:i,placeholder:r("enter_code_snippet"),className:"resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"})]})}),e.jsxRuntimeExports.jsxs(s.CardFooter,{className:"flex flex-col justify-end p-3",children:[e.jsxRuntimeExports.jsx(s.Button,{disabled:i.trim()==="",onClick:()=>x(),size:"sm",className:"w-full",children:r("import_html")}),e.jsxRuntimeExports.jsx(s.Alert,{variant:"default",className:"mt-2 border-none p-1 text-gray-400",children:e.jsxRuntimeExports.jsx(s.AlertTitle,{className:"text-xs font-normal leading-4",children:r("note_imported_html")})})]})]})},_=()=>{const{t:r}=v.useTranslation(),[i,u]=n.useState("core"),[c,m]=n.useState("basic"),d=b.useChaiBlocks(),[,x]=y.useAtom(s.showPredefinedBlockCategoryAtom),o=s.useBuilderProp("importHTMLSupport",!0),j=s.useBuilderProp("filterChaiBlock",()=>!0),{data:p,isLoading:l}=s.useUILibraryBlocks(),a=t.filter(d,j),h=t.groupBy(a,"category"),g=t.uniq(t.map(h.core,"group"));n.useEffect(()=>{!t.includes(g,c)&&!t.isEmpty(g)&&!t.isEmpty(c)&&m(t.first(g))},[g,c]);const E=!l&&!t.isEmpty(p)||t.find(t.values(a),{category:"custom"})!==void 0;return e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-72 flex-col overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:[e.jsxRuntimeExports.jsx("h1",{className:"flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col",children:r("add_block")}),e.jsxRuntimeExports.jsx("span",{className:"p-0 text-xs font-light leading-3 opacity-80 xl:pl-1",children:r(i==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:f=>{x(""),u(f)},value:i,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(E&&o?"grid-cols-3":E&&!o||!E&&o?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),E?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"ui-blocks",children:r("ui_library")}):null,o?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),i==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:n.Children.toArray(t.map(g,f=>t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:f,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:f,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:f}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:n.Children.toArray(t.reject(t.filter(t.values(h.core),{group:f}),{hidden:!0}).map(k=>e.jsxRuntimeExports.jsx(T,{block:k})))})})]})}):null))})}),i==="ui-blocks"&&e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-32 w-full"}),children:e.jsxRuntimeExports.jsx(w,{})}),i==="html"&&o?e.jsxRuntimeExports.jsx(S,{}):null]})};exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-Z_BpKhVy.cjs"),B=require("react"),R=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-Z_BpKhVy.cjs"),B=require("react"),R=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),p=require("./index-FPBudsRF.cjs"),r=require("./controls-KK2oLIa8.cjs"),f=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("./Class-Zc8hpE7f.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const x=N(B),k=({value:t,onChange:e,id:i,onBlur:l})=>{const n=f.debounce(e,200),v=u=>n(u.target.value);return a.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:a.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:a.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:t,onBlur:({target:{value:u}})=>l(i,u),onChange:v})})})},m=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"}],P=()=>{const t=p.useBuilderProp("onSaveBrandingOptions",f.noop),[e,i]=p.useBrandingOptions(),[l]=p.useBlocksContainer(),n=x.useRef(e);x.useEffect(()=>()=>{f.isEqual(e,n.current)||t(n.current)},[]);const v=({formData:o},c)=>{c&&(i(o),n.current=o)},{bodyFont:u,headingFont:q,primaryColor:b,bodyTextDarkColor:h,bodyTextLightColor:y,bodyBgDarkColor:S,secondaryColor:C,bodyBgLightColor:O,roundedCorners:j}=e;let s={headingFont:r.s({title:"Heading font",default:q,options:m}),bodyFont:r.s({title:"Body font",default:u,options:m}),roundedCorners:r.c({title:"Rounded Corner",default:parseInt(j||5,10)}),primaryColor:r.f({title:"Primary",default:b}),secondaryColor:r.f({title:"Secondary",default:C})};l||(s={...s,bodyBgLightColor:r.f({title:"Body Background (Light Mode)",default:O}),bodyTextLightColor:r.f({title:"Body Text (Light Mode)",default:h}),bodyBgDarkColor:r.f({title:"Body Background (Dark mode)",default:S}),bodyTextDarkColor:r.f({title:"Body Text (Dark mode)",default:y})});const d={type:"object",properties:{}},g={};return Object.keys(s).forEach(o=>{const c=s[o];return d.properties||(d.properties={}),d.properties[o]=c.schema,g[o]=c.uiSchema,!0}),a.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-60 select-none flex-col",children:[a.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:a.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Branding Options"})}),a.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:a.jsxRuntimeExports.jsx(E,{widgets:{color:k},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:g,schema:d,formData:e,validator:R,onChange:v})})]})};exports.default=P;
|
|
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import N from "@rjsf/validator-ajv8";
|
|
4
4
|
import j from "@rjsf/core";
|
|
5
|
-
import { h as k, F as D, bD as w } from "./index-
|
|
5
|
+
import { h as k, F as D, bD as w } from "./index-hH5SIZ29.js";
|
|
6
6
|
import { s as f, c as P, f as a } from "./controls-OfJWSEqC.js";
|
|
7
7
|
import { debounce as R, noop as F, isEqual as L } from "lodash-es";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -2,10 +2,10 @@ var Le = Object.defineProperty;
|
|
|
2
2
|
var Re = (n, o, e) => o in n ? Le(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
|
|
3
3
|
var _ = (n, o, e) => (Re(n, typeof o != "symbol" ? o + "" : o, e), e);
|
|
4
4
|
import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
-
import
|
|
5
|
+
import N, { createElement as se, useCallback as P, useState as j, useEffect as b, Component as ue, Children as Fe, Suspense as he, useRef as oe, useMemo as Pe } from "react";
|
|
6
6
|
import { map as F, includes as ne, toUpper as Y, round as Oe, noop as T, has as Q, throttle as me, isEmpty as S, first as z, omit as He, pick as ze, get as f, isString as X, memoize as Ue, each as We, find as qe, filter as ge, isNull as Ke } from "lodash-es";
|
|
7
7
|
import { ResetIcon as re, MobileIcon as ie, LaptopIcon as Ye, DesktopIcon as Je, DotsVerticalIcon as Qe, EraserIcon as Ze, ZoomInIcon as Ge, DragHandleDots2Icon as Xe, ArrowUpIcon as Ve, CopyIcon as et, TrashIcon as tt } from "@radix-ui/react-icons";
|
|
8
|
-
import { v as fe, B as U, V as xe, aB as st, aC as ot, aD as nt, aE as rt, aF as it, N as V, ab as at, h as W, aG as lt, aH as ct, aI as dt, aJ as pt, aK as ut, aL as ht, aM as mt, r as C, ac as
|
|
8
|
+
import { v as fe, B as U, V as xe, aB as st, aC as ot, aD as nt, aE as rt, aF as it, N as V, ab as at, h as W, aG as lt, aH as ct, aI as dt, aJ as pt, aK as ut, aL as ht, aM as mt, r as C, ac as A, A as gt, a as ft, b as xt, c as $t, d as vt, e as yt, f as bt, g as kt, ai as wt, O as $e, aA as H, L as jt, aN as Ct, Y as M, a5 as Bt, aO as L, aP as St, E as ee, t as ve, q as ye, s as be, z as Dt, aQ as It, aR as ke, aS as _t, aT as Nt, F as At, aU as Mt, a1 as Et, aV as Tt, S as we } from "./index-hH5SIZ29.js";
|
|
9
9
|
import { useTranslation as q } from "react-i18next";
|
|
10
10
|
import { useAtom as k } from "jotai";
|
|
11
11
|
import ae from "react-dom";
|
|
@@ -15,16 +15,16 @@ import { useFeature as je } from "flagged";
|
|
|
15
15
|
import { flip as Rt } from "@floating-ui/dom";
|
|
16
16
|
import { useFloating as Ft, shift as Pt } from "@floating-ui/react-dom";
|
|
17
17
|
import { useResizeObserver as Ot } from "@react-hookz/web";
|
|
18
|
-
import
|
|
19
|
-
import zt from "@tailwindcss/
|
|
20
|
-
import Ut from "@tailwindcss/
|
|
21
|
-
import Wt from "
|
|
18
|
+
import Ht from "@tailwindcss/typography";
|
|
19
|
+
import zt from "@tailwindcss/forms";
|
|
20
|
+
import Ut from "@tailwindcss/aspect-ratio";
|
|
21
|
+
import Wt from "tailwindcss-palette-generator";
|
|
22
22
|
import { Provider as qt } from "react-wrap-balancer";
|
|
23
23
|
import { twMerge as Kt } from "tailwind-merge";
|
|
24
24
|
import { S as le, a as Ce } from "./STRINGS--j49GZJP.js";
|
|
25
25
|
import { getBlockComponent as Yt } from "@chaibuilder/runtime";
|
|
26
|
-
import { u as Jt, B as Qt, E as Zt } from "./index-
|
|
27
|
-
import { u as Gt } from "./useCanvasSettings-
|
|
26
|
+
import { u as Jt, B as Qt, E as Zt } from "./index-AJalHhkO.js";
|
|
27
|
+
import { u as Gt } from "./useCanvasSettings-ikt217kv.js";
|
|
28
28
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
29
29
|
import "./Functions-7jnEwJyw.js";
|
|
30
30
|
import "clsx";
|
|
@@ -208,7 +208,7 @@ const ce = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
208
208
|
] })
|
|
209
209
|
] });
|
|
210
210
|
}, ss = () => {
|
|
211
|
-
const { t: n } = q(), { setNewBlocks: o } = mt(), [, e] = C(), [, t] =
|
|
211
|
+
const { t: n } = q(), { setNewBlocks: o } = mt(), [, e] = C(), [, t] = A(), s = P(() => {
|
|
212
212
|
o([]), e([]), t([]);
|
|
213
213
|
}, [o]);
|
|
214
214
|
return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(gt, { children: [
|
|
@@ -330,7 +330,7 @@ const ce = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
330
330
|
let Be, Se;
|
|
331
331
|
typeof document < "u" && (Be = document);
|
|
332
332
|
typeof window < "u" && (Se = window);
|
|
333
|
-
const De =
|
|
333
|
+
const De = N.createContext({ document: Be, window: Se }), K = () => N.useContext(De), { Provider: is, Consumer: Mo } = De;
|
|
334
334
|
class Ie extends ue {
|
|
335
335
|
componentDidMount() {
|
|
336
336
|
this.props.contentDidMount();
|
|
@@ -363,7 +363,7 @@ class Z extends ue {
|
|
|
363
363
|
_(this, "loadCheck", () => setInterval(() => {
|
|
364
364
|
this.handleLoad();
|
|
365
365
|
}, 500));
|
|
366
|
-
this._isMounted = !1, this.nodeRef =
|
|
366
|
+
this._isMounted = !1, this.nodeRef = N.createRef(), this.state = { iframeLoaded: !1 };
|
|
367
367
|
}
|
|
368
368
|
componentDidMount() {
|
|
369
369
|
this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
|
|
@@ -421,7 +421,7 @@ _(Z, "propTypes", {
|
|
|
421
421
|
},
|
|
422
422
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
423
423
|
});
|
|
424
|
-
const as =
|
|
424
|
+
const as = N.forwardRef((n, o) => /* @__PURE__ */ r.jsx(Z, { ...n, forwardedRef: o })), ls = () => {
|
|
425
425
|
const { addCoreBlock: n } = jt(), o = W("getExternalPredefinedBlock", T);
|
|
426
426
|
return P(
|
|
427
427
|
async (e) => {
|
|
@@ -450,7 +450,7 @@ const pe = (n, o, e) => {
|
|
|
450
450
|
);
|
|
451
451
|
_e = O.indexOf(c), o === "vertical" ? (s.style.top = n.offsetTop + c + "px", s.style.left = n.offsetLeft + d + "px") : (s.style.top = n.offsetTop + a + "px", s.style.left = n.offsetLeft + c + "px");
|
|
452
452
|
}, ds = (n) => {
|
|
453
|
-
const o =
|
|
453
|
+
const o = Ne(n), e = window.getComputedStyle(n), t = o === "horizontal", s = parseInt(e.paddingLeft), d = parseInt(e.paddingTop);
|
|
454
454
|
let a = t ? s : d;
|
|
455
455
|
O = [a], Array.from(n.children).forEach((i) => {
|
|
456
456
|
const l = window.getComputedStyle(i), c = parseInt(
|
|
@@ -459,7 +459,7 @@ const pe = (n, o, e) => {
|
|
|
459
459
|
O.push(a + p + c), a += p + c;
|
|
460
460
|
});
|
|
461
461
|
};
|
|
462
|
-
function
|
|
462
|
+
function Ne(n) {
|
|
463
463
|
const o = window.getComputedStyle(n).display, e = window.getComputedStyle(n).flexDirection;
|
|
464
464
|
if (o === "flex")
|
|
465
465
|
return e === "column" || e === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -473,7 +473,7 @@ function Ae(n) {
|
|
|
473
473
|
return o === "block" ? "vertical" : "horizontal";
|
|
474
474
|
}
|
|
475
475
|
const ps = me((n) => {
|
|
476
|
-
const o = n.target, e =
|
|
476
|
+
const o = n.target, e = Ne(o);
|
|
477
477
|
if (e === "vertical") {
|
|
478
478
|
const t = n.clientY - o.offsetTop;
|
|
479
479
|
pe(o, e, t);
|
|
@@ -489,7 +489,7 @@ function J() {
|
|
|
489
489
|
n.style.display = "none";
|
|
490
490
|
}
|
|
491
491
|
const hs = () => {
|
|
492
|
-
const { document: n } = K(), [o, e] = k(Ct), t = ls(), s = je("dnd"), [, d] =
|
|
492
|
+
const { document: n } = K(), [o, e] = k(Ct), t = ls(), s = je("dnd"), [, d] = M(), [, a] = C();
|
|
493
493
|
return B = n, {
|
|
494
494
|
isDragging: o,
|
|
495
495
|
"data-dnd": "branch",
|
|
@@ -526,7 +526,7 @@ function ms(n) {
|
|
|
526
526
|
o && o.parentNode.removeChild(o), n = null;
|
|
527
527
|
}
|
|
528
528
|
const gs = () => {
|
|
529
|
-
const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], o = Bt(), [, e] =
|
|
529
|
+
const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], o = Bt(), [, e] = M(), [t, s] = k(L);
|
|
530
530
|
return (d) => {
|
|
531
531
|
var m;
|
|
532
532
|
if (t)
|
|
@@ -546,7 +546,7 @@ const gs = () => {
|
|
|
546
546
|
l.addEventListener("blur", p, !0), c.focus(), (m = l.querySelector(".ql-clipboard")) == null || m.remove(), s(a.getAttribute("data-block-id"));
|
|
547
547
|
};
|
|
548
548
|
}, fs = () => {
|
|
549
|
-
const [, n] =
|
|
549
|
+
const [, n] = A(), [, o] = C(), [, e] = M(), [t] = k(L), [s] = k(St);
|
|
550
550
|
return (d) => {
|
|
551
551
|
if (t)
|
|
552
552
|
return;
|
|
@@ -567,17 +567,17 @@ const gs = () => {
|
|
|
567
567
|
const e = te(n.target);
|
|
568
568
|
e != null && e.getAttribute("data-style-id") && o(e.getAttribute("data-style-id"));
|
|
569
569
|
}, 100), $s = () => {
|
|
570
|
-
const [, n] =
|
|
570
|
+
const [, n] = M(), [o] = k(L);
|
|
571
571
|
return (e) => {
|
|
572
572
|
o || xs(e, n);
|
|
573
573
|
};
|
|
574
574
|
}, vs = ({ children: n }) => {
|
|
575
|
-
const { document: o } = K(), [e] = C(), [t, s] =
|
|
575
|
+
const { document: o } = K(), [e] = C(), [t, s] = A();
|
|
576
576
|
b(() => {
|
|
577
577
|
setTimeout(() => {
|
|
578
578
|
if (!S(t))
|
|
579
579
|
return;
|
|
580
|
-
const c =
|
|
580
|
+
const c = Ae(o, z(e));
|
|
581
581
|
if (c) {
|
|
582
582
|
const p = c.getAttribute("data-style-prop");
|
|
583
583
|
if (p) {
|
|
@@ -601,11 +601,11 @@ const gs = () => {
|
|
|
601
601
|
children: n
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
|
-
},
|
|
605
|
-
const { window: n } = K(), [o, e] = C(), [t] = ee(), [, s] =
|
|
604
|
+
}, Ae = (n, o) => n.querySelector(`[data-block-id="${o}"]`), ys = () => {
|
|
605
|
+
const { window: n } = K(), [o, e] = C(), [t] = ee(), [, s] = A(), { undo: d, redo: a } = fe(), i = ve(), [, l] = ye(), c = be(), { savePage: p } = Dt(), [m] = k(L), [, h] = k(It), $ = (g) => {
|
|
606
606
|
g.key === "Enter" && (g.preventDefault(), o.length === 1 && h(z(o)));
|
|
607
607
|
}, w = (g) => {
|
|
608
|
-
const u = t.find((
|
|
608
|
+
const u = t.find((v) => v._id === g);
|
|
609
609
|
return u ? u._parent : null;
|
|
610
610
|
};
|
|
611
611
|
return b(() => {
|
|
@@ -614,11 +614,11 @@ const gs = () => {
|
|
|
614
614
|
e([]), s([]);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
if (
|
|
617
|
+
if ($(u), !m && (u.key === "Delete" || u.key === "Backspace") && (u.preventDefault(), c(o)), u.ctrlKey || u.metaKey) {
|
|
618
618
|
if (u.key === "ArrowUp") {
|
|
619
619
|
u.preventDefault();
|
|
620
|
-
const
|
|
621
|
-
|
|
620
|
+
const v = o.length > 0 ? w(o[0]) : null;
|
|
621
|
+
v && e([v]);
|
|
622
622
|
}
|
|
623
623
|
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(u.key)) {
|
|
624
624
|
if (m && ["x", "z", "v"].includes(u.key))
|
|
@@ -633,7 +633,7 @@ const gs = () => {
|
|
|
633
633
|
};
|
|
634
634
|
}, [o, e, d, c, l, a, i, m, p, n]), null;
|
|
635
635
|
}, bs = ({ block: n, label: o }) => {
|
|
636
|
-
const [, e] = C(), [, t] =
|
|
636
|
+
const [, e] = C(), [, t] = M(), [, s] = k(ke), d = je("dnd");
|
|
637
637
|
return /* @__PURE__ */ r.jsxs(
|
|
638
638
|
"div",
|
|
639
639
|
{
|
|
@@ -651,7 +651,7 @@ const gs = () => {
|
|
|
651
651
|
}
|
|
652
652
|
);
|
|
653
653
|
}, ks = ({ selectedBlockElement: n, block: o }) => {
|
|
654
|
-
const e = be(), t = ve(), [, s] = C(), [, d] =
|
|
654
|
+
const e = be(), t = ve(), [, s] = C(), [, d] = A(), [a] = k(L), { floatingStyles: i, refs: l, update: c } = Ft({
|
|
655
655
|
placement: "top-start",
|
|
656
656
|
middleware: [Pt(), Rt()],
|
|
657
657
|
elements: {
|
|
@@ -685,7 +685,7 @@ const gs = () => {
|
|
|
685
685
|
}
|
|
686
686
|
),
|
|
687
687
|
_t(f(o, "_type", "")) ? /* @__PURE__ */ r.jsx(et, { className: "hover:scale-105", onClick: () => t([o == null ? void 0 : o._id]) }) : null,
|
|
688
|
-
|
|
688
|
+
Nt(f(o, "_type", "")) ? /* @__PURE__ */ r.jsx(tt, { className: "hover:scale-105", onClick: () => e([o == null ? void 0 : o._id]) }) : null
|
|
689
689
|
] })
|
|
690
690
|
]
|
|
691
691
|
}
|
|
@@ -944,7 +944,7 @@ const gs = () => {
|
|
|
944
944
|
e(({ className: s }) => `.auto .${o(`hs-auto-mode-active${t}${s}`)}`);
|
|
945
945
|
});
|
|
946
946
|
}, js = ({ model: n }) => {
|
|
947
|
-
const [o] =
|
|
947
|
+
const [o] = At(), [e] = C(), [t] = xe(), [s] = M(), [d] = A(), [a] = k(ke), { document: i, window: l } = K(), [c] = j(i == null ? void 0 : i.getElementById("highlighted-block")), [p] = j(
|
|
948
948
|
i == null ? void 0 : i.getElementById("selected-block")
|
|
949
949
|
), [m] = j(
|
|
950
950
|
i == null ? void 0 : i.getElementById("selected-styling-block")
|
|
@@ -952,31 +952,29 @@ const gs = () => {
|
|
|
952
952
|
b(() => {
|
|
953
953
|
t ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
|
|
954
954
|
}, [t, i]);
|
|
955
|
-
const
|
|
955
|
+
const $ = f(o, "headingFont", "DM Sans"), w = f(o, "bodyFont", "DM Sans");
|
|
956
956
|
return b(() => {
|
|
957
|
-
const g = f(o, "primaryColor", "#000"), u = f(o, "secondaryColor", "#FFF"),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
$.primary.DEFAULT = g, $.secondary.DEFAULT = u;
|
|
962
|
-
const M = f(o, "roundedCorners", "0");
|
|
957
|
+
const g = f(o, "primaryColor", "#000"), u = f(o, "secondaryColor", "#FFF"), v = Wt([
|
|
958
|
+
{ color: g, name: "primary" },
|
|
959
|
+
{ color: u, name: "secondary" }
|
|
960
|
+
]), E = f(o, "roundedCorners", "0");
|
|
963
961
|
!l || !l.tailwind || (l.tailwind.config = {
|
|
964
962
|
darkMode: "class",
|
|
965
963
|
theme: {
|
|
966
964
|
fontFamily: {
|
|
967
|
-
heading: [
|
|
965
|
+
heading: [$],
|
|
968
966
|
body: [w]
|
|
969
967
|
},
|
|
970
968
|
extend: {
|
|
971
969
|
borderRadius: {
|
|
972
|
-
global: `${
|
|
970
|
+
global: `${E || "0"}px`
|
|
973
971
|
},
|
|
974
|
-
colors:
|
|
972
|
+
colors: v
|
|
975
973
|
}
|
|
976
974
|
},
|
|
977
|
-
plugins: [zt, Ut,
|
|
975
|
+
plugins: [Ht, zt, Ut, l.tailwind.plugin.withOptions(() => ws)]
|
|
978
976
|
});
|
|
979
|
-
}, [o, l,
|
|
977
|
+
}, [o, l, $, w]), b(() => {
|
|
980
978
|
p && (p.textContent = `${F(e, (g) => `[data-block-id="${g}"]`).join(",")}{
|
|
981
979
|
outline: 1px solid ${e.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
982
980
|
}`);
|
|
@@ -993,23 +991,23 @@ const gs = () => {
|
|
|
993
991
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
994
992
|
}`);
|
|
995
993
|
}, [d, m]), b(() => {
|
|
996
|
-
const g = f(o, "bodyTextLightColor", "#64748b"), u = f(o, "bodyTextDarkColor", "#94a3b8"),
|
|
997
|
-
i.body.className = `font-body antialiased text-[${g}] bg-[${
|
|
994
|
+
const g = f(o, "bodyTextLightColor", "#64748b"), u = f(o, "bodyTextDarkColor", "#94a3b8"), v = f(o, "bodyBgLightColor", "#FFFFFF"), E = f(o, "bodyBgDarkColor", "#0f172a");
|
|
995
|
+
i.body.className = `font-body antialiased text-[${g}] bg-[${v}] dark:text-[${u}] dark:bg-[${E}]`;
|
|
998
996
|
}, [o, i, n]), n === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
999
|
-
|
|
997
|
+
$ && /* @__PURE__ */ r.jsx(
|
|
1000
998
|
"link",
|
|
1001
999
|
{
|
|
1002
1000
|
id: "heading-font",
|
|
1003
1001
|
rel: "stylesheet",
|
|
1004
1002
|
type: "text/css",
|
|
1005
|
-
href: `https://fonts.googleapis.com/css2?family=${
|
|
1003
|
+
href: `https://fonts.googleapis.com/css2?family=${$.replace(
|
|
1006
1004
|
/ /g,
|
|
1007
1005
|
"+"
|
|
1008
1006
|
)}:wght@300;400;500;600;700;800;900&display=swap`,
|
|
1009
1007
|
media: "all"
|
|
1010
1008
|
}
|
|
1011
1009
|
),
|
|
1012
|
-
w &&
|
|
1010
|
+
w && $ !== w && /* @__PURE__ */ r.jsx(
|
|
1013
1011
|
"link",
|
|
1014
1012
|
{
|
|
1015
1013
|
id: "body-font",
|
|
@@ -1022,7 +1020,7 @@ const gs = () => {
|
|
|
1022
1020
|
media: "all"
|
|
1023
1021
|
}
|
|
1024
1022
|
),
|
|
1025
|
-
|
|
1023
|
+
$ && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${$}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}` })
|
|
1026
1024
|
] }) : null;
|
|
1027
1025
|
}, Cs = (n) => {
|
|
1028
1026
|
const o = {};
|
|
@@ -1065,23 +1063,23 @@ function G({ blocks: n }) {
|
|
|
1065
1063
|
}, {}),
|
|
1066
1064
|
[e, o]
|
|
1067
1065
|
);
|
|
1068
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children:
|
|
1066
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: N.Children.toArray(
|
|
1069
1067
|
n.map((i, l) => {
|
|
1070
1068
|
if (d === i._id)
|
|
1071
1069
|
return null;
|
|
1072
1070
|
const c = Cs(i), p = {};
|
|
1073
1071
|
S(c) || Object.keys(c).forEach((u) => {
|
|
1074
|
-
p[u] =
|
|
1075
|
-
c[u].map((
|
|
1072
|
+
p[u] = N.Children.toArray(
|
|
1073
|
+
c[u].map((v) => /* @__PURE__ */ r.jsx(G, { blocks: [qe(o, { _id: v })] }))
|
|
1076
1074
|
);
|
|
1077
1075
|
});
|
|
1078
1076
|
const m = ge(o, { _parent: i._id });
|
|
1079
1077
|
p.children = m.length ? /* @__PURE__ */ r.jsx(G, { blocks: m }) : null;
|
|
1080
|
-
const h = Yt(i._type),
|
|
1081
|
-
if (Ke(
|
|
1078
|
+
const h = Yt(i._type), $ = f(h, "builderComponent", f(h, "component", null));
|
|
1079
|
+
if (Ke($))
|
|
1082
1080
|
return /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${i == null ? void 0 : i._type} not registered -->` });
|
|
1083
1081
|
const w = Q(h, "getBlockStateFrom") ? h == null ? void 0 : h.getBlockStateFrom(i, o) : [], g = a(w);
|
|
1084
|
-
return /* @__PURE__ */ r.jsx(he, { children:
|
|
1082
|
+
return /* @__PURE__ */ r.jsx(he, { children: N.createElement($, {
|
|
1085
1083
|
blockProps: {
|
|
1086
1084
|
"data-block-id": i._id,
|
|
1087
1085
|
"data-block-type": i._type,
|
|
@@ -1100,32 +1098,32 @@ function G({ blocks: n }) {
|
|
|
1100
1098
|
const _s = () => {
|
|
1101
1099
|
const [n] = ee(), o = S(n) ? null : /* @__PURE__ */ r.jsx(Qt, { children: /* @__PURE__ */ r.jsx(G, { blocks: ge(n, (e) => S(e._parent)) }) });
|
|
1102
1100
|
return /* @__PURE__ */ r.jsx(qt, { children: o });
|
|
1103
|
-
},
|
|
1104
|
-
const [n] = k(
|
|
1101
|
+
}, Ns = (n, o) => n.querySelector(`[data-style-id="${o}"]`), As = () => {
|
|
1102
|
+
const [n] = k(Mt), [o] = ye(), [e] = V(), [, t] = C(), s = Et(), [, d] = M(), a = oe(null), i = oe(null), [l, c] = j({ width: 0, height: 0 }), p = rs(l), [m, h] = j(0), [$, w] = j([]), [, g] = j([]), [, u] = k(Tt), [v, E] = A(), Me = W("loading", !1);
|
|
1105
1103
|
b(() => {
|
|
1106
1104
|
const { clientWidth: x, clientHeight: D } = i.current;
|
|
1107
1105
|
c({ width: x, height: D }), m === 0 && h(x);
|
|
1108
1106
|
}, [i, e, m]);
|
|
1109
|
-
const
|
|
1107
|
+
const Ee = (x, D = 0) => {
|
|
1110
1108
|
const { top: I } = x.getBoundingClientRect();
|
|
1111
1109
|
return I + D >= 0 && I - D <= window.innerHeight;
|
|
1112
1110
|
};
|
|
1113
1111
|
b(() => {
|
|
1114
1112
|
var x, D;
|
|
1115
1113
|
if (s && s.type !== "Multiple" && a.current) {
|
|
1116
|
-
const I =
|
|
1117
|
-
I && (
|
|
1114
|
+
const I = Ae(a.current.contentDocument, s._id);
|
|
1115
|
+
I && (Ee(I) || (D = (x = a.current) == null ? void 0 : x.contentWindow) == null || D.scrollTo({ top: I.offsetTop, behavior: "smooth" }), w([I]));
|
|
1118
1116
|
}
|
|
1119
1117
|
}, [s]), b(() => {
|
|
1120
|
-
if (!S(
|
|
1121
|
-
const x =
|
|
1118
|
+
if (!S(v) && a.current) {
|
|
1119
|
+
const x = Ns(
|
|
1122
1120
|
a.current.contentDocument,
|
|
1123
|
-
z(
|
|
1121
|
+
z(v).id
|
|
1124
1122
|
);
|
|
1125
1123
|
g(x ? [x] : [null]);
|
|
1126
1124
|
} else
|
|
1127
1125
|
g([null]);
|
|
1128
|
-
}, [
|
|
1126
|
+
}, [v]);
|
|
1129
1127
|
const Te = Pe(() => {
|
|
1130
1128
|
let x = ns;
|
|
1131
1129
|
return n === "offline" && (x = x.replace(
|
|
@@ -1137,7 +1135,7 @@ const _s = () => {
|
|
|
1137
1135
|
"div",
|
|
1138
1136
|
{
|
|
1139
1137
|
onClick: () => {
|
|
1140
|
-
t([]),
|
|
1138
|
+
t([]), E([]);
|
|
1141
1139
|
},
|
|
1142
1140
|
onMouseLeave: () => setTimeout(() => d(""), 300),
|
|
1143
1141
|
className: "relative mx-auto h-full w-full overflow-hidden",
|
|
@@ -1158,11 +1156,11 @@ const _s = () => {
|
|
|
1158
1156
|
ks,
|
|
1159
1157
|
{
|
|
1160
1158
|
block: s,
|
|
1161
|
-
selectedBlockElement: z(
|
|
1159
|
+
selectedBlockElement: z($)
|
|
1162
1160
|
}
|
|
1163
1161
|
),
|
|
1164
1162
|
/* @__PURE__ */ r.jsx(js, { model: "page" }),
|
|
1165
|
-
/* @__PURE__ */ r.jsx(vs, { children:
|
|
1163
|
+
/* @__PURE__ */ r.jsx(vs, { children: Me ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(we, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(_s, {}) }),
|
|
1166
1164
|
/* @__PURE__ */ r.jsx("br", {}),
|
|
1167
1165
|
/* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute z-[99999] max-w-full bg-green-500 transition-transform" })
|
|
1168
1166
|
]
|
|
@@ -1170,10 +1168,10 @@ const _s = () => {
|
|
|
1170
1168
|
)
|
|
1171
1169
|
}
|
|
1172
1170
|
);
|
|
1173
|
-
},
|
|
1171
|
+
}, Eo = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1174
1172
|
/* @__PURE__ */ r.jsx(os, {}),
|
|
1175
|
-
/* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2", children: /* @__PURE__ */ r.jsx(he, { fallback: /* @__PURE__ */ r.jsx(we, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Zt, { children: /* @__PURE__ */ r.jsx(
|
|
1173
|
+
/* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2", children: /* @__PURE__ */ r.jsx(he, { fallback: /* @__PURE__ */ r.jsx(we, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Zt, { children: /* @__PURE__ */ r.jsx(As, {}) }) }) })
|
|
1176
1174
|
] });
|
|
1177
1175
|
export {
|
|
1178
|
-
|
|
1176
|
+
Eo as default
|
|
1179
1177
|
};
|