@atelic-action/artifact 7.0.1 → 7.0.3
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/documents/TheRead.tsx +1 -1
- package/src/documents/Topic.tsx +20 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atelic-action/artifact",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "The composed documents the Atelic practice hands or sends a business (the read, the monthly page, the note, the discovery sheet, the first call sheet, and the sealed document), built from the pieces in @atelic-action/ui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -407,7 +407,7 @@ export const readLabels: Required<ReadLabels> = {
|
|
|
407
407
|
sources: "See it yourself",
|
|
408
408
|
plan: "The Plan",
|
|
409
409
|
publicNote:
|
|
410
|
-
"
|
|
410
|
+
"I built this read from what anyone can see from the outside. Your own accounts, like Search Console, your Business Profile, and your analytics, would sharpen the read once I have access.",
|
|
411
411
|
overviewTitle: "Overview of",
|
|
412
412
|
overviewLede:
|
|
413
413
|
"An overview of {business} prepared by Atelic. It holds a read of the current state of the site, in Health, Visibility, and Conversion, and a proposed plan for improvement.",
|
package/src/documents/Topic.tsx
CHANGED
|
@@ -183,7 +183,7 @@ export const readSpeedLabels: ReadSpeedLabels = {
|
|
|
183
183
|
gradeWord: "Grade",
|
|
184
184
|
score: {
|
|
185
185
|
label: "Score",
|
|
186
|
-
hint: "Google’s own mark for the page, out of 100, from the four measures beside it.
|
|
186
|
+
hint: "Google’s own mark for the page, out of 100, from the four measures beside it. I grade it the way a school grades: 90 is an A, 80 a B, 70 a C, and under 70 a D.",
|
|
187
187
|
},
|
|
188
188
|
firstPaint: {
|
|
189
189
|
label: "First paint",
|
|
@@ -203,7 +203,7 @@ export const readSpeedLabels: ReadSpeedLabels = {
|
|
|
203
203
|
},
|
|
204
204
|
whyThreeTitle: "Why three runs.",
|
|
205
205
|
whyThree:
|
|
206
|
-
"A single run swings with Google’s own servers and the moment it ran, so
|
|
206
|
+
"A single run swings with Google’s own servers and the moment it ran, so I run the test three times a minute apart. The middle score is the reading; the best and the worst are the range.",
|
|
207
207
|
ranOn: "These ran on",
|
|
208
208
|
};
|
|
209
209
|
|
|
@@ -446,19 +446,28 @@ function Speed({ block }: { block: ReadSpeed }) {
|
|
|
446
446
|
);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
/**
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
/**
|
|
450
|
+
* One run of a paragraph: a string, a link `{ text, href }`, or a search query
|
|
451
|
+
* `{ query, href? }`. The query run is ui's from 7.1.0 and is read here by its
|
|
452
|
+
* shape alone, so the ui range this package peers on does not have to move.
|
|
453
|
+
*/
|
|
454
|
+
function isRun(run: unknown): boolean {
|
|
455
|
+
if (typeof run === "string") return true;
|
|
456
|
+
if (typeof run !== "object" || run === null) return false;
|
|
457
|
+
if ("text" in run && "href" in run) return true;
|
|
452
458
|
return (
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
typeof run === "string" ||
|
|
457
|
-
(typeof run === "object" && run !== null && "text" in run && "href" in run),
|
|
458
|
-
)
|
|
459
|
+
"query" in run &&
|
|
460
|
+
typeof run.query === "string" &&
|
|
461
|
+
(!("href" in run) || run.href === undefined || typeof run.href === "string")
|
|
459
462
|
);
|
|
460
463
|
}
|
|
461
464
|
|
|
465
|
+
/** A string or runs of text, links, and queries, the shape JSON content arrives in; a node of elements is anything else. */
|
|
466
|
+
export function isRuns(value: unknown): value is ArtifactParagraph {
|
|
467
|
+
if (typeof value === "string") return true;
|
|
468
|
+
return Array.isArray(value) && value.every(isRun);
|
|
469
|
+
}
|
|
470
|
+
|
|
462
471
|
/** A finding's body as a node, whichever way the content wrote it. */
|
|
463
472
|
function bodyNode(body: ReactNode | ArtifactParagraph | undefined): ReactNode {
|
|
464
473
|
if (body === undefined || body === null) return undefined;
|