@chaibuilder/sdk 1.2.13 → 1.2.15
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-zN5--UP6.js → AddBlocks-IE14csoo.js} +63 -57
- package/dist/{AddBlocks-tomDo_Is.cjs → AddBlocks-OpGQyVQZ.cjs} +1 -1
- package/dist/{BrandingOptions-BUmE4f72.cjs → BrandingOptions-tBWzqas5.cjs} +1 -1
- package/dist/{BrandingOptions-LbizrmRI.js → BrandingOptions-t_MjeHSM.js} +1 -1
- package/dist/{CanvasArea-nT6ZJh_V.cjs → CanvasArea-SBeW-Kdq.cjs} +4 -4
- package/dist/{CanvasArea-OSH8wqt1.js → CanvasArea-TR5t1xxh.js} +3 -3
- package/dist/{CurrentPage-SWR9WU4k.cjs → CurrentPage--ag-4O2R.cjs} +1 -1
- package/dist/{CurrentPage-FzqNBLy4.js → CurrentPage-JUlhyVbI.js} +2 -2
- package/dist/{Layers-FRHRlPIH.cjs → Layers-05Ut4xZA.cjs} +1 -1
- package/dist/{Layers-g5_pwwgO.js → Layers-Dav1kBNN.js} +125 -148
- package/dist/{PagesPanel-PSg6aqlK.js → PagesPanel--feFCDeH.js} +3 -3
- package/dist/{PagesPanel-3jcf5-iH.cjs → PagesPanel-TLVCJtcF.cjs} +1 -1
- package/dist/{ProjectPanel-XW_Bx880.js → ProjectPanel--Vq6HSMl.js} +3 -3
- package/dist/{ProjectPanel-EyEcNyh8.cjs → ProjectPanel-Q8sNFs1f.cjs} +1 -1
- package/dist/{Settings-h1c8ukpI.cjs → Settings-9iryF0yE.cjs} +1 -1
- package/dist/{Settings--7qJ7ciF.js → Settings-DjE6HR2E.js} +2 -2
- package/dist/{SidePanels-Lmj0Qkd1.js → SidePanels-4zpCzCM6.js} +68 -68
- package/dist/{SidePanels-NbM1mfsY.cjs → SidePanels-LVED6uuT.cjs} +1 -1
- package/dist/{Topbar-2sOsQD2d.cjs → Topbar-iH2L4pe0.cjs} +1 -1
- package/dist/{Topbar-xvrno03z.js → Topbar-ryFhl-PC.js} +1 -1
- package/dist/{UnsplashImages-EiYSWkBa.cjs → UnsplashImages-SrxA-yNu.cjs} +1 -1
- package/dist/{UnsplashImages-hhPOf7kt.js → UnsplashImages-ppQXZ28F.js} +1 -1
- package/dist/{UploadImages-JKjE44i7.js → UploadImages-IKR4oX2k.js} +1 -1
- package/dist/{UploadImages-GGCExfQd.cjs → UploadImages-VBiO6lqp.cjs} +1 -1
- package/dist/{add-page-modal-65wltt_4.cjs → add-page-modal-KixvLXAG.cjs} +1 -1
- package/dist/{add-page-modal-Bl6y65im.js → add-page-modal-nZJaunuz.js} +3 -3
- package/dist/{confirm-alert-Nw1JCtuu.js → confirm-alert-QKtbNbWz.js} +1 -1
- package/dist/{confirm-alert-_DCO6hCV.cjs → confirm-alert-uV_PtYc3.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-Q3Si4nyd.cjs → delete-page-modal-6GxLQkEk.cjs} +1 -1
- package/dist/{delete-page-modal-tiJ2UA5f.js → delete-page-modal-pN5cFz-m.js} +2 -2
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-vNgf0kO2.cjs → form-KkP1F7h1.cjs} +1 -1
- package/dist/{form-lbFCPUoE.js → form-faX0Yn4Q.js} +1 -1
- package/dist/{index-bfKqnRvZ.cjs → index-ERorPL9q.cjs} +1 -1
- package/dist/{index-m9VziIOy.js → index-QGA4ayU7.js} +275 -275
- package/dist/{index-wwk4px_E.js → index-nrRnwUaC.js} +665 -660
- package/dist/{index-hS9T9Nub.cjs → index-xJ8LmB04.cjs} +22 -22
- package/dist/{page-viewer-w-ahza8q.cjs → page-viewer-Nn__90Uo.cjs} +1 -1
- package/dist/{page-viewer-rLCyM4QC.js → page-viewer-U7o88VvR.js} +3 -3
- package/dist/{project-general-setting-RTcIwUWc.cjs → project-general-setting-C98_GooL.cjs} +1 -1
- package/dist/{project-general-setting-pY-Mkc8G.js → project-general-setting-h0TeKYRf.js} +3 -3
- package/dist/{project-seo-setting-aRDdqu88.cjs → project-seo-setting-8oJUrOqk.cjs} +1 -1
- package/dist/{project-seo-setting-9V67NFil.js → project-seo-setting-Sl6AE-Q7.js} +2 -2
- package/dist/{single-page-detail-wHDpn40R.cjs → single-page-detail-RYI1ukX6.cjs} +1 -1
- package/dist/{single-page-detail-HYX4R3U0.js → single-page-detail-a8zY-XHs.js} +4 -4
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +110 -2
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useAddBlockByDrop-1WvPoBXa.cjs → useAddBlockByDrop-LBgi6GL7.cjs} +1 -1
- package/dist/{useAddBlockByDrop-bs_SH7Tw.js → useAddBlockByDrop-Y-g4O8UC.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),u=require("react"),n=require("@radix-ui/react-icons"),o=require("./index-ERorPL9q.cjs"),x=require("./index-xJ8LmB04.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.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-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("react-i18next");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-2LSrWJaY.cjs");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-RYI1ukX6.cjs"))),j=({pageData:s})=>{const[r,i]=u.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:t=>{i(r==="PENDING"?"ALERT":t?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:t=>{t.stopPropagation(),i("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(n.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(n.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex w-full animate-pulse flex-col gap-y-3",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-6 w-1/2"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-300 h-20 w-full"})]}),children:e.jsxRuntimeExports.jsx(m,{pageData:s,open:r,setOpen:i})})})]})},q=s=>{const[r]=x.useCurrentPage(),{data:i}=x.useProject(),t=x.useChangePage(),l=(i==null?void 0:i.homepage)===s.uuid,a=r===s.uuid,c=()=>t(s);return i?e.jsxRuntimeExports.jsxs("button",{className:`group relative flex w-full cursor-pointer items-center justify-between px-2.5 py-2 ${a?"bg-blue-200 ":""}`,onClick:c,type:"button",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex text-sm items-center gap-x-1.5",children:[l?e.jsxRuntimeExports.jsx(n.HomeIcon,{}):e.jsxRuntimeExports.jsx(n.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},p=({pages:s,isLoading:r})=>r?e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-1 px-2.5 pt-2",children:[e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"}),e.jsxRuntimeExports.jsx("div",{className:"bg-background-200 h-7 w-full"})]}):s.length===0?e.jsxRuntimeExports.jsx("div",{className:"px-2.5 pb-2 pt-4",children:"No pages"}):e.jsxRuntimeExports.jsx("div",{className:"-mb-2",children:u.Children.toArray(s.map(i=>e.jsxRuntimeExports.jsx(q,{...i})))});exports.default=p;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import s, { useState as n, Suspense as l } from "react";
|
|
3
3
|
import { ChevronRightIcon as c, GearIcon as u, HomeIcon as d, FileTextIcon as x } from "@radix-ui/react-icons";
|
|
4
|
-
import { aT as g, aU as h, aV as f } from "./index-
|
|
5
|
-
import { e as j, b as N, d as b } from "./index-
|
|
4
|
+
import { aT as g, aU as h, aV as f } from "./index-QGA4ayU7.js";
|
|
5
|
+
import { e as j, b as N, d as b } from "./index-nrRnwUaC.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "./Functions-7jnEwJyw.js";
|
|
@@ -51,7 +51,7 @@ import "himalaya";
|
|
|
51
51
|
import "lucide-react";
|
|
52
52
|
import "./web-blocks.js";
|
|
53
53
|
import "./empty-slot-5FRrRq1E.js";
|
|
54
|
-
const v = s.lazy(() => import("./single-page-detail-
|
|
54
|
+
const v = s.lazy(() => import("./single-page-detail-a8zY-XHs.js")), P = ({ pageData: r }) => {
|
|
55
55
|
const [t, i] = n("CLOSE");
|
|
56
56
|
return /* @__PURE__ */ e.jsxs(
|
|
57
57
|
g,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./jsx-runtime-Z_BpKhVy.cjs"),a=require("react"),f=require("./index-ERorPL9q.cjs"),o=require("./empty-slot-2LSrWJaY.cjs"),d=require("./form-KkP1F7h1.cjs"),m=require("./index-xJ8LmB04.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");function j(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,u.get?u:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const g=j(a),p=({_projectData:r,seany:i})=>{const{data:e,isLoading:u}=m.useProject();g.useEffect(()=>{e&&i(e)},[e,i]);const n=({formData:s},t)=>{i(l=>({...l,[t]:s[t]}))},c={name:o.u({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.o({title:"Favicon",default:e==null?void 0:e.favicon})};return q.jsxRuntimeExports.jsx(f.ScrollArea,{className:"flex h-full select-none flex-col",children:q.jsxRuntimeExports.jsx(d.Form,{properties:c,disabled:u,formData:r,onChange:n})})};exports.default=p;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import { bf as n } from "./index-
|
|
3
|
+
import { bf as n } from "./index-QGA4ayU7.js";
|
|
4
4
|
import { u as c, o as u } from "./empty-slot-5FRrRq1E.js";
|
|
5
|
-
import { F as d } from "./form-
|
|
6
|
-
import { b as x } from "./index-
|
|
5
|
+
import { F as d } from "./form-faX0Yn4Q.js";
|
|
6
|
+
import { b as x } from "./index-nrRnwUaC.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "./Functions-7jnEwJyw.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./empty-slot-2LSrWJaY.cjs"),g=require("./form-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./empty-slot-2LSrWJaY.cjs"),g=require("./form-KkP1F7h1.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-ERorPL9q.cjs");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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");require("react-i18next");const D=({_projectData:e,seany:n})=>{var t,u,o,q,s,a;const d=({formData:f})=>{const r={...f};r.seoData.title===void 0&&(r.seoData.title=""),r.seoData.description===void 0&&(r.seoData.description=""),r.seoData.image===void 0&&(r.seoData.image=""),n(c=>({...c,...r}))},m={seoData:i.b({title:"",default:{title:((t=e.seoData)==null?void 0:t.title)||"",description:((u=e.seoData)==null?void 0:u.description)||"",image:((o=e.seoData)==null?void 0:o.image)||""},properties:{title:i.u({title:"Default Title",default:((q=e.seoData)==null?void 0:q.title)||""}),description:i.g({title:"Default Description",default:((s=e.seoData)==null?void 0:s.description)||""}),image:i.o({title:"Social Media Image",default:((a=e.seoData)==null?void 0:a.image)||""})}})};return l.jsxRuntimeExports.jsx("div",{className:"flex h-full select-none flex-col",children:l.jsxRuntimeExports.jsx(g.Form,{properties:m,formData:e,onChange:d})})};exports.default=D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { b as D, u as c, g, o as x } from "./empty-slot-5FRrRq1E.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-faX0Yn4Q.js";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "lodash-es";
|
|
@@ -9,7 +9,7 @@ import "clsx";
|
|
|
9
9
|
import "tailwind-merge";
|
|
10
10
|
import "@rjsf/core";
|
|
11
11
|
import "@rjsf/validator-ajv8";
|
|
12
|
-
import "./index-
|
|
12
|
+
import "./index-QGA4ayU7.js";
|
|
13
13
|
import "@chaibuilder/runtime";
|
|
14
14
|
import "jotai";
|
|
15
15
|
import "flat-to-nested";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),f=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),f=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-ERorPL9q.cjs"),d=require("./empty-slot-2LSrWJaY.cjs"),w=require("sonner"),p=require("./form-KkP1F7h1.cjs"),P=require("./index-xJ8LmB04.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.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-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("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");const z=f.lazy(()=>Promise.resolve().then(()=>require("./delete-page-modal-6GxLQkEk.cjs"))),L=f.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-uV_PtYc3.cjs"))),E=u=>{if(!c.isString(u)||!(u.includes("/[")&&u.includes("]")))return!1;const s=/^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/,q=/^[a-zA-Z0-9_-]+$/;let e=!0;return u.split("/").forEach(n=>{e&&(n.includes("[[")&&n.includes("]]")?e=/^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(n):n.includes("[")&&n.includes("]")?e=s.test(n):e=q.test(n))}),e},h=u=>u&&c.isEmpty(u.seoData)?{...u,seoData:{title:"",description:"",image:""}}:u,G=(u,o)=>{const s=!c.isEqual(c.omit(u,["seoData"]),c.omit(o,["seoData"])),q=!c.isEqual(h(o).seoData,h(u).seoData);return s||q},Y=({open:u,setOpen:o,pageData:s})=>{const q=P.useQueryClient(),{data:e}=P.useProject(),n=P.useUpdatePage(),m=P.useUpdateProject("Homepage updated successfully."),[i,b]=f.useState(h(s)),[a,A]=f.useState({isHomePage:(e==null?void 0:e.homepage)===s.uuid}),j=G(i,s);f.useEffect(()=>{const l=!c.isEqual(h(s),i),t=(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage;o(l||t?"PENDING":"OPEN")},[e,s,i,a,o]);const C=()=>{if(j){if(s.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")){u==="ALERT"&&o("PENDING");return}n.mutate(i,{onSuccess:()=>{q.invalidateQueries({refetchType:"active",queryKey:["pages",e==null?void 0:e.uuid]}),o("CLOSE"),w.toast.success("Page updated successfully.")}})}a.isHomePage&&(e==null?void 0:e.homepage)!==s.uuid&&m.mutate({...e,homepage:s==null?void 0:s.uuid},{onSuccess:()=>o("CLOSE")})},S=({formData:l},t)=>{b(g=>{var R,N;if(!t)return g;const x={[t]:l[t]};return t==="name"?x.slug=c.kebabCase((R=l[t])==null?void 0:R.replace(/\d/g,"")):t==="slug"?x.slug=(N=l[t])==null?void 0:N.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_"):t==="seoData"&&(x.seoData={title:l[t].title||"",description:l[t].description||"",image:l[t].image||""}),{...g,...x}})},I=({formData:l},t)=>{A(g=>{const x={[t]:l[t]};return{...g,...x}})},v={name:d.u({title:"Page Name",default:i.name}),slug:d.u({title:"Page Slug",default:i.slug})},T={seoData:d.b({title:"",description:"",default:{title:"",description:"",image:""},properties:{title:d.u({title:"Meta Title",default:i.name}),description:d.g({title:"Meta Description",default:i.slug}),image:d.o({title:"Social Media Image",default:""})}})},M={isHomePage:d.r({title:"Set as homepage",default:a.isHomePage})};return r.jsxRuntimeExports.jsxs(y.ScrollArea,{className:"flex h-full select-none flex-col",children:[r.jsxRuntimeExports.jsx(L,{open:u==="ALERT",title:"Do yo want to save changes?",onCancel:()=>o("CLOSE"),onConfirm:C,disabled:m.isPending||n.isPending}),r.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 px-2.5 py-1",children:r.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Page Details"})}),r.jsxRuntimeExports.jsx("div",{className:"px-2.5 pt-2",children:r.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[r.jsxRuntimeExports.jsx(p.Form,{title:"Basic Details",formData:i,properties:v,onChange:S,disabled:n.isPending||m.isPending}),r.jsxRuntimeExports.jsx("div",{className:"h-2 w-full"}),r.jsxRuntimeExports.jsx(p.Form,{title:"SEO Details",formData:i,properties:T,onChange:S,disabled:n.isPending||m.isPending}),(e==null?void 0:e.homepage)!==s.uuid&&s.type==="STATIC"?r.jsxRuntimeExports.jsx(p.Form,{formData:a,properties:M,onChange:I,disabled:n.isPending||m.isPending}):s.type==="STATIC"&&r.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500",children:[r.jsxRuntimeExports.jsx(H.HomeIcon,{})," This is homepage"," "]}),i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")&&r.jsxRuntimeExports.jsxs("small",{className:"px-1 text-red-400",children:["Add dynamic ID in page slug Eg: ",r.jsxRuntimeExports.jsx("i",{className:"underline",children:"some-url/[some-id]"})]}),r.jsxRuntimeExports.jsxs("div",{className:"my-2 flex w-full items-center justify-between gap-x-2 px-1",children:[r.jsxRuntimeExports.jsx(y.Button,{className:"w-full",type:"submit",onClick:C,disabled:(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage?!1:c.isEmpty(i.name)||c.isEmpty(i.slug)||!j||n.isPending||m.isPending||i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||""),children:"Save"}),r.jsxRuntimeExports.jsx(z,{pageData:s,projectData:e})]})]})})]})};exports.default=Y;
|
|
@@ -2,11 +2,11 @@ import { j as t } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import I, { useState as j, useEffect as z } from "react";
|
|
3
3
|
import { isString as L, isEmpty as x, isEqual as C, omit as y, kebabCase as B } from "lodash-es";
|
|
4
4
|
import { HomeIcon as G } from "@radix-ui/react-icons";
|
|
5
|
-
import { bf as Y, B as q } from "./index-
|
|
5
|
+
import { bf as Y, B as q } from "./index-QGA4ayU7.js";
|
|
6
6
|
import { u as g, b as Z, g as $, o as F, r as Q } from "./empty-slot-5FRrRq1E.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as h } from "./form-
|
|
9
|
-
import { h as V, b as X, i as _, c as K } from "./index-
|
|
8
|
+
import { F as h } from "./form-faX0Yn4Q.js";
|
|
9
|
+
import { h as V, b as X, i as _, c as K } from "./index-nrRnwUaC.js";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
11
|
import "./Functions-7jnEwJyw.js";
|
|
12
12
|
import "clsx";
|
|
@@ -54,7 +54,7 @@ import "./html-to-json-57841sEK.js";
|
|
|
54
54
|
import "himalaya";
|
|
55
55
|
import "lucide-react";
|
|
56
56
|
import "./web-blocks.js";
|
|
57
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
57
|
+
const O = I.lazy(() => import("./delete-page-modal-pN5cFz-m.js")), J = I.lazy(() => import("./confirm-alert-QKtbNbWz.js")), P = (r) => {
|
|
58
58
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
59
59
|
return !1;
|
|
60
60
|
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
package/dist/studio.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./jsx-runtime-Z_BpKhVy.cjs");const e=require("./index-xJ8LmB04.cjs");require("react");require("sonner");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("react-i18next");require("./index-ERorPL9q.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("lucide-react");require("./web-blocks.cjs");require("./empty-slot-2LSrWJaY.cjs");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.d.ts
CHANGED
|
@@ -1,13 +1,121 @@
|
|
|
1
1
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
2
|
import { default as React_2 } from 'react';
|
|
3
3
|
|
|
4
|
+
declare interface Block {
|
|
5
|
+
type: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare type Breakpoint = {
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
breakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | string;
|
|
13
|
+
icon: React_2.ReactNode | Element;
|
|
14
|
+
width: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare type ChaiBlock = {
|
|
18
|
+
_id: string;
|
|
19
|
+
_type: string;
|
|
20
|
+
_name?: string;
|
|
21
|
+
_parent?: string | null | undefined;
|
|
22
|
+
_bindings?: Record<string, string>;
|
|
23
|
+
} & Record<string, any>;
|
|
24
|
+
|
|
25
|
+
declare interface ChaiBuilderEditorProps {
|
|
26
|
+
breakpoints?: Breakpoint[];
|
|
27
|
+
editable?: boolean;
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
locale?: string;
|
|
30
|
+
nonEditableComponent?: ReactComponentType;
|
|
31
|
+
canvas?: React_2.FC<any>;
|
|
32
|
+
canvasTopBarComponents?: {
|
|
33
|
+
right?: ReactComponentType[];
|
|
34
|
+
};
|
|
35
|
+
previewLink?: string;
|
|
36
|
+
dataBindingSupport?: boolean;
|
|
37
|
+
dataProviders?: DataProvider[];
|
|
38
|
+
darkMode?: boolean;
|
|
39
|
+
dndOptions?: any;
|
|
40
|
+
importHTMLSupport?: boolean;
|
|
41
|
+
fetchMediaCallback?: (limit?: number, offset?: number) => Promise<any[]>;
|
|
42
|
+
uploadMediaCallback?: (file: File) => Promise<{
|
|
43
|
+
url: string;
|
|
44
|
+
}>;
|
|
45
|
+
getExternalPredefinedBlock?: (block: PredefinedBlock) => Promise<PredefinedBlock & {
|
|
46
|
+
blocks: ChaiBlock[];
|
|
47
|
+
html: string;
|
|
48
|
+
}>;
|
|
49
|
+
getUILibraryBlocks?: (libraryUuid: string) => Promise<PredefinedBlock[]>;
|
|
50
|
+
uiLibraries?: UILibrary[];
|
|
51
|
+
subPages?: Block[];
|
|
52
|
+
subPagesSupport?: boolean;
|
|
53
|
+
blocks?: ChaiBlock[];
|
|
54
|
+
onSaveBlocks?: ({ blocks, providers }: any) => Promise<any>;
|
|
55
|
+
onSavePage?: ({ blocks, providers }: SavePageData) => Promise<boolean | Error>;
|
|
56
|
+
brandingOptions?: Record<string, string>;
|
|
57
|
+
onSaveBrandingOptions?: (brandingOptions: Record<string, any>) => Promise<boolean | Error>;
|
|
58
|
+
container?: ChaiBlock | "Body" | "Container";
|
|
59
|
+
onSaveContainer?: (container: ChaiBlock) => Promise<boolean | Error>;
|
|
60
|
+
onSyncStatusChange?: (syncStatus: "UNSAVED" | "SAVED") => void;
|
|
61
|
+
previewComponent?: ReactComponentType;
|
|
62
|
+
sideBarComponents?: {
|
|
63
|
+
bottom?: ReactComponentType[];
|
|
64
|
+
top?: {
|
|
65
|
+
icon: ReactComponentType | string;
|
|
66
|
+
name: string;
|
|
67
|
+
panel: ReactComponentType;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
topBarComponents?: {
|
|
71
|
+
center?: ReactComponentType[];
|
|
72
|
+
left?: ReactComponentType[];
|
|
73
|
+
right?: ReactComponentType[];
|
|
74
|
+
};
|
|
75
|
+
getPages?: () => Promise<ChaiPage[]>;
|
|
76
|
+
unsplashAccessKey?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
4
79
|
export declare const ChaiBuilderStudio: (props: ChaiBuilderStudioProps) => JSX_2.Element;
|
|
5
80
|
|
|
6
81
|
export declare type ChaiBuilderStudioProps = {
|
|
7
82
|
apiBaseUrl?: string;
|
|
8
83
|
logo?: React_2.FC<any> | React_2.LazyExoticComponent<any>;
|
|
9
|
-
|
|
10
|
-
|
|
84
|
+
} & Omit<ChaiBuilderEditorProps, "topBarComponents" | "editable" | "onSaveBrandingOptions" | "onSaveBlocks" | "blocks" | "brandingOptions">;
|
|
85
|
+
|
|
86
|
+
declare type ChaiPage = {
|
|
87
|
+
uuid?: string;
|
|
88
|
+
page_name?: string;
|
|
89
|
+
blocks: ChaiBlock[];
|
|
90
|
+
custom_code: string;
|
|
91
|
+
seo_data: Record<string, string>;
|
|
92
|
+
slug: string;
|
|
93
|
+
translations: Record<string, Record<string, string>>;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
declare type DataProvider = {
|
|
97
|
+
providerKey: string;
|
|
98
|
+
args: Record<string, any>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
declare type PredefinedBlock = {
|
|
102
|
+
uuid: string;
|
|
103
|
+
name: string;
|
|
104
|
+
preview: string;
|
|
105
|
+
blocks?: ChaiBlock[];
|
|
106
|
+
html?: string;
|
|
11
107
|
};
|
|
12
108
|
|
|
109
|
+
declare type ReactComponentType = React_2.ComponentType<any>;
|
|
110
|
+
|
|
111
|
+
declare type SavePageData = {
|
|
112
|
+
blocks: ChaiBlock[];
|
|
113
|
+
providers?: DataProvider[];
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
declare interface UILibrary {
|
|
117
|
+
name: string;
|
|
118
|
+
uuid: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
13
121
|
export { }
|
package/dist/studio.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { k as ii } from "./index-
|
|
2
|
+
import { k as ii } from "./index-nrRnwUaC.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "i18next";
|
|
7
7
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
8
|
+
import "./index-QGA4ayU7.js";
|
|
9
9
|
import "lodash-es";
|
|
10
10
|
import "./Functions-7jnEwJyw.js";
|
|
11
11
|
import "clsx";
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ERorPL9q.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@react-hookz/web");require("./jsx-runtime-Z_BpKhVy.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");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");require("react-i18next");exports.Accordion=e.Accordion;exports.AccordionContent=e.AccordionContent;exports.AccordionItem=e.AccordionItem;exports.AccordionTrigger=e.AccordionTrigger;exports.Alert=e.Alert;exports.AlertDescription=e.AlertDescription;exports.AlertDialog=e.AlertDialog;exports.AlertDialogAction=e.AlertDialogAction;exports.AlertDialogCancel=e.AlertDialogCancel;exports.AlertDialogContent=e.AlertDialogContent;exports.AlertDialogDescription=e.AlertDialogDescription;exports.AlertDialogFooter=e.AlertDialogFooter;exports.AlertDialogHeader=e.AlertDialogHeader;exports.AlertDialogTitle=e.AlertDialogTitle;exports.AlertDialogTrigger=e.AlertDialogTrigger;exports.AlertTitle=e.AlertTitle;exports.Badge=e.Badge;exports.Button=e.Button;exports.Card=e.Card;exports.CardContent=e.CardContent;exports.CardDescription=e.CardDescription;exports.CardFooter=e.CardFooter;exports.CardHeader=e.CardHeader;exports.CardTitle=e.CardTitle;exports.Command=e.Command;exports.CommandDialog=e.CommandDialog;exports.CommandEmpty=e.CommandEmpty;exports.CommandGroup=e.CommandGroup;exports.CommandInput=e.CommandInput;exports.CommandItem=e.CommandItem;exports.CommandList=e.CommandList;exports.CommandSeparator=e.CommandSeparator;exports.CommandShortcut=e.CommandShortcut;exports.ContextMenu=e.ContextMenu;exports.ContextMenuCheckboxItem=e.ContextMenuCheckboxItem;exports.ContextMenuContent=e.ContextMenuContent;exports.ContextMenuGroup=e.ContextMenuGroup;exports.ContextMenuItem=e.ContextMenuItem;exports.ContextMenuLabel=e.ContextMenuLabel;exports.ContextMenuPortal=e.ContextMenuPortal;exports.ContextMenuRadioGroup=e.ContextMenuRadioGroup;exports.ContextMenuRadioItem=e.ContextMenuRadioItem;exports.ContextMenuSeparator=e.ContextMenuSeparator;exports.ContextMenuShortcut=e.ContextMenuShortcut;exports.ContextMenuSub=e.ContextMenuSub;exports.ContextMenuSubContent=e.ContextMenuSubContent;exports.ContextMenuSubTrigger=e.ContextMenuSubTrigger;exports.ContextMenuTrigger=e.ContextMenuTrigger;exports.Dialog=e.Dialog;exports.DialogContent=e.DialogContent;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.DropdownMenu=e.DropdownMenu;exports.DropdownMenuCheckboxItem=e.DropdownMenuCheckboxItem;exports.DropdownMenuContent=e.DropdownMenuContent;exports.DropdownMenuGroup=e.DropdownMenuGroup;exports.DropdownMenuItem=e.DropdownMenuItem;exports.DropdownMenuLabel=e.DropdownMenuLabel;exports.DropdownMenuPortal=e.DropdownMenuPortal;exports.DropdownMenuRadioGroup=e.DropdownMenuRadioGroup;exports.DropdownMenuRadioItem=e.DropdownMenuRadioItem;exports.DropdownMenuSeparator=e.DropdownMenuSeparator;exports.DropdownMenuShortcut=e.DropdownMenuShortcut;exports.DropdownMenuSub=e.DropdownMenuSub;exports.DropdownMenuSubContent=e.DropdownMenuSubContent;exports.DropdownMenuSubTrigger=e.DropdownMenuSubTrigger;exports.DropdownMenuTrigger=e.DropdownMenuTrigger;exports.HoverCard=e.HoverCard;exports.HoverCardContent=e.HoverCardContent;exports.HoverCardTrigger=e.HoverCardTrigger;exports.IconPickerField=e.IconPickerField;exports.ImagePickerField=e.ImagePickerField;exports.Input=e.Input;exports.Label=e.Label;exports.LinkField=e.LinkField;exports.Menubar=e.Menubar;exports.MenubarCheckboxItem=e.MenubarCheckboxItem;exports.MenubarContent=e.MenubarContent;exports.MenubarGroup=e.MenubarGroup;exports.MenubarItem=e.MenubarItem;exports.MenubarLabel=e.MenubarLabel;exports.MenubarMenu=e.MenubarMenu;exports.MenubarPortal=e.MenubarPortal;exports.MenubarRadioGroup=e.MenubarRadioGroup;exports.MenubarRadioItem=e.MenubarRadioItem;exports.MenubarSeparator=e.MenubarSeparator;exports.MenubarShortcut=e.MenubarShortcut;exports.MenubarSub=e.MenubarSub;exports.MenubarSubContent=e.MenubarSubContent;exports.MenubarSubTrigger=e.MenubarSubTrigger;exports.MenubarTrigger=e.MenubarTrigger;exports.Popover=e.Popover;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.RTEField=e.RichTextEditorField;exports.ScrollArea=e.ScrollArea;exports.ScrollBar=e.ScrollBar;exports.Select=e.Select;exports.SelectContent=e.SelectContent;exports.SelectGroup=e.SelectGroup;exports.SelectItem=e.SelectItem;exports.SelectLabel=e.SelectLabel;exports.SelectSeparator=e.SelectSeparator;exports.SelectTrigger=e.SelectTrigger;exports.SelectValue=e.SelectValue;exports.Separator=e.Separator;exports.Sheet=e.Sheet;exports.SheetClose=e.SheetClose;exports.SheetContent=e.SheetContent;exports.SheetDescription=e.SheetDescription;exports.SheetFooter=e.SheetFooter;exports.SheetHeader=e.SheetHeader;exports.SheetTitle=e.SheetTitle;exports.SheetTrigger=e.SheetTrigger;exports.Skeleton=e.Skeleton;exports.Switch=e.Switch;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsList=e.TabsList;exports.TabsTrigger=e.TabsTrigger;exports.Textarea=e.Textarea;exports.Toaster=e.Toaster;exports.Toggle=e.Toggle;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipPortal=e.TooltipPortal;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.badgeVariants=e.badgeVariants;exports.buttonVariants=e.buttonVariants;exports.reducer=e.reducer;exports.toast=e.toast;exports.toggleVariants=e.toggleVariants;exports.useToast=e.useToast;
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b8 as z, bb as q, b9 as J, ba as U, bm as W, by as X, A as Y, ai as Z, H as _, C as $, F as K, G as N, D as O, E as Q, z as aa, bn as ea, bz as oa, B as ta, bg as ra, bj as sa, bi as na, bl as ia, bh as ba, bB as pa, aW as ua, cc as ma, aZ as la, a_ as ca, aX as da, a$ as ga, aY as Ca, ce as Ma, cd as Sa, br as Da, cf as Ta, bq as xa, ck as Aa, bp as ha, ch as wa, cl as Ia, cp as Fa, cg as Ga, ci as Pa, cj as ka, cm as Ha, cn as va, co as La, bs as Ra, ad as Ba, ae as Va, ah as Ea, b0 as fa, af as ya, ag as ja, b1 as za, aE as qa, aJ as Ja, aG as Ua, c3 as Wa, c0 as Xa, aH as Ya, c4 as Za, c8 as _a, c1 as $a, aI as Ka, c2 as Na, c5 as Oa, c6 as Qa, c7 as ae, aF as ee, aB as oe, aD as te, aC as re, b5 as se, b6 as ne, bc as ie, az as be, b7 as pe, bD as ue, bK as me, bG as le, bQ as ce, bH as de, bJ as ge, bE as Ce, bN as Me, bL as Se, bM as De, bI as Te, bS as xe, bR as Ae, bO as he, bP as we, bF as Ie, aT as Fe, aV as Ge, aU as Pe, b4 as ke, bf as He, bC as ve, aj as Le, am as Re, at as Be, an as Ve, au as Ee, bT as fe, ak as ye, al as je, ay as ze, bU as qe, bW as Je, bX as Ue, b$ as We, bZ as Xe, bY as Ye, b_ as Ze, bV as _e, S as $e, aA as Ke, ap as Ne, as as Oe, aq as Qe, ar as ao, bk as eo, y as oo, bv as to, av as ro, ax as so, bd as no, T as io, aw as bo, bA as po, bx as uo, c9 as mo, cb as lo, bw as co, ca as go } from "./index-
|
|
1
|
+
import { b8 as z, bb as q, b9 as J, ba as U, bm as W, by as X, A as Y, ai as Z, H as _, C as $, F as K, G as N, D as O, E as Q, z as aa, bn as ea, bz as oa, B as ta, bg as ra, bj as sa, bi as na, bl as ia, bh as ba, bB as pa, aW as ua, cc as ma, aZ as la, a_ as ca, aX as da, a$ as ga, aY as Ca, ce as Ma, cd as Sa, br as Da, cf as Ta, bq as xa, ck as Aa, bp as ha, ch as wa, cl as Ia, cp as Fa, cg as Ga, ci as Pa, cj as ka, cm as Ha, cn as va, co as La, bs as Ra, ad as Ba, ae as Va, ah as Ea, b0 as fa, af as ya, ag as ja, b1 as za, aE as qa, aJ as Ja, aG as Ua, c3 as Wa, c0 as Xa, aH as Ya, c4 as Za, c8 as _a, c1 as $a, aI as Ka, c2 as Na, c5 as Oa, c6 as Qa, c7 as ae, aF as ee, aB as oe, aD as te, aC as re, b5 as se, b6 as ne, bc as ie, az as be, b7 as pe, bD as ue, bK as me, bG as le, bQ as ce, bH as de, bJ as ge, bE as Ce, bN as Me, bL as Se, bM as De, bI as Te, bS as xe, bR as Ae, bO as he, bP as we, bF as Ie, aT as Fe, aV as Ge, aU as Pe, b4 as ke, bf as He, bC as ve, aj as Le, am as Re, at as Be, an as Ve, au as Ee, bT as fe, ak as ye, al as je, ay as ze, bU as qe, bW as Je, bX as Ue, b$ as We, bZ as Xe, bY as Ye, b_ as Ze, bV as _e, S as $e, aA as Ke, ap as Ne, as as Oe, aq as Qe, ar as ao, bk as eo, y as oo, bv as to, av as ro, ax as so, bd as no, T as io, aw as bo, bA as po, bx as uo, c9 as mo, cb as lo, bw as co, ca as go } from "./index-QGA4ayU7.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "lodash-es";
|
|
4
4
|
import "./Functions-7jnEwJyw.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react"),u=require("lodash-es"),t=require("./index-
|
|
1
|
+
"use strict";const n=require("react"),u=require("lodash-es"),t=require("./index-ERorPL9q.cjs"),a=()=>{const{addCoreBlock:r}=t.useAddBlock(),l=t.useBuilderProp("getExternalPredefinedBlock");return n.useCallback(async s=>{const{block:o,dropTargetId:e,relativeIndex:c}=s;if(u.has(o,"format")){const d=await l(o);return r({blocks:d},e===0?null:e,c)}return r(o,e===0?null:e,c)},[r])};exports.useAddBlockByDrop=a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as n } from "react";
|
|
2
2
|
import { has as s } from "lodash-es";
|
|
3
|
-
import { K as a, i as u } from "./index-
|
|
3
|
+
import { K as a, i as u } from "./index-QGA4ayU7.js";
|
|
4
4
|
const B = () => {
|
|
5
5
|
const { addCoreBlock: r } = a(), l = u("getExternalPredefinedBlock");
|
|
6
6
|
return n(
|