@rdlabo/capacitor-brotherprint 2.0.0-1 → 2.0.0-4
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/android/src/main/java/jp/rdlabo/capacitor/plugin/brotherprint/BrotherPrint.java +67 -59
- package/dist/docs.json +12 -12
- package/dist/esm/definitions.d.ts +9 -3
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -1
|
@@ -6,9 +6,12 @@ import android.graphics.Bitmap;
|
|
|
6
6
|
import android.graphics.BitmapFactory;
|
|
7
7
|
import android.util.Base64;
|
|
8
8
|
import android.util.Log;
|
|
9
|
-
|
|
10
9
|
import com.brother.ptouch.sdk.BLEPrinter;
|
|
10
|
+
import com.brother.ptouch.sdk.LabelInfo;
|
|
11
11
|
import com.brother.ptouch.sdk.NetPrinter;
|
|
12
|
+
import com.brother.ptouch.sdk.Printer;
|
|
13
|
+
import com.brother.ptouch.sdk.PrinterInfo;
|
|
14
|
+
import com.brother.ptouch.sdk.PrinterInfo.Model;
|
|
12
15
|
import com.brother.ptouch.sdk.PrinterStatus;
|
|
13
16
|
import com.getcapacitor.JSArray;
|
|
14
17
|
import com.getcapacitor.JSObject;
|
|
@@ -16,18 +19,13 @@ import com.getcapacitor.NativePlugin;
|
|
|
16
19
|
import com.getcapacitor.Plugin;
|
|
17
20
|
import com.getcapacitor.PluginCall;
|
|
18
21
|
import com.getcapacitor.PluginMethod;
|
|
19
|
-
|
|
20
|
-
import com.brother.ptouch.sdk.Printer;
|
|
21
|
-
import com.brother.ptouch.sdk.PrinterInfo;
|
|
22
|
-
import com.brother.ptouch.sdk.PrinterInfo.Model;
|
|
23
|
-
import com.brother.ptouch.sdk.LabelInfo;
|
|
24
|
-
|
|
22
|
+
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
25
23
|
import java.util.List;
|
|
26
24
|
|
|
27
|
-
@
|
|
25
|
+
@CapacitorPlugin
|
|
28
26
|
public class BrotherPrint extends Plugin {
|
|
29
27
|
|
|
30
|
-
@PluginMethod
|
|
28
|
+
@PluginMethod
|
|
31
29
|
public void printImage(PluginCall call) {
|
|
32
30
|
// object.encodedImageで値を入力
|
|
33
31
|
final String encodedImage = call.getString("encodedImage");
|
|
@@ -58,17 +56,20 @@ public class BrotherPrint extends Plugin {
|
|
|
58
56
|
final String ipAddress = call.getString("ipAddress");
|
|
59
57
|
|
|
60
58
|
if (localName != null) {
|
|
59
|
+
Log.d("protocol", "localName");
|
|
61
60
|
settings.port = PrinterInfo.Port.BLUETOOTH;
|
|
62
61
|
settings.setLocalName(localName);
|
|
63
62
|
} else if (ipAddress != null) {
|
|
63
|
+
Log.d("protocol", "ipAddress");
|
|
64
64
|
settings.port = PrinterInfo.Port.NET;
|
|
65
65
|
settings.ipAddress = ipAddress;
|
|
66
66
|
} else {
|
|
67
|
+
Log.d("protocol", "USB");
|
|
67
68
|
settings.port = PrinterInfo.Port.USB;
|
|
68
69
|
}
|
|
69
70
|
break;
|
|
70
71
|
default:
|
|
71
|
-
call.
|
|
72
|
+
call.reject("[ERROR] This printerType is not available");
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -92,72 +93,79 @@ public class BrotherPrint extends Plugin {
|
|
|
92
93
|
|
|
93
94
|
try {
|
|
94
95
|
Log.d(getLogTag(), "Start Printer Thread");
|
|
95
|
-
new Thread(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
new Thread(
|
|
97
|
+
new Runnable() {
|
|
98
|
+
@Override
|
|
99
|
+
public void run() {
|
|
100
|
+
if (printer.startCommunication()) {
|
|
101
|
+
PrinterStatus result = printer.printImage(decodedByte);
|
|
102
|
+
|
|
103
|
+
if (result.errorCode == PrinterInfo.ErrorCode.ERROR_NONE) {
|
|
104
|
+
notifyListeners("onPrint", new JSObject().put("value", result));
|
|
105
|
+
} else {
|
|
106
|
+
Log.d("TAG", "ERROR - " + result.errorCode);
|
|
107
|
+
notifyListeners("onPrintError", new JSObject().put("value", result.errorCode));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
printer.endCommunication();
|
|
103
111
|
} else {
|
|
104
|
-
|
|
105
|
-
notifyListeners("onPrintError", new JSObject().put("value", result.errorCode));
|
|
112
|
+
notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
|
|
106
113
|
}
|
|
107
|
-
|
|
108
|
-
printer.endCommunication();
|
|
109
|
-
} else {
|
|
110
|
-
notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
)
|
|
117
|
+
.start();
|
|
118
|
+
call.resolve();
|
|
115
119
|
} catch (Exception ex) {
|
|
116
120
|
notifyListeners("onPrintFailedCommunication", new JSObject().put("value", ""));
|
|
117
|
-
call.
|
|
121
|
+
call.reject(ex.getLocalizedMessage(), ex);
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
124
|
|
|
121
|
-
@PluginMethod
|
|
125
|
+
@PluginMethod
|
|
122
126
|
public void searchWiFiPrinter(PluginCall call) {
|
|
123
|
-
new Thread(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
new Thread(
|
|
128
|
+
new Runnable() {
|
|
129
|
+
@Override
|
|
130
|
+
public void run() {
|
|
131
|
+
Printer printer = new Printer();
|
|
132
|
+
NetPrinter[] printerList = printer.getNetPrinters("QL-820NWB");
|
|
133
|
+
|
|
134
|
+
JSArray resultList = new JSArray();
|
|
135
|
+
for (NetPrinter device : printerList) {
|
|
136
|
+
Log.d("TAG", String.format("Model: %s, IP Address: %s", device.modelName, device.ipAddress));
|
|
137
|
+
resultList.put(device.ipAddress);
|
|
138
|
+
}
|
|
139
|
+
notifyListeners("onIpAddressAvailable", new JSObject().put("ipAddressList", resultList));
|
|
133
140
|
}
|
|
134
|
-
notifyListeners("onIpAddressAvailable", new JSObject().put("ipAddressList", resultList));
|
|
135
141
|
}
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
)
|
|
143
|
+
.start();
|
|
144
|
+
call.resolve();
|
|
138
145
|
}
|
|
139
146
|
|
|
140
|
-
@PluginMethod
|
|
147
|
+
@PluginMethod
|
|
141
148
|
public void searchBLEPrinter(PluginCall call) {
|
|
142
|
-
new Thread(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
new Thread(
|
|
150
|
+
new Runnable() {
|
|
151
|
+
@Override
|
|
152
|
+
public void run() {
|
|
153
|
+
Printer printer = new Printer();
|
|
154
|
+
List<BLEPrinter> printerList = printer.getBLEPrinters(BluetoothAdapter.getDefaultAdapter(), 30);
|
|
155
|
+
|
|
156
|
+
JSArray resultList = new JSArray();
|
|
157
|
+
for (BLEPrinter device : printerList) {
|
|
158
|
+
resultList.put(device.localName);
|
|
159
|
+
}
|
|
152
160
|
|
|
153
|
-
|
|
161
|
+
notifyListeners("onBLEAvailable", new JSObject().put("localNameList", resultList));
|
|
162
|
+
}
|
|
154
163
|
}
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
)
|
|
165
|
+
.start();
|
|
166
|
+
call.resolve();
|
|
157
167
|
}
|
|
158
168
|
|
|
159
|
-
@PluginMethod
|
|
160
|
-
public void stopSearchBLEPrinter(PluginCall call) {
|
|
161
|
-
|
|
162
|
-
}
|
|
169
|
+
@PluginMethod
|
|
170
|
+
public void stopSearchBLEPrinter(PluginCall call) {}
|
|
163
171
|
}
|
package/dist/docs.json
CHANGED
|
@@ -114,17 +114,17 @@
|
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"name": "addListener",
|
|
117
|
-
"signature": "(eventName: '
|
|
117
|
+
"signature": "(eventName: 'onIpAddressAvailable', listenerFunc: (info: { ipAddressList: string[]; }) => void) => PluginListenerHandle",
|
|
118
118
|
"parameters": [
|
|
119
119
|
{
|
|
120
120
|
"name": "eventName",
|
|
121
121
|
"docs": "",
|
|
122
|
-
"type": "'
|
|
122
|
+
"type": "'onIpAddressAvailable'"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "listenerFunc",
|
|
126
126
|
"docs": "",
|
|
127
|
-
"type": "() => void"
|
|
127
|
+
"type": "(info: { ipAddressList: string[]; }) => void"
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
130
|
"returns": "PluginListenerHandle",
|
|
@@ -133,21 +133,21 @@
|
|
|
133
133
|
"complexTypes": [
|
|
134
134
|
"PluginListenerHandle"
|
|
135
135
|
],
|
|
136
|
-
"slug": "
|
|
136
|
+
"slug": "addlisteneronipaddressavailable"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"name": "addListener",
|
|
140
|
-
"signature": "(eventName: '
|
|
140
|
+
"signature": "(eventName: 'onPrintFailedCommunication', listenerFunc: (info: { value: string; }) => void) => PluginListenerHandle",
|
|
141
141
|
"parameters": [
|
|
142
142
|
{
|
|
143
143
|
"name": "eventName",
|
|
144
144
|
"docs": "",
|
|
145
|
-
"type": "'
|
|
145
|
+
"type": "'onPrintFailedCommunication'"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"name": "listenerFunc",
|
|
149
149
|
"docs": "",
|
|
150
|
-
"type": "() => void"
|
|
150
|
+
"type": "(info: { value: string; }) => void"
|
|
151
151
|
}
|
|
152
152
|
],
|
|
153
153
|
"returns": "PluginListenerHandle",
|
|
@@ -156,21 +156,21 @@
|
|
|
156
156
|
"complexTypes": [
|
|
157
157
|
"PluginListenerHandle"
|
|
158
158
|
],
|
|
159
|
-
"slug": "
|
|
159
|
+
"slug": "addlisteneronprintfailedcommunication"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
"name": "addListener",
|
|
163
|
-
"signature": "(eventName: '
|
|
163
|
+
"signature": "(eventName: 'onPrintError', listenerFunc: (info: { value: string; }) => void) => PluginListenerHandle",
|
|
164
164
|
"parameters": [
|
|
165
165
|
{
|
|
166
166
|
"name": "eventName",
|
|
167
167
|
"docs": "",
|
|
168
|
-
"type": "'
|
|
168
|
+
"type": "'onPrintError'"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"name": "listenerFunc",
|
|
172
172
|
"docs": "",
|
|
173
|
-
"type": "() => void"
|
|
173
|
+
"type": "(info: { value: string; }) => void"
|
|
174
174
|
}
|
|
175
175
|
],
|
|
176
176
|
"returns": "PluginListenerHandle",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"complexTypes": [
|
|
180
180
|
"PluginListenerHandle"
|
|
181
181
|
],
|
|
182
|
-
"slug": "
|
|
182
|
+
"slug": "addlisteneronprinterror"
|
|
183
183
|
}
|
|
184
184
|
],
|
|
185
185
|
"properties": []
|
|
@@ -8,9 +8,15 @@ export interface BrotherPrintPlugin {
|
|
|
8
8
|
addListener(eventName: 'onPrint', listenerFunc: () => void): PluginListenerHandle;
|
|
9
9
|
addListener(eventName: 'onBLEAvailable', listenerFunc: () => void): PluginListenerHandle;
|
|
10
10
|
addListener(eventName: 'onBLEAvailable', listenerFunc: () => void): PluginListenerHandle;
|
|
11
|
-
addListener(eventName: '
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
addListener(eventName: 'onIpAddressAvailable', listenerFunc: (info: {
|
|
12
|
+
ipAddressList: string[];
|
|
13
|
+
}) => void): PluginListenerHandle;
|
|
14
|
+
addListener(eventName: 'onPrintFailedCommunication', listenerFunc: (info: {
|
|
15
|
+
value: string;
|
|
16
|
+
}) => void): PluginListenerHandle;
|
|
17
|
+
addListener(eventName: 'onPrintError', listenerFunc: (info: {
|
|
18
|
+
value: string;
|
|
19
|
+
}) => void): PluginListenerHandle;
|
|
14
20
|
}
|
|
15
21
|
export interface BrotherPrintOptions {
|
|
16
22
|
encodedImage: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrotherPrintPlugin {\n printImage(options: BrotherPrintOptions): Promise<{ value: boolean }>;\n searchWiFiPrinter(): Promise<void>;\n searchBLEPrinter(): Promise<void>;\n\n addListener(\n eventName: 'onPrint',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: '
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { PluginListenerHandle } from '@capacitor/core';\n\nexport interface BrotherPrintPlugin {\n printImage(options: BrotherPrintOptions): Promise<{ value: boolean }>;\n searchWiFiPrinter(): Promise<void>;\n searchBLEPrinter(): Promise<void>;\n\n addListener(\n eventName: 'onPrint',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onBLEAvailable',\n listenerFunc: () => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onIpAddressAvailable',\n listenerFunc: (info: { ipAddressList: string[] }) => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintFailedCommunication',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n\n addListener(\n eventName: 'onPrintError',\n listenerFunc: (info: { value: string }) => void,\n ): PluginListenerHandle;\n}\n\nexport interface BrotherPrintOptions {\n encodedImage: string;\n printerType: 'QL-820NWB' | 'QL-800';\n numberOfCopies: number;\n labelNameIndex: 16 | 38;\n ipAddress?: string;\n localName?: string;\n}\n"]}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -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,
|
|
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,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,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 { BrotherPrint };\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -34,7 +34,7 @@ var web = /*#__PURE__*/Object.freeze({
|
|
|
34
34
|
BrotherPrintWeb: BrotherPrintWeb
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
const BrotherPrint = core.registerPlugin('
|
|
37
|
+
const BrotherPrint = core.registerPlugin('BrotherPrint', {
|
|
38
38
|
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrotherPrintWeb()),
|
|
39
39
|
});
|
|
40
40
|
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.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 { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;;;;AACO,MAAM,eAAe,SAASA,cAAS,CAAC;AAC/C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,cAAc;AAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;AAC9B,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;AAC/B,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,IAAI;AACvB,SAAS,CAAC;AACV,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;AACjC;AACA;AACA;AACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;AAChC;;;;;;;ACvBK,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -31,7 +31,7 @@ var BrotherPrint = (function (exports, core) {
|
|
|
31
31
|
BrotherPrintWeb: BrotherPrintWeb
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
const BrotherPrint = core.registerPlugin('
|
|
34
|
+
const BrotherPrint = core.registerPlugin('BrotherPrint', {
|
|
35
35
|
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.BrotherPrintWeb()),
|
|
36
36
|
});
|
|
37
37
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst BrotherPrint = registerPlugin('
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class BrotherPrintWeb extends WebPlugin {\n constructor() {\n super({\n name: 'BrotherPrint',\n platforms: ['web'],\n });\n }\n /**\n * Print with Base64\n */\n async printImage(_options) {\n return {\n value: true,\n };\n }\n /**\n * Search Wifi Printer\n */\n async searchWiFiPrinter() { }\n /**\n * search Bluetooth Printer\n */\n async searchBLEPrinter() { }\n}\n//# sourceMappingURL=web.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 { BrotherPrint };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;IACO,MAAM,eAAe,SAASA,cAAS,CAAC;IAC/C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC;IACd,YAAY,IAAI,EAAE,cAAc;IAChC,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC;IAC9B,SAAS,CAAC,CAAC;IACX,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,OAAO;IACf,YAAY,KAAK,EAAE,IAAI;IACvB,SAAS,CAAC;IACV,KAAK;IACL;IACA;IACA;IACA,IAAI,MAAM,iBAAiB,GAAG,GAAG;IACjC;IACA;IACA;IACA,IAAI,MAAM,gBAAgB,GAAG,GAAG;IAChC;;;;;;;ACvBK,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdlabo/capacitor-brotherprint",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-4",
|
|
4
4
|
"description": "Capacitor plugin for Brother Print SDK",
|
|
5
5
|
"main": "dist/plugin.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"clean": "rimraf ./dist",
|
|
21
21
|
"watch": "tsc --watch",
|
|
22
22
|
"prepublishOnly": "npm run build",
|
|
23
|
+
"release": "np --no-tests",
|
|
23
24
|
"npm-publish": "np --no-tests"
|
|
24
25
|
},
|
|
25
26
|
"author": "Masahiko Sakakibara<sakakibara@rdlabo.jp>",
|