formlab-mcp 0.6.88 → 0.6.90
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 +1 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/theoretical.js +22 -1
- package/tools/formulations.js +36 -2
- package/tools/ingredients.js +2 -0
- package/tools/lab.js +6 -0
- package/vendor/cost.js +33 -16
- package/vendor/equipment-calibration.js +6 -2
- package/vendor/fragrance.js +1061 -0
- package/vendor/nutrition-label.js +1 -1
- package/vendor/reactive.js +2 -2
- package/vendor/theoretical-params.js +3 -0
|
@@ -746,7 +746,7 @@ function flNlTabHtml(f) {
|
|
|
746
746
|
<div class="card-body nl-stmt">
|
|
747
747
|
${eu ? (() => { const es = flNlEuStatement(f); return `<div class="nl-eu-stmt"><strong>INGREDIENTS:</strong> ${es.html || '<span class="nl-dim">No ingredients yet.</span>'}</div>
|
|
748
748
|
${_nlSuspectHtml(f) || (es.allergens.length ? '' : '<div class="nl-dim">No EU allergens on the ingredients.</div>')}
|
|
749
|
-
<div class="nl-dim nl-hint" data-tip="The 14 EU allergens
|
|
749
|
+
<div class="nl-dim nl-hint" data-tip="The 14 EU allergens from each ingredient’s chips, in CAPITALS on Copy. A label_name custom field prints another name.">By weight, most first. Allergens in bold.</div>`; })() : `<div><strong>INGREDIENTS:</strong> ${esc(s.text) || '<span class="nl-dim">No ingredients yet.</span>'}</div>
|
|
750
750
|
${s.contains.length ? `<div class="nl-contains"><strong>CONTAINS:</strong> ${esc(s.contains.join(', '))}.</div>` : ''}${_nlSuspectHtml(f) || (s.contains.length ? '' : '<div class="nl-dim">No major US allergens on the ingredients.</div>')}
|
|
751
751
|
<div class="nl-dim nl-hint" data-tip="Add a custom field named label_name to an ingredient to print another name here.">By weight, most first. 2% or less grouped.</div>`}
|
|
752
752
|
</div>
|
package/vendor/reactive.js
CHANGED
|
@@ -455,7 +455,7 @@ function flRxApplySolve(fId) {
|
|
|
455
455
|
// ---- A batch: as weighed, and (Pro) against the plan ----
|
|
456
456
|
function flRxBatchStripHtml(b) {
|
|
457
457
|
if (!b) return '';
|
|
458
|
-
const f = (
|
|
458
|
+
const f = (typeof flBatchFormula === 'function' ? flBatchFormula(b) : db.formulations.find(x => x.id === b.formulationId));
|
|
459
459
|
const hasActual = Array.isArray(b.actualComposition) && b.actualComposition.length;
|
|
460
460
|
const comp = hasActual ? b.actualComposition : (f ? f.composition : []);
|
|
461
461
|
const found = flRxPairsFor(comp);
|
|
@@ -510,7 +510,7 @@ function flRxFormSectionHtml(ing) {
|
|
|
510
510
|
<div class="fl-rx-frows" id="fl-rx-frows">${list.map(_flRxFormRowHtml).join('')}</div>
|
|
511
511
|
<div class="fl-rx-fhead">
|
|
512
512
|
<button type="button" class="btn btn-secondary btn-sm" onclick="_flRxFormAdd()">+ Add group</button>
|
|
513
|
-
<span class="fl-rx-note" data-tip="EEW
|
|
513
|
+
<span class="fl-rx-note" data-tip="EEW, AHEW, OH number, NCO %, acid or amine value; or groups per molecule (with the MW) for a pure chemical.">As the datasheet quotes it, or groups per molecule for a pure chemical.</span>
|
|
514
514
|
</div>
|
|
515
515
|
</div>`;
|
|
516
516
|
}
|
|
@@ -794,6 +794,9 @@ function _tpIngredientView(ing) {
|
|
|
794
794
|
// the Reactive presets' sums; the datasheet terms (ing.eew, ing.ohv, ing.ncoPct …) null when absent, so
|
|
795
795
|
// `eew < 200` skips ingredients without one. Custom fields below still win on a name clash.
|
|
796
796
|
if (typeof flRxViewFields === 'function') Object.assign(out, flRxViewFields(ing));
|
|
797
|
+
// Fragrance (js/fragrance.js): ing.fragranceAllergens (the allergens it contains, by label name) and ing.ifra5A …
|
|
798
|
+
// (its max % in that IFRA category), so `fragranceAllergens contains linalool` and `ifra5A < 0.5` filter the list.
|
|
799
|
+
if (typeof flFrViewFields === 'function') Object.assign(out, flFrViewFields(ing));
|
|
797
800
|
(ing.customFields || []).forEach(cf => {
|
|
798
801
|
if (!cf || !cf.name) return;
|
|
799
802
|
const raw = cf.value;
|