@stratametriq/id-card-designer 1.10.0 → 1.11.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/README.md +103 -42
- package/dist/index.es.js +15846 -14659
- package/dist/index.js +237 -195
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A universal, dynamic, and highly customizable **ID Card Designer & Batch Print Dashboard** for React, Vue, Angular, and Vanilla JS.
|
|
4
4
|
|
|
5
|
-
> **Current release:** 1.
|
|
5
|
+
> **Current release:** 1.11.0
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -10,8 +10,10 @@ A universal, dynamic, and highly customizable **ID Card Designer & Batch Print D
|
|
|
10
10
|
|
|
11
11
|
- [Overview](#overview)
|
|
12
12
|
- [Live Demo](#live-demo)
|
|
13
|
+
- [What's New in v1.11.0](#whats-new-in-v1110)
|
|
13
14
|
- [What's New in v1.10.0](#whats-new-in-v1100)
|
|
14
15
|
- [Features](#features)
|
|
16
|
+
- [ID Card Verification & Card Lifecycle](#id-card-verification--card-lifecycle)
|
|
15
17
|
- [How It Works](#how-it-works)
|
|
16
18
|
- [Import Data](#import-data)
|
|
17
19
|
- [Design Cards](#design-cards)
|
|
@@ -38,7 +40,7 @@ It is designed for applications such as:
|
|
|
38
40
|
- Membership systems
|
|
39
41
|
- Internal identity-card workflows
|
|
40
42
|
|
|
41
|
-
The package combines **visual card design** with **structured data and
|
|
43
|
+
The package combines **visual card design** with **structured data, batch generation, card lifecycle management, and live digital verification** so developers do not need to build an ID-card production workflow from scratch.
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
@@ -50,46 +52,14 @@ You can launch a complete ID card design studio and batch print dashboard with j
|
|
|
50
52
|
|
|
51
53
|
---
|
|
52
54
|
|
|
53
|
-
## What's New in v1.
|
|
54
|
-
- **
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## What's New in v1.9.5
|
|
64
|
-
- **Multi-Mode Scannable QR Codes:** Added support for Dynamic Field Binding (with URL prefixes), Static URLs, and vCard 3.0 Digital Contact Cards (instant smartphone scan-to-save contacts).
|
|
65
|
-
- **Custom QR Colors & Error Correction Level (ECC):** Full foreground and background color pickers with selectable ECC levels (`L`, `M`, `Q`, `H`).
|
|
66
|
-
- **1-Click Blank Excel Template Generator:** Download clean, pre-formatted `.xlsx` spreadsheets matching the columns of any active department.
|
|
67
|
-
- **CR80 Thermal PVC Print Matrix Fix:** Accurate single-card sheet layout (`1 Col × 1 Row`, `54×86 mm`) calculations in the Live Sheet Grid Matrix.
|
|
68
|
-
- **Enhanced Text Wrapping & Auto-Shrink:** Intelligent text break-word handling for long addresses and multi-line descriptions.
|
|
69
|
-
- **Roster Monospace ID Badge Polish:** Added `whiteSpace: nowrap` to table ID badges in the Live Roster Directory.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## What's New in v1.9.4
|
|
74
|
-
- **Full Roster CRUD & IndexedDB Sync:** Added an interactive **"+ Add Record"** modal with integrated photo upload, an **"Edit Record"** modal for fixing details on the fly, individual row **"Delete"** with confirmation, and bulk **"Delete Selected"** actions—all synchronized with browser IndexedDB (`localforage`).
|
|
75
|
-
- **Interactive Multi-Column Sorting:** 1-click column header sorting (Ascending / Descending) across Name & Avatar, Class/Designation, ID Number, Guardian/Department, and Contact Phone.
|
|
76
|
-
- **Smart Roster Pagination:** High-performance pagination toolbar (`10`, `25`, `50`, `100`, `All`) with responsive page navigation controls, preventing DOM lag on large imported rosters (1,000+ cards).
|
|
77
|
-
- **Production-Grade Scannable QR & 1D Barcodes:** Upgraded QR codes (`qrcode`) and 1D Code 128 Barcodes (`jsbarcode`) to produce mathematically accurate, industry-standard matrices readable by mobile cameras and hardware laser scanners.
|
|
78
|
-
- **Multi-CSV Import Append:** Sequential importing now seamlessly merges new records and dynamic fields without overriding previously imported data.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## What's New in v1.9.0
|
|
83
|
-
- **AI Background Removal:** Integrated an advanced, fully client-side WebAssembly machine learning model (`@imgly/background-removal`) directly into the Live Roster Data Table. Users can now perfectly remove the background from uploaded profile photos or webcam captures with a single click, completely offline, without any backend processing or API keys.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## What's New in v1.8.0
|
|
88
|
-
- **Canva-Style Smart Alignment Guides:** Magnetically snap elements to the center of the card or align them perfectly with other elements using color-coded visual guides (Purple for center, Red for edges).
|
|
89
|
-
- **High-Res ZIP Export:** Batch export individual ID cards as high-resolution (300 DPI) PNG files neatly packaged in a single ZIP archive.
|
|
90
|
-
- **Thermal PVC Printer Support:** Native support for exporting a perfectly dimensioned CR80 layout (1 card per page) specifically optimized for Zebra, Fargo, and Magicard thermal printers.
|
|
91
|
-
- **Dynamic Image Fallbacks:** Beautifully generated initial-based avatars with consistent gradient backgrounds are automatically inserted if a profile photo is missing.
|
|
92
|
-
- **Curved Typography:** Advanced SVG text rendering to wrap and curve text along circular paths.
|
|
55
|
+
## What's New in v1.11.0
|
|
56
|
+
- **ID Card Digital Verification & Card Lifecycle Suite:** Upgrades `@stratametriq/id-card-designer` from a badge design canvas into a complete Enterprise Credential & Anti-Counterfeiting Platform.
|
|
57
|
+
- **Standalone `<IdCardVerificationModal />`:** Mobile-friendly digital verification certificate featuring real-time status banners (🟢 `Active`, 🟣 `Issued`, ⚪ `Draft`, 🟠 `Suspended`, 🔴 `Revoked`, 🚨 `Lost`), official database photo matching, and digital checksum verification.
|
|
58
|
+
- **Built-in HTML5 Camera Scanner:** Optical scanner using `getUserMedia` with targeting reticle overlay for instant badge scanning via laptop webcams or smartphone cameras.
|
|
59
|
+
- **Live Roster Lifecycle Controls:** Added interactive **Status Column** in `<IdCardManager />` with 1-click status switcher dropdowns, row-level **"Verify"** action buttons, and **Batch Action ▾** menu.
|
|
60
|
+
- **Smart Lifecycle Filter Tabs:** 1-Click filter toolbar (`All`, `Active`, `Issued`, `Draft`, `Suspended`, `Revoked`, `Selected`).
|
|
61
|
+
- **Automatic Print Issuance Promotion:** Batch PDF or ZIP export automatically promotes printed cards to **`Issued`** status with an ISO issuance timestamp (`issuedAt`).
|
|
62
|
+
- **Dynamic Verification QR Code Preset:** Dedicated "Verification QR" button and configuration in Property Editor with dynamic URL binding for live scanning.
|
|
93
63
|
|
|
94
64
|
---
|
|
95
65
|
|
|
@@ -104,9 +74,100 @@ You can launch a complete ID card design studio and batch print dashboard with j
|
|
|
104
74
|
- **🔳 QR Codes & Barcodes:** Generate dynamic, scannable QR codes (`qrcode`) and 1D Code 128 barcodes (`jsbarcode`) and bind them to record values such as admission numbers, employee IDs, URLs, or other unique identifiers.
|
|
105
75
|
- **🏷️ Dynamic Field Placeholders:** Bind template elements to imported data (e.g., `ID: {{admissionNo}}`).
|
|
106
76
|
- **🧠 Conditional Rendering:** Text elements can use JavaScript expressions for conditional output (e.g., `{{ department === 'HR' ? 'Red' : 'Blue' }}`).
|
|
77
|
+
- **🛡️ Digital ID Card Verification:** Built-in `<IdCardVerificationModal />` with real-time status banners, anti-tampering photo match, HTML5 camera scanner, and public verification URLs.
|
|
78
|
+
- **🔄 Full Card Lifecycle Management:** Complete state machine tracking (`Active`, `Issued`, `Draft`, `Suspended`, `Revoked`, `Lost`), interactive table status pills, batch status transitions, and automatic issuance logging on print.
|
|
107
79
|
- **🛡️ Brand & Security Watermark Suite:** Add customizable text watermarks (`STRATAMETRIQ`, `CONFIDENTIAL`, `SAMPLE`), uploaded brand seal logos, and repeating security tile patterns with live opacity, rotation, and layer controls.
|
|
108
80
|
- **🔲 Smart Alignment Guides:** Snap elements to the center of the card or align them with other elements using visual color-coded guides (Purple for center, Red for edges).
|
|
109
81
|
- **⌨️ Keyboard Shortcuts:** Navigate the editor faster using Undo/Redo (`Ctrl+Z`, `Ctrl+Y`), Duplicate (`Ctrl+C`, `Ctrl+V`), Delete, and Arrow Key nudging.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## ID Card Verification & Card Lifecycle
|
|
86
|
+
|
|
87
|
+
### 1. Card Lifecycle State Machine
|
|
88
|
+
|
|
89
|
+
Physical and digital ID credentials transition through an operational lifecycle:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
[Import / Add] ──► DRAFT
|
|
93
|
+
│
|
|
94
|
+
▼
|
|
95
|
+
APPROVED
|
|
96
|
+
│
|
|
97
|
+
▼ (Batch Print / Export)
|
|
98
|
+
ISSUED ──► ACTIVE ◄──► SUSPENDED (Temporary Freeze)
|
|
99
|
+
│
|
|
100
|
+
┌──────────────────┼──────────────────┐
|
|
101
|
+
▼ ▼ ▼
|
|
102
|
+
EXPIRED REVOKED LOST / STOLEN
|
|
103
|
+
(Term Ended) (Resigned/Exit) (Blacklisted)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Lifecycle State | Badge Indicator | Meaning & Access Rule |
|
|
107
|
+
| :--- | :--- | :--- |
|
|
108
|
+
| **Draft** | ⚪ `Gray` | Newly created record; pending administrative review before printing. |
|
|
109
|
+
| **Approved** | 🔵 `Blue` | Validated and approved for inclusion in batch print runs. |
|
|
110
|
+
| **Issued** | 🟣 `Purple` | High-DPI physical card printed; logs issuance timestamp (`issuedAt`). |
|
|
111
|
+
| **Active** | 🟢 `Green` | Currently valid credential; full campus / facility entry authorized. |
|
|
112
|
+
| **Suspended** | 🟠 `Amber` | Temporary administrative hold (fees, disciplinary, leave). Gate entry denied. |
|
|
113
|
+
| **Revoked** | 🔴 `Red` | Credential invalidated permanently (student graduated, employee resigned). |
|
|
114
|
+
| **Lost / Stolen** | 🚨 `Rose` | Badge blacklisted to prevent unauthorized impersonator entry. Confiscate on sight. |
|
|
115
|
+
| **Expired** | 🟡 `Yellow` | Credential validity date passed; renewal required. |
|
|
116
|
+
|
|
117
|
+
### 2. Live Anti-Counterfeiting Verification
|
|
118
|
+
|
|
119
|
+
Every badge template can include a **Dynamic Verification QR Code** that points to an authentic verification certificate:
|
|
120
|
+
```text
|
|
121
|
+
https://verify.stratametriq.com/badge/{{id}}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
When scanned by any smartphone camera or optical scanner:
|
|
125
|
+
1. **Live Credential Status**: Instantly displays whether the badge is 🟢 `ACTIVE`, 🟠 `SUSPENDED`, or 🔴 `REVOKED`.
|
|
126
|
+
2. **Official Database Photo Match**: Displays the high-resolution photo stored in the database to immediately expose photo-swapping tampering on physical PVC cards.
|
|
127
|
+
3. **Audit Information**: Card serial number, emergency phone numbers, admission/employee code, and tamper-proof verification checksum.
|
|
128
|
+
|
|
129
|
+
### 3. Verification Component Code Example
|
|
130
|
+
|
|
131
|
+
```jsx
|
|
132
|
+
import React, { useState } from 'react';
|
|
133
|
+
import { IdCardVerificationModal } from '@stratametriq/id-card-designer';
|
|
134
|
+
|
|
135
|
+
function SecurityGateApp() {
|
|
136
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
137
|
+
const [activeRecord, setActiveRecord] = useState(null);
|
|
138
|
+
|
|
139
|
+
const rosterRecords = [
|
|
140
|
+
{
|
|
141
|
+
id: 'ADM-2026-104',
|
|
142
|
+
studentName: 'Rahul Sharma',
|
|
143
|
+
classSec: 'Class X [A]',
|
|
144
|
+
status: 'active',
|
|
145
|
+
profilePhoto: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300'
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<div>
|
|
151
|
+
<button onClick={() => setIsOpen(true)}>
|
|
152
|
+
🛡️ Verify ID Badge
|
|
153
|
+
</button>
|
|
154
|
+
|
|
155
|
+
<IdCardVerificationModal
|
|
156
|
+
isOpen={isOpen}
|
|
157
|
+
onClose={() => setIsOpen(false)}
|
|
158
|
+
records={rosterRecords}
|
|
159
|
+
activeRecord={activeRecord}
|
|
160
|
+
onUpdateRecordStatus={(recordId, newStatus) => {
|
|
161
|
+
console.log(`Updated record ${recordId} to ${newStatus}`);
|
|
162
|
+
}}
|
|
163
|
+
theme="dark"
|
|
164
|
+
categoryLabel="Student Credential"
|
|
165
|
+
/>
|
|
166
|
+
</div>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
110
171
|
---
|
|
111
172
|
|
|
112
173
|
## How It Works
|