@creaditor/web-starterkit 1.0.6 → 1.0.7

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 (69) hide show
  1. package/dist/1260.creaditor.bundle.js +260 -128
  2. package/dist/1260.creaditor.bundle.js.gz +0 -0
  3. package/dist/1271.creaditor.bundle.js +1 -1
  4. package/dist/1271.creaditor.bundle.js.gz +0 -0
  5. package/dist/1529.creaditor.bundle.js +1 -1
  6. package/dist/1529.creaditor.bundle.js.gz +0 -0
  7. package/dist/1565.creaditor.bundle.js +237 -73
  8. package/dist/1565.creaditor.bundle.js.gz +0 -0
  9. package/dist/170.creaditor.bundle.js +11 -5
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/2384.creaditor.bundle.js +33 -17
  12. package/dist/2384.creaditor.bundle.js.gz +0 -0
  13. package/dist/2590.creaditor.bundle.js +1 -2
  14. package/dist/2590.creaditor.bundle.js.gz +0 -0
  15. package/dist/3095.creaditor.bundle.js +91 -58
  16. package/dist/3095.creaditor.bundle.js.gz +0 -0
  17. package/dist/3521.creaditor.bundle.js +11 -9
  18. package/dist/3521.creaditor.bundle.js.gz +0 -0
  19. package/dist/3553.creaditor.bundle.js +1 -1
  20. package/dist/3553.creaditor.bundle.js.gz +0 -0
  21. package/dist/3932.creaditor.bundle.js +3 -3
  22. package/dist/3932.creaditor.bundle.js.gz +0 -0
  23. package/dist/4114.creaditor.bundle.js +1 -0
  24. package/dist/4114.creaditor.bundle.js.gz +0 -0
  25. package/dist/453.creaditor.bundle.js +1 -1
  26. package/dist/453.creaditor.bundle.js.gz +0 -0
  27. package/dist/4569.creaditor.bundle.js +141 -108
  28. package/dist/4569.creaditor.bundle.js.gz +0 -0
  29. package/dist/4819.creaditor.bundle.js +198 -235
  30. package/dist/4819.creaditor.bundle.js.gz +0 -0
  31. package/dist/5119.creaditor.bundle.js +1 -1
  32. package/dist/5119.creaditor.bundle.js.gz +0 -0
  33. package/dist/5340.creaditor.bundle.js +125 -36
  34. package/dist/5340.creaditor.bundle.js.gz +0 -0
  35. package/dist/5926.creaditor.bundle.js +24 -31
  36. package/dist/5926.creaditor.bundle.js.gz +0 -0
  37. package/dist/6937.creaditor.bundle.js +1 -0
  38. package/dist/6937.creaditor.bundle.js.gz +0 -0
  39. package/dist/7209.creaditor.bundle.js +2 -3
  40. package/dist/7209.creaditor.bundle.js.gz +0 -0
  41. package/dist/7238.creaditor.bundle.js +3 -3
  42. package/dist/7238.creaditor.bundle.js.gz +0 -0
  43. package/dist/752.creaditor.bundle.js +3 -7
  44. package/dist/752.creaditor.bundle.js.gz +0 -0
  45. package/dist/7937.creaditor.bundle.js +63 -115
  46. package/dist/7937.creaditor.bundle.js.gz +0 -0
  47. package/dist/8196.creaditor.bundle.js +51 -0
  48. package/dist/8196.creaditor.bundle.js.gz +0 -0
  49. package/dist/8305.creaditor.bundle.js +6 -6
  50. package/dist/8305.creaditor.bundle.js.gz +0 -0
  51. package/dist/8478.creaditor.bundle.js +1 -0
  52. package/dist/8478.creaditor.bundle.js.gz +0 -0
  53. package/dist/8516.creaditor.bundle.js +1 -1
  54. package/dist/8516.creaditor.bundle.js.gz +0 -0
  55. package/dist/8676.creaditor.bundle.js +1 -0
  56. package/dist/8676.creaditor.bundle.js.gz +0 -0
  57. package/dist/8916.creaditor.bundle.js +4 -4
  58. package/dist/8916.creaditor.bundle.js.gz +0 -0
  59. package/dist/9041.creaditor.bundle.js +1 -1
  60. package/dist/9041.creaditor.bundle.js.gz +0 -0
  61. package/dist/9162.creaditor.bundle.js +4 -3
  62. package/dist/9162.creaditor.bundle.js.gz +0 -0
  63. package/dist/9694.creaditor.bundle.js +1 -1
  64. package/dist/9694.creaditor.bundle.js.gz +0 -0
  65. package/dist/creaditor.bundle.js +1683 -558
  66. package/dist/creaditor.bundle.js.gz +0 -0
  67. package/dist/service-worker.js +1 -1
  68. package/dist/service-worker.js.gz +0 -0
  69. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,r){r.r(t),r.d(t,{BreadCrumbs:()=>a});var s=r(5441),n=r(59929),o=r(86319),i=r(58371),c=r(9507);class a extends n.WF{constructor(){super(),this.crumbs=[],this.cover=function(){const e=document.createElement("div");return e.style.position="fixed",e.style.background="var(--primary)",e.style.zIndex=2,e.style.border="1px dashed black",e.style.opacity=.2,e}(),this.currectCrumb={},this.onSubscribe=()=>{let e;this.crumbs=[];const t=c.Ay.components[c.Ay.components.length-1];if(!t)return;if(e=t.element,!e)return void console.error("selectElement not found","#1ppqmvss6");let r=t.type.getElementType(),s="";t.props.as&&(s=` (${o.M.get("lang",t.props.as)||t.props.as})`),this.currectCrumb={type:r,as:s,name:t.props.name,id:t.id};if(e){let t=e;for(;t&&t.parentElement;)if(t=t.parentElement.closest("[data-type]"),t){const e=o.M.get("components",t.dataset.id);let r=!0;e&&"row"!==e.type&&("col"===e.type&&"block"!==e.parent().type&&(r=!1),r&&this.crumbs.unshift({type:e.type,name:e.props.name,id:e.id,element:e.element,compose:e}))}this.dispatchEvent(new CustomEvent("change",[...this.crumbs]))}},this.onSubscribe=this.onSubscribe.bind(this)}onHover(e){if(e){const t=e.getBoundingClientRect();this.cover.style.left=t.left+"px",this.cover.style.top=t.top+"px",this.cover.style.width=t.width+"px",this.cover.style.height=t.height+"px",document.body.appendChild(this.cover)}}render(){const e=o.M.get("langConfig","direction");return this.crumbs.length>0?n.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,r){r.r(t),r.d(t,{BreadCrumbs:()=>a});var s=r(5441),n=r(59929),i=r(86319),o=r(58371),c=r(36565);class a extends n.WF{constructor(){super(),this.crumbs=[],this.cover=function(){const e=document.createElement("div");return e.style.position="fixed",e.style.background="var(--primary)",e.style.zIndex=2,e.style.border="1px dashed black",e.style.opacity=.2,e}(),this.currectCrumb={},this.onSubscribe=()=>{let e;this.crumbs=[];const t=c.Ay.components[c.Ay.components.length-1];if(!t)return;if(e=t.element,!e)return void console.error("selectElement not found","#1ppqmvss6");let r=t.type.getElementType(),s="";t.props.as&&(s=` (${i.M.get("lang",t.props.as)||t.props.as})`),this.currectCrumb={type:r,as:s,name:t.props.name,id:t.id};if(e){let t=e;for(;t&&t.parentElement;)if(t=t.parentElement.closest("[data-type]"),t){const e=i.M.get("components",t.dataset.id);let r=!0;e&&"row"!==e.type&&("col"===e.type&&"block"!==e.parent().type&&(r=!1),r&&this.crumbs.unshift({type:e.type,name:e.props.name,id:e.id,element:e.element,compose:e}))}this.dispatchEvent(new CustomEvent("change",[...this.crumbs]))}},this.onSubscribe=this.onSubscribe.bind(this)}updated(){this.toggleAttribute("hidden-crumbs",0===this.crumbs.length)}onHover(e){if(e){const t=e.getBoundingClientRect();this.cover.style.left=t.left+"px",this.cover.style.top=t.top+"px",this.cover.style.width=t.width+"px",this.cover.style.height=t.height+"px",document.body.appendChild(this.cover)}}render(){const e=i.M.get("langConfig","direction");return this.crumbs.length>0?n.qy`
2
2
  <!-- <cdtr-tooltip content="breadcrumbs_info" .opened=${!0}></cdtr-tooltip> -->
3
3
  <div>
4
4
  ${this.crumbs.map((t,r)=>n.qy` <span
@@ -7,19 +7,25 @@
7
7
  @mousedown=${()=>this.clickBread(t)}
8
8
  class="breadcrumb"
9
9
  >${t.name||n.qy`<lang-text text=${t.type}></lang-text>`}</span
10
- >${this.crumbs.length===r?null:(0,s.A)(i.D9,{style:{transform:`rotate(${"ltr"===e?"180deg":"0"})`},class:"arrow"})}`)}
10
+ >${this.crumbs.length===r?null:(0,s.A)(o.D9,{style:{transform:`rotate(${"ltr"===e?"180deg":"0"})`},class:"arrow"})}`)}
11
11
  ${this.mainText?n.qy` <div class="currect">
12
12
  ${this.currectCrumb.name||n.qy`<lang-text text=${this.currectCrumb.type}></lang-text
13
13
  >${this.currectCrumb.as}`}
14
14
  </div>`:null}
15
15
  </div>
16
16
 
17
- `:""}connectedCallback(){super.connectedCallback(),document.body.appendChild(this.cover),c.Ay.on("select",this.onSubscribe),c.Ay.on("update",this.onSubscribe)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),c.Ay.off("select",this.onSubscribe),c.Ay.off("update",this.onSubscribe)}clickBread(e){this.cover.remove(),c.Ay.clean().selectComponent(e.compose)}}a.styles=n.AH`
17
+ `:""}connectedCallback(){super.connectedCallback(),c.Ay.on("select",this.onSubscribe),c.Ay.on("update",this.onSubscribe)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),c.Ay.off("select",this.onSubscribe),c.Ay.off("update",this.onSubscribe)}clickBread(e){this.cover.remove(),c.Ay.clean().selectComponent(e.compose)}}a.styles=n.AH`
18
18
  :host {
19
19
  direction: var(--direction);
20
- padding: 10px;
21
20
  display: block;
22
- height: 50px;
21
+ }
22
+ :host([hidden-crumbs]) {
23
+ padding: 0;
24
+ height: 0;
25
+ overflow: hidden;
26
+ }
27
+ :host(:not([hidden-crumbs])) {
28
+ padding: 10px;
23
29
  }
24
30
  .currect {
25
31
  font-size: 13px;
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2384],{92384(t,e,n){n.r(e),n.d(e,{FONT_WEIGHTS:()=>s,FontFamilyEditor:()=>r});var i=n(59929),o=n(40120),a=n(86319);const s=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class r extends i.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);if(!n)return void console.error("cant set font family, font family not founded..");(0,o.sw)(n),this.value=n.cssRule,this.name=e;const i=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(i)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}connectedCallback(){super.connectedCallback();const t=a.M.get("config","editor","configure","editorProps","fonts"),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=i.qy`<cdtr-dropdown
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2384],{92384(t,e,n){n.r(e),n.d(e,{FONT_WEIGHTS:()=>a,FontFamilyEditor:()=>s});var o=n(59929),r=n(40120),i=n(86319);const a=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class s extends o.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);if(!n)return void console.error("cant set font family, font family not founded..");(0,r.sw)(n),this.value=n.cssRule,this.name=e;const o=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(o)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}connectedCallback(){super.connectedCallback();const t=i.M.get("config","editor","configure","editorProps","fonts"),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=o.qy`<cdtr-dropdown
2
2
  style="width:100%"
3
3
  .value="${this.name}"
4
4
  @change=${this.onchangeFontFamily}
@@ -11,11 +11,11 @@
11
11
  </cdtr-dropdown-button>
12
12
  <div slot="content">
13
13
  <cdtr-input
14
- .placeholder="${a.M.get("lang","search")}.."
14
+ .placeholder="${i.M.get("lang","search")}.."
15
15
  @input=${this.onFilteredFonts}
16
16
  type="search"
17
17
  ></cdtr-input>
18
- ${this.filteredFonts.map(t=>i.qy`<cdtr-dropdown-item
18
+ ${this.filteredFonts.map(t=>o.qy`<cdtr-dropdown-item
19
19
  .focused=${t.name===this.name}
20
20
  .selected=${t.name===this.name}
21
21
  value="${t.name}"
@@ -26,12 +26,9 @@
26
26
  >${t.name}</span>
27
27
  </cdtr-dropdown-item>`)}
28
28
  </div>
29
- </cdtr-dropdown>`,n=i.qy`
29
+ </cdtr-dropdown>`,n=o.qy`
30
30
  <cdtr-editor-container>
31
31
  <cdtr-row alignItems="center" justify="space-between">
32
- <cdtr-title pb="0" style="display:block" class="align-lang"
33
- ><lang-text text="fontFamily"></lang-text
34
- ></cdtr-title>
35
32
  <cdtr-col sm="12">
36
33
  <cdtr-row alignItems="center" justify="flex-end">
37
34
  ${e}
@@ -39,26 +36,26 @@
39
36
  </cdtr-col>
40
37
  </cdtr-row>
41
38
  </cdtr-editor-container>
42
- `,o=s.find(t=>String(t.value)===String(this.weight))||s.find(t=>400===t.value),r=i.qy`<cdtr-dropdown
39
+ `,r=a.find(t=>String(t.value)===String(this.weight))||a.find(t=>400===t.value),s=o.qy`<cdtr-dropdown
43
40
  style="width:100%"
44
- .value="${String(o?.value)}"
41
+ .value="${String(r?.value)}"
45
42
  @change=${this.onchangeFontWeight}
46
43
  >
47
44
  <cdtr-dropdown-button
48
45
  minWidth=${100}
49
46
  class="dropdown-button"
50
47
  slot="trigger"
51
- >${o?.value}
48
+ >${r?.value}
52
49
  </cdtr-dropdown-button>
53
50
  <div slot="content">
54
- ${s.map(t=>i.qy`<cdtr-dropdown-item
55
- .focused=${String(t.value)===String(o?.value)}
56
- .selected=${String(t.value)===String(o?.value)}
51
+ ${a.map(t=>o.qy`<cdtr-dropdown-item
52
+ .focused=${String(t.value)===String(r?.value)}
53
+ .selected=${String(t.value)===String(r?.value)}
57
54
  value="${t.value}"
58
55
  ><span style="font-weight:${t.value};">${t.value}</span>
59
56
  </cdtr-dropdown-item>`)}
60
57
  </div>
61
- </cdtr-dropdown>`,d=i.qy`
58
+ </cdtr-dropdown>`,d=o.qy`
62
59
  <cdtr-editor-container>
63
60
  <cdtr-row alignItems="center" justify="space-between">
64
61
  <cdtr-title pb="0" style="display:block" class="align-lang"
@@ -66,13 +63,32 @@
66
63
  ></cdtr-title>
67
64
  <cdtr-col sm="12">
68
65
  <cdtr-row alignItems="center" justify="flex-end">
69
- ${r}
66
+ ${s}
70
67
  </cdtr-row>
71
68
  </cdtr-col>
72
69
  </cdtr-row>
73
70
  </cdtr-editor-container>
74
- `;return this.light?this.showWeight?i.qy`${e}${r}`:e:this.showWeight?i.qy`${n}${d}`:n}}r.properties={value:{type:String},name:{type:String},fontFamilies:{type:Array},filteredFonts:{type:Array},isOpen:{type:Boolean},light:{type:Boolean},showWeight:{type:Boolean,attribute:!1},weight:{}},r.styles=i.AH`
71
+ `;return this.light?this.showWeight?o.qy`<div class="toolbar-flat">${e}${s}</div>`:o.qy`<div class="toolbar-flat">${e}</div>`:this.showWeight?o.qy`${n}${d}`:n}}s.properties={value:{type:String},name:{type:String},fontFamilies:{type:Array},filteredFonts:{type:Array},isOpen:{type:Boolean},light:{type:Boolean},showWeight:{type:Boolean,attribute:!1},weight:{}},s.styles=o.AH`
75
72
  .dropdown-button {
76
73
  min-width: 100px;
77
74
  }
78
- `,customElements.define("cdtr-font-family-editor",r)}}]);
75
+ /* Toolbar ("light") mode: flatten the picker so it reads as one of the
76
+ flat icon controls rather than a bordered <select>. Scoped to this
77
+ instance only — the bordered look is preserved everywhere else. */
78
+ .toolbar-flat cdtr-dropdown-button::part(button) {
79
+ height: 28px;
80
+ padding: 0 6px 0 8px;
81
+ border-color: transparent !important;
82
+ background: transparent !important;
83
+ border-radius: 7px;
84
+ color: #444b58;
85
+ font-size: 13px;
86
+ font-weight: 500;
87
+ transition: background 0.12s ease, color 0.12s ease;
88
+ }
89
+ .toolbar-flat cdtr-dropdown-button::part(button):hover {
90
+ border-color: transparent !important;
91
+ background: rgba(16, 24, 40, 0.055) !important;
92
+ color: #14171f;
93
+ }
94
+ `,customElements.define("cdtr-font-family-editor",s)}}]);
Binary file
@@ -1,7 +1,6 @@
1
1
  "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2590],{2590(t,e,i){i.r(e),i.d(e,{TitleEditor:()=>l});var n=i(59929),s=i(86319);class l extends n.WF{constructor(){super(),this.text="",this.whiteSpace="pre"}connectedCallback(){super.connectedCallback(),this.style.fontFamily="var(--font-family)",this.bold&&(this.style.fontWeight="bold")}render(){const t=s.M.get("theme");t&&(this.style.direction=t.direction,this.style.textAlign=this.textAlign||t.textAlign);const e=s.M.get("lang",this.text);return n.qy`<slot
2
2
  ><span
3
- style="-webkit-font-smoothing: antialiased;text-transform:capitalize;
4
- display:inline-block;direction:var(--direction-locale);text-align:var(--text-align-locale);white-space:${this.whiteSpace}"
3
+ style="-webkit-font-smoothing: antialiased;display:inline-block;direction:var(--direction-locale);text-align:var(--text-align-locale);white-space:${this.whiteSpace}"
5
4
  >${e||this.text}</span
6
5
  ></slot
7
6
  >`}}l.properties={text:{type:String,reflect:!1},whiteSpace:{type:String},textAlign:{type:String},bold:{type:Boolean}},customElements.get("lang-text")||customElements.define("lang-text",l)}}]);
Binary file
@@ -1,17 +1,18 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3095],{73095(e,t,o){o.r(t),o.d(t,{default:()=>d});var i=o(59929),s=o(21421),n=o(69600);class d extends i.WF{constructor(){super(),this.contentRef=(0,s._)(),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(e){this.searchText=e.target.value;const t=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}render(){return i.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3095],{73095(e,t,o){o.r(t),o.d(t,{default:()=>r});var n=o(59929),i=o(21421),s=o(69600);class r extends n.WF{constructor(){super(),this.contentRef=(0,i._)(),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(e){this.searchText=e.target.value;const t=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}render(){return n.qy`
2
2
  <slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
3
- ${this.opened?i.qy` <div
3
+ ${this.opened?n.qy` <div
4
4
  @mouseup=${this.onClickOutside}
5
+ @mousemove=${this.onPointerMove}
5
6
  class="backdrop"
6
- style="z-index:${(0,n.A)()};"
7
+ style="z-index:${(0,s.A)()};"
7
8
  >
8
9
  <div
9
- ${(0,s.K)(this.contentRef)}
10
+ ${(0,i.K)(this.contentRef)}
10
11
  @mouseup=${this.preventClosing}
11
- style="z-index:${(0,n.A)()};left:${this.left}px;top:${this.top}px;"
12
+ style="z-index:${(0,s.A)()};left:${this.left}px;top:${this.top}px;"
12
13
  class="dropdown-content fade-in ${this.custom?"":"dropdown-background"}"
13
14
  >
14
- ${this.search?i.qy`<cdtr-input
15
+ ${this.search?n.qy`<cdtr-input
15
16
  @input=${this.onBouncing}
16
17
  type="search"
17
18
  value=${this.searchText}
@@ -19,7 +20,7 @@
19
20
  <slot name="content"></slot>
20
21
  </div>
21
22
  </div>`:null}
22
- `}preventClosing(e){return e.stopPropagation(),setTimeout(()=>{this.calcRects()},0),!1}onClickOutside(){this.toggle(!1)}updated(){this.opened&&(setTimeout(()=>{this.calcRects()},0),this.contentRef.value?.classList.add("fade-in"),this.contentRef.value.style.maxHeight=`${this.maxHeight}px`)}calcRects(){let e=0,t=0;const o=this.getBoundingClientRect(),i=this.contentRef?.value?.getBoundingClientRect();i&&(e=o.left,t=o.top,e<0&&(e=0),t<0&&(t=0),e+i.width>window.innerWidth&&(e=window.innerWidth-i.width),t+i.height>window.innerHeight&&(t=window.innerHeight-i.height),this.left=e,this.top=t,this.contentRef.value.style.left=`${o.left}px`,this.contentRef.value.style.top=`${t+o.height}px`,this.contentRef.value.style.overflow=this.overflow?"hidden auto":"hidden")}toggle(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=e||!this.opened;t?(window.removeEventListener("keydown",this.onKeydown),window.addEventListener("keydown",this.onKeydown),this.opened=t,setTimeout(()=>{const e=this.focusedItem=this.querySelector("cdtr-dropdown-item[focused]")||this.querySelector("cdtr-dropdown-item");e&&e.focus()},20)):(window.removeEventListener("keydown",this.onKeydown),this.contentRef.value?.classList.add("fade-out"),setTimeout(()=>{this.opened=t},150)),this.setAttribute("aria-expanded",t)}onEnter(e){e.target===this&&13===e.keyCode&&this.toggle()}onKeydown(e){this.focusedItem&&40===e.keyCode&&this.focusedItem.nextElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.nextElementSibling.nodeName?(this.focusedItem=this.focusedItem.nextElementSibling,this.focusedItem&&this.focusedItem.focus()):this.focusedItem&&38===e.keyCode&&this.focusedItem.previousElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.previousElementSibling.nodeName?(this.focusedItem=this.focusedItem.previousElementSibling,this.focusedItem&&this.focusedItem.focus()):27===e.keyCode&&this.toggle();const t=new UIEvent("keypress",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",this.opened),this.addEventListener("keydown",this.onEnter),setTimeout(()=>{this.opened&&this.toggle(!0)},50)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKeydown)}patch(e){this.value=e,this.toggle(!1);const t=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),setTimeout(()=>{this.focus()},0)}}d.styles=i.AH`
23
+ `}preventClosing(e){return e.stopPropagation(),setTimeout(()=>{this.calcRects()},0),!1}onClickOutside(){this.toggle(!1)}updated(){this.opened&&(setTimeout(()=>{this.calcRects()},0),this.contentRef.value?.classList.add("fade-in"),this.contentRef.value.style.maxHeight=`${this.maxHeight}px`)}calcRects(){let e=0,t=0;const o=this.getBoundingClientRect(),n=this.contentRef?.value?.getBoundingClientRect();n&&(e=o.left,t=o.top,e<0&&(e=0),t<0&&(t=0),e+n.width>window.innerWidth&&(e=window.innerWidth-n.width),t+n.height>window.innerHeight&&(t=window.innerHeight-n.height),this.left=e,this.top=t,this.contentRef.value.style.left=`${o.left}px`,this.contentRef.value.style.top=`${t+o.height}px`,this.contentRef.value.style.overflow=this.overflow?"hidden auto":"hidden")}toggle(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=e||!this.opened;t?(window.removeEventListener("keydown",this.onKeydown),window.addEventListener("keydown",this.onKeydown),this.style.removeProperty("--cdtr-item-hover"),this.opened=t,setTimeout(()=>{const e=this.focusedItem=this.querySelector("cdtr-dropdown-item[focused]")||this.querySelector("cdtr-dropdown-item");e&&e.focus()},20)):(window.removeEventListener("keydown",this.onKeydown),this.contentRef.value?.classList.add("fade-out"),setTimeout(()=>{this.opened=t},150)),this.setAttribute("aria-expanded",t)}onEnter(e){e.target===this&&13===e.keyCode&&this.toggle()}onPointerMove(){this.style.removeProperty("--cdtr-item-hover")}onKeydown(e){40!==e.keyCode&&38!==e.keyCode||this.style.setProperty("--cdtr-item-hover","transparent"),this.focusedItem&&40===e.keyCode&&this.focusedItem.nextElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.nextElementSibling.nodeName?(this.focusedItem=this.focusedItem.nextElementSibling,this.focusedItem&&this.focusedItem.focus()):this.focusedItem&&38===e.keyCode&&this.focusedItem.previousElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.previousElementSibling.nodeName?(this.focusedItem=this.focusedItem.previousElementSibling,this.focusedItem&&this.focusedItem.focus()):27===e.keyCode&&this.toggle();const t=new UIEvent("keypress",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",this.opened),this.addEventListener("keydown",this.onEnter),setTimeout(()=>{this.opened&&this.toggle(!0)},50)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKeydown)}patch(e){this.value=e,this.toggle(!1);const t=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),setTimeout(()=>{this.focus()},0)}}r.styles=n.AH`
23
24
  :host {
24
25
  display: inline-block;
25
26
  overflow: hidden;
@@ -35,33 +36,38 @@
35
36
  background: transparent;
36
37
  overflow: hidden;
37
38
  }
39
+ /* padding lives here so custom content stays flush against the panel */
38
40
  .dropdown-background {
39
41
  background: #fff;
42
+ padding: 4px;
40
43
  }
41
44
  .dropdown-content {
42
45
  box-sizing: border-box;
43
- min-width: 50px;
44
- min-height: 50;
46
+ min-width: 180px;
47
+ min-height: 40px;
45
48
  position: fixed;
46
- border-radius: 0.25rem;
47
- /* padding: 3px; */
48
- box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
49
- transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
49
+ border-radius: 10px;
50
+ border: 1px solid #eceef1;
51
+ /* layered depth: a tight ambient edge + a soft key shadow */
52
+ box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06),
53
+ 0 8px 24px -6px rgba(16, 24, 40, 0.16);
54
+ transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
50
55
  }
51
56
  .fade-in {
52
- animation: fade-in 0.3s;
57
+ animation: fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
53
58
  }
54
59
  .fade-out {
55
- animation: fade-out 0.3s;
60
+ animation: fade-out 140ms ease both;
56
61
  opacity: 0;
57
62
  }
58
63
  @keyframes fade-in {
59
64
  from {
60
65
  opacity: 0;
61
- margin-top: 5px;
66
+ transform: translateY(-6px) scale(0.98);
62
67
  }
63
68
  to {
64
69
  opacity: 1;
70
+ transform: none;
65
71
  }
66
72
  }
67
73
  @keyframes fade-out {
@@ -69,42 +75,55 @@
69
75
  opacity: 1;
70
76
  }
71
77
  to {
72
- margin-top: 5px;
73
78
  opacity: 0;
79
+ transform: translateY(-4px);
74
80
  }
75
81
  }
76
- `,d.properties={search:{type:Boolean},searchText:{type:String},left:{type:Number},top:{type:Number},opened:{type:Boolean},maxHeight:{type:Number},overflow:{type:Boolean},value:{type:String},custom:{type:String}};class r extends i.WF{constructor(){super(),this.minWidth=50}render(){return i.qy`<paper-button style="min-width:${this.minWidth}px"
82
+ @media (prefers-reduced-motion: reduce) {
83
+ .fade-in,
84
+ .fade-out {
85
+ animation-duration: 1ms;
86
+ transform: none;
87
+ }
88
+ }
89
+ `,r.properties={search:{type:Boolean},searchText:{type:String},left:{type:Number},top:{type:Number},opened:{type:Boolean},maxHeight:{type:Number},overflow:{type:Boolean},value:{type:String},custom:{type:String}};class d extends n.WF{constructor(){super(),this.minWidth=50}render(){return n.qy`<paper-button style="min-width:${this.minWidth}px"
77
90
  ><slot></slot> <cdtr-dd-arrow-icon></cdtr-dd-arrow-icon
78
- ></paper-button>`}}r.properties={minWidth:{type:Number}},r.styles=i.AH`
91
+ ></paper-button>`}}d.properties={minWidth:{type:Number}},d.styles=n.AH`
79
92
  paper-button {
80
93
  display: flex;
94
+ align-items: center;
81
95
  justify-content: space-between;
96
+ gap: 8px;
82
97
  text-transform: capitalize;
83
98
  width: 100%;
84
- font-size: 14px;
85
- font-weight: 400;
86
- line-height: 1.5;
99
+ line-height: 1.4;
100
+ font-size: 13px;
101
+ font-weight: 500;
87
102
  color: rgb(33, 37, 41);
88
103
  background: rgb(255, 255, 255);
89
104
  background-clip: padding-box;
90
- border-width: 1px;
91
- border-style: solid;
92
- border-image: initial;
105
+ border: 1px solid var(--input-border-color, #ced4da);
93
106
  appearance: none;
94
- border-radius: 0.25rem;
107
+ border-radius: 8px;
95
108
  transition: border-color 0.15s ease-in-out 0s,
96
- box-shadow 0.15s ease-in-out 0s;
109
+ box-shadow 0.15s ease-in-out 0s, background-color 0.15s ease-in-out 0s;
97
110
  margin: 0px;
98
- font-family: var(--font-family);
99
- border-color: var(--input-border-color);
111
+ font-family: var(--font-family, "Inter", Arial, sans-serif);
100
112
  box-sizing: border-box;
101
- padding: 5px;
102
- font-size: 12px;
113
+ padding: 7px 10px;
114
+ cursor: pointer;
103
115
  }
104
116
  paper-button:hover {
105
- border-color: black;
117
+ border-color: #9aa1a9;
118
+ background: #fbfbfc;
106
119
  }
107
- `;class c extends i.WF{constructor(){super(),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}focus(){this.shadowRoot.querySelector(".dropdown-item").focus()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}onClick(e){if(this.notClickable)return;const t=this.closest("cdtr-dropdown");t&&t.patch(this.value,e,this)}onPress(e){if(13===e.keyCode){const t=new UIEvent("click",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const o=this.closest("cdtr-dropdown");o&&o.patch(this.value,e,this)}}connectedCallback(){super.connectedCallback(),this.selected&&this.scrollIntoView({behavior:"smooth",block:"start"})}render(){return i.qy`<div role="button"
120
+ paper-button:focus,
121
+ paper-button:focus-within {
122
+ outline: none;
123
+ border-color: var(--cdtr-dropdown-accent, #7c5cf6);
124
+ box-shadow: 0 0 0 3px rgba(124, 92, 246, 0.2);
125
+ }
126
+ `;class a extends n.WF{constructor(){super(),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}focus(){this.shadowRoot.querySelector(".dropdown-item").focus()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}onClick(e){if(this.notClickable)return;const t=this.closest("cdtr-dropdown");t&&t.patch(this.value,e,this)}onPress(e){if(13===e.keyCode){const t=new UIEvent("click",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const o=this.closest("cdtr-dropdown");o&&o.patch(this.value,e,this)}}connectedCallback(){super.connectedCallback(),this.selected&&this.scrollIntoView({behavior:"smooth",block:"start"})}render(){return n.qy`<div role="button"
108
127
  @click=${this.onClick}
109
128
  @keydown=${this.onPress}
110
129
  @blur=${this.onBlur}
@@ -112,50 +131,64 @@
112
131
  class="dropdown-item"
113
132
  tabindex="0"
114
133
  >
115
- ${this.selected?i.qy` <svg
116
- class="selected-svg"
117
- fill="var(--primary)"
134
+ <slot></slot>
135
+ ${this.selected?n.qy` <svg
136
+ class="check"
137
+ fill="currentColor"
118
138
  xmlns="http://www.w3.org/2000/svg"
119
139
  viewBox="0 0 24 24"
120
- width="24"
121
- height="24"
140
+ aria-hidden="true"
122
141
  >
123
142
  <path fill="none" d="M0 0h24v24H0z" />
124
143
  <path
125
144
  d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"
126
145
  />
127
146
  </svg>`:null}
128
- <slot></slot>
129
- </div>`}}c.properties={focused:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},notClickable:{type:Boolean}},c.styles=i.AH`
147
+ </div>`}}a.properties={focused:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},notClickable:{type:Boolean}},a.styles=n.AH`
130
148
  .dropdown-item {
131
149
  position: relative;
132
150
  box-sizing: border-box;
133
151
  display: flex;
134
- font-family: Arial, Helvetica, sans-serif;
135
- font-size: 12px;
136
- cursor: pointer;
137
- margin-bottom: 2px;
138
- display: flex;
139
152
  align-items: center;
140
- user-select: none;
141
- width: 100%;
142
153
  justify-content: space-between;
143
- box-sizing: border-box;
144
- padding: 10px 20px;
154
+ gap: 10px;
155
+ width: 100%;
156
+ padding: 8px 12px;
157
+ border-radius: 6px;
158
+ font-family: var(--font-family, "Inter", Arial, sans-serif);
159
+ font-size: 13px;
160
+ line-height: 1.4;
161
+ color: #212529;
162
+ cursor: pointer;
163
+ user-select: none;
164
+ transition: background-color 120ms ease, color 120ms ease,
165
+ box-shadow 120ms ease;
145
166
  }
167
+ /* hover = a translucent violet wash: ephemeral pointer feedback. The
168
+ parent sets --cdtr-item-hover to transparent while arrow-key
169
+ navigating so it never competes with the keyboard cursor below. */
146
170
  .dropdown-item:hover {
147
- background: #f3f3f396;
171
+ background: var(--cdtr-item-hover, rgba(124, 92, 246, 0.1));
148
172
  }
173
+ /* keyboard cursor: stronger wash + a left accent bar, so "where am I"
174
+ reads at a glance and is distinct from both hover and selected */
149
175
  .dropdown-item:focus {
150
- color: var(--primary-color);
151
176
  outline: none;
152
- background: #f3f3f3;
177
+ background: rgba(124, 92, 246, 0.16);
178
+ color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
179
+ box-shadow: inset 3px 0 0 var(--cdtr-dropdown-accent, #7c5cf6);
180
+ }
181
+ /* selected = the committed choice: a SOLID chip (opaque, not a wash),
182
+ accent text, weight, and a check — so it can't be mistaken for hover */
183
+ :host([selected]) .dropdown-item {
184
+ color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
185
+ font-weight: 600;
186
+ background: var(--cdtr-dropdown-selected-bg, #efeaff);
153
187
  }
154
- .selected-svg {
188
+ .check {
155
189
  width: 16px;
156
- position: absolute;
157
- left: 95%;
158
- transform: translate(-70%, -50%);
159
- top: 50%;
190
+ height: 16px;
191
+ flex: none;
192
+ color: var(--cdtr-dropdown-accent, #7c5cf6);
160
193
  }
161
- `,customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",c),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",r),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",d)}}]);
194
+ `,customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",a),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",d),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",r)}}]);
Binary file
@@ -1,12 +1,14 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3521],{83521(t,e,i){i.r(e),i.d(e,{DesignFactory:()=>c});var o=i(5441),r=i(59929),n=i(9507),s=i(18057),d=i(86319);i.e(8315).then(i.bind(i,68315));class c extends r.WF{constructor(){super(),this.lastEditor=null,d.M.set({injectEditor:t=>{this.injected=!0,this.lastEditor=this.editor,this.backToEditor=this.editor,this.editor=t}}),this.editor=r.qy`<cdtr-ilustration-preference
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3521],{83521(t,e,i){i.r(e),i.d(e,{DesignFactory:()=>l});var o=i(5441),r=i(59929),n=i(36565),s=i(18057),d=i(86319);i.e(8315).then(i.bind(i,68315));class l extends r.WF{constructor(){super(),this.lastEditor=null,d.M.set({injectEditor:t=>{this.injected=!0,this.lastEditor=this.editor,this.backToEditor=this.editor,this.editor=t}}),this.editor=r.qy`<cdtr-ilustration-preference
2
2
  width="200px"
3
3
  height="200px"
4
- ></cdtr-ilustration-preference>`,this.delayer=new s.A,this.connect=this.connect.bind(this),this.editors={block:{selector:"block-editor",load:()=>i.e(1260).then(i.bind(i,91260)),component:null},no_editor:{selector:"cdtr-no-component",load:()=>i.e(8854).then(i.bind(i,68854)),component:null,attrs:{style:"margin:auto;display:block;max-width:150px;margin-top:30px;"}}},this.type=null,n.Ay.on("select",this.connect)}connect(t){let{editor:e}=t;if(!e)return;let i=e.type;if("string"!=typeof i)return;if(this.editor?.type===i)return;if(!this.editors[i]){const t=d.M.get("config","editor","configure","plugins");if(Array.isArray(t)){const e=t.find(t=>t.name===i);if(e&&"function"==typeof e.createEditor){this.editor=document.createElement("cdtr-editor-builder"),this.editor.type=i;const t=e.createEditor();return void(t&&(this.editor.editors=t.layout,t!==this.backToEditor&&this.lastEditor&&(this.lastEditor=null)))}}i="no_editor"}this.type=i;const r=(0,o.A)("div",null,(0,o.A)("cdtr-block-loader",null),(0,o.A)("cdtr-title",{style:"text-align:center;"},(0,o.A)("lang-text",{text:"please_wait_downloading_new_version"})));this.editors[i]&&!this.editors[i].component&&(this.editors[i].load().then(()=>{if(r.remove(),this.editors[i].attrs)for(const t in this.editors[i].attrs)if(Object.hasOwnProperty.call(this.editors[i].attrs,t)){const e=this.editors[i].attrs[t];this.editors[i].component[t]=e}}),this.editors[i].component=document.createElement(this.editors[i].selector),this.editors[i].component.appendChild(r)),this.editors[i].component&&(this.editor=this.editors[i].component)}goBack(){this.lastEditor&&(this.editor=this.lastEditor,this.lastEditor=null)}createRenderRoot(){return this}render(){return r.qy` ${this.lastEditor?r.qy` <cdtr-row justify="end">
5
- <paper-button
4
+ ></cdtr-ilustration-preference>`,this.delayer=new s.A,this.connect=this.connect.bind(this),this.editors={block:{selector:"block-editor",load:()=>i.e(1260).then(i.bind(i,91260)),component:null},no_editor:{selector:"cdtr-no-component",load:()=>i.e(8854).then(i.bind(i,68854)),component:null,attrs:{style:"margin:auto;display:block;max-width:150px;margin-top:30px;"}}},this.type=null,n.Ay.on("select",this.connect)}connect(t){let{editor:e}=t;if(!e)return;let i=e.type;if("string"!=typeof i)return;if(this.editor?.type===i)return;if(!this.editors[i]){const t=d.M.get("config","editor","configure","plugins");if(Array.isArray(t)){const e=t.find(t=>t.name===i);if(e&&"function"==typeof e.createEditor){this.editor=document.createElement("cdtr-editor-builder"),this.editor.type=i;const t=e.createEditor();return void(t&&(this.editor.editors=t.layout,t!==this.backToEditor&&this.lastEditor&&(this.lastEditor=null)))}}i="no_editor"}this.type=i;const r=(0,o.A)("div",null,(0,o.A)("cdtr-block-loader",null),(0,o.A)("cdtr-title",{style:"text-align:center;"},(0,o.A)("lang-text",{text:"please_wait_downloading_new_version"})));this.editors[i]&&!this.editors[i].component&&(this.editors[i].load().then(()=>{if(r.remove(),this.editors[i].attrs)for(const t in this.editors[i].attrs)if(Object.hasOwnProperty.call(this.editors[i].attrs,t)){const e=this.editors[i].attrs[t];this.editors[i].component[t]=e}}),this.editors[i].component=document.createElement(this.editors[i].selector),this.editors[i].component.appendChild(r)),this.editors[i].component&&(this.editor=this.editors[i].component)}goBack(){this.lastEditor&&(this.editor=this.lastEditor,this.lastEditor=null)}createRenderRoot(){return this}render(){return r.qy` ${this.lastEditor?r.qy`<div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;direction:var(--direction-locale);">
5
+ <span
6
6
  @click=${this.goBack}
7
- style="margin:.5rem 0;padding:0;min-width:0;direction:var(--direction-locale);"
8
- ><cdtr-arrow-icon></cdtr-arrow-icon
9
- ><lang-text style="font-weight:700;" text="go_back"></lang-text
10
- ></paper-button>
11
- </cdtr-row>`:""}
12
- ${this.editor}`}}c.properties={type:{type:String},editor:{type:Object},injected:{type:Boolean}},customElements.define("design-factory",c)}}]);
7
+ style="display:inline-flex;align-items:center;gap:3px;font-size:12px;color:#555;cursor:pointer;font-family:inherit;"
8
+ @mouseover=${t=>{t.currentTarget.style.color="#333",t.currentTarget.style.textDecoration="underline"}}
9
+ @mouseout=${t=>{t.currentTarget.style.color="#555",t.currentTarget.style.textDecoration="none"}}
10
+ ><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg
11
+ ><lang-text text="go_back"></lang-text
12
+ ></span>
13
+ </div>`:""}
14
+ ${this.editor}`}}l.properties={type:{type:String},editor:{type:Object},injected:{type:Boolean}},customElements.define("design-factory",l)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3553],{3553(e,t,n){n.r(t),n.d(t,{AnimationEditor:()=>r});var s=n(59929),o=n(9507),i=n(49937),a=n(86319),c=n(49549);const d=[{id:1,name:"fade_in",class_code:"fadeIn",src:"",props:{},puzzle:[{type:"fade-in"}]},{id:1,name:"fade_in_down",class_code:"fadeInDown",puzzle:[{type:"fade-in-down"}],props:{}},{id:1,name:"back_in_down",class_code:"backInDown",puzzle:[{type:"back-in-down"}],props:{}},{id:1,name:"back_in_right",class_code:"backInRight",puzzle:[{type:"back-in-right"}],props:{}},{id:1,name:"bounce",class_code:"bounce",puzzle:[{type:"bounce"}],props:{}},{id:1,name:"tada",class_code:"tada",puzzle:[{type:"tada"}],props:{}}];class r extends s.WF{constructor(){super(),this.animationsOptions=[{type:"scroll",props:{},title:"on_scroll"}],this.stack=[],this.selectedAnimations=null,this.animations=d,this.onInspect=this.onInspect.bind(this)}onMouseClick(e,t){switch(e){case"scroll":o.Ay.store().execCommand("interactions",e=>{const n=e.props.interactions,s=n.findIndex(e=>"scroll"===e.on&&"animation"===e.type);let o;return-1!==s&&(o=n[s],n.splice(s,1)),o&&o.value===t.class_code&&"className"===o.as&&"scroll"===o.on?(i.A.dispatch("snackbar",{text:a.M.get("lang","animation_deleted")}),n):(n.push({on:"scroll",type:"animation",as:"className",value:t.class_code}),i.A.dispatch("snackbar",{text:a.M.get("lang","animation_added")}),n)});break;case"hover":o.Ay.store().execCommand("interactions",e=>{const n=e.props.interactions,s=n.findIndex(e=>"hover"===e.on&&"animation"===e.type);let o;return-1!==s&&(o=n[s],n.splice(s,1)),o&&o.value===t.class_code&&"className"===o.as&&"hover"===o.on?(i.A.dispatch("snackbar",{text:a.M.get("lang","animation_deleted")}),n):(n.push({on:"hover",type:"animation",as:"className",value:t.class_code}),i.A.dispatch("snackbar",{text:a.M.get("lang","animation_added")}),n)})}}onMouseEnter(e){setTimeout(()=>{e.overed=!0,o.Ay.components.forEach(t=>{this.stack.push({animation:e,component:t}),t.element.classList.add(`cdtr__animate__${e.class_code}`),t.element.classList.add("cdtr__animated")}),this.animations=JSON.parse(JSON.stringify(this.animations))},20)}onMouseLeave(e){e.overed=!1,this.stack.forEach(e=>{let{component:t,animation:n}=e;t.element.classList.remove(`cdtr__animate__${n.class_code}`),t.element.classList.remove("cdtr__animated")}),this.stack=[],this.animations=JSON.parse(JSON.stringify(this.animations))}onInspect(){const e=o.Ay.components[0];if(e){const t=e.props.interactions.filter(e=>e.type="animation");this.selectedAnimations=t}}connectedCallback(){super.connectedCallback(),this.style.zIndex=99,this.onInspect(),o.Ay.on("select",this.onInspect),o.Ay.on("update",this.onInspect)}disconnectedCallback(){super.disconnectedCallback(),o.Ay.off("select",this.onInspect),o.Ay.off("update",this.onInspect)}render(){return s.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3553],{3553(e,t,n){n.r(t),n.d(t,{AnimationEditor:()=>r});var s=n(59929),o=n(36565),i=n(49937),a=n(86319),c=n(49549);const d=[{id:1,name:"fade_in",class_code:"fadeIn",src:"",props:{},puzzle:[{type:"fade-in"}]},{id:1,name:"fade_in_down",class_code:"fadeInDown",puzzle:[{type:"fade-in-down"}],props:{}},{id:1,name:"back_in_down",class_code:"backInDown",puzzle:[{type:"back-in-down"}],props:{}},{id:1,name:"back_in_right",class_code:"backInRight",puzzle:[{type:"back-in-right"}],props:{}},{id:1,name:"bounce",class_code:"bounce",puzzle:[{type:"bounce"}],props:{}},{id:1,name:"tada",class_code:"tada",puzzle:[{type:"tada"}],props:{}}];class r extends s.WF{constructor(){super(),this.animationsOptions=[{type:"scroll",props:{},title:"on_scroll"}],this.stack=[],this.selectedAnimations=null,this.animations=d,this.onInspect=this.onInspect.bind(this)}onMouseClick(e,t){switch(e){case"scroll":o.Ay.store().execCommand("interactions",e=>{const n=e.props.interactions,s=n.findIndex(e=>"scroll"===e.on&&"animation"===e.type);let o;return-1!==s&&(o=n[s],n.splice(s,1)),o&&o.value===t.class_code&&"className"===o.as&&"scroll"===o.on?(i.A.dispatch("snackbar",{text:a.M.get("lang","animation_deleted")}),n):(n.push({on:"scroll",type:"animation",as:"className",value:t.class_code}),i.A.dispatch("snackbar",{text:a.M.get("lang","animation_added")}),n)});break;case"hover":o.Ay.store().execCommand("interactions",e=>{const n=e.props.interactions,s=n.findIndex(e=>"hover"===e.on&&"animation"===e.type);let o;return-1!==s&&(o=n[s],n.splice(s,1)),o&&o.value===t.class_code&&"className"===o.as&&"hover"===o.on?(i.A.dispatch("snackbar",{text:a.M.get("lang","animation_deleted")}),n):(n.push({on:"hover",type:"animation",as:"className",value:t.class_code}),i.A.dispatch("snackbar",{text:a.M.get("lang","animation_added")}),n)})}}onMouseEnter(e){setTimeout(()=>{e.overed=!0,o.Ay.components.forEach(t=>{this.stack.push({animation:e,component:t}),t.element.classList.add(`cdtr__animate__${e.class_code}`),t.element.classList.add("cdtr__animated")}),this.animations=JSON.parse(JSON.stringify(this.animations))},20)}onMouseLeave(e){e.overed=!1,this.stack.forEach(e=>{let{component:t,animation:n}=e;t.element.classList.remove(`cdtr__animate__${n.class_code}`),t.element.classList.remove("cdtr__animated")}),this.stack=[],this.animations=JSON.parse(JSON.stringify(this.animations))}onInspect(){const e=o.Ay.components[0];if(e){const t=e.props.interactions.filter(e=>e.type="animation");this.selectedAnimations=t}}connectedCallback(){super.connectedCallback(),this.style.zIndex=99,this.onInspect(),o.Ay.on("select",this.onInspect),o.Ay.on("update",this.onInspect)}disconnectedCallback(){super.disconnectedCallback(),o.Ay.off("select",this.onInspect),o.Ay.off("update",this.onInspect)}render(){return s.qy`
2
2
  <cdtr-accordion-item isOpen=${!0} label="on_scroll">
3
3
  <cdtr-row>
4
4
  ${(0,c.u)(this.animations,e=>e.id,e=>s.qy`<cdtr-col
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3932],{33932(e,t,r){r.r(t),r.d(t,{EyeDroppper:()=>o});var i=r(59929);const s=r(45888);class o extends i.WF{constructor(){super(),this.isValid=void 0,this.event=void 0,this.openEyeDropper=async()=>{const e=new AbortController;try{const e=new EyeDropper,{sRGBHex:t}=await e.open(),r=s(t).setAlpha(1).toRgbString();this.value=this.color=r,this.dispatchEvent(this.event)}catch(e){console.error(e)}e.abort()},this.isValid=!!window.EyeDropper,this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}render(){return this.isValid?i.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3932],{33932(e,t,r){r.r(t),r.d(t,{EyeDroppper:()=>n});var i=r(59929);const s=r(45888);class n extends i.WF{constructor(){super(),this.isValid=void 0,this.event=void 0,this.openEyeDropper=async()=>{const e=new AbortController;try{const t=new EyeDropper,{sRGBHex:r}=await t.open({signal:e.signal}),i=s(r).setAlpha(1).toRgbString();this.value=this.color=i,this.dispatchEvent(this.event)}catch(e){console.error(e)}e.abort()},this.isValid=!!window.EyeDropper,this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}render(){return this.isValid?i.qy`
2
2
  <svg
3
3
  tabIndex="0"
4
4
  @click=${this.openEyeDropper}
@@ -11,7 +11,7 @@
11
11
  d="m20.71 5.63-2.34-2.34a.9959.9959 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19 5 17.08l8.06-8.06 1.92 1.92L6.92 19z"
12
12
  ></path>
13
13
  </svg>
14
- `:null}}o.styles=i.AH`
14
+ `:null}}n.styles=i.AH`
15
15
  :host {
16
16
  position: relative;
17
17
  display: inline-block;
@@ -27,4 +27,4 @@
27
27
  transform: scale(1.1);
28
28
  fill: var(--dark);
29
29
  }
30
- `,o.properties={value:{type:String,reflect:!0},color:{type:String,reflect:!0}},customElements.define("cdtr-eye-dropper",o)}}]);
30
+ `,n.properties={value:{type:String,reflect:!0},color:{type:String,reflect:!0}},customElements.define("cdtr-eye-dropper",n)}}]);
Binary file
@@ -10,6 +10,7 @@
10
10
  >
11
11
  <path fill="none" d="M0 0h24v24H0z" />
12
12
  <path
13
+ fill="currentColor"
13
14
  d="M2.213 14.06a9.945 9.945 0 0 1 0-4.12c1.11.13 2.08-.237 2.396-1.001.317-.765-.108-1.71-.986-2.403a9.945 9.945 0 0 1 2.913-2.913c.692.877 1.638 1.303 2.403.986.765-.317 1.132-1.286 1.001-2.396a9.945 9.945 0 0 1 4.12 0c-.13 1.11.237 2.08 1.001 2.396.765.317 1.71-.108 2.403-.986a9.945 9.945 0 0 1 2.913 2.913c-.877.692-1.303 1.638-.986 2.403.317.765 1.286 1.132 2.396 1.001a9.945 9.945 0 0 1 0 4.12c-1.11-.13-2.08.237-2.396 1.001-.317.765.108 1.71.986 2.403a9.945 9.945 0 0 1-2.913 2.913c-.692-.877-1.638-1.303-2.403-.986-.765.317-1.132 1.286-1.001 2.396a9.945 9.945 0 0 1-4.12 0c.13-1.11-.237-2.08-1.001-2.396-.765-.317-1.71.108-2.403.986a9.945 9.945 0 0 1-2.913-2.913c.877-.692 1.303-1.638.986-2.403-.317-.765-1.286-1.132-2.396-1.001zM4 12.21c1.1.305 2.007 1.002 2.457 2.086.449 1.085.3 2.22-.262 3.212.096.102.195.201.297.297.993-.562 2.127-.71 3.212-.262 1.084.45 1.781 1.357 2.086 2.457.14.004.28.004.42 0 .305-1.1 1.002-2.007 2.086-2.457 1.085-.449 2.22-.3 3.212.262.102-.096.201-.195.297-.297-.562-.993-.71-2.127-.262-3.212.45-1.084 1.357-1.781 2.457-2.086.004-.14.004-.28 0-.42-1.1-.305-2.007-1.002-2.457-2.086-.449-1.085-.3-2.22.262-3.212a7.935 7.935 0 0 0-.297-.297c-.993.562-2.127.71-3.212.262C13.212 6.007 12.515 5.1 12.21 4a7.935 7.935 0 0 0-.42 0c-.305 1.1-1.002 2.007-2.086 2.457-1.085.449-2.22.3-3.212-.262-.102.096-.201.195-.297.297.562.993.71 2.127.262 3.212C6.007 10.788 5.1 11.485 4 11.79c-.004.14-.004.28 0 .42zM12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"
14
15
  />
15
16
  </svg>
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[453],{74726(p,x,r){function e(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}r.d(x,{A:()=>e})},50742(p,x,r){r.d(x,{P:()=>e});const e=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}]},50453(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e,t,a,o,i,d,l=r(59088),s=r(36936),n=r(59929),b=r(49410),g=r(86319),u=r(50742),c=r(74726);const h=r(9507).Ay,w="#000 0px 0px 0px 0px",f={};let m=(e=(0,b.MZ)({type:String}),t=(0,b.MZ)({type:String}),(d=class extends n.WF{constructor(){super(),(0,l.A)(this,"value",o,this),(0,l.A)(this,"boxShadow",i,this),this.tabName=void 0,this.theme=void 0,this.onChangeBoxShadow=(p,x)=>{const r={color:f.color,offsetY:f.offsetY,offsetX:f.offsetX,blurRadius:f.blurRadius,spreadRadius:f.spreadRadius,inset:!!f.inset};if(void 0!==r[p]&&("string"==typeof x||"number"==typeof x||"boolean"==typeof x)){r[p]=x,f[p]=x;const e=`${r.offsetX}px ${r.offsetY}px ${r.blurRadius}px ${r.spreadRadius}px ${r.color} ${r.inset?"inset":""}`;this.changeBoxShadowValue(e)}},this.tabName="design",this.theme=g.M.get("theme"),this.removeBoxShadow=this.removeBoxShadow.bind(this),this.onChangeBoxShadow=this.onChangeBoxShadow.bind(this)}changeBoxShadowValue(p){h.store().execCommand("style",{boxShadow:p}),this.boxShadow=this.value=p}removeBoxShadow(){h.store().execCommand("style",{boxShadow:w}),this.boxShadow=this.value=w}connectedCallback(){super.connectedCallback(),r.e(1456).then(r.bind(r,11456)),r.e(5666).then(r.bind(r,35666))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}changeTab(p){this.tabName=p.target.value}render(){if(void 0===this.value||this.value!==this.boxShadow){this.value||(this.value=w),this.boxShadow=this.value;const p=(0,c.A)(this.value);Array.isArray(p)&&p.length>0?(f.offsetX=p[0].offsetX,f.offsetY=p[0].offsetY,f.blurRadius=p[0].blurRadius,f.spreadRadius=p[0].spreadRadius,f.color=p[0].color,f.inset=p[0].inset):(f.offsetX=0,f.offsetY=0,f.blurRadius=0,f.spreadRadius=0,f.color="#000",f.inset=void 0)}return n.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[453],{74726(p,x,r){function e(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}r.d(x,{A:()=>e})},50742(p,x,r){r.d(x,{P:()=>e});const e=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}]},50453(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e,t,a,o,i,d,l=r(59088),s=r(36936),n=r(59929),b=r(49410),g=r(86319),u=r(50742),c=r(74726);const h=r(36565).Ay,w="#000 0px 0px 0px 0px",f={};let m=(e=(0,b.MZ)({type:String}),t=(0,b.MZ)({type:String}),(d=class extends n.WF{constructor(){super(),(0,l.A)(this,"value",o,this),(0,l.A)(this,"boxShadow",i,this),this.tabName=void 0,this.theme=void 0,this.onChangeBoxShadow=(p,x)=>{const r={color:f.color,offsetY:f.offsetY,offsetX:f.offsetX,blurRadius:f.blurRadius,spreadRadius:f.spreadRadius,inset:!!f.inset};if(void 0!==r[p]&&("string"==typeof x||"number"==typeof x||"boolean"==typeof x)){r[p]=x,f[p]=x;const e=`${r.offsetX}px ${r.offsetY}px ${r.blurRadius}px ${r.spreadRadius}px ${r.color} ${r.inset?"inset":""}`;this.changeBoxShadowValue(e)}},this.tabName="design",this.theme=g.M.get("theme"),this.removeBoxShadow=this.removeBoxShadow.bind(this),this.onChangeBoxShadow=this.onChangeBoxShadow.bind(this)}changeBoxShadowValue(p){h.store().execCommand("style",{boxShadow:p}),this.boxShadow=this.value=p}removeBoxShadow(){h.store().execCommand("style",{boxShadow:w}),this.boxShadow=this.value=w}connectedCallback(){super.connectedCallback(),r.e(1456).then(r.bind(r,11456)),r.e(5666).then(r.bind(r,35666))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}changeTab(p){this.tabName=p.target.value}render(){if(void 0===this.value||this.value!==this.boxShadow){this.value||(this.value=w),this.boxShadow=this.value;const p=(0,c.A)(this.value);Array.isArray(p)&&p.length>0?(f.offsetX=p[0].offsetX,f.offsetY=p[0].offsetY,f.blurRadius=p[0].blurRadius,f.spreadRadius=p[0].spreadRadius,f.color=p[0].color,f.inset=p[0].inset):(f.offsetX=0,f.offsetY=0,f.blurRadius=0,f.spreadRadius=0,f.color="#000",f.inset=void 0)}return n.qy`
2
2
  <cdtr-editor-container>
3
3
  <cdtr-row alignItems="center" justify="space-between">
4
4
  <cdtr-col>
Binary file