@michaelmagan/dnumb 0.1.0 → 0.1.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michaelmagan/dnumb",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Turns a rendered page into measurements an agent can read: element geometry, overflow, clipping, and a text diff of what changed between two states.",
5
5
  "keywords": [
6
6
  "agent",
@@ -33,12 +33,13 @@
33
33
  "files": [
34
34
  "dist",
35
35
  "skills",
36
- "AGENTS.md"
36
+ "AGENTS.md",
37
+ "docs/digest.md"
37
38
  ],
38
39
  "publishConfig": {
39
- "access": "public"
40
+ "access": "public",
41
+ "provenance": true
40
42
  },
41
- "packageManager": "pnpm@11.24.0",
42
43
  "intent": {
43
44
  "version": 1,
44
45
  "repo": "michaelmagan/dnumb",
@@ -55,21 +56,6 @@
55
56
  "dnumb": "./src/cli.ts"
56
57
  }
57
58
  },
58
- "scripts": {
59
- "build": "zshy --project tsconfig.build.json && node scripts/exports-map.mjs",
60
- "postbuild": "node scripts/exports-map.mjs",
61
- "typecheck": "tsc --noEmit",
62
- "lint": "biome check --error-on-warnings .",
63
- "format": "biome check --write .",
64
- "test": "vitest run --project unit",
65
- "test:browser": "vitest run --project browser",
66
- "test:all": "vitest run",
67
- "test:travel": "bash scripts/travel-test.sh",
68
- "check:package": "publint --strict && attw --pack .",
69
- "prepack": "pnpm run build",
70
- "prepublishOnly": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run test:browser && pnpm run check:package",
71
- "release": "changeset publish"
72
- },
73
59
  "peerDependencies": {
74
60
  "playwright-core": ">=1.17.0"
75
61
  },
@@ -137,5 +123,19 @@
137
123
  "./dist/spec/index.d.cts"
138
124
  ]
139
125
  }
126
+ },
127
+ "scripts": {
128
+ "build": "zshy --project tsconfig.build.json && node scripts/exports-map.mjs",
129
+ "postbuild": "node scripts/exports-map.mjs",
130
+ "typecheck": "tsc --noEmit",
131
+ "lint": "biome check --error-on-warnings .",
132
+ "format": "biome check --write .",
133
+ "test": "vitest run --project unit",
134
+ "test:browser": "vitest run --project browser",
135
+ "test:all": "vitest run",
136
+ "test:travel": "bash scripts/travel-test.sh",
137
+ "check": "pnpm run typecheck && pnpm run lint && pnpm run test",
138
+ "check:package": "publint --strict && attw --pack .",
139
+ "release": "changeset publish"
140
140
  }
141
- }
141
+ }
@@ -27,12 +27,13 @@ e5 nav.menu "Actions" @39,104 182x109 →-110 [clipped by e2 div; overflow:hidde
27
27
  A menu overlapping the sibling before it — negative gap — clipped by its own parent's
28
28
  `overflow: hidden` with only a 5px sliver surviving. Neither line says "bug". You decide that.
29
29
 
30
- ## Status: pre-release
30
+ ## Status: published
31
31
 
32
- Not yet published to npm. The library surface below is built and tested. The CLI has a stable verb
33
- set — `capture`, `look`, `diff`, and `q describe|find|at|within|distance|nearest|facts|color` — worked in
34
- [README § From the CLI](https://github.com/michaelmagan/dnumb/blob/main/README.md#from-the-cli) and
35
- Reading a diff](https://github.com/michaelmagan/dnumb/blob/main/README.md#reading-a-diff). This
32
+ `npm install --save-dev @michaelmagan/dnumb` — MIT, zero dependencies. The library surface below is
33
+ built and tested. The CLI has a stable verb set — `capture`, `look`, `diff`, and
34
+ `q describe|find|at|within|distance|nearest|facts|color` worked in
35
+ [README § From the CLI](../../README.md#from-the-cli) and
36
+ [§ Reading a diff](../../README.md#reading-a-diff). This
36
37
  file does not restate flags: run `dnumb --help` for the exhaustive, versioned list of what your
37
38
  installed copy supports, and trust it over any prose here or there.
38
39
 
@@ -53,7 +54,7 @@ Read the digest. The header names the URL, the viewport, the capture state, and
53
54
  carry facts. Most elements get their own line; a run of repeated siblings (a list, a table body)
54
55
  folds into one summary line instead, naming each folded sibling's id and position but not its
55
56
  descendants — see [`docs/digest.md` § The fold
56
- line](https://github.com/michaelmagan/dnumb/blob/main/docs/digest.md#the-fold-line) before reading
57
+ line](../../docs/digest.md#the-fold-line) before reading
57
58
  an absent element in a fold as absent from the page. Anything measurable that does not fit its box
58
59
  gets a bracketed fact on its own line.
59
60
 
@@ -70,6 +71,15 @@ npm install --save-dev @michaelmagan/dnumb
70
71
  everything — dnumb reuses your browsers and never downloads its own. If it does not, everything
71
72
  downstream of a saved bundle still works with no browser at all.
72
73
 
74
+ **No install, just try the CLI:** `npx @michaelmagan/dnumb --help` (or, on a bun project, `bunx
75
+ @michaelmagan/dnumb --help`). **After installing — via npm, pnpm, or `bun add -d
76
+ @michaelmagan/dnumb` — the shorter `npx dnumb --help` / `bunx dnumb --help` also works**, either
77
+ one, since all three package managers populate `node_modules/.bin/dnumb` the same way and both
78
+ `npx` and `bunx` resolve a local bin from it before ever touching the registry. **A bare `npx dnumb
79
+ ...` or `bunx dnumb ...` with nothing installed 404s against the registry**, because the tool is
80
+ then resolving `dnumb` as a package name, not a bin name, and no unscoped `dnumb` package exists. A
81
+ 404 there means "install it," not "the tool doesn't exist."
82
+
73
83
  ## Read this before you use the output
74
84
 
75
85
  **Facts come with counter-facts, and a fact is not a verdict.** The same number means different
@@ -92,9 +102,9 @@ contrast, it never says whether a ratio is good enough — that threshold lives
92
102
  Five kinds of fact exist in total — `overflow-x`, `overflow-y`, `zero-box`, `clipped`, and `color`
93
103
  (the one that never prints inline on an element line — only in the digest's `# colors:` header and
94
104
  `q color`) — one line each on what the measurement *is* in
95
- [AGENTS.md](https://github.com/michaelmagan/dnumb/blob/main/AGENTS.md#facts-with-counter-facts),
105
+ [AGENTS.md](../../AGENTS.md#facts-with-counter-facts),
96
106
  full grammar in
97
- [`docs/digest.md`](https://github.com/michaelmagan/dnumb/blob/main/docs/digest.md#color).
107
+ [`docs/digest.md`](../../docs/digest.md#color).
98
108
 
99
109
  **Element ids are stable within one capture only.** `e13` is an index in capture order, not a DOM
100
110
  id. Inserting one element earlier in the document shifts every id after it. Never carry an id
@@ -131,6 +141,6 @@ Spend a round-trip when a visual impression needs checking. Do not sweep a page
131
141
 
132
142
  The digest grammar — every token, every fact form, the fold and collapse syntax, and the parser
133
143
  contract — is specified in
134
- [`docs/digest.md`](https://github.com/michaelmagan/dnumb/blob/main/docs/digest.md). `diffCaptures`
144
+ [`docs/digest.md`](../../docs/digest.md). `diffCaptures`
135
145
  and the CLI's `diff` verb share one grammar, worked in
136
- [README § Reading a diff](https://github.com/michaelmagan/dnumb/blob/main/README.md#reading-a-diff).
146
+ [README § Reading a diff](../../README.md#reading-a-diff).