@m430/capacitor-label-printer 0.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.
Files changed (150) hide show
  1. package/API.md +218 -0
  2. package/LICENSE +21 -0
  3. package/M430CapacitorLabelPrinter.podspec +21 -0
  4. package/README.md +190 -0
  5. package/android/build.gradle +46 -0
  6. package/android/libs/.gitkeep +1 -0
  7. package/android/libs/fat-generic-tspl-bluetooth-classic-0.1.16-GA.jar +0 -0
  8. package/android/src/main/AndroidManifest.xml +12 -0
  9. package/android/src/main/java/com/m430/capacitor/labelprinter/.gitkeep +1 -0
  10. package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidPrinterManager.java +132 -0
  11. package/android/src/main/java/com/m430/capacitor/labelprinter/AndroidStatusMapper.java +54 -0
  12. package/android/src/main/java/com/m430/capacitor/labelprinter/LabelPrinterPlugin.java +273 -0
  13. package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidDeviceCatalog.java +81 -0
  14. package/android/src/main/java/com/m430/capacitor/labelprinter/VendorAndroidPrinterSession.java +189 -0
  15. package/capacitor-label-printer.podspec +21 -0
  16. package/dist/docs.json +443 -0
  17. package/dist/esm/cpcl/builder.d.ts +10 -0
  18. package/dist/esm/cpcl/builder.js +35 -0
  19. package/dist/esm/definitions.d.ts +107 -0
  20. package/dist/esm/definitions.js +1 -0
  21. package/dist/esm/errors.d.ts +1 -0
  22. package/dist/esm/errors.js +1 -0
  23. package/dist/esm/index.d.ts +9 -0
  24. package/dist/esm/index.js +11 -0
  25. package/dist/esm/tspl/builder.d.ts +13 -0
  26. package/dist/esm/tspl/builder.js +45 -0
  27. package/dist/esm/tspl/helpers.d.ts +2 -0
  28. package/dist/esm/tspl/helpers.js +6 -0
  29. package/dist/esm/types.d.ts +12 -0
  30. package/dist/esm/types.js +1 -0
  31. package/dist/esm/web.d.ts +21 -0
  32. package/dist/esm/web.js +34 -0
  33. package/dist/plugin.cjs.js +143 -0
  34. package/dist/plugin.cjs.js.map +1 -0
  35. package/dist/plugin.js +136 -0
  36. package/dist/plugin.js.map +1 -0
  37. package/ios/Plugin/.gitkeep +1 -0
  38. package/ios/Plugin/IOSPrinterManager.swift +230 -0
  39. package/ios/Plugin/IOSStatusMapper.swift +57 -0
  40. package/ios/Plugin/LabelPrinterPlugin.swift +141 -0
  41. package/ios/VendorFrameworks/.gitkeep +1 -0
  42. package/ios/VendorFrameworks/adapter.framework/Headers/BasedOtherConnectedDevice.h +17 -0
  43. package/ios/VendorFrameworks/adapter.framework/Headers/ConnectedDevice.h +213 -0
  44. package/ios/VendorFrameworks/adapter.framework/Headers/IPRTBlueToothBaseDef.h +22 -0
  45. package/ios/VendorFrameworks/adapter.framework/Headers/KeepStateConnectedDevice.h +18 -0
  46. package/ios/VendorFrameworks/adapter.framework/Headers/QueueConfig.h +18 -0
  47. package/ios/VendorFrameworks/adapter.framework/Headers/ReadOptions.h +22 -0
  48. package/ios/VendorFrameworks/adapter.framework/Headers/WroteReporter.h +23 -0
  49. package/ios/VendorFrameworks/adapter.framework/Headers/adapter.h +18 -0
  50. package/ios/VendorFrameworks/adapter.framework/Info.plist +0 -0
  51. package/ios/VendorFrameworks/adapter.framework/Modules/module.modulemap +6 -0
  52. package/ios/VendorFrameworks/adapter.framework/adapter +0 -0
  53. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/Info.plist +0 -0
  54. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/_CodeSignature/CodeResources +101 -0
  55. package/ios/VendorFrameworks/appleble.framework/Frameworks/adapter.framework/adapter +0 -0
  56. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/Info.plist +0 -0
  57. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Frameworks/adapter.framework/adapter +0 -0
  58. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/Info.plist +0 -0
  59. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/_CodeSignature/CodeResources +132 -0
  60. package/ios/VendorFrameworks/appleble.framework/Frameworks/ibridge.framework/ibridge +0 -0
  61. package/ios/VendorFrameworks/appleble.framework/Headers/AppleBle.h +25 -0
  62. package/ios/VendorFrameworks/appleble.framework/Info.plist +0 -0
  63. package/ios/VendorFrameworks/appleble.framework/Modules/module.modulemap +6 -0
  64. package/ios/VendorFrameworks/appleble.framework/_CodeSignature/CodeResources +252 -0
  65. package/ios/VendorFrameworks/appleble.framework/appleble +0 -0
  66. package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
  67. package/ios/VendorFrameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
  68. package/ios/VendorFrameworks/father.framework/Headers/Appendat.h +28 -0
  69. package/ios/VendorFrameworks/father.framework/Headers/Arg.h +22 -0
  70. package/ios/VendorFrameworks/father.framework/Headers/BasicBatteryVolumeArg.h +16 -0
  71. package/ios/VendorFrameworks/father.framework/Headers/BinaryCommand.h +17 -0
  72. package/ios/VendorFrameworks/father.framework/Headers/CPCLCommand.h +10 -0
  73. package/ios/VendorFrameworks/father.framework/Headers/CallbackData.h +26 -0
  74. package/ios/VendorFrameworks/father.framework/Headers/Checker.h +16 -0
  75. package/ios/VendorFrameworks/father.framework/Headers/Command.h +25 -0
  76. package/ios/VendorFrameworks/father.framework/Headers/CommandClause.h +33 -0
  77. package/ios/VendorFrameworks/father.framework/Headers/Commander.h +31 -0
  78. package/ios/VendorFrameworks/father.framework/Headers/DataWriteOperation.h +42 -0
  79. package/ios/VendorFrameworks/father.framework/Headers/DefaultCommand.h +16 -0
  80. package/ios/VendorFrameworks/father.framework/Headers/EasyArg.h +16 -0
  81. package/ios/VendorFrameworks/father.framework/Headers/FastBinary.h +20 -0
  82. package/ios/VendorFrameworks/father.framework/Headers/HexOutput.h +19 -0
  83. package/ios/VendorFrameworks/father.framework/Headers/IDataWriteCallback.h +25 -0
  84. package/ios/VendorFrameworks/father.framework/Headers/Lifecycle.h +21 -0
  85. package/ios/VendorFrameworks/father.framework/Headers/NewLineArg.h +15 -0
  86. package/ios/VendorFrameworks/father.framework/Headers/OnlyBinaryHeaderArg.h +15 -0
  87. package/ios/VendorFrameworks/father.framework/Headers/OnlyTextHeaderArg.h +16 -0
  88. package/ios/VendorFrameworks/father.framework/Headers/PImageTool.h +22 -0
  89. package/ios/VendorFrameworks/father.framework/Headers/PReplaceKit.h +16 -0
  90. package/ios/VendorFrameworks/father.framework/Headers/PSDK.h +60 -0
  91. package/ios/VendorFrameworks/father.framework/Headers/PVariableKit.h +18 -0
  92. package/ios/VendorFrameworks/father.framework/Headers/PsdkConst.h +33 -0
  93. package/ios/VendorFrameworks/father.framework/Headers/Raw.h +22 -0
  94. package/ios/VendorFrameworks/father.framework/Headers/SimpleCheck.h +16 -0
  95. package/ios/VendorFrameworks/father.framework/Headers/SingleCommand.h +32 -0
  96. package/ios/VendorFrameworks/father.framework/Headers/TSPLCommand.h +10 -0
  97. package/ios/VendorFrameworks/father.framework/Headers/WriteControl.h +12 -0
  98. package/ios/VendorFrameworks/father.framework/Headers/WriteOptions.h +28 -0
  99. package/ios/VendorFrameworks/father.framework/Headers/father.h +21 -0
  100. package/ios/VendorFrameworks/father.framework/Info.plist +0 -0
  101. package/ios/VendorFrameworks/father.framework/Modules/module.modulemap +6 -0
  102. package/ios/VendorFrameworks/father.framework/father +0 -0
  103. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/Info.plist +0 -0
  104. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Frameworks/adapter.framework/adapter +0 -0
  105. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/Info.plist +0 -0
  106. package/ios/VendorFrameworks/tspl.framework/Frameworks/father.framework/father +0 -0
  107. package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPL.h +146 -0
  108. package/ios/VendorFrameworks/tspl.framework/Headers/BasicTSPLArg.h +17 -0
  109. package/ios/VendorFrameworks/tspl.framework/Headers/GenericTSPL.h +16 -0
  110. package/ios/VendorFrameworks/tspl.framework/Headers/TBar.h +30 -0
  111. package/ios/VendorFrameworks/tspl.framework/Headers/TBarCode.h +54 -0
  112. package/ios/VendorFrameworks/tspl.framework/Headers/TBatteryVolume.h +19 -0
  113. package/ios/VendorFrameworks/tspl.framework/Headers/TBox.h +32 -0
  114. package/ios/VendorFrameworks/tspl.framework/Headers/TCircle.h +26 -0
  115. package/ios/VendorFrameworks/tspl.framework/Headers/TCleanBmpFlash.h +20 -0
  116. package/ios/VendorFrameworks/tspl.framework/Headers/TClear.h +20 -0
  117. package/ios/VendorFrameworks/tspl.framework/Headers/TCut.h +21 -0
  118. package/ios/VendorFrameworks/tspl.framework/Headers/TDensity.h +21 -0
  119. package/ios/VendorFrameworks/tspl.framework/Headers/TDirection.h +51 -0
  120. package/ios/VendorFrameworks/tspl.framework/Headers/TDmatrix.h +29 -0
  121. package/ios/VendorFrameworks/tspl.framework/Headers/TDownloadBmpFlash.h +16 -0
  122. package/ios/VendorFrameworks/tspl.framework/Headers/TGap.h +21 -0
  123. package/ios/VendorFrameworks/tspl.framework/Headers/TImage.h +36 -0
  124. package/ios/VendorFrameworks/tspl.framework/Headers/TLine.h +34 -0
  125. package/ios/VendorFrameworks/tspl.framework/Headers/TMddle.h +16 -0
  126. package/ios/VendorFrameworks/tspl.framework/Headers/TPage.h +22 -0
  127. package/ios/VendorFrameworks/tspl.framework/Headers/TPrint.h +21 -0
  128. package/ios/VendorFrameworks/tspl.framework/Headers/TQRCode.h +35 -0
  129. package/ios/VendorFrameworks/tspl.framework/Headers/TReadState.h +16 -0
  130. package/ios/VendorFrameworks/tspl.framework/Headers/TReverse.h +27 -0
  131. package/ios/VendorFrameworks/tspl.framework/Headers/TSN.h +19 -0
  132. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCodeType.h +53 -0
  133. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLCorrectLevel.h +21 -0
  134. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLFont.h +83 -0
  135. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLImageMode.h +30 -0
  136. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineMode.h +37 -0
  137. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLLineType.h +21 -0
  138. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLOutDirection.h +27 -0
  139. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLRotation.h +36 -0
  140. package/ios/VendorFrameworks/tspl.framework/Headers/TSPLShowType.h +36 -0
  141. package/ios/VendorFrameworks/tspl.framework/Headers/TSPL_.h +18 -0
  142. package/ios/VendorFrameworks/tspl.framework/Headers/TSpeed.h +20 -0
  143. package/ios/VendorFrameworks/tspl.framework/Headers/TText.h +38 -0
  144. package/ios/VendorFrameworks/tspl.framework/Headers/TTextBox.h +44 -0
  145. package/ios/VendorFrameworks/tspl.framework/Headers/TVersion.h +19 -0
  146. package/ios/VendorFrameworks/tspl.framework/Headers/tspl.h +45 -0
  147. package/ios/VendorFrameworks/tspl.framework/Info.plist +0 -0
  148. package/ios/VendorFrameworks/tspl.framework/Modules/module.modulemap +6 -0
  149. package/ios/VendorFrameworks/tspl.framework/tspl +0 -0
  150. package/package.json +95 -0
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@m430/capacitor-label-printer",
3
+ "version": "0.1.0",
4
+ "description": "Capacitor plugin for Qirui/AiYin/BEEPRT label printers",
5
+ "main": "dist/plugin.cjs.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "unpkg": "dist/plugin.js",
9
+ "files": [
10
+ "API.md",
11
+ "android/src/main/",
12
+ "android/build.gradle",
13
+ "android/libs/",
14
+ "ios/Plugin/",
15
+ "ios/VendorFrameworks/",
16
+ "M430CapacitorLabelPrinter.podspec",
17
+ "capacitor-label-printer.podspec",
18
+ "dist/"
19
+ ],
20
+ "author": "Andy Zheng",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/m430/capacitor-label-printer.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/m430/capacitor-label-printer/issues"
28
+ },
29
+ "homepage": "https://github.com/m430/capacitor-label-printer#readme",
30
+ "keywords": [
31
+ "capacitor",
32
+ "plugin",
33
+ "label-printer",
34
+ "bluetooth",
35
+ "tspl",
36
+ "qr-365",
37
+ "android",
38
+ "ios"
39
+ ],
40
+ "scripts": {
41
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
42
+ "clean": "rimraf ./dist",
43
+ "docgen": "docgen --api LabelPrinterPlugin --output-json dist/docs.json",
44
+ "test:unit": "vitest run",
45
+ "lint": "npm run eslint && npm run prettier -- --check",
46
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write",
47
+ "eslint": "eslint . --ext ts",
48
+ "prettier": "prettier \"**/*.{md,ts,js,java,swift,html}\" --plugin=prettier-plugin-java",
49
+ "verify": "npm run test:unit && npm run verify:android && npm run build",
50
+ "verify:android": "cd android && ./gradlew clean test build && cd ..",
51
+ "verify:ios": "cd example-app && npx cap sync ios && xcodebuild -workspace ios/App/App.xcworkspace -scheme App -configuration Debug -destination 'generic/platform=iOS' build CODE_SIGNING_ALLOWED=NO",
52
+ "verify:release": "npm run verify && npm run verify:ios && npm pack --dry-run",
53
+ "verify:web": "npm run build",
54
+ "prepublishOnly": "npm run build",
55
+ "release": "bash scripts/release.sh"
56
+ },
57
+ "devDependencies": {
58
+ "@capacitor/android": "^7.0.0",
59
+ "@capacitor/core": "^7.0.0",
60
+ "@capacitor/docgen": "^0.3.0",
61
+ "@capacitor/ios": "^7.0.0",
62
+ "@ionic/eslint-config": "^0.4.0",
63
+ "@ionic/prettier-config": "^4.0.0",
64
+ "@ionic/swiftlint-config": "^2.0.0",
65
+ "@rollup/plugin-node-resolve": "^16.0.0",
66
+ "@rollup/plugin-typescript": "^12.1.2",
67
+ "eslint": "^8.57.0",
68
+ "prettier": "^3.4.2",
69
+ "prettier-plugin-java": "^2.6.6",
70
+ "rimraf": "^6.0.1",
71
+ "rollup": "^4.30.1",
72
+ "swiftlint": "^2.0.0",
73
+ "typescript": "^5.6.3",
74
+ "vitest": "^2.1.9"
75
+ },
76
+ "peerDependencies": {
77
+ "@capacitor/core": ">=7.0.0"
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ },
82
+ "prettier": "@ionic/prettier-config",
83
+ "swiftlint": "@ionic/swiftlint-config",
84
+ "eslintConfig": {
85
+ "extends": "@ionic/eslint-config/recommended"
86
+ },
87
+ "capacitor": {
88
+ "android": {
89
+ "src": "android"
90
+ },
91
+ "ios": {
92
+ "src": "ios"
93
+ }
94
+ }
95
+ }