@domandigital/craft 0.6.0 → 0.8.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 +36 -0
- package/CHARACTER.md +280 -20
- package/COPY.md +280 -0
- package/README.md +12 -0
- package/dist/audit-W57YDZ2K.js +20 -0
- package/dist/audit.cjs +901 -103
- package/dist/audit.d.cts +16 -1
- package/dist/audit.d.ts +16 -1
- package/dist/audit.js +899 -102
- package/dist/chunk-35OX6C4H.js +112 -0
- package/dist/{chunk-GWMSSRIQ.js → chunk-CZHRNPDD.js} +1521 -934
- package/dist/chunk-K253ZXB3.js +458 -0
- package/dist/{chunk-HYGFP3LB.js → chunk-OGSYVCMU.js} +40 -3
- package/dist/chunk-OVOH7KZY.js +163 -0
- package/dist/{cli-7ME4VIRG.js → chunk-Q4MN3OXF.js} +50 -101
- package/dist/chunk-ULYKASLA.js +175 -0
- package/dist/chunk-X65RDW65.js +364 -0
- package/dist/cli-F7ONSKZS.js +21 -0
- package/dist/cli-FKJOMOOF.js +15 -0
- package/dist/{cli-F7W4F3ER.js → cli-KA3JDNDH.js} +14 -168
- package/dist/cli-LZ7R6KJM.js +312 -0
- package/dist/cli-SHLNRHK6.js +16 -0
- package/dist/cli.js +2 -1
- package/dist/index.cjs +1528 -99
- package/dist/index.d.cts +365 -4
- package/dist/index.d.ts +365 -4
- package/dist/index.js +1493 -96
- package/package.json +4 -2
- package/word-lists.json +164 -0
package/dist/audit.d.cts
CHANGED
|
@@ -170,6 +170,8 @@ interface Finding {
|
|
|
170
170
|
excerpt: string;
|
|
171
171
|
message: string;
|
|
172
172
|
fix: string;
|
|
173
|
+
/** The house copy tier (`house.ts`), on copy findings only. */
|
|
174
|
+
house?: "block" | "review" | "explicit";
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
175
177
|
* A declared reason to keep a tell. Lives in the site's `art-direction.json`.
|
|
@@ -329,6 +331,7 @@ interface SnapshotOptions {
|
|
|
329
331
|
timeoutMs?: number;
|
|
330
332
|
}
|
|
331
333
|
interface MinimalPage {
|
|
334
|
+
close?(): Promise<void>;
|
|
332
335
|
goto(url: string, options?: {
|
|
333
336
|
waitUntil?: string;
|
|
334
337
|
timeout?: number;
|
|
@@ -365,6 +368,18 @@ declare function loadPlaywright(): Promise<Launcher>;
|
|
|
365
368
|
declare function snapshotPage(page: MinimalPage, url: string, options?: SnapshotOptions): Promise<Snapshot>;
|
|
366
369
|
/** Launch a browser, open `url`, and capture a snapshot. */
|
|
367
370
|
declare function snapshotUrl(url: string, options?: SnapshotOptions): Promise<Snapshot>;
|
|
371
|
+
interface SnapshotResult {
|
|
372
|
+
url: string;
|
|
373
|
+
snapshot?: Snapshot;
|
|
374
|
+
/** Why this page has no snapshot. The others are still taken. */
|
|
375
|
+
error?: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Several pages through one browser, in order. A null model is twenty pages;
|
|
379
|
+
* launching Chromium twenty times is most of the wait. One page that will not
|
|
380
|
+
* load costs that page, not the batch.
|
|
381
|
+
*/
|
|
382
|
+
declare function snapshotUrls(urls: string[], options?: SnapshotOptions): Promise<SnapshotResult[]>;
|
|
368
383
|
interface AuditResult {
|
|
369
384
|
snapshot: Snapshot;
|
|
370
385
|
report: CheckReport;
|
|
@@ -373,4 +388,4 @@ interface AuditResult {
|
|
|
373
388
|
/** Snapshot a URL, judge it against the rendered tells, and fingerprint it. */
|
|
374
389
|
declare function audit(url: string, options?: SnapshotOptions & CheckOptions): Promise<AuditResult>;
|
|
375
390
|
|
|
376
|
-
export { type AuditResult, type SnapshotOptions, audit, collectInPage, loadPlaywright, overlayInPage, snapshotPage, snapshotUrl };
|
|
391
|
+
export { type AuditResult, type SnapshotOptions, type SnapshotResult, audit, collectInPage, loadPlaywright, overlayInPage, snapshotPage, snapshotUrl, snapshotUrls };
|
package/dist/audit.d.ts
CHANGED
|
@@ -170,6 +170,8 @@ interface Finding {
|
|
|
170
170
|
excerpt: string;
|
|
171
171
|
message: string;
|
|
172
172
|
fix: string;
|
|
173
|
+
/** The house copy tier (`house.ts`), on copy findings only. */
|
|
174
|
+
house?: "block" | "review" | "explicit";
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
175
177
|
* A declared reason to keep a tell. Lives in the site's `art-direction.json`.
|
|
@@ -329,6 +331,7 @@ interface SnapshotOptions {
|
|
|
329
331
|
timeoutMs?: number;
|
|
330
332
|
}
|
|
331
333
|
interface MinimalPage {
|
|
334
|
+
close?(): Promise<void>;
|
|
332
335
|
goto(url: string, options?: {
|
|
333
336
|
waitUntil?: string;
|
|
334
337
|
timeout?: number;
|
|
@@ -365,6 +368,18 @@ declare function loadPlaywright(): Promise<Launcher>;
|
|
|
365
368
|
declare function snapshotPage(page: MinimalPage, url: string, options?: SnapshotOptions): Promise<Snapshot>;
|
|
366
369
|
/** Launch a browser, open `url`, and capture a snapshot. */
|
|
367
370
|
declare function snapshotUrl(url: string, options?: SnapshotOptions): Promise<Snapshot>;
|
|
371
|
+
interface SnapshotResult {
|
|
372
|
+
url: string;
|
|
373
|
+
snapshot?: Snapshot;
|
|
374
|
+
/** Why this page has no snapshot. The others are still taken. */
|
|
375
|
+
error?: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Several pages through one browser, in order. A null model is twenty pages;
|
|
379
|
+
* launching Chromium twenty times is most of the wait. One page that will not
|
|
380
|
+
* load costs that page, not the batch.
|
|
381
|
+
*/
|
|
382
|
+
declare function snapshotUrls(urls: string[], options?: SnapshotOptions): Promise<SnapshotResult[]>;
|
|
368
383
|
interface AuditResult {
|
|
369
384
|
snapshot: Snapshot;
|
|
370
385
|
report: CheckReport;
|
|
@@ -373,4 +388,4 @@ interface AuditResult {
|
|
|
373
388
|
/** Snapshot a URL, judge it against the rendered tells, and fingerprint it. */
|
|
374
389
|
declare function audit(url: string, options?: SnapshotOptions & CheckOptions): Promise<AuditResult>;
|
|
375
390
|
|
|
376
|
-
export { type AuditResult, type SnapshotOptions, audit, collectInPage, loadPlaywright, overlayInPage, snapshotPage, snapshotUrl };
|
|
391
|
+
export { type AuditResult, type SnapshotOptions, type SnapshotResult, audit, collectInPage, loadPlaywright, overlayInPage, snapshotPage, snapshotUrl, snapshotUrls };
|