@rdlabo/capacitor-brotherprint 7.0.1 → 8.1.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/Package.swift CHANGED
@@ -3,14 +3,14 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "RdlaboCapacitorBrotherprint",
6
- platforms: [.iOS(.v14)],
6
+ platforms: [.iOS(.v15)],
7
7
  products: [
8
8
  .library(
9
9
  name: "RdlaboCapacitorBrotherprint",
10
10
  targets: ["BrotherPrintPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
14
14
  .package(path: "../../../ios/LocalPackages/BRLMPrinterKit")
15
15
  ],
16
16
  targets: [
package/README.md CHANGED
@@ -273,6 +273,7 @@ https://github.com/rdlabo-team/capacitor-brotherprint/blob/main/demo/src/app/hom
273
273
 
274
274
  * [`printImage(...)`](#printimage)
275
275
  * [`search(...)`](#search)
276
+ * [`isPortAvailable(...)`](#isportavailable)
276
277
  * [`cancelSearchWiFiPrinter()`](#cancelsearchwifiprinter)
277
278
  * [`cancelSearchBluetoothPrinter()`](#cancelsearchbluetoothprinter)
278
279
  * [`addListener(BrotherPrintEventsEnum.onPrinterAvailable, ...)`](#addlistenerbrotherprinteventsenumonprinteravailable-)
@@ -316,6 +317,24 @@ Search for printers. If not found, it will return an empty array.(not error)
316
317
  --------------------
317
318
 
318
319
 
320
+ ### isPortAvailable(...)
321
+
322
+ ```typescript
323
+ isPortAvailable(option: BRLMChannelResult) => Promise<isPortAvailableResult>
324
+ ```
325
+
326
+ If you have saved the last connected <a href="#brlmchannelresult">BRLMChannelResult</a>,
327
+ you can use it to verify whether it is currently usable.
328
+
329
+ | Param | Type |
330
+ | ------------ | --------------------------------------------------------------- |
331
+ | **`option`** | <code><a href="#brlmchannelresult">BRLMChannelResult</a></code> |
332
+
333
+ **Returns:** <code>Promise&lt;<a href="#isportavailableresult">isPortAvailableResult</a>&gt;</code>
334
+
335
+ --------------------
336
+
337
+
319
338
  ### cancelSearchWiFiPrinter()
320
339
 
321
340
  ```typescript
@@ -483,6 +502,11 @@ These are optional. If these are not set, default values are assigned by the pri
483
502
  <code>{ /** * 'usb' is android only, and now developing. */ port: <a href="#brlmprinterport">BRLMPrinterPort</a>; /** * searchDuration is the time to end search for devices. * default is 15 seconds. * use only port is 'wifi' or 'bluetoothLowEnergy'. */ searchDuration: number; }</code>
484
503
 
485
504
 
505
+ #### isPortAvailableResult
506
+
507
+ <code>{ result: boolean; }</code>
508
+
509
+
486
510
  #### ErrorInfo
487
511
 
488
512
  <code>{ message: string; code: number; }</code>
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = ['ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}']
14
- s.ios.deployment_target = '14.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.dependency 'BRLMPrinterKit'
17
17
  s.swift_version = '5.1'
@@ -1,17 +1,19 @@
1
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
+
1
3
  ext {
2
4
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
4
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
5
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
6
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
5
7
  }
6
8
 
7
9
  buildscript {
8
- ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.25'
10
+ ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '2.2.20'
9
11
  repositories {
10
12
  google()
11
13
  mavenCentral()
12
14
  }
13
15
  dependencies {
14
- classpath 'com.android.tools.build:gradle:8.7.2'
16
+ classpath 'com.android.tools.build:gradle:8.13.0'
15
17
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
16
18
  }
17
19
  }
@@ -20,11 +22,11 @@ apply plugin: 'com.android.library'
20
22
  apply plugin: 'kotlin-android'
21
23
 
22
24
  android {
23
- namespace "jp.rdlabo.capacitor.plugin.brotherprint.capacitorbrotherprint"
24
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
25
+ namespace = "jp.rdlabo.capacitor.plugin.brotherprint.capacitorbrotherprint"
26
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
25
27
  defaultConfig {
26
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
27
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
28
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
29
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
28
30
  versionCode 1
29
31
  versionName "1.0"
30
32
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -36,14 +38,17 @@ android {
36
38
  }
37
39
  }
38
40
  lintOptions {
39
- abortOnError false
41
+ abortOnError = false
40
42
  }
41
43
  compileOptions {
42
44
  sourceCompatibility JavaVersion.VERSION_21
43
45
  targetCompatibility JavaVersion.VERSION_21
44
46
  }
45
- kotlinOptions {
46
- jvmTarget = '21'
47
+ }
48
+
49
+ kotlin {
50
+ compilerOptions {
51
+ jvmTarget = JvmTarget.JVM_21
47
52
  }
48
53
  }
49
54
 
@@ -14,6 +14,7 @@ import android.hardware.usb.UsbManager
14
14
  import android.os.Build
15
15
  import android.util.Base64
16
16
  import android.util.Log
17
+ import androidx.core.content.ContextCompat
17
18
  import com.brother.sdk.lmprinter.BLESearchOption
18
19
  import com.brother.sdk.lmprinter.Channel
19
20
  import com.brother.sdk.lmprinter.NetworkSearchOption
@@ -157,6 +158,37 @@ class BrotherPrint : Plugin() {
157
158
  return manager.adapter
158
159
  }
159
160
 
161
+
162
+ @PluginMethod
163
+ fun isPortAvailable(call: PluginCall) {
164
+ val port: String? = call.getString("port", "wifi")
165
+ val channelInfo: String? = call.getString("channelInfo", "")
166
+
167
+ Thread {
168
+ val channel: Channel = when (port) {
169
+ "usb" -> Channel.newUsbChannel(bridge.context.getSystemService(Context.USB_SERVICE) as UsbManager)
170
+ "wifi" -> Channel.newWifiChannel(channelInfo)
171
+ "bluetooth" -> Channel.newBluetoothChannel(channelInfo, getBluetoothAdapter(bridge.context))
172
+ "bluetoothLowEnergy" -> Channel.newBluetoothLowEnergyChannel(
173
+ channelInfo, bridge.context, getBluetoothAdapter(bridge.context)
174
+ )
175
+ else -> {
176
+ call.reject("Error - port:$port is not supported")
177
+ return@Thread
178
+ }
179
+ }
180
+
181
+ val result = PrinterDriverGenerator.openChannel(channel)
182
+ if (result.error.code != OpenChannelError.ErrorCode.NoError) {
183
+ call.resolve(JSObject().put("result", false))
184
+ return@Thread
185
+ }
186
+ val printerDriver = result.driver
187
+ printerDriver.closeChannel()
188
+ call.resolve(JSObject().put("result", true))
189
+ }.start()
190
+ }
191
+
160
192
  @PluginMethod
161
193
  fun search(call: PluginCall) {
162
194
  when(call.getString("port", "wifi")) {
@@ -349,8 +381,11 @@ class BrotherPrint : Plugin() {
349
381
  Context.RECEIVER_NOT_EXPORTED
350
382
  )
351
383
  } else {
352
- bridge.context.registerReceiver(
353
- usbReceiver, IntentFilter(ActionUSBPermission)
384
+ ContextCompat.registerReceiver(
385
+ bridge.context,
386
+ usbReceiver,
387
+ IntentFilter(ActionUSBPermission),
388
+ ContextCompat.RECEIVER_NOT_EXPORTED
354
389
  )
355
390
  }
356
391
 
package/dist/docs.json CHANGED
@@ -41,6 +41,25 @@
41
41
  ],
42
42
  "slug": "search"
43
43
  },
44
+ {
45
+ "name": "isPortAvailable",
46
+ "signature": "(option: BRLMChannelResult) => Promise<isPortAvailableResult>",
47
+ "parameters": [
48
+ {
49
+ "name": "option",
50
+ "docs": "",
51
+ "type": "BRLMChannelResult"
52
+ }
53
+ ],
54
+ "returns": "Promise<isPortAvailableResult>",
55
+ "tags": [],
56
+ "docs": "If you have saved the last connected BRLMChannelResult,\nyou can use it to verify whether it is currently usable.",
57
+ "complexTypes": [
58
+ "isPortAvailableResult",
59
+ "BRLMChannelResult"
60
+ ],
61
+ "slug": "isportavailable"
62
+ },
44
63
  {
45
64
  "name": "cancelSearchWiFiPrinter",
46
65
  "signature": "() => Promise<void>",
@@ -917,6 +936,17 @@
917
936
  }
918
937
  ]
919
938
  },
939
+ {
940
+ "name": "isPortAvailableResult",
941
+ "slug": "isportavailableresult",
942
+ "docs": "",
943
+ "types": [
944
+ {
945
+ "text": "{\n result: boolean;\n}",
946
+ "complexTypes": []
947
+ }
948
+ ]
949
+ },
920
950
  {
921
951
  "name": "ErrorInfo",
922
952
  "slug": "errorinfo",
@@ -79,10 +79,10 @@ export declare enum BRLMPrinterLabelName {
79
79
  RDDieCutW60H80 = "RDDieCutW60H80",
80
80
  RDDieCutW60H100 = "RDDieCutW60H100"
81
81
  }
82
- export declare type BRLMPrinterAutoCutType = boolean;
83
- export declare type BRLMPrinterScaleValueType = number;
84
- export declare type BRLMPrinterHalftoneThresholdType = number;
85
- export declare type BRLMPrinterNumberOfCopies = number;
82
+ export type BRLMPrinterAutoCutType = boolean;
83
+ export type BRLMPrinterScaleValueType = number;
84
+ export type BRLMPrinterHalftoneThresholdType = number;
85
+ export type BRLMPrinterNumberOfCopies = number;
86
86
  /**
87
87
  * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation
88
88
  */
@@ -1,139 +1,17 @@
1
1
  import type { PluginListenerHandle } from '@capacitor/core';
2
- import type { BRLMPrinterLabelName, BRLMPrinterModelName, BRLMPrinterAutoCutType, BRLMPrinterCompressMode, BRLMPrinterHalftone, BRLMPrinterHalftoneThresholdType, BRLMPrinterHorizontalAlignment, BRLMPrinterNumberOfCopies, BRLMPrinterPrintQuality, BRLMPrinterImageRotation, BRLMPrinterScaleMode, BRLMPrinterScaleValueType, BRLMPrinterVerticalAlignment, BRLMPrinterCustomPaperType, BRLMPrinterCustomPaperUnit, BRLMPrinterPort } from './brother-printer.enum';
3
2
  import type { BrotherPrintEventsEnum } from './events.enum';
4
- export declare type BRLMChannelResult = {
5
- port: BRLMPrinterPort;
6
- modelName: string;
7
- serialNumber: string;
8
- macAddress: string;
9
- nodeName: string;
10
- location: string;
11
- /**
12
- * This need to connect to the printer.
13
- * wifi: IP Address
14
- * bluetooth: macAddress
15
- * bluetoothLowEnergy: modelName for bluetoothLowEnergy
16
- */
17
- channelInfo: string;
18
- };
19
- export declare type BRLMPrintOptions = {
20
- encodedImage: string;
21
- /**
22
- * Should use enum BRLMPrinterModelName
23
- */
24
- modelName: BRLMPrinterModelName;
25
- } & Partial<BRLMChannelResult> & (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings);
26
- export declare type BRLMPrinterTDModelSettings = {
27
- /**
28
- * Should use enum BRKMPrinterCustomPaperType
29
- */
30
- paperType: BRLMPrinterCustomPaperType;
31
- /**
32
- * The width of the label. For example, the RD-U04J1 is 60.0 wide.
33
- */
34
- tapeWidth: number;
35
- /**
36
- * The length of the label. For example, the RD-U04J1 is 60.0 wide.
37
- */
38
- tapeLength: number;
39
- /**
40
- * It is the difference between a sticker and a mount.
41
- * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`
42
- */
43
- marginTop: number;
44
- marginRight: number;
45
- marginBottom: number;
46
- marginLeft: number;
47
- /**
48
- * The spacing between seals. For example, the RD-U04J1 is 0.2.
49
- */
50
- gapLength: number;
51
- paperMarkPosition: number;
52
- paperMarkLength: number;
53
- /**
54
- * Should use enum BRKMPrinterCustomPaperUnit.
55
- * For example, the RD-U04J1 is mm.
56
- */
57
- paperUnit: BRLMPrinterCustomPaperUnit;
58
- };
59
- export declare type BRLMPrinterQLModelSettings = {
60
- /**
61
- * Should use enum BRLMPrinterLabelName
62
- */
63
- labelName: BRLMPrinterLabelName;
64
- } & BRLMPrinterSettings;
65
- /**
66
- * These are optional. If these are not set, default values are assigned by the printer.
67
- */
68
- export declare type BRLMPrinterSettings = {
69
- /**
70
- * The number of copies you print.
71
- */
72
- numberOfCopies?: BRLMPrinterNumberOfCopies;
73
- /**
74
- * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.
75
- */
76
- autoCut?: BRLMPrinterAutoCutType;
77
- /**
78
- * A scale mode that specifies how your data is scaled in a print area of your printer.
79
- */
80
- scaleMode?: BRLMPrinterScaleMode;
81
- /**
82
- * A scale value. This is effective when ScaleMode is ScaleValue.
83
- */
84
- scaleValue?: BRLMPrinterScaleValueType;
85
- /**
86
- * A way to rasterize your data.
87
- */
88
- halftone?: BRLMPrinterHalftone;
89
- /**
90
- * A threshold value. This is effective when the Halftone is Threshold.
91
- */
92
- halftoneThreshold?: BRLMPrinterHalftoneThresholdType;
93
- /**
94
- * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.
95
- */
96
- imageRotation?: BRLMPrinterImageRotation;
97
- /**
98
- * A vertical alignment that specifies how your data is placed in the printable area.
99
- */
100
- verticalAlignment?: BRLMPrinterVerticalAlignment;
101
- /**
102
- * A horizontal alignment that specifies how your data is placed in the printable area.
103
- */
104
- horizontalAlignment?: BRLMPrinterHorizontalAlignment;
105
- /**
106
- * A compress mode that specifies how to compress your data.
107
- * note: This is ios only.
108
- */
109
- compressMode?: BRLMPrinterCompressMode;
110
- /**
111
- * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.
112
- */
113
- printQuality?: BRLMPrinterPrintQuality;
114
- };
115
- export declare type BRLMSearchOption = {
116
- /**
117
- * 'usb' is android only, and now developing.
118
- */
119
- port: BRLMPrinterPort;
120
- /**
121
- * searchDuration is the time to end search for devices.
122
- * default is 15 seconds.
123
- * use only port is 'wifi' or 'bluetoothLowEnergy'.
124
- */
125
- searchDuration: number;
126
- };
127
- export declare type ErrorInfo = {
128
- message: string;
129
- code: number;
130
- };
3
+ import type { BRLMChannelResult, BRLMPrintOptions, BRLMSearchOption, ErrorInfo, isPortAvailableResult } from './interfaces';
131
4
  export interface BrotherPrintPlugin {
132
5
  printImage(options: BRLMPrintOptions): Promise<void>;
133
6
  /**
134
7
  * Search for printers. If not found, it will return an empty array.(not error)
135
8
  */
136
9
  search(option: BRLMSearchOption): Promise<void>;
10
+ /**
11
+ * If you have saved the last connected BRLMChannelResult,
12
+ * you can use it to verify whether it is currently usable.
13
+ */
14
+ isPortAvailable(option: BRLMChannelResult): Promise<isPortAvailableResult>;
137
15
  /**
138
16
  * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.
139
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nimport type {\n BRLMPrinterLabelName,\n BRLMPrinterModelName,\n BRLMPrinterAutoCutType,\n BRLMPrinterCompressMode,\n BRLMPrinterHalftone,\n BRLMPrinterHalftoneThresholdType,\n BRLMPrinterHorizontalAlignment,\n BRLMPrinterNumberOfCopies,\n BRLMPrinterPrintQuality,\n BRLMPrinterImageRotation,\n BRLMPrinterScaleMode,\n BRLMPrinterScaleValueType,\n BRLMPrinterVerticalAlignment,\n BRLMPrinterCustomPaperType,\n BRLMPrinterCustomPaperUnit,\n BRLMPrinterPort,\n} from './brother-printer.enum';\nimport type { BrotherPrintEventsEnum } from './events.enum';\n\nexport type BRLMChannelResult = {\n port: BRLMPrinterPort;\n modelName: string;\n serialNumber: string;\n macAddress: string;\n nodeName: string;\n location: string;\n\n /**\n * This need to connect to the printer.\n * wifi: IP Address\n * bluetooth: macAddress\n * bluetoothLowEnergy: modelName for bluetoothLowEnergy\n */\n channelInfo: string;\n};\n\nexport type BRLMPrintOptions = {\n encodedImage: string;\n\n /**\n * Should use enum BRLMPrinterModelName\n */\n modelName: BRLMPrinterModelName;\n} & Partial<BRLMChannelResult> &\n (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings);\n\nexport type BRLMPrinterTDModelSettings = {\n /**\n * Should use enum BRKMPrinterCustomPaperType\n */\n paperType: BRLMPrinterCustomPaperType;\n\n /**\n * The width of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeWidth: number;\n\n /**\n * The length of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeLength: number;\n\n /**\n * It is the difference between a sticker and a mount.\n * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`\n */\n marginTop: number;\n marginRight: number;\n marginBottom: number;\n marginLeft: number;\n\n /**\n * The spacing between seals. For example, the RD-U04J1 is 0.2.\n */\n gapLength: number;\n\n paperMarkPosition: number;\n paperMarkLength: number;\n\n /**\n * Should use enum BRKMPrinterCustomPaperUnit.\n * For example, the RD-U04J1 is mm.\n */\n paperUnit: BRLMPrinterCustomPaperUnit;\n};\n\nexport type BRLMPrinterQLModelSettings = {\n /**\n * Should use enum BRLMPrinterLabelName\n */\n labelName: BRLMPrinterLabelName;\n} & BRLMPrinterSettings;\n\n/**\n * These are optional. If these are not set, default values are assigned by the printer.\n */\nexport type BRLMPrinterSettings = {\n /**\n * The number of copies you print.\n */\n numberOfCopies?: BRLMPrinterNumberOfCopies;\n\n /**\n * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.\n */\n autoCut?: BRLMPrinterAutoCutType;\n\n /**\n * A scale mode that specifies how your data is scaled in a print area of your printer.\n */\n scaleMode?: BRLMPrinterScaleMode;\n\n /**\n * A scale value. This is effective when ScaleMode is ScaleValue.\n */\n scaleValue?: BRLMPrinterScaleValueType;\n\n /**\n * A way to rasterize your data.\n */\n halftone?: BRLMPrinterHalftone;\n\n /**\n * A threshold value. This is effective when the Halftone is Threshold.\n */\n halftoneThreshold?: BRLMPrinterHalftoneThresholdType;\n\n /**\n * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.\n */\n imageRotation?: BRLMPrinterImageRotation;\n\n /**\n * A vertical alignment that specifies how your data is placed in the printable area.\n */\n verticalAlignment?: BRLMPrinterVerticalAlignment;\n\n /**\n * A horizontal alignment that specifies how your data is placed in the printable area.\n */\n horizontalAlignment?: BRLMPrinterHorizontalAlignment;\n\n /**\n * A compress mode that specifies how to compress your data.\n * note: This is ios only.\n */\n compressMode?: BRLMPrinterCompressMode;\n\n /**\n * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.\n */\n printQuality?: BRLMPrinterPrintQuality;\n};\n\nexport type BRLMSearchOption = {\n /**\n * 'usb' is android only, and now developing.\n */\n port: BRLMPrinterPort;\n\n /**\n * searchDuration is the time to end search for devices.\n * default is 15 seconds.\n * use only port is 'wifi' or 'bluetoothLowEnergy'.\n */\n searchDuration: number;\n};\n\nexport type ErrorInfo = {\n message: string;\n code: number;\n};\n\nexport interface BrotherPrintPlugin {\n printImage(options: BRLMPrintOptions): Promise<void>;\n\n /**\n * Search for printers. If not found, it will return an empty array.(not error)\n */\n search(option: BRLMSearchOption): Promise<void>;\n\n /**\n * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.\n */\n cancelSearchWiFiPrinter(): Promise<void>;\n\n /**\n * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.\n */\n cancelSearchBluetoothPrinter(): Promise<void>;\n\n /**\n * Find the printer that can connected to the device.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrinterAvailable,\n listenerFunc: (printers: BRLMChannelResult) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Success Print Event\n */\n addListener(eventName: BrotherPrintEventsEnum.onPrint, listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Failed to connect to the printer.\n * ex: Bluetooth is off, Printer is off, etc.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrintFailedCommunication,\n listenerFunc: (info: ErrorInfo) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Failed to print.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrintError,\n listenerFunc: (info: ErrorInfo) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nimport type { BrotherPrintEventsEnum } from './events.enum';\nimport type {\n BRLMChannelResult,\n BRLMPrintOptions,\n BRLMSearchOption,\n ErrorInfo,\n isPortAvailableResult,\n} from './interfaces';\n\nexport interface BrotherPrintPlugin {\n printImage(options: BRLMPrintOptions): Promise<void>;\n\n /**\n * Search for printers. If not found, it will return an empty array.(not error)\n */\n search(option: BRLMSearchOption): Promise<void>;\n\n /**\n * If you have saved the last connected BRLMChannelResult,\n * you can use it to verify whether it is currently usable.\n */\n isPortAvailable(option: BRLMChannelResult): Promise<isPortAvailableResult>;\n\n /**\n * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.\n */\n cancelSearchWiFiPrinter(): Promise<void>;\n\n /**\n * Basically, it times out, so there is no need to use it. Use it when you want to run multiple connectType searches at the same time and time out any of them manually.\n */\n cancelSearchBluetoothPrinter(): Promise<void>;\n\n /**\n * Find the printer that can connected to the device.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrinterAvailable,\n listenerFunc: (printers: BRLMChannelResult) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Success Print Event\n */\n addListener(eventName: BrotherPrintEventsEnum.onPrint, listenerFunc: () => void): Promise<PluginListenerHandle>;\n\n /**\n * Failed to connect to the printer.\n * ex: Bluetooth is off, Printer is off, etc.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrintFailedCommunication,\n listenerFunc: (info: ErrorInfo) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Failed to print.\n */\n addListener(\n eventName: BrotherPrintEventsEnum.onPrintError,\n listenerFunc: (info: ErrorInfo) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
@@ -3,5 +3,6 @@ declare const BrotherPrint: BrotherPrintPlugin;
3
3
  export * from './definitions';
4
4
  export * from './web';
5
5
  export * from './events.enum';
6
+ export * from './interfaces';
6
7
  export * from './brother-printer.enum';
7
8
  export { BrotherPrint };
package/dist/esm/index.js CHANGED
@@ -5,6 +5,7 @@ const BrotherPrint = registerPlugin('BrotherPrint', {
5
5
  export * from './definitions';
6
6
  export * from './web';
7
7
  export * from './events.enum';
8
+ export * from './interfaces';
8
9
  export * from './brother-printer.enum';
9
10
  export { BrotherPrint };
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAChE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin } from './definitions';\n\nconst BrotherPrint = registerPlugin<BrotherPrintPlugin>('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\n\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAChE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin } from './definitions';\n\nconst BrotherPrint = registerPlugin<BrotherPrintPlugin>('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\n\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './interfaces';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n"]}
@@ -0,0 +1,131 @@
1
+ import type { BRLMPrinterLabelName, BRLMPrinterModelName, BRLMPrinterAutoCutType, BRLMPrinterCompressMode, BRLMPrinterHalftone, BRLMPrinterHalftoneThresholdType, BRLMPrinterHorizontalAlignment, BRLMPrinterNumberOfCopies, BRLMPrinterPrintQuality, BRLMPrinterImageRotation, BRLMPrinterScaleMode, BRLMPrinterScaleValueType, BRLMPrinterVerticalAlignment, BRLMPrinterCustomPaperType, BRLMPrinterCustomPaperUnit, BRLMPrinterPort } from './brother-printer.enum';
2
+ export type BRLMChannelResult = {
3
+ port: BRLMPrinterPort;
4
+ modelName: string;
5
+ serialNumber: string;
6
+ macAddress: string;
7
+ nodeName: string;
8
+ location: string;
9
+ /**
10
+ * This need to connect to the printer.
11
+ * wifi: IP Address
12
+ * bluetooth: macAddress
13
+ * bluetoothLowEnergy: modelName for bluetoothLowEnergy
14
+ */
15
+ channelInfo: string;
16
+ };
17
+ export type BRLMPrintOptions = {
18
+ encodedImage: string;
19
+ /**
20
+ * Should use enum BRLMPrinterModelName
21
+ */
22
+ modelName: BRLMPrinterModelName;
23
+ } & Partial<BRLMChannelResult> & (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings);
24
+ export type isPortAvailableResult = {
25
+ result: boolean;
26
+ };
27
+ export type BRLMPrinterTDModelSettings = {
28
+ /**
29
+ * Should use enum BRKMPrinterCustomPaperType
30
+ */
31
+ paperType: BRLMPrinterCustomPaperType;
32
+ /**
33
+ * The width of the label. For example, the RD-U04J1 is 60.0 wide.
34
+ */
35
+ tapeWidth: number;
36
+ /**
37
+ * The length of the label. For example, the RD-U04J1 is 60.0 wide.
38
+ */
39
+ tapeLength: number;
40
+ /**
41
+ * It is the difference between a sticker and a mount.
42
+ * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`
43
+ */
44
+ marginTop: number;
45
+ marginRight: number;
46
+ marginBottom: number;
47
+ marginLeft: number;
48
+ /**
49
+ * The spacing between seals. For example, the RD-U04J1 is 0.2.
50
+ */
51
+ gapLength: number;
52
+ paperMarkPosition: number;
53
+ paperMarkLength: number;
54
+ /**
55
+ * Should use enum BRKMPrinterCustomPaperUnit.
56
+ * For example, the RD-U04J1 is mm.
57
+ */
58
+ paperUnit: BRLMPrinterCustomPaperUnit;
59
+ };
60
+ export type BRLMPrinterQLModelSettings = {
61
+ /**
62
+ * Should use enum BRLMPrinterLabelName
63
+ */
64
+ labelName: BRLMPrinterLabelName;
65
+ } & BRLMPrinterSettings;
66
+ /**
67
+ * These are optional. If these are not set, default values are assigned by the printer.
68
+ */
69
+ export type BRLMPrinterSettings = {
70
+ /**
71
+ * The number of copies you print.
72
+ */
73
+ numberOfCopies?: BRLMPrinterNumberOfCopies;
74
+ /**
75
+ * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.
76
+ */
77
+ autoCut?: BRLMPrinterAutoCutType;
78
+ /**
79
+ * A scale mode that specifies how your data is scaled in a print area of your printer.
80
+ */
81
+ scaleMode?: BRLMPrinterScaleMode;
82
+ /**
83
+ * A scale value. This is effective when ScaleMode is ScaleValue.
84
+ */
85
+ scaleValue?: BRLMPrinterScaleValueType;
86
+ /**
87
+ * A way to rasterize your data.
88
+ */
89
+ halftone?: BRLMPrinterHalftone;
90
+ /**
91
+ * A threshold value. This is effective when the Halftone is Threshold.
92
+ */
93
+ halftoneThreshold?: BRLMPrinterHalftoneThresholdType;
94
+ /**
95
+ * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.
96
+ */
97
+ imageRotation?: BRLMPrinterImageRotation;
98
+ /**
99
+ * A vertical alignment that specifies how your data is placed in the printable area.
100
+ */
101
+ verticalAlignment?: BRLMPrinterVerticalAlignment;
102
+ /**
103
+ * A horizontal alignment that specifies how your data is placed in the printable area.
104
+ */
105
+ horizontalAlignment?: BRLMPrinterHorizontalAlignment;
106
+ /**
107
+ * A compress mode that specifies how to compress your data.
108
+ * note: This is ios only.
109
+ */
110
+ compressMode?: BRLMPrinterCompressMode;
111
+ /**
112
+ * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.
113
+ */
114
+ printQuality?: BRLMPrinterPrintQuality;
115
+ };
116
+ export type BRLMSearchOption = {
117
+ /**
118
+ * 'usb' is android only, and now developing.
119
+ */
120
+ port: BRLMPrinterPort;
121
+ /**
122
+ * searchDuration is the time to end search for devices.
123
+ * default is 15 seconds.
124
+ * use only port is 'wifi' or 'bluetoothLowEnergy'.
125
+ */
126
+ searchDuration: number;
127
+ };
128
+ export type ErrorInfo = {
129
+ message: string;
130
+ code: number;
131
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n BRLMPrinterLabelName,\n BRLMPrinterModelName,\n BRLMPrinterAutoCutType,\n BRLMPrinterCompressMode,\n BRLMPrinterHalftone,\n BRLMPrinterHalftoneThresholdType,\n BRLMPrinterHorizontalAlignment,\n BRLMPrinterNumberOfCopies,\n BRLMPrinterPrintQuality,\n BRLMPrinterImageRotation,\n BRLMPrinterScaleMode,\n BRLMPrinterScaleValueType,\n BRLMPrinterVerticalAlignment,\n BRLMPrinterCustomPaperType,\n BRLMPrinterCustomPaperUnit,\n BRLMPrinterPort,\n} from './brother-printer.enum';\n\nexport type BRLMChannelResult = {\n port: BRLMPrinterPort;\n modelName: string;\n serialNumber: string;\n macAddress: string;\n nodeName: string;\n location: string;\n\n /**\n * This need to connect to the printer.\n * wifi: IP Address\n * bluetooth: macAddress\n * bluetoothLowEnergy: modelName for bluetoothLowEnergy\n */\n channelInfo: string;\n};\n\nexport type BRLMPrintOptions = {\n encodedImage: string;\n\n /**\n * Should use enum BRLMPrinterModelName\n */\n modelName: BRLMPrinterModelName;\n} & Partial<BRLMChannelResult> &\n (BRLMPrinterQLModelSettings | BRLMPrinterTDModelSettings);\n\nexport type isPortAvailableResult = {\n result: boolean;\n};\n\nexport type BRLMPrinterTDModelSettings = {\n /**\n * Should use enum BRKMPrinterCustomPaperType\n */\n paperType: BRLMPrinterCustomPaperType;\n\n /**\n * The width of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeWidth: number;\n\n /**\n * The length of the label. For example, the RD-U04J1 is 60.0 wide.\n */\n tapeLength: number;\n\n /**\n * It is the difference between a sticker and a mount.\n * For example, the RD-U04J1 is `1.0, 2.0, 1.0, 2.0`\n */\n marginTop: number;\n marginRight: number;\n marginBottom: number;\n marginLeft: number;\n\n /**\n * The spacing between seals. For example, the RD-U04J1 is 0.2.\n */\n gapLength: number;\n\n paperMarkPosition: number;\n paperMarkLength: number;\n\n /**\n * Should use enum BRKMPrinterCustomPaperUnit.\n * For example, the RD-U04J1 is mm.\n */\n paperUnit: BRLMPrinterCustomPaperUnit;\n};\n\nexport type BRLMPrinterQLModelSettings = {\n /**\n * Should use enum BRLMPrinterLabelName\n */\n labelName: BRLMPrinterLabelName;\n} & BRLMPrinterSettings;\n\n/**\n * These are optional. If these are not set, default values are assigned by the printer.\n */\nexport type BRLMPrinterSettings = {\n /**\n * The number of copies you print.\n */\n numberOfCopies?: BRLMPrinterNumberOfCopies;\n\n /**\n * Whether the auto-cut is enabled or not. If true, your printer cut the paper each page.\n */\n autoCut?: BRLMPrinterAutoCutType;\n\n /**\n * A scale mode that specifies how your data is scaled in a print area of your printer.\n */\n scaleMode?: BRLMPrinterScaleMode;\n\n /**\n * A scale value. This is effective when ScaleMode is ScaleValue.\n */\n scaleValue?: BRLMPrinterScaleValueType;\n\n /**\n * A way to rasterize your data.\n */\n halftone?: BRLMPrinterHalftone;\n\n /**\n * A threshold value. This is effective when the Halftone is Threshold.\n */\n halftoneThreshold?: BRLMPrinterHalftoneThresholdType;\n\n /**\n * An image rotation that specifies the angle in which your data is placed in the print area. Rotation direction is clockwise.\n */\n imageRotation?: BRLMPrinterImageRotation;\n\n /**\n * A vertical alignment that specifies how your data is placed in the printable area.\n */\n verticalAlignment?: BRLMPrinterVerticalAlignment;\n\n /**\n * A horizontal alignment that specifies how your data is placed in the printable area.\n */\n horizontalAlignment?: BRLMPrinterHorizontalAlignment;\n\n /**\n * A compress mode that specifies how to compress your data.\n * note: This is ios only.\n */\n compressMode?: BRLMPrinterCompressMode;\n\n /**\n * A priority that is print speed or print quality. Whether or not this has an effect is depend on your printer.\n */\n printQuality?: BRLMPrinterPrintQuality;\n};\n\nexport type BRLMSearchOption = {\n /**\n * 'usb' is android only, and now developing.\n */\n port: BRLMPrinterPort;\n\n /**\n * searchDuration is the time to end search for devices.\n * default is 15 seconds.\n * use only port is 'wifi' or 'bluetoothLowEnergy'.\n */\n searchDuration: number;\n};\n\nexport type ErrorInfo = {\n message: string;\n code: number;\n};\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { BrotherPrintPlugin, BRLMPrintOptions, BRLMSearchOption } from './definitions';
2
+ import type { BrotherPrintPlugin } from './definitions';
3
+ import type { BRLMChannelResult, BRLMPrintOptions, BRLMSearchOption, isPortAvailableResult } from './interfaces';
3
4
  export declare class BrotherPrintWeb extends WebPlugin implements BrotherPrintPlugin {
4
5
  printImage(options: BRLMPrintOptions): Promise<void>;
6
+ isPortAvailable(options: BRLMChannelResult): Promise<isPortAvailableResult>;
5
7
  search(options: BRLMSearchOption): Promise<void>;
6
8
  cancelSearchWiFiPrinter(): Promise<void>;
7
9
  cancelSearchBluetoothPrinter(): Promise<void>;
package/dist/esm/web.js CHANGED
@@ -3,6 +3,12 @@ export class BrotherPrintWeb extends WebPlugin {
3
3
  async printImage(options) {
4
4
  console.log('printImage', options);
5
5
  }
6
+ async isPortAvailable(options) {
7
+ console.log('isPortAvailable', options);
8
+ return {
9
+ result: false,
10
+ };
11
+ }
6
12
  async search(options) {
7
13
  console.log('search', options);
8
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,UAAU,CAAC,OAAyB;QACxC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,4BAA4B;QAChC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin, BRLMPrintOptions, BRLMSearchOption } from './definitions';\n\nexport class BrotherPrintWeb extends WebPlugin implements BrotherPrintPlugin {\n async printImage(options: BRLMPrintOptions): Promise<void> {\n console.log('printImage', options);\n }\n async search(options: BRLMSearchOption): Promise<void> {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter(): Promise<void> {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter(): Promise<void> {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,UAAU,CAAC,OAAyB;QACxC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,OAA0B;QAC9C,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACxC,OAAO;YACL,MAAM,EAAE,KAAK;SACd,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,4BAA4B;QAChC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { BrotherPrintPlugin } from './definitions';\nimport type { BRLMChannelResult, BRLMPrintOptions, BRLMSearchOption, isPortAvailableResult } from './interfaces';\n\nexport class BrotherPrintWeb extends WebPlugin implements BrotherPrintPlugin {\n async printImage(options: BRLMPrintOptions): Promise<void> {\n console.log('printImage', options);\n }\n async isPortAvailable(options: BRLMChannelResult): Promise<isPortAvailableResult> {\n console.log('isPortAvailable', options);\n return {\n result: false,\n };\n }\n async search(options: BRLMSearchOption): Promise<void> {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter(): Promise<void> {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter(): Promise<void> {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n"]}
@@ -6,6 +6,12 @@ class BrotherPrintWeb extends core.WebPlugin {
6
6
  async printImage(options) {
7
7
  console.log('printImage', options);
8
8
  }
9
+ async isPortAvailable(options) {
10
+ console.log('isPortAvailable', options);
11
+ return {
12
+ result: false,
13
+ };
14
+ }
9
15
  async search(options) {
10
16
  console.log('search', options);
11
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","export var BRLMPrinterPort;\n(function (BRLMPrinterPort) {\n BRLMPrinterPort[\"usb\"] = \"usb\";\n BRLMPrinterPort[\"wifi\"] = \"wifi\";\n BRLMPrinterPort[\"bluetooth\"] = \"bluetooth\";\n BRLMPrinterPort[\"bluetoothLowEnergy\"] = \"bluetoothLowEnergy\";\n})(BRLMPrinterPort || (BRLMPrinterPort = {}));\nexport var BRLMPrinterCustomPaperUnit;\n(function (BRLMPrinterCustomPaperUnit) {\n BRLMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRLMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRLMPrinterCustomPaperUnit || (BRLMPrinterCustomPaperUnit = {}));\nexport var BRLMPrinterCustomPaperType;\n(function (BRLMPrinterCustomPaperType) {\n BRLMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRLMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRLMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRLMPrinterCustomPaperType || (BRLMPrinterCustomPaperType = {}));\n/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_800\"] = \"QL_800\";\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"DieCutW17H54\"] = \"DieCutW17H54\";\n BRLMPrinterLabelName[\"DieCutW17H87\"] = \"DieCutW17H87\";\n BRLMPrinterLabelName[\"DieCutW23H23\"] = \"DieCutW23H23\";\n BRLMPrinterLabelName[\"DieCutW29H42\"] = \"DieCutW29H42\";\n BRLMPrinterLabelName[\"DieCutW29H90\"] = \"DieCutW29H90\";\n BRLMPrinterLabelName[\"DieCutW38H90\"] = \"DieCutW38H90\";\n BRLMPrinterLabelName[\"DieCutW39H48\"] = \"DieCutW39H48\";\n BRLMPrinterLabelName[\"DieCutW52H29\"] = \"DieCutW52H29\";\n BRLMPrinterLabelName[\"DieCutW62H29\"] = \"DieCutW62H29\";\n BRLMPrinterLabelName[\"DieCutW62H60\"] = \"DieCutW62H60\";\n BRLMPrinterLabelName[\"DieCutW62H75\"] = \"DieCutW62H75\";\n BRLMPrinterLabelName[\"DieCutW62H100\"] = \"DieCutW62H100\";\n BRLMPrinterLabelName[\"DieCutW60H86\"] = \"DieCutW60H86\";\n BRLMPrinterLabelName[\"DieCutW54H29\"] = \"DieCutW54H29\";\n BRLMPrinterLabelName[\"DieCutW102H51\"] = \"DieCutW102H51\";\n BRLMPrinterLabelName[\"DieCutW102H152\"] = \"DieCutW102H152\";\n BRLMPrinterLabelName[\"DieCutW103H164\"] = \"DieCutW103H164\";\n BRLMPrinterLabelName[\"RollW12\"] = \"RollW12\";\n BRLMPrinterLabelName[\"RollW29\"] = \"RollW29\";\n BRLMPrinterLabelName[\"RollW38\"] = \"RollW38\";\n BRLMPrinterLabelName[\"RollW50\"] = \"RollW50\";\n BRLMPrinterLabelName[\"RollW54\"] = \"RollW54\";\n BRLMPrinterLabelName[\"RollW62\"] = \"RollW62\";\n BRLMPrinterLabelName[\"RollW62RB\"] = \"RollW62RB\";\n BRLMPrinterLabelName[\"RollW102\"] = \"RollW102\";\n BRLMPrinterLabelName[\"RollW103\"] = \"RollW103\";\n BRLMPrinterLabelName[\"DTRollW90\"] = \"DTRollW90\";\n BRLMPrinterLabelName[\"DTRollW102\"] = \"DTRollW102\";\n BRLMPrinterLabelName[\"DTRollW102H51\"] = \"DTRollW102H51\";\n BRLMPrinterLabelName[\"DTRollW102H152\"] = \"DTRollW102H152\";\n BRLMPrinterLabelName[\"RoundW12DIA\"] = \"RoundW12DIA\";\n BRLMPrinterLabelName[\"RoundW24DIA\"] = \"RoundW24DIA\";\n BRLMPrinterLabelName[\"RoundW58DIA\"] = \"RoundW58DIA\";\n /**\n * For TD series\n * @url https://www.brother.co.jp/product/labelprinter/td2350d/accessory/index.aspx\n */\n BRLMPrinterLabelName[\"RDDieCutW60H60\"] = \"RDDieCutW60H60\";\n BRLMPrinterLabelName[\"RDDieCutW50H30\"] = \"RDDieCutW50H30\";\n BRLMPrinterLabelName[\"RDDieCutW40H60\"] = \"RDDieCutW40H60\";\n BRLMPrinterLabelName[\"RDDieCutW40H50\"] = \"RDDieCutW40H50\";\n BRLMPrinterLabelName[\"RDDieCutW40H40\"] = \"RDDieCutW40H40\";\n BRLMPrinterLabelName[\"RDDieCutW30H30\"] = \"RDDieCutW30H30\";\n BRLMPrinterLabelName[\"RDDieCutW50H35\"] = \"RDDieCutW50H35\";\n BRLMPrinterLabelName[\"RDDieCutW60H80\"] = \"RDDieCutW60H80\";\n BRLMPrinterLabelName[\"RDDieCutW60H100\"] = \"RDDieCutW60H100\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterPort","BRLMPrinterCustomPaperUnit","BRLMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","B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BAAuB,GAAG,EAAE,CAAC,CAAC;AAC7D;AACA;AACA;AACWC;AACX,CAAC,UAAU,uBAAuB,EAAE;AACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACnE,CAAC;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async isPortAvailable(options) {\n console.log('isPortAvailable', options);\n return {\n result: false,\n };\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","export var BRLMPrinterPort;\n(function (BRLMPrinterPort) {\n BRLMPrinterPort[\"usb\"] = \"usb\";\n BRLMPrinterPort[\"wifi\"] = \"wifi\";\n BRLMPrinterPort[\"bluetooth\"] = \"bluetooth\";\n BRLMPrinterPort[\"bluetoothLowEnergy\"] = \"bluetoothLowEnergy\";\n})(BRLMPrinterPort || (BRLMPrinterPort = {}));\nexport var BRLMPrinterCustomPaperUnit;\n(function (BRLMPrinterCustomPaperUnit) {\n BRLMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRLMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRLMPrinterCustomPaperUnit || (BRLMPrinterCustomPaperUnit = {}));\nexport var BRLMPrinterCustomPaperType;\n(function (BRLMPrinterCustomPaperType) {\n BRLMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRLMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRLMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRLMPrinterCustomPaperType || (BRLMPrinterCustomPaperType = {}));\n/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_800\"] = \"QL_800\";\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"DieCutW17H54\"] = \"DieCutW17H54\";\n BRLMPrinterLabelName[\"DieCutW17H87\"] = \"DieCutW17H87\";\n BRLMPrinterLabelName[\"DieCutW23H23\"] = \"DieCutW23H23\";\n BRLMPrinterLabelName[\"DieCutW29H42\"] = \"DieCutW29H42\";\n BRLMPrinterLabelName[\"DieCutW29H90\"] = \"DieCutW29H90\";\n BRLMPrinterLabelName[\"DieCutW38H90\"] = \"DieCutW38H90\";\n BRLMPrinterLabelName[\"DieCutW39H48\"] = \"DieCutW39H48\";\n BRLMPrinterLabelName[\"DieCutW52H29\"] = \"DieCutW52H29\";\n BRLMPrinterLabelName[\"DieCutW62H29\"] = \"DieCutW62H29\";\n BRLMPrinterLabelName[\"DieCutW62H60\"] = \"DieCutW62H60\";\n BRLMPrinterLabelName[\"DieCutW62H75\"] = \"DieCutW62H75\";\n BRLMPrinterLabelName[\"DieCutW62H100\"] = \"DieCutW62H100\";\n BRLMPrinterLabelName[\"DieCutW60H86\"] = \"DieCutW60H86\";\n BRLMPrinterLabelName[\"DieCutW54H29\"] = \"DieCutW54H29\";\n BRLMPrinterLabelName[\"DieCutW102H51\"] = \"DieCutW102H51\";\n BRLMPrinterLabelName[\"DieCutW102H152\"] = \"DieCutW102H152\";\n BRLMPrinterLabelName[\"DieCutW103H164\"] = \"DieCutW103H164\";\n BRLMPrinterLabelName[\"RollW12\"] = \"RollW12\";\n BRLMPrinterLabelName[\"RollW29\"] = \"RollW29\";\n BRLMPrinterLabelName[\"RollW38\"] = \"RollW38\";\n BRLMPrinterLabelName[\"RollW50\"] = \"RollW50\";\n BRLMPrinterLabelName[\"RollW54\"] = \"RollW54\";\n BRLMPrinterLabelName[\"RollW62\"] = \"RollW62\";\n BRLMPrinterLabelName[\"RollW62RB\"] = \"RollW62RB\";\n BRLMPrinterLabelName[\"RollW102\"] = \"RollW102\";\n BRLMPrinterLabelName[\"RollW103\"] = \"RollW103\";\n BRLMPrinterLabelName[\"DTRollW90\"] = \"DTRollW90\";\n BRLMPrinterLabelName[\"DTRollW102\"] = \"DTRollW102\";\n BRLMPrinterLabelName[\"DTRollW102H51\"] = \"DTRollW102H51\";\n BRLMPrinterLabelName[\"DTRollW102H152\"] = \"DTRollW102H152\";\n BRLMPrinterLabelName[\"RoundW12DIA\"] = \"RoundW12DIA\";\n BRLMPrinterLabelName[\"RoundW24DIA\"] = \"RoundW24DIA\";\n BRLMPrinterLabelName[\"RoundW58DIA\"] = \"RoundW58DIA\";\n /**\n * For TD series\n * @url https://www.brother.co.jp/product/labelprinter/td2350d/accessory/index.aspx\n */\n BRLMPrinterLabelName[\"RDDieCutW60H60\"] = \"RDDieCutW60H60\";\n BRLMPrinterLabelName[\"RDDieCutW50H30\"] = \"RDDieCutW50H30\";\n BRLMPrinterLabelName[\"RDDieCutW40H60\"] = \"RDDieCutW40H60\";\n BRLMPrinterLabelName[\"RDDieCutW40H50\"] = \"RDDieCutW40H50\";\n BRLMPrinterLabelName[\"RDDieCutW40H40\"] = \"RDDieCutW40H40\";\n BRLMPrinterLabelName[\"RDDieCutW30H30\"] = \"RDDieCutW30H30\";\n BRLMPrinterLabelName[\"RDDieCutW50H35\"] = \"RDDieCutW50H35\";\n BRLMPrinterLabelName[\"RDDieCutW60H80\"] = \"RDDieCutW60H80\";\n BRLMPrinterLabelName[\"RDDieCutW60H100\"] = \"RDDieCutW60H100\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './interfaces';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterPort","BRLMPrinterCustomPaperUnit","BRLMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizontalAlignment","BRLMPrinterCompressMode","BRLMPrinterPrintQuality","registerPlugin"],"mappings":";;;;AACO,MAAM,eAAe,SAASA,cAAS,CAAC;AAC/C,IAAI,MAAM,UAAU,CAAC,OAAO,E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;AAC9C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;AAC7D;AACA;AACA;AACWC;AACX,CAAC,UAAU,uBAAuB,EAAE;AACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACnE,CAAC;;;;;"}
package/dist/plugin.js CHANGED
@@ -5,6 +5,12 @@ var capacitorExample = (function (exports, core) {
5
5
  async printImage(options) {
6
6
  console.log('printImage', options);
7
7
  }
8
+ async isPortAvailable(options) {
9
+ console.log('isPortAvailable', options);
10
+ return {
11
+ result: false,
12
+ };
13
+ }
8
14
  async search(options) {
9
15
  console.log('search', options);
10
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","export var BRLMPrinterPort;\n(function (BRLMPrinterPort) {\n BRLMPrinterPort[\"usb\"] = \"usb\";\n BRLMPrinterPort[\"wifi\"] = \"wifi\";\n BRLMPrinterPort[\"bluetooth\"] = \"bluetooth\";\n BRLMPrinterPort[\"bluetoothLowEnergy\"] = \"bluetoothLowEnergy\";\n})(BRLMPrinterPort || (BRLMPrinterPort = {}));\nexport var BRLMPrinterCustomPaperUnit;\n(function (BRLMPrinterCustomPaperUnit) {\n BRLMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRLMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRLMPrinterCustomPaperUnit || (BRLMPrinterCustomPaperUnit = {}));\nexport var BRLMPrinterCustomPaperType;\n(function (BRLMPrinterCustomPaperType) {\n BRLMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRLMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRLMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRLMPrinterCustomPaperType || (BRLMPrinterCustomPaperType = {}));\n/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_800\"] = \"QL_800\";\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"DieCutW17H54\"] = \"DieCutW17H54\";\n BRLMPrinterLabelName[\"DieCutW17H87\"] = \"DieCutW17H87\";\n BRLMPrinterLabelName[\"DieCutW23H23\"] = \"DieCutW23H23\";\n BRLMPrinterLabelName[\"DieCutW29H42\"] = \"DieCutW29H42\";\n BRLMPrinterLabelName[\"DieCutW29H90\"] = \"DieCutW29H90\";\n BRLMPrinterLabelName[\"DieCutW38H90\"] = \"DieCutW38H90\";\n BRLMPrinterLabelName[\"DieCutW39H48\"] = \"DieCutW39H48\";\n BRLMPrinterLabelName[\"DieCutW52H29\"] = \"DieCutW52H29\";\n BRLMPrinterLabelName[\"DieCutW62H29\"] = \"DieCutW62H29\";\n BRLMPrinterLabelName[\"DieCutW62H60\"] = \"DieCutW62H60\";\n BRLMPrinterLabelName[\"DieCutW62H75\"] = \"DieCutW62H75\";\n BRLMPrinterLabelName[\"DieCutW62H100\"] = \"DieCutW62H100\";\n BRLMPrinterLabelName[\"DieCutW60H86\"] = \"DieCutW60H86\";\n BRLMPrinterLabelName[\"DieCutW54H29\"] = \"DieCutW54H29\";\n BRLMPrinterLabelName[\"DieCutW102H51\"] = \"DieCutW102H51\";\n BRLMPrinterLabelName[\"DieCutW102H152\"] = \"DieCutW102H152\";\n BRLMPrinterLabelName[\"DieCutW103H164\"] = \"DieCutW103H164\";\n BRLMPrinterLabelName[\"RollW12\"] = \"RollW12\";\n BRLMPrinterLabelName[\"RollW29\"] = \"RollW29\";\n BRLMPrinterLabelName[\"RollW38\"] = \"RollW38\";\n BRLMPrinterLabelName[\"RollW50\"] = \"RollW50\";\n BRLMPrinterLabelName[\"RollW54\"] = \"RollW54\";\n BRLMPrinterLabelName[\"RollW62\"] = \"RollW62\";\n BRLMPrinterLabelName[\"RollW62RB\"] = \"RollW62RB\";\n BRLMPrinterLabelName[\"RollW102\"] = \"RollW102\";\n BRLMPrinterLabelName[\"RollW103\"] = \"RollW103\";\n BRLMPrinterLabelName[\"DTRollW90\"] = \"DTRollW90\";\n BRLMPrinterLabelName[\"DTRollW102\"] = \"DTRollW102\";\n BRLMPrinterLabelName[\"DTRollW102H51\"] = \"DTRollW102H51\";\n BRLMPrinterLabelName[\"DTRollW102H152\"] = \"DTRollW102H152\";\n BRLMPrinterLabelName[\"RoundW12DIA\"] = \"RoundW12DIA\";\n BRLMPrinterLabelName[\"RoundW24DIA\"] = \"RoundW24DIA\";\n BRLMPrinterLabelName[\"RoundW58DIA\"] = \"RoundW58DIA\";\n /**\n * For TD series\n * @url https://www.brother.co.jp/product/labelprinter/td2350d/accessory/index.aspx\n */\n BRLMPrinterLabelName[\"RDDieCutW60H60\"] = \"RDDieCutW60H60\";\n BRLMPrinterLabelName[\"RDDieCutW50H30\"] = \"RDDieCutW50H30\";\n BRLMPrinterLabelName[\"RDDieCutW40H60\"] = \"RDDieCutW40H60\";\n BRLMPrinterLabelName[\"RDDieCutW40H50\"] = \"RDDieCutW40H50\";\n BRLMPrinterLabelName[\"RDDieCutW40H40\"] = \"RDDieCutW40H40\";\n BRLMPrinterLabelName[\"RDDieCutW30H30\"] = \"RDDieCutW30H30\";\n BRLMPrinterLabelName[\"RDDieCutW50H35\"] = \"RDDieCutW50H35\";\n BRLMPrinterLabelName[\"RDDieCutW60H80\"] = \"RDDieCutW60H80\";\n BRLMPrinterLabelName[\"RDDieCutW60H100\"] = \"RDDieCutW60H100\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterPort","BRLMPrinterCustomPaperUnit","BRLMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLM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AC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;IAC7D;IACA;IACA;AACWC;IACX,CAAC,UAAU,uBAAuB,EAAE;IACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;IAC5C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;IAC5C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;IAC7D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;AC5JK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACnE,CAAC;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/web.js","esm/events.enum.js","esm/brother-printer.enum.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n async printImage(options) {\n console.log('printImage', options);\n }\n async isPortAvailable(options) {\n console.log('isPortAvailable', options);\n return {\n result: false,\n };\n }\n async search(options) {\n console.log('search', options);\n }\n async cancelSearchWiFiPrinter() {\n console.log('cancelSearchWiFiPrinter');\n }\n async cancelSearchBluetoothPrinter() {\n console.log('cancelSearchBluetoothPrinter');\n }\n}\n//# sourceMappingURL=web.js.map","export var BrotherPrintEventsEnum;\n(function (BrotherPrintEventsEnum) {\n BrotherPrintEventsEnum[\"onPrinterAvailable\"] = \"onPrinterAvailable\";\n BrotherPrintEventsEnum[\"onPrint\"] = \"onPrint\";\n BrotherPrintEventsEnum[\"onPrintFailedCommunication\"] = \"onPrintFailedCommunication\";\n BrotherPrintEventsEnum[\"onPrintError\"] = \"onPrintError\";\n})(BrotherPrintEventsEnum || (BrotherPrintEventsEnum = {}));\n//# sourceMappingURL=events.enum.js.map","export var BRLMPrinterPort;\n(function (BRLMPrinterPort) {\n BRLMPrinterPort[\"usb\"] = \"usb\";\n BRLMPrinterPort[\"wifi\"] = \"wifi\";\n BRLMPrinterPort[\"bluetooth\"] = \"bluetooth\";\n BRLMPrinterPort[\"bluetoothLowEnergy\"] = \"bluetoothLowEnergy\";\n})(BRLMPrinterPort || (BRLMPrinterPort = {}));\nexport var BRLMPrinterCustomPaperUnit;\n(function (BRLMPrinterCustomPaperUnit) {\n BRLMPrinterCustomPaperUnit[\"mm\"] = \"mm\";\n BRLMPrinterCustomPaperUnit[\"inch\"] = \"inch\";\n})(BRLMPrinterCustomPaperUnit || (BRLMPrinterCustomPaperUnit = {}));\nexport var BRLMPrinterCustomPaperType;\n(function (BRLMPrinterCustomPaperType) {\n BRLMPrinterCustomPaperType[\"rollPaper\"] = \"rollPaper\";\n BRLMPrinterCustomPaperType[\"dieCutPaper\"] = \"dieCutPaper\";\n BRLMPrinterCustomPaperType[\"markRollPaper\"] = \"markRollPaper\";\n})(BRLMPrinterCustomPaperType || (BRLMPrinterCustomPaperType = {}));\n/**\n * Note: If you update this file, you should update the following files:\n * - ios/Plugin/Model/PrinterModel.swift\n *\n * And name is follow android naming convention.\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printermodel.html\n */\nexport var BRLMPrinterModelName;\n(function (BRLMPrinterModelName) {\n BRLMPrinterModelName[\"QL_800\"] = \"QL_800\";\n BRLMPrinterModelName[\"QL_810W\"] = \"QL_810W\";\n BRLMPrinterModelName[\"QL_820NWB\"] = \"QL_820NWB\";\n BRLMPrinterModelName[\"TD_2320D_203\"] = \"TD_2320D_203\";\n BRLMPrinterModelName[\"TD_2030AD\"] = \"TD_2030AD\";\n BRLMPrinterModelName[\"TD_2350D_300\"] = \"TD_2350D_300\";\n})(BRLMPrinterModelName || (BRLMPrinterModelName = {}));\n/**\n * Android naming: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android/labelinfo.html\n */\nexport var BRLMPrinterLabelName;\n(function (BRLMPrinterLabelName) {\n BRLMPrinterLabelName[\"DieCutW17H54\"] = \"DieCutW17H54\";\n BRLMPrinterLabelName[\"DieCutW17H87\"] = \"DieCutW17H87\";\n BRLMPrinterLabelName[\"DieCutW23H23\"] = \"DieCutW23H23\";\n BRLMPrinterLabelName[\"DieCutW29H42\"] = \"DieCutW29H42\";\n BRLMPrinterLabelName[\"DieCutW29H90\"] = \"DieCutW29H90\";\n BRLMPrinterLabelName[\"DieCutW38H90\"] = \"DieCutW38H90\";\n BRLMPrinterLabelName[\"DieCutW39H48\"] = \"DieCutW39H48\";\n BRLMPrinterLabelName[\"DieCutW52H29\"] = \"DieCutW52H29\";\n BRLMPrinterLabelName[\"DieCutW62H29\"] = \"DieCutW62H29\";\n BRLMPrinterLabelName[\"DieCutW62H60\"] = \"DieCutW62H60\";\n BRLMPrinterLabelName[\"DieCutW62H75\"] = \"DieCutW62H75\";\n BRLMPrinterLabelName[\"DieCutW62H100\"] = \"DieCutW62H100\";\n BRLMPrinterLabelName[\"DieCutW60H86\"] = \"DieCutW60H86\";\n BRLMPrinterLabelName[\"DieCutW54H29\"] = \"DieCutW54H29\";\n BRLMPrinterLabelName[\"DieCutW102H51\"] = \"DieCutW102H51\";\n BRLMPrinterLabelName[\"DieCutW102H152\"] = \"DieCutW102H152\";\n BRLMPrinterLabelName[\"DieCutW103H164\"] = \"DieCutW103H164\";\n BRLMPrinterLabelName[\"RollW12\"] = \"RollW12\";\n BRLMPrinterLabelName[\"RollW29\"] = \"RollW29\";\n BRLMPrinterLabelName[\"RollW38\"] = \"RollW38\";\n BRLMPrinterLabelName[\"RollW50\"] = \"RollW50\";\n BRLMPrinterLabelName[\"RollW54\"] = \"RollW54\";\n BRLMPrinterLabelName[\"RollW62\"] = \"RollW62\";\n BRLMPrinterLabelName[\"RollW62RB\"] = \"RollW62RB\";\n BRLMPrinterLabelName[\"RollW102\"] = \"RollW102\";\n BRLMPrinterLabelName[\"RollW103\"] = \"RollW103\";\n BRLMPrinterLabelName[\"DTRollW90\"] = \"DTRollW90\";\n BRLMPrinterLabelName[\"DTRollW102\"] = \"DTRollW102\";\n BRLMPrinterLabelName[\"DTRollW102H51\"] = \"DTRollW102H51\";\n BRLMPrinterLabelName[\"DTRollW102H152\"] = \"DTRollW102H152\";\n BRLMPrinterLabelName[\"RoundW12DIA\"] = \"RoundW12DIA\";\n BRLMPrinterLabelName[\"RoundW24DIA\"] = \"RoundW24DIA\";\n BRLMPrinterLabelName[\"RoundW58DIA\"] = \"RoundW58DIA\";\n /**\n * For TD series\n * @url https://www.brother.co.jp/product/labelprinter/td2350d/accessory/index.aspx\n */\n BRLMPrinterLabelName[\"RDDieCutW60H60\"] = \"RDDieCutW60H60\";\n BRLMPrinterLabelName[\"RDDieCutW50H30\"] = \"RDDieCutW50H30\";\n BRLMPrinterLabelName[\"RDDieCutW40H60\"] = \"RDDieCutW40H60\";\n BRLMPrinterLabelName[\"RDDieCutW40H50\"] = \"RDDieCutW40H50\";\n BRLMPrinterLabelName[\"RDDieCutW40H40\"] = \"RDDieCutW40H40\";\n BRLMPrinterLabelName[\"RDDieCutW30H30\"] = \"RDDieCutW30H30\";\n BRLMPrinterLabelName[\"RDDieCutW50H35\"] = \"RDDieCutW50H35\";\n BRLMPrinterLabelName[\"RDDieCutW60H80\"] = \"RDDieCutW60H80\";\n BRLMPrinterLabelName[\"RDDieCutW60H100\"] = \"RDDieCutW60H100\";\n})(BRLMPrinterLabelName || (BRLMPrinterLabelName = {}));\n/**\n * @url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#imagerotation\n */\nexport var BRLMPrinterImageRotation;\n(function (BRLMPrinterImageRotation) {\n BRLMPrinterImageRotation[\"Rotate0\"] = \"Rotate0\";\n BRLMPrinterImageRotation[\"Rotate90\"] = \"Rotate90\";\n BRLMPrinterImageRotation[\"Rotate180\"] = \"Rotate180\";\n BRLMPrinterImageRotation[\"Rotate270\"] = \"Rotate270\";\n})(BRLMPrinterImageRotation || (BRLMPrinterImageRotation = {}));\n/**\n * url https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#scalemode\n */\nexport var BRLMPrinterScaleMode;\n(function (BRLMPrinterScaleMode) {\n BRLMPrinterScaleMode[\"ActualSize\"] = \"ActualSize\";\n BRLMPrinterScaleMode[\"FitPageAspect\"] = \"FitPageAspect\";\n BRLMPrinterScaleMode[\"FitPaperAspect\"] = \"FitPaperAspect\";\n BRLMPrinterScaleMode[\"ScaleValue\"] = \"ScaleValue\";\n})(BRLMPrinterScaleMode || (BRLMPrinterScaleMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#halftone\n */\nexport var BRLMPrinterHalftone;\n(function (BRLMPrinterHalftone) {\n BRLMPrinterHalftone[\"Threshold\"] = \"Threshold\";\n BRLMPrinterHalftone[\"ErrorDiffusion\"] = \"ErrorDiffusion\";\n BRLMPrinterHalftone[\"PatternDither\"] = \"PatternDither\";\n})(BRLMPrinterHalftone || (BRLMPrinterHalftone = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#verticalalignment\n */\nexport var BRLMPrinterVerticalAlignment;\n(function (BRLMPrinterVerticalAlignment) {\n BRLMPrinterVerticalAlignment[\"Top\"] = \"Top\";\n BRLMPrinterVerticalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterVerticalAlignment[\"Bottom\"] = \"Bottom\";\n})(BRLMPrinterVerticalAlignment || (BRLMPrinterVerticalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#horizontalalignment\n */\nexport var BRLMPrinterHorizontalAlignment;\n(function (BRLMPrinterHorizontalAlignment) {\n BRLMPrinterHorizontalAlignment[\"Left\"] = \"Left\";\n BRLMPrinterHorizontalAlignment[\"Center\"] = \"Center\";\n BRLMPrinterHorizontalAlignment[\"Right\"] = \"Right\";\n})(BRLMPrinterHorizontalAlignment || (BRLMPrinterHorizontalAlignment = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#compressmode\n */\nexport var BRLMPrinterCompressMode;\n(function (BRLMPrinterCompressMode) {\n BRLMPrinterCompressMode[\"None\"] = \"None\";\n BRLMPrinterCompressMode[\"Tiff\"] = \"Tiff\";\n BRLMPrinterCompressMode[\"Mode9\"] = \"Mode9\";\n})(BRLMPrinterCompressMode || (BRLMPrinterCompressMode = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#printquality\n */\nexport var BRLMPrinterPrintQuality;\n(function (BRLMPrinterPrintQuality) {\n BRLMPrinterPrintQuality[\"Best\"] = \"Best\";\n BRLMPrinterPrintQuality[\"Fast\"] = \"Fast\";\n})(BRLMPrinterPrintQuality || (BRLMPrinterPrintQuality = {}));\n/**\n * url: https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/android_v4/printimagesettings.html#resolution\n */\n// export enum BRLMPrinterPrintResolution {\n// Low = 'Low',\n// Normal = 'Normal',\n// High = 'High',\n// }\n//# sourceMappingURL=brother-printer.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('BrotherPrint', {\n web: () => import('./web').then((m) => new m.BrotherPrintWeb()),\n});\nexport * from './definitions';\nexport * from './web';\nexport * from './events.enum';\nexport * from './interfaces';\nexport * from './brother-printer.enum';\nexport { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","BrotherPrintEventsEnum","BRLMPrinterPort","BRLMPrinterCustomPaperUnit","BRLMPrinterCustomPaperType","BRLMPrinterModelName","BRLMPrinterLabelName","BRLMPrinterImageRotation","BRLMPrinterScaleMode","BRLMPrinterHalftone","BRLMPrinterVerticalAlignment","BRLMPrinterHorizontalAlignment","BRLMPrinterCompressMode","BRLMPrinterPrintQuality","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IA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CAAC,OAAO,CAAC,GAAG,OAAO;IAC9C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;IAC7D;IACA;IACA;AACWC;IACX,CAAC,UAAU,uBAAuB,EAAE;IACpC,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;IAC5C,IAAI,uBAAuB,CAAC,MAAM,CAAC,GAAG,MAAM;IAC5C,CAAC,EAAEA,+BAAuB,KAAKA,+BAAuB,GAAG,EAAE,CAAC,CAAC;IAC7D;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;AC5JK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACnE,CAAC;;;;;;;;;;;"}
@@ -12,10 +12,11 @@ public class BrotherPrintPlugin: CAPPlugin, CAPBridgedPlugin {
12
12
  public let jsName = "BrotherPrint"
13
13
  public let pluginMethods: [CAPPluginMethod] = [
14
14
  CAPPluginMethod(name: "printImage", returnType: CAPPluginReturnPromise),
15
+ CAPPluginMethod(name: "isPortAvailable", returnType: CAPPluginReturnPromise),
15
16
  CAPPluginMethod(name: "search", returnType: CAPPluginReturnPromise),
16
17
  CAPPluginMethod(name: "cancelSearchWiFiPrinter", returnType: CAPPluginReturnPromise),
17
- CAPPluginMethod(name: "cancelSearchBluetoothPrinter", returnType: CAPPluginReturnPromise),
18
- ]
18
+ CAPPluginMethod(name: "cancelSearchBluetoothPrinter", returnType: CAPPluginReturnPromise)
19
+ ]
19
20
  private var cancelRoutineWiFi: (() -> Void)?
20
21
  private var cancelRoutineBluetooth: (() -> Void)?
21
22
 
@@ -133,6 +134,35 @@ public class BrotherPrintPlugin: CAPPlugin, CAPBridgedPlugin {
133
134
  }
134
135
  }
135
136
 
137
+ @objc func isPortAvailable(_ call: CAPPluginCall) {
138
+ let port: String = call.getString("port", "wifi")
139
+ let channelInfo: String = call.getString("channelInfo", "")
140
+
141
+ DispatchQueue.main.async {
142
+ var channel: BRLMChannel
143
+ switch port {
144
+ case "wifi":
145
+ channel = BRLMChannel(wifiIPAddress: channelInfo)
146
+ case "bluetooth":
147
+ channel = BRLMChannel(bluetoothSerialNumber: channelInfo)
148
+ case "bluetoothLowEnergy":
149
+ channel = BRLMChannel(bleLocalName: channelInfo)
150
+ default:
151
+ call.reject("Error - connection is not found.")
152
+ return
153
+ }
154
+ let generateResult = BRLMPrinterDriverGenerator.open(channel)
155
+
156
+ guard generateResult.error.code == BRLMOpenChannelErrorCode.noError,
157
+ let printerDriver = generateResult.driver else {
158
+ call.resolve(["result": false])
159
+ return
160
+ }
161
+ printerDriver.closeChannel()
162
+ call.resolve(["result": true])
163
+ }
164
+ }
165
+
136
166
  @objc func search(_ call: CAPPluginCall) {
137
167
  switch call.getString("port", "wifi") {
138
168
  case "wifi":
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@rdlabo/capacitor-brotherprint",
3
- "version": "7.0.1",
3
+ "version": "8.1.0",
4
4
  "description": "Capacitor plugin for Brother Print SDK",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
8
  "unpkg": "dist/plugin.js",
9
9
  "engines": {
10
- "node": ">=18.0.0"
10
+ "node": ">=22.0.0"
11
11
  },
12
12
  "scripts": {
13
13
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
@@ -24,7 +24,7 @@
24
24
  "clean": "rimraf ./dist",
25
25
  "watch": "tsc --watch",
26
26
  "prepublishOnly": "npm run replace:production && npm run build",
27
- "release": "np --no-tests && npm run replace:development",
27
+ "release": "np --no-tests --no-publish",
28
28
  "replace:production": "ts-node -P scripts/tsconfig.json scripts/release -- production",
29
29
  "replace:development": "ts-node -P scripts/tsconfig.json scripts/release -- development",
30
30
  "prepare": "husky"
@@ -32,27 +32,27 @@
32
32
  "author": "Masahiko Sakakibara<sakakibara@rdlabo.jp>",
33
33
  "license": "MIT",
34
34
  "devDependencies": {
35
- "@capacitor/android": "^7.0.0",
36
- "@capacitor/core": "^7.0.0",
37
- "@capacitor/docgen": "^0.3.0",
38
- "@capacitor/ios": "^7.0.0",
35
+ "@capacitor/android": "^8.0.0",
36
+ "@capacitor/core": "^8.0.0",
37
+ "@capacitor/docgen": "^0.3.1",
38
+ "@capacitor/ios": "^8.0.0",
39
39
  "@ionic/eslint-config": "^0.4.0",
40
40
  "@ionic/prettier-config": "^4.0.0",
41
41
  "@ionic/swiftlint-config": "^2.0.0",
42
- "eslint": "^8.57.0",
42
+ "eslint": "^8.57.1",
43
43
  "husky": "^9.1.7",
44
44
  "lint-staged": "^15.5.1",
45
45
  "np": "^10.0.5",
46
- "prettier": "^3.4.2",
47
- "prettier-plugin-java": "^2.6.6",
48
- "rimraf": "^6.0.1",
49
- "rollup": "^4.30.1",
46
+ "prettier": "^3.8.1",
47
+ "prettier-plugin-java": "^2.7.7",
48
+ "rimraf": "^6.1.0",
49
+ "rollup": "^4.53.2",
50
50
  "swiftlint": "^2.0.0",
51
51
  "ts-node": "^10.9.2",
52
- "typescript": "~4.1.5"
52
+ "typescript": "^5.9.3"
53
53
  },
54
54
  "peerDependencies": {
55
- "@capacitor/core": ">=7.0.0"
55
+ "@capacitor/core": ">=8.0.0"
56
56
  },
57
57
  "lint-staged": {
58
58
  "*.ts": [