@chaibuilder/sdk 1.2.56 → 1.2.57
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-HeYXoex4.js → AddBlocks-05ZH2Suu.js} +46 -50
- package/dist/AddBlocks-MH_fqSRf.cjs +1 -0
- package/dist/{CanvasArea-CqILE5PR.js → CanvasArea-8f_Ki3B7.js} +361 -361
- package/dist/CanvasArea-UisRL54b.cjs +56 -0
- package/dist/CodeEditor-vECReGwz.cjs +1 -0
- package/dist/{CodeEditor-kxV5RCpd.js → CodeEditor-zYBqhBv3.js} +33 -39
- package/dist/CurrentPage-7aEIhzQ0.cjs +1 -0
- package/dist/{CurrentPage-IrFGAb7n.js → CurrentPage-nzo4lszx.js} +26 -25
- package/dist/ListTree-A-097CZ-.cjs +1 -0
- package/dist/{ListTree-0n_G8NJx.js → ListTree-KUGhFsb_.js} +9 -13
- package/dist/PagesPanel-L1mI3y_6.cjs +1 -0
- package/dist/{PagesPanel-RYBf0Yct.js → PagesPanel-hleqqZBo.js} +20 -19
- package/dist/ProjectPanel-HTxa1kHv.cjs +1 -0
- package/dist/{ProjectPanel-Zagx6l3Q.js → ProjectPanel-RXEhYr0a.js} +25 -24
- package/dist/Settings-7EMwx6zL.cjs +1 -0
- package/dist/{Settings-RLDTFFf8.js → Settings-b1ZuIn4y.js} +404 -395
- package/dist/{SidePanels-ao969pMV.js → SidePanels-6hZeCR5Z.js} +89 -88
- package/dist/SidePanels-_6WlMWq_.cjs +1 -0
- package/dist/ThemeConfiguration-PvMN3j6h.cjs +1 -0
- package/dist/{ThemeConfiguration-S7yArRMp.js → ThemeConfiguration-ab7lbA2y.js} +18 -24
- package/dist/Topbar-WdGZIIZp.cjs +1 -0
- package/dist/{Topbar-B8u0whpc.js → Topbar-YfsC1DZ2.js} +39 -38
- package/dist/{UILibrariesPanel-tcfz2ELp.js → UILibrariesPanel-5QxxXYg2.js} +56 -61
- package/dist/UILibrariesPanel-r8nQzXQ-.cjs +1 -0
- package/dist/{UnsplashImages-wWRifkCp.js → UnsplashImages-alt_doTy.js} +42 -47
- package/dist/UnsplashImages-cah1BRL_.cjs +1 -0
- package/dist/UploadImages-5dRETWCo.cjs +1 -0
- package/dist/{UploadImages-lUvZhW_j.js → UploadImages-JqVL_aQd.js} +32 -38
- package/dist/{add-page-modal-04b4l2zu.js → add-page-modal-CtMwNEsW.js} +29 -28
- package/dist/add-page-modal-DA5P4pVu.cjs +1 -0
- package/dist/{confirm-alert-FX5030eR.js → confirm-alert-m85JJlQi.js} +15 -21
- package/dist/confirm-alert-rYsxlfR4.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +44 -43
- package/dist/delete-page-modal-AvUZI9Tk.cjs +1 -0
- package/dist/{delete-page-modal-1u9CyAIP.js → delete-page-modal-TMpN1Dvm.js} +22 -21
- package/dist/email.cjs +1 -1
- package/dist/email.js +19 -19
- package/dist/form-G3PqS2Gc.cjs +1 -0
- package/dist/{form-HRdEJjVq.js → form-MSL4CDff.js} +3 -3
- package/dist/{html-to-json-OnIZDDXw.js → html-to-json-_01DXd-a.js} +37 -36
- package/dist/html-to-json-ndxaXRT8.cjs +1 -0
- package/dist/{index-vfmO3y2d.js → index--hN9ZQsP.js} +19 -19
- package/dist/index-0FIxW0gR.cjs +1 -0
- package/dist/{ChaiBuilderEditor-tkzS851D.js → index-IgLSTkN6.js} +14660 -17763
- package/dist/index-sspgZwTk.cjs +206 -0
- package/dist/index-uLn8W3eR.js +3145 -0
- package/dist/index-zaKhyTQ6.cjs +1 -0
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +17 -16
- package/dist/page-viewer-2BMSxxfd.cjs +1 -0
- package/dist/{page-viewer-dcb3u4OV.js → page-viewer-D8nsi13f.js} +27 -26
- package/dist/project-general-setting--0hX9Otn.cjs +1 -0
- package/dist/{project-general-setting--sS34seu.js → project-general-setting-HGjTNFRx.js} +23 -22
- package/dist/{project-seo-setting-8tc3I-0M.js → project-seo-setting-3kFJ77jY.js} +20 -26
- package/dist/project-seo-setting-C3ilIIeM.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +104 -102
- package/dist/single-page-detail-7BpYAyMO.cjs +1 -0
- package/dist/{single-page-detail-tP2pfgBp.js → single-page-detail-eMnjt_Ih.js} +26 -25
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +19 -18
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +144 -150
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +164 -107
- package/package.json +1 -1
- package/dist/AddBlocks-VHoZezjj.cjs +0 -1
- package/dist/CanvasArea-137WY3Wx.cjs +0 -56
- package/dist/ChaiBuilderEditor-aY8flOgX.cjs +0 -206
- package/dist/CodeEditor-R2jKe97T.cjs +0 -1
- package/dist/CurrentPage-PjrVzHXR.cjs +0 -1
- package/dist/ListTree-C6oCXZDV.cjs +0 -1
- package/dist/PagesPanel-lIC3kYmS.cjs +0 -1
- package/dist/ProjectPanel-0Siyi5YS.cjs +0 -1
- package/dist/Settings-6QRVcl16.cjs +0 -1
- package/dist/SidePanels-j1EFsBlK.cjs +0 -1
- package/dist/ThemeConfiguration-q1471P7b.cjs +0 -1
- package/dist/Topbar-ogFKKDbx.cjs +0 -1
- package/dist/UILibrariesPanel-cm9CFWxc.cjs +0 -1
- package/dist/UnsplashImages-E2L3YDJI.cjs +0 -1
- package/dist/UploadImages-s-eeaGiS.cjs +0 -1
- package/dist/add-page-modal-eroF20lO.cjs +0 -1
- package/dist/confirm-alert-XuxEzG-V.cjs +0 -1
- package/dist/delete-page-modal-pgh7sdfg.cjs +0 -1
- package/dist/form-Z4IRWj0o.cjs +0 -1
- package/dist/html-to-json-rauxDBi6.cjs +0 -1
- package/dist/index-bt7EhwLh.cjs +0 -1
- package/dist/page-viewer-O960kM2x.cjs +0 -1
- package/dist/project-general-setting-lIvNs-Vq.cjs +0 -1
- package/dist/project-seo-setting-MIlAuqcc.cjs +0 -1
- package/dist/single-page-detail-0Z_hvd_j.cjs +0 -1
- package/dist/useCanvasSettings-R0h03UfD.cjs +0 -1
- package/dist/useCanvasSettings-rEZHbw3s.js +0 -6
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import { h as c, g as u, r as g, v as x } from "./controls-yjgoZzB6.js";
|
|
3
|
-
import { F as v } from "./form-
|
|
3
|
+
import { F as v } from "./form-MSL4CDff.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 "./
|
|
10
|
-
import "clsx";
|
|
11
|
-
import "react-dom";
|
|
12
|
-
import "@radix-ui/react-scroll-area";
|
|
13
|
-
import "@floating-ui/react-dom";
|
|
14
|
-
import "jotai";
|
|
15
|
-
import "i18next";
|
|
16
|
-
import "react-i18next";
|
|
17
|
-
import "flagged";
|
|
18
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
19
|
-
import "./Functions-7jnEwJyw.js";
|
|
20
|
-
import "tailwind-merge";
|
|
21
|
-
import "@chaibuilder/runtime";
|
|
22
|
-
import "@react-hookz/web";
|
|
23
|
-
import "tree-model";
|
|
24
|
-
import "./utils-VpVqnC9m.js";
|
|
9
|
+
import "./index-uLn8W3eR.js";
|
|
25
10
|
import "@radix-ui/react-toggle";
|
|
26
11
|
import "class-variance-authority";
|
|
12
|
+
import "./utils-VpVqnC9m.js";
|
|
13
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "tailwind-merge";
|
|
27
16
|
import "@radix-ui/react-switch";
|
|
28
17
|
import "@radix-ui/react-slot";
|
|
29
18
|
import "@radix-ui/react-accordion";
|
|
@@ -31,6 +20,7 @@ import "@radix-ui/react-icons";
|
|
|
31
20
|
import "@radix-ui/react-alert-dialog";
|
|
32
21
|
import "@radix-ui/react-dialog";
|
|
33
22
|
import "@radix-ui/react-label";
|
|
23
|
+
import "@radix-ui/react-scroll-area";
|
|
34
24
|
import "@radix-ui/react-tabs";
|
|
35
25
|
import "@radix-ui/react-tooltip";
|
|
36
26
|
import "@radix-ui/react-popover";
|
|
@@ -43,15 +33,19 @@ import "@radix-ui/react-toast";
|
|
|
43
33
|
import "cmdk";
|
|
44
34
|
import "@radix-ui/react-context-menu";
|
|
45
35
|
import "react-icons-picker";
|
|
36
|
+
import "react-dom";
|
|
46
37
|
import "react-quill";
|
|
47
|
-
import "
|
|
48
|
-
import "
|
|
49
|
-
import "
|
|
50
|
-
|
|
38
|
+
import "./Functions-7jnEwJyw.js";
|
|
39
|
+
import "@chaibuilder/runtime";
|
|
40
|
+
import "jotai";
|
|
41
|
+
import "@react-hookz/web";
|
|
42
|
+
import "tree-model";
|
|
43
|
+
import "react-i18next";
|
|
44
|
+
const st = ({
|
|
51
45
|
_projectData: t,
|
|
52
46
|
seany: l
|
|
53
47
|
}) => {
|
|
54
|
-
var o, r, m,
|
|
48
|
+
var o, e, r, m, p, a;
|
|
55
49
|
const n = ({ formData: f }) => {
|
|
56
50
|
const i = { ...f };
|
|
57
51
|
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((D) => ({
|
|
@@ -63,13 +57,13 @@ const ct = ({
|
|
|
63
57
|
title: "",
|
|
64
58
|
default: {
|
|
65
59
|
title: ((o = t.seoData) == null ? void 0 : o.title) || "",
|
|
66
|
-
description: ((
|
|
67
|
-
image: ((
|
|
60
|
+
description: ((e = t.seoData) == null ? void 0 : e.description) || "",
|
|
61
|
+
image: ((r = t.seoData) == null ? void 0 : r.image) || ""
|
|
68
62
|
},
|
|
69
63
|
properties: {
|
|
70
64
|
title: u({
|
|
71
65
|
title: "Default Title",
|
|
72
|
-
default: ((
|
|
66
|
+
default: ((m = t.seoData) == null ? void 0 : m.title) || ""
|
|
73
67
|
}),
|
|
74
68
|
description: g({
|
|
75
69
|
title: "Default Description",
|
|
@@ -85,5 +79,5 @@ const ct = ({
|
|
|
85
79
|
return /* @__PURE__ */ s.jsx("div", { className: "flex h-full select-none flex-col", children: /* @__PURE__ */ s.jsx(v, { properties: d, formData: t, onChange: n }) });
|
|
86
80
|
};
|
|
87
81
|
export {
|
|
88
|
-
|
|
82
|
+
st as default
|
|
89
83
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./jsx-runtime-Z_BpKhVy.cjs"),i=require("./controls-rRZhz0vu.cjs"),g=require("./form-G3PqS2Gc.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-0FIxW0gR.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");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.h({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.g({title:"Default Title",default:((q=e.seoData)==null?void 0:q.title)||""}),description:i.r({title:"Default Description",default:((s=e.seoData)==null?void 0:s.description)||""}),image:i.v({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;
|
package/dist/render.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-Z_BpKhVy.cjs"),E=require("react"),n=require("lodash-es"),Y=require("tailwind-merge"),l=require("./MODIFIERS-mVmfEGgo.cjs"),_=require("./functions-EVUeSwX1.cjs"),T=require("@chaibuilder/runtime"),C=require("react-wrap-balancer");require("./_commonjsHelpers-wDK0ZLPo.cjs");const B=t=>{const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./jsx-runtime-Z_BpKhVy.cjs"),E=require("react"),n=require("lodash-es"),Y=require("tailwind-merge"),l=require("./MODIFIERS-mVmfEGgo.cjs"),_=require("./functions-EVUeSwX1.cjs"),T=require("@chaibuilder/runtime"),C=require("react-wrap-balancer");require("./_commonjsHelpers-wDK0ZLPo.cjs");const B=t=>{const r={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(l.SLOT_KEY)&&(r[e]=t[e].replace(l.SLOT_KEY,"").split(","))}),r},O=n.memoize((t,r)=>{const e=t.replace(l.STYLES_KEY,"").split(","),s=Y.twMerge(e[0],e[1]);return r?_.addPrefixToClasses(s,r).replace(l.STYLES_KEY,"").trim():s.replace(l.STYLES_KEY,"").trim()});function K(t,r){return n.get(t,`${r}_attrs`,{})}function L(t,r){const e={};return Object.keys(t).forEach(s=>{if(n.isString(t[s])&&t[s].startsWith(l.STYLES_KEY)){const i=O(t[s],r);e[s]={className:i,...K(t,s)}}}),e}function A(t,r){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(s,i)=>{n.isString(s)&&n.get(r,s,null)&&(t[i]=n.get(r,s,null))}),t)}function y(t){const{components:r,blocks:e,parent:s,classPrefix:i="",externalData:u={}}=t,g=e,h=a=>L(a,i),c=s?n.filter(e,{_parent:s}):n.filter(e,a=>n.isEmpty(a._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(c.map((a,f)=>{const d=B(a),x={};n.isEmpty(d)||Object.keys(d).forEach(m=>{x[m]=E.Children.toArray(d[m].map(R=>o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,blocks:g,parent:R,components:r})))});const j=n.filter(g,{_parent:a._id});x.children=j.length>0?o.jsxRuntimeExports.jsx(y,{externalData:u,classPrefix:i,parent:a._id,blocks:g,components:r}):null;const p=n.get(r,a._type,null);if(p!==null){let m=a;const R=p;return E.createElement(R,n.omit({...m,index:f,...A(a,u),...h(m),...x},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[a._type," not found"]})}))})}const q=t=>{const r={};return Object.keys(t).forEach(e=>{n.isString(t[e])&&t[e].startsWith(l.SLOT_KEY)&&(r[e]=t[e].replace(l.SLOT_KEY,"").split(","))}),r},N=n.memoize((t,r)=>{const e=t.replace(l.STYLES_KEY,"").split(","),s=Y.twMerge(e[0],e[1]);return r===""?s.replace(l.STYLES_KEY,"").trim():_.addPrefixToClasses(s,r).replace(l.STYLES_KEY,"").trim()});function $(t,r){const e=n.get(t,`${r}_attrs`,{});n.has(e,"data-ai-key")&&delete e["data-ai-key"];const s=n.keys(e).join(" ");return n.includes(s,"x-show")&&!n.includes(s,"x-transition")&&(e["x-transition"]=""),e}function F(t,r){const e={};return Object.keys(t).forEach(s=>{if(n.isString(t[s])&&t[s].startsWith(l.STYLES_KEY)){const i=N(t[s],r);e[s]={className:i,...$(t,s)}}}),e}function W(t,r){const e=n.get(t,"_bindings",{});return n.isEmpty(e)?{...t}:(n.each(e,(s,i)=>{n.isString(s)&&n.get(r,s,null)&&(t[i]=n.get(r,s,null))}),t)}function S({blocks:t,parent:r,classPrefix:e="",externalData:s={},blockModifierCallback:i}){const u=t,g=c=>F(c,e),h=r?n.filter(t,{_parent:r}):n.filter(t,c=>n.isEmpty(c._parent));return o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:E.Children.toArray(h.map((c,a)=>{const f=q(c),d={};n.isEmpty(f)||Object.keys(f).forEach(p=>{d[p]=E.Children.toArray(f[p].map(m=>o.jsxRuntimeExports.jsx(S,{externalData:s,classPrefix:e,blocks:u,parent:m})))});const x=n.filter(u,{_parent:c._id});d.children=x.length>0?o.jsxRuntimeExports.jsx(S,{externalData:s,classPrefix:e,parent:c._id,blocks:u}):null;const j=T.getBlockComponent(c._type);if(j!==null){let p=c;const m=j.component;return p={...j.defaults,...c},i&&(p=i(p)),E.createElement(m,n.omit({blockProps:{},inBuilder:!1,...p,index:a,...W(c,s),...g(p),...d},["_parent"]))}return o.jsxRuntimeExports.jsxs("noscript",{children:[c._type," not found"]})}))})}const w=({pageData:t,externalData:r={},before:e=null,after:s=null,classPrefix:i="c-"})=>{const u=n.get(t.project,"brandingOptions",l.BRANDING_OPTIONS_DEFAULTS);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[e,o.jsxRuntimeExports.jsx("div",{className:i.replace("-","")+" "+_.getBrandingClasses(u,i)+" min-h-screen",children:o.jsxRuntimeExports.jsx(C.Provider,{children:o.jsxRuntimeExports.jsx(S,{externalData:r,blocks:t.page.blocks||[],classPrefix:i})})}),s]})};exports.convertToBlocks=_.convertToBlocks;exports.RenderChaiBlocks=S;exports.RenderChaiPage=w;exports.RenderUnregisteredComponents=y;
|
package/dist/render.js
CHANGED
|
@@ -1,146 +1,148 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
2
|
import u from "react";
|
|
3
|
-
import { isString as _, memoize as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import { S as
|
|
6
|
-
import { a as
|
|
7
|
-
import { c as
|
|
3
|
+
import { isString as _, memoize as $, get as l, isEmpty as h, each as R, filter as g, omit as T, has as K, keys as L, includes as O } from "lodash-es";
|
|
4
|
+
import { twMerge as F } from "tailwind-merge";
|
|
5
|
+
import { S as x, a as d, B as Y } from "./MODIFIERS-fd5XOmum.js";
|
|
6
|
+
import { a as W, g as w } from "./functions--tdNWQDW.js";
|
|
7
|
+
import { c as at } from "./functions--tdNWQDW.js";
|
|
8
8
|
import { getBlockComponent as I } from "@chaibuilder/runtime";
|
|
9
|
-
import { Provider as
|
|
9
|
+
import { Provider as U } from "react-wrap-balancer";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const z = (t) => {
|
|
12
|
+
const e = {};
|
|
13
13
|
return Object.keys(t).forEach((n) => {
|
|
14
|
-
_(t[n]) && t[n].startsWith(
|
|
15
|
-
}),
|
|
16
|
-
},
|
|
17
|
-
const n = t.replace(d, "").split(","),
|
|
18
|
-
return
|
|
14
|
+
_(t[n]) && t[n].startsWith(x) && (e[n] = t[n].replace(x, "").split(","));
|
|
15
|
+
}), e;
|
|
16
|
+
}, G = $((t, e) => {
|
|
17
|
+
const n = t.replace(d, "").split(","), s = F(n[0], n[1]);
|
|
18
|
+
return e ? W(s, e).replace(d, "").trim() : s.replace(d, "").trim();
|
|
19
19
|
});
|
|
20
|
-
function
|
|
21
|
-
return l(t, `${
|
|
20
|
+
function q(t, e) {
|
|
21
|
+
return l(t, `${e}_attrs`, {});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function H(t, e) {
|
|
24
24
|
const n = {};
|
|
25
|
-
return Object.keys(t).forEach((
|
|
26
|
-
if (_(t[
|
|
27
|
-
const r =
|
|
28
|
-
n[
|
|
25
|
+
return Object.keys(t).forEach((s) => {
|
|
26
|
+
if (_(t[s]) && t[s].startsWith(d)) {
|
|
27
|
+
const r = G(t[s], e);
|
|
28
|
+
n[s] = {
|
|
29
29
|
className: r,
|
|
30
|
-
...
|
|
30
|
+
...q(t, s)
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
}), n;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function J(t, e) {
|
|
36
36
|
const n = l(t, "_bindings", {});
|
|
37
|
-
return h(n) ? { ...t } : (
|
|
38
|
-
_(
|
|
37
|
+
return h(n) ? { ...t } : (R(n, (s, r) => {
|
|
38
|
+
_(s) && l(e, s, null) && (t[r] = l(e, s, null));
|
|
39
39
|
}), t);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const { components:
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
const f =
|
|
41
|
+
function N(t) {
|
|
42
|
+
const { components: e, blocks: n, parent: s, classPrefix: r = "", externalData: p = {} } = t, j = n, C = (a) => H(a, r), o = s ? g(n, { _parent: s }) : g(n, (a) => h(a._parent));
|
|
43
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: u.Children.toArray(
|
|
44
|
+
o.map((a, y) => {
|
|
45
|
+
const f = z(a), E = {};
|
|
46
46
|
h(f) || Object.keys(f).forEach((m) => {
|
|
47
|
-
|
|
48
|
-
f[m].map((
|
|
49
|
-
|
|
47
|
+
E[m] = u.Children.toArray(
|
|
48
|
+
f[m].map((S) => /* @__PURE__ */ i.jsx(
|
|
49
|
+
N,
|
|
50
50
|
{
|
|
51
51
|
externalData: p,
|
|
52
52
|
classPrefix: r,
|
|
53
53
|
blocks: j,
|
|
54
|
-
parent:
|
|
55
|
-
components:
|
|
54
|
+
parent: S,
|
|
55
|
+
components: e
|
|
56
56
|
}
|
|
57
57
|
))
|
|
58
58
|
);
|
|
59
59
|
});
|
|
60
60
|
const B = g(j, { _parent: a._id });
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
E.children = B.length > 0 ? /* @__PURE__ */ i.jsx(
|
|
62
|
+
N,
|
|
63
63
|
{
|
|
64
64
|
externalData: p,
|
|
65
65
|
classPrefix: r,
|
|
66
66
|
parent: a._id,
|
|
67
67
|
blocks: j,
|
|
68
|
-
components:
|
|
68
|
+
components: e
|
|
69
69
|
}
|
|
70
70
|
) : null;
|
|
71
|
-
const c = l(
|
|
71
|
+
const c = l(e, a._type, null);
|
|
72
72
|
if (c !== null) {
|
|
73
73
|
let m = a;
|
|
74
|
-
const
|
|
74
|
+
const S = c;
|
|
75
75
|
return u.createElement(
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
S,
|
|
77
|
+
T(
|
|
78
78
|
{
|
|
79
79
|
...m,
|
|
80
|
-
index:
|
|
81
|
-
...
|
|
82
|
-
...
|
|
83
|
-
...
|
|
80
|
+
index: y,
|
|
81
|
+
...J(a, p),
|
|
82
|
+
...C(m),
|
|
83
|
+
...E
|
|
84
84
|
},
|
|
85
85
|
["_parent"]
|
|
86
86
|
)
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ i.jsxs("noscript", { children: [
|
|
90
90
|
a._type,
|
|
91
91
|
" not found"
|
|
92
92
|
] });
|
|
93
93
|
})
|
|
94
94
|
) });
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
const
|
|
96
|
+
const M = (t) => {
|
|
97
|
+
const e = {};
|
|
98
98
|
return Object.keys(t).forEach((n) => {
|
|
99
|
-
_(t[n]) && t[n].startsWith(
|
|
100
|
-
}),
|
|
101
|
-
},
|
|
102
|
-
const n = t.replace(d, "").split(","),
|
|
103
|
-
return
|
|
99
|
+
_(t[n]) && t[n].startsWith(x) && (e[n] = t[n].replace(x, "").split(","));
|
|
100
|
+
}), e;
|
|
101
|
+
}, P = $((t, e) => {
|
|
102
|
+
const n = t.replace(d, "").split(","), s = F(n[0], n[1]);
|
|
103
|
+
return e === "" ? s.replace(d, "").trim() : W(s, e).replace(d, "").trim();
|
|
104
104
|
});
|
|
105
|
-
function
|
|
106
|
-
const n = l(t, `${
|
|
107
|
-
|
|
105
|
+
function Q(t, e) {
|
|
106
|
+
const n = l(t, `${e}_attrs`, {});
|
|
107
|
+
K(n, "data-ai-key") && delete n["data-ai-key"];
|
|
108
|
+
const s = L(n).join(" ");
|
|
109
|
+
return O(s, "x-show") && !O(s, "x-transition") && (n["x-transition"] = ""), n;
|
|
108
110
|
}
|
|
109
|
-
function
|
|
111
|
+
function V(t, e) {
|
|
110
112
|
const n = {};
|
|
111
|
-
return Object.keys(t).forEach((
|
|
112
|
-
if (_(t[
|
|
113
|
-
const r =
|
|
114
|
-
n[
|
|
113
|
+
return Object.keys(t).forEach((s) => {
|
|
114
|
+
if (_(t[s]) && t[s].startsWith(d)) {
|
|
115
|
+
const r = P(t[s], e);
|
|
116
|
+
n[s] = {
|
|
115
117
|
className: r,
|
|
116
|
-
...
|
|
118
|
+
...Q(t, s)
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
121
|
}), n;
|
|
120
122
|
}
|
|
121
|
-
function
|
|
123
|
+
function X(t, e) {
|
|
122
124
|
const n = l(t, "_bindings", {});
|
|
123
|
-
return h(n) ? { ...t } : (
|
|
124
|
-
_(
|
|
125
|
+
return h(n) ? { ...t } : (R(n, (s, r) => {
|
|
126
|
+
_(s) && l(e, s, null) && (t[r] = l(e, s, null));
|
|
125
127
|
}), t);
|
|
126
128
|
}
|
|
127
|
-
function
|
|
129
|
+
function A({
|
|
128
130
|
blocks: t,
|
|
129
|
-
parent:
|
|
131
|
+
parent: e,
|
|
130
132
|
classPrefix: n = "",
|
|
131
|
-
externalData:
|
|
133
|
+
externalData: s = {},
|
|
132
134
|
blockModifierCallback: r
|
|
133
135
|
}) {
|
|
134
|
-
const p = t, j = (
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
h(
|
|
136
|
+
const p = t, j = (o) => V(o, n), C = e ? g(t, { _parent: e }) : g(t, (o) => h(o._parent));
|
|
137
|
+
return /* @__PURE__ */ i.jsx(i.Fragment, { children: u.Children.toArray(
|
|
138
|
+
C.map((o, a) => {
|
|
139
|
+
const y = M(o), f = {};
|
|
140
|
+
h(y) || Object.keys(y).forEach((c) => {
|
|
139
141
|
f[c] = u.Children.toArray(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
y[c].map((m) => /* @__PURE__ */ i.jsx(
|
|
143
|
+
A,
|
|
142
144
|
{
|
|
143
|
-
externalData:
|
|
145
|
+
externalData: s,
|
|
144
146
|
classPrefix: n,
|
|
145
147
|
blocks: p,
|
|
146
148
|
parent: m
|
|
@@ -148,29 +150,29 @@ function x({
|
|
|
148
150
|
))
|
|
149
151
|
);
|
|
150
152
|
});
|
|
151
|
-
const
|
|
152
|
-
f.children =
|
|
153
|
-
|
|
153
|
+
const E = g(p, { _parent: o._id });
|
|
154
|
+
f.children = E.length > 0 ? /* @__PURE__ */ i.jsx(
|
|
155
|
+
A,
|
|
154
156
|
{
|
|
155
|
-
externalData:
|
|
157
|
+
externalData: s,
|
|
156
158
|
classPrefix: n,
|
|
157
|
-
parent:
|
|
159
|
+
parent: o._id,
|
|
158
160
|
blocks: p
|
|
159
161
|
}
|
|
160
162
|
) : null;
|
|
161
|
-
const B = I(
|
|
163
|
+
const B = I(o._type);
|
|
162
164
|
if (B !== null) {
|
|
163
|
-
let c =
|
|
165
|
+
let c = o;
|
|
164
166
|
const m = B.component;
|
|
165
|
-
return c = { ...B.defaults, ...
|
|
167
|
+
return c = { ...B.defaults, ...o }, r && (c = r(c)), u.createElement(
|
|
166
168
|
m,
|
|
167
|
-
|
|
169
|
+
T(
|
|
168
170
|
{
|
|
169
171
|
blockProps: {},
|
|
170
172
|
inBuilder: !1,
|
|
171
173
|
...c,
|
|
172
174
|
index: a,
|
|
173
|
-
...
|
|
175
|
+
...X(o, s),
|
|
174
176
|
...j(c),
|
|
175
177
|
...f
|
|
176
178
|
},
|
|
@@ -178,36 +180,36 @@ function x({
|
|
|
178
180
|
)
|
|
179
181
|
);
|
|
180
182
|
}
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
-
|
|
183
|
+
return /* @__PURE__ */ i.jsxs("noscript", { children: [
|
|
184
|
+
o._type,
|
|
183
185
|
" not found"
|
|
184
186
|
] });
|
|
185
187
|
})
|
|
186
188
|
) });
|
|
187
189
|
}
|
|
188
|
-
const
|
|
190
|
+
const rt = ({
|
|
189
191
|
pageData: t,
|
|
190
|
-
externalData:
|
|
192
|
+
externalData: e = {},
|
|
191
193
|
before: n = null,
|
|
192
|
-
after:
|
|
194
|
+
after: s = null,
|
|
193
195
|
classPrefix: r = "c-"
|
|
194
196
|
}) => {
|
|
195
|
-
const p = l(t.project, "brandingOptions",
|
|
196
|
-
return /* @__PURE__ */
|
|
197
|
+
const p = l(t.project, "brandingOptions", Y);
|
|
198
|
+
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
197
199
|
n,
|
|
198
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ i.jsx(
|
|
199
201
|
"div",
|
|
200
202
|
{
|
|
201
|
-
className: r.replace("-", "") + " " +
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
+
className: r.replace("-", "") + " " + w(p, r) + " min-h-screen",
|
|
204
|
+
children: /* @__PURE__ */ i.jsx(U, { children: /* @__PURE__ */ i.jsx(A, { externalData: e, blocks: t.page.blocks || [], classPrefix: r }) })
|
|
203
205
|
}
|
|
204
206
|
),
|
|
205
|
-
|
|
207
|
+
s
|
|
206
208
|
] });
|
|
207
209
|
};
|
|
208
210
|
export {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
A as RenderChaiBlocks,
|
|
212
|
+
rt as RenderChaiPage,
|
|
213
|
+
N as RenderUnregisteredComponents,
|
|
214
|
+
at as convertToBlocks
|
|
213
215
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./jsx-runtime-Z_BpKhVy.cjs"),g=require("react"),c=require("lodash-es"),H=require("@radix-ui/react-icons"),y=require("./index-0FIxW0gR.cjs"),d=require("./controls-rRZhz0vu.cjs"),w=require("sonner"),p=require("./form-G3PqS2Gc.cjs"),h=require("./index-zaKhyTQ6.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("react-i18next");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./index-sspgZwTk.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");const z=g.lazy(()=>Promise.resolve().then(()=>require("./delete-page-modal-AvUZI9Tk.cjs"))),L=g.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-rYsxlfR4.cjs"))),E=n=>{if(!c.isString(n)||!(n.includes("/[")&&n.includes("]")))return!1;const s=/^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/,q=/^[a-zA-Z0-9_-]+$/;let e=!0;return n.split("/").forEach(u=>{e&&(u.includes("[[")&&u.includes("]]")?e=/^\[\[\.{3}[a-zA-Z0-9_-]+\]\]$/.test(u):u.includes("[")&&u.includes("]")?e=s.test(u):e=q.test(u))}),e},P=n=>n&&c.isEmpty(n.seoData)?{...n,seoData:{title:"",description:"",image:""}}:n,G=(n,o)=>{const s=!c.isEqual(c.omit(n,["seoData"]),c.omit(o,["seoData"])),q=!c.isEqual(P(o).seoData,P(n).seoData);return s||q},Y=({open:n,setOpen:o,pageData:s})=>{const q=h.useQueryClient(),{data:e}=h.useProject(),u=h.useUpdatePage(),m=h.useUpdateProject("Homepage updated successfully."),[i,b]=g.useState(P(s)),[a,A]=g.useState({isHomePage:(e==null?void 0:e.homepage)===s.uuid}),j=G(i,s);g.useEffect(()=>{const l=!c.isEqual(P(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)||"")){n==="ALERT"&&o("PENDING");return}u.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(f=>{var S,N;if(!t)return f;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||""}),{...f,...x}})},I=({formData:l},t)=>{A(f=>{const x={[t]:l[t]};return{...f,...x}})},v={name:d.g({title:"Page Name",default:i.name}),slug:d.g({title:"Page Slug",default:i.slug})},T={seoData:d.h({title:"",description:"",default:{title:"",description:"",image:""},properties:{title:d.g({title:"Meta Title",default:i.name}),description:d.r({title:"Meta Description",default:i.slug}),image:d.v({title:"Social Media Image",default:""})}})},M={isHomePage:d.c({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:n==="ALERT",title:"Do yo want to save changes?",onCancel:()=>o("CLOSE"),onConfirm:C,disabled:m.isPending||u.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:u.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:u.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:u.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||u.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,35 +2,25 @@ 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 {
|
|
5
|
+
import { br as Y, B as q } from "./index-uLn8W3eR.js";
|
|
6
6
|
import { g, h as Z, r as $, v as F, c as Q } from "./controls-yjgoZzB6.js";
|
|
7
7
|
import { toast as U } from "sonner";
|
|
8
|
-
import { F as h } from "./form-
|
|
9
|
-
import { f as V, a as X, g as _, b as K } from "./index
|
|
8
|
+
import { F as h } from "./form-MSL4CDff.js";
|
|
9
|
+
import { f as V, a as X, g as _, b as K } from "./index--hN9ZQsP.js";
|
|
10
10
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
11
|
-
import "clsx";
|
|
12
|
-
import "react-dom";
|
|
13
|
-
import "@radix-ui/react-scroll-area";
|
|
14
|
-
import "@floating-ui/react-dom";
|
|
15
|
-
import "jotai";
|
|
16
|
-
import "i18next";
|
|
17
|
-
import "react-i18next";
|
|
18
|
-
import "flagged";
|
|
19
|
-
import "./MODIFIERS-fd5XOmum.js";
|
|
20
|
-
import "./Functions-7jnEwJyw.js";
|
|
21
|
-
import "tailwind-merge";
|
|
22
|
-
import "@chaibuilder/runtime";
|
|
23
|
-
import "@react-hookz/web";
|
|
24
|
-
import "tree-model";
|
|
25
|
-
import "./utils-VpVqnC9m.js";
|
|
26
11
|
import "@radix-ui/react-toggle";
|
|
27
12
|
import "class-variance-authority";
|
|
13
|
+
import "./utils-VpVqnC9m.js";
|
|
14
|
+
import "./MODIFIERS-fd5XOmum.js";
|
|
15
|
+
import "clsx";
|
|
16
|
+
import "tailwind-merge";
|
|
28
17
|
import "@radix-ui/react-switch";
|
|
29
18
|
import "@radix-ui/react-slot";
|
|
30
19
|
import "@radix-ui/react-accordion";
|
|
31
20
|
import "@radix-ui/react-alert-dialog";
|
|
32
21
|
import "@radix-ui/react-dialog";
|
|
33
22
|
import "@radix-ui/react-label";
|
|
23
|
+
import "@radix-ui/react-scroll-area";
|
|
34
24
|
import "@radix-ui/react-tabs";
|
|
35
25
|
import "@radix-ui/react-tooltip";
|
|
36
26
|
import "@radix-ui/react-popover";
|
|
@@ -43,16 +33,27 @@ import "@radix-ui/react-toast";
|
|
|
43
33
|
import "cmdk";
|
|
44
34
|
import "@radix-ui/react-context-menu";
|
|
45
35
|
import "react-icons-picker";
|
|
36
|
+
import "react-dom";
|
|
46
37
|
import "react-quill";
|
|
38
|
+
import "./Functions-7jnEwJyw.js";
|
|
39
|
+
import "@chaibuilder/runtime";
|
|
40
|
+
import "jotai";
|
|
41
|
+
import "@react-hookz/web";
|
|
42
|
+
import "tree-model";
|
|
43
|
+
import "react-i18next";
|
|
44
|
+
import "@rjsf/core";
|
|
45
|
+
import "@rjsf/validator-ajv8";
|
|
46
|
+
import "./index-IgLSTkN6.js";
|
|
47
|
+
import "i18next";
|
|
48
|
+
import "@floating-ui/react-dom";
|
|
49
|
+
import "flagged";
|
|
47
50
|
import "react-hotkeys-hook";
|
|
48
51
|
import "lucide-react";
|
|
49
52
|
import "./index-VBXQixVm.js";
|
|
50
|
-
import "
|
|
51
|
-
import "@rjsf/validator-ajv8";
|
|
52
|
-
import "./core.js";
|
|
53
|
-
import "./html-to-json-OnIZDDXw.js";
|
|
53
|
+
import "./html-to-json-_01DXd-a.js";
|
|
54
54
|
import "himalaya";
|
|
55
|
-
|
|
55
|
+
import "lodash";
|
|
56
|
+
const O = I.lazy(() => import("./delete-page-modal-TMpN1Dvm.js")), J = I.lazy(() => import("./confirm-alert-m85JJlQi.js")), P = (r) => {
|
|
56
57
|
if (!L(r) || !(r.includes("/[") && r.includes("]")))
|
|
57
58
|
return !1;
|
|
58
59
|
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
|
@@ -66,7 +67,7 @@ const O = I.lazy(() => import("./delete-page-modal-1u9CyAIP.js")), J = I.lazy(()
|
|
|
66
67
|
} : r, W = (r, m) => {
|
|
67
68
|
const s = !C(y(r, ["seoData"]), y(m, ["seoData"])), u = !C(f(m).seoData, f(r).seoData);
|
|
68
69
|
return s || u;
|
|
69
|
-
},
|
|
70
|
+
}, De = ({ open: r, setOpen: m, pageData: s }) => {
|
|
70
71
|
const u = V(), { data: e } = X(), n = _(), c = K("Homepage updated successfully."), [i, T] = j(f(s)), [d, v] = j({
|
|
71
72
|
isHomePage: (e == null ? void 0 : e.homepage) === s.uuid
|
|
72
73
|
}), N = W(i, s);
|
|
@@ -214,5 +215,5 @@ const O = I.lazy(() => import("./delete-page-modal-1u9CyAIP.js")), J = I.lazy(()
|
|
|
214
215
|
] });
|
|
215
216
|
};
|
|
216
217
|
export {
|
|
217
|
-
|
|
218
|
+
De as default
|
|
218
219
|
};
|
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-zaKhyTQ6.cjs");require("react");require("sonner");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("./index-sspgZwTk.cjs");require("i18next");require("react-i18next");require("./index-0FIxW0gR.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");require("./utils-D_vtk3zK.cjs");require("lodash-es");require("./MODIFIERS-mVmfEGgo.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("./Functions-N3yhPYKY.cjs");require("@chaibuilder/runtime");require("jotai");require("@react-hookz/web");require("tree-model");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("lucide-react");require("./index--mLLy7QQ.cjs");require("./html-to-json-ndxaXRT8.cjs");require("himalaya");require("lodash");exports.ChaiBuilderStudio=e.ChaiBuilderStudio;
|
package/dist/studio.js
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as _ } from "./index--hN9ZQsP.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "sonner";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
|
-
import "./
|
|
7
|
-
import "./ChaiBuilderEditor-tkzS851D.js";
|
|
8
|
-
import "clsx";
|
|
9
|
-
import "react-dom";
|
|
10
|
-
import "@radix-ui/react-scroll-area";
|
|
11
|
-
import "@floating-ui/react-dom";
|
|
12
|
-
import "jotai";
|
|
6
|
+
import "./index-IgLSTkN6.js";
|
|
13
7
|
import "i18next";
|
|
14
8
|
import "react-i18next";
|
|
15
|
-
import "
|
|
9
|
+
import "./index-uLn8W3eR.js";
|
|
10
|
+
import "@radix-ui/react-toggle";
|
|
11
|
+
import "class-variance-authority";
|
|
12
|
+
import "./utils-VpVqnC9m.js";
|
|
16
13
|
import "lodash-es";
|
|
17
14
|
import "./MODIFIERS-fd5XOmum.js";
|
|
18
|
-
import "
|
|
15
|
+
import "clsx";
|
|
19
16
|
import "tailwind-merge";
|
|
20
|
-
import "@chaibuilder/runtime";
|
|
21
|
-
import "@react-hookz/web";
|
|
22
|
-
import "tree-model";
|
|
23
|
-
import "./utils-VpVqnC9m.js";
|
|
24
|
-
import "@radix-ui/react-toggle";
|
|
25
|
-
import "class-variance-authority";
|
|
26
17
|
import "@radix-ui/react-switch";
|
|
27
18
|
import "@radix-ui/react-slot";
|
|
28
19
|
import "@radix-ui/react-accordion";
|
|
@@ -30,6 +21,7 @@ import "@radix-ui/react-icons";
|
|
|
30
21
|
import "@radix-ui/react-alert-dialog";
|
|
31
22
|
import "@radix-ui/react-dialog";
|
|
32
23
|
import "@radix-ui/react-label";
|
|
24
|
+
import "@radix-ui/react-scroll-area";
|
|
33
25
|
import "@radix-ui/react-tabs";
|
|
34
26
|
import "@radix-ui/react-tooltip";
|
|
35
27
|
import "@radix-ui/react-popover";
|
|
@@ -42,12 +34,21 @@ import "@radix-ui/react-toast";
|
|
|
42
34
|
import "cmdk";
|
|
43
35
|
import "@radix-ui/react-context-menu";
|
|
44
36
|
import "react-icons-picker";
|
|
37
|
+
import "react-dom";
|
|
45
38
|
import "react-quill";
|
|
39
|
+
import "./Functions-7jnEwJyw.js";
|
|
40
|
+
import "@chaibuilder/runtime";
|
|
41
|
+
import "jotai";
|
|
42
|
+
import "@react-hookz/web";
|
|
43
|
+
import "tree-model";
|
|
44
|
+
import "@floating-ui/react-dom";
|
|
45
|
+
import "flagged";
|
|
46
46
|
import "react-hotkeys-hook";
|
|
47
47
|
import "lucide-react";
|
|
48
48
|
import "./index-VBXQixVm.js";
|
|
49
|
-
import "./html-to-json-
|
|
49
|
+
import "./html-to-json-_01DXd-a.js";
|
|
50
50
|
import "himalaya";
|
|
51
|
+
import "lodash";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
_ as ChaiBuilderStudio
|
|
53
54
|
};
|