@creaditor/newsletter-starterkit 1.0.54 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1260.creaditor.bundle.js +66 -22
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +1 -439
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1403.creaditor.bundle.js +110 -0
- package/dist/1403.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +106 -105
- package/dist/1565.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js +4 -4
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +21 -20
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +4 -4
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +1 -1
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +11 -111
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +64 -257
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +1 -1
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/4970.creaditor.bundle.js +1314 -0
- package/dist/4970.creaditor.bundle.js.gz +0 -0
- package/dist/5340.creaditor.bundle.js +19 -18
- package/dist/5340.creaditor.bundle.js.gz +0 -0
- package/dist/574.creaditor.bundle.js +5 -5
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +10 -6
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +4 -4
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +34 -1
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7789.creaditor.bundle.js +25 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt +32 -0
- package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/7789.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +17 -17
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js +1 -1
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +1 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/9158.creaditor.bundle.js +613 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt +10 -0
- package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/9158.creaditor.bundle.js.gz +0 -0
- package/dist/9994.creaditor.bundle.js +114 -0
- package/dist/9994.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +1653 -565
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- 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([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),n=o(36565),a=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var c=o(9334),l=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;n.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),n=o(36565),a=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var c=o(9334),l=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;n.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"background"},{text:"design",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="design",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{n.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,n.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;n.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},n.Ay.store().execCommand("background","transparent")},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(n.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),n.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;n.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(n.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):n.Ay.store().execCommand("style",{[(0,c.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,c.A)(`padding-${o.toLowerCase()}`);"all"===o?(n.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(n.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;n.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,l.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),n.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&n.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,n.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),n.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();n.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=n.Ay.components[n.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,n.Ay.store().execCommand("modalable",this.modalable)}_setModalName(t){this.modalName=t,n.Ay.store().execCommand("modalName",t)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}render(){const t=i.M.get("config","channel");return r.qy`
|
|
2
2
|
<cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
|
|
3
3
|
<div slot="content">
|
|
4
4
|
<div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;">
|
|
@@ -146,6 +146,42 @@
|
|
|
146
146
|
></cdtr-checkbox>
|
|
147
147
|
</cdtr-col>
|
|
148
148
|
</cdtr-row>
|
|
149
|
+
${"web"===t?r.qy`
|
|
150
|
+
<cdtr-row alignItems="center" justify="space-between">
|
|
151
|
+
<cdtr-col
|
|
152
|
+
style="cursor:pointer"
|
|
153
|
+
@click=${()=>this._toggleModalable(!this.modalable)}
|
|
154
|
+
>
|
|
155
|
+
<cdtr-tooltip content="modal_hidden_on_view">
|
|
156
|
+
<cdtr-title>
|
|
157
|
+
<lang-text text="mark_as_modal"></lang-text>
|
|
158
|
+
</cdtr-title>
|
|
159
|
+
</cdtr-tooltip>
|
|
160
|
+
</cdtr-col>
|
|
161
|
+
<cdtr-col sm="1">
|
|
162
|
+
<cdtr-checkbox
|
|
163
|
+
@change=${t=>this._toggleModalable(!t.target.checked)}
|
|
164
|
+
.checked="${this.modalable}"
|
|
165
|
+
></cdtr-checkbox>
|
|
166
|
+
</cdtr-col>
|
|
167
|
+
</cdtr-row>
|
|
168
|
+
${this.modalable?r.qy`
|
|
169
|
+
<cdtr-title style="display:block;margin-top:8px">
|
|
170
|
+
<lang-text text="modal_name"></lang-text>
|
|
171
|
+
</cdtr-title>
|
|
172
|
+
<cdtr-input
|
|
173
|
+
style="width:100%"
|
|
174
|
+
.value=${this.modalName||""}
|
|
175
|
+
.placeholder=${i.M.get("lang","modal_name")||""}
|
|
176
|
+
@change=${t=>this._setModalName(t.target.value)}
|
|
177
|
+
></cdtr-input>
|
|
178
|
+
<p
|
|
179
|
+
style="font-size:12px;color:#888;line-height:1.5;margin:4px 0 0;font-style:italic;"
|
|
180
|
+
>
|
|
181
|
+
<lang-text text="modal_name_hint"></lang-text>
|
|
182
|
+
</p>
|
|
183
|
+
`:null}
|
|
184
|
+
`:null}
|
|
149
185
|
</cdtr-editor-section>
|
|
150
186
|
`:null}
|
|
151
187
|
|
|
@@ -202,22 +238,29 @@
|
|
|
202
238
|
paper-button.gallery,
|
|
203
239
|
paper-button.backgrounds {
|
|
204
240
|
text-transform: none;
|
|
205
|
-
font-size:
|
|
241
|
+
font-size: var(--text-sm, 13px);
|
|
206
242
|
font-weight: 500;
|
|
207
243
|
letter-spacing: 0.01em;
|
|
208
|
-
border-radius: 6px;
|
|
209
|
-
padding:
|
|
244
|
+
border-radius: var(--radius-sm, 6px);
|
|
245
|
+
padding: var(--space-2, 8px) var(--space-4, 16px);
|
|
210
246
|
min-width: 0;
|
|
247
|
+
transition: background var(--duration-fast, 120ms) var(--ease-default, ease);
|
|
211
248
|
}
|
|
212
249
|
paper-button.gallery {
|
|
213
|
-
background: var(--primary);
|
|
214
|
-
color: var(--primary-text);
|
|
250
|
+
background: var(--color-primary, #6366f1);
|
|
251
|
+
color: var(--color-primary-text, #fff);
|
|
252
|
+
}
|
|
253
|
+
paper-button.gallery:hover {
|
|
254
|
+
background: var(--color-primary-hover, #4f46e5);
|
|
215
255
|
}
|
|
216
256
|
paper-button.backgrounds {
|
|
217
|
-
background: #
|
|
218
|
-
color: #
|
|
257
|
+
background: var(--color-bg-muted, #f4f4f6);
|
|
258
|
+
color: var(--color-text-secondary, #555);
|
|
259
|
+
}
|
|
260
|
+
paper-button.backgrounds:hover {
|
|
261
|
+
background: #eaeaed;
|
|
219
262
|
}
|
|
220
|
-
`,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
|
|
263
|
+
`,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
|
|
221
264
|
<div class="${t}">
|
|
222
265
|
${(this.items||[]).map((t,e)=>r.qy`
|
|
223
266
|
<div class="swatch-item" @click=${()=>this.openPicker(e)}>
|
|
@@ -294,7 +337,7 @@
|
|
|
294
337
|
.items=${t.items}
|
|
295
338
|
.columns=${t.columns||2}
|
|
296
339
|
></cdtr-color-swatch-group>
|
|
297
|
-
`},12258(t,e,o){o.d(e,{A:()=>
|
|
340
|
+
`},12258(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(40648);class n extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
|
|
298
341
|
<div class="section">
|
|
299
342
|
<div class="header" @click=${this.toggle}>
|
|
300
343
|
<span class="title"><lang-text text="${this.label}"></lang-text></span>
|
|
@@ -308,44 +351,44 @@
|
|
|
308
351
|
</div>
|
|
309
352
|
</div>
|
|
310
353
|
</div>
|
|
311
|
-
`}}
|
|
354
|
+
`}}n.styles=r.AH`
|
|
312
355
|
:host {
|
|
313
356
|
display: block;
|
|
314
357
|
direction: var(--direction-locale, ltr);
|
|
315
358
|
--editor-container-inline-padding: 0;
|
|
316
359
|
}
|
|
317
360
|
.section {
|
|
318
|
-
border-bottom: 1px solid
|
|
361
|
+
border-bottom: 1px solid var(--color-border);
|
|
319
362
|
}
|
|
320
363
|
.header {
|
|
321
364
|
display: flex;
|
|
322
365
|
align-items: center;
|
|
323
366
|
justify-content: space-between;
|
|
324
|
-
padding:
|
|
367
|
+
padding: var(--space-3) var(--space-4);
|
|
325
368
|
cursor: pointer;
|
|
326
369
|
user-select: none;
|
|
327
370
|
}
|
|
328
371
|
.title {
|
|
329
|
-
font-size:
|
|
372
|
+
font-size: var(--text-md);
|
|
330
373
|
font-weight: 600;
|
|
331
|
-
color:
|
|
374
|
+
color: var(--color-text);
|
|
332
375
|
letter-spacing: 0.01em;
|
|
333
376
|
}
|
|
334
377
|
.chevron {
|
|
335
378
|
width: 16px;
|
|
336
379
|
height: 16px;
|
|
337
|
-
transition: transform
|
|
338
|
-
color:
|
|
380
|
+
transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
|
|
381
|
+
color: var(--color-text-faint);
|
|
339
382
|
}
|
|
340
383
|
.header:hover .chevron {
|
|
341
|
-
color:
|
|
384
|
+
color: var(--color-text-muted);
|
|
342
385
|
}
|
|
343
386
|
.chevron.open {
|
|
344
387
|
transform: rotate(180deg);
|
|
345
388
|
}
|
|
346
389
|
.content {
|
|
347
390
|
overflow: hidden;
|
|
348
|
-
transition: max-height
|
|
391
|
+
transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
|
|
349
392
|
max-height: 0;
|
|
350
393
|
opacity: 0;
|
|
351
394
|
}
|
|
@@ -354,13 +397,14 @@
|
|
|
354
397
|
opacity: 1;
|
|
355
398
|
}
|
|
356
399
|
.content-inner {
|
|
357
|
-
padding:
|
|
400
|
+
padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
|
|
358
401
|
}
|
|
359
|
-
`,
|
|
402
|
+
`,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
|
|
360
403
|
<cdtr-editor-section
|
|
361
404
|
.label=${t.label}
|
|
362
405
|
.open=${!1!==t.open}
|
|
406
|
+
.persistKey=${t.persistKey||""}
|
|
363
407
|
>
|
|
364
408
|
${e}
|
|
365
409
|
</cdtr-editor-section>
|
|
366
|
-
`}}]);
|
|
410
|
+
`},40648(t,e,o){o.d(e,{Q:()=>a,i:()=>n});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function n(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function a(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
|
|
Binary file
|