@thehammer/template-verification 0.2.17 → 0.2.18

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.
@@ -10,7 +10,7 @@ import type { MetaCarrier } from "../types";
10
10
  * value — and with no `initVerification` call at all it still renders and never
11
11
  * throws.
12
12
  *
13
- * ==== THE MARK IS THE WHOLE SURFACE. THERE IS NOTHING ELSE ====
13
+ * ==== HANDING OFF IS THE WHOLE SURFACE. NOTHING OPENS IN HERE ====
14
14
  *
15
15
  * What used to be here as well: a 90vw x 90vh tabbed Inspector dialog, a hover
16
16
  * panel summarising confidence and citation counts, and `contenteditable` on
@@ -18,11 +18,20 @@ import type { MetaCarrier } from "../types";
18
18
  * disabled. A letter is a document. Reviewing a value — reading its citations,
19
19
  * seeing the record it belongs to, correcting it — is the embedding app's job,
20
20
  * and that app already does all three better than a dialog squeezed into an
21
- * iframe ever could. Everything a reader can do from here is: click the mark.
21
+ * iframe ever could. Everything a reader can do from here is name a data point
22
+ * to the embedder; this component still opens, toggles and fetches nothing.
22
23
  *
23
- * The mark's own summary now lives in its ACCESSIBLE NAME rather than in a
24
- * hover panel, so the same sentence reaches a screen reader and a mouse
25
- * hovering the glyph, and neither costs a second piece of chrome in the page.
24
+ * SG-764 widened HOW that naming is triggered, not what it does. There are two
25
+ * ways to say "this one", and they post the identical message: the mark, and
26
+ * the VALUE itself, which carries the dotted underline saying it can be
27
+ * corrected. The mark was the only one for a while, and a 0.85em glyph is not
28
+ * what a reviewer reading a letter points at — see the value span in the
29
+ * template below for the full reasoning, including why the value is not also a
30
+ * tab stop.
31
+ *
32
+ * The mark's own summary lives in its ACCESSIBLE NAME rather than in a hover
33
+ * panel, so the same sentence reaches a screen reader and a mouse hovering the
34
+ * glyph, and neither costs a second piece of chrome in the page.
26
35
  *
27
36
  * ==== PLACEMENT: MOSTLY OUTSIDE THE VALUE, NEVER IN ITS OWN RESERVED SPACE ====
28
37
  *
@@ -6,5 +6,30 @@
6
6
  * components and the print-chrome regression test agree on one source of truth.
7
7
  */
8
8
  export declare const CHROME_CLASS = "tv-chrome";
9
+ /**
10
+ * Class applied to a rendered VALUE the reader can correct — the dotted
11
+ * underline plus the pointer cursor that say "this is a data point, click it"
12
+ * (SG-764). Its condition is the same one that decides whether the value is a
13
+ * click target at all: a real `anchor` on the point's `__meta`, which is the
14
+ * only thing that gives the save endpoint somewhere to write. An unanchored
15
+ * point never wears it, so the mark can never promise an edit that cannot be
16
+ * saved.
17
+ *
18
+ * ==== WHY THIS IS NOT `CHROME_CLASS`, AND WHY IT IS NOT A SECOND PRINT RULE ====
19
+ *
20
+ * `CHROME_CLASS` marks an ELEMENT as the library's own — a settings button, an
21
+ * overlay mark — and print deletes it whole. That is deliberately kept OFF the
22
+ * field's value, which is the host's content and must print (a regression test
23
+ * asserts exactly that separation). This class is the other kind of thing: the
24
+ * library painting a screen-only decoration ONTO host content. The element
25
+ * stays; only the paint goes.
26
+ *
27
+ * The two are therefore removed DIFFERENTLY — `display: none` versus
28
+ * `border-bottom: none` — but by the SAME `@media print` block, in
29
+ * `VerificationChrome.vue`, which is the only file in this package that carries
30
+ * one. A second print rule beside the first is how the on-paper answer ends up
31
+ * being decided in two places; `printChrome.test.ts` fails if one appears.
32
+ */
33
+ export declare const EDITABLE_CLASS = "tv-editable";
9
34
  /** localStorage key holding the persisted overlay enabled/disabled state. */
10
35
  export declare const ENABLED_STORAGE_KEY = "template-verification:enabled";
package/dist/index.d.ts CHANGED
@@ -40,5 +40,5 @@ export { walkDataPoints } from "./lib/walk";
40
40
  export type { WalkedDataPoint } from "./lib/walk";
41
41
  export { computeProgress } from "./lib/progress";
42
42
  export type { VerificationProgress } from "./lib/progress";
43
- export { CHROME_CLASS, ENABLED_STORAGE_KEY } from "./constants";
43
+ export { CHROME_CLASS, EDITABLE_CLASS, ENABLED_STORAGE_KEY } from "./constants";
44
44
  export type { VerificationStatus, ResolvedSource, SourceChoice, VerificationSource, ExtractedCandidate, HumanCitation, OverrideCandidate, ClaimCandidate, CandidateSet, DataPointAnchor, ResolvedValue, DataPointMeta, MetaCarrier, SaveOverrideArgs, SaveOverrideFn, } from "./types";