qrlayout-core 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/README.md +13 -1
  2. package/package.json +6 -8
package/README.md CHANGED
@@ -9,7 +9,7 @@ A powerful, framework-agnostic QR code layout engine for designing and printing
9
9
 
10
10
  - **Precise Layouts**: Define stickers in `mm`, `cm`, `in`, or `px`.
11
11
  - **Multiple Formats**: Export to Canvas (preview), PNG/JPEG (image), PDF (print), or ZPL (industrial thermal printers).
12
- - **Dynamic Content**: Use variable placeholders (e.g., `{{name}}`, `{{sku}}`) to batch generate unique stickers.
12
+ - **Dynamic Content**: Use variable placeholders (e.g., `{{name}}`, `{{visitorId}}`) to batch generate unique stickers.
13
13
  - **Lightweight**: Minimal dependencies. PDF export is optional to keep bundle size small.
14
14
 
15
15
  ## Keywords
@@ -125,19 +125,31 @@ pdfDoc.save("badges.pdf");
125
125
 
126
126
  | Property | Type | Description |
127
127
  |----------|------|-------------|
128
+ | `id` | `string` | Unique identifier for the layout. |
129
+ | `name` | `string` | Human-readable name of the layout. |
128
130
  | `width` | `number` | Width of the sticker. |
129
131
  | `height` | `number` | Height of the sticker. |
130
132
  | `unit` | `"mm" \| "cm" \| "in" \| "px"` | Unit of measurement. |
131
133
  | `elements` | `StickerElement[]` | List of items on the sticker. |
134
+ | `backgroundColor` | `string` | (Optional) Background color hex. |
135
+ | `backgroundImage` | `string` | (Optional) Background image URL. |
132
136
 
133
137
  ### `StickerElement` Interface
134
138
 
135
139
  | Property | Type | Description |
136
140
  |----------|------|-------------|
141
+ | `id` | `string` | Unique identifier for the element. |
137
142
  | `type` | `"text" \| "qr"` | Type of element. |
138
143
  | `x`, `y` | `number` | Position from top-left. |
139
144
  | `w`, `h` | `number` | Width and height. |
140
145
  | `content` | `string` | Text, URL, source. Supports `{{key}}` syntax. |
146
+ | `style.fontFamily` | `string` | Font family (e.g., 'sans-serif', 'Inter'). |
147
+ | `style.fontSize` | `number` | Font size (px). |
148
+ | `style.fontWeight` | `string \| number` | Font weight (e.g., 'bold', 700). |
149
+ | `style.textAlign` | `"left" \| "center" \| "right"` | Horizontal alignment. |
150
+ | `style.verticalAlign` | `"top" \| "middle" \| "bottom"` | Vertical alignment. |
151
+ | `style.color` | `string` | Text color hex code. |
152
+ | `style.backgroundColor` | `string` | Background color for the element. |
141
153
 
142
154
  ## License
143
155
 
package/package.json CHANGED
@@ -1,20 +1,19 @@
1
1
  {
2
2
  "name": "qrlayout-core",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "QR code layout builder, renderer, and exporter for stickers, labels, and PDFs",
5
5
  "keywords": [
6
6
  "qr",
7
7
  "qrcode",
8
8
  "qr-code",
9
- "qr code",
9
+ "qr-layout",
10
+ "qr-layout-designer",
10
11
  "layout",
11
- "sticker",
12
- "label",
12
+ "qr-sticker",
13
+ "qr-label",
13
14
  "generator",
14
15
  "renderer",
15
- "pdf",
16
16
  "zpl",
17
- "barcode",
18
17
  "thermal-printer"
19
18
  ],
20
19
  "author": "Shashidhar Naik <shashidharnaik8@gmail.com>",
@@ -57,8 +56,7 @@
57
56
  "jspdf": "^3.0.4"
58
57
  },
59
58
  "devDependencies": {
60
- "@types/jspdf": "^1.3.3",
61
59
  "@types/qrcode": "^1.5.6",
62
60
  "typescript": "^5.3.3"
63
61
  }
64
- }
62
+ }