@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.
- package/package.json +70 -70
- package/src/category/i18n/en.ts +1 -1
- package/src/category/i18n/es.ts +1 -1
- package/src/category/index.ts +2 -1
- package/src/category/seo.astro +1 -1
- package/src/components/PreviewNavSidebar.astro +1 -1
- package/src/components/PreviewToolbar.astro +1 -1
- package/src/data.ts +1 -1
- package/src/entries.ts +2 -0
- package/src/env.d.ts +1 -1
- package/src/index.ts +1 -0
- package/src/layouts/PreviewLayout.astro +1 -1
- package/src/pages/[locale]/[slug].astro +161 -161
- package/src/pages/index.astro +1 -1
- package/src/tests/bibliography_wellformed_export.test.ts +46 -0
- package/src/tests/category_seo_quality.test.ts +76 -0
- package/src/tests/entry_contract.test.ts +8 -2
- package/src/tests/faq_count.test.ts +1 -1
- package/src/tests/i18n_coverage.test.ts +2 -6
- package/src/tests/inverted_punctuation.test.ts +113 -113
- package/src/tests/locale_completeness.test.ts +1 -1
- package/src/tests/mocks/astro_mock.js +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/promote_this_website_i18n.test.ts +33 -0
- package/src/tests/seo_translation_completeness.test.ts +69 -0
- package/src/tests/seo_wellformed_export.test.ts +65 -0
- package/src/tests/slug_language_code_format.test.ts +25 -25
- package/src/tests/slug_uniqueness.test.ts +86 -86
- package/src/tests/tool_validation.test.ts +16 -16
- package/src/tool/aspectRatio/i18n/de.ts +164 -164
- package/src/tool/aspectRatio/i18n/ja.ts +1 -1
- package/src/tool/aspectRatio/i18n/ko.ts +1 -1
- package/src/tool/aspectRatio/i18n/pl.ts +164 -164
- package/src/tool/aspectRatio/i18n/ru.ts +164 -164
- package/src/tool/aspectRatio/i18n/zh.ts +165 -165
- package/src/tool/aspectRatio/seo.astro +15 -15
- package/src/tool/calculadoraTiempoDatos/i18n/de.ts +143 -143
- package/src/tool/calculadoraTiempoDatos/i18n/ja.ts +1 -1
- package/src/tool/calculadoraTiempoDatos/i18n/ko.ts +1 -1
- package/src/tool/calculadoraTiempoDatos/i18n/pl.ts +143 -143
- package/src/tool/calculadoraTiempoDatos/i18n/ru.ts +144 -144
- package/src/tool/calculadoraTiempoDatos/i18n/sv.ts +143 -143
- package/src/tool/calculadoraTiempoDatos/i18n/zh.ts +144 -144
- package/src/tool/calculadoraTiempoDatos/seo.astro +15 -15
- package/src/tool/colorConverter/i18n/de.ts +120 -120
- package/src/tool/colorConverter/i18n/ja.ts +1 -1
- package/src/tool/colorConverter/i18n/ko.ts +1 -1
- package/src/tool/colorConverter/i18n/ru.ts +120 -120
- package/src/tool/colorConverter/i18n/zh.ts +1 -1
- package/src/tool/colorConverter/seo.astro +15 -15
- package/src/tool/conversorExcelCsvHtml/i18n/ja.ts +1 -1
- package/src/tool/conversorExcelCsvHtml/i18n/ko.ts +1 -1
- package/src/tool/conversorExcelCsvHtml/i18n/pl.ts +124 -124
- package/src/tool/conversorExcelCsvHtml/i18n/ru.ts +124 -124
- package/src/tool/conversorExcelCsvHtml/i18n/zh.ts +125 -125
- package/src/tool/conversorExcelCsvHtml/seo.astro +15 -15
- package/src/tool/cronGenerator/i18n/ja.ts +1 -1
- package/src/tool/cronGenerator/i18n/ko.ts +1 -1
- package/src/tool/cronGenerator/i18n/zh.ts +183 -183
- package/src/tool/cronGenerator/seo.astro +15 -15
- package/src/tool/cssSpecificityCalculator/i18n/ja.ts +1 -1
- package/src/tool/cssSpecificityCalculator/i18n/ko.ts +1 -1
- package/src/tool/cssSpecificityCalculator/i18n/zh.ts +1 -1
- package/src/tool/cssSpecificityCalculator/seo.astro +15 -15
- package/src/tool/cssToInlineConverter/i18n/ja.ts +1 -1
- package/src/tool/cssToInlineConverter/i18n/ko.ts +1 -1
- package/src/tool/cssToInlineConverter/i18n/zh.ts +1 -1
- package/src/tool/cssToInlineConverter/seo.astro +15 -15
- package/src/tool/dualOsIconPreview/assets/day-check.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/fast-task.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/fortune-cookie.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/lexi-crash.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/pizzametrics.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/sauce-lab.webp +0 -0
- package/src/tool/dualOsIconPreview/assets/vesp.webp +0 -0
- package/src/tool/dualOsIconPreview/bibliography.astro +6 -0
- package/src/tool/dualOsIconPreview/bibliography.ts +7 -0
- package/src/tool/dualOsIconPreview/component.astro +117 -0
- package/src/tool/dualOsIconPreview/controller.ts +157 -0
- package/src/tool/dualOsIconPreview/dom-views.ts +82 -0
- package/src/tool/dualOsIconPreview/dual-ios-android-app-icon-preview.css +861 -0
- package/src/tool/dualOsIconPreview/entry.ts +31 -0
- package/src/tool/dualOsIconPreview/evaluator.ts +20 -0
- package/src/tool/dualOsIconPreview/i18n/de.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/en.ts +46 -0
- package/src/tool/dualOsIconPreview/i18n/es.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/fr.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/id.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/it.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/ja.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/ko.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/nl.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/pl.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/pt.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/ru.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/sv.ts +56 -0
- package/src/tool/dualOsIconPreview/i18n/tr.ts +43 -0
- package/src/tool/dualOsIconPreview/i18n/zh.ts +43 -0
- package/src/tool/dualOsIconPreview/index.ts +11 -0
- package/src/tool/dualOsIconPreview/logic.test.ts +63 -0
- package/src/tool/dualOsIconPreview/logic.ts +135 -0
- package/src/tool/dualOsIconPreview/seo.astro +15 -0
- package/src/tool/dualOsIconPreview/storage.ts +18 -0
- package/src/tool/dualOsIconPreview/ui.ts +52 -0
- package/src/tool/duplicateCssRemover/i18n/ja.ts +1 -1
- package/src/tool/duplicateCssRemover/i18n/ko.ts +1 -1
- package/src/tool/duplicateCssRemover/i18n/zh.ts +1 -1
- package/src/tool/duplicateCssRemover/seo.astro +15 -15
- package/src/tool/generadorSecurityTxt/i18n/ja.ts +1 -1
- package/src/tool/generadorSecurityTxt/i18n/ko.ts +1 -1
- package/src/tool/generadorSecurityTxt/i18n/zh.ts +1 -1
- package/src/tool/generadorSecurityTxt/seo.astro +15 -15
- package/src/tool/hashGenerator/i18n/ja.ts +1 -1
- package/src/tool/hashGenerator/i18n/ko.ts +1 -1
- package/src/tool/hashGenerator/seo.astro +15 -15
- package/src/tool/inspectorCertificadosSsl/i18n/ja.ts +1 -1
- package/src/tool/inspectorCertificadosSsl/i18n/ko.ts +1 -1
- package/src/tool/inspectorCertificadosSsl/i18n/zh.ts +1 -1
- package/src/tool/inspectorCertificadosSsl/seo.astro +15 -15
- package/src/tool/jsonFormatter/seo.astro +15 -15
- package/src/tool/jwtDecoder/i18n/es.ts +248 -248
- package/src/tool/jwtDecoder/i18n/fr.ts +248 -248
- package/src/tool/jwtDecoder/i18n/tr.ts +248 -248
- package/src/tool/keycode/seo.astro +15 -15
- package/src/tool/llmCostCalculator/i18n/fr.ts +149 -149
- package/src/tool/llmCostCalculator/i18n/ja.ts +1 -1
- package/src/tool/llmCostCalculator/i18n/ko.ts +1 -1
- package/src/tool/llmCostCalculator/seo.astro +15 -15
- package/src/tool/mobileMockupGenerator/i18n/ja.ts +1 -1
- package/src/tool/mobileMockupGenerator/i18n/ko.ts +1 -1
- package/src/tool/mobileMockupGenerator/i18n/zh.ts +1 -1
- package/src/tool/mobileMockupGenerator/seo.astro +15 -15
- package/src/tool/musicalTypography/i18n/ja.ts +1 -1
- package/src/tool/musicalTypography/i18n/ko.ts +1 -1
- package/src/tool/musicalTypography/i18n/zh.ts +1 -1
- package/src/tool/musicalTypography/seo.astro +15 -15
- package/src/tool/placeholderGenerator/i18n/ja.ts +1 -1
- package/src/tool/placeholderGenerator/i18n/ko.ts +1 -1
- package/src/tool/placeholderGenerator/i18n/zh.ts +1 -1
- package/src/tool/placeholderGenerator/seo.astro +15 -15
- package/src/tool/promoteThisWebsite/entry.ts +13 -0
- package/src/tool/promoteThisWebsite/i18n/de.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/fr.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/id.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/it.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/ja.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/ko.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/nl.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/pl.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/pt.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/ru.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/sv.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/tr.ts +95 -0
- package/src/tool/promoteThisWebsite/i18n/zh.ts +95 -0
- package/src/tool/promptLibrary/i18n/ja.ts +1 -1
- package/src/tool/promptLibrary/i18n/ko.ts +1 -1
- package/src/tool/promptLibrary/i18n/zh.ts +1 -1
- package/src/tool/promptLibrary/seo.astro +15 -15
- package/src/tool/readabilityCalculator/i18n/ja.ts +1 -1
- package/src/tool/readabilityCalculator/i18n/ko.ts +1 -1
- package/src/tool/readabilityCalculator/i18n/zh.ts +1 -1
- package/src/tool/readabilityCalculator/seo.astro +15 -15
- package/src/tool/serpPixelSimulator/entry.ts +30 -30
- package/src/tool/serpPixelSimulator/i18n/en.ts +211 -211
- package/src/tool/serpPixelSimulator/i18n/fr.ts +214 -214
- package/src/tool/serpPixelSimulator/i18n/ru.ts +214 -214
- package/src/tool/serpPixelSimulator/logic.ts +18 -18
- package/src/tool/serpPixelSimulator/serp-pixel-simulator.css +195 -195
- package/src/tool/svgSanitizer/i18n/ja.ts +1 -1
- package/src/tool/svgSanitizer/i18n/ko.ts +1 -1
- package/src/tool/svgSanitizer/seo.astro +15 -15
- package/src/tool/svgToCss/i18n/ja.ts +1 -1
- package/src/tool/svgToCss/i18n/ko.ts +1 -1
- package/src/tool/svgToCss/seo.astro +15 -15
- package/src/tool/urlCleaner/i18n/ja.ts +1 -1
- package/src/tool/urlCleaner/i18n/ko.ts +1 -1
- package/src/tool/urlCleaner/i18n/zh.ts +1 -1
- package/src/tool/urlCleaner/seo.astro +15 -15
- package/src/tool/urlEncoderDecoder/i18n/es.ts +146 -146
- package/src/tool/urlEncoderDecoder/i18n/ko.ts +1 -1
- package/src/tool/urlEncoderDecoder/seo.astro +15 -15
- package/src/tool/utmGenerator/i18n/ja.ts +1 -1
- package/src/tool/utmGenerator/i18n/ko.ts +1 -1
- package/src/tool/utmGenerator/i18n/zh.ts +1 -1
- package/src/tool/utmGenerator/seo.astro +15 -15
- package/src/tools.ts +2 -1
- package/src/types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jjlmoya/utils-developer",
|
|
3
|
-
"version": "1.
|
|
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
|
+
}
|
package/src/category/i18n/en.ts
CHANGED
|
@@ -27,7 +27,7 @@ export const content: CategoryLocaleContent = {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
type: 'tip',
|
|
30
|
-
title: '
|
|
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
|
],
|
package/src/category/i18n/es.ts
CHANGED
|
@@ -27,7 +27,7 @@ export const content: CategoryLocaleContent = {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
type: 'tip',
|
|
30
|
-
title: 'Privacidad
|
|
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
|
],
|
package/src/category/index.ts
CHANGED
|
@@ -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),
|
package/src/category/seo.astro
CHANGED
package/src/data.ts
CHANGED
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
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';
|
|
@@ -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.
|
|
137
|
-
</section>
|
|
138
|
-
|
|
139
|
-
<section class="section-bibliography">
|
|
140
|
-
<Bibliography links={content.bibliography} title={content.
|
|
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>
|
package/src/pages/index.astro
CHANGED
|
@@ -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
|
+
});
|