@jjlmoya/utils-tools 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.
- package/package.json +7 -4
- package/scripts/postinstall.mjs +27 -0
- package/src/entries.ts +26 -0
- package/src/tool/date-diff-calculator/component.astro +0 -200
- package/src/tool/date-diff-calculator/date-difference-calculator.css +198 -0
- package/src/tool/date-diff-calculator/entry.ts +24 -0
- package/src/tool/date-diff-calculator/index.ts +2 -25
- package/src/tool/drive-direct-link/component.astro +0 -173
- package/src/tool/drive-direct-link/entry.ts +24 -0
- package/src/tool/drive-direct-link/google-drive-direct-download-link.css +171 -0
- package/src/tool/drive-direct-link/index.ts +2 -25
- package/src/tool/email-list-cleaner/component.astro +0 -204
- package/src/tool/email-list-cleaner/email-list-cleaner.css +202 -0
- package/src/tool/email-list-cleaner/entry.ts +24 -0
- package/src/tool/email-list-cleaner/index.ts +2 -25
- package/src/tool/env-badge-spain/component.astro +0 -156
- package/src/tool/env-badge-spain/entry.ts +24 -0
- package/src/tool/env-badge-spain/environmental-badge-simulator-spain.css +154 -0
- package/src/tool/env-badge-spain/index.ts +2 -25
- package/src/tool/morse-beacon/component.astro +0 -298
- package/src/tool/morse-beacon/entry.ts +24 -0
- package/src/tool/morse-beacon/index.ts +2 -25
- package/src/tool/morse-beacon/morse-beacon.css +296 -0
- package/src/tool/password-generator/component.astro +0 -88
- package/src/tool/password-generator/entry.ts +24 -0
- package/src/tool/password-generator/index.ts +2 -25
- package/src/tool/password-generator/password-generator.css +86 -0
- package/src/tool/routes/component.astro +0 -254
- package/src/tool/routes/entry.ts +24 -0
- package/src/tool/routes/index.ts +2 -25
- package/src/tool/routes/optimal-routes.css +252 -0
- package/src/tool/rule-of-three/component.astro +0 -249
- package/src/tool/rule-of-three/entry.ts +24 -0
- package/src/tool/rule-of-three/index.ts +2 -25
- package/src/tool/rule-of-three/rule-of-three.css +247 -0
- package/src/tool/seo-content-optimizer/component.astro +0 -278
- package/src/tool/seo-content-optimizer/entry.ts +24 -0
- package/src/tool/seo-content-optimizer/index.ts +2 -25
- package/src/tool/seo-content-optimizer/seo-content-optimizer.css +276 -0
- package/src/tool/speed-reader/component.astro +0 -400
- package/src/tool/speed-reader/entry.ts +24 -0
- package/src/tool/speed-reader/index.ts +2 -25
- package/src/tool/speed-reader/speed-reader.css +398 -0
- package/src/tool/text-pixel-calculator/component.astro +0 -96
- package/src/tool/text-pixel-calculator/entry.ts +24 -0
- package/src/tool/text-pixel-calculator/index.ts +2 -25
- package/src/tool/text-pixel-calculator/text-pixel-width-calculator.css +94 -0
- package/src/tool/whatsapp-link/component.astro +0 -264
- package/src/tool/whatsapp-link/entry.ts +24 -0
- package/src/tool/whatsapp-link/index.ts +2 -25
- package/src/tool/whatsapp-link/whatsapp-link-generator.css +262 -0
- package/src/tools.ts +1 -1
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const speedReader: ToolsToolEntry<SpeedReaderUI> = {
|
|
5
|
-
id: 'speed-reader',
|
|
6
|
-
icons: { bg: 'mdi:book-open-page-variant', fg: 'mdi:lightning-bolt' },
|
|
7
|
-
i18n: {
|
|
8
|
-
es: () => import('./i18n/es').then((m) => m.content),
|
|
9
|
-
en: () => import('./i18n/en').then((m) => m.content),
|
|
10
|
-
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
11
|
-
de: () => import('./i18n/de').then((m) => m.content),
|
|
12
|
-
it: () => import('./i18n/it').then((m) => m.content),
|
|
13
|
-
pt: () => import('./i18n/pt').then((m) => m.content),
|
|
14
|
-
nl: () => import('./i18n/nl').then((m) => m.content),
|
|
15
|
-
pl: () => import('./i18n/pl').then((m) => m.content),
|
|
16
|
-
tr: () => import('./i18n/tr').then((m) => m.content),
|
|
17
|
-
id: () => import('./i18n/id').then((m) => m.content),
|
|
18
|
-
sv: () => import('./i18n/sv').then((m) => m.content),
|
|
19
|
-
ru: () => import('./i18n/ru').then((m) => m.content),
|
|
20
|
-
ja: () => import('./i18n/ja').then((m) => m.content),
|
|
21
|
-
ko: () => import('./i18n/ko').then((m) => m.content),
|
|
22
|
-
zh: () => import('./i18n/zh').then((m) => m.content),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
1
|
+
import { speedReader } from './entry';
|
|
2
|
+
export * from './entry';
|
|
26
3
|
export const SPEED_READER_TOOL: ToolDefinition = {
|
|
27
4
|
entry: speedReader,
|
|
28
5
|
Component: () => import('./component.astro'),
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
.sr-root {
|
|
2
|
+
--sr-accent: #4f46e5;
|
|
3
|
+
--sr-accent-hover: #4338ca;
|
|
4
|
+
--sr-violet: #7c3aed;
|
|
5
|
+
--sr-pivot-color: #ef4444;
|
|
6
|
+
--sr-panel-bg: #fff;
|
|
7
|
+
--sr-panel-border: #f1f5f9;
|
|
8
|
+
--sr-field-bg: #f8fafc;
|
|
9
|
+
--sr-field-border: #e2e8f0;
|
|
10
|
+
--sr-field-focus: #4f46e5;
|
|
11
|
+
--sr-text-main: #1e293b;
|
|
12
|
+
--sr-text-label: #64748b;
|
|
13
|
+
--sr-text-hint: #94a3b8;
|
|
14
|
+
--sr-text-muted: #475569;
|
|
15
|
+
--sr-btn-shadow: rgba(79, 70, 229, 0.35);
|
|
16
|
+
--sr-badge-bg: rgba(15, 23, 42, 0.8);
|
|
17
|
+
--sr-badge-border: #334155;
|
|
18
|
+
--sr-led-idle: #22c55e;
|
|
19
|
+
--sr-led-active: #f59e0b;
|
|
20
|
+
--sr-guide-color: rgba(71, 85, 105, 0.3);
|
|
21
|
+
--sr-word-color: #e2e8f0;
|
|
22
|
+
--sr-word-muted: #475569;
|
|
23
|
+
--sr-clear-color: #f87171;
|
|
24
|
+
--sr-clear-hover: #fee2e2;
|
|
25
|
+
|
|
26
|
+
width: 100%;
|
|
27
|
+
max-width: 56rem;
|
|
28
|
+
margin: 0 auto;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:global(.theme-dark) .sr-root {
|
|
35
|
+
--sr-panel-bg: #0f172a;
|
|
36
|
+
--sr-panel-border: #1e293b;
|
|
37
|
+
--sr-field-bg: rgba(30, 41, 59, 0.5);
|
|
38
|
+
--sr-field-border: #334155;
|
|
39
|
+
--sr-text-main: #e2e8f0;
|
|
40
|
+
--sr-text-label: #94a3b8;
|
|
41
|
+
--sr-text-hint: #64748b;
|
|
42
|
+
--sr-text-muted: #64748b;
|
|
43
|
+
--sr-word-muted: #64748b;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sr-stage {
|
|
47
|
+
position: relative;
|
|
48
|
+
background: #0f172a;
|
|
49
|
+
border-radius: 1.5rem;
|
|
50
|
+
height: 22rem;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
border: 1px solid #1e293b;
|
|
56
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
|
|
57
|
+
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:global(.sr-stage-active) {
|
|
61
|
+
transform: scale(1.02);
|
|
62
|
+
border-color: rgba(79, 70, 229, 0.4);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sr-badge {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 1.25rem;
|
|
68
|
+
right: 1.25rem;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 0.375rem;
|
|
72
|
+
background: var(--sr-badge-bg);
|
|
73
|
+
border: 1px solid var(--sr-badge-border);
|
|
74
|
+
border-radius: 9999px;
|
|
75
|
+
padding: 0.25rem 0.75rem;
|
|
76
|
+
font-size: 0.75rem;
|
|
77
|
+
color: #cbd5e1;
|
|
78
|
+
z-index: 20;
|
|
79
|
+
backdrop-filter: blur(4px);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.sr-badge > span:first-child {
|
|
83
|
+
font-weight: 700;
|
|
84
|
+
color: #f1f5f9;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.sr-badge-label {
|
|
88
|
+
color: #64748b;
|
|
89
|
+
text-transform: uppercase;
|
|
90
|
+
letter-spacing: 0.05em;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.sr-led {
|
|
94
|
+
width: 0.5rem;
|
|
95
|
+
height: 0.5rem;
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
background: var(--sr-led-idle);
|
|
98
|
+
transition: background 0.2s;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:global(.sr-led-active) {
|
|
102
|
+
background: var(--sr-led-active);
|
|
103
|
+
animation: sr-pulse 1s ease-in-out infinite;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@keyframes sr-pulse {
|
|
107
|
+
0%, 100% { opacity: 1; }
|
|
108
|
+
50% { opacity: 0.5; }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.sr-guide-v {
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 0;
|
|
114
|
+
bottom: 0;
|
|
115
|
+
left: 50%;
|
|
116
|
+
width: 1px;
|
|
117
|
+
background: rgba(71, 85, 105, 0.25);
|
|
118
|
+
transform: translateX(-50%);
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sr-guide-h {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 50%;
|
|
125
|
+
left: 50%;
|
|
126
|
+
width: 18rem;
|
|
127
|
+
height: 4.5rem;
|
|
128
|
+
transform: translate(-50%, -60%);
|
|
129
|
+
border-top: 1px solid rgba(71, 85, 105, 0.2);
|
|
130
|
+
border-bottom: 1px solid rgba(71, 85, 105, 0.2);
|
|
131
|
+
border-radius: 0.5rem;
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.sr-word {
|
|
136
|
+
position: relative;
|
|
137
|
+
z-index: 10;
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: 1fr auto 1fr;
|
|
140
|
+
align-items: center;
|
|
141
|
+
width: 100%;
|
|
142
|
+
max-width: 36rem;
|
|
143
|
+
padding: 0 2rem;
|
|
144
|
+
font-size: clamp(2rem, 6vw, 3.5rem);
|
|
145
|
+
font-weight: 700;
|
|
146
|
+
user-select: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.sr-word-left {
|
|
150
|
+
text-align: right;
|
|
151
|
+
color: var(--sr-word-muted);
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.sr-word-pivot {
|
|
156
|
+
position: relative;
|
|
157
|
+
display: flex;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
flex-shrink: 0;
|
|
160
|
+
min-width: 1ch;
|
|
161
|
+
margin: 0 1px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.sr-word-pivot > span {
|
|
165
|
+
color: var(--sr-pivot-color);
|
|
166
|
+
font-weight: 900;
|
|
167
|
+
position: relative;
|
|
168
|
+
z-index: 2;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.sr-pivot-beam {
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 50%;
|
|
174
|
+
left: 50%;
|
|
175
|
+
transform: translate(-50%, -50%);
|
|
176
|
+
width: 2px;
|
|
177
|
+
height: 4rem;
|
|
178
|
+
background: rgba(239, 68, 68, 0.15);
|
|
179
|
+
border-radius: 9999px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.sr-word-right {
|
|
183
|
+
text-align: left;
|
|
184
|
+
color: var(--sr-word-muted);
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.sr-panel {
|
|
189
|
+
background: var(--sr-panel-bg);
|
|
190
|
+
border: 1px solid var(--sr-panel-border);
|
|
191
|
+
border-radius: 1.5rem;
|
|
192
|
+
padding: 1.5rem;
|
|
193
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
gap: 1.5rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.sr-playrow {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
gap: 1.25rem;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.sr-play-btn {
|
|
206
|
+
flex-shrink: 0;
|
|
207
|
+
width: 3.75rem;
|
|
208
|
+
height: 3.75rem;
|
|
209
|
+
background: var(--sr-accent);
|
|
210
|
+
color: #fff;
|
|
211
|
+
border: none;
|
|
212
|
+
border-radius: 1rem;
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
box-shadow: 0 4px 14px var(--sr-btn-shadow);
|
|
218
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.sr-play-btn:hover {
|
|
222
|
+
background: var(--sr-accent-hover);
|
|
223
|
+
transform: scale(1.05);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.sr-play-btn:active {
|
|
227
|
+
transform: scale(0.95);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:global(.sr-play-btn-active) {
|
|
231
|
+
background: #1e293b;
|
|
232
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:global(.sr-play-btn-active):hover {
|
|
236
|
+
background: #0f172a;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.sr-play-icon {
|
|
240
|
+
width: 1.75rem;
|
|
241
|
+
height: 1.75rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.sr-progress-wrap {
|
|
245
|
+
flex: 1;
|
|
246
|
+
display: flex;
|
|
247
|
+
flex-direction: column;
|
|
248
|
+
gap: 0.5rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.sr-progress-header {
|
|
252
|
+
display: flex;
|
|
253
|
+
justify-content: space-between;
|
|
254
|
+
align-items: center;
|
|
255
|
+
font-size: 0.7rem;
|
|
256
|
+
font-weight: 700;
|
|
257
|
+
text-transform: uppercase;
|
|
258
|
+
letter-spacing: 0.08em;
|
|
259
|
+
color: var(--sr-text-hint);
|
|
260
|
+
padding: 0 0.25rem;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.sr-progress-pct {
|
|
264
|
+
color: var(--sr-accent);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.sr-slider {
|
|
268
|
+
width: 100%;
|
|
269
|
+
cursor: pointer;
|
|
270
|
+
accent-color: var(--sr-accent);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.sr-config {
|
|
274
|
+
display: grid;
|
|
275
|
+
grid-template-columns: 1fr;
|
|
276
|
+
gap: 1.5rem;
|
|
277
|
+
border-top: 1px solid var(--sr-panel-border);
|
|
278
|
+
padding-top: 1.5rem;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@media (min-width: 640px) {
|
|
282
|
+
.sr-config { grid-template-columns: 1fr 1fr; }
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.sr-config-label {
|
|
286
|
+
display: block;
|
|
287
|
+
font-size: 1rem;
|
|
288
|
+
font-weight: 900;
|
|
289
|
+
color: var(--sr-text-main);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.sr-speed-section {
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-direction: column;
|
|
295
|
+
gap: 0.75rem;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.sr-speed-header {
|
|
299
|
+
display: flex;
|
|
300
|
+
justify-content: space-between;
|
|
301
|
+
align-items: center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.sr-wpm-badge {
|
|
305
|
+
background: rgba(79, 70, 229, 0.08);
|
|
306
|
+
color: var(--sr-accent);
|
|
307
|
+
border: 1px solid rgba(79, 70, 229, 0.2);
|
|
308
|
+
border-radius: 9999px;
|
|
309
|
+
padding: 0.2rem 0.75rem;
|
|
310
|
+
font-size: 0.8rem;
|
|
311
|
+
font-weight: 700;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.sr-speed-labels {
|
|
315
|
+
display: flex;
|
|
316
|
+
justify-content: space-between;
|
|
317
|
+
font-size: 0.7rem;
|
|
318
|
+
font-weight: 700;
|
|
319
|
+
color: var(--sr-text-hint);
|
|
320
|
+
letter-spacing: 0.08em;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.sr-speed-hint {
|
|
324
|
+
font-size: 0.8rem;
|
|
325
|
+
color: var(--sr-text-hint);
|
|
326
|
+
line-height: 1.5;
|
|
327
|
+
margin: 0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.sr-text-section {
|
|
331
|
+
display: flex;
|
|
332
|
+
flex-direction: column;
|
|
333
|
+
gap: 0.5rem;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.sr-textarea-wrap {
|
|
337
|
+
position: relative;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.sr-textarea {
|
|
341
|
+
width: 100%;
|
|
342
|
+
height: 9rem;
|
|
343
|
+
background: var(--sr-field-bg);
|
|
344
|
+
border: 1px solid var(--sr-field-border);
|
|
345
|
+
border-radius: 0.75rem;
|
|
346
|
+
padding: 0.875rem 1rem 2.5rem;
|
|
347
|
+
font-size: 0.85rem;
|
|
348
|
+
color: var(--sr-text-main);
|
|
349
|
+
line-height: 1.6;
|
|
350
|
+
resize: none;
|
|
351
|
+
outline: none;
|
|
352
|
+
transition: border-color 0.2s;
|
|
353
|
+
box-sizing: border-box;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.sr-textarea::placeholder {
|
|
357
|
+
color: var(--sr-text-hint);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.sr-textarea:focus {
|
|
361
|
+
border-color: var(--sr-field-focus);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.sr-textarea-footer {
|
|
365
|
+
position: absolute;
|
|
366
|
+
bottom: 0.625rem;
|
|
367
|
+
right: 0.625rem;
|
|
368
|
+
display: flex;
|
|
369
|
+
align-items: center;
|
|
370
|
+
gap: 0.5rem;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.sr-word-count {
|
|
374
|
+
font-size: 0.7rem;
|
|
375
|
+
font-weight: 700;
|
|
376
|
+
color: var(--sr-text-hint);
|
|
377
|
+
background: var(--sr-panel-bg);
|
|
378
|
+
border: 1px solid var(--sr-panel-border);
|
|
379
|
+
padding: 0.2rem 0.5rem;
|
|
380
|
+
border-radius: 0.375rem;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.sr-clear-btn {
|
|
384
|
+
font-size: 0.7rem;
|
|
385
|
+
font-weight: 700;
|
|
386
|
+
color: var(--sr-clear-color);
|
|
387
|
+
background: transparent;
|
|
388
|
+
border: none;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
padding: 0.2rem 0.375rem;
|
|
391
|
+
border-radius: 0.375rem;
|
|
392
|
+
transition: background 0.15s;
|
|
393
|
+
letter-spacing: 0.05em;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.sr-clear-btn:hover {
|
|
397
|
+
background: var(--sr-clear-hover);
|
|
398
|
+
}
|
|
@@ -41,102 +41,6 @@ const t = (ui ?? {}) as TextPixelCalculatorUI;
|
|
|
41
41
|
|
|
42
42
|
<div class="tpc-toast" id="tpc-toast">{t.copyDone}</div>
|
|
43
43
|
|
|
44
|
-
<style>
|
|
45
|
-
.tpc-root {
|
|
46
|
-
--tpc-cyan: #06b6d4;
|
|
47
|
-
--tpc-cyan-dark: #0891b2;
|
|
48
|
-
--tpc-cyan-focus: rgba(6, 182, 212, 0.15);
|
|
49
|
-
--tpc-purple: #8b5cf6;
|
|
50
|
-
--tpc-card-bg: #fff;
|
|
51
|
-
--tpc-card-border: rgba(0, 0, 0, 0.05);
|
|
52
|
-
--tpc-field-bg: #f8fafc;
|
|
53
|
-
--tpc-field-border: #e2e8f0;
|
|
54
|
-
--tpc-text-main: #1e293b;
|
|
55
|
-
--tpc-text-label: #64748b;
|
|
56
|
-
--tpc-canvas-bg: #f1f5f9;
|
|
57
|
-
--tpc-btn-secondary-bg: #f1f5f9;
|
|
58
|
-
--tpc-btn-secondary-color: #475569;
|
|
59
|
-
--tpc-checkbox-border: #cbd5e1;
|
|
60
|
-
--tpc-checkbox-bg: #fff;
|
|
61
|
-
--tpc-toast-bg: #1e293b;
|
|
62
|
-
|
|
63
|
-
width: 100%;
|
|
64
|
-
max-width: 1000px;
|
|
65
|
-
margin: 0 auto;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:global(.theme-dark) .tpc-root {
|
|
69
|
-
--tpc-card-bg: #1e293b;
|
|
70
|
-
--tpc-card-border: rgba(255, 255, 255, 0.05);
|
|
71
|
-
--tpc-field-bg: #0f172a;
|
|
72
|
-
--tpc-field-border: #334155;
|
|
73
|
-
--tpc-text-main: #f1f5f9;
|
|
74
|
-
--tpc-text-label: #94a3b8;
|
|
75
|
-
--tpc-canvas-bg: #0f172a;
|
|
76
|
-
--tpc-btn-secondary-bg: #334155;
|
|
77
|
-
--tpc-btn-secondary-color: #e2e8f0;
|
|
78
|
-
--tpc-checkbox-border: #475569;
|
|
79
|
-
--tpc-checkbox-bg: #0f172a;
|
|
80
|
-
--tpc-toast-bg: #06b6d4;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.tpc-main-card {
|
|
84
|
-
background: var(--tpc-card-bg);
|
|
85
|
-
border: 1px solid var(--tpc-card-border);
|
|
86
|
-
border-radius: 2.5rem;
|
|
87
|
-
padding: 2.5rem;
|
|
88
|
-
display: flex;
|
|
89
|
-
gap: 3rem;
|
|
90
|
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.tpc-left {
|
|
94
|
-
flex: 1.2;
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.tpc-right {
|
|
100
|
-
flex: 1;
|
|
101
|
-
border-left: 1px solid var(--tpc-field-border);
|
|
102
|
-
padding-left: 3rem;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (max-width: 900px) {
|
|
106
|
-
.tpc-main-card {
|
|
107
|
-
flex-direction: column;
|
|
108
|
-
padding: 1.5rem;
|
|
109
|
-
gap: 2rem;
|
|
110
|
-
}
|
|
111
|
-
.tpc-right {
|
|
112
|
-
border-left: none;
|
|
113
|
-
padding-left: 0;
|
|
114
|
-
border-top: 1px solid var(--tpc-field-border);
|
|
115
|
-
padding-top: 2rem;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.tpc-toast {
|
|
120
|
-
position: fixed;
|
|
121
|
-
bottom: 2rem;
|
|
122
|
-
left: 50%;
|
|
123
|
-
transform: translateX(-50%) translateY(100px);
|
|
124
|
-
background: var(--tpc-toast-bg);
|
|
125
|
-
color: #fff;
|
|
126
|
-
padding: 1rem 2rem;
|
|
127
|
-
border-radius: 100px;
|
|
128
|
-
font-size: 0.875rem;
|
|
129
|
-
font-weight: 700;
|
|
130
|
-
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
131
|
-
z-index: 1000;
|
|
132
|
-
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.tpc-toast-show {
|
|
137
|
-
transform: translateX(-50%) translateY(0);
|
|
138
|
-
}
|
|
139
|
-
</style>
|
|
140
44
|
|
|
141
45
|
<script>
|
|
142
46
|
import type { TextPixelCalculatorUI } from './ui';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToolsToolEntry } from '../../types';
|
|
2
|
+
import type { TextPixelCalculatorUI } from './ui';
|
|
3
|
+
|
|
4
|
+
export const textPixelCalculator: ToolsToolEntry<TextPixelCalculatorUI> = {
|
|
5
|
+
id: 'text-pixel-calculator',
|
|
6
|
+
icons: { bg: 'mdi:format-text', fg: 'mdi:ruler' },
|
|
7
|
+
i18n: {
|
|
8
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
9
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
10
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
11
|
+
de: () => import('./i18n/de').then((m) => m.content),
|
|
12
|
+
it: () => import('./i18n/it').then((m) => m.content),
|
|
13
|
+
pt: () => import('./i18n/pt').then((m) => m.content),
|
|
14
|
+
nl: () => import('./i18n/nl').then((m) => m.content),
|
|
15
|
+
pl: () => import('./i18n/pl').then((m) => m.content),
|
|
16
|
+
tr: () => import('./i18n/tr').then((m) => m.content),
|
|
17
|
+
id: () => import('./i18n/id').then((m) => m.content),
|
|
18
|
+
sv: () => import('./i18n/sv').then((m) => m.content),
|
|
19
|
+
ru: () => import('./i18n/ru').then((m) => m.content),
|
|
20
|
+
ja: () => import('./i18n/ja').then((m) => m.content),
|
|
21
|
+
ko: () => import('./i18n/ko').then((m) => m.content),
|
|
22
|
+
zh: () => import('./i18n/zh').then((m) => m.content),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const textPixelCalculator: ToolsToolEntry<TextPixelCalculatorUI> = {
|
|
5
|
-
id: 'text-pixel-calculator',
|
|
6
|
-
icons: { bg: 'mdi:format-text', fg: 'mdi:ruler' },
|
|
7
|
-
i18n: {
|
|
8
|
-
es: () => import('./i18n/es').then((m) => m.content),
|
|
9
|
-
en: () => import('./i18n/en').then((m) => m.content),
|
|
10
|
-
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
11
|
-
de: () => import('./i18n/de').then((m) => m.content),
|
|
12
|
-
it: () => import('./i18n/it').then((m) => m.content),
|
|
13
|
-
pt: () => import('./i18n/pt').then((m) => m.content),
|
|
14
|
-
nl: () => import('./i18n/nl').then((m) => m.content),
|
|
15
|
-
pl: () => import('./i18n/pl').then((m) => m.content),
|
|
16
|
-
tr: () => import('./i18n/tr').then((m) => m.content),
|
|
17
|
-
id: () => import('./i18n/id').then((m) => m.content),
|
|
18
|
-
sv: () => import('./i18n/sv').then((m) => m.content),
|
|
19
|
-
ru: () => import('./i18n/ru').then((m) => m.content),
|
|
20
|
-
ja: () => import('./i18n/ja').then((m) => m.content),
|
|
21
|
-
ko: () => import('./i18n/ko').then((m) => m.content),
|
|
22
|
-
zh: () => import('./i18n/zh').then((m) => m.content),
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
1
|
+
import { textPixelCalculator } from './entry';
|
|
2
|
+
export * from './entry';
|
|
26
3
|
export const TEXT_PIXEL_CALCULATOR_TOOL: ToolDefinition = {
|
|
27
4
|
entry: textPixelCalculator,
|
|
28
5
|
Component: () => import('./component.astro'),
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
.tpc-root {
|
|
2
|
+
--tpc-cyan: #06b6d4;
|
|
3
|
+
--tpc-cyan-dark: #0891b2;
|
|
4
|
+
--tpc-cyan-focus: rgba(6, 182, 212, 0.15);
|
|
5
|
+
--tpc-purple: #8b5cf6;
|
|
6
|
+
--tpc-card-bg: #fff;
|
|
7
|
+
--tpc-card-border: rgba(0, 0, 0, 0.05);
|
|
8
|
+
--tpc-field-bg: #f8fafc;
|
|
9
|
+
--tpc-field-border: #e2e8f0;
|
|
10
|
+
--tpc-text-main: #1e293b;
|
|
11
|
+
--tpc-text-label: #64748b;
|
|
12
|
+
--tpc-canvas-bg: #f1f5f9;
|
|
13
|
+
--tpc-btn-secondary-bg: #f1f5f9;
|
|
14
|
+
--tpc-btn-secondary-color: #475569;
|
|
15
|
+
--tpc-checkbox-border: #cbd5e1;
|
|
16
|
+
--tpc-checkbox-bg: #fff;
|
|
17
|
+
--tpc-toast-bg: #1e293b;
|
|
18
|
+
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 1000px;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:global(.theme-dark) .tpc-root {
|
|
25
|
+
--tpc-card-bg: #1e293b;
|
|
26
|
+
--tpc-card-border: rgba(255, 255, 255, 0.05);
|
|
27
|
+
--tpc-field-bg: #0f172a;
|
|
28
|
+
--tpc-field-border: #334155;
|
|
29
|
+
--tpc-text-main: #f1f5f9;
|
|
30
|
+
--tpc-text-label: #94a3b8;
|
|
31
|
+
--tpc-canvas-bg: #0f172a;
|
|
32
|
+
--tpc-btn-secondary-bg: #334155;
|
|
33
|
+
--tpc-btn-secondary-color: #e2e8f0;
|
|
34
|
+
--tpc-checkbox-border: #475569;
|
|
35
|
+
--tpc-checkbox-bg: #0f172a;
|
|
36
|
+
--tpc-toast-bg: #06b6d4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tpc-main-card {
|
|
40
|
+
background: var(--tpc-card-bg);
|
|
41
|
+
border: 1px solid var(--tpc-card-border);
|
|
42
|
+
border-radius: 2.5rem;
|
|
43
|
+
padding: 2.5rem;
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: 3rem;
|
|
46
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tpc-left {
|
|
50
|
+
flex: 1.2;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tpc-right {
|
|
56
|
+
flex: 1;
|
|
57
|
+
border-left: 1px solid var(--tpc-field-border);
|
|
58
|
+
padding-left: 3rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (max-width: 900px) {
|
|
62
|
+
.tpc-main-card {
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
padding: 1.5rem;
|
|
65
|
+
gap: 2rem;
|
|
66
|
+
}
|
|
67
|
+
.tpc-right {
|
|
68
|
+
border-left: none;
|
|
69
|
+
padding-left: 0;
|
|
70
|
+
border-top: 1px solid var(--tpc-field-border);
|
|
71
|
+
padding-top: 2rem;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tpc-toast {
|
|
76
|
+
position: fixed;
|
|
77
|
+
bottom: 2rem;
|
|
78
|
+
left: 50%;
|
|
79
|
+
transform: translateX(-50%) translateY(100px);
|
|
80
|
+
background: var(--tpc-toast-bg);
|
|
81
|
+
color: #fff;
|
|
82
|
+
padding: 1rem 2rem;
|
|
83
|
+
border-radius: 100px;
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
87
|
+
z-index: 1000;
|
|
88
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tpc-toast-show {
|
|
93
|
+
transform: translateX(-50%) translateY(0);
|
|
94
|
+
}
|