tauri-plugin-thermal-printer 1.0.0 → 1.0.2

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 CHANGED
@@ -151,15 +151,10 @@ The plugin translates all sections into **ESC/POS** (Escape Sequence for Point o
151
151
  cargo add tauri-plugin-thermal-printer
152
152
  ```
153
153
 
154
- ```toml
155
- [dependencies]
156
- tauri-plugin-thermal-printer = "version"
157
- ```
158
-
159
154
  ### Bun / NPM / PNPM
160
155
 
161
156
  ```bash
162
- # it's not published yet
157
+ bun add tauri-plugin-thermal-printer
163
158
  ```
164
159
 
165
160
  This library not only contains the connector to the backend. Also adds the types for the print structure...
@@ -587,7 +582,8 @@ Prints a barcode.
587
582
  "barcode_type": "CODE128",
588
583
  "width": 2,
589
584
  "height": 100,
590
- "text_position": "below"
585
+ "text_position": "below",
586
+ "align": "center"
591
587
  }
592
588
  }
593
589
  ```
@@ -597,6 +593,7 @@ Prints a barcode.
597
593
  - `width` (number, required): Module width
598
594
  - `height` (number, required): Height in dots
599
595
  - `text_position` (string, required): Text position ("not_printed", "above", "below", "both")
596
+ - `align` (string, optional): Horizontal alignment ("left", "center", "right") (default: current global alignment)
600
597
 
601
598
  ##### Table
602
599
  Prints a table.
@@ -63,6 +63,7 @@ export interface Barcode {
63
63
  width: number;
64
64
  height: number;
65
65
  text_position: 'none' | 'above' | 'below' | 'both' | string;
66
+ align?: 'left' | 'center' | 'right' | string;
66
67
  }
67
68
  export interface DataMatrixModel {
68
69
  data: string;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "tauri-plugin-thermal-printer",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "author": "luis3132",
5
5
  "description": "Plugin for Tauri to send esc/pos commands to thermal_printer",
6
6
  "type": "module",
7
7
  "types": "./dist-js/index.d.ts",
8
8
  "main": "./dist-js/index.cjs",
9
9
  "module": "./dist-js/index.js",
10
+ "license": "MIT",
10
11
  "exports": {
11
12
  "types": "./dist-js/index.d.ts",
12
13
  "import": "./dist-js/index.js",
@@ -30,4 +31,4 @@
30
31
  "typescript": "^5.9.3",
31
32
  "tslib": "^2.8.1"
32
33
  }
33
- }
34
+ }