@jjlmoya/utils-cooking 1.36.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.
- package/package.json +1 -1
- package/src/category/index.ts +4 -0
- package/src/entries.ts +5 -1
- package/src/index.ts +2 -0
- package/src/tests/brix-sorbet-density-calculator.test.ts +53 -0
- package/src/tests/i18n-titles.test.ts +2 -2
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/brix-sorbet-density-calculator/bibliography.astro +6 -0
- package/src/tool/brix-sorbet-density-calculator/bibliography.ts +10 -0
- package/src/tool/brix-sorbet-density-calculator/brix-sorbet-density-calculator.css +878 -0
- package/src/tool/brix-sorbet-density-calculator/component.astro +220 -0
- package/src/tool/brix-sorbet-density-calculator/entry.ts +26 -0
- package/src/tool/brix-sorbet-density-calculator/helpers.ts +102 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/de.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/en.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/es.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/fr.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/id.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/it.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/ja.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/ko.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/nl.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/pl.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/pt.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/ru.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/sv.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/tr.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/i18n/zh.ts +295 -0
- package/src/tool/brix-sorbet-density-calculator/index.ts +11 -0
- package/src/tool/brix-sorbet-density-calculator/logic.ts +180 -0
- package/src/tool/brix-sorbet-density-calculator/script.ts +114 -0
- package/src/tool/brix-sorbet-density-calculator/seo.astro +15 -0
- package/src/tool/oil-smoke-point-tracker/bibliography.astro +6 -0
- package/src/tool/oil-smoke-point-tracker/bibliography.ts +10 -0
- package/src/tool/oil-smoke-point-tracker/component.astro +445 -0
- package/src/tool/oil-smoke-point-tracker/entry.ts +26 -0
- package/src/tool/oil-smoke-point-tracker/i18n/de.ts +285 -0
- package/src/tool/oil-smoke-point-tracker/i18n/en.ts +285 -0
- package/src/tool/oil-smoke-point-tracker/i18n/es.ts +285 -0
- package/src/tool/oil-smoke-point-tracker/i18n/fr.ts +285 -0
- package/src/tool/oil-smoke-point-tracker/i18n/id.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/it.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/ja.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/ko.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/nl.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/pl.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/pt.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/ru.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/sv.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/tr.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/i18n/zh.ts +244 -0
- package/src/tool/oil-smoke-point-tracker/index.ts +11 -0
- package/src/tool/oil-smoke-point-tracker/logic.ts +70 -0
- package/src/tool/oil-smoke-point-tracker/oil-smoke-point-tracker.css +937 -0
- package/src/tool/oil-smoke-point-tracker/seo.astro +15 -0
- package/src/tools.ts +4 -0
package/package.json
CHANGED
package/src/category/index.ts
CHANGED
|
@@ -19,6 +19,8 @@ import { meatBinder } from '../tool/meat-binder-transglutaminase-calculator/entr
|
|
|
19
19
|
import { carryOverCooking } from '../tool/carry-over-cooking-predictor/entry';
|
|
20
20
|
import { maillardReaction } from '../tool/maillard-reaction-optimizer/entry';
|
|
21
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';
|
|
22
24
|
|
|
23
25
|
export const cookingCategory: CookingCategoryEntry = {
|
|
24
26
|
icon: 'mdi:chef-hat',
|
|
@@ -43,6 +45,8 @@ export const cookingCategory: CookingCategoryEntry = {
|
|
|
43
45
|
carryOverCooking,
|
|
44
46
|
maillardReaction,
|
|
45
47
|
macaronDrying,
|
|
48
|
+
brixSorbetDensity,
|
|
49
|
+
oilSmokePoint,
|
|
46
50
|
],
|
|
47
51
|
|
|
48
52
|
i18n: {
|
package/src/entries.ts
CHANGED
|
@@ -18,7 +18,9 @@ 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
20
|
export { macaronDrying } from './tool/macaron-drying-predictor/entry';
|
|
21
|
+
export { brixSorbetDensity } from './tool/brix-sorbet-density-calculator/entry';
|
|
21
22
|
export { botulismCanningSafety } from './tool/botulism-canning-safety/entry';
|
|
23
|
+
export { oilSmokePoint } from './tool/oil-smoke-point-tracker/entry';
|
|
22
24
|
export { cookingCategory } from './category';
|
|
23
25
|
import { americanKitchenConverter } from './tool/american-kitchen-converter/entry';
|
|
24
26
|
import { bananaCare } from './tool/banana-ripeness/entry';
|
|
@@ -41,5 +43,7 @@ import { meatBinder } from './tool/meat-binder-transglutaminase-calculator/entry
|
|
|
41
43
|
import { carryOverCooking } from './tool/carry-over-cooking-predictor/entry';
|
|
42
44
|
import { maillardReaction } from './tool/maillard-reaction-optimizer/entry';
|
|
43
45
|
import { macaronDrying } from './tool/macaron-drying-predictor/entry';
|
|
44
|
-
|
|
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];
|
|
45
49
|
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { MEAT_BINDER_TRANSGLUTAMINASE_TOOL } from './tool/meat-binder-transgluta
|
|
|
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
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';
|
|
25
27
|
|
|
26
28
|
|
|
27
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
|
|
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(
|
|
39
|
+
expect(completeTools.length).toBe(23);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it("tool IDs should be correctly registered", () => {
|
|
@@ -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
|
|
8
|
-
expect(ALL_TOOLS.length).toBe(
|
|
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,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
|
+
];
|