@aswin.dev/editor 0.7.3 → 0.7.6

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.
Files changed (93) hide show
  1. package/dist/{AiChatSidebar-Dt5pvG5t.js → AiChatSidebar-DM2ri7KX.js} +1 -1
  2. package/dist/{AiFeatureMenu-BipxcGap.js → AiFeatureMenu-BrZBJ0R5.js} +1 -1
  3. package/dist/{CloudEditor-CnUX0IOW.js → CloudEditor-BRpzzfQn.js} +8 -8
  4. package/dist/{CollaboratorBar-NaaZTjbs.js → CollaboratorBar-DsRXj3Kn.js} +1 -1
  5. package/dist/CountdownToolbar-B9IAZzeV.js +194 -0
  6. package/dist/{DesignReferenceSidebar-CZg97bbj.js → DesignReferenceSidebar-B1iw3Bb7.js} +1 -1
  7. package/dist/{ModuleBrowserModal-D2EVdexc.js → ModuleBrowserModal-DVnd1dqR.js} +4 -4
  8. package/dist/{ModulePreviewCanvas-P3N-nxkU.js → ModulePreviewCanvas-D9jBAoBQ.js} +29 -29
  9. package/dist/{ParagraphEditor-BbRuKhWv.js → ParagraphEditor-CO3V0H_V.js} +7 -7
  10. package/dist/{SaveModuleDialog-DLZa3m3O.js → SaveModuleDialog-CboNFwIA.js} +2 -2
  11. package/dist/{NumberWithSuffix-CihczoAd.js → SlidingPillSelect-DfcBdJqN.js} +122 -106
  12. package/dist/{SnapshotHistory-Csg1_jXi.js → SnapshotHistory-C26pvPre.js} +1 -1
  13. package/dist/{TestEmailModal-m3okLbJz.js → TestEmailModal-B4OoUWb_.js} +2 -2
  14. package/dist/{TitleEditor-CtJIS5ER.js → TitleEditor-DU_QWG_m.js} +2 -2
  15. package/dist/{TplModal-CQCrKeKP.js → TplModal-Dr6Do8oU.js} +1 -1
  16. package/dist/{blockTypeIcons-Dah0pgt-.js → blockTypeIcons-cRDr36gk.js} +48 -30
  17. package/dist/bundle-stats.json +6 -6
  18. package/dist/cdn/chunks/{AccessibilityPanel-Bt_fD7QT.js → AccessibilityPanel-Csd47zqI.js} +9 -9
  19. package/dist/cdn/chunks/{AccessibilityPanel-Bt_fD7QT.js.map → AccessibilityPanel-Csd47zqI.js.map} +1 -1
  20. package/dist/cdn/chunks/{AiFeatureMenu-Bn-0rgfr.js → AiFeatureMenu-BlnZF5pf.js} +7 -7
  21. package/dist/cdn/chunks/{AiFeatureMenu-Bn-0rgfr.js.map → AiFeatureMenu-BlnZF5pf.js.map} +1 -1
  22. package/dist/cdn/chunks/{BlockA11yBadge-Cj18Iw0p.js → BlockA11yBadge-VY8NqI9n.js} +4 -4
  23. package/dist/cdn/chunks/{BlockA11yBadge-Cj18Iw0p.js.map → BlockA11yBadge-VY8NqI9n.js.map} +1 -1
  24. package/dist/cdn/chunks/{CloudEditor-56lVcdot.js → CloudEditor-D0TrKlva.js} +178 -178
  25. package/dist/cdn/chunks/{CloudEditor-56lVcdot.js.map → CloudEditor-D0TrKlva.js.map} +1 -1
  26. package/dist/cdn/chunks/{CollaboratorBar-B7DCV3xp.js → CollaboratorBar-BhMNTI_h.js} +3 -3
  27. package/dist/cdn/chunks/{CollaboratorBar-B7DCV3xp.js.map → CollaboratorBar-BhMNTI_h.js.map} +1 -1
  28. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js +196 -0
  29. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js.map +1 -0
  30. package/dist/cdn/chunks/{ModuleBrowserModal-CiIY7ZGv.js → ModuleBrowserModal-CpYPeiKv.js} +8 -8
  31. package/dist/cdn/chunks/{ModuleBrowserModal-CiIY7ZGv.js.map → ModuleBrowserModal-CpYPeiKv.js.map} +1 -1
  32. package/dist/cdn/chunks/{ModulePreviewCanvas-M7_OGV2m.js → ModulePreviewCanvas-BIYYnqUq.js} +24 -24
  33. package/dist/cdn/chunks/{ModulePreviewCanvas-M7_OGV2m.js.map → ModulePreviewCanvas-BIYYnqUq.js.map} +1 -1
  34. package/dist/cdn/chunks/{ParagraphEditor-1XJOpiLX.js → ParagraphEditor-ZV5SYYw8.js} +53 -53
  35. package/dist/cdn/chunks/{ParagraphEditor-1XJOpiLX.js.map → ParagraphEditor-ZV5SYYw8.js.map} +1 -1
  36. package/dist/cdn/chunks/{RichTextEditorContent-C2q8sbp2.js → RichTextEditorContent-Dx05ETtt.js} +4 -4
  37. package/dist/cdn/chunks/{RichTextEditorContent-C2q8sbp2.js.map → RichTextEditorContent-Dx05ETtt.js.map} +1 -1
  38. package/dist/cdn/chunks/{SaveModuleDialog-BNxh1jPT.js → SaveModuleDialog-DJEEK7Wb.js} +23 -23
  39. package/dist/cdn/chunks/{SaveModuleDialog-BNxh1jPT.js.map → SaveModuleDialog-DJEEK7Wb.js.map} +1 -1
  40. package/dist/cdn/chunks/{NumberWithSuffix-DfVBnsgc.js → SlidingPillSelect-BhPCkqVu.js} +132 -116
  41. package/dist/cdn/chunks/SlidingPillSelect-BhPCkqVu.js.map +1 -0
  42. package/dist/cdn/chunks/{TitleEditor-IF7VzLTk.js → TitleEditor-fu1A87Ld.js} +21 -21
  43. package/dist/cdn/chunks/{TitleEditor-IF7VzLTk.js.map → TitleEditor-fu1A87Ld.js.map} +1 -1
  44. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js +25 -0
  45. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js.map +1 -0
  46. package/dist/cdn/chunks/{de-B05yW8Gi.js → de-BsYijc0r.js} +49 -2
  47. package/dist/cdn/chunks/de-BsYijc0r.js.map +1 -0
  48. package/dist/cdn/chunks/{en-BII7695P.js → en-DMu9hPIC.js} +49 -2
  49. package/dist/cdn/chunks/en-DMu9hPIC.js.map +1 -0
  50. package/dist/cdn/chunks/{extensions-B0eT-yjf.js → extensions-BbFKsjyT.js} +26 -26
  51. package/dist/cdn/chunks/{extensions-B0eT-yjf.js.map → extensions-BbFKsjyT.js.map} +1 -1
  52. package/dist/cdn/chunks/{features-BrvE2Fzv.js → features-uApxwJMz.js} +1953 -1836
  53. package/dist/cdn/chunks/features-uApxwJMz.js.map +1 -0
  54. package/dist/cdn/chunks/{icons-C7wtAD8p.js → icons-DZb4EX9m.js} +26 -9
  55. package/dist/cdn/chunks/icons-DZb4EX9m.js.map +1 -0
  56. package/dist/cdn/chunks/{media-library-Cl5XuaKy.js → media-library-B3g52j8R.js} +529 -529
  57. package/dist/cdn/chunks/{media-library-Cl5XuaKy.js.map → media-library-B3g52j8R.js.map} +1 -1
  58. package/dist/cdn/chunks/{quality-Va91a3N8.js → quality-Ug5lFGHP.js} +288 -288
  59. package/dist/cdn/chunks/{quality-Va91a3N8.js.map → quality-Ug5lFGHP.js.map} +1 -1
  60. package/dist/cdn/chunks/{renderer-si0Zgxeb.js → renderer-jXCdXjV-.js} +19 -19
  61. package/dist/cdn/chunks/{renderer-si0Zgxeb.js.map → renderer-jXCdXjV-.js.map} +1 -1
  62. package/dist/cdn/chunks/{src-BLyYIbdZ.js → src-FMtH5ZvJ.js} +9 -9
  63. package/dist/cdn/chunks/{src-BLyYIbdZ.js.map → src-FMtH5ZvJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{styles-C6BQLT9F.js → styles-Co9vw4ag.js} +1332 -1101
  65. package/dist/cdn/chunks/styles-Co9vw4ag.js.map +1 -0
  66. package/dist/cdn/chunks/{tiptap-D8whBv5F.js → tiptap-qXOh0vzV.js} +2 -2
  67. package/dist/cdn/chunks/{tiptap-D8whBv5F.js.map → tiptap-qXOh0vzV.js.map} +1 -1
  68. package/dist/cdn/editor.css +1 -1
  69. package/dist/cdn/editor.js +85 -85
  70. package/dist/cdn/editor.js.map +1 -1
  71. package/dist/{cloud-BoS0J0vs.js → cloud-COUuu_KE.js} +1 -1
  72. package/dist/{de-C74F9xK3.js → de-CR1qAkAm.js} +48 -1
  73. package/dist/{dist-C2grMquk.js → dist-DP82Y0rs.js} +155 -131
  74. package/dist/{en-B24jVTeO.js → en-jbnp1n6M.js} +48 -1
  75. package/dist/{extensions-DsmjHqBF.js → extensions-Bg22D6c8.js} +16 -16
  76. package/dist/index.d.ts +10 -10
  77. package/dist/style.css +1 -1
  78. package/dist/{styles-BMFMtR9R.js → styles-DgL0UYj0.js} +1456 -1225
  79. package/dist/templatical-editor.js +6 -6
  80. package/dist/{useEditorCore-CtNAo0uy.js → useEditorCore-CSlYQZWx.js} +1756 -1661
  81. package/dist/{useMergeTag-2vTcVpNo.js → useMergeTag-BVL3A4OO.js} +4 -4
  82. package/package.json +7 -7
  83. package/dist/CountdownToolbar-CbhSp_uq.js +0 -210
  84. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js +0 -212
  85. package/dist/cdn/chunks/CountdownToolbar-BtaD3d3-.js.map +0 -1
  86. package/dist/cdn/chunks/NumberWithSuffix-DfVBnsgc.js.map +0 -1
  87. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js +0 -24
  88. package/dist/cdn/chunks/blockTypeIcons-tPBKQ8WC.js.map +0 -1
  89. package/dist/cdn/chunks/de-B05yW8Gi.js.map +0 -1
  90. package/dist/cdn/chunks/en-BII7695P.js.map +0 -1
  91. package/dist/cdn/chunks/features-BrvE2Fzv.js.map +0 -1
  92. package/dist/cdn/chunks/icons-C7wtAD8p.js.map +0 -1
  93. package/dist/cdn/chunks/styles-C6BQLT9F.js.map +0 -1
@@ -58,7 +58,8 @@ var e = {
58
58
  menu: "Menü",
59
59
  table: "Tabelle",
60
60
  countdown: "Countdown",
61
- form: "Formular"
61
+ form: "Formular",
62
+ discountCoupon: "Rabattcode"
62
63
  },
63
64
  sidebar: {
64
65
  content: "Inhalt",
@@ -307,6 +308,52 @@ var e = {
307
308
  htmlHint: "HTML ist erlaubt. Nutze Links und Kleingedrucktes nach Bedarf."
308
309
  }
309
310
  },
311
+ discountCoupon: {
312
+ description: "Gewinnen Sie Kunden mit einem Rabattcode für das Abonnement.",
313
+ modeNone: "Kein Rabatt",
314
+ modeAuto: "Rabattcode",
315
+ modeManual: "Shopify-Rabatt manuell eingeben",
316
+ autoHint: "Für jedes Abonnement einen einmaligen, nicht wiederverwendbaren Code erzeugen.",
317
+ selectType: "Typ wählen",
318
+ types: {
319
+ percentageOff: "Prozent rabatt",
320
+ fixedAmount: "Fester Betrag",
321
+ freeShipping: "Kostenloser Versand"
322
+ },
323
+ value: "Wert",
324
+ currencyCode: "Währung",
325
+ expiration: "Ablauf des Rabatts festlegen",
326
+ expirationDaysSuffix: "Tage",
327
+ tagCustomer: "Gesendeten Rabattcode als Tag beim Kunden hinzufügen",
328
+ combinations: "Kombinationen",
329
+ combineProduct: "Produktrabatte",
330
+ combineOrder: "Bestellrabatte",
331
+ combineShipping: "Versandrabatte",
332
+ manualPlaceholder: "Rabattcode",
333
+ manualFooterLead: "Rabatt erstellen",
334
+ manualFooterTail: " in deinem Shopify-Admin und gib ihn oben ein.",
335
+ manualBlankError: "Dieses Feld darf nicht leer sein",
336
+ confirmationTextLabel: "Bestätigungstext",
337
+ afterClickLabel: "Nach dem Klick",
338
+ afterClickNone: "Nichts tun",
339
+ afterClickLoadPage: "Zu URL wechseln",
340
+ afterClickCloseCampaign: "Kampagne schließen",
341
+ afterClickNextStep: "Nächsten Schritt anzeigen",
342
+ afterClickPageUrl: "Seiten-URL",
343
+ afterClickUrlPlaceholder: "https://...",
344
+ previewNoDiscount: "Kein Rabatt",
345
+ previewPercentage: "{value} % Rabatt",
346
+ previewFixed: "{value} {currency} Rabatt",
347
+ previewAutoUnique: "Einmaliger Code pro Abonnement",
348
+ previewManualPrefix: "Code:",
349
+ previewManualUnset: "Shopify-Rabattcode eingeben",
350
+ previewExpires: "Läuft nach {days} Tag(en) ab",
351
+ previewTag: "Kunde mit Code taggen",
352
+ previewCombinations: "Kombinierbar mit Produkt- / Bestell- / Versandrabatten",
353
+ previewSampleCode: "THANKYOU20",
354
+ copyCode: "Code kopieren",
355
+ copyCodeFlash: "Kopiert"
356
+ },
310
357
  divider: {
311
358
  style: "Stil",
312
359
  solid: "Durchgehend",
@@ -647,12 +647,12 @@ function s(e, t) {
647
647
  };
648
648
  return n.triggerConditions = o(Object.prototype.hasOwnProperty.call(t, "triggerConditions") ? t.triggerConditions : e.triggerConditions), n;
649
649
  }
650
- function ee(e, t) {
650
+ function c(e, t) {
651
651
  let n = Object.keys(e), r = { ...e };
652
652
  for (let i of n) r[i] = s(e[i], t?.[i]);
653
653
  return r;
654
654
  }
655
- function te(e) {
655
+ function ee(e) {
656
656
  let t = (e) => o(e.triggerConditions), n = e.onClick.clickAnchor ?? "", r = n.startsWith("#") ? n.slice(1) : n;
657
657
  return {
658
658
  landing: {
@@ -687,7 +687,7 @@ function te(e) {
687
687
  }
688
688
  };
689
689
  }
690
- var ne = {
690
+ var l = {
691
691
  small: 380,
692
692
  medium: 480,
693
693
  large: 600,
@@ -695,7 +695,7 @@ var ne = {
695
695
  fullHeight: 420,
696
696
  custom: 600
697
697
  };
698
- function re() {
698
+ function te() {
699
699
  return [{
700
700
  id: "schedule-slot-1",
701
701
  dayPreset: "everyday",
@@ -708,7 +708,7 @@ function re() {
708
708
  endTime: "23:59"
709
709
  }];
710
710
  }
711
- function ie() {
711
+ function ne() {
712
712
  let e = a();
713
713
  return {
714
714
  triggers: {
@@ -773,21 +773,21 @@ function ie() {
773
773
  startDate: "",
774
774
  endDate: "",
775
775
  detailedScheduleEnabled: !0,
776
- slots: re()
776
+ slots: te()
777
777
  }
778
778
  };
779
779
  }
780
- var c = {
780
+ var re = {
781
781
  content: "<p>Enter your title</p>",
782
782
  level: 2,
783
783
  color: "#1a1a1a",
784
784
  textAlign: "left"
785
- }, l = { content: "<p>Enter your text here</p>" }, u = {
785
+ }, ie = { content: "<p>Enter your text here</p>" }, u = {
786
786
  src: "",
787
787
  alt: "",
788
788
  width: "full",
789
789
  align: "center"
790
- }, ae = {
790
+ }, d = {
791
791
  text: "Click Here",
792
792
  url: "",
793
793
  backgroundColor: "#333333",
@@ -803,7 +803,7 @@ var c = {
803
803
  borderWidth: 0,
804
804
  borderColor: "#000000",
805
805
  borderSides: "all"
806
- }, oe = {
806
+ }, f = {
807
807
  inputType: "text",
808
808
  name: "field",
809
809
  label: "Label",
@@ -847,12 +847,12 @@ var c = {
847
847
  inputBorderColor: "#d1d5db",
848
848
  inputBorderSides: "all",
849
849
  inputWidth: "full"
850
- }, d = {
850
+ }, ae = {
851
851
  lineStyle: "solid",
852
852
  color: "#e0e0e0",
853
853
  thickness: 1,
854
854
  width: "full"
855
- }, f = { columns: "1" }, p = {
855
+ }, oe = { columns: "1" }, p = {
856
856
  url: "",
857
857
  thumbnailUrl: "",
858
858
  alt: "Video",
@@ -907,6 +907,21 @@ var c = {
907
907
  buttonBorderRadius: 8,
908
908
  buttonFontSize: 14
909
909
  }, b = {
910
+ discountMode: "auto_code",
911
+ valueType: "fixed_amount",
912
+ valueAmount: 10,
913
+ currencyCode: "USD",
914
+ expirationEnabled: !0,
915
+ expirationDays: 1,
916
+ tagCustomerWithCode: !0,
917
+ combineProductDiscounts: !0,
918
+ combineOrderDiscounts: !0,
919
+ combineShippingDiscounts: !1,
920
+ manualDiscountCode: "",
921
+ copyConfirmationText: "Copied to clipboard",
922
+ afterCopyAction: "none",
923
+ afterCopyUrl: ""
924
+ }, x = {
910
925
  targetDate: "",
911
926
  timezone: "UTC",
912
927
  showDays: !0,
@@ -935,24 +950,24 @@ var c = {
935
950
  enableParticles: !0,
936
951
  enableHoverFx: !0
937
952
  };
938
- function x(e) {
953
+ function S(e) {
939
954
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
940
955
  }
941
- function S(e, t) {
956
+ function C(e, t) {
942
957
  let n = { ...e };
943
958
  for (let r of Object.keys(t)) {
944
959
  let i = e[r], a = t[r];
945
- a !== void 0 && (x(i) && x(a) ? n[r] = S(i, a) : n[r] = a);
960
+ a !== void 0 && (S(i) && S(a) ? n[r] = C(i, a) : n[r] = a);
946
961
  }
947
962
  return n;
948
963
  }
949
- function C(e, t) {
950
- return !t || Object.keys(t).length === 0 ? e : S(e, t);
964
+ function w(e, t) {
965
+ return !t || Object.keys(t).length === 0 ? e : C(e, t);
951
966
  }
952
- function w() {
967
+ function T() {
953
968
  return crypto.randomUUID();
954
969
  }
955
- function T(e = 0) {
970
+ function E(e = 0) {
956
971
  return {
957
972
  top: e,
958
973
  right: e,
@@ -960,138 +975,138 @@ function T(e = 0) {
960
975
  left: e
961
976
  };
962
977
  }
963
- function E(e = 10) {
978
+ function D(e = 10) {
964
979
  return {
965
- padding: T(e),
966
- margin: T(0)
980
+ padding: E(e),
981
+ margin: E(0)
967
982
  };
968
983
  }
969
- function D(e = {}) {
970
- return C({
971
- id: w(),
984
+ function O(e = {}) {
985
+ return w({
986
+ id: T(),
972
987
  type: "title",
973
- ...c,
974
- styles: E()
988
+ ...re,
989
+ styles: D()
975
990
  }, e);
976
991
  }
977
- function O(e = {}) {
978
- return C({
979
- id: w(),
992
+ function k(e = {}) {
993
+ return w({
994
+ id: T(),
980
995
  type: "paragraph",
981
- ...l,
982
- styles: E()
996
+ ...ie,
997
+ styles: D()
983
998
  }, e);
984
999
  }
985
- function k(e = {}) {
986
- return C({
987
- id: w(),
1000
+ function A(e = {}) {
1001
+ return w({
1002
+ id: T(),
988
1003
  type: "image",
989
1004
  ...u,
990
- styles: E()
1005
+ styles: D()
991
1006
  }, e);
992
1007
  }
993
- function A(e = {}) {
994
- return C({
995
- id: w(),
1008
+ function j(e = {}) {
1009
+ return w({
1010
+ id: T(),
996
1011
  type: "button",
997
- ...ae,
998
- styles: E()
1012
+ ...d,
1013
+ styles: D()
999
1014
  }, e);
1000
1015
  }
1001
- function j(e = {}) {
1002
- return C({
1003
- id: w(),
1016
+ function M(e = {}) {
1017
+ return w({
1018
+ id: T(),
1004
1019
  type: "input",
1005
- ...oe,
1006
- styles: E()
1020
+ ...f,
1021
+ styles: D()
1007
1022
  }, e);
1008
1023
  }
1009
- function M(e = {}) {
1010
- return C({
1011
- id: w(),
1024
+ function N(e = {}) {
1025
+ return w({
1026
+ id: T(),
1012
1027
  type: "divider",
1013
- ...d,
1014
- styles: E(20)
1028
+ ...ae,
1029
+ styles: D(20)
1015
1030
  }, e);
1016
1031
  }
1017
- function N(e = {}) {
1018
- return C({
1019
- id: w(),
1032
+ function P(e = {}) {
1033
+ return w({
1034
+ id: T(),
1020
1035
  type: "section",
1021
- ...f,
1036
+ ...oe,
1022
1037
  children: [[]],
1023
- styles: E(20)
1038
+ styles: D(20)
1024
1039
  }, e);
1025
1040
  }
1026
- function P(e = {}) {
1027
- return C({
1028
- id: w(),
1041
+ function F(e = {}) {
1042
+ return w({
1043
+ id: T(),
1029
1044
  type: "video",
1030
1045
  ...p,
1031
- styles: E()
1046
+ styles: D()
1032
1047
  }, e);
1033
1048
  }
1034
- function F(e = {}) {
1035
- return C({
1036
- id: w(),
1049
+ function I(e = {}) {
1050
+ return w({
1051
+ id: T(),
1037
1052
  type: "social",
1038
1053
  icons: [],
1039
1054
  ...m,
1040
- styles: E()
1055
+ styles: D()
1041
1056
  }, e);
1042
1057
  }
1043
- function I(e = {}) {
1044
- return C({
1045
- id: w(),
1058
+ function L(e = {}) {
1059
+ return w({
1060
+ id: T(),
1046
1061
  type: "spacer",
1047
1062
  ...h,
1048
- styles: E(0)
1063
+ styles: D(0)
1049
1064
  }, e);
1050
1065
  }
1051
- function L(e = {}) {
1052
- return C({
1053
- id: w(),
1066
+ function R(e = {}) {
1067
+ return w({
1068
+ id: T(),
1054
1069
  type: "html",
1055
1070
  ...g,
1056
- styles: E()
1071
+ styles: D()
1057
1072
  }, e);
1058
1073
  }
1059
- function R(e = {}) {
1060
- return C({
1061
- id: w(),
1074
+ function z(e = {}) {
1075
+ return w({
1076
+ id: T(),
1062
1077
  type: "menu",
1063
1078
  items: [],
1064
1079
  ..._,
1065
- styles: E()
1080
+ styles: D()
1066
1081
  }, e);
1067
1082
  }
1068
- function z(e, t) {
1083
+ function B(e, t) {
1069
1084
  return Array.from({ length: t }, () => ({
1070
- id: w(),
1085
+ id: T(),
1071
1086
  cells: Array.from({ length: e }, () => ({
1072
- id: w(),
1087
+ id: T(),
1073
1088
  content: ""
1074
1089
  }))
1075
1090
  }));
1076
1091
  }
1077
- function B(e = {}) {
1078
- return C({
1079
- id: w(),
1092
+ function V(e = {}) {
1093
+ return w({
1094
+ id: T(),
1080
1095
  type: "table",
1081
- rows: z(3, 3),
1096
+ rows: B(3, 3),
1082
1097
  ...v,
1083
- styles: E()
1098
+ styles: D()
1084
1099
  }, e);
1085
1100
  }
1086
- function V(e = {}) {
1087
- return C({
1088
- id: w(),
1101
+ function H(e = {}) {
1102
+ return w({
1103
+ id: T(),
1089
1104
  type: "countdown",
1090
- ...b,
1091
- styles: E()
1105
+ ...x,
1106
+ styles: D()
1092
1107
  }, e);
1093
1108
  }
1094
- var H = {
1109
+ var U = {
1095
1110
  firstName: {
1096
1111
  name: "first_name",
1097
1112
  label: "First name",
@@ -1113,10 +1128,10 @@ var H = {
1113
1128
  placeholder: "+1 555 123 4567"
1114
1129
  }
1115
1130
  };
1116
- function U(e, t = {}) {
1117
- let n = H[e];
1131
+ function W(e, t = {}) {
1132
+ let n = U[e];
1118
1133
  return {
1119
- id: w(),
1134
+ id: T(),
1120
1135
  type: e,
1121
1136
  name: n.name,
1122
1137
  label: n.label,
@@ -1130,57 +1145,66 @@ function U(e, t = {}) {
1130
1145
  ...t
1131
1146
  };
1132
1147
  }
1133
- function W(e = {}) {
1134
- let t = C({
1135
- id: w(),
1148
+ function G(e = {}) {
1149
+ return w({
1150
+ id: T(),
1151
+ type: "discountCoupon",
1152
+ ...b,
1153
+ styles: D()
1154
+ }, e);
1155
+ }
1156
+ function K(e = {}) {
1157
+ let t = w({
1158
+ id: T(),
1136
1159
  type: "form",
1137
1160
  ...y,
1138
- fields: [U("email")],
1139
- styles: E()
1161
+ fields: [W("email")],
1162
+ styles: D()
1140
1163
  }, e);
1141
1164
  return t.fields?.length ? t : {
1142
1165
  ...t,
1143
- fields: [U("email")]
1166
+ fields: [W("email")]
1144
1167
  };
1145
1168
  }
1146
- function G(e) {
1169
+ function q(e) {
1147
1170
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
1148
1171
  }
1149
- function K(e) {
1172
+ function se(e) {
1150
1173
  let t = {};
1151
- for (let n of e.fields) t[n.key] = G(n);
1174
+ for (let n of e.fields) t[n.key] = q(n);
1152
1175
  return {
1153
- id: w(),
1176
+ id: T(),
1154
1177
  type: "custom",
1155
1178
  customType: e.type,
1156
1179
  fieldValues: t,
1157
- styles: E(),
1180
+ styles: D(),
1158
1181
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
1159
1182
  };
1160
1183
  }
1161
- function q(e, t) {
1184
+ function ce(e, t) {
1162
1185
  switch (e) {
1163
- case "section": return N(t?.section);
1164
- case "title": return D(t?.title);
1165
- case "paragraph": return O(t?.paragraph);
1166
- case "image": return k(t?.image);
1167
- case "button": return A(t?.button);
1168
- case "input": return j(t?.input);
1169
- case "divider": return M(t?.divider);
1170
- case "video": return P(t?.video);
1171
- case "social": return F(t?.social);
1172
- case "spacer": return I(t?.spacer);
1173
- case "html": return L(t?.html);
1174
- case "menu": return R(t?.menu);
1175
- case "table": return B(t?.table);
1176
- case "countdown": return V(t?.countdown);
1177
- case "form": return W(t?.form);
1186
+ case "section": return P(t?.section);
1187
+ case "title": return O(t?.title);
1188
+ case "paragraph": return k(t?.paragraph);
1189
+ case "image": return A(t?.image);
1190
+ case "button": return j(t?.button);
1191
+ case "input": return M(t?.input);
1192
+ case "divider": return N(t?.divider);
1193
+ case "video": return F(t?.video);
1194
+ case "social": return I(t?.social);
1195
+ case "spacer": return L(t?.spacer);
1196
+ case "html": return R(t?.html);
1197
+ case "menu": return z(t?.menu);
1198
+ case "table": return V(t?.table);
1199
+ case "countdown": return H(t?.countdown);
1200
+ case "form": return K(t?.form);
1201
+ case "discountCoupon": return G(t?.discountCoupon);
1178
1202
  default: throw Error(`Unknown block type: ${e}`);
1179
1203
  }
1180
1204
  }
1181
1205
  function J(e) {
1182
1206
  let t = JSON.parse(JSON.stringify(e));
1183
- return t.id = w(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => J(e)))), t;
1207
+ return t.id = T(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => J(e)))), t;
1184
1208
  }
1185
1209
  var Y = {
1186
1210
  liquid: {
@@ -1199,17 +1223,17 @@ var Y = {
1199
1223
  value: /%%=.+?=%%/g,
1200
1224
  logic: /%%\[\s*(\w+).*?\]%%/g
1201
1225
  }
1202
- }, se = {
1226
+ }, le = {
1203
1227
  liquid: "{{",
1204
1228
  handlebars: "{{",
1205
1229
  mailchimp: "*|",
1206
1230
  ampscript: "%%="
1207
1231
  };
1208
- function ce(e) {
1209
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return se[t];
1232
+ function ue(e) {
1233
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return le[t];
1210
1234
  return null;
1211
1235
  }
1212
- function le(e) {
1236
+ function de(e) {
1213
1237
  return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
1214
1238
  }
1215
1239
  function X(e) {
@@ -1224,25 +1248,25 @@ function Q(e, t) {
1224
1248
  let n = t.find((t) => t.value === e);
1225
1249
  return n ? n.label : e;
1226
1250
  }
1227
- function ue(e, t) {
1251
+ function fe(e, t) {
1228
1252
  return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${Q(r, t)}${a}`);
1229
1253
  }
1230
- function de(e, t) {
1254
+ function pe(e, t) {
1231
1255
  if (!e) return !1;
1232
1256
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
1233
1257
  return n.test(e) || r.test(e);
1234
1258
  }
1235
- function fe(e, t) {
1259
+ function me(e, t) {
1236
1260
  return X(t.logic).test(e?.trim() || "");
1237
1261
  }
1238
1262
  function $(e, t) {
1239
1263
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
1240
1264
  return r && r[1] ? r[1].toUpperCase() : e;
1241
1265
  }
1242
- function pe(e, t) {
1266
+ function he(e, t) {
1243
1267
  return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${$(r, t)}${a}`);
1244
1268
  }
1245
- var me = class extends Error {
1269
+ var ge = class extends Error {
1246
1270
  constructor(e, t) {
1247
1271
  super(e), this.statusCode = t, this.name = "SdkError";
1248
1272
  }
@@ -1258,4 +1282,4 @@ var me = class extends Error {
1258
1282
  }
1259
1283
  };
1260
1284
  //#endregion
1261
- export { Q as A, le as B, F as C, P as D, D as E, ee as F, n as I, o as L, t as M, fe as N, w as O, Z as P, pe as R, N as S, B as T, te as V, L as _, me as a, R as b, q as c, K as d, ie as f, U as g, M as h, Y as i, ce as j, $ as k, A as l, a as m, i as n, J as o, r as p, ne as r, de as s, e as t, V as u, k as v, I as w, O as x, j as y, ue as z };
1285
+ export { $ as A, fe as B, P as C, O as D, V as E, Z as F, ee as H, c as I, n as L, ue as M, t as N, F as O, me as P, o as R, k as S, L as T, de as V, W as _, ge as a, M as b, ce as c, se as d, ne as f, N as g, G as h, Y as i, Q as j, T as k, j as l, a as m, i as n, J as o, r as p, l as r, pe as s, e as t, H as u, R as v, I as w, z as x, A as y, he as z };
@@ -58,7 +58,8 @@ var e = {
58
58
  menu: "Menu",
59
59
  table: "Table",
60
60
  countdown: "Countdown",
61
- form: "Form"
61
+ form: "Form",
62
+ discountCoupon: "Discount coupon"
62
63
  },
63
64
  sidebar: {
64
65
  content: "Content",
@@ -307,6 +308,52 @@ var e = {
307
308
  htmlHint: "HTML is allowed. Use links and small print as needed."
308
309
  }
309
310
  },
311
+ discountCoupon: {
312
+ description: "Attract customers to subscribe with a discount code.",
313
+ modeNone: "No discount",
314
+ modeAuto: "Discount code",
315
+ modeManual: "Enter Shopify discount manually",
316
+ autoHint: "Auto-generate a unique and non-reusable code for each subscription.",
317
+ selectType: "Select type",
318
+ types: {
319
+ percentageOff: "Percentage off",
320
+ fixedAmount: "Fixed amount",
321
+ freeShipping: "Free shipping"
322
+ },
323
+ value: "Value",
324
+ currencyCode: "Currency",
325
+ expiration: "Set expiration on discount",
326
+ expirationDaysSuffix: "Days",
327
+ tagCustomer: "Add the sent discount code as a tag to the customer",
328
+ combinations: "Combinations",
329
+ combineProduct: "Product discounts",
330
+ combineOrder: "Order discounts",
331
+ combineShipping: "Shipping discounts",
332
+ manualPlaceholder: "Discount code",
333
+ manualFooterLead: "Create a discount",
334
+ manualFooterTail: " in your Shopify admin, and enter it above.",
335
+ manualBlankError: "This field can't be blank",
336
+ confirmationTextLabel: "Confirmation text",
337
+ afterClickLabel: "After click",
338
+ afterClickNone: "Do nothing",
339
+ afterClickLoadPage: "Go to URL",
340
+ afterClickCloseCampaign: "Close campaign",
341
+ afterClickNextStep: "Show next step",
342
+ afterClickPageUrl: "Page URL",
343
+ afterClickUrlPlaceholder: "https://...",
344
+ previewNoDiscount: "No discount",
345
+ previewPercentage: "{value}% off",
346
+ previewFixed: "{value} {currency} off",
347
+ previewAutoUnique: "Unique code per subscription",
348
+ previewManualPrefix: "Code:",
349
+ previewManualUnset: "Enter a Shopify discount code",
350
+ previewExpires: "Expires after {days} day(s)",
351
+ previewTag: "Tag customer with code",
352
+ previewCombinations: "Combines with product / order / shipping discounts",
353
+ previewSampleCode: "THANKYOU20",
354
+ copyCode: "Copy code",
355
+ copyCodeFlash: "Copied"
356
+ },
310
357
  divider: {
311
358
  style: "Style",
312
359
  solid: "Solid",