@creaditor/newsletter-starterkit 1.0.56 → 1.0.57
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/1142.creaditor.bundle.js +1 -1
- package/dist/1142.creaditor.bundle.js.gz +0 -0
- package/dist/1260.creaditor.bundle.js +112 -63
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/1271.creaditor.bundle.js +544 -1
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1334.creaditor.bundle.js +3 -3
- package/dist/1334.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +149 -22
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/211.creaditor.bundle.js +1 -1
- package/dist/211.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js +121 -1
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js +1 -1
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js +6 -6
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2765.creaditor.bundle.js +1 -1
- package/dist/2765.creaditor.bundle.js.gz +0 -0
- package/dist/2956.creaditor.bundle.js +1 -1
- package/dist/2956.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +2 -2
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/353.creaditor.bundle.js +3 -3
- package/dist/353.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js +1 -1
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js +12 -4
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3932.creaditor.bundle.js +4 -4
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4061.creaditor.bundle.js +177 -0
- package/dist/4061.creaditor.bundle.js.LICENSE.txt +23 -0
- package/dist/4061.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/4061.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +5 -1
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js +10 -10
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/4475.creaditor.bundle.js +1 -1
- package/dist/4475.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +8 -7
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4639.creaditor.bundle.js +1 -1
- package/dist/4639.creaditor.bundle.js.gz +0 -0
- package/dist/4762.creaditor.bundle.js +4 -4
- package/dist/4762.creaditor.bundle.js.gz +0 -0
- package/dist/4770.creaditor.bundle.js +3 -3
- package/dist/4770.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js +3 -3
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5379.creaditor.bundle.js +70 -0
- package/dist/5379.creaditor.bundle.js.gz +0 -0
- package/dist/5391.creaditor.bundle.js +1 -1
- package/dist/5391.creaditor.bundle.js.gz +0 -0
- package/dist/567.creaditor.bundle.js +469 -364
- package/dist/567.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js +2 -2
- package/dist/5849.creaditor.bundle.js.gz +0 -0
- package/dist/589.creaditor.bundle.js +25 -8
- package/dist/589.creaditor.bundle.js.gz +0 -0
- package/dist/5909.creaditor.bundle.js +651 -0
- package/dist/5909.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +216 -34
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +49 -20
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6814.creaditor.bundle.js +1 -1
- package/dist/6814.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js +98 -56
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +6 -4
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/7564.creaditor.bundle.js +1 -1
- package/dist/7564.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +9 -9
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7654.creaditor.bundle.js +221 -0
- package/dist/7654.creaditor.bundle.js.gz +0 -0
- package/dist/7918.creaditor.bundle.js +1 -0
- package/dist/7918.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +21 -48
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/7997.creaditor.bundle.js +1 -1
- package/dist/7997.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js +2 -3
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8250.creaditor.bundle.js +1 -1
- package/dist/8250.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js +1 -1
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8547.creaditor.bundle.js +1270 -0
- package/dist/8547.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js +3 -3
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +20 -24
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js +7 -7
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js +4 -4
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +3 -1
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +14 -16
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9250.creaditor.bundle.js +1 -1
- package/dist/9250.creaditor.bundle.js.gz +0 -0
- package/dist/9431.creaditor.bundle.js +1 -1
- package/dist/9431.creaditor.bundle.js.gz +0 -0
- package/dist/9694.creaditor.bundle.js +1 -1
- package/dist/9694.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +2848 -1978
- package/dist/creaditor.bundle.js.LICENSE.txt +6 -0
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- 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
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5909],{65909(e,t,i){i.r(t),i.d(t,{NextButton:()=>u});var o=i(59929),s=i(86319),r=i(93432),n=i(90090),a=i(86959),l=i(36565);const c=`${(0,a.Ay)()?"http://127.0.0.1:8000":"https://studio.creaditor.ai"}/api/seo-generate`;const d=o.qy`
|
|
2
|
+
<svg viewBox="0 0 24 24" fill="currentColor" width="16" height="16" aria-hidden="true">
|
|
3
|
+
<path
|
|
4
|
+
d="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
`;class p extends o.WF{constructor(){super(),this.resolver=null,this.onCancel=()=>{this.loading||this.close(null)},this.onKeywordKeydown=e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),this.commitDraftKeyword()):"Backspace"===e.key&&""===this.keywordDraft&&this.keywordList.length&&(this.keywordList=this.keywordList.slice(0,-1))},this.generateField=async e=>{if(this.loading||this.generatingField)return;const t=function(){const e=document.getElementById("main-page-wrapper");return(e?.innerText||"").trim()}();if(t){this.generatingField=e;try{const i="rtl"===this.direction?"he":"en",o=await this.requestSeo(e,t,i);if("keywords"===e){const e=(Array.isArray(o)?o:String(o).split(",")).map(e=>e.trim()).filter(Boolean),t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t}else"title"===e?this.title=String(o).slice(0,100):this.description=String(o).slice(0,255)}catch(e){console.error("[seo-generate] failed:",e),this.snackbar(this.t("seo_generate_failed","Couldn't generate. Please try again."))}finally{this.generatingField=""}}else this.snackbar(this.t("seo_generate_empty","Add some content to the page first."))},this.onPublish=()=>{this.loading||(this.commitDraftKeyword(),this.loading=!0,this.close({title:this.title.trim(),description:this.description.trim(),keywords:[...this.keywordList]}))},this.loading=!1,this.title="",this.description="",this.keywordList=[],this.keywordDraft="",this.keywordsFocused=!1,this.generatingField=""}static open(){const e=document.createElement("cdtr-publish-seo"),t=s.M.get("app","seo")||{};return e.title=t.title||"",e.description=t.description||"",e.keywordList=(Array.isArray(t.keywords)?t.keywords:String(t.keywords||"").split(",")).map(e=>String(e).trim()).filter(Boolean),document.body.appendChild(e),e.waitForChoice()}waitForChoice(){return new Promise(e=>{this.resolver=e})}t(e,t){return s.M.get("lang",e)||t}get direction(){const e=s.M.get("theme");return e?.direction||"rtl"}close(e){this.resolver&&(this.resolver(e),this.resolver=null),this.isConnected&&this.remove()}commitDraftKeyword(){const e=this.keywordDraft.split(",").map(e=>e.trim()).filter(Boolean);if(!e.length)return;const t=[...this.keywordList];for(const i of e)t.includes(i)||t.push(i);this.keywordList=t,this.keywordDraft=""}removeKeyword(e){this.keywordList=this.keywordList.filter((t,i)=>i!==e)}snackbar(e){const t=s.M.get("commands");t?.snackbar?.(e)}async requestSeo(e,t,i){const o=async o=>{const s=await async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=l.Ay;if("function"==typeof t.studioTokenProvider)try{const i=await t.studioTokenProvider({forceRefresh:e});if("string"==typeof i&&i.length>0)return i}catch{}return"string"==typeof t.studioToken&&t.studioToken.length>0?t.studioToken:null}(o),r={"Content-Type":"application/json",Accept:"application/json"};return s&&(r.Authorization=`Bearer ${s}`),fetch(c,{method:"POST",headers:r,body:JSON.stringify({content:t,field:e,language:i})})};let s=await o(!1);if(401===s.status&&(s=await o(!0)),!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();if(!r.ok||void 0===r.value)throw new Error("bad response");return r.value}magicButton(e){const t=this.generatingField===e;return o.qy`
|
|
8
|
+
<button
|
|
9
|
+
class="magic"
|
|
10
|
+
type="button"
|
|
11
|
+
title=${this.t("seo_generate_tooltip","Generate with AI")}
|
|
12
|
+
aria-label=${this.t("seo_generate_tooltip","Generate with AI")}
|
|
13
|
+
?disabled=${this.loading||!!this.generatingField}
|
|
14
|
+
@click=${()=>this.generateField(e)}
|
|
15
|
+
>
|
|
16
|
+
${t?o.qy`<span class="mini-spinner"></span>`:d}
|
|
17
|
+
</button>
|
|
18
|
+
`}render(){const e=this.direction;return o.qy`
|
|
19
|
+
<div class="backdrop" @click=${this.onCancel}></div>
|
|
20
|
+
<div class="card" dir=${e}>
|
|
21
|
+
<h2 class="heading">${this.t("ready_to_publish","Ready to publish")}</h2>
|
|
22
|
+
<p class="subheading">${this.t("lets_set_some_seo","Let's set some SEO")}</p>
|
|
23
|
+
|
|
24
|
+
<div class="field">
|
|
25
|
+
<div class="label-row">
|
|
26
|
+
<label>${this.t("seo_title_label","Page name for search engines and social networks (SEO)")}</label>
|
|
27
|
+
${this.magicButton("title")}
|
|
28
|
+
</div>
|
|
29
|
+
<input
|
|
30
|
+
type="text"
|
|
31
|
+
maxlength=${100}
|
|
32
|
+
.value=${this.title}
|
|
33
|
+
placeholder=${this.t("seo_title_placeholder","Page name as it will appear in search engines")}
|
|
34
|
+
@input=${e=>this.title=e.target.value}
|
|
35
|
+
/>
|
|
36
|
+
<div class="counter">${this.title.length}/${100}</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="field">
|
|
40
|
+
<div class="label-row">
|
|
41
|
+
<label>${this.t("seo_description_label","Page description for search engine and social network promotion (SEO)")}</label>
|
|
42
|
+
${this.magicButton("description")}
|
|
43
|
+
</div>
|
|
44
|
+
<textarea
|
|
45
|
+
maxlength=${255}
|
|
46
|
+
.value=${this.description}
|
|
47
|
+
placeholder=${this.t("seo_description_placeholder","This description will appear below the site title in search engines")}
|
|
48
|
+
@input=${e=>this.description=e.target.value}
|
|
49
|
+
></textarea>
|
|
50
|
+
<div class="counter">${this.description.length}/${255}</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="field">
|
|
54
|
+
<div class="label-row">
|
|
55
|
+
<label>${this.t("seo_keywords_label","Keywords")}</label>
|
|
56
|
+
${this.magicButton("keywords")}
|
|
57
|
+
</div>
|
|
58
|
+
<div
|
|
59
|
+
class="chips ${this.keywordsFocused?"focused":""}"
|
|
60
|
+
@click=${e=>{const t=e.currentTarget.querySelector("input");t?.focus()}}
|
|
61
|
+
>
|
|
62
|
+
${this.keywordList.map((e,t)=>o.qy`
|
|
63
|
+
<span class="chip">
|
|
64
|
+
${e}
|
|
65
|
+
<button
|
|
66
|
+
type="button"
|
|
67
|
+
aria-label="remove"
|
|
68
|
+
@click=${e=>{e.stopPropagation(),this.removeKeyword(t)}}
|
|
69
|
+
>
|
|
70
|
+
✕
|
|
71
|
+
</button>
|
|
72
|
+
</span>
|
|
73
|
+
`)}
|
|
74
|
+
<input
|
|
75
|
+
type="text"
|
|
76
|
+
.value=${this.keywordDraft}
|
|
77
|
+
placeholder=${this.keywordList.length?"":this.t("seo_keywords_placeholder","For example: gift,woman,gift for woman")}
|
|
78
|
+
@input=${e=>this.keywordDraft=e.target.value}
|
|
79
|
+
@keydown=${this.onKeywordKeydown}
|
|
80
|
+
@focus=${()=>this.keywordsFocused=!0}
|
|
81
|
+
@blur=${()=>{this.keywordsFocused=!1,this.commitDraftKeyword()}}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="actions">
|
|
87
|
+
<button class="publish" ?disabled=${this.loading} @click=${this.onPublish}>
|
|
88
|
+
${this.loading?o.qy`<span class="spinner"></span>`:this.t("publish","Publish")}
|
|
89
|
+
</button>
|
|
90
|
+
<button class="cancel" ?disabled=${this.loading} @click=${this.onCancel}>
|
|
91
|
+
${this.t("cancel","Cancel")}
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
`}}p.styles=o.AH`
|
|
96
|
+
:host {
|
|
97
|
+
position: fixed;
|
|
98
|
+
inset: 0;
|
|
99
|
+
z-index: var(--z-blocking, 2147483646);
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
font-family: var(--font-family, Arial, Helvetica, sans-serif);
|
|
104
|
+
}
|
|
105
|
+
.backdrop {
|
|
106
|
+
position: absolute;
|
|
107
|
+
inset: 0;
|
|
108
|
+
background: rgba(26, 26, 46, 0.45);
|
|
109
|
+
animation: fade 0.2s ease forwards;
|
|
110
|
+
}
|
|
111
|
+
@keyframes fade {
|
|
112
|
+
from { opacity: 0; }
|
|
113
|
+
to { opacity: 1; }
|
|
114
|
+
}
|
|
115
|
+
.card {
|
|
116
|
+
position: relative;
|
|
117
|
+
background: #fff;
|
|
118
|
+
border-radius: 14px;
|
|
119
|
+
box-shadow: 0 24px 60px rgba(26, 26, 46, 0.28);
|
|
120
|
+
width: 560px;
|
|
121
|
+
max-width: 92vw;
|
|
122
|
+
max-height: 90vh;
|
|
123
|
+
overflow-y: auto;
|
|
124
|
+
padding: 34px 40px 30px;
|
|
125
|
+
box-sizing: border-box;
|
|
126
|
+
opacity: 0;
|
|
127
|
+
transform: scale(0.96);
|
|
128
|
+
animation: pop 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
|
|
129
|
+
}
|
|
130
|
+
@keyframes pop {
|
|
131
|
+
to { opacity: 1; transform: scale(1); }
|
|
132
|
+
}
|
|
133
|
+
.heading {
|
|
134
|
+
font-size: 26px;
|
|
135
|
+
font-weight: 700;
|
|
136
|
+
color: #1a1a2e;
|
|
137
|
+
margin: 0;
|
|
138
|
+
}
|
|
139
|
+
.subheading {
|
|
140
|
+
font-size: 17px;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
color: #8a8f9c;
|
|
143
|
+
margin: 10px 0 0;
|
|
144
|
+
}
|
|
145
|
+
.field {
|
|
146
|
+
margin-top: 26px;
|
|
147
|
+
}
|
|
148
|
+
label {
|
|
149
|
+
display: block;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
color: #3a3a4a;
|
|
152
|
+
margin-bottom: 8px;
|
|
153
|
+
}
|
|
154
|
+
.label-row {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
justify-content: space-between;
|
|
158
|
+
gap: 8px;
|
|
159
|
+
margin-bottom: 8px;
|
|
160
|
+
}
|
|
161
|
+
.label-row label {
|
|
162
|
+
margin-bottom: 0;
|
|
163
|
+
}
|
|
164
|
+
.magic {
|
|
165
|
+
flex: none;
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
width: 30px;
|
|
170
|
+
height: 30px;
|
|
171
|
+
border: 1px solid #d5d7de;
|
|
172
|
+
border-radius: 8px;
|
|
173
|
+
background: #fff;
|
|
174
|
+
color: var(--color-primary, #6366f1);
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
line-height: 1;
|
|
177
|
+
transition: border-color 0.15s ease, background 0.15s ease;
|
|
178
|
+
}
|
|
179
|
+
.magic svg {
|
|
180
|
+
display: block;
|
|
181
|
+
}
|
|
182
|
+
.magic:hover:not(:disabled) {
|
|
183
|
+
border-color: var(--color-primary, #6366f1);
|
|
184
|
+
background: color-mix(in srgb, var(--primary, #6c5ce7) 10%, #fff);
|
|
185
|
+
}
|
|
186
|
+
.magic:disabled {
|
|
187
|
+
opacity: 0.5;
|
|
188
|
+
cursor: not-allowed;
|
|
189
|
+
}
|
|
190
|
+
.mini-spinner {
|
|
191
|
+
width: 14px;
|
|
192
|
+
height: 14px;
|
|
193
|
+
border: 2px solid color-mix(in srgb, var(--color-primary, #6366f1) 35%, transparent);
|
|
194
|
+
border-top-color: var(--color-primary, #6366f1);
|
|
195
|
+
border-radius: 50%;
|
|
196
|
+
animation: spin 0.8s linear infinite;
|
|
197
|
+
}
|
|
198
|
+
input,
|
|
199
|
+
textarea {
|
|
200
|
+
width: 100%;
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
border: 1px solid #d5d7de;
|
|
203
|
+
border-radius: 8px;
|
|
204
|
+
padding: 12px 14px;
|
|
205
|
+
font-size: 15px;
|
|
206
|
+
font-family: inherit;
|
|
207
|
+
color: #1a1a2e;
|
|
208
|
+
outline: none;
|
|
209
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
210
|
+
}
|
|
211
|
+
input:focus,
|
|
212
|
+
textarea:focus {
|
|
213
|
+
/* --primary is the host's brand colour and may be a gradient, which is
|
|
214
|
+
invalid for border-color and color-mix — those hosts lost the focus
|
|
215
|
+
indicator entirely. The interaction colour is always flat. */
|
|
216
|
+
border-color: var(--color-primary, #6366f1);
|
|
217
|
+
box-shadow: 0 0 0 3px var(--color-primary-ring, rgba(99, 102, 241, 0.15));
|
|
218
|
+
}
|
|
219
|
+
textarea {
|
|
220
|
+
resize: vertical;
|
|
221
|
+
min-height: 84px;
|
|
222
|
+
}
|
|
223
|
+
input::placeholder,
|
|
224
|
+
textarea::placeholder {
|
|
225
|
+
color: #a7abb5;
|
|
226
|
+
}
|
|
227
|
+
.counter {
|
|
228
|
+
margin-top: 6px;
|
|
229
|
+
font-size: 12px;
|
|
230
|
+
color: #a7abb5;
|
|
231
|
+
}
|
|
232
|
+
.chips {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-wrap: wrap;
|
|
235
|
+
align-items: center;
|
|
236
|
+
gap: 8px;
|
|
237
|
+
border: 1px solid #d5d7de;
|
|
238
|
+
border-radius: 8px;
|
|
239
|
+
padding: 8px 10px;
|
|
240
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
241
|
+
}
|
|
242
|
+
.chips.focused {
|
|
243
|
+
border-color: var(--color-primary, #6366f1);
|
|
244
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary, #6366f1) 25%, transparent);
|
|
245
|
+
}
|
|
246
|
+
.chip {
|
|
247
|
+
display: inline-flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
gap: 6px;
|
|
250
|
+
/* Solid fallback first: if --primary carries a value color-mix can't
|
|
251
|
+
parse (e.g. a bare RGB triplet), the mix declaration is dropped and
|
|
252
|
+
this fixed tint keeps the chip visible. */
|
|
253
|
+
background: #eceafc;
|
|
254
|
+
background: color-mix(in srgb, var(--primary, #6c5ce7) 15%, #fff);
|
|
255
|
+
color: var(--color-primary, #6366f1);
|
|
256
|
+
border-radius: 6px;
|
|
257
|
+
padding: 5px 8px 5px 10px;
|
|
258
|
+
font-size: 14px;
|
|
259
|
+
line-height: 1;
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
}
|
|
262
|
+
.chip button {
|
|
263
|
+
display: inline-flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
justify-content: center;
|
|
266
|
+
width: 16px;
|
|
267
|
+
height: 16px;
|
|
268
|
+
border: none;
|
|
269
|
+
background: transparent;
|
|
270
|
+
color: inherit;
|
|
271
|
+
font-size: 15px;
|
|
272
|
+
line-height: 1;
|
|
273
|
+
cursor: pointer;
|
|
274
|
+
padding: 0;
|
|
275
|
+
opacity: 0.7;
|
|
276
|
+
}
|
|
277
|
+
.chip button:hover {
|
|
278
|
+
opacity: 1;
|
|
279
|
+
}
|
|
280
|
+
.chips input {
|
|
281
|
+
flex: 1;
|
|
282
|
+
min-width: 120px;
|
|
283
|
+
border: none;
|
|
284
|
+
padding: 4px;
|
|
285
|
+
box-shadow: none;
|
|
286
|
+
}
|
|
287
|
+
.chips input:focus {
|
|
288
|
+
border: none;
|
|
289
|
+
box-shadow: none;
|
|
290
|
+
}
|
|
291
|
+
.actions {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
margin-top: 34px;
|
|
296
|
+
}
|
|
297
|
+
.publish {
|
|
298
|
+
background: var(--primary, #6c5ce7);
|
|
299
|
+
color: #fff;
|
|
300
|
+
border: none;
|
|
301
|
+
border-radius: 8px;
|
|
302
|
+
padding: 14px 34px;
|
|
303
|
+
font-size: 16px;
|
|
304
|
+
font-weight: 600;
|
|
305
|
+
font-family: inherit;
|
|
306
|
+
cursor: pointer;
|
|
307
|
+
transition: filter 0.15s ease, opacity 0.15s ease;
|
|
308
|
+
}
|
|
309
|
+
.publish:hover {
|
|
310
|
+
filter: brightness(1.05);
|
|
311
|
+
}
|
|
312
|
+
.publish:disabled {
|
|
313
|
+
opacity: 0.6;
|
|
314
|
+
cursor: not-allowed;
|
|
315
|
+
}
|
|
316
|
+
.cancel {
|
|
317
|
+
background: none;
|
|
318
|
+
border: none;
|
|
319
|
+
color: #4a4a5a;
|
|
320
|
+
font-size: 16px;
|
|
321
|
+
font-family: inherit;
|
|
322
|
+
cursor: pointer;
|
|
323
|
+
padding: 8px;
|
|
324
|
+
}
|
|
325
|
+
.cancel:hover {
|
|
326
|
+
color: #1a1a2e;
|
|
327
|
+
}
|
|
328
|
+
.spinner {
|
|
329
|
+
display: inline-block;
|
|
330
|
+
width: 18px;
|
|
331
|
+
height: 18px;
|
|
332
|
+
border: 2px solid rgba(255, 255, 255, 0.5);
|
|
333
|
+
border-top-color: #fff;
|
|
334
|
+
border-radius: 50%;
|
|
335
|
+
animation: spin 0.8s linear infinite;
|
|
336
|
+
vertical-align: middle;
|
|
337
|
+
}
|
|
338
|
+
@keyframes spin {
|
|
339
|
+
to { transform: rotate(360deg); }
|
|
340
|
+
}
|
|
341
|
+
`,p.properties={loading:{type:Boolean},title:{type:String},description:{type:String},keywordList:{type:Array},keywordDraft:{type:String},keywordsFocused:{type:Boolean},generatingField:{type:String}},customElements.define("cdtr-publish-seo",p);var h=i(65550);class f extends o.WF{constructor(){super(),this.raf=0,this.dismissTimer=null,this.dismiss=()=>{this.isConnected&&this.remove()},this.copyLink=async()=>{if(this.url)try{await navigator.clipboard.writeText(this.url),this.copied=!0,setTimeout(()=>this.copied=!1,2e3)}catch{}},this.message="",this.sub="",this.url="",this.seoTitle="",this.seoDescription="",this.copied=!1}firstUpdated(){this.launchConfetti(),this.dismissTimer=setTimeout(()=>this.dismiss(),6500)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf),this.dismissTimer&&clearTimeout(this.dismissTimer)}t(e,t){return s.M.get("lang",e)||t}get direction(){const e=s.M.get("theme");return e?.direction||"rtl"}get host(){return this.url?this.url.replace(/^https?:\/\//,"").replace(/\/+$/,""):""}launchConfetti(){const e=this.renderRoot.querySelector("canvas");if(!e)return;const t=e.getContext("2d");if(!t)return;const i=window.devicePixelRatio||1,o=window.innerWidth,s=window.innerHeight;e.width=o*i,e.height=s*i,t.scale(i,i);const r=["#e94560","#1a1a2e","#f6c945","#2ec7a9","#4d7cfe","#ffffff"],n=o/2,a=.42*s,l=Math.min(220,Math.round(o/6)),c=Array.from({length:l},(e,t)=>{const i=2*Math.PI*t/l+t%3*.4,o=4+t%9;return{x:n,y:a,vx:Math.cos(i)*o,vy:Math.sin(i)*o-3,size:5+t%5,color:r[t%r.length],rot:t,vrot:(t%2?1:-1)*(.1+t%5*.03),life:1}}),d=performance.now(),p=e=>{const i=e-d;t.clearRect(0,0,o,s);let r=!1;for(const e of c)e.vy+=.16,e.x+=e.vx,e.y+=e.vy,e.rot+=e.vrot,i>2600*.55&&(e.life=Math.max(0,e.life-.02)),e.life>0&&e.y<s+40&&(r=!0),t.save(),t.globalAlpha=e.life,t.translate(e.x,e.y),t.rotate(e.rot),t.fillStyle=e.color,t.fillRect(-e.size/2,-e.size/2,e.size,.6*e.size),t.restore();r&&i<3e3?this.raf=requestAnimationFrame(p):t.clearRect(0,0,o,s)};this.raf=requestAnimationFrame(p)}renderPreview(){const e=this.host;if(!e)return o.s6;const t=(this.seoTitle||"").trim()||(this.seoDescription?"":e),i=(this.seoDescription||"").trim(),s=(t||e).charAt(0);return o.qy`
|
|
342
|
+
<div class="preview">
|
|
343
|
+
<p class="preview-caption">${this.t("search_preview_label","How your page will look on Google")}</p>
|
|
344
|
+
<div class="result-head">
|
|
345
|
+
<span class="favicon">${s}</span>
|
|
346
|
+
<div class="result-url">
|
|
347
|
+
<div class="result-host">${e.split("/")[0]}</div>
|
|
348
|
+
<div class="result-crumb">${e}</div>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
${t?o.qy`<p class="result-title">${t}</p>`:o.s6}
|
|
352
|
+
${i?o.qy`<p class="result-desc">${i}</p>`:o.s6}
|
|
353
|
+
</div>
|
|
354
|
+
`}render(){const e=this.direction,t=this.copied?o.qy`<svg viewBox="0 0 24 24" fill="none"><path d="M5 13l4 4L19 7" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" /></svg>`:o.qy`<svg viewBox="0 0 24 24" fill="none"><rect x="9" y="9" width="11" height="11" rx="2" stroke="currentColor" stroke-width="2" /><path d="M5 15V5a2 2 0 0 1 2-2h10" stroke="currentColor" stroke-width="2" stroke-linecap="round" /></svg>`;return o.qy`
|
|
355
|
+
<canvas @click=${this.dismiss}></canvas>
|
|
356
|
+
<div class="card" dir=${e}>
|
|
357
|
+
<div class="check">
|
|
358
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
359
|
+
<path d="M5 13l4 4L19 7" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
|
360
|
+
</svg>
|
|
361
|
+
</div>
|
|
362
|
+
<p class="title">${this.message||this.t("published","Published!")}</p>
|
|
363
|
+
<p class="sub">${this.sub||this.t("publishedSub","Your site is live.")}</p>
|
|
364
|
+
|
|
365
|
+
${this.renderPreview()}
|
|
366
|
+
|
|
367
|
+
${this.url?o.qy`
|
|
368
|
+
<div class="actions">
|
|
369
|
+
<a class="view" href=${this.url} target="_blank" rel="noopener">
|
|
370
|
+
<svg viewBox="0 0 24 24" fill="none"><path d="M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
371
|
+
${this.t("view_site","View site")}
|
|
372
|
+
</a>
|
|
373
|
+
<button class="copy" type="button" @click=${this.copyLink}>
|
|
374
|
+
${t}
|
|
375
|
+
${this.copied?this.t("link_copied","Link copied"):this.t("copy_link","Copy link")}
|
|
376
|
+
</button>
|
|
377
|
+
</div>
|
|
378
|
+
`:o.s6}
|
|
379
|
+
</div>
|
|
380
|
+
`}}f.styles=o.AH`
|
|
381
|
+
:host {
|
|
382
|
+
position: fixed;
|
|
383
|
+
inset: 0;
|
|
384
|
+
z-index: var(--z-blocking, 2147483646);
|
|
385
|
+
pointer-events: none;
|
|
386
|
+
display: block;
|
|
387
|
+
font-family: var(--font-family, Arial, Helvetica, sans-serif);
|
|
388
|
+
}
|
|
389
|
+
canvas {
|
|
390
|
+
position: absolute;
|
|
391
|
+
inset: 0;
|
|
392
|
+
width: 100%;
|
|
393
|
+
height: 100%;
|
|
394
|
+
}
|
|
395
|
+
.card {
|
|
396
|
+
position: absolute;
|
|
397
|
+
top: 50%;
|
|
398
|
+
left: 50%;
|
|
399
|
+
transform: translate(-50%, -50%) scale(0.9);
|
|
400
|
+
background: #ffffff;
|
|
401
|
+
border-radius: 20px;
|
|
402
|
+
box-shadow: 0 30px 80px rgba(26, 26, 46, 0.32);
|
|
403
|
+
padding: 36px 40px 32px;
|
|
404
|
+
text-align: center;
|
|
405
|
+
pointer-events: auto;
|
|
406
|
+
opacity: 0;
|
|
407
|
+
animation: pop 0.44s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
|
|
408
|
+
width: 460px;
|
|
409
|
+
max-width: 90vw;
|
|
410
|
+
box-sizing: border-box;
|
|
411
|
+
}
|
|
412
|
+
@keyframes pop {
|
|
413
|
+
to {
|
|
414
|
+
opacity: 1;
|
|
415
|
+
transform: translate(-50%, -50%) scale(1);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
.check {
|
|
419
|
+
width: 68px;
|
|
420
|
+
height: 68px;
|
|
421
|
+
border-radius: 50%;
|
|
422
|
+
background: #2ec7a9;
|
|
423
|
+
margin: 0 auto 18px;
|
|
424
|
+
display: flex;
|
|
425
|
+
align-items: center;
|
|
426
|
+
justify-content: center;
|
|
427
|
+
box-shadow: 0 0 0 0 rgba(46, 199, 169, 0.45);
|
|
428
|
+
animation: ring 1.6s ease-out 0.2s;
|
|
429
|
+
}
|
|
430
|
+
@keyframes ring {
|
|
431
|
+
0% { box-shadow: 0 0 0 0 rgba(46, 199, 169, 0.45); }
|
|
432
|
+
70% { box-shadow: 0 0 0 18px rgba(46, 199, 169, 0); }
|
|
433
|
+
100% { box-shadow: 0 0 0 0 rgba(46, 199, 169, 0); }
|
|
434
|
+
}
|
|
435
|
+
.check svg {
|
|
436
|
+
width: 34px;
|
|
437
|
+
height: 34px;
|
|
438
|
+
}
|
|
439
|
+
.title {
|
|
440
|
+
font-size: 24px;
|
|
441
|
+
font-weight: 700;
|
|
442
|
+
color: #1a1a2e;
|
|
443
|
+
margin: 0;
|
|
444
|
+
}
|
|
445
|
+
.sub {
|
|
446
|
+
font-size: 14px;
|
|
447
|
+
color: #8a8f9c;
|
|
448
|
+
margin: 8px 0 0;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* Google-style search-result preview — the payoff for the SEO step. */
|
|
452
|
+
.preview {
|
|
453
|
+
margin-top: 22px;
|
|
454
|
+
border: 1px solid #e6e8ee;
|
|
455
|
+
border-radius: 12px;
|
|
456
|
+
padding: 14px 16px;
|
|
457
|
+
text-align: start;
|
|
458
|
+
background: #fbfbfd;
|
|
459
|
+
}
|
|
460
|
+
.preview-caption {
|
|
461
|
+
font-size: 11px;
|
|
462
|
+
font-weight: 600;
|
|
463
|
+
letter-spacing: 0.02em;
|
|
464
|
+
text-transform: uppercase;
|
|
465
|
+
color: #a7abb5;
|
|
466
|
+
margin: 0 0 10px;
|
|
467
|
+
}
|
|
468
|
+
.result-head {
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
gap: 8px;
|
|
472
|
+
}
|
|
473
|
+
.favicon {
|
|
474
|
+
flex: none;
|
|
475
|
+
width: 26px;
|
|
476
|
+
height: 26px;
|
|
477
|
+
border-radius: 50%;
|
|
478
|
+
background: var(--primary, #6c5ce7);
|
|
479
|
+
color: #fff;
|
|
480
|
+
display: flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
justify-content: center;
|
|
483
|
+
font-size: 13px;
|
|
484
|
+
font-weight: 700;
|
|
485
|
+
text-transform: uppercase;
|
|
486
|
+
}
|
|
487
|
+
.result-url {
|
|
488
|
+
min-width: 0;
|
|
489
|
+
}
|
|
490
|
+
.result-host {
|
|
491
|
+
font-size: 13px;
|
|
492
|
+
color: #1a1a2e;
|
|
493
|
+
line-height: 1.2;
|
|
494
|
+
white-space: nowrap;
|
|
495
|
+
overflow: hidden;
|
|
496
|
+
text-overflow: ellipsis;
|
|
497
|
+
/* URLs read left-to-right even in an RTL card. */
|
|
498
|
+
direction: ltr;
|
|
499
|
+
text-align: start;
|
|
500
|
+
}
|
|
501
|
+
.result-crumb {
|
|
502
|
+
font-size: 12px;
|
|
503
|
+
color: #6a7280;
|
|
504
|
+
line-height: 1.2;
|
|
505
|
+
white-space: nowrap;
|
|
506
|
+
overflow: hidden;
|
|
507
|
+
text-overflow: ellipsis;
|
|
508
|
+
direction: ltr;
|
|
509
|
+
text-align: start;
|
|
510
|
+
}
|
|
511
|
+
.result-title {
|
|
512
|
+
margin: 8px 0 0;
|
|
513
|
+
font-size: 18px;
|
|
514
|
+
line-height: 1.3;
|
|
515
|
+
color: #1a56db;
|
|
516
|
+
font-weight: 500;
|
|
517
|
+
overflow: hidden;
|
|
518
|
+
text-overflow: ellipsis;
|
|
519
|
+
display: -webkit-box;
|
|
520
|
+
-webkit-line-clamp: 1;
|
|
521
|
+
-webkit-box-orient: vertical;
|
|
522
|
+
}
|
|
523
|
+
.result-desc {
|
|
524
|
+
margin: 4px 0 0;
|
|
525
|
+
font-size: 13px;
|
|
526
|
+
line-height: 1.5;
|
|
527
|
+
color: #4d5562;
|
|
528
|
+
overflow: hidden;
|
|
529
|
+
text-overflow: ellipsis;
|
|
530
|
+
display: -webkit-box;
|
|
531
|
+
-webkit-line-clamp: 2;
|
|
532
|
+
-webkit-box-orient: vertical;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.actions {
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
539
|
+
gap: 10px;
|
|
540
|
+
margin-top: 24px;
|
|
541
|
+
}
|
|
542
|
+
.view {
|
|
543
|
+
display: inline-flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
gap: 8px;
|
|
546
|
+
background: var(--primary, #6c5ce7);
|
|
547
|
+
color: #fff;
|
|
548
|
+
text-decoration: none;
|
|
549
|
+
font-size: 15px;
|
|
550
|
+
font-weight: 600;
|
|
551
|
+
padding: 12px 26px;
|
|
552
|
+
border-radius: 10px;
|
|
553
|
+
transition: filter 0.15s ease;
|
|
554
|
+
}
|
|
555
|
+
.view:hover {
|
|
556
|
+
filter: brightness(1.06);
|
|
557
|
+
}
|
|
558
|
+
.view svg {
|
|
559
|
+
width: 16px;
|
|
560
|
+
height: 16px;
|
|
561
|
+
}
|
|
562
|
+
.copy {
|
|
563
|
+
display: inline-flex;
|
|
564
|
+
align-items: center;
|
|
565
|
+
gap: 6px;
|
|
566
|
+
background: #fff;
|
|
567
|
+
color: #4a4a5a;
|
|
568
|
+
border: 1px solid #d5d7de;
|
|
569
|
+
font-size: 15px;
|
|
570
|
+
font-family: inherit;
|
|
571
|
+
font-weight: 500;
|
|
572
|
+
padding: 12px 18px;
|
|
573
|
+
border-radius: 10px;
|
|
574
|
+
cursor: pointer;
|
|
575
|
+
transition: border-color 0.15s ease, color 0.15s ease;
|
|
576
|
+
}
|
|
577
|
+
.copy:hover {
|
|
578
|
+
border-color: var(--color-primary, #6366f1);
|
|
579
|
+
color: #1a1a2e;
|
|
580
|
+
}
|
|
581
|
+
.copy svg {
|
|
582
|
+
width: 15px;
|
|
583
|
+
height: 15px;
|
|
584
|
+
}
|
|
585
|
+
`,f.properties={message:{type:String},sub:{type:String},url:{type:String},seoTitle:{type:String},seoDescription:{type:String},copied:{type:Boolean}},customElements.define("cdtr-publish-success",f);class u extends o.WF{constructor(){super(),this.channel="",this.isLoading=!1,this.isLocked=!1,this.lockTimer=null}connectedCallback(){super.connectedCallback(),this.onNextStep||(this.onNextStep=s.M.get("config","onNextStep")),this.channel||(this.channel=s.M.get("config","channel")||"")}disconnectedCallback(){super.disconnectedCallback(),this.clearTimers()}clearTimers(){this.lockTimer&&(clearTimeout(this.lockTimer),this.lockTimer=null)}async handleClick(){if(this.isLocked||this.isLoading)return;const e=!!s.M.get("config","access"),t="web"===this.channel,i=e&&t;let o=null;if(!t||(o=await p.open(),o)){this.isLoading=!0,this.isLocked=!0,this.lockTimer=setTimeout(()=>{this.clearTimers(),this.isLoading=!1,this.isLocked=!1},1e4);try{if(t){const e=this.showBuildingLoader();try{i&&o&&(await(0,n.YE)({seo:o}),await(0,n.bK)({})),"function"==typeof this.onNextStep&&await this.onNextStep({toHTML:r.FE,toJSON:r.U2,seo:o??void 0})}finally{e()}return void this.celebratePublish(o)}"function"==typeof this.onNextStep&&await this.onNextStep({toHTML:r.FE,toJSON:r.U2})}catch(e){console.error("Error in publish/onNextStep:",e),this.snackbar(s.M.get("lang","publishError")||"Publish failed")}finally{this.clearTimers(),this.isLoading=!1,this.isLocked=!1}}}snackbar(e){const t=s.M.get("commands");t?.snackbar?.(e)}showBuildingLoader(){const e=(0,h.A)();document.body.appendChild(e);let t=!1;return()=>{t||(t=!0,e.style.transition="opacity 300ms ease",e.style.opacity="0",e.style.pointerEvents="none",setTimeout(()=>e.remove(),320))}}celebratePublish(e){const t=document.createElement("cdtr-publish-success");e&&(t.seoTitle=e.title,t.seoDescription=e.description);const i=s.M.get("app","domains"),o=i?.[0]?.name;o&&(t.url=/^https?:\/\//.test(o)?o:`https://${o}`),document.body.appendChild(t)}render(){const e=!!s.M.get("config","access");if(!(this.onNextStep||"web"===this.channel&&e))return null;const t="web"===this.channel?"publish":"next";return o.qy`
|
|
586
|
+
<paper-button
|
|
587
|
+
@click=${this.handleClick}
|
|
588
|
+
class="next-button"
|
|
589
|
+
?disabled=${this.isLocked}
|
|
590
|
+
>
|
|
591
|
+
${this.isLoading?o.qy`
|
|
592
|
+
<div class="loading-spinner"></div>
|
|
593
|
+
`:o.qy`
|
|
594
|
+
<div class="button-content ${this.isLoading?"loading":""}">
|
|
595
|
+
<lang-text text=${t}></lang-text>
|
|
596
|
+
</div>
|
|
597
|
+
`}
|
|
598
|
+
</paper-button>
|
|
599
|
+
`}}u.styles=o.AH`
|
|
600
|
+
:host {
|
|
601
|
+
display: block;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.next-button {
|
|
605
|
+
background: var(--primary);
|
|
606
|
+
color: var(--primary-text);
|
|
607
|
+
fill: var(--primary-text);
|
|
608
|
+
text-transform: none;
|
|
609
|
+
color: #fff;
|
|
610
|
+
height: 52px;
|
|
611
|
+
border-radius: 0;
|
|
612
|
+
width: 90px;
|
|
613
|
+
transform: translateX(-4px);
|
|
614
|
+
position: relative;
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.next-button:disabled {
|
|
619
|
+
opacity: 0.6;
|
|
620
|
+
cursor: not-allowed;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.loading-spinner {
|
|
624
|
+
position: absolute;
|
|
625
|
+
top: 50%;
|
|
626
|
+
left: 50%;
|
|
627
|
+
transform: translate(-50%, -50%);
|
|
628
|
+
width: 20px;
|
|
629
|
+
height: 20px;
|
|
630
|
+
border: 2px solid transparent;
|
|
631
|
+
border-top: 2px solid #fff;
|
|
632
|
+
border-radius: 50%;
|
|
633
|
+
animation: spin 1s linear infinite;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
@keyframes spin {
|
|
637
|
+
0% { transform: translate(-50%, -50%) rotate(0deg); }
|
|
638
|
+
100% { transform: translate(-50%, -50%) rotate(360deg); }
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.button-content {
|
|
642
|
+
opacity: 1;
|
|
643
|
+
transition: opacity 0.3s ease;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.button-content.loading {
|
|
647
|
+
opacity: 0;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
`,u.properties={onNextStep:{type:Function},channel:{type:String},isLoading:{type:Boolean},isLocked:{type:Boolean},lockTimer:{type:Number}},customElements.define("cdtr-next-button",u)}}]);
|
|
Binary file
|