@jjlmoya/utils-hardware 1.14.0 → 1.16.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 (159) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -1
  3. package/src/entries.ts +4 -1
  4. package/src/index.ts +1 -0
  5. package/src/pages/[locale]/[slug].astro +28 -12
  6. package/src/tests/locale_completeness.test.ts +6 -20
  7. package/src/tests/shared-test-helpers.ts +56 -0
  8. package/src/tests/tool_exports.test.ts +34 -0
  9. package/src/tests/tool_validation.test.ts +2 -2
  10. package/src/tool/batteryHealthEstimator/bibliography.ts +13 -0
  11. package/src/tool/batteryHealthEstimator/i18n/de.ts +2 -12
  12. package/src/tool/batteryHealthEstimator/i18n/en.ts +2 -12
  13. package/src/tool/batteryHealthEstimator/i18n/es.ts +2 -12
  14. package/src/tool/batteryHealthEstimator/i18n/fr.ts +2 -12
  15. package/src/tool/batteryHealthEstimator/i18n/id.ts +2 -12
  16. package/src/tool/batteryHealthEstimator/i18n/it.ts +2 -12
  17. package/src/tool/batteryHealthEstimator/i18n/ja.ts +2 -12
  18. package/src/tool/batteryHealthEstimator/i18n/ko.ts +2 -12
  19. package/src/tool/batteryHealthEstimator/i18n/nl.ts +2 -12
  20. package/src/tool/batteryHealthEstimator/i18n/pl.ts +2 -12
  21. package/src/tool/batteryHealthEstimator/i18n/pt.ts +2 -12
  22. package/src/tool/batteryHealthEstimator/i18n/ru.ts +2 -12
  23. package/src/tool/batteryHealthEstimator/i18n/sv.ts +2 -12
  24. package/src/tool/batteryHealthEstimator/i18n/tr.ts +2 -12
  25. package/src/tool/batteryHealthEstimator/i18n/zh.ts +2 -12
  26. package/src/tool/batteryHealthEstimator/lithium-battery-health-calculator.css +90 -3
  27. package/src/tool/batteryHealthEstimator/seo.astro +3 -2
  28. package/src/tool/deadPixelTest/bibliography.ts +13 -0
  29. package/src/tool/deadPixelTest/dead-pixel-tester.css +33 -6
  30. package/src/tool/deadPixelTest/i18n/de.ts +2 -12
  31. package/src/tool/deadPixelTest/i18n/en.ts +2 -12
  32. package/src/tool/deadPixelTest/i18n/es.ts +2 -12
  33. package/src/tool/deadPixelTest/i18n/fr.ts +2 -12
  34. package/src/tool/deadPixelTest/i18n/id.ts +2 -12
  35. package/src/tool/deadPixelTest/i18n/it.ts +2 -12
  36. package/src/tool/deadPixelTest/i18n/ja.ts +2 -12
  37. package/src/tool/deadPixelTest/i18n/ko.ts +2 -12
  38. package/src/tool/deadPixelTest/i18n/nl.ts +2 -12
  39. package/src/tool/deadPixelTest/i18n/pl.ts +2 -12
  40. package/src/tool/deadPixelTest/i18n/pt.ts +2 -12
  41. package/src/tool/deadPixelTest/i18n/ru.ts +2 -12
  42. package/src/tool/deadPixelTest/i18n/sv.ts +2 -12
  43. package/src/tool/deadPixelTest/i18n/tr.ts +2 -12
  44. package/src/tool/deadPixelTest/i18n/zh.ts +2 -12
  45. package/src/tool/deadPixelTest/seo.astro +3 -2
  46. package/src/tool/gamepadTest/bibliography.ts +12 -0
  47. package/src/tool/gamepadTest/gamepad-test.css +88 -3
  48. package/src/tool/gamepadTest/i18n/de.ts +2 -12
  49. package/src/tool/gamepadTest/i18n/en.ts +2 -12
  50. package/src/tool/gamepadTest/i18n/es.ts +2 -12
  51. package/src/tool/gamepadTest/i18n/fr.ts +2 -12
  52. package/src/tool/gamepadTest/i18n/id.ts +2 -12
  53. package/src/tool/gamepadTest/i18n/it.ts +2 -12
  54. package/src/tool/gamepadTest/i18n/ja.ts +2 -12
  55. package/src/tool/gamepadTest/i18n/ko.ts +2 -12
  56. package/src/tool/gamepadTest/i18n/nl.ts +2 -12
  57. package/src/tool/gamepadTest/i18n/pl.ts +2 -12
  58. package/src/tool/gamepadTest/i18n/pt.ts +2 -12
  59. package/src/tool/gamepadTest/i18n/ru.ts +2 -12
  60. package/src/tool/gamepadTest/i18n/sv.ts +2 -12
  61. package/src/tool/gamepadTest/i18n/tr.ts +2 -12
  62. package/src/tool/gamepadTest/i18n/zh.ts +2 -12
  63. package/src/tool/gamepadTest/seo.astro +3 -2
  64. package/src/tool/gamepadVibrationTester/bibliography.ts +13 -0
  65. package/src/tool/gamepadVibrationTester/gamepad-vibration-tester.css +124 -4
  66. package/src/tool/gamepadVibrationTester/i18n/de.ts +2 -12
  67. package/src/tool/gamepadVibrationTester/i18n/en.ts +2 -12
  68. package/src/tool/gamepadVibrationTester/i18n/es.ts +2 -12
  69. package/src/tool/gamepadVibrationTester/i18n/fr.ts +2 -12
  70. package/src/tool/gamepadVibrationTester/i18n/id.ts +2 -12
  71. package/src/tool/gamepadVibrationTester/i18n/it.ts +2 -12
  72. package/src/tool/gamepadVibrationTester/i18n/ja.ts +2 -12
  73. package/src/tool/gamepadVibrationTester/i18n/ko.ts +2 -12
  74. package/src/tool/gamepadVibrationTester/i18n/nl.ts +2 -12
  75. package/src/tool/gamepadVibrationTester/i18n/pl.ts +2 -12
  76. package/src/tool/gamepadVibrationTester/i18n/pt.ts +2 -12
  77. package/src/tool/gamepadVibrationTester/i18n/ru.ts +2 -12
  78. package/src/tool/gamepadVibrationTester/i18n/sv.ts +2 -12
  79. package/src/tool/gamepadVibrationTester/i18n/tr.ts +2 -12
  80. package/src/tool/gamepadVibrationTester/i18n/zh.ts +2 -12
  81. package/src/tool/gamepadVibrationTester/seo.astro +3 -2
  82. package/src/tool/keyboardTest/bibliography.ts +13 -0
  83. package/src/tool/keyboardTest/i18n/de.ts +2 -12
  84. package/src/tool/keyboardTest/i18n/en.ts +2 -12
  85. package/src/tool/keyboardTest/i18n/es.ts +2 -12
  86. package/src/tool/keyboardTest/i18n/fr.ts +2 -12
  87. package/src/tool/keyboardTest/i18n/id.ts +2 -12
  88. package/src/tool/keyboardTest/i18n/it.ts +2 -12
  89. package/src/tool/keyboardTest/i18n/ja.ts +2 -12
  90. package/src/tool/keyboardTest/i18n/ko.ts +2 -12
  91. package/src/tool/keyboardTest/i18n/nl.ts +2 -12
  92. package/src/tool/keyboardTest/i18n/pl.ts +2 -12
  93. package/src/tool/keyboardTest/i18n/pt.ts +2 -12
  94. package/src/tool/keyboardTest/i18n/ru.ts +2 -12
  95. package/src/tool/keyboardTest/i18n/sv.ts +2 -12
  96. package/src/tool/keyboardTest/i18n/tr.ts +2 -12
  97. package/src/tool/keyboardTest/i18n/zh.ts +2 -12
  98. package/src/tool/keyboardTest/keyboard-test.css +46 -3
  99. package/src/tool/keyboardTest/seo.astro +3 -2
  100. package/src/tool/mousePollingTest/bibliography.ts +13 -0
  101. package/src/tool/mousePollingTest/i18n/de.ts +2 -12
  102. package/src/tool/mousePollingTest/i18n/en.ts +2 -12
  103. package/src/tool/mousePollingTest/i18n/es.ts +2 -12
  104. package/src/tool/mousePollingTest/i18n/fr.ts +2 -12
  105. package/src/tool/mousePollingTest/i18n/id.ts +2 -12
  106. package/src/tool/mousePollingTest/i18n/it.ts +2 -12
  107. package/src/tool/mousePollingTest/i18n/ja.ts +2 -12
  108. package/src/tool/mousePollingTest/i18n/ko.ts +2 -12
  109. package/src/tool/mousePollingTest/i18n/nl.ts +2 -12
  110. package/src/tool/mousePollingTest/i18n/pl.ts +2 -12
  111. package/src/tool/mousePollingTest/i18n/pt.ts +2 -12
  112. package/src/tool/mousePollingTest/i18n/ru.ts +2 -12
  113. package/src/tool/mousePollingTest/i18n/sv.ts +2 -12
  114. package/src/tool/mousePollingTest/i18n/tr.ts +2 -12
  115. package/src/tool/mousePollingTest/i18n/zh.ts +2 -12
  116. package/src/tool/mousePollingTest/mouse-polling-rate-test.css +27 -5
  117. package/src/tool/mousePollingTest/seo.astro +3 -2
  118. package/src/tool/refreshRateDetector/bibliography.astro +14 -0
  119. package/src/tool/refreshRateDetector/bibliography.ts +20 -0
  120. package/src/tool/refreshRateDetector/component.astro +206 -0
  121. package/src/tool/refreshRateDetector/entry.ts +29 -0
  122. package/src/tool/refreshRateDetector/i18n/de.ts +196 -0
  123. package/src/tool/refreshRateDetector/i18n/en.ts +196 -0
  124. package/src/tool/refreshRateDetector/i18n/es.ts +196 -0
  125. package/src/tool/refreshRateDetector/i18n/fr.ts +196 -0
  126. package/src/tool/refreshRateDetector/i18n/id.ts +196 -0
  127. package/src/tool/refreshRateDetector/i18n/it.ts +196 -0
  128. package/src/tool/refreshRateDetector/i18n/ja.ts +196 -0
  129. package/src/tool/refreshRateDetector/i18n/ko.ts +196 -0
  130. package/src/tool/refreshRateDetector/i18n/nl.ts +196 -0
  131. package/src/tool/refreshRateDetector/i18n/pl.ts +196 -0
  132. package/src/tool/refreshRateDetector/i18n/pt.ts +196 -0
  133. package/src/tool/refreshRateDetector/i18n/ru.ts +196 -0
  134. package/src/tool/refreshRateDetector/i18n/sv.ts +196 -0
  135. package/src/tool/refreshRateDetector/i18n/tr.ts +196 -0
  136. package/src/tool/refreshRateDetector/i18n/zh.ts +196 -0
  137. package/src/tool/refreshRateDetector/index.ts +11 -0
  138. package/src/tool/refreshRateDetector/monitor-refresh-rate-detector.css +342 -0
  139. package/src/tool/refreshRateDetector/seo.astro +15 -0
  140. package/src/tool/refreshRateDetector/ui.ts +24 -0
  141. package/src/tool/toneGenerator/bibliography.ts +13 -0
  142. package/src/tool/toneGenerator/i18n/de.ts +2 -12
  143. package/src/tool/toneGenerator/i18n/en.ts +2 -12
  144. package/src/tool/toneGenerator/i18n/es.ts +2 -12
  145. package/src/tool/toneGenerator/i18n/fr.ts +2 -12
  146. package/src/tool/toneGenerator/i18n/id.ts +2 -12
  147. package/src/tool/toneGenerator/i18n/it.ts +2 -12
  148. package/src/tool/toneGenerator/i18n/ja.ts +2 -12
  149. package/src/tool/toneGenerator/i18n/ko.ts +2 -12
  150. package/src/tool/toneGenerator/i18n/nl.ts +2 -12
  151. package/src/tool/toneGenerator/i18n/pl.ts +2 -12
  152. package/src/tool/toneGenerator/i18n/pt.ts +2 -12
  153. package/src/tool/toneGenerator/i18n/ru.ts +2 -12
  154. package/src/tool/toneGenerator/i18n/sv.ts +2 -12
  155. package/src/tool/toneGenerator/i18n/tr.ts +2 -12
  156. package/src/tool/toneGenerator/i18n/zh.ts +2 -12
  157. package/src/tool/toneGenerator/seo.astro +3 -2
  158. package/src/tool/toneGenerator/tone-frequency-generator.css +25 -3
  159. package/src/tools.ts +2 -1
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'generator-tonow-czestotliwosci-online';
6
7
  const title = 'Online Generator Tonów i Częstotliwości';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Często Zadawane Pytania',
91
91
  faq: faqData,
92
- bibliographyTitle: 'Referencje',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: 'Wszystko o Częstotliwościach i Falach Dźwiękowych', level: 2 },
107
97
  {
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'gerador-tons-frequencia-online';
6
7
  const title = 'Gerador de Tons e Frequências Online';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Perguntas Frequentes',
91
91
  faq: faqData,
92
- bibliographyTitle: 'Referências',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: 'Tudo Sobre Frequências e Ondas Sonoras', level: 2 },
107
97
  {
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'onlayn-generator-tonov-i-chastot';
6
7
  const title = 'Онлайн генератор тонов и частот';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Часто задаваемые вопросы',
91
91
  faq: faqData,
92
- bibliographyTitle: 'Ссылки',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: 'Все о частотах и звуковых волнах', level: 2 },
107
97
  {
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'ton-och-frekvensgenerator-online';
6
7
  const title = 'Online ton och frekvensgenerator';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Vanliga frågor',
91
91
  faq: faqData,
92
- bibliographyTitle: 'Referenser',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: 'Allt om frekvenser och ljudvågor', level: 2 },
107
97
  {
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'online-ses-ve-frekans-ureteci';
6
7
  const title = 'Çevrimiçi Ses ve Frekans Üreteci';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: 'Sıkça Sorulan Sorular',
91
91
  faq: faqData,
92
- bibliographyTitle: 'Referanslar',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: 'Frekanslar ve Ses Dalgaları Hakkında Her Şey', level: 2 },
107
97
  {
@@ -1,6 +1,7 @@
1
1
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { ToneGeneratorUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
4
5
 
5
6
  const slug = 'tone-frequency-generator';
6
7
  const title = '在线音频和频率发生器';
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<ToneGeneratorUI> = {
87
88
  slug,
88
89
  title,
89
90
  description,
90
- faqTitle: '常见问题',
91
91
  faq: faqData,
92
- bibliographyTitle: '参考资料',
93
- bibliography: [
94
- {
95
- name: 'MDN Web Docs — Web Audio API',
96
- url: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API',
97
- },
98
- {
99
- name: 'ISO 226:2023 — Equal-loudness contours',
100
- url: 'https://www.iso.org/standard/83117.html',
101
- },
102
- ],
103
92
  howTo: howToData,
104
93
  schemas: [faqSchema, howToSchema, appSchema],
94
+ bibliography,
105
95
  seo: [
106
96
  { type: 'title', text: '关于频率和声波的一切', level: 2 },
107
97
  {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import { SEORenderer } from '@jjlmoya/utils-shared';
3
- import type { KnownLocale } from '../../types';
4
3
  import { toneGenerator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
5
 
6
6
  interface Props {
7
7
  locale?: KnownLocale;
@@ -9,6 +9,7 @@ interface Props {
9
9
 
10
10
  const { locale = 'es' } = Astro.props;
11
11
  const content = await toneGenerator.i18n[locale]?.();
12
+ if (!content) return null;
12
13
  ---
13
14
 
14
- {content && <SEORenderer content={{ locale, sections: content.seo }} />}
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -1,7 +1,29 @@
1
1
  .tg-wrapper {
2
- width: 100%;
3
- color: var(--tg-text);
4
- }
2
+ --tg-accent: #e11d48;
3
+ --tg-accent-glow: rgba(225, 29, 72, 0.3);
4
+ --tg-canvas-line: #f43f5e;
5
+ --tg-btn-bg: #e11d48;
6
+ --tg-btn-stop-bg: #1e293b;
7
+ --tg-surface: #fff;
8
+ --tg-surface-alt: #f8fafc;
9
+ --tg-border: #e2e8f0;
10
+ --tg-text: #0f172a;
11
+ --tg-text-muted: #64748b;
12
+ --tg-text-faint: #94a3b8;
13
+
14
+ width: 100%;
15
+ color: var(--tg-text);
16
+ }
17
+
18
+ .theme-dark .tg-wrapper {
19
+ --tg-btn-stop-bg: #27272a;
20
+ --tg-surface: #09090b;
21
+ --tg-surface-alt: #18181b;
22
+ --tg-border: #27272a;
23
+ --tg-text: #fafafa;
24
+ --tg-text-muted: #a1a1aa;
25
+ --tg-text-faint: #52525b;
26
+ }
5
27
 
6
28
  .tg-card {
7
29
  background: var(--tg-surface);
package/src/tools.ts CHANGED
@@ -7,6 +7,7 @@ import { PROBADOR_VIBRACION_MANDO_TOOL } from './tool/gamepadVibrationTester/ind
7
7
  import { TEST_RATON_TOOL } from './tool/mousePollingTest/index';
8
8
  import { ESTIMADOR_SALUD_BATERIA_TOOL } from './tool/batteryHealthEstimator/index';
9
9
  import { TONE_GENERATOR_TOOL } from './tool/toneGenerator/index';
10
+ import { REFRESH_RATE_DETECTOR_TOOL } from './tool/refreshRateDetector/index';
10
11
 
11
- export const ALL_TOOLS: ToolDefinition[] = [PIXELES_PANTALLA_TOOL, TEST_TECLADO_TOOL, TEST_MANDO_TOOL, PROBADOR_VIBRACION_MANDO_TOOL, TEST_RATON_TOOL, ESTIMADOR_SALUD_BATERIA_TOOL, TONE_GENERATOR_TOOL];
12
+ export const ALL_TOOLS: ToolDefinition[] = [PIXELES_PANTALLA_TOOL, TEST_TECLADO_TOOL, TEST_MANDO_TOOL, PROBADOR_VIBRACION_MANDO_TOOL, TEST_RATON_TOOL, ESTIMADOR_SALUD_BATERIA_TOOL, TONE_GENERATOR_TOOL, REFRESH_RATE_DETECTOR_TOOL];
12
13