@clossys/writer 0.3.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/LICENSE +21 -0
  3. package/README.md +593 -0
  4. package/dist/addressability.d.ts +245 -0
  5. package/dist/addressability.d.ts.map +1 -0
  6. package/dist/addressability.js +567 -0
  7. package/dist/addressability.js.map +1 -0
  8. package/dist/checker.d.ts +159 -0
  9. package/dist/checker.d.ts.map +1 -0
  10. package/dist/checker.js +177 -0
  11. package/dist/checker.js.map +1 -0
  12. package/dist/cli.d.ts +149 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +1049 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/copy-gate.d.ts +107 -0
  17. package/dist/copy-gate.d.ts.map +1 -0
  18. package/dist/copy-gate.js +132 -0
  19. package/dist/copy-gate.js.map +1 -0
  20. package/dist/fingerprint.d.ts +61 -0
  21. package/dist/fingerprint.d.ts.map +1 -0
  22. package/dist/fingerprint.js +64 -0
  23. package/dist/fingerprint.js.map +1 -0
  24. package/dist/index.d.ts +47 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +63 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/locale-coverage.d.ts +227 -0
  29. package/dist/locale-coverage.d.ts.map +1 -0
  30. package/dist/locale-coverage.js +414 -0
  31. package/dist/locale-coverage.js.map +1 -0
  32. package/dist/passage.d.ts +294 -0
  33. package/dist/passage.d.ts.map +1 -0
  34. package/dist/passage.js +463 -0
  35. package/dist/passage.js.map +1 -0
  36. package/dist/path-exclusions.d.ts +114 -0
  37. package/dist/path-exclusions.d.ts.map +1 -0
  38. package/dist/path-exclusions.js +213 -0
  39. package/dist/path-exclusions.js.map +1 -0
  40. package/dist/registry.d.ts +61 -0
  41. package/dist/registry.d.ts.map +1 -0
  42. package/dist/registry.js +64 -0
  43. package/dist/registry.js.map +1 -0
  44. package/dist/resolve.d.ts +33 -0
  45. package/dist/resolve.d.ts.map +1 -0
  46. package/dist/resolve.js +133 -0
  47. package/dist/resolve.js.map +1 -0
  48. package/dist/scan.d.ts +457 -0
  49. package/dist/scan.d.ts.map +1 -0
  50. package/dist/scan.js +1698 -0
  51. package/dist/scan.js.map +1 -0
  52. package/dist/schema.d.ts +81 -0
  53. package/dist/schema.d.ts.map +1 -0
  54. package/dist/schema.js +482 -0
  55. package/dist/schema.js.map +1 -0
  56. package/dist/types.d.ts +268 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/dist/types.js +40 -0
  59. package/dist/types.js.map +1 -0
  60. package/dist/voice/checker.d.ts +186 -0
  61. package/dist/voice/checker.d.ts.map +1 -0
  62. package/dist/voice/checker.js +483 -0
  63. package/dist/voice/checker.js.map +1 -0
  64. package/dist/voice/derivation-coverage.d.ts +168 -0
  65. package/dist/voice/derivation-coverage.d.ts.map +1 -0
  66. package/dist/voice/derivation-coverage.js +181 -0
  67. package/dist/voice/derivation-coverage.js.map +1 -0
  68. package/dist/voice/fields.d.ts +107 -0
  69. package/dist/voice/fields.d.ts.map +1 -0
  70. package/dist/voice/fields.js +144 -0
  71. package/dist/voice/fields.js.map +1 -0
  72. package/dist/voice/index.d.ts +19 -0
  73. package/dist/voice/index.d.ts.map +1 -0
  74. package/dist/voice/index.js +24 -0
  75. package/dist/voice/index.js.map +1 -0
  76. package/dist/voice/internal/parse-template.d.ts +27 -0
  77. package/dist/voice/internal/parse-template.d.ts.map +1 -0
  78. package/dist/voice/internal/parse-template.js +111 -0
  79. package/dist/voice/internal/parse-template.js.map +1 -0
  80. package/dist/voice/internal/pattern-safety.d.ts +111 -0
  81. package/dist/voice/internal/pattern-safety.d.ts.map +1 -0
  82. package/dist/voice/internal/pattern-safety.js +278 -0
  83. package/dist/voice/internal/pattern-safety.js.map +1 -0
  84. package/dist/voice/schema.d.ts +65 -0
  85. package/dist/voice/schema.d.ts.map +1 -0
  86. package/dist/voice/schema.js +535 -0
  87. package/dist/voice/schema.js.map +1 -0
  88. package/dist/voice/types.d.ts +282 -0
  89. package/dist/voice/types.d.ts.map +1 -0
  90. package/dist/voice/types.js +37 -0
  91. package/dist/voice/types.js.map +1 -0
  92. package/package.json +72 -0
  93. package/src/addressability.ts +664 -0
  94. package/src/checker.ts +293 -0
  95. package/src/cli.ts +1166 -0
  96. package/src/copy-gate.ts +197 -0
  97. package/src/fingerprint.ts +66 -0
  98. package/src/index.ts +163 -0
  99. package/src/locale-coverage.ts +512 -0
  100. package/src/passage.ts +644 -0
  101. package/src/path-exclusions.ts +265 -0
  102. package/src/registry.ts +103 -0
  103. package/src/resolve.ts +172 -0
  104. package/src/scan.ts +1959 -0
  105. package/src/schema.ts +528 -0
  106. package/src/types.ts +301 -0
  107. package/src/voice/checker.ts +590 -0
  108. package/src/voice/derivation-coverage.ts +217 -0
  109. package/src/voice/fields.ts +160 -0
  110. package/src/voice/index.ts +55 -0
  111. package/src/voice/internal/parse-template.ts +114 -0
  112. package/src/voice/internal/pattern-safety.ts +336 -0
  113. package/src/voice/schema.ts +585 -0
  114. package/src/voice/types.ts +329 -0
  115. package/templates/voice-record.template.jsonc +135 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,GAG1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,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AAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,YAAY,CAAC,UAAU,CAAC,CAAC;IACtE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;IAC1C,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,gBAAgB,EAAE,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtC,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,gBAAgB,EAAE,CAAC;QACpC,sBAAsB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;QACrC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,GAAG,EAAE,CAAC;IACR,CAAC;AACH,CAAC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * `checkCopyTraceability` — the gate that makes `scan.ts`'s extraction
3
+ * worth having. Pure: takes already-extracted `CopyCandidate[]`/
4
+ * `Citation[]` (see `scan.ts`) and an already-loaded `CopyRecord` (see
5
+ * `./types.js`), does no I/O of its own, and never throws on any input
6
+ * shape — the same discipline `@example/strategy`'s
7
+ * `checkFactsTraceability` holds to in `facts-gate.ts`. `scanCopySourceTree`
8
+ * (see `scan.ts`) is the half that gathers candidates/citations from a
9
+ * real directory; `cli.ts` is what loads a real `CopyRecord` from disk
10
+ * (via the sibling `registry.ts`) and turns this function's result into an
11
+ * exit code.
12
+ *
13
+ * THE RULE, in one sentence: every user-facing string or template literal
14
+ * `scan.ts` extracts from a source tree must either match a registered
15
+ * `CopyEntry.text` (compared by STATIC SHAPE — interpolations collapsed to
16
+ * `PLACEHOLDER_SENTINEL` on both sides, so a source literal's actual
17
+ * expression content and a registered entry's placeholder NAMES never
18
+ * need to agree) or be annotated with a `copy:<id>` comment citing a real
19
+ * entry in the record on the same line — anything else is reported as
20
+ * untraced. This is `@example/strategy`'s `fact:<key>` citation
21
+ * pattern, applied to copy instead of facts.
22
+ *
23
+ * WHAT THIS DELIBERATELY DOES NOT DO, and why:
24
+ *
25
+ * - It does not decide what counts as a "user-facing string" at all —
26
+ * that classification (and every excluded category: import
27
+ * specifiers, object keys, `aria-*`/`data-*` values, class-name
28
+ * builder arguments, developer diagnostics, decorative glyphs, enum
29
+ * tokens, ...) already happened in `scan.ts`, which is the file with
30
+ * the actual judgment calls and the comment explaining each one. This
31
+ * file only ever sees candidates `scan.ts` already decided are
32
+ * in-scope; it has no opinion of its own about scope.
33
+ * - It does not scan raw source text for `copy:<id>` citations or
34
+ * `copy-gate:ignore` markers itself — `scan.ts` already did that (see
35
+ * its `scanLineMarkers`) while it had the file's content in hand, and
36
+ * attached the result to each `CopyCandidate`/the scan's flat
37
+ * `Citation[]`. This file only ever looks those up against a
38
+ * `CopyRecord`'s real ids.
39
+ * - It does not validate the `CopyRecord` itself (a placeholder declared
40
+ * but missing from its own entry's `text`, a malformed id, a
41
+ * duplicate id) — that is `schema.ts`'s job, upstream of this
42
+ * function ever being called. A `CopyRecord` that reaches this
43
+ * function is assumed already well-formed; `cli.ts` is responsible for
44
+ * refusing to call this function at all on one that isn't (see its own
45
+ * exit-code discipline).
46
+ * - It does not resolve a `CopyEntry.factRef` against a real facts
47
+ * registry — the exact same deliberately-left-open seam
48
+ * `@clossys/writer/voice`'s `Claim.factRef` and this package's own
49
+ * `CopyEntry.factRef` both describe in their doc comments. A gate with
50
+ * visibility into both a `CopyRecord` and a real facts registry is a
51
+ * different, later gate.
52
+ */
53
+ import { type Citation, type CopyCandidate, type UncheckedItem } from "./scan.js";
54
+ import type { CopyRecord } from "./types.js";
55
+ export type CopyGateRule = "unregistered-copy" | "unknown-copy-citation";
56
+ export interface CopyGateFinding {
57
+ rule: CopyGateRule;
58
+ /** Always `"error"` — the same single-severity design `@example/strategy`'s `FactsGateFinding` uses: a piece of copy is either traced to a registered entry or it isn't. */
59
+ severity: "error";
60
+ file: string;
61
+ line: number;
62
+ message: string;
63
+ /** The literal's raw source text (quotes included), trimmed/length-capped, for a human scanning a report. */
64
+ snippet: string;
65
+ }
66
+ export interface CopyGateIgnored {
67
+ file: string;
68
+ line: number;
69
+ snippet: string;
70
+ }
71
+ export interface CopyGateResult {
72
+ findings: CopyGateFinding[];
73
+ /** Every candidate explicitly suppressed via a `copy-gate:ignore` marker on its own source line — recorded, never silent. */
74
+ ignored: CopyGateIgnored[];
75
+ /** Echoed straight from `ScanResult.filesScanned` (see `scan.ts`) so a caller/report has one number to check for "at least one file scanned" without re-deriving it from `candidates`, which could legitimately be empty even for a real, successful scan. */
76
+ filesScanned: number;
77
+ /** Total candidates evaluated — a sanity total, the same role `FactsGateResult.claimsScanned` plays: lets a caller tell "zero findings because nothing looked like copy" apart from "zero findings because every candidate traced cleanly". */
78
+ candidatesScanned: number;
79
+ /** Candidates that matched a registered entry's text shape or a valid `copy:<id>` citation. */
80
+ matched: number;
81
+ /**
82
+ * Echoed straight from `ScanResult.unchecked` (see `scan.ts`) —
83
+ * constructs the scanner recognized as JSX-shaped but could not
84
+ * classify. This is passed through UNCHANGED, never filtered or
85
+ * summarized away: a caller that reads `findings` and ignores this
86
+ * field can end up exactly where issue #37 started — reporting a clean
87
+ * result over a file part of which was never actually examined.
88
+ * `cli.ts` is the one that turns a non-empty list here into something
89
+ * an operator cannot miss; see its own doc comment for exactly where
90
+ * that lands in the exit-code contract.
91
+ */
92
+ unchecked: UncheckedItem[];
93
+ }
94
+ /**
95
+ * Evaluates every `candidate` against `record`, using `citations` for the
96
+ * "cites an id that does not exist" check. Never throws: an `entries`
97
+ * array that is empty is valid input (every candidate will simply be
98
+ * untraced), and a `CopyCandidate[]`/`Citation[]` produced from any file
99
+ * content — however unusual — is evaluated with no assumption about its
100
+ * shape beyond what `scan.ts`'s own types already guarantee. `unchecked`
101
+ * is required, not optional, and passed straight through onto
102
+ * `CopyGateResult.unchecked` unmodified — a caller cannot construct a
103
+ * `CopyGateResult` from this function while accidentally forgetting that
104
+ * field exists.
105
+ */
106
+ export declare function checkCopyTraceability(candidates: CopyCandidate[], citations: Citation[], record: CopyRecord, filesScanned: number, unchecked: UncheckedItem[]): CopyGateResult;
107
+ //# sourceMappingURL=copy-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-gate.d.ts","sourceRoot":"","sources":["../src/copy-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAwB,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACxG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;AAEzE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,YAAY,CAAC;IACnB,4KAA4K;IAC5K,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,6GAA6G;IAC7G,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,6HAA6H;IAC7H,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,8PAA8P;IAC9P,YAAY,EAAE,MAAM,CAAC;IACrB,+OAA+O;IAC/O,iBAAiB,EAAE,MAAM,CAAC;IAC1B,+FAA+F;IAC/F,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;OAUG;IACH,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AA6BD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,aAAa,EAAE,EAC3B,SAAS,EAAE,QAAQ,EAAE,EACrB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,aAAa,EAAE,GACzB,cAAc,CAoDhB"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * `checkCopyTraceability` — the gate that makes `scan.ts`'s extraction
3
+ * worth having. Pure: takes already-extracted `CopyCandidate[]`/
4
+ * `Citation[]` (see `scan.ts`) and an already-loaded `CopyRecord` (see
5
+ * `./types.js`), does no I/O of its own, and never throws on any input
6
+ * shape — the same discipline `@example/strategy`'s
7
+ * `checkFactsTraceability` holds to in `facts-gate.ts`. `scanCopySourceTree`
8
+ * (see `scan.ts`) is the half that gathers candidates/citations from a
9
+ * real directory; `cli.ts` is what loads a real `CopyRecord` from disk
10
+ * (via the sibling `registry.ts`) and turns this function's result into an
11
+ * exit code.
12
+ *
13
+ * THE RULE, in one sentence: every user-facing string or template literal
14
+ * `scan.ts` extracts from a source tree must either match a registered
15
+ * `CopyEntry.text` (compared by STATIC SHAPE — interpolations collapsed to
16
+ * `PLACEHOLDER_SENTINEL` on both sides, so a source literal's actual
17
+ * expression content and a registered entry's placeholder NAMES never
18
+ * need to agree) or be annotated with a `copy:<id>` comment citing a real
19
+ * entry in the record on the same line — anything else is reported as
20
+ * untraced. This is `@example/strategy`'s `fact:<key>` citation
21
+ * pattern, applied to copy instead of facts.
22
+ *
23
+ * WHAT THIS DELIBERATELY DOES NOT DO, and why:
24
+ *
25
+ * - It does not decide what counts as a "user-facing string" at all —
26
+ * that classification (and every excluded category: import
27
+ * specifiers, object keys, `aria-*`/`data-*` values, class-name
28
+ * builder arguments, developer diagnostics, decorative glyphs, enum
29
+ * tokens, ...) already happened in `scan.ts`, which is the file with
30
+ * the actual judgment calls and the comment explaining each one. This
31
+ * file only ever sees candidates `scan.ts` already decided are
32
+ * in-scope; it has no opinion of its own about scope.
33
+ * - It does not scan raw source text for `copy:<id>` citations or
34
+ * `copy-gate:ignore` markers itself — `scan.ts` already did that (see
35
+ * its `scanLineMarkers`) while it had the file's content in hand, and
36
+ * attached the result to each `CopyCandidate`/the scan's flat
37
+ * `Citation[]`. This file only ever looks those up against a
38
+ * `CopyRecord`'s real ids.
39
+ * - It does not validate the `CopyRecord` itself (a placeholder declared
40
+ * but missing from its own entry's `text`, a malformed id, a
41
+ * duplicate id) — that is `schema.ts`'s job, upstream of this
42
+ * function ever being called. A `CopyRecord` that reaches this
43
+ * function is assumed already well-formed; `cli.ts` is responsible for
44
+ * refusing to call this function at all on one that isn't (see its own
45
+ * exit-code discipline).
46
+ * - It does not resolve a `CopyEntry.factRef` against a real facts
47
+ * registry — the exact same deliberately-left-open seam
48
+ * `@clossys/writer/voice`'s `Claim.factRef` and this package's own
49
+ * `CopyEntry.factRef` both describe in their doc comments. A gate with
50
+ * visibility into both a `CopyRecord` and a real facts registry is a
51
+ * different, later gate.
52
+ */
53
+ import { PLACEHOLDER_SENTINEL } from "./scan.js";
54
+ /** The same `{name}` brace-delimited placeholder convention `schema.ts` checks `CopyEntry.text` against — collapsed here to the identical sentinel `scan.ts` uses for a source literal's `${...}` interpolations, so the two sides compare as the same shape regardless of what name either side chose. */
55
+ const ENTRY_PLACEHOLDER_RE = /\{[^{}]+\}/g;
56
+ function normalizeEntryText(text) {
57
+ return text.replace(ENTRY_PLACEHOLDER_RE, PLACEHOLDER_SENTINEL);
58
+ }
59
+ function snippetOf(text, max = 120) {
60
+ const trimmed = text.trim();
61
+ return trimmed.length > max ? `${trimmed.slice(0, max)}…` : trimmed;
62
+ }
63
+ function buildCopyIndex(record) {
64
+ const byId = new Set();
65
+ const byNormalizedText = new Set();
66
+ for (const entry of record.entries) {
67
+ byId.add(entry.id);
68
+ byNormalizedText.add(normalizeEntryText(entry.text));
69
+ }
70
+ return { byId, byNormalizedText };
71
+ }
72
+ /**
73
+ * Evaluates every `candidate` against `record`, using `citations` for the
74
+ * "cites an id that does not exist" check. Never throws: an `entries`
75
+ * array that is empty is valid input (every candidate will simply be
76
+ * untraced), and a `CopyCandidate[]`/`Citation[]` produced from any file
77
+ * content — however unusual — is evaluated with no assumption about its
78
+ * shape beyond what `scan.ts`'s own types already guarantee. `unchecked`
79
+ * is required, not optional, and passed straight through onto
80
+ * `CopyGateResult.unchecked` unmodified — a caller cannot construct a
81
+ * `CopyGateResult` from this function while accidentally forgetting that
82
+ * field exists.
83
+ */
84
+ export function checkCopyTraceability(candidates, citations, record, filesScanned, unchecked) {
85
+ const index = buildCopyIndex(record);
86
+ const findings = [];
87
+ const ignored = [];
88
+ let matched = 0;
89
+ // Pass 1: citations to a copy id that does not exist — checked over
90
+ // EVERY citation found anywhere in the scanned tree, independent of
91
+ // whether a candidate happens to share its line, mirroring
92
+ // `@example/strategy`'s `facts-gate.ts` Pass 1 (see `scan.ts`'s
93
+ // `Citation` doc comment for why).
94
+ for (const citation of citations) {
95
+ if (!index.byId.has(citation.id)) {
96
+ findings.push({
97
+ rule: "unknown-copy-citation",
98
+ severity: "error",
99
+ file: citation.file,
100
+ line: citation.line,
101
+ message: `cites copy id "${citation.id}", which does not exist in the copy record — a citation to a rotted or misspelled id silently defeats this gate`,
102
+ snippet: `copy:${citation.id}`,
103
+ });
104
+ }
105
+ }
106
+ // Pass 2: every candidate, traced or not.
107
+ for (const candidate of candidates) {
108
+ if (candidate.hasIgnoreMarker) {
109
+ ignored.push({ file: candidate.file, line: candidate.line, snippet: candidate.raw });
110
+ continue;
111
+ }
112
+ const hasValidCitation = candidate.citedIds.some((id) => index.byId.has(id));
113
+ if (hasValidCitation || index.byNormalizedText.has(candidate.normalized)) {
114
+ matched++;
115
+ continue;
116
+ }
117
+ findings.push({
118
+ rule: "unregistered-copy",
119
+ severity: "error",
120
+ file: candidate.file,
121
+ line: candidate.line,
122
+ message: candidate.kind === "template"
123
+ ? `template literal ${candidate.raw} does not match any registered copy entry's text (shape-compared, interpolations ignored), and carries no valid "copy:<id>" citation`
124
+ : candidate.kind === "jsx-text"
125
+ ? `JSX text "${candidate.raw}" does not match any registered copy entry's text, and carries no valid "copy:<id>" citation`
126
+ : `string ${candidate.raw} does not match any registered copy entry's text, and carries no valid "copy:<id>" citation`,
127
+ snippet: snippetOf(candidate.raw),
128
+ });
129
+ }
130
+ return { findings, ignored, filesScanned, candidatesScanned: candidates.length, matched, unchecked };
131
+ }
132
+ //# sourceMappingURL=copy-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-gate.js","sourceRoot":"","sources":["../src/copy-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,oBAAoB,EAAyD,MAAM,WAAW,CAAC;AA8CxG,2SAA2S;AAC3S,MAAM,oBAAoB,GAAG,aAAa,CAAC;AAE3C,SAAS,kBAAkB,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,SAAS,CAAC,IAAY,EAAE,GAAG,GAAG,GAAG;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,OAAO,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,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E,CAAC;AACvG,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * `computeCopyFingerprint` — a deterministic, content-derived digest of a
3
+ * copy entry's `text`, and nothing else (no locale, no timestamp, no id
4
+ * folded in). This is the one piece of machinery that makes real
5
+ * stale-translation detection possible: `locale-coverage.ts`'s
6
+ * `checkLocaleCoverage` compares a target entry's recorded
7
+ * `translation.sourceFingerprint` (`types.ts`'s `CopyTranslationProvenance`)
8
+ * against a fresh `computeCopyFingerprint(sourceEntry.text)` to decide
9
+ * whether a translation is still current.
10
+ *
11
+ * WHY CONTENT-DERIVED, NEVER A HUMAN-MAINTAINED REVISION NUMBER
12
+ * ---------------------------------------------------------------------------
13
+ * A translation is stale exactly when the source text it was translated
14
+ * from no longer matches the current source text — that is the whole
15
+ * definition. A hand-bumped revision counter answers a related but weaker
16
+ * question ("did someone remember to bump the number"), and nothing in this
17
+ * package's schema, or any schema, can enforce that a human touches the
18
+ * counter in lockstep with every edit to `text`. A bumped counter next to
19
+ * an untouched sentence looks identical, at the type level, to a genuinely
20
+ * re-reviewed one — the discipline can drift silently, the same
21
+ * "check that passes because it checked nothing" failure mode
22
+ * `locale-coverage.ts`'s own top-of-file doc comment (and
23
+ * `scripts/check-release-readiness.mjs`'s header, which it cites) already
24
+ * warns about elsewhere in this package.
25
+ *
26
+ * A content hash cannot drift the same way. If the source `text` changed by
27
+ * one character, `computeCopyFingerprint` returns a different value with
28
+ * certainty; if it did not change, it returns the same value with equal
29
+ * certainty. It requires no human bookkeeping to stay correct — the
30
+ * fingerprint IS the source text, deterministically restated, rather than
31
+ * someone's claim about the source text.
32
+ *
33
+ * Uses `node:crypto`, a Node.js built-in — not a runtime dependency. This
34
+ * follows the exact precedent `registry.ts` already set for `node:fs`: see
35
+ * this package's README, "The single most important constraint", and
36
+ * `types.ts`'s own doc comment on this package's zero-runtime-dependency
37
+ * discipline.
38
+ */
39
+ /**
40
+ * The digest algorithm `computeCopyFingerprint` uses, and the value every
41
+ * `CopyTranslationProvenance.fingerprintAlgorithm` produced by this function
42
+ * should record. Exported as a named constant, not hardcoded at each call
43
+ * site, so a future algorithm change is one edit instead of several
44
+ * independently-drifting string literals.
45
+ */
46
+ export declare const COPY_FINGERPRINT_ALGORITHM = "sha256";
47
+ /**
48
+ * Computes a deterministic, content-derived fingerprint of `text` — a
49
+ * `sha256` hex digest, nothing else folded in (no locale, no id, no
50
+ * timestamp). Pure: the same `text` always produces the same fingerprint,
51
+ * on any machine, in any process.
52
+ *
53
+ * A consumer's own translation tooling should call this at the moment a
54
+ * translation is actually produced, recording the result as
55
+ * `translation.sourceFingerprint` alongside `COPY_FINGERPRINT_ALGORITHM` as
56
+ * `translation.fingerprintAlgorithm` — the same function
57
+ * `checkLocaleCoverage` will later call again, on the then-current source
58
+ * `text`, to decide whether that recorded fingerprint still matches.
59
+ */
60
+ export declare function computeCopyFingerprint(text: string): string;
61
+ //# sourceMappingURL=fingerprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3D"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * `computeCopyFingerprint` — a deterministic, content-derived digest of a
3
+ * copy entry's `text`, and nothing else (no locale, no timestamp, no id
4
+ * folded in). This is the one piece of machinery that makes real
5
+ * stale-translation detection possible: `locale-coverage.ts`'s
6
+ * `checkLocaleCoverage` compares a target entry's recorded
7
+ * `translation.sourceFingerprint` (`types.ts`'s `CopyTranslationProvenance`)
8
+ * against a fresh `computeCopyFingerprint(sourceEntry.text)` to decide
9
+ * whether a translation is still current.
10
+ *
11
+ * WHY CONTENT-DERIVED, NEVER A HUMAN-MAINTAINED REVISION NUMBER
12
+ * ---------------------------------------------------------------------------
13
+ * A translation is stale exactly when the source text it was translated
14
+ * from no longer matches the current source text — that is the whole
15
+ * definition. A hand-bumped revision counter answers a related but weaker
16
+ * question ("did someone remember to bump the number"), and nothing in this
17
+ * package's schema, or any schema, can enforce that a human touches the
18
+ * counter in lockstep with every edit to `text`. A bumped counter next to
19
+ * an untouched sentence looks identical, at the type level, to a genuinely
20
+ * re-reviewed one — the discipline can drift silently, the same
21
+ * "check that passes because it checked nothing" failure mode
22
+ * `locale-coverage.ts`'s own top-of-file doc comment (and
23
+ * `scripts/check-release-readiness.mjs`'s header, which it cites) already
24
+ * warns about elsewhere in this package.
25
+ *
26
+ * A content hash cannot drift the same way. If the source `text` changed by
27
+ * one character, `computeCopyFingerprint` returns a different value with
28
+ * certainty; if it did not change, it returns the same value with equal
29
+ * certainty. It requires no human bookkeeping to stay correct — the
30
+ * fingerprint IS the source text, deterministically restated, rather than
31
+ * someone's claim about the source text.
32
+ *
33
+ * Uses `node:crypto`, a Node.js built-in — not a runtime dependency. This
34
+ * follows the exact precedent `registry.ts` already set for `node:fs`: see
35
+ * this package's README, "The single most important constraint", and
36
+ * `types.ts`'s own doc comment on this package's zero-runtime-dependency
37
+ * discipline.
38
+ */
39
+ import { createHash } from "node:crypto";
40
+ /**
41
+ * The digest algorithm `computeCopyFingerprint` uses, and the value every
42
+ * `CopyTranslationProvenance.fingerprintAlgorithm` produced by this function
43
+ * should record. Exported as a named constant, not hardcoded at each call
44
+ * site, so a future algorithm change is one edit instead of several
45
+ * independently-drifting string literals.
46
+ */
47
+ export const COPY_FINGERPRINT_ALGORITHM = "sha256";
48
+ /**
49
+ * Computes a deterministic, content-derived fingerprint of `text` — a
50
+ * `sha256` hex digest, nothing else folded in (no locale, no id, no
51
+ * timestamp). Pure: the same `text` always produces the same fingerprint,
52
+ * on any machine, in any process.
53
+ *
54
+ * A consumer's own translation tooling should call this at the moment a
55
+ * translation is actually produced, recording the result as
56
+ * `translation.sourceFingerprint` alongside `COPY_FINGERPRINT_ALGORITHM` as
57
+ * `translation.fingerprintAlgorithm` — the same function
58
+ * `checkLocaleCoverage` will later call again, on the then-current source
59
+ * `text`, to decide whether that recorded fingerprint still matches.
60
+ */
61
+ export function computeCopyFingerprint(text) {
62
+ return createHash(COPY_FINGERPRINT_ALGORITHM).update(text, "utf8").digest("hex");
63
+ }
64
+ //# sourceMappingURL=fingerprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,UAAU,CAAC,0BAA0B,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnF,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @clossys/writer — public entry point. See README.md for the full
3
+ * picture: the machinery-vs-values split this package mirrors from
4
+ * the package's voice contract (itself mirroring @example/ui/tokens), the
5
+ * frozen CopyEntry/CopyRecord contract, and exactly what checkCopyRecord
6
+ * does and does not attempt.
7
+ *
8
+ * Two halves ship from here, mirroring the split @example/strategy
9
+ * draws between its own entity/reader half and its facts gate:
10
+ *
11
+ * 1. THE REGISTRY. CopyEntry/CopyRecord (`types.ts`), their validation
12
+ * (`schema.ts`), and `readCopyRecord` (`registry.ts`) — a consumer
13
+ * registers its own copy and this package can load and validate it.
14
+ * 2. THE SCANNER GATE. `scanCopySourceTree` (`scan.ts`) walks a real
15
+ * source tree and extracts every user-facing string/template literal
16
+ * as a `CopyCandidate`; `checkCopyTraceability` (`copy-gate.ts`) is
17
+ * the pure gate that checks each one against a `CopyRecord`. `cli.ts`
18
+ * wires both, plus `readCopyRecord`, into `writer-check`, an installable
19
+ * CLI with the same three-state exit-code contract
20
+ * `strategy-facts-check` uses: 0 clean, 1 findings, 2 could not run.
21
+ * `cli.ts` itself is intentionally NOT re-exported here — matching
22
+ * `@example/strategy`'s own index.ts, a CLI's `main`/argv
23
+ * handling is not library surface, only its `bin` entry is.
24
+ */
25
+ export type { CopyEntry, CopyEntryId, CopyEntryStatus, CopyFinding, CopyLocale, CopyRef, CopyRegistry, CopyRegistryEntry, CopyResolution, CopyResolver, CopySource, CopyTranslationProvenance, CopyValue, CopyRecord, } from "./types.js";
26
+ export { computeCopyFingerprint, COPY_FINGERPRINT_ALGORITHM } from "./fingerprint.js";
27
+ export { parseCopyRecord, parseCopyRegistry, validateCopyRecordShape, validateCopyRegistryShape } from "./schema.js";
28
+ export { createCopyResolver, resolveCopyRef } from "./resolve.js";
29
+ export type { CopyResolveIssue, CopyResolveIssueReason, CopyResolveResult } from "./resolve.js";
30
+ export { readCopyRecord } from "./registry.js";
31
+ export type { CopyRegistryReadIssue, CopyRegistryReadIssueReason, CopyRegistryReadResult } from "./registry.js";
32
+ export { checkCopyRecord } from "./checker.js";
33
+ export type { CopyEntryCheckResult, CopyEntrySkip, CopyRecordCheckOptions, CopyRecordCheckReport, CopyRecordFinding, CopyRecordWaivedFinding, } from "./checker.js";
34
+ export * from "./voice/index.js";
35
+ export { extractCopyCandidates, PLACEHOLDER_SENTINEL, scanCopySourceTree } from "./scan.js";
36
+ export type { Citation, CopyCandidate, ExcludedLiteral, ExclusionReason, ParseFailure, ScanOptions, ScanResult, SkippedFile, UncheckedItem, } from "./scan.js";
37
+ export { validatePathExclusions } from "./path-exclusions.js";
38
+ export type { ExcludedPath, PathExclusion, PathExclusionFinding, PathExclusionFindingRule, PathExclusionValidation, } from "./path-exclusions.js";
39
+ export { checkCopyTraceability } from "./copy-gate.js";
40
+ export type { CopyGateFinding, CopyGateIgnored, CopyGateResult, CopyGateRule } from "./copy-gate.js";
41
+ export { checkAddressability, extractAddressabilityCandidates, scanAddressabilitySources, } from "./addressability.js";
42
+ export type { AddressabilityGateResult, AddressabilityPosition, AddressabilityScanOptions, AddressabilityScanResult, AddressabilityUncheckedItem, AddressabilityVerdict, AddressabilityViolation, } from "./addressability.js";
43
+ export { checkLocaleCoverage } from "./locale-coverage.js";
44
+ export type { LocaleCoverageFinding, LocaleCoverageReport, LocaleCoverageSkip, LocaleCoverageSkipReason, } from "./locale-coverage.js";
45
+ export { checkPassageComposition, classifyPassageField, parsePassageRecord, readPassageRecord, validatePassageRecordShape, } from "./passage.js";
46
+ export type { Passage, PassageEntryReference, PassageFieldClassification, PassageFinding, PassageGateResult, PassageId, PassageRecord, PassageReference, PassageRegistryReadIssue, PassageRegistryReadIssueReason, PassageRegistryReadResult, PassageTermReference, PassageUnclassifiedItem, PassageVerdict, PassageViolation, PassageViolationRule, } from "./passage.js";
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,YAAY,EACV,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,yBAAyB,EACzB,SAAS,EACT,UAAU,GACX,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAErH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,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zB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @clossys/writer — public entry point. See README.md for the full
3
+ * picture: the machinery-vs-values split this package mirrors from
4
+ * the package's voice contract (itself mirroring @example/ui/tokens), the
5
+ * frozen CopyEntry/CopyRecord contract, and exactly what checkCopyRecord
6
+ * does and does not attempt.
7
+ *
8
+ * Two halves ship from here, mirroring the split @example/strategy
9
+ * draws between its own entity/reader half and its facts gate:
10
+ *
11
+ * 1. THE REGISTRY. CopyEntry/CopyRecord (`types.ts`), their validation
12
+ * (`schema.ts`), and `readCopyRecord` (`registry.ts`) — a consumer
13
+ * registers its own copy and this package can load and validate it.
14
+ * 2. THE SCANNER GATE. `scanCopySourceTree` (`scan.ts`) walks a real
15
+ * source tree and extracts every user-facing string/template literal
16
+ * as a `CopyCandidate`; `checkCopyTraceability` (`copy-gate.ts`) is
17
+ * the pure gate that checks each one against a `CopyRecord`. `cli.ts`
18
+ * wires both, plus `readCopyRecord`, into `writer-check`, an installable
19
+ * CLI with the same three-state exit-code contract
20
+ * `strategy-facts-check` uses: 0 clean, 1 findings, 2 could not run.
21
+ * `cli.ts` itself is intentionally NOT re-exported here — matching
22
+ * `@example/strategy`'s own index.ts, a CLI's `main`/argv
23
+ * handling is not library surface, only its `bin` entry is.
24
+ */
25
+ // Content-derived fingerprinting for translation provenance — see
26
+ // fingerprint.ts's and locale-coverage.ts's doc comments for why a source
27
+ // text is fingerprinted rather than tracked by a human-maintained revision.
28
+ export { computeCopyFingerprint, COPY_FINGERPRINT_ALGORITHM } from "./fingerprint.js";
29
+ export { parseCopyRecord, parseCopyRegistry, validateCopyRecordShape, validateCopyRegistryShape } from "./schema.js";
30
+ export { createCopyResolver, resolveCopyRef } from "./resolve.js";
31
+ export { readCopyRecord } from "./registry.js";
32
+ export { checkCopyRecord } from "./checker.js";
33
+ // Voice is a first-class part of copy. It is available from this root entry
34
+ // point for a single-package experience and from the focused `copy/voice`
35
+ // subpath for consumers that only need the verbal contract.
36
+ export * from "./voice/index.js";
37
+ export { extractCopyCandidates, PLACEHOLDER_SENTINEL, scanCopySourceTree } from "./scan.js";
38
+ // Path exclusions for scanCopySourceTree's scanning surface — see
39
+ // path-exclusions.ts's top doc comment for the "mention vs. use" case this
40
+ // exists for, and why it is a DIFFERENT feature from scan.ts's own
41
+ // ExclusionReason (a per-literal classification, not a per-file scope
42
+ // decision).
43
+ export { validatePathExclusions } from "./path-exclusions.js";
44
+ export { checkCopyTraceability } from "./copy-gate.js";
45
+ // Copy ADDRESSABILITY: is user-facing prose resolved from the copy
46
+ // registry by id, or typed inline in a component? A different, stricter
47
+ // question than traceability above — see addressability.ts's top doc
48
+ // comment for the full split.
49
+ export { checkAddressability, extractAddressabilityCandidates, scanAddressabilitySources, } from "./addressability.js";
50
+ // Locale-coverage governance: is every declared locale covered by a source
51
+ // locale's registry, where has a target locale drifted, has a translation
52
+ // gone stale against an edited source (via content fingerprint), and does
53
+ // every entry's interpolation stay in parity across locales? See
54
+ // locale-coverage.ts's top-of-file doc comment for the full design.
55
+ export { checkLocaleCoverage } from "./locale-coverage.js";
56
+ // The PASSAGE LAYER (issue #373) — the missing middle between a single
57
+ // CopyEntry and a whole document: a Passage composes entry/term
58
+ // REFERENCES the way a UI block composes atoms. See passage.ts's top doc
59
+ // comment for the full design, the ternary, and what this gate
60
+ // deliberately does not attempt (referential integrity against a real
61
+ // CopyRecord/glossary — a different, later gate).
62
+ export { checkPassageComposition, classifyPassageField, parsePassageRecord, readPassageRecord, validatePassageRecordShape, } from "./passage.js";
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAmBH,kEAAkE;AAClE,0EAA0E;AAC1E,4EAA4E;AAC5E,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAErH,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGlE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAU/C,4EAA4E;AAC5E,0EAA0E;AAC1E,4DAA4D;AAC5D,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAa5F,kEAAkE;AAClE,2EAA2E;AAC3E,mEAAmE;AACnE,sEAAsE;AACtE,aAAa;AACb,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAS9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,mEAAmE;AACnE,wEAAwE;AACxE,qEAAqE;AACrE,8BAA8B;AAC9B,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAW7B,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,iEAAiE;AACjE,oEAAoE;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,uEAA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