@chaibuilder/sdk 0.1.26 → 0.1.28
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-161cb307.js → AddBlocks-b911e9a5.js} +1 -1
- package/dist/{AddBlocks-27cf978a.cjs → AddBlocks-d8eeb0dd.cjs} +1 -1
- package/dist/{BrandingOptions-97a2a079.js → BrandingOptions-4032f865.js} +1 -1
- package/dist/{BrandingOptions-e0f6e657.cjs → BrandingOptions-a8616f59.cjs} +1 -1
- package/dist/{CanvasArea-8b976012.cjs → CanvasArea-27ab7707.cjs} +2 -2
- package/dist/{CanvasArea-03429375.js → CanvasArea-b7d0a194.js} +2 -2
- package/dist/{CurrentPage-144a9895.js → CurrentPage-55258bb1.js} +1 -1
- package/dist/{CurrentPage-d0c34230.cjs → CurrentPage-e13ae173.cjs} +1 -1
- package/dist/{Layers-e8fce30a.cjs → Layers-112b19c0.cjs} +1 -1
- package/dist/{Layers-e85a5d48.js → Layers-1405e155.js} +2 -2
- package/dist/{MarkAsGlobalBlock-be8472ad.cjs → MarkAsGlobalBlock-322ed7f1.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-8f9c2527.js → MarkAsGlobalBlock-84173746.js} +1 -1
- package/dist/{PagesPanel-30564220.cjs → PagesPanel-2a46af87.cjs} +1 -1
- package/dist/{PagesPanel-c2aafd16.js → PagesPanel-34789f58.js} +2 -2
- package/dist/{ProjectPanel-dc4a2415.cjs → ProjectPanel-555e1a66.cjs} +1 -1
- package/dist/{ProjectPanel-60721d3e.js → ProjectPanel-c9ed0480.js} +2 -2
- package/dist/{Settings-f12123c4.cjs → Settings-13aa6dcd.cjs} +1 -1
- package/dist/{Settings-c58fc45b.js → Settings-99578adc.js} +1 -1
- package/dist/{SidePanels-9f5fe660.cjs → SidePanels-d6bdd8bd.cjs} +1 -1
- package/dist/{SidePanels-180ca368.js → SidePanels-f3e07c15.js} +2 -2
- package/dist/{Topbar-554f4f23.cjs → Topbar-004f71e2.cjs} +1 -1
- package/dist/{Topbar-51478e94.js → Topbar-4c71d6a1.js} +1 -1
- package/dist/{add-page-modal-1d77b545.js → add-page-modal-38a486dc.js} +1 -1
- package/dist/{add-page-modal-f0e85f12.cjs → add-page-modal-4ec6974d.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-5b050396.cjs → delete-page-modal-344825c3.cjs} +1 -1
- package/dist/{delete-page-modal-7c83e048.js → delete-page-modal-54c2f791.js} +1 -1
- package/dist/{index-2ff849f6.js → index-b534abc9.js} +4 -4
- package/dist/{index-1bf563c1.cjs → index-ca6f6afc.cjs} +2 -2
- package/dist/lib.d.ts +6 -6
- package/dist/{page-viewer-5e3e11cd.js → page-viewer-3a0c13aa.js} +2 -2
- package/dist/{page-viewer-bd09dc9d.cjs → page-viewer-e0542daa.cjs} +1 -1
- package/dist/{project-general-setting-46c17b7b.cjs → project-general-setting-21c0f38d.cjs} +1 -1
- package/dist/{project-general-setting-77d36c23.js → project-general-setting-791e767e.js} +1 -1
- package/dist/render.d.ts +6 -6
- package/dist/server.d.ts +8 -8
- package/dist/{single-page-detail-fcacbb82.cjs → single-page-detail-5e257353.cjs} +1 -1
- package/dist/{single-page-detail-39a07929.js → single-page-detail-6c623469.js} +2 -2
- package/package.json +2 -2
package/dist/lib.d.ts
CHANGED
|
@@ -16,17 +16,17 @@ export declare type ChaiPageData = {
|
|
|
16
16
|
seoData?: Record<string, string>;
|
|
17
17
|
slug?: string;
|
|
18
18
|
name: string;
|
|
19
|
+
providers: {
|
|
20
|
+
providerKey: string;
|
|
21
|
+
args: Record<string, any>;
|
|
22
|
+
}[];
|
|
19
23
|
};
|
|
20
|
-
providers?: {
|
|
21
|
-
providerKey: string;
|
|
22
|
-
args: Record<string, unknown>;
|
|
23
|
-
}[];
|
|
24
24
|
subPages?: {
|
|
25
25
|
uuid: string;
|
|
26
26
|
blocks: ChaiBlock[];
|
|
27
|
-
providers
|
|
27
|
+
providers: {
|
|
28
28
|
providerKey: string;
|
|
29
|
-
args: Record<string,
|
|
29
|
+
args: Record<string, any>;
|
|
30
30
|
}[];
|
|
31
31
|
}[];
|
|
32
32
|
project: {
|
|
@@ -2,7 +2,7 @@ import { j as e } from "./jsx-runtime-944c88e2.js";
|
|
|
2
2
|
import o, { useState as m, Suspense as c } from "react";
|
|
3
3
|
import { HomeIcon as p, FileTextIcon as u, ChevronRightIcon as d, GearIcon as x } from "@radix-ui/react-icons";
|
|
4
4
|
import { P as g, a as h, b as f } from "./popover-f7addcf4.js";
|
|
5
|
-
import { U as j, R as N, T as b } from "./index-
|
|
5
|
+
import { U as j, R as N, T as b } from "./index-b534abc9.js";
|
|
6
6
|
import "@radix-ui/react-popover";
|
|
7
7
|
import "./utils-ac68b2c8.js";
|
|
8
8
|
import "clsx";
|
|
@@ -32,7 +32,7 @@ import "@react-hookz/web";
|
|
|
32
32
|
import "@chaibuilder/blocks";
|
|
33
33
|
import "lucide-react";
|
|
34
34
|
import "sonner";
|
|
35
|
-
const P = o.lazy(() => import("./single-page-detail-
|
|
35
|
+
const P = o.lazy(() => import("./single-page-detail-6c623469.js")), v = ({ pageData: t }) => {
|
|
36
36
|
const [s, r] = m("CLOSE");
|
|
37
37
|
return /* @__PURE__ */ e.jsxs(
|
|
38
38
|
g,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),n=require("react"),u=require("@radix-ui/react-icons"),o=require("./popover-7cb9079b.cjs"),x=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-5c3ac4f7.cjs"),n=require("react"),u=require("@radix-ui/react-icons"),o=require("./popover-7cb9079b.cjs"),x=require("./index-ca6f6afc.cjs");require("@radix-ui/react-popover");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("./MODIFIERS-4716c669.cjs");require("@radix-ui/react-scroll-area");require("react-dom");require("@floating-ui/react-dom");require("jotai");require("i18next");require("react-i18next");require("flagged");require("react-dnd");require("lodash");require("@minoru/react-dnd-treeview");require("./useBuilderProp-5e57d0c8.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("@chaibuilder/blocks");require("lucide-react");require("sonner");const m=n.lazy(()=>Promise.resolve().then(()=>require("./single-page-detail-5e257353.cjs"))),j=({pageData:s})=>{const[r,t]=n.useState("CLOSE");return e.jsxRuntimeExports.jsxs(o.Popover,{open:r==="OPEN"||r==="ALERT"||r==="PENDING",onOpenChange:i=>{t(r==="PENDING"?"ALERT":i?"OPEN":"CLOSE")},children:[e.jsxRuntimeExports.jsx(o.PopoverTrigger,{asChild:!0,onClick:i=>{i.stopPropagation(),t("OPEN")},children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:r==="OPEN"||r==="ALERT"||r==="PENDING"?e.jsxRuntimeExports.jsx(u.ChevronRightIcon,{}):e.jsxRuntimeExports.jsx("div",{className:"hidden hover:text-blue-600 group-hover:flex",children:e.jsxRuntimeExports.jsx(u.GearIcon,{})})})}),e.jsxRuntimeExports.jsx(o.PopoverContent,{side:"right",align:"start",alignOffset:-35,className:"h-screen w-96",children:e.jsxRuntimeExports.jsx(n.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:t})})})]})},p=s=>{const[r]=x.useCurrentPage(),{data:t}=x.useProject(),i=x.useChangePage(),l=(t==null?void 0:t.homepage)===s.uuid,a=r===s.uuid,c=()=>i(s);return t?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(u.HomeIcon,{}):e.jsxRuntimeExports.jsx(u.FileTextIcon,{})," ",s.name]}),e.jsxRuntimeExports.jsx(j,{pageData:s})]}):null},d=({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:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(p,{...t})))});exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-5c3ac4f7.cjs"),a=require("react"),f=require("./scroll-area-bb343b86.cjs"),o=require("@chaibuilder/blocks"),m=require("./form-99b51245.cjs"),d=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./jsx-runtime-5c3ac4f7.cjs"),a=require("react"),f=require("./scroll-area-bb343b86.cjs"),o=require("@chaibuilder/blocks"),m=require("./form-99b51245.cjs"),d=require("./index-ca6f6afc.cjs");require("@radix-ui/react-scroll-area");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@rjsf/core");require("@rjsf/validator-ajv8");require("lodash");require("./link-86ac8848.cjs");require("react-icons-picker");require("react-dom");require("./dialog-170eaad9.cjs");require("@radix-ui/react-dialog");require("@radix-ui/react-icons");require("./ImagesPanel-0db5c72f.cjs");require("./tabs-860e37aa.cjs");require("@radix-ui/react-tabs");require("react-quill");require("react-i18next");require("./useBuilderProp-5e57d0c8.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("./MODIFIERS-4716c669.cjs");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("lucide-react");require("sonner");function g(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 j=g(a),b=({_projectData:r,seany:i})=>{const{data:e,isLoading:u}=d.useProject();j.useEffect(()=>{e&&i(e)},[e,i]);const q=({formData:l},t)=>{i(s=>({...s,[t]:l[t]}))},c={name:o.SingleLineText({title:"Project Name",default:e==null?void 0:e.name}),favicon:o.Image({title:"Favicon",default:e==null?void 0:e.favicon})};return n.jsxRuntimeExports.jsx(f.ScrollArea,{className:"flex h-full select-none flex-col",children:n.jsxRuntimeExports.jsx(m.Form,{properties:c,disabled:u,formData:r,onChange:q})})};exports.default=b;
|
|
@@ -3,7 +3,7 @@ import * as n from "react";
|
|
|
3
3
|
import { S as f } from "./scroll-area-83bd9e8f.js";
|
|
4
4
|
import { SingleLineText as c, Image as d } from "@chaibuilder/blocks";
|
|
5
5
|
import { F as u } from "./form-725e3191.js";
|
|
6
|
-
import { R as x } from "./index-
|
|
6
|
+
import { R as x } from "./index-b534abc9.js";
|
|
7
7
|
import "@radix-ui/react-scroll-area";
|
|
8
8
|
import "./utils-ac68b2c8.js";
|
|
9
9
|
import "clsx";
|
package/dist/render.d.ts
CHANGED
|
@@ -15,17 +15,17 @@ export declare type ChaiPageData = {
|
|
|
15
15
|
seoData?: Record<string, string>;
|
|
16
16
|
slug?: string;
|
|
17
17
|
name: string;
|
|
18
|
+
providers: {
|
|
19
|
+
providerKey: string;
|
|
20
|
+
args: Record<string, any>;
|
|
21
|
+
}[];
|
|
18
22
|
};
|
|
19
|
-
providers?: {
|
|
20
|
-
providerKey: string;
|
|
21
|
-
args: Record<string, unknown>;
|
|
22
|
-
}[];
|
|
23
23
|
subPages?: {
|
|
24
24
|
uuid: string;
|
|
25
25
|
blocks: ChaiBlock[];
|
|
26
|
-
providers
|
|
26
|
+
providers: {
|
|
27
27
|
providerKey: string;
|
|
28
|
-
args: Record<string,
|
|
28
|
+
args: Record<string, any>;
|
|
29
29
|
}[];
|
|
30
30
|
}[];
|
|
31
31
|
project: {
|
package/dist/server.d.ts
CHANGED
|
@@ -190,7 +190,7 @@ export declare class ChaibuilderBackend implements ChaibuilderBackendInterface {
|
|
|
190
190
|
seoData: object;
|
|
191
191
|
providers: {
|
|
192
192
|
providerKey: string;
|
|
193
|
-
args: Record<string,
|
|
193
|
+
args: Record<string, any>;
|
|
194
194
|
}[];
|
|
195
195
|
type: "STATIC" | "DYNAMIC" | "SUBPAGE";
|
|
196
196
|
project: string;
|
|
@@ -202,17 +202,17 @@ export declare class ChaibuilderBackend implements ChaibuilderBackendInterface {
|
|
|
202
202
|
seoData?: Record<string, string>;
|
|
203
203
|
slug?: string;
|
|
204
204
|
name: string;
|
|
205
|
+
providers: {
|
|
206
|
+
providerKey: string;
|
|
207
|
+
args: Record<string, any>;
|
|
208
|
+
}[];
|
|
205
209
|
};
|
|
206
|
-
providers?: {
|
|
207
|
-
providerKey: string;
|
|
208
|
-
args: Record<string, unknown>;
|
|
209
|
-
}[];
|
|
210
210
|
subPages?: {
|
|
211
211
|
uuid: string;
|
|
212
212
|
blocks: ChaiBlock[];
|
|
213
|
-
providers
|
|
213
|
+
providers: {
|
|
214
214
|
providerKey: string;
|
|
215
|
-
args: Record<string,
|
|
215
|
+
args: Record<string, any>;
|
|
216
216
|
}[];
|
|
217
217
|
}[];
|
|
218
218
|
project: {
|
|
@@ -240,7 +240,7 @@ export declare class ChaibuilderBackend implements ChaibuilderBackendInterface {
|
|
|
240
240
|
user?: string;
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
declare type ChaiSubPage = Pick<ChaiPage, "uuid" | "name" | "blocks" | "type" | "project">;
|
|
243
|
+
declare type ChaiSubPage = Pick<ChaiPage, "uuid" | "name" | "blocks" | "type" | "project" | "providers">;
|
|
244
244
|
|
|
245
245
|
export declare const prepareExternalData: (providers: {
|
|
246
246
|
providerKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-5c3ac4f7.cjs"),g=require("react"),c=require("lodash"),M=require("@radix-ui/react-icons"),H=require("./useBuilderProp-5e57d0c8.cjs"),w=require("./scroll-area-bb343b86.cjs"),d=require("@chaibuilder/blocks"),L=require("sonner"),p=require("./form-99b51245.cjs"),P=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-5c3ac4f7.cjs"),g=require("react"),c=require("lodash"),M=require("@radix-ui/react-icons"),H=require("./useBuilderProp-5e57d0c8.cjs"),w=require("./scroll-area-bb343b86.cjs"),d=require("@chaibuilder/blocks"),L=require("sonner"),p=require("./form-99b51245.cjs"),P=require("./index-ca6f6afc.cjs");require("@radix-ui/react-slot");require("class-variance-authority");require("./utils-3c452dd0.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-tooltip");require("@radix-ui/react-toast");require("jotai");require("@radix-ui/react-scroll-area");require("@rjsf/core");require("@rjsf/validator-ajv8");require("./link-86ac8848.cjs");require("react-icons-picker");require("react-dom");require("./dialog-170eaad9.cjs");require("@radix-ui/react-dialog");require("./ImagesPanel-0db5c72f.cjs");require("./tabs-860e37aa.cjs");require("@radix-ui/react-tabs");require("react-quill");require("react-i18next");require("./MODIFIERS-4716c669.cjs");require("@floating-ui/react-dom");require("i18next");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("flat-to-nested");require("./html-to-json-aadcbf66.cjs");require("himalaya");require("redux-undo");require("@react-hookz/web");require("lucide-react");const z=g.lazy(()=>Promise.resolve().then(()=>require("./delete-page-modal-344825c3.cjs"))),B=g.lazy(()=>Promise.resolve().then(()=>require("./confirm-alert-4f50caa7.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},h=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(h(o).seoData,h(n).seoData);return s||q},Y=({open:n,setOpen:o,pageData:s})=>{const q=P.useQueryClient(),{data:e}=P.useProject(),u=P.useUpdatePage(),m=P.useUpdateProject("Homepage updated successfully."),[i,b]=g.useState(h(s)),[a,y]=g.useState({isHomePage:(e==null?void 0:e.homepage)===s.uuid}),j=G(i,s);g.useEffect(()=>{const l=!c.isEqual(h(s),i),r=(e==null?void 0:e.homepage)!==s.uuid&&a.isHomePage;o(l||r?"PENDING":"OPEN")},[e,s,i,a,o]);const S=()=>{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"),L.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")})},C=({formData:l},r)=>{b(f=>{var R,N;if(!r)return f;const x={[r]:l[r]};return r==="name"?x.slug=c.kebabCase((R=l[r])==null?void 0:R.replace(/\d/g,"")):r==="slug"?x.slug=(N=l[r])==null?void 0:N.replace(/\d/g,"").replace(/\s+/g,"").replace("--","-").replace("__","_"):r==="seoData"&&(x.seoData={title:l[r].title||"",description:l[r].description||"",image:l[r].image||""}),{...f,...x}})},A=({formData:l},r)=>{y(f=>{const x={[r]:l[r]};return{...f,...x}})},I={name:d.SingleLineText({title:"Page Name",default:i.name}),slug:d.SingleLineText({title:"Page Slug",default:i.slug})},T={seoData:d.Model({title:"",description:"",default:{title:"",description:"",image:""},properties:{title:d.SingleLineText({title:"Meta Title",default:i.name}),description:d.MultilineText({title:"Meta Description",default:i.slug}),image:d.Image({title:"Social Media Image",default:""})}})},v={isHomePage:d.Checkbox({title:"Set as homepage",default:a.isHomePage})};return t.jsxRuntimeExports.jsxs(w.ScrollArea,{className:"flex h-full select-none flex-col",children:[t.jsxRuntimeExports.jsx(B,{open:n==="ALERT",title:"Do yo want to save changes?",onCancel:()=>o("CLOSE"),onConfirm:S,disabled:m.isPending||u.isPending}),t.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 px-2.5 py-1",children:t.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:"Page Details"})}),t.jsxRuntimeExports.jsx("div",{className:"px-2.5 pt-2",children:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col space-y-2",children:[t.jsxRuntimeExports.jsx(p.Form,{title:"Basic Details",formData:i,properties:I,onChange:C,disabled:u.isPending||m.isPending}),t.jsxRuntimeExports.jsx("div",{className:"h-2 w-full"}),t.jsxRuntimeExports.jsx(p.Form,{title:"SEO Details",formData:i,properties:T,onChange:C,disabled:u.isPending||m.isPending}),(e==null?void 0:e.homepage)!==s.uuid&&s.type==="STATIC"?t.jsxRuntimeExports.jsx(p.Form,{formData:a,properties:v,onChange:A,disabled:u.isPending||m.isPending}):s.type==="STATIC"&&t.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1 px-1 pt-2 text-xs font-medium text-gray-500",children:[t.jsxRuntimeExports.jsx(M.HomeIcon,{})," This is homepage"," "]}),i.type==="DYNAMIC"&&!E((i==null?void 0:i.slug)||"")&&t.jsxRuntimeExports.jsxs("small",{className:"px-1 text-red-400",children:["Add dynamic ID in page slug Eg: ",t.jsxRuntimeExports.jsx("i",{className:"underline",children:"some-url/[some-id]"})]}),t.jsxRuntimeExports.jsxs("div",{className:"my-2 flex w-full items-center justify-between gap-x-2 px-1",children:[t.jsxRuntimeExports.jsx(H.Button,{className:"w-full",type:"submit",onClick:S,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"}),t.jsxRuntimeExports.jsx(z,{pageData:s,projectData:e})]})]})})]})};exports.default=Y;
|
|
@@ -7,7 +7,7 @@ import { S as q } from "./scroll-area-83bd9e8f.js";
|
|
|
7
7
|
import { SingleLineText as g, Model as Z, MultilineText as $, Image as F, Checkbox as Q } from "@chaibuilder/blocks";
|
|
8
8
|
import { toast as U } from "sonner";
|
|
9
9
|
import { F as h } from "./form-725e3191.js";
|
|
10
|
-
import { a2 as V, R as X, a3 as _, S as K } from "./index-
|
|
10
|
+
import { a2 as V, R as X, a3 as _, S as K } from "./index-b534abc9.js";
|
|
11
11
|
import "@radix-ui/react-slot";
|
|
12
12
|
import "class-variance-authority";
|
|
13
13
|
import "./utils-ac68b2c8.js";
|
|
@@ -42,7 +42,7 @@ import "himalaya";
|
|
|
42
42
|
import "redux-undo";
|
|
43
43
|
import "@react-hookz/web";
|
|
44
44
|
import "lucide-react";
|
|
45
|
-
const O = y.lazy(() => import("./delete-page-modal-
|
|
45
|
+
const O = y.lazy(() => import("./delete-page-modal-54c2f791.js")), J = y.lazy(() => import("./confirm-alert-f2a47cc7.js")), x = (n) => {
|
|
46
46
|
if (!z(n) || !(n.includes("/[") && n.includes("]")))
|
|
47
47
|
return !1;
|
|
48
48
|
const s = /^\[((?:\.{3})?[a-zA-Z0-9_-]+)\]$/, u = /^[a-zA-Z0-9_-]+$/;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaibuilder/sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@bobthered/tailwindcss-palette-generator": "3.1.1",
|
|
57
|
-
"@chaibuilder/blocks": "0.1.
|
|
57
|
+
"@chaibuilder/blocks": "0.1.28",
|
|
58
58
|
"@floating-ui/dom": "1.4.5",
|
|
59
59
|
"@floating-ui/react-dom": "2.0.1",
|
|
60
60
|
"@mhsdesign/jit-browser-tailwindcss": "0.3.0",
|