@chaibuilder/sdk 1.2.49 → 1.2.50
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-JCSA6hLF.js → AddBlocks-IX7HKzSe.js} +18 -18
- package/dist/AddBlocks-zwZ63DdP.cjs +1 -0
- package/dist/CanvasArea-URgoG1jc.cjs +56 -0
- package/dist/{CanvasArea-c3xbVSoY.js → CanvasArea-ehmBje_E.js} +279 -263
- package/dist/{ChaiBuilderEditor-F2yUJQdt.js → ChaiBuilderEditor-3xIN-AP_.js} +8548 -8606
- package/dist/{ChaiBuilderEditor-lqHQcnh3.cjs → ChaiBuilderEditor-ZRHqW7Gd.cjs} +50 -50
- package/dist/CodeEditor-0F7Dz3AB.js +97 -0
- package/dist/CodeEditor-1vu-qNgT.cjs +1 -0
- package/dist/CurrentPage-HOPNdQZ-.cjs +1 -0
- package/dist/{CurrentPage--lDu6fB9.js → CurrentPage-qhBjm7th.js} +10 -10
- package/dist/ListTree-DkbFFDXB.cjs +1 -0
- package/dist/{ListTree-7DWSal1i.js → ListTree-sTwXvXST.js} +6 -6
- package/dist/{MODIFIERS-cBT31iqE.js → MODIFIERS-fd5XOmum.js} +8 -4
- package/dist/MODIFIERS-mVmfEGgo.cjs +1 -0
- package/dist/{PagesPanel-D1TOGyVE.js → PagesPanel-5iVsbDP1.js} +7 -7
- package/dist/PagesPanel-kdl4A0IN.cjs +1 -0
- package/dist/{ProjectPanel-PdvQsrbk.js → ProjectPanel-c8oTzhQd.js} +7 -7
- package/dist/ProjectPanel-mXPBI-TU.cjs +1 -0
- package/dist/{Settings-aEcWAB0x.js → Settings-0uSGoECC.js} +463 -446
- package/dist/Settings-3kBSStO6.cjs +1 -0
- package/dist/{SidePanels-uym8wfA0.js → SidePanels-YLWdBer9.js} +40 -40
- package/dist/SidePanels-kKram02Q.cjs +1 -0
- package/dist/ThemeConfiguration-8W1CM4tW.cjs +1 -0
- package/dist/{ThemeConfiguration-7J_Qt53c.js → ThemeConfiguration-AAGFJieC.js} +9 -9
- package/dist/Topbar-CLNUPx7K.cjs +1 -0
- package/dist/{Topbar-DkbE0ccQ.js → Topbar-nX9Muoem.js} +8 -8
- package/dist/UILibrariesPanel-cp0Mkaq_.cjs +1 -0
- package/dist/{UILibrariesPanel-3cSqwsMi.js → UILibrariesPanel-fKn2nlgI.js} +8 -8
- package/dist/UnsplashImages-56HoW_ZA.cjs +1 -0
- package/dist/{UnsplashImages-owPv8UfV.js → UnsplashImages-zTZa3LjG.js} +6 -6
- package/dist/{UploadImages-zGp0fN1z.js → UploadImages-SnfaTrlz.js} +4 -4
- package/dist/UploadImages-okNGjkXb.cjs +1 -0
- package/dist/add-page-modal-Y2RY3x01.cjs +1 -0
- package/dist/{add-page-modal-pOnhQNMH.js → add-page-modal-uDoO0zws.js} +12 -12
- package/dist/{confirm-alert-lbkop3bB.js → confirm-alert-9XiVxCc0.js} +4 -4
- package/dist/confirm-alert-aD7AMK_6.cjs +1 -0
- package/dist/controls-rRZhz0vu.cjs +1 -0
- package/dist/{controls-VTdJhdSz.js → controls-yjgoZzB6.js} +31 -18
- package/dist/core.cjs +1 -1
- package/dist/core.js +6 -6
- package/dist/{delete-page-modal-3OWHRhV4.js → delete-page-modal-7sfoFf9r.js} +6 -6
- package/dist/delete-page-modal-ieJ367JA.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +4 -4
- package/dist/{form-Rqiu0P7V.cjs → form-KWYHDVIf.cjs} +1 -1
- package/dist/{form-CetbKOxf.js → form-PQSmqcIl.js} +5 -5
- package/dist/{functions-WB3m-mfN.js → functions-JO0EW8GX.js} +1 -1
- package/dist/functions-ZZVUnIjD.cjs +1 -0
- package/dist/{html-to-json-Z6R2o_fA.js → html-to-json-GJ6RioQf.js} +1 -1
- package/dist/html-to-json-O1OpqICe.cjs +1 -0
- package/dist/index-VOrp9ZpX.cjs +1 -0
- package/dist/index-YpnaudSM.js +63 -0
- package/dist/index-ecnGWzh9.cjs +1 -0
- package/dist/{index-Mzvi8sMV.js → index-i2kgLkjC.js} +15 -14
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +19 -20
- package/dist/page-viewer-aoro5JxT.cjs +1 -0
- package/dist/{page-viewer-7iyxGntn.js → page-viewer-qkwZJ6e-.js} +12 -12
- package/dist/{project-general-setting-tHdsXTwH.js → project-general-setting-3gkaXq1F.js} +12 -12
- package/dist/project-general-setting-arXitV5_.cjs +1 -0
- package/dist/{project-seo-setting-zEBZ91Xk.js → project-seo-setting-X8pykTmc.js} +6 -6
- package/dist/project-seo-setting-kjtUt-er.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +44 -45
- package/dist/single-page-detail-UsWG0gfh.cjs +1 -0
- package/dist/{single-page-detail-RBfdbTs3.js → single-page-detail-ZXZX6Xmw.js} +21 -21
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +6 -6
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +100 -100
- package/dist/useCodeEditor-CtjbxWLf.cjs +1 -0
- package/dist/useCodeEditor-yl5V3Hte.js +7 -0
- package/dist/{utils-K3Zk762G.cjs → utils-D_vtk3zK.cjs} +1 -1
- package/dist/{utils-iMv3T4WT.js → utils-VpVqnC9m.js} +1 -1
- package/dist/web-blocks.cjs +1 -33
- package/dist/web-blocks.js +468 -616
- package/package.json +4 -2
- package/dist/AddBlocks-JiIeMTE-.cjs +0 -1
- package/dist/CanvasArea-K_d6ORTZ.cjs +0 -55
- package/dist/CurrentPage-DnQKF1wT.cjs +0 -1
- package/dist/ListTree-HVFqaM0-.cjs +0 -1
- package/dist/MODIFIERS-YPHRtwrM.cjs +0 -1
- package/dist/PagesPanel-pIFhxLGC.cjs +0 -1
- package/dist/ProjectPanel-t7s3-URx.cjs +0 -1
- package/dist/STRINGS--j49GZJP.js +0 -7
- package/dist/STRINGS-gPz7CUOk.cjs +0 -1
- package/dist/Settings-WevLeOpk.cjs +0 -1
- package/dist/SidePanels-mavyE3q_.cjs +0 -1
- package/dist/ThemeConfiguration-F-_ieF8J.cjs +0 -1
- package/dist/Topbar-FjX_5927.cjs +0 -1
- package/dist/UILibrariesPanel-qsjCsv10.cjs +0 -1
- package/dist/UnsplashImages-5skIflMr.cjs +0 -1
- package/dist/UploadImages-olCKp-66.cjs +0 -1
- package/dist/add-page-modal-JE2NTOKQ.cjs +0 -1
- package/dist/confirm-alert-GTawvuT8.cjs +0 -1
- package/dist/controls-jWJDao88.cjs +0 -1
- package/dist/delete-page-modal-S42VXCGh.cjs +0 -1
- package/dist/functions-fujiWLsg.cjs +0 -1
- package/dist/html-to-json-VPWiWWGH.cjs +0 -1
- package/dist/index-SZn6KcOd.cjs +0 -1
- package/dist/page-viewer-fFmRhZs3.cjs +0 -1
- package/dist/project-general-setting-0HJ_qyW3.cjs +0 -1
- package/dist/project-seo-setting-Ln9aX7b5.cjs +0 -1
- package/dist/single-page-detail-H0heOB33.cjs +0 -1
- package/dist/useCanvasSettings-2YhM5XKu.js +0 -6
- package/dist/useCanvasSettings-tDzAqXUt.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import o, { useMemo as h, Suspense as c } from "react";
|
|
3
3
|
import { FontFamilyIcon as j, EyeOpenIcon as g } from "@radix-ui/react-icons";
|
|
4
|
-
import { h as r,
|
|
4
|
+
import { h as r, a5 as f, a6 as v, a7 as b, a8 as N, al as S, am as w, a9 as l, U as y, B as p, an as C, E as B, ag as m, ao as A } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
5
5
|
import { useTranslation as x } from "react-i18next";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "clsx";
|
|
@@ -12,14 +12,13 @@ import "jotai";
|
|
|
12
12
|
import "i18next";
|
|
13
13
|
import "flagged";
|
|
14
14
|
import "lodash-es";
|
|
15
|
-
import "./
|
|
15
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
16
16
|
import "./Functions-7jnEwJyw.js";
|
|
17
17
|
import "tailwind-merge";
|
|
18
18
|
import "@chaibuilder/runtime";
|
|
19
19
|
import "@react-hookz/web";
|
|
20
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
21
20
|
import "tree-model";
|
|
22
|
-
import "./utils-
|
|
21
|
+
import "./utils-VpVqnC9m.js";
|
|
23
22
|
import "@radix-ui/react-toggle";
|
|
24
23
|
import "class-variance-authority";
|
|
25
24
|
import "@radix-ui/react-switch";
|
|
@@ -43,6 +42,7 @@ import "react-icons-picker";
|
|
|
43
42
|
import "react-quill";
|
|
44
43
|
import "react-hotkeys-hook";
|
|
45
44
|
import "lucide-react";
|
|
45
|
+
import "./index-YpnaudSM.js";
|
|
46
46
|
const P = () => r("languages", ["en"]), k = () => P().length === 1 ? null : /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(f, { children: [
|
|
47
47
|
/* @__PURE__ */ e.jsx(v, { className: "w-[150px] border-0", children: /* @__PURE__ */ e.jsx(
|
|
48
48
|
b,
|
|
@@ -61,7 +61,7 @@ const P = () => r("languages", ["en"]), k = () => P().length === 1 ? null : /* @
|
|
|
61
61
|
/* @__PURE__ */ e.jsx(l, { value: "grapes", children: "Grapes" }),
|
|
62
62
|
/* @__PURE__ */ e.jsx(l, { value: "pineapple", children: "Pineapple" })
|
|
63
63
|
] }) })
|
|
64
|
-
] }) }),
|
|
64
|
+
] }) }), E = () => {
|
|
65
65
|
const { savePage: n, saveState: t } = y(), { t: a } = x(), i = r("hideSaveButton", !1), s = h(() => {
|
|
66
66
|
switch (t) {
|
|
67
67
|
case "SAVING":
|
|
@@ -91,7 +91,7 @@ const P = () => r("languages", ["en"]), k = () => P().length === 1 ? null : /* @
|
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: u });
|
|
94
|
-
},
|
|
94
|
+
}, I = function() {
|
|
95
95
|
const t = r("previewComponent"), [, a] = B(), { t: i } = x();
|
|
96
96
|
return t ? /* @__PURE__ */ e.jsxs(
|
|
97
97
|
p,
|
|
@@ -119,9 +119,9 @@ const P = () => r("languages", ["en"]), k = () => P().length === 1 ? null : /* @
|
|
|
119
119
|
) }),
|
|
120
120
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
121
121
|
/* @__PURE__ */ e.jsx(k, {}),
|
|
122
|
-
/* @__PURE__ */ e.jsx(
|
|
122
|
+
/* @__PURE__ */ e.jsx(I, {}),
|
|
123
123
|
/* @__PURE__ */ e.jsx(A, { orientation: "vertical" }),
|
|
124
|
-
i ? /* @__PURE__ */ e.jsx(
|
|
124
|
+
i ? /* @__PURE__ */ e.jsx(E, {}) : null,
|
|
125
125
|
o.Children.toArray(
|
|
126
126
|
a.map((s) => /* @__PURE__ */ e.jsx(c, { fallback: /* @__PURE__ */ e.jsx(m, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(s, {}) }))
|
|
127
127
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),o=require("lodash-es"),m=require("react"),t=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),v=require("@chaibuilder/runtime"),N=require("lucide-react"),q=require("jotai"),k=require("./Functions-N3yhPYKY.cjs"),b=require("@radix-ui/react-icons"),y=require("./MODIFIERS-mVmfEGgo.cjs"),w=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("flagged");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.cjs");require("tailwind-merge");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-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("./index-ecnGWzh9.cjs");function C(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const i in s)if(i!=="default"){const c=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(n,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}return n.default=s,Object.freeze(n)}const S=C(m);function I({uiLibraries:s,library:n,setLibrary:i}){var a;const[c,l]=S.useState(!1),{t:r}=w.useTranslation();return n?e.jsxRuntimeExports.jsxs(t.Popover,{open:c,onOpenChange:l,children:[e.jsxRuntimeExports.jsx(t.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsxRuntimeExports.jsx("span",{children:r("Choose Library")}),e.jsxRuntimeExports.jsxs(t.Button,{variant:"outline",size:"sm",role:"combobox","aria-expanded":c,className:"w-[200px] justify-between",children:[n?(a=s.find(u=>u.uuid===n))==null?void 0:a.name:r("Select library"),e.jsxRuntimeExports.jsx(b.CaretSortIcon,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})]})}),e.jsxRuntimeExports.jsx(t.PopoverContent,{className:"w-[200px] p-0",children:e.jsxRuntimeExports.jsxs(t.Command,{children:[e.jsxRuntimeExports.jsx(t.CommandInput,{placeholder:"Search library...",className:"h-9"}),e.jsxRuntimeExports.jsxs(t.CommandList,{children:[e.jsxRuntimeExports.jsx(t.CommandEmpty,{children:"No library found."}),e.jsxRuntimeExports.jsx(t.CommandGroup,{children:s.map(u=>e.jsxRuntimeExports.jsxs(t.CommandItem,{value:u.uuid,onSelect:p=>{i(p),l(!1)},children:[u.name,e.jsxRuntimeExports.jsx(b.CheckIcon,{className:k.cn("ml-auto h-4 w-4",n===u.uuid?"opacity-100":"opacity-0")})]},u.uuid))})]})]})})]}):null}const L=({block:s,closePopover:n,library:i})=>{const[c,l]=m.useState(!1),r=t.useBuilderProp("getUILibraryBlock",o.noop),{addCoreBlock:a,addPredefinedBlock:u}=t.useAddBlock(),[p]=t.useSelectedBlockIds(),g=f=>{const j=o.has(f,"styles_attrs.data-page-section");return f._type==="Box"&&j},E=m.useCallback(async f=>{if(f.stopPropagation(),o.has(s,"component")){a(s,o.first(p)),n();return}l(!0);const j=await r(i,s);let R=o.first(p);g(o.first(j))&&(R=null),o.isEmpty(j)||u(v.syncBlocksWithDefaults(j),R),n()},[s]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",{onClick:c?()=>{}:E,className:"relative mt-2 cursor-pointer overflow-hidden rounded-md border border-gray-300 bg-white duration-200 hover:border-blue-500 hover:shadow-xl",children:[c&&e.jsxRuntimeExports.jsxs("div",{className:"absolute flex h-full w-full items-center justify-center bg-black/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..."})]}),s.preview?e.jsxRuntimeExports.jsx("img",{src:s.preview,className:"min-h-[25px] w-full rounded-md",alt:s.name}):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:s.name})})]})})},P=q.atom({}),A=s=>{const[n,i]=q.useAtom(P),c=t.useBuilderProp("getUILibraryBlocks",o.noop),l=o.get(n,`${s==null?void 0:s.uuid}.blocks`,[]),r=o.get(n,`${s==null?void 0:s.uuid}.loading`,!1);return m.useEffect(()=>{(async()=>{if(r||l.length>0)return;i(u=>({...u,[s==null?void 0:s.uuid]:{loading:!0,blocks:[]}}));const a=await c(s);i(u=>({...u,[s==null?void 0:s.uuid]:{loading:!1,blocks:a||[]}}))})()},[s,l,r]),{data:l,isLoading:r}},T=t.atomWithStorage("_selectedLibrary",null),O=()=>{const[s,n]=q.useAtom(T),i=t.useBuilderProp("uiLibraries",[]),c=v.useChaiBlocks(),l=o.values(c).filter(d=>d.category==="custom"),r=i.find(d=>d.uuid===s)||o.first(i),{data:a,isLoading:u}=A(r),p=o.groupBy([...a,...l],"group"),[g,E]=m.useState("Hero"),[,f]=q.useAtom(t.activePanelAtom),j=o.get(p,g,[]),{t:R}=w.useTranslation(),x=m.useRef(null),B=d=>{x.current&&(clearTimeout(x.current),x.current=null),x.current=setTimeout(()=>{x.current&&E(d)},300)};return u?e.jsxRuntimeExports.jsx(t.Skeleton,{className:"h-full w-full"}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",{className:"relative flex h-full max-h-full w-[460px] flex-col overflow-hidden bg-background",children:[r!=null&&r.uuid?e.jsxRuntimeExports.jsx("div",{className:"sticky top-0 flex h-fit flex-col",children:e.jsxRuntimeExports.jsx("div",{className:"mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1",children:e.jsxRuntimeExports.jsx("h1",{className:"flex w-full flex-col items-baseline truncate px-1 text-sm font-semibold xl:flex-col",children:e.jsxRuntimeExports.jsx(I,{library:r==null?void 0:r.uuid,setLibrary:n,uiLibraries:i})})})}):null,e.jsxRuntimeExports.jsxs("div",{className:"flex h-[95%] border-t border-gray-300 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex h-full w-40 flex-col gap-1 px-1",children:m.Children.toArray(o.map(p,(d,h)=>e.jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>B(h),onMouseLeave:()=>clearTimeout(x.current),onClick:()=>E(h),className:k.cn("flex w-full cursor-pointer items-center justify-between rounded-md p-1 text-sm transition-all ease-in-out hover:bg-gray-200",h===g?"bg-blue-500 text-white hover:bg-blue-600":""),children:[e.jsxRuntimeExports.jsx("span",{children:o.capitalize(h)}),e.jsxRuntimeExports.jsx(b.CaretRightIcon,{className:"ml-2 h-5 w-5"})]},h)))}),e.jsxRuntimeExports.jsxs(t.ScrollArea,{onMouseEnter:()=>x.current?clearTimeout(x.current):null,className:"z-10 -mt-2 flex h-full max-h-full w-[300px] flex-col gap-2 border-l border-gray-300 transition-all ease-linear",children:[e.jsxRuntimeExports.jsx("div",{className:"sticky top-0 z-30 border-b border-gray-300 bg-gray-200 p-2 text-[9px] font-light leading-3 text-gray-500",children:R("Click on a block to add it to the page")}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2 px-2",children:m.Children.toArray(j.map(d=>e.jsxRuntimeExports.jsx(L,{block:d,library:r,closePopover:()=>f(y.OUTLINE_KEY)})))}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("br",{})]})]})]})})},_=()=>e.jsxRuntimeExports.jsx(O,{});exports.default=_;
|
|
@@ -2,13 +2,13 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import { noop as N, has as w, first as j, isEmpty as I, get as b, values as A, groupBy as P, map as E, capitalize as T } from "lodash-es";
|
|
3
3
|
import * as U from "react";
|
|
4
4
|
import B, { useState as C, useCallback as R, useEffect as _, useRef as z } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { aP as G, aQ as M, B as O, aR as W, aS as F, aT as K, aU as $, aV as D, aW as H, aX as Q, h as v, m as V, K as X, by as Y, af as q, ag as J, bf as Z } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
6
6
|
import { syncBlocksWithDefaults as ee, useChaiBlocks as te } from "@chaibuilder/runtime";
|
|
7
7
|
import { Loader as se } from "lucide-react";
|
|
8
8
|
import { atom as oe, useAtom as k } from "jotai";
|
|
9
9
|
import { c as y } from "./Functions-7jnEwJyw.js";
|
|
10
10
|
import { CaretSortIcon as re, CheckIcon as ae, CaretRightIcon as ne } from "@radix-ui/react-icons";
|
|
11
|
-
import { O as ie } from "./
|
|
11
|
+
import { O as ie } from "./MODIFIERS-fd5XOmum.js";
|
|
12
12
|
import { useTranslation as L } from "react-i18next";
|
|
13
13
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
14
14
|
import "clsx";
|
|
@@ -18,9 +18,8 @@ import "@floating-ui/react-dom";
|
|
|
18
18
|
import "i18next";
|
|
19
19
|
import "flagged";
|
|
20
20
|
import "@react-hookz/web";
|
|
21
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
22
21
|
import "tree-model";
|
|
23
|
-
import "./utils-
|
|
22
|
+
import "./utils-VpVqnC9m.js";
|
|
24
23
|
import "tailwind-merge";
|
|
25
24
|
import "@radix-ui/react-toggle";
|
|
26
25
|
import "class-variance-authority";
|
|
@@ -44,6 +43,7 @@ import "@radix-ui/react-context-menu";
|
|
|
44
43
|
import "react-icons-picker";
|
|
45
44
|
import "react-quill";
|
|
46
45
|
import "react-hotkeys-hook";
|
|
46
|
+
import "./index-YpnaudSM.js";
|
|
47
47
|
function le({
|
|
48
48
|
uiLibraries: t,
|
|
49
49
|
library: r,
|
|
@@ -70,11 +70,11 @@ function le({
|
|
|
70
70
|
)
|
|
71
71
|
] }) }),
|
|
72
72
|
/* @__PURE__ */ e.jsx(W, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(F, { children: [
|
|
73
|
-
/* @__PURE__ */ e.jsx(
|
|
73
|
+
/* @__PURE__ */ e.jsx(K, { placeholder: "Search library...", className: "h-9" }),
|
|
74
74
|
/* @__PURE__ */ e.jsxs($, { children: [
|
|
75
75
|
/* @__PURE__ */ e.jsx(D, { children: "No library found." }),
|
|
76
76
|
/* @__PURE__ */ e.jsx(H, { children: t.map((o) => /* @__PURE__ */ e.jsxs(
|
|
77
|
-
|
|
77
|
+
Q,
|
|
78
78
|
{
|
|
79
79
|
value: o.uuid,
|
|
80
80
|
onSelect: (d) => {
|
|
@@ -101,7 +101,7 @@ const ce = ({
|
|
|
101
101
|
closePopover: r,
|
|
102
102
|
library: a
|
|
103
103
|
}) => {
|
|
104
|
-
const [i, n] = C(!1), s = v("getUILibraryBlock", N), { addCoreBlock: l, addPredefinedBlock: o } =
|
|
104
|
+
const [i, n] = C(!1), s = v("getUILibraryBlock", N), { addCoreBlock: l, addPredefinedBlock: o } = V(), [d] = X(), f = (p) => {
|
|
105
105
|
const u = w(p, "styles_attrs.data-page-section");
|
|
106
106
|
return p._type === "Box" && u;
|
|
107
107
|
}, h = R(
|
|
@@ -144,7 +144,7 @@ const ce = ({
|
|
|
144
144
|
a((o) => ({ ...o, [t == null ? void 0 : t.uuid]: { loading: !1, blocks: l || [] } }));
|
|
145
145
|
})();
|
|
146
146
|
}, [t, n, s]), { data: n, isLoading: s };
|
|
147
|
-
}, ue =
|
|
147
|
+
}, ue = Y("_selectedLibrary", null), pe = () => {
|
|
148
148
|
const [t, r] = k(ue), a = v("uiLibraries", []), i = te(), n = A(i).filter((m) => m.category === "custom"), s = a.find((m) => m.uuid === t) || j(a), { data: l, isLoading: o } = de(s), d = P([...l, ...n], "group"), [f, h] = C("Hero"), [, p] = k(q), u = b(d, f, []), { t: g } = L(), c = z(null), S = (m) => {
|
|
149
149
|
c.current && (clearTimeout(c.current), c.current = null), c.current = setTimeout(() => {
|
|
150
150
|
c.current && h(m);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),o=require("react"),l=require("lodash-es"),C=require("@radix-ui/react-icons"),k=require("unsplash-js"),t=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),A=require("@react-hookz/web"),T=require("lucide-react");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("tree-model");require("./utils-D_vtk3zK.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-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("./index-ecnGWzh9.cjs");const E=async(d,q)=>new Promise((a,n)=>{k.createApi({accessKey:q}).search.getPhotos(d).then(u=>{a(u)}).catch(u=>n(u))}),z=({isModalView:d,onSelect:q})=>{const a=t.useBuilderProp("unsplashAccessKey",""),[n,f]=o.useState([]),[u,g]=o.useState(0),[c,S]=o.useState(),[x,b]=o.useState(),[I,R]=o.useState(0),[j,w]=A.useDebouncedState("",1e3),[h,m]=o.useState(!1),P=async s=>{if(l.isEmpty(j))return;let i=u+1;s&&(s.preventDefault(),i=1),m(!0),g(i);const p={query:j,page:i};c&&(p.orientation=c),x&&(p.color=x),E(p,a).then(r=>{var y,v,N;f(i===1?((y=r==null?void 0:r.response)==null?void 0:y.results)||[]:[...n,...((v=r==null?void 0:r.response)==null?void 0:v.results)||[]]),R((N=r==null?void 0:r.response)==null?void 0:N.total_pages),m(!1)}).catch(()=>{m(!1)})};return o.useEffect(()=>{if(!l.isEmpty(j)&&a){m(!0);const s={query:j,page:1};c&&(s.orientation=c),x&&(s.color=x),g(1),E(s,a).then(i=>{var p,r;f(((p=i==null?void 0:i.response)==null?void 0:p.results)||[]),R((r=i==null?void 0:i.response)==null?void 0:r.total_pages),m(!1)}).catch(()=>{m(!1)})}},[c,x,j,a]),l.isEmpty(a)?e.jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center",children:e.jsxRuntimeExports.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsxRuntimeExports.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"underline px-1 hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("form",{className:"flex items-center rounded-md border bg-gray-100 p-px",children:[e.jsxRuntimeExports.jsx(t.Input,{type:"text",name:"query",className:"input",placeholder:'Try "dog" or "apple"',onChange:s=>w(s.target.value)}),e.jsxRuntimeExports.jsxs(t.Popover,{children:[e.jsxRuntimeExports.jsx(t.PopoverTrigger,{asChild:!0,className:"h-full w-10 cursor-pointer p-2.5 hover:bg-slate-200",children:e.jsxRuntimeExports.jsx(C.MixerHorizontalIcon,{})}),e.jsxRuntimeExports.jsx(t.PopoverContent,{side:d?"bottom":"right",className:"z-[9999] flex w-max items-center justify-center",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("div",{className:"py-1 text-sm font-medium",children:"Orientation"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:c,onValueChange:s=>S(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"landscape",children:"Landscape"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"portrait",children:"Portrait"}),e.jsxRuntimeExports.jsx(t.SelectItem,{value:"squarish",children:"Square"})]})]}),e.jsxRuntimeExports.jsx("div",{className:"pb-1 pt-2 text-sm font-medium",children:"Color"}),e.jsxRuntimeExports.jsxs(t.Select,{defaultValue:x,onValueChange:s=>b(s),children:[e.jsxRuntimeExports.jsx(t.SelectTrigger,{className:"h-auto w-40 p-1 px-3",children:e.jsxRuntimeExports.jsx(t.SelectValue,{placeholder:"Select"})}),e.jsxRuntimeExports.jsxs(t.SelectContent,{className:"z-[9999]",children:[e.jsxRuntimeExports.jsx(t.SelectItem,{value:"",children:"All"}),["black_and_white","black","white","yellow","orange","red","purple","magenta","green","teal","blue"].map(s=>e.jsxRuntimeExports.jsx(t.SelectItem,{value:s,children:l.startCase(s)},s))]})]})]})})]})]}),e.jsxRuntimeExports.jsxs(t.ScrollArea,{className:`h-full ${d&&!l.isEmpty(n)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[l.isEmpty(n)&&!h&&e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Data"}),e.jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),d?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:n.map(s=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>q(s.urls.regular),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id))}):n.map(s=>e.jsxRuntimeExports.jsx("div",{className:"w-full px-2 py-1",children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:s.alt_description,src:s.urls.small})})},s.id)),h&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsxRuntimeExports.jsx(T.Loader,{className:"animate-spin w-6 h-6"})," Loading..."]}),!l.isEmpty(n)&&u<I&&!h&&e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>P(void 0),disabled:h,children:h?"":"Load More"})]})]})};exports.default=z;exports.fetchImage=E;
|
|
@@ -3,7 +3,7 @@ import { useState as p, useEffect as D } from "react";
|
|
|
3
3
|
import { isEmpty as d, startCase as E } from "lodash-es";
|
|
4
4
|
import { MixerHorizontalIcon as L } from "@radix-ui/react-icons";
|
|
5
5
|
import { createApi as B } from "unsplash-js";
|
|
6
|
-
import { h as F,
|
|
6
|
+
import { h as F, bd as K, aP as Q, aQ as U, aR as V, a5 as P, a6 as C, a7 as S, a8 as I, a9 as h, bf as O, B as R } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
7
7
|
import { useDebouncedState as H } from "@react-hookz/web";
|
|
8
8
|
import { Loader as $ } from "lucide-react";
|
|
9
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -15,13 +15,12 @@ import "jotai";
|
|
|
15
15
|
import "i18next";
|
|
16
16
|
import "react-i18next";
|
|
17
17
|
import "flagged";
|
|
18
|
-
import "./
|
|
18
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
19
19
|
import "./Functions-7jnEwJyw.js";
|
|
20
20
|
import "tailwind-merge";
|
|
21
21
|
import "@chaibuilder/runtime";
|
|
22
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
23
22
|
import "tree-model";
|
|
24
|
-
import "./utils-
|
|
23
|
+
import "./utils-VpVqnC9m.js";
|
|
25
24
|
import "@radix-ui/react-toggle";
|
|
26
25
|
import "class-variance-authority";
|
|
27
26
|
import "@radix-ui/react-switch";
|
|
@@ -44,6 +43,7 @@ import "@radix-ui/react-context-menu";
|
|
|
44
43
|
import "react-icons-picker";
|
|
45
44
|
import "react-quill";
|
|
46
45
|
import "react-hotkeys-hook";
|
|
46
|
+
import "./index-YpnaudSM.js";
|
|
47
47
|
const k = async (x, g) => new Promise((o, r) => {
|
|
48
48
|
B({ accessKey: g }).search.getPhotos(x).then((i) => {
|
|
49
49
|
o(i);
|
|
@@ -107,7 +107,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
107
107
|
children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
108
108
|
/* @__PURE__ */ e.jsx("div", { className: "py-1 text-sm font-medium", children: "Orientation" }),
|
|
109
109
|
/* @__PURE__ */ e.jsxs(P, { defaultValue: l, onValueChange: (s) => A(s), children: [
|
|
110
|
-
/* @__PURE__ */ e.jsx(
|
|
110
|
+
/* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
111
111
|
/* @__PURE__ */ e.jsxs(I, { className: "z-[9999]", children: [
|
|
112
112
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
113
113
|
/* @__PURE__ */ e.jsx(h, { value: "landscape", children: "Landscape" }),
|
|
@@ -117,7 +117,7 @@ const k = async (x, g) => new Promise((o, r) => {
|
|
|
117
117
|
] }),
|
|
118
118
|
/* @__PURE__ */ e.jsx("div", { className: "pb-1 pt-2 text-sm font-medium", children: "Color" }),
|
|
119
119
|
/* @__PURE__ */ e.jsxs(P, { defaultValue: n, onValueChange: (s) => q(s), children: [
|
|
120
|
-
/* @__PURE__ */ e.jsx(
|
|
120
|
+
/* @__PURE__ */ e.jsx(C, { className: "h-auto w-40 p-1 px-3", children: /* @__PURE__ */ e.jsx(S, { placeholder: "Select" }) }),
|
|
121
121
|
/* @__PURE__ */ e.jsxs(I, { className: "z-[9999]", children: [
|
|
122
122
|
/* @__PURE__ */ e.jsx(h, { value: "", children: "All" }),
|
|
123
123
|
[
|
|
@@ -3,7 +3,7 @@ import { useState as l, useEffect as w } from "react";
|
|
|
3
3
|
import { isEmpty as b, map as j } from "lodash-es";
|
|
4
4
|
import { GearIcon as C, UploadIcon as U, Cross1Icon as k } from "@radix-ui/react-icons";
|
|
5
5
|
import { atom as F, useAtom as E } from "jotai";
|
|
6
|
-
import { h as v,
|
|
6
|
+
import { h as v, bf as A } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "react-dom";
|
|
@@ -12,14 +12,13 @@ import "@floating-ui/react-dom";
|
|
|
12
12
|
import "i18next";
|
|
13
13
|
import "react-i18next";
|
|
14
14
|
import "flagged";
|
|
15
|
-
import "./
|
|
15
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
16
16
|
import "./Functions-7jnEwJyw.js";
|
|
17
17
|
import "tailwind-merge";
|
|
18
18
|
import "@chaibuilder/runtime";
|
|
19
19
|
import "@react-hookz/web";
|
|
20
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
21
20
|
import "tree-model";
|
|
22
|
-
import "./utils-
|
|
21
|
+
import "./utils-VpVqnC9m.js";
|
|
23
22
|
import "@radix-ui/react-toggle";
|
|
24
23
|
import "class-variance-authority";
|
|
25
24
|
import "@radix-ui/react-switch";
|
|
@@ -43,6 +42,7 @@ import "react-icons-picker";
|
|
|
43
42
|
import "react-quill";
|
|
44
43
|
import "react-hotkeys-hook";
|
|
45
44
|
import "lucide-react";
|
|
45
|
+
import "./index-YpnaudSM.js";
|
|
46
46
|
const R = F([]), Ie = ({ isModalView: r, onSelect: a }) => {
|
|
47
47
|
const p = v("uploadMediaCallback"), m = v("fetchMediaCallback"), [o, n] = E(R), [s, u] = l(!1), [x, f] = l(!1), [d, c] = l(), [h, y] = l("");
|
|
48
48
|
w(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),s=require("react"),o=require("lodash-es"),m=require("@radix-ui/react-icons"),E=require("jotai"),p=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("i18next");require("react-i18next");require("flagged");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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-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("./index-ecnGWzh9.cjs");const N=E.atom([]),I=({isModalView:t,onSelect:l})=>{const j=p.useBuilderProp("uploadMediaCallback"),a=p.useBuilderProp("fetchMediaCallback"),[i,x]=E.useAtom(N),[n,f]=s.useState(!1),[h,q]=s.useState(!1),[c,d]=s.useState(),[g,R]=s.useState("");s.useEffect(()=>{(async()=>{if(!a)return;q(!0);const r=await a();x(r||[]),q(!1)})()},[]);const v=r=>{var u,b;r&&((b=(u=r==null?void 0:r.target)==null?void 0:u.files)==null?void 0:b.length)>0&&d(r.target.files[0])},y=async()=>{if(j){f(!0);try{const{url:r}=await j(c);l(r),d(void 0);const u=await a();x(u)}catch(r){x([]),R((r==null?void 0:r.message)||"Something went wrong.")}f(!1)}};return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[c?e.jsxRuntimeExports.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center rounded-md border bg-slate-50 p-2 px-1",children:[e.jsxRuntimeExports.jsx("img",{src:URL.createObjectURL(c),alt:"",className:"h-auto max-h-96 w-full max-w-sm rounded-md object-contain"}),g&&e.jsxRuntimeExports.jsx("div",{className:"w-full pt-2 text-center text-sm text-red-500",children:g}),e.jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center justify-center gap-2 pt-2",children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:y,disabled:n,className:"flex items-center rounded-full bg-blue-500 px-3 py-1 text-sm text-white hover:bg-blue-600 hover:text-white",children:[n?e.jsxRuntimeExports.jsx(m.GearIcon,{className:"animate-spin"}):e.jsxRuntimeExports.jsx(m.UploadIcon,{className:"animate-bounce"})," ",n?"Uploading...":"Upload"]}),!n&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"flex items-center rounded-full border border-gray-300 px-3 py-1 text-sm hover:bg-gray-200",onClick:()=>d(void 0),children:[e.jsxRuntimeExports.jsx(m.Cross1Icon,{})," Cancel"]})]})]}):e.jsxRuntimeExports.jsxs("label",{htmlFor:t?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-md border border-dashed border-blue-900 bg-gray-200 py-8 hover:bg-blue-50",children:[e.jsxRuntimeExports.jsx("div",{className:"text-3xl",children:"+"}),e.jsxRuntimeExports.jsx("div",{children:"Click to choose file"})]}),e.jsxRuntimeExports.jsx("input",{type:"file",id:t?"upload-in-modal":"upload-in-panel",hidden:!0,onChange:v})]}),e.jsxRuntimeExports.jsxs(p.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${t?"px-2":""} pt-2`,children:[o.isEmpty(i)&&h&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:"Fetching..."})}),o.isEmpty(i)&&!h&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Images"})}),t?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:o.map(i,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>l(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.thumbUrl})})},r.id))}):o.map(i,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>l(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.url})})},r.id))]})]})};exports.default=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),x=require("react"),P=require("lodash-es"),t=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),g=require("./controls-rRZhz0vu.cjs"),R=require("./form-KWYHDVIf.cjs"),f=require("./index-VOrp9ZpX.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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-icons");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("./index-ecnGWzh9.cjs");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./core.cjs");require("sonner");require("./html-to-json-O1OpqICe.cjs");require("himalaya");const b=({closeModal:i})=>{var l,o;const u=f.useAddPage(),[r,m]=x.useState({name:"",slug:"",blocks:[],type:"STATIC",seoData:{},template:""}),p=()=>{u.mutate(r,{onSuccess:()=>i()})},j=({formData:n},s)=>{m(q=>{var d,c;const a={[s]:n[s]};return s==="name"?a.slug=P.kebabCase((d=n[s])==null?void 0:d.replace(/\d/g,"")):s==="slug"&&(a.slug=(c=n[s])==null?void 0:c.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_")),{...q,...a}})},h={name:g.g({title:"Page Name",default:r.name}),slug:g.g({title:"Page Slug",default:r.slug})};return e.jsxRuntimeExports.jsxs(t.DialogContent,{children:[e.jsxRuntimeExports.jsx("div",{className:"px-1 font-bold",children:"Add Page"}),e.jsxRuntimeExports.jsx(R.Form,{formData:r,properties:h,onChange:j,disabled:u.isPending}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-end",children:e.jsxRuntimeExports.jsx(t.Button,{type:"submit",disabled:!r.name||!r.slug||((l=r.name)==null?void 0:l.length)<2||((o=r.slug)==null?void 0:o.length)<2||u.isPending,onClick:p,children:"Add Page"})})]})},E=()=>{const[i,u]=x.useState(!1);return e.jsxRuntimeExports.jsxs(t.Dialog,{open:i,onOpenChange:()=>u(!i),children:[e.jsxRuntimeExports.jsx(t.DialogTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsx(t.Button,{size:"sm",variant:"link",className:"text-blue-500",onClick:()=>u(!i),children:"+ New Page"})}),i&&e.jsxRuntimeExports.jsx(b,{closeModal:()=>u(!i)})]})};exports.default=E;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { kebabCase as j } from "lodash-es";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { F as D } from "./form-
|
|
7
|
-
import { e as N } from "./index-
|
|
4
|
+
import { Z as C, B as u, Y as b, aa as A } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
5
|
+
import { g } from "./controls-yjgoZzB6.js";
|
|
6
|
+
import { F as D } from "./form-PQSmqcIl.js";
|
|
7
|
+
import { e as N } from "./index-i2kgLkjC.js";
|
|
8
8
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
9
|
import "clsx";
|
|
10
10
|
import "react-dom";
|
|
@@ -14,14 +14,13 @@ import "jotai";
|
|
|
14
14
|
import "i18next";
|
|
15
15
|
import "react-i18next";
|
|
16
16
|
import "flagged";
|
|
17
|
-
import "./
|
|
17
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
18
18
|
import "./Functions-7jnEwJyw.js";
|
|
19
19
|
import "tailwind-merge";
|
|
20
20
|
import "@chaibuilder/runtime";
|
|
21
21
|
import "@react-hookz/web";
|
|
22
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
23
22
|
import "tree-model";
|
|
24
|
-
import "./utils-
|
|
23
|
+
import "./utils-VpVqnC9m.js";
|
|
25
24
|
import "@radix-ui/react-toggle";
|
|
26
25
|
import "class-variance-authority";
|
|
27
26
|
import "@radix-ui/react-switch";
|
|
@@ -46,11 +45,12 @@ import "react-icons-picker";
|
|
|
46
45
|
import "react-quill";
|
|
47
46
|
import "react-hotkeys-hook";
|
|
48
47
|
import "lucide-react";
|
|
48
|
+
import "./index-YpnaudSM.js";
|
|
49
49
|
import "@rjsf/core";
|
|
50
50
|
import "@rjsf/validator-ajv8";
|
|
51
51
|
import "./core.js";
|
|
52
52
|
import "sonner";
|
|
53
|
-
import "./html-to-json-
|
|
53
|
+
import "./html-to-json-GJ6RioQf.js";
|
|
54
54
|
import "himalaya";
|
|
55
55
|
const S = ({ closeModal: e }) => {
|
|
56
56
|
var a, s;
|
|
@@ -79,7 +79,7 @@ const S = ({ closeModal: e }) => {
|
|
|
79
79
|
}),
|
|
80
80
|
slug: g({ title: "Page Slug", default: o.slug })
|
|
81
81
|
};
|
|
82
|
-
return /* @__PURE__ */ t.jsxs(
|
|
82
|
+
return /* @__PURE__ */ t.jsxs(C, { children: [
|
|
83
83
|
/* @__PURE__ */ t.jsx("div", { className: "px-1 font-bold", children: "Add Page" }),
|
|
84
84
|
/* @__PURE__ */ t.jsx(D, { formData: o, properties: P, onChange: h, disabled: i.isPending }),
|
|
85
85
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ t.jsx(
|
|
@@ -92,13 +92,13 @@ const S = ({ closeModal: e }) => {
|
|
|
92
92
|
}
|
|
93
93
|
) })
|
|
94
94
|
] });
|
|
95
|
-
},
|
|
95
|
+
}, vt = () => {
|
|
96
96
|
const [e, i] = c(!1);
|
|
97
|
-
return /* @__PURE__ */ t.jsxs(
|
|
97
|
+
return /* @__PURE__ */ t.jsxs(b, { open: e, onOpenChange: () => i(!e), children: [
|
|
98
98
|
/* @__PURE__ */ t.jsx(A, { asChild: !0, children: /* @__PURE__ */ t.jsx(u, { size: "sm", variant: "link", className: "text-blue-500", onClick: () => i(!e), children: "+ New Page" }) }),
|
|
99
99
|
e && /* @__PURE__ */ t.jsx(S, { closeModal: () => i(!e) })
|
|
100
100
|
] });
|
|
101
101
|
};
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
vt as default
|
|
104
104
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as a, b as n, d as c, e as x, g as d, B as j } from "./ChaiBuilderEditor-
|
|
2
|
+
import { A as a, b as n, d as c, e as x, g as d, B as j } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "clsx";
|
|
@@ -11,14 +11,13 @@ import "i18next";
|
|
|
11
11
|
import "react-i18next";
|
|
12
12
|
import "flagged";
|
|
13
13
|
import "lodash-es";
|
|
14
|
-
import "./
|
|
14
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
15
15
|
import "./Functions-7jnEwJyw.js";
|
|
16
16
|
import "tailwind-merge";
|
|
17
17
|
import "@chaibuilder/runtime";
|
|
18
18
|
import "@react-hookz/web";
|
|
19
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
20
19
|
import "tree-model";
|
|
21
|
-
import "./utils-
|
|
20
|
+
import "./utils-VpVqnC9m.js";
|
|
22
21
|
import "@radix-ui/react-toggle";
|
|
23
22
|
import "class-variance-authority";
|
|
24
23
|
import "@radix-ui/react-switch";
|
|
@@ -43,6 +42,7 @@ import "react-icons-picker";
|
|
|
43
42
|
import "react-quill";
|
|
44
43
|
import "react-hotkeys-hook";
|
|
45
44
|
import "lucide-react";
|
|
45
|
+
import "./index-YpnaudSM.js";
|
|
46
46
|
const ei = ({
|
|
47
47
|
open: o,
|
|
48
48
|
onCancel: m = () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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-icons");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("./index-ecnGWzh9.cjs");const x=({open:q,onCancel:t=()=>{},onConfirm:s,title:n,description:i,disabled:u,cancelText:l="Discard",confirmText:o="Save"})=>e.jsxRuntimeExports.jsx(r.AlertDialog,{open:q,children:e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTitle,{children:n}),i&&e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:i}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u,onClick:t,children:l}),e.jsxRuntimeExports.jsx(r.Button,{variant:"default",onClick:s,disabled:u,children:o})]})]})});exports.default=x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("lodash-es"),a="#styles:",n=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"code"}});const d=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",required:i.required||!1,ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["ai","required"])},uiSchema:{"ui:placeholder":i.placeholder||"Enter here"}}),r=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",required:i.required||!1,ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["i18n","required","rows"])},uiSchema:{"ui:widget":"textarea","ui:placeholder":i.placeholder||"Enter here","ui:options":{rows:i.rows||4}}}),u=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||!1,dataType:"boolean",binding:t.get(i,"binding",!0),ai:i.ai||void 0,schema:{type:"boolean",...t.omit(i,["i18n","required"])},uiSchema:{"ui:title":i.title||"Select Item","ui:description":""}}),g=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"number",required:i.required||!1,ai:i.ai||void 0,schema:{type:"number",...t.omit(i,["i18n","required"])},uiSchema:{}}),l=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),required:i.required||!1,dataType:"string",ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["i18n","required","options","binding"]),oneOf:i.options.map(e=>({const:e.value,title:e.title}))},uiSchema:{"ui:widget":"select"}}),s=i=>({type:"singular",i18n:i.i18n||!1,default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"color"}});const p=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"richtext"}}),o=i=>({type:"model",title:i.title,dataType:"object",default:i.default||{},binding:t.get(i,"binding",!0),properties:i.properties}),y=i=>({type:"list",itemProperties:i.itemProperties,binding:t.get(i,"binding",!0),title:i.title,ai:i.ai||void 0,dataType:"array",default:i.default||[],itemTitle:i.getItemLabel?i.getItemLabel({}):()=>""}),m=i=>({type:"styles",binding:!1,default:`${a},${i.default||""}`,presets:i.presets||{}}),c=i=>({default:i.default||"",binding:t.get(i,"binding",!0),type:"singular",dataType:"string",ai:i.ai||void 0,schema:{type:"string",title:"Icon",default:i.default||""},uiSchema:{"ui:widget":"icon"}}),b=i=>({default:i.default,type:"singular",binding:t.get(i,"binding",!0),dataType:"object",ai:i.ai||void 0,schema:{type:"object",...i||{},properties:{type:{type:"string"},href:{type:"string"},target:{type:"string"}}},uiSchema:{"ui:field":"link"}}),f=i=>({type:"singular",default:i.default||"",binding:t.get(i,"binding",!0),dataType:"string",ai:i.ai||void 0,schema:{type:"string",...t.omit(i,["i18n","required"])},uiSchema:{"ui:widget":"image"}});exports.S=y;exports.T=c;exports.b=p;exports.c=u;exports.f=l;exports.g=d;exports.h=o;exports.o=m;exports.q=b;exports.r=r;exports.s=s;exports.u=n;exports.v=f;exports.y=g;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { get as t, omit as e } from "lodash-es";
|
|
2
|
-
const n = "#styles:"
|
|
3
|
-
|
|
2
|
+
const n = "#styles:", r = (i) => ({
|
|
3
|
+
type: "singular",
|
|
4
|
+
default: i.default || "",
|
|
5
|
+
binding: t(i, "binding", !0),
|
|
6
|
+
dataType: "string",
|
|
7
|
+
schema: {
|
|
8
|
+
type: "string",
|
|
9
|
+
...e(i, ["i18n", "required"])
|
|
10
|
+
},
|
|
11
|
+
uiSchema: {
|
|
12
|
+
"ui:widget": "code"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const u = (i) => ({
|
|
4
16
|
type: "singular",
|
|
5
17
|
default: i.default || "",
|
|
6
18
|
binding: t(i, "binding", !0),
|
|
@@ -14,7 +26,7 @@ const r = (i) => ({
|
|
|
14
26
|
uiSchema: {
|
|
15
27
|
"ui:placeholder": i.placeholder || "Enter here"
|
|
16
28
|
}
|
|
17
|
-
}),
|
|
29
|
+
}), l = (i) => ({
|
|
18
30
|
type: "singular",
|
|
19
31
|
default: i.default || "",
|
|
20
32
|
binding: t(i, "binding", !0),
|
|
@@ -32,7 +44,7 @@ const r = (i) => ({
|
|
|
32
44
|
rows: i.rows || 4
|
|
33
45
|
}
|
|
34
46
|
}
|
|
35
|
-
}),
|
|
47
|
+
}), g = (i) => ({
|
|
36
48
|
type: "singular",
|
|
37
49
|
i18n: i.i18n || !1,
|
|
38
50
|
default: i.default || !1,
|
|
@@ -59,7 +71,7 @@ const r = (i) => ({
|
|
|
59
71
|
...e(i, ["i18n", "required"])
|
|
60
72
|
},
|
|
61
73
|
uiSchema: {}
|
|
62
|
-
}),
|
|
74
|
+
}), p = (i) => ({
|
|
63
75
|
type: "singular",
|
|
64
76
|
default: i.default || "",
|
|
65
77
|
binding: t(i, "binding", !0),
|
|
@@ -74,7 +86,7 @@ const r = (i) => ({
|
|
|
74
86
|
uiSchema: {
|
|
75
87
|
"ui:widget": "select"
|
|
76
88
|
}
|
|
77
|
-
}),
|
|
89
|
+
}), y = (i) => ({
|
|
78
90
|
type: "singular",
|
|
79
91
|
i18n: i.i18n || !1,
|
|
80
92
|
default: i.default || "",
|
|
@@ -89,7 +101,7 @@ const r = (i) => ({
|
|
|
89
101
|
"ui:widget": "color"
|
|
90
102
|
}
|
|
91
103
|
});
|
|
92
|
-
const
|
|
104
|
+
const o = (i) => ({
|
|
93
105
|
type: "singular",
|
|
94
106
|
default: i.default || "",
|
|
95
107
|
binding: t(i, "binding", !0),
|
|
@@ -102,7 +114,7 @@ const y = (i) => ({
|
|
|
102
114
|
uiSchema: {
|
|
103
115
|
"ui:widget": "richtext"
|
|
104
116
|
}
|
|
105
|
-
}),
|
|
117
|
+
}), c = (i) => ({
|
|
106
118
|
type: "model",
|
|
107
119
|
title: i.title,
|
|
108
120
|
dataType: "object",
|
|
@@ -118,12 +130,12 @@ const y = (i) => ({
|
|
|
118
130
|
dataType: "array",
|
|
119
131
|
default: i.default || [],
|
|
120
132
|
itemTitle: i.getItemLabel ? i.getItemLabel({}) : () => ""
|
|
121
|
-
}),
|
|
133
|
+
}), b = (i) => ({
|
|
122
134
|
type: "styles",
|
|
123
135
|
binding: !1,
|
|
124
136
|
default: `${n},${i.default || ""}`,
|
|
125
137
|
presets: i.presets || {}
|
|
126
|
-
}),
|
|
138
|
+
}), f = (i) => ({
|
|
127
139
|
default: i.default || "",
|
|
128
140
|
binding: t(i, "binding", !0),
|
|
129
141
|
type: "singular",
|
|
@@ -137,7 +149,7 @@ const y = (i) => ({
|
|
|
137
149
|
uiSchema: {
|
|
138
150
|
"ui:widget": "icon"
|
|
139
151
|
}
|
|
140
|
-
}),
|
|
152
|
+
}), h = (i) => ({
|
|
141
153
|
default: i.default,
|
|
142
154
|
type: "singular",
|
|
143
155
|
binding: t(i, "binding", !0),
|
|
@@ -155,7 +167,7 @@ const y = (i) => ({
|
|
|
155
167
|
uiSchema: {
|
|
156
168
|
"ui:field": "link"
|
|
157
169
|
}
|
|
158
|
-
}),
|
|
170
|
+
}), q = (i) => ({
|
|
159
171
|
type: "singular",
|
|
160
172
|
default: i.default || "",
|
|
161
173
|
binding: t(i, "binding", !0),
|
|
@@ -170,17 +182,18 @@ const y = (i) => ({
|
|
|
170
182
|
}
|
|
171
183
|
});
|
|
172
184
|
export {
|
|
173
|
-
|
|
185
|
+
m as S,
|
|
174
186
|
f as T,
|
|
175
187
|
o as b,
|
|
176
|
-
|
|
188
|
+
g as c,
|
|
177
189
|
p as f,
|
|
178
190
|
u as g,
|
|
179
|
-
|
|
180
|
-
r as l,
|
|
181
|
-
y as m,
|
|
191
|
+
c as h,
|
|
182
192
|
b as o,
|
|
183
193
|
h as q,
|
|
184
194
|
l as r,
|
|
185
|
-
|
|
195
|
+
y as s,
|
|
196
|
+
r as u,
|
|
197
|
+
q as v,
|
|
198
|
+
s as y
|
|
186
199
|
};
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ChaiBuilderEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ChaiBuilderEditor-ZRHqW7Gd.cjs"),s=require("react-i18next");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("clsx");require("react-dom");require("@radix-ui/react-scroll-area");require("@floating-ui/react-dom");require("jotai");require("i18next");require("flagged");require("lodash-es");require("./MODIFIERS-mVmfEGgo.cjs");require("./Functions-N3yhPYKY.cjs");require("tailwind-merge");require("@chaibuilder/runtime");require("@react-hookz/web");require("tree-model");require("./utils-D_vtk3zK.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-icons");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("./index-ecnGWzh9.cjs");exports.ChaiBuilderEditor=e.ChaiBuilderEditor;exports.useActiveModal=e.useActiveModal;exports.useActivePanel=e.useActivePanel;exports.useAddBlock=e.useAddBlock;exports.useAddBlockParent=e.useAddBlockParent;exports.useAddClassesToBlocks=e.useAddClassesToBlocks;exports.useAllBlocks=e.useAllBlocks;exports.useBlocksStore=e.useBlocksStore;exports.useBrandingOptions=e.useBrandingOptions;exports.useBuilderProp=e.useBuilderProp;exports.useBuilderReset=e.useBuilderReset;exports.useCanvasWidth=e.useCanvasWidth;exports.useCanvasZoom=e.useCanvasZoom;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.useGetPageData=e.useGetPageData;exports.useHiddenBlockIds=e.useHiddenBlockIds;exports.useHighlightBlockId=e.useHighlightBlockId;exports.usePasteBlocks=e.usePasteBlocks;exports.usePreviewMode=e.usePreviewMode;exports.useReadOnlyMode=e.useReadOnlyMode;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;Object.defineProperty(exports,"useTranslation",{enumerable:!0,get:()=>s.useTranslation});
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as K, l as N,
|
|
1
|
+
import { C as K, l as N, T as Q, m as V, V as X, n as Z, S as Y, i as _, F as $, h as ss, u as es, o as os, p as ts, q as as, r as rs, s as is, t as ps, v as ls, w as ms, x as us, y as ds, z as cs, D as Bs, E as ks, k as ns, G as Cs, H as Ss, U as Ps, L as gs, J as vs, I as ys, K as As, R as Is, W as hs, X as Ms, M as Rs, O as Ds, N as Us, j as Ts, P as xs, Q as Hs } from "./ChaiBuilderEditor-3xIN-AP_.js";
|
|
2
2
|
import { useTranslation as bs } from "react-i18next";
|
|
3
3
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -11,14 +11,13 @@ import "jotai";
|
|
|
11
11
|
import "i18next";
|
|
12
12
|
import "flagged";
|
|
13
13
|
import "lodash-es";
|
|
14
|
-
import "./
|
|
14
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
15
15
|
import "./Functions-7jnEwJyw.js";
|
|
16
16
|
import "tailwind-merge";
|
|
17
17
|
import "@chaibuilder/runtime";
|
|
18
18
|
import "@react-hookz/web";
|
|
19
|
-
import "./MODIFIERS-cBT31iqE.js";
|
|
20
19
|
import "tree-model";
|
|
21
|
-
import "./utils-
|
|
20
|
+
import "./utils-VpVqnC9m.js";
|
|
22
21
|
import "@radix-ui/react-toggle";
|
|
23
22
|
import "class-variance-authority";
|
|
24
23
|
import "@radix-ui/react-switch";
|
|
@@ -43,14 +42,15 @@ import "react-icons-picker";
|
|
|
43
42
|
import "react-quill";
|
|
44
43
|
import "react-hotkeys-hook";
|
|
45
44
|
import "lucide-react";
|
|
45
|
+
import "./index-YpnaudSM.js";
|
|
46
46
|
export {
|
|
47
47
|
K as ChaiBuilderEditor,
|
|
48
48
|
N as useActiveModal,
|
|
49
49
|
Q as useActivePanel,
|
|
50
50
|
V as useAddBlock,
|
|
51
51
|
X as useAddBlockParent,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
Z as useAddClassesToBlocks,
|
|
53
|
+
Y as useAllBlocks,
|
|
54
54
|
_ as useBlocksStore,
|
|
55
55
|
$ as useBrandingOptions,
|
|
56
56
|
ss as useBuilderProp,
|