@jjlmoya/utils-cooking 1.35.0 → 1.37.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 (80) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +6 -0
  3. package/src/entries.ts +7 -1
  4. package/src/index.ts +3 -0
  5. package/src/tests/brix-sorbet-density-calculator.test.ts +53 -0
  6. package/src/tests/i18n-titles.test.ts +2 -2
  7. package/src/tests/locale_completeness.test.ts +2 -2
  8. package/src/tests/tool_validation.test.ts +2 -2
  9. package/src/tool/brix-sorbet-density-calculator/bibliography.astro +6 -0
  10. package/src/tool/brix-sorbet-density-calculator/bibliography.ts +10 -0
  11. package/src/tool/brix-sorbet-density-calculator/brix-sorbet-density-calculator.css +878 -0
  12. package/src/tool/brix-sorbet-density-calculator/component.astro +220 -0
  13. package/src/tool/brix-sorbet-density-calculator/entry.ts +26 -0
  14. package/src/tool/brix-sorbet-density-calculator/helpers.ts +102 -0
  15. package/src/tool/brix-sorbet-density-calculator/i18n/de.ts +295 -0
  16. package/src/tool/brix-sorbet-density-calculator/i18n/en.ts +295 -0
  17. package/src/tool/brix-sorbet-density-calculator/i18n/es.ts +295 -0
  18. package/src/tool/brix-sorbet-density-calculator/i18n/fr.ts +295 -0
  19. package/src/tool/brix-sorbet-density-calculator/i18n/id.ts +295 -0
  20. package/src/tool/brix-sorbet-density-calculator/i18n/it.ts +295 -0
  21. package/src/tool/brix-sorbet-density-calculator/i18n/ja.ts +295 -0
  22. package/src/tool/brix-sorbet-density-calculator/i18n/ko.ts +295 -0
  23. package/src/tool/brix-sorbet-density-calculator/i18n/nl.ts +295 -0
  24. package/src/tool/brix-sorbet-density-calculator/i18n/pl.ts +295 -0
  25. package/src/tool/brix-sorbet-density-calculator/i18n/pt.ts +295 -0
  26. package/src/tool/brix-sorbet-density-calculator/i18n/ru.ts +295 -0
  27. package/src/tool/brix-sorbet-density-calculator/i18n/sv.ts +295 -0
  28. package/src/tool/brix-sorbet-density-calculator/i18n/tr.ts +295 -0
  29. package/src/tool/brix-sorbet-density-calculator/i18n/zh.ts +295 -0
  30. package/src/tool/brix-sorbet-density-calculator/index.ts +11 -0
  31. package/src/tool/brix-sorbet-density-calculator/logic.ts +180 -0
  32. package/src/tool/brix-sorbet-density-calculator/script.ts +114 -0
  33. package/src/tool/brix-sorbet-density-calculator/seo.astro +15 -0
  34. package/src/tool/macaron-drying-predictor/bibliography.astro +6 -0
  35. package/src/tool/macaron-drying-predictor/bibliography.ts +14 -0
  36. package/src/tool/macaron-drying-predictor/component.astro +319 -0
  37. package/src/tool/macaron-drying-predictor/entry.ts +26 -0
  38. package/src/tool/macaron-drying-predictor/i18n/de.ts +245 -0
  39. package/src/tool/macaron-drying-predictor/i18n/en.ts +247 -0
  40. package/src/tool/macaron-drying-predictor/i18n/es.ts +245 -0
  41. package/src/tool/macaron-drying-predictor/i18n/fr.ts +245 -0
  42. package/src/tool/macaron-drying-predictor/i18n/id.ts +245 -0
  43. package/src/tool/macaron-drying-predictor/i18n/it.ts +245 -0
  44. package/src/tool/macaron-drying-predictor/i18n/ja.ts +245 -0
  45. package/src/tool/macaron-drying-predictor/i18n/ko.ts +245 -0
  46. package/src/tool/macaron-drying-predictor/i18n/nl.ts +245 -0
  47. package/src/tool/macaron-drying-predictor/i18n/pl.ts +245 -0
  48. package/src/tool/macaron-drying-predictor/i18n/pt.ts +245 -0
  49. package/src/tool/macaron-drying-predictor/i18n/ru.ts +245 -0
  50. package/src/tool/macaron-drying-predictor/i18n/sv.ts +245 -0
  51. package/src/tool/macaron-drying-predictor/i18n/tr.ts +245 -0
  52. package/src/tool/macaron-drying-predictor/i18n/zh.ts +245 -0
  53. package/src/tool/macaron-drying-predictor/index.ts +11 -0
  54. package/src/tool/macaron-drying-predictor/logic.ts +58 -0
  55. package/src/tool/macaron-drying-predictor/macaron-drying-predictor.css +551 -0
  56. package/src/tool/macaron-drying-predictor/seo.astro +15 -0
  57. package/src/tool/oil-smoke-point-tracker/bibliography.astro +6 -0
  58. package/src/tool/oil-smoke-point-tracker/bibliography.ts +10 -0
  59. package/src/tool/oil-smoke-point-tracker/component.astro +445 -0
  60. package/src/tool/oil-smoke-point-tracker/entry.ts +26 -0
  61. package/src/tool/oil-smoke-point-tracker/i18n/de.ts +285 -0
  62. package/src/tool/oil-smoke-point-tracker/i18n/en.ts +285 -0
  63. package/src/tool/oil-smoke-point-tracker/i18n/es.ts +285 -0
  64. package/src/tool/oil-smoke-point-tracker/i18n/fr.ts +285 -0
  65. package/src/tool/oil-smoke-point-tracker/i18n/id.ts +244 -0
  66. package/src/tool/oil-smoke-point-tracker/i18n/it.ts +244 -0
  67. package/src/tool/oil-smoke-point-tracker/i18n/ja.ts +244 -0
  68. package/src/tool/oil-smoke-point-tracker/i18n/ko.ts +244 -0
  69. package/src/tool/oil-smoke-point-tracker/i18n/nl.ts +244 -0
  70. package/src/tool/oil-smoke-point-tracker/i18n/pl.ts +244 -0
  71. package/src/tool/oil-smoke-point-tracker/i18n/pt.ts +244 -0
  72. package/src/tool/oil-smoke-point-tracker/i18n/ru.ts +244 -0
  73. package/src/tool/oil-smoke-point-tracker/i18n/sv.ts +244 -0
  74. package/src/tool/oil-smoke-point-tracker/i18n/tr.ts +244 -0
  75. package/src/tool/oil-smoke-point-tracker/i18n/zh.ts +244 -0
  76. package/src/tool/oil-smoke-point-tracker/index.ts +11 -0
  77. package/src/tool/oil-smoke-point-tracker/logic.ts +70 -0
  78. package/src/tool/oil-smoke-point-tracker/oil-smoke-point-tracker.css +937 -0
  79. package/src/tool/oil-smoke-point-tracker/seo.astro +15 -0
  80. package/src/tools.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-cooking",
3
- "version": "1.35.0",
3
+ "version": "1.37.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -18,6 +18,9 @@ import { botulismCanningSafety } from '../tool/botulism-canning-safety/entry';
18
18
  import { meatBinder } from '../tool/meat-binder-transglutaminase-calculator/entry';
19
19
  import { carryOverCooking } from '../tool/carry-over-cooking-predictor/entry';
20
20
  import { maillardReaction } from '../tool/maillard-reaction-optimizer/entry';
21
+ import { macaronDrying } from '../tool/macaron-drying-predictor/entry';
22
+ import { brixSorbetDensity } from '../tool/brix-sorbet-density-calculator/entry';
23
+ import { oilSmokePoint } from '../tool/oil-smoke-point-tracker/entry';
21
24
 
22
25
  export const cookingCategory: CookingCategoryEntry = {
23
26
  icon: 'mdi:chef-hat',
@@ -41,6 +44,9 @@ export const cookingCategory: CookingCategoryEntry = {
41
44
  meatBinder,
42
45
  carryOverCooking,
43
46
  maillardReaction,
47
+ macaronDrying,
48
+ brixSorbetDensity,
49
+ oilSmokePoint,
44
50
  ],
45
51
 
46
52
  i18n: {
package/src/entries.ts CHANGED
@@ -17,7 +17,10 @@ export { iceCreamPacPod } from './tool/ice-cream-pac-pod/entry';
17
17
  export { meatBinder } from './tool/meat-binder-transglutaminase-calculator/entry';
18
18
  export { carryOverCooking } from './tool/carry-over-cooking-predictor/entry';
19
19
  export { maillardReaction } from './tool/maillard-reaction-optimizer/entry';
20
+ export { macaronDrying } from './tool/macaron-drying-predictor/entry';
21
+ export { brixSorbetDensity } from './tool/brix-sorbet-density-calculator/entry';
20
22
  export { botulismCanningSafety } from './tool/botulism-canning-safety/entry';
23
+ export { oilSmokePoint } from './tool/oil-smoke-point-tracker/entry';
21
24
  export { cookingCategory } from './category';
22
25
  import { americanKitchenConverter } from './tool/american-kitchen-converter/entry';
23
26
  import { bananaCare } from './tool/banana-ripeness/entry';
@@ -39,5 +42,8 @@ import { botulismCanningSafety } from './tool/botulism-canning-safety/entry';
39
42
  import { meatBinder } from './tool/meat-binder-transglutaminase-calculator/entry';
40
43
  import { carryOverCooking } from './tool/carry-over-cooking-predictor/entry';
41
44
  import { maillardReaction } from './tool/maillard-reaction-optimizer/entry';
42
- export const ALL_ENTRIES = [americanKitchenConverter, bananaCare, brine, cookwareGuide, eggTimer, ingredientRescaler, kitchenTimer, meringuePeak, moldScaler, pizza, rouxGuide, sourdoughCalculator, yeastConverter, lactoFermentationSalt, spherificationBath, iceCreamPacPod, botulismCanningSafety, meatBinder, carryOverCooking, maillardReaction];
45
+ import { macaronDrying } from './tool/macaron-drying-predictor/entry';
46
+ import { brixSorbetDensity } from './tool/brix-sorbet-density-calculator/entry';
47
+ import { oilSmokePoint } from './tool/oil-smoke-point-tracker/entry';
48
+ export const ALL_ENTRIES = [americanKitchenConverter, bananaCare, brine, cookwareGuide, eggTimer, ingredientRescaler, kitchenTimer, meringuePeak, moldScaler, pizza, rouxGuide, sourdoughCalculator, yeastConverter, lactoFermentationSalt, spherificationBath, iceCreamPacPod, botulismCanningSafety, meatBinder, carryOverCooking, maillardReaction, macaronDrying, brixSorbetDensity, oilSmokePoint];
43
49
 
package/src/index.ts CHANGED
@@ -21,6 +21,9 @@ export { BOTULISM_CANNING_SAFETY_TOOL } from './tool/botulism-canning-safety';
21
21
  export { MEAT_BINDER_TRANSGLUTAMINASE_TOOL } from './tool/meat-binder-transglutaminase-calculator';
22
22
  export { CARRY_OVER_COOKING_TOOL } from './tool/carry-over-cooking-predictor';
23
23
  export { MAILLARD_REACTION_TOOL } from './tool/maillard-reaction-optimizer';
24
+ export { MACARON_DRYING_TOOL } from './tool/macaron-drying-predictor';
25
+ export { BRIX_SORBET_DENSITY_CALCULATOR_TOOL } from './tool/brix-sorbet-density-calculator';
26
+ export { OIL_SMOKE_POINT_TRACKER_TOOL } from './tool/oil-smoke-point-tracker';
24
27
 
25
28
 
26
29
  export type {
@@ -0,0 +1,53 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { SorbetLogic } from '../tool/brix-sorbet-density-calculator/logic';
3
+
4
+ describe('Brix Sorbet Density Calculator Logic', () => {
5
+ it('calculates correct brix and PAC for standard mango puree mix', () => {
6
+ const res = SorbetLogic.calculate({
7
+ fruitWeight: 500,
8
+ fruitBrix: 14,
9
+ sugarWeight: 150,
10
+ waterWeight: 350,
11
+ dextroseWeight: 0,
12
+ });
13
+ expect(res.totalWeight).toBe(1000);
14
+ expect(res.totalBrix).toBe(22.0);
15
+ expect(res.status).toBe('hard');
16
+ });
17
+
18
+ it('correctly calculates optimal status when brix is within range', () => {
19
+ const res = SorbetLogic.calculate({
20
+ fruitWeight: 500,
21
+ fruitBrix: 14,
22
+ sugarWeight: 210,
23
+ waterWeight: 290,
24
+ dextroseWeight: 0,
25
+ });
26
+ expect(res.totalBrix).toBe(28.0);
27
+ expect(res.status).toBe('optimal');
28
+ });
29
+
30
+ it('correctly calculates soft status when brix is too high', () => {
31
+ const res = SorbetLogic.calculate({
32
+ fruitWeight: 500,
33
+ fruitBrix: 14,
34
+ sugarWeight: 300,
35
+ waterWeight: 200,
36
+ dextroseWeight: 0,
37
+ });
38
+ expect(res.totalBrix).toBe(37.0);
39
+ expect(res.status).toBe('soft');
40
+ });
41
+
42
+ it('includes dextrose contribution in total brix and PAC', () => {
43
+ const res = SorbetLogic.calculate({
44
+ fruitWeight: 500,
45
+ fruitBrix: 14,
46
+ sugarWeight: 100,
47
+ waterWeight: 300,
48
+ dextroseWeight: 100,
49
+ });
50
+ expect(res.totalBrix).toBe(27.0);
51
+ expect(res.totalPAC).toBe(423.0);
52
+ });
53
+ });
@@ -34,9 +34,9 @@ describe("i18n titles for FAQ", () => {
34
34
  }
35
35
  });
36
36
 
37
- it("should have 17 tools with complete i18n setup", async () => {
37
+ it("should have 18 tools with complete i18n setup", async () => {
38
38
  const completeTools = ALL_TOOLS.filter((t) => Object.keys(t.entry.i18n).length > 1);
39
- expect(completeTools.length).toBe(20);
39
+ expect(completeTools.length).toBe(23);
40
40
  });
41
41
 
42
42
  it("tool IDs should be correctly registered", () => {
@@ -24,8 +24,8 @@ describe('Locale Completeness Validation', () => {
24
24
  });
25
25
  });
26
26
 
27
- it('all 20 tools registered', () => {
28
- expect(ALL_TOOLS.length).toBe(20);
27
+ it('all 23 tools registered', () => {
28
+ expect(ALL_TOOLS.length).toBe(23);
29
29
  });
30
30
 
31
31
  });
@@ -4,8 +4,8 @@ import { cookingCategory } from '../data';
4
4
 
5
5
  describe('Tool Validation Suite', () => {
6
6
  describe('Library Registration', () => {
7
- it('should have 20 tools in ALL_TOOLS', () => {
8
- expect(ALL_TOOLS.length).toBe(20);
7
+ it('should have 23 tools in ALL_TOOLS', () => {
8
+ expect(ALL_TOOLS.length).toBe(23);
9
9
  });
10
10
 
11
11
 
@@ -0,0 +1,6 @@
1
+ ---
2
+ import { Bibliography as BibliographyComponent } from '@jjlmoya/utils-shared';
3
+ import { bibliography } from './bibliography';
4
+ ---
5
+
6
+ <BibliographyComponent links={bibliography} />
@@ -0,0 +1,10 @@
1
+ export const bibliography = [
2
+ {
3
+ name: 'The Science of Ice Cream - Chris Clarke',
4
+ url: 'https://books.rsc.org/books/monograph/2200/bookpreview-pdf/1823307',
5
+ },
6
+ {
7
+ name: 'Frozen Desserts - Francisco J. Migoya',
8
+ url: 'https://www.booksforchefs.com/es/libros-heladeria/667-frozen-desserts-francisco-migoya.html',
9
+ }
10
+ ];