@chaibuilder/sdk 1.2.7 → 1.2.8
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-pjLrzkvz.js → AddBlocks-tMxKPoen.js} +7 -6
- package/dist/AddBlocks-x2LkOHSj.cjs +1 -0
- package/dist/BrandingOptions-EzT9UYd6.cjs +1 -0
- package/dist/{BrandingOptions-PXCI0z-H.js → BrandingOptions-QJJ1y5ez.js} +7 -6
- package/dist/{CanvasArea-Fhg-6_nZ.js → CanvasArea-EfZgx-gN.js} +11 -9
- package/dist/{CanvasArea-C2ak1ui1.cjs → CanvasArea-rIDwPHl5.cjs} +1 -1
- package/dist/CurrentPage-QNFPD078.cjs +1 -0
- package/dist/{CurrentPage-Zz9LEdez.js → CurrentPage-ulHTz4MD.js} +14 -12
- package/dist/Functions-7jnEwJyw.js +15 -0
- package/dist/Functions-N3yhPYKY.cjs +1 -0
- package/dist/{Layers-cgmxKAP9.js → Layers-rehZkz78.js} +12 -10
- package/dist/Layers-v-7k3W2I.cjs +1 -0
- package/dist/{MarkAsGlobalBlock-htrpRVJM.js → MarkAsGlobalBlock-BjP-Rqlf.js} +6 -5
- package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +1 -0
- package/dist/{PagesPanel-TYBKN2Am.js → PagesPanel-acGVGJf-.js} +9 -7
- package/dist/PagesPanel-x5ms_LOD.cjs +1 -0
- package/dist/ProjectPanel-5BHQ5ANP.cjs +1 -0
- package/dist/{ProjectPanel-PJ1iPaLY.js → ProjectPanel-aLFJq49M.js} +16 -14
- package/dist/Settings-iOjfw5NQ.cjs +1 -0
- package/dist/{Settings-Na0NVS-E.js → Settings-v-txwlII.js} +10 -9
- package/dist/{SidePanels-bHll6xCt.js → SidePanels-Vdc-J5wK.js} +12 -10
- package/dist/SidePanels-t0g9ZQFT.cjs +1 -0
- package/dist/Topbar-V8xCetWF.cjs +1 -0
- package/dist/{Topbar-JKdXHH8P.js → Topbar-j4t4AgCq.js} +6 -5
- package/dist/{UnsplashImages-jiOES16m.js → UnsplashImages-41Y3q5_Q.js} +6 -5
- package/dist/UnsplashImages-DbHky6cj.cjs +1 -0
- package/dist/UploadImages-DnQ95_NW.cjs +1 -0
- package/dist/{UploadImages-imersU7l.js → UploadImages-xBg-kbKv.js} +15 -14
- package/dist/add-page-modal-0YAI9dXr.cjs +1 -0
- package/dist/{add-page-modal-EQWWxbry.js → add-page-modal-6DlGzdA4.js} +10 -9
- package/dist/confirm-alert-U7-NcG7G.cjs +1 -0
- package/dist/{confirm-alert-HOs52FKE.js → confirm-alert-i4pM3mOt.js} +6 -5
- package/dist/{controls-hpe3HxsR.cjs → controls-Dy1qa8Dc.cjs} +1 -1
- package/dist/{controls-QGClapUl.js → controls-XPXGHKht.js} +45 -9
- package/dist/core.cjs +1 -1
- package/dist/core.js +57 -55
- package/dist/{delete-page-modal-DU388lPm.js → delete-page-modal-T_rlQfNd.js} +22 -20
- package/dist/delete-page-modal-qXpi_2xR.cjs +1 -0
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.js +1 -1
- package/dist/{form-7E1GY3U7.js → form-OVmsLOrc.js} +1 -1
- package/dist/{form-lF5eSfMe.cjs → form-VbouZlAW.cjs} +1 -1
- package/dist/html-to-json-2PeOCVey.cjs +1 -0
- package/dist/{html-to-json-lNLC8Y7D.js → html-to-json-57841sEK.js} +1 -1
- package/dist/{index-7vwIQQ-T.js → index-EGUphg4R.js} +5 -5
- package/dist/index-H6vIwGfD.cjs +1 -0
- package/dist/{index-Hf23Fq9m.cjs → index-jw8RxsTv.cjs} +2 -2
- package/dist/{index-WKIG_VPl.js → index-niHREMmR.js} +173 -172
- package/dist/lib.cjs +2 -2
- package/dist/lib.js +7 -6
- package/dist/{page-viewer-fohh_Dwv.js → page-viewer-EoYYnA56.js} +10 -8
- package/dist/page-viewer-Ou8vDXGV.cjs +1 -0
- package/dist/project-general-setting-92q4oEYv.cjs +1 -0
- package/dist/{project-general-setting-Ryf5OhPd.js → project-general-setting-DC_nADG-.js} +10 -9
- package/dist/project-seo-setting-Snn2nZgS.cjs +1 -0
- package/dist/{project-seo-setting-KKOCl416.js → project-seo-setting-wxAGEkd_.js} +11 -10
- package/dist/single-page-detail-QmmhR_h2.cjs +1 -0
- package/dist/{single-page-detail-mJBo7VRe.js → single-page-detail-xtNZ9YxX.js} +11 -10
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +8 -6
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +141 -140
- package/dist/{useAddBlockByDrop-CmSt8dRr.js → useAddBlockByDrop-_nwI4W3q.js} +1 -1
- package/dist/{useAddBlockByDrop-pVcDjcgp.cjs → useAddBlockByDrop-inkD7Lck.cjs} +1 -1
- package/dist/{utils-Jw11nj1S.js → utils-AvyFzbPC.js} +26 -35
- package/dist/utils-PTxFk6qT.cjs +1 -0
- package/dist/web-blocks.cjs +9 -1
- package/dist/web-blocks.js +1048 -3
- package/package.json +1 -1
- package/dist/AddBlocks-MKhgtI8x.cjs +0 -1
- package/dist/BrandingOptions-tZaUILYP.cjs +0 -1
- package/dist/CurrentPage-4O-iqW3w.cjs +0 -1
- package/dist/Layers-uo4KpGCs.cjs +0 -1
- package/dist/MarkAsGlobalBlock-1kOwPbPm.cjs +0 -1
- package/dist/PagesPanel-z5qHpU24.cjs +0 -1
- package/dist/ProjectPanel-mEVh8sLb.cjs +0 -1
- package/dist/Settings-YNxmjfAl.cjs +0 -1
- package/dist/SidePanels-jsHvSEtM.cjs +0 -1
- package/dist/Topbar-jWRuTvxv.cjs +0 -1
- package/dist/UnsplashImages-dBdqJNux.cjs +0 -1
- package/dist/UploadImages-OD3RPS7j.cjs +0 -1
- package/dist/add-page-modal-nFQ8TUBM.cjs +0 -1
- package/dist/confirm-alert-j6hcFSlG.cjs +0 -1
- package/dist/delete-page-modal-bkSWhTxz.cjs +0 -1
- package/dist/html-to-json-JS8zQjYB.cjs +0 -1
- package/dist/index-98CxilGX.cjs +0 -1
- package/dist/page-viewer-6a4GFMUg.cjs +0 -1
- package/dist/project-general-setting-j4lKlLUE.cjs +0 -1
- package/dist/project-seo-setting-CATo4bEL.cjs +0 -1
- package/dist/single-page-detail-zms-5Fa_.cjs +0 -1
- package/dist/utils-j7Kg63NR.cjs +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { bg as
|
|
1
|
+
import { bg as j, bj as z, bh as N, bi as O, bu as Q, bE as $, E as U, aq as W, L as X, G as Y, J as Z, K as _, H as aa, I as ea, F as oa, bv as ta, bF as ra, B as sa, bo as na, br as ia, bq as ba, bt as pa, bp as ua, bH as ma, b2 as la, ci as ca, b5 as da, b6 as ga, b3 as Ca, b7 as Ma, b4 as Sa, ck as Da, cj as Ta, bz as xa, cl as Aa, by as Ia, cq as ha, bx as wa, cn as Pa, cr as Fa, cv as Ga, cm as La, co as va, cp as Ha, cs as ka, ct as Ra, cu as Ba, bA as Ea, al as Va, am as fa, ap as qa, b8 as ya, an as Ja, ao as Ka, b9 as ja, aN as za, aS as Na, aP as Oa, c9 as Qa, c6 as $a, aQ as Ua, ca as Wa, ce as Xa, c7 as Ya, aR as Za, c8 as _a, cb as ae, cc as ee, cd as oe, aO as te, aK as re, aM as se, aL as ne, bd as ie, be, bk as pe, aI as ue, bf as me, bJ as le, bQ as ce, bM as de, bW as ge, bN as Ce, bP as Me, bK as Se, bT as De, bR as Te, bS as xe, bO as Ae, bY as Ie, bX as he, bU as we, bV as Pe, bL as Fe, a$ as Ge, b1 as Le, b0 as ve, bc as He, bn as ke, bI as Re, ar as Be, au as Ee, aB as Ve, av as fe, aC as qe, bZ as ye, as as Je, at as Ke, aH as je, b_ as ze, c0 as Ne, c1 as Oe, c5 as Qe, c3 as $e, c2 as Ue, c4 as We, b$ as Xe, S as Ye, aJ as Ze, ax as _e, aA as ao, ay as eo, az as oo, bs as to, D as ro, aF as so, aD as no, aG as io, bl as bo, T as po, aE as uo, bG as mo, bD as lo, cf as co, ch as go, bC as Co, cg as Mo } from "./index-niHREMmR.js";
|
|
2
2
|
import "./jsx-runtime-WbnYoNE9.js";
|
|
3
3
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@radix-ui/react-toggle";
|
|
6
6
|
import "class-variance-authority";
|
|
7
|
-
import "./utils-
|
|
7
|
+
import "./utils-AvyFzbPC.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
+
import "./MODIFIERS-RiXS5Mn1.js";
|
|
9
10
|
import "clsx";
|
|
10
11
|
import "tailwind-merge";
|
|
11
|
-
import "./MODIFIERS-RiXS5Mn1.js";
|
|
12
12
|
import "@radix-ui/react-switch";
|
|
13
13
|
import "@radix-ui/react-slot";
|
|
14
14
|
import "@radix-ui/react-accordion";
|
|
@@ -33,147 +33,148 @@ import "react-dom";
|
|
|
33
33
|
import "react-quill";
|
|
34
34
|
import "jotai";
|
|
35
35
|
import "flat-to-nested";
|
|
36
|
+
import "./Functions-7jnEwJyw.js";
|
|
36
37
|
import "redux-undo";
|
|
37
38
|
import "@chaibuilder/runtime";
|
|
38
39
|
import "lodash";
|
|
39
40
|
import "@react-hookz/web";
|
|
40
41
|
import "react-i18next";
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
43
|
+
j as Accordion,
|
|
44
|
+
z as AccordionContent,
|
|
45
|
+
N as AccordionItem,
|
|
46
|
+
O as AccordionTrigger,
|
|
47
|
+
Q as Alert,
|
|
48
|
+
$ as AlertDescription,
|
|
49
|
+
U as AlertDialog,
|
|
50
|
+
W as AlertDialogAction,
|
|
51
|
+
X as AlertDialogCancel,
|
|
52
|
+
Y as AlertDialogContent,
|
|
53
|
+
Z as AlertDialogDescription,
|
|
54
|
+
_ as AlertDialogFooter,
|
|
55
|
+
aa as AlertDialogHeader,
|
|
56
|
+
ea as AlertDialogTitle,
|
|
57
|
+
oa as AlertDialogTrigger,
|
|
58
|
+
ta as AlertTitle,
|
|
59
|
+
ra as Badge,
|
|
60
|
+
sa as Button,
|
|
61
|
+
na as Card,
|
|
62
|
+
ia as CardContent,
|
|
63
|
+
ba as CardDescription,
|
|
64
|
+
pa as CardFooter,
|
|
65
|
+
ua as CardHeader,
|
|
66
|
+
ma as CardTitle,
|
|
67
|
+
la as Command,
|
|
68
|
+
ca as CommandDialog,
|
|
69
|
+
da as CommandEmpty,
|
|
70
|
+
ga as CommandGroup,
|
|
71
|
+
Ca as CommandInput,
|
|
72
|
+
Ma as CommandItem,
|
|
73
|
+
Sa as CommandList,
|
|
74
|
+
Da as CommandSeparator,
|
|
75
|
+
Ta as CommandShortcut,
|
|
76
|
+
xa as ContextMenu,
|
|
77
|
+
Aa as ContextMenuCheckboxItem,
|
|
78
|
+
Ia as ContextMenuContent,
|
|
79
|
+
ha as ContextMenuGroup,
|
|
80
|
+
wa as ContextMenuItem,
|
|
81
|
+
Pa as ContextMenuLabel,
|
|
82
|
+
Fa as ContextMenuPortal,
|
|
83
|
+
Ga as ContextMenuRadioGroup,
|
|
84
|
+
La as ContextMenuRadioItem,
|
|
85
|
+
va as ContextMenuSeparator,
|
|
86
|
+
Ha as ContextMenuShortcut,
|
|
87
|
+
ka as ContextMenuSub,
|
|
88
|
+
Ra as ContextMenuSubContent,
|
|
89
|
+
Ba as ContextMenuSubTrigger,
|
|
90
|
+
Ea as ContextMenuTrigger,
|
|
91
|
+
Va as Dialog,
|
|
92
|
+
fa as DialogContent,
|
|
93
|
+
qa as DialogDescription,
|
|
94
|
+
ya as DialogFooter,
|
|
95
|
+
Ja as DialogHeader,
|
|
96
|
+
Ka as DialogTitle,
|
|
97
|
+
ja as DialogTrigger,
|
|
98
|
+
za as DropdownMenu,
|
|
99
|
+
Na as DropdownMenuCheckboxItem,
|
|
100
|
+
Oa as DropdownMenuContent,
|
|
101
|
+
Qa as DropdownMenuGroup,
|
|
102
|
+
$a as DropdownMenuItem,
|
|
103
|
+
Ua as DropdownMenuLabel,
|
|
104
|
+
Wa as DropdownMenuPortal,
|
|
105
|
+
Xa as DropdownMenuRadioGroup,
|
|
106
|
+
Ya as DropdownMenuRadioItem,
|
|
107
|
+
Za as DropdownMenuSeparator,
|
|
108
|
+
_a as DropdownMenuShortcut,
|
|
109
|
+
ae as DropdownMenuSub,
|
|
110
|
+
ee as DropdownMenuSubContent,
|
|
111
|
+
oe as DropdownMenuSubTrigger,
|
|
112
|
+
te as DropdownMenuTrigger,
|
|
113
|
+
re as HoverCard,
|
|
114
|
+
se as HoverCardContent,
|
|
115
|
+
ne as HoverCardTrigger,
|
|
116
|
+
ie as IconPickerField,
|
|
117
|
+
be as ImagePickerField,
|
|
118
|
+
pe as Input,
|
|
119
|
+
ue as Label,
|
|
120
|
+
me as LinkField,
|
|
121
|
+
le as Menubar,
|
|
122
|
+
ce as MenubarCheckboxItem,
|
|
123
|
+
de as MenubarContent,
|
|
124
|
+
ge as MenubarGroup,
|
|
125
|
+
Ce as MenubarItem,
|
|
126
|
+
Me as MenubarLabel,
|
|
127
|
+
Se as MenubarMenu,
|
|
128
|
+
De as MenubarPortal,
|
|
129
|
+
Te as MenubarRadioGroup,
|
|
130
|
+
xe as MenubarRadioItem,
|
|
131
|
+
Ae as MenubarSeparator,
|
|
132
|
+
Ie as MenubarShortcut,
|
|
133
|
+
he as MenubarSub,
|
|
134
|
+
we as MenubarSubContent,
|
|
135
|
+
Pe as MenubarSubTrigger,
|
|
136
|
+
Fe as MenubarTrigger,
|
|
137
|
+
Ge as Popover,
|
|
138
|
+
Le as PopoverContent,
|
|
139
|
+
ve as PopoverTrigger,
|
|
140
|
+
He as RTEField,
|
|
141
|
+
ke as ScrollArea,
|
|
142
|
+
Re as ScrollBar,
|
|
143
|
+
Be as Select,
|
|
144
|
+
Ee as SelectContent,
|
|
145
|
+
Ve as SelectGroup,
|
|
146
|
+
fe as SelectItem,
|
|
147
|
+
qe as SelectLabel,
|
|
148
|
+
ye as SelectSeparator,
|
|
149
|
+
Je as SelectTrigger,
|
|
150
|
+
Ke as SelectValue,
|
|
151
|
+
je as Separator,
|
|
152
|
+
ze as Sheet,
|
|
153
|
+
Ne as SheetClose,
|
|
154
|
+
Oe as SheetContent,
|
|
155
|
+
Qe as SheetDescription,
|
|
156
|
+
$e as SheetFooter,
|
|
157
|
+
Ue as SheetHeader,
|
|
158
|
+
We as SheetTitle,
|
|
159
|
+
Xe as SheetTrigger,
|
|
160
|
+
Ye as Skeleton,
|
|
161
|
+
Ze as Switch,
|
|
162
|
+
_e as Tabs,
|
|
163
|
+
ao as TabsContent,
|
|
164
|
+
eo as TabsList,
|
|
165
|
+
oo as TabsTrigger,
|
|
166
|
+
to as Textarea,
|
|
167
|
+
ro as Toaster,
|
|
168
|
+
so as Toggle,
|
|
169
|
+
no as Tooltip,
|
|
170
|
+
io as TooltipContent,
|
|
171
|
+
bo as TooltipPortal,
|
|
172
|
+
po as TooltipProvider,
|
|
173
|
+
uo as TooltipTrigger,
|
|
174
|
+
mo as badgeVariants,
|
|
175
|
+
lo as buttonVariants,
|
|
176
|
+
co as reducer,
|
|
177
|
+
go as toast,
|
|
178
|
+
Co as toggleVariants,
|
|
179
|
+
Mo as useToast
|
|
179
180
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as n } from "react";
|
|
2
2
|
import { has as s } from "lodash-es";
|
|
3
|
-
import { P as a, i as u } from "./index-
|
|
3
|
+
import { P as a, i as u } from "./index-niHREMmR.js";
|
|
4
4
|
const B = () => {
|
|
5
5
|
const { addCoreBlock: r } = a(), l = u("getExternalPredefinedBlock");
|
|
6
6
|
return n(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react"),u=require("lodash-es"),t=require("./index-
|
|
1
|
+
"use strict";const n=require("react"),u=require("lodash-es"),t=require("./index-H6vIwGfD.cjs"),a=()=>{const{addCoreBlock:r}=t.useAddBlock(),l=t.useBuilderProp("getExternalPredefinedBlock");return n.useCallback(async s=>{const{block:o,dropTargetId:e,relativeIndex:c}=s;if(u.has(o,"format")){const d=await l(o);return r({blocks:d},e===0?null:e,c)}return r(o,e===0?null:e,c)},[r])};exports.useAddBlockByDrop=a;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
let a = "";
|
|
7
|
-
for (let l = e; l > 0; --l)
|
|
8
|
-
a += t[Math.floor(Math.random() * t.length)];
|
|
9
|
-
return a;
|
|
10
|
-
}
|
|
11
|
-
const D = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >= 768 ? "MD" : e >= 640 ? "SM" : "XS", I = (...e) => m(f(e)), d = [
|
|
1
|
+
import { range as o, map as r, values as b, flattenDeep as l, flatten as f, isEmpty as g, get as x, startsWith as m } from "lodash-es";
|
|
2
|
+
import { M as E } from "./MODIFIERS-RiXS5Mn1.js";
|
|
3
|
+
import { clsx as h } from "clsx";
|
|
4
|
+
import { twMerge as y } from "tailwind-merge";
|
|
5
|
+
const d = [
|
|
12
6
|
0,
|
|
13
7
|
1,
|
|
14
8
|
2,
|
|
@@ -1010,18 +1004,18 @@ const D = (e) => e >= 1536 ? "2XL" : e >= 1280 ? "XL" : e >= 1024 ? "LG" : e >=
|
|
|
1010
1004
|
"fuchsia",
|
|
1011
1005
|
"pink",
|
|
1012
1006
|
"rose"
|
|
1013
|
-
], u = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], i = r(b(w), (e) => e), v =
|
|
1014
|
-
...r($, (e) =>
|
|
1007
|
+
], u = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], i = r(b(w), (e) => e), v = l([
|
|
1008
|
+
...r($, (e) => f(r(i, (t) => `${t}-${e}`))),
|
|
1015
1009
|
...r(
|
|
1016
1010
|
k,
|
|
1017
|
-
(e) =>
|
|
1011
|
+
(e) => l(r(i, (t) => l(r(u, (a) => `${t}-${e}-${a}`))))
|
|
1018
1012
|
),
|
|
1019
1013
|
...r(
|
|
1020
1014
|
S,
|
|
1021
|
-
(e) =>
|
|
1015
|
+
(e) => l(r(i, (t) => l(r(u, (a) => `${t}-${e}-${a}`))))
|
|
1022
1016
|
)
|
|
1023
|
-
]),
|
|
1024
|
-
|
|
1017
|
+
]), B = r(
|
|
1018
|
+
l(
|
|
1025
1019
|
b(p).map((e) => e.classes).concat(v)
|
|
1026
1020
|
),
|
|
1027
1021
|
(e) => ({
|
|
@@ -1034,11 +1028,11 @@ function C(e) {
|
|
|
1034
1028
|
const t = e.match(/sm:|md:|lg:|xl:|2xl:/g);
|
|
1035
1029
|
return x(t, 0, "xs").replace(":", "");
|
|
1036
1030
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const t = r(
|
|
1031
|
+
function R(e) {
|
|
1032
|
+
const t = r(E, (n) => `${n}:`).join("|"), a = new RegExp(t, "g");
|
|
1039
1033
|
return x(a.exec(e.trim()), 0, "").replace(":", "");
|
|
1040
1034
|
}
|
|
1041
|
-
function
|
|
1035
|
+
function j(e) {
|
|
1042
1036
|
return e.trim().split(":").pop() || "";
|
|
1043
1037
|
}
|
|
1044
1038
|
const c = {};
|
|
@@ -1049,36 +1043,33 @@ function W(e) {
|
|
|
1049
1043
|
return c[e];
|
|
1050
1044
|
let t = "";
|
|
1051
1045
|
for (const a in p) {
|
|
1052
|
-
const
|
|
1053
|
-
if (new RegExp(
|
|
1046
|
+
const n = x(p, `${a}.regExp`, "");
|
|
1047
|
+
if (new RegExp(n, "g").test(e)) {
|
|
1054
1048
|
t = a, c[e] = t;
|
|
1055
1049
|
break;
|
|
1056
1050
|
}
|
|
1057
1051
|
}
|
|
1058
1052
|
return t;
|
|
1059
1053
|
}
|
|
1060
|
-
function
|
|
1054
|
+
function z(e) {
|
|
1061
1055
|
return g(e) ? null : {
|
|
1062
|
-
dark:
|
|
1056
|
+
dark: m(e, "dark:"),
|
|
1063
1057
|
mq: C(e),
|
|
1064
|
-
mod:
|
|
1065
|
-
cls:
|
|
1058
|
+
mod: R(e),
|
|
1059
|
+
cls: j(e),
|
|
1066
1060
|
fullCls: e,
|
|
1067
1061
|
property: W(e)
|
|
1068
1062
|
};
|
|
1069
1063
|
}
|
|
1070
|
-
function
|
|
1064
|
+
function I(e) {
|
|
1071
1065
|
let t = "";
|
|
1072
1066
|
return e.dark && (t += "dark:"), e.mq.toLowerCase() !== "xs" && (t += `${e.mq}:`), e.mod && (t += `${e.mod}:`), t += e.cls, t;
|
|
1073
1067
|
}
|
|
1074
|
-
const
|
|
1068
|
+
const T = (...e) => y(h(e));
|
|
1075
1069
|
export {
|
|
1076
|
-
|
|
1070
|
+
B as A,
|
|
1077
1071
|
p as C,
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
I as d,
|
|
1082
|
-
M as e,
|
|
1083
|
-
Y as g
|
|
1072
|
+
T as a,
|
|
1073
|
+
z as c,
|
|
1074
|
+
I as g
|
|
1084
1075
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("lodash-es"),c=require("./MODIFIERS-2FeVfZQ9.cjs"),g=require("clsx"),x=require("tailwind-merge"),n=[0,1,2,3,4,5,6,7,8,9,10,11,12,14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],s={columns:[...r.range(1,13),"auto","3xs","2xs","xs","sm","md","lg","xl",...r.map(r.range(2,8),e=>`${e}xl`)],breakAfter:["auto","avoid","all","avoid-page","page","left","right","column"],breakInside:["auto","avoid","avoid-page","avoid-column"],display:["block","flex","grid","inline-block","inline","hidden"],objectFit:["contain","cover","fill","none","scale-down"],objectPosition:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],overflow:["auto","hidden","clip","visible","scroll"],overscroll:["auto","contain","none"],trbl:[0,"px","0.5",1,1.5,2,2.5,3,3.5,...r.range(4,13),14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96,"auto","1/2","1/3","2/3","1/4","2/4","3/4","full"],flexBasis:[...n,"auto","px","0.5","1.5","2.5","3.5","1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12","full"],padding:[...n,"px","0.5","1.5","2.5","3.5"],margin:["auto",...n,"px","0.5","1.5","2.5","3.5"],scale:[0,50,75,90,95,100,105,110,125,150],origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left"],blendEffect:["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],borderWidth:[0,2,4,8],borderRadius:["global","none","sm","md","lg","xl","2xl","3xl","full"],indent:[0,"px","0.5",1,1.5,2,2.5,3,3.5,...r.range(4,13),14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96],maxHeight:[0,"px","0.5",1,1.5,2,2.5,3,3.5,...r.range(4,13),14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96,"full","screen","min","max","fit"],space:[0,"px","0.5",1,1.5,2,2.5,3,3.5,...r.range(4,13),14,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96,"px","reverse"],width:["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","auto","1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],maxWidth:["0","none","xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","full","min","max","fit","prose","screen-sm","screen-md","screen-lg","screen-xl","screen-2xl"],height:["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","auto","1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","full","screen","min","max","fit"]},o={textColor:{classes:[],regExp:"text-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},aspectRatio:{classes:["aspect-auto","aspect-square","aspect-video"],regExp:"aspect-(auto|square|video)"},container:{classes:["container"],regExp:"container"},columns:{classes:r.map(s.columns,e=>`columns-${e}`),regExp:"columns-(auto|[0-9]xl|[0-9]xs|xs|sm|md|lg|xl|\\d+)"},breakAfter:{classes:r.map(s.breakAfter,e=>`break-after-${e}`),regExp:"break-after-\\S+"},breakBefore:{classes:r.map(s.breakAfter,e=>`break-before-${e}`),regExp:"break-before-\\S+"},breakInside:{classes:r.map(s.breakInside,e=>`break-inside-${e}`),regExp:"break-inside-\\S+"},boxDecoration:{classes:["box-decoration-clone","box-decoration-slice"],regExp:"box-decoration-\\S+"},boxSizing:{classes:["box-border","box-content"],regExp:"box-(border|content)"},flexDirection:{classes:["flex-row","flex-row-reverse","flex-col","flex-col-reverse"],regExp:"flex-(row|row-reverse|col|col-reverse)"},flexWrap:{classes:["flex-wrap","flex-wrap-reverse","flex-nowrap"],regExp:"flex-(wrap|wrap-reverse|nowrap)"},flexGrowShrink:{classes:["flex-1","flex-auto","flex-initial","flex-none"],regExp:"flex-1|flex-auto|flex-initial|flex-none"},gridColumns:{classes:r.map([...r.range(0,13),"none"],e=>`grid-cols-${e}`),regExp:"grid-cols-(\\d+|none)"},gridFlow:{classes:["grid-flow-row","grid-flow-col","grid-flow-row-dense","grid-flow-col-dense"],regExp:"grid-flow-(row|col|row-dense|col-dense)"},outlineStyle:{classes:r.map(["none","dashed","dotted","double","hidden"],e=>`outline-${e}`),regExp:"outline-(none|dashed|dotted|double|hidden)"},borderStyle:{classes:r.map(["solid","dashed","dotted","double","hidden","none"],e=>`border-${e}`),regExp:"border-(solid|dashed|dotted|double|hidden|none)"},overflow:{classes:r.map(s.overflow,e=>`overflow-${e}`),regExp:`overflow-(${s.overflow.join("|")})`},overflowX:{classes:r.map(s.overflow,e=>`overflow-x-${e}`),regExp:`overflow-x-(${s.overflow.join("|")})`},overflowY:{classes:r.map(s.overflow,e=>`overflow-y-${e}`),regExp:`overflow-y-(${s.overflow.join("|")})`},gridRows:{classes:r.map([1,2,3,4,5,6,"none"],e=>`grid-rows-${e}`),regExp:"grid-rows-(\\d|none)"},display:{classes:r.map(s.display,e=>e.toString()),regExp:`(${s.display.join("|")})`},float:{classes:["float-right","float-left","float-none"],regExp:"float-\\S+"},clear:{classes:["clear-right","clear-left","clear-none","clear-both"],regExp:"clear-\\S+"},isolation:{classes:["isolate","isolation-auto"],regExp:"isolate|isolation-auto"},objectFit:{classes:r.map(s.objectFit,e=>`object-${e}`),regExp:"object-(contain|cover|fill|none|scale-down)"},objectPosition:{classes:r.map(s.objectPosition,e=>`object-${e}`),regExp:`object-(${s.objectPosition.join("|")})`},overscroll:{classes:r.map(s.overscroll,e=>`overscroll-${e}`),regExp:`overscroll-(${s.overscroll.join("|")})`},overscrollX:{classes:r.map(s.overscroll,e=>`overscroll-x-${e}`),regExp:`overscroll-x-(${s.overscroll.join("|")})`},overscrollY:{classes:r.map(s.overscroll,e=>`overscroll-y-${e}`),regExp:`overscroll-y-(${s.overscroll.join("|")})`},inset:{classes:r.map(s.trbl,e=>`inset-${e}`),regExp:"-?inset-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},insetX:{classes:r.map(s.trbl,e=>`inset-x-${e}`),regExp:"-?inset-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},insetY:{classes:r.map(s.trbl,e=>`inset-y-${e}`),regExp:"-?inset-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},top:{classes:r.map(s.trbl,e=>`top-${e}`),regExp:"-?top-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},topX:{classes:r.map(s.trbl,e=>`top-x-${e}`),regExp:"-?top-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},topY:{classes:r.map(s.trbl,e=>`top-y-${e}`),regExp:"-?top-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},right:{classes:r.map(s.trbl,e=>`right-${e}`),regExp:"-?right-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},rightX:{classes:r.map(s.trbl,e=>`right-x-${e}`),regExp:"-?right-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},rightY:{classes:r.map(s.trbl,e=>`right-y-${e}`),regExp:"-?right-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},bottom:{classes:r.map(s.trbl,e=>`bottom-${e}`),regExp:"-?bottom-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},bottomX:{classes:r.map(s.trbl,e=>`bottom-x-${e}`),regExp:"-?bottom-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},bottomY:{classes:r.map(s.trbl,e=>`bottom-y-${e}`),regExp:"-?bottom-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},left:{classes:r.map(s.trbl,e=>`left-${e}`),regExp:"-?left-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},leftX:{classes:r.map(s.trbl,e=>`left-x-${e}`),regExp:"-?left-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},leftY:{classes:r.map(s.trbl,e=>`left-y-${e}`),regExp:"-?left-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"},visibility:{classes:["visible","invisible"],regExp:"invisible|visible"},zIndex:{classes:r.map(["0",10,20,30,40,50,"auto"],e=>`z-${e}`),regExp:"-?z-(\\d+|auto|\\[.*\\])"},flexBasis:{classes:r.map(s.flexBasis,e=>`basis-${e}`),regExp:"basis-(\\d+|\\S+)"},flexGrow:{classes:["grow","grow-0"],regExp:"grow(-0)?"},flexShrink:{classes:["shrink","shrink-0"],regExp:"shrink(-0)?"},gridColSpan:{classes:["col-auto",...r.map(r.range(1,13),e=>`col-span-${e}`),"col-span-full"],regExp:"col-(auto|span-(\\d+|full))"},gridColStart:{classes:[...r.map(r.range(1,14),e=>`col-start-${e}`),"col-start-auto"],regExp:"col-start-(\\d+|auto)"},gridColEnd:{classes:[...r.map(r.range(1,14),e=>`col-end-${e}`),"col-end-auto"],regExp:"col-end-(\\d+|auto)"},gridRowSpan:{classes:["row-auto",...r.map(r.range(1,7),e=>`row-span-${e}`),"row-span-full"],regExp:"row-(auto|span-(\\d+|full))"},gridRowStart:{classes:[...r.map(r.range(1,8),e=>`row-start-${e}`),"row-start-auto"],regExp:"row-start-(\\d+|auto)"},gridRowEnd:{classes:[...r.map(r.range(1,8),e=>`row-end-${e}`),"row-end-auto"],regExp:"row-end-(\\d+|auto)"},gridAutoColumns:{classes:["auto-cols-auto","auto-cols-min","auto-cols-max","auto-cols-fr"],regExp:"auto-cols-(auto|min|max|fr)"},gridAutoRows:{classes:["auto-rows-auto","auto-rows-min","auto-rows-max","auto-rows-fr"],regExp:"auto-rows-(auto|min|max|fr)"},gap:{classes:r.map(s.indent,e=>`gap-${e}`),regExp:"gap-(px|\\d.\\d|\\d|\\[.*\\])"},gapX:{classes:r.map(s.indent,e=>`gap-x-${e}`),regExp:"gap-x-(px|\\d.\\d|\\d|\\[.*\\])"},gapY:{classes:r.map(s.indent,e=>`gap-y-${e}`),regExp:"gap-y-(px|\\d.\\d|\\d|\\[.*\\])"},justifyContent:{classes:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly"],regExp:"justify-(start|end|center|between|around|evenly)"},justifyItems:{classes:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"],regExp:"justify-items-(start|end|center|stretch)"},justifySelf:{classes:["justify-self-auto","justify-self-start","justify-self-end","justify-self-center","justify-self-stretch"],regExp:"justify-self-(auto|start|end|center|stretch)"},placeContent:{classes:["place-content-center","place-content-start","place-content-end","place-content-between","place-content-around","place-content-evenly","place-content-stretch"],regExp:"place-content-(center|start|end|between|around|evenly|stretch)"},placeItems:{classes:["place-items-start","place-items-end","place-items-center","place-items-stretch"],regExp:"place-items-(start|end|center|stretch)"},placeSelf:{classes:["place-self-auto","place-self-start","place-self-end","place-self-center","place-self-stretch"],regExp:"place-self-(auto|start|end|center|stretch)"},alignContent:{classes:["content-center","content-start","content-end","content-between","content-around","content-evenly"],regExp:"content-(center|start|end|between|around|evenly)"},alignItems:{classes:["items-start","items-end","items-center","items-baseline","items-stretch"],regExp:"items-(start|end|center|baseline|stretch)"},alignSelf:{classes:["self-auto","self-start","self-end","self-center","self-stretch","self-baseline"],regExp:"self-(auto|start|end|center|stretch|baseline)"},backgroundClip:{classes:["bg-clip-border","bg-clip-padding","bg-clip-content","bg-clip-text"],regExp:"bg-clip-(border|padding|content|text)"},dropShadow:{classes:r.map(["sm","md","lg","xl","2xl","none"],e=>`drop-shadow-${e}`),regExp:"drop-shadow-(sm|md|lg|xl|2xl|none)"},backdropBlur:{classes:r.map(["none","sm","md","lg","xl","2xl","3xl"],e=>`backdrop-blur-${e}`),regExp:"backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)"},backdropBrightness:{classes:r.map([0,50,75,90,95,100,105,110,125,150,200],e=>`backdrop-brightness-${e}`),regExp:"backdrop-brightness-(\\d+)"},backdropContrast:{classes:r.map([0,50,75,100,125,150,200],e=>`backdrop-contrast-${e}`),regExp:"backdrop-contrast-(\\d+)"},backdropGrayScale:{classes:["backdrop-grayscale-0","backdrop-grayscale"],regExp:"backdrop-grayscale(-0)?"},backdropHueRotate:{classes:r.map([0,15,30,60,90,180],e=>`backdrop-hue-rotate-${e}`),regExp:"-?backdrop-hue-rotate-(\\d+)"},backdropInvert:{classes:["backdrop-invert-0","backdrop-invert"],regExp:"backdrop-invert(-0)?"},backdropOpacity:{classes:r.map([0,5,10,20,25,30,40,50,60,70,75,80,90,95,100],e=>`backdrop-opacity-${e}`),regExp:"backdrop-opacity-(\\d+)"},backdropSaturate:{classes:r.map([0,50,100,150,200],e=>`backdrop-saturate-${e}`),regExp:"backdrop-saturate-(\\d+)"},backdropSepia:{classes:["backdrop-sepia-0, backdrop-sepia"],regExp:"backdrop-sepia(-0)?"},backgroundOrigin:{classes:["bg-origin-border","bg-origin-padding","bg-origin-content"],regExp:"bg-origin-(border|padding|content)"},transformOrigin:{classes:r.map(s.origin,e=>`origin-${e}`),regExp:"origin-(\\d+|\\S+)"},padding:{classes:r.map(s.padding,e=>`p-${e}`),regExp:"p-(\\d+|\\S+|\\[.*\\])"},paddingX:{classes:r.map(s.padding,e=>`px-${e}`),regExp:"px-(\\d+|\\S+|\\[.*\\])"},paddingY:{classes:r.map(s.padding,e=>`py-${e}`),regExp:"py-(\\d+|\\S+|\\[.*\\])"},paddingTop:{classes:r.map(s.padding,e=>`pt-${e}`),regExp:"pt-(\\d+|\\S+|\\[.*\\])"},paddingRight:{classes:r.map(s.padding,e=>`pr-${e}`),regExp:"pr-(\\d+|\\S+|\\[.*\\])"},paddingBottom:{classes:r.map(s.padding,e=>`pb-${e}`),regExp:"pb-(\\d+|\\S+|\\[.*\\])"},paddingLeft:{classes:r.map(s.padding,e=>`pl-${e}`),regExp:"pl-(\\d+|\\S+|\\[.*\\])"},textDecorationStyle:{classes:["decoration-solid","decoration-double","decoration-dotted","decoration-dashed","decoration-wavy"],regExp:"decoration-(solid|double|dotted|dashed|wavy)"},textDecorationThickness:{classes:r.map(["auto","from-font","0",1,2,4,8],e=>`decoration-${e}`),regExp:"decoration-(auto|from-font|\\d+|\\S+)"},fromColor:{classes:[],regExp:"from-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},margin:{classes:r.map(s.margin,e=>`m-${e}`),regExp:"-?m-(\\d+|\\S+|\\[.*\\])"},marginX:{classes:r.map(s.margin,e=>`mx-${e}`),regExp:"-?mx-(\\d+|\\S+|\\[.*\\])"},marginY:{classes:r.map(s.margin,e=>`my-${e}`),regExp:"-?my-(\\d+|\\S+|\\[.*\\])"},marginTop:{classes:r.map(s.margin,e=>`mt-${e}`),regExp:"-?mt-(\\d+|\\S+|\\[.*\\])"},marginRight:{classes:r.map(s.margin,e=>`mr-${e}`),regExp:"-?mr-(\\d+|\\S+|\\[.*\\])"},marginBottom:{classes:r.map(s.margin,e=>`mb-${e}`),regExp:"-?mb-(\\d+|\\S+|\\[.*\\])"},marginLeft:{classes:r.map(s.margin,e=>`ml-${e}`),regExp:"-?ml-(\\d+|\\S+|\\[.*\\])"},spaceX:{classes:r.map(s.space,e=>`space-x-${e}`),regExp:"-?space-x-(\\d+|\\S+|\\[.*\\])"},spaceY:{classes:r.map(s.space,e=>`space-y-${e}`),regExp:"-?space-y-(\\d+|\\S+|\\[.*\\])"},boxShadow:{classes:r.map(["sm","md","lg","xl","2xl","inner","none"],e=>`shadow-${e}`),regExp:"shadow-(sm|md|lg|xl|2xl|inner|none)"},minWidth:{classes:["min-w-0","min-w-full","min-w-min","min-w-max","min-w-fit"],regExp:"min-w-(\\d+|\\S+|\\[.*\\])"},maxWidth:{classes:r.map(s.maxWidth,e=>`max-w-${e}`),regExp:"max-w-(\\d+|\\S+|\\[.*\\])"},width:{classes:r.map([...s.width,"full","screen","min","max","fit"],e=>`w-${e}`),regExp:"w-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"},minHeight:{classes:["min-h-0","min-h-full","min-h-screen","min-h-min","min-h-max","min-h-fit"],regExp:"min-h-(\\d+|\\S+|\\[.*\\])"},maxHeight:{classes:r.map(s.maxHeight,e=>`max-h-${e}`),regExp:"max-h-(\\d+|\\S+|\\[.*\\])"},height:{classes:r.map(s.height,e=>`h-${e}`),regExp:"h-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"},fontFamily:{classes:["font-heading","font-body","font-sans","font-serif","font-mono"],regExp:"font-(heading|body|sans|serif|mono)"},textAlign:{classes:["text-left","text-center","text-right","text-justify"],regExp:"text-(left|center|right|justify)"},textOverflow:{classes:["truncate","text-ellipsis","text-clip"],regExp:"truncate|text-ellipsis|text-clip"},verticalAlign:{classes:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],regExp:"align-(baseline|top|middle|bottom|text-top|text-bottom|sub|super)"},fontSize:{classes:["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],regExp:"text-(\\d+|\\S+|\\[.*\\])"},fontSmoothing:{classes:["antialiased","subpixel-antialiased"],regExp:"antialiased|subpixel-antialiased"},fontStyle:{classes:["italic","not-italic"],regExp:"not-italic|italic"},fontWeight:{classes:["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],regExp:"font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)"},fontVariantNum:{classes:["normal-nums","ordinal","diagonal-fractions","stacked-fractions","tabular-nums","oldstyle-nums","proportional-nums","lining-nums","slashed-zero"],regExp:"normal-nums|ordinal|diagonal-fractions|stacked-fractions|tabular-nums|oldstyle-nums|proportional-nums|lining-nums|slashed-zero"},letterSpacing:{classes:["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],regExp:"-?tracking-(tighter|tight|normal|wide|wider|widest|\\[.*\\])"},lineHeight:{classes:["leading-none","leading-tight","leading-snug","leading-normal","leading-relaxed","leading-loose","leading-3","leading-4","leading-5","leading-6","leading-7","leading-8","leading-9","leading-10"],regExp:"leading-(none|tight|snug|normal|relaxed|loose|\\[.*\\]|\\d+)"},listStyleType:{classes:["list-none","list-disc","list-decimal"],regExp:"list-(none|disc|decimal)"},listStylePosition:{classes:["list-inside","list-outside"],regExp:"list-(inside|outside)"},textUnderlineOffset:{classes:["underline-offset-auto","underline-offset-0","underline-offset-1","underline-offset-2","underline-offset-4","underline-offset-8"],regExp:"underline-offset-(auto|\\d+|\\S+)"},textDecoration:{classes:["underline","overline","line-through","no-underline"],regExp:"underline|overline|line-through|no-underline"},textDecorationColor:{classes:[],regExp:"decoration-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},textTransform:{classes:["uppercase","lowercase","capitalize","normal-case"],regExp:"uppercase|lowercase|capitalize|normal-case"},textIndent:{classes:r.map(s.indent,e=>`indent-${e}`),regExp:"-?indent-(\\d+|\\S+)"},whitespace:{classes:["whitespace-normal","whitespace-no-wrap","whitespace-pre","whitespace-pre-line","whitespace-pre-wrap"],regExp:"whitespace-(normal|no-wrap|pre|pre-line|pre-wrap)"},wordBreak:{classes:["break-normal","break-words","break-all"],regExp:"break-(normal|words|all)"},content:{classes:["content-none"],regExp:"content-none"},backgroundColor:{classes:[],regExp:"bg-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},backgroundAttachment:{classes:["bg-fixed","bg-local","bg-scroll"],regExp:"bg-(fixed|local|scroll)"},backgroundPosition:{classes:["bg-bottom","bg-center","bg-left","bg-left-bottom","bg-left-top","bg-right","bg-right-bottom","bg-right-top","bg-top"],regExp:"bg-(bottom|center|left|left-bottom|left-top|right|right-bottom|right-top|top)"},backgroundRepeat:{classes:["bg-repeat","bg-repeat-x","bg-repeat-y","bg-no-repeat","bg-repeat-round","bg-repeat-space"],regExp:"bg-(repeat|repeat-x|repeat-y|no-repeat|repeat-round|repeat-space)"},backgroundSize:{classes:["bg-auto","bg-cover","bg-contain"],regExp:"bg-(auto|cover|contain)"},backgroundGradient:{classes:["bg-gradient-none","bg-gradient-to-t","bg-gradient-to-tr","bg-gradient-to-r","bg-gradient-to-br","bg-gradient-to-b","bg-gradient-to-bl","bg-gradient-to-l","bg-gradient-to-tl"],regExp:"bg-gradient-(none|to-(t|tr|r|br|b|bl|l|tl))"},viaColor:{classes:[],regExp:"via-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},toColor:{classes:[],regExp:"to-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},position:{classes:["static","fixed","absolute","relative","sticky"],regExp:"(static|fixed|absolute|relative|sticky)"},borderRadiusTopLeft:{classes:["rounded-tl",...r.map(s.borderRadius,e=>`rounded-tl-${e}`)],regExp:"rounded-tl-?(\\d+|\\S+)?"},borderRadiusTopRight:{classes:["rounded-tr",...r.map(s.borderRadius,e=>`rounded-tr-${e}`)],regExp:"rounded-tr-?(\\d+|\\S+)?"},borderRadiusBottomRight:{classes:["rounded-br",...r.map(s.borderRadius,e=>`rounded-br-${e}`)],regExp:"rounded-br-?(\\d+|\\S+)?"},borderRadiusBottomLeft:{classes:["rounded-bl",...r.map(s.borderRadius,e=>`rounded-bl-${e}`)],regExp:"rounded-bl-?(\\d+|\\S+)?"},borderRadiusTop:{classes:["rounded-t",...r.map(s.borderRadius,e=>`rounded-t-${e}`)],regExp:"rounded-t-?(\\d+|\\S+)?"},borderRadiusRight:{classes:["rounded-r",...r.map(s.borderRadius,e=>`rounded-r-${e}`)],regExp:"rounded-r-?(\\d+|\\S+)?"},borderRadiusBottom:{classes:["rounded-b",...r.map(s.borderRadius,e=>`rounded-b-${e}`)],regExp:"rounded-b-?(\\d+|\\S+)?"},borderRadiusLeft:{classes:["rounded-l",...r.map(s.borderRadius,e=>`rounded-l-${e}`)],regExp:`(rounded-l-(${s.borderRadius.join("|")})|rounded-l$)`},borderRadius:{classes:["rounded",...r.map(s.borderRadius,e=>`rounded-${e}`)],regExp:`(rounded-(${s.borderRadius.join("|")}$)|rounded)`},borderX:{classes:["border-x",...r.map(s.borderWidth,e=>`border-x-${e}`)],regExp:"border-x-?(\\d+|\\S+|\\[.*\\])?"},borderY:{classes:["border-y",...r.map(s.borderWidth,e=>`border-y-${e}`)],regExp:"border-y-?(\\d+|\\S+|\\[.*\\])?"},borderTop:{classes:["border-t",...r.map(s.borderWidth,e=>`border-t-${e}`)],regExp:"border-t-?(\\d+|\\S+|\\[.*\\])?"},borderRight:{classes:["border-r",...r.map(s.borderWidth,e=>`border-r-${e}`)],regExp:"border-r-?(\\d+|\\S+|\\[.*\\])?"},borderBottom:{classes:["border-b",...r.map(s.borderWidth,e=>`border-b-${e}`)],regExp:"border-b-?(\\d+|\\S+|\\[.*\\])?"},borderLeft:{classes:["border-l",...r.map(s.borderWidth,e=>`border-l-${e}`)],regExp:"border-l-?(\\d+|\\S+|\\[.*\\])?"},borderColor:{classes:[],regExp:"border-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},border:{classes:["border",...r.map(s.borderWidth,e=>`border-${e}`)],regExp:"border-?(\\d+|\\S+|\\[.*\\])?"},order:{classes:r.map([...r.range(0,13),"first","last","none"],e=>`order-${e}`),regExp:"-?order-(\\d+|first|last|none)"},divideXWidth:{classes:r.map(["0",2,4,8],e=>`divide-x-${e}`),regExp:"divide-x-(\\d+|\\[.*\\])"},divideYWidth:{classes:r.map(["0",2,4,8],e=>`divide-y-${e}`),regExp:"divide-y-(\\d+|\\[.*\\])"},divideColor:{classes:[],regExp:"divide-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},divideStyle:{classes:r.map(["solid","dashed","dotted","double","none"],e=>`divide-${e}`),regExp:"divide-(solid|dashed|dotted|double|none)"},outlineWidth:{classes:r.map([0,1,2,4,8],e=>`outline-${e}`),regExp:"outline-(\\d+)"},outlineOffset:{classes:r.map([0,1,2,4,8],e=>`outline-offset-${e}`),regExp:"outline-offset-(\\d+)"},outlineColor:{classes:[],regExp:"outline-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},ringWidth:{classes:r.map([0,1,2,4,8,"inset"],e=>`ring-${e}`),regExp:"ring-(\\d+|inset)"},ringOffsetWidth:{classes:r.map([0,1,2,4,8],e=>`ring-offset-${e}`),regExp:"ring-offset-(\\d+)"},ringOffsetColor:{classes:[],regExp:"ring-offset-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},ringColor:{classes:[],regExp:"ring-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},boxShadowColor:{classes:[],regExp:"shadow-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},opacity:{classes:r.map([0,5,10,20,25,30,40,50,60,70,75,80,90,95,100],e=>`opacity-${e}`),regExp:"opacity-(\\d+|\\[.*\\])"},mixBlendMode:{classes:r.map(s.blendEffect,e=>`mix-blend-${e}`),regExp:"mix-blend-(\\d+|\\S+)"},bgBlendMode:{classes:r.map(s.blendEffect,e=>`bg-blend-${e}`),regExp:"bg-blend-(\\d+|\\S+)"},blur:{classes:r.map(["none","sm","md","lg","xl","2xl","3xl"],e=>`blur-${e}`),regExp:"blur-(none|sm|md|lg|xl|2xl|3xl)"},brightness:{classes:r.map([0,50,75,90,95,100,105,110,125,150,200],e=>`brightness-${e}`),regExp:"brightness-(\\d+)"},contrast:{classes:r.map([0,50,75,100,125,150,200],e=>`contrast-${e}`),regExp:"contrast-(\\d+)"},grayScale:{classes:["grayscale-0","grayscale"],regExp:"grayscale(-0)?"},hueRotate:{classes:r.map([0,15,30,60,90,180],e=>`hue-rotate-${e}`),regExp:"-?hue-rotate-(\\d+)"},invert:{classes:["invert-0","invert"],regExp:"invert(-0)?"},saturate:{classes:r.map([0,50,100,150,200],e=>`saturate-${e}`),regExp:"saturate-(\\d+)"},sepia:{classes:["sepia-0","sepia"],regExp:"sepia(-0)?"},transition:{classes:["transition-none","transition-all","transition-colors","transition-opacity","transition-shadow","transition-transform"],regExp:"transition-(none|all|colors|opacity|shadow|transform)"},duration:{classes:r.map([75,100,150,200,300,500,700,1e3],e=>`duration-${e}`),regExp:"duration-(\\d+|\\[.*\\])"},transitionEase:{classes:["ease-linear","ease-in","ease-out","ease-in-out"],regExp:"eas(e-linear|e-in|e-out|e-in-out)"},transitionDelay:{classes:r.map([75,100,150,200,300,500,700,1e3],e=>`delay-${e}`),regExp:"delay-(\\d+|\\[.*\\])"},animation:{classes:["animation-none","animation-spin","animation-ping"],regExp:"animation-(none|spin|ping)"},scaleX:{classes:r.map(s.scale,e=>`scale-x-${e}`),regExp:"-?scale-x-(\\d+|\\S+|\\[.*\\])"},scaleY:{classes:r.map(s.scale,e=>`scale-y-${e}`),regExp:"-?scale-y-(\\d+|\\S+|\\[.*\\])"},scale:{classes:r.map(s.scale,e=>`scale-${e}`),regExp:"-?scale-(\\d+|\\S+|\\[.*\\])"},rotate:{classes:r.map([0,1,2,3,6,12,45,90,180],e=>`rotate-${e}`),regExp:"-?rotate-(\\d+|\\S+|\\[.*\\])"},translateX:{classes:r.map([0,"px","0.5",1],e=>`translate-x-${e}`),regExp:"-?translate-x-(\\d+|\\S+|\\[.*\\])"},translateY:{classes:r.map([0,"px","0.5",1],e=>`translate-y-${e}`),regExp:"-?translate-y-(\\d+|\\S+|\\[.*\\])"},skewX:{classes:r.map([0,1,2,3,6,12],e=>`skew-x-${e}`),regExp:"-?skew-x-(\\d+|\\S+|\\[.*\\])"},skewY:{classes:r.map([0,1,2,3,6,12],e=>`skew-y-${e}`),regExp:"-?skew-y-(\\d+|\\S+|\\[.*\\])"},accentColor:{classes:[],regExp:"accent-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},appearance:{classes:["appearance-none"],regExp:"appearance-none"},cursor:{classes:["cursor-auto","cursor-default","cursor-pointer","cursor-wait","cursor-text","cursor-move","cursor-help","cursor-not-allowed"],regExp:"cursor-(auto|default|pointer|wait|text|move|help|not-allowed)"},caretColor:{classes:[],regExp:"caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},pointerEvents:{classes:["pointer-events-none","pointer-events-auto"],regExp:"pointer-events-(none|auto)"},userSelect:{classes:["select-none","select-text","select-all","select-auto"],regExp:"select-(none|text|all|auto)"},fill:{classes:[],regExp:"caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},stroke:{classes:[],regExp:"caret-(black|transparent|current|white|primary(-\\d+)?|secondary(-\\d+)?|\\S+-\\d+)"},strokeWidth:{classes:["stroke-0","stroke-1","stroke-2"],regExp:"stroke-(\\d+|\\[.*\\])"}},m={backgroundColor:"bg",textColor:"text",borderColor:"border",boxShadowColor:"shadow",outlineColor:"outline",divideColor:"divide",fromColor:"from",viaColor:"via",toColor:"to",ringColor:"ring",ringOffsetColor:"ring-offset"},u=["current","inherit","transparent","black","white","primary","secondary"],b=["primary","secondary"],f=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],p=["50","100","200","300","400","500","600","700","800","900"],d=r.map(r.values(m),e=>e),E=r.flattenDeep([...r.map(u,e=>r.flatten(r.map(d,t=>`${t}-${e}`))),...r.map(b,e=>r.flattenDeep(r.map(d,t=>r.flattenDeep(r.map(p,a=>`${t}-${e}-${a}`))))),...r.map(f,e=>r.flattenDeep(r.map(d,t=>r.flattenDeep(r.map(p,a=>`${t}-${e}-${a}`)))))]),h=r.map(r.flattenDeep(r.values(o).map(e=>e.classes).concat(E)),e=>({name:e}));function y(e){if(r.isEmpty(e.trim()))return"";const t=e.match(/sm:|md:|lg:|xl:|2xl:/g);return r.get(t,0,"xs").replace(":","")}function w(e){const t=r.map(c.MODIFIERS,l=>`${l}:`).join("|"),a=new RegExp(t,"g");return r.get(a.exec(e.trim()),0,"").replace(":","")}function $(e){return e.trim().split(":").pop()||""}const i={};function S(e){if(r.isEmpty(e))return"";if(i[e])return i[e];let t="";for(const a in o){const l=r.get(o,`${a}.regExp`,"");if(new RegExp(l,"g").test(e)){t=a,i[e]=t;break}}return t}function k(e){return r.isEmpty(e)?null:{dark:r.startsWith(e,"dark:"),mq:y(e),mod:w(e),cls:$(e),fullCls:e,property:S(e)}}function v(e){let t="";return e.dark&&(t+="dark:"),e.mq.toLowerCase()!=="xs"&&(t+=`${e.mq}:`),e.mod&&(t+=`${e.mod}:`),t+=e.cls,t}const C=(...e)=>x.twMerge(g.clsx(e));exports.ALL_TW_CLASSES=h;exports.CLASSES_LIST=o;exports.cn=C;exports.constructClassObject=k;exports.generateFullClsName=v;
|
package/dist/web-blocks.cjs
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("lodash-es"),v=require("react"),l=require("./controls-Dy1qa8Dc.cjs"),d=require("@chaibuilder/runtime"),a=require("./jsx-runtime-Z_BpKhVy.cjs"),h=require("./Functions-N3yhPYKY.cjs"),p=require("@radix-ui/react-icons");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("clsx");require("tailwind-merge");function S(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const u=S(v),R=o=>{const{blockProps:e,backgroundImage:t,children:r,styles:n}=o;let s={};return t&&(s={backgroundImage:`url(${t})`}),u.createElement("div",{...e,...n,style:s},r)};d.registerChaiBlock(R,{type:"Body",label:"Body",category:"core",group:"basic",hidden:!0,props:{styles:l.S({default:"font-body antialiased"}),backgroundImage:l.o({title:"Background Image"})}});const g=({blockProps:o,className:e="",styles:t={}})=>a.jsxRuntimeExports.jsx("div",{...o,className:h.cn("flex h-20 flex-col items-center justify-center",e),...b.omit(t,["className"]),children:a.jsxRuntimeExports.jsx("div",{className:"flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300",children:a.jsxRuntimeExports.jsx("span",{className:"opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400"})})}),L=u.memo(o=>{const{blockProps:e,backgroundImage:t,children:r,tag:n="div",styles:s}=o;if(!r&&b.isEmpty(s==null?void 0:s.className))return a.jsxRuntimeExports.jsx(g,{blockProps:e,styles:s});let i={};return t&&(i={backgroundImage:`url(${t})`}),u.createElement(n,{...e,...s,style:i},r)});d.registerChaiBlock(L,{type:"Box",label:"Box",category:"core",group:"basic",props:{styles:l.S({default:""}),tag:l.f({title:"Tag",default:"div",options:[{value:"div",title:"div"},{value:"header",title:"header"},{value:"footer",title:"footer"},{value:"section",title:"section"},{value:"article",title:"article"},{value:"aside",title:"aside"},{value:"main",title:"main"},{value:"nav",title:"nav"},{value:"figure",title:"figure"},{value:"details",title:"details"},{value:"summary",title:"summary"},{value:"dialog",title:"dialog"},{value:"strike",title:"strike"},{value:"caption",title:"caption"},{value:"legend",title:"legend"},{value:"figcaption",title:"figcaption"},{value:"mark",title:"mark"}]}),backgroundImage:l.o({title:"Background Image"})}});const T=o=>{const{blockProps:e,styles:t,content:r,level:n="h1",children:s=null}=o;return s?u.createElement(n,{...t,...e},s):u.createElement(n,{...t,...e,dangerouslySetInnerHTML:{__html:r}})};d.registerChaiBlock(T,{type:"Heading",label:"Heading",category:"core",icon:p.HeadingIcon,group:"basic",props:{level:l.f({title:"Level",default:"h1",binding:!1,options:[{value:"h1",title:"h1"},{value:"h2",title:"h2"},{value:"h3",title:"h3"},{value:"h4",title:"h4"},{value:"h5",title:"h5"},{value:"h6",title:"h6"}]}),styles:l.S({default:"text-3xl"}),content:l.g({title:"Content",default:"Heading goes here"})}});const w=o=>{const{blockProps:e,styles:t,content:r}=o;return b.isNull(o.children)?u.createElement("div",{...t,...e,dangerouslySetInnerHTML:{__html:r}}):u.createElement("p",{...t,...e},o.children)};d.registerChaiBlock(w,{type:"Paragraph",label:"Paragraph",category:"core",icon:p.TextIcon,group:"basic",props:{styles:l.S({default:""}),content:l.g({title:"Content",default:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."})}});const _=o=>{const{blockProps:e,styles:t,content:r,children:n=null,tag:s}=o;return n?u.createElement("span",{...t,...e},n):u.createElement(s||"span",{...t,...e,dangerouslySetInnerHTML:{__html:r}})};d.registerChaiBlock(_,{type:"Span",label:"Span",category:"core",group:"basic",props:{styles:l.S({default:""}),content:l.g({title:"Content",default:"Enter your content"})}});const C=o=>{const{blockProps:e,content:t,styles:r}=o;return a.jsxRuntimeExports.jsx("div",{className:"prose max-w-full",children:a.jsxRuntimeExports.jsx("div",{...e,...r,dangerouslySetInnerHTML:{__html:t}})})};d.registerChaiBlock(C,{type:"RichText",label:"Rich Text",category:"core",icon:p.CursorTextIcon,group:"basic",props:{styles:l.S({default:""}),content:l.m({title:"Content",default:`Lorem Ipsum Rich Text Editor Demo
|
|
2
|
+
|
|
3
|
+
Welcome to our rich text editor demo! With our powerful editor, you can create stunning documents with ease. Let's explore some of its features:
|
|
4
|
+
|
|
5
|
+
Text Formatting: You can make text bold, italic, or underline it.
|
|
6
|
+
Lists:
|
|
7
|
+
Create ordered lists.
|
|
8
|
+
Craft unordered lists.
|
|
9
|
+
Utilize nested lists for organization.`})}});const P=o=>{const{blockProps:e,iconSize:t,icon:r,content:n,iconPos:s,styles:i,children:c}=o,m=r,f=c||a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[n,m&&a.jsxRuntimeExports.jsx("div",{style:{width:t+"px"},className:s+(s==="order-first"?" mr-2":"ml-2")||"",dangerouslySetInnerHTML:{__html:m}})]});return u.createElement("button",{...e,...i,type:"button"},f)};d.registerChaiBlock(P,{type:"Button",label:"Button",category:"core",icon:p.ButtonIcon,group:"basic",props:{content:l.u({title:"Label",default:"Button",multiLingual:!0}),styles:l.S({default:"text-white bg-primary px-4 py-2 rounded-global flex items-center"}),link:l.q({title:"Link",default:{type:"page",href:"",target:"_blank"}}),icon:l.T({title:"Icon",default:""}),iconSize:l.c({title:"Icon Size",default:24}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const N=o=>{const{blockProps:e,link:t,children:r,styles:n,inBuilder:s,content:i}=o;return!r&&b.isEmpty(n==null?void 0:n.className)&&b.isEmpty(i)?a.jsxRuntimeExports.jsx(g,{blockProps:e}):s?r?a.jsxRuntimeExports.jsx("span",{"data-simulate":"a",...e,...n,children:r}):u.createElement("span",{...e,...n,href:t.href||"#",target:t.target||"_self",dangerouslySetInnerHTML:{__html:i},"data-simulate":"a"}):r?a.jsxRuntimeExports.jsx("a",{href:t.href||"#/",target:t.target,...e,...n,children:r}):u.createElement("a",{...e,...n,href:t.href||"#",target:t.target||"_self",dangerouslySetInnerHTML:{__html:i}})};d.registerChaiBlock(N,{type:"Link",label:"Link",category:"core",icon:p.Link1Icon,group:"basic",props:{styles:l.S({default:""}),content:l.u({title:"Content",default:""}),link:l.q({title:"Link",default:{type:"page",target:"_self",href:""}})}});const M=o=>{const{blockProps:e,children:t,listType:r,styles:n,tag:s}=o,i=h.cn(b.get(n,"className",""),r);return!t&&b.isEmpty(n==null?void 0:n.className)?a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"LIST ITEM"}):u.createElement(s||(r==="list-decimal"?"ol":"ul"),{...e,...n,className:i},t)};d.registerChaiBlock(M,{type:"List",label:"List",icon:p.RowsIcon,category:"core",group:"basic",props:{styles:l.S({default:""}),listType:l.f({title:"List type",default:"list-disc",options:[{value:"list-none",title:"None"},{value:"list-disc",title:"Disc"},{value:"list-decimal",title:"Number"}]})},blocks:[{_type:"List",_id:"a",listType:"list-none",styles:"#styles:,"},{_type:"ListItem",_id:"b",_parent:"a",styles:"#styles:,",content:"Item 1"},{_type:"ListItem",_id:"c",_parent:"a",styles:"#styles:,",content:"Item 2"},{_type:"ListItem",_id:"d",_parent:"a",styles:"#styles:,",content:"Item 3"}]});const H=o=>{const{blockProps:e,content:t,styles:r,children:n,tag:s}=o;return n?u.createElement(s||"li",{...r,...e},n):u.createElement(s||"li",{...r,...e,dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(H,{type:"ListItem",label:"List Item",icon:p.ColumnsIcon,category:"core",group:"basic",props:{styles:l.S({default:""}),content:l.g({title:"Content",default:"List item"})}});const U=o=>{const{blockProps:e,icon:t,styles:r}=o,n={...r,className:h.cn(r.className,"inline-block c-inline-block")};return b.isEmpty(t)?a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"",className:"h-8 w-14"}):u.createElement("span",{...e,...n,dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(U,{type:"Icon",label:"Icon",category:"core",icon:p.SketchLogoIcon,group:"basic",props:{styles:l.S({default:"text-black"}),icon:l.T({title:"Icon",default:'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'})}});const D=o=>{const{blockProps:e,image:t,styles:r,alt:n,height:s=200,width:i=200}=o;return b.isEmpty(t)?a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"IMAGE URL",className:"h-36"}):u.createElement("img",{...e,...r,src:t,alt:n,height:s,width:i})};d.registerChaiBlock(D,{type:"Image",label:"Image",category:"core",icon:p.ImageIcon,group:"basic",props:{styles:l.S({default:""}),image:l.o({title:"Image",default:"https://fakeimg.pl/400x200?text=Choose&font=bebas"}),alt:l.u({title:"Alt",default:""}),width:l.u({title:"Width",default:""}),height:l.u({title:"Height",default:""})}});const q=o=>{var s;const{blockProps:e,styles:t,children:r}=o;let n=null;return r||(n=a.jsxRuntimeExports.jsx("div",{className:h.cn("flex flex-col items-center justify-center",(s=o.emptyStyles)==null?void 0:s.className),children:a.jsxRuntimeExports.jsx("div",{className:"h-full w-full rounded-md border-4 border-dashed",children:a.jsxRuntimeExports.jsxs("p",{className:"truncate p-1 text-left text-xs text-gray-400",children:["Slot: ",o.name]})})})),u.createElement("div",{...t,...e,droppable:"yes"},r||n)};d.registerChaiBlock(q,{type:"Slot",label:"Slot",group:"basic",category:"core",hidden:!0,props:{styles:l.S({default:""}),emptyStyles:l.S({default:""})}});const j=/^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,I=/^(https?:\/\/)?(www\.)?player.vimeo\.com/,B=/^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,F=o=>{if(j.test(o)){const e=o.match(j);return e?`https://www.youtube.com/embed/${e[4]}`:o}if(I.test(o)){const e=o.match(I);return e?`https://player.vimeo.com/video/${e[3]}`:o}if(B.test(o)){const e=o.match(B);return e?`https://www.dailymotion.com/embed/video/${e[4]}`:o}return null},z=u.memo(o=>{const{blockProps:e,inBuilder:t,styles:r,url:n,controls:s}=o,i=b.get(s,"autoPlay",!1),c=b.get(s,"controls",!1),m=i||b.get(s,"muted",!0),f=b.get(s,"loop",!1);if(b.isEmpty(n))return a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"VIDEO URL",className:"h-36"});let y=F(n),x=null;if(y){if(!b.isEmpty(y)){const k=[];k.push(`autoplay=${i?1:0}`),k.push(`controls=${s?1:0}`),k.push(`mute=${m?1:0}&muted=${m?1:0}`),k.push(`loop=${f?1:0}`),y=`${y}?${k.join("&")}`}x=u.createElement("iframe",{...e,...r,src:y,allow:t?"":"autoplay *; fullscreen *",allowFullScreen:!0,frameBorder:0})}else x=u.createElement("video",{...e,...r,src:n,controls:c,muted:m,autoPlay:t?!1:i,loop:f});return a.jsxRuntimeExports.jsxs("div",{className:"relative h-full w-full overflow-hidden",style:{paddingBottom:"56.25%"},children:[t?a.jsxRuntimeExports.jsx("div",{...e,...r,className:"absolute z-20 h-full w-full"}):null,x]})});d.registerChaiBlock(z,{type:"Video",label:"Video",category:"core",icon:p.VideoIcon,group:"basic",props:{styles:l.S({default:"absolute top-0 left-0 w-full h-full"}),url:l.u({title:"Video URL",default:"https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"}),controls:l.b({title:"Controls",properties:{autoPlay:l.r({title:"Autoplay",default:!0}),controls:l.r({title:"Show widgets",default:!1}),loop:l.r({title:"Loop",default:!1}),muted:l.r({title:"Muted",default:!0})}})}});const O=u.memo(o=>{const{blockProps:e,styles:t,content:r,inBuilder:n}=o;return a.jsxRuntimeExports.jsxs("div",{className:"relative",children:[n?a.jsxRuntimeExports.jsx("div",{...e,...t,className:"absolute h-full w-full z-20"}):null,u.createElement("div",{...t,dangerouslySetInnerHTML:{__html:r}})]})});d.registerChaiBlock(O,{type:"CustomHTML",label:"CustomHTML",category:"core",icon:p.CodeIcon,group:"basic",props:{styles:l.S({default:""}),content:l.g({title:"HTML Content",default:"<div><p>HTML Snippet goes here...</p></div>",placeholder:"Enter custom HTML code here"})}});const A=o=>{const{blockProps:e,styles:t}=o;return u.createElement("hr",{...t,...e})};d.registerChaiBlock(A,{type:"Divider",label:"Divider",category:"core",icon:p.DividerHorizontalIcon,group:"basic",props:{styles:l.S({default:"bg-gray-900 h-0.5 py-2 my-1"})}});const $=o=>{const{blockProps:e,styles:t}=o;return u.createElement("br",{...e,...t})};d.registerChaiBlock($,{type:"LineBreak",label:"Line Break",category:"core",group:"basic",hidden:!0,icon:p.SpaceBetweenVerticallyIcon,props:{styles:l.S({default:""})}});const V=o=>o.inBuilder?a.jsxRuntimeExports.jsx("span",{className:"inline",...o.blockProps,children:o.content}):`${o.content}`;d.registerChaiBlock(V,{type:"Text",label:"Text",hidden:!0,category:"core",group:"basic",icon:p.SpaceBetweenVerticallyIcon,props:{content:l.g({title:"Content",defaultValue:""})}});const E=o=>{const e=(s,i)=>({_id:h.generateUUID(),_parent:s,_type:"TableCell",styles:"#styles:,",content:`${o==="TableHead"?"Table Head":"Table Cell "+i}`}),t=s=>{const i=h.generateUUID(),c={_type:"TableRow",_id:i,styles:"#styles:,border-b"};return s&&(c._parent=s),[c,e(i,"1"),e(i,"2"),e(i,"3")]},r=s=>{const i=h.generateUUID(),c={_id:i,_type:"TableHead",styles:"#styles:,font-medium"};return s&&(c._parent=s),[c,...t(i)]},n=s=>{const i=h.generateUUID(),c={_id:i,_type:"TableBody",styles:"#styles:,"};return s&&(c._parent=s),[c,...t(i),...t(i)]};if(o==="Table"){const s=h.generateUUID();return[{_id:s,_type:"Table",styles:"#styles:,w-full text-left text-gray-500 dark:text-gray-400"},...r(s),...n(s)]}return o==="TableRow"?t():o==="TableHead"?r():o==="TableBody"?n():[]},W=o=>{const{blockProps:e,children:t,styles:r}=o;return t?u.createElement("table",{...e,...r},t):a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"TABLE HEAD / BODY"})};d.registerChaiBlock(W,{type:"Table",label:"Table",category:"core",group:"table",hidden:!0,icon:p.TableIcon,props:{styles:l.S({default:""})},blocks:E("Table")});const G=o=>{const{blockProps:e,children:t,styles:r}=o;return t?u.createElement("thead",{...e,...r},t):a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"TABLE ROW"})};d.registerChaiBlock(G,{type:"TableHead",label:"Table Head",category:"core",group:"table",hidden:!0,icon:p.BorderTopIcon,props:{styles:l.S({default:""})},blocks:E("TableHead")});const Y=o=>{const{blockProps:e,children:t,styles:r}=o;return t?u.createElement("tbody",{...e,...r},t):a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"TABLE ROW"})};d.registerChaiBlock(Y,{type:"TableBody",label:"Table Body",category:"core",group:"table",hidden:!0,icon:p.BorderAllIcon,props:{styles:l.S({default:""})},blocks:E("TableBody")});const X=o=>{const{blockProps:e,children:t,styles:r}=o;return t?u.createElement("tr",{...e,...r},t):a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"TABLE CELL"})};d.registerChaiBlock(X,{type:"TableRow",label:"Table Row",category:"core",group:"table",hidden:!0,icon:p.ViewHorizontalIcon,props:{styles:l.S({default:"w-full"})},blocks:E("TableRow")});const Z=o=>{const{blockProps:e,children:t,content:r,styles:n}=o;return!t&&b.isEmpty(r)?a.jsxRuntimeExports.jsx(g,{blockProps:e}):t?u.createElement("td",{...e,...n},t):u.createElement("td",{...e,...n,dangerouslySetInnerHTML:{__html:r}})};d.registerChaiBlock(Z,{type:"TableCell",label:"Table Cell",category:"core",group:"table",hidden:!0,icon:p.DragHandleHorizontalIcon,props:{styles:l.S({default:""}),content:l.m({title:"Content",default:"Table cell item"})}});const J=o=>{const{blockProps:e,errorMessage:t,name:r,_type:n,successMessage:s,action:i,styles:c,children:m}=o;if(!m&&b.isEmpty(c==null?void 0:c.className))return a.jsxRuntimeExports.jsx(g,{blockProps:e,text:"FORM FIELDS"});const f={"x-data":"useForm","x-on:submit.prevent":"post"},y={"x-html":"formResponse",":class":"{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"};return a.jsxRuntimeExports.jsxs("form",{...f,"data-error":t,"data-success":s,method:"post",action:i,...e,...c,children:[a.jsxRuntimeExports.jsx("div",{...y}),a.jsxRuntimeExports.jsx("input",{name:"formname",type:"hidden",value:r||n}),m]})};d.registerChaiBlock(J,{type:"Form",label:"Form",category:"core",icon:p.GroupIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),action:l.u({title:"Submit URL",default:"/api/form/submit"}),errorMessage:l.m({title:"Error Message",default:"Something went wrong. Please try again"}),successMessage:l.m({title:"Success Message",default:"Thank you for your submission."})}});const K=o=>{const{blockProps:e,content:t,styles:r,children:n}=o,s={...r,...e};return n?u.createElement("label",s,n):u.createElement("label",{...s,dangerouslySetInnerHTML:{__html:t}})};d.registerChaiBlock(K,{type:"Label",label:"Label",category:"core",icon:p.LetterCaseToggleIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),content:l.u({title:"Content",default:"Label"})}});const Q=o=>{const{blockProps:e,label:t,placeholder:r,styles:n,inputStyles:s,showLabel:i,required:c,inputType:m="text",inBuilder:f,fieldName:y}=o,x=h.generateUUID();return!i||m==="submit"?(m==="submit"&&(e.value=t),a.jsxRuntimeExports.jsx("input",{id:x,name:y,readOnly:f,...e,...s,...n,type:m,placeholder:r,required:c})):a.jsxRuntimeExports.jsxs("div",{...n,...e,children:[i&&a.jsxRuntimeExports.jsx("label",{htmlFor:x,children:t}),a.jsxRuntimeExports.jsx("input",{name:y,readOnly:f,...s,id:x,type:m,placeholder:r,required:c})]})};d.registerChaiBlock(Q,{type:"Input",label:"Input",category:"core",icon:p.InputIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),fieldName:l.u({title:"Field Name",default:"input"}),inputType:l.f({title:"Type",options:b.map(["text","email","password","number","tel","file","hidden","range","submit","color","date","time"],o=>({value:o,title:o})),default:"text"}),value:l.u({title:"Value",default:""}),showLabel:l.r({title:"Show label",default:!0}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),required:l.r({title:"Required",default:!1})}});const ee=o=>{const{blockProps:e,fieldName:t,label:r,placeholder:n,styles:s,inputStyles:i,_rows:c,showLabel:m}=o,f=h.generateUUID();return m?a.jsxRuntimeExports.jsxs("div",{...s,...e,children:[m&&a.jsxRuntimeExports.jsx("label",{htmlFor:f,children:r}),a.jsxRuntimeExports.jsx("textarea",{name:t,...i,id:f,placeholder:n,rows:c})]}):a.jsxRuntimeExports.jsx("textarea",{id:f,name:t,...e,...i,...s,placeholder:n,rows:c})};d.registerChaiBlock(ee,{type:"TextArea",label:"TextArea",category:"core",icon:p.InputIcon,group:"form",hidden:!0,props:{fieldName:l.u({title:"Field Name",default:"textarea"}),showLabel:l.r({title:"Show label",default:!0}),styles:l.S({default:""}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),_rows:l.c({title:"Rows",default:3})}});const te=o=>{const{blockProps:e,fieldName:t,label:r,placeholder:n,styles:s,inputStyles:i,required:c,showLabel:m,_multiple:f=!1}=o,y=h.generateUUID();return m?a.jsxRuntimeExports.jsxs("div",{...s,children:[m&&a.jsxRuntimeExports.jsx("label",{htmlFor:y,children:r}),a.jsxRuntimeExports.jsxs("select",{...i,id:y,placeholder:n,required:c,multiple:f,name:t,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:n}),b.map(o.options,x=>a.jsxRuntimeExports.jsx("option",{selected:b.get(x,"selected",!1),value:x.value,dangerouslySetInnerHTML:{__html:x.label}},x.value))]})]}):a.jsxRuntimeExports.jsxs("select",{id:y,...s,...e,placeholder:n,required:c,multiple:f,name:t,children:[a.jsxRuntimeExports.jsx("option",{value:"",disabled:!0,selected:!0,hidden:!0,children:n}),b.map(o.options,x=>a.jsxRuntimeExports.jsx("option",{selected:b.get(x,"selected",!1),value:x.value,dangerouslySetInnerHTML:{__html:x.label}},x.value))]})};d.registerChaiBlock(te,{type:"Select",label:"Select",category:"core",icon:p.DropdownMenuIcon,group:"form",hidden:!0,props:{styles:l.S({default:""}),fieldName:l.u({title:"Field Name",default:"select"}),showLabel:l.r({title:"Show label",default:!0}),inputStyles:l.S({default:"w-full p-1"}),label:l.u({title:"Label",default:"Label"}),placeholder:l.u({title:"Placeholder",default:"Placeholder"}),required:l.r({title:"Required",default:!1}),_multiple:l.r({title:"Multiple Choice",default:!1}),options:l.h({title:"Options",itemProperties:{label:l.u({title:"Label",default:""}),value:l.u({title:"Value",default:""})}})}});const le=o=>{const{blockProps:e,fieldName:t,label:r,styles:n,inputStyles:s,required:i,checked:c,showLabel:m=!0}=o,f=h.generateUUID();return m?a.jsxRuntimeExports.jsxs("div",{...n,...e,children:[a.jsxRuntimeExports.jsx("input",{...s,name:t,id:f,type:"checkbox",required:i,defaultChecked:c}),r&&r!=="Label"&&a.jsxRuntimeExports.jsx("label",{htmlFor:f,children:r})]}):a.jsxRuntimeExports.jsx("input",{id:f,...e,...s,...n,type:"checkbox",required:i,name:t})};d.registerChaiBlock(le,{type:"Checkbox",label:"Checkbox",category:"core",icon:p.CheckboxIcon,group:"form",hidden:!0,props:{fieldName:l.u({title:"Field Name",default:"checkbox"}),styles:l.S({default:"flex items-center gap-x-2"}),label:l.u({title:"Label",default:"Label"}),checked:l.r({title:"Checked",default:!1}),required:l.r({title:"Required",default:!1})}});const oe=o=>{const{blockProps:e,fieldName:t,label:r,styles:n,inputStyles:s,checked:i,required:c,showLabel:m=!0}=o,f=h.generateUUID();return m?a.jsxRuntimeExports.jsxs("div",{...n,...e,children:[a.jsxRuntimeExports.jsx("input",{...s,name:t,id:f,type:"radio",required:c,defaultChecked:i}),r&&a.jsxRuntimeExports.jsx("label",{htmlFor:f,children:r})]}):a.jsxRuntimeExports.jsx("input",{id:f,...e,...s,...n,type:"radio",required:c,checked:i,name:t})};d.registerChaiBlock(oe,{type:"Radio",label:"Radio",category:"core",icon:p.RadiobuttonIcon,group:"form",hidden:!0,props:{styles:l.S({default:"flex items-center w-max gap-x-2"}),fieldName:l.u({title:"Field Name",default:"radio"}),label:l.u({title:"Label",default:"Label"}),checked:l.r({title:"Checked",default:!1}),required:l.r({title:"Required",default:!1})}});const re=o=>{const{blockProps:e,inBuilder:t,label:r,placeholder:n,styles:s,inputStyles:i,icon:c,iconPos:m}=o,f=h.generateUUID(),y={"x-bind:disabled":"formLoading"};return a.jsxRuntimeExports.jsxs("button",{id:f,...y,...i,...s,...e||{},type:t?"button":"submit",placeholder:n,children:[r,c&&a.jsxRuntimeExports.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:c}})]})};d.registerChaiBlock(re,{type:"FormButton",label:"Submit Button",category:"core",icon:p.ButtonIcon,group:"form",hidden:!0,props:{label:l.u({title:"Label",default:"Submit"}),styles:l.S({default:"text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"}),icon:l.T({title:"Icon",default:""}),iconPos:l.f({title:"Icon Position",default:"order-last",options:[{title:"Start",value:"order-first"},{title:"End",value:"order-last"}]})}});const se=b.noop;exports.loadWebBlocks=se;
|