@chaibuilder/sdk 1.2.9 → 1.2.10
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-tMxKPoen.js → AddBlocks-GiMnBMeQ.js} +28 -29
- package/dist/AddBlocks-SzURo9Bj.cjs +1 -0
- package/dist/{BrandingOptions-QJJ1y5ez.js → BrandingOptions-10jJO8mG.js} +3 -4
- package/dist/BrandingOptions-yK-54R-c.cjs +1 -0
- package/dist/CanvasArea-6O8dMPug.cjs +60 -0
- package/dist/{CanvasArea-mlNKmCOh.js → CanvasArea-jgBDM5Qd.js} +459 -474
- package/dist/CurrentPage-1y62Ne77.cjs +1 -0
- package/dist/{CurrentPage-lBy25sZn.js → CurrentPage-lakeZviD.js} +4 -5
- package/dist/{Layers-3Xs4A5i8.js → Layers-R7TfREUd.js} +115 -148
- package/dist/Layers-Z4nmm9xK.cjs +1 -0
- package/dist/{PagesPanel--BZhafnt.js → PagesPanel-4mqxCFHq.js} +4 -5
- package/dist/PagesPanel-ouHdxyOH.cjs +1 -0
- package/dist/{ProjectPanel-YcLkM-DW.js → ProjectPanel-Wy2nw-1w.js} +11 -12
- package/dist/ProjectPanel-hHolYZjt.cjs +1 -0
- package/dist/Settings-EYOw02iE.cjs +1 -0
- package/dist/{Settings-TAgX4hov.js → Settings-_K28Ontt.js} +532 -554
- package/dist/{SidePanels-btVQQkVK.js → SidePanels-6slnxdSj.js} +45 -41
- package/dist/SidePanels-U-_O1QN8.cjs +1 -0
- package/dist/{Topbar-j4t4AgCq.js → Topbar-bwt6HjlL.js} +4 -5
- package/dist/Topbar-dQEoY2P8.cjs +1 -0
- package/dist/{UnsplashImages-41Y3q5_Q.js → UnsplashImages-V29UE-57.js} +16 -17
- package/dist/UnsplashImages-pGgaUPQy.cjs +1 -0
- package/dist/UploadImages-7oLycdSh.cjs +1 -0
- package/dist/{UploadImages-xBg-kbKv.js → UploadImages-E0mi_qn8.js} +3 -4
- package/dist/{add-page-modal-cm8damU2.js → add-page-modal-FJEAqfD3.js} +9 -10
- package/dist/add-page-modal-In6XI-vZ.cjs +1 -0
- package/dist/{confirm-alert-i4pM3mOt.js → confirm-alert-5hfE116f.js} +3 -4
- package/dist/{confirm-alert-U7-NcG7G.cjs → confirm-alert-Vwd3OzL9.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +12 -8
- package/dist/core.js +46 -46
- package/dist/delete-page-modal-tl7FLK9J.cjs +1 -0
- package/dist/{delete-page-modal-YrIBvfFA.js → delete-page-modal-wH0yLiQI.js} +17 -18
- package/dist/{form-VbouZlAW.cjs → form-1j01gADS.cjs} +1 -1
- package/dist/{form-OVmsLOrc.js → form-UVHCD9N3.js} +18 -18
- package/dist/index-7ogwGh39.cjs +1 -0
- package/dist/index-B4sL0YTN.js +3124 -0
- package/dist/{index-pZhGT8uT.js → index-c2VLKuhY.js} +4886 -4884
- package/dist/{index-N50dZnlC.cjs → index-xbQL0wpz.cjs} +25 -25
- package/dist/page-viewer-SfQUe0SI.cjs +1 -0
- package/dist/{page-viewer-feqJr1QI.js → page-viewer-TcK0I240.js} +6 -7
- package/dist/{project-general-setting-SgagORzW.js → project-general-setting-4ruKl033.js} +5 -6
- package/dist/project-general-setting-t7E2Y_w9.cjs +1 -0
- package/dist/{project-seo-setting-Snn2nZgS.cjs → project-seo-setting-4b_BJZDF.cjs} +1 -1
- package/dist/{project-seo-setting-wxAGEkd_.js → project-seo-setting-d1EZlacB.js} +7 -8
- package/dist/single-page-detail-KuXd9Mur.cjs +1 -0
- package/dist/{single-page-detail-dnWMyg6P.js → single-page-detail-PihQi-dP.js} +6 -7
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -4
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +110 -111
- package/dist/{useAddBlockByDrop-inkD7Lck.cjs → useAddBlockByDrop-nLzs79He.cjs} +1 -1
- package/dist/{useAddBlockByDrop-_nwI4W3q.js → useAddBlockByDrop-rcDR-z9_.js} +1 -1
- package/dist/web-blocks.cjs +1 -9
- package/dist/web-blocks.js +397 -399
- package/package.json +1 -1
- package/dist/AddBlocks-x2LkOHSj.cjs +0 -1
- package/dist/BrandingOptions-EzT9UYd6.cjs +0 -1
- package/dist/CanvasArea-xs4wM64L.cjs +0 -60
- package/dist/CurrentPage-aaU4F7wi.cjs +0 -1
- package/dist/Layers-eaHy5PK9.cjs +0 -1
- package/dist/MarkAsGlobalBlock-BjP-Rqlf.js +0 -88
- package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +0 -1
- package/dist/PagesPanel-gGKCV394.cjs +0 -1
- package/dist/ProjectPanel-yFJRy0_E.cjs +0 -1
- package/dist/Settings-7wlLcvoh.cjs +0 -1
- package/dist/SidePanels-5H4j0mIs.cjs +0 -1
- package/dist/Topbar-V8xCetWF.cjs +0 -1
- package/dist/UnsplashImages-DbHky6cj.cjs +0 -1
- package/dist/UploadImages-DnQ95_NW.cjs +0 -1
- package/dist/add-page-modal-MwS7iXn_.cjs +0 -1
- package/dist/delete-page-modal-5o4jXu-z.cjs +0 -1
- package/dist/index-H6vIwGfD.cjs +0 -1
- package/dist/index-niHREMmR.js +0 -2938
- package/dist/page-viewer-SLt8XgYv.cjs +0 -1
- package/dist/project-general-setting-ym0yCdOq.cjs +0 -1
- package/dist/single-page-detail-IPod1o5P.cjs +0 -1
|
@@ -0,0 +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-7ogwGh39.cjs"),x=require("./index-xbQL0wpz.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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("./controls-Dy1qa8Dc.cjs");const m=u.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-KuXd9Mur.cjs"))),q=({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})})})]})},j=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(q,{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(j,{...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 {
|
|
5
|
-
import { e as j, b
|
|
4
|
+
import { b0 as g, b1 as h, b2 as f } from "./index-B4sL0YTN.js";
|
|
5
|
+
import { e as j, b, d as N } from "./index-c2VLKuhY.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
7
7
|
import "@radix-ui/react-toggle";
|
|
8
8
|
import "class-variance-authority";
|
|
@@ -37,7 +37,6 @@ import "flat-to-nested";
|
|
|
37
37
|
import "./Functions-7jnEwJyw.js";
|
|
38
38
|
import "redux-undo";
|
|
39
39
|
import "@chaibuilder/runtime";
|
|
40
|
-
import "lodash";
|
|
41
40
|
import "@react-hookz/web";
|
|
42
41
|
import "react-i18next";
|
|
43
42
|
import "i18next";
|
|
@@ -53,7 +52,7 @@ import "himalaya";
|
|
|
53
52
|
import "lucide-react";
|
|
54
53
|
import "./web-blocks.js";
|
|
55
54
|
import "./controls-XPXGHKht.js";
|
|
56
|
-
const v = s.lazy(() => import("./single-page-detail-
|
|
55
|
+
const v = s.lazy(() => import("./single-page-detail-PihQi-dP.js")), P = ({ pageData: r }) => {
|
|
57
56
|
const [t, i] = n("CLOSE");
|
|
58
57
|
return /* @__PURE__ */ e.jsxs(
|
|
59
58
|
g,
|
|
@@ -88,7 +87,7 @@ const v = s.lazy(() => import("./single-page-detail-dnWMyg6P.js")), P = ({ pageD
|
|
|
88
87
|
}
|
|
89
88
|
);
|
|
90
89
|
}, E = (r) => {
|
|
91
|
-
const [t] = j(), { data: i } =
|
|
90
|
+
const [t] = j(), { data: i } = b(), o = N(), m = (i == null ? void 0 : i.homepage) === r.uuid, a = t === r.uuid, p = () => o(r);
|
|
92
91
|
return i ? /* @__PURE__ */ e.jsxs(
|
|
93
92
|
"button",
|
|
94
93
|
{
|
|
@@ -105,11 +104,11 @@ const v = s.lazy(() => import("./single-page-detail-dnWMyg6P.js")), P = ({ pageD
|
|
|
105
104
|
]
|
|
106
105
|
}
|
|
107
106
|
) : null;
|
|
108
|
-
},
|
|
107
|
+
}, we = ({ pages: r, isLoading: t }) => t ? /* @__PURE__ */ e.jsxs("div", { className: "flex animate-pulse flex-col gap-y-1 px-2.5 pt-2", children: [
|
|
109
108
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
110
109
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" }),
|
|
111
110
|
/* @__PURE__ */ e.jsx("div", { className: "bg-background-200 h-7 w-full" })
|
|
112
111
|
] }) : r.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "px-2.5 pb-2 pt-4", children: "No pages" }) : /* @__PURE__ */ e.jsx("div", { className: "-mb-2", children: s.Children.toArray(r.map((i) => /* @__PURE__ */ e.jsx(E, { ...i }))) });
|
|
113
112
|
export {
|
|
114
|
-
|
|
113
|
+
we as default
|
|
115
114
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { bo as n } from "./index-B4sL0YTN.js";
|
|
4
4
|
import { u as c, o as u } from "./controls-XPXGHKht.js";
|
|
5
|
-
import { F as d } from "./form-
|
|
6
|
-
import { b as x } from "./index-
|
|
5
|
+
import { F as d } from "./form-UVHCD9N3.js";
|
|
6
|
+
import { b as x } from "./index-c2VLKuhY.js";
|
|
7
7
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
8
8
|
import "@radix-ui/react-toggle";
|
|
9
9
|
import "class-variance-authority";
|
|
@@ -39,7 +39,6 @@ import "flat-to-nested";
|
|
|
39
39
|
import "./Functions-7jnEwJyw.js";
|
|
40
40
|
import "redux-undo";
|
|
41
41
|
import "@chaibuilder/runtime";
|
|
42
|
-
import "lodash";
|
|
43
42
|
import "@react-hookz/web";
|
|
44
43
|
import "react-i18next";
|
|
45
44
|
import "@rjsf/core";
|
|
@@ -56,7 +55,7 @@ import "./html-to-json-57841sEK.js";
|
|
|
56
55
|
import "himalaya";
|
|
57
56
|
import "lucide-react";
|
|
58
57
|
import "./web-blocks.js";
|
|
59
|
-
const
|
|
58
|
+
const go = ({
|
|
60
59
|
_projectData: m,
|
|
61
60
|
seany: t
|
|
62
61
|
}) => {
|
|
@@ -79,5 +78,5 @@ const ho = ({
|
|
|
79
78
|
return /* @__PURE__ */ i.jsx(n, { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ i.jsx(d, { properties: a, disabled: p, formData: m, onChange: e }) });
|
|
80
79
|
};
|
|
81
80
|
export {
|
|
82
|
-
|
|
81
|
+
go as default
|
|
83
82
|
};
|
|
@@ -0,0 +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-7ogwGh39.cjs"),o=require("./controls-Dy1qa8Dc.cjs"),d=require("./form-1j01gADS.cjs"),m=require("./index-xbQL0wpz.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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),b=({_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=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-Dy1qa8Dc.cjs"),g=require("./form-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-Dy1qa8Dc.cjs"),g=require("./form-1j01gADS.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-7ogwGh39.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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(m=>({...m,...r}))},c={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:c,formData:e,onChange:d})})};exports.default=D;
|
|
@@ -1,12 +1,12 @@
|
|
|
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 "./controls-XPXGHKht.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-UVHCD9N3.js";
|
|
4
4
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "@rjsf/core";
|
|
8
8
|
import "@rjsf/validator-ajv8";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-B4sL0YTN.js";
|
|
10
10
|
import "@radix-ui/react-toggle";
|
|
11
11
|
import "class-variance-authority";
|
|
12
12
|
import "./utils-AvyFzbPC.js";
|
|
@@ -40,14 +40,13 @@ import "flat-to-nested";
|
|
|
40
40
|
import "./Functions-7jnEwJyw.js";
|
|
41
41
|
import "redux-undo";
|
|
42
42
|
import "@chaibuilder/runtime";
|
|
43
|
-
import "lodash";
|
|
44
43
|
import "@react-hookz/web";
|
|
45
44
|
import "react-i18next";
|
|
46
|
-
const
|
|
45
|
+
const lt = ({
|
|
47
46
|
_projectData: t,
|
|
48
47
|
seany: l
|
|
49
48
|
}) => {
|
|
50
|
-
var o,
|
|
49
|
+
var o, e, r, m, p, a;
|
|
51
50
|
const n = ({ formData: f }) => {
|
|
52
51
|
const i = { ...f };
|
|
53
52
|
i.seoData.title === void 0 && (i.seoData.title = ""), i.seoData.description === void 0 && (i.seoData.description = ""), i.seoData.image === void 0 && (i.seoData.image = ""), l((u) => ({
|
|
@@ -59,8 +58,8 @@ const nt = ({
|
|
|
59
58
|
title: "",
|
|
60
59
|
default: {
|
|
61
60
|
title: ((o = t.seoData) == null ? void 0 : o.title) || "",
|
|
62
|
-
description: ((
|
|
63
|
-
image: ((
|
|
61
|
+
description: ((e = t.seoData) == null ? void 0 : e.description) || "",
|
|
62
|
+
image: ((r = t.seoData) == null ? void 0 : r.image) || ""
|
|
64
63
|
},
|
|
65
64
|
properties: {
|
|
66
65
|
title: c({
|
|
@@ -81,5 +80,5 @@ const nt = ({
|
|
|
81
80
|
return /* @__PURE__ */ s.jsx("div", { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ s.jsx(v, { properties: d, formData: t, onChange: n }) });
|
|
82
81
|
};
|
|
83
82
|
export {
|
|
84
|
-
|
|
83
|
+
lt as default
|
|
85
84
|
};
|
|
@@ -0,0 +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-7ogwGh39.cjs"),d=require("./controls-Dy1qa8Dc.cjs"),w=require("sonner"),p=require("./form-1j01gADS.cjs"),P=require("./index-xbQL0wpz.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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-tl7FLK9J.cjs"))),L=f.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-Vwd3OzL9.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")})},R=({formData:l},t)=>{b(g=>{var S,N;if(!t)return g;const x={[t]:l[t]};return t==="name"?x.slug=c.kebabCase((S=l[t])==null?void 0:S.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:R,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:R,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 s } 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 {
|
|
5
|
+
import { bo as Y, B as q } from "./index-B4sL0YTN.js";
|
|
6
6
|
import { u as g, b as Z, g as $, o as F, r as Q } from "./controls-XPXGHKht.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-UVHCD9N3.js";
|
|
9
|
+
import { h as V, b as X, i as _, c as K } from "./index-c2VLKuhY.js";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
11
|
import "@radix-ui/react-toggle";
|
|
12
12
|
import "class-variance-authority";
|
|
@@ -40,7 +40,6 @@ import "flat-to-nested";
|
|
|
40
40
|
import "./Functions-7jnEwJyw.js";
|
|
41
41
|
import "redux-undo";
|
|
42
42
|
import "@chaibuilder/runtime";
|
|
43
|
-
import "lodash";
|
|
44
43
|
import "@react-hookz/web";
|
|
45
44
|
import "react-i18next";
|
|
46
45
|
import "@rjsf/core";
|
|
@@ -56,7 +55,7 @@ import "./html-to-json-57841sEK.js";
|
|
|
56
55
|
import "himalaya";
|
|
57
56
|
import "lucide-react";
|
|
58
57
|
import "./web-blocks.js";
|
|
59
|
-
const O = I.lazy(() => import("./delete-page-modal-
|
|
58
|
+
const O = I.lazy(() => import("./delete-page-modal-wH0yLiQI.js")), J = I.lazy(() => import("./confirm-alert-5hfE116f.js")), P = (r) => {
|
|
60
59
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
61
60
|
return !1;
|
|
62
61
|
const t = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
|
@@ -70,7 +69,7 @@ const O = I.lazy(() => import("./delete-page-modal-YrIBvfFA.js")), J = I.lazy(()
|
|
|
70
69
|
} : r, W = (r, m) => {
|
|
71
70
|
const t = !C(y(r, ["seoData"]), y(m, ["seoData"])), u = !C(f(m).seoData, f(r).seoData);
|
|
72
71
|
return t || u;
|
|
73
|
-
},
|
|
72
|
+
}, ii = ({ open: r, setOpen: m, pageData: t }) => {
|
|
74
73
|
const u = V(), { data: e } = X(), n = _(), c = K("Homepage updated successfully."), [i, T] = j(f(t)), [d, v] = j({
|
|
75
74
|
isHomePage: (e == null ? void 0 : e.homepage) === t.uuid
|
|
76
75
|
}), N = W(i, t);
|
|
@@ -218,5 +217,5 @@ const O = I.lazy(() => import("./delete-page-modal-YrIBvfFA.js")), J = I.lazy(()
|
|
|
218
217
|
] });
|
|
219
218
|
};
|
|
220
219
|
export {
|
|
221
|
-
|
|
220
|
+
ii as default
|
|
222
221
|
};
|
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-xbQL0wpz.cjs");require("react");require("sonner");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("i18next");require("react-i18next");require("./index-7ogwGh39.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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("./controls-Dy1qa8Dc.cjs");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as oi } from "./index-c2VLKuhY.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-B4sL0YTN.js";
|
|
9
9
|
import "@radix-ui/react-toggle";
|
|
10
10
|
import "class-variance-authority";
|
|
11
11
|
import "./utils-AvyFzbPC.js";
|
|
@@ -40,7 +40,6 @@ import "flat-to-nested";
|
|
|
40
40
|
import "./Functions-7jnEwJyw.js";
|
|
41
41
|
import "redux-undo";
|
|
42
42
|
import "@chaibuilder/runtime";
|
|
43
|
-
import "lodash";
|
|
44
43
|
import "@react-hookz/web";
|
|
45
44
|
import "@floating-ui/react-dom";
|
|
46
45
|
import "react-textarea-autosize";
|
|
@@ -54,5 +53,5 @@ import "lucide-react";
|
|
|
54
53
|
import "./web-blocks.js";
|
|
55
54
|
import "./controls-XPXGHKht.js";
|
|
56
55
|
export {
|
|
57
|
-
|
|
56
|
+
oi as ChaiBuilderStudio
|
|
58
57
|
};
|
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-7ogwGh39.cjs");require("./jsx-runtime-Z_BpKhVy.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-PTxFk6qT.cjs");require("lodash-es");require("./MODIFIERS-2FeVfZQ9.cjs");require("clsx");require("tailwind-merge");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("jotai");require("flat-to-nested");require("./Functions-N3yhPYKY.cjs");require("redux-undo");require("@chaibuilder/runtime");require("@react-hookz/web");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.d.ts
CHANGED
|
@@ -276,7 +276,7 @@ export declare const HoverCardContent: React_2.ForwardRefExoticComponent<Omit<Ho
|
|
|
276
276
|
|
|
277
277
|
export declare const HoverCardTrigger: React_2.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
278
278
|
|
|
279
|
-
export declare const IconPickerField: ({ value, onChange
|
|
279
|
+
export declare const IconPickerField: ({ value, onChange }: WidgetProps) => JSX_2.Element;
|
|
280
280
|
|
|
281
281
|
export declare const ImagePickerField: ({ value, onChange, id, onBlur }: WidgetProps) => JSX_2.Element;
|
|
282
282
|
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bh as j, bk as J, bi as K, bj as N, bv as O, bH as Q, A as U, ar as W, H as X, C as Y, F as Z, G as _, D as $, E as aa, z as ea, bw as oa, bI as ta, B as ra, bp as sa, bs as na, br as ia, bu as ba, bq as pa, bK as ua, b3 as ma, cl as ca, b6 as la, b7 as da, b4 as ga, b8 as Ca, b5 as Ma, cn as Sa, cm as Da, bA as Ta, co as xa, bz as Aa, ct as wa, by as ha, cq as Ia, cu as Pa, cy as Fa, cp as Ga, cr as va, cs as Ha, cv as La, cw as ka, cx as Ra, bB as Ba, am as ya, an as Ea, aq as Va, b9 as fa, ao as qa, ap as za, ba as ja, aN as Ja, aS as Ka, aP as Na, cc as Oa, c9 as Qa, aQ as Ua, cd as Wa, ch as Xa, ca as Ya, aR as Za, cb as _a, ce as $a, cf as ae, cg as ee, aO as oe, aK as te, aM as re, aL as se, be as ne, bf as ie, bl as be, aI as pe, bg as ue, bM as me, bT as ce, bP as le, bZ as de, bQ as ge, bS as Ce, bN as Me, bW as Se, bU as De, bV as Te, bR as xe, b$ as Ae, b_ as we, bX as he, bY as Ie, bO as Pe, b0 as Fe, b2 as Ge, b1 as ve, bd as He, bo as Le, bL as ke, as as Re, av as Be, aC as ye, aw as Ee, aD as Ve, c0 as fe, at as qe, au as ze, aH as je, c1 as Je, c3 as Ke, c4 as Ne, c8 as Oe, c6 as Qe, c5 as Ue, c7 as We, c2 as Xe, S as Ye, aJ as Ze, ay as _e, aB as $e, az as ao, aA as eo, bt as oo, y as to, bE as ro, aE as so, aG as no, bm as io, T as bo, aF as po, bJ as uo, bG as mo, ci as co, ck as lo, bF as go, cj as Co } from "./index-B4sL0YTN.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
@@ -36,145 +36,144 @@ import "flat-to-nested";
|
|
|
36
36
|
import "./Functions-7jnEwJyw.js";
|
|
37
37
|
import "redux-undo";
|
|
38
38
|
import "@chaibuilder/runtime";
|
|
39
|
-
import "lodash";
|
|
40
39
|
import "@react-hookz/web";
|
|
41
40
|
import "react-i18next";
|
|
42
41
|
export {
|
|
43
42
|
j as Accordion,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
J as AccordionContent,
|
|
44
|
+
K as AccordionItem,
|
|
45
|
+
N as AccordionTrigger,
|
|
46
|
+
O as Alert,
|
|
47
|
+
Q as AlertDescription,
|
|
49
48
|
U as AlertDialog,
|
|
50
49
|
W as AlertDialogAction,
|
|
51
50
|
X as AlertDialogCancel,
|
|
52
51
|
Y as AlertDialogContent,
|
|
53
52
|
Z as AlertDialogDescription,
|
|
54
53
|
_ as AlertDialogFooter,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
$ as AlertDialogHeader,
|
|
55
|
+
aa as AlertDialogTitle,
|
|
56
|
+
ea as AlertDialogTrigger,
|
|
57
|
+
oa as AlertTitle,
|
|
58
|
+
ta as Badge,
|
|
59
|
+
ra as Button,
|
|
60
|
+
sa as Card,
|
|
61
|
+
na as CardContent,
|
|
62
|
+
ia as CardDescription,
|
|
63
|
+
ba as CardFooter,
|
|
64
|
+
pa as CardHeader,
|
|
65
|
+
ua as CardTitle,
|
|
66
|
+
ma as Command,
|
|
68
67
|
ca as CommandDialog,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
la as CommandEmpty,
|
|
69
|
+
da as CommandGroup,
|
|
70
|
+
ga as CommandInput,
|
|
71
|
+
Ca as CommandItem,
|
|
72
|
+
Ma as CommandList,
|
|
73
|
+
Sa as CommandSeparator,
|
|
74
|
+
Da as CommandShortcut,
|
|
75
|
+
Ta as ContextMenu,
|
|
76
|
+
xa as ContextMenuCheckboxItem,
|
|
77
|
+
Aa as ContextMenuContent,
|
|
78
|
+
wa as ContextMenuGroup,
|
|
79
|
+
ha as ContextMenuItem,
|
|
80
|
+
Ia as ContextMenuLabel,
|
|
81
|
+
Pa as ContextMenuPortal,
|
|
82
|
+
Fa as ContextMenuRadioGroup,
|
|
83
|
+
Ga as ContextMenuRadioItem,
|
|
85
84
|
va as ContextMenuSeparator,
|
|
86
85
|
Ha as ContextMenuShortcut,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
La as ContextMenuSub,
|
|
87
|
+
ka as ContextMenuSubContent,
|
|
88
|
+
Ra as ContextMenuSubTrigger,
|
|
89
|
+
Ba as ContextMenuTrigger,
|
|
90
|
+
ya as Dialog,
|
|
91
|
+
Ea as DialogContent,
|
|
92
|
+
Va as DialogDescription,
|
|
93
|
+
fa as DialogFooter,
|
|
94
|
+
qa as DialogHeader,
|
|
95
|
+
za as DialogTitle,
|
|
97
96
|
ja as DialogTrigger,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
Ja as DropdownMenu,
|
|
98
|
+
Ka as DropdownMenuCheckboxItem,
|
|
99
|
+
Na as DropdownMenuContent,
|
|
100
|
+
Oa as DropdownMenuGroup,
|
|
101
|
+
Qa as DropdownMenuItem,
|
|
103
102
|
Ua as DropdownMenuLabel,
|
|
104
103
|
Wa as DropdownMenuPortal,
|
|
105
104
|
Xa as DropdownMenuRadioGroup,
|
|
106
105
|
Ya as DropdownMenuRadioItem,
|
|
107
106
|
Za as DropdownMenuSeparator,
|
|
108
107
|
_a as DropdownMenuShortcut,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
$a as DropdownMenuSub,
|
|
109
|
+
ae as DropdownMenuSubContent,
|
|
110
|
+
ee as DropdownMenuSubTrigger,
|
|
111
|
+
oe as DropdownMenuTrigger,
|
|
112
|
+
te as HoverCard,
|
|
113
|
+
re as HoverCardContent,
|
|
114
|
+
se as HoverCardTrigger,
|
|
115
|
+
ne as IconPickerField,
|
|
116
|
+
ie as ImagePickerField,
|
|
117
|
+
be as Input,
|
|
118
|
+
pe as Label,
|
|
119
|
+
ue as LinkField,
|
|
120
|
+
me as Menubar,
|
|
122
121
|
ce as MenubarCheckboxItem,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
122
|
+
le as MenubarContent,
|
|
123
|
+
de as MenubarGroup,
|
|
124
|
+
ge as MenubarItem,
|
|
125
|
+
Ce as MenubarLabel,
|
|
126
|
+
Me as MenubarMenu,
|
|
127
|
+
Se as MenubarPortal,
|
|
128
|
+
De as MenubarRadioGroup,
|
|
129
|
+
Te as MenubarRadioItem,
|
|
130
|
+
xe as MenubarSeparator,
|
|
131
|
+
Ae as MenubarShortcut,
|
|
132
|
+
we as MenubarSub,
|
|
133
|
+
he as MenubarSubContent,
|
|
134
|
+
Ie as MenubarSubTrigger,
|
|
135
|
+
Pe as MenubarTrigger,
|
|
136
|
+
Fe as Popover,
|
|
137
|
+
Ge as PopoverContent,
|
|
139
138
|
ve as PopoverTrigger,
|
|
140
139
|
He as RTEField,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
140
|
+
Le as ScrollArea,
|
|
141
|
+
ke as ScrollBar,
|
|
142
|
+
Re as Select,
|
|
143
|
+
Be as SelectContent,
|
|
144
|
+
ye as SelectGroup,
|
|
145
|
+
Ee as SelectItem,
|
|
146
|
+
Ve as SelectLabel,
|
|
147
|
+
fe as SelectSeparator,
|
|
148
|
+
qe as SelectTrigger,
|
|
149
|
+
ze as SelectValue,
|
|
151
150
|
je as Separator,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
Je as Sheet,
|
|
152
|
+
Ke as SheetClose,
|
|
153
|
+
Ne as SheetContent,
|
|
154
|
+
Oe as SheetDescription,
|
|
155
|
+
Qe as SheetFooter,
|
|
157
156
|
Ue as SheetHeader,
|
|
158
157
|
We as SheetTitle,
|
|
159
158
|
Xe as SheetTrigger,
|
|
160
159
|
Ye as Skeleton,
|
|
161
160
|
Ze as Switch,
|
|
162
161
|
_e as Tabs,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
162
|
+
$e as TabsContent,
|
|
163
|
+
ao as TabsList,
|
|
164
|
+
eo as TabsTrigger,
|
|
165
|
+
oo as Textarea,
|
|
166
|
+
to as Toaster,
|
|
167
|
+
ro as Toggle,
|
|
168
|
+
so as Tooltip,
|
|
169
|
+
no as TooltipContent,
|
|
170
|
+
io as TooltipPortal,
|
|
171
|
+
bo as TooltipProvider,
|
|
172
|
+
po as TooltipTrigger,
|
|
173
|
+
uo as badgeVariants,
|
|
174
|
+
mo as buttonVariants,
|
|
176
175
|
co as reducer,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
lo as toast,
|
|
177
|
+
go as toggleVariants,
|
|
178
|
+
Co as useToast
|
|
180
179
|
};
|
|
@@ -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-7ogwGh39.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 {
|
|
3
|
+
import { L as a, i as u } from "./index-B4sL0YTN.js";
|
|
4
4
|
const B = () => {
|
|
5
5
|
const { addCoreBlock: r } = a(), l = u("getExternalPredefinedBlock");
|
|
6
6
|
return n(
|