@seliseblocks/mailcraft 0.1.1 → 0.2.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.
- package/DOCS.md +243 -16
- package/README.md +15 -6
- package/README.md.txt +135 -0
- package/dist/mailcraft-editor.bundle.js +87 -47
- package/dist/mailcraft-editor.bundle.js.map +3 -3
- package/examples/templates/activate-your-account.html +1 -1
- package/examples/templates/back-in-stock.html +1 -1
- package/examples/templates/cart-left-behind.html +1 -1
- package/examples/templates/community-giveaway.html +1 -1
- package/examples/templates/frontend-futures-invite.html +1 -1
- package/examples/templates/give-25-get-25.html +1 -1
- package/examples/templates/invoice-paid.html +1 -1
- package/examples/templates/meet-nova-launch.html +1 -1
- package/examples/templates/mega-weekend-sale.html +1 -1
- package/examples/templates/order-confirmed.html +80 -80
- package/examples/templates/rate-your-headphones.html +1 -1
- package/examples/templates/reset-your-password.html +1 -1
- package/examples/templates/thankyou-promo-code.html +1 -1
- package/examples/templates/the-sunday-brief.html +1 -1
- package/examples/templates/welcome-to-your-workspace.html +1 -1
- package/examples/templates/your-order-shipped.html +1 -1
- package/examples/templates/your-password-was-changed.html +1 -1
- package/examples/templates/your-signin-code.html +1 -1
- package/examples/vanilla.html +261 -47
- package/package.json +7 -2
- package/src/core/assets.js +10 -15
- package/src/core/binder.js +140 -118
- package/src/core/blocks.js +14 -1
- package/src/core/css-cascade.js +117 -117
- package/src/core/editor-core.js +1540 -1492
- package/src/core/export.js +158 -55
- package/src/core/i18n/ar.js +218 -177
- package/src/core/i18n/bg.js +195 -152
- package/src/core/i18n/bn.js +217 -176
- package/src/core/i18n/ca.js +195 -152
- package/src/core/i18n/cs.js +195 -152
- package/src/core/i18n/da.js +195 -152
- package/src/core/i18n/de-CH.js +195 -152
- package/src/core/i18n/de.js +195 -152
- package/src/core/i18n/dz.js +220 -179
- package/src/core/i18n/el.js +195 -152
- package/src/core/i18n/en.js +3 -11
- package/src/core/i18n/es.js +195 -152
- package/src/core/i18n/et.js +195 -152
- package/src/core/i18n/fi.js +195 -152
- package/src/core/i18n/fr.js +195 -152
- package/src/core/i18n/hr.js +195 -152
- package/src/core/i18n/hu.js +195 -152
- package/src/core/i18n/index.js +83 -83
- package/src/core/i18n/it.js +195 -152
- package/src/core/i18n/lt.js +195 -152
- package/src/core/i18n/lv.js +195 -152
- package/src/core/i18n/nb.js +195 -152
- package/src/core/i18n/nl.js +195 -152
- package/src/core/i18n/pl.js +195 -152
- package/src/core/i18n/pt.js +195 -152
- package/src/core/i18n/ro.js +195 -152
- package/src/core/i18n/ru.js +195 -152
- package/src/core/i18n/sk.js +195 -152
- package/src/core/i18n/sl.js +195 -152
- package/src/core/i18n/sv.js +195 -152
- package/src/core/i18n/tables.js +50 -50
- package/src/core/i18n/tr.js +195 -152
- package/src/core/i18n/uk.js +195 -152
- package/src/core/icons.js +237 -235
- package/src/core/ids.js +1 -1
- package/src/core/import-html.js +1047 -959
- package/src/core/layout-style.js +100 -100
- package/src/core/parse.js +10 -10
- package/src/core/placeholder.js +15 -15
- package/src/core/sanitize.js +141 -141
- package/src/core/storage-limits.js +189 -184
- package/src/core/storage.js +85 -85
- package/src/core/theme.js +15 -1
- package/src/core/variables.js +11 -11
- package/src/index.js +9 -9
- package/src/mailcraft-editor.js +64 -25
- package/src/render/block-body.js +49 -6
- package/src/render/canvas.js +74 -8
- package/src/render/fields.js +619 -588
- package/src/render/focus-preserve.js +158 -158
- package/src/render/rte.js +241 -212
- package/src/render/screenshot.js +138 -132
- package/src/render/story.js +415 -415
- package/src/render/style.js +44 -8
- package/types/index.d.ts +422 -0
package/src/core/icons.js
CHANGED
|
@@ -1,235 +1,237 @@
|
|
|
1
|
-
/** Thin-stroke icon set (Lucide grammar, stroke 1.5), ported path-for-path from the original prototype. */
|
|
2
|
-
const ICONS = {
|
|
3
|
-
text: ['M4 6h16', 'M4 12h12', 'M4 18h9'],
|
|
4
|
-
image: [['rect', 3, 4, 18, 16], ['circle', 8.5, 9.5, 1.5], 'M3 17l5-5 4 4 3-3 6 6'],
|
|
5
|
-
folder: ['M3 7h7l2 2h9v10H3z', 'M3 7V5h7l2 2'],
|
|
6
|
-
button: [['rect', 3, 8, 18, 8], 'M8 12h8'],
|
|
7
|
-
divider: ['M3 12h18', 'M6 7h12', 'M6 17h12'],
|
|
8
|
-
spacer: ['M3 5h18', 'M3 19h18', 'M12 9v6', 'M9.5 11.5L12 9l2.5 2.5', 'M9.5 12.5L12 15l2.5-2.5'],
|
|
9
|
-
social: [['rect', 3, 9, 5, 6], ['rect', 9.5, 9, 5, 6], ['rect', 16, 9, 5, 6]],
|
|
10
|
-
video: [['rect', 3, 5, 18, 14], 'M10 9.5l5 2.5-5 2.5z'],
|
|
11
|
-
html: ['M9 8l-4 4 4 4', 'M15 8l4 4-4 4'],
|
|
12
|
-
product: [['rect', 3, 6, 18, 14], 'M3 11h18', 'M9 6v5'],
|
|
13
|
-
countdown: [['circle', 12, 13, 8], 'M12 9.5V13l2.5 1.5', 'M9 3h6'],
|
|
14
|
-
menu: [['rect', 3, 4, 18, 5], 'M6 14h5', 'M13 14h5', 'M6 18h12'],
|
|
15
|
-
grip: [['circle', 9, 7, 1], ['circle', 15, 7, 1], ['circle', 9, 12, 1], ['circle', 15, 12, 1], ['circle', 9, 17, 1], ['circle', 15, 17, 1]],
|
|
16
|
-
move: ['M12 3v18', 'M3 12h18', 'M9.5 5.5L12 3l2.5 2.5', 'M9.5 18.5L12 21l2.5-2.5', 'M5.5 9.5L3 12l2.5 2.5', 'M18.5 9.5L21 12l-2.5 2.5'],
|
|
17
|
-
sliders: ['M4 7h9', 'M19 7h1', ['circle', 16, 7, 2.2], 'M4 17h3', 'M13 17h7', ['circle', 10, 17, 2.2]],
|
|
18
|
-
footer: [['rect', 3, 4, 18, 16], 'M3 15h18', 'M7 19h6'],
|
|
19
|
-
up: ['M12 19V5', 'M6 11l6-6 6 6'],
|
|
20
|
-
down: ['M12 5v14', 'M6 13l6 6 6-6'],
|
|
21
|
-
copy: [['rect', 9, 9, 12, 12], 'M15 5H5a2 2 0 0 0-2 2v10'],
|
|
22
|
-
trash: ['M4 7h16', 'M9 7V5h6v2', 'M6 7l1 12h10l1-12'],
|
|
23
|
-
undo: ['M3 8h11a5 5 0 0 1 0 10H8', 'M7 4L3 8l4 4'],
|
|
24
|
-
redo: ['M21 8H10a5 5 0 0 0 0 10h6', 'M17 4l4 4-4 4'],
|
|
25
|
-
eye: ['M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6z', ['circle', 12, 12, 3]],
|
|
26
|
-
monitor: [['rect', 3, 4, 18, 13], 'M8 21h8', 'M12 17v4'],
|
|
27
|
-
phone: [['rect', 7, 2, 10, 20], 'M10.5 5h3', 'M11.5 19h1'],
|
|
28
|
-
download: ['M12 4v11', 'M7.5 11L12 15.5 16.5 11', 'M4 20h16'],
|
|
29
|
-
upload: ['M12 20V9', 'M7.5 13.5L12 9l4.5 4.5', 'M4 4h16'],
|
|
30
|
-
moon: ['M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'],
|
|
31
|
-
sun: [['circle', 12, 12, 4.2], 'M12 3v2', 'M12 19v2', 'M3 12h2', 'M19 12h2', 'M5.6 5.6l1.4 1.4', 'M17 17l1.4 1.4', 'M18.4 5.6L17 7', 'M7 17l-1.4 1.4'],
|
|
32
|
-
spark: ['M12 4l1.7 4.8L18.5 10.5l-4.8 1.7L12 17l-1.7-4.8L5.5 10.5l4.8-1.7z', 'M18 17l.8 2.2L21 20l-2.2.8L18 23l-.8-2.2L15 20l2.2-.8z'],
|
|
33
|
-
code: ['M8 7l-5 5 5 5', 'M16 7l5 5-5 5', 'M13 5l-2 14'],
|
|
34
|
-
bold: ['M7 5h6a3.5 3.5 0 0 1 0 7H7z', 'M7 12h7a3.5 3.5 0 0 1 0 7H7z'],
|
|
35
|
-
italic: ['M15 5h-4', 'M13 19H9', 'M14 5l-3 14'],
|
|
36
|
-
underline: ['M7 4v7a5 5 0 0 0 10 0V4', 'M6 20h12'],
|
|
37
|
-
strike: ['M4 12h16', 'M8 7a4 3 0 0 1 8 0', 'M8 16a4 3 0 0 0 8 0'],
|
|
38
|
-
link: ['M10 13a4 4 0 0 0 6 .5l2-2a4 4 0 0 0-5.5-5.5l-1 1', 'M14 11a4 4 0 0 0-6-.5l-2 2A4 4 0 0 0 11.5 18l1-1'],
|
|
39
|
-
list: ['M9 6h11', 'M9 12h11', 'M9 18h11', 'M4.5 6h.6', 'M4.5 12h.6', 'M4.5 18h.6'],
|
|
40
|
-
clear: ['M6 6l12 12', 'M18 6L6 18'],
|
|
41
|
-
tag: ['M4 8h4', 'M4 16h4', 'M20 8h-4', 'M20 16h-4', 'M10 5l4 14'],
|
|
42
|
-
play: ['M8 5.5l10 6.5-10 6.5z'],
|
|
43
|
-
pause: ['M9.5 5v14', 'M14.5 5v14'],
|
|
44
|
-
refresh: ['M20 11a8 8 0 1 0-2.3 6.3', 'M20 5v6h-6'],
|
|
45
|
-
check: ['M4 12.5l5 5L20 7'],
|
|
46
|
-
plus: ['M12 5v14', 'M5 12h14'],
|
|
47
|
-
minus: ['M5 12h14'],
|
|
48
|
-
superscript: ['M4 18 9 6l5 12', 'M6 14h6', 'M16 5h4l-4 5h4'],
|
|
49
|
-
subscript: ['M4 16 9 4l5 12', 'M6 12h6', 'M16 15h4l-4 5h4'],
|
|
50
|
-
typeColor: ['M5 18 11 5h2l6 13', 'M7.5 13h9', 'M4 21h16'],
|
|
51
|
-
highlighter: ['M7 15 16 6l3 3-9 9z', 'M5 17l2 2', 'M4 21h16'],
|
|
52
|
-
eraser: ['M4 16 13 7l5 5-8 8H6z', 'M12 20h8'],
|
|
53
|
-
formatClear: ['M5 18 11 5h2l4 9', 'M7.5 13h7', 'M16 17l5 5', 'M21 17l-5 5'],
|
|
54
|
-
chevronDown: ['M7 9l5 5 5-5'],
|
|
55
|
-
x: ['M4 4l16 16', 'M20 4L4 20'],
|
|
56
|
-
instagram: [['rect', 3, 3, 18, 18], ['circle', 12, 12, 4], ['circle', 17, 7, 0.9]],
|
|
57
|
-
linkedin: [['rect', 3, 3, 18, 18], 'M8 10v7', ['circle', 8, 7.2, 0.9], 'M12 17v-4a2.5 2.5 0 0 1 5 0v4'],
|
|
58
|
-
facebook: [['rect', 3, 3, 18, 18], 'M15 8h-1.5A2.5 2.5 0 0 0 11 10.5V21', 'M8.5 13h5'],
|
|
59
|
-
youtube: [['rect', 2.5, 6, 19, 12], 'M11 10l4 2-4 2z'],
|
|
60
|
-
mail: [['rect', 3, 5, 18, 14], 'M3 7l9 6 9-6'],
|
|
61
|
-
mailSpark: [['rect', 3, 6, 16, 12], 'M4 8l7 5 7-5', 'M21 3v4', 'M19 5h4'],
|
|
62
|
-
globe: [['circle', 12, 12, 9], 'M3 12h18', 'M12 3a15 15 0 0 1 0 18', 'M12 3a15 15 0 0 0 0 18'],
|
|
63
|
-
heading: ['M6 5v14', 'M18 5v14', 'M6 12h12'],
|
|
64
|
-
quote: [['rect', 4, 6, 5, 5], ['rect', 15, 6, 5, 5], 'M9 11c0 4-1.7 5.7-5 6.4', 'M20 11c0 4-1.7 5.7-5 6.4'],
|
|
65
|
-
table: [['rect', 3, 4, 18, 16], 'M3 9h18', 'M3 14.5h18', 'M9 9v11', 'M15 9v11'],
|
|
66
|
-
card: [['rect', 3, 4, 18, 16], 'M3 12h18', 'M7 16h8'],
|
|
67
|
-
hero: [['rect', 3, 4, 18, 16], 'M6 11h12', 'M6 15h6', ['rect', 14.5, 13.5, 4, 3]],
|
|
68
|
-
stats: ['M5 19v-7', 'M12 19V5', 'M19 19v-4', 'M3 19h18'],
|
|
69
|
-
gallery: [['rect', 3, 4, 7.5, 7.5], ['rect', 13.5, 4, 7.5, 7.5], ['rect', 3, 12.5, 7.5, 7.5], ['rect', 13.5, 12.5, 7.5, 7.5]],
|
|
70
|
-
embed: [['rect', 2.5, 5, 19, 14], 'M2.5 9h19', 'M10.5 11.5l3.5 2-3.5 2z'],
|
|
71
|
-
css: ['M5 4h14l-1.5 15L12 21l-5.5-2z', 'M8.5 9h7', 'M9 13h5'],
|
|
72
|
-
codeblock: [['rect', 3, 4, 18, 16], 'M9.5 10l-2 2 2 2', 'M14.5 10l2 2-2 2'],
|
|
73
|
-
data: ['M4 6c0-1.7 3.6-3 8-3s8 1.3 8 3-3.6 3-8 3-8-1.3-8-3z', 'M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6', 'M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
svg.
|
|
157
|
-
svg.setAttribute('
|
|
158
|
-
svg.setAttribute('
|
|
159
|
-
svg.setAttribute('
|
|
160
|
-
svg.setAttribute('
|
|
161
|
-
svg.setAttribute('stroke
|
|
162
|
-
svg.setAttribute('stroke-
|
|
163
|
-
svg.
|
|
164
|
-
svg.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
|
|
175
|
-
export
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
svg.
|
|
181
|
-
svg.setAttribute('
|
|
182
|
-
svg.setAttribute('
|
|
183
|
-
svg.
|
|
184
|
-
svg.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
r.
|
|
203
|
-
r.setAttribute('
|
|
204
|
-
r.setAttribute('
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
c.
|
|
211
|
-
c.setAttribute('
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (l.includes('
|
|
220
|
-
if (l.includes('
|
|
221
|
-
if (l
|
|
222
|
-
if (l.includes('
|
|
223
|
-
if (l.includes('
|
|
224
|
-
if (l.includes('
|
|
225
|
-
if (l.includes('
|
|
226
|
-
if (l.includes('
|
|
227
|
-
if (l.includes('
|
|
228
|
-
if (l.includes('
|
|
229
|
-
if (l.includes('
|
|
230
|
-
if (l.includes('
|
|
231
|
-
if (l.includes('
|
|
232
|
-
if (l.includes('
|
|
233
|
-
if (l.includes('
|
|
234
|
-
return '
|
|
235
|
-
|
|
1
|
+
/** Thin-stroke icon set (Lucide grammar, stroke 1.5), ported path-for-path from the original prototype. */
|
|
2
|
+
const ICONS = {
|
|
3
|
+
text: ['M4 6h16', 'M4 12h12', 'M4 18h9'],
|
|
4
|
+
image: [['rect', 3, 4, 18, 16], ['circle', 8.5, 9.5, 1.5], 'M3 17l5-5 4 4 3-3 6 6'],
|
|
5
|
+
folder: ['M3 7h7l2 2h9v10H3z', 'M3 7V5h7l2 2'],
|
|
6
|
+
button: [['rect', 3, 8, 18, 8], 'M8 12h8'],
|
|
7
|
+
divider: ['M3 12h18', 'M6 7h12', 'M6 17h12'],
|
|
8
|
+
spacer: ['M3 5h18', 'M3 19h18', 'M12 9v6', 'M9.5 11.5L12 9l2.5 2.5', 'M9.5 12.5L12 15l2.5-2.5'],
|
|
9
|
+
social: [['rect', 3, 9, 5, 6], ['rect', 9.5, 9, 5, 6], ['rect', 16, 9, 5, 6]],
|
|
10
|
+
video: [['rect', 3, 5, 18, 14], 'M10 9.5l5 2.5-5 2.5z'],
|
|
11
|
+
html: ['M9 8l-4 4 4 4', 'M15 8l4 4-4 4'],
|
|
12
|
+
product: [['rect', 3, 6, 18, 14], 'M3 11h18', 'M9 6v5'],
|
|
13
|
+
countdown: [['circle', 12, 13, 8], 'M12 9.5V13l2.5 1.5', 'M9 3h6'],
|
|
14
|
+
menu: [['rect', 3, 4, 18, 5], 'M6 14h5', 'M13 14h5', 'M6 18h12'],
|
|
15
|
+
grip: [['circle', 9, 7, 1], ['circle', 15, 7, 1], ['circle', 9, 12, 1], ['circle', 15, 12, 1], ['circle', 9, 17, 1], ['circle', 15, 17, 1]],
|
|
16
|
+
move: ['M12 3v18', 'M3 12h18', 'M9.5 5.5L12 3l2.5 2.5', 'M9.5 18.5L12 21l2.5-2.5', 'M5.5 9.5L3 12l2.5 2.5', 'M18.5 9.5L21 12l-2.5 2.5'],
|
|
17
|
+
sliders: ['M4 7h9', 'M19 7h1', ['circle', 16, 7, 2.2], 'M4 17h3', 'M13 17h7', ['circle', 10, 17, 2.2]],
|
|
18
|
+
footer: [['rect', 3, 4, 18, 16], 'M3 15h18', 'M7 19h6'],
|
|
19
|
+
up: ['M12 19V5', 'M6 11l6-6 6 6'],
|
|
20
|
+
down: ['M12 5v14', 'M6 13l6 6 6-6'],
|
|
21
|
+
copy: [['rect', 9, 9, 12, 12], 'M15 5H5a2 2 0 0 0-2 2v10'],
|
|
22
|
+
trash: ['M4 7h16', 'M9 7V5h6v2', 'M6 7l1 12h10l1-12'],
|
|
23
|
+
undo: ['M3 8h11a5 5 0 0 1 0 10H8', 'M7 4L3 8l4 4'],
|
|
24
|
+
redo: ['M21 8H10a5 5 0 0 0 0 10h6', 'M17 4l4 4-4 4'],
|
|
25
|
+
eye: ['M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6z', ['circle', 12, 12, 3]],
|
|
26
|
+
monitor: [['rect', 3, 4, 18, 13], 'M8 21h8', 'M12 17v4'],
|
|
27
|
+
phone: [['rect', 7, 2, 10, 20], 'M10.5 5h3', 'M11.5 19h1'],
|
|
28
|
+
download: ['M12 4v11', 'M7.5 11L12 15.5 16.5 11', 'M4 20h16'],
|
|
29
|
+
upload: ['M12 20V9', 'M7.5 13.5L12 9l4.5 4.5', 'M4 4h16'],
|
|
30
|
+
moon: ['M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'],
|
|
31
|
+
sun: [['circle', 12, 12, 4.2], 'M12 3v2', 'M12 19v2', 'M3 12h2', 'M19 12h2', 'M5.6 5.6l1.4 1.4', 'M17 17l1.4 1.4', 'M18.4 5.6L17 7', 'M7 17l-1.4 1.4'],
|
|
32
|
+
spark: ['M12 4l1.7 4.8L18.5 10.5l-4.8 1.7L12 17l-1.7-4.8L5.5 10.5l4.8-1.7z', 'M18 17l.8 2.2L21 20l-2.2.8L18 23l-.8-2.2L15 20l2.2-.8z'],
|
|
33
|
+
code: ['M8 7l-5 5 5 5', 'M16 7l5 5-5 5', 'M13 5l-2 14'],
|
|
34
|
+
bold: ['M7 5h6a3.5 3.5 0 0 1 0 7H7z', 'M7 12h7a3.5 3.5 0 0 1 0 7H7z'],
|
|
35
|
+
italic: ['M15 5h-4', 'M13 19H9', 'M14 5l-3 14'],
|
|
36
|
+
underline: ['M7 4v7a5 5 0 0 0 10 0V4', 'M6 20h12'],
|
|
37
|
+
strike: ['M4 12h16', 'M8 7a4 3 0 0 1 8 0', 'M8 16a4 3 0 0 0 8 0'],
|
|
38
|
+
link: ['M10 13a4 4 0 0 0 6 .5l2-2a4 4 0 0 0-5.5-5.5l-1 1', 'M14 11a4 4 0 0 0-6-.5l-2 2A4 4 0 0 0 11.5 18l1-1'],
|
|
39
|
+
list: ['M9 6h11', 'M9 12h11', 'M9 18h11', 'M4.5 6h.6', 'M4.5 12h.6', 'M4.5 18h.6'],
|
|
40
|
+
clear: ['M6 6l12 12', 'M18 6L6 18'],
|
|
41
|
+
tag: ['M4 8h4', 'M4 16h4', 'M20 8h-4', 'M20 16h-4', 'M10 5l4 14'],
|
|
42
|
+
play: ['M8 5.5l10 6.5-10 6.5z'],
|
|
43
|
+
pause: ['M9.5 5v14', 'M14.5 5v14'],
|
|
44
|
+
refresh: ['M20 11a8 8 0 1 0-2.3 6.3', 'M20 5v6h-6'],
|
|
45
|
+
check: ['M4 12.5l5 5L20 7'],
|
|
46
|
+
plus: ['M12 5v14', 'M5 12h14'],
|
|
47
|
+
minus: ['M5 12h14'],
|
|
48
|
+
superscript: ['M4 18 9 6l5 12', 'M6 14h6', 'M16 5h4l-4 5h4'],
|
|
49
|
+
subscript: ['M4 16 9 4l5 12', 'M6 12h6', 'M16 15h4l-4 5h4'],
|
|
50
|
+
typeColor: ['M5 18 11 5h2l6 13', 'M7.5 13h9', 'M4 21h16'],
|
|
51
|
+
highlighter: ['M7 15 16 6l3 3-9 9z', 'M5 17l2 2', 'M4 21h16'],
|
|
52
|
+
eraser: ['M4 16 13 7l5 5-8 8H6z', 'M12 20h8'],
|
|
53
|
+
formatClear: ['M5 18 11 5h2l4 9', 'M7.5 13h7', 'M16 17l5 5', 'M21 17l-5 5'],
|
|
54
|
+
chevronDown: ['M7 9l5 5 5-5'],
|
|
55
|
+
x: ['M4 4l16 16', 'M20 4L4 20'],
|
|
56
|
+
instagram: [['rect', 3, 3, 18, 18], ['circle', 12, 12, 4], ['circle', 17, 7, 0.9]],
|
|
57
|
+
linkedin: [['rect', 3, 3, 18, 18], 'M8 10v7', ['circle', 8, 7.2, 0.9], 'M12 17v-4a2.5 2.5 0 0 1 5 0v4'],
|
|
58
|
+
facebook: [['rect', 3, 3, 18, 18], 'M15 8h-1.5A2.5 2.5 0 0 0 11 10.5V21', 'M8.5 13h5'],
|
|
59
|
+
youtube: [['rect', 2.5, 6, 19, 12], 'M11 10l4 2-4 2z'],
|
|
60
|
+
mail: [['rect', 3, 5, 18, 14], 'M3 7l9 6 9-6'],
|
|
61
|
+
mailSpark: [['rect', 3, 6, 16, 12], 'M4 8l7 5 7-5', 'M21 3v4', 'M19 5h4'],
|
|
62
|
+
globe: [['circle', 12, 12, 9], 'M3 12h18', 'M12 3a15 15 0 0 1 0 18', 'M12 3a15 15 0 0 0 0 18'],
|
|
63
|
+
heading: ['M6 5v14', 'M18 5v14', 'M6 12h12'],
|
|
64
|
+
quote: [['rect', 4, 6, 5, 5], ['rect', 15, 6, 5, 5], 'M9 11c0 4-1.7 5.7-5 6.4', 'M20 11c0 4-1.7 5.7-5 6.4'],
|
|
65
|
+
table: [['rect', 3, 4, 18, 16], 'M3 9h18', 'M3 14.5h18', 'M9 9v11', 'M15 9v11'],
|
|
66
|
+
card: [['rect', 3, 4, 18, 16], 'M3 12h18', 'M7 16h8'],
|
|
67
|
+
hero: [['rect', 3, 4, 18, 16], 'M6 11h12', 'M6 15h6', ['rect', 14.5, 13.5, 4, 3]],
|
|
68
|
+
stats: ['M5 19v-7', 'M12 19V5', 'M19 19v-4', 'M3 19h18'],
|
|
69
|
+
gallery: [['rect', 3, 4, 7.5, 7.5], ['rect', 13.5, 4, 7.5, 7.5], ['rect', 3, 12.5, 7.5, 7.5], ['rect', 13.5, 12.5, 7.5, 7.5]],
|
|
70
|
+
embed: [['rect', 2.5, 5, 19, 14], 'M2.5 9h19', 'M10.5 11.5l3.5 2-3.5 2z'],
|
|
71
|
+
css: ['M5 4h14l-1.5 15L12 21l-5.5-2z', 'M8.5 9h7', 'M9 13h5'],
|
|
72
|
+
codeblock: [['rect', 3, 4, 18, 16], 'M9.5 10l-2 2 2 2', 'M14.5 10l2 2-2 2'],
|
|
73
|
+
data: ['M4 6c0-1.7 3.6-3 8-3s8 1.3 8 3-3.6 3-8 3-8-1.3-8-3z', 'M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6', 'M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'],
|
|
74
|
+
condition: ['M12 4v5', 'M12 9c0 4-5.5 3-5.5 9', 'M12 9c0 4 5.5 3 5.5 9', 'M4.5 15.5L6.5 18l2-2.5', 'M15.5 15.5l2 2.5 2-2.5'],
|
|
75
|
+
loop: ['M17 3l4 4-4 4', 'M3 11V9a2 2 0 0 1 2-2h16', 'M7 21l-4-4 4-4', 'M21 13v2a2 2 0 0 1-2 2H3'],
|
|
76
|
+
box: [['rect', 3, 4, 18, 16], ['rect', 7, 8, 10, 8]],
|
|
77
|
+
grid: [['rect', 3, 5, 8, 14], ['rect', 13, 5, 8, 14]],
|
|
78
|
+
svg: ['M4 19L10 5l4 9 2-3 4 8z', ['circle', 7.5, 7.5, 2]],
|
|
79
|
+
form: [['rect', 3, 5, 18, 5], ['rect', 3, 13, 11, 5], 'M17 15.5h4'],
|
|
80
|
+
script: ['M9 5H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h3', 'M15 5h3a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-3', 'M13 8l-2 8'],
|
|
81
|
+
anchor: [['circle', 12, 6, 2.5], 'M12 8.5V20', 'M5 14a7 7 0 0 0 14 0'],
|
|
82
|
+
paint: ['M5 11V6a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5H5z', 'M5 11h13', 'M11 11v4', 'M9 15h4v5H9z'],
|
|
83
|
+
alignLeft: ['M4 6h16', 'M4 12h10', 'M4 18h13'],
|
|
84
|
+
alignCenter: ['M4 6h16', 'M7 12h10', 'M6 18h12'],
|
|
85
|
+
alignRight: ['M4 6h16', 'M10 12h10', 'M7 18h13'],
|
|
86
|
+
alignJustify: ['M4 6h16', 'M4 12h16', 'M4 18h16'],
|
|
87
|
+
listOrdered: ['M9 6h11', 'M9 12h11', 'M9 18h11', 'M4 5.5h1.5V9', 'M4 15h2v3H4'],
|
|
88
|
+
indent: ['M11 6h9', 'M11 12h9', 'M11 18h9', 'M4 9l3 3-3 3'],
|
|
89
|
+
outdent: ['M11 6h9', 'M11 12h9', 'M11 18h9', 'M7 9l-3 3 3 3'],
|
|
90
|
+
unlink: ['M10 13a4 4 0 0 0 4.6 1.4', 'M14 11a4 4 0 0 0-4.6-1.4', 'M4 4l16 16'],
|
|
91
|
+
inlineCode: ['M8.5 9l-3 3 3 3', 'M15.5 9l3 3-3 3'],
|
|
92
|
+
tiktok: [['circle', 9, 16, 3], 'M12 16V4', 'M12 6c1.5 1.5 3 2 5 2v2'],
|
|
93
|
+
pinterest: [['circle', 12, 12, 9], 'M9 16c1-2 1.5-4 2-7a2.2 2.2 0 1 1 4.4 0.3c-0.2 2-1.4 3.7-3.4 3.7'],
|
|
94
|
+
snapchat: ['M12 4c3 0 5 2.2 5 5.2 0 1 0.2 2 0.8 2.6 0.6 0.6 1.2 0.8 1.2 1.4 0 0.8-1 1-1.8 1.2-0.2 1 0.4 1.6 1.4 1.8-0.2 0.8-1.4 1-2.2 1-0.6 1.6-2 2.6-4.4 2.6s-3.8-1-4.4-2.6c-0.8 0-2-0.2-2.2-1 1-0.2 1.6-0.8 1.4-1.8-0.8-0.2-1.8-0.4-1.8-1.2 0-0.6 0.6-0.8 1.2-1.4 0.6-0.6 0.8-1.6 0.8-2.6C7 6.2 9 4 12 4z'],
|
|
95
|
+
whatsapp: [['circle', 12, 12, 9], 'M8.5 15.5l0.8-2.8a5 5 0 1 1 2.9 2.6z'],
|
|
96
|
+
threads: ['M8 8c-2 1-3 3-3 5.5 0 3.5 2.5 5.5 6 5.5 3 0 5-1.5 5-4 0-1.8-1.2-3-3-3.3 1.3-0.3 2.2-1.2 2.2-2.5 0-1.8-1.7-3-4-3-2 0-3.3 0.8-4 2'],
|
|
97
|
+
discord: ['M7 8c3-1.3 7-1.3 10 0', 'M6 9c-1.5 3-2 6-1.5 8.5 1.8 1.3 3.5 2 3.5 2l1-1.7c-0.6-0.2-1.2-0.5-1.7-0.8', 'M18 9c1.5 3 2 6 1.5 8.5-1.8 1.3-3.5 2-3.5 2l-1-1.7c0.6-0.2 1.2-0.5 1.7-0.8', ['circle', 9, 13, 1.1], ['circle', 15, 13, 1.1]],
|
|
98
|
+
telegram: [['circle', 12, 12, 9], 'M7.5 12.3l9-4.3-3 9-2.3-3.2-2 1.7-0.2-2.7z'],
|
|
99
|
+
reddit: [['circle', 12, 14, 6], 'M12 8V5', ['circle', 12, 4.3, 0.9], ['circle', 9.5, 14, 1], ['circle', 14.5, 14, 1], 'M9 17c1 1 5 1 6 0'],
|
|
100
|
+
spotify: [['circle', 12, 12, 9], 'M7.5 10c3-1 6-1 9 0', 'M7.8 13c2.5-0.8 5-0.8 7.5 0', 'M8.2 16c2-0.6 4-0.6 6 0'],
|
|
101
|
+
behance: ['M4 7h6a2.5 2.5 0 0 1 0 5H4z', 'M4 12h6.5a2.7 2.7 0 0 1 0 5.4H4z', 'M14 12a4 4 0 0 1 8 0', 'M14 14h8', 'M15.5 9h5'],
|
|
102
|
+
dribbble: [['circle', 12, 12, 9], 'M4 10c4 1.2 12 1.2 16.5 0', 'M8.5 4.5c2.5 3 5 8.5 5 14.5', 'M9 20c2-4 7-6 11.5-5'],
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Official brand glyphs (Simple Icons, CC0), rendered as filled paths --
|
|
107
|
+
* the hand-drawn stroke approximations they replace read as amateur at
|
|
108
|
+
* social-strip sizes. Kept separate from ICONS because these render
|
|
109
|
+
* fill-based (icon() is a stroke builder) and because the key 'x' must not
|
|
110
|
+
* shadow the ✕ close icon; resolve through brandIcon(), never icon().
|
|
111
|
+
*/
|
|
112
|
+
const BRAND_GLYPHS = {
|
|
113
|
+
behance: 'M16.969 16.927a2.561 2.561 0 0 0 1.901.677 2.501 2.501 0 0 0 1.531-.475c.362-.235.636-.584.779-.99h2.585a5.091 5.091 0 0 1-1.9 2.896 5.292 5.292 0 0 1-3.091.88 5.839 5.839 0 0 1-2.284-.433 4.871 4.871 0 0 1-1.723-1.211 5.657 5.657 0 0 1-1.08-1.874 7.057 7.057 0 0 1-.383-2.393c-.005-.8.129-1.595.396-2.349a5.313 5.313 0 0 1 5.088-3.604 4.87 4.87 0 0 1 2.376.563c.661.362 1.231.87 1.668 1.485a6.2 6.2 0 0 1 .943 2.133c.194.821.263 1.666.205 2.508h-7.699c-.063.79.184 1.574.688 2.187ZM6.947 4.084a8.065 8.065 0 0 1 1.928.198 4.29 4.29 0 0 1 1.49.638c.418.303.748.711.958 1.182.241.579.357 1.203.341 1.83a3.506 3.506 0 0 1-.506 1.961 3.726 3.726 0 0 1-1.503 1.287 3.588 3.588 0 0 1 2.027 1.437c.464.747.697 1.615.67 2.494a4.593 4.593 0 0 1-.423 2.032 3.945 3.945 0 0 1-1.163 1.413 5.114 5.114 0 0 1-1.683.807 7.135 7.135 0 0 1-1.928.259H0V4.084h6.947Zm-.235 12.9c.308.004.616-.029.916-.099a2.18 2.18 0 0 0 .766-.332c.228-.158.411-.371.534-.619.142-.317.208-.663.191-1.009a2.08 2.08 0 0 0-.642-1.715 2.618 2.618 0 0 0-1.696-.505h-3.54v4.279h3.471Zm13.635-5.967a2.13 2.13 0 0 0-1.654-.619 2.336 2.336 0 0 0-1.163.259 2.474 2.474 0 0 0-.738.62 2.359 2.359 0 0 0-.396.792c-.074.239-.12.485-.137.734h4.769a3.239 3.239 0 0 0-.679-1.785l-.002-.001Zm-13.813-.648a2.254 2.254 0 0 0 1.423-.433c.399-.355.607-.88.56-1.413a1.916 1.916 0 0 0-.178-.891 1.298 1.298 0 0 0-.495-.533 1.851 1.851 0 0 0-.711-.274 3.966 3.966 0 0 0-.835-.073H3.241v3.631h3.293v-.014ZM21.62 5.122h-5.976v1.527h5.976V5.122Z',
|
|
114
|
+
discord: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
|
|
115
|
+
dribbble: 'M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.395-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z',
|
|
116
|
+
facebook: 'M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z',
|
|
117
|
+
instagram: 'M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077',
|
|
118
|
+
linkedin: 'M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z',
|
|
119
|
+
pinterest: 'M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z',
|
|
120
|
+
reddit: 'M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z',
|
|
121
|
+
snapchat: 'M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12 1.033-.301.165-.088.344-.104.464-.104.182 0 .359.029.509.09.45.149.734.479.734.838.015.449-.39.839-1.213 1.168-.089.029-.209.075-.344.119-.45.135-1.139.36-1.333.81-.09.224-.061.524.12.868l.015.015c.06.136 1.526 3.475 4.791 4.014.255.044.435.27.42.509 0 .075-.015.149-.045.225-.24.569-1.273.988-3.146 1.271-.059.091-.12.375-.164.57-.029.179-.074.36-.134.553-.076.271-.27.405-.555.405h-.03c-.135 0-.313-.031-.538-.074-.36-.075-.765-.135-1.273-.135-.3 0-.599.015-.913.074-.6.104-1.123.464-1.723.884-.853.599-1.826 1.288-3.294 1.288-.06 0-.119-.015-.18-.015h-.149c-1.468 0-2.427-.675-3.279-1.288-.599-.42-1.107-.779-1.707-.884-.314-.045-.629-.074-.928-.074-.54 0-.958.089-1.272.149-.211.043-.391.074-.54.074-.374 0-.523-.224-.583-.42-.061-.192-.09-.389-.135-.567-.046-.181-.105-.494-.166-.57-1.918-.222-2.95-.642-3.189-1.226-.031-.063-.052-.15-.055-.225-.015-.243.165-.465.42-.509 3.264-.54 4.73-3.879 4.791-4.02l.016-.029c.18-.345.224-.645.119-.869-.195-.434-.884-.658-1.332-.809-.121-.029-.24-.074-.346-.119-1.107-.435-1.257-.93-1.197-1.273.09-.479.674-.793 1.168-.793.146 0 .27.029.383.074.42.194.789.3 1.104.3.234 0 .384-.06.465-.105l-.046-.569c-.098-1.626-.225-3.651.307-4.837C7.392 1.077 10.739.807 11.727.807l.419-.015h.06z',
|
|
122
|
+
spotify: 'M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z',
|
|
123
|
+
telegram: 'M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z',
|
|
124
|
+
threads: 'M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.964-.065-1.19.408-2.285 1.33-3.082.88-.76 2.119-1.207 3.583-1.291a13.853 13.853 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32L7.734 7.847c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388.108.046.216.094.321.142 1.49.7 2.58 1.761 3.154 3.07.797 1.82.871 4.79-1.548 7.158-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69c-.242 0-.487.007-.739.021-1.836.103-2.98.946-2.916 2.143.067 1.256 1.452 1.839 2.784 1.767 1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221z',
|
|
125
|
+
tiktok: 'M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z',
|
|
126
|
+
whatsapp: 'M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z',
|
|
127
|
+
x: 'M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z',
|
|
128
|
+
youtube: 'M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z',
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** One representative brand hex per platform, for the social block's "Brand" palette mode. Flat approximations, not exact brand-guideline swatches. */
|
|
132
|
+
export const SOCIAL_BRAND = {
|
|
133
|
+
instagram: '#E1306C', facebook: '#1877F2', linkedin: '#0A66C2', youtube: '#FF0000',
|
|
134
|
+
x: '#0F1419', mail: '#6B6F73', globe: '#6B6F73',
|
|
135
|
+
tiktok: '#111111', pinterest: '#E60023', snapchat: '#FFFC00', whatsapp: '#25D366',
|
|
136
|
+
threads: '#101010', discord: '#5865F2', telegram: '#26A5E4', reddit: '#FF4500',
|
|
137
|
+
spotify: '#1DB954', behance: '#1769FF', dribbble: '#EA4C89',
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/** Perceived-luminance black/white pick for text or an icon drawn on top of a `hex` fill -- keeps brand-colored badges (some of which are very light, e.g. Snapchat yellow) legible without a per-platform ink override table. */
|
|
141
|
+
export function contrastInk(hex) {
|
|
142
|
+
const h = String(hex || '').replace('#', '');
|
|
143
|
+
const n = h.length === 3 ? h.split('').map((c) => c + c).join('') : h.padEnd(6, '0');
|
|
144
|
+
const r = parseInt(n.slice(0, 2), 16) || 0;
|
|
145
|
+
const g = parseInt(n.slice(2, 4), 16) || 0;
|
|
146
|
+
const b = parseInt(n.slice(4, 6), 16) || 0;
|
|
147
|
+
const luma = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
148
|
+
return luma > 0.6 ? '#14171a' : '#ffffff';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
152
|
+
|
|
153
|
+
/** Builds an SVG element for `name` at `size` (default 18), matching the original's stroke-1.5 style. */
|
|
154
|
+
export function icon(name, size) {
|
|
155
|
+
const shapes = ICONS[name] || ICONS.globe;
|
|
156
|
+
const svg = document.createElementNS(SVG_NS, 'svg');
|
|
157
|
+
svg.setAttribute('width', String(size || 18));
|
|
158
|
+
svg.setAttribute('height', String(size || 18));
|
|
159
|
+
svg.setAttribute('viewBox', '0 0 24 24');
|
|
160
|
+
svg.setAttribute('fill', 'none');
|
|
161
|
+
svg.setAttribute('stroke', 'currentColor');
|
|
162
|
+
svg.setAttribute('stroke-width', '1.5');
|
|
163
|
+
svg.setAttribute('stroke-linecap', 'round');
|
|
164
|
+
svg.setAttribute('stroke-linejoin', 'round');
|
|
165
|
+
svg.style.display = 'block';
|
|
166
|
+
svg.style.flex = 'none';
|
|
167
|
+
shapes.forEach((shape) => svg.appendChild(shapeNode(shape)));
|
|
168
|
+
return svg;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Social-platform icon: the official filled brand glyph when we have one,
|
|
173
|
+
* falling back to the stroke set (mail, globe, link, unknown labels).
|
|
174
|
+
* Fill inherits currentColor exactly like the stroke icons, so the social
|
|
175
|
+
* block's palette/contrast logic and the export round-trip are unchanged.
|
|
176
|
+
*/
|
|
177
|
+
export function brandIcon(name, size) {
|
|
178
|
+
const d = BRAND_GLYPHS[name];
|
|
179
|
+
if (!d) return icon(name, size);
|
|
180
|
+
const svg = document.createElementNS(SVG_NS, 'svg');
|
|
181
|
+
svg.setAttribute('width', String(size || 18));
|
|
182
|
+
svg.setAttribute('height', String(size || 18));
|
|
183
|
+
svg.setAttribute('viewBox', '0 0 24 24');
|
|
184
|
+
svg.setAttribute('fill', 'currentColor');
|
|
185
|
+
svg.style.display = 'block';
|
|
186
|
+
svg.style.flex = 'none';
|
|
187
|
+
const p = document.createElementNS(SVG_NS, 'path');
|
|
188
|
+
p.setAttribute('d', d);
|
|
189
|
+
svg.appendChild(p);
|
|
190
|
+
return svg;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function shapeNode(shape) {
|
|
194
|
+
if (typeof shape === 'string') {
|
|
195
|
+
const p = document.createElementNS(SVG_NS, 'path');
|
|
196
|
+
p.setAttribute('d', shape);
|
|
197
|
+
return p;
|
|
198
|
+
}
|
|
199
|
+
const [kind, ...args] = shape;
|
|
200
|
+
if (kind === 'rect') {
|
|
201
|
+
const [x, y, w, h] = args;
|
|
202
|
+
const r = document.createElementNS(SVG_NS, 'rect');
|
|
203
|
+
r.setAttribute('x', String(x));
|
|
204
|
+
r.setAttribute('y', String(y));
|
|
205
|
+
r.setAttribute('width', String(w));
|
|
206
|
+
r.setAttribute('height', String(h));
|
|
207
|
+
return r;
|
|
208
|
+
}
|
|
209
|
+
const [cx, cy, cr] = args;
|
|
210
|
+
const c = document.createElementNS(SVG_NS, 'circle');
|
|
211
|
+
c.setAttribute('cx', String(cx));
|
|
212
|
+
c.setAttribute('cy', String(cy));
|
|
213
|
+
c.setAttribute('r', String(cr));
|
|
214
|
+
return c;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function socialKey(label) {
|
|
218
|
+
const l = String(label || '').toLowerCase();
|
|
219
|
+
if (l.includes('insta')) return 'instagram';
|
|
220
|
+
if (l.includes('linked')) return 'linkedin';
|
|
221
|
+
if (l.includes('face')) return 'facebook';
|
|
222
|
+
if (l.includes('you') || l.includes('tube')) return 'youtube';
|
|
223
|
+
if (l === 'x' || l.includes('twitter')) return 'x';
|
|
224
|
+
if (l.includes('tiktok') || l.includes('tik tok')) return 'tiktok';
|
|
225
|
+
if (l.includes('pinterest')) return 'pinterest';
|
|
226
|
+
if (l.includes('snap')) return 'snapchat';
|
|
227
|
+
if (l.includes('whatsapp')) return 'whatsapp';
|
|
228
|
+
if (l.includes('thread')) return 'threads';
|
|
229
|
+
if (l.includes('discord')) return 'discord';
|
|
230
|
+
if (l.includes('telegram')) return 'telegram';
|
|
231
|
+
if (l.includes('reddit')) return 'reddit';
|
|
232
|
+
if (l.includes('spotify')) return 'spotify';
|
|
233
|
+
if (l.includes('behance')) return 'behance';
|
|
234
|
+
if (l.includes('dribbble') || l.includes('dribble')) return 'dribbble';
|
|
235
|
+
if (l.includes('mail') || l.includes('email')) return 'mail';
|
|
236
|
+
return 'globe';
|
|
237
|
+
}
|