@jjlmoya/utils-developer 1.4.0 → 1.5.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 +2 -1
- package/src/category/i18n/de.ts +34 -0
- package/src/category/i18n/id.ts +34 -0
- package/src/category/i18n/it.ts +34 -0
- package/src/category/i18n/ja.ts +34 -0
- package/src/category/i18n/ko.ts +34 -0
- package/src/category/i18n/nl.ts +34 -0
- package/src/category/i18n/pl.ts +34 -0
- package/src/category/i18n/pt.ts +34 -0
- package/src/category/i18n/ru.ts +34 -0
- package/src/category/i18n/sv.ts +34 -0
- package/src/category/i18n/tr.ts +34 -0
- package/src/category/i18n/zh.ts +34 -0
- package/src/category/index.ts +13 -1
- package/src/tests/faq_count.test.ts +1 -1
- package/src/tests/i18n_coverage.test.ts +36 -0
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/slug_uniqueness.test.ts +81 -0
- package/src/tool/aspectRatio/i18n/de.ts +177 -0
- package/src/tool/aspectRatio/i18n/id.ts +177 -0
- package/src/tool/aspectRatio/i18n/it.ts +177 -0
- package/src/tool/aspectRatio/i18n/ja.ts +178 -0
- package/src/tool/aspectRatio/i18n/ko.ts +178 -0
- package/src/tool/aspectRatio/i18n/nl.ts +178 -0
- package/src/tool/aspectRatio/i18n/pl.ts +177 -0
- package/src/tool/aspectRatio/i18n/pt.ts +177 -0
- package/src/tool/aspectRatio/i18n/ru.ts +177 -0
- package/src/tool/aspectRatio/i18n/sv.ts +177 -0
- package/src/tool/aspectRatio/i18n/tr.ts +177 -0
- package/src/tool/aspectRatio/i18n/zh.ts +178 -0
- package/src/tool/aspectRatio/index.ts +15 -7
- package/src/tool/calculadoraTiempoDatos/i18n/de.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/id.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/it.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/ja.ts +151 -0
- package/src/tool/calculadoraTiempoDatos/i18n/ko.ts +151 -0
- package/src/tool/calculadoraTiempoDatos/i18n/nl.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/pl.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/pt.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/ru.ts +151 -0
- package/src/tool/calculadoraTiempoDatos/i18n/sv.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/tr.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/zh.ts +151 -0
- package/src/tool/calculadoraTiempoDatos/index.ts +15 -7
- package/src/tool/colorConverter/i18n/de.ts +126 -0
- package/src/tool/colorConverter/i18n/id.ts +126 -0
- package/src/tool/colorConverter/i18n/it.ts +126 -0
- package/src/tool/colorConverter/i18n/ja.ts +127 -0
- package/src/tool/colorConverter/i18n/ko.ts +127 -0
- package/src/tool/colorConverter/i18n/nl.ts +126 -0
- package/src/tool/colorConverter/i18n/pl.ts +126 -0
- package/src/tool/colorConverter/i18n/pt.ts +126 -0
- package/src/tool/colorConverter/i18n/ru.ts +126 -0
- package/src/tool/colorConverter/i18n/sv.ts +126 -0
- package/src/tool/colorConverter/i18n/tr.ts +126 -0
- package/src/tool/colorConverter/i18n/zh.ts +127 -0
- package/src/tool/colorConverter/index.ts +15 -7
- package/src/tool/conversorExcelCsvHtml/i18n/de.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/id.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/it.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/ja.ts +130 -0
- package/src/tool/conversorExcelCsvHtml/i18n/ko.ts +130 -0
- package/src/tool/conversorExcelCsvHtml/i18n/nl.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/pl.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/pt.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/ru.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/sv.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/tr.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/zh.ts +130 -0
- package/src/tool/conversorExcelCsvHtml/index.ts +15 -7
- package/src/tool/cronGenerator/i18n/de.ts +192 -0
- package/src/tool/cronGenerator/i18n/es.ts +2 -1
- package/src/tool/cronGenerator/i18n/fr.ts +2 -1
- package/src/tool/cronGenerator/i18n/id.ts +192 -0
- package/src/tool/cronGenerator/i18n/it.ts +192 -0
- package/src/tool/cronGenerator/i18n/ja.ts +192 -0
- package/src/tool/cronGenerator/i18n/ko.ts +192 -0
- package/src/tool/cronGenerator/i18n/nl.ts +192 -0
- package/src/tool/cronGenerator/i18n/pl.ts +192 -0
- package/src/tool/cronGenerator/i18n/pt.ts +192 -0
- package/src/tool/cronGenerator/i18n/ru.ts +192 -0
- package/src/tool/cronGenerator/i18n/sv.ts +192 -0
- package/src/tool/cronGenerator/i18n/tr.ts +192 -0
- package/src/tool/cronGenerator/i18n/zh.ts +192 -0
- package/src/tool/cronGenerator/index.ts +15 -7
- package/src/tool/cssSpecificityCalculator/i18n/de.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/id.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/it.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/ja.ts +169 -0
- package/src/tool/cssSpecificityCalculator/i18n/ko.ts +169 -0
- package/src/tool/cssSpecificityCalculator/i18n/nl.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/pl.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/pt.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/ru.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/sv.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/tr.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/zh.ts +169 -0
- package/src/tool/cssSpecificityCalculator/index.ts +15 -7
- package/src/tool/cssToInlineConverter/i18n/de.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/id.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/it.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/ja.ts +161 -0
- package/src/tool/cssToInlineConverter/i18n/ko.ts +161 -0
- package/src/tool/cssToInlineConverter/i18n/nl.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/pl.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/pt.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/ru.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/sv.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/tr.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/zh.ts +161 -0
- package/src/tool/cssToInlineConverter/index.ts +15 -7
- package/src/tool/duplicateCssRemover/i18n/de.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/id.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/it.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/ja.ts +168 -0
- package/src/tool/duplicateCssRemover/i18n/ko.ts +168 -0
- package/src/tool/duplicateCssRemover/i18n/nl.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/pl.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/pt.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/ru.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/sv.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/tr.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/zh.ts +168 -0
- package/src/tool/duplicateCssRemover/index.ts +15 -7
- package/src/tool/generadorSecurityTxt/i18n/de.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/id.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/it.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/ja.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/ko.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/nl.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/pl.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/pt.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/ru.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/sv.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/tr.ts +174 -0
- package/src/tool/generadorSecurityTxt/i18n/zh.ts +174 -0
- package/src/tool/generadorSecurityTxt/index.ts +15 -7
- package/src/tool/hashGenerator/i18n/de.ts +119 -0
- package/src/tool/hashGenerator/i18n/id.ts +119 -0
- package/src/tool/hashGenerator/i18n/it.ts +118 -0
- package/src/tool/hashGenerator/i18n/ja.ts +119 -0
- package/src/tool/hashGenerator/i18n/ko.ts +119 -0
- package/src/tool/hashGenerator/i18n/nl.ts +119 -0
- package/src/tool/hashGenerator/i18n/pl.ts +118 -0
- package/src/tool/hashGenerator/i18n/pt.ts +118 -0
- package/src/tool/hashGenerator/i18n/ru.ts +119 -0
- package/src/tool/hashGenerator/i18n/sv.ts +119 -0
- package/src/tool/hashGenerator/i18n/tr.ts +118 -0
- package/src/tool/hashGenerator/i18n/zh.ts +119 -0
- package/src/tool/hashGenerator/index.ts +15 -7
- package/src/tool/inspectorCertificadosSsl/i18n/de.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/id.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/it.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/ja.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/ko.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/nl.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/pl.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/pt.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/ru.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/sv.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/tr.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/i18n/zh.ts +215 -0
- package/src/tool/inspectorCertificadosSsl/index.ts +24 -0
- package/src/tool/jsonFormatter/i18n/de.ts +157 -0
- package/src/tool/jsonFormatter/i18n/es.ts +2 -1
- package/src/tool/jsonFormatter/i18n/fr.ts +2 -1
- package/src/tool/jsonFormatter/i18n/id.ts +157 -0
- package/src/tool/jsonFormatter/i18n/it.ts +156 -0
- package/src/tool/jsonFormatter/i18n/ja.ts +157 -0
- package/src/tool/jsonFormatter/i18n/ko.ts +157 -0
- package/src/tool/jsonFormatter/i18n/nl.ts +157 -0
- package/src/tool/jsonFormatter/i18n/pl.ts +156 -0
- package/src/tool/jsonFormatter/i18n/pt.ts +156 -0
- package/src/tool/jsonFormatter/i18n/ru.ts +157 -0
- package/src/tool/jsonFormatter/i18n/sv.ts +157 -0
- package/src/tool/jsonFormatter/i18n/tr.ts +157 -0
- package/src/tool/jsonFormatter/i18n/zh.ts +157 -0
- package/src/tool/jsonFormatter/index.ts +15 -7
- package/src/tool/keycode/i18n/de.ts +161 -0
- package/src/tool/keycode/i18n/es.ts +2 -1
- package/src/tool/keycode/i18n/fr.ts +2 -1
- package/src/tool/keycode/i18n/id.ts +161 -0
- package/src/tool/keycode/i18n/it.ts +161 -0
- package/src/tool/keycode/i18n/ja.ts +161 -0
- package/src/tool/keycode/i18n/ko.ts +161 -0
- package/src/tool/keycode/i18n/nl.ts +161 -0
- package/src/tool/keycode/i18n/pl.ts +161 -0
- package/src/tool/keycode/i18n/pt.ts +160 -0
- package/src/tool/keycode/i18n/ru.ts +160 -0
- package/src/tool/keycode/i18n/sv.ts +160 -0
- package/src/tool/keycode/i18n/tr.ts +160 -0
- package/src/tool/keycode/i18n/zh.ts +161 -0
- package/src/tool/keycode/index.ts +15 -7
- package/src/tool/llmCostCalculator/i18n/de.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/fr.ts +2 -1
- package/src/tool/llmCostCalculator/i18n/id.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/it.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/ja.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/ko.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/nl.ts +166 -0
- package/src/tool/llmCostCalculator/i18n/pl.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/pt.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/ru.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/sv.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/tr.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/zh.ts +166 -0
- package/src/tool/llmCostCalculator/index.ts +24 -0
- package/src/tool/mobileMockupGenerator/i18n/de.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/id.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/it.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/ja.ts +122 -0
- package/src/tool/mobileMockupGenerator/i18n/ko.ts +122 -0
- package/src/tool/mobileMockupGenerator/i18n/nl.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/pl.ts +31 -0
- package/src/tool/mobileMockupGenerator/i18n/pt.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/ru.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/sv.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/tr.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/zh.ts +122 -0
- package/src/tool/mobileMockupGenerator/index.ts +24 -0
- package/src/tool/musicalTypography/i18n/de.ts +179 -0
- package/src/tool/musicalTypography/i18n/id.ts +179 -0
- package/src/tool/musicalTypography/i18n/it.ts +179 -0
- package/src/tool/musicalTypography/i18n/ja.ts +180 -0
- package/src/tool/musicalTypography/i18n/ko.ts +180 -0
- package/src/tool/musicalTypography/i18n/nl.ts +179 -0
- package/src/tool/musicalTypography/i18n/pl.ts +179 -0
- package/src/tool/musicalTypography/i18n/pt.ts +101 -0
- package/src/tool/musicalTypography/i18n/ru.ts +47 -0
- package/src/tool/musicalTypography/i18n/sv.ts +29 -0
- package/src/tool/musicalTypography/i18n/tr.ts +29 -0
- package/src/tool/musicalTypography/i18n/zh.ts +30 -0
- package/src/tool/musicalTypography/index.ts +15 -7
- package/src/tool/placeholderGenerator/i18n/de.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/id.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/it.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/ja.ts +177 -0
- package/src/tool/placeholderGenerator/i18n/ko.ts +177 -0
- package/src/tool/placeholderGenerator/i18n/nl.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/pl.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/pt.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/ru.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/sv.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/tr.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/zh.ts +177 -0
- package/src/tool/placeholderGenerator/index.ts +24 -0
- package/src/tool/promptLibrary/i18n/de.ts +131 -0
- package/src/tool/promptLibrary/i18n/id.ts +131 -0
- package/src/tool/promptLibrary/i18n/it.ts +131 -0
- package/src/tool/promptLibrary/i18n/ja.ts +132 -0
- package/src/tool/promptLibrary/i18n/ko.ts +132 -0
- package/src/tool/promptLibrary/i18n/nl.ts +131 -0
- package/src/tool/promptLibrary/i18n/pl.ts +28 -0
- package/src/tool/promptLibrary/i18n/pt.ts +101 -0
- package/src/tool/promptLibrary/i18n/ru.ts +101 -0
- package/src/tool/promptLibrary/i18n/sv.ts +93 -0
- package/src/tool/promptLibrary/i18n/tr.ts +93 -0
- package/src/tool/promptLibrary/i18n/zh.ts +94 -0
- package/src/tool/promptLibrary/index.ts +24 -0
- package/src/tool/readabilityCalculator/i18n/de.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/id.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/it.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/ja.ts +134 -0
- package/src/tool/readabilityCalculator/i18n/ko.ts +134 -0
- package/src/tool/readabilityCalculator/i18n/nl.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/pl.ts +29 -0
- package/src/tool/readabilityCalculator/i18n/pt.ts +91 -0
- package/src/tool/readabilityCalculator/i18n/ru.ts +91 -0
- package/src/tool/readabilityCalculator/i18n/sv.ts +43 -0
- package/src/tool/readabilityCalculator/i18n/tr.ts +43 -0
- package/src/tool/readabilityCalculator/i18n/zh.ts +44 -0
- package/src/tool/readabilityCalculator/index.ts +24 -0
- package/src/tool/svgSanitizer/i18n/de.ts +125 -0
- package/src/tool/svgSanitizer/i18n/id.ts +125 -0
- package/src/tool/svgSanitizer/i18n/it.ts +125 -0
- package/src/tool/svgSanitizer/i18n/ja.ts +126 -0
- package/src/tool/svgSanitizer/i18n/ko.ts +126 -0
- package/src/tool/svgSanitizer/i18n/nl.ts +125 -0
- package/src/tool/svgSanitizer/i18n/pl.ts +125 -0
- package/src/tool/svgSanitizer/i18n/pt.ts +30 -0
- package/src/tool/svgSanitizer/i18n/ru.ts +126 -0
- package/src/tool/svgSanitizer/i18n/sv.ts +126 -0
- package/src/tool/svgSanitizer/i18n/tr.ts +126 -0
- package/src/tool/svgSanitizer/i18n/zh.ts +126 -0
- package/src/tool/svgSanitizer/index.ts +24 -0
- package/src/tool/svgToCss/i18n/de.ts +174 -0
- package/src/tool/svgToCss/i18n/id.ts +174 -0
- package/src/tool/svgToCss/i18n/it.ts +174 -0
- package/src/tool/svgToCss/i18n/ja.ts +175 -0
- package/src/tool/svgToCss/i18n/ko.ts +175 -0
- package/src/tool/svgToCss/i18n/nl.ts +174 -0
- package/src/tool/svgToCss/i18n/pl.ts +174 -0
- package/src/tool/svgToCss/i18n/pt.ts +174 -0
- package/src/tool/svgToCss/i18n/ru.ts +174 -0
- package/src/tool/svgToCss/i18n/sv.ts +174 -0
- package/src/tool/svgToCss/i18n/tr.ts +174 -0
- package/src/tool/svgToCss/i18n/zh.ts +175 -0
- package/src/tool/svgToCss/index.ts +15 -7
- package/src/tool/urlCleaner/i18n/de.ts +116 -0
- package/src/tool/urlCleaner/i18n/id.ts +116 -0
- package/src/tool/urlCleaner/i18n/it.ts +116 -0
- package/src/tool/urlCleaner/i18n/ja.ts +117 -0
- package/src/tool/urlCleaner/i18n/ko.ts +117 -0
- package/src/tool/urlCleaner/i18n/nl.ts +116 -0
- package/src/tool/urlCleaner/i18n/pl.ts +29 -0
- package/src/tool/urlCleaner/i18n/pt.ts +43 -0
- package/src/tool/urlCleaner/i18n/ru.ts +43 -0
- package/src/tool/urlCleaner/i18n/sv.ts +43 -0
- package/src/tool/urlCleaner/i18n/tr.ts +43 -0
- package/src/tool/urlCleaner/i18n/zh.ts +44 -0
- package/src/tool/urlCleaner/index.ts +24 -0
- package/src/tool/urlEncoderDecoder/i18n/de.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/id.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/it.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/ja.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/ko.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/nl.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/pl.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/pt.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/ru.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/sv.ts +163 -0
- package/src/tool/urlEncoderDecoder/i18n/tr.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/zh.ts +163 -0
- package/src/tool/urlEncoderDecoder/index.ts +15 -7
- package/src/tool/utmGenerator/i18n/de.ts +118 -0
- package/src/tool/utmGenerator/i18n/id.ts +118 -0
- package/src/tool/utmGenerator/i18n/it.ts +118 -0
- package/src/tool/utmGenerator/i18n/ja.ts +118 -0
- package/src/tool/utmGenerator/i18n/ko.ts +118 -0
- package/src/tool/utmGenerator/i18n/nl.ts +118 -0
- package/src/tool/utmGenerator/i18n/pl.ts +117 -0
- package/src/tool/utmGenerator/i18n/pt.ts +118 -0
- package/src/tool/utmGenerator/i18n/ru.ts +118 -0
- package/src/tool/utmGenerator/i18n/sv.ts +118 -0
- package/src/tool/utmGenerator/i18n/tr.ts +117 -0
- package/src/tool/utmGenerator/i18n/zh.ts +118 -0
- package/src/tool/utmGenerator/index.ts +15 -7
- package/src/types.ts +1 -2
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { CssSpecificityCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'css-spezifitaet-rechner';
|
|
6
|
+
const title = 'CSS Spezifitätsrechner Online. Selektorgewicht Visualisierer';
|
|
7
|
+
const description =
|
|
8
|
+
'Berechnen Sie die Spezifität und das genaue Gewicht jedes CSS-Selektors. Visuelles Tool, um zu verstehen, welche CSS-Regel in der Kaskade gewinnt, und um die Verwendung von !important zu vermeiden.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Was ist CSS-Spezifität?',
|
|
13
|
+
answer:
|
|
14
|
+
'Spezifität ist der Algorithmus, den Browser verwenden, um zu entscheiden, welche CSS-Regel auf ein Element angewendet wird, wenn mehrere Regeln konkurrieren. Sie wird als dreispaltiger Wert (A, B, C) dargestellt, der IDs, Klassen/Attribute/Pseudoklassen bzw. Elemente/Pseudoelemente angibt.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Kann eine Klasse jemals eine ID in der Spezifität schlagen?',
|
|
18
|
+
answer:
|
|
19
|
+
'Nicht direkt. Eine ID (1,0,0) schlägt immer eine beliebige Anzahl von Klassen (0,N,0), da es bei der Spezifität keinen Übertrag zwischen den Spalten gibt. Hundert Klassen (0,100,0) werden niemals eine einzige ID (1,0,0) schlagen.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Was passiert, wenn zwei Selektoren die gleiche Spezifität haben?',
|
|
23
|
+
answer:
|
|
24
|
+
'Wenn zwei Selektoren genau das gleiche Gewicht haben, gewinnt derjenige, der zuletzt in der CSS-Datei deklariert wurde. Dies wird als natürliche Kaskadenreihenfolge bezeichnet. Dieser Rechner warnt Sie visuell, wenn ein Gleichstand auftritt.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Warum gilt die Verwendung von !important als schlechte Praxis?',
|
|
28
|
+
answer:
|
|
29
|
+
'Die Anweisung !important bricht die natürliche CSS-Kaskade auf, indem sie eine Deklaration gegenüber jeder anderen Regel erzwingt. Dies führt zu Konflikten, die in großen Projekten schwer zu debuggen sind. Methodiken wie BEM plädieren dafür, die Spezifität flach zu halten, um !important niemals zu benötigen.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Geben Sie den ersten Selektor ein',
|
|
36
|
+
text: 'Geben Sie Selektor A in das linke Textfeld ein, zum Beispiel: #header .nav-item > a. Die Zähler für IDs, Klassen und Elemente werden sofort aktualisiert.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Geben Sie den zweiten Selektor ein',
|
|
40
|
+
text: 'Geben Sie Selektor B in das rechte Textfeld ein, zum Beispiel: ul li.active a:hover. Beobachten Sie, wie sich die Gewichte in Echtzeit ändern.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Lesen Sie das Ergebnis',
|
|
44
|
+
text: 'Der Rechner hebt den gewinnenden Selektorblock mit einem grünen Banner hervor. Wenn beide gleichauf liegen, erscheint eine Meldung, die die Kaskadenreihenfolge als Entscheidungsfaktor erklärt.',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
49
|
+
'@context': 'https://schema.org',
|
|
50
|
+
'@type': 'FAQPage',
|
|
51
|
+
mainEntity: faqData.map((item) => ({
|
|
52
|
+
'@type': 'Question',
|
|
53
|
+
name: item.question,
|
|
54
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
59
|
+
'@context': 'https://schema.org',
|
|
60
|
+
'@type': 'HowTo',
|
|
61
|
+
name: title,
|
|
62
|
+
description,
|
|
63
|
+
step: howToData.map((step, i) => ({
|
|
64
|
+
'@type': 'HowToStep',
|
|
65
|
+
position: i + 1,
|
|
66
|
+
name: step.name,
|
|
67
|
+
text: step.text,
|
|
68
|
+
})),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
72
|
+
'@context': 'https://schema.org',
|
|
73
|
+
'@type': 'SoftwareApplication',
|
|
74
|
+
name: title,
|
|
75
|
+
description,
|
|
76
|
+
applicationCategory: 'UtilityApplication',
|
|
77
|
+
operatingSystem: 'All',
|
|
78
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
79
|
+
inLanguage: 'de',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'Selektor A',
|
|
84
|
+
labelB: 'Selektor B',
|
|
85
|
+
placeholderA: 'z.B. #header .nav-item > a',
|
|
86
|
+
placeholderB: 'z.B. ul li.active a:hover',
|
|
87
|
+
cardIds: 'IDs',
|
|
88
|
+
cardClasses: 'Klassen / Pseudos',
|
|
89
|
+
cardElements: 'Elemente',
|
|
90
|
+
bannerWinner: 'Dieser Selektor gewinnt!',
|
|
91
|
+
msgTie: 'Beide Selektoren haben das gleiche Gewicht. Wenn sie um das gleiche Element konkurrieren, gewinnt derjenige, der <strong>zuletzt</strong> im CSS geschrieben wurde.',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'Häufig gestellte Fragen',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: 'Referenzen und Dokumentation',
|
|
102
|
+
bibliography: [
|
|
103
|
+
{
|
|
104
|
+
name: 'MDN Web Docs: CSS-Spezifität',
|
|
105
|
+
url: 'https://developer.mozilla.org/en/docs/Web/CSS/Specificity',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'W3C: Selektoren Level 3 - Spezifität',
|
|
109
|
+
url: 'https://www.w3.org/TR/selectors-3/#specificity',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
howTo: howToData,
|
|
113
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
114
|
+
seo: [
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'Was ist CSS-Spezifität?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'Die CSS-Spezifität ist der Algorithmus, nach dem Browser entscheiden, welche Eigenschaftswerte auf ein bestimmtes Element angewendet werden. Es ist im Grunde ein mathematischer Wert, der dem Browser sagt, „wie spezifisch“ eine Regel ist.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Wenn zwei Regeln unterschiedliche Spezifitätsstufen haben, gewinnt diejenige mit dem höheren Gewicht, unabhängig von der Reihenfolge, in der sie geschrieben wurden. Wenn beide das gleiche Gewicht haben, gewinnt die letzte im Quellcode deklarierte Regel.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'So berechnen Sie die CSS-Spezifität',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Die Spezifität wird auf der Grundlage von drei Kategorien berechnet, die ein dreispaltiges Gewicht bilden, das oft als <strong>(A, B, C)</strong> ausgedrückt wird:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>Spalte A (IDs):</strong> Zählt die Anzahl der eindeutigen Identifikatoren. Beispiel: <code>#header</code> zählt als 1 in Spalte A.',
|
|
141
|
+
'<strong>Spalte B (Klassen, Attribute und Pseudoklassen):</strong> Zählt alle Klassen (<code>.button</code>), Attribute (<code>[type="text"]</code>) und Pseudoklassen (<code>:hover</code>).',
|
|
142
|
+
'<strong>Spalte C (Elemente und Pseudoelemente):</strong> Zählt alle HTML-Elemente (<code>div</code>, <code>h1</code>) und Pseudoelemente (<code>::before</code>).',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: 'Die goldene Regel: Kein numerischer Übertrag',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: 'Eine Regel mit der Spezifität (0,50,0) wird <strong>niemals</strong> spezifischer sein als eine Regel (1,0,0). <strong>Eine einzige ID schlägt unendlich viele Klassen.</strong> Spalten laufen niemals ineinander über.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: 'Das Problem mit !important und der BEM-Architektur',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: 'Die Anweisung <code>!important</code> ist eine Ausnahme von den Spezifitätsregeln. Wenn sie verwendet wird, überschreibt diese Deklaration automatisch jede andere. Sie gilt als schlechte Praxis, da sie die natürliche Kaskade zerstört.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'Um Spezifitätskriege in großen Projekten zu vermeiden, plädieren Methodiken wie <strong>BEM</strong> für die Verwendung von Selektoren mit nur einer Ebene von Klassen, wodurch die Spezifität künstlich flach bei (0,1,0) gehalten wird.',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { CssSpecificityCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'kalkulator-spesifisitas-css';
|
|
6
|
+
const title = 'Kalkulator Spesifisitas CSS Online. Visualisator Bobot Selektor';
|
|
7
|
+
const description =
|
|
8
|
+
'Hitung spesifisitas dan bobot tepat dari selektor CSS apa pun. Alat visual untuk memahami aturan CSS mana yang menang dalam kaskade dan menghindari penggunaan !important.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Apa itu spesifisitas CSS?',
|
|
13
|
+
answer:
|
|
14
|
+
'Spesifisitas adalah algoritma yang digunakan browser untuk memutuskan aturan CSS mana yang diterapkan pada suatu elemen ketika beberapa aturan bersaing. Ini direpresentasikan sebagai skor tiga kolom (A, B, C) yang masing-masing menunjukkan ID, kelas/atribut/kelas semu, dan elemen/elemen semu.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Dapatkah sebuah kelas mengalahkan ID dalam spesifisitas?',
|
|
18
|
+
answer:
|
|
19
|
+
'Tidak secara langsung. Sebuah ID (1,0,0) selalu mengalahkan sejumlah kelas (0,N,0) karena spesifisitas tidak memiliki peralihan antar kolom. Seratus kelas (0,100,0) tidak akan pernah mengalahkan satu ID pun (1,0,0).',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Apa yang terjadi jika dua selektor memiliki spesifisitas yang sama?',
|
|
23
|
+
answer:
|
|
24
|
+
'Ketika dua selektor memiliki bobot yang persis sama, yang dinyatakan terakhir di file CSS yang menang. Ini dikenal sebagai urutan kaskade alami. Kalkulator ini secara visual memperingatkan Anda ketika terjadi seri.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Mengapa menggunakan !important dianggap sebagai praktik buruk?',
|
|
28
|
+
answer:
|
|
29
|
+
'Arahan !important merusak kaskade CSS alami dengan memaksa deklarasi atas aturan lainnya. Ini menciptakan konflik yang sulit di-debug dalam proyek besar. Metodologi seperti BEM menyarankan agar spesifisitas tetap datar agar tidak memerlukan !important.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Masukkan selektor pertama',
|
|
36
|
+
text: 'Ketik Selektor A di kolom teks kiri, misalnya: #header .nav-item > a. Penghitung ID, Kelas, dan Elemen akan diperbarui secara instan.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Masukkan selektor kedua',
|
|
40
|
+
text: 'Ketik Selektor B di kolom teks kanan, misalnya: ul li.active a:hover. Perhatikan bagaimana bobot berubah secara real-time.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Baca hasilnya',
|
|
44
|
+
text: 'Kalkulator akan menyoroti blok selektor yang menang dengan spanduk hijau. Jika keduanya seri, pesan seri akan muncul menjelaskan urutan kaskade sebagai penentu kemenangan.',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
49
|
+
'@context': 'https://schema.org',
|
|
50
|
+
'@type': 'FAQPage',
|
|
51
|
+
mainEntity: faqData.map((item) => ({
|
|
52
|
+
'@type': 'Question',
|
|
53
|
+
name: item.question,
|
|
54
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
59
|
+
'@context': 'https://schema.org',
|
|
60
|
+
'@type': 'HowTo',
|
|
61
|
+
name: title,
|
|
62
|
+
description,
|
|
63
|
+
step: howToData.map((step, i) => ({
|
|
64
|
+
'@type': 'HowToStep',
|
|
65
|
+
position: i + 1,
|
|
66
|
+
name: step.name,
|
|
67
|
+
text: step.text,
|
|
68
|
+
})),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
72
|
+
'@context': 'https://schema.org',
|
|
73
|
+
'@type': 'SoftwareApplication',
|
|
74
|
+
name: title,
|
|
75
|
+
description,
|
|
76
|
+
applicationCategory: 'UtilityApplication',
|
|
77
|
+
operatingSystem: 'All',
|
|
78
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
79
|
+
inLanguage: 'id',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'Selektor A',
|
|
84
|
+
labelB: 'Selektor B',
|
|
85
|
+
placeholderA: 'misal: #header .nav-item > a',
|
|
86
|
+
placeholderB: 'misal: ul li.active a:hover',
|
|
87
|
+
cardIds: 'ID',
|
|
88
|
+
cardClasses: 'Kelas / Semu',
|
|
89
|
+
cardElements: 'Elemen',
|
|
90
|
+
bannerWinner: 'Selektor ini menang!',
|
|
91
|
+
msgTie: 'Kedua selektor memiliki bobot yang sama. Jika mereka bersaing untuk elemen yang sama, yang ditulis <strong>terakhir</strong> di CSS yang menang.',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'Pertanyaan yang Sering Diajukan',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: 'Referensi dan Dokumentasi',
|
|
102
|
+
bibliography: [
|
|
103
|
+
{
|
|
104
|
+
name: 'MDN Web Docs: CSS Specificity',
|
|
105
|
+
url: 'https://developer.mozilla.org/en/docs/Web/CSS/Specificity',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'W3C: Selectors Level 3 - Specificity',
|
|
109
|
+
url: 'https://www.w3.org/TR/selectors-3/#specificity',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
howTo: howToData,
|
|
113
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
114
|
+
seo: [
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'Apa Itu Spesifisitas CSS?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'Spesifisitas CSS adalah algoritma yang digunakan browser untuk memutuskan nilai properti mana yang diterapkan pada elemen tertentu. Ini pada dasarnya adalah skor matematis yang memberi tahu browser "seberapa spesifik" suatu aturan.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Jika dua aturan memiliki tingkat spesifisitas yang berbeda, aturan dengan bobot lebih tinggi akan menang, terlepas dari urutan penulisannya. Jika keduanya memiliki bobot yang sama, aturan terakhir yang dinyatakan dalam kode sumber yang menang.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Cara Menghitung Spesifisitas CSS',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Spesifisitas dihitung berdasarkan tiga kategori yang membentuk bobot tiga kolom, sering dinyatakan sebagai <strong>(A, B, C)</strong>:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>Kolom A (ID):</strong> Menghitung jumlah pengidentifikasi unik. Contoh: <code>#header</code> dihitung sebagai 1 di kolom A.',
|
|
141
|
+
'<strong>Kolom B (Kelas, Atribut, dan Kelas Semu):</strong> Menghitung semua kelas (<code>.button</code>), atribut (<code>[type="text"]</code>), dan kelas semu (<code>:hover</code>).',
|
|
142
|
+
'<strong>Kolom C (Elemen dan Elemen Semu):</strong> Menghitung semua elemen HTML (<code>div</code>, <code>h1</code>) dan elemen semu (<code>::before</code>).',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: 'Aturan Emas: Tidak Ada Peralihan Numerik',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: 'Aturan dengan spesifisitas (0,50,0) <strong>tidak akan pernah</strong> lebih spesifik daripada aturan (1,0,0). <strong>Satu ID mengalahkan kelas yang tak terhingga jumlahnya.</strong> Kolom tidak pernah melimpah satu sama lain.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: 'Masalah dengan !important dan Arsitektur BEM',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: 'Arahan <code>!important</code> adalah pengecualian untuk aturan spesifisitas. Saat digunakan, deklarasi tersebut secara otomatis menimpa yang lain. Ini dianggap sebagai praktik buruk karena merusak kaskade alami.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'Untuk menghindari perang spesifisitas dalam proyek besar, metodologi seperti <strong>BEM</strong> menyarankan penggunaan selektor kelas kedalaman tunggal saja, secara artifisial menjaga spesifisitas tetap datar di (0,1,0).',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { CssSpecificityCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'calcolatore-specificita-css';
|
|
6
|
+
const title = 'Calcolatore di Specificità CSS Online. Visualizzatore di Peso del Selettore';
|
|
7
|
+
const description =
|
|
8
|
+
'Calcola la specificità e il peso esatto di qualsiasi selettore CSS. Strumento visivo per capire quale regola CSS prevale nella cascata ed evitare di ricorrere a !important.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Cos\'è la specificità CSS?',
|
|
13
|
+
answer:
|
|
14
|
+
'La specificità è l\'algoritmo che i browser usano per decidere quale regola CSS applicare a un elemento quando più regole sono in competizione. Viene rappresentata come un punteggio a tre colonne (A, B, C) che indica rispettivamente ID, classi/attributi/pseudo-classi ed elementi/pseudo-elementi.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Una classe può mai battere un ID in specificità?',
|
|
18
|
+
answer:
|
|
19
|
+
'No, non direttamente. Un ID (1,0,0) batte sempre qualsiasi numero di classi (0,N,0) perché la specificità non ha riporto numerico tra le colonne. Cento classi (0,100,0) non supereranno mai un singolo ID (1,0,0).',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Cosa succede quando due selettori hanno la stessa specificità?',
|
|
23
|
+
answer:
|
|
24
|
+
'Quando due selettori hanno esattamente lo stesso peso, vince quello dichiarato per ultimo nel file CSS. Questo è noto come ordine naturale della cascata. Questo calcolatore ti avvisa visivamente quando si verifica un pareggio.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Perché usare !important è considerato una cattiva pratica?',
|
|
28
|
+
answer:
|
|
29
|
+
'La direttiva !important interrompe la cascata CSS naturale forzando una dichiarazione su qualsiasi altra regola. Questo crea conflitti difficili da risolvere nei progetti grandi. Metodologie come BEM promuovono una specificità piatta per evitare di dover ricorrere a !important.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Inserisci il primo selettore',
|
|
36
|
+
text: 'Digita il Selettore A nel campo di testo a sinistra, ad esempio: #header .nav-item > a. I contatori di ID, Classi ed Elementi si aggiorneranno immediatamente.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Inserisci il secondo selettore',
|
|
40
|
+
text: 'Digita il Selettore B nel campo di testo a destra, ad esempio: ul li.active a:hover. Osserva come cambiano i pesi in tempo reale.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Leggi il risultato',
|
|
44
|
+
text: 'Il calcolatore evidenzierà con un banner verde il blocco del selettore vincente. Se entrambi pareggiano, apparirà un messaggio che spiega come l\'ordine della cascata funge da spareggio.',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
49
|
+
'@context': 'https://schema.org',
|
|
50
|
+
'@type': 'FAQPage',
|
|
51
|
+
mainEntity: faqData.map((item) => ({
|
|
52
|
+
'@type': 'Question',
|
|
53
|
+
name: item.question,
|
|
54
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
59
|
+
'@context': 'https://schema.org',
|
|
60
|
+
'@type': 'HowTo',
|
|
61
|
+
name: title,
|
|
62
|
+
description,
|
|
63
|
+
step: howToData.map((step, i) => ({
|
|
64
|
+
'@type': 'HowToStep',
|
|
65
|
+
position: i + 1,
|
|
66
|
+
name: step.name,
|
|
67
|
+
text: step.text,
|
|
68
|
+
})),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
72
|
+
'@context': 'https://schema.org',
|
|
73
|
+
'@type': 'SoftwareApplication',
|
|
74
|
+
name: title,
|
|
75
|
+
description,
|
|
76
|
+
applicationCategory: 'UtilityApplication',
|
|
77
|
+
operatingSystem: 'All',
|
|
78
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
79
|
+
inLanguage: 'it',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'Selettore A',
|
|
84
|
+
labelB: 'Selettore B',
|
|
85
|
+
placeholderA: 'es. #header .nav-item > a',
|
|
86
|
+
placeholderB: 'es. ul li.active a:hover',
|
|
87
|
+
cardIds: 'ID',
|
|
88
|
+
cardClasses: 'Classi / Pseudo',
|
|
89
|
+
cardElements: 'Elementi',
|
|
90
|
+
bannerWinner: 'Questo selettore vince!',
|
|
91
|
+
msgTie: 'Entrambi i selettori hanno lo stesso peso. Se competono per lo stesso elemento, vince quello scritto <strong>per ultimo</strong> nel CSS.',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'Domande Frequenti',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: 'Riferimenti e Documentazione',
|
|
102
|
+
bibliography: [
|
|
103
|
+
{
|
|
104
|
+
name: 'MDN Web Docs: Specificità CSS',
|
|
105
|
+
url: 'https://developer.mozilla.org/it/docs/Web/CSS/Specificity',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'W3C: Selectors Level 3 - Specificità',
|
|
109
|
+
url: 'https://www.w3.org/TR/selectors-3/#specificity',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
howTo: howToData,
|
|
113
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
114
|
+
seo: [
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'Cos\'è la Specificità CSS?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'La specificità CSS è l\'algoritmo con cui i browser decidono quali valori di proprietà applicare a un determinato elemento. È essenzialmente un punteggio matematico che indica al browser "quanto specifica" sia una regola.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Se due regole hanno livelli di specificità diversi, vince quella con peso maggiore, indipendentemente dall\'ordine in cui sono state scritte. Se entrambe hanno lo stesso peso, vince l\'ultima dichiarata nel codice sorgente.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Come si calcola la specificità CSS',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'La specificità si calcola in base a tre categorie che formano un peso a tre colonne, spesso espresso come <strong>(A, B, C)</strong>:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>Colonna A (ID):</strong> Conta il numero di identificatori univoci. Esempio: <code>#header</code> vale 1 nella colonna A.',
|
|
141
|
+
'<strong>Colonna B (Classi, Attributi e Pseudo-classi):</strong> Conta tutte le classi (<code>.button</code>), gli attributi (<code>[type="text"]</code>) e le pseudo-classi (<code>:hover</code>).',
|
|
142
|
+
'<strong>Colonna C (Elementi e Pseudo-elementi):</strong> Conta tutti gli elementi HTML (<code>div</code>, <code>h1</code>) e i pseudo-elementi (<code>::before</code>).',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: 'La regola d\'oro: nessun riporto numerico',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: 'Una regola con specificità (0,50,0) <strong>non sarà mai</strong> più specifica di una regola (1,0,0). <strong>Un singolo ID batte infinite classi.</strong> Le colonne non traboccano mai l\'una nell\'altra.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: 'Il problema di !important e l\'architettura BEM',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: 'La direttiva <code>!important</code> è un\'eccezione alle regole di specificità. Quando viene usata, quella dichiarazione sovrascrive automaticamente qualsiasi altra. È considerata una cattiva pratica perché distrugge la cascata naturale.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'Per evitare guerre di specificità nei progetti grandi, metodologie come <strong>BEM</strong> promuovono l\'uso esclusivo di selettori di classe a un solo livello di profondità, mantenendo artificialmente la specificità piatta a (0,1,0).',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { CssSpecificityCalculatorUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'css-specificity-calculator';
|
|
6
|
+
const title = 'CSSセレクター詳細度チェッカー オンライン。セレクターの重みを可視化';
|
|
7
|
+
const description =
|
|
8
|
+
'CSSセレクターの詳細度と正確な重みを計算します。どのCSSルールがカスケードで勝つかを視覚的に確認でき、!importantの乱用を防ぐのに役立つツールです。';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'CSSの詳細度とは何ですか?',
|
|
13
|
+
answer:
|
|
14
|
+
'詳細度とは、複数のCSSルールが競合する際にブラウザがどのルールを適用するかを決定するアルゴリズムです。3列のスコア(A、B、C)で表され、それぞれIDの数、クラス・属性・擬似クラスの数、要素・擬似要素の数を示します。',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'クラスセレクターはIDセレクターに勝てますか?',
|
|
18
|
+
answer:
|
|
19
|
+
'直接には勝てません。ID(1,0,0)はどれだけ多くのクラス(0,N,0)があっても必ず勝ちます。詳細度の列間には繰り上がりがないためです。100個のクラス(0,100,0)があっても、たった1つのID(1,0,0)には勝てません。',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '2つのセレクターの詳細度が同じ場合はどうなりますか?',
|
|
23
|
+
answer:
|
|
24
|
+
'2つのセレクターのスコアがまったく同じ場合、CSSファイルで後に書かれた方が優先されます。これが「カスケードの自然順序」です。このツールは同点になった場合に視覚的に通知します。',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'なぜ !important を使うのは悪い習慣とされていますか?',
|
|
28
|
+
answer:
|
|
29
|
+
'!important を使うと、そのスタイル宣言が他のすべてのルールより強制的に優先されてしまい、CSSの自然なカスケードが崩れます。大規模なプロジェクトではデバッグが困難になる問題を引き起こします。BEMのような手法は、!importantを使わなくて済むよう詳細度をフラットに保つことを推奨しています。',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: '最初のセレクターを入力する',
|
|
36
|
+
text: '左側のテキストフィールドにセレクターAを入力してください。例:#header .nav-item > a。ID、クラス、要素のカウンターがリアルタイムで更新されます。',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: '2番目のセレクターを入力する',
|
|
40
|
+
text: '右側のテキストフィールドにセレクターBを入力してください。例:ul li.active a:hover。重みがリアルタイムで変化するのを確認できます。',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: '結果を確認する',
|
|
44
|
+
text: '勝ったセレクターのブロックが緑のバナーでハイライトされます。両方が引き分けの場合は、カスケード順序がタイブレーカーになる旨のメッセージが表示されます。',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
49
|
+
'@context': 'https://schema.org',
|
|
50
|
+
'@type': 'FAQPage',
|
|
51
|
+
mainEntity: faqData.map((item) => ({
|
|
52
|
+
'@type': 'Question',
|
|
53
|
+
name: item.question,
|
|
54
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
55
|
+
})),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
59
|
+
'@context': 'https://schema.org',
|
|
60
|
+
'@type': 'HowTo',
|
|
61
|
+
name: title,
|
|
62
|
+
description,
|
|
63
|
+
step: howToData.map((step, i) => ({
|
|
64
|
+
'@type': 'HowToStep',
|
|
65
|
+
position: i + 1,
|
|
66
|
+
name: step.name,
|
|
67
|
+
text: step.text,
|
|
68
|
+
})),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
72
|
+
'@context': 'https://schema.org',
|
|
73
|
+
'@type': 'SoftwareApplication',
|
|
74
|
+
name: title,
|
|
75
|
+
description,
|
|
76
|
+
applicationCategory: 'UtilityApplication',
|
|
77
|
+
operatingSystem: 'All',
|
|
78
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
79
|
+
inLanguage: 'ja',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'セレクター A',
|
|
84
|
+
labelB: 'セレクター B',
|
|
85
|
+
placeholderA: '例:#header .nav-item > a',
|
|
86
|
+
placeholderB: '例:ul li.active a:hover',
|
|
87
|
+
cardIds: 'ID',
|
|
88
|
+
cardClasses: 'クラス / 擬似',
|
|
89
|
+
cardElements: '要素',
|
|
90
|
+
bannerWinner: 'このセレクターが勝ちです!',
|
|
91
|
+
msgTie: '両方のセレクターの重みが同じです。同じ要素に対して競合する場合、CSSで<strong>後に</strong>書かれた方が優先されます。',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'よくある質問',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: '参考資料とドキュメント',
|
|
102
|
+
bibliography: [
|
|
103
|
+
{
|
|
104
|
+
name: 'MDN Web Docs: CSSの詳細度',
|
|
105
|
+
url: 'https://developer.mozilla.org/ja/docs/Web/CSS/Specificity',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'W3C: Selectors Level 3 - 詳細度',
|
|
109
|
+
url: 'https://www.w3.org/TR/selectors-3/#specificity',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
howTo: howToData,
|
|
113
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
114
|
+
seo: [
|
|
115
|
+
{
|
|
116
|
+
type: 'title',
|
|
117
|
+
text: 'CSSの詳細度とは?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'CSSの詳細度とは、ブラウザが特定の要素にどのプロパティ値を適用するかを決定するアルゴリズムです。ルールが「どれだけ具体的か」をブラウザに伝える数値スコアと言えます。',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: '2つのルールの詳細度が異なる場合、書かれた順序に関係なく、重みが大きい方が優先されます。同じ重みの場合は、ソースコードで後に宣言された方が優先されます。',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'CSSの詳細度の計算方法',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: '詳細度は3つのカテゴリに基づいて計算され、<strong>(A, B, C)</strong> という3列の重みとして表されます:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>列A(ID):</strong>一意の識別子の数を数えます。例:<code>#header</code> は列Aで1としてカウントされます。',
|
|
141
|
+
'<strong>列B(クラス、属性、擬似クラス):</strong>すべてのクラス(<code>.button</code>)、属性(<code>[type="text"]</code>)、擬似クラス(<code>:hover</code>)を数えます。',
|
|
142
|
+
'<strong>列C(要素、擬似要素):</strong>すべてのHTML要素(<code>div</code>、<code>h1</code>)と擬似要素(<code>::before</code>)を数えます。',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: '黄金律:列をまたいだ繰り上がりはない',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: '詳細度が (0,50,0) のルールは、(1,0,0) のルールより<strong>絶対に</strong>強くなりません。<strong>IDひとつがクラスをいくつ積み重ねても勝ちます。</strong>列間に繰り上がりは存在しません。',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: '!important の問題とBEMアーキテクチャ',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: '<code>!important</code> は詳細度ルールの例外です。使用すると、その宣言が他のどんなルールよりも自動的に優先されます。自然なカスケードを壊すため、悪い習慣とされています。',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: '大規模プロジェクトでの詳細度の衝突を避けるために、<strong>BEM</strong> のような手法では1段階のクラスセレクターのみを使うことを推奨し、詳細度を (0,1,0) のフラットな状態に保ちます。',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
169
|
+
|