@chaibuilder/sdk 1.2.63 → 1.2.64
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-6dJmFSgk.js +142 -0
- package/dist/AddBlocks-doCNVVbk.cjs +1 -0
- package/dist/{CanvasArea-DvfLxy0w.js → CanvasArea-kB6ky_uL.js} +4 -4
- package/dist/{CanvasArea-hGLbDJlM.cjs → CanvasArea-kdnkFfKR.cjs} +1 -1
- package/dist/{CodeEditor-QPwyZNgA.js → CodeEditor-37od44Ou.js} +1 -1
- package/dist/{CurrentPage-fMCaBGwl.cjs → CurrentPage-Ekl5Cwbv.cjs} +1 -1
- package/dist/{CurrentPage-rOUX01kk.js → CurrentPage-bHq9Uusr.js} +3 -3
- package/dist/{PagesPanel-ZCZjs7Bi.cjs → PagesPanel-SMHrEmCb.cjs} +1 -1
- package/dist/{PagesPanel-6P4VkMP-.js → PagesPanel-wIPAyjJK.js} +4 -4
- package/dist/{ProjectPanel-Cn3teDRW.js → ProjectPanel-L-SlDizV.js} +4 -4
- package/dist/{ProjectPanel-XSVWRr6v.cjs → ProjectPanel-YruLal65.cjs} +1 -1
- package/dist/{Settings-dbB2VPAj.js → Settings-WXkCyhAv.js} +16 -14
- package/dist/{Settings-Amh8Mtm7.cjs → Settings-_5VHcgFC.cjs} +1 -1
- package/dist/{SidePanels-_Im6sF4f.js → SidePanels-UQj0XTnb.js} +72 -72
- package/dist/{SidePanels-5adH7U3T.cjs → SidePanels-UeIZB3e1.cjs} +1 -1
- package/dist/{StaticCanvas-goU42OMU.js → StaticCanvas-7C52tXAv.js} +42 -42
- package/dist/{StaticCanvas-fDhBK35X.cjs → StaticCanvas-ll9VTXI5.cjs} +1 -1
- package/dist/ThemeConfigPanel-_86vVxLz.cjs +1 -0
- package/dist/{ThemeConfigPanel-aEN4tTYi.js → ThemeConfigPanel-gw8B2zvx.js} +59 -56
- package/dist/{Topbar-SuY-S0im.js → Topbar-1O05wogM.js} +2 -2
- package/dist/{Topbar-ag6qdgbe.cjs → Topbar-gb17oHdJ.cjs} +1 -1
- package/dist/{UILibrariesPanel-RI9mo293.js → UILibrariesPanel-vshiYI6G.js} +18 -18
- package/dist/{UnsplashImages-dasLGrBn.js → UnsplashImages-Eq7hprBO.js} +5 -5
- package/dist/{UploadImages-Gh2AQpk1.js → UploadImages-lco2Tea3.js} +7 -7
- package/dist/{add-page-modal-zCiyvKEa.js → add-page-modal-qr7rvJzN.js} +6 -6
- package/dist/{add-page-modal-80cVOM7i.cjs → add-page-modal-rOKavDFX.cjs} +1 -1
- package/dist/{confirm-alert-9XYi0a4k.js → confirm-alert-P6TAevaP.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +6 -2
- package/dist/core.js +15 -15
- package/dist/{delete-page-modal-pzagU_6y.js → delete-page-modal-55oioI9i.js} +3 -3
- package/dist/{delete-page-modal-foPRP--l.cjs → delete-page-modal-wdAiMVnL.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.js +2 -2
- package/dist/{form-EjiQiiEY.js → form-5ke_lZv8.js} +1 -1
- package/dist/{index-DzAuS11k.cjs → index-6w-6HYBd.cjs} +1 -1
- package/dist/{index-BbW1Uw_k.cjs → index-audsIPBC.cjs} +1 -1
- package/dist/{index-bscJUvUx.js → index-b33n_-zO.js} +60 -60
- package/dist/{index-qSbpzIA4.js → index-fnkMn4Pk.js} +3 -3
- package/dist/{index-EEcKvBh3.js → index-wRAIA8zZ.js} +5 -5
- package/dist/{page-viewer-Z1wXyzzc.js → page-viewer-t44DP65U.js} +9 -9
- package/dist/{page-viewer-XFTCHu_2.cjs → page-viewer-wU7T0f48.cjs} +1 -1
- package/dist/{project-general-setting-HV3X_wHI.cjs → project-general-setting-87cX9vvO.cjs} +1 -1
- package/dist/{project-general-setting-5B7s5swF.js → project-general-setting-NEkNjf7V.js} +4 -4
- package/dist/{project-seo-setting-aAGnwBrw.js → project-seo-setting-YmspOYsF.js} +2 -2
- package/dist/{single-page-detail-6C1WP3s5.cjs → single-page-detail-27UjWK8L.cjs} +1 -1
- package/dist/{single-page-detail-Yr0EbBJJ.js → single-page-detail-jHzoDP7B.js} +10 -10
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +3 -3
- package/dist/ui.js +10 -10
- package/package.json +1 -1
- package/dist/AddBlocks-4wpxOF2K.cjs +0 -1
- package/dist/AddBlocks-ChNxwRrx.js +0 -142
- package/dist/ThemeConfigPanel-N6l317II.cjs +0 -1
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import k, { createElement as F, useState as b, useEffect as H } from "react";
|
|
3
|
-
import { has as L, isFunction as D, first as x, omit as N, filter as g, groupBy as E, uniq as z, map as B, includes as M, isEmpty as y, reject as C, values as v } from "lodash-es";
|
|
4
|
-
import { useAtom as u } from "jotai";
|
|
5
|
-
import { useTranslation as w } from "react-i18next";
|
|
6
|
-
import { ap as A, j as I, az as q, bf as P, T as O, v as R, w as G, bg as J, bh as K, bi as U, bj as V, b8 as W, a6 as Y, bk as Q, B as X, bl as Z, bm as $, bn as ee, h as T, bo as se, bp as te, bq as _, bc as oe, a8 as re, a9 as ae, aa as le, ab as ie } from "./index-bscJUvUx.js";
|
|
7
|
-
import { BoxIcon as ce } from "@radix-ui/react-icons";
|
|
8
|
-
import { syncBlocksWithDefaults as ne, useChaiBlocks as de } from "@chaibuilder/runtime";
|
|
9
|
-
import { O as j } from "./MODIFIERS-fd5XOmum.js";
|
|
10
|
-
import { d as me } from "./atoms-Oomqut88.js";
|
|
11
|
-
import { useFeature as pe } from "flagged";
|
|
12
|
-
import { g as he } from "./html-to-json-_01DXd-a.js";
|
|
13
|
-
import { c as xe } from "./Functions-7jnEwJyw.js";
|
|
14
|
-
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
15
|
-
import "@radix-ui/react-toggle";
|
|
16
|
-
import "class-variance-authority";
|
|
17
|
-
import "./utils-VpVqnC9m.js";
|
|
18
|
-
import "clsx";
|
|
19
|
-
import "tailwind-merge";
|
|
20
|
-
import "@radix-ui/react-switch";
|
|
21
|
-
import "@radix-ui/react-slot";
|
|
22
|
-
import "@radix-ui/react-accordion";
|
|
23
|
-
import "@radix-ui/react-alert-dialog";
|
|
24
|
-
import "@radix-ui/react-dialog";
|
|
25
|
-
import "@radix-ui/react-label";
|
|
26
|
-
import "@radix-ui/react-scroll-area";
|
|
27
|
-
import "@radix-ui/react-tabs";
|
|
28
|
-
import "@radix-ui/react-tooltip";
|
|
29
|
-
import "@radix-ui/react-popover";
|
|
30
|
-
import "@radix-ui/react-menubar";
|
|
31
|
-
import "@radix-ui/react-hover-card";
|
|
32
|
-
import "@radix-ui/react-select";
|
|
33
|
-
import "@radix-ui/react-dropdown-menu";
|
|
34
|
-
import "@radix-ui/react-separator";
|
|
35
|
-
import "@radix-ui/react-toast";
|
|
36
|
-
import "cmdk";
|
|
37
|
-
import "@radix-ui/react-context-menu";
|
|
38
|
-
import "react-icons-picker";
|
|
39
|
-
import "react-dom";
|
|
40
|
-
import "react-quill";
|
|
41
|
-
import "@react-hookz/web";
|
|
42
|
-
import "tree-model";
|
|
43
|
-
import "himalaya";
|
|
44
|
-
import "lodash";
|
|
45
|
-
const ue = ({ block: s }) => {
|
|
46
|
-
const [, o] = u(me), { type: a, icon: c, label: l } = s, { addCoreBlock: n, addPredefinedBlock: d } = A(), [r, m] = I(), [, f] = q(), [, h] = u(P), p = () => {
|
|
47
|
-
if (L(s, "blocks")) {
|
|
48
|
-
const t = D(s.blocks) ? s.blocks() : s.blocks;
|
|
49
|
-
d(ne(t), x(r));
|
|
50
|
-
} else
|
|
51
|
-
n(s, x(r));
|
|
52
|
-
h(j);
|
|
53
|
-
}, i = pe("dnd");
|
|
54
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(O, { children: [
|
|
55
|
-
/* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
onClick: p,
|
|
59
|
-
type: "button",
|
|
60
|
-
onDragStart: (t) => {
|
|
61
|
-
t.dataTransfer.setData("text/plain", JSON.stringify(N(s, ["component", "icon"]))), t.dataTransfer.setDragImage(new Image(), 0, 0), o(N(s, ["component", "icon"])), setTimeout(() => {
|
|
62
|
-
m([]), f(null), h(j);
|
|
63
|
-
}, 200);
|
|
64
|
-
},
|
|
65
|
-
draggable: i ? "true" : "false",
|
|
66
|
-
className: "cursor-pointer space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50",
|
|
67
|
-
children: [
|
|
68
|
-
F(c || ce, { className: "w-4 h-4 mx-auto" }),
|
|
69
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-xs", children: l || a })
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
) }),
|
|
73
|
-
/* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsx("p", { children: l || a }) })
|
|
74
|
-
] }) });
|
|
75
|
-
}, fe = () => {
|
|
76
|
-
const { t: s } = w(), [o, a] = b(""), { addPredefinedBlock: c } = A(), [l] = I(), [, n] = u(P), d = () => {
|
|
77
|
-
const r = he(o);
|
|
78
|
-
c([...r], x(l) || null), a(""), n(j);
|
|
79
|
-
};
|
|
80
|
-
return /* @__PURE__ */ e.jsxs(J, { className: "border-border/0 p-0 shadow-none", children: [
|
|
81
|
-
/* @__PURE__ */ e.jsx(K, { className: "p-3", children: /* @__PURE__ */ e.jsx(U, { children: s("html_snippet_description") }) }),
|
|
82
|
-
/* @__PURE__ */ e.jsx(V, { className: "space-y-2 px-3 py-0", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
83
|
-
/* @__PURE__ */ e.jsx(W, { htmlFor: "current", className: "text-sm", children: s("tailwind_html_snippet") }),
|
|
84
|
-
/* @__PURE__ */ e.jsx(
|
|
85
|
-
Y,
|
|
86
|
-
{
|
|
87
|
-
autoFocus: !0,
|
|
88
|
-
tabIndex: 1,
|
|
89
|
-
ref: (r) => r && r.focus(),
|
|
90
|
-
onChange: (r) => a(r.target.value),
|
|
91
|
-
rows: 12,
|
|
92
|
-
value: o,
|
|
93
|
-
placeholder: s("enter_code_snippet"),
|
|
94
|
-
className: "resize-none overflow-x-auto whitespace-pre bg-gray-100 font-mono text-xs font-normal"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] }) }),
|
|
98
|
-
/* @__PURE__ */ e.jsxs(Q, { className: "flex flex-col justify-end p-3", children: [
|
|
99
|
-
/* @__PURE__ */ e.jsx(X, { disabled: o.trim() === "", onClick: () => d(), size: "sm", className: "w-full", children: s("import_html") }),
|
|
100
|
-
/* @__PURE__ */ e.jsx(Z, { variant: "default", className: "mt-2 border-none p-1 text-gray-400", children: /* @__PURE__ */ e.jsx($, { className: "text-xs font-normal leading-4", children: s("note_imported_html") }) })
|
|
101
|
-
] })
|
|
102
|
-
] });
|
|
103
|
-
}, is = ({ className: s }) => {
|
|
104
|
-
const { t: o } = w(), [a, c] = b("core"), [l, n] = b("basic"), d = de(), [, r] = u(ee), m = T("importHTMLSupport", !0), f = T("filterChaiBlock", () => !0), h = g(d, f), p = E(h, "category"), i = z(B(p.core, "group"));
|
|
105
|
-
return H(() => {
|
|
106
|
-
!M(i, l) && !y(i) && !y(l) && n(x(i));
|
|
107
|
-
}, [i, l]), /* @__PURE__ */ e.jsxs("div", { className: xe("flex h-full w-72 flex-col overflow-hidden", s), children: [
|
|
108
|
-
/* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex flex-col justify-between rounded-md bg-background/30 p-1", children: [
|
|
109
|
-
/* @__PURE__ */ e.jsx("h1", { className: "flex flex-col items-baseline px-1 text-xl font-semibold xl:flex-col", children: o("add_block") }),
|
|
110
|
-
/* @__PURE__ */ e.jsx("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: o(a === "html" ? "enter_paste_tailwind_html" : "click_to_add_block") })
|
|
111
|
-
] }),
|
|
112
|
-
/* @__PURE__ */ e.jsx(
|
|
113
|
-
se,
|
|
114
|
-
{
|
|
115
|
-
onValueChange: (t) => {
|
|
116
|
-
r(""), c(t);
|
|
117
|
-
},
|
|
118
|
-
value: a,
|
|
119
|
-
className: "h-max",
|
|
120
|
-
children: /* @__PURE__ */ e.jsxs(te, { className: "grid w-full " + (m ? "grid-cols-2" : "grid-cols-1"), children: [
|
|
121
|
-
/* @__PURE__ */ e.jsx(_, { value: "core", children: o("Blocks") }),
|
|
122
|
-
m ? /* @__PURE__ */ e.jsx(_, { value: "html", children: o("import") }) : null
|
|
123
|
-
] })
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
a === "core" && /* @__PURE__ */ e.jsx(oe, { className: "-mx-1.5 h-[calc(100vh-156px)] overflow-y-auto", children: /* @__PURE__ */ e.jsx("div", { className: "mt-2 w-full", children: k.Children.toArray(
|
|
127
|
-
B(
|
|
128
|
-
i,
|
|
129
|
-
(t) => C(g(v(p.core), { group: t }), { hidden: !0 }).length ? /* @__PURE__ */ e.jsx(re, { type: "single", value: t, collapsible: !0, className: "w-full", children: /* @__PURE__ */ e.jsxs(ae, { value: t, children: [
|
|
130
|
-
/* @__PURE__ */ e.jsx(le, { className: "rounded-md bg-gray-100 px-4 py-2 capitalize", children: t }),
|
|
131
|
-
/* @__PURE__ */ e.jsx(ie, { className: "p-3", children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3 gap-2", children: k.Children.toArray(
|
|
132
|
-
C(g(v(p.core), { group: t }), { hidden: !0 }).map((S) => /* @__PURE__ */ e.jsx(ue, { block: S }))
|
|
133
|
-
) }) })
|
|
134
|
-
] }) }) : null
|
|
135
|
-
)
|
|
136
|
-
) }) }),
|
|
137
|
-
a === "html" && m ? /* @__PURE__ */ e.jsx(fe, {}) : null
|
|
138
|
-
] });
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
is as default
|
|
142
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-Z_BpKhVy.cjs"),B=require("react"),N=require("@rjsf/validator-ajv8"),E=require("@rjsf/core"),p=require("./index-aeDphKpP.cjs"),r=require("./controls-rRZhz0vu.cjs"),m=require("lodash-es"),P=require("react-i18next");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-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");function k(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const f=k(B),T=({value:t,onChange:e,id:a,onBlur:l})=>{const n=m.debounce(e,200),v=u=>n(u.target.value);return i.jsxRuntimeExports.jsx("div",{className:"mt-1.5 flex items-center gap-x-3",children:i.jsxRuntimeExports.jsx("div",{className:"flex w-3/5 flex-col",children:i.jsxRuntimeExports.jsx("input",{type:"color",className:"text-xs p-0",value:t,onBlur:({target:{value:u}})=>l(a,u),onChange:v})})})},g=[{title:"Roboto",value:"Roboto"},{title:"Open Sans",value:"Open Sans"},{title:"Montserrat",value:"Montserrat"},{title:"Lato",value:"Lato"},{title:"Poppins",value:"Poppins"},{title:"Oswald",value:"Oswald"},{title:"Raleway",value:"Raleway"},{title:"Ubuntu",value:"Ubuntu"},{title:"Nunito",value:"Nunito"},{title:"Merriweather",value:"Merriweather"},{title:"Nunito Sans",value:"Nunito Sans"},{title:"Playfair Display",value:"Playfair Display"},{title:"Rubik",value:"Rubik"},{title:"Inter",value:"Inter"},{title:"Lora",value:"Lora"},{title:"Kanit",value:"Kanit"},{title:"Fira Sans",value:"Fira Sans"},{title:"Hind",value:"Hind"},{title:"Quicksand",value:"Quicksand"},{title:"Mulish",value:"Mulish"},{title:"Barlow",value:"Barlow"},{title:"Inconsolata",value:"Inconsolata"},{title:"Titillium Web",value:"Titillium Web"},{title:"Heebo",value:"Heebo"},{title:"IBM Plex Sans",value:"IBM Plex Sans"},{title:"DM Sans",value:"DM Sans"},{title:"Nanum Gothic",value:"Nanum Gothic"},{title:"Karla",value:"Karla"},{title:"Arimo",value:"Arimo"},{title:"Cabin",value:"Cabin"},{title:"Oxygen",value:"Oxygen"},{title:"Overpass",value:"Overpass"},{title:"Assistant",value:"Assistant"},{title:"Tajawal",value:"Tajawal"},{title:"Play",value:"Play"},{title:"Exo",value:"Exo"},{title:"Cinzel",value:"Cinzel"},{title:"Faustina",value:"Faustina"},{title:"Philosopher",value:"Philosopher"},{title:"Gelasio",value:"Gelasio"},{title:"Sofia Sans Condensed",value:"Sofia Sans Condensed"},{title:"Noto Sans Devanagari",value:"Noto Sans Devanagari"},{title:"Actor",value:"Actor"},{title:"Epilogue",value:"Epilogue"},{title:"Glegoo",value:"Glegoo"},{title:"Overlock",value:"Overlock"},{title:"Lustria",value:"Lustria"},{title:"Ovo",value:"Ovo"},{title:"Suranna",value:"Suranna"},{title:"Bebas Neue",value:"Bebas Neue"},{title:"Manrope",value:"Manrope"}],D=()=>{const t=p.useBuilderProp("onSaveBrandingOptions",m.noop),[e,a]=p.useBrandingOptions(),[l]=p.useBlocksContainer(),n=f.useRef(e),{t:v}=P.useTranslation();f.useEffect(()=>()=>{m.isEqual(e,n.current)||t(n.current)},[]);const u=({formData:o},d)=>{d&&(a(o),n.current=o)},{bodyFont:q,headingFont:b,primaryColor:h,bodyTextDarkColor:y,bodyTextLightColor:C,bodyBgDarkColor:S,secondaryColor:j,bodyBgLightColor:O,roundedCorners:R}=e;let s={headingFont:r.f({title:"Heading font",default:b,options:g}),bodyFont:r.f({title:"Body font",default:q,options:g}),roundedCorners:r.y({title:"Rounded Corner",default:parseInt(R||5,10)}),primaryColor:r.s({title:"Primary",default:h}),secondaryColor:r.s({title:"Secondary",default:j})};l||(s={...s,bodyBgLightColor:r.s({title:"Background",default:O}),bodyTextLightColor:r.s({title:"Text color",default:y}),bodyBgDarkColor:r.s({title:"Background (Dark mode)",default:S}),bodyTextDarkColor:r.s({title:"Text color(Dark mode)",default:C})});const c={type:"object",properties:{}},x={};return Object.keys(s).forEach(o=>{const d=s[o];return c.properties||(c.properties={}),c.properties[o]=d.schema,x[o]=d.uiSchema,!0}),i.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-60 select-none flex-col",children:[i.jsxRuntimeExports.jsx("div",{className:"rounded-md bg-background/30 p-1",children:i.jsxRuntimeExports.jsx("h1",{className:"px-1 font-semibold",children:v("Theme Configuration")})}),i.jsxRuntimeExports.jsx("div",{className:"-mx-2",children:i.jsxRuntimeExports.jsx(E,{widgets:{color:T},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:x,schema:c,formData:e,validator:N,onChange:u})})]})};exports.default=D;
|