@chaibuilder/sdk 2.2.35 → 2.2.37

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.
@@ -1,4 +1,4 @@
1
- import { registerChaiBlockSchema as u, StylesProp as d, registerChaiBlock as p, stylesProp as P, closestBlockProp as H } from "@chaibuilder/runtime";
1
+ import { registerChaiBlockSchema as d, StylesProp as u, registerChaiBlock as p, stylesProp as P, closestBlockProp as H } from "@chaibuilder/runtime";
2
2
  import { jsx as s, jsxs as f, Fragment as N } from "react/jsx-runtime";
3
3
  import { c as B, g as w } from "./common-functions-BGzDsf1z.js";
4
4
  import * as g from "react";
@@ -18,9 +18,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
18
18
  label: "Box",
19
19
  category: "core",
20
20
  group: "basic",
21
- ...u({
21
+ ...d({
22
22
  properties: {
23
- styles: d(""),
23
+ styles: u(""),
24
24
  backgroundImage: {
25
25
  type: "string",
26
26
  default: "",
@@ -83,9 +83,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
83
83
  category: "core",
84
84
  icon: R,
85
85
  group: "basic",
86
- ...u({
86
+ ...d({
87
87
  properties: {
88
- styles: d("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
88
+ styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
89
89
  content: {
90
90
  type: "string",
91
91
  title: "Button label",
@@ -155,9 +155,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
155
155
  category: "core",
156
156
  icon: z,
157
157
  group: "basic",
158
- ...u({
158
+ ...d({
159
159
  properties: {
160
- styles: d("p-2 rounded-md flex items-center"),
160
+ styles: u("p-2 rounded-md flex items-center"),
161
161
  content: {
162
162
  type: "string",
163
163
  title: "Button label",
@@ -198,9 +198,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
198
198
  category: "core",
199
199
  icon: D,
200
200
  group: "advanced",
201
- ...u({
201
+ ...d({
202
202
  properties: {
203
- styles: d(""),
203
+ styles: u(""),
204
204
  htmlCode: {
205
205
  type: "string",
206
206
  default: "<div><p>Enter your HTML code here...</p></div>",
@@ -219,7 +219,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
219
219
  category: "core",
220
220
  icon: ce,
221
221
  group: "advanced",
222
- ...u({
222
+ ...d({
223
223
  properties: {
224
224
  scripts: {
225
225
  type: "string",
@@ -240,9 +240,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
240
240
  category: "core",
241
241
  icon: j,
242
242
  group: "basic",
243
- ...u({
243
+ ...d({
244
244
  properties: {
245
- styles: d("bg-gray-900 h-0.5 py-2 my-1")
245
+ styles: u("bg-gray-900 h-0.5 py-2 my-1")
246
246
  }
247
247
  })
248
248
  }, Be = (e) => {
@@ -255,9 +255,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
255
255
  label: "Empty Box",
256
256
  category: "core",
257
257
  group: "basic",
258
- ...u({
258
+ ...d({
259
259
  properties: {
260
- styles: d(""),
260
+ styles: u(""),
261
261
  backgroundImage: {
262
262
  type: "string",
263
263
  title: "Background Image",
@@ -299,10 +299,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
299
299
  category: "core",
300
300
  icon: U,
301
301
  group: "form",
302
- ...u({
302
+ ...d({
303
303
  properties: {
304
- styles: d("flex items-center gap-x-2"),
305
- inputStyles: d(""),
304
+ styles: u("flex items-center gap-x-2"),
305
+ inputStyles: u(""),
306
306
  fieldName: {
307
307
  type: "string",
308
308
  title: "Field Name",
@@ -373,9 +373,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
373
373
  styles: "#styles:bg-black text-white rounded px-3 py-1,"
374
374
  }
375
375
  ],
376
- ...u({
376
+ ...d({
377
377
  properties: {
378
- styles: d(""),
378
+ styles: u(""),
379
379
  action: {
380
380
  type: "string",
381
381
  title: "Submit URL",
@@ -399,44 +399,29 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
399
399
  aiProps: ["errorMessage", "successMessage"],
400
400
  canAcceptBlock: () => !0
401
401
  }, Ne = (e) => {
402
- const { blockProps: t, inBuilder: o, label: l, styles: r, inputStyles: n, icon: i, iconSize: a, iconPos: c } = e, m = w();
403
- return /* @__PURE__ */ f(
404
- "button",
405
- {
406
- id: m,
407
- ...{
408
- "x-bind:disabled": "formLoading"
409
- },
410
- ...n,
411
- ...r,
412
- ...t || {},
413
- type: o ? "button" : "submit",
414
- "aria-label": l,
415
- children: [
416
- l,
417
- i && /* @__PURE__ */ s(
418
- "div",
419
- {
420
- style: { width: a + "px" },
421
- className: c + " " + (c === "order-first" ? "mr-2" : "ml-2") || "",
422
- dangerouslySetInnerHTML: { __html: i }
423
- }
424
- )
425
- ]
426
- }
427
- );
402
+ const { blockProps: t, inBuilder: o, label: l, styles: r, icon: n, iconSize: i, iconPos: a } = e, c = w();
403
+ return /* @__PURE__ */ f("button", { id: c, ...r, ...t || {}, type: o ? "button" : "submit", "aria-label": l, children: [
404
+ l,
405
+ n && /* @__PURE__ */ s(
406
+ "div",
407
+ {
408
+ style: { width: i + "px" },
409
+ className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
410
+ dangerouslySetInnerHTML: { __html: n }
411
+ }
412
+ )
413
+ ] });
428
414
  }, Re = {
429
415
  type: "FormButton",
430
416
  label: "Submit Button",
431
417
  category: "core",
432
418
  icon: R,
433
419
  group: "form",
434
- ...u({
420
+ ...d({
435
421
  properties: {
436
- styles: d(
422
+ styles: u(
437
423
  "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
438
424
  ),
439
- inputStyles: d(""),
440
425
  label: {
441
426
  type: "string",
442
427
  title: "Label",
@@ -567,10 +552,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
567
552
  category: "core",
568
553
  icon: A,
569
554
  group: "form",
570
- ...u({
555
+ ...d({
571
556
  properties: {
572
- styles: d(""),
573
- inputStyles: d("w-full p-1"),
557
+ styles: u(""),
558
+ inputStyles: u("w-full p-1"),
574
559
  fieldName: {
575
560
  type: "string",
576
561
  title: "Field Name",
@@ -681,9 +666,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
681
666
  category: "core",
682
667
  icon: q,
683
668
  group: "form",
684
- ...u({
669
+ ...d({
685
670
  properties: {
686
- styles: d(),
671
+ styles: u(),
687
672
  content: {
688
673
  type: "string",
689
674
  title: "Content",
@@ -717,10 +702,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
717
702
  category: "core",
718
703
  icon: F,
719
704
  group: "form",
720
- ...u({
705
+ ...d({
721
706
  properties: {
722
- styles: d("flex items-center gap-x-2"),
723
- inputStyles: d(""),
707
+ styles: u("flex items-center gap-x-2"),
708
+ inputStyles: u(""),
724
709
  fieldName: {
725
710
  type: "string",
726
711
  title: "Field Name",
@@ -768,10 +753,10 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
768
753
  category: "core",
769
754
  icon: V,
770
755
  group: "form",
771
- ...u({
756
+ ...d({
772
757
  properties: {
773
- styles: d(""),
774
- inputStyles: d("w-full p-1"),
758
+ styles: u(""),
759
+ inputStyles: u("w-full p-1"),
775
760
  fieldName: {
776
761
  type: "string",
777
762
  title: "Field Name",
@@ -860,15 +845,15 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
860
845
  category: "core",
861
846
  icon: A,
862
847
  group: "form",
863
- ...u({
848
+ ...d({
864
849
  properties: {
865
850
  fieldName: {
866
851
  type: "string",
867
852
  title: "Field Name",
868
853
  default: "fieldName"
869
854
  },
870
- styles: d(""),
871
- inputStyles: d("w-full p-1"),
855
+ styles: u(""),
856
+ inputStyles: u("w-full p-1"),
872
857
  showLabel: {
873
858
  type: "boolean",
874
859
  title: "Show Label",
@@ -923,7 +908,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
923
908
  category: "core",
924
909
  group: "basic",
925
910
  hidden: !0,
926
- ...u({
911
+ ...d({
927
912
  properties: {
928
913
  globalBlock: {
929
914
  type: "string",
@@ -947,7 +932,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
947
932
  category: "core",
948
933
  icon: O,
949
934
  group: "typography",
950
- ...u({
935
+ ...d({
951
936
  properties: {
952
937
  tag: {
953
938
  type: "string",
@@ -955,7 +940,7 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
955
940
  title: "Level",
956
941
  enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
957
942
  },
958
- styles: d("text-3xl"),
943
+ styles: u("text-3xl"),
959
944
  content: {
960
945
  type: "string",
961
946
  default: "Heading goes here",
@@ -976,9 +961,9 @@ const v = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ s("div",
976
961
  category: "core",
977
962
  group: "basic",
978
963
  hidden: !0,
979
- ...u({
964
+ ...d({
980
965
  properties: {
981
- styles: d("")
966
+ styles: u("")
982
967
  }
983
968
  }),
984
969
  canAcceptBlock: () => !0,
@@ -1012,9 +997,9 @@ p(Je, {
1012
997
  group: "table",
1013
998
  hidden: !0,
1014
999
  icon: G,
1015
- ...u({
1000
+ ...d({
1016
1001
  properties: {
1017
- styles: d("")
1002
+ styles: u("")
1018
1003
  }
1019
1004
  }),
1020
1005
  blocks: L("Table")
@@ -1026,9 +1011,9 @@ p(Qe, {
1026
1011
  group: "table",
1027
1012
  hidden: !0,
1028
1013
  icon: Y,
1029
- ...u({
1014
+ ...d({
1030
1015
  properties: {
1031
- styles: d("")
1016
+ styles: u("")
1032
1017
  }
1033
1018
  }),
1034
1019
  blocks: L("TableHead")
@@ -1040,9 +1025,9 @@ p(Ze, {
1040
1025
  group: "table",
1041
1026
  hidden: !0,
1042
1027
  icon: W,
1043
- ...u({
1028
+ ...d({
1044
1029
  properties: {
1045
- styles: d("")
1030
+ styles: u("")
1046
1031
  }
1047
1032
  }),
1048
1033
  blocks: L("TableBody")
@@ -1054,9 +1039,9 @@ p(Ke, {
1054
1039
  group: "table",
1055
1040
  hidden: !0,
1056
1041
  icon: X,
1057
- ...u({
1042
+ ...d({
1058
1043
  properties: {
1059
- styles: d("")
1044
+ styles: u("")
1060
1045
  }
1061
1046
  }),
1062
1047
  blocks: L("TableRow")
@@ -1068,9 +1053,9 @@ p(et, {
1068
1053
  group: "table",
1069
1054
  hidden: !0,
1070
1055
  icon: J,
1071
- ...u({
1056
+ ...d({
1072
1057
  properties: {
1073
- styles: d(""),
1058
+ styles: u(""),
1074
1059
  content: {
1075
1060
  type: "string",
1076
1061
  default: "Heading goes here",
@@ -1149,9 +1134,9 @@ const $ = (e, ...t) => ({
1149
1134
  category: "core",
1150
1135
  icon: Q,
1151
1136
  group: "media",
1152
- ...u({
1137
+ ...d({
1153
1138
  properties: {
1154
- styles: d(""),
1139
+ styles: u(""),
1155
1140
  icon: {
1156
1141
  type: "string",
1157
1142
  title: "Icon",
@@ -1194,9 +1179,9 @@ const $ = (e, ...t) => ({
1194
1179
  category: "core",
1195
1180
  icon: Z,
1196
1181
  group: "media",
1197
- ...u({
1182
+ ...d({
1198
1183
  properties: {
1199
- styles: d(""),
1184
+ styles: u(""),
1200
1185
  image: {
1201
1186
  type: "string",
1202
1187
  title: "Image",
@@ -1271,9 +1256,9 @@ const $ = (e, ...t) => ({
1271
1256
  category: "core",
1272
1257
  icon: K,
1273
1258
  group: "basic",
1274
- ...u({
1259
+ ...d({
1275
1260
  properties: {
1276
- styles: d(""),
1261
+ styles: u(""),
1277
1262
  content: {
1278
1263
  type: "string",
1279
1264
  default: "Link goes here",
@@ -1319,9 +1304,9 @@ const $ = (e, ...t) => ({
1319
1304
  icon: ee,
1320
1305
  category: "core",
1321
1306
  group: "basic",
1322
- ...u({
1307
+ ...d({
1323
1308
  properties: {
1324
- styles: d(""),
1309
+ styles: u(""),
1325
1310
  listType: {
1326
1311
  type: "string",
1327
1312
  title: "List Type",
@@ -1373,9 +1358,9 @@ const $ = (e, ...t) => ({
1373
1358
  icon: te,
1374
1359
  category: "core",
1375
1360
  group: "basic",
1376
- ...u({
1361
+ ...d({
1377
1362
  properties: {
1378
- styles: d(""),
1363
+ styles: u(""),
1379
1364
  content: {
1380
1365
  type: "string",
1381
1366
  default: "List item",
@@ -1404,9 +1389,9 @@ const $ = (e, ...t) => ({
1404
1389
  category: "core",
1405
1390
  icon: oe,
1406
1391
  group: "typography",
1407
- ...u({
1392
+ ...d({
1408
1393
  properties: {
1409
- styles: d(""),
1394
+ styles: u(""),
1410
1395
  content: {
1411
1396
  type: "string",
1412
1397
  title: "Content",
@@ -1442,7 +1427,7 @@ const $ = (e, ...t) => ({
1442
1427
  category: "core",
1443
1428
  group: "basic",
1444
1429
  hidden: !0,
1445
- ...u({
1430
+ ...d({
1446
1431
  properties: {
1447
1432
  partialBlockId: {
1448
1433
  type: "string",
@@ -1514,9 +1499,9 @@ const $ = (e, ...t) => ({
1514
1499
  canDelete: () => !0,
1515
1500
  canAcceptBlock: () => !0,
1516
1501
  canBeNested: (e) => e === "Row",
1517
- ...u({
1502
+ ...d({
1518
1503
  properties: {
1519
- styles: d(""),
1504
+ styles: u(""),
1520
1505
  colSpan: {
1521
1506
  type: "number",
1522
1507
  title: "Column Span",
@@ -1556,9 +1541,9 @@ const $ = (e, ...t) => ({
1556
1541
  category: "core",
1557
1542
  wrapper: !0,
1558
1543
  canAcceptBlock: (e) => e === "Column",
1559
- ...u({
1544
+ ...d({
1560
1545
  properties: {
1561
- styles: d(""),
1546
+ styles: u(""),
1562
1547
  colCount: {
1563
1548
  type: "number",
1564
1549
  default: 2,
@@ -1587,9 +1572,9 @@ const $ = (e, ...t) => ({
1587
1572
  category: "core",
1588
1573
  icon: le,
1589
1574
  group: "typography",
1590
- ...u({
1575
+ ...d({
1591
1576
  properties: {
1592
- styles: d(""),
1577
+ styles: u(""),
1593
1578
  content: {
1594
1579
  type: "string",
1595
1580
  title: "Content",
@@ -1613,9 +1598,9 @@ const $ = (e, ...t) => ({
1613
1598
  label: "Span",
1614
1599
  category: "core",
1615
1600
  group: "typography",
1616
- ...u({
1601
+ ...d({
1617
1602
  properties: {
1618
- styles: d(""),
1603
+ styles: u(""),
1619
1604
  content: {
1620
1605
  type: "string",
1621
1606
  title: "Content",
@@ -1635,9 +1620,9 @@ const $ = (e, ...t) => ({
1635
1620
  category: "core",
1636
1621
  group: "typography",
1637
1622
  icon: re,
1638
- ...u({
1623
+ ...d({
1639
1624
  properties: {
1640
- styles: d("text-black"),
1625
+ styles: u("text-black"),
1641
1626
  content: {
1642
1627
  title: "Content",
1643
1628
  type: "string",
@@ -1742,9 +1727,9 @@ const $ = (e, ...t) => ({
1742
1727
  category: "core",
1743
1728
  icon: ne,
1744
1729
  group: "media",
1745
- ...u({
1730
+ ...d({
1746
1731
  properties: {
1747
- styles: d("absolute h-full w-full object-cover"),
1732
+ styles: u("absolute h-full w-full object-cover"),
1748
1733
  videoSource: {
1749
1734
  type: "string",
1750
1735
  default: "Custom",
@@ -1853,7 +1838,7 @@ const $ = (e, ...t) => ({
1853
1838
  // content: "No items",
1854
1839
  // },
1855
1840
  ],
1856
- ...u({
1841
+ ...d({
1857
1842
  properties: {
1858
1843
  styles: P("grid gap-4 md:grid-cols-2 xl:grid-cols-3"),
1859
1844
  repeaterItems: {
@@ -1920,7 +1905,7 @@ const $ = (e, ...t) => ({
1920
1905
  icon: M,
1921
1906
  hidden: !0,
1922
1907
  group: "basic",
1923
- ...u({
1908
+ ...d({
1924
1909
  properties: {
1925
1910
  styles: P(""),
1926
1911
  parentTag: H("Repeater", "tag")
@@ -1939,7 +1924,7 @@ const $ = (e, ...t) => ({
1939
1924
  label: "Empty State",
1940
1925
  hidden: !0,
1941
1926
  group: "basic",
1942
- ...u({
1927
+ ...d({
1943
1928
  properties: { styles: P("p-5 flex items-center justify-center") }
1944
1929
  }),
1945
1930
  canAcceptBlock: () => !0,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "2.2.35",
8
+ "version": "2.2.37",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",