@action-state-group/capsule-viewer 0.7.0 → 0.9.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.
Files changed (61) hide show
  1. package/README.md +6 -1
  2. package/dist/browser.d.ts +1 -0
  3. package/dist/browser.js +5 -0
  4. package/dist/browser.js.map +1 -1
  5. package/dist/compliance-styles.js +7 -0
  6. package/dist/compliance-styles.js.map +1 -1
  7. package/dist/compliance-view.d.ts +4 -3
  8. package/dist/compliance-view.js +145 -90
  9. package/dist/compliance-view.js.map +1 -1
  10. package/dist/contract-report-wording.d.ts +2 -1
  11. package/dist/contract-report-wording.js +41 -3
  12. package/dist/contract-report-wording.js.map +1 -1
  13. package/dist/contract-report.d.ts +16 -1
  14. package/dist/contract-report.js +31 -3
  15. package/dist/contract-report.js.map +1 -1
  16. package/dist/core-strip.d.ts +1 -1
  17. package/dist/core-strip.js +7 -4
  18. package/dist/core-strip.js.map +1 -1
  19. package/dist/emitter-shell.html +16 -0
  20. package/dist/evidence-contract.d.ts +61 -0
  21. package/dist/evidence-contract.js +83 -0
  22. package/dist/evidence-contract.js.map +1 -0
  23. package/dist/evidence-graph-view.d.ts +10 -0
  24. package/dist/evidence-graph-view.js +48 -26
  25. package/dist/evidence-graph-view.js.map +1 -1
  26. package/dist/evidence-graph.iife.js +2872 -1289
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +1 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/outcome-report-styles.js +9 -0
  31. package/dist/outcome-report-styles.js.map +1 -1
  32. package/dist/outcome-report-view.d.ts +21 -6
  33. package/dist/outcome-report-view.js +350 -154
  34. package/dist/outcome-report-view.js.map +1 -1
  35. package/dist/presentation-builder.d.ts +14 -0
  36. package/dist/presentation-builder.js +45 -1
  37. package/dist/presentation-builder.js.map +1 -1
  38. package/dist/presentation-fragment.d.ts +3 -0
  39. package/dist/presentation-fragment.js +9 -0
  40. package/dist/presentation-fragment.js.map +1 -1
  41. package/dist/presentation-mount.d.ts +3 -0
  42. package/dist/presentation-mount.js +2 -0
  43. package/dist/presentation-mount.js.map +1 -1
  44. package/dist/reader-witnesses.d.ts +39 -0
  45. package/dist/reader-witnesses.js +111 -0
  46. package/dist/reader-witnesses.js.map +1 -0
  47. package/dist/report-legend.d.ts +6 -7
  48. package/dist/report-legend.js +16 -9
  49. package/dist/report-legend.js.map +1 -1
  50. package/dist/report-levels.d.ts +11 -0
  51. package/dist/report-levels.js +24 -1
  52. package/dist/report-levels.js.map +1 -1
  53. package/dist/spot-check.js +10 -5
  54. package/dist/spot-check.js.map +1 -1
  55. package/dist/subject-history.d.ts +77 -0
  56. package/dist/subject-history.js +439 -0
  57. package/dist/subject-history.js.map +1 -0
  58. package/dist/viewer-build.js +2 -2
  59. package/dist/wording/contract-report-eu-ai-act.en.json +18 -1
  60. package/dist/wording/contract-report-outcomes.en.json +73 -6
  61. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from "./presentation-builder.js";
3
3
  export * from "./presentation-registry.js";
4
4
  export * from "./builtin-manifests.js";
5
5
  export * from "./presentation-fragment.js";
6
+ export * from "./evidence-contract.js";
package/dist/index.js CHANGED
@@ -9,4 +9,5 @@ export * from "./presentation-builder.js";
9
9
  export * from "./presentation-registry.js";
10
10
  export * from "./builtin-manifests.js";
11
11
  export * from "./presentation-fragment.js";
12
+ export * from "./evidence-contract.js";
12
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4DAA4D;AAC5D,wEAAwE;AACxE,kEAAkE;AAClE,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,6EAA6E;AAC7E,yEAAyE;AACzE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4DAA4D;AAC5D,wEAAwE;AACxE,kEAAkE;AAClE,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,6EAA6E;AAC7E,yEAAyE;AACzE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
@@ -17,6 +17,7 @@
17
17
  import { levelCss } from "./report-levels.js";
18
18
  import { legendCss } from "./report-legend.js";
19
19
  import { OUTCOME_FRAME_VARS } from "./frame-tokens.generated.js";
20
+ import { SUBJECT_HISTORY_CSS } from "./subject-history.js";
20
21
  import { frontCss } from "./report-front-styles.js";
21
22
  export const OUTCOME_REPORT_CSS = `
22
23
  .oi{${OUTCOME_FRAME_VARS}
@@ -213,6 +214,7 @@ export const OUTCOME_REPORT_CSS = `
213
214
  levelCss("oi") +
214
215
  legendCss("oi") +
215
216
  frontCss(".oi") +
217
+ SUBJECT_HISTORY_CSS +
216
218
  // The page layout (one left edge, bordered cards 16px apart): last, so
217
219
  // it wins over the card's older rules above. The page colour is the
218
220
  // shell's (emitter-shell.html), so the frame itself stays transparent.
@@ -226,5 +228,12 @@ export const OUTCOME_REPORT_CSS = `
226
228
  @media (min-width:821px){.oi table.rules th{white-space:nowrap}}
227
229
  .oi table.rules tr.grp td{font-family:inherit;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--slate);padding-top:22px;border-bottom:1px solid var(--line)}
228
230
  @media (max-width:820px){.oi .sheet .pad,.oi .sec,.oi .sec.rp{padding:24px var(--inset)}}
231
+ .oi table.rules tr.tier td{padding-top:28px;border-bottom:2px solid var(--navy)}
232
+ .oi table.rules tr.tier b{display:block;font-family:Georgia,Cambria,serif;font-size:19px;color:var(--navy)}
233
+ .oi table.rules tr.tier small{display:block;color:var(--slate);font-size:12.5px;margin-top:3px}
234
+ .oi .rtier{display:inline-block;font-size:11px;font-weight:700;padding:1px 8px;border-radius:99px;margin-top:3px;background:var(--cream);color:var(--slate)}
235
+ .oi .rtier[data-requirement-tier="must_have"]{background:#E6EEF6;color:#2B5A85}
236
+ .oi .rtier[data-requirement-tier="informational"]{background:#FBEFD9;color:#8A5A00}
237
+ .oi .tier-note{margin:0 0 12px;font-size:13px;color:var(--slate)}
229
238
  `;
230
239
  //# sourceMappingURL=outcome-report-styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"outcome-report-styles.js","sourceRoot":"","sources":["../src/outcome-report-styles.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAC7B;MACI,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LvB;IACC,QAAQ,CAAC,IAAI,CAAC;IACd,SAAS,CAAC,IAAI,CAAC;IACf,QAAQ,CAAC,KAAK,CAAC;IACf,uEAAuE;IACvE,oEAAoE;IACpE,uEAAuE;IACvE;;;;;;;;;;CAUD,CAAC"}
1
+ {"version":3,"file":"outcome-report-styles.js","sourceRoot":"","sources":["../src/outcome-report-styles.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAC7B;MACI,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LvB;IACC,QAAQ,CAAC,IAAI,CAAC;IACd,SAAS,CAAC,IAAI,CAAC;IACf,QAAQ,CAAC,KAAK,CAAC;IACf,mBAAmB;IACnB,uEAAuE;IACvE,oEAAoE;IACpE,uEAAuE;IACvE;;;;;;;;;;;;;;;;;CAiBD,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import type { BundleVerificationResult } from "@action-state-group/agent-action-capsule";
2
- import { type CalibrationWeek, type Conversation, type ConversationVerdict, type CriterionTierReading, type MissedReasonGroup, type ConversationDate, type OutcomeReportModel, type OutcomeReportOptions } from "@action-state-group/agent-action-capsule";
2
+ import { type CalibrationReading, type Conversation, type ConversationVerdict, type CriterionTierReading, type MissedReasonGroup, type ConversationDate, type OutcomeReportModel, type OutcomeReportOptions } from "@action-state-group/agent-action-capsule";
3
3
  import { type Worded } from "./report-levels.js";
4
4
  import { buildVerificationPageModel } from "@action-state-group/agent-action-capsule";
5
5
  import type { ResultRoot } from "@action-state-group/agent-action-capsule";
6
6
  import type { Words } from "./contract-report-wording.js";
7
+ import { type TierOf } from "./evidence-contract.js";
7
8
  /**
8
9
  * A conversation's result. `nothing-applied`: it has rules and every one was
9
10
  * not applicable, so nothing was checked -- never "missed". A conversation
@@ -13,8 +14,22 @@ import type { Words } from "./contract-report-wording.js";
13
14
  * met" -- its own state, never counted as missed.
14
15
  */
15
16
  export type ConversationStatus = "resolved" | "missed" | "unverified" | "undecided" | "nothing-applied";
16
- export declare function conversationStatus(conversation: Conversation): ConversationStatus;
17
- export declare function statusWord(status: ConversationStatus, conversation: Conversation, w: Words): Worded;
17
+ /**
18
+ * How the page reads requirement tiers, when it was built with a contract
19
+ * (contract-report/v1 section 2): each rule's tier, and each conversation
20
+ * as the derived lines read it, its informational rules left out and its
21
+ * result rolled up again over the rest, so an informational rule changes no
22
+ * conversation's result. A conversation not in `counted` is read as it is.
23
+ * Rules whose tier is not stated stay in: only a rule the contract marks
24
+ * informational is left out.
25
+ */
26
+ export interface Gating {
27
+ readonly tierOf: TierOf;
28
+ readonly counted: ReadonlyMap<Conversation, Conversation>;
29
+ }
30
+ export declare function gating(conversations: readonly Conversation[], tierOf: TierOf): Gating;
31
+ export declare function conversationStatus(given: Conversation, gating?: Gating): ConversationStatus;
32
+ export declare function statusWord(status: ConversationStatus, conversation: Conversation, w: Words, gating?: Gating): Worded;
18
33
  /** Why a conversation or session shows no judge's notes, from its reports' states. */
19
34
  export declare function notesGap(states: readonly (string | undefined)[], w: Words): string;
20
35
  /** The proofs rows for a case's transcript, shared by both groupings. */
@@ -44,7 +59,7 @@ export declare function pinAbsence(info: {
44
59
  * label (`terms.reasonCodes`), else the first rule not met; a raw code is
45
60
  * never shown.
46
61
  */
47
- export declare function groupMissedReasons(missed: readonly Conversation[], terms: OutcomeReportModel["terms"], w?: Words): readonly MissedReasonGroup[];
62
+ export declare function groupMissedReasons(missed: readonly Conversation[], terms: OutcomeReportModel["terms"], w?: Words, gating?: Gating): readonly MissedReasonGroup[];
48
63
  export declare function span(days: readonly string[], w: Words): string;
49
64
  /** What a case's date is, in words. */
50
65
  export declare const basisText: (basis: ConversationDate["basis"], w: Words) => string;
@@ -74,5 +89,5 @@ export declare function drawLines(levels: {
74
89
  readonly L0: HTMLElement;
75
90
  readonly L1: HTMLElement;
76
91
  readonly L2: HTMLElement;
77
- }, result: ResultRoot, options: OutcomeReportOptions, bundle: unknown, verified: BundleVerificationResult, w: Words): Promise<void>;
78
- export type { CalibrationWeek, Conversation, ConversationVerdict, CriterionTierReading, MissedReasonGroup, OutcomeReportModel, OutcomeReportOptions, };
92
+ }, result: ResultRoot, options: OutcomeReportOptions, bundle: unknown, verified: BundleVerificationResult, w: Words, tierOf?: TierOf): Promise<void>;
93
+ export type { CalibrationReading, Conversation, ConversationVerdict, CriterionTierReading, MissedReasonGroup, OutcomeReportModel, OutcomeReportOptions, };