@action-state-group/capsule-viewer 0.0.0 → 0.3.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.
- package/LICENSE +201 -0
- package/LICENSE-BSD-3-Clause +28 -0
- package/README.md +94 -1
- package/dist/alias-interpreters.d.ts +18 -0
- package/dist/alias-interpreters.js +50 -0
- package/dist/alias-interpreters.js.map +1 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +25 -0
- package/dist/browser.js.map +1 -0
- package/dist/builtin-manifests.d.ts +51 -0
- package/dist/builtin-manifests.js +196 -0
- package/dist/builtin-manifests.js.map +1 -0
- package/dist/compliance-presentation.d.ts +51 -0
- package/dist/compliance-presentation.js +140 -0
- package/dist/compliance-presentation.js.map +1 -0
- package/dist/compliance-styles.d.ts +1 -0
- package/dist/compliance-styles.js +104 -0
- package/dist/compliance-styles.js.map +1 -0
- package/dist/compliance-view.d.ts +46 -0
- package/dist/compliance-view.js +828 -0
- package/dist/compliance-view.js.map +1 -0
- package/dist/compliance.d.ts +121 -0
- package/dist/compliance.js +412 -0
- package/dist/compliance.js.map +1 -0
- package/dist/composed-styles.d.ts +12 -0
- package/dist/composed-styles.js +20 -0
- package/dist/composed-styles.js.map +1 -0
- package/dist/composed-view.d.ts +24 -0
- package/dist/composed-view.js +186 -0
- package/dist/composed-view.js.map +1 -0
- package/dist/contract-report-wording.d.ts +195 -0
- package/dist/contract-report-wording.js +1141 -0
- package/dist/contract-report-wording.js.map +1 -0
- package/dist/contract-report.d.ts +92 -0
- package/dist/contract-report.js +63 -0
- package/dist/contract-report.js.map +1 -0
- package/dist/emitter-shell.html +310 -0
- package/dist/emitter.d.ts +105 -0
- package/dist/emitter.js +329 -0
- package/dist/emitter.js.map +1 -0
- package/dist/evidence-graph-view.d.ts +149 -0
- package/dist/evidence-graph-view.js +2718 -0
- package/dist/evidence-graph-view.js.map +1 -0
- package/dist/evidence-graph.iife.js +18159 -0
- package/dist/frame-tokens.generated.d.ts +3 -0
- package/dist/frame-tokens.generated.js +5 -0
- package/dist/frame-tokens.generated.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/outcome-report-presentation.d.ts +48 -0
- package/dist/outcome-report-presentation.js +90 -0
- package/dist/outcome-report-presentation.js.map +1 -0
- package/dist/outcome-report-styles.d.ts +1 -0
- package/dist/outcome-report-styles.js +228 -0
- package/dist/outcome-report-styles.js.map +1 -0
- package/dist/outcome-report-view.d.ts +78 -0
- package/dist/outcome-report-view.js +1488 -0
- package/dist/outcome-report-view.js.map +1 -0
- package/dist/presentation-builder.d.ts +296 -0
- package/dist/presentation-builder.js +646 -0
- package/dist/presentation-builder.js.map +1 -0
- package/dist/presentation-fragment.d.ts +129 -0
- package/dist/presentation-fragment.js +213 -0
- package/dist/presentation-fragment.js.map +1 -0
- package/dist/presentation-mount.d.ts +26 -0
- package/dist/presentation-mount.js +45 -0
- package/dist/presentation-mount.js.map +1 -0
- package/dist/presentation-registry.d.ts +277 -0
- package/dist/presentation-registry.js +416 -0
- package/dist/presentation-registry.js.map +1 -0
- package/dist/record-content.d.ts +68 -0
- package/dist/record-content.js +153 -0
- package/dist/record-content.js.map +1 -0
- package/dist/record-dating.d.ts +10 -0
- package/dist/record-dating.js +76 -0
- package/dist/record-dating.js.map +1 -0
- package/dist/report-front-styles.d.ts +9 -0
- package/dist/report-front-styles.js +55 -0
- package/dist/report-front-styles.js.map +1 -0
- package/dist/report-front.d.ts +78 -0
- package/dist/report-front.js +274 -0
- package/dist/report-front.js.map +1 -0
- package/dist/report-levels.d.ts +206 -0
- package/dist/report-levels.js +739 -0
- package/dist/report-levels.js.map +1 -0
- package/dist/report-provenance.d.ts +111 -0
- package/dist/report-provenance.js +535 -0
- package/dist/report-provenance.js.map +1 -0
- package/dist/viewer-build.d.ts +37 -0
- package/dist/viewer-build.js +29 -0
- package/dist/viewer-build.js.map +1 -0
- package/dist/wording/contract-report-eu-ai-act.en.json +295 -0
- package/dist/wording/contract-report-outcomes.en.json +394 -0
- package/package.json +48 -4
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The seven built-in manifests of spec/presentation-contract-v0.md appendix A,
|
|
3
|
+
* as values. Each equals the JSON file of the same name under
|
|
4
|
+
* schemas/examples/presentation-manifest-v0/ (test/builtin-manifests.test.ts
|
|
5
|
+
* compares them when those files are present). The precedence between the
|
|
6
|
+
* built-in page shapes is stated here, in `forbids`, and nowhere in code:
|
|
7
|
+
*
|
|
8
|
+
* - rows first: every Result manifest forbids `spec_version:report/v1`;
|
|
9
|
+
* - the contract-report kind first among Result pages: the two cards and the
|
|
10
|
+
* generic Result page forbid `contract-report/v1`;
|
|
11
|
+
* - compliance only when outcome-report is not engaged: the compliance
|
|
12
|
+
* manifest forbids `outcome-report/v1`;
|
|
13
|
+
* - the generic Result page only when no card is engaged;
|
|
14
|
+
* - Result before graph: the graph forbids the Result profile;
|
|
15
|
+
* - the no-aggregate note is the one fallback.
|
|
16
|
+
*/
|
|
17
|
+
export const BUILTIN_MANIFEST_REPORT_ROWS = Object.freeze({
|
|
18
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
19
|
+
id: "aac.builtin.report-rows/v0",
|
|
20
|
+
presentation_api: "aac.presentation-api/v0",
|
|
21
|
+
runtime_min: "0.1.0",
|
|
22
|
+
trust_class: "trusted-executable",
|
|
23
|
+
requires: {
|
|
24
|
+
bundle_kind: "evidence-bundle/v2",
|
|
25
|
+
profiles: ["spec_version:report/v1"],
|
|
26
|
+
},
|
|
27
|
+
audiences: ["*"],
|
|
28
|
+
formats: ["html", "fragment", "embedded"],
|
|
29
|
+
fallback: false,
|
|
30
|
+
priority: 1,
|
|
31
|
+
executable: { carrier: "core-runtime" },
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* A Result root that opts into the contract-report view
|
|
35
|
+
* (spec/contract-report-v1.md). The core runtime ships no contract-report
|
|
36
|
+
* module, so this manifest draws the generic Result page. A registry that
|
|
37
|
+
* brings a contract-report module registers it in place of this manifest,
|
|
38
|
+
* never beside it (the two match the same descriptors).
|
|
39
|
+
*/
|
|
40
|
+
export const BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT = Object.freeze({
|
|
41
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
42
|
+
id: "aac.builtin.result-contract-report/v0",
|
|
43
|
+
presentation_api: "aac.presentation-api/v0",
|
|
44
|
+
runtime_min: "0.1.0",
|
|
45
|
+
trust_class: "trusted-executable",
|
|
46
|
+
requires: {
|
|
47
|
+
bundle_kind: "evidence-bundle/v2",
|
|
48
|
+
profiles: ["result_version:evidence-result-v0"],
|
|
49
|
+
extensions: { required: ["contract-report/v1"] },
|
|
50
|
+
},
|
|
51
|
+
forbids: { profiles: ["spec_version:report/v1"] },
|
|
52
|
+
audiences: ["*"],
|
|
53
|
+
formats: ["html", "fragment", "embedded"],
|
|
54
|
+
fallback: false,
|
|
55
|
+
priority: 1,
|
|
56
|
+
executable: { carrier: "core-runtime" },
|
|
57
|
+
});
|
|
58
|
+
export const BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT = Object.freeze({
|
|
59
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
60
|
+
id: "aac.builtin.result-outcome-report/v0",
|
|
61
|
+
presentation_api: "aac.presentation-api/v0",
|
|
62
|
+
runtime_min: "0.1.0",
|
|
63
|
+
trust_class: "trusted-executable",
|
|
64
|
+
requires: {
|
|
65
|
+
bundle_kind: "evidence-bundle/v2",
|
|
66
|
+
profiles: ["result_version:evidence-result-v0"],
|
|
67
|
+
extensions: { required: ["outcome-report/v1"] },
|
|
68
|
+
},
|
|
69
|
+
forbids: {
|
|
70
|
+
profiles: ["spec_version:report/v1"],
|
|
71
|
+
extensions: ["contract-report/v1"],
|
|
72
|
+
},
|
|
73
|
+
audiences: ["*"],
|
|
74
|
+
formats: ["html", "fragment", "embedded"],
|
|
75
|
+
fallback: false,
|
|
76
|
+
priority: 1,
|
|
77
|
+
executable: { carrier: "core-runtime" },
|
|
78
|
+
});
|
|
79
|
+
export const BUILTIN_MANIFEST_RESULT_COMPLIANCE = Object.freeze({
|
|
80
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
81
|
+
id: "aac.builtin.result-compliance/v0",
|
|
82
|
+
presentation_api: "aac.presentation-api/v0",
|
|
83
|
+
runtime_min: "0.1.0",
|
|
84
|
+
trust_class: "trusted-executable",
|
|
85
|
+
requires: {
|
|
86
|
+
bundle_kind: "evidence-bundle/v2",
|
|
87
|
+
profiles: ["result_version:evidence-result-v0"],
|
|
88
|
+
extensions: { required: ["eu-ai-act-compliance/v1"] },
|
|
89
|
+
},
|
|
90
|
+
forbids: {
|
|
91
|
+
profiles: ["spec_version:report/v1"],
|
|
92
|
+
extensions: ["contract-report/v1", "outcome-report/v1"],
|
|
93
|
+
},
|
|
94
|
+
audiences: ["*"],
|
|
95
|
+
formats: ["html", "fragment", "embedded"],
|
|
96
|
+
fallback: false,
|
|
97
|
+
priority: 1,
|
|
98
|
+
executable: { carrier: "core-runtime" },
|
|
99
|
+
});
|
|
100
|
+
export const BUILTIN_MANIFEST_RESULT = Object.freeze({
|
|
101
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
102
|
+
id: "aac.builtin.result/v0",
|
|
103
|
+
presentation_api: "aac.presentation-api/v0",
|
|
104
|
+
runtime_min: "0.1.0",
|
|
105
|
+
trust_class: "trusted-executable",
|
|
106
|
+
requires: {
|
|
107
|
+
bundle_kind: "evidence-bundle/v2",
|
|
108
|
+
profiles: ["result_version:evidence-result-v0"],
|
|
109
|
+
},
|
|
110
|
+
forbids: {
|
|
111
|
+
profiles: ["spec_version:report/v1"],
|
|
112
|
+
extensions: [
|
|
113
|
+
"contract-report/v1",
|
|
114
|
+
"outcome-report/v1",
|
|
115
|
+
"eu-ai-act-compliance/v1",
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
audiences: ["*"],
|
|
119
|
+
formats: ["html", "fragment", "embedded"],
|
|
120
|
+
fallback: false,
|
|
121
|
+
priority: 1,
|
|
122
|
+
executable: { carrier: "core-runtime" },
|
|
123
|
+
});
|
|
124
|
+
export const BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH = Object.freeze({
|
|
125
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
126
|
+
id: "aac.builtin.evaluation-summary-graph/v0",
|
|
127
|
+
presentation_api: "aac.presentation-api/v0",
|
|
128
|
+
runtime_min: "0.1.0",
|
|
129
|
+
trust_class: "trusted-executable",
|
|
130
|
+
requires: {
|
|
131
|
+
bundle_kind: "evidence-bundle/v2",
|
|
132
|
+
profiles: ["spec_version:evaluation-summary/v1"],
|
|
133
|
+
},
|
|
134
|
+
forbids: { profiles: ["result_version:evidence-result-v0"] },
|
|
135
|
+
audiences: ["*"],
|
|
136
|
+
formats: ["html", "fragment", "embedded"],
|
|
137
|
+
fallback: false,
|
|
138
|
+
priority: 1,
|
|
139
|
+
executable: { carrier: "core-runtime" },
|
|
140
|
+
});
|
|
141
|
+
export const BUILTIN_MANIFEST_NO_AGGREGATE = Object.freeze({
|
|
142
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
143
|
+
id: "aac.builtin.no-aggregate/v0",
|
|
144
|
+
presentation_api: "aac.presentation-api/v0",
|
|
145
|
+
runtime_min: "0.1.0",
|
|
146
|
+
trust_class: "trusted-executable",
|
|
147
|
+
requires: { bundle_kind: "evidence-bundle/v2" },
|
|
148
|
+
audiences: ["*"],
|
|
149
|
+
formats: ["html", "fragment", "embedded"],
|
|
150
|
+
fallback: true,
|
|
151
|
+
executable: { carrier: "core-runtime" },
|
|
152
|
+
});
|
|
153
|
+
/** All seven, in appendix A's table order (an order that decides nothing). */
|
|
154
|
+
export const BUILTIN_MANIFESTS = Object.freeze([
|
|
155
|
+
BUILTIN_MANIFEST_REPORT_ROWS,
|
|
156
|
+
BUILTIN_MANIFEST_RESULT_CONTRACT_REPORT,
|
|
157
|
+
BUILTIN_MANIFEST_RESULT_OUTCOME_REPORT,
|
|
158
|
+
BUILTIN_MANIFEST_RESULT_COMPLIANCE,
|
|
159
|
+
BUILTIN_MANIFEST_RESULT,
|
|
160
|
+
BUILTIN_MANIFEST_EVALUATION_SUMMARY_GRAPH,
|
|
161
|
+
BUILTIN_MANIFEST_NO_AGGREGATE,
|
|
162
|
+
]);
|
|
163
|
+
/**
|
|
164
|
+
* The composition section: the generic view of a `composed/v1` block
|
|
165
|
+
* (members, observers, joins, composition closure, composed digest, and
|
|
166
|
+
* same-custody agreement shown as redundant, not corroborating). A specific
|
|
167
|
+
* module selected by the engaged extension alone.
|
|
168
|
+
*
|
|
169
|
+
* It is NOT one of the page manifests above, and must not be: one
|
|
170
|
+
* descriptor matches it together with each of the six specific page
|
|
171
|
+
* manifests (a Result root that also carries composed/v1, say), so the
|
|
172
|
+
* registration test of contract section 4.5 refuses it in that set, and it
|
|
173
|
+
* would equally refuse every composition-aware page module (appendix B,
|
|
174
|
+
* `org.example.composition-aware/v0`) that it is meant to sit beneath. It is
|
|
175
|
+
* resolved in the core's section registry instead, by the same algorithm,
|
|
176
|
+
* and renders after whichever page module the page registry selected.
|
|
177
|
+
*/
|
|
178
|
+
export const BUILTIN_MANIFEST_COMPOSED = Object.freeze({
|
|
179
|
+
spec_version: "aac.presentation-manifest/v0",
|
|
180
|
+
id: "aac.builtin.composed/v0",
|
|
181
|
+
presentation_api: "aac.presentation-api/v0",
|
|
182
|
+
runtime_min: "0.1.0",
|
|
183
|
+
trust_class: "trusted-executable",
|
|
184
|
+
requires: {
|
|
185
|
+
bundle_kind: "evidence-bundle/v2",
|
|
186
|
+
extensions: { required: ["composed/v1"] },
|
|
187
|
+
},
|
|
188
|
+
audiences: ["*"],
|
|
189
|
+
formats: ["html", "fragment", "embedded"],
|
|
190
|
+
fallback: false,
|
|
191
|
+
priority: 1,
|
|
192
|
+
executable: { carrier: "core-runtime" },
|
|
193
|
+
});
|
|
194
|
+
/** The built-in section manifests (one today). */
|
|
195
|
+
export const BUILTIN_SECTION_MANIFESTS = Object.freeze([BUILTIN_MANIFEST_COMPOSED]);
|
|
196
|
+
//# sourceMappingURL=builtin-manifests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-manifests.js","sourceRoot":"","sources":["../src/builtin-manifests.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAyB,MAAM,CAAC,MAAM,CAC7E;IACE,YAAY,EAAE,8BAA8B;IAC5C,EAAE,EAAE,4BAA4B;IAChC,gBAAgB,EAAE,yBAAyB;IAC3C,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,CAAC,wBAAwB,CAAC;KACrC;IACD,SAAS,EAAE,CAAC,GAAG,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;IACzC,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CACxC,CACsB,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAClD,MAAM,CAAC,MAAM,CAAC;IACZ,YAAY,EAAE,8BAA8B;IAC5C,EAAE,EAAE,uCAAuC;IAC3C,gBAAgB,EAAE,yBAAyB;IAC3C,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE;QACR,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,CAAC,mCAAmC,CAAC;QAC/C,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,oBAAoB,CAAC,EAAE;KACjD;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE;IACjD,SAAS,EAAE,CAAC,GAAG,CAAC;IAChB,OAAO,EAAE,CAAC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GAAG,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;IACzC,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CACxC,CAAyB,CAAC;AAE3B,kDAAkD;AAClD,MAAM,CAAC,MAAM,yBAAyB,GACpC,MAAM,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `eu-ai-act-compliance/v1` typed extension: opts a verified Result v0
|
|
3
|
+
* bundle into the EU AI Act obligations-report card, read only after the
|
|
4
|
+
* bundle verified, and carries the producer's REGULATORY MAPPING for it:
|
|
5
|
+
* per obligation its article, title, plain-language summary, applicability
|
|
6
|
+
* and method; per test its short label, an optional not-evaluable note and
|
|
7
|
+
* an optional finding template (severity, recommendation, owner).
|
|
8
|
+
*
|
|
9
|
+
* Everything read here is presentation, outside the signed records, and the
|
|
10
|
+
* card labels it so. Which obligations and tests exist, every verdict and
|
|
11
|
+
* count, each test's wording and tier, and the pack come from the sealed
|
|
12
|
+
* claims and reports (compliance.ts), never from this block.
|
|
13
|
+
*/
|
|
14
|
+
export interface ComplianceFinding {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly severity: string;
|
|
17
|
+
readonly recommendation: string;
|
|
18
|
+
readonly ownerDue: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ComplianceRow {
|
|
21
|
+
readonly criterionId: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly notEvaluableNote?: string;
|
|
24
|
+
readonly finding?: ComplianceFinding;
|
|
25
|
+
}
|
|
26
|
+
export interface ComplianceApplicability {
|
|
27
|
+
readonly status: "in_force" | "future";
|
|
28
|
+
readonly note: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ComplianceObligation {
|
|
31
|
+
readonly key: string;
|
|
32
|
+
readonly article: string;
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly plain: string;
|
|
35
|
+
readonly judgedTerms: readonly string[];
|
|
36
|
+
readonly applicability: ComplianceApplicability;
|
|
37
|
+
readonly method: string;
|
|
38
|
+
readonly rows: readonly ComplianceRow[];
|
|
39
|
+
}
|
|
40
|
+
export interface ComplianceQualityProtocol {
|
|
41
|
+
readonly protocol?: string;
|
|
42
|
+
readonly cadence?: string;
|
|
43
|
+
readonly note?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CompliancePresentation {
|
|
46
|
+
readonly enabled: boolean;
|
|
47
|
+
readonly regulation: string;
|
|
48
|
+
readonly obligations: readonly ComplianceObligation[];
|
|
49
|
+
readonly qualityProtocol?: ComplianceQualityProtocol;
|
|
50
|
+
}
|
|
51
|
+
export declare function readCompliancePresentation(bundle: unknown): CompliancePresentation | undefined;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BSD-3-Clause
|
|
2
|
+
/**
|
|
3
|
+
* `eu-ai-act-compliance/v1` typed extension: opts a verified Result v0
|
|
4
|
+
* bundle into the EU AI Act obligations-report card, read only after the
|
|
5
|
+
* bundle verified, and carries the producer's REGULATORY MAPPING for it:
|
|
6
|
+
* per obligation its article, title, plain-language summary, applicability
|
|
7
|
+
* and method; per test its short label, an optional not-evaluable note and
|
|
8
|
+
* an optional finding template (severity, recommendation, owner).
|
|
9
|
+
*
|
|
10
|
+
* Everything read here is presentation, outside the signed records, and the
|
|
11
|
+
* card labels it so. Which obligations and tests exist, every verdict and
|
|
12
|
+
* count, each test's wording and tier, and the pack come from the sealed
|
|
13
|
+
* claims and reports (compliance.ts), never from this block.
|
|
14
|
+
*/
|
|
15
|
+
function object(value) {
|
|
16
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
17
|
+
? value
|
|
18
|
+
: undefined;
|
|
19
|
+
}
|
|
20
|
+
function str(value) {
|
|
21
|
+
return typeof value === "string" ? value : undefined;
|
|
22
|
+
}
|
|
23
|
+
function strArray(value) {
|
|
24
|
+
return Array.isArray(value)
|
|
25
|
+
? value.filter((v) => typeof v === "string")
|
|
26
|
+
: [];
|
|
27
|
+
}
|
|
28
|
+
function readFinding(value) {
|
|
29
|
+
const obj = object(value);
|
|
30
|
+
const id = str(obj?.id);
|
|
31
|
+
const severity = str(obj?.severity);
|
|
32
|
+
const recommendation = str(obj?.recommendation);
|
|
33
|
+
const ownerDue = str(obj?.owner_due);
|
|
34
|
+
if (id === undefined ||
|
|
35
|
+
severity === undefined ||
|
|
36
|
+
recommendation === undefined ||
|
|
37
|
+
ownerDue === undefined)
|
|
38
|
+
return undefined;
|
|
39
|
+
return { id, severity, recommendation, ownerDue };
|
|
40
|
+
}
|
|
41
|
+
function readRow(value) {
|
|
42
|
+
const obj = object(value);
|
|
43
|
+
const criterionId = str(obj?.criterion_id);
|
|
44
|
+
const name = str(obj?.name);
|
|
45
|
+
if (criterionId === undefined || name === undefined)
|
|
46
|
+
return undefined;
|
|
47
|
+
const notEvaluableNote = str(obj?.not_evaluable_note);
|
|
48
|
+
const finding = obj?.finding === undefined ? undefined : readFinding(obj.finding);
|
|
49
|
+
return {
|
|
50
|
+
criterionId,
|
|
51
|
+
name,
|
|
52
|
+
...(notEvaluableNote === undefined ? {} : { notEvaluableNote }),
|
|
53
|
+
...(finding === undefined ? {} : { finding }),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function readApplicability(value) {
|
|
57
|
+
const obj = object(value);
|
|
58
|
+
const status = obj?.status === "in_force" || obj?.status === "future"
|
|
59
|
+
? obj.status
|
|
60
|
+
: undefined;
|
|
61
|
+
const note = str(obj?.note);
|
|
62
|
+
if (status === undefined || note === undefined)
|
|
63
|
+
return undefined;
|
|
64
|
+
return { status, note };
|
|
65
|
+
}
|
|
66
|
+
function readObligation(value) {
|
|
67
|
+
const obj = object(value);
|
|
68
|
+
const key = str(obj?.key);
|
|
69
|
+
const article = str(obj?.article);
|
|
70
|
+
const title = str(obj?.title);
|
|
71
|
+
const plain = str(obj?.plain);
|
|
72
|
+
const method = str(obj?.method);
|
|
73
|
+
const applicability = readApplicability(obj?.applicability);
|
|
74
|
+
if (key === undefined ||
|
|
75
|
+
article === undefined ||
|
|
76
|
+
title === undefined ||
|
|
77
|
+
plain === undefined ||
|
|
78
|
+
method === undefined ||
|
|
79
|
+
applicability === undefined)
|
|
80
|
+
return undefined;
|
|
81
|
+
const rows = Array.isArray(obj?.rows)
|
|
82
|
+
? obj.rows.flatMap((r) => {
|
|
83
|
+
const row = readRow(r);
|
|
84
|
+
return row === undefined ? [] : [row];
|
|
85
|
+
})
|
|
86
|
+
: [];
|
|
87
|
+
return {
|
|
88
|
+
key,
|
|
89
|
+
article,
|
|
90
|
+
title,
|
|
91
|
+
plain,
|
|
92
|
+
judgedTerms: strArray(obj?.judged_terms),
|
|
93
|
+
applicability,
|
|
94
|
+
method,
|
|
95
|
+
rows,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function readQualityProtocol(value) {
|
|
99
|
+
const obj = object(value);
|
|
100
|
+
if (obj === undefined)
|
|
101
|
+
return undefined;
|
|
102
|
+
const protocol = str(obj.protocol);
|
|
103
|
+
const cadence = str(obj.cadence);
|
|
104
|
+
const note = str(obj.note);
|
|
105
|
+
if (protocol === undefined && cadence === undefined && note === undefined)
|
|
106
|
+
return undefined;
|
|
107
|
+
return {
|
|
108
|
+
...(protocol === undefined ? {} : { protocol }),
|
|
109
|
+
...(cadence === undefined ? {} : { cadence }),
|
|
110
|
+
...(note === undefined ? {} : { note }),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export function readCompliancePresentation(bundle) {
|
|
114
|
+
const top = object(bundle);
|
|
115
|
+
const extensions = object(top?.extensions);
|
|
116
|
+
const block = object(extensions?.["eu-ai-act-compliance/v1"]);
|
|
117
|
+
if (block === undefined || block.enabled !== true)
|
|
118
|
+
return undefined;
|
|
119
|
+
const regulation = str(block.regulation) ?? "Regulation (EU) 2024/1689";
|
|
120
|
+
const obligations = Array.isArray(block.obligations)
|
|
121
|
+
? block.obligations.flatMap((o) => {
|
|
122
|
+
const obligation = readObligation(o);
|
|
123
|
+
return obligation === undefined ? [] : [obligation];
|
|
124
|
+
})
|
|
125
|
+
: [];
|
|
126
|
+
// Absent is never pass: a block with `enabled: true` but zero recognizable
|
|
127
|
+
// obligations is not a usable card -- treated the same as not enabled at
|
|
128
|
+
// all, falling back to the generic Result page rather than rendering an
|
|
129
|
+
// empty shell.
|
|
130
|
+
if (obligations.length === 0)
|
|
131
|
+
return undefined;
|
|
132
|
+
const qualityProtocol = readQualityProtocol(block.quality_protocol);
|
|
133
|
+
return {
|
|
134
|
+
enabled: true,
|
|
135
|
+
regulation,
|
|
136
|
+
obligations,
|
|
137
|
+
...(qualityProtocol === undefined ? {} : { qualityProtocol }),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=compliance-presentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-presentation.js","sourceRoot":"","sources":["../src/compliance-presentation.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;;;;;;;;;;;;GAYG;AAEH,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAA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AAE,CAAC;KAC9D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMPLIANCE_CSS: string;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BSD-3-Clause
|
|
2
|
+
/**
|
|
3
|
+
* The compliance card's own stylesheet, trimmed to the sections this card
|
|
4
|
+
* renders (summary, test results, findings, sessions drill-down via native
|
|
5
|
+
* `<details>`, quality protocol, run info) and scoped under `.cc` on every
|
|
6
|
+
* selector, so it can never leak onto, or be affected by, the verification
|
|
7
|
+
* page or any other card on the same document.
|
|
8
|
+
*/
|
|
9
|
+
import { levelCss } from "./report-levels.js";
|
|
10
|
+
import { COMPLIANCE_FRAME_VARS } from "./frame-tokens.generated.js";
|
|
11
|
+
import { frontCss } from "./report-front-styles.js";
|
|
12
|
+
export const COMPLIANCE_CSS = `
|
|
13
|
+
.cc{${COMPLIANCE_FRAME_VARS}
|
|
14
|
+
font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Helvetica,Arial,sans-serif;color:var(--ink);background:#fff;display:block;max-width:1080px;margin:26px auto;padding:0 28px}
|
|
15
|
+
.cc *{box-sizing:border-box}
|
|
16
|
+
.cc h1,.cc h2,.cc h3{font-family:Georgia,"Iowan Old Style",Cambria,serif;color:var(--navy);margin:0}
|
|
17
|
+
.cc a{color:var(--navy);cursor:pointer}
|
|
18
|
+
.cc .hd{background:var(--navy);color:#fff;padding:28px 32px;border-radius:var(--r) var(--r) 0 0;margin-top:20px}
|
|
19
|
+
.cc .hd .kicker{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:#C9CED6}
|
|
20
|
+
.cc p.kicker[data-regulation]{font-size:12.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--slate);margin:0 0 6px}
|
|
21
|
+
.cc .hd h1{color:#fff;font-size:28px;margin:6px 0 4px}
|
|
22
|
+
.cc .hd .sub{color:#DDE1E7;font-size:15px}
|
|
23
|
+
.cc section{padding:28px 32px;border:1px solid var(--line);border-top:0}
|
|
24
|
+
.cc section h2{font-size:21px;margin-bottom:10px}
|
|
25
|
+
.cc .lede{color:var(--slate);margin:0 0 16px;max-width:760px}
|
|
26
|
+
.cc table.grid{width:100%;border-collapse:collapse;font-size:14.5px}
|
|
27
|
+
.cc table.grid th{text-align:left;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--slate);border-bottom:2px solid var(--navy);padding:8px 10px}
|
|
28
|
+
.cc table.grid td{border-bottom:1px solid var(--line);padding:10px;vertical-align:top}
|
|
29
|
+
.cc table.grid td.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
30
|
+
.cc .kind{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:99px;text-transform:uppercase;letter-spacing:.03em}
|
|
31
|
+
.cc .kind.judged{background:var(--person-l);color:var(--person)}
|
|
32
|
+
.cc .kind.recomputed{background:#E6EEF6;color:#2B5A85}
|
|
33
|
+
.cc .kind.unstated{background:var(--cream);color:var(--slate)}
|
|
34
|
+
.cc .tx{margin:8px 0 4px;font-size:13px}
|
|
35
|
+
.cc .tx .turn{padding:3px 0;border-top:1px solid var(--line);white-space:pre-wrap}
|
|
36
|
+
.cc .tx code{font-size:12px;color:var(--slate)}
|
|
37
|
+
.cc .hd .na{color:var(--ink)}
|
|
38
|
+
.cc .st{font-weight:700;font-size:13px}
|
|
39
|
+
.cc .st.ok{color:var(--ok)}.cc .st.exc{color:var(--bad)}.cc .st.ne{color:#8A93A6}
|
|
40
|
+
.cc .fnd{border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin-bottom:12px}
|
|
41
|
+
.cc .fnd .fh{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
|
|
42
|
+
.cc .fnd .fh b{color:var(--navy)}
|
|
43
|
+
.cc .sev{font-size:11px;font-weight:700;padding:2px 9px;border-radius:99px;text-transform:uppercase}
|
|
44
|
+
.cc .sev.high{background:var(--bad-l);color:var(--bad)}
|
|
45
|
+
.cc .sev.medium{background:var(--gold-l);color:#8A6A2F}
|
|
46
|
+
.cc .sev.low{background:var(--ok-l);color:var(--ok)}
|
|
47
|
+
.cc .fnd table.fk{width:100%;font-size:14px}
|
|
48
|
+
.cc .fnd table.fk th{text-align:left;color:var(--slate);font-weight:600;width:140px;vertical-align:top;padding:4px 0}
|
|
49
|
+
.cc .fnd table.fk td{padding:4px 0}
|
|
50
|
+
.cc details{margin-top:8px;border:1px solid var(--line);border-radius:10px;padding:8px 14px}
|
|
51
|
+
.cc details > summary{cursor:pointer;color:var(--navy);font-weight:600;font-size:14px}
|
|
52
|
+
.cc .sessrow{display:flex;gap:10px;align-items:center;padding:6px 0;font-size:14px}
|
|
53
|
+
.cc .sessrow code{font-size:12px;color:var(--slate)}
|
|
54
|
+
.cc .tk{display:inline-block;width:20px;height:20px;border-radius:6px;text-align:center;line-height:20px;font-size:12px;margin-left:3px}
|
|
55
|
+
.cc .tk.y{background:var(--ok-l);color:var(--ok)}.cc .tk.n{background:var(--bad-l);color:var(--bad)}.cc .tk.ne{background:#EDEFF2;color:#8A93A6}
|
|
56
|
+
.cc .ck{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:14px}
|
|
57
|
+
.cc .ck .h{display:flex;gap:8px;align-items:center;font-weight:700;color:var(--navy)}
|
|
58
|
+
.cc .ck .why{margin-top:4px;color:var(--ink)}
|
|
59
|
+
.cc .ck .ev{margin-top:4px;font-size:12px;color:var(--slate)}
|
|
60
|
+
.cc .ck .ev code{background:var(--cream);padding:1px 6px;border-radius:5px;margin-right:4px}
|
|
61
|
+
.cc .na{margin-top:16px;font-size:13px;color:var(--slate);background:var(--cream);border-radius:10px;padding:10px 14px}
|
|
62
|
+
.cc .ran{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
|
|
63
|
+
.cc .ran .it{background:var(--cream);border-radius:10px;padding:10px 12px}
|
|
64
|
+
.cc .ran .k{font-size:12.5px;color:var(--slate)}
|
|
65
|
+
.cc .ran .v{font-weight:600;color:var(--navy);word-break:break-word;font-size:13.5px}
|
|
66
|
+
.cc .applic{font-size:13px;color:var(--slate)}
|
|
67
|
+
.cc table.sum tbody tr.ob td{background:var(--cream);border-top:2px solid var(--navy);padding:12px 10px}
|
|
68
|
+
.cc table.sum .obn{font-size:16px;color:var(--navy)}
|
|
69
|
+
.cc table.sum .obn .art{font-family:Georgia,Cambria,serif}
|
|
70
|
+
.cc table.sum .plain{font-size:13.5px;color:var(--ink);margin-top:4px;max-width:720px}
|
|
71
|
+
.cc table.sum tr.test td.tn{padding-left:22px}
|
|
72
|
+
.cc table.sum .tnh{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
|
|
73
|
+
.cc table.sum .tnh b{color:var(--navy)}
|
|
74
|
+
.cc table.sum td .applic{margin-top:4px}
|
|
75
|
+
.cc .fnd{margin:8px 0 0;padding:8px 12px;border-color:var(--bad-l);background:#FDF8F6}
|
|
76
|
+
.cc .fnd .fh{margin-bottom:4px}
|
|
77
|
+
.cc .fnd .rec{font-size:13.5px}
|
|
78
|
+
.cc .fnd .own{font-size:12.5px;color:var(--slate);margin-top:2px}
|
|
79
|
+
.cc .ck .h .tname{color:var(--navy)}
|
|
80
|
+
.cc .ck .h .applic{font-weight:400}
|
|
81
|
+
.cc .rp-s{margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}
|
|
82
|
+
.cc .rp-s h3{font-size:17px;margin:0 0 8px}
|
|
83
|
+
.cc .pf-b .ev{font-size:12px;color:var(--slate);margin:4px 0;word-break:break-all}
|
|
84
|
+
.cc .pf-b .ev code{background:var(--cream);padding:1px 6px;border-radius:5px;margin-right:4px;font-size:11.5px}
|
|
85
|
+
.cc .obd{margin:10px 0 16px}
|
|
86
|
+
@media (max-width:760px){.cc .ran{grid-template-columns:1fr}}
|
|
87
|
+
` +
|
|
88
|
+
levelCss("cc") +
|
|
89
|
+
frontCss(".cc") +
|
|
90
|
+
// The page layout (one left edge, bordered cards 16px apart, the header
|
|
91
|
+
// on white like the Outcomes report's): last, so it wins over the rules
|
|
92
|
+
// above. The page colour is the shell's (emitter-shell.html).
|
|
93
|
+
`
|
|
94
|
+
.cc{background:transparent;padding:0;margin:0 auto;display:flow-root}
|
|
95
|
+
.cc .l0-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:40px var(--inset);margin:16px 0}
|
|
96
|
+
.cc .l0-card .hd{background:transparent;color:var(--ink);padding:0;margin:0 0 24px;border-radius:0}
|
|
97
|
+
.cc .l0-card .hd h1{color:var(--navy);font-size:30px;margin:0}
|
|
98
|
+
.cc .l0-card .hd .sub{color:var(--slate);margin-top:8px}
|
|
99
|
+
.cc .l0-card section.agg{border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:0}
|
|
100
|
+
.cc > section{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:32px var(--inset);margin:0 0 16px}
|
|
101
|
+
.cc > section.findings{padding:32px calc(var(--inset) - 3px)}
|
|
102
|
+
@media (min-width:821px){.cc table.grid th{white-space:nowrap}}
|
|
103
|
+
`;
|
|
104
|
+
//# sourceMappingURL=compliance-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-styles.js","sourceRoot":"","sources":["../src/compliance-styles.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,cAAc,GACzB;MACI,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0E1B;IACC,QAAQ,CAAC,IAAI,CAAC;IACd,QAAQ,CAAC,KAAK,CAAC;IACf,wEAAwE;IACxE,wEAAwE;IACxE,8DAA8D;IAC9D;;;;;;;;;;CAUD,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { BundleVerificationResult } from "@action-state-group/agent-action-capsule";
|
|
2
|
+
import { type ComplianceModel, type ComplianceFindingModel, type ObligationModel, type ObligationRowModel, type Session, type SessionTest } from "./compliance.js";
|
|
3
|
+
import type { CompliancePresentation } from "./compliance-presentation.js";
|
|
4
|
+
import { type Words } from "./contract-report-wording.js";
|
|
5
|
+
import type { ResultRoot } from "@action-state-group/agent-action-capsule";
|
|
6
|
+
/**
|
|
7
|
+
* An obligation's status, from the sealed counts alone. Its applicability
|
|
8
|
+
* (in force, or from a later date) is the producer's mapping: it is never
|
|
9
|
+
* drawn in this pill, which speaks only for the records, and is shown
|
|
10
|
+
* instead in the producer's own italic line beside the title.
|
|
11
|
+
*
|
|
12
|
+
* "No exceptions", in the ok tone, only when every one of its tests was met
|
|
13
|
+
* by at least one session and no session's result for it was not met: an
|
|
14
|
+
* obligation one of whose tests no session met (every result undecided,
|
|
15
|
+
* unverified or absent) does not read clean. When none of its tests could
|
|
16
|
+
* be checked it reads "Could not be checked"; when some could not, the pill
|
|
17
|
+
* is neutral and says how many.
|
|
18
|
+
*/
|
|
19
|
+
export declare function obligationStatus(obligation: ObligationModel, w?: Words): {
|
|
20
|
+
cls: string;
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
23
|
+
/** A test's result in the summary: a status, and an optional note under it. */
|
|
24
|
+
export declare function rowStatus(row: ObligationRowModel, w?: Words): {
|
|
25
|
+
cls: string;
|
|
26
|
+
text: string;
|
|
27
|
+
note?: string;
|
|
28
|
+
producerNote?: true;
|
|
29
|
+
};
|
|
30
|
+
/** The `groups` grouping's page wrapper: its element, class, page name and stylesheet. */
|
|
31
|
+
export declare const GROUPS_FRAME: {
|
|
32
|
+
readonly tag: "div";
|
|
33
|
+
readonly className: "cc";
|
|
34
|
+
readonly page: "compliance";
|
|
35
|
+
readonly css: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Draw the `groups` grouping into `wrapper` (contract-report.ts made it and
|
|
39
|
+
* put its stylesheet in it). Every word is `w`'s.
|
|
40
|
+
*/
|
|
41
|
+
export declare function drawGroups(levels: {
|
|
42
|
+
readonly L0: HTMLElement;
|
|
43
|
+
readonly L1: HTMLElement;
|
|
44
|
+
readonly L2: HTMLElement;
|
|
45
|
+
}, result: ResultRoot, presentation: CompliancePresentation, bundle: unknown, verified: BundleVerificationResult, w: Words): Promise<void>;
|
|
46
|
+
export type { ComplianceModel, ComplianceFindingModel, ObligationModel, ObligationRowModel, Session, SessionTest, };
|