@creaditor/newsletter-starterkit 1.0.53 → 1.0.55
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 +297 -128
- 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/1529.creaditor.bundle.js +1 -1
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +338 -138
- 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 +11 -5
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +56 -8
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2590.creaditor.bundle.js +1 -2
- package/dist/2590.creaditor.bundle.js.gz +0 -0
- package/dist/3095.creaditor.bundle.js +91 -58
- package/dist/3095.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +11 -9
- package/dist/3521.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/3932.creaditor.bundle.js +3 -3
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4114.creaditor.bundle.js +1 -0
- package/dist/4114.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 +1 -1
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +30 -190
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +198 -235
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5340.creaditor.bundle.js +126 -36
- 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/589.creaditor.bundle.js +9 -9
- package/dist/589.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +24 -31
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +3 -3
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6713.creaditor.bundle.js +151 -0
- package/dist/6713.creaditor.bundle.js.gz +0 -0
- package/dist/7209.creaditor.bundle.js +2 -3
- package/dist/7209.creaditor.bundle.js.gz +0 -0
- package/dist/7238.creaditor.bundle.js +3 -3
- package/dist/7238.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +3 -7
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +1 -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 +63 -115
- 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/8305.creaditor.bundle.js +6 -6
- package/dist/8305.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js +1 -1
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8676.creaditor.bundle.js +1 -0
- package/dist/8676.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +4 -4
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +1 -1
- package/dist/9041.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/9162.creaditor.bundle.js +4 -3
- package/dist/9162.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 +2795 -874
- 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,439 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[
|
|
2
|
-
<cdtr-editor-container>
|
|
3
|
-
<div class="editor-container">
|
|
4
|
-
<div class="prompt-section">
|
|
5
|
-
<div class="prompt-header">
|
|
6
|
-
<div class="prompt-icon">✍️</div>
|
|
7
|
-
<label class="prompt-label" for="prompt-input">
|
|
8
|
-
<lang-text text="prompt_editor_title"></lang-text>
|
|
9
|
-
</label>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<cdtr-input
|
|
13
|
-
id="business-name-input"
|
|
14
|
-
label="Business Name"
|
|
15
|
-
.value=${this.businessName}
|
|
16
|
-
@input=${this.handleBusinessNameChange}
|
|
17
|
-
placeholder="Enter_your_business_name"
|
|
18
|
-
></cdtr-input>
|
|
19
|
-
|
|
20
|
-
<cdtr-input
|
|
21
|
-
id="business-type-input"
|
|
22
|
-
label="Business Type"
|
|
23
|
-
.value=${this.businessType}
|
|
24
|
-
@input=${this.handleBusinessTypeChange}
|
|
25
|
-
placeholder="Enter_your_business_type"
|
|
26
|
-
></cdtr-input>
|
|
27
|
-
|
|
28
|
-
<cdtr-input
|
|
29
|
-
id="url-input"
|
|
30
|
-
label="URL"
|
|
31
|
-
.value=${this.url}
|
|
32
|
-
@input=${this.handleUrlChange}
|
|
33
|
-
placeholder="Enter_the_URL_of_the_page"
|
|
34
|
-
></cdtr-input>
|
|
35
|
-
|
|
36
|
-
<cdtr-textarea
|
|
37
|
-
autofocus=${!0}
|
|
38
|
-
id="prompt-input"
|
|
39
|
-
class="prompt-input"
|
|
40
|
-
placeholder=""
|
|
41
|
-
.value=${this.prompt}
|
|
42
|
-
@input=${this.handlePromptChange}
|
|
43
|
-
></cdtr-textarea>
|
|
44
|
-
|
|
45
|
-
<cdtr-dropdown .value=${e}>
|
|
46
|
-
<cdtr-dropdown-button slot="trigger">
|
|
47
|
-
<lang-text text="${e||"paragraph"}"></lang-text>
|
|
48
|
-
</cdtr-dropdown-button>
|
|
49
|
-
<div slot="content">
|
|
50
|
-
<cdtr-dropdown-item
|
|
51
|
-
@click=${()=>this.handleContentTypeChange("title")}
|
|
52
|
-
>
|
|
53
|
-
<lang-text text="title"></lang-text>
|
|
54
|
-
</cdtr-dropdown-item>
|
|
55
|
-
<cdtr-dropdown-item
|
|
56
|
-
@click=${()=>this.handleContentTypeChange("paragraph")}
|
|
57
|
-
>
|
|
58
|
-
<lang-text text="paragraph"></lang-text>
|
|
59
|
-
</cdtr-dropdown-item>
|
|
60
|
-
</div>
|
|
61
|
-
</cdtr-dropdown>
|
|
62
|
-
<cdtr-row justify="space-between">
|
|
63
|
-
<cdtr-col>
|
|
64
|
-
<span class="prompt-context">
|
|
65
|
-
<lang-text text="prompt_editor_context"></lang-text>
|
|
66
|
-
</span>
|
|
67
|
-
</cdtr-col>
|
|
68
|
-
<cdtr-col sm="2">
|
|
69
|
-
<cdtr-checkbox
|
|
70
|
-
.checked=${this.includeContext}
|
|
71
|
-
@change=${this.handleIncludeContextChange}
|
|
72
|
-
></cdtr-checkbox>
|
|
73
|
-
</cdtr-col>
|
|
74
|
-
</cdtr-row>
|
|
75
|
-
<paper-button
|
|
76
|
-
fullWidth
|
|
77
|
-
class="generate-button"
|
|
78
|
-
?disabled=${this.isLoading||!this.prompt}
|
|
79
|
-
@click=${this.handleGenerate}
|
|
80
|
-
>
|
|
81
|
-
${this.isLoading?i.qy`
|
|
82
|
-
<div class="loading-spinner"></div>
|
|
83
|
-
<lang-text text="creating_magic"></lang-text>
|
|
84
|
-
`:i.qy` <lang-text text="generate_content"></lang-text> `}
|
|
85
|
-
</paper-button>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
${this.generatedText?i.qy`
|
|
89
|
-
<div class="result-section">
|
|
90
|
-
<div class="result-content">${this.generatedText}</div>
|
|
91
|
-
</div>
|
|
92
|
-
`:""}
|
|
93
|
-
</div>
|
|
94
|
-
</cdtr-editor-container>
|
|
95
|
-
`}}).properties={prompt:{type:String},generatedText:{type:String},isLoading:{type:Boolean},context:{type:String},includeContext:{type:Boolean},businessType:{type:String},businessName:{type:String},contentType:{type:String},url:{type:String}},o.styles=i.AH`
|
|
96
|
-
:host {
|
|
97
|
-
--primary: #7c3aed;
|
|
98
|
-
--primary-light: #a78bfa;
|
|
99
|
-
--primary-dark: #5b21b6;
|
|
100
|
-
--accent: #f472b6;
|
|
101
|
-
--accent-light: #f9a8d4;
|
|
102
|
-
--accent-dark: #db2777;
|
|
103
|
-
--surface: #f8fafc;
|
|
104
|
-
--surface-dark: #f1f5f9;
|
|
105
|
-
--text-primary: #0f172a;
|
|
106
|
-
--text-secondary: #334155;
|
|
107
|
-
--gradient-primary: linear-gradient(
|
|
108
|
-
135deg,
|
|
109
|
-
var(--primary) 0%,
|
|
110
|
-
var(--accent) 100%
|
|
111
|
-
);
|
|
112
|
-
--gradient-accent: linear-gradient(
|
|
113
|
-
135deg,
|
|
114
|
-
var(--accent) 0%,
|
|
115
|
-
var(--primary) 100%
|
|
116
|
-
);
|
|
117
|
-
--gradient-surface: linear-gradient(
|
|
118
|
-
135deg,
|
|
119
|
-
var(--surface) 0%,
|
|
120
|
-
var(--surface-dark) 100%
|
|
121
|
-
);
|
|
122
|
-
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
123
|
-
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
124
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
125
|
-
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
126
|
-
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
127
|
-
--shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3),
|
|
128
|
-
0 0 40px rgba(244, 114, 182, 0.2);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
* {
|
|
132
|
-
box-sizing: border-box;
|
|
133
|
-
margin: 0;
|
|
134
|
-
padding: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
:host {
|
|
138
|
-
display: block;
|
|
139
|
-
width: 100%;
|
|
140
|
-
margin: 0;
|
|
141
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
142
|
-
Ubuntu, Cantarell, sans-serif;
|
|
143
|
-
background: var(--gradient-surface);
|
|
144
|
-
min-height: 100vh;
|
|
145
|
-
position: relative;
|
|
146
|
-
overflow: hidden;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
:host::before {
|
|
150
|
-
content: "";
|
|
151
|
-
position: absolute;
|
|
152
|
-
top: 0;
|
|
153
|
-
left: 0;
|
|
154
|
-
right: 0;
|
|
155
|
-
bottom: 0;
|
|
156
|
-
background: radial-gradient(
|
|
157
|
-
circle at 0% 0%,
|
|
158
|
-
rgba(124, 58, 237, 0.1) 0%,
|
|
159
|
-
transparent 50%
|
|
160
|
-
),
|
|
161
|
-
radial-gradient(
|
|
162
|
-
circle at 100% 100%,
|
|
163
|
-
rgba(244, 114, 182, 0.1) 0%,
|
|
164
|
-
transparent 50%
|
|
165
|
-
);
|
|
166
|
-
pointer-events: none;
|
|
167
|
-
animation: gradientShift 15s ease infinite;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@keyframes gradientShift {
|
|
171
|
-
0% {
|
|
172
|
-
background-position: 0% 0%;
|
|
173
|
-
}
|
|
174
|
-
50% {
|
|
175
|
-
background-position: 100% 100%;
|
|
176
|
-
}
|
|
177
|
-
100% {
|
|
178
|
-
background-position: 0% 0%;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.editor-container {
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: column;
|
|
185
|
-
gap: 1.5rem;
|
|
186
|
-
padding: 1.5rem;
|
|
187
|
-
position: relative;
|
|
188
|
-
overflow: hidden;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.prompt-section {
|
|
192
|
-
display: flex;
|
|
193
|
-
flex-direction: column;
|
|
194
|
-
gap: 1rem;
|
|
195
|
-
position: relative;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.prompt-header {
|
|
199
|
-
display: flex;
|
|
200
|
-
align-items: center;
|
|
201
|
-
justify-content: space-between;
|
|
202
|
-
gap: 0.75rem;
|
|
203
|
-
margin-bottom: 0.5rem;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.prompt-icon {
|
|
207
|
-
width: 40px;
|
|
208
|
-
height: 40px;
|
|
209
|
-
background: var(--gradient-primary);
|
|
210
|
-
border-radius: 12px;
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
justify-content: center;
|
|
214
|
-
color: white;
|
|
215
|
-
font-weight: bold;
|
|
216
|
-
position: relative;
|
|
217
|
-
transform-origin: center;
|
|
218
|
-
animation: iconFloat 3s ease-in-out infinite;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
@keyframes iconFloat {
|
|
222
|
-
0%,
|
|
223
|
-
100% {
|
|
224
|
-
transform: translateY(0) rotate(0deg);
|
|
225
|
-
}
|
|
226
|
-
50% {
|
|
227
|
-
transform: translateY(-5px) rotate(5deg);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.prompt-icon::after {
|
|
232
|
-
content: "";
|
|
233
|
-
position: absolute;
|
|
234
|
-
inset: -2px;
|
|
235
|
-
background: var(--gradient-primary);
|
|
236
|
-
border-radius: 14px;
|
|
237
|
-
z-index: -1;
|
|
238
|
-
opacity: 0.5;
|
|
239
|
-
filter: blur(8px);
|
|
240
|
-
animation: iconGlow 3s ease-in-out infinite;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
@keyframes iconGlow {
|
|
244
|
-
0%,
|
|
245
|
-
100% {
|
|
246
|
-
opacity: 0.5;
|
|
247
|
-
filter: blur(8px);
|
|
248
|
-
}
|
|
249
|
-
50% {
|
|
250
|
-
opacity: 0.8;
|
|
251
|
-
filter: blur(12px);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.prompt-label {
|
|
256
|
-
font-size: 1.25rem;
|
|
257
|
-
font-weight: 600;
|
|
258
|
-
color: var(--text-primary);
|
|
259
|
-
letter-spacing: -0.02em;
|
|
260
|
-
display: flex;
|
|
261
|
-
align-items: center;
|
|
262
|
-
gap: 0.75rem;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.prompt-label::after {
|
|
266
|
-
content: "AI";
|
|
267
|
-
font-size: 0.875rem;
|
|
268
|
-
background: var(--gradient-primary);
|
|
269
|
-
color: white;
|
|
270
|
-
padding: 0.25rem 0.75rem;
|
|
271
|
-
border-radius: 6px;
|
|
272
|
-
font-weight: 500;
|
|
273
|
-
animation: badgeFloat 3s ease-in-out infinite;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
@keyframes badgeFloat {
|
|
277
|
-
0%,
|
|
278
|
-
100% {
|
|
279
|
-
transform: translateY(0);
|
|
280
|
-
}
|
|
281
|
-
50% {
|
|
282
|
-
transform: translateY(-2px);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.generate-button {
|
|
287
|
-
width: 100%;
|
|
288
|
-
align-self: flex-end;
|
|
289
|
-
padding: 0.875rem 1.75rem;
|
|
290
|
-
background: var(--gradient-primary);
|
|
291
|
-
color: white;
|
|
292
|
-
border: none;
|
|
293
|
-
border-radius: 10px;
|
|
294
|
-
font-size: 1rem;
|
|
295
|
-
font-weight: 600;
|
|
296
|
-
cursor: pointer;
|
|
297
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
298
|
-
display: flex;
|
|
299
|
-
align-items: center;
|
|
300
|
-
gap: 0.75rem;
|
|
301
|
-
position: relative;
|
|
302
|
-
overflow: hidden;
|
|
303
|
-
box-shadow: var(--shadow-md);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.generate-button::before {
|
|
307
|
-
content: "";
|
|
308
|
-
position: absolute;
|
|
309
|
-
top: 0;
|
|
310
|
-
left: 0;
|
|
311
|
-
right: 0;
|
|
312
|
-
bottom: 0;
|
|
313
|
-
background: linear-gradient(
|
|
314
|
-
135deg,
|
|
315
|
-
rgba(255, 255, 255, 0.2) 0%,
|
|
316
|
-
rgba(255, 255, 255, 0) 100%
|
|
317
|
-
);
|
|
318
|
-
opacity: 0;
|
|
319
|
-
transition: opacity 0.3s ease;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.generate-button:hover::before {
|
|
323
|
-
opacity: 1;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.generate-button:hover {
|
|
327
|
-
transform: translateY(-2px);
|
|
328
|
-
box-shadow: var(--shadow-glow);
|
|
329
|
-
background: var(--gradient-accent);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.generate-button:active {
|
|
333
|
-
transform: translateY(0);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.generate-button:disabled {
|
|
337
|
-
background: var(--gradient-surface);
|
|
338
|
-
cursor: not-allowed;
|
|
339
|
-
transform: none;
|
|
340
|
-
box-shadow: none;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.result-section {
|
|
344
|
-
margin-top: 0.5rem;
|
|
345
|
-
padding: 1.5rem;
|
|
346
|
-
background: rgba(255, 255, 255, 0.8);
|
|
347
|
-
border-radius: 12px;
|
|
348
|
-
min-height: 160px;
|
|
349
|
-
opacity: 0;
|
|
350
|
-
transform: translateY(10px);
|
|
351
|
-
animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
352
|
-
position: relative;
|
|
353
|
-
overflow: hidden;
|
|
354
|
-
backdrop-filter: blur(8px);
|
|
355
|
-
box-shadow: var(--shadow-md);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.result-section::before {
|
|
359
|
-
content: "";
|
|
360
|
-
position: absolute;
|
|
361
|
-
top: 0;
|
|
362
|
-
left: 0;
|
|
363
|
-
right: 0;
|
|
364
|
-
height: 3px;
|
|
365
|
-
background: var(--gradient-primary);
|
|
366
|
-
opacity: 0.8;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.result-content {
|
|
370
|
-
white-space: pre-wrap;
|
|
371
|
-
line-height: 1.7;
|
|
372
|
-
color: var(--text-primary);
|
|
373
|
-
font-size: 1rem;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.loading-spinner {
|
|
377
|
-
width: 20px;
|
|
378
|
-
height: 20px;
|
|
379
|
-
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
380
|
-
border-top: 2px solid white;
|
|
381
|
-
border-radius: 50%;
|
|
382
|
-
animation: spin 1s linear infinite;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
@keyframes spin {
|
|
386
|
-
0% {
|
|
387
|
-
transform: rotate(0deg);
|
|
388
|
-
}
|
|
389
|
-
100% {
|
|
390
|
-
transform: rotate(360deg);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
@keyframes fadeIn {
|
|
395
|
-
from {
|
|
396
|
-
opacity: 0;
|
|
397
|
-
transform: translateY(10px);
|
|
398
|
-
}
|
|
399
|
-
to {
|
|
400
|
-
opacity: 1;
|
|
401
|
-
transform: translateY(0);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/* Decorative elements */
|
|
406
|
-
.editor-container::after {
|
|
407
|
-
content: "";
|
|
408
|
-
position: absolute;
|
|
409
|
-
top: 50%;
|
|
410
|
-
left: 50%;
|
|
411
|
-
width: 200%;
|
|
412
|
-
height: 200%;
|
|
413
|
-
background: radial-gradient(
|
|
414
|
-
circle at center,
|
|
415
|
-
rgba(124, 58, 237, 0.1) 0%,
|
|
416
|
-
transparent 50%
|
|
417
|
-
);
|
|
418
|
-
transform: translate(-50%, -50%);
|
|
419
|
-
pointer-events: none;
|
|
420
|
-
animation: pulse 4s ease-in-out infinite;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.prompt-context {
|
|
424
|
-
font-size: 13px;
|
|
425
|
-
color: var(--text-secondary);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
@keyframes pulse {
|
|
429
|
-
0%,
|
|
430
|
-
100% {
|
|
431
|
-
transform: translate(-50%, -50%) scale(1);
|
|
432
|
-
opacity: 0.5;
|
|
433
|
-
}
|
|
434
|
-
50% {
|
|
435
|
-
transform: translate(-50%, -50%) scale(1.1);
|
|
436
|
-
opacity: 0.3;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
`,r=o))||r},71271(e,t,n){n.d(t,{default:()=>m});var r=n(53577),o=n(74265);const a=e=>{{const{component:t,commands:n,helpers:a}=e,i=t.tiptap,s=i.state.selection.$anchor.node().attrs,l=i.isActive("heading",{level:1})?"h1":i.isActive("heading",{level:2})?"h2":i.isActive("heading",{level:3})?"h3":i.isActive("heading",{level:4})?"h4":i.isActive("heading",{level:5})?"h5":i.isActive("heading",{level:6})?"h6":"paragraph";let c=e.languageJson;const p=e.language||"he";return c||(c="he"===p?r:o),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=i.isActive("customBulletItem"),n=[{text:"design",selected:!t},...t?[{text:"icons",selected:!0}]:[],{text:"settings"}];return n.forEach(t=>t.selected=t.text===e),n},layout:e=>{let{tab:r,changeTab:o,tabs:a}=e;const p=[{type:"info",text:"text_micro_copy",active:()=>"design"===r.text},{type:"dropdown",active:()=>"design"===r.text,title:"type",value:l,items:[{value:"H1"},{value:"H2"},{value:"H3"},{value:"H4"},{value:"H5"},{value:"H6"},{value:"paragraph"}],onChange:e=>{const t=e.target.value;switch(t){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":i.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":i.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(i.getAttributes("textStyle").fontSize||"16px"),active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;o.from===o.to?r.chain().selectAll().setFontSize(n).run():r.chain().setFontSize(n).run()}},{type:"divider"},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(s.lineHeight||1),active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;o.from===o.to?r.chain().selectAll().setLineHeight(n).run():r.chain().setLineHeight(n).run()}},{type:"divider",active:()=>"design"===r.text},{type:"slider",title:"letterSpacing",min:1,max:10,step:1,value:parseFloat(s.letterSpacing)||1,active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;n<=1?o.from===o.to?r.chain().selectAll().setLetterSpacing("normal").run():r.chain().setLetterSpacing("normal").run():o.from===o.to?r.chain().selectAll().setLetterSpacing(n+"px").run():r.chain().setLetterSpacing(n+"px").run()}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",active:()=>"design"===r.text,title:"font_color",alpha:!1,value:i.getAttributes("textStyle").color||"#0000",onChange:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;if(o.from===o.to){const{state:e,view:t}=r,a=e.tr,{from:i,to:s}=o.from===o.to?{from:0,to:e.doc.content.size}:{from:o.from,to:o.to};e.doc.nodesBetween(i,s,(t,r)=>{if(t.isText){e.doc.resolve(r);if(!t.marks.some(e=>"link"===e.type.name)){const o=r,i=r+t.nodeSize;a.addMark(o,i,e.schema.marks.textStyle.create({color:n}))}}}),t.dispatch(a)}else r.chain().setColor(n).focus().run()}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",active:()=>"design"===r.text,title:"backgroundColor",value:t.props.style.background||t.props.style.backgroundColor||"#fff",onChange:e=>{const t=e.target.value;n.execCommand("style",{background:t,backgroundColor:null})}},{type:"divider",active:()=>"design"===r.text},{type:"slider",active:()=>"design"===r.text,title:"maxWidth",value:parseFloat(t.props.style.width),min:20,max:1e3,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"divider"},{type:"colorpicker",active:()=>"icons"===r.text,title:c.iconColor||"Icon color",alpha:!1,value:i.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;i.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===r.text},{type:"slider",active:()=>"icons"===r.text,title:c.iconSize||"Icon size",value:parseInt(i.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;i.chain().setCustomBulletStyles({width:t+"px",height:t+"px"}).run()}},{type:"icons",active:()=>"icons"===r.text,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;t.tiptap.chain().focus().setCustomBulletIcon({svgIcon:n.urlPng}).run()}}];return p}}}};var i=n(52144);const s=e=>{let{helpers:t,tiptap:n,composeId:r,template:o}=e;return{set:(e,a,s)=>{switch(a){case"style":return"object"==typeof s&&(e[a]=(0,i.A)(e[a],s),t.mergeDiff(o,{style:e[a]})),!0;case"text":e[a]=s;const l=n.getJSON();return s&&"object"==typeof s&&JSON.stringify(l)!==JSON.stringify(s.childNodes)&&(s&&s.focusedElement&&s.focusedElement===r?(n.chain().focus().setContent(s.childNodes).run(),s.to&&s.from&&n.commands.setTextSelection({from:s.from,to:s.to})):n.chain().setContent(s.childNodes).run()),delete e?.text?.markdown,!0}}}};var l=n(84488),c=n.n(l),p=n(86319);n(70567);const d=[];let g=!1,u=null;const m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="text";return{name:t,create:n=>{const{createElement:r,compose:o,helpers:i}=n,{mergeDiff:l}=i,m=document.createElement("div");l(m,{style:o.props.style});const h=p.M.get("config","editor","configure","editorProps","fonts");let x=p.M.get("config","target");"string"==typeof x&&(x=document.querySelector(x)),x||(x=document.body);const y=c()({element:m,container:x||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{let{insertContent:t,getJSON:n,getHTML:r,getText:o,selectAll:a,insertContentHtml:i}=e;const s=p.M.get("injectEditor"),l=document.createElement("cdtr-text-prompt-editor");s(l),l.context=o(),l.addEventListener("text-generation-start",e=>{a()}),l.addEventListener("text-generation-chunk",e=>{t(e.detail.chunk)}),l.addEventListener("text-generation-complete",e=>{a(),i(e.detail.text)}),l.addEventListener("text-generation-error",e=>{console.error("Text generation error:",e.detail.error)})},content:"string"==typeof o.props.text.markdown?o.props.text.markdown:o.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{u===y&&(u=null),setTimeout(()=>{u!==y&&(g=!1)},150)},onFocus:()=>{if(!g||u===y||null===u){if(g=!0,u=y,d.length>0)for(d.forEach(e=>{e!==y&&e.hideEditor()});d.length>0;)d.pop();d.push(y),setTimeout(()=>{u===y&&g&&y.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const r=n.curSelection.from,a=n.curSelection.to,i={childNodes:t.getJSON(),from:r,to:a,focusedElement:o.id};f.commands.execCommand("text",i)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:h||[],useCloud:!0},{type:"fontSize",sizes:e.fontSize||[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74]},{type:"horizonRule"},{type:"clearFormat"},{type:"bold"},{type:"strike"},{type:"italic"},{type:"underline"},{type:"table"},{type:"emoji"},{type:"unLink"},{type:"link"},{type:"customList"},{type:"numbered"},{type:"bullet"},{type:"backcolor"},{type:"fontColor"},{type:"direction"},{type:"justify"},{type:"right"},{type:"center"},{type:"left"},{type:"image"},{type:"mergeTags"},{type:"magic"}]}),f=r({name:t,id:o.id,template:m,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>m,handleBar:!0,validator:s({template:m,helpers:i,tiptap:y,composeId:o.id}),schema:o.schema,onSelect:e=>{m.classList.add(e)},onDeselect:e=>{m.classList.remove(e)},elementProps:o,remove:()=>{m.remove()},createEditor:a});return o.props.text.markdown&&y.chain().insertContent(" ").run(),f.addProp("tiptap",y),f}}}}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1271],{71271(e,t,n){n.d(t,{default:()=>v});var o=n(53577),i=n(74265),a=n(86319),s=n(20252);const l=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),r=e=>{{const{component:t,commands:n,helpers:r}=e,c=t.tiptap,p=c.state.selection.$anchor.node().attrs,d=c.isActive("heading",{level:1})?"h1":c.isActive("heading",{level:2})?"h2":c.isActive("heading",{level:3})?"h3":c.isActive("heading",{level:4})?"h4":c.isActive("heading",{level:5})?"h5":c.isActive("heading",{level:6})?"h6":"paragraph";let u=e.languageJson;const g=e.language||"he";return u||(u="he"===g?o:i),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=c.isActive("customBulletItem"),n=[{text:"design",selected:!t},...t?[{text:"icons",selected:!0}]:[],{text:"settings"}];return n.forEach(t=>t.selected=t.text===e),n},layout:e=>{let{tab:o,changeTab:i,tabs:r}=e;return[{type:"info",text:"text_micro_copy",active:()=>"design"===o.text},{type:"heading",level:6,text:"typography",active:()=>"design"===o.text},{type:"dropdown",active:()=>"design"===o.text,title:"type",value:d,items:[{value:"H1"},{value:"H2"},{value:"H3"},{value:"H4"},{value:"H5"},{value:"H6"},{value:"paragraph"}],onChange:e=>{const t=e.target.value;switch(t){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":c.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":c.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(c.getAttributes("textStyle").fontSize||"16px"),active:()=>"design"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontSize(n).run():o.chain().setFontSize(n).run()}},{type:"dropdown",title:"fontWeight",active:()=>"design"===o.text&&"web"===a.M.get("config","channel"),value:String(c.getAttributes("textStyle").fontWeight||400),selected:String(c.getAttributes("textStyle").fontWeight||400),items:l,onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontWeight(n).run():o.chain().setFontWeight(n).run()}},{type:"checkbox",title:"smart_change",active:()=>"design"===o.text,checked:(0,s.z)(),onChange:e=>{(0,s.R)(!!e.target.checked)}},{type:"heading",level:6,text:"spacing",active:()=>"design"===o.text},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(p.lineHeight||1),active:()=>"design"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setLineHeight(n).run():o.chain().setLineHeight(n).run()}},{type:"slider",title:"letterSpacing",min:1,max:10,step:1,value:parseFloat(p.letterSpacing)||1,active:()=>"design"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;n<=1?i.from===i.to?o.chain().selectAll().setLetterSpacing("normal").run():o.chain().setLetterSpacing("normal").run():i.from===i.to?o.chain().selectAll().setLetterSpacing(n+"px").run():o.chain().setLetterSpacing(n+"px").run()}},{type:"heading",level:6,text:"colors",active:()=>"design"===o.text},{type:"colorSwatchGroup",active:()=>"design"===o.text,columns:2,items:[{title:"font_color",value:c.getAttributes("textStyle").color||"#000000",onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;if(i.from===i.to){const{state:e,view:t}=o,i=e.tr,{from:a,to:s}={from:0,to:e.doc.content.size};e.doc.nodesBetween(a,s,(t,o)=>{if(t.isText){t.marks.some(e=>"link"===e.type.name)||i.addMark(o,o+t.nodeSize,e.schema.marks.textStyle.create({color:n}))}}),t.dispatch(i)}else o.chain().setColor(n).focus().run()}},{title:"backgroundColor",allowGradient:!0,value:t.props.style.background||t.props.style.backgroundColor||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{background:t,backgroundColor:null})}}]},{type:"heading",level:6,text:"layout",active:()=>"design"===o.text},{type:"slider",active:()=>"design"===o.text,title:"maxWidth",value:parseFloat(t.props.style.width),min:20,max:1e3,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"divider"},{type:"colorpicker",active:()=>"icons"===o.text,title:u.iconColor||"Icon color",alpha:!1,value:c.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;c.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===o.text},{type:"slider",active:()=>"icons"===o.text,title:u.iconSize||"Icon size",value:parseInt(c.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;c.chain().setCustomBulletStyles({width:t+"px",height:t+"px"}).run()}},{type:"icons",active:()=>"icons"===o.text,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;t.tiptap.chain().focus().setCustomBulletIcon({svgIcon:n.urlPng}).run()}}]}}}};var c=n(52144);const p=e=>{let{helpers:t,tiptap:n,composeId:o,template:i}=e;return{set:(e,a,s)=>{switch(a){case"style":return"object"==typeof s&&(e[a]=(0,c.A)(e[a],s),t.mergeDiff(i,{style:e[a]})),!0;case"text":e[a]=s;const l=n.getJSON();return s&&"object"==typeof s&&JSON.stringify(l)!==JSON.stringify(s.childNodes)&&(s&&s.focusedElement&&s.focusedElement===o?(n.chain().focus().setContent(s.childNodes).run(),s.to&&s.from&&n.commands.setTextSelection({from:s.from,to:s.to})):n.chain().setContent(s.childNodes).run()),delete e?.text?.markdown,!0}}}};var d=n(84488),u=n.n(d);n(70567);const g=[];let h=!1,m=null;const v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="text";return{name:t,create:n=>{const{createElement:o,compose:i,helpers:s}=n,{mergeDiff:l}=s,c=document.createElement("div");l(c,{style:i.props.style});const d=a.M.get("config","editor","configure","editorProps","fonts");let v=a.M.get("config","target");"string"==typeof v&&(v=document.querySelector(v)),v||(v=document.body);const y=u()({element:c,container:v||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{let{insertContent:t,getJSON:n,getHTML:o,getText:i,selectAll:s,insertContentHtml:l}=e;const r=a.M.get("injectEditor"),c=document.createElement("cdtr-text-prompt-editor");r(c),c.context=i(),c.addEventListener("text-generation-start",e=>{s()}),c.addEventListener("text-generation-chunk",e=>{t(e.detail.chunk)}),c.addEventListener("text-generation-complete",e=>{s(),l(e.detail.text)}),c.addEventListener("text-generation-error",e=>{console.error("Text generation error:",e.detail.error)})},content:"string"==typeof i.props.text.markdown?i.props.text.markdown:i.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{m===y&&(m=null),setTimeout(()=>{m!==y&&(h=!1)},150)},onFocus:()=>{if(!h||m===y||null===m){if(h=!0,m=y,g.length>0)for(g.forEach(e=>{e!==y&&e.hideEditor()});g.length>0;)g.pop();g.push(y),setTimeout(()=>{m===y&&h&&y.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const o=n.curSelection.from,a=n.curSelection.to,s={childNodes:t.getJSON(),from:o,to:a,focusedElement:i.id};f.commands.execCommand("text",s)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:d||[],useCloud:!0},{type:"fontSize",sizes:e.fontSize||[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74]},{type:"horizonRule"},{type:"clearFormat"},{type:"bold"},{type:"strike"},{type:"italic"},{type:"underline"},{type:"table"},{type:"emoji"},{type:"unLink"},{type:"link"},{type:"customList"},{type:"numbered"},{type:"bullet"},{type:"backcolor"},{type:"fontColor"},{type:"direction"},{type:"justify"},{type:"right"},{type:"center"},{type:"left"},{type:"image"},{type:"mergeTags"},{type:"magic"}]}),f=o({name:t,id:i.id,template:c,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>c,handleBar:!0,validator:p({template:c,helpers:s,tiptap:y,composeId:i.id}),schema:i.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:i,remove:()=>{c.remove()},createEditor:r});return i.props.text.markdown&&y.chain().insertContent(" ").run(),f.addProp("tiptap",y),f}}}}}]);
|
|
Binary file
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1403],{71403(e,t,a){a.r(t),a.d(t,{ToastProvider:()=>s});var i=a(59929);class s extends i.WF{constructor(){super(),this.text="",this.variant="default",this.global=!0,this._open=!1,this._leaving=!1,this._hideTimer=null,this._leaveTimer=null}connectedCallback(){super.connectedCallback(),this.global&&(window.snackbar=e=>this.show(e))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this._hideTimer),clearTimeout(this._leaveTimer)}show(){let{text:e="",timeout:t=3e3,variant:a="default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};clearTimeout(this._hideTimer),clearTimeout(this._leaveTimer),this.text=e,this.variant=a,this.setAttribute("data-variant",a),this._leaving=!1,this._open=!0,this._hideTimer=setTimeout(()=>this.hide(),parseInt(t,10)||3e3)}hide(){this._open&&(this._leaving=!0,this._leaveTimer=setTimeout(()=>{this._open=!1,this._leaving=!1},220))}render(){return this._open?i.qy`
|
|
2
|
+
<div class="toast ${this._leaving?"leave":"enter"}" role="status" aria-live="polite">
|
|
3
|
+
<span class="accent"></span>
|
|
4
|
+
<span class="msg">${this.text}</span>
|
|
5
|
+
</div>
|
|
6
|
+
`:i.qy``}}s.properties={text:{type:String},variant:{type:String},global:{type:Boolean},_open:{state:!0},_leaving:{state:!0}},s.styles=i.AH`
|
|
7
|
+
:host {
|
|
8
|
+
position: fixed;
|
|
9
|
+
left: 24px;
|
|
10
|
+
bottom: 24px;
|
|
11
|
+
z-index: 2147483000;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
14
|
+
Helvetica, Arial, sans-serif;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.toast {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 12px;
|
|
21
|
+
max-width: min(92vw, 460px);
|
|
22
|
+
padding: 13px 20px 13px 16px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
pointer-events: auto;
|
|
25
|
+
color: #f5f7fa;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: 1.45;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
letter-spacing: 0.1px;
|
|
30
|
+
border-radius: 14px;
|
|
31
|
+
/* glassy dark surface with a subtle top-light gradient */
|
|
32
|
+
background: linear-gradient(
|
|
33
|
+
180deg,
|
|
34
|
+
rgba(38, 46, 62, 0.96) 0%,
|
|
35
|
+
rgba(23, 29, 41, 0.96) 100%
|
|
36
|
+
);
|
|
37
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
38
|
+
-webkit-backdrop-filter: blur(12px) saturate(140%);
|
|
39
|
+
backdrop-filter: blur(12px) saturate(140%);
|
|
40
|
+
/* layered depth: tight ambient edge + soft lifted key shadow */
|
|
41
|
+
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.24),
|
|
42
|
+
0 12px 32px -8px rgba(16, 24, 40, 0.55),
|
|
43
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* accent dot — colour keys the variant */
|
|
47
|
+
.accent {
|
|
48
|
+
flex: none;
|
|
49
|
+
width: 8px;
|
|
50
|
+
height: 8px;
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
background: var(--accent, #6ea8fe);
|
|
53
|
+
box-shadow: 0 0 0 4px var(--accent-glow, rgba(110, 168, 254, 0.18));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.msg {
|
|
57
|
+
min-width: 0;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([data-variant="success"]) .toast {
|
|
64
|
+
--accent: #34d399;
|
|
65
|
+
--accent-glow: rgba(52, 211, 153, 0.2);
|
|
66
|
+
}
|
|
67
|
+
:host([data-variant="error"]) .toast {
|
|
68
|
+
--accent: #f87171;
|
|
69
|
+
--accent-glow: rgba(248, 113, 113, 0.2);
|
|
70
|
+
}
|
|
71
|
+
:host([data-variant="info"]) .toast {
|
|
72
|
+
--accent: #6ea8fe;
|
|
73
|
+
--accent-glow: rgba(110, 168, 254, 0.2);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.enter {
|
|
77
|
+
animation: toast-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
78
|
+
}
|
|
79
|
+
.leave {
|
|
80
|
+
animation: toast-out 220ms cubic-bezier(0.4, 0, 1, 1) both;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes toast-in {
|
|
84
|
+
from {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: translate(-12px, 16px) scale(0.96);
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
transform: translate(0, 0) scale(1);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
@keyframes toast-out {
|
|
94
|
+
from {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
transform: translate(0, 0) scale(1);
|
|
97
|
+
}
|
|
98
|
+
to {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: translate(-12px, 10px) scale(0.98);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
.enter,
|
|
106
|
+
.leave {
|
|
107
|
+
animation-duration: 1ms;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`,customElements.get("cdtr-toast-provider")||customElements.define("cdtr-toast-provider",s)}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1529],{81529(e,t,s){s.r(t),s.d(t,{EditorBar:()=>l});var i=s(59929),n=s(49937),o=s(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1529],{81529(e,t,s){s.r(t),s.d(t,{EditorBar:()=>l});var i=s(59929),n=s(49937),o=s(36565),r=s(69600);const d=o.Ay;class l extends i.WF{constructor(){super(),this.opened=!1,this.offsetY=50,this.offsetX=0,this.reRender=this.reRender.bind(this)}reRender(){if(this.opened&&this.componentId){const e=d.getComponent(this.componentId);if(e&&e.element){const t=e.element.getBoundingClientRect();let s=t.top-this.offsetY;-1!==this.direction.indexOf("left")?this.left=t.left+this.offsetX+"px":this.left=t.left+t.width+"px",this.top=s+"px",-1!==this.direction.indexOf("bottom")&&(this.top=t.top-this.offsetY+t.height+20+"px")}}}render(){return this.opened?(this.style.display="",this.style.left=this.left,this.style.top=this.top,this.style.zIndex=(0,r.A)(),this.style.transform=`translate(${-1!==this.direction.indexOf("left")?"0":"100%"},${-1!==this.direction.indexOf("bottom")?"100%":"0"})`,i.qy` <slot></slot>`):(this.style.display="none",null)}disconnectedCallback(){super.disconnectedCallback(),n.A.unSubscribe("onScroll",this.reRender),d.off("update",this.reRender)}connectedCallback(){super.connectedCallback(),n.A.subscribe("onScroll",this.reRender),d.on("update",this.reRender),setTimeout(()=>{this.reRender()},0)}}l.styles=i.AH`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
border-radius: 2px;
|
|
Binary file
|