hierarchical-approval 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to `hierarchical-approval` are documented here. This project
4
4
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [0.3.1] - 2026-06-26
7
+
8
+ ### Docs
9
+
10
+ - Replace the README's Mermaid code blocks with pre-rendered PNG diagrams
11
+ referenced by absolute URL, so the status lifecycle, approval flow, and
12
+ architecture diagrams render on npmjs.com (which does not render Mermaid) as
13
+ well as on GitHub.
14
+
6
15
  ## [0.3.0] - 2026-06-26
7
16
 
8
17
  ### Added — enterprise plug-in layer
package/README.md CHANGED
@@ -97,19 +97,9 @@ Approval workflows are deceptively simple until they aren't. Most teams start wi
97
97
 
98
98
  ### The status lifecycle
99
99
 
100
- ```mermaid
101
- stateDiagram-v2
102
- [*] --> pending
103
- pending --> pending: approve advances a level
104
- pending --> approved: final level or override
105
- pending --> rejected: reject
106
- pending --> cancelled: cancel
107
- pending --> expired: deadline reached
108
- approved --> [*]
109
- rejected --> [*]
110
- cancelled --> [*]
111
- expired --> [*]
112
- ```
100
+ <p align="center">
101
+ <img src="https://raw.githubusercontent.com/matthews-wong/hierarchical-approval/main/assets/diagrams/lifecycle.png" alt="Status lifecycle: pending advances on approve, and resolves to approved, rejected, cancelled, or expired." width="640">
102
+ </p>
113
103
 
114
104
  > `submit()` creates the instance in `pending`; `resubmit()` on a rejected instance spawns a new linked instance starting again at level 1.
115
105
 
@@ -117,20 +107,9 @@ stateDiagram-v2
117
107
 
118
108
  A level is satisfied according to its mode (`any`, `all`, `majority`, `quorum`, or `weighted`):
119
109
 
120
- ```mermaid
121
- flowchart TD
122
- S[Submit] --> R[Resolve approvers for current level]
123
- R --> ACT{An approver acts}
124
- ACT -->|approve| MET{Level threshold met}
125
- ACT -->|reject| REJ{Level rejected}
126
- MET -->|not yet| ACT
127
- MET -->|yes| MORE{More levels}
128
- MORE -->|yes| ADV[Advance to next level]
129
- ADV --> R
130
- MORE -->|no| DONE[Status approved]
131
- REJ -->|yes| OUT[Status rejected]
132
- REJ -->|no| ACT
133
- ```
110
+ <p align="center">
111
+ <img src="https://raw.githubusercontent.com/matthews-wong/hierarchical-approval/main/assets/diagrams/flow.png" alt="Approval flow: submit, resolve approvers, approvers act; when the level threshold is met advance to the next level or complete; rejection ends the instance." width="380">
112
+ </p>
134
113
 
135
114
  ### Architecture — a small core with pluggable ports
136
115
 
@@ -138,17 +117,9 @@ The engine never talks to your database, queue, or notification service directly
138
117
 
139
118
  Solid arrow = required (storage). Dotted arrows = optional ports you can plug in:
140
119
 
141
- ```mermaid
142
- flowchart LR
143
- APP[Your application] --> ENG[ApprovalEngine]
144
- ENG --> ST[IStorageAdapter - Memory, Postgres or custom]
145
- ENG -.-> NO[INotificationAdapter]
146
- ENG -.-> AU[IAuditAdapter]
147
- ENG -.-> ME[IMetricsAdapter]
148
- ENG -.-> SC[ISchedulerAdapter]
149
- ENG -.-> AZ[IAuthorizationPolicy]
150
- ENG -.-> MW[IOperationMiddleware]
151
- ```
120
+ <p align="center">
121
+ <img src="https://raw.githubusercontent.com/matthews-wong/hierarchical-approval/main/assets/diagrams/architecture.png" alt="Architecture: your application calls ApprovalEngine, which requires an IStorageAdapter (Memory, Postgres, or custom) and optionally plugs into notification, audit, metrics, scheduler, authorization, and middleware ports." width="560">
122
+ </p>
152
123
 
153
124
  ---
154
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hierarchical-approval",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript-first hierarchical approval engine for ERP developers",
5
5
  "keywords": [
6
6
  "approval",