@muonroi/ui-engine-rule-components 0.1.21 → 0.1.23

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.
@@ -21,5 +21,8 @@ import "./components/shared/mu-schema-watcher.js";
21
21
  import "./components/shared/mu-ui-engine-app.js";
22
22
  import "./components/trace-viewer/mu-rule-trace-viewer.js";
23
23
  import "./components/result-panel/mu-rule-result-panel.js";
24
+ import "./components/living-docs/mu-living-docs.js";
25
+ import "./components/traceability-matrix/mu-traceability-matrix.js";
26
+ import "./components/impact-list/mu-impact-list.js";
24
27
  export declare function MRegisterRuleComponents(): void;
25
28
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,kDAAkD,CAAC;AAC1D,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AACzD,OAAO,+CAA+C,CAAC;AACvD,OAAO,2CAA2C,CAAC;AACnD,OAAO,0DAA0D,CAAC;AAClE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,mDAAmD,CAAC;AAC3D,OAAO,yCAAyC,CAAC;AACjD,OAAO,4CAA4C,CAAC;AACpD,OAAO,yCAAyC,CAAC;AACjD,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,yCAAyC,CAAC;AACjD,OAAO,2CAA2C,CAAC;AACnD,OAAO,iDAAiD,CAAC;AACzD,OAAO,+CAA+C,CAAC;AACvD,OAAO,0CAA0C,CAAC;AAClD,OAAO,2CAA2C,CAAC;AACnD,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,mDAAmD,CAAC;AAC3D,OAAO,mDAAmD,CAAC;AAE3D,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,kDAAkD,CAAC;AAC1D,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iDAAiD,CAAC;AACzD,OAAO,+CAA+C,CAAC;AACvD,OAAO,2CAA2C,CAAC;AACnD,OAAO,0DAA0D,CAAC;AAClE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,mDAAmD,CAAC;AAC3D,OAAO,yCAAyC,CAAC;AACjD,OAAO,4CAA4C,CAAC;AACpD,OAAO,yCAAyC,CAAC;AACjD,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,yCAAyC,CAAC;AACjD,OAAO,2CAA2C,CAAC;AACnD,OAAO,iDAAiD,CAAC;AACzD,OAAO,+CAA+C,CAAC;AACvD,OAAO,0CAA0C,CAAC;AAClD,OAAO,2CAA2C,CAAC;AACnD,OAAO,0CAA0C,CAAC;AAClD,OAAO,yCAAyC,CAAC;AACjD,OAAO,mDAAmD,CAAC;AAC3D,OAAO,mDAAmD,CAAC;AAC3D,OAAO,4CAA4C,CAAC;AACpD,OAAO,4DAA4D,CAAC;AACpE,OAAO,4CAA4C,CAAC;AAEpD,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
@@ -0,0 +1,52 @@
1
+ import type { ImpactListResponse, LivingDocModel, TraceabilityMatrixRow } from "../models/living-docs-models.js";
2
+ /**
3
+ * Response shape for GET /api/v1/traceability/{workflow}/{version}.
4
+ */
5
+ export interface TraceabilityMatrixResponse {
6
+ rows: TraceabilityMatrixRow[];
7
+ workflow: string;
8
+ version: number;
9
+ }
10
+ /**
11
+ * Response shape for GET /api/v1/traceability/trace/{workflow}/{nodeId}.
12
+ */
13
+ export interface TraceRuleResponse {
14
+ nodeId: string;
15
+ workflow: string;
16
+ rows: TraceabilityMatrixRow[];
17
+ }
18
+ /**
19
+ * API client for the Living Docs read endpoints (Phase 1/3 routes).
20
+ *
21
+ * All methods throw on non-ok responses — no silent catch (CLAUDE.md rule).
22
+ * Tenant scope is enforced by the API (C-07 explicit EF filter).
23
+ * The client passes no tenant override — it cannot widen scope.
24
+ */
25
+ export declare class LivingDocsApiClient {
26
+ private readonly base;
27
+ constructor(apiBaseUrl: string);
28
+ /**
29
+ * GET {base}/living-docs/{workflow}/{version}
30
+ * Returns the generated living doc JSON for the given workflow + version.
31
+ * Pass "active" as version to resolve the currently active version.
32
+ */
33
+ getLivingDoc(workflow: string, version: number | "active"): Promise<LivingDocModel>;
34
+ /**
35
+ * GET {base}/traceability/{workflow}/{version}
36
+ * Returns the full traceability matrix for the given workflow + version.
37
+ */
38
+ getTraceabilityMatrix(workflow: string, version: number | "active"): Promise<TraceabilityMatrixResponse>;
39
+ /**
40
+ * GET {base}/traceability/trace/{workflow}/{nodeId}
41
+ * Returns traceability rows filtered to the given rule node.
42
+ * Entry point for the "trace this rule" jump from the doc viewer (D-11).
43
+ */
44
+ traceRule(workflow: string, nodeId: string): Promise<TraceRuleResponse>;
45
+ /**
46
+ * GET {base}/traceability/{workflow}/impact?from={from}&to={to}
47
+ * Returns the impact list + UAT checklist for the two given versions.
48
+ * No tenant override — the client cannot widen scope (T-05-09).
49
+ */
50
+ getImpactList(workflow: string, from: number, to: number): Promise<ImpactListResponse>;
51
+ }
52
+ //# sourceMappingURL=living-docs-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"living-docs-api.d.ts","sourceRoot":"","sources":["../../src/services/living-docs-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAEjH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,EAAE,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,qBAAqB,EAAE,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAElB,UAAU,EAAE,MAAM;IAI9B;;;;OAIG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IAWzF;;;OAGG;IACG,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAW9G;;;;OAIG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAW7E;;;;OAIG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAU7F"}
@@ -0,0 +1,28 @@
1
+ import type { LivingDocModel } from "../models/living-docs-models.js";
2
+ /**
3
+ * State shape for the living-docs store.
4
+ * Follows the DecisionTableEditorState pattern from decision-table-store.ts.
5
+ *
6
+ * pendingVersion drives the D-01 notify-don't-yank banner:
7
+ * when non-null, a new version is available but has NOT been applied yet.
8
+ */
9
+ export interface LivingDocsStoreState {
10
+ doc: LivingDocModel | null;
11
+ isLoading: boolean;
12
+ error: string | null;
13
+ pendingVersion: number | null;
14
+ loadDoc(apiBase: string, workflow: string, version: number | "active"): Promise<void>;
15
+ setDoc(doc: LivingDocModel): void;
16
+ setPendingVersion(v: number | null): void;
17
+ clearError(): void;
18
+ }
19
+ export type MLivingDocsStore = ReturnType<typeof MCreateLivingDocsStore>;
20
+ /**
21
+ * Factory function returning a framework-agnostic zustand/vanilla store.
22
+ * Designed for use in both Lit web components and React consumers.
23
+ *
24
+ * loadDoc throws on non-ok fetch responses — no silent catch (CLAUDE.md rule).
25
+ * Tenant scope is enforced by the API; the store passes no tenant override.
26
+ */
27
+ export declare function MCreateLivingDocsStore(): import("zustand/vanilla").StoreApi<LivingDocsStoreState>;
28
+ //# sourceMappingURL=living-docs-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"living-docs-store.d.ts","sourceRoot":"","sources":["../../src/store/living-docs-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAC;IAClC,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,UAAU,IAAI,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,6DAiCrC"}
package/package.json CHANGED
@@ -1,60 +1,63 @@
1
- {
2
- "name": "@muonroi/ui-engine-rule-components",
3
- "version": "0.1.21",
4
- "description": "Muonroi rule engine web components",
5
- "type": "module",
6
- "main": "dist/muonroi-rule-components.esm.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/muonroi-rule-components.esm.js",
11
- "types": "./dist/index.d.ts"
12
- }
13
- },
14
- "files": [
15
- "dist"
16
- ],
17
- "dependencies": {
18
- "@codemirror/autocomplete": "^6.20.1",
19
- "@codemirror/commands": "^6.10.3",
20
- "@codemirror/lang-javascript": "^6.2.5",
21
- "@codemirror/lang-json": "^6.0.2",
22
- "@codemirror/language": "^6.12.2",
23
- "@codemirror/lint": "^6.9.5",
24
- "@codemirror/state": "^6.6.0",
25
- "@codemirror/view": "^6.40.0",
26
- "@dnd-kit/core": "^6.3.0",
27
- "@dnd-kit/sortable": "^8.0.0",
28
- "@lezer/highlight": "^1.2.3",
29
- "@microsoft/signalr": "^8.0.0",
30
- "@tanstack/virtual-core": "^3.10.0",
31
- "@xyflow/react": "^12.9.3",
32
- "lit": "^3.2.0",
33
- "monaco-editor": "^0.52.0",
34
- "react": "^18.3.1",
35
- "react-dom": "^18.3.1",
36
- "zustand": "^5.0.0"
37
- },
38
- "peerDependencies": {
39
- "@muonroi/ui-engine-core": ">=0.1.0"
40
- },
41
- "devDependencies": {
42
- "@tailwindcss/postcss": "^4.1.11",
43
- "@testing-library/react": "^16.3.0",
44
- "@types/react": "^18.3.12",
45
- "@types/react-dom": "^18.3.1",
46
- "happy-dom": "^15.10.2",
47
- "jsdom": "^29.0.0",
48
- "postcss": "^8.5.6",
49
- "tailwindcss": "^4.0.0",
50
- "typescript": "^5.7.0",
51
- "vite": "^6.0.0",
52
- "vitest": "^2.1.8",
53
- "@muonroi/ui-engine-core": "^0.1.21"
54
- },
55
- "scripts": {
56
- "build": "npm run -w @muonroi/ui-engine-core build && vite build && vite build -c vite.trace.config.ts && vite build -c vite.flow.config.ts && tsc -p tsconfig.json --emitDeclarationOnly",
57
- "build:flow": "vite build -c vite.flow.config.ts",
58
- "test": "vitest run"
59
- }
60
- }
1
+ {
2
+ "name": "@muonroi/ui-engine-rule-components",
3
+ "version": "0.1.23",
4
+ "description": "Muonroi rule engine web components",
5
+ "type": "module",
6
+ "main": "dist/muonroi-rule-components.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/muonroi-rule-components.esm.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "npm run -w @muonroi/ui-engine-core build && vite build && vite build -c vite.trace.config.ts && vite build -c vite.flow.config.ts && tsc -p tsconfig.json --emitDeclarationOnly",
19
+ "build:flow": "vite build -c vite.flow.config.ts",
20
+ "preview:demo": "vite -c vite.preview.config.ts",
21
+ "test": "vitest run --coverage"
22
+ },
23
+ "dependencies": {
24
+ "@codemirror/autocomplete": "^6.20.1",
25
+ "@codemirror/commands": "^6.10.3",
26
+ "@codemirror/lang-javascript": "^6.2.5",
27
+ "@codemirror/lang-json": "^6.0.2",
28
+ "@codemirror/language": "^6.12.2",
29
+ "@codemirror/lint": "^6.9.5",
30
+ "@codemirror/state": "^6.6.0",
31
+ "@codemirror/view": "^6.40.0",
32
+ "@dnd-kit/core": "^6.3.0",
33
+ "@dnd-kit/sortable": "^8.0.0",
34
+ "@lezer/highlight": "^1.2.3",
35
+ "@microsoft/signalr": "^8.0.0",
36
+ "@tanstack/virtual-core": "^3.10.0",
37
+ "@xyflow/react": "^12.9.3",
38
+ "@lit-labs/virtualizer": "^2.1.1",
39
+ "lit": "^3.2.0",
40
+ "monaco-editor": "^0.52.0",
41
+ "react": "^18.3.1",
42
+ "react-dom": "^18.3.1",
43
+ "zustand": "^5.0.0"
44
+ },
45
+ "peerDependencies": {
46
+ "@muonroi/ui-engine-core": ">=0.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "@muonroi/ui-engine-core": "workspace:^",
50
+ "@tailwindcss/postcss": "^4.1.11",
51
+ "@testing-library/react": "^16.3.0",
52
+ "@types/react": "^18.3.12",
53
+ "@types/react-dom": "^18.3.1",
54
+ "@vitest/coverage-v8": "^2.1.9",
55
+ "happy-dom": "^15.10.2",
56
+ "jsdom": "^29.0.0",
57
+ "postcss": "^8.5.6",
58
+ "tailwindcss": "^4.0.0",
59
+ "typescript": "^5.7.0",
60
+ "vite": "^6.0.0",
61
+ "vitest": "^2.1.8"
62
+ }
63
+ }