@chaibuilder/sdk 1.2.40 → 1.2.41
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-a20tIXfX.cjs → AddBlocks-M0Ai5QRA.cjs} +1 -1
- package/dist/{AddBlocks-Q--k4QYI.js → AddBlocks-axw0eS0q.js} +1 -1
- package/dist/{CanvasArea-ahsds4rc.js → CanvasArea-CWXelVxd.js} +2 -2
- package/dist/{CanvasArea-QQn0aXpj.cjs → CanvasArea-iPwNNbdH.cjs} +1 -1
- package/dist/{ChaiBuilderEditor-wfEkvtJ0.js → ChaiBuilderEditor-3Wj_t3jA.js} +3573 -3565
- package/dist/{ChaiBuilderEditor-hcoLrtq8.cjs → ChaiBuilderEditor-syigvGWW.cjs} +37 -37
- package/dist/{CurrentPage-zo2GKFUx.cjs → CurrentPage-iniQPv9U.cjs} +1 -1
- package/dist/{CurrentPage-f_5eIFbX.js → CurrentPage-nER7hH4h.js} +2 -2
- package/dist/{ListTree-FWHoDfbO.cjs → ListTree-biNayajJ.cjs} +1 -1
- package/dist/{ListTree-3riQsfip.js → ListTree-hYx4RLqK.js} +1 -1
- package/dist/{PagesPanel-3KIZEXOS.js → PagesPanel-LtuJLoQJ.js} +3 -3
- package/dist/{PagesPanel-0Wi0ezNZ.cjs → PagesPanel-mFjGqRwI.cjs} +1 -1
- package/dist/{ProjectPanel-0W6XTu0Y.js → ProjectPanel-g2wBPuXq.js} +3 -3
- package/dist/{ProjectPanel-fEYrObPB.cjs → ProjectPanel-s87fBlvB.cjs} +1 -1
- package/dist/{Settings-kDwumlBm.cjs → Settings-YEIKf61W.cjs} +1 -1
- package/dist/{Settings-ifUbqcam.js → Settings-sL6SfNst.js} +2 -2
- package/dist/{SidePanels-JIuL8NLu.cjs → SidePanels-f7N3ZWmB.cjs} +1 -1
- package/dist/{SidePanels-0P4IaIVn.js → SidePanels-gJa61XBn.js} +2 -2
- package/dist/{ThemeConfiguration-7Hef-UKR.js → ThemeConfiguration-5lCjeQNl.js} +1 -1
- package/dist/{ThemeConfiguration-CcUA1_9A.cjs → ThemeConfiguration-bOyg0yqs.cjs} +1 -1
- package/dist/{Topbar-0hOp8tE7.js → Topbar-22iB6xT8.js} +1 -1
- package/dist/{Topbar-Wte9Jbw7.cjs → Topbar-YyBsZjuO.cjs} +1 -1
- package/dist/{UILibrariesPanel-vXOD3qRz.cjs → UILibrariesPanel-50360foB.cjs} +1 -1
- package/dist/{UILibrariesPanel-qgwFZYvn.js → UILibrariesPanel-p5kL4hPY.js} +1 -1
- package/dist/{UnsplashImages-qUDa1vAS.js → UnsplashImages-3-5Y4PKF.js} +1 -1
- package/dist/{UnsplashImages-Cfq1lKeC.cjs → UnsplashImages-IxQo6rWq.cjs} +1 -1
- package/dist/{UploadImages-Zle03BGi.cjs → UploadImages-p0g4eMUM.cjs} +1 -1
- package/dist/{UploadImages-Xh-lPuZy.js → UploadImages-sAW1x_IX.js} +1 -1
- package/dist/{add-page-modal-ued8fkUY.js → add-page-modal-UIhX5RaH.js} +3 -3
- package/dist/{add-page-modal-0jmyeD0x.cjs → add-page-modal-f5mO9mWn.cjs} +1 -1
- package/dist/{confirm-alert-rucvO9GC.cjs → confirm-alert-6_2P1iPG.cjs} +1 -1
- package/dist/{confirm-alert-4kucBgrO.js → confirm-alert-yjv50jW-.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-kxeOpfNd.js → delete-page-modal-4RNg8OWW.js} +2 -2
- package/dist/{delete-page-modal-Eym3aZzC.cjs → delete-page-modal-eXCSYimZ.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +1 -1
- package/dist/{form-2Veryr30.js → form-Zy8G3TfH.js} +1 -1
- package/dist/{form-pdF1XhvW.cjs → form-gTqkjR1L.cjs} +1 -1
- package/dist/{index-OdzdznTv.js → index-aYfwM1sV.js} +2 -2
- package/dist/{index-SQ1sNajH.cjs → index-m6gyJ5Ma.cjs} +1 -1
- package/dist/{page-viewer-qr3NscoT.cjs → page-viewer-sRHeV-5x.cjs} +1 -1
- package/dist/{page-viewer-6qv40Sm2.js → page-viewer-wTIqXVBZ.js} +3 -3
- package/dist/{project-general-setting-GVzAsfrk.js → project-general-setting-Zirq3OGL.js} +3 -3
- package/dist/{project-general-setting-fm1YfS_2.cjs → project-general-setting-rrNhfejo.cjs} +1 -1
- package/dist/{project-seo-setting-iPqsGKuc.js → project-seo-setting-fqUbfFgl.js} +2 -2
- package/dist/{project-seo-setting-06jt9oDD.cjs → project-seo-setting-x_PDTJdV.cjs} +1 -1
- package/dist/{single-page-detail-GVtRl8Pt.js → single-page-detail-FqZ4Sp-y.js} +4 -4
- package/dist/{single-page-detail-KQVwWJ-J.cjs → single-page-detail-dGVJrIFh.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useCanvasSettings-E5uIyvUR.js → useCanvasSettings-8RCa8BYU.js} +1 -1
- package/dist/{useCanvasSettings-yYU51FJ3.cjs → useCanvasSettings-WJiLFik5.cjs} +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),g=require("jotai"),q=require("react-i18next"),s=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),t=require("lodash-es"),g=require("jotai"),q=require("react-i18next"),s=require("./ChaiBuilderEditor-syigvGWW.cjs"),b=require("@radix-ui/react-icons"),E=require("@chaibuilder/runtime"),N=require("flagged"),f=require("./STRINGS-gPz7CUOk.cjs"),T=require("./html-to-json-VPWiWWGH.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@react-hookz/web");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");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-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-quill");require("react-hotkeys-hook");require("lucide-react");require("himalaya");const k=({block:r})=>{const{type:o,icon:u,label:l}=r,{addCoreBlock:d,addPredefinedBlock:m}=s.useAddBlock(),[x,i]=s.useSelectedBlockIds(),[,h]=s.useHighlightBlockId(),[,j]=g.useAtom(s.activePanelAtom),p=()=>{if(t.has(r,"blocks")){const n=t.isFunction(r.blocks)?r.blocks():r.blocks;m(E.syncBlocksWithDefaults(n),t.first(x))}else d(r,t.first(x));j(f.OUTLINE_KEY)},c=N.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:p,type:"button",onDragStart:n=>{n.dataTransfer.setData("text/plain",JSON.stringify(t.omit(r,["component","icon"]))),setTimeout(()=>{i([]),h(null),j(f.OUTLINE_KEY)},200)},draggable:c?"true":"false",className:"space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 "+(c?"cursor-grab":"cursor-pointer"),children:[a.createElement(u||b.BoxIcon,{className:"w-4 h-4 mx-auto"}),e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l||o})]})}),e.jsxRuntimeExports.jsx(s.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:l||o})})]})})},y=()=>{const{t:r}=q.useTranslation(),[o,u]=a.useState(""),{addPredefinedBlock:l}=s.useAddBlock(),[d]=s.useSelectedBlockIds(),[,m]=g.useAtom(s.activePanelAtom),x=()=>{const i=T.getBlocksFromHTML(o);l([...i],t.first(d)||null),u(""),m(f.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:i=>i&&i.focus(),onChange:i=>u(i.target.value),rows:12,value:o,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:o.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")})})]})]})},B=()=>{const{t:r}=q.useTranslation(),[o,u]=a.useState("core"),[l,d]=a.useState("basic"),m=E.useChaiBlocks(),[,x]=g.useAtom(s.showPredefinedBlockCategoryAtom),i=s.useBuilderProp("importHTMLSupport",!0),h=s.useBuilderProp("filterChaiBlock",()=>!0),j=t.filter(m,h),p=t.groupBy(j,"category"),c=t.uniq(t.map(p.core,"group"));return a.useEffect(()=>{!t.includes(c,l)&&!t.isEmpty(c)&&!t.isEmpty(l)&&d(t.first(c))},[c,l]),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(o==="html"?"enter_paste_tailwind_html":"click_to_add_block")})]}),e.jsxRuntimeExports.jsx(s.Tabs,{onValueChange:n=>{x(""),u(n)},value:o,className:"h-max",children:e.jsxRuntimeExports.jsxs(s.TabsList,{className:"grid w-full "+(i?"grid-cols-2":"grid-cols-1"),children:[e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"core",children:r("Blocks")}),i?e.jsxRuntimeExports.jsx(s.TabsTrigger,{value:"html",children:r("import")}):null]})}),o==="core"&&e.jsxRuntimeExports.jsx(s.ScrollArea,{className:"-mx-1.5 h-full",children:e.jsxRuntimeExports.jsx("div",{className:"mt-2 w-full",children:a.Children.toArray(t.map(c,n=>t.reject(t.filter(t.values(p.core),{group:n}),{hidden:!0}).length?e.jsxRuntimeExports.jsx(s.Accordion,{type:"single",value:n,collapsible:!0,className:"w-full",children:e.jsxRuntimeExports.jsxs(s.AccordionItem,{value:n,children:[e.jsxRuntimeExports.jsx(s.AccordionTrigger,{className:"rounded-md bg-gray-100 px-4 py-2 capitalize",children:n}),e.jsxRuntimeExports.jsx(s.AccordionContent,{className:"p-3",children:e.jsxRuntimeExports.jsx("div",{className:"grid grid-cols-3 gap-2",children:a.Children.toArray(t.reject(t.filter(t.values(p.core),{group:n}),{hidden:!0}).map(R=>e.jsxRuntimeExports.jsx(k,{block:R})))})})]})}):null))})}),o==="html"&&i?e.jsxRuntimeExports.jsx(y,{}):null]})};exports.default=B;
|
|
@@ -3,7 +3,7 @@ import j, { createElement as L, useState as f, useEffect as S } from "react";
|
|
|
3
3
|
import { has as E, isFunction as F, first as h, omit as H, filter as x, groupBy as I, uniq as z, map as k, includes as D, isEmpty as N, reject as C, values as y } from "lodash-es";
|
|
4
4
|
import { useAtom as g } from "jotai";
|
|
5
5
|
import { useTranslation as T } from "react-i18next";
|
|
6
|
-
import { m as _, L as A, z as M, ag as w, ac as q, ad as O, ae as R, bg as G, bh as J, bi as K, bj as U, aq as V, bk as W, bl as Y, B as Q, bm as X, bn as Z, bo as $, h as B, ai as ee, aj as se, ak as v, ba as te, b3 as oe, b4 as re, b5 as ae, b6 as le } from "./ChaiBuilderEditor-
|
|
6
|
+
import { m as _, L as A, z as M, ag as w, ac as q, ad as O, ae as R, bg as G, bh as J, bi as K, bj as U, aq as V, bk as W, bl as Y, B as Q, bm as X, bn as Z, bo as $, h as B, ai as ee, aj as se, ak as v, ba as te, b3 as oe, b4 as re, b5 as ae, b6 as le } from "./ChaiBuilderEditor-3Wj_t3jA.js";
|
|
7
7
|
import { BoxIcon as ie } from "@radix-ui/react-icons";
|
|
8
8
|
import { syncBlocksWithDefaults as ce, useChaiBlocks as ne } from "@chaibuilder/runtime";
|
|
9
9
|
import { useFeature as de } from "flagged";
|
|
@@ -5,7 +5,7 @@ import { j as r } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
5
5
|
import A, { createElement as se, useCallback as H, useState as j, useEffect as k, Component as ue, Children as Oe, Suspense as he, useRef as ne, useMemo as ze } from "react";
|
|
6
6
|
import { map as P, includes as oe, toUpper as Y, round as Ue, noop as T, has as Q, throttle as me, isEmpty as D, first as U, omit as We, pick as qe, get as f, isString as G, memoize as Ke, each as Ye, find as Je, filter as ge, isNull as Qe } from "lodash-es";
|
|
7
7
|
import { ResetIcon as re, MobileIcon as ie, LaptopIcon as Ze, DesktopIcon as Xe, DotsVerticalIcon as Ge, EraserIcon as Ve, ZoomInIcon as et, DragHandleDots2Icon as tt, ArrowUpIcon as st, CopyIcon as nt, TrashIcon as ot } from "@radix-ui/react-icons";
|
|
8
|
-
import { j as fe, B as W, v as xe, aq as ve, ar as $e, as as rt, at as it, au as at, o as V, X as lt, h as L, av as ct, aw as dt, ax as pt, ay as ut, az as ht, aA as mt, aB as gt, L as C, Y as N, A as ft, a as xt, b as vt, c as $t, d as yt, e as bt, f as kt, g as wt, a3 as jt, aC as Ct, p as ye, ap as z, m as Bt, aD as Dt, z as M, Q as It, aE as R, aF as St, i as ee, w as be, E as ke, H as we, V as _t, aG as At, aH as je, aI as Nt, aJ as Mt, F as Et, aK as Tt, aL as Lt, aM as Rt, M as Ft, aN as Pt, ah as Ce, a2 as Ht } from "./ChaiBuilderEditor-
|
|
8
|
+
import { j as fe, B as W, v as xe, aq as ve, ar as $e, as as rt, at as it, au as at, o as V, X as lt, h as L, av as ct, aw as dt, ax as pt, ay as ut, az as ht, aA as mt, aB as gt, L as C, Y as N, A as ft, a as xt, b as vt, c as $t, d as yt, e as bt, f as kt, g as wt, a3 as jt, aC as Ct, p as ye, ap as z, m as Bt, aD as Dt, z as M, Q as It, aE as R, aF as St, i as ee, w as be, E as ke, H as we, V as _t, aG as At, aH as je, aI as Nt, aJ as Mt, F as Et, aK as Tt, aL as Lt, aM as Rt, M as Ft, aN as Pt, ah as Ce, a2 as Ht } from "./ChaiBuilderEditor-3Wj_t3jA.js";
|
|
9
9
|
import { useTranslation as q } from "react-i18next";
|
|
10
10
|
import { useAtom as y } from "jotai";
|
|
11
11
|
import { SparklesIcon as Ot } from "lucide-react";
|
|
@@ -24,7 +24,7 @@ import { Provider as Xt } from "react-wrap-balancer";
|
|
|
24
24
|
import { twMerge as Gt } from "tailwind-merge";
|
|
25
25
|
import { S as le, a as De } from "./STRINGS--j49GZJP.js";
|
|
26
26
|
import { getBlockComponent as Vt } from "@chaibuilder/runtime";
|
|
27
|
-
import { u as es } from "./useCanvasSettings-
|
|
27
|
+
import { u as es } from "./useCanvasSettings-8RCa8BYU.js";
|
|
28
28
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
29
29
|
import "clsx";
|
|
30
30
|
import "@radix-ui/react-scroll-area";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ne=Object.defineProperty;var oe=(o,s,e)=>s in o?ne(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var C=(o,s,e)=>(oe(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),h=require("react"),a=require("lodash-es"),E=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";var ne=Object.defineProperty;var oe=(o,s,e)=>s in o?ne(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;var C=(o,s,e)=>(oe(o,typeof s!="symbol"?s+"":s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),h=require("react"),a=require("lodash-es"),E=require("@radix-ui/react-icons"),i=require("./ChaiBuilderEditor-syigvGWW.cjs"),M=require("react-i18next"),b=require("jotai"),re=require("lucide-react"),F=require("react-dom"),k=require("prop-types"),ie=require("react-quill"),W=require("flagged"),le=require("@floating-ui/dom"),H=require("@floating-ui/react-dom"),ce=require("@react-hookz/web"),ae=require("@tailwindcss/typography"),de=require("@tailwindcss/forms"),ue=require("@tailwindcss/aspect-ratio"),pe=require("tailwindcss-palette-generator"),he=require("react-wrap-balancer"),xe=require("tailwind-merge"),_=require("./STRINGS-gPz7CUOk.cjs"),me=require("@chaibuilder/runtime"),ge=require("./useCanvasSettings-WJiLFik5.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("@radix-ui/react-scroll-area");require("i18next");require("./Functions-N3yhPYKY.cjs");require("./MODIFIERS-YPHRtwrM.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-Zc8hpE7f.cjs");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-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-hotkeys-hook");const fe=()=>{const{hasUndo:o,hasRedo:s,undo:e,redo:t}=i.useUndoManager();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Button,{disabled:!o(),size:"sm",onClick:e,className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(E.ResetIcon,{})}),r.jsxRuntimeExports.jsx(i.Button,{disabled:!s(),onClick:t,size:"sm",className:"rounded-full",variant:"ghost",children:r.jsxRuntimeExports.jsx(E.ResetIcon,{className:"rotate-180 scale-y-[-1] transform"})})]})};function ve(){const[o,s]=i.useDarkMode(),{t:e}=M.useTranslation();return r.jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[r.jsxRuntimeExports.jsx(i.Label,{htmlFor:"dark-mode-switch",children:e("dark_mode")}),r.jsxRuntimeExports.jsxs(i.Switch,{id:"dark-mode-switch",checked:o,onCheckedChange:()=>{s(!o)},className:`${o?"bg-violet-600":"bg-violet-300"}
|
|
2
2
|
relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[r.jsxRuntimeExports.jsx("span",{className:"sr-only",children:e("use_setting")}),r.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:`${o?"translate-x-5":"translate-x-0"}
|
|
3
3
|
pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})]})}const O=({landscape:o=!1})=>r.jsxRuntimeExports.jsxs("svg",{className:o?"rotate-90":"",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",xmlSpace:"preserve",width:13,height:13,children:[r.jsxRuntimeExports.jsx("g",{strokeWidth:0}),r.jsxRuntimeExports.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round"}),r.jsxRuntimeExports.jsx("path",{d:"M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",style:{fill:"#000"}})]}),je=[{title:"mobile_xs_title",content:"mobile_xs_content",breakpoint:"xs",icon:r.jsxRuntimeExports.jsx(E.MobileIcon,{}),width:400},{title:"mobile_sm_title",content:"mobile_sm_content",breakpoint:"sm",icon:r.jsxRuntimeExports.jsx(E.MobileIcon,{className:"rotate-90"}),width:640},{title:"tablet_md_title",content:"tablet_md_content",breakpoint:"md",icon:r.jsxRuntimeExports.jsx(O,{}),width:800},{title:"tablet_lg_title",content:"tablet_lg_content",breakpoint:"lg",icon:r.jsxRuntimeExports.jsx(O,{landscape:!0}),width:1024},{title:"desktop_xl_title",content:"desktop_xl_content",breakpoint:"xl",icon:r.jsxRuntimeExports.jsx(E.LaptopIcon,{}),width:1420},{title:"large_desktop_2xl_title",content:"large_desktop_2xl_content",breakpoint:"2xl",icon:r.jsxRuntimeExports.jsx(E.DesktopIcon,{}),width:1920}],U=({title:o,content:s,currentBreakpoint:e,breakpoint:t,width:n,icon:p,onClick:c})=>{const{t:l}=M.useTranslation();return r.jsxRuntimeExports.jsxs(i.HoverCard,{children:[r.jsxRuntimeExports.jsx(i.HoverCardTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx(i.Button,{onClick:()=>c(n),size:"sm",variant:t===e?"secondary":"ghost",children:p})}),r.jsxRuntimeExports.jsx(i.HoverCardContent,{className:"w-52 border-border",children:r.jsxRuntimeExports.jsx("div",{className:"flex justify-between space-x-4",children:r.jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[r.jsxRuntimeExports.jsx("h4",{className:"text-sm font-semibold",children:l(o)}),r.jsxRuntimeExports.jsx("p",{className:"text-xs",children:l(s)})]})})})]})},$e=()=>{const[,o,s]=i.useCanvasWidth(),[e,t]=i.useSelectedBreakpoints(),{t:n}=M.useTranslation(),p=i.useBuilderProp("breakpoints",je),c=l=>{e.includes(l)?e.length>2&&t(e.filter(d=>d!==l)):t(d=>[...d,l])};return p.length<4?r.jsxRuntimeExports.jsx("div",{className:"flex items-center rounded-md",children:a.map(p,l=>h.createElement(U,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o}))}):r.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md",children:[a.map(p.filter(l=>a.includes(e,a.toUpper(l.breakpoint))),l=>h.createElement(U,{...l,onClick:s,key:l.breakpoint,currentBreakpoint:o})),r.jsxRuntimeExports.jsxs(i.DropdownMenu,{children:[r.jsxRuntimeExports.jsx(i.DropdownMenuTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsx("span",{className:"cursor-pointer px-2.5 hover:opacity-80",children:r.jsxRuntimeExports.jsx(E.DotsVerticalIcon,{className:"scale-90 transform"})})}),r.jsxRuntimeExports.jsxs(i.DropdownMenuContent,{className:"w-56 border-border text-xs",children:[r.jsxRuntimeExports.jsx(i.DropdownMenuLabel,{children:n("Breakpoints")}),r.jsxRuntimeExports.jsx(i.DropdownMenuSeparator,{}),a.map(p,l=>r.jsxRuntimeExports.jsx(i.DropdownMenuCheckboxItem,{disabled:l.breakpoint==="xs",onCheckedChange:()=>c(a.toUpper(l.breakpoint)),checked:a.includes(e,a.toUpper(l.breakpoint)),children:n(l.title)},l.breakpoint))]})]})]})},ye=()=>{const{t:o}=M.useTranslation(),{setNewBlocks:s}=i.useBlocksStoreUndoableActions(),[,e]=i.useSelectedBlockIds(),[,t]=i.useSelectedStylingBlocks(),n=h.useCallback(()=>{s([]),e([]),t([])},[s]);return r.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:r.jsxRuntimeExports.jsxs(i.AlertDialog,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTrigger,{asChild:!0,children:r.jsxRuntimeExports.jsxs(i.Button,{size:"sm",variant:"ghost",className:"flex items-center gap-x-1",children:[r.jsxRuntimeExports.jsx(E.EraserIcon,{})," ",o("clear")]})}),r.jsxRuntimeExports.jsxs(i.AlertDialogContent,{className:"border-border",children:[r.jsxRuntimeExports.jsxs(i.AlertDialogHeader,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogTitle,{children:o("clear_canvas_title")}),r.jsxRuntimeExports.jsx(i.AlertDialogDescription,{children:o("clear_canvas_description")})]}),r.jsxRuntimeExports.jsxs(i.AlertDialogFooter,{children:[r.jsxRuntimeExports.jsx(i.AlertDialogCancel,{children:o("cancel")}),r.jsxRuntimeExports.jsx(i.AlertDialogAction,{onClick:n,children:o("yes")})]})]})]})})},be=()=>{const[o,s]=b.useAtom(i.aiAssistantActiveAtom);return i.useBuilderProp("askAiCallBack",null)?r.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxRuntimeExports.jsxs(i.Label,{htmlFor:"ai-assistant",className:"flex items-center gap-x-1 text-sm text-yellow-600",children:[r.jsxRuntimeExports.jsx(re.SparklesIcon,{className:"w-4"}),"AI Assistant"]}),r.jsxRuntimeExports.jsx(i.Switch,{className:"scale-90",checked:o,onCheckedChange:t=>{s(t)},id:"ai-assitantt"})]}):null},ke=()=>{const o=i.useBuilderProp("darkMode",!1),[s]=i.useCanvasZoom();return r.jsxRuntimeExports.jsxs("div",{className:"flex h-10 items-center justify-between border-b bg-background/70 px-2",children:[r.jsxRuntimeExports.jsxs("div",{className:"flex h-full space-x-2",children:[o?r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(ve,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"})]}):null,r.jsxRuntimeExports.jsx($e,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsxs("div",{className:"flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400",children:[r.jsxRuntimeExports.jsx(E.ZoomInIcon,{className:"h-3.5 w-3.5 flex-shrink-0"})," ",r.jsxRuntimeExports.jsxs("div",{className:"text-xs leading-3",children:[a.round(s,0),"%"]})]}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(fe,{})]}),r.jsxRuntimeExports.jsxs("div",{className:"flex h-full items-center space-x-2",children:[r.jsxRuntimeExports.jsx(ye,{}),r.jsxRuntimeExports.jsx(i.Separator,{orientation:"vertical"}),r.jsxRuntimeExports.jsx(be,{})]})]})},Ee=`<!doctype html>
|
|
4
4
|
<html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
|