@jjlmoya/utils-social 1.8.0 → 1.10.0

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 (32) hide show
  1. package/package.json +7 -4
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/entries.ts +23 -0
  4. package/src/tool/redditFormatter/component.astro +0 -128
  5. package/src/tool/redditFormatter/entry.ts +30 -0
  6. package/src/tool/redditFormatter/index.ts +2 -32
  7. package/src/tool/redditFormatter/reddit-text-formatter.css +126 -0
  8. package/src/tool/safeZones/component.astro +0 -514
  9. package/src/tool/safeZones/entry.ts +30 -0
  10. package/src/tool/safeZones/index.ts +2 -32
  11. package/src/tool/safeZones/social-safe-zones.css +512 -0
  12. package/src/tool/socialImageResizer/component.astro +0 -315
  13. package/src/tool/socialImageResizer/entry.ts +30 -0
  14. package/src/tool/socialImageResizer/index.ts +2 -32
  15. package/src/tool/socialImageResizer/social-media-image-resizer.css +313 -0
  16. package/src/tool/socialValueCalculator/component.astro +0 -526
  17. package/src/tool/socialValueCalculator/entry.ts +30 -0
  18. package/src/tool/socialValueCalculator/index.ts +2 -32
  19. package/src/tool/socialValueCalculator/social-account-value-calculator.css +524 -0
  20. package/src/tool/tinderPhotoOptimizer/component.astro +0 -900
  21. package/src/tool/tinderPhotoOptimizer/entry.ts +30 -0
  22. package/src/tool/tinderPhotoOptimizer/index.ts +2 -32
  23. package/src/tool/tinderPhotoOptimizer/tinder-photo-optimizer.css +898 -0
  24. package/src/tool/youtubeThumbnail/component.astro +0 -267
  25. package/src/tool/youtubeThumbnail/entry.ts +30 -0
  26. package/src/tool/youtubeThumbnail/index.ts +2 -32
  27. package/src/tool/youtubeThumbnail/youtube-thumbnail-extractor.css +265 -0
  28. package/src/tool/youtubeThumbnailPreviewer/component.astro +0 -558
  29. package/src/tool/youtubeThumbnailPreviewer/entry.ts +46 -0
  30. package/src/tool/youtubeThumbnailPreviewer/index.ts +2 -48
  31. package/src/tool/youtubeThumbnailPreviewer/youtube-thumbnail-previewer.css +273 -0
  32. package/src/tools.ts +1 -1
@@ -150,270 +150,3 @@ const t = (ui ?? {}) as YoutubeThumbnailUI;
150
150
  init();
151
151
  </script>
152
152
 
153
- <style>
154
- .ytx-root {
155
- --bg: #fff;
156
- --bg-muted: #f8fafc;
157
- --bg-img: #f1f5f9;
158
- --text: #1e293b;
159
- --text-label: #334155;
160
- --text-muted: #64748b;
161
- --text-placeholder: #cbd5e1;
162
- --border: #e2e8f0;
163
- --paste-bg: #f1f5f9;
164
- --paste-hover: #e2e8f0;
165
- --paste-color: #64748b;
166
- --paste-hover-color: #0f172a;
167
- --error-bg: #fef2f2;
168
- --error-text: #b91c1c;
169
- --shadow: rgba(0, 0, 0, 0.08);
170
-
171
- max-width: 900px;
172
- margin: 0 auto;
173
- display: flex;
174
- flex-direction: column;
175
- gap: 2rem;
176
- }
177
-
178
- :global(.theme-dark) .ytx-root {
179
- --bg: #0f172a;
180
- --bg-muted: #020617;
181
- --bg-img: #1e293b;
182
- --text: #f1f5f9;
183
- --text-label: #cbd5e1;
184
- --text-muted: #94a3b8;
185
- --text-placeholder: #475569;
186
- --border: #1e293b;
187
- --paste-bg: #1e293b;
188
- --paste-hover: #334155;
189
- --paste-color: #94a3b8;
190
- --paste-hover-color: #f1f5f9;
191
- --error-bg: rgba(239, 68, 68, 0.1);
192
- --error-text: #fca5a5;
193
- --shadow: rgba(0, 0, 0, 0.3);
194
- }
195
-
196
- .ytx-input-panel {
197
- display: flex;
198
- flex-direction: column;
199
- gap: 0.75rem;
200
- align-items: center;
201
- }
202
-
203
- .ytx-url-container {
204
- position: relative;
205
- width: 100%;
206
- max-width: 700px;
207
- display: flex;
208
- align-items: center;
209
- background: var(--bg);
210
- border: 2px solid transparent;
211
- border-radius: 50px;
212
- box-shadow: 0 10px 40px var(--shadow);
213
- transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
214
- }
215
-
216
- .ytx-url-container:focus-within {
217
- border-color: #ef4444;
218
- box-shadow: 0 10px 40px rgba(239, 68, 68, 0.2);
219
- transform: translateY(-2px);
220
- }
221
-
222
- .ytx-search-icon {
223
- position: absolute;
224
- left: 1.5rem;
225
- width: 24px;
226
- height: 24px;
227
- color: var(--text-muted);
228
- flex-shrink: 0;
229
- }
230
-
231
- #ytx-url-input {
232
- width: 100%;
233
- padding: 1.25rem 3.5rem;
234
- padding-right: 4.5rem;
235
- font-size: 1.1rem;
236
- border: none;
237
- border-radius: 50px;
238
- background: transparent;
239
- color: var(--text);
240
- outline: none;
241
- font-weight: 500;
242
- }
243
-
244
- #ytx-url-input::placeholder {
245
- color: var(--text-placeholder);
246
- font-weight: 400;
247
- }
248
-
249
- .ytx-paste-btn {
250
- position: absolute;
251
- right: 0.5rem;
252
- width: 44px;
253
- height: 44px;
254
- border: none;
255
- border-radius: 50%;
256
- background: var(--paste-bg);
257
- color: var(--paste-color);
258
- cursor: pointer;
259
- display: flex;
260
- align-items: center;
261
- justify-content: center;
262
- transition: all 0.2s;
263
- }
264
-
265
- .ytx-paste-btn:hover {
266
- background: var(--paste-hover);
267
- color: var(--paste-hover-color);
268
- transform: scale(1.05);
269
- }
270
-
271
- .ytx-paste-btn:active { transform: scale(0.95); }
272
-
273
- .ytx-helper-text {
274
- color: var(--text-muted);
275
- font-size: 0.9rem;
276
- font-weight: 500;
277
- }
278
-
279
- .ytx-results-panel {
280
- display: flex;
281
- flex-direction: column;
282
- gap: 2rem;
283
- transition: opacity 0.4s;
284
- }
285
-
286
- .ytx-main-card {
287
- position: relative;
288
- background: var(--bg);
289
- border-radius: 20px;
290
- padding: 1rem;
291
- box-shadow: 0 10px 30px var(--shadow);
292
- display: flex;
293
- flex-direction: column;
294
- align-items: center;
295
- gap: 1.5rem;
296
- overflow: hidden;
297
- }
298
-
299
- .ytx-ribbon {
300
- position: absolute;
301
- top: 2rem;
302
- left: -2.5rem;
303
- background: #ef4444;
304
- color: white;
305
- padding: 0.5rem 3rem;
306
- font-weight: 800;
307
- font-size: 0.8rem;
308
- text-transform: uppercase;
309
- transform: rotate(-45deg);
310
- box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
311
- z-index: 10;
312
- }
313
-
314
- #ytx-main-img {
315
- width: 100%;
316
- border-radius: 12px;
317
- box-shadow: 0 5px 15px var(--shadow);
318
- display: block;
319
- background: var(--bg-muted);
320
- min-height: 300px;
321
- object-fit: cover;
322
- }
323
-
324
- .ytx-card-actions {
325
- width: 100%;
326
- display: flex;
327
- justify-content: center;
328
- }
329
-
330
- .ytx-download-btn {
331
- background: #ef4444;
332
- color: white;
333
- padding: 1rem 2rem;
334
- border-radius: 50px;
335
- border: none;
336
- font-size: 1.1rem;
337
- font-weight: 700;
338
- cursor: pointer;
339
- display: flex;
340
- align-items: center;
341
- gap: 0.75rem;
342
- transition: all 0.2s;
343
- box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
344
- }
345
-
346
- .ytx-download-btn:hover {
347
- background: #dc2626;
348
- transform: translateY(-2px);
349
- box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4);
350
- }
351
-
352
- .ytx-download-btn:active { transform: translateY(1px); }
353
-
354
- .ytx-resolutions-grid {
355
- display: grid;
356
- grid-template-columns: repeat(3, 1fr);
357
- gap: 1.5rem;
358
- }
359
-
360
- @media (max-width: 650px) {
361
- .ytx-resolutions-grid { grid-template-columns: 1fr; }
362
- }
363
-
364
- .ytx-res-card {
365
- background: var(--bg);
366
- border-radius: 16px;
367
- padding: 1rem;
368
- box-shadow: 0 4px 15px var(--shadow);
369
- display: flex;
370
- flex-direction: column;
371
- gap: 0.75rem;
372
- align-items: center;
373
- text-align: center;
374
- }
375
-
376
- .ytx-res-card img {
377
- width: 100%;
378
- border-radius: 8px;
379
- aspect-ratio: 16/9;
380
- object-fit: cover;
381
- background: var(--bg-img);
382
- }
383
-
384
- .ytx-res-label {
385
- margin: 0;
386
- font-weight: 700;
387
- color: var(--text-label);
388
- font-size: 0.95rem;
389
- }
390
-
391
- .ytx-res-card a {
392
- color: #3b82f6;
393
- text-decoration: none;
394
- font-weight: 600;
395
- font-size: 0.9rem;
396
- transition: color 0.2s;
397
- }
398
-
399
- .ytx-res-card a:hover {
400
- color: #2563eb;
401
- text-decoration: underline;
402
- }
403
-
404
- .ytx-error-panel {
405
- display: flex;
406
- align-items: center;
407
- gap: 1rem;
408
- background: var(--error-bg);
409
- border-left: 4px solid #ef4444;
410
- color: var(--error-text);
411
- padding: 1.5rem;
412
- border-radius: 12px;
413
- font-weight: 500;
414
- }
415
-
416
- .ytx-hidden {
417
- display: none;
418
- }
419
- </style>
@@ -0,0 +1,30 @@
1
+ import type { SocialToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+
4
+ import type { YoutubeThumbnailUI } from './ui';
5
+ export type YoutubeThumbnailLocaleContent = ToolLocaleContent<YoutubeThumbnailUI>;
6
+
7
+ export const youtubeThumbnail: SocialToolEntry<YoutubeThumbnailUI> = {
8
+ id: 'youtube-thumbnail-extractor',
9
+ icons: {
10
+ bg: 'mdi:youtube',
11
+ fg: 'mdi:image-search-outline',
12
+ },
13
+ i18n: {
14
+ es: () => import('./i18n/es').then((m) => m.content),
15
+ en: () => import('./i18n/en').then((m) => m.content),
16
+ fr: () => import('./i18n/fr').then((m) => m.content),
17
+ de: () => import('./i18n/de').then((m) => m.content),
18
+ id: () => import('./i18n/id').then((m) => m.content),
19
+ it: () => import('./i18n/it').then((m) => m.content),
20
+ ja: () => import('./i18n/ja').then((m) => m.content),
21
+ ko: () => import('./i18n/ko').then((m) => m.content),
22
+ nl: () => import('./i18n/nl').then((m) => m.content),
23
+ pl: () => import('./i18n/pl').then((m) => m.content),
24
+ pt: () => import('./i18n/pt').then((m) => m.content),
25
+ ru: () => import('./i18n/ru').then((m) => m.content),
26
+ sv: () => import('./i18n/sv').then((m) => m.content),
27
+ tr: () => import('./i18n/tr').then((m) => m.content),
28
+ zh: () => import('./i18n/zh').then((m) => m.content),
29
+ },
30
+ };
@@ -1,35 +1,5 @@
1
- import type { SocialToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
-
4
- import type { YoutubeThumbnailUI } from './ui';
5
- export type YoutubeThumbnailLocaleContent = ToolLocaleContent<YoutubeThumbnailUI>;
6
-
7
- export const youtubeThumbnail: SocialToolEntry<YoutubeThumbnailUI> = {
8
- id: 'youtube-thumbnail-extractor',
9
- icons: {
10
- bg: 'mdi:youtube',
11
- fg: 'mdi:image-search-outline',
12
- },
13
- i18n: {
14
- es: () => import('./i18n/es').then((m) => m.content),
15
- en: () => import('./i18n/en').then((m) => m.content),
16
- fr: () => import('./i18n/fr').then((m) => m.content),
17
- de: () => import('./i18n/de').then((m) => m.content),
18
- id: () => import('./i18n/id').then((m) => m.content),
19
- it: () => import('./i18n/it').then((m) => m.content),
20
- ja: () => import('./i18n/ja').then((m) => m.content),
21
- ko: () => import('./i18n/ko').then((m) => m.content),
22
- nl: () => import('./i18n/nl').then((m) => m.content),
23
- pl: () => import('./i18n/pl').then((m) => m.content),
24
- pt: () => import('./i18n/pt').then((m) => m.content),
25
- ru: () => import('./i18n/ru').then((m) => m.content),
26
- sv: () => import('./i18n/sv').then((m) => m.content),
27
- tr: () => import('./i18n/tr').then((m) => m.content),
28
- zh: () => import('./i18n/zh').then((m) => m.content),
29
- },
30
- };
31
-
32
-
1
+ import { youtubeThumbnail } from './entry';
2
+ export * from './entry';
33
3
  export const YOUTUBE_THUMBNAIL_TOOL: ToolDefinition = {
34
4
  entry: youtubeThumbnail,
35
5
  Component: () => import('./component.astro'),
@@ -0,0 +1,265 @@
1
+ .ytx-root {
2
+ --bg: #fff;
3
+ --bg-muted: #f8fafc;
4
+ --bg-img: #f1f5f9;
5
+ --text: #1e293b;
6
+ --text-label: #334155;
7
+ --text-muted: #64748b;
8
+ --text-placeholder: #cbd5e1;
9
+ --border: #e2e8f0;
10
+ --paste-bg: #f1f5f9;
11
+ --paste-hover: #e2e8f0;
12
+ --paste-color: #64748b;
13
+ --paste-hover-color: #0f172a;
14
+ --error-bg: #fef2f2;
15
+ --error-text: #b91c1c;
16
+ --shadow: rgba(0, 0, 0, 0.08);
17
+
18
+ max-width: 900px;
19
+ margin: 0 auto;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 2rem;
23
+ }
24
+
25
+ :global(.theme-dark) .ytx-root {
26
+ --bg: #0f172a;
27
+ --bg-muted: #020617;
28
+ --bg-img: #1e293b;
29
+ --text: #f1f5f9;
30
+ --text-label: #cbd5e1;
31
+ --text-muted: #94a3b8;
32
+ --text-placeholder: #475569;
33
+ --border: #1e293b;
34
+ --paste-bg: #1e293b;
35
+ --paste-hover: #334155;
36
+ --paste-color: #94a3b8;
37
+ --paste-hover-color: #f1f5f9;
38
+ --error-bg: rgba(239, 68, 68, 0.1);
39
+ --error-text: #fca5a5;
40
+ --shadow: rgba(0, 0, 0, 0.3);
41
+ }
42
+
43
+ .ytx-input-panel {
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: 0.75rem;
47
+ align-items: center;
48
+ }
49
+
50
+ .ytx-url-container {
51
+ position: relative;
52
+ width: 100%;
53
+ max-width: 700px;
54
+ display: flex;
55
+ align-items: center;
56
+ background: var(--bg);
57
+ border: 2px solid transparent;
58
+ border-radius: 50px;
59
+ box-shadow: 0 10px 40px var(--shadow);
60
+ transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
61
+ }
62
+
63
+ .ytx-url-container:focus-within {
64
+ border-color: #ef4444;
65
+ box-shadow: 0 10px 40px rgba(239, 68, 68, 0.2);
66
+ transform: translateY(-2px);
67
+ }
68
+
69
+ .ytx-search-icon {
70
+ position: absolute;
71
+ left: 1.5rem;
72
+ width: 24px;
73
+ height: 24px;
74
+ color: var(--text-muted);
75
+ flex-shrink: 0;
76
+ }
77
+
78
+ #ytx-url-input {
79
+ width: 100%;
80
+ padding: 1.25rem 3.5rem;
81
+ padding-right: 4.5rem;
82
+ font-size: 1.1rem;
83
+ border: none;
84
+ border-radius: 50px;
85
+ background: transparent;
86
+ color: var(--text);
87
+ outline: none;
88
+ font-weight: 500;
89
+ }
90
+
91
+ #ytx-url-input::placeholder {
92
+ color: var(--text-placeholder);
93
+ font-weight: 400;
94
+ }
95
+
96
+ .ytx-paste-btn {
97
+ position: absolute;
98
+ right: 0.5rem;
99
+ width: 44px;
100
+ height: 44px;
101
+ border: none;
102
+ border-radius: 50%;
103
+ background: var(--paste-bg);
104
+ color: var(--paste-color);
105
+ cursor: pointer;
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ transition: all 0.2s;
110
+ }
111
+
112
+ .ytx-paste-btn:hover {
113
+ background: var(--paste-hover);
114
+ color: var(--paste-hover-color);
115
+ transform: scale(1.05);
116
+ }
117
+
118
+ .ytx-paste-btn:active { transform: scale(0.95); }
119
+
120
+ .ytx-helper-text {
121
+ color: var(--text-muted);
122
+ font-size: 0.9rem;
123
+ font-weight: 500;
124
+ }
125
+
126
+ .ytx-results-panel {
127
+ display: flex;
128
+ flex-direction: column;
129
+ gap: 2rem;
130
+ transition: opacity 0.4s;
131
+ }
132
+
133
+ .ytx-main-card {
134
+ position: relative;
135
+ background: var(--bg);
136
+ border-radius: 20px;
137
+ padding: 1rem;
138
+ box-shadow: 0 10px 30px var(--shadow);
139
+ display: flex;
140
+ flex-direction: column;
141
+ align-items: center;
142
+ gap: 1.5rem;
143
+ overflow: hidden;
144
+ }
145
+
146
+ .ytx-ribbon {
147
+ position: absolute;
148
+ top: 2rem;
149
+ left: -2.5rem;
150
+ background: #ef4444;
151
+ color: white;
152
+ padding: 0.5rem 3rem;
153
+ font-weight: 800;
154
+ font-size: 0.8rem;
155
+ text-transform: uppercase;
156
+ transform: rotate(-45deg);
157
+ box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
158
+ z-index: 10;
159
+ }
160
+
161
+ #ytx-main-img {
162
+ width: 100%;
163
+ border-radius: 12px;
164
+ box-shadow: 0 5px 15px var(--shadow);
165
+ display: block;
166
+ background: var(--bg-muted);
167
+ min-height: 300px;
168
+ object-fit: cover;
169
+ }
170
+
171
+ .ytx-card-actions {
172
+ width: 100%;
173
+ display: flex;
174
+ justify-content: center;
175
+ }
176
+
177
+ .ytx-download-btn {
178
+ background: #ef4444;
179
+ color: white;
180
+ padding: 1rem 2rem;
181
+ border-radius: 50px;
182
+ border: none;
183
+ font-size: 1.1rem;
184
+ font-weight: 700;
185
+ cursor: pointer;
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 0.75rem;
189
+ transition: all 0.2s;
190
+ box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
191
+ }
192
+
193
+ .ytx-download-btn:hover {
194
+ background: #dc2626;
195
+ transform: translateY(-2px);
196
+ box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4);
197
+ }
198
+
199
+ .ytx-download-btn:active { transform: translateY(1px); }
200
+
201
+ .ytx-resolutions-grid {
202
+ display: grid;
203
+ grid-template-columns: repeat(3, 1fr);
204
+ gap: 1.5rem;
205
+ }
206
+
207
+ @media (max-width: 650px) {
208
+ .ytx-resolutions-grid { grid-template-columns: 1fr; }
209
+ }
210
+
211
+ .ytx-res-card {
212
+ background: var(--bg);
213
+ border-radius: 16px;
214
+ padding: 1rem;
215
+ box-shadow: 0 4px 15px var(--shadow);
216
+ display: flex;
217
+ flex-direction: column;
218
+ gap: 0.75rem;
219
+ align-items: center;
220
+ text-align: center;
221
+ }
222
+
223
+ .ytx-res-card img {
224
+ width: 100%;
225
+ border-radius: 8px;
226
+ aspect-ratio: 16/9;
227
+ object-fit: cover;
228
+ background: var(--bg-img);
229
+ }
230
+
231
+ .ytx-res-label {
232
+ margin: 0;
233
+ font-weight: 700;
234
+ color: var(--text-label);
235
+ font-size: 0.95rem;
236
+ }
237
+
238
+ .ytx-res-card a {
239
+ color: #3b82f6;
240
+ text-decoration: none;
241
+ font-weight: 600;
242
+ font-size: 0.9rem;
243
+ transition: color 0.2s;
244
+ }
245
+
246
+ .ytx-res-card a:hover {
247
+ color: #2563eb;
248
+ text-decoration: underline;
249
+ }
250
+
251
+ .ytx-error-panel {
252
+ display: flex;
253
+ align-items: center;
254
+ gap: 1rem;
255
+ background: var(--error-bg);
256
+ border-left: 4px solid #ef4444;
257
+ color: var(--error-text);
258
+ padding: 1.5rem;
259
+ border-radius: 12px;
260
+ font-weight: 500;
261
+ }
262
+
263
+ .ytx-hidden {
264
+ display: none;
265
+ }