@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.
Files changed (54) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -0
  3. package/src/entries.ts +4 -1
  4. package/src/index.ts +1 -0
  5. package/src/tests/legacy_logic_reference.test.ts +65 -0
  6. package/src/tests/qa-test-helpers.ts +32 -0
  7. package/src/tests/qa_bibliography_links.test.ts +49 -0
  8. package/src/tests/qa_claim_evidence.test.ts +69 -0
  9. package/src/tests/qa_logic_reference_coverage.test.ts +46 -0
  10. package/src/tests/qa_runtime_i18n.test.ts +99 -0
  11. package/src/tests/registry_contract.test.ts +67 -0
  12. package/src/tests/tool_validation.test.ts +2 -2
  13. package/src/tool/burnTest/component.astro +2 -2
  14. package/src/tool/embroideryStitchPricingEstimator/component.astro +2 -2
  15. package/src/tool/embroideryStitchPricingEstimator/dom-views.ts +12 -5
  16. package/src/tool/fabricProjectCalculator/component.astro +7 -5
  17. package/src/tool/fabricTruth/component.astro +2 -2
  18. package/src/tool/knittingGauge/component.astro +1 -2
  19. package/src/tool/laundryGuide/bibliography.ts +1 -1
  20. package/src/tool/quiltBindingCalculator/bibliography.astro +6 -0
  21. package/src/tool/quiltBindingCalculator/bibliography.ts +12 -0
  22. package/src/tool/quiltBindingCalculator/component.astro +110 -0
  23. package/src/tool/quiltBindingCalculator/controller.ts +257 -0
  24. package/src/tool/quiltBindingCalculator/dom-views.ts +56 -0
  25. package/src/tool/quiltBindingCalculator/entry.ts +29 -0
  26. package/src/tool/quiltBindingCalculator/evaluator.ts +13 -0
  27. package/src/tool/quiltBindingCalculator/i18n/de.ts +3 -0
  28. package/src/tool/quiltBindingCalculator/i18n/en.ts +200 -0
  29. package/src/tool/quiltBindingCalculator/i18n/es.ts +3 -0
  30. package/src/tool/quiltBindingCalculator/i18n/fr.ts +3 -0
  31. package/src/tool/quiltBindingCalculator/i18n/id.ts +3 -0
  32. package/src/tool/quiltBindingCalculator/i18n/it.ts +3 -0
  33. package/src/tool/quiltBindingCalculator/i18n/ja.ts +3 -0
  34. package/src/tool/quiltBindingCalculator/i18n/ko.ts +3 -0
  35. package/src/tool/quiltBindingCalculator/i18n/nl.ts +3 -0
  36. package/src/tool/quiltBindingCalculator/i18n/pl.ts +3 -0
  37. package/src/tool/quiltBindingCalculator/i18n/pt.ts +3 -0
  38. package/src/tool/quiltBindingCalculator/i18n/ru.ts +3 -0
  39. package/src/tool/quiltBindingCalculator/i18n/shared.ts +514 -0
  40. package/src/tool/quiltBindingCalculator/i18n/sv.ts +3 -0
  41. package/src/tool/quiltBindingCalculator/i18n/tr.ts +3 -0
  42. package/src/tool/quiltBindingCalculator/i18n/zh.ts +3 -0
  43. package/src/tool/quiltBindingCalculator/index.ts +11 -0
  44. package/src/tool/quiltBindingCalculator/logic.test.ts +70 -0
  45. package/src/tool/quiltBindingCalculator/logic.ts +93 -0
  46. package/src/tool/quiltBindingCalculator/quilt-binding-length-and-strip-calculator.css +474 -0
  47. package/src/tool/quiltBindingCalculator/seo.astro +15 -0
  48. package/src/tool/quiltBindingCalculator/storage.ts +26 -0
  49. package/src/tool/quiltBindingCalculator/ui.ts +51 -0
  50. package/src/tool/stainChemistry/bibliography.ts +1 -1
  51. package/src/tool/stainChemistry/component.astro +4 -3
  52. package/src/tool/yarnCalculator/component.astro +5 -6
  53. package/src/tool/yarnCalculator/validation.ts +17 -0
  54. package/src/tools.ts +2 -2
@@ -0,0 +1,200 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import { bibliography } from '../bibliography';
4
+ import type { QuiltBindingCalculatorUI } from '../ui';
5
+
6
+ const slug = 'quilt-binding-length-and-strip-calculator';
7
+ const title = 'Quilt Binding Length and Strip Calculator';
8
+ const description = 'Calculate the binding length, strip count, fabric cut size, and joining plan for a rectangular quilt with a visible waste allowance.';
9
+
10
+ const faq = [
11
+ {
12
+ question: 'What measurements do I need for quilt binding?',
13
+ answer: 'Enter the finished quilt width and length, the number of corners, the strip width you will cut, the usable fabric width, and your seam allowance. Choose diagonal or straight joins and a safety allowance.',
14
+ },
15
+ {
16
+ question: 'How is the binding length calculated?',
17
+ answer: 'The calculator starts with the rectangular perimeter, adds a reserve for each corner and the final join, then adds the selected safety allowance. It keeps the reserves visible so you can inspect the plan.',
18
+ },
19
+ {
20
+ question: 'Why does the number of strips change with the joining method?',
21
+ answer: 'A diagonal join crosses the full width of a binding strip and consumes more length than a straight join. The model subtracts that joining loss from each connection before counting the strips.',
22
+ },
23
+ {
24
+ question: 'What should I enter for fabric width?',
25
+ answer: 'Enter the usable cuttable width after removing selvedges. For quilting cotton this is often close to 110 cm or 42 inches, but measure your fabric instead of relying on a nominal width.',
26
+ },
27
+ {
28
+ question: 'Can this calculator handle curved or irregular quilts?',
29
+ answer: 'It is designed for a measured perimeter represented by a width, length, and corner count. Curves, scallops, directional fabric, and unusual corners need a larger manual allowance and a final tape measurement.',
30
+ },
31
+ ];
32
+
33
+ const howTo = [
34
+ {
35
+ name: 'Measure the finished quilt',
36
+ text: 'Measure the top after quilting or trimming. Enter the width and length in the active unit system and use the corner count to describe the edge you will bind.',
37
+ },
38
+ {
39
+ name: 'Describe the binding strips',
40
+ text: 'Enter the strip width you plan to cut, the usable fabric width, and the seam allowance used to join and attach the binding.',
41
+ },
42
+ {
43
+ name: 'Choose the joining reserve',
44
+ text: 'Use diagonal joins for the common low-bulk mitered connection or straight joins when that is your construction method. Select five, ten, or fifteen percent safety allowance.',
45
+ },
46
+ {
47
+ name: 'Read and check the cutting plan',
48
+ text: 'Cut the displayed number of strips at the displayed width by usable fabric width. Compare the joined length and surplus with your actual fabric before cutting.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faq.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howTo.map((step) => ({ '@type': 'HowToStep', name: step.name, text: step.text })),
68
+ };
69
+
70
+ const appSchema: WithContext<SoftwareApplication> = {
71
+ '@context': 'https://schema.org',
72
+ '@type': 'SoftwareApplication',
73
+ name: title,
74
+ description,
75
+ applicationCategory: 'UtilitiesApplication',
76
+ operatingSystem: 'All',
77
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
78
+ inLanguage: 'en',
79
+ };
80
+
81
+ const ui: QuiltBindingCalculatorUI = {
82
+ unitLabel: 'Measurement system',
83
+ metricLabel: 'Metric cm',
84
+ imperialLabel: 'Imperial in',
85
+ stageLabel: 'The binding route',
86
+ controlsLabel: 'Set the cut',
87
+ dimensionsLabel: 'Finished quilt',
88
+ fabricLabel: 'Binding fabric',
89
+ methodLabel: 'Join method',
90
+ safetyLabel: 'Safety allowance',
91
+ widthLabel: 'Quilt width',
92
+ lengthLabel: 'Quilt length',
93
+ cornersLabel: 'Corners',
94
+ stripWidthLabel: 'Strip width',
95
+ fabricWidthLabel: 'Usable fabric width',
96
+ seamAllowanceLabel: 'Seam allowance',
97
+ diagonalLabel: 'Diagonal join',
98
+ straightLabel: 'Straight join',
99
+ safetyFive: '5 percent',
100
+ safetyTen: '10 percent',
101
+ safetyFifteen: '15 percent',
102
+ widthHint: 'edge to edge',
103
+ lengthHint: 'edge to edge',
104
+ cornersHint: 'usually 4',
105
+ stripWidthHint: 'width to cut',
106
+ fabricWidthHint: 'after selvedges',
107
+ seamAllowanceHint: 'per sewn edge',
108
+ resultLabel: 'Your cutting plan',
109
+ emptyResult: 'Enter positive measurements to draw the route.',
110
+ perimeterLabel: 'Quilt perimeter',
111
+ requiredLabel: 'Binding to prepare',
112
+ stripsLabel: 'Strips to cut',
113
+ cutSizeLabel: 'Each strip',
114
+ joinedLengthLabel: 'Joined length',
115
+ surplusLabel: 'Surplus after joins',
116
+ joinsLabel: 'Joins to sew',
117
+ cuttingPlanLabel: 'Cutting plan',
118
+ readyBadge: 'Plan is ready to check',
119
+ reviewBadge: 'Review the allowance',
120
+ warningLargeWaste: 'The selected allowance is generous. Check whether your fabric needs that much reserve.',
121
+ warningSmallSurplus: 'The final surplus is close to one joining loss. Measure the quilt again before cutting.',
122
+ invalidMessage: 'Use positive dimensions, a usable fabric width wider than the strip, and a valid corner count.',
123
+ reset: 'Reset example',
124
+ copySummary: 'Copy cutting plan',
125
+ copied: 'Cutting plan copied',
126
+ formulaTitle: 'Open the method notes',
127
+ formulaText: 'Perimeter is 2 x (width + length). The model adds two seam allowances for every corner, a joining reserve based on the selected method, and the chosen safety percentage. Strip count is the smallest whole number whose joined length reaches the required binding length.',
128
+ noteTitle: 'Planning boundary.',
129
+ noteText: 'This is a transparent plan for straight edged quilts. It does not replace measuring an irregular edge, checking directional fabric, or testing the actual binding on your project.',
130
+ canvasAlt: 'A continuous binding ribbon wraps the quilt and shows the strips that will be joined.',
131
+ };
132
+
133
+ export const content: ToolLocaleContent<QuiltBindingCalculatorUI> = {
134
+ slug,
135
+ title,
136
+ description,
137
+ ui,
138
+ faq,
139
+ bibliography,
140
+ howTo,
141
+ schemas: [faqSchema, howToSchema, appSchema],
142
+ seo: [
143
+ { type: 'title', text: 'Calculate quilt binding before you cut', level: 2 },
144
+ {
145
+ type: 'paragraph',
146
+ html: 'Binding is a small finishing step with a surprisingly unforgiving failure mode. If the joined strip runs short at the last corner, the whole preparation has to stop. This calculator turns the finished quilt perimeter into a cut list that includes the corners, the final join, joining losses, and a safety allowance you can inspect.',
147
+ },
148
+ {
149
+ type: 'title',
150
+ text: 'What the calculator measures',
151
+ level: 3,
152
+ },
153
+ {
154
+ type: 'paragraph',
155
+ html: 'The width and length describe the finished edge, not the backing or the batting. The corner count lets the plan reserve extra handling length for each turn. The strip width and usable fabric width then convert the required continuous binding into a whole number of strips cut across the fabric.',
156
+ },
157
+ {
158
+ type: 'table',
159
+ headers: ['Input', 'Changes in the plan', 'Check before cutting'],
160
+ rows: [
161
+ ['Finished width and length', 'The perimeter around the quilt', 'Measure after trimming and quilting'],
162
+ ['Corner count', 'The handling reserve for turns', 'Add more for scallops or unusual corners'],
163
+ ['Strip and fabric width', 'The number and size of cut strips', 'Remove selvedges from usable width'],
164
+ ['Join method and seam allowance', 'Length lost at each connection', 'Use the allowance you will actually sew'],
165
+ ],
166
+ },
167
+ {
168
+ type: 'title',
169
+ text: 'How to read the cutting plan',
170
+ level: 3,
171
+ },
172
+ {
173
+ type: 'paragraph',
174
+ html: 'Binding to prepare is the target continuous length after the perimeter and reserves are combined. Strips to cut is rounded up to a whole strip because fabric cannot provide a fraction of a crosswise cut. Joined length shows what those strips provide after the model removes the length consumed by each join.',
175
+ },
176
+ {
177
+ type: 'list',
178
+ items: [
179
+ 'Measure the finished edge again if the quilt is not square or the result has only a small surplus.',
180
+ 'Use usable fabric width after selvedges, not the number printed on the bolt.',
181
+ 'Match the seam allowance in the calculator to the seam allowance you will sew.',
182
+ 'Increase the safety allowance for directional fabric, many scrappy joins, curves, or a first attempt.',
183
+ ],
184
+ },
185
+ {
186
+ type: 'tip',
187
+ title: 'What this result cannot promise',
188
+ html: 'The model is intentionally conservative but it cannot see scallops, waves, fabric stretch, directional motifs, or a quilt that is not truly rectangular. Treat the plan as a cutting decision aid, then lay the joined strip around the project before trimming the final connection.',
189
+ },
190
+ {
191
+ type: 'title',
192
+ text: 'Diagonal joins and straight joins',
193
+ level: 3,
194
+ },
195
+ {
196
+ type: 'paragraph',
197
+ html: 'A diagonal connection is common because it spreads bulk across the strip. The calculator treats that seam as consuming the strip width, while a straight connection consumes two seam allowances. These are visible planning assumptions rather than universal sewing laws, so the final surplus is part of the result and not hidden inside a magic constant.',
198
+ },
199
+ ],
200
+ };
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('es');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('fr');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('id');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('it');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('ja');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('ko');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('nl');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('pl');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('pt');
@@ -0,0 +1,3 @@
1
+ import { createContent } from './shared';
2
+
3
+ export const content = createContent('ru');