ultra11y 5.56.0 → 5.56.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.opencode/plugins/ultra11y.js +1 -1
- package/package.json +1 -1
- package/scripts/ultra11y.mjs +150 -63
- package/skills/review-a11y/SKILL.md +1 -1
- package/skills/review-a11y/scripts/ultra11y.mjs +150 -63
- package/skills/ultra11y/SKILL.md +1 -1
- package/skills/ultra11y/scripts/ultra11y.mjs +150 -63
- package/skills/ultra11y/templates/gitlab-ci.yml +1 -1
- package/src/parse/pdf.ts +179 -65
- package/src/types.ts +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "ultra11y",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "RGAA 4.1.2 accessibility audits on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports in Claude Code.",
|
|
13
|
-
"version": "5.56.
|
|
13
|
+
"version": "5.56.1",
|
|
14
14
|
"author": { "name": "maxgfr" },
|
|
15
15
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
16
16
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.56.
|
|
4
|
+
"version": "5.56.1",
|
|
5
5
|
"author": { "name": "maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
3
|
"description": "RGAA 4.1.2 accessibility audits, the French State's standard, on a WCAG 2.2 AA core: automatic review before commit, push and pull request, plus dated, evidenced Markdown, HTML and per-page conformance reports. Never declares conforming what it has not verified.",
|
|
4
|
-
"version": "5.56.
|
|
4
|
+
"version": "5.56.1",
|
|
5
5
|
"author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
|
|
6
6
|
"homepage": "https://github.com/SocialGouv/ultra11y",
|
|
7
7
|
"repository": "https://github.com/SocialGouv/ultra11y",
|
|
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
|
|
|
27
27
|
// Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
|
|
28
28
|
// does not carry it, so a user's own ultra11y.js is never clobbered.
|
|
29
29
|
const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
|
|
30
|
-
const ULTRA11Y_PLUGIN_VERSION = "5.56.
|
|
30
|
+
const ULTRA11Y_PLUGIN_VERSION = "5.56.1";
|
|
31
31
|
|
|
32
32
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
33
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra11y",
|
|
3
|
-
"version": "5.56.
|
|
3
|
+
"version": "5.56.1",
|
|
4
4
|
"description": "Audit d'accessibilité RGAA 4.1.2, le référentiel de l'État : rapport daté, grille des 106 critères, backlog et tickets. Moteur statique, navigateur et jugement IA contre-vérifié. Il ne déclare jamais conforme ce qu'il n'a pas vérifié. Socle WCAG 2.2 AA.",
|
|
5
5
|
"homepage": "https://socialgouv.github.io/ultra11y/",
|
|
6
6
|
"type": "module",
|
package/scripts/ultra11y.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { join as join55, relative as relative7, resolve as resolve18, sep as sep
|
|
|
6
6
|
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
7
7
|
|
|
8
8
|
// src/types.ts
|
|
9
|
-
var VERSION = "5.56.
|
|
9
|
+
var VERSION = "5.56.1";
|
|
10
10
|
var SCHEMA_VERSION = 2;
|
|
11
11
|
function isAdjudicated(by) {
|
|
12
12
|
return by === "agent" || by === "human";
|
|
@@ -54892,7 +54892,10 @@ var PdfUnreadable = class extends Error {
|
|
|
54892
54892
|
};
|
|
54893
54893
|
var WS = /* @__PURE__ */ new Set([0, 9, 10, 12, 13, 32]);
|
|
54894
54894
|
var DELIM = /* @__PURE__ */ new Set([40, 41, 60, 62, 91, 93, 123, 125, 47, 37]);
|
|
54895
|
-
var
|
|
54895
|
+
var CLASS = new Uint8Array(256);
|
|
54896
|
+
for (const c2 of WS) CLASS[c2] = 1;
|
|
54897
|
+
for (const c2 of DELIM) CLASS[c2] = 2;
|
|
54898
|
+
var isRegular = (c2) => c2 !== void 0 && CLASS[c2] === 0;
|
|
54896
54899
|
var MAX_NESTING = 64;
|
|
54897
54900
|
var Lexer = class {
|
|
54898
54901
|
buf;
|
|
@@ -55042,6 +55045,7 @@ var Lexer = class {
|
|
|
55042
55045
|
var MAX_DECODED_TOTAL = 256 * 1024 * 1024;
|
|
55043
55046
|
var MAX_STREAM_DECODED = 64 * 1024 * 1024;
|
|
55044
55047
|
var tooLarge = () => new PdfUnreadable("too-large", `a decoded stream exceeds ${MAX_STREAM_DECODED} bytes`);
|
|
55048
|
+
var isTooLarge = (e) => e instanceof PdfUnreadable && e.reason === "too-large";
|
|
55045
55049
|
var ByteSink = class {
|
|
55046
55050
|
buf = Buffer.alloc(4096);
|
|
55047
55051
|
length = 0;
|
|
@@ -55141,37 +55145,37 @@ function asciiHex(data2) {
|
|
|
55141
55145
|
return Buffer.from(s, "hex");
|
|
55142
55146
|
}
|
|
55143
55147
|
function ascii85(data2) {
|
|
55144
|
-
|
|
55145
|
-
|
|
55146
|
-
|
|
55147
|
-
if (
|
|
55148
|
-
|
|
55149
|
-
let
|
|
55150
|
-
|
|
55151
|
-
|
|
55152
|
-
|
|
55153
|
-
|
|
55154
|
-
|
|
55155
|
-
};
|
|
55156
|
-
for (const ch of s) {
|
|
55157
|
-
if (ch === "z" && group.length === 0) {
|
|
55158
|
-
out2.push(0, 0, 0, 0);
|
|
55148
|
+
const out2 = new ByteSink();
|
|
55149
|
+
let i2 = 0;
|
|
55150
|
+
while (i2 < data2.length && WS.has(data2[i2])) i2++;
|
|
55151
|
+
if (data2[i2] === 60 && data2[i2 + 1] === 126) i2 += 2;
|
|
55152
|
+
let v = 0;
|
|
55153
|
+
let n = 0;
|
|
55154
|
+
for (; i2 < data2.length; i2++) {
|
|
55155
|
+
const c2 = data2[i2];
|
|
55156
|
+
if (c2 === 126) break;
|
|
55157
|
+
if (c2 === 122 && n === 0) {
|
|
55158
|
+
out2.fill(0, 4);
|
|
55159
55159
|
continue;
|
|
55160
55160
|
}
|
|
55161
|
-
|
|
55162
|
-
|
|
55163
|
-
|
|
55164
|
-
|
|
55165
|
-
|
|
55166
|
-
|
|
55161
|
+
if (c2 < 33 || c2 > 117) continue;
|
|
55162
|
+
v = v * 85 + (c2 - 33);
|
|
55163
|
+
if (++n === 5) {
|
|
55164
|
+
out2.push(v >>> 24 & 255);
|
|
55165
|
+
out2.push(v >>> 16 & 255);
|
|
55166
|
+
out2.push(v >>> 8 & 255);
|
|
55167
|
+
out2.push(v & 255);
|
|
55168
|
+
v = 0;
|
|
55169
|
+
n = 0;
|
|
55167
55170
|
}
|
|
55168
55171
|
}
|
|
55169
|
-
if (
|
|
55170
|
-
const
|
|
55171
|
-
|
|
55172
|
-
|
|
55172
|
+
if (n > 1) {
|
|
55173
|
+
const keep = n - 1;
|
|
55174
|
+
for (; n < 5; n++) v = v * 85 + 84;
|
|
55175
|
+
const bytes = [v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255];
|
|
55176
|
+
out2.append(bytes.slice(0, keep));
|
|
55173
55177
|
}
|
|
55174
|
-
return
|
|
55178
|
+
return out2.done();
|
|
55175
55179
|
}
|
|
55176
55180
|
function lzw(data2, earlyChange = 1) {
|
|
55177
55181
|
const out2 = new ByteSink();
|
|
@@ -55240,6 +55244,9 @@ var PdfDocument = class {
|
|
|
55240
55244
|
objectStreams = false;
|
|
55241
55245
|
cache = /* @__PURE__ */ new Map();
|
|
55242
55246
|
objStmCache = /* @__PURE__ */ new Map();
|
|
55247
|
+
/** Decoded bytes (or the error) per stream object: a content stream or form shared by every
|
|
55248
|
+
* page is decoded once, and counted once against the budget. */
|
|
55249
|
+
decoded = /* @__PURE__ */ new Map();
|
|
55243
55250
|
resolving = /* @__PURE__ */ new Set();
|
|
55244
55251
|
decodedTotal = 0;
|
|
55245
55252
|
text;
|
|
@@ -55251,7 +55258,7 @@ var PdfDocument = class {
|
|
|
55251
55258
|
this.readXrefChain();
|
|
55252
55259
|
if (!isDict(this.get(this.trailer.get("Root")))) throw new PdfUnreadable("malformed", "the trailer's /Root does not resolve");
|
|
55253
55260
|
} catch (e) {
|
|
55254
|
-
if (e
|
|
55261
|
+
if (isTooLarge(e)) throw e;
|
|
55255
55262
|
this.repair();
|
|
55256
55263
|
}
|
|
55257
55264
|
}
|
|
@@ -55349,6 +55356,7 @@ var PdfDocument = class {
|
|
|
55349
55356
|
this.repaired = true;
|
|
55350
55357
|
this.xref.clear();
|
|
55351
55358
|
this.cache.clear();
|
|
55359
|
+
this.decoded.clear();
|
|
55352
55360
|
const re = /(?:^|[\r\n\s])(\d{1,10})\s+(\d{1,5})\s+obj\b/g;
|
|
55353
55361
|
for (let m = re.exec(this.text); m; m = re.exec(this.text)) {
|
|
55354
55362
|
const at = m.index + m[0].indexOf(m[1]);
|
|
@@ -55371,7 +55379,8 @@ var PdfDocument = class {
|
|
|
55371
55379
|
let o;
|
|
55372
55380
|
try {
|
|
55373
55381
|
o = this.get(new PdfRef(n, e.b));
|
|
55374
|
-
} catch {
|
|
55382
|
+
} catch (err2) {
|
|
55383
|
+
if (isTooLarge(err2)) throw err2;
|
|
55375
55384
|
continue;
|
|
55376
55385
|
}
|
|
55377
55386
|
if (!(o instanceof PdfStream)) continue;
|
|
@@ -55387,7 +55396,8 @@ var PdfDocument = class {
|
|
|
55387
55396
|
if (!this.xref.has(objNum)) this.xref.set(objNum, { type: 2, a: n, b: i2 });
|
|
55388
55397
|
i2++;
|
|
55389
55398
|
}
|
|
55390
|
-
} catch {
|
|
55399
|
+
} catch (err2) {
|
|
55400
|
+
if (isTooLarge(err2)) throw err2;
|
|
55391
55401
|
}
|
|
55392
55402
|
}
|
|
55393
55403
|
}
|
|
@@ -55399,7 +55409,8 @@ var PdfDocument = class {
|
|
|
55399
55409
|
trailer.set("Root", new PdfRef(n, e.type === 1 ? e.b : 0));
|
|
55400
55410
|
break;
|
|
55401
55411
|
}
|
|
55402
|
-
} catch {
|
|
55412
|
+
} catch (err2) {
|
|
55413
|
+
if (isTooLarge(err2)) throw err2;
|
|
55403
55414
|
}
|
|
55404
55415
|
}
|
|
55405
55416
|
}
|
|
@@ -55438,7 +55449,8 @@ var PdfDocument = class {
|
|
|
55438
55449
|
if (v instanceof PdfRef) {
|
|
55439
55450
|
try {
|
|
55440
55451
|
return num2(this.get(v));
|
|
55441
|
-
} catch {
|
|
55452
|
+
} catch (err2) {
|
|
55453
|
+
if (isTooLarge(err2)) throw err2;
|
|
55442
55454
|
return void 0;
|
|
55443
55455
|
}
|
|
55444
55456
|
}
|
|
@@ -55485,7 +55497,7 @@ var PdfDocument = class {
|
|
|
55485
55497
|
this.cache.set(v.num, val);
|
|
55486
55498
|
return val;
|
|
55487
55499
|
} catch (err2) {
|
|
55488
|
-
if (err2
|
|
55500
|
+
if (isTooLarge(err2)) throw err2;
|
|
55489
55501
|
this.cache.set(v.num, null);
|
|
55490
55502
|
return null;
|
|
55491
55503
|
} finally {
|
|
@@ -55502,8 +55514,22 @@ var PdfDocument = class {
|
|
|
55502
55514
|
const r = this.get(v);
|
|
55503
55515
|
return Array.isArray(r) ? r : void 0;
|
|
55504
55516
|
}
|
|
55505
|
-
/** A stream's decoded bytes. Throws for an image codec or an unknown filter
|
|
55517
|
+
/** A stream's decoded bytes. Throws for an image codec or an unknown filter — and throws the
|
|
55518
|
+
* same error again, without decoding again, when asked twice. */
|
|
55506
55519
|
decode(s) {
|
|
55520
|
+
const hit = this.decoded.get(s);
|
|
55521
|
+
if (hit instanceof Error) throw hit;
|
|
55522
|
+
if (hit) return hit;
|
|
55523
|
+
try {
|
|
55524
|
+
const data2 = this.decodeUncached(s);
|
|
55525
|
+
this.decoded.set(s, data2);
|
|
55526
|
+
return data2;
|
|
55527
|
+
} catch (e) {
|
|
55528
|
+
this.decoded.set(s, e instanceof Error ? e : new PdfUnreadable("malformed", String(e)));
|
|
55529
|
+
throw e;
|
|
55530
|
+
}
|
|
55531
|
+
}
|
|
55532
|
+
decodeUncached(s) {
|
|
55507
55533
|
let data2 = this.buf.subarray(s.start, s.end);
|
|
55508
55534
|
const fv = this.get(s.dict.get("Filter"));
|
|
55509
55535
|
const filters = (Array.isArray(fv) ? fv : fv ? [fv] : []).map((f) => nameOf2(this.get(f)) ?? "");
|
|
@@ -55539,6 +55565,7 @@ function pdfText(v) {
|
|
|
55539
55565
|
var MAX_PAGES_SCANNED = 500;
|
|
55540
55566
|
var MAX_STRUCT_NODES = 5e4;
|
|
55541
55567
|
var MAX_FORM_DEPTH = 4;
|
|
55568
|
+
var MAX_SCANNED_TOTAL = 64 * 1024 * 1024;
|
|
55542
55569
|
var PDF_MAX_BYTES = 64 * 1024 * 1024;
|
|
55543
55570
|
function unreadable(reason, detail, version) {
|
|
55544
55571
|
return {
|
|
@@ -55569,7 +55596,7 @@ function readPdf(bytes) {
|
|
|
55569
55596
|
let version = hv[1];
|
|
55570
55597
|
try {
|
|
55571
55598
|
const doc = new PdfDocument(buf);
|
|
55572
|
-
if (doc.trailer.has("Encrypt")
|
|
55599
|
+
if (doc.trailer.has("Encrypt")) {
|
|
55573
55600
|
return unreadable("encrypted", "the file is encrypted; its strings and streams cannot be read without decrypting them", version);
|
|
55574
55601
|
}
|
|
55575
55602
|
const catalog = doc.dict(doc.trailer.get("Root"));
|
|
@@ -55588,8 +55615,8 @@ function readPdf(bytes) {
|
|
|
55588
55615
|
title = xmpTitle(doc, catalog);
|
|
55589
55616
|
if (title) titleSource = "xmp";
|
|
55590
55617
|
}
|
|
55591
|
-
const pages = collectPages(doc, catalog);
|
|
55592
|
-
const content = scanContent(doc, pages);
|
|
55618
|
+
const { pages, complete: treeComplete } = collectPages(doc, catalog);
|
|
55619
|
+
const content = scanContent(doc, pages, treeComplete);
|
|
55593
55620
|
const structure = structRoot ? walkStructure(doc, structRoot) : void 0;
|
|
55594
55621
|
return {
|
|
55595
55622
|
readable: true,
|
|
@@ -55621,7 +55648,8 @@ function xmpTitle(doc, catalog) {
|
|
|
55621
55648
|
let xml;
|
|
55622
55649
|
try {
|
|
55623
55650
|
xml = doc.decode(md).toString("utf8");
|
|
55624
|
-
} catch {
|
|
55651
|
+
} catch (e) {
|
|
55652
|
+
if (isTooLarge(e)) throw e;
|
|
55625
55653
|
return void 0;
|
|
55626
55654
|
}
|
|
55627
55655
|
const block = /<dc:title\b[^>]*>([\s\S]*?)<\/dc:title>/i.exec(xml)?.[1];
|
|
@@ -55633,8 +55661,17 @@ function xmpTitle(doc, catalog) {
|
|
|
55633
55661
|
function collectPages(doc, catalog) {
|
|
55634
55662
|
const out2 = [];
|
|
55635
55663
|
const seen = /* @__PURE__ */ new Set();
|
|
55664
|
+
let complete = true;
|
|
55636
55665
|
const walk3 = (node, inherited, depth) => {
|
|
55637
|
-
if (!node
|
|
55666
|
+
if (!node) {
|
|
55667
|
+
complete = false;
|
|
55668
|
+
return;
|
|
55669
|
+
}
|
|
55670
|
+
if (seen.has(node)) return;
|
|
55671
|
+
if (depth > MAX_NESTING || out2.length >= MAX_PAGES_SCANNED * 4) {
|
|
55672
|
+
complete = false;
|
|
55673
|
+
return;
|
|
55674
|
+
}
|
|
55638
55675
|
seen.add(node);
|
|
55639
55676
|
const resources = doc.dict(node.get("Resources")) ?? inherited;
|
|
55640
55677
|
const kids = doc.array(node.get("Kids"));
|
|
@@ -55643,19 +55680,29 @@ function collectPages(doc, catalog) {
|
|
|
55643
55680
|
out2.push({ dict: node, resources });
|
|
55644
55681
|
return;
|
|
55645
55682
|
}
|
|
55683
|
+
if (!kids && node.has("Kids")) complete = false;
|
|
55646
55684
|
for (const k of kids ?? []) walk3(doc.dict(k), resources, depth + 1);
|
|
55647
55685
|
};
|
|
55648
55686
|
walk3(doc.dict(catalog.get("Pages")), void 0, 0);
|
|
55649
|
-
return out2;
|
|
55687
|
+
return { pages: out2, complete };
|
|
55650
55688
|
}
|
|
55651
55689
|
var TEXT_OPS2 = /* @__PURE__ */ new Set(["Tj", "TJ", "'", '"']);
|
|
55652
|
-
function scanContent(doc, pages) {
|
|
55690
|
+
function scanContent(doc, pages, treeComplete) {
|
|
55653
55691
|
let fonts = 0;
|
|
55654
55692
|
let textOps = 0;
|
|
55655
55693
|
let images = 0;
|
|
55656
|
-
let complete = pages.length > 0;
|
|
55694
|
+
let complete = pages.length > 0 && treeComplete;
|
|
55657
55695
|
const fontSeen = /* @__PURE__ */ new Set();
|
|
55658
55696
|
const formSeen = /* @__PURE__ */ new Set();
|
|
55697
|
+
const ids2 = /* @__PURE__ */ new Map();
|
|
55698
|
+
const idOf = (o) => {
|
|
55699
|
+
let id = ids2.get(o);
|
|
55700
|
+
if (id === void 0) ids2.set(o, id = ids2.size + 1);
|
|
55701
|
+
return id;
|
|
55702
|
+
};
|
|
55703
|
+
const pageMemo = /* @__PURE__ */ new Map();
|
|
55704
|
+
let scanned = 0;
|
|
55705
|
+
let exhausted = false;
|
|
55659
55706
|
const countFonts = (res) => {
|
|
55660
55707
|
const f = doc.dict(res?.get("Font"));
|
|
55661
55708
|
if (!f) return;
|
|
@@ -55667,44 +55714,83 @@ function scanContent(doc, pages) {
|
|
|
55667
55714
|
};
|
|
55668
55715
|
const scanStream = (data2, res, depth) => {
|
|
55669
55716
|
countFonts(res);
|
|
55717
|
+
scanned += data2.length;
|
|
55718
|
+
if (scanned > MAX_SCANNED_TOTAL) {
|
|
55719
|
+
exhausted = true;
|
|
55720
|
+
complete = false;
|
|
55721
|
+
return 0;
|
|
55722
|
+
}
|
|
55670
55723
|
const xobjects = doc.dict(res?.get("XObject"));
|
|
55671
55724
|
const ops = contentOperators(data2);
|
|
55672
55725
|
textOps += ops.text;
|
|
55673
|
-
|
|
55674
|
-
|
|
55726
|
+
let drawn = ops.inlineImages;
|
|
55727
|
+
const uses = /* @__PURE__ */ new Map();
|
|
55728
|
+
for (const name2 of ops.xobjects) uses.set(name2, (uses.get(name2) ?? 0) + 1);
|
|
55729
|
+
for (const [name2, count] of uses) {
|
|
55675
55730
|
const xo = doc.get(xobjects?.get(name2));
|
|
55676
|
-
if (!(xo instanceof PdfStream))
|
|
55731
|
+
if (!(xo instanceof PdfStream)) {
|
|
55732
|
+
complete = false;
|
|
55733
|
+
continue;
|
|
55734
|
+
}
|
|
55677
55735
|
const sub = nameOf2(doc.get(xo.dict.get("Subtype")));
|
|
55678
|
-
if (sub === "Image")
|
|
55679
|
-
else if (sub === "Form"
|
|
55736
|
+
if (sub === "Image") drawn += count;
|
|
55737
|
+
else if (sub === "Form") {
|
|
55738
|
+
if (exhausted || formSeen.has(xo)) continue;
|
|
55739
|
+
if (depth >= MAX_FORM_DEPTH) {
|
|
55740
|
+
complete = false;
|
|
55741
|
+
continue;
|
|
55742
|
+
}
|
|
55680
55743
|
formSeen.add(xo);
|
|
55744
|
+
let form;
|
|
55681
55745
|
try {
|
|
55682
|
-
|
|
55683
|
-
} catch {
|
|
55746
|
+
form = doc.decode(xo);
|
|
55747
|
+
} catch (e) {
|
|
55748
|
+
if (isTooLarge(e)) throw e;
|
|
55684
55749
|
complete = false;
|
|
55750
|
+
continue;
|
|
55685
55751
|
}
|
|
55686
|
-
|
|
55752
|
+
drawn += scanStream(form, doc.dict(xo.dict.get("Resources")) ?? res, depth + 1);
|
|
55753
|
+
} else if (sub !== "PS") complete = false;
|
|
55687
55754
|
}
|
|
55755
|
+
return drawn;
|
|
55688
55756
|
};
|
|
55689
55757
|
for (const [i2, page] of pages.entries()) {
|
|
55690
55758
|
if (i2 >= MAX_PAGES_SCANNED) {
|
|
55691
|
-
|
|
55759
|
+
complete = false;
|
|
55692
55760
|
break;
|
|
55693
55761
|
}
|
|
55694
|
-
const
|
|
55695
|
-
const
|
|
55696
|
-
const
|
|
55762
|
+
const raw = page.dict.get("Contents");
|
|
55763
|
+
const cv = doc.get(raw);
|
|
55764
|
+
const entries = raw === void 0 || raw === null ? [] : Array.isArray(cv) ? cv : [raw];
|
|
55765
|
+
const streams = [];
|
|
55766
|
+
for (const c2 of entries) {
|
|
55767
|
+
const s = doc.get(c2);
|
|
55768
|
+
if (s instanceof PdfStream) streams.push(s);
|
|
55769
|
+
else complete = false;
|
|
55770
|
+
}
|
|
55771
|
+
const key2 = `${streams.map((s) => s.start).join(",")}|${page.resources ? idOf(page.resources) : 0}`;
|
|
55772
|
+
const memo = pageMemo.get(key2);
|
|
55773
|
+
if (memo !== void 0) {
|
|
55774
|
+
countFonts(page.resources);
|
|
55775
|
+
images += memo;
|
|
55776
|
+
continue;
|
|
55777
|
+
}
|
|
55778
|
+
let data2;
|
|
55697
55779
|
try {
|
|
55698
|
-
|
|
55699
|
-
|
|
55780
|
+
const parts2 = streams.map((s) => doc.decode(s));
|
|
55781
|
+
data2 = parts2.length === 1 ? parts2[0] : Buffer.concat(parts2.flatMap((p) => [p, Buffer.from("\n")]));
|
|
55782
|
+
} catch (e) {
|
|
55783
|
+
if (isTooLarge(e)) throw e;
|
|
55700
55784
|
complete = false;
|
|
55701
55785
|
countFonts(page.resources);
|
|
55702
55786
|
continue;
|
|
55703
55787
|
}
|
|
55704
|
-
scanStream(
|
|
55705
|
-
|
|
55788
|
+
const drawn = scanStream(data2, page.resources, 0);
|
|
55789
|
+
images += drawn;
|
|
55790
|
+
pageMemo.set(key2, drawn);
|
|
55791
|
+
if (textOps > 0 || exhausted) break;
|
|
55706
55792
|
}
|
|
55707
|
-
return { fonts, textOps, images, complete };
|
|
55793
|
+
return { fonts, textOps, images, complete: complete || textOps > 0 };
|
|
55708
55794
|
}
|
|
55709
55795
|
function contentOperators(data2) {
|
|
55710
55796
|
let text = 0;
|
|
@@ -55715,8 +55801,9 @@ function contentOperators(data2) {
|
|
|
55715
55801
|
const n = data2.length;
|
|
55716
55802
|
while (i2 < n) {
|
|
55717
55803
|
const c2 = data2[i2];
|
|
55718
|
-
if (
|
|
55804
|
+
if (CLASS[c2] === 1) {
|
|
55719
55805
|
i2++;
|
|
55806
|
+
while (i2 < n && CLASS[data2[i2]] === 1) i2++;
|
|
55720
55807
|
continue;
|
|
55721
55808
|
}
|
|
55722
55809
|
if (c2 === 37) {
|
|
@@ -73590,7 +73677,7 @@ import { join as join49 } from "path";
|
|
|
73590
73677
|
|
|
73591
73678
|
// src/html.ts
|
|
73592
73679
|
var MARK4 = { C: "C", NC: "NC", NA: "\u2014", manual: "?" };
|
|
73593
|
-
var
|
|
73680
|
+
var CLASS2 = { C: "c", NC: "nc", NA: "na", manual: "m" };
|
|
73594
73681
|
var T3 = {
|
|
73595
73682
|
fr: {
|
|
73596
73683
|
skip: "Aller au contenu",
|
|
@@ -73677,7 +73764,7 @@ function cellHtml(c2, tag) {
|
|
|
73677
73764
|
if (c2.colspan && c2.colspan > 1) attrs.push(`colspan="${c2.colspan}"`);
|
|
73678
73765
|
let inner;
|
|
73679
73766
|
if (c2.status) {
|
|
73680
|
-
inner = `<span class="st st-${
|
|
73767
|
+
inner = `<span class="st st-${CLASS2[c2.status]}">${esc2(MARK4[c2.status])}</span>`;
|
|
73681
73768
|
} else {
|
|
73682
73769
|
inner = c2.text === "" ? "\u2014" : runHtml({ text: c2.text, mono: c2.mono, strong: c2.strong, ...c2.href ? { href: c2.href } : {} });
|
|
73683
73770
|
}
|
|
@@ -3,7 +3,7 @@ name: review-a11y
|
|
|
3
3
|
description: "Use to REVIEW changed frontend code for accessibility: staged files, a working diff, branch, or PR; prompts such as 'review a11y', 'is this accessible?', or 'anything to fix before merge?'; and hook or CI findings on a change. Run the bundled install-free engine with cross-file JSX/TSX analysis, then adjudicate candidates and return a severity-ranked WCAG 2.2 AA review with file:line fixes, residual rendering risks, and a verdict. Use `ultra11y` instead for whole-repo audits, dated conformance reports, country standards, PRD backlogs, or authoring accessible markup."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: 5.56.
|
|
6
|
+
version: 5.56.1
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# review-a11y — accessibility review of changed code
|