@domandigital/craft 0.16.0 → 0.18.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.
@@ -2,9 +2,11 @@ import {
2
2
  generate
3
3
  } from "./chunk-OQXTQQAU.js";
4
4
  import {
5
- parseFlags,
5
+ parseFlags
6
+ } from "./chunk-O5B5ELJH.js";
7
+ import {
6
8
  toJson
7
- } from "./chunk-LXDNIJFG.js";
9
+ } from "./chunk-QIEDBL4J.js";
8
10
  import {
9
11
  readSnapshot
10
12
  } from "./chunk-WUACK2HX.js";
@@ -15,13 +17,15 @@ import {
15
17
  auditSnapshot,
16
18
  checkCopy,
17
19
  extractHtml,
18
- extractStrings,
19
20
  fingerprint,
20
21
  harvest,
21
22
  hueSwatch,
22
23
  nullPrompt,
23
24
  scanSource
24
- } from "./chunk-B2MJLGF6.js";
25
+ } from "./chunk-WFB6F3BN.js";
26
+ import {
27
+ extractStrings
28
+ } from "./chunk-4QWEAL4G.js";
25
29
 
26
30
  // src/null/cli.ts
27
31
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "fs";
@@ -63,6 +67,7 @@ function loadNull(target, cwd) {
63
67
  }
64
68
  function measureRun(id, html, snapshot, styles = []) {
65
69
  const file = { path: `${id}.html`, text: html };
70
+ snapshot = { ...snapshot, home: snapshot.home ?? true };
66
71
  const tells = new Set([...auditSnapshot(snapshot).findings, ...scanSource([file, ...styles]).findings].map((f) => f.tell));
67
72
  let copy = [...new Set(extractStrings(file).filter((b) => !b.literal).map((b) => b.text.replace(/\s+/g, " ").trim()).filter(Boolean))];
68
73
  if (copy.length === 0) copy = [...new Set(snapshot.sections.flatMap((s) => s.text ?? []).map((t) => t.replace(/\s+/g, " ").trim()).filter(Boolean))];
@@ -115,7 +120,7 @@ async function build(flags, io) {
115
120
  const toShoot = ids.filter((id) => existsSync(join(pages, `${id}.html`)) && !existsSync(join(shots, `${id}.json`)));
116
121
  if (toShoot.length) {
117
122
  io.out(`craft null: snapshotting ${toShoot.length} page${toShoot.length === 1 ? "" : "s"}`);
118
- const { snapshotUrls } = await import("./audit-UJCUWORL.js");
123
+ const { snapshotUrls } = await import("./audit-4SFSLCKY.js");
119
124
  const results = await snapshotUrls(toShoot.map((id) => pathToFileURL(join(pages, `${id}.html`)).href));
120
125
  results.forEach((r, i) => {
121
126
  const id = toShoot[i];
@@ -236,7 +241,7 @@ async function importPages(flags, io) {
236
241
  const toShoot = pages.filter((p) => !existsSync(join(shots, `${p.id}.json`)));
237
242
  if (toShoot.length) {
238
243
  io.out(`craft null: snapshotting ${toShoot.length} page${toShoot.length === 1 ? "" : "s"} from ${flags.builder}`);
239
- const { snapshotUrls } = await import("./audit-UJCUWORL.js");
244
+ const { snapshotUrls } = await import("./audit-4SFSLCKY.js");
240
245
  const servers = /* @__PURE__ */ new Map();
241
246
  try {
242
247
  for (const p of toShoot) if (!servers.has(p.root)) servers.set(p.root, await serveDir(p.root));
@@ -9,11 +9,13 @@ import {
9
9
  runHarvest,
10
10
  runNull,
11
11
  serveDir
12
- } from "./chunk-LWVGIJ5A.js";
12
+ } from "./chunk-ZUYERAFM.js";
13
13
  import "./chunk-OQXTQQAU.js";
14
- import "./chunk-LXDNIJFG.js";
14
+ import "./chunk-O5B5ELJH.js";
15
+ import "./chunk-QIEDBL4J.js";
15
16
  import "./chunk-WUACK2HX.js";
16
- import "./chunk-B2MJLGF6.js";
17
+ import "./chunk-WFB6F3BN.js";
18
+ import "./chunk-4QWEAL4G.js";
17
19
  import "./chunk-QYBAVU3P.js";
18
20
  export {
19
21
  describeTypicality,
@@ -4,13 +4,15 @@ import {
4
4
  formatPairs,
5
5
  loadEstate,
6
6
  runEstate
7
- } from "./chunk-CVG5GSMN.js";
8
- import "./chunk-WAV6AKR4.js";
9
- import "./chunk-LWVGIJ5A.js";
7
+ } from "./chunk-RJVG5KA6.js";
8
+ import "./chunk-6TSDYETQ.js";
9
+ import "./chunk-ZUYERAFM.js";
10
10
  import "./chunk-OQXTQQAU.js";
11
- import "./chunk-LXDNIJFG.js";
11
+ import "./chunk-O5B5ELJH.js";
12
+ import "./chunk-QIEDBL4J.js";
12
13
  import "./chunk-WUACK2HX.js";
13
- import "./chunk-B2MJLGF6.js";
14
+ import "./chunk-WFB6F3BN.js";
15
+ import "./chunk-4QWEAL4G.js";
14
16
  import "./chunk-QYBAVU3P.js";
15
17
  export {
16
18
  formatComponentPairs,