@jjlmoya/utils-cooking 1.35.0 → 1.36.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 (31) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -0
  3. package/src/entries.ts +3 -1
  4. package/src/index.ts +1 -0
  5. package/src/tests/i18n-titles.test.ts +1 -1
  6. package/src/tests/locale_completeness.test.ts +2 -2
  7. package/src/tests/tool_validation.test.ts +1 -1
  8. package/src/tool/macaron-drying-predictor/bibliography.astro +6 -0
  9. package/src/tool/macaron-drying-predictor/bibliography.ts +14 -0
  10. package/src/tool/macaron-drying-predictor/component.astro +319 -0
  11. package/src/tool/macaron-drying-predictor/entry.ts +26 -0
  12. package/src/tool/macaron-drying-predictor/i18n/de.ts +245 -0
  13. package/src/tool/macaron-drying-predictor/i18n/en.ts +247 -0
  14. package/src/tool/macaron-drying-predictor/i18n/es.ts +245 -0
  15. package/src/tool/macaron-drying-predictor/i18n/fr.ts +245 -0
  16. package/src/tool/macaron-drying-predictor/i18n/id.ts +245 -0
  17. package/src/tool/macaron-drying-predictor/i18n/it.ts +245 -0
  18. package/src/tool/macaron-drying-predictor/i18n/ja.ts +245 -0
  19. package/src/tool/macaron-drying-predictor/i18n/ko.ts +245 -0
  20. package/src/tool/macaron-drying-predictor/i18n/nl.ts +245 -0
  21. package/src/tool/macaron-drying-predictor/i18n/pl.ts +245 -0
  22. package/src/tool/macaron-drying-predictor/i18n/pt.ts +245 -0
  23. package/src/tool/macaron-drying-predictor/i18n/ru.ts +245 -0
  24. package/src/tool/macaron-drying-predictor/i18n/sv.ts +245 -0
  25. package/src/tool/macaron-drying-predictor/i18n/tr.ts +245 -0
  26. package/src/tool/macaron-drying-predictor/i18n/zh.ts +245 -0
  27. package/src/tool/macaron-drying-predictor/index.ts +11 -0
  28. package/src/tool/macaron-drying-predictor/logic.ts +58 -0
  29. package/src/tool/macaron-drying-predictor/macaron-drying-predictor.css +551 -0
  30. package/src/tool/macaron-drying-predictor/seo.astro +15 -0
  31. package/src/tools.ts +2 -0
@@ -0,0 +1,245 @@
1
+ import type { ToolLocaleContent } from '../../../types';
2
+ import { bibliography } from '../bibliography';
3
+
4
+ const title = '马卡龙壳干燥预测器:基于湿度与温度的干燥时间计算器';
5
+ const description = '根据湿度、温度和壳的大小,精确计算马卡龙壳需要干燥多长时间。避免开裂,确保每次都有完美的裙边。';
6
+
7
+ const faq = [
8
+ {
9
+ question: '为什么马卡龙壳在烘烤前需要干燥?',
10
+ answer: '干燥会在马卡龙壳表面形成一层薄皮。这层皮至关重要,因为它能在烘烤时锁住蒸汽,迫使蒸汽通过裙边向下排出,而不是冲破顶部。如果没有充分干燥,马卡龙会开裂、没有裙边,或者烘烤不均匀。',
11
+ },
12
+ {
13
+ question: '湿度如何影响马卡龙的干燥时间?',
14
+ answer: '湿度是最关键的因素。在高湿度(60%以上)环境下,空气中已经饱和了水分,会大大减缓壳表面的蒸发速度。与干燥天气相比,干燥时间可能延长两到三倍。在非常干燥的环境(30%以下)中,壳可能过度干燥,形成过厚的皮,阻碍正常膨胀。',
15
+ },
16
+ {
17
+ question: '马卡龙壳干燥的理想温度是多少?',
18
+ answer: '20°C到25°C的室温最为理想。较暖的空气能容纳更多水分,从而加速干燥,但温度过高(30°C以上)会导致外壳干燥不均匀,表壳硬而内部湿润。低于18°C的低温会显著减缓干燥速度。',
19
+ },
20
+ {
21
+ question: '壳的大小如何影响干燥时间?',
22
+ answer: '更大的壳具有更大的表面积和体积,因此需要按比例更长的干燥时间。直径2厘米的迷你马卡龙可能15分钟就干了,而5厘米的大马卡龙可能需要超过一个小时。这种关系不是线性的:由于表面积与体积的平方-立方关系,直径翻倍大约会使干燥时间增加三倍。',
23
+ },
24
+ ];
25
+
26
+ const howTo = [
27
+ {
28
+ name: '挤制马卡龙壳',
29
+ text: '在烘焙纸或硅胶垫上挤出大小均匀的圆形。使用模板可确保尺寸一致。',
30
+ },
31
+ {
32
+ name: '测量环境条件',
33
+ text: '使用温湿度计检查厨房的环境湿度和温度。',
34
+ },
35
+ {
36
+ name: '在计算器中输入数值',
37
+ text: '输入湿度、温度和壳的直径,即可获得预估的干燥时间。',
38
+ },
39
+ {
40
+ name: '测试表皮',
41
+ text: '在预测时间过后,用手指轻轻触碰壳的表面。表面应该感觉干燥且呈哑光状,不粘手。如果粘手,则需要更多时间。',
42
+ },
43
+ {
44
+ name: '准备好后即可烘烤',
45
+ text: '一旦表皮形成,立即进行烘烤。不要让壳在干燥后放置过久,否则可能过度干燥而开裂。',
46
+ },
47
+ ];
48
+
49
+ const faqSchema = {
50
+ '@context': 'https://schema.org' as const,
51
+ '@type': 'FAQPage' as const,
52
+ mainEntity: faq.map((item) => ({
53
+ '@type': 'Question' as const,
54
+ name: item.question,
55
+ acceptedAnswer: { '@type': 'Answer' as const, text: item.answer },
56
+ })),
57
+ };
58
+
59
+ const howToSchema = {
60
+ '@context': 'https://schema.org' as const,
61
+ '@type': 'HowTo' as const,
62
+ name: title,
63
+ description,
64
+ step: howTo.map((step) => ({
65
+ '@type': 'HowToStep' as const,
66
+ name: step.name,
67
+ text: step.text,
68
+ })),
69
+ };
70
+
71
+ const appSchema = {
72
+ '@context': 'https://schema.org' as const,
73
+ '@type': 'SoftwareApplication' as const,
74
+ name: title,
75
+ description,
76
+ applicationCategory: 'UtilitiesApplication',
77
+ operatingSystem: 'Web',
78
+ offers: { '@type': 'Offer' as const, price: '0', priceCurrency: 'EUR' },
79
+ };
80
+
81
+ export const content: ToolLocaleContent = {
82
+ slug: 'macaron-drying-predictor',
83
+ title: '马卡龙壳干燥预测器',
84
+ description: '根据湿度、温度和壳的大小,精确计算马卡龙壳需要干燥多长时间。避免开裂,确保每次都有完美的裙边。',
85
+ faqTitle: '常见问题',
86
+ ui: {
87
+ humidityLabel: '环境湿度',
88
+ humidityUnit: '%',
89
+ tempLabel: '室温',
90
+ tempUnit: '°C',
91
+ sizeLabel: '壳体直径',
92
+ sizeUnit: 'cm',
93
+ dryingTimeLabel: '预估干燥时间',
94
+ minutesUnit: '分钟',
95
+ readinessLabel: '表面状态',
96
+ skinStatusReady: '可以烘烤',
97
+ skinStatusForming: '表皮形成中',
98
+ skinStatusSticky: '仍粘手',
99
+ skinStatusOverDry: '过度干燥',
100
+ humidityTagHigh: '高湿度',
101
+ humidityTagNormal: '正常湿度',
102
+ humidityTagLow: '低湿度',
103
+ humidityDescHigh: '非常潮湿的天气。干燥时间将显著延长。如果条件允许,建议使用除湿机或空调房间。',
104
+ humidityDescNormal: '中等湿度。干燥速度正常,表皮形成良好。',
105
+ humidityDescLow: '空气非常干燥。壳可能干得太快,存在过度干燥的风险。请密切观察并适当缩短干燥时间。',
106
+ tempTagHot: '室温偏高',
107
+ tempTagIdeal: '理想室温',
108
+ tempTagCool: '室温偏低',
109
+ sizeTagMini: '迷你',
110
+ sizeTagStandard: '标准',
111
+ sizeTagLarge: '大型',
112
+ },
113
+ faq,
114
+ howTo,
115
+ seo: [
116
+ {
117
+ type: 'title',
118
+ text: '马卡龙壳干燥的科学:为什么表皮形成决定成败',
119
+ level: 2,
120
+ },
121
+ {
122
+ type: 'paragraph',
123
+ html: '马卡龙是法式甜点中技术要求最高的糕点之一。其标志性的光滑圆顶和褶皱底部,即所谓的"裙边"(pied),完全取决于一个关键步骤:在烘烤前将挤好的壳进行干燥。这段静置时间让每个壳的表面形成一层薄薄的蛋白质膜。在烘烤过程中,这层表皮将膨胀的蒸汽封在壳内,迫使蒸汽从底部向下逸出,从而将壳体抬起,形成令人垂涎的裙边。干燥不足,蒸汽会冲破顶部导致开裂;干燥过度,表皮变得过于僵硬,壳体无法正常膨胀。',
124
+ },
125
+ {
126
+ type: 'title',
127
+ text: '湿度及其在干燥动力学中的主导作用',
128
+ level: 3,
129
+ },
130
+ {
131
+ type: 'paragraph',
132
+ html: '相对湿度是影响马卡龙壳干燥的最重要变量。在相对湿度50%的条件下,标准3厘米壳体通常需要30至40分钟才能形成足够的表皮。湿度达到70%时,这个时间可能延长到60至90分钟。湿度降至30%时,干燥可能仅需15至20分钟即可完成。这背后的物理原理很简单:蒸发速率与壳体表面和周围空气之间的蒸气压差成正比。潮湿空气的蒸气压差较小,从而减缓了蒸发。专业甜品店会严格控制湿度,通常将马卡龙专用室的相对湿度维持在40%至50%。',
133
+ },
134
+ {
135
+ type: 'title',
136
+ text: '湿度与壳体尺寸对应的干燥时间参考表',
137
+ level: 3,
138
+ },
139
+ {
140
+ type: 'table',
141
+ headers: ['湿度', '2cm 迷你', '3cm 标准', '4cm 大型', '5cm 特大'],
142
+ rows: [
143
+ ['30%(非常干燥)', '10-15分钟', '15-20分钟', '25-30分钟', '35-45分钟'],
144
+ ['40%(干燥)', '15-20分钟', '20-30分钟', '30-40分钟', '45-60分钟'],
145
+ ['50%(适中)', '20-25分钟', '30-40分钟', '40-55分钟', '55-75分钟'],
146
+ ['60%(潮湿)', '25-35分钟', '40-55分钟', '55-75分钟', '75-100分钟'],
147
+ ['70%(非常潮湿)', '35-50分钟', '55-75分钟', '75-100分钟', '100-130分钟'],
148
+ ['80%(极其潮湿)', '50-70分钟', '75-100分钟', '100-140分钟', '130-180分钟'],
149
+ ],
150
+ },
151
+ {
152
+ type: 'title',
153
+ text: '温度在蒸发速率中的作用',
154
+ level: 3,
155
+ },
156
+ {
157
+ type: 'paragraph',
158
+ html: '温度通过两个机制影响干燥。首先,较暖的空气可以容纳更多的水蒸气,从而增加了壳体表面的潜在蒸发速率。其次,分子动能随温度升高而增加,加快了水分子从液态逸出的速度。然而,温度也会影响蛋白霜的稳定性。超过28°C时,蛋白霜中的蛋清蛋白质可能开始不稳定,导致结构减弱。马卡龙干燥的理想温度范围是20至25°C。低于18°C时,蒸发速率过低,对于标准尺寸的壳体来说干燥变得不切实际。',
159
+ },
160
+ {
161
+ type: 'title',
162
+ text: '壳体尺寸与干燥的平方-立方定律',
163
+ level: 3,
164
+ },
165
+ {
166
+ type: 'paragraph',
167
+ html: '壳体直径对干燥时间的影响是非线性的,这源于表面积与体积之间的平方-立方关系。直径2厘米的迷你马卡龙,体积约0.5立方厘米,表面积约3.1平方厘米,表面积与体积之比约为6:1,十分有利。而直径5厘米的大马卡龙,体积约8.2立方厘米,表面积约19.6平方厘米,比值仅为2.4:1。这意味着较大的壳体,水分可以逸出的表面积相对更少,导致干燥时间急剧增加。本计算器采用基于专业甜品厨房实证数据校正的幂律关系来对此进行建模。',
168
+ },
169
+ {
170
+ type: 'title',
171
+ text: '马卡龙干燥常见问题排查',
172
+ level: 3,
173
+ },
174
+ {
175
+ type: 'diagnostic',
176
+ variant: 'warning',
177
+ title: '壳体开裂,没有裙边',
178
+ html: '这是最常见的马卡龙失败情况。几乎无一例外地表明壳体在烘烤前干燥时间不够。表面表皮太弱,无法锁住膨胀的蒸汽,导致蒸汽从顶部冲出。<strong>解决方案:将干燥时间延长10至15分钟,并在烘烤前用指尖轻轻触碰表面进行测试。</strong>',
179
+ },
180
+ {
181
+ type: 'diagnostic',
182
+ variant: 'error',
183
+ title: '裙边歪斜或高低不平',
184
+ html: '干燥不均匀是罪魁祸首。如果烤盘的一侧比另一侧干得快,裙边就会不均匀地升起。这通常发生在烤盘靠近窗户、风扇或热源时。<strong>解决方案:在干燥过程中转动烤盘,确保所有壳体周围的空气均匀流通。</strong>',
185
+ },
186
+ {
187
+ type: 'diagnostic',
188
+ variant: 'info',
189
+ title: '烘烤后内部空心',
190
+ html: '过度干燥会导致表皮过厚过硬,从而造成空心。壳体在烘烤时无法正常膨胀,内部留下空隙。<strong>解决方案:缩短干燥时间,并更早地检查表皮形成情况。表面应该感觉干燥,但轻轻按压时仍应有微微的回弹感。</strong>',
191
+ },
192
+ {
193
+ type: 'title',
194
+ text: '专业甜品师的实用技巧',
195
+ level: 3,
196
+ },
197
+ {
198
+ type: 'tip',
199
+ title: '潮湿天气的烤箱干燥法',
200
+ html: '在极度潮湿的日子里,专业厨师会使用一种称为"烤箱干燥"的技巧。将烤箱预热到最低温度(通常为50°C),关掉电源,然后将挤好的马卡龙放入烤箱,箱门微开,静置5至10分钟。这样能营造一个温暖且低湿度的小环境,加速表皮形成,而不会开始烘烤壳体。',
201
+ },
202
+ {
203
+ type: 'tip',
204
+ title: '判断完美表皮的触摸测试',
205
+ html: '判断马卡龙是否准备就绪的终极测试:用干净干燥的指尖轻轻触碰一个壳体的表面。如果面糊粘在手指上,还需要更多时间。如果表面感觉干燥、哑光且不粘手,表皮已经形成。如果表面感觉坚硬、粗糙且没有回弹,说明壳体已经过度干燥。',
206
+ },
207
+ {
208
+ type: 'tip',
209
+ title: '无需设备的湿度控制方法',
210
+ html: '如果没有除湿机,可以在干燥中的马卡龙旁边放一碗生米或硅胶干燥剂。这些干燥剂会吸收周围的水分,在烤盘周围形成一个更干燥的小环境。在没有空调的专业厨房里,这个简单的窍门在潮湿天气可将干燥时间缩短30%至40%。',
211
+ },
212
+ {
213
+ type: 'title',
214
+ text: '蛋清老化因素的影响',
215
+ level: 3,
216
+ },
217
+ {
218
+ type: 'paragraph',
219
+ html: '老化后的蛋清能做出更稳定的蛋白霜,干燥过程也更可预测。新鲜蛋清含水量更高,蛋白质弹性结构较弱,导致蛋白霜强度不足,需要更长时间才能形成足够的表皮。专业配方要求将蛋清在室温下老化24至72小时,或在冰箱中存放3至5天。老化过程中,蛋清通过蒸发失去约10%至15%的水分,蛋白质得以浓缩,从而提升蛋白霜的强度。',
220
+ },
221
+ {
222
+ type: 'title',
223
+ text: '快速参考:常见条件下的干燥时间',
224
+ level: 3,
225
+ },
226
+ {
227
+ type: 'summary',
228
+ title: '3cm标准马卡龙壳在常见条件下的干燥时间',
229
+ items: [
230
+ '空调房厨房(22°C,45%湿度):25-30分钟',
231
+ '春日开窗(20°C,55%湿度):35-45分钟',
232
+ '夏日无空调(28°C,70%湿度):60-90分钟 - 建议使用烤箱干燥法',
233
+ '冬季暖气房(21°C,30%湿度):15-20分钟 - 警惕过度干燥',
234
+ '雨天(18°C,80%湿度):75-100分钟 - 强烈建议使用除湿机',
235
+ '专业甜品厨房(22°C,45%湿度,对流烤箱):20-25分钟',
236
+ ],
237
+ },
238
+ {
239
+ type: 'paragraph',
240
+ html: '每个厨房的环境都是独一无二的。本计算器综合考虑了湿度、温度和壳体尺寸这三个关键变量,为您提供个性化的干燥时间预测。输入您的条件,放心地开始挤制吧。',
241
+ },
242
+ ],
243
+ bibliography,
244
+ schemas: [faqSchema, howToSchema, appSchema],
245
+ };
@@ -0,0 +1,11 @@
1
+ import type { ToolDefinition } from '../../types';
2
+ import { macaronDrying } from './entry';
3
+
4
+ export * from './entry';
5
+
6
+ export const MACARON_DRYING_TOOL: ToolDefinition = {
7
+ entry: macaronDrying,
8
+ Component: () => import('./component.astro'),
9
+ SEOComponent: () => import('./seo.astro'),
10
+ BibliographyComponent: () => import('./bibliography.astro'),
11
+ };
@@ -0,0 +1,58 @@
1
+ export interface MacaronDryingInput {
2
+ humidity: number;
3
+ temperature: number;
4
+ shellDiameter: number;
5
+ }
6
+
7
+ export interface MacaronDryingResult {
8
+ dryingTimeMinutes: number;
9
+ surfaceReadiness: number;
10
+ skinFormed: boolean;
11
+ humidityFactor: number;
12
+ tempFactor: number;
13
+ sizeFactor: number;
14
+ }
15
+
16
+ const MIN_HUMIDITY = 20;
17
+ const MAX_HUMIDITY = 90;
18
+ const MIN_TEMP = 15;
19
+ const MAX_TEMP = 35;
20
+ const MIN_DIAMETER = 2;
21
+ const MAX_DIAMETER = 6;
22
+
23
+ export class MacaronDryingLogic {
24
+ static humToFactor(h: number): number {
25
+ const hc = Math.max(MIN_HUMIDITY, Math.min(MAX_HUMIDITY, h));
26
+ return 1 + Math.pow((hc - 30) / 30, 2) * 2;
27
+ }
28
+
29
+ static tempToFactor(t: number): number {
30
+ const tc = Math.max(MIN_TEMP, Math.min(MAX_TEMP, t));
31
+ return 1 + (25 - tc) * 0.04;
32
+ }
33
+
34
+ static sizeToFactor(d: number): number {
35
+ const dc = Math.max(MIN_DIAMETER, Math.min(MAX_DIAMETER, d));
36
+ return Math.pow(dc / 3, 1.5);
37
+ }
38
+
39
+ static calculate(input: MacaronDryingInput): MacaronDryingResult {
40
+ const hf = MacaronDryingLogic.humToFactor(input.humidity);
41
+ const tf = MacaronDryingLogic.tempToFactor(input.temperature);
42
+ const sf = MacaronDryingLogic.sizeToFactor(input.shellDiameter);
43
+
44
+ const baseMinutes = 30;
45
+ const dryingTimeMinutes = Math.round(baseMinutes * hf * tf * sf);
46
+
47
+ const surfaceReadiness = Math.max(0, Math.min(100, Math.round(100 - (hf - 1) * 50 - (tf - 1) * 30)));
48
+
49
+ return {
50
+ dryingTimeMinutes,
51
+ surfaceReadiness,
52
+ skinFormed: surfaceReadiness >= 50,
53
+ humidityFactor: parseFloat(hf.toFixed(2)),
54
+ tempFactor: parseFloat(tf.toFixed(2)),
55
+ sizeFactor: parseFloat(sf.toFixed(2)),
56
+ };
57
+ }
58
+ }