@chaibuilder/sdk 1.2.22 → 1.2.24
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-l1JENNvq.js +206 -0
- package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
- package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
- package/dist/{BrandingOptions-4961TxX2.js → BrandingOptions-udtH5yJs.js} +11 -10
- package/dist/CanvasArea-IqeMbtOf.js +951 -0
- package/dist/CanvasArea-plZTWifU.cjs +55 -0
- package/dist/{Class-MmCxz2Ay.cjs → Class-PoYusiA5.cjs} +1 -1
- package/dist/{Class-3k8xjeiM.js → Class-lGzsNBOK.js} +1 -1
- package/dist/CurrentPage-7_s9LtEJ.cjs +1 -0
- package/dist/{CurrentPage-oPZN6Gwj.js → CurrentPage-AA0XHYMU.js} +23 -24
- package/dist/ListTree-LAN7QmHQ.cjs +1 -0
- package/dist/ListTree-ZNEtds1d.js +309 -0
- package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
- package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-dytZ-osO.js} +4 -8
- package/dist/PagesPanel-5qMZBatP.cjs +1 -0
- package/dist/{PagesPanel-pRKHw-AZ.js → PagesPanel-883P3_su.js} +9 -10
- package/dist/{ProjectPanel-iU6DY-Yp.js → ProjectPanel-Y8Qcmsn0.js} +11 -12
- package/dist/ProjectPanel-otQb9ceP.cjs +1 -0
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/Settings-Rt342VJ3.cjs +1 -0
- package/dist/{Settings-BhSrj-cE.js → Settings-pIePR1Id.js} +862 -865
- package/dist/{SidePanels-OLOUpKn4.js → SidePanels-NznSn5RN.js} +121 -125
- package/dist/SidePanels-PaQkgjLa.cjs +1 -0
- package/dist/Topbar-CqW7G360.cjs +1 -0
- package/dist/{Topbar-Ny9T-7Zb.js → Topbar-pWzBEOed.js} +39 -35
- package/dist/UnsplashImages-NGskB93R.cjs +1 -0
- package/dist/{UnsplashImages-Y8RGFVSh.js → UnsplashImages-qvwFbV-E.js} +17 -16
- package/dist/{UploadImages-dd8LfyFr.js → UploadImages-9NapgXBq.js} +12 -11
- package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
- package/dist/{add-page-modal-Jni6CY1x.js → add-page-modal-4PiRJgX5.js} +11 -12
- package/dist/add-page-modal-4o2L_7T7.cjs +1 -0
- package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
- package/dist/{confirm-alert-sc8RaWvD.js → confirm-alert-GUhZ_G8w.js} +7 -6
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +5 -3
- package/dist/core.js +48 -49
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
- package/dist/{delete-page-modal-0WiMZFxr.js → delete-page-modal-4l5-RhQB.js} +10 -11
- package/dist/delete-page-modal-Bek5bCf-.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +3 -1
- package/dist/email.js +16 -16
- package/dist/{form-Nj6Kdn3g.js → form-STUz-6nE.js} +1 -1
- package/dist/{form-n1Q6u16z.cjs → form-lBQ_76Uw.cjs} +1 -1
- package/dist/html-to-json-efmv1pCj.cjs +1 -0
- package/dist/{html-to-json-C5sExaSD.js → html-to-json-ngX9ef2u.js} +31 -29
- package/dist/{index-IPJAbzzO.js → index-Gk6sASBd.js} +1242 -1213
- package/dist/{index-0bwkNnA0.cjs → index-dgm-fd8U.cjs} +42 -42
- package/dist/{index-UP_4awU9.js → index-gS-3liKK.js} +4479 -4484
- package/dist/index-h-hd6EvN.cjs +1 -0
- package/dist/index-oCYKBYyT.cjs +1 -0
- package/dist/{index-_VPpjzJu.js → index-xZWaF8AW.js} +118 -119
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +17 -16
- package/dist/page-viewer-JlKEwACu.cjs +1 -0
- package/dist/{page-viewer-L1Dmgj-c.js → page-viewer-rCXavxpd.js} +15 -16
- package/dist/project-general-setting-2FGoUZ-z.cjs +1 -0
- package/dist/{project-general-setting-sUP7JqWK.js → project-general-setting-rmAVpDu9.js} +11 -12
- package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
- package/dist/{project-seo-setting-NNvAGt4T.js → project-seo-setting-pX34Qsym.js} +8 -7
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/single-page-detail-c6-wRWyN.cjs +1 -0
- package/dist/{single-page-detail-FXg_NebW.js → single-page-detail-rSQomrY5.js} +12 -13
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +3 -1
- package/dist/studio.js +8 -9
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +139 -138
- package/dist/web-blocks.cjs +6 -1
- package/dist/web-blocks.js +462 -354
- package/package.json +3 -5
- package/dist/AddBlocks-157fSrJX.cjs +0 -1
- package/dist/AddBlocks-WgpssWmQ.js +0 -223
- package/dist/BrandingOptions-nwXR9TMl.cjs +0 -1
- package/dist/CanvasArea-MajWGr9z.js +0 -908
- package/dist/CanvasArea-MmTlc5Vb.cjs +0 -55
- package/dist/CurrentPage-LpLr0lDI.cjs +0 -1
- package/dist/ListTree-dvxHTXs4.js +0 -167
- package/dist/ListTree-gTmusfso.cjs +0 -1
- package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
- package/dist/Outline-2OxsXs1-.js +0 -294
- package/dist/Outline-7CCnnzmK.cjs +0 -1
- package/dist/PagesPanel-8536oBWB.cjs +0 -1
- package/dist/ProjectPanel-oILsUWOH.cjs +0 -1
- package/dist/Settings-jHiYmt0y.cjs +0 -1
- package/dist/SidePanels-bcJJocSq.cjs +0 -1
- package/dist/Topbar-NMvzqQHW.cjs +0 -1
- package/dist/TypeIcon-ElNNPazl.cjs +0 -1
- package/dist/TypeIcon-qO96rNbV.js +0 -69
- package/dist/UnsplashImages-6tZv1q2_.cjs +0 -1
- package/dist/UploadImages-VLlVg9Ur.cjs +0 -1
- package/dist/add-page-modal-IsqDdK7X.cjs +0 -1
- package/dist/confirm-alert-f26zJ7Js.cjs +0 -1
- package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
- package/dist/delete-page-modal-c3b-GCap.cjs +0 -1
- package/dist/html-to-json-FGufPv9R.cjs +0 -1
- package/dist/index-9PHdn80L.cjs +0 -1
- package/dist/index-nwAgi0aD.cjs +0 -1
- package/dist/page-viewer-TnxHhq7S.cjs +0 -1
- package/dist/project-general-setting-1Ot1RU43.cjs +0 -1
- package/dist/project-seo-setting-3-vBkx2v.cjs +0 -1
- package/dist/single-page-detail-btEKYXjE.cjs +0 -1
- package/dist/useAddBlockByDrop-V8xo-PNQ.js +0 -20
- package/dist/useAddBlockByDrop-qRHgy8_0.cjs +0 -1
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { K
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { C as G } from "./index-gS-3liKK.js";
|
|
2
|
+
import { K, a9 as N, L as Q, aa as V, M as X, a8 as Y, E as _, F as $, h as j, u as ss, N as es, O as os, P as as, Q as ts, R as rs, U as is, V as ps, t as ls, W as ms, X as us, Y as ds, Z as cs, q as Bs, J as ks, s as ns, _ as Cs, z as Ss, a1 as Ps, a0 as gs, $ as vs, r as ys, a7 as As, ab as hs, ac as Is, a2 as Ms, a4 as Rs, a3 as Us, v as Ds, a5 as bs, a6 as fs } from "./index-Gk6sASBd.js";
|
|
3
|
+
import { useTranslation as Os } from "react-i18next";
|
|
4
4
|
import "i18next";
|
|
5
5
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
6
6
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
@@ -11,19 +11,18 @@ import "@radix-ui/react-scroll-area";
|
|
|
11
11
|
import "@floating-ui/react-dom";
|
|
12
12
|
import "jotai";
|
|
13
13
|
import "flagged";
|
|
14
|
-
import "react-dnd";
|
|
15
14
|
import "lodash-es";
|
|
16
|
-
import "@minoru/react-dnd-treeview";
|
|
17
15
|
import "./Functions-7jnEwJyw.js";
|
|
18
16
|
import "tailwind-merge";
|
|
19
17
|
import "@radix-ui/react-icons";
|
|
20
18
|
import "react-hotkeys-hook";
|
|
21
19
|
import "@chaibuilder/runtime";
|
|
22
20
|
import "@react-hookz/web";
|
|
23
|
-
import "./
|
|
21
|
+
import "./STRINGS--j49GZJP.js";
|
|
22
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
23
|
+
import "./Class-lGzsNBOK.js";
|
|
24
24
|
import "@radix-ui/react-toggle";
|
|
25
25
|
import "class-variance-authority";
|
|
26
|
-
import "./Class-3k8xjeiM.js";
|
|
27
26
|
import "@radix-ui/react-switch";
|
|
28
27
|
import "@radix-ui/react-slot";
|
|
29
28
|
import "@radix-ui/react-accordion";
|
|
@@ -44,46 +43,46 @@ import "@radix-ui/react-context-menu";
|
|
|
44
43
|
import "react-icons-picker";
|
|
45
44
|
import "react-quill";
|
|
46
45
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
46
|
+
G as ChaiBuilderEditor,
|
|
47
|
+
K as useActiveModal,
|
|
48
|
+
N as useActivePanel,
|
|
49
|
+
Q as useAddBlock,
|
|
50
|
+
V as useAddBlockParent,
|
|
51
|
+
X as useAddClassesToBlocks,
|
|
52
|
+
Y as useAllBlocks,
|
|
53
|
+
_ as useBlocksStore,
|
|
54
|
+
$ as useBrandingOptions,
|
|
55
|
+
j as useBuilderProp,
|
|
56
|
+
ss as useBuilderReset,
|
|
57
|
+
es as useCanvasWidth,
|
|
58
|
+
os as useCanvasZoom,
|
|
59
|
+
as as useCopyBlockIds,
|
|
60
|
+
ts as useCopyToClipboard,
|
|
61
|
+
rs as useCurrentPage,
|
|
62
|
+
is as useCutBlockIds,
|
|
63
|
+
ps as useDarkMode,
|
|
64
|
+
ls as useDuplicateBlocks,
|
|
65
|
+
ms as useGetPageData,
|
|
66
|
+
us as useHiddenBlockIds,
|
|
67
|
+
ds as useHighlightBlockId,
|
|
68
|
+
cs as usePasteBlocks,
|
|
69
|
+
Bs as usePreviewMode,
|
|
70
|
+
ks as useReadOnlyMode,
|
|
71
|
+
ns as useRemoveBlocks,
|
|
72
|
+
Cs as useRemoveClassesFromBlocks,
|
|
73
|
+
Ss as useSavePage,
|
|
74
|
+
Ps as useSelectedBlock,
|
|
75
|
+
gs as useSelectedBlockAllClasses,
|
|
76
|
+
vs as useSelectedBlockCurrentClasses,
|
|
77
|
+
ys as useSelectedBlockIds,
|
|
78
|
+
As as useSelectedBlocksDisplayChild,
|
|
79
|
+
hs as useSelectedBreakpoints,
|
|
80
|
+
Is as useSelectedStylingBlocks,
|
|
81
|
+
Ms as useStylingBreakpoint,
|
|
82
|
+
Rs as useStylingState,
|
|
83
|
+
Os as useTranslation,
|
|
84
|
+
Us as useUILibraryBlocks,
|
|
85
|
+
Ds as useUndoManager,
|
|
86
|
+
bs as useUpdateBlocksProps,
|
|
87
|
+
fs as useUpdateBlocksPropsRealtime
|
|
89
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("lodash-es"),m=require("./STRINGS-gPz7CUOk.cjs"),d=require("./_commonjsHelpers-wDK0ZLPo.cjs"),x=(e,t="")=>{const r=i.get(e,"bodyTextLightColor","#64748b"),n=i.get(e,"bodyTextDarkColor","#94a3b8"),o=i.get(e,"bodyBgLightColor","#FFFFFF"),a=i.get(e,"bodyBgDarkColor","#0f172a");return`${t}font-body ${t}antialiased ${t}text-[${r}] ${t}bg-[${o}] dark:${t}text-[${n}] dark:${t}bg-[${a}]`},u=(e,t="")=>{const n=e.replace(m.STYLES_KEY,"").split(",").map(o=>o.split(" ").map(s=>{if(s==="")return"";if(s.includes(":")){const l=s.split(":");return l[l.length-1]=t+i.last(l),l.join(":")}return`${t}${s}`}).join(" "));return`${m.STYLES_KEY}${n.join(" , ")}`};var c={},g={};(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(g);var f={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=g,r=n(f);function n(a){return a&&a.__esModule?a:{default:a}}const o=(0,t.cloneDeep)(r.default.theme)})(c);let p=c;var b=(p.__esModule?p:{default:p}).default;const h=d.getDefaultExportFromCjs(b);exports.addPrefixToClasses=u;exports.defaultTheme=h;exports.getBrandingClasses=x;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { get as l, last as x } from "lodash-es";
|
|
2
|
-
import { a as m } from "./
|
|
2
|
+
import { a as m } from "./STRINGS--j49GZJP.js";
|
|
3
3
|
import { g as d } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
const z = (e, t = "") => {
|
|
5
5
|
const r = l(e, "bodyTextLightColor", "#64748b"), n = l(e, "bodyTextDarkColor", "#94a3b8"), o = l(e, "bodyBgLightColor", "#FFFFFF"), a = l(e, "bodyBgDarkColor", "#0f172a");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
-
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-
|
|
3
|
-
import { h } from "./index-
|
|
2
|
+
import { A as p, a as l, b as n, d, e as a, g as c, B as u } from "./index-Gk6sASBd.js";
|
|
3
|
+
import { h } from "./index-xZWaF8AW.js";
|
|
4
4
|
import { TrashIcon as x } from "@radix-ui/react-icons";
|
|
5
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
6
6
|
import "react";
|
|
@@ -10,11 +10,13 @@ import "clsx";
|
|
|
10
10
|
import "tailwind-merge";
|
|
11
11
|
import "@chaibuilder/runtime";
|
|
12
12
|
import "jotai";
|
|
13
|
-
import "./
|
|
13
|
+
import "./STRINGS--j49GZJP.js";
|
|
14
14
|
import "@react-hookz/web";
|
|
15
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
16
|
+
import "./Class-lGzsNBOK.js";
|
|
17
|
+
import "react-i18next";
|
|
15
18
|
import "@radix-ui/react-toggle";
|
|
16
19
|
import "class-variance-authority";
|
|
17
|
-
import "./Class-3k8xjeiM.js";
|
|
18
20
|
import "@radix-ui/react-switch";
|
|
19
21
|
import "@radix-ui/react-slot";
|
|
20
22
|
import "@radix-ui/react-accordion";
|
|
@@ -36,20 +38,17 @@ import "@radix-ui/react-context-menu";
|
|
|
36
38
|
import "react-icons-picker";
|
|
37
39
|
import "react-dom";
|
|
38
40
|
import "react-quill";
|
|
39
|
-
import "
|
|
40
|
-
import "./index-UP_4awU9.js";
|
|
41
|
+
import "./index-gS-3liKK.js";
|
|
41
42
|
import "i18next";
|
|
42
43
|
import "@floating-ui/react-dom";
|
|
43
44
|
import "flagged";
|
|
44
|
-
import "react-dnd";
|
|
45
|
-
import "@minoru/react-dnd-treeview";
|
|
46
45
|
import "react-hotkeys-hook";
|
|
47
46
|
import "sonner";
|
|
48
|
-
import "./html-to-json-
|
|
47
|
+
import "./html-to-json-ngX9ef2u.js";
|
|
49
48
|
import "himalaya";
|
|
50
49
|
import "lucide-react";
|
|
51
50
|
import "./index-YpnaudSM.js";
|
|
52
|
-
const
|
|
51
|
+
const ce = ({ pageData: r, projectData: i }) => {
|
|
53
52
|
const m = {}, t = h(), o = r.uuid === i.homepage, s = () => {
|
|
54
53
|
t.mutate(r, {
|
|
55
54
|
onSuccess: () => {
|
|
@@ -80,5 +79,5 @@ const ue = ({ pageData: r, projectData: i }) => {
|
|
|
80
79
|
] });
|
|
81
80
|
};
|
|
82
81
|
export {
|
|
83
|
-
|
|
82
|
+
ce as default
|
|
84
83
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),r=require("./index-h-hd6EvN.cjs"),l=require("./index-oCYKBYyT.cjs"),q=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("react-i18next");require("@radix-ui/react-toggle");require("class-variance-authority");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("./index-dgm-fd8U.cjs");require("i18next");require("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");require("sonner");require("./html-to-json-efmv1pCj.cjs");require("himalaya");require("lucide-react");require("./index-ecnGWzh9.cjs");const d=({pageData:i,projectData:t})=>{const n={},u=l.useDeletePage(),s=i.uuid===t.homepage,o=()=>{u.mutate(i,{onSuccess:()=>{n({uuid:t.homepage,slug:"/home"})}})};return e.jsxRuntimeExports.jsxs(r.AlertDialog,{children:[e.jsxRuntimeExports.jsx(r.AlertDialogTrigger,{disabled:s,children:e.jsxRuntimeExports.jsx("div",{className:`flex h-full items-center justify-center rounded-md border px-2 py-2 font-medium hover:bg-red-400 hover:text-white ${s?"cursor-not-allowed border-red-200 text-red-200":"cursor-pointer border-red-400 text-red-400"}`,children:e.jsxRuntimeExports.jsx(q.TrashIcon,{})})}),e.jsxRuntimeExports.jsxs(r.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(r.AlertDialogTitle,{children:["Are you sure you want to delete ",e.jsxRuntimeExports.jsx("i",{className:"text-red-500",children:i.name})," page?"]}),e.jsxRuntimeExports.jsx(r.AlertDialogDescription,{children:"This action cannot be undone. This will permanently delete your page."}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-end gap-x-3",children:[e.jsxRuntimeExports.jsx(r.AlertDialogCancel,{disabled:u.isPending,children:"Cancel"}),e.jsxRuntimeExports.jsx(r.Button,{variant:"destructive",onClick:o,disabled:u.isPending,children:"Yes, Delete"})]})]})]})};exports.default=d;
|
package/dist/email.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),q=require("./index-dgm-fd8U.cjs"),r=require("@radix-ui/react-icons"),o=require("lodash-es");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("react");require("i18next");require("react-i18next");require("./index-h-hd6EvN.cjs");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("./STRINGS-gPz7CUOk.cjs");require("@react-hookz/web");require("./MODIFIERS-0g14w5RS.cjs");require("./Class-PoYusiA5.cjs");require("@radix-ui/react-toggle");require("class-variance-authority");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("@floating-ui/react-dom");require("flagged");require("react-hotkeys-hook");const n=[{title:"Mobile",content:"Mobile email client",breakpoint:"xs",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{}),width:400},{title:"Email Client",content:"Content as seen inside an email client",breakpoint:"sm",icon:e.jsxRuntimeExports.jsx(r.MobileIcon,{className:"rotate-90"}),width:700}],s=i=>{const u={...i,filterChaiBlock:t=>o.includes(t.type,"Email/"),importHTMLSupport:!1,dataBindingSupport:!1,breakpoints:n};return e.jsxRuntimeExports.jsx(q.ChaiBuilderEditor,{...u})};exports.ChaiBuilderEmail=s;
|
package/dist/email.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ declare type ChaiBlock = {
|
|
|
24
24
|
} & Record<string, any>;
|
|
25
25
|
|
|
26
26
|
declare interface ChaiBuilderEditorProps {
|
|
27
|
+
hideSaveButton?: boolean;
|
|
28
|
+
filterChaiBlock?: (block: any) => boolean;
|
|
27
29
|
showDebugLogs?: boolean;
|
|
28
30
|
autoSaveSupport?: boolean;
|
|
29
31
|
autoSaveInterval?: TimeInSeconds;
|
|
@@ -60,7 +62,7 @@ declare interface ChaiBuilderEditorProps {
|
|
|
60
62
|
onSave?: ({ blocks, providers }: SavePageData) => Promise<boolean | Error>;
|
|
61
63
|
brandingOptions?: Record<string, string>;
|
|
62
64
|
onSaveBrandingOptions?: (brandingOptions: Record<string, any>) => Promise<boolean | Error>;
|
|
63
|
-
|
|
65
|
+
onSaveStateChange?: (syncStatus: "UNSAVED" | "SAVED" | "SAVING") => void;
|
|
64
66
|
previewComponent?: ReactComponentType;
|
|
65
67
|
sideBarComponents?: {
|
|
66
68
|
bottom?: ReactComponentType[];
|
package/dist/email.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { C as
|
|
3
|
-
import { MobileIcon as
|
|
1
|
+
import { j as i } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
|
+
import { C as p } from "./index-gS-3liKK.js";
|
|
3
|
+
import { MobileIcon as t } from "@radix-ui/react-icons";
|
|
4
|
+
import { includes as e } from "lodash-es";
|
|
4
5
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
5
6
|
import "react";
|
|
6
7
|
import "i18next";
|
|
7
8
|
import "react-i18next";
|
|
8
|
-
import "./index-
|
|
9
|
-
import "lodash-es";
|
|
9
|
+
import "./index-Gk6sASBd.js";
|
|
10
10
|
import "./Functions-7jnEwJyw.js";
|
|
11
11
|
import "clsx";
|
|
12
12
|
import "tailwind-merge";
|
|
13
13
|
import "@chaibuilder/runtime";
|
|
14
14
|
import "jotai";
|
|
15
|
-
import "./
|
|
15
|
+
import "./STRINGS--j49GZJP.js";
|
|
16
16
|
import "@react-hookz/web";
|
|
17
|
+
import "./MODIFIERS-dytZ-osO.js";
|
|
18
|
+
import "./Class-lGzsNBOK.js";
|
|
17
19
|
import "@radix-ui/react-toggle";
|
|
18
20
|
import "class-variance-authority";
|
|
19
|
-
import "./Class-3k8xjeiM.js";
|
|
20
21
|
import "@radix-ui/react-switch";
|
|
21
22
|
import "@radix-ui/react-slot";
|
|
22
23
|
import "@radix-ui/react-accordion";
|
|
@@ -40,33 +41,32 @@ import "react-dom";
|
|
|
40
41
|
import "react-quill";
|
|
41
42
|
import "@floating-ui/react-dom";
|
|
42
43
|
import "flagged";
|
|
43
|
-
import "react-dnd";
|
|
44
|
-
import "@minoru/react-dnd-treeview";
|
|
45
44
|
import "react-hotkeys-hook";
|
|
46
|
-
const
|
|
45
|
+
const n = [
|
|
47
46
|
{
|
|
48
47
|
title: "Mobile",
|
|
49
48
|
content: "Mobile email client",
|
|
50
49
|
breakpoint: "xs",
|
|
51
|
-
icon: /* @__PURE__ */
|
|
50
|
+
icon: /* @__PURE__ */ i.jsx(t, {}),
|
|
52
51
|
width: 400
|
|
53
52
|
},
|
|
54
53
|
{
|
|
55
54
|
title: "Email Client",
|
|
56
55
|
content: "Content as seen inside an email client",
|
|
57
56
|
breakpoint: "sm",
|
|
58
|
-
icon: /* @__PURE__ */
|
|
57
|
+
icon: /* @__PURE__ */ i.jsx(t, { className: "rotate-90" }),
|
|
59
58
|
width: 700
|
|
60
59
|
}
|
|
61
|
-
],
|
|
60
|
+
], _ = (o) => {
|
|
62
61
|
const r = {
|
|
63
62
|
...o,
|
|
63
|
+
filterChaiBlock: (m) => e(m.type, "Email/"),
|
|
64
64
|
importHTMLSupport: !1,
|
|
65
65
|
dataBindingSupport: !1,
|
|
66
|
-
breakpoints:
|
|
66
|
+
breakpoints: n
|
|
67
67
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ i.jsx(p, { ...r });
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
_ as ChaiBuilderEmail
|
|
72
72
|
};
|
|
@@ -2,7 +2,7 @@ import { j as u } from "./jsx-runtime-WbnYoNE9.js";
|
|
|
2
2
|
import b from "@rjsf/core";
|
|
3
3
|
import x from "@rjsf/validator-ajv8";
|
|
4
4
|
import { includes as h, get as a, set as $, first as F } from "lodash-es";
|
|
5
|
-
import { b5 as P, b6 as E, b7 as O, b8 as S } from "./index-
|
|
5
|
+
import { b5 as P, b6 as E, b7 as O, b8 as S } from "./index-Gk6sASBd.js";
|
|
6
6
|
const d = (i, l = "") => {
|
|
7
7
|
switch (i.type) {
|
|
8
8
|
case "singular":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./index-
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-Z_BpKhVy.cjs"),y=require("@rjsf/core"),E=require("@rjsf/validator-ajv8"),i=require("lodash-es"),d=require("./index-h-hd6EvN.cjs"),h=(c,n="")=>{switch(c.type){case"singular":return c.uiSchema;case"model":const{properties:p}=c,u={};return Object.keys(p).forEach(r=>{const e=p[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;u[o]=h(e,n)}),u;case"list":const{itemProperties:m}=c,l={items:{}};return Object.keys(m).forEach(r=>{const e=m[r];if(i.includes(["slot","styles"],e.type))return;const o=i.get(e,"i18n",!1)?`${r}-${n}`:r;l.items[o]=h(e,n)}),l;default:return{}}},x=(c,n="")=>{switch(c.type){case"singular":return c.schema;case"model":const{properties:p,title:u}=c,m={title:u,type:"object",properties:{}};return Object.keys(p).forEach(o=>{const t=p[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;m.properties[s]=x(t,n)}),m;case"list":const{itemProperties:l,title:r}=c,e={title:r,type:"array",items:{type:"object",properties:{}}};return Object.keys(l).forEach(o=>{const t=l[o];if(i.includes(["slot","styles"],t.type))return;const s=i.get(t,"i18n",!1)?`${o}-${n}`:o;e.items.properties[s]=x(t,n),i.set(e.items,"title",i.get(t,"itemTitle",`${r} item`))}),e;default:return{}}},$=({title:c,properties:n={},formData:p,onChange:u,disabled:m=!1,activeLang:l=""})=>{const r={type:"object",properties:{}},e={};Object.keys(n).forEach(t=>{const s=n[t];if(i.includes(["slot","styles"],s.type))return;const a=i.get(s,"i18n",!1)?`${t}-${l}`:t;r.properties[a]=x(s,l),e[a]=h(s,l)});const o=({...t},s)=>{const a=s==null?void 0:s.replace("root.","").split("/").pop();if(!s||!a)return;const j=i.first(a.split("."));s&&j&&u({...t},j)};return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[c&&f.jsxRuntimeExports.jsx("h1",{className:"px-1 text-sm font-semibold underline",children:c}),f.jsxRuntimeExports.jsx("div",{className:"-mx-3",children:f.jsxRuntimeExports.jsx(y,{widgets:{richtext:d.RichTextEditorField,icon:d.IconPickerField,image:d.ImagePickerField},fields:{link:d.LinkField},idSeparator:".",autoComplete:"off",omitExtraData:!0,liveOmit:!0,liveValidate:!0,uiSchema:e,schema:r,formData:p,validator:E,onChange:o,disabled:m})})]})};exports.Form=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("himalaya"),p=require("./Functions-N3yhPYKY.cjs"),e=require("lodash-es"),o=require("./STRINGS-gPz7CUOk.cjs"),T=t=>{const s=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,r=/(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;return s.test(t)||r.test(t)},v=t=>{if(e.isEmpty(t))return t;const s=/<video[^>]+src=['"]([^'">]+)['"]/,r=/<iframe[^>]+src=['"]([^'">]+)['"]/,a=t.match(s),l=t.match(r),i=a?a[1]:l?l[1]:null,c=/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,n=/(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;return i&&(c.test(i)||n.test(i))?i:t},w={img:{alt:"alt",width:"width",height:"height",src:"image"},video:{src:"url",autoplay:"controls.autoPlay",muted:"controls.muted",loop:"controls.loop",controls:"controls.widgets"},a:{href:"link.href",target:"link.target",type:""},input:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},textarea:{placeholder:"placeholder",required:"required",type:"inputType",name:"fieldName"},select:{placeholder:"placeholder",required:"required",multiple:"multiple",name:"fieldName"}},x=(t,s)=>t.children.length===1&&e.includes(["Heading","Paragraph","Span","ListItem","Button","Label","TableCell","Link"],s._type),m=t=>t.map(s=>s.type==="text"?e.get(s,"content",""):e.isEmpty(s.children)?"":m(s.children)).join(""),g=t=>t===null?!0:t,y=t=>{if(t.tagName==="svg")return{};const s={},r=w[t.tagName]||{},a=t.attributes;return e.forEach(a,({key:l,value:i})=>{if(r[l]){if(t.tagName==="img"&&l==="src"&&!i.startsWith("http")){const c=e.find(t.attributes,{key:"width"}),n=e.find(t.attributes,{key:"height"});c&&n?i=`https://via.placeholder.com/${c==null?void 0:c.value}x${n==null?void 0:n.value}`:i="https://via.placeholder.com/150x150"}e.set(s,r[l],g(i))}else e.includes(["style","class","srcset"],l)||e.set(s,`styles_attrs.${l}`,g(i))}),delete s.class,s},S=(t,s="styles")=>{if(!t.attributes)return{[s]:`${o.STYLES_KEY},`};const r=e.find(t.attributes,{key:"class"});if(r){const a=r.value;return{[s]:`${o.STYLES_KEY},${a}`}}return{[s]:`${o.STYLES_KEY},`}},L=t=>{switch(t.tagName){case"img":return{_type:"Image"};case"input":return{_type:"Input",showLabel:!1};case"hr":return{_type:"Divider"};case"br":return{_type:"LineBreak"};case"textarea":return{_type:"TextArea",showLabel:!1};case"audio":return{_type:"Audio"};case"canvas":return{_type:"Canvas"};case"video":case"iframe":return{_type:"CustomHTML"};case"svg":return{_type:"Icon"};case"select":return{_type:"Select",options:[]};case"option":return{_type:"Option"};case"ul":case"ol":case"dl":return{_type:"List",tag:t.tagName,_listType:t.tagName==="ol"?"list-decimal":"list-none"};case"li":case"dt":return{_type:"ListItem",tag:t.tagName};case"span":case"figcaption":case"legend":return{_type:"Span",tag:t.tagName};case"p":return{_type:"Paragraph",content:""};case"a":return{_type:"Link"};case"form":return{_type:"Form"};case"label":return{_type:"Label"};case"button":return{_type:"Button"};case"code":return{_type:"Code"};case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return{_type:"Heading",tag:t.tagName};case"table":return{_type:"Table"};case"tr":return{_type:"TableRow"};case"td":case"th":return{_type:"TableCell",tag:t.tagName};case"thead":return{_type:"TableHead"};case"tbody":return{_type:"TableBody"};case"tfoot":return{_type:"TableFooter"};default:return{_type:"Box",tag:t.tagName,_name:t.tagName==="div"?"Box":e.capitalize(t.tagName)}}},h=(t,s=null)=>e.flatMapDeep(t,r=>{var i;if(r.type==="comment")return[];let a={_id:p.generateUUID()};if(s&&(a._parent=s.block._id),r.type==="text")return e.isEmpty(e.get(r,"content",""))?[]:s&&x(s.node,s.block)?(e.set(s,"block.content",e.get(r,"content","")),[]):{...a,_type:"Text",content:e.get(r,"content","")};if(a={...a,...L(r),...y(r),...S(r)},a._type==="Input"){const c=a.inputType||"text";c==="checkbox"?e.set(a,"_type","Checkbox"):c==="radio"&&e.set(a,"_type","Radio")}else if(r.tagName==="video"||r.tagName==="iframe"){const c=u.stringify([r]);return T(c)&&(e.set(a,"_type","Video"),e.set(a,"url",v(c)),e.set(a,"styles",`${o.STYLES_KEY},absolute top-0 left-0 w-full h-full`),e.set(a,"controls",{autoPlay:!1,muted:!0,loop:!1,controls:!1})),a.content=c,[a]}else if(r.tagName==="svg"){const c=e.find(r.attributes,{key:"height"}),n=e.find(r.attributes,{key:"width"}),f=e.get(c,"value")?`[${e.get(c,"value")}px]`:"24px",d=e.get(n,"value")?`[${e.get(n,"value")}px]`:"24px",b=e.get(e.find(r.attributes,{key:"class"}),"value","w-full h-full");return a.styles=`${o.STYLES_KEY}, ${p.cn(`w-${d} h-${f}`,b)}`.trim(),r.attributes=e.filter(r.attributes,_=>!e.includes(["style","width","height","class"],_.key)),a.icon=u.stringify([r]),[a]}else if(r.tagName=="option"&&s&&((i=s.block)==null?void 0:i._type)==="Select")return s.block.options.push({label:m(r.children),...y(r)}),[];const l=h(r.children,{block:a,node:r});return[a,...l]}),N=t=>{const s=t.match(/<body[^>]*>[\s\S]*?<\/body>/);return(s&&s.length>0?s[0].replace(/<body/,"<div").replace(/<\/body>/,"</div>"):t).replace(/\s+/g," ").replaceAll("> <","><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()},k=t=>{const s=u.parse(N(t));return e.isEmpty(t)?[]:e.flatten(h(s))};exports.getBlocksFromHTML=k;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { stringify as m, parse as
|
|
1
|
+
import { stringify as m, parse as w } from "himalaya";
|
|
2
2
|
import { g as N, c as k } from "./Functions-7jnEwJyw.js";
|
|
3
|
-
import { isEmpty as
|
|
4
|
-
import { a as p } from "./
|
|
5
|
-
const
|
|
3
|
+
import { isEmpty as g, includes as y, get as n, forEach as L, find as u, set as o, capitalize as S, flatMapDeep as $, filter as C, flatten as A } from "lodash-es";
|
|
4
|
+
import { a as p } from "./STRINGS--j49GZJP.js";
|
|
5
|
+
const R = (t) => {
|
|
6
6
|
const e = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, a = /(?:https?:\/\/)?(?:www\.)?(player)?.vimeo\.com/;
|
|
7
7
|
return e.test(t) || a.test(t);
|
|
8
|
-
},
|
|
9
|
-
if (
|
|
8
|
+
}, B = (t) => {
|
|
9
|
+
if (g(t))
|
|
10
10
|
return t;
|
|
11
|
-
const e = /<video[^>]+src=['"]([^'">]+)['"]/, a = /<iframe[^>]+src=['"]([^'">]+)['"]/, r = t.match(e), i = t.match(a), c = r ? r[1] : i ? i[1] : null, s = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/,
|
|
12
|
-
return c && (s.test(c) ||
|
|
13
|
-
},
|
|
11
|
+
const e = /<video[^>]+src=['"]([^'">]+)['"]/, a = /<iframe[^>]+src=['"]([^'">]+)['"]/, r = t.match(e), i = t.match(a), c = r ? r[1] : i ? i[1] : null, s = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/, l = /(?:https?:\/\/)?(?:www\.)?player.vimeo\.com/;
|
|
12
|
+
return c && (s.test(c) || l.test(c)) ? c : t;
|
|
13
|
+
}, H = {
|
|
14
14
|
img: { alt: "alt", width: "width", height: "height", src: "image" },
|
|
15
15
|
video: {
|
|
16
16
|
src: "url",
|
|
@@ -43,19 +43,21 @@ const B = (t) => {
|
|
|
43
43
|
multiple: "multiple",
|
|
44
44
|
name: "fieldName"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
47
|
-
|
|
46
|
+
}, M = (t, e) => t.children.length === 1 && y(["Heading", "Paragraph", "Span", "ListItem", "Button", "Label", "TableCell", "Link"], e._type), b = (t) => t.map((e) => e.type === "text" ? n(e, "content", "") : g(e.children) ? "" : b(e.children)).join(""), h = (t) => t === null ? !0 : t, f = (t) => {
|
|
47
|
+
if (t.tagName === "svg")
|
|
48
|
+
return {};
|
|
49
|
+
const e = {}, a = H[t.tagName] || {}, r = t.attributes;
|
|
48
50
|
return L(r, ({ key: i, value: c }) => {
|
|
49
51
|
if (a[i]) {
|
|
50
52
|
if (t.tagName === "img" && i === "src" && !c.startsWith("http")) {
|
|
51
|
-
const s = u(t.attributes, { key: "width" }),
|
|
52
|
-
s &&
|
|
53
|
+
const s = u(t.attributes, { key: "width" }), l = u(t.attributes, { key: "height" });
|
|
54
|
+
s && l ? c = `https://via.placeholder.com/${s == null ? void 0 : s.value}x${l == null ? void 0 : l.value}` : c = "https://via.placeholder.com/150x150";
|
|
53
55
|
}
|
|
54
|
-
|
|
56
|
+
o(e, a[i], h(c));
|
|
55
57
|
} else
|
|
56
|
-
|
|
58
|
+
y(["style", "class", "srcset"], i) || o(e, `styles_attrs.${i}`, h(c));
|
|
57
59
|
}), delete e.class, e;
|
|
58
|
-
},
|
|
60
|
+
}, I = (t, e = "styles") => {
|
|
59
61
|
if (!t.attributes)
|
|
60
62
|
return { [e]: `${p},` };
|
|
61
63
|
const a = u(t.attributes, { key: "class" });
|
|
@@ -64,7 +66,7 @@ const B = (t) => {
|
|
|
64
66
|
return { [e]: `${p},${r}` };
|
|
65
67
|
}
|
|
66
68
|
return { [e]: `${p},` };
|
|
67
|
-
},
|
|
69
|
+
}, q = (t) => {
|
|
68
70
|
switch (t.tagName) {
|
|
69
71
|
case "img":
|
|
70
72
|
return { _type: "Image" };
|
|
@@ -149,21 +151,21 @@ const B = (t) => {
|
|
|
149
151
|
return [];
|
|
150
152
|
let r = { _id: N() };
|
|
151
153
|
if (e && (r._parent = e.block._id), a.type === "text")
|
|
152
|
-
return
|
|
154
|
+
return g(n(a, "content", "")) ? [] : e && M(e.node, e.block) ? (o(e, "block.content", n(a, "content", "")), []) : { ...r, _type: "Text", content: n(a, "content", "") };
|
|
153
155
|
if (r = {
|
|
154
156
|
...r,
|
|
155
|
-
...
|
|
157
|
+
...q(a),
|
|
156
158
|
...f(a),
|
|
157
|
-
...
|
|
159
|
+
...I(a)
|
|
158
160
|
}, r._type === "Input") {
|
|
159
161
|
const s = r.inputType || "text";
|
|
160
|
-
s === "checkbox" ?
|
|
162
|
+
s === "checkbox" ? o(r, "_type", "Checkbox") : s === "radio" && o(r, "_type", "Radio");
|
|
161
163
|
} else if (a.tagName === "video" || a.tagName === "iframe") {
|
|
162
164
|
const s = m([a]);
|
|
163
|
-
return
|
|
165
|
+
return R(s) && (o(r, "_type", "Video"), o(r, "url", B(s)), o(r, "styles", `${p},absolute top-0 left-0 w-full h-full`), o(r, "controls", { autoPlay: !1, muted: !0, loop: !1, controls: !1 })), r.content = s, [r];
|
|
164
166
|
} else if (a.tagName === "svg") {
|
|
165
|
-
const s = u(a.attributes, { key: "height" }),
|
|
166
|
-
return r.styles = `${p}, ${k(`w-${v} h-${_}`, T)}`.trim(), a.attributes = C(a.attributes, (
|
|
167
|
+
const s = u(a.attributes, { key: "height" }), l = u(a.attributes, { key: "width" }), _ = n(s, "value") ? `[${n(s, "value")}px]` : "24px", v = n(l, "value") ? `[${n(l, "value")}px]` : "24px", T = n(u(a.attributes, { key: "class" }), "value", "w-full h-full");
|
|
168
|
+
return r.styles = `${p}, ${k(`w-${v} h-${_}`, T)}`.trim(), a.attributes = C(a.attributes, (x) => !y(["style", "width", "height", "class"], x.key)), r.icon = m([a]), [r];
|
|
167
169
|
} else if (a.tagName == "option" && e && ((c = e.block) == null ? void 0 : c._type) === "Select")
|
|
168
170
|
return e.block.options.push({
|
|
169
171
|
label: b(a.children),
|
|
@@ -171,13 +173,13 @@ const B = (t) => {
|
|
|
171
173
|
}), [];
|
|
172
174
|
const i = d(a.children, { block: r, node: a });
|
|
173
175
|
return [r, ...i];
|
|
174
|
-
}),
|
|
176
|
+
}), E = (t) => {
|
|
175
177
|
const e = t.match(/<body[^>]*>[\s\S]*?<\/body>/);
|
|
176
178
|
return (e && e.length > 0 ? e[0].replace(/<body/, "<div").replace(/<\/body>/, "</div>") : t).replace(/\s+/g, " ").replaceAll("> <", "><").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").trim();
|
|
177
|
-
},
|
|
178
|
-
const e =
|
|
179
|
-
return
|
|
179
|
+
}, V = (t) => {
|
|
180
|
+
const e = w(E(t));
|
|
181
|
+
return g(t) ? [] : A(d(e));
|
|
180
182
|
};
|
|
181
183
|
export {
|
|
182
|
-
|
|
184
|
+
V as g
|
|
183
185
|
};
|