@jjlmoya/utils-textiles 1.24.0 → 1.26.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 +2 -0
- package/src/entries.ts +4 -1
- package/src/index.ts +1 -0
- package/src/tests/legacy_logic_reference.test.ts +65 -0
- package/src/tests/qa-test-helpers.ts +32 -0
- package/src/tests/qa_bibliography_links.test.ts +49 -0
- package/src/tests/qa_claim_evidence.test.ts +69 -0
- package/src/tests/qa_logic_reference_coverage.test.ts +46 -0
- package/src/tests/qa_runtime_i18n.test.ts +99 -0
- package/src/tests/registry_contract.test.ts +67 -0
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/burnTest/component.astro +2 -2
- package/src/tool/embroideryStitchPricingEstimator/component.astro +2 -2
- package/src/tool/embroideryStitchPricingEstimator/dom-views.ts +12 -5
- package/src/tool/fabricProjectCalculator/component.astro +7 -5
- package/src/tool/fabricTruth/component.astro +2 -2
- package/src/tool/knittingGauge/component.astro +1 -2
- package/src/tool/laundryGuide/bibliography.ts +1 -1
- package/src/tool/quiltBindingCalculator/bibliography.astro +6 -0
- package/src/tool/quiltBindingCalculator/bibliography.ts +12 -0
- package/src/tool/quiltBindingCalculator/component.astro +110 -0
- package/src/tool/quiltBindingCalculator/controller.ts +257 -0
- package/src/tool/quiltBindingCalculator/dom-views.ts +56 -0
- package/src/tool/quiltBindingCalculator/entry.ts +29 -0
- package/src/tool/quiltBindingCalculator/evaluator.ts +13 -0
- package/src/tool/quiltBindingCalculator/i18n/de.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/en.ts +200 -0
- package/src/tool/quiltBindingCalculator/i18n/es.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/fr.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/id.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/it.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/ja.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/ko.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/nl.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/pl.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/pt.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/ru.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/shared.ts +514 -0
- package/src/tool/quiltBindingCalculator/i18n/sv.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/tr.ts +3 -0
- package/src/tool/quiltBindingCalculator/i18n/zh.ts +3 -0
- package/src/tool/quiltBindingCalculator/index.ts +11 -0
- package/src/tool/quiltBindingCalculator/logic.test.ts +70 -0
- package/src/tool/quiltBindingCalculator/logic.ts +93 -0
- package/src/tool/quiltBindingCalculator/quilt-binding-length-and-strip-calculator.css +474 -0
- package/src/tool/quiltBindingCalculator/seo.astro +15 -0
- package/src/tool/quiltBindingCalculator/storage.ts +26 -0
- package/src/tool/quiltBindingCalculator/ui.ts +51 -0
- package/src/tool/stainChemistry/bibliography.ts +1 -1
- package/src/tool/stainChemistry/component.astro +4 -3
- package/src/tool/yarnCalculator/component.astro +5 -6
- package/src/tool/yarnCalculator/validation.ts +17 -0
- package/src/tools.ts +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface QuiltBindingCalculatorUI {
|
|
2
|
+
unitLabel: string;
|
|
3
|
+
metricLabel: string;
|
|
4
|
+
imperialLabel: string;
|
|
5
|
+
stageLabel: string;
|
|
6
|
+
controlsLabel: string;
|
|
7
|
+
dimensionsLabel: string;
|
|
8
|
+
fabricLabel: string;
|
|
9
|
+
methodLabel: string;
|
|
10
|
+
safetyLabel: string;
|
|
11
|
+
widthLabel: string;
|
|
12
|
+
lengthLabel: string;
|
|
13
|
+
cornersLabel: string;
|
|
14
|
+
stripWidthLabel: string;
|
|
15
|
+
fabricWidthLabel: string;
|
|
16
|
+
seamAllowanceLabel: string;
|
|
17
|
+
diagonalLabel: string;
|
|
18
|
+
straightLabel: string;
|
|
19
|
+
safetyFive: string;
|
|
20
|
+
safetyTen: string;
|
|
21
|
+
safetyFifteen: string;
|
|
22
|
+
widthHint: string;
|
|
23
|
+
lengthHint: string;
|
|
24
|
+
cornersHint: string;
|
|
25
|
+
stripWidthHint: string;
|
|
26
|
+
fabricWidthHint: string;
|
|
27
|
+
seamAllowanceHint: string;
|
|
28
|
+
resultLabel: string;
|
|
29
|
+
emptyResult: string;
|
|
30
|
+
perimeterLabel: string;
|
|
31
|
+
requiredLabel: string;
|
|
32
|
+
stripsLabel: string;
|
|
33
|
+
cutSizeLabel: string;
|
|
34
|
+
joinedLengthLabel: string;
|
|
35
|
+
surplusLabel: string;
|
|
36
|
+
joinsLabel: string;
|
|
37
|
+
cuttingPlanLabel: string;
|
|
38
|
+
readyBadge: string;
|
|
39
|
+
reviewBadge: string;
|
|
40
|
+
warningLargeWaste: string;
|
|
41
|
+
warningSmallSurplus: string;
|
|
42
|
+
invalidMessage: string;
|
|
43
|
+
reset: string;
|
|
44
|
+
copySummary: string;
|
|
45
|
+
copied: string;
|
|
46
|
+
formulaTitle: string;
|
|
47
|
+
formulaText: string;
|
|
48
|
+
noteTitle: string;
|
|
49
|
+
noteText: string;
|
|
50
|
+
canvasAlt: string;
|
|
51
|
+
}
|
|
@@ -3,7 +3,7 @@ import type { BibliographyEntry } from '../../types';
|
|
|
3
3
|
export const bibliography: BibliographyEntry[] = [
|
|
4
4
|
{
|
|
5
5
|
name: 'AATCC - Association for Advancing Color Technology and Chemistry',
|
|
6
|
-
url: 'https://www.aatcc.org',
|
|
6
|
+
url: 'https://www.aatcc.org/testing/standards',
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
name: 'Kissa, E. - Textile Auxiliaries',
|
|
@@ -23,7 +23,7 @@ const fibers = Object.entries(ui.fiberData)
|
|
|
23
23
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
<div class="stain-chemistry-container" id="stain-chemistry-root">
|
|
26
|
+
<div class="stain-chemistry-container" id="stain-chemistry-root" aria-label={ui.toolTitle}>
|
|
27
27
|
<div class="card-wrapper">
|
|
28
28
|
<div class="selectors-section">
|
|
29
29
|
<div class="selectors-grid">
|
|
@@ -113,7 +113,7 @@ const fibers = Object.entries(ui.fiberData)
|
|
|
113
113
|
<div class="warning-card-inner">
|
|
114
114
|
<Icon name="mdi:shield-alert-outline" class="warning-icon" />
|
|
115
115
|
<div>
|
|
116
|
-
<p class="warning-label">{ui.criticalWarningLabel}</p>
|
|
116
|
+
<p class="warning-label" title={ui.criticalWarning}>{ui.criticalWarningLabel}</p>
|
|
117
117
|
<p id="warning-text" class="warning-text"></p>
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
@@ -125,6 +125,7 @@ const fibers = Object.entries(ui.fiberData)
|
|
|
125
125
|
<div>
|
|
126
126
|
<p class="note-label">{ui.technicalNote}</p>
|
|
127
127
|
<p class="note-text">{ui.technicalNoteText}</p>
|
|
128
|
+
<p id="protocol-notes" class="note-text"></p>
|
|
128
129
|
</div>
|
|
129
130
|
</div>
|
|
130
131
|
</div>
|
|
@@ -183,6 +184,7 @@ const fibers = Object.entries(ui.fiberData)
|
|
|
183
184
|
setText('protocol-agent-desc', agent.description);
|
|
184
185
|
setText('protocol-temp', protocol.temperature);
|
|
185
186
|
setText('protocol-method', protocol.method);
|
|
187
|
+
setText('protocol-notes', protocol.notes ?? '');
|
|
186
188
|
renderWarning(ctx);
|
|
187
189
|
}
|
|
188
190
|
|
|
@@ -235,4 +237,3 @@ const fibers = Object.entries(ui.fiberData)
|
|
|
235
237
|
|
|
236
238
|
startInit();
|
|
237
239
|
</script>
|
|
238
|
-
|
|
@@ -186,9 +186,9 @@ const initLabels = yarnUI.sizeLabels?.sweater ?? ['S', 'M', 'L', 'XL'];
|
|
|
186
186
|
<path class="scheme-item filled" d="M140 40 L170 100 L150 110 L140 60 Z"/>
|
|
187
187
|
`;
|
|
188
188
|
els.lblLeft.style.cssText = 'opacity:1; top:10%; left:5%';
|
|
189
|
-
els.lblLeft.innerHTML = `<span>${ui.schemeSleeveLabel}</span><strong>${sMTotal}
|
|
189
|
+
els.lblLeft.innerHTML = `<span>${ui.schemeSleeveLabel}</span><strong>${sMTotal}${ui.statSuffix}</strong><em>${Math.round(sMTotal / 2)}${ui.statSuffix} ${ui.schemeSleeveEach}</em>`;
|
|
190
190
|
els.lblRight.style.cssText = 'opacity:1; top:50%; right:5%';
|
|
191
|
-
els.lblRight.innerHTML = `<span>${ui.schemeBodyLabel}</span><strong>${bM}
|
|
191
|
+
els.lblRight.innerHTML = `<span>${ui.schemeBodyLabel}</span><strong>${bM}${ui.statSuffix}</strong>`;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
function setHatScheme(els: SchemeEls, total: number) {
|
|
@@ -198,7 +198,7 @@ const initLabels = yarnUI.sizeLabels?.sweater ?? ['S', 'M', 'L', 'XL'];
|
|
|
198
198
|
<path class="scheme-item filled" d="M60 130 Q 60 40, 100 40 Q 140 40, 140 130 Z"/>
|
|
199
199
|
`;
|
|
200
200
|
els.lblRight.style.cssText = 'opacity:1; top:25%; right:10%';
|
|
201
|
-
els.lblRight.innerHTML = `<span>${ui.schemeTotalHat}</span><strong>${total}
|
|
201
|
+
els.lblRight.innerHTML = `<span>${ui.schemeTotalHat}</span><strong>${total}${ui.statSuffix}</strong>`;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
function setFlatScheme(els: SchemeEls, total: number) {
|
|
@@ -208,7 +208,7 @@ const initLabels = yarnUI.sizeLabels?.sweater ?? ['S', 'M', 'L', 'XL'];
|
|
|
208
208
|
<rect class="scheme-item filled" x="40" y="60" width="120" height="60"/>
|
|
209
209
|
`;
|
|
210
210
|
els.lblRight.style.cssText = 'opacity:1; top:20%; right:10%';
|
|
211
|
-
els.lblRight.innerHTML = `<span>${ui.schemeTotalFlat}</span><strong>${total}
|
|
211
|
+
els.lblRight.innerHTML = `<span>${ui.schemeTotalFlat}</span><strong>${total}${ui.statSuffix}</strong>`;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
function setSocksScheme(els: SchemeEls, total: number) {
|
|
@@ -218,7 +218,7 @@ const initLabels = yarnUI.sizeLabels?.sweater ?? ['S', 'M', 'L', 'XL'];
|
|
|
218
218
|
<path class="scheme-item filled" d="M80 40 L80 120 L120 120 L120 100 L100 100 L100 40 Z"/>
|
|
219
219
|
`;
|
|
220
220
|
els.lblRight.style.cssText = 'opacity:1; top:15%; right:10%';
|
|
221
|
-
els.lblRight.innerHTML = `<span>${ui.schemeTotalSocks}</span><strong>${total}
|
|
221
|
+
els.lblRight.innerHTML = `<span>${ui.schemeTotalSocks}</span><strong>${total}${ui.statSuffix}</strong>`;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
function drawScheme(total: number, parts: { body: number; sleeves: number }) {
|
|
@@ -343,4 +343,3 @@ const initLabels = yarnUI.sizeLabels?.sweater ?? ['S', 'M', 'L', 'XL'];
|
|
|
343
343
|
document.addEventListener('astro:page-load', init);
|
|
344
344
|
init();
|
|
345
345
|
</script>
|
|
346
|
-
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const validation = {
|
|
2
|
+
reviewedAt: '2026-09-01',
|
|
3
|
+
methodology: 'Reference yarn lengths are compared with the published project table, then adjusted for cable-work overhead and ball capacity using the calculator formulas.',
|
|
4
|
+
sources: [
|
|
5
|
+
'https://www.craftyarncouncil.com/standards/yarn-weight-system',
|
|
6
|
+
'https://woolery.com/blogs/the-woolery-blog/yarn-weight-charts-helpful-guide/',
|
|
7
|
+
],
|
|
8
|
+
referenceCases: [
|
|
9
|
+
{ project: 'sweater', size: 'm', weight: 'fingering', expectedBaseMeters: 1250 },
|
|
10
|
+
{ project: 'hat', size: 'm', weight: 'dk', expectedBaseMeters: 190 },
|
|
11
|
+
{ project: 'scarf', size: 'm', weight: 'worsted', expectedBaseMeters: 400 },
|
|
12
|
+
],
|
|
13
|
+
limitations: [
|
|
14
|
+
'The result is a planning estimate, not a substitute for a gauge swatch or the exact pattern yardage.',
|
|
15
|
+
'Actual consumption varies with stitch pattern, tension, finishing, and individual construction choices.',
|
|
16
|
+
],
|
|
17
|
+
};
|
package/src/tools.ts
CHANGED
|
@@ -13,6 +13,6 @@ import { SEWING_PATTERN_SCALER_TOOL } from './tool/sewingPatternScaler/index';
|
|
|
13
13
|
import { NEEDLE_CONVERTER_TOOL } from './tool/needleConverter/index';
|
|
14
14
|
import { YARN_CALCULATOR_TOOL } from './tool/yarnCalculator/index';
|
|
15
15
|
import { EMBROIDERY_STITCH_PRICING_ESTIMATOR_TOOL } from './tool/embroideryStitchPricingEstimator/index';
|
|
16
|
+
import { QUILT_BINDING_CALCULATOR_TOOL } from './tool/quiltBindingCalculator/index';
|
|
16
17
|
|
|
17
|
-
export const ALL_TOOLS: ToolDefinition[] = [FABRIC_TRUTH_TOOL, LAUNDRY_GUIDE_TOOL, STAIN_CHEMISTRY_TOOL, BURN_TEST_TOOL, FIBER_PREP_TOOL, SHOE_SIZE_CONVERTER_TOOL, CLOTHING_SIZE_CONVERTER_TOOL, KNITTING_GAUGE_TOOL, FABRIC_PROJECT_CALCULATOR_TOOL, SEWING_PATTERN_SCALER_TOOL, NEEDLE_CONVERTER_TOOL, YARN_CALCULATOR_TOOL, EMBROIDERY_STITCH_PRICING_ESTIMATOR_TOOL];
|
|
18
|
-
|
|
18
|
+
export const ALL_TOOLS: ToolDefinition[] = [FABRIC_TRUTH_TOOL, LAUNDRY_GUIDE_TOOL, STAIN_CHEMISTRY_TOOL, BURN_TEST_TOOL, FIBER_PREP_TOOL, SHOE_SIZE_CONVERTER_TOOL, CLOTHING_SIZE_CONVERTER_TOOL, KNITTING_GAUGE_TOOL, FABRIC_PROJECT_CALCULATOR_TOOL, SEWING_PATTERN_SCALER_TOOL, NEEDLE_CONVERTER_TOOL, YARN_CALCULATOR_TOOL, EMBROIDERY_STITCH_PRICING_ESTIMATOR_TOOL, QUILT_BINDING_CALCULATOR_TOOL];
|