@editora/toast 1.0.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +904 -8
  2. package/dist/core/AnimationUtils.d.ts +36 -0
  3. package/dist/core/ToastLifecycle.d.ts +25 -0
  4. package/dist/core/ToastManager.d.ts +36 -0
  5. package/dist/core/ToastQueue.d.ts +19 -0
  6. package/dist/core/ToastRenderer.d.ts +20 -0
  7. package/dist/core/ToastStore.d.ts +31 -0
  8. package/dist/core/types.d.ts +168 -0
  9. package/dist/index.cjs.js +2 -0
  10. package/dist/index.cjs.js.map +1 -0
  11. package/dist/index.d.ts +39 -10
  12. package/dist/index.esm.js +1075 -0
  13. package/dist/index.esm.js.map +1 -0
  14. package/dist/index.umd.js +2 -0
  15. package/dist/index.umd.js.map +1 -0
  16. package/dist/toast.css +783 -18
  17. package/package.json +50 -13
  18. package/LICENSE +0 -21
  19. package/dist/index.js +0 -70
  20. package/dist/packages/core/src/Editor.d.ts +0 -15
  21. package/dist/packages/core/src/Editor.js +0 -37
  22. package/dist/packages/core/src/EditorState.d.ts +0 -13
  23. package/dist/packages/core/src/EditorState.js +0 -14
  24. package/dist/packages/core/src/Selection.d.ts +0 -126
  25. package/dist/packages/core/src/Selection.js +0 -232
  26. package/dist/packages/core/src/commands/CommandManager.d.ts +0 -56
  27. package/dist/packages/core/src/commands/CommandManager.js +0 -166
  28. package/dist/packages/core/src/index.d.ts +0 -7
  29. package/dist/packages/core/src/index.js +0 -4
  30. package/dist/packages/core/src/model/Fragment.d.ts +0 -80
  31. package/dist/packages/core/src/model/Fragment.js +0 -172
  32. package/dist/packages/core/src/model/Mark.d.ts +0 -108
  33. package/dist/packages/core/src/model/Mark.js +0 -138
  34. package/dist/packages/core/src/model/Node.d.ts +0 -172
  35. package/dist/packages/core/src/model/Node.js +0 -458
  36. package/dist/packages/core/src/model/types.d.ts +0 -29
  37. package/dist/packages/core/src/model/types.js +0 -1
  38. package/dist/packages/core/src/plugins/Plugin.d.ts +0 -37
  39. package/dist/packages/core/src/plugins/Plugin.js +0 -31
  40. package/dist/packages/core/src/plugins/PluginManager.d.ts +0 -75
  41. package/dist/packages/core/src/plugins/PluginManager.js +0 -185
  42. package/dist/packages/core/src/schema/Node.d.ts +0 -26
  43. package/dist/packages/core/src/schema/Node.js +0 -12
  44. package/dist/packages/core/src/schema/Schema.d.ts +0 -52
  45. package/dist/packages/core/src/schema/Schema.js +0 -296
  46. package/dist/packages/core/src/security/Sanitizer.d.ts +0 -81
  47. package/dist/packages/core/src/security/Sanitizer.js +0 -200
  48. package/dist/packages/editora-toast/src/index.d.ts +0 -18
  49. package/dist/packages/editora-toast/src/index.js +0 -70
  50. package/src/index.ts +0 -83
  51. package/src/toast.css +0 -42
package/dist/toast.css CHANGED
@@ -1,29 +1,123 @@
1
- /* Simple toast styles for editora-toast */
1
+ /* Advanced Toast Notification Styles */
2
+ /* Backward compatible with original design */
3
+
4
+ :root {
5
+ --editora-toast-bg: rgba(0, 0, 0, 0.85);
6
+ --editora-toast-color: #fff;
7
+ --editora-toast-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
8
+ --editora-toast-border-radius: 6px;
9
+ --editora-toast-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
10
+ --editora-toast-font-size: 13px;
11
+ --editora-toast-padding: 10px 14px;
12
+ --editora-toast-gap: 8px;
13
+ --editora-toast-z-index: 2147483647;
14
+ }
15
+
16
+ /* Container positions */
2
17
  .editora-toast-container {
3
18
  position: fixed;
4
- z-index: 2147483647;
5
- right: 16px;
6
- bottom: 16px;
19
+ z-index: var(--editora-toast-z-index);
7
20
  display: flex;
8
21
  flex-direction: column;
9
- gap: 8px;
22
+ gap: var(--editora-toast-gap);
10
23
  pointer-events: none;
24
+ max-width: 100%;
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ /* RTL Support */
29
+ [dir="rtl"] .editora-toast-container,
30
+ .editora-toast-container[data-rtl="true"] {
31
+ direction: rtl;
32
+ }
33
+
34
+ [dir="rtl"] .editora-toast,
35
+ .editora-toast[data-rtl="true"] {
36
+ direction: rtl;
37
+ text-align: right;
38
+ }
39
+
40
+ [dir="rtl"] .editora-toast-content,
41
+ .editora-toast-content[data-rtl="true"] {
42
+ direction: rtl;
43
+ text-align: right;
44
+ }
45
+
46
+ [dir="rtl"] .editora-toast-actions,
47
+ .editora-toast-actions[data-rtl="true"] {
48
+ direction: rtl;
49
+ flex-direction: row-reverse;
50
+ }
51
+
52
+ [dir="rtl"] .editora-toast-progress,
53
+ .editora-toast-progress[data-rtl="true"] {
54
+ direction: rtl;
55
+ }
56
+
57
+ [dir="rtl"] .editora-toast-progress-bar,
58
+ .editora-toast-progress-bar[data-rtl="true"] {
59
+ direction: rtl;
11
60
  }
12
61
 
62
+ .editora-toast-top-left {
63
+ top: 16px;
64
+ left: 16px;
65
+ }
66
+
67
+ .editora-toast-top-center {
68
+ top: 16px;
69
+ left: 50%;
70
+ transform: translateX(-50%);
71
+ }
72
+
73
+ .editora-toast-top-right {
74
+ top: 16px;
75
+ right: 16px;
76
+ }
77
+
78
+ .editora-toast-bottom-left {
79
+ bottom: 16px;
80
+ left: 16px;
81
+ }
82
+
83
+ .editora-toast-bottom-center {
84
+ bottom: 16px;
85
+ left: 50%;
86
+ transform: translateX(-50%);
87
+ }
88
+
89
+ .editora-toast-bottom-right {
90
+ bottom: 16px;
91
+ right: 16px;
92
+ }
93
+
94
+ .editora-toast-center {
95
+ top: 50%;
96
+ left: 50%;
97
+ transform: translate(-50%, -50%);
98
+ align-items: center;
99
+ }
100
+
101
+ /* Toast base styles */
13
102
  .editora-toast {
14
103
  min-width: 200px;
15
104
  max-width: 360px;
16
- background: rgba(0,0,0,0.85);
17
- color: #fff;
18
- padding: 10px 14px;
19
- border-radius: 6px;
20
- box-shadow: 0 6px 18px rgba(0,0,0,0.25);
21
- font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
22
- font-size: 13px;
105
+ background: var(--editora-toast-bg);
106
+ color: var(--editora-toast-color);
107
+ padding: var(--editora-toast-padding);
108
+ border-radius: var(--editora-toast-border-radius);
109
+ box-shadow: var(--editora-toast-shadow);
110
+ font-family: var(--editora-toast-font-family);
111
+ font-size: var(--editora-toast-font-size);
23
112
  pointer-events: auto;
113
+ touch-action: none; /* Prevent default touch behaviors like scrolling */
24
114
  opacity: 0;
25
115
  transform: translateY(8px) scale(0.98);
26
- transition: opacity 160ms ease, transform 180ms cubic-bezier(.2,.9,.25,1);
116
+ transition: opacity 160ms ease, transform 180ms cubic-bezier(.2, .9, .25, 1);
117
+ border: none;
118
+ outline: none;
119
+ position: relative;
120
+ overflow: hidden;
27
121
  }
28
122
 
29
123
  .editora-toast.show {
@@ -31,12 +125,683 @@
31
125
  transform: translateY(0) scale(1);
32
126
  }
33
127
 
34
- .editora-toast.success { background: #1b8c4a; }
35
- .editora-toast.error { background: #b02a37; }
36
- .editora-toast.info { background: #205081; }
128
+ .editora-toast.hiding {
129
+ opacity: 0;
130
+ transform: translateY(-8px) scale(0.95);
131
+ }
132
+
133
+ /* Theme styles */
134
+
135
+ /* Colored theme */
136
+ .editora-toast[data-theme="colored"].editora-toast-info {
137
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
138
+ color: #fff !important;
139
+ border-left: 4px solid #5a67d8;
140
+ }
141
+
142
+ .editora-toast[data-theme="colored"].editora-toast-success {
143
+ background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
144
+ color: #fff !important;
145
+ border-left: 4px solid #38a169;
146
+ }
147
+
148
+ .editora-toast[data-theme="colored"].editora-toast-error {
149
+ background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%) !important;
150
+ color: #fff !important;
151
+ border-left: 4px solid #e53e3e;
152
+ }
153
+
154
+ .editora-toast[data-theme="colored"].editora-toast-warning {
155
+ background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%) !important;
156
+ color: #fff !important;
157
+ border-left: 4px solid #dd6b20;
158
+ }
159
+
160
+ .editora-toast[data-theme="colored"].editora-toast-loading {
161
+ background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
162
+ color: #fff !important;
163
+ border-left: 4px solid #3182ce;
164
+ }
165
+
166
+ .editora-toast[data-theme="colored"].editora-toast-promise {
167
+ background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%) !important;
168
+ color: #fff !important;
169
+ border-left: 4px solid #805ad5;
170
+ }
171
+
172
+ /* Minimal theme */
173
+ .editora-toast[data-theme="minimal"] {
174
+ background: #f8f9fa !important;
175
+ color: #212529 !important;
176
+ border: 1px solid #dee2e6 !important;
177
+ border-left: 4px solid #6c757d !important;
178
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
179
+ }
37
180
 
181
+ .editora-toast[data-theme="minimal"].editora-toast-info {
182
+ border-left-color: #007acc !important;
183
+ }
184
+
185
+ .editora-toast[data-theme="minimal"].editora-toast-success {
186
+ border-left-color: #28a745 !important;
187
+ }
188
+
189
+ .editora-toast[data-theme="minimal"].editora-toast-error {
190
+ border-left-color: #dc3545 !important;
191
+ }
192
+
193
+ .editora-toast[data-theme="minimal"].editora-toast-warning {
194
+ border-left-color: #ffc107 !important;
195
+ }
196
+
197
+ .editora-toast[data-theme="minimal"].editora-toast-loading {
198
+ border-left-color: #17a2b8 !important;
199
+ }
200
+
201
+ .editora-toast[data-theme="minimal"].editora-toast-promise {
202
+ border-left-color: #6f42c1 !important;
203
+ }
204
+
205
+ /* Glass theme */
206
+ .editora-toast[data-theme="glass"] {
207
+ background: rgba(0, 0, 0, 0.3) !important;
208
+ backdrop-filter: blur(20px) !important;
209
+ -webkit-backdrop-filter: blur(20px) !important;
210
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
211
+ color: #fff !important;
212
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
213
+ }
214
+
215
+ .editora-toast[data-theme="glass"].editora-toast-info {
216
+ border-left: 4px solid #007acc !important;
217
+ }
218
+
219
+ .editora-toast[data-theme="glass"].editora-toast-success {
220
+ border-left: 4px solid #28a745 !important;
221
+ }
222
+
223
+ .editora-toast[data-theme="glass"].editora-toast-error {
224
+ border-left: 4px solid #dc3545 !important;
225
+ }
226
+
227
+ .editora-toast[data-theme="glass"].editora-toast-warning {
228
+ border-left: 4px solid #ffc107 !important;
229
+ }
230
+
231
+ .editora-toast[data-theme="glass"].editora-toast-loading {
232
+ border-left: 4px solid #17a2b8 !important;
233
+ }
234
+
235
+ .editora-toast[data-theme="glass"].editora-toast-promise {
236
+ border-left: 4px solid #6f42c1 !important;
237
+ }
238
+
239
+ /* Dark theme */
240
+ .editora-toast[data-theme="dark"] {
241
+ background: rgba(33, 37, 41, 0.95) !important;
242
+ color: #fff !important;
243
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
244
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important;
245
+ }
246
+
247
+ .editora-toast[data-theme="dark"].editora-toast-info {
248
+ border-left: 4px solid #17a2b8 !important;
249
+ }
250
+
251
+ .editora-toast[data-theme="dark"].editora-toast-success {
252
+ border-left: 4px solid #28a745 !important;
253
+ }
254
+
255
+ .editora-toast[data-theme="dark"].editora-toast-error {
256
+ border-left: 4px solid #dc3545 !important;
257
+ }
258
+
259
+ .editora-toast[data-theme="dark"].editora-toast-warning {
260
+ border-left: 4px solid #ed8936 !important;
261
+ }
262
+
263
+ .editora-toast[data-theme="dark"].editora-toast-loading {
264
+ border-left: 4px solid #007bff !important;
265
+ }
266
+
267
+ .editora-toast[data-theme="dark"].editora-toast-promise {
268
+ border-left: 4px solid #6f42c1 !important;
269
+ }
270
+
271
+ /* Light theme */
272
+ .editora-toast[data-theme="light"] {
273
+ background: rgba(255, 255, 255, 0.95) !important;
274
+ color: #333 !important;
275
+ border: 1px solid rgba(0, 0, 0, 0.1) !important;
276
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
277
+ }
278
+
279
+ .editora-toast[data-theme="light"].editora-toast-info {
280
+ border-left: 4px solid #007acc !important;
281
+ }
282
+
283
+ .editora-toast[data-theme="light"].editora-toast-success {
284
+ border-left: 4px solid #28a745 !important;
285
+ }
286
+
287
+ .editora-toast[data-theme="light"].editora-toast-error {
288
+ border-left: 4px solid #dc3545 !important;
289
+ }
290
+
291
+ .editora-toast[data-theme="light"].editora-toast-warning {
292
+ border-left: 4px solid #ffc107 !important;
293
+ }
294
+
295
+ .editora-toast[data-theme="light"].editora-toast-loading {
296
+ border-left: 4px solid #17a2b8 !important;
297
+ }
298
+
299
+ .editora-toast[data-theme="light"].editora-toast-promise {
300
+ border-left: 4px solid #6f42c1 !important;
301
+ }
302
+
303
+ /* Neon theme */
304
+ .editora-toast[data-theme="neon"] {
305
+ background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%) !important;
306
+ color: #00ff88 !important;
307
+ border: 2px solid #00ff88 !important;
308
+ box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 40px rgba(0, 255, 136, 0.1) !important;
309
+ text-shadow: 0 0 10px rgba(0, 255, 136, 0.5) !important;
310
+ }
311
+
312
+ .editora-toast[data-theme="neon"].editora-toast-info {
313
+ border-left: 4px solid #00ff88 !important;
314
+ box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 40px rgba(0, 255, 136, 0.1) !important;
315
+ }
316
+
317
+ .editora-toast[data-theme="neon"].editora-toast-success {
318
+ border-left: 4px solid #00ff88 !important;
319
+ box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 40px rgba(0, 255, 136, 0.1) !important;
320
+ }
321
+
322
+ .editora-toast[data-theme="neon"].editora-toast-error {
323
+ border-left: 4px solid #ff0088 !important;
324
+ color: #ff0088 !important;
325
+ box-shadow: 0 0 20px rgba(255, 0, 136, 0.3), 0 0 40px rgba(255, 0, 136, 0.1) !important;
326
+ text-shadow: 0 0 10px rgba(255, 0, 136, 0.5) !important;
327
+ }
328
+
329
+ .editora-toast[data-theme="neon"].editora-toast-warning {
330
+ border-left: 4px solid #ffaa00 !important;
331
+ color: #ffaa00 !important;
332
+ box-shadow: 0 0 20px rgba(255, 170, 0, 0.3), 0 0 40px rgba(255, 170, 0, 0.1) !important;
333
+ text-shadow: 0 0 10px rgba(255, 170, 0, 0.5) !important;
334
+ }
335
+
336
+ .editora-toast[data-theme="neon"].editora-toast-loading {
337
+ border-left: 4px solid #0088ff !important;
338
+ color: #0088ff !important;
339
+ box-shadow: 0 0 20px rgba(0, 136, 255, 0.3), 0 0 40px rgba(0, 136, 255, 0.1) !important;
340
+ text-shadow: 0 0 10px rgba(0, 136, 255, 0.5) !important;
341
+ }
342
+
343
+ .editora-toast[data-theme="neon"].editora-toast-promise {
344
+ border-left: 4px solid #aa00ff !important;
345
+ color: #aa00ff !important;
346
+ box-shadow: 0 0 20px rgba(170, 0, 255, 0.3), 0 0 40px rgba(170, 0, 255, 0.1) !important;
347
+ text-shadow: 0 0 10px rgba(170, 0, 255, 0.5) !important;
348
+ }
349
+
350
+ /* Retro theme */
351
+ .editora-toast[data-theme="retro"] {
352
+ background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%) !important;
353
+ color: #fff !important;
354
+ border: 3px solid #fff !important;
355
+ box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
356
+ font-family: 'Courier New', monospace !important;
357
+ }
358
+
359
+ .editora-toast[data-theme="retro"].editora-toast-info {
360
+ border-left: 4px solid #fff !important;
361
+ background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%) !important;
362
+ }
363
+
364
+ .editora-toast[data-theme="retro"].editora-toast-success {
365
+ border-left: 4px solid #fff !important;
366
+ background: linear-gradient(135deg, #45b7d1 0%, #96c93d 100%) !important;
367
+ }
368
+
369
+ .editora-toast[data-theme="retro"].editora-toast-error {
370
+ border-left: 4px solid #fff !important;
371
+ background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
372
+ }
373
+
374
+ .editora-toast[data-theme="retro"].editora-toast-warning {
375
+ border-left: 4px solid #fff !important;
376
+ background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%) !important;
377
+ }
378
+
379
+ .editora-toast[data-theme="retro"].editora-toast-loading {
380
+ border-left: 4px solid #fff !important;
381
+ background: linear-gradient(135deg, #a8e6cf 0%, #4ecdc4 100%) !important;
382
+ }
383
+
384
+ .editora-toast[data-theme="retro"].editora-toast-promise {
385
+ border-left: 4px solid #fff !important;
386
+ background: linear-gradient(135deg, #dda0dd 0%, #ba55d3 100%) !important;
387
+ }
388
+
389
+ /* Ocean theme */
390
+ .editora-toast[data-theme="ocean"] {
391
+ background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
392
+ color: #e0f7ff !important;
393
+ border: 1px solid rgba(224, 247, 255, 0.3) !important;
394
+ box-shadow: 0 8px 32px rgba(30, 60, 114, 0.3) !important;
395
+ }
396
+
397
+ .editora-toast[data-theme="ocean"].editora-toast-info {
398
+ border-left: 4px solid #4fc3f7 !important;
399
+ }
400
+
401
+ .editora-toast[data-theme="ocean"].editora-toast-success {
402
+ border-left: 4px solid #29b6f6 !important;
403
+ }
404
+
405
+ .editora-toast[data-theme="ocean"].editora-toast-error {
406
+ border-left: 4px solid #ff8a80 !important;
407
+ }
408
+
409
+ .editora-toast[data-theme="ocean"].editora-toast-warning {
410
+ border-left: 4px solid #ffb74d !important;
411
+ }
412
+
413
+ .editora-toast[data-theme="ocean"].editora-toast-loading {
414
+ border-left: 4px solid #81c784 !important;
415
+ }
416
+
417
+ .editora-toast[data-theme="ocean"].editora-toast-promise {
418
+ border-left: 4px solid #ba68c8 !important;
419
+ }
420
+
421
+ /* Forest theme */
422
+ .editora-toast[data-theme="forest"] {
423
+ background: linear-gradient(135deg, #0f4c3a 0%, #1b5e20 100%) !important;
424
+ color: #e8f5e8 !important;
425
+ border: 1px solid rgba(232, 245, 232, 0.3) !important;
426
+ box-shadow: 0 8px 32px rgba(15, 76, 58, 0.3) !important;
427
+ }
428
+
429
+ .editora-toast[data-theme="forest"].editora-toast-info {
430
+ border-left: 4px solid #66bb6a !important;
431
+ }
432
+
433
+ .editora-toast[data-theme="forest"].editora-toast-success {
434
+ border-left: 4px solid #4caf50 !important;
435
+ }
436
+
437
+ .editora-toast[data-theme="forest"].editora-toast-error {
438
+ border-left: 4px solid #ef5350 !important;
439
+ }
440
+
441
+ .editora-toast[data-theme="forest"].editora-toast-warning {
442
+ border-left: 4px solid #ff9800 !important;
443
+ }
444
+
445
+ .editora-toast[data-theme="forest"].editora-toast-loading {
446
+ border-left: 4px solid #81c784 !important;
447
+ }
448
+
449
+ .editora-toast[data-theme="forest"].editora-toast-promise {
450
+ border-left: 4px solid #ab47bc !important;
451
+ }
452
+
453
+ /* Sunset theme */
454
+ .editora-toast[data-theme="sunset"] {
455
+ background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%) !important;
456
+ color: #fff !important;
457
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
458
+ box-shadow: 0 8px 32px rgba(255, 126, 95, 0.3) !important;
459
+ }
460
+
461
+ .editora-toast[data-theme="sunset"].editora-toast-info {
462
+ border-left: 4px solid #ffb74d !important;
463
+ }
464
+
465
+ .editora-toast[data-theme="sunset"].editora-toast-success {
466
+ border-left: 4px solid #ff8a65 !important;
467
+ }
468
+
469
+ .editora-toast[data-theme="sunset"].editora-toast-error {
470
+ border-left: 4px solid #e57373 !important;
471
+ }
472
+
473
+ .editora-toast[data-theme="sunset"].editora-toast-warning {
474
+ border-left: 4px solid #ffb74d !important;
475
+ }
476
+
477
+ .editora-toast[data-theme="sunset"].editora-toast-loading {
478
+ border-left: 4px solid #81c784 !important;
479
+ }
480
+
481
+ .editora-toast[data-theme="sunset"].editora-toast-promise {
482
+ border-left: 4px solid #ba68c8 !important;
483
+ }
484
+
485
+ /* Midnight theme */
486
+ .editora-toast[data-theme="midnight"] {
487
+ background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
488
+ color: #ecf0f1 !important;
489
+ border: 1px solid rgba(236, 240, 241, 0.2) !important;
490
+ box-shadow: 0 8px 32px rgba(44, 62, 80, 0.4) !important;
491
+ }
492
+
493
+ .editora-toast[data-theme="midnight"].editora-toast-info {
494
+ border-left: 4px solid #3498db !important;
495
+ }
496
+
497
+ .editora-toast[data-theme="midnight"].editora-toast-success {
498
+ border-left: 4px solid #27ae60 !important;
499
+ }
500
+
501
+ .editora-toast[data-theme="midnight"].editora-toast-error {
502
+ border-left: 4px solid #e74c3c !important;
503
+ }
504
+
505
+ .editora-toast[data-theme="midnight"].editora-toast-warning {
506
+ border-left: 4px solid #f39c12 !important;
507
+ }
508
+
509
+ .editora-toast[data-theme="midnight"].editora-toast-loading {
510
+ border-left: 4px solid #9b59b6 !important;
511
+ }
512
+
513
+ .editora-toast[data-theme="midnight"].editora-toast-promise {
514
+ border-left: 4px solid #8e44ad !important;
515
+ }
516
+
517
+ /* Toast levels */
518
+ .editora-toast-info {
519
+ border-left: 4px solid #205081;
520
+ }
521
+
522
+ .editora-toast-success {
523
+ border-left: 4px solid #1b8c4a;
524
+ }
525
+
526
+ .editora-toast-error {
527
+ border-left: 4px solid #b02a37;
528
+ }
529
+
530
+ .editora-toast-warning {
531
+ border-left: 4px solid #ff8c00;
532
+ background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.05));
533
+ color: #333; /* Dark text for better contrast on light background */
534
+ }
535
+
536
+ .editora-toast-loading {
537
+ border-left: 4px solid #007acc;
538
+ }
539
+
540
+ .editora-toast-progress {
541
+ border-left: 4px solid #28a745;
542
+ }
543
+
544
+ .editora-toast-promise {
545
+ border-left: 4px solid #6f42c1;
546
+ }
547
+
548
+ .editora-toast-custom {
549
+ /* Custom styling handled by user */
550
+ }
551
+
552
+ /* Toast content layout */
553
+ .editora-toast-content {
554
+ display: flex;
555
+ align-items: flex-start;
556
+ gap: 8px;
557
+ min-height: 24px;
558
+ padding-right: 7px;;
559
+ }
560
+
561
+ .editora-toast-icon {
562
+ flex-shrink: 0;
563
+ font-size: 16px;
564
+ line-height: 1;
565
+ margin-top: 2px;
566
+ }
567
+
568
+ .editora-toast-message {
569
+ flex: 1;
570
+ line-height: 1.4;
571
+ word-wrap: break-word;
572
+ }
573
+
574
+ /* Progress bar */
575
+ .editora-toast-progress {
576
+ position: absolute;
577
+ bottom: 0;
578
+ left: 0;
579
+ right: 0;
580
+ height: 3px;
581
+ background: rgba(255, 255, 255, 0.2);
582
+ }
583
+
584
+ .editora-toast-progress-bar {
585
+ height: 100%;
586
+ background: currentColor;
587
+ transition: width 0.3s ease;
588
+ }
589
+
590
+ .editora-toast-progress-text {
591
+ position: absolute;
592
+ top: -15px;
593
+ right: 4px;
594
+ font-size: 11px;
595
+ color: inherit;
596
+ opacity: 0.8;
597
+ }
598
+
599
+ /* Actions */
600
+ .editora-toast-actions {
601
+ display: flex;
602
+ gap: 8px;
603
+ margin-top: 8px;
604
+ flex-wrap: wrap;
605
+ }
606
+
607
+ .editora-toast-action {
608
+ padding: 4px 8px;
609
+ border: 1px solid rgba(229, 229, 229, 0.6);
610
+ background: transparent;
611
+ color: inherit;
612
+ border-radius: 4px;
613
+ font-size: 12px;
614
+ cursor: pointer;
615
+ transition: all 0.2s ease;
616
+ }
617
+
618
+ .editora-toast-action:hover {
619
+ background: rgba(255, 255, 255, 0.1);
620
+ border-color: rgba(229, 229, 229, 0.8);
621
+ }
622
+
623
+ .editora-toast-action.primary {
624
+ background: rgba(255, 255, 255, 0.2);
625
+ border-color: rgba(229, 229, 229, 0.8);
626
+ font-weight: 500;
627
+ }
628
+
629
+ .editora-toast-action.primary:hover {
630
+ background: rgba(229, 229, 229, 0.3);
631
+ }
632
+
633
+ /* Close button */
634
+ .editora-toast-close {
635
+ position: absolute;
636
+ top: 3px;
637
+ right: 3px;
638
+ width: 20px;
639
+ height: 20px;
640
+ border: none;
641
+ background: transparent;
642
+ color: inherit;
643
+ cursor: pointer;
644
+ font-size: 16px;
645
+ line-height: 1;
646
+ opacity: 0.7;
647
+ transition: opacity 0.2s ease;
648
+ display: flex;
649
+ align-items: center;
650
+ justify-content: center;
651
+ border-radius: 2px;
652
+ z-index: 1;
653
+ }
654
+
655
+ .editora-toast-close:hover {
656
+ opacity: 1;
657
+ background: rgba(255, 255, 255, 0.1);
658
+ }
659
+
660
+ /* Grouping */
661
+ .editora-toast-group {
662
+ margin-bottom: 4px;
663
+ }
664
+
665
+ .editora-toast-group-header {
666
+ font-size: 11px;
667
+ opacity: 0.7;
668
+ margin-bottom: 4px;
669
+ text-transform: uppercase;
670
+ letter-spacing: 0.5px;
671
+ }
672
+
673
+ .editora-toast-group-collapsed {
674
+ max-height: 40px;
675
+ overflow: hidden;
676
+ }
677
+
678
+ /* Animations */
679
+ @keyframes editora-toast-slide-in {
680
+ from {
681
+ opacity: 0;
682
+ transform: translateY(8px) scale(0.98);
683
+ }
684
+ to {
685
+ opacity: 1;
686
+ transform: translateY(0) scale(1);
687
+ }
688
+ }
689
+
690
+ @keyframes editora-toast-slide-out {
691
+ from {
692
+ opacity: 1;
693
+ transform: translateY(0) scale(1);
694
+ }
695
+ to {
696
+ opacity: 0;
697
+ transform: translateY(-8px) scale(0.95);
698
+ }
699
+ }
700
+
701
+ .editora-toast.show {
702
+ animation: editora-toast-slide-in 0.2s ease forwards;
703
+ }
704
+
705
+ .editora-toast.hiding {
706
+ animation: editora-toast-slide-out 0.2s ease forwards;
707
+ }
708
+
709
+ /* Spring animation class - disables CSS transitions for JavaScript control */
710
+ .editora-toast.spring-animation {
711
+ transition: none !important;
712
+ animation: none !important;
713
+ }
714
+
715
+ /* Reduced motion */
716
+ @media (prefers-reduced-motion: reduce) {
717
+ .editora-toast {
718
+ transition: none;
719
+ }
720
+
721
+ .editora-toast.show,
722
+ .editora-toast.hiding {
723
+ animation: none;
724
+ }
725
+ }
726
+
727
+ /* Mobile responsive */
728
+ @media (max-width: 480px) {
729
+ .editora-toast-container {
730
+ left: 8px !important;
731
+ right: 8px !important;
732
+ top: 8px !important;
733
+ bottom: 8px !important;
734
+ }
735
+
736
+ .editora-toast {
737
+ min-width: auto;
738
+ max-width: none;
739
+ }
740
+
741
+ .editora-toast-center {
742
+ top: 20px;
743
+ left: 8px;
744
+ right: 8px;
745
+ transform: none;
746
+ align-items: stretch;
747
+ }
748
+ }
749
+
750
+ /* Focus and accessibility */
751
+ .editora-toast:focus {
752
+ outline: 2px solid rgba(255, 255, 255, 0.5);
753
+ outline-offset: 2px;
754
+ }
755
+
756
+ .editora-toast-action:focus {
757
+ outline: 2px solid rgba(255, 255, 255, 0.5);
758
+ outline-offset: 2px;
759
+ }
760
+
761
+ .editora-toast-close:focus {
762
+ outline: 2px solid rgba(255, 255, 255, 0.5);
763
+ outline-offset: 2px;
764
+ }
765
+
766
+ /* Loading spinner */
767
+ .editora-toast-loading::before {
768
+ content: '';
769
+ display: inline-block;
770
+ width: 14px;
771
+ height: 14px;
772
+ border: 2px solid rgba(255, 255, 255, 0.3);
773
+ border-radius: 50%;
774
+ border-top-color: currentColor;
775
+ animation: editora-toast-spin 1s ease-in-out infinite;
776
+ margin-right: 8px;
777
+ }
778
+
779
+ @keyframes editora-toast-spin {
780
+ to {
781
+ transform: rotate(360deg);
782
+ }
783
+ }
784
+
785
+ /* Spring animation class - disables CSS transitions for JavaScript control */
786
+ .editora-toast.spring-animation,
787
+ .spring-animation {
788
+ transition: none !important;
789
+ }
790
+
791
+ /* Backward compatibility */
38
792
  .editora-toast .close {
39
- margin-left: 8px;
40
- opacity: 0.85;
793
+ position: absolute;
794
+ top: 8px;
795
+ right: 8px;
796
+ background: none;
797
+ border: none;
798
+ color: inherit;
41
799
  cursor: pointer;
800
+ font-size: 16px;
801
+ opacity: 0.7;
802
+ transition: opacity 0.2s ease;
803
+ }
804
+
805
+ .editora-toast .close:hover {
806
+ opacity: 1;
42
807
  }