@jjlmoya/utils-diy 1.9.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 (28) hide show
  1. package/package.json +5 -3
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/tool/balusterCalculator/baluster-calculator.css +320 -0
  4. package/src/tool/balusterCalculator/component.astro +0 -322
  5. package/src/tool/clayCalculator/clay-shrinkage-calculator.css +530 -0
  6. package/src/tool/clayCalculator/component.astro +0 -532
  7. package/src/tool/concreteCalculator/component.astro +0 -705
  8. package/src/tool/concreteCalculator/concrete-mortar-calculator.css +703 -0
  9. package/src/tool/cutOptimizer/component.astro +0 -477
  10. package/src/tool/cutOptimizer/cut-optimizer.css +475 -0
  11. package/src/tool/drillCalculator/component.astro +0 -815
  12. package/src/tool/drillCalculator/drill-rpm-calculator.css +813 -0
  13. package/src/tool/drillSharpener/component.astro +0 -393
  14. package/src/tool/drillSharpener/drill-sharpening-master.css +391 -0
  15. package/src/tool/epoxyCalculator/component.astro +0 -571
  16. package/src/tool/epoxyCalculator/epoxy-resin-calculator.css +569 -0
  17. package/src/tool/furnitureFit/component.astro +0 -345
  18. package/src/tool/furnitureFit/furniture-fit-calculator.css +343 -0
  19. package/src/tool/mortarCalculator/component.astro +0 -620
  20. package/src/tool/mortarCalculator/lime-mortar-calculator.css +618 -0
  21. package/src/tool/passepartoutCalculator/component.astro +0 -518
  22. package/src/tool/passepartoutCalculator/passepartout-calculator.css +516 -0
  23. package/src/tool/stairCalculator/component.astro +0 -480
  24. package/src/tool/stairCalculator/stair-calculator.css +478 -0
  25. package/src/tool/thermalExpansionCalculator/component.astro +0 -490
  26. package/src/tool/thermalExpansionCalculator/thermal-expansion-calculator.css +488 -0
  27. package/src/tool/voltageDropCalculator/component.astro +0 -729
  28. package/src/tool/voltageDropCalculator/voltage-drop-calculator.css +727 -0
@@ -123,524 +123,6 @@ const t = (ui ?? {}) as PassepartoutCalculatorUI;
123
123
  </div>
124
124
  </div>
125
125
 
126
- <style>
127
- .pp-root {
128
- width: 100%;
129
- max-width: 1100px;
130
- margin: 0 auto;
131
- background: #fff;
132
- border: 1px solid #e2e8f0;
133
- border-radius: 1.5rem;
134
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
135
- overflow: hidden;
136
- }
137
-
138
- :global(.theme-dark) .pp-root {
139
- background: #1e1e2e;
140
- border-color: #2d2d3f;
141
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
142
- }
143
-
144
- .pp-grid {
145
- display: grid;
146
- grid-template-columns: 1fr;
147
- }
148
-
149
- @media (min-width: 1024px) {
150
- .pp-grid {
151
- grid-template-columns: 5fr 8fr;
152
- }
153
- }
154
-
155
- .pp-inputs {
156
- padding: 2rem;
157
- background: #f8fafc;
158
- display: flex;
159
- flex-direction: column;
160
- gap: 1.5rem;
161
- border-right: 1px solid #e2e8f0;
162
- }
163
-
164
- :global(.theme-dark) .pp-inputs {
165
- background: #16161e;
166
- border-right-color: #2d2d3f;
167
- }
168
-
169
- .pp-section-header {
170
- display: flex;
171
- flex-direction: column;
172
- gap: 0.25rem;
173
- }
174
-
175
- .pp-section-title {
176
- font-size: 1.25rem;
177
- font-weight: 700;
178
- color: #0f172a;
179
- display: flex;
180
- align-items: center;
181
- gap: 0.5rem;
182
- }
183
-
184
- :global(.theme-dark) .pp-section-title {
185
- color: #e2e8f0;
186
- }
187
-
188
- .pp-section-desc {
189
- font-size: 0.875rem;
190
- color: #64748b;
191
- }
192
-
193
- :global(.theme-dark) .pp-section-desc {
194
- color: #94a3b8;
195
- }
196
-
197
- .pp-field-group {
198
- display: flex;
199
- flex-direction: column;
200
- gap: 0.75rem;
201
- }
202
-
203
- .pp-group-label {
204
- display: flex;
205
- align-items: center;
206
- gap: 0.5rem;
207
- font-size: 0.875rem;
208
- font-weight: 600;
209
- }
210
-
211
- .pp-label-frame {
212
- color: #4f46e5;
213
- }
214
-
215
- :global(.theme-dark) .pp-label-frame {
216
- color: #818cf8;
217
- }
218
-
219
- .pp-label-art {
220
- color: #db2777;
221
- }
222
-
223
- :global(.theme-dark) .pp-label-art {
224
- color: #f472b6;
225
- }
226
-
227
- .pp-group-icon {
228
- width: 1.25rem;
229
- height: 1.25rem;
230
- }
231
-
232
- .pp-row {
233
- display: grid;
234
- grid-template-columns: 1fr 1fr;
235
- gap: 1rem;
236
- }
237
-
238
- .pp-field {
239
- display: flex;
240
- flex-direction: column;
241
- gap: 0.25rem;
242
- }
243
-
244
- .pp-label {
245
- font-size: 0.75rem;
246
- color: #64748b;
247
- margin-left: 0.25rem;
248
- }
249
-
250
- :global(.theme-dark) .pp-label {
251
- color: #94a3b8;
252
- }
253
-
254
- .pp-input {
255
- width: 100%;
256
- background: #fff;
257
- border: 1px solid #cbd5e1;
258
- border-radius: 0.75rem;
259
- padding: 0.75rem 1rem;
260
- color: #0f172a;
261
- font-size: 1.125rem;
262
- transition: border-color 0.2s, box-shadow 0.2s;
263
- box-sizing: border-box;
264
- }
265
-
266
- .pp-input:focus {
267
- outline: none;
268
- border-color: #4f46e5;
269
- box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
270
- }
271
-
272
- :global(.theme-dark) .pp-input {
273
- background: #1e1e2e;
274
- border-color: #3d3d50;
275
- color: #e2e8f0;
276
- }
277
-
278
- :global(.theme-dark) .pp-input:focus {
279
- border-color: #818cf8;
280
- box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
281
- }
282
-
283
- .pp-toggle-row {
284
- padding-top: 1rem;
285
- border-top: 1px solid #e2e8f0;
286
- }
287
-
288
- :global(.theme-dark) .pp-toggle-row {
289
- border-top-color: #2d2d3f;
290
- }
291
-
292
- .pp-toggle-label {
293
- display: flex;
294
- align-items: center;
295
- justify-content: space-between;
296
- cursor: pointer;
297
- gap: 1rem;
298
- }
299
-
300
- .pp-toggle-text {
301
- display: flex;
302
- flex-direction: column;
303
- gap: 0.125rem;
304
- }
305
-
306
- .pp-toggle-name {
307
- font-size: 0.9375rem;
308
- font-weight: 600;
309
- color: #0f172a;
310
- }
311
-
312
- :global(.theme-dark) .pp-toggle-name {
313
- color: #e2e8f0;
314
- }
315
-
316
- .pp-toggle-desc {
317
- font-size: 0.75rem;
318
- color: #64748b;
319
- }
320
-
321
- :global(.theme-dark) .pp-toggle-desc {
322
- color: #94a3b8;
323
- }
324
-
325
- .pp-checkbox {
326
- width: 3rem;
327
- height: 1.75rem;
328
- appearance: none;
329
- background: #cbd5e1;
330
- border-radius: 9999px;
331
- position: relative;
332
- cursor: pointer;
333
- transition: background 0.3s;
334
- flex-shrink: 0;
335
- }
336
-
337
- .pp-checkbox:checked {
338
- background: #4f46e5;
339
- }
340
-
341
- .pp-checkbox::after {
342
- content: '';
343
- position: absolute;
344
- width: 1.375rem;
345
- height: 1.375rem;
346
- background: #fff;
347
- border-radius: 50%;
348
- top: 0.1875rem;
349
- left: 0.1875rem;
350
- transition: left 0.3s;
351
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
352
- }
353
-
354
- .pp-checkbox:checked::after {
355
- left: 1.4375rem;
356
- }
357
-
358
- .pp-toggle-track {
359
- display: none;
360
- }
361
-
362
- .pp-offset-ctrl {
363
- display: none;
364
- padding-top: 0.5rem;
365
- border-top: 1px solid #e2e8f0;
366
- }
367
-
368
- :global(.theme-dark) .pp-offset-ctrl {
369
- border-top-color: #2d2d3f;
370
- }
371
-
372
- .pp-offset-row {
373
- display: flex;
374
- align-items: center;
375
- gap: 1rem;
376
- margin-top: 0.5rem;
377
- }
378
-
379
- .pp-range {
380
- flex: 1;
381
- height: 0.5rem;
382
- accent-color: #4f46e5;
383
- cursor: pointer;
384
- }
385
-
386
- .pp-offset-val {
387
- font-size: 0.875rem;
388
- font-weight: 600;
389
- color: #0f172a;
390
- min-width: 2.5rem;
391
- text-align: right;
392
- }
393
-
394
- :global(.theme-dark) .pp-offset-val {
395
- color: #e2e8f0;
396
- }
397
-
398
- .pp-error {
399
- display: none;
400
- padding: 1rem;
401
- background: #fef2f2;
402
- border: 1px solid #fecaca;
403
- border-radius: 0.75rem;
404
- color: #dc2626;
405
- font-size: 0.875rem;
406
- align-items: flex-start;
407
- gap: 0.75rem;
408
- }
409
-
410
- :global(.theme-dark) .pp-error {
411
- background: #2d1515;
412
- border-color: #7f1d1d;
413
- color: #fca5a5;
414
- }
415
-
416
- .pp-error-icon {
417
- width: 1.25rem;
418
- height: 1.25rem;
419
- flex-shrink: 0;
420
- margin-top: 0.125rem;
421
- }
422
-
423
- .pp-preview {
424
- background: #f1f5f9;
425
- padding: 3rem;
426
- position: relative;
427
- display: flex;
428
- align-items: center;
429
- justify-content: center;
430
- min-height: 500px;
431
- }
432
-
433
- :global(.theme-dark) .pp-preview {
434
- background: #0f172a;
435
- }
436
-
437
- .pp-dots-bg {
438
- position: absolute;
439
- inset: 0;
440
- background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.15) 1px, transparent 0);
441
- background-size: 20px 20px;
442
- pointer-events: none;
443
- opacity: 0.5;
444
- }
445
-
446
- :global(.theme-dark) .pp-dots-bg {
447
- background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.1) 1px, transparent 0);
448
- }
449
-
450
- .pp-frame-wrapper {
451
- position: relative;
452
- height: 100%;
453
- max-height: 60vh;
454
- display: flex;
455
- align-items: center;
456
- justify-content: center;
457
- }
458
-
459
- .pp-frame {
460
- position: relative;
461
- box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
462
- background: #fff;
463
- height: 100%;
464
- max-height: 60vh;
465
- transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
466
- }
467
-
468
- :global(.theme-dark) .pp-frame {
469
- box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
470
- }
471
-
472
- .pp-mat {
473
- position: absolute;
474
- inset: 0;
475
- background: #e2e2e2;
476
- }
477
-
478
- :global(.theme-dark) .pp-mat {
479
- background: #334155;
480
- }
481
-
482
- .pp-art {
483
- position: absolute;
484
- background: #fff;
485
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
486
- overflow: hidden;
487
- display: flex;
488
- align-items: center;
489
- justify-content: center;
490
- transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
491
- }
492
-
493
- :global(.theme-dark) .pp-art {
494
- background: #1e293b;
495
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
496
- }
497
-
498
- .pp-art-placeholder {
499
- font-style: italic;
500
- color: #94a3b8;
501
- font-size: clamp(0.75rem, 2vw, 1.25rem);
502
- user-select: none;
503
- position: relative;
504
- z-index: 1;
505
- }
506
-
507
- :global(.theme-dark) .pp-art-placeholder {
508
- color: #475569;
509
- }
510
-
511
- .pp-art-dim {
512
- position: absolute;
513
- pointer-events: none;
514
- opacity: 0.5;
515
- }
516
-
517
- .pp-art-dim-w {
518
- bottom: 0.5rem;
519
- left: 0;
520
- right: 0;
521
- display: flex;
522
- align-items: center;
523
- justify-content: center;
524
- flex-direction: column;
525
- gap: 0.125rem;
526
- }
527
-
528
- .pp-art-dim-h {
529
- top: 0;
530
- bottom: 0;
531
- right: 0.5rem;
532
- display: flex;
533
- align-items: center;
534
- justify-content: center;
535
- flex-direction: column;
536
- gap: 0.125rem;
537
- }
538
-
539
- .pp-dim-line {
540
- height: 1px;
541
- width: 60%;
542
- background: #0f172a;
543
- }
544
-
545
- :global(.theme-dark) .pp-dim-line {
546
- background: #e2e8f0;
547
- }
548
-
549
- .pp-dim-line-v {
550
- width: 1px;
551
- height: 60%;
552
- }
553
-
554
- .pp-dim-label {
555
- font-size: 0.5rem;
556
- color: #0f172a;
557
- }
558
-
559
- :global(.theme-dark) .pp-dim-label {
560
- color: #e2e8f0;
561
- }
562
-
563
- .pp-dim-label-v {
564
- writing-mode: vertical-rl;
565
- transform: rotate(180deg);
566
- }
567
-
568
- .pp-border-label {
569
- position: absolute;
570
- display: flex;
571
- flex-direction: column;
572
- align-items: center;
573
- gap: 0.125rem;
574
- color: #4f46e5;
575
- z-index: 10;
576
- }
577
-
578
- :global(.theme-dark) .pp-border-label {
579
- color: #818cf8;
580
- }
581
-
582
- .pp-border-top {
583
- top: 0;
584
- left: 50%;
585
- transform: translate(-50%, -100%);
586
- padding-bottom: 0.5rem;
587
- }
588
-
589
- .pp-border-bottom {
590
- bottom: 0;
591
- left: 50%;
592
- transform: translate(-50%, 100%);
593
- padding-top: 0.5rem;
594
- }
595
-
596
- .pp-border-left {
597
- left: 0;
598
- top: 50%;
599
- transform: translate(-100%, -50%);
600
- padding-right: 1rem;
601
- color: #db2777;
602
- }
603
-
604
- :global(.theme-dark) .pp-border-left {
605
- color: #f472b6;
606
- }
607
-
608
- .pp-border-right {
609
- right: 0;
610
- top: 50%;
611
- transform: translate(100%, -50%);
612
- padding-left: 1rem;
613
- color: #db2777;
614
- }
615
-
616
- :global(.theme-dark) .pp-border-right {
617
- color: #f472b6;
618
- }
619
-
620
- .pp-border-val {
621
- font-size: 1.25rem;
622
- font-weight: 700;
623
- line-height: 1;
624
- }
625
-
626
- .pp-border-tag {
627
- font-size: 0.65rem;
628
- text-transform: uppercase;
629
- letter-spacing: 0.1em;
630
- opacity: 0.7;
631
- }
632
-
633
- .pp-border-unit {
634
- font-size: 0.6rem;
635
- opacity: 0.5;
636
- }
637
-
638
- @media (max-width: 1023px) {
639
- .pp-preview {
640
- padding: 4rem 3rem;
641
- }
642
- }
643
- </style>
644
126
 
645
127
  <script>
646
128
  type PpSizes = { fw: number; fh: number; aw: number; ah: number };