@rig-c/parts 1.49.2 → 1.51.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/cli.ts +27 -7
- package/docs/AUTHORING.md +74 -14
- package/docs/STABILITY.md +5 -5
- package/package.json +1 -1
- package/src/assemble.ts +68 -6
- package/src/build.ts +50 -8
- package/src/check.ts +158 -14
- package/src/clothconfig.ts +67 -13
- package/src/config.ts +21 -1
- package/src/parts.ts +22 -3
package/src/clothconfig.ts
CHANGED
|
@@ -39,6 +39,8 @@ function canon(v: unknown): string {
|
|
|
39
39
|
/** One edit `--write-config` makes, with the words the write line prints for it. */
|
|
40
40
|
export interface ClothEdit extends ConfigEdit {
|
|
41
41
|
label: string;
|
|
42
|
+
/** Issue #571: the input's entry was the previous recipe's draft (`--from`), and only that made it the recipe's. */
|
|
43
|
+
previous?: true;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
/**
|
|
@@ -95,31 +97,44 @@ function shown(v: unknown): string {
|
|
|
95
97
|
* - removed (P present, D absent — the recipe replaced a plain chain with its trees): `I` equal to `P` is removed;
|
|
96
98
|
* - every other input entry is kept, bytes and order;
|
|
97
99
|
* - an owned or removed `I` that is none of those — changed by hand — is a conflict, as is a name the input states twice.
|
|
100
|
+
*
|
|
101
|
+
* With `V`, the previous recipe's draft (`previous`, issue #571 — `--from`; null without it): `I` equal to `V` is the
|
|
102
|
+
* recipe's as `I` equal to `P` is — an owned name is replaced, and a name in `V` and not in `D` is removed — and a
|
|
103
|
+
* conflict is an `I` equal to none of `D`, `P` and `V`, its first differing field read against `V` where `V` holds the
|
|
104
|
+
* name. Without `previous` every rule, and every word of the refusal, is the one above.
|
|
98
105
|
*/
|
|
99
|
-
function entryEdits(path: readonly string[], identity: (e: unknown) => string | null, drafted: readonly unknown[], plain: readonly unknown[], input: readonly unknown[], conflicts: Problem[]): ClothEdit[] {
|
|
106
|
+
function entryEdits(path: readonly string[], identity: (e: unknown) => string | null, drafted: readonly unknown[], plain: readonly unknown[], input: readonly unknown[], conflicts: Problem[], previous: readonly unknown[] | null): ClothEdit[] {
|
|
100
107
|
const section = path.join('.');
|
|
101
108
|
const D = byName(drafted, identity, 'drafted', section);
|
|
102
109
|
const P = byName(plain, identity, 'plain', section);
|
|
110
|
+
const V = previous === null ? null : byName(previous, identity, 'previous', section);
|
|
103
111
|
const keys = input.map(identity);
|
|
104
112
|
const where = new Map<string, number[]>();
|
|
105
113
|
keys.forEach((k, i) => {
|
|
106
114
|
if (k !== null) where.set(k, [...(where.get(k) ?? []), i]);
|
|
107
115
|
});
|
|
108
116
|
const owned = [...D.keys()].filter((k) => !P.has(k) || canon(P.get(k)) !== canon(D.get(k)));
|
|
109
|
-
const removed = [...P.keys()].filter((k) => !D.has(k));
|
|
117
|
+
const removed = [...P.keys(), ...(V === null ? [] : [...V.keys()].filter((k) => !P.has(k)))].filter((k) => !D.has(k));
|
|
110
118
|
const replace: string[] = [];
|
|
111
119
|
const remove: string[] = [];
|
|
120
|
+
const vouched = new Set<string>();
|
|
112
121
|
const conflict = (k: string, i: number, drafts: boolean): void => {
|
|
113
122
|
const author = input[i];
|
|
114
|
-
const
|
|
123
|
+
const prev = V !== null && V.has(k) ? V.get(k) : undefined;
|
|
124
|
+
const field = firstField(author, prev !== undefined ? prev : P.has(k) ? P.get(k) : D.get(k));
|
|
115
125
|
const fieldOf = (e: unknown, f: string): string => (isPlain(e) && e[f] !== undefined ? `${f} ${shown(e[f])}` : `no ${f}`);
|
|
116
126
|
const held = field === null ? `the entry ${shown(author)}` : fieldOf(author, field);
|
|
117
127
|
const draft = D.get(k);
|
|
118
128
|
const draftSays = !drafts ? 'the draft removes the entry (the recipe drafts that part afresh)' : field === null ? `the draft writes ${shown(draft)}` : `the draft writes ${fieldOf(draft, field)}`;
|
|
129
|
+
// Issue #571: with --from, the entry equals none of the three drafts; the field is read against the previous recipe's, the draft a person edited from.
|
|
130
|
+
const says =
|
|
131
|
+
V === null
|
|
132
|
+
? `it holds ${held} where ${draftSays}`
|
|
133
|
+
: `it equals neither the draft, the draft without the recipe, nor the previous recipe's draft: it holds ${held} where ${prev === undefined ? 'the previous recipe\'s draft has no such entry' : `the previous recipe's draft writes ${field === null ? shown(prev) : fieldOf(prev, field)}`} and ${draftSays}`;
|
|
119
134
|
conflicts.push({
|
|
120
135
|
code: 'PROPOSE_WRITE_CONFIG_CONFLICT',
|
|
121
136
|
object: `config.${section}[${i}] "${k}"`,
|
|
122
|
-
detail: `${section} entry "${k}" is the recipe's, and it was changed by hand:
|
|
137
|
+
detail: `${section} entry "${k}" is the recipe's, and it was changed by hand: ${says}, so the write would drop the hand edit; take the draft by removing the hand edit (or the entry), or leave the recipe out for that part (its config.cloth block)`,
|
|
123
138
|
});
|
|
124
139
|
};
|
|
125
140
|
for (const k of [...owned, ...removed]) {
|
|
@@ -134,19 +149,27 @@ function entryEdits(path: readonly string[], identity: (e: unknown) => string |
|
|
|
134
149
|
}
|
|
135
150
|
if (at.length === 0) continue;
|
|
136
151
|
const I = canon(input[at[0]]);
|
|
152
|
+
const isPrevious = V !== null && V.has(k) && I === canon(V.get(k));
|
|
137
153
|
if (D.has(k)) {
|
|
138
154
|
if (I === canon(D.get(k))) continue;
|
|
139
155
|
if (P.has(k) && I === canon(P.get(k))) replace.push(k);
|
|
140
|
-
else
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
else if (isPrevious) {
|
|
157
|
+
replace.push(k);
|
|
158
|
+
vouched.add(k);
|
|
159
|
+
} else conflict(k, at[0], true);
|
|
160
|
+
} else if (P.has(k) && I === canon(P.get(k))) remove.push(k);
|
|
161
|
+
else if (isPrevious) {
|
|
162
|
+
remove.push(k);
|
|
163
|
+
vouched.add(k);
|
|
164
|
+
} else conflict(k, at[0], false);
|
|
143
165
|
}
|
|
166
|
+
const mark = (k: string): { previous?: true } => (vouched.has(k) ? { previous: true } : {});
|
|
144
167
|
const edits: ClothEdit[] = [];
|
|
145
168
|
const work = [...keys];
|
|
146
|
-
for (const k of replace) edits.push({ path: [...path, work.indexOf(k)], value: D.get(k), label: `${section}["${k}"] replaced
|
|
169
|
+
for (const k of replace) edits.push({ path: [...path, work.indexOf(k)], value: D.get(k), label: `${section}["${k}"] replaced`, ...mark(k) });
|
|
147
170
|
for (const k of remove) {
|
|
148
171
|
const i = work.indexOf(k);
|
|
149
|
-
edits.push({ path: [...path, i], value: undefined, label: `${section}["${k}"] removed
|
|
172
|
+
edits.push({ path: [...path, i], value: undefined, label: `${section}["${k}"] removed`, ...mark(k) });
|
|
150
173
|
work.splice(i, 1);
|
|
151
174
|
}
|
|
152
175
|
const order = [...D.keys()];
|
|
@@ -174,27 +197,53 @@ function entryEdits(path: readonly string[], identity: (e: unknown) => string |
|
|
|
174
197
|
* the input holds it as an array, and any other section, or one the input lacks, whole. Every conflict is collected and
|
|
175
198
|
* refused in one throw, `PROPOSE_WRITE_CONFIG_CONFLICT`, before anything is written.
|
|
176
199
|
*
|
|
200
|
+
* `previous` (issue #571, `propose --write-config --from <config>`) is the same parts drafted a third time, with the
|
|
201
|
+
* recipe of the config the recipe is changed from: an array entry equal to its draft is the recipe's ({@link entryEdits}),
|
|
202
|
+
* and an array section the two drafts agree at is read entry by entry where the previous draft differs from them. An
|
|
203
|
+
* object entry (`meshes.<part>`, `regions.<part>`) the recipe drafts is replaced whole already, so `previous` changes
|
|
204
|
+
* nothing there. Null — no `--from` — is the writer before #571, rule for rule and byte for byte.
|
|
205
|
+
*
|
|
177
206
|
* `whole` is the selftest's mutant only (issue #552): `bones`, `constraints` and `motion.tracks` replaced whole, as
|
|
178
207
|
* the #537 writer did; no flag or environment reaches it.
|
|
179
208
|
*/
|
|
180
|
-
export function clothConfigEdits(drafted: Proposal, plain: Proposal, input: unknown, whole = false): ClothEdit[] {
|
|
209
|
+
export function clothConfigEdits(drafted: Proposal, plain: Proposal, input: unknown, whole = false, previous: Proposal | null = null): ClothEdit[] {
|
|
181
210
|
const edits: ClothEdit[] = [];
|
|
182
211
|
const conflicts: Problem[] = [];
|
|
183
212
|
const d = JSON.parse(JSON.stringify(drafted)) as Record<string, unknown>;
|
|
184
213
|
const p = JSON.parse(JSON.stringify(plain)) as Record<string, unknown>;
|
|
214
|
+
const v = previous === null || whole ? null : (JSON.parse(JSON.stringify(previous)) as Record<string, unknown>);
|
|
215
|
+
const arrayOf = (path: readonly string[]): (typeof ARRAY_SECTIONS)[number] | undefined => (whole ? undefined : ARRAY_SECTIONS.find((x) => x.path.join('.') === path.join('.')));
|
|
216
|
+
const prevAt = (path: readonly string[]): unknown[] | null => {
|
|
217
|
+
if (v === null) return null;
|
|
218
|
+
const c = valueAt(v, path);
|
|
219
|
+
return Array.isArray(c) ? c : [];
|
|
220
|
+
};
|
|
185
221
|
const one = (path: readonly string[], a: unknown, b: unknown): void => {
|
|
186
|
-
const s =
|
|
222
|
+
const s = arrayOf(path);
|
|
187
223
|
const mine = valueAt(input, path);
|
|
188
|
-
if (s !== undefined && Array.isArray(b) && (a === undefined || Array.isArray(a)) && Array.isArray(mine)) edits.push(...entryEdits(path, s.identity, b, Array.isArray(a) ? a : [], mine, conflicts));
|
|
224
|
+
if (s !== undefined && Array.isArray(b) && (a === undefined || Array.isArray(a)) && Array.isArray(mine)) edits.push(...entryEdits(path, s.identity, b, Array.isArray(a) ? a : [], mine, conflicts, prevAt(path)));
|
|
189
225
|
else edits.push({ path, value: b, label: path.join('.') });
|
|
190
226
|
};
|
|
227
|
+
// Issue #571: an array section the two drafts agree at, where the previous draft differs — its entries the previous recipe drafted and this one does not.
|
|
228
|
+
const prevOnly = (path: readonly string[], b: unknown): void => {
|
|
229
|
+
const s = arrayOf(path);
|
|
230
|
+
const mine = valueAt(input, path);
|
|
231
|
+
const c = valueAt(v, path);
|
|
232
|
+
if (v === null || s === undefined || !Array.isArray(b) || !Array.isArray(mine) || canon(c) === canon(b)) return;
|
|
233
|
+
edits.push(...entryEdits(path, s.identity, b, b, mine, conflicts, prevAt(path)));
|
|
234
|
+
};
|
|
191
235
|
for (const section of PROPOSAL_CONFIG_SECTIONS) {
|
|
192
236
|
const a = p[section];
|
|
193
237
|
const b = d[section];
|
|
194
|
-
if (JSON.stringify(a) === JSON.stringify(b))
|
|
238
|
+
if (JSON.stringify(a) === JSON.stringify(b)) {
|
|
239
|
+
if (isPlain(b)) for (const k of Object.keys(b)) prevOnly([section, k], b[k]);
|
|
240
|
+
else prevOnly([section], b);
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
195
243
|
if (isPlain(a) && isPlain(b)) {
|
|
196
244
|
for (const k of [...Object.keys(b), ...Object.keys(a).filter((k) => !(k in b))]) {
|
|
197
245
|
if (JSON.stringify(a[k]) !== JSON.stringify(b[k])) one([section, k], a[k], b[k]);
|
|
246
|
+
else prevOnly([section, k], b[k]);
|
|
198
247
|
}
|
|
199
248
|
} else one([section], a, b);
|
|
200
249
|
}
|
|
@@ -221,6 +270,11 @@ export function writtenClothConfig(where: string, text: string, edits: readonly
|
|
|
221
270
|
return r.text;
|
|
222
271
|
}
|
|
223
272
|
|
|
273
|
+
/** Issue #571: how many edits the previous recipe's draft vouched for — an entry that equalled it, and only it. */
|
|
274
|
+
export function previousCount(edits: readonly ClothEdit[]): number {
|
|
275
|
+
return edits.filter((e) => e.previous === true).length;
|
|
276
|
+
}
|
|
277
|
+
|
|
224
278
|
/** What each edit names, in order: what the write line prints. */
|
|
225
279
|
export function editPaths(edits: readonly ClothEdit[]): string[] {
|
|
226
280
|
return edits.map((e) => e.label);
|
package/src/config.ts
CHANGED
|
@@ -88,6 +88,7 @@ import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
|
88
88
|
import { dirname, resolve } from 'node:path';
|
|
89
89
|
import { RIG_BONE_INHERIT, RIG_SKIN_CONSTRAINT_KEYS, type RigBoneInherit, type RigConstraint, type RigSkinConstraintKey, type RigStop } from 'rig-c/src/rig.ts';
|
|
90
90
|
import { pyRound } from './round.ts';
|
|
91
|
+
import { REQUIREMENTS_SPEC } from './requirements.ts';
|
|
91
92
|
import { CLOTH_TARGETS, type ClothRecipes, RECIPE_STRENGTH, RIGC_DEFAULT_DAMPING, springStable } from './cloth.ts';
|
|
92
93
|
import { GRID, MAX_SIDE } from './contour.ts';
|
|
93
94
|
import { type Problem, refuseIfAny } from './errors.ts';
|
|
@@ -951,6 +952,13 @@ export interface CharacterConfig {
|
|
|
951
952
|
proposed_rig_scale?: number;
|
|
952
953
|
/** Alternate painting sets (issue #454): absent, no alternate sets are assembled or emitted. */
|
|
953
954
|
alternates?: AlternateSetConfig[];
|
|
955
|
+
/**
|
|
956
|
+
* The requirements file the build's check reads (issue #556), a path relative
|
|
957
|
+
* to the config's directory: `build` reads it when no `--requirements` is
|
|
958
|
+
* given, and refuses a flag naming a file with other bytes. Absent, nothing
|
|
959
|
+
* is read and no byte of any output moves.
|
|
960
|
+
*/
|
|
961
|
+
requirements?: string;
|
|
954
962
|
}
|
|
955
963
|
|
|
956
964
|
/** `config.scene` (issue #242): the declaration that the painting is a scene. It holds no field today. */
|
|
@@ -1259,7 +1267,7 @@ export interface AssembleConfig {
|
|
|
1259
1267
|
proposed_rig_scale?: number;
|
|
1260
1268
|
}
|
|
1261
1269
|
|
|
1262
|
-
const TOP_KEYS = ['key', 'generation', 'seethrough', 'assemble', 'limbs', 'bones', 'meshes', 'regions', 'motion', 'constraints', 'stops', 'turn', 'scene', 'cloth', 'proposed_rig_scale'] as const;
|
|
1270
|
+
const TOP_KEYS = ['key', 'generation', 'seethrough', 'assemble', 'limbs', 'bones', 'meshes', 'regions', 'motion', 'constraints', 'stops', 'turn', 'scene', 'cloth', 'proposed_rig_scale', 'requirements'] as const;
|
|
1263
1271
|
|
|
1264
1272
|
/**
|
|
1265
1273
|
* The one partial entry point. It validates exactly what its door requires —
|
|
@@ -1527,6 +1535,7 @@ function parseConfigFrom(raw: Json, base: string | null): { config: CharacterCon
|
|
|
1527
1535
|
if ('turn' in t) checkTurn(c, t.turn, attached, names.bones, hasAltFace);
|
|
1528
1536
|
if ('scene' in t) checkScene(c, t.scene);
|
|
1529
1537
|
if ('cloth' in t) checkCloth(c, t.cloth);
|
|
1538
|
+
if ('requirements' in t && c.string('config.requirements', t.requirements) && base !== null) checkRequirementsFile(c, resolve(base, t.requirements));
|
|
1530
1539
|
const from = isPlainObject(t.motion) ? t.motion.animations_from : undefined;
|
|
1531
1540
|
const animations = base !== null && typeof from === 'string' && from !== '' ? readAnimationsFrom(c, resolve(base, from)) : null;
|
|
1532
1541
|
if (animations !== null) {
|
|
@@ -1568,6 +1577,17 @@ function isPlainObject(v: Json): v is Record<string, Json> {
|
|
|
1568
1577
|
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
1569
1578
|
}
|
|
1570
1579
|
|
|
1580
|
+
/**
|
|
1581
|
+
* Issue #556: the file `config.requirements` names is on disk —
|
|
1582
|
+
* `CONFIG_FILE_PRESENT` otherwise, as `motion.animations_from`'s. Its shape is
|
|
1583
|
+
* the requirements reader's (`src/requirements.ts`), which `build` runs on it
|
|
1584
|
+
* before assemble, as on the flag's file.
|
|
1585
|
+
*/
|
|
1586
|
+
function checkRequirementsFile(c: Check, file: string): void {
|
|
1587
|
+
if (existsSync(file) && statSync(file).isFile()) return;
|
|
1588
|
+
c.fail('CONFIG_FILE_PRESENT', 'config.requirements', `names ${file}, which is no such file; a ${REQUIREMENTS_SPEC} file, its path relative to the config's directory, is required`);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1571
1591
|
/**
|
|
1572
1592
|
* Read the file `motion.animations_from` names (issue #183) and vouch for what
|
|
1573
1593
|
* merging its animations beside the idle needs, every problem collected in `c`:
|
package/src/parts.ts
CHANGED
|
@@ -152,11 +152,21 @@ export interface CapRecord {
|
|
|
152
152
|
/** Issue #359: with `image_px`, the hidden-art layer the cap's image came from (`<run>:<layer>:hidden`), when it came from one rather than the config's cap file. */
|
|
153
153
|
image_layer?: string;
|
|
154
154
|
missing_px: number;
|
|
155
|
+
/**
|
|
156
|
+
* Issue #557, written only when `missing_px` is above 0: the missing pixels
|
|
157
|
+
* — the disc's on the upper side of the cut that no layer of the limb gives
|
|
158
|
+
* — by side of the limb's axis at the joint line, `left` where a pixel
|
|
159
|
+
* centre's offset across the axis (`jointOffsets` in `src/limbs.ts`) is 0 or
|
|
160
|
+
* above (the side toward smaller x when the limb hangs down the rig) and
|
|
161
|
+
* `right` the other; the two add up to `missing_px`. A full cap writes no key.
|
|
162
|
+
*/
|
|
163
|
+
short_px?: { left: number; right: number };
|
|
155
164
|
/**
|
|
156
165
|
* Issue #360, written only under the segment's `cap_shape: "disc"`: the
|
|
157
166
|
* shape; the cap's pixels taken from the upper segment's art where the
|
|
158
167
|
* lower's layer had none (`upper_px`). `radius` is then the half-width about the
|
|
159
|
-
* joint, at most half of `width`.
|
|
168
|
+
* joint, at most half of `width`. Issue #557: without the shape the half-disc
|
|
169
|
+
* takes them too, and `upper_px` is written there only when above 0.
|
|
160
170
|
*/
|
|
161
171
|
shape?: 'disc';
|
|
162
172
|
upper_px?: number;
|
|
@@ -197,6 +207,7 @@ const CAP_KEYS = [
|
|
|
197
207
|
'image_px',
|
|
198
208
|
'image_layer',
|
|
199
209
|
'missing_px',
|
|
210
|
+
'short_px',
|
|
200
211
|
'shape',
|
|
201
212
|
'upper_px',
|
|
202
213
|
'edge',
|
|
@@ -609,7 +620,9 @@ function checkParts(raw: unknown, path: string): PartsFile {
|
|
|
609
620
|
(!('image_px' in co) || isCount(co.image_px)) &&
|
|
610
621
|
(!('image_layer' in co) || ('image_px' in co && typeof co.image_layer === 'string' && co.image_layer !== '')) &&
|
|
611
622
|
// Issue #360: a disc cap carries its count, a feathered edge its band and count, and neither carries them alone.
|
|
612
|
-
('shape' in co ? co.shape === 'disc' && isCount(co.upper_px) : !('upper_px' in co)) &&
|
|
623
|
+
('shape' in co ? co.shape === 'disc' && isCount(co.upper_px) : !('upper_px' in co) || (isCount(co.upper_px) && co.upper_px > 0)) &&
|
|
624
|
+
// Issue #557: the shortfall by side, when written, adds up to the missing pixels, and is never written for none.
|
|
625
|
+
(!('short_px' in co) || shortSides(co.short_px, co.missing_px)) &&
|
|
613
626
|
('edge' in co ? co.edge === 'feather' && typeof co.feather_radius === 'number' && Number.isFinite(co.feather_radius) && co.feather_radius >= 0 && isCount(co.feathered_px) : !('feather_radius' in co) && !('feathered_px' in co)) &&
|
|
614
627
|
// Issue #360 (item 14): a placed cut carries its band, line and counts, the line inside the band; none of them rides alone.
|
|
615
628
|
('cut_band' in co
|
|
@@ -628,7 +641,7 @@ function checkParts(raw: unknown, path: string): PartsFile {
|
|
|
628
641
|
fail(
|
|
629
642
|
'PARTS_FIELD_TYPE',
|
|
630
643
|
`${object} "cap"`,
|
|
631
|
-
`is ${show(c)}; {at: [x, y], width, radius, box: [x, y, w, h], layer_px, image_px?, image_layer? (with image_px), missing_px, shape? ("disc", with upper_px), edge? ("feather", with feather_radius and feathered_px), cut_band? (with cut_offset inside the band, cut_at, cut_crossed at most joint_crossed, band_px, stroke_luma_max? 0..255)} is required`,
|
|
644
|
+
`is ${show(c)}; {at: [x, y], width, radius, box: [x, y, w, h], layer_px, image_px?, image_layer? (with image_px), missing_px, short_px? ({left, right}, adding up to missing_px, above 0), shape? ("disc", with upper_px; without it upper_px? above 0), edge? ("feather", with feather_radius and feathered_px), cut_band? (with cut_offset inside the band, cut_at, cut_crossed at most joint_crossed, band_px, stroke_luma_max? 0..255)} is required`,
|
|
632
645
|
);
|
|
633
646
|
}
|
|
634
647
|
}
|
|
@@ -659,6 +672,12 @@ function checkParts(raw: unknown, path: string): PartsFile {
|
|
|
659
672
|
}
|
|
660
673
|
|
|
661
674
|
const isCount = (v: unknown): v is number => Number.isInteger(v) && (v as number) >= 0;
|
|
675
|
+
/** Issue #557: a cap's `short_px` — `{left, right}`, two counts and no other key, adding up to `missing`, above 0. */
|
|
676
|
+
function shortSides(v: unknown, missing: unknown): boolean {
|
|
677
|
+
if (typeof v !== 'object' || v === null || Array.isArray(v)) return false;
|
|
678
|
+
const o = v as Record<string, unknown>;
|
|
679
|
+
return Object.keys(o).sort().join(',') === 'left,right' && isCount(o.left) && isCount(o.right) && o.left + o.right === missing && o.left + o.right > 0;
|
|
680
|
+
}
|
|
662
681
|
|
|
663
682
|
/**
|
|
664
683
|
* The `single_run_pad` block (issue #366): every key known and present, each
|