@jjlmoya/utils-developer 1.30.0 → 1.32.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 (187) hide show
  1. package/package.json +70 -70
  2. package/src/category/i18n/en.ts +1 -1
  3. package/src/category/i18n/es.ts +1 -1
  4. package/src/category/index.ts +2 -1
  5. package/src/category/seo.astro +1 -1
  6. package/src/components/PreviewNavSidebar.astro +1 -1
  7. package/src/components/PreviewToolbar.astro +1 -1
  8. package/src/data.ts +1 -1
  9. package/src/entries.ts +2 -0
  10. package/src/env.d.ts +1 -1
  11. package/src/index.ts +1 -0
  12. package/src/layouts/PreviewLayout.astro +1 -1
  13. package/src/pages/[locale]/[slug].astro +161 -161
  14. package/src/pages/index.astro +1 -1
  15. package/src/tests/bibliography_wellformed_export.test.ts +46 -0
  16. package/src/tests/category_seo_quality.test.ts +76 -0
  17. package/src/tests/entry_contract.test.ts +8 -2
  18. package/src/tests/faq_count.test.ts +1 -1
  19. package/src/tests/i18n_coverage.test.ts +2 -6
  20. package/src/tests/inverted_punctuation.test.ts +113 -113
  21. package/src/tests/locale_completeness.test.ts +1 -1
  22. package/src/tests/mocks/astro_mock.js +1 -1
  23. package/src/tests/no_h1_in_components.test.ts +1 -1
  24. package/src/tests/promote_this_website_i18n.test.ts +33 -0
  25. package/src/tests/seo_translation_completeness.test.ts +69 -0
  26. package/src/tests/seo_wellformed_export.test.ts +65 -0
  27. package/src/tests/slug_language_code_format.test.ts +25 -25
  28. package/src/tests/slug_uniqueness.test.ts +86 -86
  29. package/src/tests/tool_validation.test.ts +16 -16
  30. package/src/tool/aspectRatio/i18n/de.ts +164 -164
  31. package/src/tool/aspectRatio/i18n/ja.ts +1 -1
  32. package/src/tool/aspectRatio/i18n/ko.ts +1 -1
  33. package/src/tool/aspectRatio/i18n/pl.ts +164 -164
  34. package/src/tool/aspectRatio/i18n/ru.ts +164 -164
  35. package/src/tool/aspectRatio/i18n/zh.ts +165 -165
  36. package/src/tool/aspectRatio/seo.astro +15 -15
  37. package/src/tool/calculadoraTiempoDatos/i18n/de.ts +143 -143
  38. package/src/tool/calculadoraTiempoDatos/i18n/ja.ts +1 -1
  39. package/src/tool/calculadoraTiempoDatos/i18n/ko.ts +1 -1
  40. package/src/tool/calculadoraTiempoDatos/i18n/pl.ts +143 -143
  41. package/src/tool/calculadoraTiempoDatos/i18n/ru.ts +144 -144
  42. package/src/tool/calculadoraTiempoDatos/i18n/sv.ts +143 -143
  43. package/src/tool/calculadoraTiempoDatos/i18n/zh.ts +144 -144
  44. package/src/tool/calculadoraTiempoDatos/seo.astro +15 -15
  45. package/src/tool/colorConverter/i18n/de.ts +120 -120
  46. package/src/tool/colorConverter/i18n/ja.ts +1 -1
  47. package/src/tool/colorConverter/i18n/ko.ts +1 -1
  48. package/src/tool/colorConverter/i18n/ru.ts +120 -120
  49. package/src/tool/colorConverter/i18n/zh.ts +1 -1
  50. package/src/tool/colorConverter/seo.astro +15 -15
  51. package/src/tool/conversorExcelCsvHtml/i18n/ja.ts +1 -1
  52. package/src/tool/conversorExcelCsvHtml/i18n/ko.ts +1 -1
  53. package/src/tool/conversorExcelCsvHtml/i18n/pl.ts +124 -124
  54. package/src/tool/conversorExcelCsvHtml/i18n/ru.ts +124 -124
  55. package/src/tool/conversorExcelCsvHtml/i18n/zh.ts +125 -125
  56. package/src/tool/conversorExcelCsvHtml/seo.astro +15 -15
  57. package/src/tool/cronGenerator/i18n/ja.ts +1 -1
  58. package/src/tool/cronGenerator/i18n/ko.ts +1 -1
  59. package/src/tool/cronGenerator/i18n/zh.ts +183 -183
  60. package/src/tool/cronGenerator/seo.astro +15 -15
  61. package/src/tool/cssSpecificityCalculator/i18n/ja.ts +1 -1
  62. package/src/tool/cssSpecificityCalculator/i18n/ko.ts +1 -1
  63. package/src/tool/cssSpecificityCalculator/i18n/zh.ts +1 -1
  64. package/src/tool/cssSpecificityCalculator/seo.astro +15 -15
  65. package/src/tool/cssToInlineConverter/i18n/ja.ts +1 -1
  66. package/src/tool/cssToInlineConverter/i18n/ko.ts +1 -1
  67. package/src/tool/cssToInlineConverter/i18n/zh.ts +1 -1
  68. package/src/tool/cssToInlineConverter/seo.astro +15 -15
  69. package/src/tool/dualOsIconPreview/assets/day-check.webp +0 -0
  70. package/src/tool/dualOsIconPreview/assets/fast-task.webp +0 -0
  71. package/src/tool/dualOsIconPreview/assets/fortune-cookie.webp +0 -0
  72. package/src/tool/dualOsIconPreview/assets/lexi-crash.webp +0 -0
  73. package/src/tool/dualOsIconPreview/assets/pizzametrics.webp +0 -0
  74. package/src/tool/dualOsIconPreview/assets/sauce-lab.webp +0 -0
  75. package/src/tool/dualOsIconPreview/assets/vesp.webp +0 -0
  76. package/src/tool/dualOsIconPreview/bibliography.astro +6 -0
  77. package/src/tool/dualOsIconPreview/bibliography.ts +7 -0
  78. package/src/tool/dualOsIconPreview/component.astro +117 -0
  79. package/src/tool/dualOsIconPreview/controller.ts +157 -0
  80. package/src/tool/dualOsIconPreview/dom-views.ts +82 -0
  81. package/src/tool/dualOsIconPreview/dual-ios-android-app-icon-preview.css +861 -0
  82. package/src/tool/dualOsIconPreview/entry.ts +31 -0
  83. package/src/tool/dualOsIconPreview/evaluator.ts +20 -0
  84. package/src/tool/dualOsIconPreview/i18n/de.ts +56 -0
  85. package/src/tool/dualOsIconPreview/i18n/en.ts +46 -0
  86. package/src/tool/dualOsIconPreview/i18n/es.ts +56 -0
  87. package/src/tool/dualOsIconPreview/i18n/fr.ts +56 -0
  88. package/src/tool/dualOsIconPreview/i18n/id.ts +56 -0
  89. package/src/tool/dualOsIconPreview/i18n/it.ts +56 -0
  90. package/src/tool/dualOsIconPreview/i18n/ja.ts +56 -0
  91. package/src/tool/dualOsIconPreview/i18n/ko.ts +56 -0
  92. package/src/tool/dualOsIconPreview/i18n/nl.ts +56 -0
  93. package/src/tool/dualOsIconPreview/i18n/pl.ts +56 -0
  94. package/src/tool/dualOsIconPreview/i18n/pt.ts +56 -0
  95. package/src/tool/dualOsIconPreview/i18n/ru.ts +56 -0
  96. package/src/tool/dualOsIconPreview/i18n/sv.ts +56 -0
  97. package/src/tool/dualOsIconPreview/i18n/tr.ts +43 -0
  98. package/src/tool/dualOsIconPreview/i18n/zh.ts +43 -0
  99. package/src/tool/dualOsIconPreview/index.ts +11 -0
  100. package/src/tool/dualOsIconPreview/logic.test.ts +63 -0
  101. package/src/tool/dualOsIconPreview/logic.ts +135 -0
  102. package/src/tool/dualOsIconPreview/seo.astro +15 -0
  103. package/src/tool/dualOsIconPreview/storage.ts +18 -0
  104. package/src/tool/dualOsIconPreview/ui.ts +52 -0
  105. package/src/tool/duplicateCssRemover/i18n/ja.ts +1 -1
  106. package/src/tool/duplicateCssRemover/i18n/ko.ts +1 -1
  107. package/src/tool/duplicateCssRemover/i18n/zh.ts +1 -1
  108. package/src/tool/duplicateCssRemover/seo.astro +15 -15
  109. package/src/tool/generadorSecurityTxt/i18n/ja.ts +1 -1
  110. package/src/tool/generadorSecurityTxt/i18n/ko.ts +1 -1
  111. package/src/tool/generadorSecurityTxt/i18n/zh.ts +1 -1
  112. package/src/tool/generadorSecurityTxt/seo.astro +15 -15
  113. package/src/tool/hashGenerator/i18n/ja.ts +1 -1
  114. package/src/tool/hashGenerator/i18n/ko.ts +1 -1
  115. package/src/tool/hashGenerator/seo.astro +15 -15
  116. package/src/tool/inspectorCertificadosSsl/i18n/ja.ts +1 -1
  117. package/src/tool/inspectorCertificadosSsl/i18n/ko.ts +1 -1
  118. package/src/tool/inspectorCertificadosSsl/i18n/zh.ts +1 -1
  119. package/src/tool/inspectorCertificadosSsl/seo.astro +15 -15
  120. package/src/tool/jsonFormatter/seo.astro +15 -15
  121. package/src/tool/jwtDecoder/i18n/es.ts +248 -248
  122. package/src/tool/jwtDecoder/i18n/fr.ts +248 -248
  123. package/src/tool/jwtDecoder/i18n/tr.ts +248 -248
  124. package/src/tool/keycode/seo.astro +15 -15
  125. package/src/tool/llmCostCalculator/i18n/fr.ts +149 -149
  126. package/src/tool/llmCostCalculator/i18n/ja.ts +1 -1
  127. package/src/tool/llmCostCalculator/i18n/ko.ts +1 -1
  128. package/src/tool/llmCostCalculator/seo.astro +15 -15
  129. package/src/tool/mobileMockupGenerator/i18n/ja.ts +1 -1
  130. package/src/tool/mobileMockupGenerator/i18n/ko.ts +1 -1
  131. package/src/tool/mobileMockupGenerator/i18n/zh.ts +1 -1
  132. package/src/tool/mobileMockupGenerator/seo.astro +15 -15
  133. package/src/tool/musicalTypography/i18n/ja.ts +1 -1
  134. package/src/tool/musicalTypography/i18n/ko.ts +1 -1
  135. package/src/tool/musicalTypography/i18n/zh.ts +1 -1
  136. package/src/tool/musicalTypography/seo.astro +15 -15
  137. package/src/tool/placeholderGenerator/i18n/ja.ts +1 -1
  138. package/src/tool/placeholderGenerator/i18n/ko.ts +1 -1
  139. package/src/tool/placeholderGenerator/i18n/zh.ts +1 -1
  140. package/src/tool/placeholderGenerator/seo.astro +15 -15
  141. package/src/tool/promoteThisWebsite/entry.ts +13 -0
  142. package/src/tool/promoteThisWebsite/i18n/de.ts +95 -0
  143. package/src/tool/promoteThisWebsite/i18n/fr.ts +95 -0
  144. package/src/tool/promoteThisWebsite/i18n/id.ts +95 -0
  145. package/src/tool/promoteThisWebsite/i18n/it.ts +95 -0
  146. package/src/tool/promoteThisWebsite/i18n/ja.ts +95 -0
  147. package/src/tool/promoteThisWebsite/i18n/ko.ts +95 -0
  148. package/src/tool/promoteThisWebsite/i18n/nl.ts +95 -0
  149. package/src/tool/promoteThisWebsite/i18n/pl.ts +95 -0
  150. package/src/tool/promoteThisWebsite/i18n/pt.ts +95 -0
  151. package/src/tool/promoteThisWebsite/i18n/ru.ts +95 -0
  152. package/src/tool/promoteThisWebsite/i18n/sv.ts +95 -0
  153. package/src/tool/promoteThisWebsite/i18n/tr.ts +95 -0
  154. package/src/tool/promoteThisWebsite/i18n/zh.ts +95 -0
  155. package/src/tool/promptLibrary/i18n/ja.ts +1 -1
  156. package/src/tool/promptLibrary/i18n/ko.ts +1 -1
  157. package/src/tool/promptLibrary/i18n/zh.ts +1 -1
  158. package/src/tool/promptLibrary/seo.astro +15 -15
  159. package/src/tool/readabilityCalculator/i18n/ja.ts +1 -1
  160. package/src/tool/readabilityCalculator/i18n/ko.ts +1 -1
  161. package/src/tool/readabilityCalculator/i18n/zh.ts +1 -1
  162. package/src/tool/readabilityCalculator/seo.astro +15 -15
  163. package/src/tool/serpPixelSimulator/entry.ts +30 -30
  164. package/src/tool/serpPixelSimulator/i18n/en.ts +211 -211
  165. package/src/tool/serpPixelSimulator/i18n/fr.ts +214 -214
  166. package/src/tool/serpPixelSimulator/i18n/ru.ts +214 -214
  167. package/src/tool/serpPixelSimulator/logic.ts +18 -18
  168. package/src/tool/serpPixelSimulator/serp-pixel-simulator.css +195 -195
  169. package/src/tool/svgSanitizer/i18n/ja.ts +1 -1
  170. package/src/tool/svgSanitizer/i18n/ko.ts +1 -1
  171. package/src/tool/svgSanitizer/seo.astro +15 -15
  172. package/src/tool/svgToCss/i18n/ja.ts +1 -1
  173. package/src/tool/svgToCss/i18n/ko.ts +1 -1
  174. package/src/tool/svgToCss/seo.astro +15 -15
  175. package/src/tool/urlCleaner/i18n/ja.ts +1 -1
  176. package/src/tool/urlCleaner/i18n/ko.ts +1 -1
  177. package/src/tool/urlCleaner/i18n/zh.ts +1 -1
  178. package/src/tool/urlCleaner/seo.astro +15 -15
  179. package/src/tool/urlEncoderDecoder/i18n/es.ts +146 -146
  180. package/src/tool/urlEncoderDecoder/i18n/ko.ts +1 -1
  181. package/src/tool/urlEncoderDecoder/seo.astro +15 -15
  182. package/src/tool/utmGenerator/i18n/ja.ts +1 -1
  183. package/src/tool/utmGenerator/i18n/ko.ts +1 -1
  184. package/src/tool/utmGenerator/i18n/zh.ts +1 -1
  185. package/src/tool/utmGenerator/seo.astro +15 -15
  186. package/src/tools.ts +2 -1
  187. package/src/types.ts +1 -1
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
- {
2
- "name": "@jjlmoya/utils-developer",
3
- "version": "1.30.0",
4
- "type": "module",
5
- "main": "./src/index.ts",
6
- "types": "./src/index.ts",
7
- "exports": {
8
- ".": "./src/index.ts",
9
- "./data": "./src/data.ts",
10
- "./entries": "./src/entries.ts",
11
- "./runtime/*": "./src/tool/*/index.ts",
12
- "./category-seo": "./src/category/seo.astro"
13
- },
14
- "files": [
15
- "src",
16
- "scripts"
17
- ],
18
- "publishConfig": {
19
- "access": "public"
20
- },
21
- "scripts": {
22
- "dev": "astro dev",
23
- "start": "astro dev",
24
- "build": "astro build",
25
- "preview": "astro preview",
26
- "astro": "astro",
27
- "lint": "eslint src/ --max-warnings 0 && stylelint \"src/**/*.{css,astro}\"",
28
- "check": "astro check",
29
- "type-check": "astro check",
30
- "test": "vitest run",
31
- "preversion": "npm run lint && npm run test && npm run build",
32
- "postversion": "git push && git push --tags",
33
- "patch": "npm version patch",
34
- "minor": "npm version minor",
35
- "major": "npm version major",
36
- "postinstall": "node scripts/postinstall.mjs"
37
- },
38
- "lint-staged": {
39
- "*.{ts,tsx,astro}": [
40
- "eslint --fix"
41
- ]
42
- },
43
- "dependencies": {
44
- "@iconify-json/mdi": "^1.2.3",
45
- "@jjlmoya/prompagate": "^1.1.0",
46
- "@jjlmoya/utils-shared": "1.2.0",
47
- "@types/file-saver": "^2.0.7",
48
- "astro": "^6.1.2",
49
- "astro-icon": "^1.1.0",
50
- "file-saver": "^2.0.5",
51
- "jszip": "^3.10.1"
52
- },
53
- "devDependencies": {
54
- "@astrojs/check": "^0.9.8",
55
- "@types/jszip": "^3.4.0",
56
- "eslint": "^9.39.4",
57
- "eslint-plugin-astro": "^1.6.0",
58
- "eslint-plugin-no-comments": "^1.1.10",
59
- "husky": "^9.1.7",
60
- "lint-staged": "^16.4.0",
61
- "postcss-html": "^1.8.1",
62
- "schema-dts": "^1.1.2",
63
- "stylelint": "^17.6.0",
64
- "stylelint-config-standard": "^40.0.0",
65
- "stylelint-declaration-strict-value": "^1.11.1",
66
- "typescript": "^5.4.0",
67
- "typescript-eslint": "^8.58.0",
68
- "vitest": "^4.1.2"
69
- }
70
- }
1
+ {
2
+ "name": "@jjlmoya/utils-developer",
3
+ "version": "1.32.0",
4
+ "type": "module",
5
+ "main": "./src/index.ts",
6
+ "types": "./src/index.ts",
7
+ "exports": {
8
+ ".": "./src/index.ts",
9
+ "./data": "./src/data.ts",
10
+ "./entries": "./src/entries.ts",
11
+ "./runtime/*": "./src/tool/*/index.ts",
12
+ "./category-seo": "./src/category/seo.astro"
13
+ },
14
+ "files": [
15
+ "src",
16
+ "scripts"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "dev": "astro dev",
23
+ "start": "astro dev",
24
+ "build": "astro build",
25
+ "preview": "astro preview",
26
+ "astro": "astro",
27
+ "lint": "eslint src/ --max-warnings 0 && stylelint \"src/**/*.{css,astro}\"",
28
+ "check": "astro check",
29
+ "type-check": "astro check",
30
+ "test": "vitest run",
31
+ "preversion": "npm run lint && npm run test && npm run build",
32
+ "postversion": "git push && git push --tags",
33
+ "patch": "npm version patch",
34
+ "minor": "npm version minor",
35
+ "major": "npm version major",
36
+ "postinstall": "node scripts/postinstall.mjs"
37
+ },
38
+ "lint-staged": {
39
+ "*.{ts,tsx,astro}": [
40
+ "eslint --fix"
41
+ ]
42
+ },
43
+ "dependencies": {
44
+ "@iconify-json/mdi": "^1.2.3",
45
+ "@jjlmoya/prompagate": "^1.1.0",
46
+ "@jjlmoya/utils-shared": "1.2.0",
47
+ "@types/file-saver": "^2.0.7",
48
+ "astro": "^6.1.2",
49
+ "astro-icon": "^1.1.0",
50
+ "file-saver": "^2.0.5",
51
+ "jszip": "^3.10.1"
52
+ },
53
+ "devDependencies": {
54
+ "@astrojs/check": "^0.9.8",
55
+ "@types/jszip": "^3.4.0",
56
+ "eslint": "^9.39.4",
57
+ "eslint-plugin-astro": "^1.6.0",
58
+ "eslint-plugin-no-comments": "^1.1.10",
59
+ "husky": "^9.1.7",
60
+ "lint-staged": "^16.4.0",
61
+ "postcss-html": "^1.8.1",
62
+ "schema-dts": "^1.1.2",
63
+ "stylelint": "^17.6.0",
64
+ "stylelint-config-standard": "^40.0.0",
65
+ "stylelint-declaration-strict-value": "^1.11.1",
66
+ "typescript": "^5.4.0",
67
+ "typescript-eslint": "^8.58.0",
68
+ "vitest": "^4.1.2"
69
+ }
70
+ }
@@ -27,7 +27,7 @@ export const content: CategoryLocaleContent = {
27
27
  },
28
28
  {
29
29
  type: 'tip',
30
- title: 'Privacy guaranteed',
30
+ title: 'Local privacy',
31
31
  html: 'All tools process data locally in your browser. No code, data or files are sent to any external server.',
32
32
  },
33
33
  ],
@@ -27,7 +27,7 @@ export const content: CategoryLocaleContent = {
27
27
  },
28
28
  {
29
29
  type: 'tip',
30
- title: 'Privacidad garantizada',
30
+ title: 'Privacidad local',
31
31
  html: 'Todas las herramientas procesan los datos localmente en tu navegador. Ningún código, dato ni archivo se envía a ningún servidor externo.',
32
32
  },
33
33
  ],
@@ -22,10 +22,11 @@ import { urlCleaner } from '../tool/urlCleaner/entry';
22
22
  import { serpPixelSimulator } from '../tool/serpPixelSimulator/entry';
23
23
  import { jwtDecoder } from '../tool/jwtDecoder/entry';
24
24
  import { visualCssGridFlexboxGenerator } from '../tool/visualCssGridFlexboxGenerator/entry';
25
+ import { dualOsIconPreview } from '../tool/dualOsIconPreview/entry';
25
26
 
26
27
  export const developerCategory: DeveloperCategoryEntry = {
27
28
  icon: 'mdi:code-tags',
28
- tools: [jsonFormatter, svgToCss, aspectRatio, placeholderGenerator, urlEncoderDecoder, duplicateCssRemover, cssToInlineConverter, cssSpecificityCalculator, cronGenerator, keycode, llmCostCalculator, musicalTypography, mobileMockupGenerator, hashGenerator, promptLibrary, colorConverter, readabilityCalculator, svgSanitizer, utmGenerator, urlCleaner, serpPixelSimulator, jwtDecoder, visualCssGridFlexboxGenerator],
29
+ tools: [jsonFormatter, svgToCss, aspectRatio, placeholderGenerator, urlEncoderDecoder, duplicateCssRemover, cssToInlineConverter, cssSpecificityCalculator, cronGenerator, keycode, llmCostCalculator, musicalTypography, mobileMockupGenerator, hashGenerator, promptLibrary, colorConverter, readabilityCalculator, svgSanitizer, utmGenerator, urlCleaner, serpPixelSimulator, jwtDecoder, visualCssGridFlexboxGenerator, dualOsIconPreview],
29
30
  i18n: {
30
31
  de: () => import('./i18n/de').then((m) => m.content),
31
32
  en: () => import('./i18n/en').then((m) => m.content),
@@ -12,4 +12,4 @@ const content = await developerCategory.i18n[locale]?.();
12
12
  ---
13
13
 
14
14
  {content && <SEORenderer content={{ locale, sections: content.seo }} />}
15
-
15
+
@@ -113,4 +113,4 @@ const { categoryTitle, tools = [] } = Astro.props;
113
113
  white-space: nowrap;
114
114
  }
115
115
  </style>
116
-
116
+
@@ -140,4 +140,4 @@ const otherLocales = Object.entries(localeUrls).filter(([l]) => l !== currentLoc
140
140
  box-shadow: inset -4px -2px 0 #1e293b;
141
141
  }
142
142
  </style>
143
-
143
+
package/src/data.ts CHANGED
@@ -8,4 +8,4 @@ export type {
8
8
  DeveloperToolEntry,
9
9
  DeveloperCategoryEntry,
10
10
  } from './types';
11
-
11
+
package/src/entries.ts CHANGED
@@ -56,6 +56,8 @@ export { cssBoxShadowGenerator } from './tool/cssBoxShadowGenerator/entry';
56
56
  export type { CssBoxShadowGeneratorLocaleContent } from './tool/cssBoxShadowGenerator/entry';
57
57
  export { promoteThisWebsite } from './tool/promoteThisWebsite/entry';
58
58
  export type { PromoteThisWebsiteLocaleContent } from './tool/promoteThisWebsite/entry';
59
+ export { dualOsIconPreview } from './tool/dualOsIconPreview/entry';
60
+ export type { DualOsIconPreviewLocaleContent } from './tool/dualOsIconPreview/entry';
59
61
  export { developerCategory } from './category';
60
62
  import { aspectRatio } from './tool/aspectRatio/entry';
61
63
  import { calculadoraTiempoDatos } from './tool/calculadoraTiempoDatos/entry';
package/src/env.d.ts CHANGED
@@ -2,4 +2,4 @@ declare module '*.astro' {
2
2
  const Component: (_props: Record<string, unknown>) => unknown;
3
3
  export default Component;
4
4
  }
5
-
5
+
package/src/index.ts CHANGED
@@ -71,3 +71,4 @@ export { JWT_DECODER_TOOL } from './tool/jwtDecoder/index';
71
71
 
72
72
  export { VISUAL_CSS_GRID_FLEXBOX_GENERATOR_TOOL } from './tool/visualCssGridFlexboxGenerator/index';
73
73
  export { CSS_BOX_SHADOW_GENERATOR_TOOL } from './tool/cssBoxShadowGenerator/index';
74
+ export { DUAL_OS_ICON_PREVIEW_TOOL } from './tool/dualOsIconPreview/index';
@@ -115,4 +115,4 @@ const { title, currentLocale = "es", localeUrls = {}, hasSidebar = false } = Ast
115
115
  }
116
116
  }
117
117
  </style>
118
-
118
+
@@ -1,162 +1,162 @@
1
- ---
2
- import PreviewLayout from "../../layouts/PreviewLayout.astro";
3
- import PreviewNavSidebar from "../../components/PreviewNavSidebar.astro";
4
- import { ALL_TOOLS } from "../../index";
5
- import {
6
- UtilityHeader,
7
- FAQSection,
8
- Bibliography,
9
- SEORenderer,
10
- } from "@jjlmoya/utils-shared";
11
- import type { KnownLocale, ToolLocaleContent } from "../../types";
12
- import type { UtilitySEOContent } from "@jjlmoya/utils-shared";
13
-
14
- export async function getStaticPaths() {
15
- const paths = [];
16
-
17
- for (const { entry, Component: lazyComp } of ALL_TOOLS) {
18
- const { default: Component } = await lazyComp();
19
- const localeEntries = Object.entries(entry.i18n) as [
20
- KnownLocale,
21
- () => Promise<ToolLocaleContent>,
22
- ][];
23
- const localeContents = await Promise.all(
24
- localeEntries.map(async ([locale, loader]) => ({
25
- locale,
26
- content: await loader(),
27
- })),
28
- );
29
-
30
- const localeUrls = Object.fromEntries(
31
- localeContents.map(({ locale, content }) => [
32
- locale,
33
- `/${locale}/${content.slug}`,
34
- ]),
35
- ) as Partial<Record<KnownLocale, string>>;
36
-
37
- const firstLoader = entry.i18n.en ?? Object.values(entry.i18n)[0];
38
- const englishSlug = firstLoader ? (await firstLoader()).slug : entry.id;
39
-
40
- for (const { locale, content } of localeContents) {
41
- const allToolsNav = (
42
- await Promise.all(
43
- ALL_TOOLS.map(async ({ entry: navEntry }) => {
44
- const loader = navEntry.i18n[locale] ?? navEntry.i18n.en;
45
- if (!loader) return null;
46
- const navContent = await loader();
47
- return {
48
- id: navEntry.id,
49
- title: navContent.title,
50
- href: `/${locale}/${navContent.slug}`,
51
- isActive: navEntry.id === entry.id,
52
- };
53
- }),
54
- )
55
- ).filter(Boolean) as NavItem[];
56
- paths.push({
57
- params: { locale, slug: content.slug },
58
- props: { Component, locale, content, localeUrls, allToolsNav, englishSlug },
59
- });
60
- }
61
- }
62
-
63
- return paths;
64
- }
65
-
66
- interface NavItem {
67
- id: string;
68
- title: string;
69
- href: string;
70
- isActive?: boolean;
71
- }
72
-
73
- interface Props {
74
- Component: unknown;
75
- locale: KnownLocale;
76
- content: ToolLocaleContent;
77
- localeUrls: Partial<Record<KnownLocale, string>>;
78
- allToolsNav: NavItem[];
79
- englishSlug: string;
80
- }
81
-
82
- const { Component, locale, content, localeUrls, allToolsNav, englishSlug } = Astro.props;
83
-
84
- const cssFiles = import.meta.glob("../../tool/*/*.css", { query: "?raw", import: "default" });
85
- const cssKey = Object.keys(cssFiles).find((k) => k.endsWith(`/${englishSlug}.css`));
86
- const cssLoader = cssKey ? cssFiles[cssKey] : undefined;
87
- const toolCss = cssLoader ? await cssLoader() as string : "";
88
-
89
- const seoContent: UtilitySEOContent = { locale, sections: content.seo ?? [] };
90
-
91
- const words = content.title.split(" ");
92
- const titleHighlight = words[0] || "";
93
- const titleBase = words.slice(1).join(" ") || "";
94
- ---
95
-
96
- <PreviewLayout
97
- title={content.title}
98
- currentLocale={locale}
99
- localeUrls={localeUrls}
100
- hasSidebar={true}
101
- >
102
- <PreviewNavSidebar
103
- slot="sidebar"
104
- categoryTitle="Tools"
105
- tools={allToolsNav}
106
- />
107
- <Fragment slot="head">
108
- {toolCss ? <Fragment set:html={`<style is:inline>${toolCss}</style>`} /> : null}
109
- {
110
- ( content.schemas ?? []).map((schema: unknown) => (
111
- <script
112
- is:inline
113
- type="application/ld+json"
114
- set:html={JSON.stringify(schema)}
115
- />
116
- ))
117
- }
118
- </Fragment>
119
-
120
- <div class="tool-page">
121
- <UtilityHeader
122
- titleHighlight={titleHighlight}
123
- titleBase={titleBase}
124
- description={content.description}
125
- />
126
-
127
- <section class="section-tool">
128
- <Component ui={content.ui} />
129
- </section>
130
-
131
- <section class="section-seo">
132
- <SEORenderer content={seoContent} />
133
- </section>
134
-
1
+ ---
2
+ import PreviewLayout from "../../layouts/PreviewLayout.astro";
3
+ import PreviewNavSidebar from "../../components/PreviewNavSidebar.astro";
4
+ import { ALL_TOOLS } from "../../index";
5
+ import {
6
+ UtilityHeader,
7
+ FAQSection,
8
+ Bibliography,
9
+ SEORenderer,
10
+ } from "@jjlmoya/utils-shared";
11
+ import type { KnownLocale, ToolLocaleContent } from "../../types";
12
+ import type { UtilitySEOContent } from "@jjlmoya/utils-shared";
13
+
14
+ export async function getStaticPaths() {
15
+ const paths = [];
16
+
17
+ for (const { entry, Component: lazyComp } of ALL_TOOLS) {
18
+ const { default: Component } = await lazyComp();
19
+ const localeEntries = Object.entries(entry.i18n) as [
20
+ KnownLocale,
21
+ () => Promise<ToolLocaleContent>,
22
+ ][];
23
+ const localeContents = await Promise.all(
24
+ localeEntries.map(async ([locale, loader]) => ({
25
+ locale,
26
+ content: await loader(),
27
+ })),
28
+ );
29
+
30
+ const localeUrls = Object.fromEntries(
31
+ localeContents.map(({ locale, content }) => [
32
+ locale,
33
+ `/${locale}/${content.slug}`,
34
+ ]),
35
+ ) as Partial<Record<KnownLocale, string>>;
36
+
37
+ const firstLoader = entry.i18n.en ?? Object.values(entry.i18n)[0];
38
+ const englishSlug = firstLoader ? (await firstLoader()).slug : entry.id;
39
+
40
+ for (const { locale, content } of localeContents) {
41
+ const allToolsNav = (
42
+ await Promise.all(
43
+ ALL_TOOLS.map(async ({ entry: navEntry }) => {
44
+ const loader = navEntry.i18n[locale] ?? navEntry.i18n.en;
45
+ if (!loader) return null;
46
+ const navContent = await loader();
47
+ return {
48
+ id: navEntry.id,
49
+ title: navContent.title,
50
+ href: `/${locale}/${navContent.slug}`,
51
+ isActive: navEntry.id === entry.id,
52
+ };
53
+ }),
54
+ )
55
+ ).filter(Boolean) as NavItem[];
56
+ paths.push({
57
+ params: { locale, slug: content.slug },
58
+ props: { Component, locale, content, localeUrls, allToolsNav, englishSlug },
59
+ });
60
+ }
61
+ }
62
+
63
+ return paths;
64
+ }
65
+
66
+ interface NavItem {
67
+ id: string;
68
+ title: string;
69
+ href: string;
70
+ isActive?: boolean;
71
+ }
72
+
73
+ interface Props {
74
+ Component: unknown;
75
+ locale: KnownLocale;
76
+ content: ToolLocaleContent;
77
+ localeUrls: Partial<Record<KnownLocale, string>>;
78
+ allToolsNav: NavItem[];
79
+ englishSlug: string;
80
+ }
81
+
82
+ const { Component, locale, content, localeUrls, allToolsNav, englishSlug } = Astro.props;
83
+
84
+ const cssFiles = import.meta.glob("../../tool/*/*.css", { query: "?raw", import: "default" });
85
+ const cssKey = Object.keys(cssFiles).find((k) => k.endsWith(`/${englishSlug}.css`));
86
+ const cssLoader = cssKey ? cssFiles[cssKey] : undefined;
87
+ const toolCss = cssLoader ? await cssLoader() as string : "";
88
+
89
+ const seoContent: UtilitySEOContent = { locale, sections: content.seo ?? [] };
90
+
91
+ const words = content.title.split(" ");
92
+ const titleHighlight = words[0] || "";
93
+ const titleBase = words.slice(1).join(" ") || "";
94
+ ---
95
+
96
+ <PreviewLayout
97
+ title={content.title}
98
+ currentLocale={locale}
99
+ localeUrls={localeUrls}
100
+ hasSidebar={true}
101
+ >
102
+ <PreviewNavSidebar
103
+ slot="sidebar"
104
+ categoryTitle="Tools"
105
+ tools={allToolsNav}
106
+ />
107
+ <Fragment slot="head">
108
+ {toolCss ? <Fragment set:html={`<style is:inline>${toolCss}</style>`} /> : null}
109
+ {
110
+ ( content.schemas ?? []).map((schema: unknown) => (
111
+ <script
112
+ is:inline
113
+ type="application/ld+json"
114
+ set:html={JSON.stringify(schema)}
115
+ />
116
+ ))
117
+ }
118
+ </Fragment>
119
+
120
+ <div class="tool-page">
121
+ <UtilityHeader
122
+ titleHighlight={titleHighlight}
123
+ titleBase={titleBase}
124
+ description={content.description}
125
+ />
126
+
127
+ <section class="section-tool">
128
+ <Component ui={content.ui} />
129
+ </section>
130
+
131
+ <section class="section-seo">
132
+ <SEORenderer content={seoContent} />
133
+ </section>
134
+
135
135
  <section class="section-faq">
136
- <FAQSection items={content.faq} title={content.ui.faqTitle} inLanguage={locale} />
137
- </section>
138
-
139
- <section class="section-bibliography">
140
- <Bibliography links={content.bibliography} title={content.ui.bibliographyTitle} />
141
- </section>
142
- </div>
143
- </PreviewLayout>
144
-
145
- <style>
146
- .tool-page {
147
- display: flex;
148
- flex-direction: column;
149
- gap: 2rem;
150
- }
151
- .section-tool {
152
- max-width: 1200px;
153
- margin: 0 auto;
154
- width: 100%;
155
- }
156
- .section-seo,
157
- .section-faq,
158
- .section-bibliography {
159
- padding-top: 2rem;
160
- border-top: 1px solid var(--border-color);
161
- }
162
- </style>
136
+ <FAQSection items={content.faq} title={content.faqTitle} inLanguage={locale} />
137
+ </section>
138
+
139
+ <section class="section-bibliography">
140
+ <Bibliography links={content.bibliography} title={content.bibliographyTitle} />
141
+ </section>
142
+ </div>
143
+ </PreviewLayout>
144
+
145
+ <style>
146
+ .tool-page {
147
+ display: flex;
148
+ flex-direction: column;
149
+ gap: 2rem;
150
+ }
151
+ .section-tool {
152
+ max-width: 1200px;
153
+ margin: 0 auto;
154
+ width: 100%;
155
+ }
156
+ .section-seo,
157
+ .section-faq,
158
+ .section-bibliography {
159
+ padding-top: 2rem;
160
+ border-top: 1px solid var(--border-color);
161
+ }
162
+ </style>
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  ---
3
3
  <meta http-equiv="refresh" content="0;url=/es" />
4
-
4
+
@@ -0,0 +1,46 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { readdirSync, readFileSync, existsSync } from 'fs';
3
+ import { join, relative } from 'path';
4
+
5
+ function findBibliographyAstroFiles(dir: string): string[] {
6
+ const files: string[] = [];
7
+ if (!existsSync(dir)) return files;
8
+ const entries = readdirSync(dir, { withFileTypes: true });
9
+
10
+ for (const entry of entries) {
11
+ const fullPath = join(dir, entry.name);
12
+ if (entry.isDirectory()) {
13
+ files.push(...findBibliographyAstroFiles(fullPath));
14
+ } else if (entry.isFile() && entry.name === 'bibliography.astro') {
15
+ files.push(fullPath);
16
+ }
17
+ }
18
+
19
+ return files;
20
+ }
21
+
22
+ const toolDir = join(process.cwd(), 'src', 'tool');
23
+ const bibliographyFiles = findBibliographyAstroFiles(toolDir);
24
+
25
+ describe('Bibliography Component Wellformed Export', () => {
26
+ it('found tool bibliography.astro components', () => {
27
+ expect(bibliographyFiles.length).toBeGreaterThan(0);
28
+ });
29
+
30
+ bibliographyFiles.forEach((file) => {
31
+ const relativePath = relative(process.cwd(), file);
32
+
33
+ it(`${relativePath} should use SharedBibliography from @jjlmoya/utils-shared`, () => {
34
+ const content = readFileSync(file, 'utf-8');
35
+
36
+ const usesSharedComponent =
37
+ content.includes('@jjlmoya/utils-shared') &&
38
+ (content.includes('Bibliography') || content.includes('SharedBibliography'));
39
+
40
+ expect(
41
+ usesSharedComponent,
42
+ `File "${relativePath}" does not use the standard Bibliography component from @jjlmoya/utils-shared, resulting in unstyled or raw bibliography output.`,
43
+ ).toBe(true);
44
+ });
45
+ });
46
+ });