@jjlmoya/utils-diy 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/package.json +60 -0
  2. package/src/category/i18n/en.ts +110 -0
  3. package/src/category/i18n/es.ts +110 -0
  4. package/src/category/i18n/fr.ts +101 -0
  5. package/src/category/index.ts +25 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +57 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +42 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +22 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/balusterCalculator/bibliography.astro +14 -0
  25. package/src/tool/balusterCalculator/component.astro +605 -0
  26. package/src/tool/balusterCalculator/i18n/en.ts +264 -0
  27. package/src/tool/balusterCalculator/i18n/es.ts +264 -0
  28. package/src/tool/balusterCalculator/i18n/fr.ts +264 -0
  29. package/src/tool/balusterCalculator/index.ts +33 -0
  30. package/src/tool/balusterCalculator/seo.astro +15 -0
  31. package/src/tool/balusterCalculator/ui.ts +15 -0
  32. package/src/tool/clayCalculator/bibliography.astro +14 -0
  33. package/src/tool/clayCalculator/component.astro +731 -0
  34. package/src/tool/clayCalculator/i18n/en.ts +183 -0
  35. package/src/tool/clayCalculator/i18n/es.ts +183 -0
  36. package/src/tool/clayCalculator/i18n/fr.ts +183 -0
  37. package/src/tool/clayCalculator/index.ts +33 -0
  38. package/src/tool/clayCalculator/seo.astro +15 -0
  39. package/src/tool/clayCalculator/ui.ts +19 -0
  40. package/src/tool/concreteCalculator/bibliography.astro +13 -0
  41. package/src/tool/concreteCalculator/component.astro +1089 -0
  42. package/src/tool/concreteCalculator/i18n/en.ts +201 -0
  43. package/src/tool/concreteCalculator/i18n/es.ts +201 -0
  44. package/src/tool/concreteCalculator/i18n/fr.ts +201 -0
  45. package/src/tool/concreteCalculator/index.ts +28 -0
  46. package/src/tool/concreteCalculator/seo.astro +14 -0
  47. package/src/tool/concreteCalculator/ui.ts +35 -0
  48. package/src/tool/cutOptimizer/bibliography.astro +13 -0
  49. package/src/tool/cutOptimizer/component.astro +825 -0
  50. package/src/tool/cutOptimizer/i18n/en.ts +178 -0
  51. package/src/tool/cutOptimizer/i18n/es.ts +178 -0
  52. package/src/tool/cutOptimizer/i18n/fr.ts +178 -0
  53. package/src/tool/cutOptimizer/index.ts +28 -0
  54. package/src/tool/cutOptimizer/optimizer.ts +199 -0
  55. package/src/tool/cutOptimizer/seo.astro +14 -0
  56. package/src/tool/cutOptimizer/ui.ts +25 -0
  57. package/src/tool/drillCalculator/bibliography.astro +13 -0
  58. package/src/tool/drillCalculator/component.astro +1210 -0
  59. package/src/tool/drillCalculator/engine.ts +63 -0
  60. package/src/tool/drillCalculator/i18n/en.ts +137 -0
  61. package/src/tool/drillCalculator/i18n/es.ts +137 -0
  62. package/src/tool/drillCalculator/i18n/fr.ts +137 -0
  63. package/src/tool/drillCalculator/index.ts +28 -0
  64. package/src/tool/drillCalculator/seo.astro +14 -0
  65. package/src/tool/drillCalculator/ui.ts +41 -0
  66. package/src/tool/drillSharpener/bibliography.astro +13 -0
  67. package/src/tool/drillSharpener/component.astro +712 -0
  68. package/src/tool/drillSharpener/engine.ts +42 -0
  69. package/src/tool/drillSharpener/i18n/en.ts +121 -0
  70. package/src/tool/drillSharpener/i18n/es.ts +121 -0
  71. package/src/tool/drillSharpener/i18n/fr.ts +121 -0
  72. package/src/tool/drillSharpener/index.ts +31 -0
  73. package/src/tool/drillSharpener/seo.astro +14 -0
  74. package/src/tool/drillSharpener/ui.ts +53 -0
  75. package/src/tool/epoxyCalculator/bibliography.astro +14 -0
  76. package/src/tool/epoxyCalculator/component.astro +888 -0
  77. package/src/tool/epoxyCalculator/i18n/en.ts +195 -0
  78. package/src/tool/epoxyCalculator/i18n/es.ts +195 -0
  79. package/src/tool/epoxyCalculator/i18n/fr.ts +195 -0
  80. package/src/tool/epoxyCalculator/index.ts +33 -0
  81. package/src/tool/epoxyCalculator/seo.astro +15 -0
  82. package/src/tool/epoxyCalculator/ui.ts +22 -0
  83. package/src/tool/furnitureFit/bibliography.astro +13 -0
  84. package/src/tool/furnitureFit/component.astro +552 -0
  85. package/src/tool/furnitureFit/engine.ts +51 -0
  86. package/src/tool/furnitureFit/i18n/en.ts +152 -0
  87. package/src/tool/furnitureFit/i18n/es.ts +152 -0
  88. package/src/tool/furnitureFit/i18n/fr.ts +152 -0
  89. package/src/tool/furnitureFit/index.ts +28 -0
  90. package/src/tool/furnitureFit/seo.astro +14 -0
  91. package/src/tool/furnitureFit/ui.ts +21 -0
  92. package/src/tool/mortarCalculator/bibliography.astro +13 -0
  93. package/src/tool/mortarCalculator/component.astro +1139 -0
  94. package/src/tool/mortarCalculator/i18n/en.ts +219 -0
  95. package/src/tool/mortarCalculator/i18n/es.ts +205 -0
  96. package/src/tool/mortarCalculator/i18n/fr.ts +220 -0
  97. package/src/tool/mortarCalculator/index.ts +24 -0
  98. package/src/tool/mortarCalculator/seo.astro +14 -0
  99. package/src/tool/mortarCalculator/ui.ts +37 -0
  100. package/src/tool/passepartoutCalculator/bibliography.astro +13 -0
  101. package/src/tool/passepartoutCalculator/component.astro +741 -0
  102. package/src/tool/passepartoutCalculator/i18n/en.ts +178 -0
  103. package/src/tool/passepartoutCalculator/i18n/es.ts +178 -0
  104. package/src/tool/passepartoutCalculator/i18n/fr.ts +178 -0
  105. package/src/tool/passepartoutCalculator/index.ts +28 -0
  106. package/src/tool/passepartoutCalculator/seo.astro +14 -0
  107. package/src/tool/passepartoutCalculator/ui.ts +17 -0
  108. package/src/tool/stairCalculator/bibliography.astro +52 -0
  109. package/src/tool/stairCalculator/component.astro +766 -0
  110. package/src/tool/stairCalculator/engine.ts +128 -0
  111. package/src/tool/stairCalculator/i18n/en.ts +149 -0
  112. package/src/tool/stairCalculator/i18n/es.ts +149 -0
  113. package/src/tool/stairCalculator/i18n/fr.ts +149 -0
  114. package/src/tool/stairCalculator/index.ts +31 -0
  115. package/src/tool/stairCalculator/seo.astro +211 -0
  116. package/src/tool/stairCalculator/ui.ts +109 -0
  117. package/src/tool/thermalExpansionCalculator/bibliography.astro +13 -0
  118. package/src/tool/thermalExpansionCalculator/component.astro +771 -0
  119. package/src/tool/thermalExpansionCalculator/engine.ts +23 -0
  120. package/src/tool/thermalExpansionCalculator/i18n/en.ts +174 -0
  121. package/src/tool/thermalExpansionCalculator/i18n/es.ts +174 -0
  122. package/src/tool/thermalExpansionCalculator/i18n/fr.ts +174 -0
  123. package/src/tool/thermalExpansionCalculator/index.ts +28 -0
  124. package/src/tool/thermalExpansionCalculator/seo.astro +14 -0
  125. package/src/tool/thermalExpansionCalculator/ui.ts +41 -0
  126. package/src/tool/voltageDropCalculator/bibliography.astro +13 -0
  127. package/src/tool/voltageDropCalculator/component.astro +1022 -0
  128. package/src/tool/voltageDropCalculator/i18n/en.ts +155 -0
  129. package/src/tool/voltageDropCalculator/i18n/es.ts +155 -0
  130. package/src/tool/voltageDropCalculator/i18n/fr.ts +148 -0
  131. package/src/tool/voltageDropCalculator/index.ts +28 -0
  132. package/src/tool/voltageDropCalculator/seo.astro +14 -0
  133. package/src/tool/voltageDropCalculator/ui.ts +22 -0
  134. package/src/tools.ts +16 -0
  135. package/src/types.ts +72 -0
@@ -0,0 +1,183 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ClayCalculatorUI } from '../ui';
4
+
5
+ const slug = 'clay-shrinkage-calculator';
6
+ const title = 'Clay Shrinkage Calculator: Exact Dimensions for Ceramics';
7
+ const description =
8
+ 'Calculate clay shrinkage during drying and firing. Design ceramic pieces with the exact final dimensions you need.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Why does clay shrink?',
13
+ answer:
14
+ 'Clay shrinks primarily due to water loss. First comes drying (evaporation of water between particles) and then firing (removal of chemically combined water and particle sintering).',
15
+ },
16
+ {
17
+ question: 'What is the normal shrinkage percentage?',
18
+ answer:
19
+ 'It depends on the clay body. Earthenware typically shrinks 5-10%, while stoneware and porcelain can reach 12-15% due to greater vitrification.',
20
+ },
21
+ {
22
+ question: 'How do I measure the shrinkage of my own clay?',
23
+ answer:
24
+ 'Create a test tile exactly 10cm long. Let it dry and measure it (drying shrinkage). Fire it to the final temperature and measure again (total shrinkage). The difference gives you the exact percentage.',
25
+ },
26
+ {
27
+ question: 'What happens if my piece cracks while drying?',
28
+ answer:
29
+ 'This usually indicates drying too fast or unevenly. Thin areas lose water before thick ones, creating tension. Cover pieces with plastic to slow the process.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Measure the piece when wet',
36
+ text: 'Take the exact dimensions of your piece right after throwing or hand-building, while it still retains all its moisture.',
37
+ },
38
+ {
39
+ name: 'Enter the shrinkage coefficient',
40
+ text: 'Check your clay packaging for the total shrinkage percentage (drying + firing) provided by the manufacturer.',
41
+ },
42
+ {
43
+ name: 'Get the expected final dimensions',
44
+ text: 'Use the calculator to know how much your piece will measure after firing and plan your fits or lids accordingly.',
45
+ },
46
+ {
47
+ name: 'Reverse calculation for targets',
48
+ text: 'If you need your piece to measure exactly X cm when finished, use the reverse calculation to find what size it should be on the wheel.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowToThing> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'UtilityApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
83
+ inLanguage: 'en',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<ClayCalculatorUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Frequently Asked Questions',
91
+ faq: faqData,
92
+ bibliographyTitle: 'References',
93
+ bibliography: [
94
+ {
95
+ name: "The Potter's Dictionary - Clay Shrinkage",
96
+ url: 'https://digitalfire.com/glossary/firing+shrinkage',
97
+ },
98
+ {
99
+ name: 'Ceramic Arts Network - Understanding Shrinkage',
100
+ url: 'https://ceramicartsnetwork.org/daily/article/How-to-Determine-Clay-Shrinkage-and-Make-a-Shrink-Rule',
101
+ },
102
+ ],
103
+ howTo: howToData,
104
+ schemas: [faqSchema, howToSchema, appSchema],
105
+ seo: [
106
+ {
107
+ type: 'title',
108
+ text: 'The Physics of Clay: Shrinkage and Expansion',
109
+ level: 2,
110
+ },
111
+ {
112
+ type: 'paragraph',
113
+ html: 'Clay is a living material that changes size throughout the ceramic process. From the moment you shape a wet piece to when it comes out of the kiln, it can lose between 8% and 15% of its original size. Calculating this shrinkage is essential for creating pieces with the exact dimensions you need.',
114
+ },
115
+ {
116
+ type: 'grid',
117
+ columns: [
118
+ {
119
+ type: 'card',
120
+ title: 'Shrinkage Phases',
121
+ html: '<p><strong>1. Drying (Wet → Dry):</strong> As water is lost, clay particles draw together. This is the largest shrinkage phase (4-8%). Thick pieces can crack if they dry too quickly.</p><p><strong>2. Firing (Dry → Bisque):</strong> Between 900-1000°C, clay undergoes irreversible chemical changes. Additional shrinkage of 2-4%. The piece becomes porous but strong.</p><p><strong>3. Vitrification (High Temperature):</strong> At 1200-1300°C, the clay vitrifies. Final shrinkage of 1-3%. Stoneware and porcelain reach maximum density.</p>',
122
+ },
123
+ {
124
+ type: 'card',
125
+ title: 'Influencing Variables',
126
+ html: '<ul><li><strong>Clay type:</strong> Red clays shrink less (8-10%) than porcelains (12-15%).</li><li><strong>Wall thickness:</strong> Thin walls shrink more uniformly than thick ones.</li><li><strong>Firing temperature:</strong> Higher temperatures mean greater shrinkage and vitrification.</li><li><strong>Grog content:</strong> Adding grog (pre-fired ground clay) reduces shrinkage.</li></ul>',
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ type: 'title',
132
+ text: 'Practical Applications',
133
+ level: 2,
134
+ },
135
+ {
136
+ type: 'title',
137
+ text: 'Mold Design',
138
+ level: 3,
139
+ },
140
+ {
141
+ type: 'paragraph',
142
+ html: 'If you need a mug with an 8cm final diameter, and your clay shrinks 12%, you must make the mold <strong>9.1cm</strong>. This reverse calculation is critical in production runs.',
143
+ },
144
+ {
145
+ type: 'title',
146
+ text: 'Lids and Assemblies',
147
+ level: 3,
148
+ },
149
+ {
150
+ type: 'paragraph',
151
+ html: 'When creating pieces that must fit together (teapot + lid, jar + lid), both must be made with the same clay and fired together to ensure equal shrinkage. A 1% difference can ruin the fit.',
152
+ },
153
+ {
154
+ type: 'title',
155
+ text: 'Monumental Sculpture',
156
+ level: 3,
157
+ },
158
+ {
159
+ type: 'paragraph',
160
+ html: 'In large pieces, differential shrinkage between thick and thin sections can cause cracks. Experienced potters compensate by leaving thicker walls in areas they know will shrink more.',
161
+ },
162
+ ],
163
+ ui: {
164
+ labelInitialSize: 'Initial Size (mm)',
165
+ labelShrinkage: 'Shrinkage Percentage (%)',
166
+ labelLow: 'Low (Earthenware)',
167
+ labelMedium: 'Medium (Stoneware)',
168
+ labelHigh: 'High (Porcelain)',
169
+ presetTerracota: 'Earthenware (8%)',
170
+ presetGres: 'Stoneware (12%)',
171
+ presetPorcelana: 'Porcelain (15%)',
172
+ labelResult: 'Result',
173
+ labelFinalSize: 'Final Size:',
174
+ labelLoss: 'Total Loss:',
175
+ tipText:
176
+ 'To calculate the initial size needed to achieve a specific final size, divide the desired size by (1 - shrinkage/100).',
177
+ labelInitialBadge: 'Initial:',
178
+ labelFinalBadge: 'mm final',
179
+ labelLossBadge: 'Loss:',
180
+ labelInitialArea: 'Initial Area',
181
+ labelFinalArea: 'Final Area',
182
+ },
183
+ };
@@ -0,0 +1,183 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ClayCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculadora-arcilla';
6
+ const title = 'Calculadora de Contracción de Arcilla: Dimensiones Exactas para Cerámica';
7
+ const description =
8
+ 'Calcula la contracción de arcilla en secado y cocción. Diseña piezas cerámicas con las dimensiones finales exactas.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '¿Por qué se contrae la arcilla?',
13
+ answer:
14
+ 'La arcilla se contrae principalmente por la pérdida de agua. Primero ocurre el secado (evaporación del agua entre partículas) y luego la cocción (eliminación de agua químicamente combinada y sinterización de partículas).',
15
+ },
16
+ {
17
+ question: '¿Cuál es el porcentaje de contracción normal?',
18
+ answer:
19
+ 'Depende de la pasta cerámica. La loza suele contraerse entre un 5-10%, mientras que el gres y la porcelana pueden llegar al 12-15% debido a su mayor vitrificación.',
20
+ },
21
+ {
22
+ question: '¿Cómo mido la contracción de mi propia arcilla?',
23
+ answer:
24
+ 'Crea una placa de prueba de 10cm exactos. Déjala secar y mídela (contracción de secado). Cuécela a la temperatura final y vuelve a medirla (contracción total). La diferencia te dará el porcentaje exacto.',
25
+ },
26
+ {
27
+ question: '¿Qué pasa si mi pieza se agrieta al secar?',
28
+ answer:
29
+ 'Suele indicar un secado demasiado rápido o desigual. Las zonas finas pierden agua antes que las gruesas, generando tensiones. Cubre las piezas con plástico para ralentizar el proceso.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Medir la pieza en húmedo',
36
+ text: 'Toma las dimensiones exactas de tu pieza justo después de tornear o modelar, cuando todavía tiene toda su humedad.',
37
+ },
38
+ {
39
+ name: 'Introducir el coeficiente de contracción',
40
+ text: 'Busca en el paquete de tu arcilla el porcentaje de contracción total (secado + cocción) proporcionado por el fabricante.',
41
+ },
42
+ {
43
+ name: 'Obtener dimensiones finales esperadas',
44
+ text: 'Usa la calculadora para saber cuánto medirá tu pieza tras pasar por el horno y planifica tus encajes o tapas.',
45
+ },
46
+ {
47
+ name: 'Cálculo inverso para objetivos',
48
+ text: 'Si necesitas que tu pieza mida exactamente X cm al final, usa el cálculo inverso para saber qué tamaño debe tener en el torno.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowToThing> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'UtilityApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
+ inLanguage: 'es',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<ClayCalculatorUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Preguntas Frecuentes',
91
+ faq: faqData,
92
+ bibliographyTitle: 'Referencias',
93
+ bibliography: [
94
+ {
95
+ name: 'The Potter\'s Dictionary - Clay Shrinkage',
96
+ url: 'https://digitalfire.com/glossary/firing+shrinkage',
97
+ },
98
+ {
99
+ name: 'Ceramic Arts Network - Understanding Shrinkage',
100
+ url: 'https://ceramicartsnetwork.org/daily/article/How-to-Determine-Clay-Shrinkage-and-Make-a-Shrink-Rule',
101
+ },
102
+ ],
103
+ howTo: howToData,
104
+ schemas: [faqSchema, howToSchema, appSchema],
105
+ seo: [
106
+ {
107
+ type: 'title',
108
+ text: 'La Física de la Arcilla: Contracción y Expansión',
109
+ level: 2,
110
+ },
111
+ {
112
+ type: 'paragraph',
113
+ html: 'La arcilla es un material vivo que cambia de tamaño durante todo el proceso cerámico. Desde el momento en que moldeas una pieza húmeda hasta que sale del horno, puede perder entre un 8% y un 15% de su tamaño original. Calcular esta contracción es fundamental para crear piezas con las dimensiones exactas que necesitas.',
114
+ },
115
+ {
116
+ type: 'grid',
117
+ columns: [
118
+ {
119
+ type: 'card',
120
+ title: 'Fases de Contracción',
121
+ html: '<p><strong>1. Secado (Húmedo → Seco):</strong> Al perder agua, las partículas de arcilla se acercan. Esta es la mayor contracción (4-8%). Las piezas gruesas pueden agrietarse si secan demasiado rápido.</p><p><strong>2. Cocción (Seco → Bizcocho):</strong> Entre 900-1000°C, la arcilla sufre cambios químicos irreversibles. Contracción adicional de 2-4%. La pieza se vuelve porosa pero resistente.</p><p><strong>3. Vitrificación (Alta Temperatura):</strong> A 1200-1300°C, la arcilla se vitrifica. Contracción final de 1-3%. El gres y la porcelana alcanzan su máxima densidad.</p>',
122
+ },
123
+ {
124
+ type: 'card',
125
+ title: 'Variables que Afectan',
126
+ html: '<ul><li><strong>Tipo de arcilla:</strong> Las arcillas rojas contraen menos (8-10%) que las porcelanas (12-15%).</li><li><strong>Grosor de pared:</strong> Paredes finas contraen más uniformemente que las gruesas.</li><li><strong>Temperatura de cocción:</strong> A mayor temperatura, mayor contracción y vitrificación.</li><li><strong>Contenido de chamota:</strong> Añadir chamota (arcilla ya cocida molida) reduce la contracción.</li></ul>',
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ type: 'title',
132
+ text: 'Aplicaciones Prácticas',
133
+ level: 2,
134
+ },
135
+ {
136
+ type: 'title',
137
+ text: 'Diseño de Moldes',
138
+ level: 3,
139
+ },
140
+ {
141
+ type: 'paragraph',
142
+ html: 'Si necesitas una taza de 8cm de diámetro final, y tu arcilla contrae un 12%, debes hacer el molde de <strong>9.1cm</strong>. Este cálculo inverso es crítico en producción en serie.',
143
+ },
144
+ {
145
+ type: 'title',
146
+ text: 'Tapas y Ensamblajes',
147
+ level: 3,
148
+ },
149
+ {
150
+ type: 'paragraph',
151
+ html: 'Cuando creas piezas que deben encajar (tetera + tapa, tarro + tapa), ambas deben hacerse con la misma arcilla y cocerse juntas para garantizar que contraigan por igual. Una diferencia del 1% puede arruinar el ajuste.',
152
+ },
153
+ {
154
+ type: 'title',
155
+ text: 'Escultura Monumental',
156
+ level: 3,
157
+ },
158
+ {
159
+ type: 'paragraph',
160
+ html: 'En piezas grandes, la contracción diferencial entre secciones gruesas y finas puede causar grietas. Los ceramistas experimentados compensan dejando paredes más gruesas en zonas que saben que contraerán más.',
161
+ },
162
+ ],
163
+ ui: {
164
+ labelInitialSize: 'Tamaño Inicial (mm)',
165
+ labelShrinkage: 'Porcentaje de Contracción (%)',
166
+ labelLow: 'Baja (Terracota)',
167
+ labelMedium: 'Media (Gres)',
168
+ labelHigh: 'Alta (Porcelana)',
169
+ presetTerracota: 'Terracota (8%)',
170
+ presetGres: 'Gres (12%)',
171
+ presetPorcelana: 'Porcelana (15%)',
172
+ labelResult: 'Resultado',
173
+ labelFinalSize: 'Tamaño Final:',
174
+ labelLoss: 'Pérdida Total:',
175
+ tipText:
176
+ 'Para calcular el tamaño inicial necesario para obtener un tamaño final específico, divide el tamaño deseado entre (1 - contracción/100).',
177
+ labelInitialBadge: 'Inicial:',
178
+ labelFinalBadge: 'mm final',
179
+ labelLossBadge: 'Pérdida:',
180
+ labelInitialArea: 'Área Inicial',
181
+ labelFinalArea: 'Área Final',
182
+ },
183
+ };
@@ -0,0 +1,183 @@
1
+ import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ClayCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculateur-retrait-argile';
6
+ const title = "Calculateur de Retrait d'Argile : Dimensions Exactes pour la Céramique";
7
+ const description =
8
+ "Calculez le retrait de l'argile pendant le séchage et la cuisson. Concevez des pièces céramiques avec les dimensions finales exactes dont vous avez besoin.";
9
+
10
+ const faqData = [
11
+ {
12
+ question: "Pourquoi l'argile rétrécit-elle ?",
13
+ answer:
14
+ "L'argile rétrécit principalement à cause de la perte d'eau. D'abord vient le séchage (évaporation de l'eau entre les particules) puis la cuisson (élimination de l'eau chimiquement combinée et frittage des particules).",
15
+ },
16
+ {
17
+ question: 'Quel est le pourcentage de retrait normal ?',
18
+ answer:
19
+ "Cela dépend de la pâte céramique. La faïence rétrécit généralement de 5 à 10%, tandis que le grès et la porcelaine peuvent atteindre 12-15% en raison d'une plus grande vitrification.",
20
+ },
21
+ {
22
+ question: "Comment mesurer le retrait de ma propre argile ?",
23
+ answer:
24
+ "Créez une plaquette de test exactement de 10cm. Laissez-la sécher et mesurez-la (retrait au séchage). Cuisez-la à la température finale et mesurez à nouveau (retrait total). La différence vous donnera le pourcentage exact.",
25
+ },
26
+ {
27
+ question: 'Que se passe-t-il si ma pièce se fissure en séchant ?',
28
+ answer:
29
+ "Cela indique généralement un séchage trop rapide ou inégal. Les zones minces perdent l'eau avant les zones épaisses, créant des tensions. Couvrez les pièces avec du plastique pour ralentir le processus.",
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Mesurer la pièce à l\'état humide',
36
+ text: "Prenez les dimensions exactes de votre pièce juste après le tournage ou le modelage, quand elle contient encore toute son humidité.",
37
+ },
38
+ {
39
+ name: 'Entrer le coefficient de retrait',
40
+ text: "Vérifiez sur l'emballage de votre argile le pourcentage de retrait total (séchage + cuisson) fourni par le fabricant.",
41
+ },
42
+ {
43
+ name: 'Obtenir les dimensions finales attendues',
44
+ text: "Utilisez le calculateur pour savoir combien votre pièce mesurera après la cuisson et planifiez vos assemblages ou couvercles.",
45
+ },
46
+ {
47
+ name: 'Calcul inverse pour les objectifs',
48
+ text: "Si vous avez besoin que votre pièce mesure exactement X cm une fois terminée, utilisez le calcul inverse pour savoir quelle taille elle doit avoir au tour.",
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowToThing> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'UtilityApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
+ inLanguage: 'fr',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<ClayCalculatorUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Questions Fréquentes',
91
+ faq: faqData,
92
+ bibliographyTitle: 'Références',
93
+ bibliography: [
94
+ {
95
+ name: "The Potter's Dictionary - Clay Shrinkage",
96
+ url: 'https://digitalfire.com/glossary/firing+shrinkage',
97
+ },
98
+ {
99
+ name: 'Ceramic Arts Network - Understanding Shrinkage',
100
+ url: 'https://ceramicartsnetwork.org/daily/article/How-to-Determine-Clay-Shrinkage-and-Make-a-Shrink-Rule',
101
+ },
102
+ ],
103
+ howTo: howToData,
104
+ schemas: [faqSchema, howToSchema, appSchema],
105
+ seo: [
106
+ {
107
+ type: 'title',
108
+ text: "La Physique de l'Argile : Retrait et Expansion",
109
+ level: 2,
110
+ },
111
+ {
112
+ type: 'paragraph',
113
+ html: "L'argile est un matériau vivant qui change de taille tout au long du processus céramique. Du moment où vous façonnez une pièce humide jusqu'à sa sortie du four, elle peut perdre entre 8% et 15% de sa taille originale. Calculer ce retrait est essentiel pour créer des pièces aux dimensions exactes dont vous avez besoin.",
114
+ },
115
+ {
116
+ type: 'grid',
117
+ columns: [
118
+ {
119
+ type: 'card',
120
+ title: 'Phases de Retrait',
121
+ html: "<p><strong>1. Séchage (Humide → Sec) :</strong> En perdant de l'eau, les particules d'argile se rapprochent. C'est la phase de retrait la plus importante (4-8%). Les pièces épaisses peuvent se fissurer si elles sèchent trop vite.</p><p><strong>2. Cuisson (Sec → Biscuit) :</strong> Entre 900-1000°C, l'argile subit des changements chimiques irréversibles. Retrait supplémentaire de 2-4%. La pièce devient poreuse mais résistante.</p><p><strong>3. Vitrification (Haute Température) :</strong> À 1200-1300°C, l'argile se vitrifie. Retrait final de 1-3%. Le grès et la porcelaine atteignent leur densité maximale.</p>",
122
+ },
123
+ {
124
+ type: 'card',
125
+ title: 'Variables Influentes',
126
+ html: "<ul><li><strong>Type d'argile :</strong> Les argiles rouges rétrécissent moins (8-10%) que les porcelaines (12-15%).</li><li><strong>Épaisseur des parois :</strong> Les parois fines rétrécissent plus uniformément que les épaisses.</li><li><strong>Température de cuisson :</strong> Des températures plus élevées signifient un retrait et une vitrification plus importants.</li><li><strong>Teneur en chamotte :</strong> Ajouter de la chamotte (argile précuite moulue) réduit le retrait.</li></ul>",
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ type: 'title',
132
+ text: 'Applications Pratiques',
133
+ level: 2,
134
+ },
135
+ {
136
+ type: 'title',
137
+ text: 'Conception de Moules',
138
+ level: 3,
139
+ },
140
+ {
141
+ type: 'paragraph',
142
+ html: "Si vous avez besoin d'une tasse avec un diamètre final de 8cm, et que votre argile rétrécit de 12%, vous devez faire le moule de <strong>9,1cm</strong>. Ce calcul inverse est critique en production en série.",
143
+ },
144
+ {
145
+ type: 'title',
146
+ text: 'Couvercles et Assemblages',
147
+ level: 3,
148
+ },
149
+ {
150
+ type: 'paragraph',
151
+ html: "Lorsque vous créez des pièces qui doivent s'emboîter (théière + couvercle, pot + couvercle), les deux doivent être faites avec la même argile et cuites ensemble pour garantir un retrait égal. Une différence de 1% peut ruiner l'ajustement.",
152
+ },
153
+ {
154
+ type: 'title',
155
+ text: 'Sculpture Monumentale',
156
+ level: 3,
157
+ },
158
+ {
159
+ type: 'paragraph',
160
+ html: "Dans les grandes pièces, le retrait différentiel entre sections épaisses et minces peut provoquer des fissures. Les céramistes expérimentés compensent en laissant des parois plus épaisses dans les zones qu'ils savent vont davantage rétrécir.",
161
+ },
162
+ ],
163
+ ui: {
164
+ labelInitialSize: 'Taille Initiale (mm)',
165
+ labelShrinkage: 'Pourcentage de Retrait (%)',
166
+ labelLow: 'Faible (Terre cuite)',
167
+ labelMedium: 'Moyen (Grès)',
168
+ labelHigh: 'Élevé (Porcelaine)',
169
+ presetTerracota: 'Terre cuite (8%)',
170
+ presetGres: 'Grès (12%)',
171
+ presetPorcelana: 'Porcelaine (15%)',
172
+ labelResult: 'Résultat',
173
+ labelFinalSize: 'Taille Finale :',
174
+ labelLoss: 'Perte Totale :',
175
+ tipText:
176
+ "Pour calculer la taille initiale nécessaire pour obtenir une taille finale spécifique, divisez la taille souhaitée par (1 - retrait/100).",
177
+ labelInitialBadge: 'Initial :',
178
+ labelFinalBadge: 'mm final',
179
+ labelLossBadge: 'Perte :',
180
+ labelInitialArea: 'Aire Initiale',
181
+ labelFinalArea: 'Aire Finale',
182
+ },
183
+ };
@@ -0,0 +1,33 @@
1
+ import type { DiyToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import ClayCalculatorComponent from './component.astro';
3
+ import ClayCalculatorSEO from './seo.astro';
4
+ import ClayCalculatorBibliography from './bibliography.astro';
5
+ import type { ClayCalculatorUI } from './ui';
6
+
7
+ export type ClayCalculatorLocaleContent = ToolLocaleContent<ClayCalculatorUI>;
8
+
9
+ import { content as es } from './i18n/es';
10
+ import { content as en } from './i18n/en';
11
+ import { content as fr } from './i18n/fr';
12
+
13
+ export const clayCalculator: DiyToolEntry<ClayCalculatorUI> = {
14
+ id: 'clay-calculator',
15
+ icons: {
16
+ bg: 'mdi:pot',
17
+ fg: 'mdi:resize',
18
+ },
19
+ i18n: {
20
+ es: async () => es,
21
+ en: async () => en,
22
+ fr: async () => fr,
23
+ },
24
+ };
25
+
26
+ export { ClayCalculatorComponent, ClayCalculatorSEO, ClayCalculatorBibliography };
27
+
28
+ export const CLAY_CALCULATOR_TOOL: ToolDefinition = {
29
+ entry: clayCalculator,
30
+ Component: ClayCalculatorComponent,
31
+ SEOComponent: ClayCalculatorSEO,
32
+ BibliographyComponent: ClayCalculatorBibliography,
33
+ };
@@ -0,0 +1,15 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { clayCalculator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+
10
+ const { locale = 'es' } = Astro.props;
11
+ const content = await clayCalculator.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+
15
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
@@ -0,0 +1,19 @@
1
+ export interface ClayCalculatorUI extends Record<string, string> {
2
+ labelInitialSize: string;
3
+ labelShrinkage: string;
4
+ labelLow: string;
5
+ labelMedium: string;
6
+ labelHigh: string;
7
+ presetTerracota: string;
8
+ presetGres: string;
9
+ presetPorcelana: string;
10
+ labelResult: string;
11
+ labelFinalSize: string;
12
+ labelLoss: string;
13
+ tipText: string;
14
+ labelInitialBadge: string;
15
+ labelFinalBadge: string;
16
+ labelLossBadge: string;
17
+ labelInitialArea: string;
18
+ labelFinalArea: string;
19
+ }
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { concreteCalculator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+ const { locale = 'es' } = Astro.props;
10
+ const content = await concreteCalculator.i18n[locale]?.();
11
+ ---
12
+
13
+ {content && <SharedBibliography links={content.bibliography} />}