@transitrix/diagrams 1.14.0-rc.0 → 1.14.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/dist/activities/action-fields.d.ts +6 -0
- package/dist/activities/action-fields.js +34 -0
- package/dist/activities/validate.d.ts +3 -1
- package/dist/activities/validate.js +36 -34
- package/dist/applications/validate.js +27 -26
- package/dist/capability-map/validate.d.ts +4 -1
- package/dist/capability-map/validate.js +32 -30
- package/dist/codex/validate.js +3 -3
- package/dist/compliance/coverage-metric.js +3 -3
- package/dist/compliance/impact.js +4 -4
- package/dist/fgca/parse-canonical.d.ts +0 -25
- package/dist/fgca/parse-canonical.js +16 -26
- package/dist/fgca/projection-origin.d.ts +2 -0
- package/dist/fgca/projection-origin.js +2 -0
- package/dist/fgca/resolver.d.ts +0 -8
- package/dist/fgca/resolver.js +2 -0
- package/dist/products/validate.js +30 -25
- package/dist/repo-validate/check-strategy-chain.d.ts +8 -2
- package/dist/repo-validate/check-strategy-chain.js +64 -64
- package/dist/repo-validate/types.d.ts +2 -0
- package/dist/repo-validate/validate-repo.js +2 -0
- package/dist/risk/index.d.ts +1 -1
- package/dist/risk/types.d.ts +8 -1
- package/dist/risk/validate.js +19 -4
- package/dist/scenarios/validate.js +4 -0
- package/dist/schema-finding.d.ts +3 -0
- package/dist/schema-finding.js +6 -0
- package/dist/webview/entry.js +7 -2
- package/dist/webview/render-goals.js +2 -1
- package/package.json +1 -1
- package/src/activities/action-fields.ts +31 -0
- package/src/activities/validate.ts +37 -34
- package/src/applications/validate.ts +27 -26
- package/src/capability-map/validate.ts +33 -29
- package/src/codex/validate.ts +3 -3
- package/src/compliance/coverage-metric.ts +3 -3
- package/src/compliance/impact.ts +4 -4
- package/src/fgca/parse-canonical.ts +14 -1
- package/src/fgca/projection-origin.ts +2 -0
- package/src/fgca/resolver.ts +2 -0
- package/src/products/validate.ts +31 -25
- package/src/repo-validate/check-strategy-chain.ts +69 -64
- package/src/repo-validate/types.ts +2 -0
- package/src/repo-validate/validate-repo.ts +2 -0
- package/src/risk/index.ts +1 -1
- package/src/risk/types.ts +9 -1
- package/src/risk/validate.ts +19 -5
- package/src/scenarios/validate.ts +5 -0
- package/src/schema-finding.ts +8 -0
- package/src/webview/entry.ts +6 -2
- package/src/webview/render-goals.ts +2 -1
- package/src/webview/styles.css +8 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ValidationError } from './validation-types.js';
|
|
2
|
+
|
|
3
|
+
/** Shared schema identity; callers supply the owning form and exact field. */
|
|
4
|
+
export function schemaFinding(form: string, path: string, expected: string, actual: unknown): ValidationError {
|
|
5
|
+
const type = actual === null ? 'null' : Array.isArray(actual) ? 'array' : typeof actual;
|
|
6
|
+
return { code: 'SCHEMA_INVALID', path,
|
|
7
|
+
message: `${form} field '${path}': expected ${expected}; actual ${type} (${String(actual)}).` };
|
|
8
|
+
}
|
package/src/webview/entry.ts
CHANGED
|
@@ -275,10 +275,14 @@ function dispatchValidate(kind: NotationKind, doc: unknown): RenderResult {
|
|
|
275
275
|
return renderFromValidation('scenarios', validateScenario(doc), () =>
|
|
276
276
|
renderScenarioHtml((doc as ScenarioFile).scenario),
|
|
277
277
|
);
|
|
278
|
-
case 'capability-map':
|
|
279
|
-
|
|
278
|
+
case 'capability-map': {
|
|
279
|
+
const validation = validateCapabilityMap(doc);
|
|
280
|
+
const unresolved = validation.warnings.find(w => w.code === 'NOTATION-SKIP-001');
|
|
281
|
+
if (validation.valid && unresolved) return errorResult('capability-map', unresolved.code, unresolved.message);
|
|
282
|
+
return renderFromValidation('capability-map', validation, () =>
|
|
280
283
|
renderCapabilityMapHtml((doc as CapabilityMapFile).capability_map),
|
|
281
284
|
);
|
|
285
|
+
}
|
|
282
286
|
default:
|
|
283
287
|
return errorResult(
|
|
284
288
|
kind,
|
|
@@ -56,7 +56,8 @@ export function renderGoalsSvg(tree: GoalTree, options: RenderGoalsOptions = {})
|
|
|
56
56
|
? `<text class="text-header" x="${PAD}" y="${PAD - 6}">${escXml(`Goal tree — ${treeName}`)}</text>`
|
|
57
57
|
: '';
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
// Reserve a separate header row; the theme centers text on its y coordinate.
|
|
60
|
+
return renderGoalsLayoutSvg(layout, { curvature, entryCurvature, edgeStyle, title, topInset: title ? PAD : 0, embedCssTheme: 'transitrix' });
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface RenderGoalsLayoutOptions {
|
package/src/webview/styles.css
CHANGED
|
@@ -70,6 +70,14 @@ body {
|
|
|
70
70
|
margin-left: 6px;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/* The bundled SVG renderer uses its light palette independently of IDE chrome.
|
|
74
|
+
* Give transparent SVG titles and edges a matching canvas. */
|
|
75
|
+
.tx-svg-host {
|
|
76
|
+
background: #ffffff;
|
|
77
|
+
color: #0d2b35;
|
|
78
|
+
min-height: calc(100vh - 24px);
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
.tx-svg-host svg {
|
|
74
82
|
max-width: 100%;
|
|
75
83
|
height: auto;
|