cooking-temperature 1.0.2 → 1.0.4
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/README.md +296 -35
- package/dist/icons.d.mts +5 -0
- package/dist/icons.d.ts +5 -0
- package/dist/icons.js +102 -0
- package/dist/icons.js.map +1 -0
- package/dist/icons.mjs +75 -0
- package/dist/icons.mjs.map +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
package/dist/icons.mjs
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// icons.ts
|
|
2
|
+
var toDataUrl = (svg) => {
|
|
3
|
+
const encoded = encodeURIComponent(svg).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
4
|
+
return `data:image/svg+xml,${encoded}`;
|
|
5
|
+
};
|
|
6
|
+
var SVG_POULTRY = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#C1694F" d="M30.326 14.24c-.279-4.063-4.016-7.592-8.396-7.931-4.38-.339-7.294 1.908-8.406 5.865-1.113 3.958 1.006 9.672 1.006 9.672l1.781 2.281 3.594 5.719 3 .281 2.219-1.562 3.344-4.281 1.5-1.75.358-8.294z"/><path fill="#E0A577" d="M26.639 12.178c-.224-3.25-3.213-6.074-6.717-6.345-3.504-.271-5.836 1.526-6.725 4.692-.889 3.166.805 7.738.805 7.738l1.425 1.825 2.875 4.575 2.4.225 1.775-1.25 2.675-3.425 1.2-1.4.287-6.635z"/><path fill="#C1694F" d="M11.069 18.063c-2.5-1.688-3.02-4.602-3.02-4.602s-.937-6.219-.479-8.732c.458-2.513 2.769-3.27 4.436-2.498 1.667.771 1.428 1.705 2.016 3.575.588 1.87.336 3.803 1.078 5.614.741 1.811 1.913 2.933 2.26 4.618.346 1.685-.33 3.327-2.372 3.806-2.041.478-3.919-1.781-3.919-1.781z"/><path fill="#E0A577" d="M12.298 16.537c-2-1.35-2.416-3.682-2.416-3.682s-.75-4.975-.383-6.986c.367-2.01 2.215-2.616 3.549-1.998 1.333.617 1.142 1.364 1.613 2.86.47 1.496.269 3.042.862 4.491.593 1.449 1.531 2.347 1.808 3.694.277 1.348-.264 2.662-1.898 3.045-1.633.383-3.135-1.424-3.135-1.424z"/><ellipse cx="17.952" cy="32.656" fill="#C1694F" rx="4.218" ry="1.594"/><path fill="#E0A577" d="M16.858 21.858s-.546 6.792-.179 8.75c.367 1.958 1 2.344 2.042 2.25 1.041-.094 1.291-1.125 1.375-2.417.083-1.292.125-8.333.125-8.333l-3.363-.25z"/></svg>`;
|
|
7
|
+
var SVG_BEEF = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#BE1931" d="M35.728 10.357c-2.267-5.266-6.9-8.628-12.102-9.472-1.249-.203-7.308-.937-13.081 2.279C5.058 6.641 1.353 11.785.16 20.074c-.591 4.108-.074 7.093 1.539 8.871 2.021 2.229 5.555 2.596 8.306 2.596.976 0 1.87-.052 2.58-.103 2.018-.149 8.741-1.043 14.396-4.636 5.575-3.543 9.989-10.38 8.747-16.445z"/><path fill="#DD2E44" d="M33.728 11.357c-1.983-4.608-6.037-7.549-10.59-8.29-1.093-.178-6.395-.82-11.446 1.994C6.801 7.936 3.558 12.437 2.513 19.69c-.518 3.595-.065 6.207 1.347 7.762 1.769 1.951 4.861 2.272 7.268 2.272.854 0 1.636-.046 2.257-.09 1.766-.131 7.649-.913 12.597-4.057 4.88-3.102 8.742-9.085 7.746-14.22z"/><path fill="#BE1931" d="M23.901 5.398c-1.093-.178-6.395-.82-11.446 1.994-.969.54-1.859 1.157-2.674 1.833 1.019-.397 2.149-.652 3.394-.652 5.237 0 9.891 3.618 10.909 8.707.324 1.62.283 3.219-.056 4.73 3.019-2.727 5.476-6.757 4.62-10.392-1.983-4.608-6.037-7.549-10.59-8.29.614.09 4.219.788 5.843 2.07z"/><ellipse cx="12.814" cy="15.785" fill="#F7DECE" rx="7.021" ry="5.404"/><ellipse cx="12.814" cy="15.785" fill="#BE1931" rx="3.298" ry="2.54"/></svg>`;
|
|
8
|
+
var SVG_PORK = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#C1694F" d="M31.29 13.214c-.483-4.839-5.274-8.944-10.761-9.221-5.487-.277-9.12 2.704-10.481 7.571-1.361 4.867.636 11.714 1.959 14.199 1.323 2.485 2.978 4.354 6.27 4.648 3.292.294 6.234-1.102 8.413-3.826 2.179-2.724 5.083-8.532 4.6-13.371z"/><path fill="#E0A577" d="M28.632 13.661c-.386-3.871-4.219-7.155-8.609-7.377-4.39-.222-7.296 2.163-8.385 6.057-1.089 3.894.509 9.371 1.567 11.359 1.058 1.988 2.382 3.483 5.016 3.718 2.634.235 4.987-.882 6.73-3.061 1.744-2.179 4.067-6.825 3.681-10.696z"/><path fill="#FFCC4D" d="M10.733 19.714c-1.128 1.332-4.012 4.523-5.345 5.618-1.333 1.095-3.857 2.857-3.857 4.762s1.524 3.619 3.619 3.619c2.095 0 3.583-1.179 4.917-2.333 1.333-1.155 4.379-4.446 5.065-5.422.686-.976 1.143-2.531.762-3.238-.381-.708-2.115-.746-3.219-.368-1.105.381-1.942-2.638-1.942-2.638z"/><path fill="#FFAC33" d="M5.482 31.003c-.073 0-.146-.022-.209-.067-.156-.111-.193-.328-.082-.484 1.04-1.459 3.113-4.063 3.134-4.09.117-.148.331-.177.483-.063.151.114.182.328.067.48-.021.027-2.089 2.625-3.125 4.078-.069.095-.176.146-.268.146zm1.729.814c-.073 0-.147-.022-.21-.068-.155-.111-.192-.328-.081-.484 1.373-1.928 3.076-4.138 3.093-4.161.115-.151.33-.181.482-.066.152.113.183.328.068.48-.017.023-1.716 2.228-3.084 4.148-.068.098-.175.151-.268.151zm1.787.664c-.073 0-.147-.022-.21-.068-.155-.111-.192-.328-.081-.484 1.398-1.961 2.869-3.931 2.884-3.951.114-.152.33-.184.482-.069.153.113.185.327.071.48-.015.02-1.482 1.984-2.877 3.941-.068.099-.175.151-.269.151z"/><ellipse cx="6.833" cy="32.524" fill="#FFCC4D" rx="2.667" ry="1.143"/></svg>`;
|
|
9
|
+
var SVG_FISH = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#55ACEE" d="M27 2s-5.958 3.75-8.031 5.469C14.865 11.057 8.503 18.839 5 23c-1.5 1-2.5 2.25-2.5 3.5 0 2.5 2.603 5.5 4.5 5.5 1.5 0 2.5-1 3.5-2.5 3.5-4.5 10.654-10.588 13.5-13.5C25.806 14.056 31 9 31 9l-4-7z"/><circle cx="9.5" cy="27.5" r="1.5" fill="#292F33"/><path fill="#3B88C3" d="M25 4s-4.958 3.75-7.031 5.469C13.865 13.057 8.503 19.839 5 24c-1.5 1-2.083 2.5-2.083 3.5 0 1.75 1.686 3.5 3.583 3.5 1.5 0 2.5-1 3.5-2.5 3.5-4.5 9.654-9.588 12.5-12.5C24.306 14.056 29 10 29 10l-4-6z"/><path fill="#55ACEE" d="M31 8s3 3.334 3 6c0 2.668-3 6-3 6l-2.667-5.333L31 8z"/><path fill="#3B88C3" d="M29 10s3 2.334 3 5c0 2.668-3 5-3 5l-2-4.5 2-5.5z"/></svg>`;
|
|
10
|
+
var SVG_SHRIMP = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#F4900C" d="M26.688 9.812c-.271 2.917-1.167 8.146-4.792 11.771-2.917 2.917-8.771 3.125-12.708 3.125-1.549 0-2.912-.049-3.938-.106-1.958-.107-2.313-.707-2.188-1.914s1.538-.998 3.059-.871c.761.063 1.722.107 2.817.107 3.458 0 8.146-.438 10.146-2.438 2.833-2.833 3.563-6.563 3.813-8.938.188-1.792.854-1.917 1.604-1.646.75.272.395 1.91.187 2.91z"/><path fill="#FFCC4D" d="M10.376 15.098c-2.188.354-3.188.917-3.188 2.417 0 1.125.667 1.792 1.792 1.792 1.75 0 2.104-.771 2.104-1.917s-.708-2.292-.708-2.292z"/><path fill="#F4900C" d="M16.542 10.639c-4.25 0-5.917 2.042-6.875 4.5.084-.001.162-.014.25-.014 2.292 0 2.667 2.417 2.667 3.583 0 1.75-.854 3.167-3.292 3.167-1.708 0-3-1.104-3.145-2.958-.032.035-.065.065-.098.101-1.125 1.25-1.875 3.063-1.875 5.875 0 4.166 3.333 8.229 8.833 8.229s9.667-4.229 9.667-9.646c0-6.625-3.25-12.837-6.132-12.837z"/><circle cx="9.396" cy="27.441" r="1.25" fill="#662113"/><path fill="#FFCC4D" d="M15.5 25c-1.375 0-2.5 1.625-2.5 3.5 0 1.25.375 2.5 1.875 2.5 1.667 0 2.125-1.417 2.125-2.917 0-1.208-.125-3.083-1.5-3.083zm4-1c-1.125 0-2 1.542-2 3.25 0 1.083.333 2.25 1.625 2.25 1.375 0 1.875-1.208 1.875-2.583 0-1.084-.167-2.917-1.5-2.917z"/><path fill="#F4900C" d="M5.813 25.77c-.094-.178-.428-.188-.746-.022-.318.166-.479.452-.385.631l1.334 2.428c.081.155.327.187.599.095-.233-.497-1.026-1.995-.802-3.132z"/><path fill="#FFCC4D" d="M30.599 5.401c-.345.174-.525.513-.431.785.036.104.136.393-.212.938-.49.768-1.679 1.717-4.002 2.882-5.708 2.862-8.62.67-10.33-.776-.615-.52-1.084-1.059-1.462-1.55-.295-.384-.764-.389-1.047-.01-.283.378-.172.919.168 1.27l.022.023c.396.443.925.986 1.622 1.555 1.981 1.616 5.846 4.287 12.511.948 2.549-1.277 3.944-2.394 4.604-3.429.451-.708.554-1.378.343-1.988-.094-.272-.34-.361-.513-.361-.089 0-.175.021-.249.059-.355.179-.549.504-.479.784.054.217-.011.448-.234.668-.356.351-1.085.787-2.186 1.323-3.364 1.637-5.539 1.314-6.753.552-1.028-.646-1.424-1.558-1.425-1.56-.116-.266-.5-.361-.857-.212-.356.149-.54.484-.423.749l.001.002c.02.046.508 1.131 1.778 1.933 1.535.968 4.167 1.378 8.079-.527 1.212-.59 2.036-1.087 2.495-1.54.538-.531.659-1.102.529-1.574-.132-.476-.51-.818-.993-.818-.109 0-.221.019-.334.056z"/><ellipse cx="27.819" cy="2.692" fill="#FFCC4D" rx="2.413" ry="1.025" transform="rotate(-63.435 27.82 2.693)"/><ellipse cx="30.569" cy="4.067" fill="#FFCC4D" rx="2.413" ry="1.025" transform="rotate(-63.435 30.57 4.067)"/></svg>`;
|
|
11
|
+
var SVG_EGG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#E1E8ED" d="M18 35c-7.732 0-14-4.701-14-10.5C4 14.603 11.268 1 18 1s14 13.603 14 23.5c0 5.799-6.268 10.5-14 10.5z"/><path fill="#CCD6DD" d="M18 33c-6.627 0-12-3.873-12-8.5C6 15.603 12.268 3 18 3s12 12.603 12 21.5c0 4.627-5.373 8.5-12 8.5z"/></svg>`;
|
|
12
|
+
var SVG_BROCCOLI = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#77B255" d="M22.453 35.564c-.315 0-.636-.08-.934-.251-5.281-3.029-5.792-10.958-5.813-11.294-.042-.679.474-1.263 1.152-1.305.683-.048 1.263.474 1.305 1.152.005.073.456 7.134 4.607 9.515.59.339.795 1.091.456 1.683-.227.396-.642.617-1.069.617-.001-.117-.296-.117-.704-.117z"/><path fill="#5C913B" d="M13.838 35.564c-.315 0-.636-.08-.934-.251-5.281-3.029-5.792-10.958-5.813-11.294-.042-.679.474-1.263 1.152-1.305.683-.048 1.263.474 1.305 1.152.005.073.456 7.134 4.607 9.515.59.339.795 1.091.456 1.683-.227.396-.642.617-1.069.617-.001-.117-.296-.117-.704-.117z"/><ellipse cx="20.285" cy="18.546" fill="#77B255" rx="5.701" ry="5.476"/><ellipse cx="8.073" cy="15.9" fill="#5C913B" rx="5.145" ry="4.943"/><circle cx="23.111" cy="9.561" r="5.588" fill="#77B255"/><ellipse cx="13.838" cy="7.589" fill="#5C913B" rx="4.866" ry="4.674"/><circle cx="17.236" cy="13.369" r="6.145" fill="#3E721D"/><circle cx="10.166" cy="9.561" r="4.588" fill="#77B255"/><circle cx="26.508" cy="14.571" r="4.588" fill="#5C913B"/><ellipse cx="20.285" cy="4.787" fill="#5C913B" rx="4.31" ry="4.141"/></svg>`;
|
|
13
|
+
var SVG_RICE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#CCD6DD" d="M33 22H3c-1.657 0-3 1.343-3 3v6c0 1.657 1.343 3 3 3h30c1.657 0 3-1.343 3-3v-6c0-1.657-1.343-3-3-3z"/><path fill="#E1E8ED" d="M33 20H3c-1.657 0-3 1.343-3 3v6c0 1.657 1.343 3 3 3h30c1.657 0 3-1.343 3-3v-6c0-1.657-1.343-3-3-3z"/><path fill="#F5F8FA" d="M8 18c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1zm4-1c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1zm4 1c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1z"/></svg>`;
|
|
14
|
+
var SVG_FRIED_EGG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#E1E8ED" d="M35 19.5c0 4.142-3.582 7.5-8 7.5-2.348 0-4.471-.939-6-2.452C19.471 26.061 17.348 27 15 27c-4.418 0-8-3.358-8-7.5 0-.646.087-1.271.248-1.865C4.414 17.047 2 14.552 2 11.5 2 8.186 4.833 5.5 8.333 5.5c.357 0 .707.027 1.05.078C10.66 3.398 12.928 2 15.5 2c2.572 0 4.84 1.398 6.117 3.578.343-.051.693-.078 1.05-.078C26.167 5.5 29 8.186 29 11.5c0 .985-.227 1.918-.631 2.757C32.159 14.676 35 16.799 35 19.5z"/><ellipse cx="15" cy="18" fill="#FFCC4D" rx="8" ry="7"/><ellipse cx="15" cy="17" fill="#FFE8B6" rx="4" ry="3.5"/></svg>`;
|
|
15
|
+
var CATEGORY_ICONS = {
|
|
16
|
+
poultry: toDataUrl(SVG_POULTRY),
|
|
17
|
+
beef: toDataUrl(SVG_BEEF),
|
|
18
|
+
pork: toDataUrl(SVG_PORK),
|
|
19
|
+
seafood_fish: toDataUrl(SVG_FISH),
|
|
20
|
+
seafood_shellfish: toDataUrl(SVG_SHRIMP),
|
|
21
|
+
egg: toDataUrl(SVG_EGG),
|
|
22
|
+
vegetable: toDataUrl(SVG_BROCCOLI),
|
|
23
|
+
grain: toDataUrl(SVG_RICE)
|
|
24
|
+
};
|
|
25
|
+
var INGREDIENT_ICONS = {
|
|
26
|
+
// Poultry
|
|
27
|
+
chicken_breast: toDataUrl(SVG_POULTRY),
|
|
28
|
+
chicken_breast_boneless: toDataUrl(SVG_POULTRY),
|
|
29
|
+
chicken_thigh_boneless: toDataUrl(SVG_POULTRY),
|
|
30
|
+
chicken_thigh: toDataUrl(SVG_POULTRY),
|
|
31
|
+
chicken_whole: toDataUrl(SVG_POULTRY),
|
|
32
|
+
turkey_breast: toDataUrl(SVG_POULTRY),
|
|
33
|
+
// Beef
|
|
34
|
+
beef_steak_ribeye: toDataUrl(SVG_BEEF),
|
|
35
|
+
beef_ground: toDataUrl(SVG_BEEF),
|
|
36
|
+
beef_roast: toDataUrl(SVG_BEEF),
|
|
37
|
+
// Pork
|
|
38
|
+
pork_chop: toDataUrl(SVG_PORK),
|
|
39
|
+
pork_tenderloin: toDataUrl(SVG_PORK),
|
|
40
|
+
pork_ribs: toDataUrl(SVG_PORK),
|
|
41
|
+
// Seafood
|
|
42
|
+
salmon_fillet: toDataUrl(SVG_FISH),
|
|
43
|
+
tuna_steak: toDataUrl(SVG_FISH),
|
|
44
|
+
cod_fillet: toDataUrl(SVG_FISH),
|
|
45
|
+
shrimp: toDataUrl(SVG_SHRIMP),
|
|
46
|
+
// Eggs
|
|
47
|
+
egg_fried: toDataUrl(SVG_FRIED_EGG),
|
|
48
|
+
egg_boiled: toDataUrl(SVG_EGG),
|
|
49
|
+
egg_scrambled: toDataUrl(SVG_FRIED_EGG),
|
|
50
|
+
egg_poached: toDataUrl(SVG_FRIED_EGG),
|
|
51
|
+
// Vegetables
|
|
52
|
+
broccoli: toDataUrl(SVG_BROCCOLI),
|
|
53
|
+
asparagus: toDataUrl(SVG_BROCCOLI),
|
|
54
|
+
potato: toDataUrl(SVG_BROCCOLI),
|
|
55
|
+
carrot: toDataUrl(SVG_BROCCOLI),
|
|
56
|
+
// Grains
|
|
57
|
+
rice_white: toDataUrl(SVG_RICE),
|
|
58
|
+
pasta: toDataUrl(SVG_RICE),
|
|
59
|
+
quinoa: toDataUrl(SVG_RICE)
|
|
60
|
+
};
|
|
61
|
+
var getIcon = (id, category) => {
|
|
62
|
+
if (INGREDIENT_ICONS[id]) {
|
|
63
|
+
return INGREDIENT_ICONS[id];
|
|
64
|
+
}
|
|
65
|
+
if (category && CATEGORY_ICONS[category]) {
|
|
66
|
+
return CATEGORY_ICONS[category];
|
|
67
|
+
}
|
|
68
|
+
return void 0;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
CATEGORY_ICONS,
|
|
72
|
+
INGREDIENT_ICONS,
|
|
73
|
+
getIcon
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=icons.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../icons.ts"],"sourcesContent":["// High-quality flat-style food icons as data URLs\n// Consistent style, no external dependencies\n\n// Helper to encode SVG as data URL\nconst toDataUrl = (svg: string): string => {\n const encoded = encodeURIComponent(svg)\n .replace(/'/g, '%27')\n .replace(/\"/g, '%22');\n return `data:image/svg+xml,${encoded}`;\n};\n\n// =============================================================================\n// SVG DEFINITIONS\n// =============================================================================\n\nconst SVG_POULTRY = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#C1694F\" d=\"M30.326 14.24c-.279-4.063-4.016-7.592-8.396-7.931-4.38-.339-7.294 1.908-8.406 5.865-1.113 3.958 1.006 9.672 1.006 9.672l1.781 2.281 3.594 5.719 3 .281 2.219-1.562 3.344-4.281 1.5-1.75.358-8.294z\"/><path fill=\"#E0A577\" d=\"M26.639 12.178c-.224-3.25-3.213-6.074-6.717-6.345-3.504-.271-5.836 1.526-6.725 4.692-.889 3.166.805 7.738.805 7.738l1.425 1.825 2.875 4.575 2.4.225 1.775-1.25 2.675-3.425 1.2-1.4.287-6.635z\"/><path fill=\"#C1694F\" d=\"M11.069 18.063c-2.5-1.688-3.02-4.602-3.02-4.602s-.937-6.219-.479-8.732c.458-2.513 2.769-3.27 4.436-2.498 1.667.771 1.428 1.705 2.016 3.575.588 1.87.336 3.803 1.078 5.614.741 1.811 1.913 2.933 2.26 4.618.346 1.685-.33 3.327-2.372 3.806-2.041.478-3.919-1.781-3.919-1.781z\"/><path fill=\"#E0A577\" d=\"M12.298 16.537c-2-1.35-2.416-3.682-2.416-3.682s-.75-4.975-.383-6.986c.367-2.01 2.215-2.616 3.549-1.998 1.333.617 1.142 1.364 1.613 2.86.47 1.496.269 3.042.862 4.491.593 1.449 1.531 2.347 1.808 3.694.277 1.348-.264 2.662-1.898 3.045-1.633.383-3.135-1.424-3.135-1.424z\"/><ellipse cx=\"17.952\" cy=\"32.656\" fill=\"#C1694F\" rx=\"4.218\" ry=\"1.594\"/><path fill=\"#E0A577\" d=\"M16.858 21.858s-.546 6.792-.179 8.75c.367 1.958 1 2.344 2.042 2.25 1.041-.094 1.291-1.125 1.375-2.417.083-1.292.125-8.333.125-8.333l-3.363-.25z\"/></svg>`;\n\nconst SVG_BEEF = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#BE1931\" d=\"M35.728 10.357c-2.267-5.266-6.9-8.628-12.102-9.472-1.249-.203-7.308-.937-13.081 2.279C5.058 6.641 1.353 11.785.16 20.074c-.591 4.108-.074 7.093 1.539 8.871 2.021 2.229 5.555 2.596 8.306 2.596.976 0 1.87-.052 2.58-.103 2.018-.149 8.741-1.043 14.396-4.636 5.575-3.543 9.989-10.38 8.747-16.445z\"/><path fill=\"#DD2E44\" d=\"M33.728 11.357c-1.983-4.608-6.037-7.549-10.59-8.29-1.093-.178-6.395-.82-11.446 1.994C6.801 7.936 3.558 12.437 2.513 19.69c-.518 3.595-.065 6.207 1.347 7.762 1.769 1.951 4.861 2.272 7.268 2.272.854 0 1.636-.046 2.257-.09 1.766-.131 7.649-.913 12.597-4.057 4.88-3.102 8.742-9.085 7.746-14.22z\"/><path fill=\"#BE1931\" d=\"M23.901 5.398c-1.093-.178-6.395-.82-11.446 1.994-.969.54-1.859 1.157-2.674 1.833 1.019-.397 2.149-.652 3.394-.652 5.237 0 9.891 3.618 10.909 8.707.324 1.62.283 3.219-.056 4.73 3.019-2.727 5.476-6.757 4.62-10.392-1.983-4.608-6.037-7.549-10.59-8.29.614.09 4.219.788 5.843 2.07z\"/><ellipse cx=\"12.814\" cy=\"15.785\" fill=\"#F7DECE\" rx=\"7.021\" ry=\"5.404\"/><ellipse cx=\"12.814\" cy=\"15.785\" fill=\"#BE1931\" rx=\"3.298\" ry=\"2.54\"/></svg>`;\n\nconst SVG_PORK = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#C1694F\" d=\"M31.29 13.214c-.483-4.839-5.274-8.944-10.761-9.221-5.487-.277-9.12 2.704-10.481 7.571-1.361 4.867.636 11.714 1.959 14.199 1.323 2.485 2.978 4.354 6.27 4.648 3.292.294 6.234-1.102 8.413-3.826 2.179-2.724 5.083-8.532 4.6-13.371z\"/><path fill=\"#E0A577\" d=\"M28.632 13.661c-.386-3.871-4.219-7.155-8.609-7.377-4.39-.222-7.296 2.163-8.385 6.057-1.089 3.894.509 9.371 1.567 11.359 1.058 1.988 2.382 3.483 5.016 3.718 2.634.235 4.987-.882 6.73-3.061 1.744-2.179 4.067-6.825 3.681-10.696z\"/><path fill=\"#FFCC4D\" d=\"M10.733 19.714c-1.128 1.332-4.012 4.523-5.345 5.618-1.333 1.095-3.857 2.857-3.857 4.762s1.524 3.619 3.619 3.619c2.095 0 3.583-1.179 4.917-2.333 1.333-1.155 4.379-4.446 5.065-5.422.686-.976 1.143-2.531.762-3.238-.381-.708-2.115-.746-3.219-.368-1.105.381-1.942-2.638-1.942-2.638z\"/><path fill=\"#FFAC33\" d=\"M5.482 31.003c-.073 0-.146-.022-.209-.067-.156-.111-.193-.328-.082-.484 1.04-1.459 3.113-4.063 3.134-4.09.117-.148.331-.177.483-.063.151.114.182.328.067.48-.021.027-2.089 2.625-3.125 4.078-.069.095-.176.146-.268.146zm1.729.814c-.073 0-.147-.022-.21-.068-.155-.111-.192-.328-.081-.484 1.373-1.928 3.076-4.138 3.093-4.161.115-.151.33-.181.482-.066.152.113.183.328.068.48-.017.023-1.716 2.228-3.084 4.148-.068.098-.175.151-.268.151zm1.787.664c-.073 0-.147-.022-.21-.068-.155-.111-.192-.328-.081-.484 1.398-1.961 2.869-3.931 2.884-3.951.114-.152.33-.184.482-.069.153.113.185.327.071.48-.015.02-1.482 1.984-2.877 3.941-.068.099-.175.151-.269.151z\"/><ellipse cx=\"6.833\" cy=\"32.524\" fill=\"#FFCC4D\" rx=\"2.667\" ry=\"1.143\"/></svg>`;\n\nconst SVG_FISH = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#55ACEE\" d=\"M27 2s-5.958 3.75-8.031 5.469C14.865 11.057 8.503 18.839 5 23c-1.5 1-2.5 2.25-2.5 3.5 0 2.5 2.603 5.5 4.5 5.5 1.5 0 2.5-1 3.5-2.5 3.5-4.5 10.654-10.588 13.5-13.5C25.806 14.056 31 9 31 9l-4-7z\"/><circle cx=\"9.5\" cy=\"27.5\" r=\"1.5\" fill=\"#292F33\"/><path fill=\"#3B88C3\" d=\"M25 4s-4.958 3.75-7.031 5.469C13.865 13.057 8.503 19.839 5 24c-1.5 1-2.083 2.5-2.083 3.5 0 1.75 1.686 3.5 3.583 3.5 1.5 0 2.5-1 3.5-2.5 3.5-4.5 9.654-9.588 12.5-12.5C24.306 14.056 29 10 29 10l-4-6z\"/><path fill=\"#55ACEE\" d=\"M31 8s3 3.334 3 6c0 2.668-3 6-3 6l-2.667-5.333L31 8z\"/><path fill=\"#3B88C3\" d=\"M29 10s3 2.334 3 5c0 2.668-3 5-3 5l-2-4.5 2-5.5z\"/></svg>`;\n\nconst SVG_SHRIMP = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#F4900C\" d=\"M26.688 9.812c-.271 2.917-1.167 8.146-4.792 11.771-2.917 2.917-8.771 3.125-12.708 3.125-1.549 0-2.912-.049-3.938-.106-1.958-.107-2.313-.707-2.188-1.914s1.538-.998 3.059-.871c.761.063 1.722.107 2.817.107 3.458 0 8.146-.438 10.146-2.438 2.833-2.833 3.563-6.563 3.813-8.938.188-1.792.854-1.917 1.604-1.646.75.272.395 1.91.187 2.91z\"/><path fill=\"#FFCC4D\" d=\"M10.376 15.098c-2.188.354-3.188.917-3.188 2.417 0 1.125.667 1.792 1.792 1.792 1.75 0 2.104-.771 2.104-1.917s-.708-2.292-.708-2.292z\"/><path fill=\"#F4900C\" d=\"M16.542 10.639c-4.25 0-5.917 2.042-6.875 4.5.084-.001.162-.014.25-.014 2.292 0 2.667 2.417 2.667 3.583 0 1.75-.854 3.167-3.292 3.167-1.708 0-3-1.104-3.145-2.958-.032.035-.065.065-.098.101-1.125 1.25-1.875 3.063-1.875 5.875 0 4.166 3.333 8.229 8.833 8.229s9.667-4.229 9.667-9.646c0-6.625-3.25-12.837-6.132-12.837z\"/><circle cx=\"9.396\" cy=\"27.441\" r=\"1.25\" fill=\"#662113\"/><path fill=\"#FFCC4D\" d=\"M15.5 25c-1.375 0-2.5 1.625-2.5 3.5 0 1.25.375 2.5 1.875 2.5 1.667 0 2.125-1.417 2.125-2.917 0-1.208-.125-3.083-1.5-3.083zm4-1c-1.125 0-2 1.542-2 3.25 0 1.083.333 2.25 1.625 2.25 1.375 0 1.875-1.208 1.875-2.583 0-1.084-.167-2.917-1.5-2.917z\"/><path fill=\"#F4900C\" d=\"M5.813 25.77c-.094-.178-.428-.188-.746-.022-.318.166-.479.452-.385.631l1.334 2.428c.081.155.327.187.599.095-.233-.497-1.026-1.995-.802-3.132z\"/><path fill=\"#FFCC4D\" d=\"M30.599 5.401c-.345.174-.525.513-.431.785.036.104.136.393-.212.938-.49.768-1.679 1.717-4.002 2.882-5.708 2.862-8.62.67-10.33-.776-.615-.52-1.084-1.059-1.462-1.55-.295-.384-.764-.389-1.047-.01-.283.378-.172.919.168 1.27l.022.023c.396.443.925.986 1.622 1.555 1.981 1.616 5.846 4.287 12.511.948 2.549-1.277 3.944-2.394 4.604-3.429.451-.708.554-1.378.343-1.988-.094-.272-.34-.361-.513-.361-.089 0-.175.021-.249.059-.355.179-.549.504-.479.784.054.217-.011.448-.234.668-.356.351-1.085.787-2.186 1.323-3.364 1.637-5.539 1.314-6.753.552-1.028-.646-1.424-1.558-1.425-1.56-.116-.266-.5-.361-.857-.212-.356.149-.54.484-.423.749l.001.002c.02.046.508 1.131 1.778 1.933 1.535.968 4.167 1.378 8.079-.527 1.212-.59 2.036-1.087 2.495-1.54.538-.531.659-1.102.529-1.574-.132-.476-.51-.818-.993-.818-.109 0-.221.019-.334.056z\"/><ellipse cx=\"27.819\" cy=\"2.692\" fill=\"#FFCC4D\" rx=\"2.413\" ry=\"1.025\" transform=\"rotate(-63.435 27.82 2.693)\"/><ellipse cx=\"30.569\" cy=\"4.067\" fill=\"#FFCC4D\" rx=\"2.413\" ry=\"1.025\" transform=\"rotate(-63.435 30.57 4.067)\"/></svg>`;\n\nconst SVG_EGG = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#E1E8ED\" d=\"M18 35c-7.732 0-14-4.701-14-10.5C4 14.603 11.268 1 18 1s14 13.603 14 23.5c0 5.799-6.268 10.5-14 10.5z\"/><path fill=\"#CCD6DD\" d=\"M18 33c-6.627 0-12-3.873-12-8.5C6 15.603 12.268 3 18 3s12 12.603 12 21.5c0 4.627-5.373 8.5-12 8.5z\"/></svg>`;\n\nconst SVG_BROCCOLI = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#77B255\" d=\"M22.453 35.564c-.315 0-.636-.08-.934-.251-5.281-3.029-5.792-10.958-5.813-11.294-.042-.679.474-1.263 1.152-1.305.683-.048 1.263.474 1.305 1.152.005.073.456 7.134 4.607 9.515.59.339.795 1.091.456 1.683-.227.396-.642.617-1.069.617-.001-.117-.296-.117-.704-.117z\"/><path fill=\"#5C913B\" d=\"M13.838 35.564c-.315 0-.636-.08-.934-.251-5.281-3.029-5.792-10.958-5.813-11.294-.042-.679.474-1.263 1.152-1.305.683-.048 1.263.474 1.305 1.152.005.073.456 7.134 4.607 9.515.59.339.795 1.091.456 1.683-.227.396-.642.617-1.069.617-.001-.117-.296-.117-.704-.117z\"/><ellipse cx=\"20.285\" cy=\"18.546\" fill=\"#77B255\" rx=\"5.701\" ry=\"5.476\"/><ellipse cx=\"8.073\" cy=\"15.9\" fill=\"#5C913B\" rx=\"5.145\" ry=\"4.943\"/><circle cx=\"23.111\" cy=\"9.561\" r=\"5.588\" fill=\"#77B255\"/><ellipse cx=\"13.838\" cy=\"7.589\" fill=\"#5C913B\" rx=\"4.866\" ry=\"4.674\"/><circle cx=\"17.236\" cy=\"13.369\" r=\"6.145\" fill=\"#3E721D\"/><circle cx=\"10.166\" cy=\"9.561\" r=\"4.588\" fill=\"#77B255\"/><circle cx=\"26.508\" cy=\"14.571\" r=\"4.588\" fill=\"#5C913B\"/><ellipse cx=\"20.285\" cy=\"4.787\" fill=\"#5C913B\" rx=\"4.31\" ry=\"4.141\"/></svg>`;\n\nconst SVG_RICE = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#CCD6DD\" d=\"M33 22H3c-1.657 0-3 1.343-3 3v6c0 1.657 1.343 3 3 3h30c1.657 0 3-1.343 3-3v-6c0-1.657-1.343-3-3-3z\"/><path fill=\"#E1E8ED\" d=\"M33 20H3c-1.657 0-3 1.343-3 3v6c0 1.657 1.343 3 3 3h30c1.657 0 3-1.343 3-3v-6c0-1.657-1.343-3-3-3z\"/><path fill=\"#F5F8FA\" d=\"M8 18c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1zm4-1c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1zm4 1c-.552 0-1-.447-1-1v-4c0-.553.448-1 1-1s1 .447 1 1v4c0 .553-.448 1-1 1zm4 0c-.552 0-1-.447-1-1v-5c0-.553.448-1 1-1s1 .447 1 1v5c0 .553-.448 1-1 1z\"/></svg>`;\n\nconst SVG_FRIED_EGG = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\"><path fill=\"#E1E8ED\" d=\"M35 19.5c0 4.142-3.582 7.5-8 7.5-2.348 0-4.471-.939-6-2.452C19.471 26.061 17.348 27 15 27c-4.418 0-8-3.358-8-7.5 0-.646.087-1.271.248-1.865C4.414 17.047 2 14.552 2 11.5 2 8.186 4.833 5.5 8.333 5.5c.357 0 .707.027 1.05.078C10.66 3.398 12.928 2 15.5 2c2.572 0 4.84 1.398 6.117 3.578.343-.051.693-.078 1.05-.078C26.167 5.5 29 8.186 29 11.5c0 .985-.227 1.918-.631 2.757C32.159 14.676 35 16.799 35 19.5z\"/><ellipse cx=\"15\" cy=\"18\" fill=\"#FFCC4D\" rx=\"8\" ry=\"7\"/><ellipse cx=\"15\" cy=\"17\" fill=\"#FFE8B6\" rx=\"4\" ry=\"3.5\"/></svg>`;\n\n// =============================================================================\n// CATEGORY ICONS\n// =============================================================================\n\nexport const CATEGORY_ICONS: Record<string, string> = {\n poultry: toDataUrl(SVG_POULTRY),\n beef: toDataUrl(SVG_BEEF),\n pork: toDataUrl(SVG_PORK),\n seafood_fish: toDataUrl(SVG_FISH),\n seafood_shellfish: toDataUrl(SVG_SHRIMP),\n egg: toDataUrl(SVG_EGG),\n vegetable: toDataUrl(SVG_BROCCOLI),\n grain: toDataUrl(SVG_RICE),\n};\n\n// =============================================================================\n// INGREDIENT ICONS\n// =============================================================================\n\nexport const INGREDIENT_ICONS: Record<string, string> = {\n // Poultry\n chicken_breast: toDataUrl(SVG_POULTRY),\n chicken_breast_boneless: toDataUrl(SVG_POULTRY),\n chicken_thigh_boneless: toDataUrl(SVG_POULTRY),\n chicken_thigh: toDataUrl(SVG_POULTRY),\n chicken_whole: toDataUrl(SVG_POULTRY),\n turkey_breast: toDataUrl(SVG_POULTRY),\n\n // Beef\n beef_steak_ribeye: toDataUrl(SVG_BEEF),\n beef_ground: toDataUrl(SVG_BEEF),\n beef_roast: toDataUrl(SVG_BEEF),\n\n // Pork\n pork_chop: toDataUrl(SVG_PORK),\n pork_tenderloin: toDataUrl(SVG_PORK),\n pork_ribs: toDataUrl(SVG_PORK),\n\n // Seafood\n salmon_fillet: toDataUrl(SVG_FISH),\n tuna_steak: toDataUrl(SVG_FISH),\n cod_fillet: toDataUrl(SVG_FISH),\n shrimp: toDataUrl(SVG_SHRIMP),\n\n // Eggs\n egg_fried: toDataUrl(SVG_FRIED_EGG),\n egg_boiled: toDataUrl(SVG_EGG),\n egg_scrambled: toDataUrl(SVG_FRIED_EGG),\n egg_poached: toDataUrl(SVG_FRIED_EGG),\n\n // Vegetables\n broccoli: toDataUrl(SVG_BROCCOLI),\n asparagus: toDataUrl(SVG_BROCCOLI),\n potato: toDataUrl(SVG_BROCCOLI),\n carrot: toDataUrl(SVG_BROCCOLI),\n\n // Grains\n rice_white: toDataUrl(SVG_RICE),\n pasta: toDataUrl(SVG_RICE),\n quinoa: toDataUrl(SVG_RICE),\n};\n\n// =============================================================================\n// HELPER\n// =============================================================================\n\nexport const getIcon = (id: string, category?: string): string | undefined => {\n if (INGREDIENT_ICONS[id]) {\n return INGREDIENT_ICONS[id];\n }\n if (category && CATEGORY_ICONS[category]) {\n return CATEGORY_ICONS[category];\n }\n return undefined;\n};\n"],"mappings":";AAIA,IAAM,YAAY,CAAC,QAAwB;AACzC,QAAM,UAAU,mBAAmB,GAAG,EACnC,QAAQ,MAAM,KAAK,EACnB,QAAQ,MAAM,KAAK;AACtB,SAAO,sBAAsB,OAAO;AACtC;AAMA,IAAM,cAAc;AAEpB,IAAM,WAAW;AAEjB,IAAM,WAAW;AAEjB,IAAM,WAAW;AAEjB,IAAM,aAAa;AAEnB,IAAM,UAAU;AAEhB,IAAM,eAAe;AAErB,IAAM,WAAW;AAEjB,IAAM,gBAAgB;AAMf,IAAM,iBAAyC;AAAA,EACpD,SAAS,UAAU,WAAW;AAAA,EAC9B,MAAM,UAAU,QAAQ;AAAA,EACxB,MAAM,UAAU,QAAQ;AAAA,EACxB,cAAc,UAAU,QAAQ;AAAA,EAChC,mBAAmB,UAAU,UAAU;AAAA,EACvC,KAAK,UAAU,OAAO;AAAA,EACtB,WAAW,UAAU,YAAY;AAAA,EACjC,OAAO,UAAU,QAAQ;AAC3B;AAMO,IAAM,mBAA2C;AAAA;AAAA,EAEtD,gBAAgB,UAAU,WAAW;AAAA,EACrC,yBAAyB,UAAU,WAAW;AAAA,EAC9C,wBAAwB,UAAU,WAAW;AAAA,EAC7C,eAAe,UAAU,WAAW;AAAA,EACpC,eAAe,UAAU,WAAW;AAAA,EACpC,eAAe,UAAU,WAAW;AAAA;AAAA,EAGpC,mBAAmB,UAAU,QAAQ;AAAA,EACrC,aAAa,UAAU,QAAQ;AAAA,EAC/B,YAAY,UAAU,QAAQ;AAAA;AAAA,EAG9B,WAAW,UAAU,QAAQ;AAAA,EAC7B,iBAAiB,UAAU,QAAQ;AAAA,EACnC,WAAW,UAAU,QAAQ;AAAA;AAAA,EAG7B,eAAe,UAAU,QAAQ;AAAA,EACjC,YAAY,UAAU,QAAQ;AAAA,EAC9B,YAAY,UAAU,QAAQ;AAAA,EAC9B,QAAQ,UAAU,UAAU;AAAA;AAAA,EAG5B,WAAW,UAAU,aAAa;AAAA,EAClC,YAAY,UAAU,OAAO;AAAA,EAC7B,eAAe,UAAU,aAAa;AAAA,EACtC,aAAa,UAAU,aAAa;AAAA;AAAA,EAGpC,UAAU,UAAU,YAAY;AAAA,EAChC,WAAW,UAAU,YAAY;AAAA,EACjC,QAAQ,UAAU,YAAY;AAAA,EAC9B,QAAQ,UAAU,YAAY;AAAA;AAAA,EAG9B,YAAY,UAAU,QAAQ;AAAA,EAC9B,OAAO,UAAU,QAAQ;AAAA,EACzB,QAAQ,UAAU,QAAQ;AAC5B;AAMO,IAAM,UAAU,CAAC,IAAY,aAA0C;AAC5E,MAAI,iBAAiB,EAAE,GAAG;AACxB,WAAO,iBAAiB,EAAE;AAAA,EAC5B;AACA,MAAI,YAAY,eAAe,QAAQ,GAAG;AACxC,WAAO,eAAe,QAAQ;AAAA,EAChC;AACA,SAAO;AACT;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -41,14 +41,14 @@ declare const findByCategory: (category: IngredientCategory) => CookingTemperatu
|
|
|
41
41
|
declare const getAllEntries: () => CookingTemperatureEntry[];
|
|
42
42
|
declare const getAllCategories: () => IngredientCategory[];
|
|
43
43
|
declare const getCategoryName: (category: IngredientCategory) => string;
|
|
44
|
-
declare const convertTemperature: (temp: number,
|
|
44
|
+
declare const convertTemperature: (temp: number, from_unit: TemperatureUnit, to_unit: TemperatureUnit) => number;
|
|
45
45
|
declare const getSafeMinimumTemp: (ingredientId: string, unit?: TemperatureUnit) => {
|
|
46
46
|
temp: number;
|
|
47
47
|
restMinutes: number;
|
|
48
48
|
} | undefined;
|
|
49
|
-
declare const getDonenessTemp: (ingredientId: string,
|
|
49
|
+
declare const getDonenessTemp: (ingredientId: string, doneness_level: DonenessLevel, unit?: TemperatureUnit) => number | undefined;
|
|
50
50
|
declare const getCookingMethods: (ingredientId: string) => CookingMethod[];
|
|
51
|
-
declare const getCookingInstruction: (ingredientId: string,
|
|
51
|
+
declare const getCookingInstruction: (ingredientId: string, cooking_method: CookingMethod, portionHint?: string) => {
|
|
52
52
|
applianceTemp: number;
|
|
53
53
|
applianceTempUnit: TemperatureUnit;
|
|
54
54
|
timeMinutes: {
|
|
@@ -58,7 +58,7 @@ declare const getCookingInstruction: (ingredientId: string, method: CookingMetho
|
|
|
58
58
|
notes?: string;
|
|
59
59
|
portionDescription: string;
|
|
60
60
|
} | undefined;
|
|
61
|
-
declare const getQuickReference: (query: string,
|
|
61
|
+
declare const getQuickReference: (query: string, cooking_method?: CookingMethod, unit?: TemperatureUnit) => {
|
|
62
62
|
name: string;
|
|
63
63
|
safeMinimumTemp: number;
|
|
64
64
|
tempUnit: TemperatureUnit;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,14 +41,14 @@ declare const findByCategory: (category: IngredientCategory) => CookingTemperatu
|
|
|
41
41
|
declare const getAllEntries: () => CookingTemperatureEntry[];
|
|
42
42
|
declare const getAllCategories: () => IngredientCategory[];
|
|
43
43
|
declare const getCategoryName: (category: IngredientCategory) => string;
|
|
44
|
-
declare const convertTemperature: (temp: number,
|
|
44
|
+
declare const convertTemperature: (temp: number, from_unit: TemperatureUnit, to_unit: TemperatureUnit) => number;
|
|
45
45
|
declare const getSafeMinimumTemp: (ingredientId: string, unit?: TemperatureUnit) => {
|
|
46
46
|
temp: number;
|
|
47
47
|
restMinutes: number;
|
|
48
48
|
} | undefined;
|
|
49
|
-
declare const getDonenessTemp: (ingredientId: string,
|
|
49
|
+
declare const getDonenessTemp: (ingredientId: string, doneness_level: DonenessLevel, unit?: TemperatureUnit) => number | undefined;
|
|
50
50
|
declare const getCookingMethods: (ingredientId: string) => CookingMethod[];
|
|
51
|
-
declare const getCookingInstruction: (ingredientId: string,
|
|
51
|
+
declare const getCookingInstruction: (ingredientId: string, cooking_method: CookingMethod, portionHint?: string) => {
|
|
52
52
|
applianceTemp: number;
|
|
53
53
|
applianceTempUnit: TemperatureUnit;
|
|
54
54
|
timeMinutes: {
|
|
@@ -58,7 +58,7 @@ declare const getCookingInstruction: (ingredientId: string, method: CookingMetho
|
|
|
58
58
|
notes?: string;
|
|
59
59
|
portionDescription: string;
|
|
60
60
|
} | undefined;
|
|
61
|
-
declare const getQuickReference: (query: string,
|
|
61
|
+
declare const getQuickReference: (query: string, cooking_method?: CookingMethod, unit?: TemperatureUnit) => {
|
|
62
62
|
name: string;
|
|
63
63
|
safeMinimumTemp: number;
|
|
64
64
|
tempUnit: TemperatureUnit;
|
package/dist/index.js
CHANGED
|
@@ -1872,9 +1872,9 @@ var CATEGORY_NAMES = {
|
|
|
1872
1872
|
var getCategoryName = (category) => {
|
|
1873
1873
|
return CATEGORY_NAMES[category];
|
|
1874
1874
|
};
|
|
1875
|
-
var convertTemperature = (temp,
|
|
1876
|
-
if (
|
|
1877
|
-
return
|
|
1875
|
+
var convertTemperature = (temp, from_unit, to_unit) => {
|
|
1876
|
+
if (from_unit === to_unit) return temp;
|
|
1877
|
+
return from_unit === "F" ? Math.round((temp - 32) * (5 / 9)) : Math.round(temp * (9 / 5) + 32);
|
|
1878
1878
|
};
|
|
1879
1879
|
var getSafeMinimumTemp = (ingredientId, unit = "F") => {
|
|
1880
1880
|
const entry = ALL_ENTRIES.find((e) => e.id === ingredientId);
|
|
@@ -1889,10 +1889,10 @@ var getSafeMinimumTemp = (ingredientId, unit = "F") => {
|
|
|
1889
1889
|
restMinutes: entry.restTimeMinutes ?? 0
|
|
1890
1890
|
};
|
|
1891
1891
|
};
|
|
1892
|
-
var getDonenessTemp = (ingredientId,
|
|
1892
|
+
var getDonenessTemp = (ingredientId, doneness_level, unit = "F") => {
|
|
1893
1893
|
const entry = ALL_ENTRIES.find((e) => e.id === ingredientId);
|
|
1894
1894
|
if (!entry || !entry.donenessLevels) return void 0;
|
|
1895
|
-
const level = entry.donenessLevels.find((d) => d.level ===
|
|
1895
|
+
const level = entry.donenessLevels.find((d) => d.level === doneness_level);
|
|
1896
1896
|
if (!level) return void 0;
|
|
1897
1897
|
return unit === level.internalTempUnit ? level.internalTemp : convertTemperature(level.internalTemp, level.internalTempUnit, unit);
|
|
1898
1898
|
};
|
|
@@ -1905,14 +1905,14 @@ var getCookingMethods = (ingredientId) => {
|
|
|
1905
1905
|
});
|
|
1906
1906
|
return [...methods];
|
|
1907
1907
|
};
|
|
1908
|
-
var getCookingInstruction = (ingredientId,
|
|
1908
|
+
var getCookingInstruction = (ingredientId, cooking_method, portionHint) => {
|
|
1909
1909
|
const entry = ALL_ENTRIES.find((e) => e.id === ingredientId);
|
|
1910
1910
|
if (!entry) return void 0;
|
|
1911
1911
|
const portion = portionHint ? entry.cookingInstructions.find(
|
|
1912
1912
|
(p) => p.portionDescription.toLowerCase().includes(portionHint.toLowerCase())
|
|
1913
1913
|
) ?? entry.cookingInstructions[0] : entry.cookingInstructions[0];
|
|
1914
1914
|
if (!portion) return void 0;
|
|
1915
|
-
const instruction = portion.methods.find((m) => m.method ===
|
|
1915
|
+
const instruction = portion.methods.find((m) => m.method === cooking_method);
|
|
1916
1916
|
if (!instruction) return void 0;
|
|
1917
1917
|
return {
|
|
1918
1918
|
applianceTemp: instruction.applianceTemp,
|
|
@@ -1922,7 +1922,7 @@ var getCookingInstruction = (ingredientId, method, portionHint) => {
|
|
|
1922
1922
|
portionDescription: portion.portionDescription
|
|
1923
1923
|
};
|
|
1924
1924
|
};
|
|
1925
|
-
var getQuickReference = (query,
|
|
1925
|
+
var getQuickReference = (query, cooking_method, unit = "F") => {
|
|
1926
1926
|
const entry = findByName(query);
|
|
1927
1927
|
if (!entry) return void 0;
|
|
1928
1928
|
const safeTemp = unit === entry.safeMinimumTempUnit ? entry.safeMinimumTemp : convertTemperature(
|
|
@@ -1931,11 +1931,11 @@ var getQuickReference = (query, method, unit = "F") => {
|
|
|
1931
1931
|
unit
|
|
1932
1932
|
);
|
|
1933
1933
|
let suggestedMethod;
|
|
1934
|
-
if (
|
|
1935
|
-
const instruction = getCookingInstruction(entry.id,
|
|
1934
|
+
if (cooking_method) {
|
|
1935
|
+
const instruction = getCookingInstruction(entry.id, cooking_method);
|
|
1936
1936
|
if (instruction) {
|
|
1937
1937
|
suggestedMethod = {
|
|
1938
|
-
method,
|
|
1938
|
+
method: cooking_method,
|
|
1939
1939
|
applianceTemp: unit === instruction.applianceTempUnit ? instruction.applianceTemp : convertTemperature(
|
|
1940
1940
|
instruction.applianceTemp,
|
|
1941
1941
|
instruction.applianceTempUnit,
|