@domandigital/craft 0.24.2 → 0.25.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/CHANGELOG.md +12 -0
- package/README.md +11 -0
- package/art-direction.schema.json +41 -0
- package/dist/{chunk-WNEB6XC3.js → chunk-54ECV5RI.js} +1 -1
- package/dist/{chunk-2L5EHB4T.js → chunk-AG5KWCDT.js} +2 -2
- package/dist/{chunk-ULKNMH7J.js → chunk-GZQG76PU.js} +3 -3
- package/dist/{chunk-UQ5M2VOR.js → chunk-O5O4P5TL.js} +18 -7
- package/dist/{chunk-UJOPE6BR.js → chunk-ONNB34GE.js} +10 -10
- package/dist/{chunk-XSKLVEI6.js → chunk-XWQICMXA.js} +2 -1
- package/dist/{cli-GFXSHG4E.js → cli-63ZRSUPR.js} +2 -2
- package/dist/{cli-WKX6J56Y.js → cli-GQ5MEXZL.js} +5 -5
- package/dist/{cli-PRCDIFCV.js → cli-IAK6547B.js} +3 -3
- package/dist/{cli-2FZS3P6P.js → cli-MUKUPURX.js} +4 -4
- package/dist/{cli-E27L6BTE.js → cli-NJD226N3.js} +2 -2
- package/dist/{cli-IWLNAH53.js → cli-WIWWPNBM.js} +2 -2
- package/dist/{cli-DGF7WWX4.js → cli-YLMEHBMN.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/index.cjs +18 -7
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +18 -7
- package/dist/phone.cjs +16 -1
- package/dist/phone.d.cts +10 -3
- package/dist/phone.d.ts +10 -3
- package/dist/phone.js +16 -1
- package/dist/{viewports-cli-5UMLK7I7.js → viewports-cli-VC4PK4GX.js} +15 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @domandigital/craft
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c31349e: The phone measure and the every-viewport sweep fail a sideways row (a carousel, a strip of chips or cards) that also scrolls up and down: `rowscroll`. Setting `overflow-x: auto` turns a visible `overflow-y` into `auto`, so a row whose items are a few pixels taller than the row takes the thumb's vertical swipe instead of the page.
|
|
8
|
+
|
|
9
|
+
## 0.24.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 30eb1c2: Allow an explicitly recorded founder-reviewed hypothesis as a provisional job basis. Require a named reviewer, dated decision, founder source and untested limitations. Keep customer evidence warnings visible and all other direction checks active.
|
|
14
|
+
|
|
3
15
|
## 0.24.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -455,3 +455,14 @@ explicitly marked publication assets while reporting `publicationReady: false`.
|
|
|
455
455
|
See CHARACTER.md, “Context and learning from a later result”.
|
|
456
456
|
|
|
457
457
|
Opening photographs are selected as a rendered sequence: compare their quality and crop before filling a slide count or covering every service. See [Select photographs for their position in the sequence](./CHARACTER.md#select-photographs-for-their-position-in-the-sequence) for the follow-up on one client's opening photographs and its limits.
|
|
458
|
+
|
|
459
|
+
### Explicitly accepted provisional jobs
|
|
460
|
+
|
|
461
|
+
When a human reviewer authorises proceeding without direct customer research,
|
|
462
|
+
`job.evidenceBasis` can record `kind: "founder-reviewed-hypothesis"`, `reviewer`,
|
|
463
|
+
`acceptedAt` (YYYY-MM-DD), a substantive `decision`, a founder `source` ID and
|
|
464
|
+
non-empty `limitations`. The caller must obtain and record that decision; this
|
|
465
|
+
field is not an automatic permission mechanism. The job remains provisional and
|
|
466
|
+
validation always reports its untested limitations. Default customer-voice
|
|
467
|
+
requirements remain unchanged, and source, reason, hierarchy and visual checks
|
|
468
|
+
still apply. Leave `language` empty when there are no actual customer quotes.
|
|
@@ -106,6 +106,47 @@
|
|
|
106
106
|
"items": {
|
|
107
107
|
"type": "string"
|
|
108
108
|
}
|
|
109
|
+
},
|
|
110
|
+
"evidenceBasis": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": [
|
|
114
|
+
"kind",
|
|
115
|
+
"reviewer",
|
|
116
|
+
"acceptedAt",
|
|
117
|
+
"decision",
|
|
118
|
+
"source",
|
|
119
|
+
"limitations"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"kind": {
|
|
123
|
+
"const": "founder-reviewed-hypothesis"
|
|
124
|
+
},
|
|
125
|
+
"reviewer": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 1
|
|
128
|
+
},
|
|
129
|
+
"acceptedAt": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
132
|
+
},
|
|
133
|
+
"decision": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1
|
|
136
|
+
},
|
|
137
|
+
"source": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1
|
|
140
|
+
},
|
|
141
|
+
"limitations": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"minItems": 1,
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
109
150
|
}
|
|
110
151
|
},
|
|
111
152
|
"additionalProperties": false,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
describeTypicality,
|
|
7
7
|
loadNull
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-54ECV5RI.js";
|
|
9
9
|
import {
|
|
10
10
|
SOURCE_FILE,
|
|
11
11
|
finish,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
parseFlags,
|
|
15
15
|
prepareReport,
|
|
16
16
|
readPaths
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ONNB34GE.js";
|
|
18
18
|
import {
|
|
19
19
|
toJson
|
|
20
20
|
} from "./chunk-QIEDBL4J.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
formatDirectionMatches,
|
|
5
5
|
summariseDirection,
|
|
6
6
|
validateDirection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-O5O4P5TL.js";
|
|
8
8
|
import {
|
|
9
9
|
loadNull
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-54ECV5RI.js";
|
|
11
11
|
import {
|
|
12
12
|
parseFlags
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ONNB34GE.js";
|
|
14
14
|
import {
|
|
15
15
|
toJson
|
|
16
16
|
} from "./chunk-QIEDBL4J.js";
|
|
@@ -565,7 +565,18 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
565
565
|
return { problems, decided: false };
|
|
566
566
|
}
|
|
567
567
|
const j = job;
|
|
568
|
-
const
|
|
568
|
+
const sourcesById = new Map(sources.map((s) => [s.id, s]));
|
|
569
|
+
let provisional = false;
|
|
570
|
+
if (j.evidenceBasis !== void 0) {
|
|
571
|
+
const b = j.evidenceBasis;
|
|
572
|
+
const decisionSource = b && typeof b === "object" ? sourcesById.get(b.source) : void 0;
|
|
573
|
+
if (!b || b.kind !== "founder-reviewed-hypothesis" || typeof b.reviewer !== "string" || !b.reviewer.trim() || typeof b.acceptedAt !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(b.acceptedAt) || !Number.isFinite(Date.parse(b.acceptedAt)) || typeof b.decision !== "string" || words(b.decision).length < 8 || !decisionSource || decisionSource.kind !== "founder" || !Array.isArray(b.limitations) || !b.limitations.length || b.limitations.some((x) => typeof x !== "string" || words(x).length < 3)) {
|
|
574
|
+
err(".evidenceBasis", "a provisional job needs a named reviewer, dated decision, founder source and explicit untested limitations");
|
|
575
|
+
} else {
|
|
576
|
+
provisional = true;
|
|
577
|
+
warn(".evidenceBasis", `Provisional hypotheses accepted by ${b.reviewer} on ${b.acceptedAt}; customer research remains untested: ${b.limitations.join("; ")}`);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
569
580
|
const st = j.statement;
|
|
570
581
|
if (!st || typeof st !== "object") err(".statement", "a job statement is verb, object and context");
|
|
571
582
|
else {
|
|
@@ -585,13 +596,13 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
585
596
|
continue;
|
|
586
597
|
}
|
|
587
598
|
if (typeof p.value !== "string" || words(p.value).length < 6) err(`.${part}.value`, "a sentence: what they need, in the terms they would use");
|
|
588
|
-
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
599
|
+
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: provisional ? "source" : "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
589
600
|
}
|
|
590
601
|
const c = j.consideration;
|
|
591
602
|
if (!c || typeof c !== "object") err(".consideration", `how long and how carefully they decide: ${CONSIDERATION.join(", ")}`);
|
|
592
603
|
else {
|
|
593
604
|
if (!CONSIDERATION.includes(c.value)) err(".consideration.value", `one of ${CONSIDERATION.join(", ")}`);
|
|
594
|
-
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: "customer" }));
|
|
605
|
+
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: provisional ? "source" : "customer" }));
|
|
595
606
|
}
|
|
596
607
|
const objections = Array.isArray(j.objections) ? j.objections : [];
|
|
597
608
|
if (objections.length === 0) err(".objections", "what stops them: the worries they bring to the page");
|
|
@@ -599,11 +610,11 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
599
610
|
if (typeof o !== "string" || words(o).length < 3) err(`.objections[${i}]`, "an objection is a few words: what they worry about");
|
|
600
611
|
});
|
|
601
612
|
const evidence = Array.isArray(j.evidence) ? j.evidence : [];
|
|
602
|
-
const voice = evidence.map((id) =>
|
|
603
|
-
if (evidence.length === 0 || voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
604
|
-
for (const id of evidence) if (!
|
|
613
|
+
const voice = evidence.map((id) => sourcesById.get(id)).filter(isCustomerVoice);
|
|
614
|
+
if (evidence.length === 0 || !provisional && voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
615
|
+
for (const id of evidence) if (!sourcesById.has(id)) err(".evidence", `no source called "${id}"`);
|
|
605
616
|
const language = Array.isArray(j.language) ? j.language : [];
|
|
606
|
-
if (language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
617
|
+
if (!provisional && language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
607
618
|
const texts = voice.map((s) => normalise(`${s.note} ${ctx.readSource?.(s) ?? ""}`));
|
|
608
619
|
language.forEach((q, i) => {
|
|
609
620
|
if (typeof q !== "string" || !q.trim()) return err(`.language[${i}]`, "an empty quote");
|
|
@@ -633,7 +633,7 @@ async function briefFor(flags, cwd) {
|
|
|
633
633
|
if (typeof brief === "string" && brief.trim()) return brief;
|
|
634
634
|
} else if (flags.direction) throw new Error(`no such file: ${flags.direction}`);
|
|
635
635
|
if (flags.null) {
|
|
636
|
-
const { loadNull } = await import("./cli-
|
|
636
|
+
const { loadNull } = await import("./cli-NJD226N3.js");
|
|
637
637
|
return loadNull(flags.null, cwd).brief;
|
|
638
638
|
}
|
|
639
639
|
return void 0;
|
|
@@ -659,37 +659,37 @@ async function compareWithCompetitor(flags, io) {
|
|
|
659
659
|
function run(argv, io) {
|
|
660
660
|
const [command, ...rest] = argv;
|
|
661
661
|
if (command === "direction") {
|
|
662
|
-
return import("./cli-
|
|
662
|
+
return import("./cli-63ZRSUPR.js").then((m) => m.runDirection(rest, io));
|
|
663
663
|
}
|
|
664
664
|
if (command === "report" || command === "retrofit") {
|
|
665
|
-
return import("./cli-
|
|
665
|
+
return import("./cli-GQ5MEXZL.js").then((m) => m.runReport(command, rest, io));
|
|
666
666
|
}
|
|
667
667
|
if (command === "register") {
|
|
668
668
|
return import("./cli-TDTCURZS.js").then((m) => m.runRegister(rest, io));
|
|
669
669
|
}
|
|
670
670
|
if (command === "estate") {
|
|
671
|
-
return import("./cli-
|
|
671
|
+
return import("./cli-MUKUPURX.js").then((m) => m.runEstate(rest, io));
|
|
672
672
|
}
|
|
673
673
|
if (command === "null") {
|
|
674
|
-
return import("./cli-
|
|
674
|
+
return import("./cli-NJD226N3.js").then((m) => m.runNull(rest, io));
|
|
675
675
|
}
|
|
676
676
|
if (command === "calibrate") {
|
|
677
|
-
return import("./cli-
|
|
677
|
+
return import("./cli-YLMEHBMN.js").then((m) => m.runCalibrate(rest, io));
|
|
678
678
|
}
|
|
679
679
|
if (command === "tells" && rest[0] === "harvest") {
|
|
680
|
-
return import("./cli-
|
|
680
|
+
return import("./cli-NJD226N3.js").then((m) => m.runHarvest(rest, io)).catch((error) => {
|
|
681
681
|
io.err(`craft: ${error.message}`);
|
|
682
682
|
return 2;
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
if (command === "phone-first") {
|
|
686
|
-
return import("./cli-
|
|
686
|
+
return import("./cli-WIWWPNBM.js").then((m) => m.runPhoneFirst(rest, io));
|
|
687
687
|
}
|
|
688
688
|
if (command === "viewports") {
|
|
689
|
-
return import("./viewports-cli-
|
|
689
|
+
return import("./viewports-cli-VC4PK4GX.js").then((m) => m.runViewports(rest, io));
|
|
690
690
|
}
|
|
691
691
|
if (command === "snapshot" || command === "audit") {
|
|
692
|
-
return import("./cli-
|
|
692
|
+
return import("./cli-IAK6547B.js").then((m) => m.runAudit(command, rest, io));
|
|
693
693
|
}
|
|
694
694
|
if (!command || command === "help" || command === "--help" || command === "-h") {
|
|
695
695
|
io.out(HELP);
|
|
@@ -148,7 +148,8 @@ var LABEL = {
|
|
|
148
148
|
autocomplete: "field the phone cannot fill in",
|
|
149
149
|
tel: "phone number is not a link",
|
|
150
150
|
linelength: "line too long",
|
|
151
|
-
screens: "page too long for a phone"
|
|
151
|
+
screens: "page too long for a phone",
|
|
152
|
+
rowscroll: "sideways row scrolls up and down"
|
|
152
153
|
};
|
|
153
154
|
function writeBaseline(findings, routes, note, previous) {
|
|
154
155
|
const byFile = tally(findings, (f) => f.file);
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
checkReason,
|
|
20
20
|
researchPrompt,
|
|
21
21
|
validateDirection
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O5O4P5TL.js";
|
|
23
23
|
import {
|
|
24
24
|
parseFlags
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ONNB34GE.js";
|
|
26
26
|
import {
|
|
27
27
|
toJson
|
|
28
28
|
} from "./chunk-QIEDBL4J.js";
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
} from "./chunk-OKVHWXYV.js";
|
|
4
4
|
import {
|
|
5
5
|
merge
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AG5KWCDT.js";
|
|
7
7
|
import "./chunk-5UFG75N4.js";
|
|
8
8
|
import "./chunk-JYNXGCYZ.js";
|
|
9
9
|
import {
|
|
10
10
|
SIBLING_AT,
|
|
11
11
|
compareToEstate,
|
|
12
12
|
loadEstate
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GZQG76PU.js";
|
|
14
14
|
import {
|
|
15
15
|
PAGE_TYPES,
|
|
16
16
|
validateDirection
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-O5O4P5TL.js";
|
|
18
18
|
import {
|
|
19
19
|
loadNull
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-54ECV5RI.js";
|
|
21
21
|
import "./chunk-OQXTQQAU.js";
|
|
22
22
|
import {
|
|
23
23
|
COPY_FILE,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
loadExceptions,
|
|
29
29
|
parseFlags,
|
|
30
30
|
readPaths
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ONNB34GE.js";
|
|
32
32
|
import {
|
|
33
33
|
toJson
|
|
34
34
|
} from "./chunk-QIEDBL4J.js";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
merge,
|
|
5
5
|
resolvePages,
|
|
6
6
|
runAudit
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AG5KWCDT.js";
|
|
8
8
|
import "./chunk-5UFG75N4.js";
|
|
9
9
|
import "./chunk-JYNXGCYZ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-54ECV5RI.js";
|
|
11
11
|
import "./chunk-OQXTQQAU.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ONNB34GE.js";
|
|
13
13
|
import "./chunk-QIEDBL4J.js";
|
|
14
14
|
import "./chunk-WUACK2HX.js";
|
|
15
15
|
import "./chunk-LYQKEC7Q.js";
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
formatPairs,
|
|
5
5
|
loadEstate,
|
|
6
6
|
runEstate
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-GZQG76PU.js";
|
|
8
|
+
import "./chunk-O5O4P5TL.js";
|
|
9
|
+
import "./chunk-54ECV5RI.js";
|
|
10
10
|
import "./chunk-OQXTQQAU.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ONNB34GE.js";
|
|
12
12
|
import "./chunk-QIEDBL4J.js";
|
|
13
13
|
import "./chunk-WUACK2HX.js";
|
|
14
14
|
import "./chunk-LYQKEC7Q.js";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
runHarvest,
|
|
10
10
|
runNull,
|
|
11
11
|
serveDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-54ECV5RI.js";
|
|
13
13
|
import "./chunk-OQXTQQAU.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ONNB34GE.js";
|
|
15
15
|
import "./chunk-QIEDBL4J.js";
|
|
16
16
|
import "./chunk-WUACK2HX.js";
|
|
17
17
|
import "./chunk-LYQKEC7Q.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
routesFromPages,
|
|
13
13
|
scanPhoneFirst,
|
|
14
14
|
writeBaseline
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XWQICMXA.js";
|
|
16
16
|
import {
|
|
17
17
|
SOURCE_FILE,
|
|
18
18
|
readPaths
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ONNB34GE.js";
|
|
20
20
|
import {
|
|
21
21
|
toJson
|
|
22
22
|
} from "./chunk-QIEDBL4J.js";
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
expandNullTargets,
|
|
6
6
|
loadNull
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-54ECV5RI.js";
|
|
8
8
|
import "./chunk-OQXTQQAU.js";
|
|
9
9
|
import {
|
|
10
10
|
parseFlags
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ONNB34GE.js";
|
|
12
12
|
import {
|
|
13
13
|
toJson
|
|
14
14
|
} from "./chunk-QIEDBL4J.js";
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -9252,7 +9252,18 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
9252
9252
|
return { problems, decided: false };
|
|
9253
9253
|
}
|
|
9254
9254
|
const j = job;
|
|
9255
|
-
const
|
|
9255
|
+
const sourcesById = new Map(sources.map((s) => [s.id, s]));
|
|
9256
|
+
let provisional = false;
|
|
9257
|
+
if (j.evidenceBasis !== void 0) {
|
|
9258
|
+
const b = j.evidenceBasis;
|
|
9259
|
+
const decisionSource = b && typeof b === "object" ? sourcesById.get(b.source) : void 0;
|
|
9260
|
+
if (!b || b.kind !== "founder-reviewed-hypothesis" || typeof b.reviewer !== "string" || !b.reviewer.trim() || typeof b.acceptedAt !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(b.acceptedAt) || !Number.isFinite(Date.parse(b.acceptedAt)) || typeof b.decision !== "string" || words2(b.decision).length < 8 || !decisionSource || decisionSource.kind !== "founder" || !Array.isArray(b.limitations) || !b.limitations.length || b.limitations.some((x) => typeof x !== "string" || words2(x).length < 3)) {
|
|
9261
|
+
err(".evidenceBasis", "a provisional job needs a named reviewer, dated decision, founder source and explicit untested limitations");
|
|
9262
|
+
} else {
|
|
9263
|
+
provisional = true;
|
|
9264
|
+
warn(".evidenceBasis", `Provisional hypotheses accepted by ${b.reviewer} on ${b.acceptedAt}; customer research remains untested: ${b.limitations.join("; ")}`);
|
|
9265
|
+
}
|
|
9266
|
+
}
|
|
9256
9267
|
const st = j.statement;
|
|
9257
9268
|
if (!st || typeof st !== "object") err(".statement", "a job statement is verb, object and context");
|
|
9258
9269
|
else {
|
|
@@ -9272,13 +9283,13 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
9272
9283
|
continue;
|
|
9273
9284
|
}
|
|
9274
9285
|
if (typeof p.value !== "string" || words2(p.value).length < 6) err(`.${part}.value`, "a sentence: what they need, in the terms they would use");
|
|
9275
|
-
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
9286
|
+
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: provisional ? "source" : "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
9276
9287
|
}
|
|
9277
9288
|
const c = j.consideration;
|
|
9278
9289
|
if (!c || typeof c !== "object") err(".consideration", `how long and how carefully they decide: ${CONSIDERATION.join(", ")}`);
|
|
9279
9290
|
else {
|
|
9280
9291
|
if (!CONSIDERATION.includes(c.value)) err(".consideration.value", `one of ${CONSIDERATION.join(", ")}`);
|
|
9281
|
-
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: "customer" }));
|
|
9292
|
+
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: provisional ? "source" : "customer" }));
|
|
9282
9293
|
}
|
|
9283
9294
|
const objections = Array.isArray(j.objections) ? j.objections : [];
|
|
9284
9295
|
if (objections.length === 0) err(".objections", "what stops them: the worries they bring to the page");
|
|
@@ -9286,11 +9297,11 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
9286
9297
|
if (typeof o !== "string" || words2(o).length < 3) err(`.objections[${i}]`, "an objection is a few words: what they worry about");
|
|
9287
9298
|
});
|
|
9288
9299
|
const evidence = Array.isArray(j.evidence) ? j.evidence : [];
|
|
9289
|
-
const voice = evidence.map((id) =>
|
|
9290
|
-
if (evidence.length === 0 || voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
9291
|
-
for (const id of evidence) if (!
|
|
9300
|
+
const voice = evidence.map((id) => sourcesById.get(id)).filter(isCustomerVoice);
|
|
9301
|
+
if (evidence.length === 0 || !provisional && voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
9302
|
+
for (const id of evidence) if (!sourcesById.has(id)) err(".evidence", `no source called "${id}"`);
|
|
9292
9303
|
const language = Array.isArray(j.language) ? j.language : [];
|
|
9293
|
-
if (language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
9304
|
+
if (!provisional && language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
9294
9305
|
const texts = voice.map((s) => normalise2(`${s.note} ${ctx.readSource?.(s) ?? ""}`));
|
|
9295
9306
|
language.forEach((q, i) => {
|
|
9296
9307
|
if (typeof q !== "string" || !q.trim()) return err(`.language[${i}]`, "an empty quote");
|
package/dist/index.d.cts
CHANGED
|
@@ -2482,6 +2482,15 @@ type Consideration = (typeof CONSIDERATION)[number];
|
|
|
2482
2482
|
* trade do" as the starting point.
|
|
2483
2483
|
*/
|
|
2484
2484
|
interface JobMap {
|
|
2485
|
+
/** Explicit human acceptance of provisional hypotheses; never customer validation. */
|
|
2486
|
+
evidenceBasis?: {
|
|
2487
|
+
kind: "founder-reviewed-hypothesis";
|
|
2488
|
+
reviewer: string;
|
|
2489
|
+
acceptedAt: string;
|
|
2490
|
+
decision: string;
|
|
2491
|
+
source: string;
|
|
2492
|
+
limitations: string[];
|
|
2493
|
+
};
|
|
2485
2494
|
/** Verb + object + context: "find" / "an electrician they can trust with a dangerous fault" / "today, without being overcharged". */
|
|
2486
2495
|
statement: {
|
|
2487
2496
|
verb: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2482,6 +2482,15 @@ type Consideration = (typeof CONSIDERATION)[number];
|
|
|
2482
2482
|
* trade do" as the starting point.
|
|
2483
2483
|
*/
|
|
2484
2484
|
interface JobMap {
|
|
2485
|
+
/** Explicit human acceptance of provisional hypotheses; never customer validation. */
|
|
2486
|
+
evidenceBasis?: {
|
|
2487
|
+
kind: "founder-reviewed-hypothesis";
|
|
2488
|
+
reviewer: string;
|
|
2489
|
+
acceptedAt: string;
|
|
2490
|
+
decision: string;
|
|
2491
|
+
source: string;
|
|
2492
|
+
limitations: string[];
|
|
2493
|
+
};
|
|
2485
2494
|
/** Verb + object + context: "find" / "an electrician they can trust with a dangerous fault" / "today, without being overcharged". */
|
|
2486
2495
|
statement: {
|
|
2487
2496
|
verb: string;
|
package/dist/index.js
CHANGED
|
@@ -8933,7 +8933,18 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
8933
8933
|
return { problems, decided: false };
|
|
8934
8934
|
}
|
|
8935
8935
|
const j = job;
|
|
8936
|
-
const
|
|
8936
|
+
const sourcesById = new Map(sources.map((s) => [s.id, s]));
|
|
8937
|
+
let provisional = false;
|
|
8938
|
+
if (j.evidenceBasis !== void 0) {
|
|
8939
|
+
const b = j.evidenceBasis;
|
|
8940
|
+
const decisionSource = b && typeof b === "object" ? sourcesById.get(b.source) : void 0;
|
|
8941
|
+
if (!b || b.kind !== "founder-reviewed-hypothesis" || typeof b.reviewer !== "string" || !b.reviewer.trim() || typeof b.acceptedAt !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(b.acceptedAt) || !Number.isFinite(Date.parse(b.acceptedAt)) || typeof b.decision !== "string" || words2(b.decision).length < 8 || !decisionSource || decisionSource.kind !== "founder" || !Array.isArray(b.limitations) || !b.limitations.length || b.limitations.some((x) => typeof x !== "string" || words2(x).length < 3)) {
|
|
8942
|
+
err(".evidenceBasis", "a provisional job needs a named reviewer, dated decision, founder source and explicit untested limitations");
|
|
8943
|
+
} else {
|
|
8944
|
+
provisional = true;
|
|
8945
|
+
warn(".evidenceBasis", `Provisional hypotheses accepted by ${b.reviewer} on ${b.acceptedAt}; customer research remains untested: ${b.limitations.join("; ")}`);
|
|
8946
|
+
}
|
|
8947
|
+
}
|
|
8937
8948
|
const st = j.statement;
|
|
8938
8949
|
if (!st || typeof st !== "object") err(".statement", "a job statement is verb, object and context");
|
|
8939
8950
|
else {
|
|
@@ -8953,13 +8964,13 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
8953
8964
|
continue;
|
|
8954
8965
|
}
|
|
8955
8966
|
if (typeof p.value !== "string" || words2(p.value).length < 6) err(`.${part}.value`, "a sentence: what they need, in the terms they would use");
|
|
8956
|
-
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
8967
|
+
else problems.push(...checkReason({ at: `job.${part}`, because: p.value, evidence: p.evidence, sources, tie: provisional ? "source" : "customer" }).map((x) => ({ ...x, at: x.at.replace(/\.because$/, ".value") })));
|
|
8957
8968
|
}
|
|
8958
8969
|
const c = j.consideration;
|
|
8959
8970
|
if (!c || typeof c !== "object") err(".consideration", `how long and how carefully they decide: ${CONSIDERATION.join(", ")}`);
|
|
8960
8971
|
else {
|
|
8961
8972
|
if (!CONSIDERATION.includes(c.value)) err(".consideration.value", `one of ${CONSIDERATION.join(", ")}`);
|
|
8962
|
-
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: "customer" }));
|
|
8973
|
+
problems.push(...checkReason({ at: "job.consideration", because: c.because, evidence: c.evidence, sources, tie: provisional ? "source" : "customer" }));
|
|
8963
8974
|
}
|
|
8964
8975
|
const objections = Array.isArray(j.objections) ? j.objections : [];
|
|
8965
8976
|
if (objections.length === 0) err(".objections", "what stops them: the worries they bring to the page");
|
|
@@ -8967,11 +8978,11 @@ function validateJob(job, sources, ctx = {}) {
|
|
|
8967
8978
|
if (typeof o !== "string" || words2(o).length < 3) err(`.objections[${i}]`, "an objection is a few words: what they worry about");
|
|
8968
8979
|
});
|
|
8969
8980
|
const evidence = Array.isArray(j.evidence) ? j.evidence : [];
|
|
8970
|
-
const voice = evidence.map((id) =>
|
|
8971
|
-
if (evidence.length === 0 || voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
8972
|
-
for (const id of evidence) if (!
|
|
8981
|
+
const voice = evidence.map((id) => sourcesById.get(id)).filter(isCustomerVoice);
|
|
8982
|
+
if (evidence.length === 0 || !provisional && voice.length === 0) err(".evidence", "cite the reviews, enquiries or conversations the job comes from");
|
|
8983
|
+
for (const id of evidence) if (!sourcesById.has(id)) err(".evidence", `no source called "${id}"`);
|
|
8973
8984
|
const language = Array.isArray(j.language) ? j.language : [];
|
|
8974
|
-
if (language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
8985
|
+
if (!provisional && language.length === 0) err(".language", "quote the customer: the words they use for the problem");
|
|
8975
8986
|
const texts = voice.map((s) => normalise2(`${s.note} ${ctx.readSource?.(s) ?? ""}`));
|
|
8976
8987
|
language.forEach((q, i) => {
|
|
8977
8988
|
if (typeof q !== "string" || !q.trim()) return err(`.language[${i}]`, "an empty quote");
|
package/dist/phone.cjs
CHANGED
|
@@ -105,6 +105,13 @@ function measurePhoneInPage(floors) {
|
|
|
105
105
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
106
106
|
out.push({ check: "scroll", element: "<html>", detail: `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}` });
|
|
107
107
|
}
|
|
108
|
+
for (const e of on("rowscroll") ? Array.from(document.body.querySelectorAll("*")) : []) {
|
|
109
|
+
if (!shown(e) || quiet(e)) continue;
|
|
110
|
+
const s = getComputedStyle(e);
|
|
111
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
112
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
113
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) out.push({ check: "rowscroll", element: describe(e), detail: `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows` });
|
|
114
|
+
}
|
|
108
115
|
const inline = (e) => {
|
|
109
116
|
if (e.tagName !== "A" || getComputedStyle(e).display !== "inline") return false;
|
|
110
117
|
const block = e.parentElement?.closest("p, li, dd, td, th, blockquote, figcaption, address");
|
|
@@ -281,6 +288,13 @@ function measureViewportInPage(arg) {
|
|
|
281
288
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
282
289
|
add("scroll", "<html>", `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}`);
|
|
283
290
|
}
|
|
291
|
+
for (const e of Array.from(document.body.querySelectorAll("*"))) {
|
|
292
|
+
if (!shown(e) || hiddenByMarkup(e)) continue;
|
|
293
|
+
const s = getComputedStyle(e);
|
|
294
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
295
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
296
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) add("rowscroll", describe(e), `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows`);
|
|
297
|
+
}
|
|
284
298
|
const boxes = textBoxes().sort((a, b) => a.t - b.t);
|
|
285
299
|
const seen = /* @__PURE__ */ new Set();
|
|
286
300
|
for (let i = 0; i < boxes.length && seen.size < 15; i++) {
|
|
@@ -584,7 +598,8 @@ var LABEL = {
|
|
|
584
598
|
autocomplete: "field the phone cannot fill in",
|
|
585
599
|
tel: "phone number is not a link",
|
|
586
600
|
linelength: "line too long",
|
|
587
|
-
screens: "page too long for a phone"
|
|
601
|
+
screens: "page too long for a phone",
|
|
602
|
+
rowscroll: "sideways row scrolls up and down"
|
|
588
603
|
};
|
|
589
604
|
function writeBaseline(findings, routes, note, previous) {
|
|
590
605
|
const byFile = tally(findings, (f) => f.file);
|
package/dist/phone.d.cts
CHANGED
|
@@ -28,7 +28,13 @@ interface PhoneFloors {
|
|
|
28
28
|
* What a measure can find. The first five are the 375px floors (DOM-775); the
|
|
29
29
|
* rest are the every-viewport and phone-optimisation checks (DOM-787).
|
|
30
30
|
*/
|
|
31
|
-
type PhoneCheck = "scroll" | "target" | "field" | "text" | "title" | "overlap" | "action" | "layers" | "landscape" | "image" | "input" | "autocomplete" | "tel" | "linelength" | "screens";
|
|
31
|
+
type PhoneCheck = "scroll" | "target" | "field" | "text" | "title" | "overlap" | "action" | "layers" | "landscape" | "image" | "input" | "autocomplete" | "tel" | "linelength" | "screens" | "rowscroll";
|
|
32
|
+
/**
|
|
33
|
+
* A sideways row (a carousel, a strip of chips or cards) that also scrolls up and down. Setting overflow-x to auto
|
|
34
|
+
* makes a visible overflow-y compute to auto too, so a row whose items are a few pixels taller than the row (a focus
|
|
35
|
+
* ring, a shadow, a descender) takes the thumb's vertical swipe instead of the page (DOM-18589, the founder's ask of
|
|
36
|
+
* 23 November 2026). Self-contained, like the measures that call it, so it can be pasted into both.
|
|
37
|
+
*/
|
|
32
38
|
interface RawPhoneFinding {
|
|
33
39
|
check: PhoneCheck;
|
|
34
40
|
/** `<tag> "text"`: what a person looks for on the page. */
|
|
@@ -311,8 +317,9 @@ declare function mergeViewportFindings(perViewport: {
|
|
|
311
317
|
* page to settle and scrolled to the top; the function judges the page as it
|
|
312
318
|
* stands, for whichever groups of checks it is asked for:
|
|
313
319
|
*
|
|
314
|
-
* - `sweep`: at any width, the page does not scroll sideways, no
|
|
315
|
-
* sits on other visible text, and
|
|
320
|
+
* - `sweep`: at any width, the page does not scroll sideways, no sideways row
|
|
321
|
+
* also scrolls up and down, no visible text sits on other visible text, and
|
|
322
|
+
* no page title is cut off.
|
|
316
323
|
* - `optimise`: on the short phone (375 x 667), the main action is on the
|
|
317
324
|
* first screen or pinned, fixed and sticky layers leave the screen to the
|
|
318
325
|
* page, images are sized for the phone, fields use the right keyboard and
|
package/dist/phone.d.ts
CHANGED
|
@@ -28,7 +28,13 @@ interface PhoneFloors {
|
|
|
28
28
|
* What a measure can find. The first five are the 375px floors (DOM-775); the
|
|
29
29
|
* rest are the every-viewport and phone-optimisation checks (DOM-787).
|
|
30
30
|
*/
|
|
31
|
-
type PhoneCheck = "scroll" | "target" | "field" | "text" | "title" | "overlap" | "action" | "layers" | "landscape" | "image" | "input" | "autocomplete" | "tel" | "linelength" | "screens";
|
|
31
|
+
type PhoneCheck = "scroll" | "target" | "field" | "text" | "title" | "overlap" | "action" | "layers" | "landscape" | "image" | "input" | "autocomplete" | "tel" | "linelength" | "screens" | "rowscroll";
|
|
32
|
+
/**
|
|
33
|
+
* A sideways row (a carousel, a strip of chips or cards) that also scrolls up and down. Setting overflow-x to auto
|
|
34
|
+
* makes a visible overflow-y compute to auto too, so a row whose items are a few pixels taller than the row (a focus
|
|
35
|
+
* ring, a shadow, a descender) takes the thumb's vertical swipe instead of the page (DOM-18589, the founder's ask of
|
|
36
|
+
* 23 November 2026). Self-contained, like the measures that call it, so it can be pasted into both.
|
|
37
|
+
*/
|
|
32
38
|
interface RawPhoneFinding {
|
|
33
39
|
check: PhoneCheck;
|
|
34
40
|
/** `<tag> "text"`: what a person looks for on the page. */
|
|
@@ -311,8 +317,9 @@ declare function mergeViewportFindings(perViewport: {
|
|
|
311
317
|
* page to settle and scrolled to the top; the function judges the page as it
|
|
312
318
|
* stands, for whichever groups of checks it is asked for:
|
|
313
319
|
*
|
|
314
|
-
* - `sweep`: at any width, the page does not scroll sideways, no
|
|
315
|
-
* sits on other visible text, and
|
|
320
|
+
* - `sweep`: at any width, the page does not scroll sideways, no sideways row
|
|
321
|
+
* also scrolls up and down, no visible text sits on other visible text, and
|
|
322
|
+
* no page title is cut off.
|
|
316
323
|
* - `optimise`: on the short phone (375 x 667), the main action is on the
|
|
317
324
|
* first screen or pinned, fixed and sticky layers leave the screen to the
|
|
318
325
|
* page, images are sized for the phone, fields use the right keyboard and
|
package/dist/phone.js
CHANGED
|
@@ -40,6 +40,13 @@ function measurePhoneInPage(floors) {
|
|
|
40
40
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
41
41
|
out.push({ check: "scroll", element: "<html>", detail: `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}` });
|
|
42
42
|
}
|
|
43
|
+
for (const e of on("rowscroll") ? Array.from(document.body.querySelectorAll("*")) : []) {
|
|
44
|
+
if (!shown(e) || quiet(e)) continue;
|
|
45
|
+
const s = getComputedStyle(e);
|
|
46
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
47
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
48
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) out.push({ check: "rowscroll", element: describe(e), detail: `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows` });
|
|
49
|
+
}
|
|
43
50
|
const inline = (e) => {
|
|
44
51
|
if (e.tagName !== "A" || getComputedStyle(e).display !== "inline") return false;
|
|
45
52
|
const block = e.parentElement?.closest("p, li, dd, td, th, blockquote, figcaption, address");
|
|
@@ -216,6 +223,13 @@ function measureViewportInPage(arg) {
|
|
|
216
223
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
217
224
|
add("scroll", "<html>", `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}`);
|
|
218
225
|
}
|
|
226
|
+
for (const e of Array.from(document.body.querySelectorAll("*"))) {
|
|
227
|
+
if (!shown(e) || hiddenByMarkup(e)) continue;
|
|
228
|
+
const s = getComputedStyle(e);
|
|
229
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
230
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
231
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) add("rowscroll", describe(e), `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows`);
|
|
232
|
+
}
|
|
219
233
|
const boxes = textBoxes().sort((a, b) => a.t - b.t);
|
|
220
234
|
const seen = /* @__PURE__ */ new Set();
|
|
221
235
|
for (let i = 0; i < boxes.length && seen.size < 15; i++) {
|
|
@@ -519,7 +533,8 @@ var LABEL = {
|
|
|
519
533
|
autocomplete: "field the phone cannot fill in",
|
|
520
534
|
tel: "phone number is not a link",
|
|
521
535
|
linelength: "line too long",
|
|
522
|
-
screens: "page too long for a phone"
|
|
536
|
+
screens: "page too long for a phone",
|
|
537
|
+
rowscroll: "sideways row scrolls up and down"
|
|
523
538
|
};
|
|
524
539
|
function writeBaseline(findings, routes, note, previous) {
|
|
525
540
|
const byFile = tally(findings, (f) => f.file);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
screenBudgetFor,
|
|
14
14
|
sweepWidths,
|
|
15
15
|
writeBaseline
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XWQICMXA.js";
|
|
17
17
|
import {
|
|
18
18
|
loadPlaywright
|
|
19
19
|
} from "./chunk-5UFG75N4.js";
|
|
@@ -71,6 +71,13 @@ function measurePhoneInPage(floors) {
|
|
|
71
71
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
72
72
|
out.push({ check: "scroll", element: "<html>", detail: `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}` });
|
|
73
73
|
}
|
|
74
|
+
for (const e of on("rowscroll") ? Array.from(document.body.querySelectorAll("*")) : []) {
|
|
75
|
+
if (!shown(e) || quiet(e)) continue;
|
|
76
|
+
const s = getComputedStyle(e);
|
|
77
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
78
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
79
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) out.push({ check: "rowscroll", element: describe(e), detail: `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows` });
|
|
80
|
+
}
|
|
74
81
|
const inline = (e) => {
|
|
75
82
|
if (e.tagName !== "A" || getComputedStyle(e).display !== "inline") return false;
|
|
76
83
|
const block = e.parentElement?.closest("p, li, dd, td, th, blockquote, figcaption, address");
|
|
@@ -247,6 +254,13 @@ function measureViewportInPage(arg) {
|
|
|
247
254
|
const wide = Array.from(document.body.querySelectorAll("*")).filter((e) => shown(e) && e.getBoundingClientRect().right > vw + 1).filter((e, _, all) => !all.some((o) => o !== e && o.contains(e))).slice(0, 3).map(describe);
|
|
248
255
|
add("scroll", "<html>", `the page is ${document.documentElement.scrollWidth}px wide at ${vw}px${wide.length ? `; widest: ${wide.join(", ")}` : ""}`);
|
|
249
256
|
}
|
|
257
|
+
for (const e of Array.from(document.body.querySelectorAll("*"))) {
|
|
258
|
+
if (!shown(e) || hiddenByMarkup(e)) continue;
|
|
259
|
+
const s = getComputedStyle(e);
|
|
260
|
+
const sideways = ["auto", "scroll"].includes(s.overflowX) && e.scrollWidth > e.clientWidth + 1;
|
|
261
|
+
const spare = e.scrollHeight - e.clientHeight;
|
|
262
|
+
if (sideways && ["auto", "scroll"].includes(s.overflowY) && spare > 1) add("rowscroll", describe(e), `a sideways row that also scrolls ${spare}px up and down. Set overflow-y: hidden (or clip) on it, and pad the row for its items' focus rings and shadows`);
|
|
263
|
+
}
|
|
250
264
|
const boxes = textBoxes().sort((a, b) => a.t - b.t);
|
|
251
265
|
const seen = /* @__PURE__ */ new Set();
|
|
252
266
|
for (let i = 0; i < boxes.length && seen.size < 15; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domandigital/craft",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Doman Digital house craft standard as numbers: OKLCh colour ramps that snap to existing anchors, derived semantic tokens with measured WCAG and APCA contrast, one shared motion vocabulary for CSS and JS, and a base stylesheet. Zero dependencies.",
|
|
6
6
|
"license": "Apache-2.0",
|