@oneclick.dev/cms-core-modules 0.0.110 → 0.0.112

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 (72) hide show
  1. package/dist/{Acquisition-Dt2rREU8.js → Acquisition-DgzDQH51.js} +1 -1
  2. package/dist/{Acquisition-DNCy8nQz.mjs → Acquisition-FV3QpaUX.mjs} +2 -2
  3. package/dist/{Audience-Bs7b0TNm.js → Audience-BSgNvcVb.js} +1 -1
  4. package/dist/{Audience-CUeMVYRy.mjs → Audience-ka0b7YPE.mjs} +2 -2
  5. package/dist/{Components-DXbx0RLV.js → Components-6gTTI_u-.js} +1 -1
  6. package/dist/{Components-C83O-xlF.mjs → Components-iU3ZaJm5.mjs} +32 -32
  7. package/dist/{ContentEditor-D9-1SJ5F.mjs → ContentEditor-C5yNNLeV.mjs} +8446 -7893
  8. package/dist/{ContentEditor-BprPiHMJ.js → ContentEditor-MctMvN7D.js} +53 -53
  9. package/dist/{Create-89z41K73.js → Create--MOBOTA-.js} +1 -1
  10. package/dist/{Create-BCklc_T1.mjs → Create-BXNLRQag.mjs} +1 -1
  11. package/dist/DateFormatter-CSAbE3BC.js +1 -0
  12. package/dist/{DateFormatter-DUxlo8X8.mjs → DateFormatter-qbhRYxI_.mjs} +226 -222
  13. package/dist/{Detail-CNlljBfH.mjs → Detail-ChD5XurA.mjs} +1 -1
  14. package/dist/{Detail-C857g62L.js → Detail-RISEJJab.js} +1 -1
  15. package/dist/{Find-DIISO5GO.mjs → Find-zN_dKz4p.mjs} +1 -1
  16. package/dist/{GlobalStyling-C9VthHWK.mjs → GlobalStyling-Bp2PiOWt.mjs} +648 -502
  17. package/dist/GlobalStyling-fRjfDDeO.js +25 -0
  18. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Baqy-rTT.js +1 -0
  19. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dx4Bpa2m.mjs +1263 -0
  20. package/dist/{Overview-Di84CsR5.mjs → Overview-98nkJUWN.mjs} +162 -157
  21. package/dist/{Overview-C-Jb_BxY.mjs → Overview-BR_y8x3W.mjs} +1 -1
  22. package/dist/{Overview-DC9io1bk.js → Overview-CX-n6W7d.js} +1 -1
  23. package/dist/Overview-Dl8cMlsr.js +1 -0
  24. package/dist/{Overview-BKAti8nc.mjs → Overview-MpgkLB6m.mjs} +36 -36
  25. package/dist/{SeoHealth-az1YuNF2.js → SeoHealth-C5npw7mE.js} +1 -1
  26. package/dist/{SeoHealth-MC3lSCOY.mjs → SeoHealth-bVQj_Xgm.mjs} +29 -29
  27. package/dist/{TableView-DXHhJ-jm.mjs → TableView-Bf1fdJrD.mjs} +1838 -1822
  28. package/dist/TableView-DNcXyIMu.js +4 -0
  29. package/dist/{agenda-IOqtALWf.js → agenda-BaJu3-1c.js} +1 -1
  30. package/dist/{agenda-DcatSSYQ.mjs → agenda-BwVY_8oM.mjs} +3 -3
  31. package/dist/cms-core-modules.css +1 -1
  32. package/dist/{exceptions-CI0B4xVj.js → exceptions-B6P9UiCj.js} +1 -1
  33. package/dist/{exceptions-YCQkHa6a.mjs → exceptions-De9-FvdP.mjs} +67 -67
  34. package/dist/{index-CpzDEMeC.mjs → index-B8GvmAwh.mjs} +438 -478
  35. package/dist/{index-wjkEPsNx.mjs → index-BIF2RB7k.mjs} +1212 -1316
  36. package/dist/index-ByRsp77L.js +70 -0
  37. package/dist/{index-BhWvXMOp.mjs → index-CFzn2Lus.mjs} +5 -9
  38. package/dist/{index-BFLV54kw.mjs → index-CkVwMqpn.mjs} +1114 -1100
  39. package/dist/index-DL6orwdK.js +35 -0
  40. package/dist/index-DUlYrnXH.js +58 -0
  41. package/dist/index-DZV720u-.mjs +439 -0
  42. package/dist/index-D_nfGegA.js +184 -0
  43. package/dist/index-DtSvAFLL.js +54 -0
  44. package/dist/{index-D30apIn-.mjs → index-L54VBzwJ.mjs} +2 -3
  45. package/dist/{index-BzWmWCo5.mjs → index-hH3e-IYz.mjs} +267 -267
  46. package/dist/index.cjs.js +1 -1
  47. package/dist/index.mjs +17 -17
  48. package/dist/math-BJ-oX_IM.mjs +80 -0
  49. package/dist/math-emotyaF6.js +1 -0
  50. package/dist/{resources-CYOb5Bl6.mjs → resources-DwYxn2Vi.mjs} +1 -1
  51. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Icon.d.ts +15 -0
  52. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Icon.vue.d.ts +92 -0
  53. package/dist/src/contentManager/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +1 -2
  54. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/iconOptions.d.ts +22 -0
  55. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/useFocus.d.ts +1 -0
  56. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/IconMenu.vue.d.ts +16 -0
  57. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +17 -0
  58. package/package.json +2 -2
  59. package/dist/DateFormatter-CYAD4GBN.js +0 -1
  60. package/dist/GlobalStyling-CnSlXkZc.js +0 -25
  61. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +0 -1
  62. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dh9jzvE0.mjs +0 -1255
  63. package/dist/Overview-UoZHUMUz.js +0 -1
  64. package/dist/TableView-DQW0A1oG.js +0 -4
  65. package/dist/array-CbATeQbk.js +0 -1
  66. package/dist/array-DT5pE8Gm.mjs +0 -108
  67. package/dist/index-A2kp8Isi.js +0 -75
  68. package/dist/index-B5aBwdxY.js +0 -54
  69. package/dist/index-BiT55eU0.js +0 -58
  70. package/dist/index-G7cIlnGN.js +0 -158
  71. package/dist/index-V78huaSJ.mjs +0 -442
  72. package/dist/index-vHmvbEwa.js +0 -35
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
54
54
  default: !1
55
55
  }
56
56
  }), l = [
57
- { path: "", component: () => import("./TableView-DXHhJ-jm.mjs") }
57
+ { path: "", component: () => import("./TableView-Bf1fdJrD.mjs") }
58
58
  ], p = [], rA = {
59
59
  component: () => import("./index-Bkq58CeQ.mjs"),
60
60
  metadata: C,
@@ -98,7 +98,7 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
98
98
  default: "https://preview.com/shop/{{slug}}"
99
99
  }
100
100
  }), M = [
101
- { path: "", component: () => import("./Overview-C-Jb_BxY.mjs") },
101
+ { path: "", component: () => import("./Overview-BR_y8x3W.mjs") },
102
102
  { path: "/:productId", component: () => import("./Detail-Btzwo0Y3.mjs") },
103
103
  { path: "/new", component: () => import("./Detail-Btzwo0Y3.mjs") }
104
104
  ], s = [
@@ -186,9 +186,9 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
186
186
  default: "promo-codes"
187
187
  }
188
188
  }), y = [
189
- { path: "", component: () => import("./Create-BCklc_T1.mjs") },
190
- { path: "/promo-codes", component: () => import("./Find-DIISO5GO.mjs") },
191
- { path: "/promo-codes/:promoCodeId", component: () => import("./Detail-CNlljBfH.mjs") }
189
+ { path: "", component: () => import("./Create-BXNLRQag.mjs") },
190
+ { path: "/promo-codes", component: () => import("./Find-zN_dKz4p.mjs") },
191
+ { path: "/promo-codes/:promoCodeId", component: () => import("./Detail-ChD5XurA.mjs") }
192
192
  ], u = [
193
193
  { key: "create-promo-codes", name: "Create promo codes", description: "Team member can create promo codes" },
194
194
  { key: "view-promo-codes", name: "View promo codes", description: "Team member can view promo codes" },
@@ -293,11 +293,11 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
293
293
  description: "Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."
294
294
  }
295
295
  }), x = [
296
- { path: "", component: () => import("./Overview-BKAti8nc.mjs") },
297
- { path: "/acquisition", component: () => import("./Acquisition-DNCy8nQz.mjs") },
296
+ { path: "", component: () => import("./Overview-MpgkLB6m.mjs") },
297
+ { path: "/acquisition", component: () => import("./Acquisition-FV3QpaUX.mjs") },
298
298
  { path: "/content", component: () => import("./Content-CYOZKvWK.mjs") },
299
- { path: "/audience", component: () => import("./Audience-CUeMVYRy.mjs") },
300
- { path: "/seo", component: () => import("./SeoHealth-MC3lSCOY.mjs") }
299
+ { path: "/audience", component: () => import("./Audience-ka0b7YPE.mjs") },
300
+ { path: "/seo", component: () => import("./SeoHealth-bVQj_Xgm.mjs") }
301
301
  ], K = [], S = [
302
302
  {
303
303
  name: "getTopPages",
@@ -557,9 +557,9 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
557
557
  { path: "", component: () => import("./Overview-lWAyyenp.mjs") },
558
558
  { path: "/collections", component: () => import("./Overview-lWAyyenp.mjs") },
559
559
  { path: "/collections/:collectionId", component: () => import("./Entries-BdhUyJR5.mjs") },
560
- { path: "/collections/:collectionId/:entryId", component: () => import("./ContentEditor-D9-1SJ5F.mjs") },
561
- { path: "/components", component: () => import("./Components-C83O-xlF.mjs") },
562
- { path: "/global-styling", component: () => import("./GlobalStyling-C9VthHWK.mjs") }
560
+ { path: "/collections/:collectionId/:entryId", component: () => import("./ContentEditor-C5yNNLeV.mjs") },
561
+ { path: "/components", component: () => import("./Components-iU3ZaJm5.mjs") },
562
+ { path: "/global-styling", component: () => import("./GlobalStyling-Bp2PiOWt.mjs") }
563
563
  ], q = [
564
564
  { key: "create-content", name: "Create content", description: "Team member can create content" },
565
565
  { key: "edit-content", name: "Edit content", description: "Team member can edit content" },
@@ -632,17 +632,17 @@ const I = "data:image/webp;base64,UklGRg5VAABXRUJQVlA4WAoAAAAMAAAA4wAA4wAAVlA4IJ
632
632
  default: "reserved_spots"
633
633
  }
634
634
  }), tA = [
635
- { path: "", component: () => import("./Overview-Di84CsR5.mjs") },
635
+ { path: "", component: () => import("./Overview-98nkJUWN.mjs") },
636
636
  { path: "/create", component: () => import("./index-DrXxXB2F.mjs") },
637
637
  { path: "/create/regular", component: () => import("./regular-_05oq5Tx.mjs") },
638
638
  // { path: '/create/full-day', component: () => import('./pages/create/full-day.vue') },
639
639
  // { path: '/create/multi-day', component: () => import('./pages/create/multi-day.vue') },
640
- { path: "/edit/:id", component: () => import("./index-BzWmWCo5.mjs") },
641
- { path: "/edit/:id/agenda", component: () => import("./agenda-DcatSSYQ.mjs") },
642
- { path: "/edit/:id/exceptions", component: () => import("./exceptions-YCQkHa6a.mjs") },
640
+ { path: "/edit/:id", component: () => import("./index-hH3e-IYz.mjs") },
641
+ { path: "/edit/:id/agenda", component: () => import("./agenda-BwVY_8oM.mjs") },
642
+ { path: "/edit/:id/exceptions", component: () => import("./exceptions-De9-FvdP.mjs") },
643
643
  { path: "/edit/:id/availability", component: () => import("./availability-CMrRa5y2.mjs") },
644
644
  { path: "/edit/:id/payment", component: () => import("./payment-C3ohkehF.mjs") },
645
- { path: "/edit/:id/resources", component: () => import("./resources-CYOb5Bl6.mjs") },
645
+ { path: "/edit/:id/resources", component: () => import("./resources-DwYxn2Vi.mjs") },
646
646
  { path: "/edit/:id/orders", component: () => import("./orders-C65SlpJy.mjs") },
647
647
  { path: "/edit/:id/booking-data", component: () => import("./booking-data-DgJd0BcM.mjs") }
648
648
  ], iA = [
@@ -0,0 +1,80 @@
1
+ var p = Math.PI, x = 2 * p, f = 1e-6, L = x - f;
2
+ function y() {
3
+ this._x0 = this._y0 = // start of current subpath
4
+ this._x1 = this._y1 = null, this._ = "";
5
+ }
6
+ function C() {
7
+ return new y();
8
+ }
9
+ y.prototype = C.prototype = {
10
+ constructor: y,
11
+ moveTo: function(t, i) {
12
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i);
13
+ },
14
+ closePath: function() {
15
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
16
+ },
17
+ lineTo: function(t, i) {
18
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +i);
19
+ },
20
+ quadraticCurveTo: function(t, i, s, h) {
21
+ this._ += "Q" + +t + "," + +i + "," + (this._x1 = +s) + "," + (this._y1 = +h);
22
+ },
23
+ bezierCurveTo: function(t, i, s, h, a, o) {
24
+ this._ += "C" + +t + "," + +i + "," + +s + "," + +h + "," + (this._x1 = +a) + "," + (this._y1 = +o);
25
+ },
26
+ arcTo: function(t, i, s, h, a) {
27
+ t = +t, i = +i, s = +s, h = +h, a = +a;
28
+ var o = this._x1, c = this._y1, u = s - t, e = h - i, n = o - t, r = c - i, _ = n * n + r * r;
29
+ if (a < 0) throw new Error("negative radius: " + a);
30
+ if (this._x1 === null)
31
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = i);
32
+ else if (_ > f) if (!(Math.abs(r * u - e * n) > f) || !a)
33
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = i);
34
+ else {
35
+ var M = s - o, v = h - c, d = u * u + e * e, A = M * M + v * v, m = Math.sqrt(d), q = Math.sqrt(_), P = a * Math.tan((p - Math.acos((d + _ - A) / (2 * m * q))) / 2), l = P / q, T = P / m;
36
+ Math.abs(l - 1) > f && (this._ += "L" + (t + l * n) + "," + (i + l * r)), this._ += "A" + a + "," + a + ",0,0," + +(r * M > n * v) + "," + (this._x1 = t + T * u) + "," + (this._y1 = i + T * e);
37
+ }
38
+ },
39
+ arc: function(t, i, s, h, a, o) {
40
+ t = +t, i = +i, s = +s, o = !!o;
41
+ var c = s * Math.cos(h), u = s * Math.sin(h), e = t + c, n = i + u, r = 1 ^ o, _ = o ? h - a : a - h;
42
+ if (s < 0) throw new Error("negative radius: " + s);
43
+ this._x1 === null ? this._ += "M" + e + "," + n : (Math.abs(this._x1 - e) > f || Math.abs(this._y1 - n) > f) && (this._ += "L" + e + "," + n), s && (_ < 0 && (_ = _ % x + x), _ > L ? this._ += "A" + s + "," + s + ",0,1," + r + "," + (t - c) + "," + (i - u) + "A" + s + "," + s + ",0,1," + r + "," + (this._x1 = e) + "," + (this._y1 = n) : _ > f && (this._ += "A" + s + "," + s + ",0," + +(_ >= p) + "," + r + "," + (this._x1 = t + s * Math.cos(a)) + "," + (this._y1 = i + s * Math.sin(a))));
44
+ },
45
+ rect: function(t, i, s, h) {
46
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +i) + "h" + +s + "v" + +h + "h" + -s + "Z";
47
+ },
48
+ toString: function() {
49
+ return this._;
50
+ }
51
+ };
52
+ function E(t) {
53
+ return function() {
54
+ return t;
55
+ };
56
+ }
57
+ var $ = Math.abs, w = Math.atan2, I = Math.cos, Z = Math.max, j = Math.min, k = Math.sin, z = Math.sqrt, Q = 1e-12, b = Math.PI, g = b / 2, S = 2 * b;
58
+ function B(t) {
59
+ return t > 1 ? 0 : t < -1 ? b : Math.acos(t);
60
+ }
61
+ function D(t) {
62
+ return t >= 1 ? g : t <= -1 ? -g : Math.asin(t);
63
+ }
64
+ export {
65
+ $ as a,
66
+ B as b,
67
+ D as c,
68
+ w as d,
69
+ E as e,
70
+ I as f,
71
+ Q as g,
72
+ g as h,
73
+ j as i,
74
+ b as j,
75
+ z as k,
76
+ Z as m,
77
+ C as p,
78
+ k as s,
79
+ S as t
80
+ };
@@ -0,0 +1 @@
1
+ "use strict";var x=Math.PI,y=2*x,c=1e-6,C=y-c;function b(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function L(){return new b}b.prototype=L.prototype={constructor:b,moveTo:function(t,s){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+s)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,s){this._+="L"+(this._x1=+t)+","+(this._y1=+s)},quadraticCurveTo:function(t,s,i,h){this._+="Q"+ +t+","+ +s+","+(this._x1=+i)+","+(this._y1=+h)},bezierCurveTo:function(t,s,i,h,a,o){this._+="C"+ +t+","+ +s+","+ +i+","+ +h+","+(this._x1=+a)+","+(this._y1=+o)},arcTo:function(t,s,i,h,a){t=+t,s=+s,i=+i,h=+h,a=+a;var o=this._x1,f=this._y1,r=i-t,e=h-s,n=o-t,u=f-s,_=n*n+u*u;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=s);else if(_>c)if(!(Math.abs(u*r-e*n)>c)||!a)this._+="L"+(this._x1=t)+","+(this._y1=s);else{var v=i-o,l=h-f,d=r*r+e*e,g=v*v+l*l,q=Math.sqrt(d),P=Math.sqrt(_),T=a*Math.tan((x-Math.acos((d+_-g)/(2*q*P)))/2),p=T/P,A=T/q;Math.abs(p-1)>c&&(this._+="L"+(t+p*n)+","+(s+p*u)),this._+="A"+a+","+a+",0,0,"+ +(u*v>n*l)+","+(this._x1=t+A*r)+","+(this._y1=s+A*e)}},arc:function(t,s,i,h,a,o){t=+t,s=+s,i=+i,o=!!o;var f=i*Math.cos(h),r=i*Math.sin(h),e=t+f,n=s+r,u=1^o,_=o?h-a:a-h;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+e+","+n:(Math.abs(this._x1-e)>c||Math.abs(this._y1-n)>c)&&(this._+="L"+e+","+n),i&&(_<0&&(_=_%y+y),_>C?this._+="A"+i+","+i+",0,1,"+u+","+(t-f)+","+(s-r)+"A"+i+","+i+",0,1,"+u+","+(this._x1=e)+","+(this._y1=n):_>c&&(this._+="A"+i+","+i+",0,"+ +(_>=x)+","+u+","+(this._x1=t+i*Math.cos(a))+","+(this._y1=s+i*Math.sin(a))))},rect:function(t,s,i,h){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+s)+"h"+ +i+"v"+ +h+"h"+-i+"Z"},toString:function(){return this._}};function E(t){return function(){return t}}var $=Math.abs,w=Math.atan2,I=Math.cos,Z=Math.max,z=Math.min,Q=Math.sin,S=Math.sqrt,j=1e-12,M=Math.PI,m=M/2,k=2*M;function B(t){return t>1?0:t<-1?M:Math.acos(t)}function D(t){return t>=1?m:t<=-1?-m:Math.asin(t)}exports.abs=$;exports.acos=B;exports.asin=D;exports.atan2=w;exports.constant=E;exports.cos=I;exports.epsilon=j;exports.halfPi=m;exports.max=Z;exports.min=z;exports.path=L;exports.pi=M;exports.sin=Q;exports.sqrt=S;exports.tau=k;
@@ -2,7 +2,7 @@ import { defineComponent as ce, ref as S, reactive as xe, computed as O, resolve
2
2
  import { _ as be } from "./EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs";
3
3
  import { Clock as _e, MoreHorizontal as we, Trash2 as pe, Plus as de, Pencil as ye, Copy as ke, Users as ue, CircleAlert as Ce } from "lucide-vue-next";
4
4
  import { useModuleRoute as De, useConfirmation as Ve, useModule as he, useFirebaseIntegration as Se } from "@oneclick.dev/cms-kit";
5
- import { a as Re } from "./index-BhWvXMOp.mjs";
5
+ import { a as Re } from "./index-CFzn2Lus.mjs";
6
6
  const Ae = { class: "space-y-5 py-4" }, Me = { class: "flex flex-wrap gap-2 mt-2" }, ze = ["onClick"], Le = { class: "space-y-2" }, $e = { class: "flex items-center justify-between mb-2" }, Ee = { class: "text-sm font-medium" }, Ie = { class: "flex items-center gap-1" }, Ue = { class: "space-y-2" }, Ne = {
7
7
  key: 0,
8
8
  class: "text-sm text-muted-foreground italic py-1"
@@ -0,0 +1,15 @@
1
+ import { Node } from '@tiptap/core';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ icon: {
5
+ setIcon: (attrs?: any) => ReturnType;
6
+ setIconWidth: (size: number) => ReturnType;
7
+ };
8
+ }
9
+ }
10
+ type Options = {
11
+ HTMLAttributes: Record<string, any>;
12
+ className: string;
13
+ };
14
+ declare const _default: Node<Options, any>;
15
+ export default _default;
@@ -0,0 +1,92 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ editor: {
3
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
4
+ required: true;
5
+ };
6
+ node: {
7
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
8
+ required: true;
9
+ };
10
+ decorations: {
11
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
12
+ required: true;
13
+ };
14
+ selected: {
15
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
16
+ required: true;
17
+ };
18
+ extension: {
19
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
20
+ required: true;
21
+ };
22
+ getPos: {
23
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
24
+ required: true;
25
+ };
26
+ updateAttributes: {
27
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
28
+ required: true;
29
+ };
30
+ deleteNode: {
31
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
32
+ required: true;
33
+ };
34
+ view: {
35
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
36
+ required: true;
37
+ };
38
+ innerDecorations: {
39
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
40
+ required: true;
41
+ };
42
+ HTMLAttributes: {
43
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
44
+ required: true;
45
+ };
46
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
47
+ editor: {
48
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
49
+ required: true;
50
+ };
51
+ node: {
52
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
53
+ required: true;
54
+ };
55
+ decorations: {
56
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
57
+ required: true;
58
+ };
59
+ selected: {
60
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
61
+ required: true;
62
+ };
63
+ extension: {
64
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
65
+ required: true;
66
+ };
67
+ getPos: {
68
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
69
+ required: true;
70
+ };
71
+ updateAttributes: {
72
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
73
+ required: true;
74
+ };
75
+ deleteNode: {
76
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
77
+ required: true;
78
+ };
79
+ view: {
80
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
81
+ required: true;
82
+ };
83
+ innerDecorations: {
84
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
85
+ required: true;
86
+ };
87
+ HTMLAttributes: {
88
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
89
+ required: true;
90
+ };
91
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
92
+ export default _default;
@@ -1,7 +1,6 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
  /**
3
- * Extension to scope Cmd+A/Ctrl+A to select within the current container
4
- * instead of selecting all content across all containers
3
+ * Scope Cmd+A/Ctrl+A to the editor document instead of the surrounding page.
5
4
  */
6
5
  export declare const ScopedSelectAll: Extension<any, any>;
7
6
  export default ScopedSelectAll;
@@ -0,0 +1,22 @@
1
+ import { Component } from 'vue';
2
+ export type ContentIconTheme = 'logos' | 'lucide';
3
+ export type ContentIconOption = {
4
+ theme: ContentIconTheme;
5
+ name: string;
6
+ label: string;
7
+ component: Component;
8
+ searchText: string;
9
+ };
10
+ export declare const DEFAULT_ICON_THEME: ContentIconTheme;
11
+ export declare const DEFAULT_LUCIDE_ICON = "Star";
12
+ export declare const logoIconOptions: ContentIconOption[];
13
+ export declare const iconThemeOptions: readonly [{
14
+ readonly value: "lucide";
15
+ readonly label: "Lucide";
16
+ }, {
17
+ readonly value: "logos";
18
+ readonly label: "Logos";
19
+ }];
20
+ export declare function getIconOptions(theme: ContentIconTheme): ContentIconOption[];
21
+ export declare function findIconOption(theme: ContentIconTheme, name?: string | null): ContentIconOption | null;
22
+ export declare function getIconComponent(theme: ContentIconTheme, name?: string | null): Component | import('vue').FunctionalComponent<import('lucide-vue-next').LucideProps, {}, any, {}>;
@@ -4,5 +4,6 @@ declare const useFocus: (node: any) => {
4
4
  isInsideNode: globalThis.ComputedRef<boolean>;
5
5
  isPerformingAction: globalThis.ComputedRef<boolean>;
6
6
  isPerformingActionOutside: globalThis.ComputedRef<boolean>;
7
+ hasTextSelection: globalThis.ComputedRef<boolean>;
7
8
  };
8
9
  export default useFocus;
@@ -0,0 +1,16 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
+ editor: {
4
+ type: typeof Editor;
5
+ required: true;
6
+ };
7
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
8
+ editor: {
9
+ type: typeof Editor;
10
+ required: true;
11
+ };
12
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
13
+ iconQueryInput: HTMLInputElement;
14
+ customColorInput: HTMLInputElement;
15
+ }, HTMLDivElement>;
16
+ export default _default;
@@ -82,6 +82,23 @@ declare const _default: readonly [{
82
82
  required: true;
83
83
  };
84
84
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
85
+ }, {
86
+ readonly name: "Icon";
87
+ readonly type: "icon";
88
+ readonly settingsView: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
89
+ editor: {
90
+ type: typeof import('@tiptap/vue-3').Editor;
91
+ required: true;
92
+ };
93
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
94
+ editor: {
95
+ type: typeof import('@tiptap/vue-3').Editor;
96
+ required: true;
97
+ };
98
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
99
+ iconQueryInput: HTMLInputElement;
100
+ customColorInput: HTMLInputElement;
101
+ }, HTMLDivElement>;
85
102
  }, {
86
103
  readonly name: "Map";
87
104
  readonly type: "map";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneclick.dev/cms-core-modules",
3
- "version": "0.0.110",
3
+ "version": "0.0.112",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "peerDependencies": {
29
29
  "@formkit/drag-and-drop": "^0.5.3",
30
30
  "@internationalized/date": "^3.8.0",
31
- "@oneclick.dev/cms-kit": "0.0.122",
31
+ "@oneclick.dev/cms-kit": "0.0.128",
32
32
  "@tanstack/vue-table": "^8.21.3",
33
33
  "@vee-validate/zod": "^4.15.0",
34
34
  "@vue-flow/core": "^1.48.1",
@@ -1 +0,0 @@
1
- "use strict";function R(e,t){return e-t*Math.floor(e/t)}const G=1721426;function v(e,t,r,n){t=q(e,t);let a=t-1,o=-2;return r<=2?o=0:T(t)&&(o=-1),G-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+o+n)}function T(e){return e%4===0&&(e%100!==0||e%400===0)}function q(e,t){return e==="BC"?1-t:t}function de(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const $e={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class D{fromJulianDay(t){let r=t,n=r-G,a=Math.floor(n/146097),o=R(n,146097),c=Math.floor(o/36524),s=R(o,36524),i=Math.floor(s/1461),u=R(s,1461),M=Math.floor(u/365),g=a*400+c*100+i*4+M+(c!==4&&M!==4?1:0),[w,m]=de(g),y=r-v(w,m,1,1),O=2;r<v(w,m,3,1)?O=0:T(m)&&(O=1);let z=Math.floor(((y+O)*12+373)/367),fe=r-v(w,m,z,1)+1;return new p(w,m,z,fe)}toJulianDay(t){return v(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return $e[T(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return T(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}function ye(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function me(e){return d(Date.now(),e)}function be(e){return De(me(e))}function Q(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function pe(e,t){return W(e)-W(t)}function W(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let P=null,Me=!1;function J(){return P==null&&(P=new Intl.DateTimeFormat().resolvedOptions().timeZone),P}function X(){return Me}function x(e){e=h(e,new D);let t=q(e.era,e.year);return ee(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ee(e,t,r,n,a,o,c){let s=new Date;return s.setUTCHours(n,a,o,c),s.setUTCFullYear(e,t-1,r),s.getTime()}function k(e,t){if(t==="UTC")return 0;if(e>0&&t===J()&&!X())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:a,hour:o,minute:c,second:s}=te(e,t);return ee(r,n,a,o,c,s,0)-Math.floor(e/1e3)*1e3}const K=new Map;function te(e,t){let r=K.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),K.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let o of n)o.type!=="literal"&&(a[o.type]=o.value);return{year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}const _=864e5;function ge(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>we(e,t,o))}function we(e,t,r){let n=te(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function f(e,t,r="compatible"){let n=I(e);if(t==="UTC")return x(n);if(t===J()&&r==="compatible"&&!X()){n=h(n,new D);let i=new Date,u=q(n.era,n.year);return i.setFullYear(u,n.month-1,n.day),i.setHours(n.hour,n.minute,n.second,n.millisecond),i.getTime()}let a=x(n),o=k(a-_,t),c=k(a+_,t),s=ge(n,t,a-o,a-c);if(s.length===1)return s[0];if(s.length>1)switch(r){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-o,a-c);case"compatible":case"later":return Math.max(a-o,a-c);case"reject":throw new RangeError("No such absolute time found")}}function re(e,t,r="compatible"){return new Date(f(e,t,r))}function d(e,t){let r=k(e,t),n=new Date(e+r),a=n.getUTCFullYear(),o=n.getUTCMonth()+1,c=n.getUTCDate(),s=n.getUTCHours(),i=n.getUTCMinutes(),u=n.getUTCSeconds(),M=n.getUTCMilliseconds();return new E(a<1?"BC":"AD",a<1?-a+1:a,o,c,t,r,s,i,u,M)}function De(e){return new p(e.calendar,e.era,e.year,e.month,e.day)}function I(e,t){let r=0,n=0,a=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:o}=t),new C(e.calendar,e.era,e.year,e.month,e.day,r,n,a,o)}function h(e,t){if(ye(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,b(n),n}function xe(e,t,r){if(e instanceof E)return e.timeZone===t?e:Se(e,t);let n=f(e,t,r);return d(n,t)}function Ie(e){let t=x(e)-e.offset;return new Date(t)}function Se(e,t){let r=x(e)-e.offset;return h(d(r,t),e.calendar)}const S=36e5;function B(e,t){let r=e.copy(),n="hour"in r?Ye(r,t):0;F(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,j(r),ne(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,Ce(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){let c=r.calendar.isInverseEra?.(r);r.year=a,r.month=c?1:r.calendar.getMonthsInYear(r),r.day=c?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let o=r.calendar.getMonthsInYear(r);return r.month>o&&(r.month=o,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function F(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function j(e){for(;e.month<1;)F(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,F(e,1)}function Ce(e){for(;e.day<1;)e.month--,j(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,j(e)}function ne(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function b(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),ne(e)}function ae(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function oe(e,t){return B(e,ae(t))}function N(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),b(r),r}function U(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),ve(r),r}function Ee(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Y(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Y(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Y(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Y(e.hour,24),t}function ve(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Y(e,t){let r=e%t;return r<0&&(r+=t),r}function Ye(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Ee(e)}function V(e,t,r,n){let a=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),c=o.indexOf(e.era);if(c<0)throw new Error("Invalid era: "+e.era);c=$(c,r,0,o.length-1,n?.round),a.era=o[c],b(a);break}case"year":a.calendar.isInverseEra?.(a)&&(r=-r),a.year=$(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=$(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=$(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),b(a),a}function ce(e,t,r,n){let a=e.copy();switch(t){case"hour":{let o=e.hour,c=0,s=23;if(n?.hourCycle===12){let i=o>=12;c=i?12:0,s=i?23:11}a.hour=$(o,r,c,s,n?.round);break}case"minute":a.minute=$(e.minute,r,0,59,n?.round);break;case"second":a.second=$(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=$(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return a}function $(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function se(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let a=B(I(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=f(a,e.timeZone)}else r=x(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=d(r,e.timeZone);return h(n,e.calendar)}function Te(e,t){return se(e,ae(t))}function Ue(e,t,r,n){switch(t){case"hour":{let a=0,o=23;if(n?.hourCycle===12){let y=e.hour>=12;a=y?12:0,o=y?23:11}let c=I(e),s=h(U(c,{hour:a}),new D),i=[f(s,e.timeZone,"earlier"),f(s,e.timeZone,"later")].filter(y=>d(y,e.timeZone).day===s.day)[0],u=h(U(c,{hour:o}),new D),M=[f(u,e.timeZone,"earlier"),f(u,e.timeZone,"later")].filter(y=>d(y,e.timeZone).day===u.day).pop(),g=x(e)-e.offset,w=Math.floor(g/S),m=g%S;return g=$(w,r,Math.floor(i/S),Math.floor(M/S),n?.round)*S+m,h(d(g,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return ce(e,t,r,n);case"era":case"year":case"month":case"day":{let a=V(I(e),t,r,n),o=f(a,e.timeZone);return h(d(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Be(e,t,r){let n=I(e),a=U(N(n,t),t);if(a.compare(n)===0)return e;let o=f(a,e.timeZone,r);return h(d(o,e.timeZone),e.calendar)}const Oe=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Re=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,ie=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Pe(e){let t=e.match(Oe);if(!t)throw ie.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new p(l(t[1],0,9999),l(t[2],1,12),1);return r.day=l(t[3],1,r.calendar.getDaysInMonth(r)),r}function Ae(e){let t=e.match(Re);if(!t)throw ie.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=l(t[1],-9999,9999),n=r<1?"BC":"AD",a=new C(n,r<1?-r+1:r,l(t[2],1,12),1,t[4]?l(t[4],0,23):0,t[5]?l(t[5],0,59):0,t[6]?l(t[6],0,59):0,t[7]?l(t[7],0,1/0)*1e3:0);return a.day=l(t[3],0,a.calendar.getDaysInMonth(a)),a}function l(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function Ze(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function le(e){let t=h(e,new D),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function he(e){return`${le(e)}T${Ze(e)}`}function He(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return a!==0&&(o+=`:${String(a).padStart(2,"0")}`),o}function ke(e){return`${he(e)}${He(e.offset)}[${e.timeZone}]`}function L(e){let t=typeof e[0]=="object"?e.shift():new D,r;if(typeof e[0]=="string")r=e.shift();else{let c=t.getEras();r=c[c.length-1]}let n=e.shift(),a=e.shift(),o=e.shift();return[t,r,n,a,o]}class p{#e;constructor(...t){let[r,n,a,o,c]=L(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,b(this)}copy(){return this.era?new p(this.calendar,this.era,this.year,this.month,this.day):new p(this.calendar,this.year,this.month,this.day)}add(t){return B(this,t)}subtract(t){return oe(this,t)}set(t){return N(this,t)}cycle(t,r,n){return V(this,t,r,n)}toDate(t){return re(this,t)}toString(){return le(this)}compare(t){return Q(this,t)}}class C{#e;constructor(...t){let[r,n,a,o,c]=L(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,b(this)}copy(){return this.era?new C(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new C(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return B(this,t)}subtract(t){return oe(this,t)}set(t){return N(U(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return V(this,t,r,n);default:return ce(this,t,r,n)}}toDate(t,r){return re(this,t,r)}toString(){return he(this)}compare(t){let r=Q(this,t);return r===0?pe(this,I(t)):r}}class E{#e;constructor(...t){let[r,n,a,o,c]=L(t),s=t.shift(),i=t.shift();this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,this.timeZone=s,this.offset=i,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,b(this)}copy(){return this.era?new E(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new E(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return se(this,t)}subtract(t){return Te(this,t)}set(t,r){return Be(this,t,r)}cycle(t,r,n){return Ue(this,t,r,n)}toDate(){return Ie(this)}toString(){return ke(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-xe(t,this.timeZone).toDate().getTime()}}let A=new Map;class Fe{constructor(t,r={}){this.formatter=ue(t,r),this.options=r}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return Je()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Ne(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const je={true:{ja:"h11"},false:{}};function ue(e,t={}){if(typeof t.hour12=="boolean"&&qe()){t={...t};let a=je[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=a??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(A.has(r))return A.get(r);let n=new Intl.DateTimeFormat(e,t);return A.set(r,n),n}let Z=null;function qe(){return Z==null&&(Z=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Z}let H=null;function Je(){return H==null&&(H=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),H}function Ne(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=ue(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}exports.$12a3c853105e5a70$export$ad991b66133851cf=Fe;exports.$2aaf608024c21ca1$export$99faa760c7908e4f=p;exports.$58246871e4652552$export$588937bcd60ade55=Ae;exports.$58246871e4652552$export$6b862160d295c8e=Pe;exports.$ad063034c8620db8$export$aa8b41735afcabd2=J;exports.$ad063034c8620db8$export$d0bdf45af03a6ea3=be;
@@ -1,25 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),U=require("@oneclick.dev/cms-kit"),m=require("lucide-vue-next"),h={class:"grid py-4"},A={class:"grid grid-cols-2 gap-2 mb-6"},R={class:"relative"},L={class:"grid grid-cols-3 gap-2 mb-6"},_={class:"relative"},I={class:"relative"},M={class:"relative"},O={class:"grid grid-cols-1 gap-2 mb-6"},G={class:"relative"},J={class:"flex items-center space-x-2"},P={class:"flex items-center space-x-2"},H={class:"grid grid-cols-2 gap-2 mb-6"},j={key:0},q={class:"relative"},K={key:1},Q={class:"relative"},W={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},X=e.defineComponent({__name:"SectionStyleDialog",props:{buttons:{type:Array,default:()=>[]}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",titleColor:"#000000",textColor:"#000000"}}),T=f=>{f?(v.value="edit",i.value=f.id,d.value=f.id==="DEFAULT",t.name=f.name||"",t.rendering=f.rendering||"class",t.className=f.className||"",t.componentName=f.componentName||"",t.styles.backgroundColor=f.styles.backgroundColor||"#FFFFFF",t.styles.titleColor=f.styles.titleColor||"#000000",t.styles.textColor=f.styles.textColor||"#000000"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000"};return F({openDialog:T}),(f,r)=>{const a=e.resolveComponent("DialogTitle"),o=e.resolveComponent("DialogDescription"),z=e.resolveComponent("DialogHeader"),k=e.resolveComponent("Label"),N=e.resolveComponent("Input"),p=e.resolveComponent("RadioGroupItem"),C=e.resolveComponent("RadioGroup"),E=e.resolveComponent("Button"),s=e.resolveComponent("DialogFooter"),l=e.resolveComponent("DialogScrollContent"),u=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(u,{open:x.value,"onUpdate:open":r[10]||(r[10]=c=>x.value=c)},{default:e.withCtx(()=>[e.createVNode(l,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Section Style":"Edit Section Style"),1)]),_:1}),e.createVNode(o,null,{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",h,[e.createElementVNode("div",A,[e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",R,[e.createVNode(N,{modelValue:t.name,"onUpdate:modelValue":r[0]||(r[0]=c=>t.name=c),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),r[21]||(r[21]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",L,[e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",_,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[1]||(r[1]=c=>t.styles.backgroundColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(N,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":r[2]||(r[2]=c=>t.styles.backgroundColor=c),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-title-color"},{default:e.withCtx(()=>[...r[14]||(r[14]=[e.createTextVNode("Heading color",-1)])]),_:1}),e.createElementVNode("div",I,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[3]||(r[3]=c=>t.styles.titleColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.titleColor]]),e.createVNode(N,{modelValue:t.styles.titleColor,"onUpdate:modelValue":r[4]||(r[4]=c=>t.styles.titleColor=c),class:"pl-12",id:"collection-theme-dialog-title-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...r[15]||(r[15]=[e.createTextVNode("Body text color",-1)])]),_:1}),e.createElementVNode("div",M,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[5]||(r[5]=c=>t.styles.textColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(N,{modelValue:t.styles.textColor,"onUpdate:modelValue":r[6]||(r[6]=c=>t.styles.textColor=c),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])])]),r[22]||(r[22]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",O,[e.createElementVNode("div",null,[e.createElementVNode("div",G,[e.createVNode(k,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...r[16]||(r[16]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(C,{modelValue:t.rendering,"onUpdate:modelValue":r[7]||(r[7]=c=>t.rendering=c),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",J,[e.createVNode(p,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(k,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...r[17]||(r[17]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",P,[e.createVNode(p,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(k,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...r[18]||(r[18]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",H,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...r[19]||(r[19]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",q,[e.createVNode(N,{modelValue:t.className,"onUpdate:modelValue":r[8]||(r[8]=c=>t.className=c),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",K,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...r[20]||(r[20]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",Q,[e.createVNode(N,{modelValue:t.componentName,"onUpdate:modelValue":r[9]||(r[9]=c=>t.componentName=c),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",W,"."+e.toDisplayString(t.className)+` {
2
- background-color: `+e.toDisplayString(t.styles.backgroundColor)+`;
3
- color: `+e.toDisplayString(t.styles.textColor)+`;
4
-
5
- h1, h2, h3, h4, h5, h6 {
6
- color: `+e.toDisplayString(t.styles.titleColor)+`;
7
- }
8
- }
9
- `,1)):e.createCommentVNode("",!0)]),e.createVNode(s,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(E,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...r[23]||(r[23]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(E,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...r[24]||(r[24]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(E,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...r[25]||(r[25]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(E,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...r[26]||(r[26]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Y={class:"grid py-4"},Z={class:"grid grid-cols-2 gap-2 mb-6"},ee={class:"relative"},te={class:"grid grid-cols-3 gap-2 mb-6"},oe={class:"relative"},le={class:"relative"},se={class:"relative"},ne={class:"grid grid-cols-1 gap-2 mb-6"},re={class:"relative"},ae={class:"flex items-center space-x-2"},de={class:"flex items-center space-x-2"},ie={class:"grid grid-cols-2 gap-2 mb-6"},ce={key:0},ue={class:"relative"},me={key:1},pe={class:"relative"},ye={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},xe=e.defineComponent({__name:"ButtonStyleDialog",props:{defaultBackground:{type:String,default:"#FFFFFF"}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000",borderColor:"#000000",buttonRoundness:"none",buttonStyle:"default"}}),T=a=>{a?(v.value="edit",i.value=a.id,d.value=a.id==="DEFAULT",t.name=a.name||"",t.rendering=a.rendering||"class",t.className=a.className||"",t.componentName=a.componentName||"",t.styles.backgroundColor=a.styles.backgroundColor||"#FFFFFF",t.styles.textColor=a.styles.textColor||"#000000",t.styles.borderColor=a.styles.borderColor||"#000000",t.styles.buttonRoundness=a.styles.buttonRoundness||"none",t.styles.buttonStyle=a.styles.buttonStyle||"default"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.buttonRoundness="none",t.styles.buttonStyle="default"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.buttonRoundness="none",t.styles.buttonStyle="default"},f=a=>{switch(a){case"none":return 0;case"small":return 8;case"medium":return 12;case"pill":return 99;default:return 0}},r=e.computed(()=>{let a="."+t.className+` {
10
- `;return a+=` background-color: ${t.styles.backgroundColor};
11
- `,a+=` color: ${t.styles.textColor};
12
- `,t.styles.buttonStyle==="outline"?a+=` border: 1px solid ${t.styles.borderColor};
13
- `:t.styles.buttonStyle==="shadow"?a+=` box-shadow: 0 3px 6px #ccc;
14
- `:t.styles.buttonStyle==="retro"&&(a+=` box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};
15
- `),t.styles.buttonRoundness!=="none"&&(a+=` border-radius: ${f(t.styles.buttonRoundness)}px;
16
- `),a+=`}
17
- `,a});return F({openDialog:T}),(a,o)=>{const z=e.resolveComponent("DialogTitle"),k=e.resolveComponent("DialogDescription"),N=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Label"),C=e.resolveComponent("Input"),E=e.resolveComponent("RadioGroupItem"),s=e.resolveComponent("RadioGroup"),l=e.resolveComponent("Button"),u=e.resolveComponent("DialogFooter"),c=e.resolveComponent("DialogScrollContent"),y=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(y,{open:x.value,"onUpdate:open":o[18]||(o[18]=n=>x.value=n)},{default:e.withCtx(()=>[e.createVNode(c,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Button Style":"Edit Button Style"),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[...o[19]||(o[19]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...o[20]||(o[20]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",ee,[e.createVNode(C,{modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=n=>t.name=n),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),o[38]||(o[38]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",te,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...o[21]||(o[21]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",oe,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>t.styles.backgroundColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(C,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":o[2]||(o[2]=n=>t.styles.backgroundColor=n),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...o[22]||(o[22]=[e.createTextVNode("Text color",-1)])]),_:1}),e.createElementVNode("div",le,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t.styles.textColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(C,{modelValue:t.styles.textColor,"onUpdate:modelValue":o[4]||(o[4]=n=>t.styles.textColor=n),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-border-color"},{default:e.withCtx(()=>[...o[23]||(o[23]=[e.createTextVNode("Border color",-1)])]),_:1}),e.createElementVNode("div",se,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=n=>t.styles.borderColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.borderColor]]),e.createVNode(C,{modelValue:t.styles.borderColor,"onUpdate:modelValue":o[6]||(o[6]=n=>t.styles.borderColor=n),class:"pl-12",id:"collection-theme-dialog-border-color"},null,8,["modelValue"])])])]),e.createElementVNode("div",{style:e.normalizeStyle(`--button-background-color: ${t.styles.backgroundColor}; --button-text-color: ${t.styles.textColor}`)},[e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[24]||(o[24]=[e.createTextVNode("Shape",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle({backgroundColor:S.defaultBackground})},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[7]||(o[7]=n=>t.styles.buttonRoundness="none")},[o[25]||(o[25]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)]"},"Button",-1)),t.styles.buttonRoundness!=="none"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[8]||(o[8]=n=>t.styles.buttonRoundness="small")},[o[26]||(o[26]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[8px]"},"Button",-1)),t.styles.buttonRoundness!=="small"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[9]||(o[9]=n=>t.styles.buttonRoundness="medium")},[o[27]||(o[27]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[12px]"},"Button",-1)),t.styles.buttonRoundness!=="medium"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[10]||(o[10]=n=>t.styles.buttonRoundness="pill")},[o[28]||(o[28]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[99px]"},"Button",-1)),t.styles.buttonRoundness!=="pill"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4),e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[29]||(o[29]=[e.createTextVNode("Style",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle(`--button-border-radius: ${f(t.styles.buttonRoundness)}px; --button-border-color: ${t.styles.borderColor}; background-color: ${S.defaultBackground}`)},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[11]||(o[11]=n=>t.styles.buttonStyle="default")},[o[30]||(o[30]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]"},"Button",-1)),t.styles.buttonStyle!=="default"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[12]||(o[12]=n=>t.styles.buttonStyle="outline")},[o[31]||(o[31]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)] border border-[var(--button-border-color)]"}," Button ",-1)),t.styles.buttonStyle!=="outline"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[13]||(o[13]=n=>t.styles.buttonStyle="shadow")},[o[32]||(o[32]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",style:{"box-shadow":"0 3px 6px #ccc"}}," Button ",-1)),t.styles.buttonStyle!=="shadow"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[14]||(o[14]=n=>t.styles.buttonStyle="retro")},[e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",style:e.normalizeStyle(`box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};`)}," Button ",4),t.styles.buttonStyle!=="retro"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4)],4),o[39]||(o[39]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",ne,[e.createElementVNode("div",null,[e.createElementVNode("div",re,[e.createVNode(p,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...o[33]||(o[33]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(s,{modelValue:t.rendering,"onUpdate:modelValue":o[15]||(o[15]=n=>t.rendering=n),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(E,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(p,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...o[34]||(o[34]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",de,[e.createVNode(E,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(p,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...o[35]||(o[35]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",ie,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...o[36]||(o[36]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",ue,[e.createVNode(C,{modelValue:t.className,"onUpdate:modelValue":o[16]||(o[16]=n=>t.className=n),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...o[37]||(o[37]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",pe,[e.createVNode(C,{modelValue:t.componentName,"onUpdate:modelValue":o[17]||(o[17]=n=>t.componentName=n),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",ye,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),e.createVNode(u,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(l,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...o[40]||(o[40]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(l,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...o[41]||(o[41]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(l,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...o[42]||(o[42]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(l,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...o[43]||(o[43]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),ve={class:"grid py-4"},fe={class:"grid grid-cols-2 gap-2 mb-6"},ge={class:"relative"},be={class:"grid grid-cols-4 gap-2 mb-6"},Ce={class:"relative"},Ve={class:"relative"},ke={class:"relative"},Ne={class:"relative"},Ee={class:"grid grid-cols-1 gap-2 mb-6"},Be={class:"relative"},Te={class:"flex items-center space-x-2"},we={class:"flex items-center space-x-2"},De={class:"grid grid-cols-2 gap-2 mb-6"},Se={key:0},Fe={class:"relative"},$e={key:1},ze={class:"relative"},Ue={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},he=e.defineComponent({__name:"CardStyleDialog",props:{defaultBackground:{type:String,default:"#FFFFFF"}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",titleColor:"#000000",textColor:"#000000",borderColor:"#000000",roundness:"none",style:"default"}}),T=a=>{a?(v.value="edit",i.value=a.id,d.value=a.id==="DEFAULT",t.name=a.name||"",t.rendering=a.rendering||"class",t.className=a.className||"",t.componentName=a.componentName||"",t.styles.backgroundColor=a.styles.backgroundColor||"#FFFFFF",t.styles.titleColor=a.styles.titleColor||"#000000",t.styles.textColor=a.styles.textColor||"#000000",t.styles.borderColor=a.styles.borderColor||"#000000",t.styles.roundness=a.styles.roundness||"none",t.styles.style=a.styles.style||"default"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.roundness="none",t.styles.style="default"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.roundness="none",t.styles.style="default"},f=a=>{switch(a){case"none":return 0;case"small":return 8;case"medium":return 12;default:return 0}},r=e.computed(()=>{let a="."+t.className+` {
18
- `;return a+=` background-color: ${t.styles.backgroundColor};
19
- `,a+=` color: ${t.styles.textColor};
20
- `,t.styles.style==="outline"?a+=` border: 1px solid ${t.styles.borderColor};
21
- `:t.styles.style==="shadow"?a+=` box-shadow: 0 3px 6px #ccc;
22
- `:t.styles.style==="retro"&&(a+=` box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};
23
- `),t.styles.roundness!=="none"&&(a+=` border-radius: ${f(t.styles.roundness)}px;
24
- `),a+=`}
25
- `,a});return F({openDialog:T}),(a,o)=>{const z=e.resolveComponent("DialogTitle"),k=e.resolveComponent("DialogDescription"),N=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Label"),C=e.resolveComponent("Input"),E=e.resolveComponent("RadioGroupItem"),s=e.resolveComponent("RadioGroup"),l=e.resolveComponent("Button"),u=e.resolveComponent("DialogFooter"),c=e.resolveComponent("DialogScrollContent"),y=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(y,{open:x.value,"onUpdate:open":o[19]||(o[19]=n=>x.value=n)},{default:e.withCtx(()=>[e.createVNode(c,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Card Style":"Edit Card Style"),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[...o[20]||(o[20]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...o[21]||(o[21]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=n=>t.name=n),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),o[40]||(o[40]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",be,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...o[22]||(o[22]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",Ce,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>t.styles.backgroundColor=n),type:"color",label:"Background color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(C,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":o[2]||(o[2]=n=>t.styles.backgroundColor=n),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-title-color"},{default:e.withCtx(()=>[...o[23]||(o[23]=[e.createTextVNode("Heading color",-1)])]),_:1}),e.createElementVNode("div",Ve,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t.styles.titleColor=n),type:"color",label:"Heading color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.titleColor]]),e.createVNode(C,{modelValue:t.styles.titleColor,"onUpdate:modelValue":o[4]||(o[4]=n=>t.styles.titleColor=n),class:"pl-12",id:"collection-theme-dialog-title-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...o[24]||(o[24]=[e.createTextVNode("Text color",-1)])]),_:1}),e.createElementVNode("div",ke,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=n=>t.styles.textColor=n),type:"color",label:"Text color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(C,{modelValue:t.styles.textColor,"onUpdate:modelValue":o[6]||(o[6]=n=>t.styles.textColor=n),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-border-color"},{default:e.withCtx(()=>[...o[25]||(o[25]=[e.createTextVNode("Border color",-1)])]),_:1}),e.createElementVNode("div",Ne,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=n=>t.styles.borderColor=n),type:"color",label:"Border color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.borderColor]]),e.createVNode(C,{modelValue:t.styles.borderColor,"onUpdate:modelValue":o[8]||(o[8]=n=>t.styles.borderColor=n),class:"pl-12",id:"collection-theme-dialog-border-color"},null,8,["modelValue"])])])]),e.createElementVNode("div",{style:e.normalizeStyle(`--card-background-color: ${t.styles.backgroundColor}; --card-title-color: ${t.styles.titleColor}; --card-text-color: ${t.styles.textColor}`)},[e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[26]||(o[26]=[e.createTextVNode("Shape",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-3 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle({backgroundColor:S.defaultBackground})},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[9]||(o[9]=n=>t.styles.roundness="none")},[o[27]||(o[27]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="none"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[10]||(o[10]=n=>t.styles.roundness="small")},[o[28]||(o[28]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[8px]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="small"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[11]||(o[11]=n=>t.styles.roundness="medium")},[o[29]||(o[29]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[12px]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="medium"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4),e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[30]||(o[30]=[e.createTextVNode("Style",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle(`--card-border-radius: ${f(t.styles.roundness)}px; --card-border-color: ${t.styles.borderColor}; background-color: ${S.defaultBackground}`)},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[12]||(o[12]=n=>t.styles.style="default")},[o[31]||(o[31]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="default"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[13]||(o[13]=n=>t.styles.style="outline")},[o[32]||(o[32]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)] border border-[var(--card-border-color)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="outline"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[14]||(o[14]=n=>t.styles.style="shadow")},[o[33]||(o[33]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",style:{"box-shadow":"0 3px 6px #ccc"}},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="shadow"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[15]||(o[15]=n=>t.styles.style="retro")},[e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",style:e.normalizeStyle(`box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};`)},[...o[34]||(o[34]=[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card",-1),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.",-1)])],4),t.styles.style!=="retro"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4)],4),o[41]||(o[41]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",Ee,[e.createElementVNode("div",null,[e.createElementVNode("div",Be,[e.createVNode(p,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...o[35]||(o[35]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(s,{modelValue:t.rendering,"onUpdate:modelValue":o[16]||(o[16]=n=>t.rendering=n),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",Te,[e.createVNode(E,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(p,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...o[36]||(o[36]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",we,[e.createVNode(E,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(p,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...o[37]||(o[37]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",De,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...o[38]||(o[38]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",Fe,[e.createVNode(C,{modelValue:t.className,"onUpdate:modelValue":o[17]||(o[17]=n=>t.className=n),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...o[39]||(o[39]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",ze,[e.createVNode(C,{modelValue:t.componentName,"onUpdate:modelValue":o[18]||(o[18]=n=>t.componentName=n),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",Ue,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),e.createVNode(u,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(l,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...o[42]||(o[42]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(l,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...o[43]||(o[43]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(l,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...o[44]||(o[44]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(l,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...o[45]||(o[45]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Ae={class:"w-full"},Re={class:"flex items-center justify-between gap-4 w-full my-4"},Le={key:0,class:"flex gap-4 flex-wrap mb-8"},_e=["onClick"],Ie={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Me={key:1,class:"flex gap-4 flex-wrap mb-8"},Oe={key:2,class:"flex gap-4 flex-wrap mb-8"},Ge=["onClick"],Je={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Pe={key:3,class:"flex gap-4 flex-wrap mb-8"},He={key:4,class:"flex gap-4 flex-wrap mb-8"},je=["onClick"],qe={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Ke={key:5,class:"flex gap-4 flex-wrap mb-8"},Qe=e.defineComponent({__name:"GlobalStyling",setup(S){const{navigateTo:F}=U.useModuleRoute(),{getModuleData:g,setModuleData:b}=U.useModuleStorage();U.useModuleBreadcrumbs(()=>[{text:"Global Styling"}]);const V=e.ref(""),x=e.ref(""),v=e.ref(""),i=e.ref(null),d=e.ref(null),t=e.ref(null),T=e.computed(()=>i.value===null?null:i.value&&i.value.find(s=>s.id==="DEFAULT")?i.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...i.value]),B=e.computed(()=>T.value?.find(s=>s.id==="DEFAULT")?.styles.backgroundColor??"#FFFFFF"),w=e.computed(()=>d.value===null?null:d.value&&d.value.find(s=>s.id==="DEFAULT")?d.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...d.value]),D=e.computed(()=>t.value===null?null:t.value&&t.value.find(s=>s.id==="DEFAULT")?t.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...t.value]);async function $(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,i.value.push(l),i.value=await g("sectionThemes")||[],i.value.push(l),b("sectionThemes",i.value)}async function f(s){let l=JSON.parse(JSON.stringify(s)),u=i.value.findIndex(c=>c.id===l.id);u!==-1?i.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(i.value)||(i.value=[]),i.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...i.value]),i.value=await g("sectionThemes")||[],u=i.value.findIndex(c=>c.id===l.id),u!==-1?(i.value[u]=l,b("sectionThemes",i.value)):l.id==="DEFAULT"&&(Array.isArray(i.value)||(i.value=[]),i.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...i.value],b("sectionThemes",i.value))}async function r(s){i.value=i.value.filter(l=>l.id!==s),i.value=await g("sectionThemes")||[],i.value=i.value.filter(l=>l.id!==s),b("sectionThemes",i.value)}async function a(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,d.value.push(l),d.value=await g("buttonThemes")||[],d.value.push(l),b("buttonThemes",d.value)}async function o(s){let l=JSON.parse(JSON.stringify(s)),u=d.value.findIndex(c=>c.id===l.id);u!==-1?d.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(d.value)||(d.value=[]),d.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...d.value]),d.value=await g("buttonThemes")||[],u=d.value.findIndex(c=>c.id===l.id),u!==-1?(d.value[u]=l,b("buttonThemes",d.value)):l.id==="DEFAULT"&&(Array.isArray(d.value)||(d.value=[]),d.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...d.value],b("buttonThemes",d.value))}async function z(s){d.value=d.value.filter(l=>l.id!==s),d.value=await g("buttonThemes")||[],d.value=d.value.filter(l=>l.id!==s),b("buttonThemes",d.value)}const k=function(s){let l={};if(l.backgroundColor=s.styles.backgroundColor,l.color=s.styles.textColor,s.styles.buttonStyle==="outline"?l.border=`1px solid ${s.styles.borderColor}`:s.styles.buttonStyle==="shadow"?l.boxShadow="0 3px 6px #ccc":s.styles.buttonStyle==="retro"&&(l.boxShadow=`inset 0 0 0 2px ${s.styles.borderColor}, 2px 2px 0 ${s.styles.borderColor}`),s.styles.buttonRoundness!=="none"){let u=0;s.styles.buttonRoundness==="small"?u=4:s.styles.buttonRoundness==="medium"?u=8:s.styles.buttonRoundness==="pill"&&(u=9999),l.borderRadius=`${u}px`}return l};async function N(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,t.value.push(l),t.value=await g("cardThemes")||[],t.value.push(l),b("cardThemes",t.value)}async function p(s){let l=JSON.parse(JSON.stringify(s)),u=t.value.findIndex(c=>c.id===l.id);u!==-1?t.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(t.value)||(t.value=[]),t.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...t.value]),t.value=await g("cardThemes")||[],u=t.value.findIndex(c=>c.id===l.id),u!==-1?(t.value[u]=l,b("cardThemes",t.value)):l.id==="DEFAULT"&&(Array.isArray(t.value)||(t.value=[]),t.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...t.value],b("cardThemes",t.value))}async function C(s){t.value=t.value.filter(l=>l.id!==s),t.value=await g("cardThemes")||[],t.value=t.value.filter(l=>l.id!==s),b("cardThemes",t.value)}const E=function(s){let l={};if(l.backgroundColor=s.styles.backgroundColor,l.color=s.styles.textColor,s.styles.style==="outline"?l.border=`1px solid ${s.styles.borderColor}`:s.styles.style==="shadow"?l.boxShadow="0 3px 6px #ccc":s.styles.style==="retro"&&(l.boxShadow=`inset 0 0 0 2px ${s.styles.borderColor}, 2px 2px 0 ${s.styles.borderColor}`),s.styles.roundness!=="none"){let u=0;s.styles.roundness==="small"?u=4:s.styles.roundness==="medium"&&(u=8),l.borderRadius=`${u}px`}return l};return e.onMounted(()=>{g("sectionThemes").then(s=>{i.value=s||[]}),g("buttonThemes").then(s=>{d.value=s||[]}),g("cardThemes").then(s=>{t.value=s||[]})}),(s,l)=>{const u=e.resolveComponent("Button"),c=e.resolveComponent("Skeleton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ae,[e.createElementVNode("div",Re,[e.createVNode(u,{onClick:l[0]||(l[0]=y=>e.unref(F)("/")),variant:"link",class:"!pl-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.ChevronLeft),{class:"size-4"}),l[4]||(l[4]=e.createTextVNode(" Collections ",-1))]),_:1})]),l[10]||(l[10]=e.createElementVNode("h1",{class:"text-3xl mb-8"},"Global Styling",-1)),l[11]||(l[11]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Section Variants",-1)),l[12]||(l[12]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Set up the default design variants for your sections. These styles will be available across all collections by default, but you can choose to disable them within individual collections if needed. ",-1)),T.value!==null?(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[1]||(l[1]=y=>V.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[5]||(l[5]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>V.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-start rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:y.styles.backgroundColor,border:"1px solid #E5E7EB"})},[e.createElementVNode("strong",{class:"text-2xl",style:e.normalizeStyle({color:y.styles.titleColor})},"Title",4),e.createElementVNode("p",{class:"mb-1",style:e.normalizeStyle({color:y.styles.textColor})},[...l[6]||(l[6]=[e.createTextVNode("Lorem ipsum dolor",-1),e.createElementVNode("br",null,null,-1),e.createTextVNode("sit amet.",-1)])],4),y.className?(e.openBlock(),e.createElementBlock("p",{key:0,class:"px-3 py-1.5 rounded-[99px]",style:e.normalizeStyle({backgroundColor:y.styles.textColor,color:y.styles.backgroundColor})},"."+e.toDisplayString(y.className),5)):e.createCommentVNode("",!0)],4),e.createElementVNode("p",Ie,e.toDisplayString(y.name),1)],8,_e))),128))])):(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})])),l[13]||(l[13]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Button Variants",-1)),l[14]||(l[14]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Define your standard button styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ",-1)),w.value!==null?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[2]||(l[2]=y=>x.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[7]||(l[7]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>x.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-center justify-center rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:B.value})},[e.createElementVNode("div",{style:e.normalizeStyle(k(y)),class:"px-4 py-2"}," Button ",4)],4),e.createElementVNode("p",Je,e.toDisplayString(y.name),1)],8,Ge))),128))])):(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})])),l[15]||(l[15]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Card Variants",-1)),l[16]||(l[16]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Define your standard card styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ",-1)),D.value!==null?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[3]||(l[3]=y=>v.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[8]||(l[8]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>v.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-center justify-center rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:B.value})},[e.createElementVNode("div",{style:e.normalizeStyle(E(y)),class:"p-4"},[e.createElementVNode("strong",{class:"text-2xl",style:e.normalizeStyle({color:y.styles.titleColor})},"Card",4),l[9]||(l[9]=e.createElementVNode("p",null,"Lorem ipsum dolor sit amet.",-1))],4)],4),e.createElementVNode("p",qe,e.toDisplayString(y.name),1)],8,je))),128))])):(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})]))]),e.createVNode(X,{ref_key:"sectionStyleDialog",ref:V,onAdd:$,onEdit:f,onDelete:r},null,512),e.createVNode(xe,{ref_key:"buttonStyleDialog",ref:x,defaultBackground:B.value,onAdd:a,onEdit:o,onDelete:z},null,8,["defaultBackground"]),e.createVNode(he,{ref_key:"cardStyleDialog",ref:v,defaultBackground:B.value,onAdd:N,onEdit:p,onDelete:C},null,8,["defaultBackground"])],64)}}});exports.default=Qe;