@jjlmoya/utils-developer 1.3.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/index.ts +12 -0
- 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 = 'kalkulator-specifichnosti-css';
|
|
6
|
+
const title = 'Калькулятор Специфичности CSS Онлайн. Визуализатор Веса Селектора';
|
|
7
|
+
const description =
|
|
8
|
+
'Вычислите специфичность и точный вес любого CSS селектора. Визуальный инструмент для понимания того, какое правило CSS выигрывает каскад, и избегайте использования !important.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Что такое специфичность CSS?',
|
|
13
|
+
answer:
|
|
14
|
+
'Специфичность — это алгоритм, который браузеры используют для определения того, какое правило CSS применяется к элементу, когда несколько правил конкурируют. Она представлена трёхколонным счётом (A, B, C), указывающим идентификаторы, классы/атрибуты/псевдо-классы и элементы/псевдо-элементы соответственно.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Может ли класс когда-либо победить ID в специфичности?',
|
|
18
|
+
answer:
|
|
19
|
+
'Нет, прямо не может. ID (1,0,0) всегда побеждает любое количество классов (0,N,0), потому что специфичность не имеет переноса между колонками. Сто классов (0,100,0) никогда не победят один ID (1,0,0).',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Что происходит, когда два селектора имеют одинаковую специфичность?',
|
|
23
|
+
answer:
|
|
24
|
+
'Когда два селектора имеют одинаковый вес, побеждает тот, который объявлен последним в 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: 'Введите второй селектор',
|
|
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: 'ru',
|
|
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: 'Оба селектора имеют одинаковый вес. Если они конкурируют за один элемент, побеждает селектор, написанный <strong>последним</strong> в CSS.',
|
|
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 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: 'Что такое специфичность CSS?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'Специфичность CSS — это алгоритм, по которому браузеры определяют, какие значения свойств применять к конкретному элементу. По сути это математический счёт, который говорит браузеру «насколько специфичным» является правило.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Если два правила имеют разные уровни специфичности, правило с большим весом побеждает, независимо от порядка их написания. Если оба имеют одинаковый вес, побеждает последнее объявленное в исходном коде.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Как вычислить специфичность CSS',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Специфичность вычисляется на основе трёх категорий, образующих трёхколонный вес, часто выражаемый как <strong>(A, B, C)</strong>:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>Колонка A (ID):</strong> Подсчитывает количество уникальных идентификаторов. Пример: <code>#header</code> считается как 1 в колонке A.',
|
|
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) <strong>никогда</strong> не будет более специфичным, чем правило (1,0,0). <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> рекомендует использовать только селекторы классов с одинаковой глубиной, искусственно сохраняя специфичность плоской на уровне (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 = 'css-specificitetskalkulator';
|
|
6
|
+
const title = 'CSS Specificitetskalkulator Online. Selectorviktvisualiserare';
|
|
7
|
+
const description =
|
|
8
|
+
'Beräkna specificiteten och exaktvikten för alla CSS-selektorer. Visuellt verktyg för att förstå vilken CSS-regel som vinner kaskaden och undvika att använda !important.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'Vad är CSS-specificitet?',
|
|
13
|
+
answer:
|
|
14
|
+
'Specificitet är den algoritm som webbläsare använder för att bestämma vilken CSS-regel som gäller för ett element när flera regler konkurrerar. Den representeras som ett tresiffrigt värde (A, B, C) som indikerar ID:n, klasser/attribut/pseudoklasser och element/pseudoelement respektive.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Kan en klass någonsin slå ett ID i specificitet?',
|
|
18
|
+
answer:
|
|
19
|
+
'Inte direkt. Ett ID (1,0,0) slår alltid ett vilket antal klasser som helst (0,N,0) eftersom specificitet inte har överföring mellan kolumner. Hundra klasser (0,100,0) kommer aldrig att slå ett enda ID (1,0,0).',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'Vad händer när två selektorer har samma specificitet?',
|
|
23
|
+
answer:
|
|
24
|
+
'När två selektorer har exakt samma vikt vinner den som deklarerats sist i CSS-filen. Detta kallas naturlig kaskadordning. Denna kalkylator varnar visuellt dig när en oavgjord händelse inträffar.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Varför anses det vara dålig praxis att använda !important?',
|
|
28
|
+
answer:
|
|
29
|
+
'Direktivet !important bryter den naturliga CSS-kaskaden genom att tvinga en deklaration över någon annan regel. Detta skapar konflikter som är svåra att felsöka i stora projekt. Metodologier som BEM förespråkar att hålla specificiteten platt för att undvika att någonsin behöva !important.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Ange den första väljaren',
|
|
36
|
+
text: 'Skriv väljare A i textfältet till vänster, till exempel: #header .nav-item > a. Räknarna för ID:n, klasser och element uppdateras omedelbar.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Ange den andra väljaren',
|
|
40
|
+
text: 'Skriv väljare B i textfältet till höger, till exempel: ul li.active a:hover. Se hur vikterna ändras i realtid.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Läs resultatet',
|
|
44
|
+
text: 'Kalkylatorn markerar vinnarblocken med en grön banderoll. Om både är oavgjort visas ett oavgjort meddelande som förklarar kaskadordningen som tiebreaker.',
|
|
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: 'sv',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'Väljare A',
|
|
84
|
+
labelB: 'Väljare B',
|
|
85
|
+
placeholderA: 't.ex. #header .nav-item > a',
|
|
86
|
+
placeholderB: 't.ex. ul li.active a:hover',
|
|
87
|
+
cardIds: 'ID',
|
|
88
|
+
cardClasses: 'Klasser / Pseudoklasser',
|
|
89
|
+
cardElements: 'Element',
|
|
90
|
+
bannerWinner: 'Denna väljare vinner!',
|
|
91
|
+
msgTie: 'Båda väljarna har samma vikt. Om de konkurrerar om samma element vinner den som skrevs <strong>sist</strong> i CSS.',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'Vanliga Frågor',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: 'Referenser och Dokumentation',
|
|
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: 'Vad är CSS-specificitet?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'CSS-specificitet är den algoritm som webbläsare använder för att avgöra vilka egenskapsvärden som ska tillämpas på ett visst element. Det är i huvudsak ett matematiskt värde som berättar för webbläsaren "hur specifik" en regel är.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'Om två regler har olika specificitetsnivåer vinner den med högre vikt, oavsett i vilken ordning de skrevs. Om båda har samma vikt vinner den som senast deklarerats i källkoden.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'Hur man beräknar CSS-specificitet',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Specificitet beräknas baserat på tre kategorier som bildar en trestegs vikt, ofta uttryckt som <strong>(A, B, C)</strong>:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>Kolumn A (ID):</strong> Räknar antalet unika identifierare. Exempel: <code>#header</code> räknas som 1 i kolumn A.',
|
|
141
|
+
'<strong>Kolumn B (Klasser, attribut och pseudoklasser):</strong> Räknar alla klasser (<code>.button</code>), attribut (<code>[type="text"]</code>) och pseudoklasser (<code>:hover</code>).',
|
|
142
|
+
'<strong>Kolumn C (Element och pseudoelement):</strong> Räknar alla HTML-element (<code>div</code>, <code>h1</code>) och pseudoelement (<code>::before</code>).',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: 'Gyllene regeln: Ingen överföring mellan kolumner',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: 'En regel med specificitet (0,50,0) kommer <strong>aldrig</strong> att vara mer specifik än en regel (1,0,0). <strong>Ett enda ID slår oändliga klasser.</strong> Kolumner flödar aldrig över i varandra.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: 'Problemet med !important och BEM-arkitektur',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: 'Direktivet <code>!important</code> är ett undantag från specificitetsreglerna. Vid användning åsidosätter den deklarationen automatiskt någon annan. Det anses vara dålig praxis eftersom det förstör den naturliga kaskaden.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'För att undvika specificitétskrig i stora projekt förespråkar metodologier som <strong>BEM</strong> användning av endast enkla klassväljare, vilket artificiellt håller specificiteten platt på (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 = 'css-ozgulesme-hesaplayici';
|
|
6
|
+
const title = 'CSS Özgüleşme Hesaplayıcı Çevrimiçi. Seçici Ağırlık Görselleştiricisi';
|
|
7
|
+
const description =
|
|
8
|
+
'Herhangi bir CSS seçicinin özgüleşmesini ve tam ağırlığını hesaplayın. Hangi CSS kuralının kaskada galip geldiğini anlamak için görsel araç ve !important kullanımından kaçının.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: 'CSS özgüleşmesi nedir?',
|
|
13
|
+
answer:
|
|
14
|
+
'Özgüleşme, tarayıcıların birden fazla kural yarıştığında hangi CSS kuralının bir öğeye uygulanacağını belirlemek için kullandığı algoritmadır. Sırasıyla ID\'leri, sınıfları/öznitelikleri/sözde sınıfları ve öğeleri/sözde öğeleri gösteren üç sütunlu bir skor (A, B, C) ile temsil edilir.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Bir sınıf özgüleşmede hiçbir zaman bir ID\'yi yenebilir mi?',
|
|
18
|
+
answer:
|
|
19
|
+
'Doğrudan hayır. Bir ID (1,0,0) her zaman herhangi sayıda sınıfı (0,N,0) yener çünkü özgüleşmenin sütunlar arasında taşması yoktur. Yüz sınıf (0,100,0) hiçbir zaman tek bir ID (1,0,0) yenmeyecektir.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: 'İki seçicinin aynı özgüleşmesi varsa ne olur?',
|
|
23
|
+
answer:
|
|
24
|
+
'İki seçici tam olarak aynı ağırlığa sahip olduğunda, CSS dosyasında son olarak bildirilen seçici kazanır. Buna doğal kaskad sırası denir. Bu hesaplayıcı, bir beraberlik oluştuğunda sizi görsel olarak uyarır.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Neden !important kullanmak kötü bir uygulama olarak kabul edilir?',
|
|
28
|
+
answer:
|
|
29
|
+
'İçin !important yönergesi, doğal CSS kaskadını kırar bir bildirim başka bir kuralın üzerinde zorlar. Bu, büyük projelerde takip etmesi zor olan çatışmalar oluşturur. BEM gibi metodolojiler, özgüleşmeyi düz tutmanın hiçbir zaman !important gerekmemesini savunur.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'İlk seçiciyi girin',
|
|
36
|
+
text: 'Sol metin alanına Seçici A yazın, örneğin: #header .nav-item > a. ID, Sınıf ve Element sayaçları anında güncellenecektir.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'İkinci seçiciyi girin',
|
|
40
|
+
text: 'Sağ metin alanına Seçici B yazın, örneğin: ul li.active a:hover. Ağırlıkların gerçek zamanlı olarak nasıl değiştiğini izleyin.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Sonucu okuyun',
|
|
44
|
+
text: 'Hesaplayıcı kazanan seçici bloğunu yeşil bir başlıkla vurgulayacaktır. Her ikisi de bağlıysa, kaskad sırası tiebreaker olarak açıklayan bir bağlama mesajı görüntülenecektir.',
|
|
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: 'tr',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const ui: CssSpecificityCalculatorUI = {
|
|
83
|
+
labelA: 'Seçici A',
|
|
84
|
+
labelB: 'Seçici B',
|
|
85
|
+
placeholderA: 'ör. #header .nav-item > a',
|
|
86
|
+
placeholderB: 'ör. ul li.active a:hover',
|
|
87
|
+
cardIds: 'ID',
|
|
88
|
+
cardClasses: 'Sınıflar / Sözde sınıflar',
|
|
89
|
+
cardElements: 'Öğeler',
|
|
90
|
+
bannerWinner: 'Bu seçici kazanır!',
|
|
91
|
+
msgTie: 'Her iki seçici de aynı ağırlığa sahiptir. Aynı öğe için rekabet ederlerse, CSS\'de <strong>son</strong> yazılan kazanır.',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const content: ToolLocaleContent<CssSpecificityCalculatorUI> = {
|
|
95
|
+
slug,
|
|
96
|
+
title,
|
|
97
|
+
description,
|
|
98
|
+
ui,
|
|
99
|
+
faqTitle: 'Sık Sorulan Sorular',
|
|
100
|
+
faq: faqData,
|
|
101
|
+
bibliographyTitle: 'Referanslar ve Belgeler',
|
|
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: 'CSS Özgüleşmesi Nedir?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'CSS özgüleşmesi, tarayıcıların belirli bir öğeye hangi özellik değerlerinin uygulanacağına karar vermek için kullandığı algoritmadır. Esasen tarayıcıya bir kuralın ne kadar "spesifik" olduğunu söyleyen matematiksel bir puandır.',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: 'İki kuralın farklı özgüleşme düzeyleri varsa, yazıldıkları sıra ne olursa olsun yüksek ağırlığa sahip olan kazanır. Her ikisi de aynı ağırlığa sahipse, kaynak kodda en son bildirilen kazanır.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: 'CSS Özgüleşmesi Nasıl Hesaplanır',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: 'Özgüleşme, genellikle <strong>(A, B, C)</strong> olarak ifade edilen üç sütunlu bir ağırlık oluşturan üç kategoriye dayalı olarak hesaplanır:',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: 'list',
|
|
139
|
+
items: [
|
|
140
|
+
'<strong>A Sütunu (ID):</strong> Benzersiz tanımlayıcıların sayısını sayar. Örnek: <code>#header</code> A sütununda 1 olarak sayılır.',
|
|
141
|
+
'<strong>B Sütunu (Sınıflar, Öznitelikler ve Sözde sınıflar):</strong> Tüm sınıfları (<code>.button</code>), öznitelikleri (<code>[type="text"]</code>) ve sözde sınıfları (<code>:hover</code>) sayar.',
|
|
142
|
+
'<strong>C Sütunu (Öğeler ve Sözde öğeler):</strong> Tüm HTML öğelerini (<code>div</code>, <code>h1</code>) ve sözde öğeleri (<code>::before</code>) sayar.',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'title',
|
|
147
|
+
text: 'Altın Kural: Sütunlar Arasında Taşma Yok',
|
|
148
|
+
level: 3,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'tip',
|
|
152
|
+
html: 'Özgüleşmesi (0,50,0) olan bir kural <strong>asla</strong> bir kural (1,0,0) kadar spesifik <strong>olmayacak.</strong> <strong>Tek bir ID sonsuz sayıda sınıfı yener.</strong> Sütunlar hiçbir zaman birbirinin içine taşmaz.',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'title',
|
|
156
|
+
text: 'BEM Mimarisi ile !important Sorunu',
|
|
157
|
+
level: 3,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'paragraph',
|
|
161
|
+
html: '<code>!important</code> yönergesi özgüleşme kurallarının bir istisnasıdır. Kullanıldığında, bu bildirim otomatik olarak başka bir kuralı geçersiz kılar. Doğal kaskadı bozduğu için kötü bir uygulama olarak kabul edilir.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'paragraph',
|
|
165
|
+
html: 'Büyük projelerde özgüleşme savaşlarından kaçınmak için <strong>BEM</strong> gibi metodolojiler, özgüleşmeyi yapay olarak (0,1,0) düzeyinde tutmak için yalnızca tek derinlik sınıf seçicileri kullanmayı savunur.',
|
|
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规则应用于元素的算法。它以三列分数(A、B、C)表示,分别表示ID、类/属性/伪类和元素/伪元素。',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: '类能否在优先级中击败ID?',
|
|
18
|
+
answer:
|
|
19
|
+
'不能直接击败。ID(1,0,0)始终击败任何数量的类(0,N,0),因为优先级在列之间没有进位。一百个类(0,100,0)永远不会击败单个ID(1,0,0)。',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '当两个选择器有相同的优先级时会发生什么?',
|
|
23
|
+
answer:
|
|
24
|
+
'当两个选择器具有完全相同的权重时,在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: '输入第二个选择器',
|
|
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: 'zh',
|
|
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 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: 'CSS优先级是什么?',
|
|
118
|
+
level: 2,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'paragraph',
|
|
122
|
+
html: 'CSS优先级是浏览器用来决定将哪些属性值应用于特定元素的算法。本质上,它是一个数学分数,告诉浏览器规则"有多具体"。',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: 'paragraph',
|
|
126
|
+
html: '如果两个规则的优先级不同,无论书写顺序如何,权重较高的规则获胜。如果两者的权重相同,在源代码中最后声明的规则获胜。',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'title',
|
|
130
|
+
text: '如何计算CSS优先级',
|
|
131
|
+
level: 3,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'paragraph',
|
|
135
|
+
html: '优先级根据三个类别计算,形成三列权重,通常表示为<strong>(A、B、C)</strong>:',
|
|
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)的规则<strong>永远不会</strong>比优先级为(1,0,0)的规则更具体。<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>等方法倡议仅使用单深度类选择器,人为地将优先级保持在(0,1,0)平坦。',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
};
|
|
169
|
+
|