@nitra/zebra 6.2.0 → 7.0.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 (31) hide show
  1. package/NitraZebra.podspec +16 -13
  2. package/Package.swift +28 -0
  3. package/README.md +72 -0
  4. package/android/build.gradle +16 -14
  5. package/android/src/main/AndroidManifest.xml +2 -22
  6. package/android/src/main/java/dev/nitra/zebra/Zebra.java +11 -0
  7. package/android/src/main/java/dev/nitra/zebra/ZebraPlugin.java +22 -0
  8. package/dist/plugin.js +842 -1296
  9. package/dist/plugin.js.map +1 -1
  10. package/ios/Sources/ZebraPlugin/Zebra.swift +8 -0
  11. package/ios/Sources/ZebraPlugin/ZebraPlugin.swift +23 -0
  12. package/ios/Tests/ZebraPluginTests/ZebraTests.swift +15 -0
  13. package/package.json +46 -54
  14. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  15. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  16. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  17. package/android/.gradle/8.9/gc.properties +0 -0
  18. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  19. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  20. package/android/.gradle/vcs-1/gc.properties +0 -0
  21. package/android/.project +0 -28
  22. package/android/capacitor.settings.gradle +0 -3
  23. package/android/gradle.properties +0 -19
  24. package/android/proguard-rules.pro +0 -21
  25. package/android/src/main/java/com/nitra/zebra_printer_plugin/ZebraPrinter.java +0 -1418
  26. package/android/src/main/res/xml/capacitor_plugins.xml +0 -4
  27. package/android/variables.gradle +0 -14
  28. package/ios/Info.plist +0 -36
  29. package/ios/Plugin/ZebraPrinterPlugin.m +0 -16
  30. package/ios/Plugin/ZebraPrinterPlugin.swift +0 -465
  31. /package/android/{.gradle/8.9/dependencies-accessors/gc.properties → src/main/res/.gitkeep} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["../src/web/index.js","../src/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\n/**\n * ZebraPrinterWeb - Web implementation for development\n *\n * Uses local printer-server.js (TCP/IP) or Web Bluetooth API.\n * Falls back to BLE when TCP/IP is not available (like iOS).\n *\n * Production (iOS) uses the native BLE implementation.\n */\n/**\n * @typedef {import('../definitions').EchoOptions} EchoOptions\n * @typedef {import('../definitions').EchoResult} EchoResult\n * @typedef {import('../definitions').PrintTextOptions} PrintTextOptions\n * @typedef {import('../definitions').PrintResult} PrintResult\n * @typedef {import('../definitions').PrinterStatus} PrinterStatus\n * @typedef {import('../definitions').PrinterStatusResult} PrinterStatusResult\n * @typedef {import('../definitions').ScanResult} ScanResult\n * @typedef {import('../definitions').ConnectOptions} ConnectOptions\n * @typedef {import('../definitions').ConnectResult} ConnectResult\n * @typedef {import('../definitions').DisconnectResult} DisconnectResult\n * @typedef {import('../definitions').PermissionResult} PermissionResult\n */\n\nconst API_BASE = '/api/printer';\n\n// Zebra printer BLE service UUIDs\nconst ZEBRA_SERVICE_UUID = '38eb4a80-c570-11e3-9507-0002a5d5c51b';\nconst ZEBRA_WRITE_CHAR_UUID = '38eb4a82-c570-11e3-9507-0002a5d5c51b';\n// Alternative service for some Zebra models\nconst ZEBRA_SPP_SERVICE_UUID = '00001101-0000-1000-8000-00805f9b34fb';\n\n// LocalStorage key for persisting printer settings\nconst STORAGE_KEY = 'zebra_printer_settings';\n\nexport class ZebraPrinterWeb extends WebPlugin {\n constructor() {\n super();\n this.serviceAvailable = null;\n this.defaultSubnet = this._getDefaultSubnet();\n // BLE state\n this.bleDevice = null;\n this.bleServer = null;\n this.bleCharacteristic = null;\n this.discoveredBleDevices = [];\n // Load last printer from localStorage\n this.connectedPrinter = this._loadFromStorage();\n if (this.connectedPrinter) {\n console.log(\n '[Storage] Loaded:',\n this.connectedPrinter.name || this.connectedPrinter.ip\n );\n }\n }\n\n // ═══════════════════════════════════════════════════════════════════════════\n // LOCAL STORAGE PERSISTENCE\n // ═══════════════════════════════════════════════════════════════════════════\n\n /**\n * Load printer settings from localStorage\n * @returns {Object|null} Saved printer settings or null\n */\n _loadFromStorage() {\n try {\n if (typeof localStorage === 'undefined') return null;\n const saved = localStorage.getItem(STORAGE_KEY);\n return saved ? JSON.parse(saved) : null;\n } catch {\n return null;\n }\n }\n\n /**\n * Save printer settings to localStorage\n * @param {Object} printer - Printer settings to save\n */\n _saveToStorage(printer) {\n try {\n if (typeof localStorage === 'undefined') return;\n if (printer) {\n // Don't save BLE device reference (can't be serialized)\n const toSave = { ...printer };\n delete toSave.bleDevice;\n localStorage.setItem(STORAGE_KEY, JSON.stringify(toSave));\n console.log('[Storage] Saved:', toSave.name || toSave.ip);\n } else {\n localStorage.removeItem(STORAGE_KEY);\n console.log('[Storage] Cleared');\n }\n } catch {\n // Ignore storage errors\n }\n }\n\n /**\n * Clear saved printer from localStorage\n * @returns {{success: boolean, message: string}} Result object\n */\n clearSavedPrinter() {\n this._saveToStorage(null);\n return { success: true, message: 'Saved printer cleared' };\n }\n\n /**\n * Check if Web Bluetooth is supported\n * @returns {boolean} True if Web Bluetooth API is available\n */\n _isBleSupported() {\n return (\n typeof navigator !== 'undefined' && navigator.bluetooth !== undefined\n );\n }\n\n /**\n * Delay helper for BLE chunk sending\n * @param {number} ms - Milliseconds to delay\n * @returns {Promise<void>} Resolves after delay\n */\n _delay(ms) {\n const { promise, resolve } = Promise.withResolvers();\n setTimeout(resolve, ms);\n return promise;\n }\n\n /**\n * Check if printer-server is reachable\n * @returns {Promise<boolean>} True if reachable\n */\n async _checkService() {\n if (this.serviceAvailable !== null) {\n return this.serviceAvailable;\n }\n\n try {\n const response = await fetch(`${API_BASE}/status`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' },\n });\n const data = await response.json();\n this.serviceAvailable = data.success === true;\n return this.serviceAvailable;\n } catch (error) {\n console.warn('ZebraPrinter: service check failed', error);\n this.serviceAvailable = false;\n return false;\n }\n }\n\n /**\n * Scan for BLE printers using Web Bluetooth API\n * @returns {Promise<ScanResult>} List of discovered BLE printers\n */\n async _scanBlePrinters() {\n if (!this._isBleSupported()) {\n return {\n success: false,\n error: 'Web Bluetooth is not supported in this browser',\n printers: [],\n count: 0,\n };\n }\n\n try {\n console.log('[BLE] Scanning...');\n\n // Request device with Zebra name prefixes\n const device = await navigator.bluetooth.requestDevice({\n filters: [\n { namePrefix: 'Zebra' },\n { namePrefix: 'ZT' },\n { namePrefix: 'ZD' },\n { namePrefix: 'ZQ' },\n { namePrefix: 'XXZHN' },\n ],\n optionalServices: [ZEBRA_SERVICE_UUID, ZEBRA_SPP_SERVICE_UUID],\n });\n\n console.log('[BLE] Found:', device.name);\n\n // Store discovered device\n if (!this.discoveredBleDevices.some((d) => d.id === device.id)) {\n this.discoveredBleDevices.push(device);\n }\n\n return {\n success: true,\n printers: this.discoveredBleDevices.map((d) => ({\n name: d.name || 'Zebra Printer',\n address: d.id,\n type: 'bluetooth',\n paired: false,\n })),\n count: this.discoveredBleDevices.length,\n };\n } catch (error) {\n console.warn('[BLE] Scan failed:', error.message);\n return {\n success: false,\n error: error.message || 'BLE scan failed',\n printers: [],\n count: 0,\n };\n }\n }\n\n /**\n * Connect to a BLE printer\n * @param {string} deviceId - Device ID from scan\n * @returns {Promise<ConnectResult>} Connection result with success status\n */\n async _connectBle(deviceId) {\n if (!this._isBleSupported()) {\n return {\n success: false,\n connected: false,\n error: 'Web Bluetooth is not supported',\n };\n }\n\n try {\n let device = this.discoveredBleDevices.find((d) => d.id === deviceId);\n\n // If device not found, request new device\n if (!device) {\n console.log('[BLE] Device not cached, requesting...');\n device = await navigator.bluetooth.requestDevice({\n filters: [\n { namePrefix: 'Zebra' },\n { namePrefix: 'ZT' },\n { namePrefix: 'ZD' },\n { namePrefix: 'ZQ' },\n { namePrefix: 'XXZHN' },\n ],\n optionalServices: [ZEBRA_SERVICE_UUID, ZEBRA_SPP_SERVICE_UUID],\n });\n this.discoveredBleDevices.push(device);\n }\n\n console.log('[BLE] Connecting to', device.name);\n\n // Connect to GATT server\n this.bleServer = await device.gatt.connect();\n this.bleDevice = device;\n\n console.log('[BLE] GATT connected');\n\n // Try to get Zebra service\n let service;\n try {\n service = await this.bleServer.getPrimaryService(ZEBRA_SERVICE_UUID);\n console.log('[BLE] Found Zebra service');\n } catch {\n // Try alternative service\n console.log('[BLE] Trying alternative services...');\n const services = await this.bleServer.getPrimaryServices();\n console.log('[BLE] Found', services.length, 'services');\n\n for (const svc of services) {\n console.log(` - Service: ${svc.uuid}`);\n try {\n const chars = await svc.getCharacteristics();\n for (const char of chars) {\n console.log(\n ` - Characteristic: ${char.uuid}, props:`,\n char.properties\n );\n if (\n char.properties.write ||\n char.properties.writeWithoutResponse\n ) {\n service = svc;\n this.bleCharacteristic = char;\n console.log('[BLE] Found writable characteristic');\n break;\n }\n }\n if (this.bleCharacteristic) break;\n } catch {\n console.warn('[BLE] Could not get characteristics for', svc.uuid);\n }\n }\n }\n\n // Get write characteristic if not found yet\n if (service && !this.bleCharacteristic) {\n try {\n this.bleCharacteristic = await service.getCharacteristic(\n ZEBRA_WRITE_CHAR_UUID\n );\n console.log('[BLE] Found Zebra write characteristic');\n } catch {\n // Find any writable characteristic\n const chars = await service.getCharacteristics();\n for (const char of chars) {\n if (char.properties.write || char.properties.writeWithoutResponse) {\n this.bleCharacteristic = char;\n console.log('[BLE] Found alternative write characteristic');\n break;\n }\n }\n }\n }\n\n if (!this.bleCharacteristic) {\n throw new Error('No writable characteristic found on printer');\n }\n\n // Update connected printer state\n this.connectedPrinter = {\n name: device.name || 'Zebra Printer',\n address: device.id,\n type: 'bluetooth',\n bleDevice: device,\n };\n\n // Save to localStorage (without bleDevice reference)\n this._saveToStorage(this.connectedPrinter);\n\n // Listen for disconnection\n device.addEventListener('gattserverdisconnected', () => {\n console.log('[BLE] Disconnected');\n this.bleDevice = null;\n this.bleServer = null;\n this.bleCharacteristic = null;\n if (this.connectedPrinter?.type === 'bluetooth') {\n this.connectedPrinter = null;\n }\n });\n\n return {\n success: true,\n connected: true,\n address: device.id,\n type: 'bluetooth',\n message: `Connected to ${device.name}`,\n };\n } catch (error) {\n console.error('[BLE] Connection failed:', error);\n return {\n success: false,\n connected: false,\n error: error.message || 'BLE connection failed',\n };\n }\n }\n\n /**\n * Send data to BLE printer in chunks\n * @param {string} data - Data to send\n * @returns {Promise<boolean>} True if data sent successfully\n */\n async _sendBlePrint(data) {\n if (!this.bleCharacteristic) {\n console.error('[BLE] No characteristic available');\n return false;\n }\n\n try {\n const encoder = new TextEncoder();\n const bytes = encoder.encode(data);\n const MTU_SIZE = 20; // Standard BLE MTU\n\n console.log('[BLE] Sending', bytes.length, 'bytes');\n\n for (let offset = 0; offset < bytes.length; offset += MTU_SIZE) {\n const chunk = bytes.slice(\n offset,\n Math.min(offset + MTU_SIZE, bytes.length)\n );\n\n if (this.bleCharacteristic.properties.writeWithoutResponse) {\n await this.bleCharacteristic.writeValueWithoutResponse(chunk);\n } else {\n await this.bleCharacteristic.writeValue(chunk);\n }\n\n // Small delay between chunks like iOS\n if (offset + MTU_SIZE < bytes.length) {\n await this._delay(50);\n }\n }\n\n console.log('[BLE] Data sent');\n return true;\n } catch (error) {\n console.error('[BLE] Send failed:', error);\n return false;\n }\n }\n\n /**\n * Disconnect BLE printer\n */\n _disconnectBle() {\n if (this.bleDevice?.gatt?.connected) {\n this.bleDevice.gatt.disconnect();\n }\n this.bleDevice = null;\n this.bleServer = null;\n this.bleCharacteristic = null;\n }\n\n /**\n * Fetch wrapper with error handling\n * @param {string} endpoint - API route\n * @param {RequestInit} [options] - Fetch configuration\n * @returns {Promise<any>} Response JSON\n */\n async _fetch(endpoint, options = {}) {\n try {\n const response = await fetch(`${API_BASE}${endpoint}`, {\n headers: { 'Content-Type': 'application/json' },\n ...options,\n });\n return await response.json();\n } catch (error) {\n console.warn(`ZebraPrinter Web: ${endpoint} failed -`, error.message);\n return {\n success: false,\n error:\n 'Printer service is not available. Ensure Vite dev server runs with printer-server plugin.',\n serviceUnavailable: true,\n };\n }\n }\n\n /**\n * Derive default subnet from host IP, if possible\n * @returns {string} Example: \"192.168.1\" or \"10.0.0\"\n */\n _getDefaultSubnet() {\n if (typeof window === 'undefined') return '192.168.1';\n const host = window.location.hostname;\n const ipMatch = host.match(\n /^(10|172\\.(1[6-9]|2[0-9]|3[0-1])|192\\.168)\\.(\\d+)\\.(\\d+)$/\n );\n if (ipMatch) {\n return `${ipMatch[1]}.${ipMatch[3]}`;\n }\n return '192.168.1';\n }\n\n /**\n * Wrap plain text into a basic ZPL label unless it already looks like ZPL\n * @param {string} text - Input text or ZPL\n * @returns {string} ZPL payload\n */\n _wrapTextIfNeeded(text) {\n const isZplLike =\n typeof text === 'string' &&\n /\\^XA/i.test(text) &&\n (/\\^XZ/i.test(text) || /\\^JUS/i.test(text));\n if (isZplLike) {\n return text;\n }\n\n const safeText = String(text ?? '').replaceAll(/\\r?\\n/g, String.raw`\\&`);\n return [\n '^XA',\n '^CI28',\n '^FO50,50',\n '^A0N,30,30',\n `^FD${safeText}^FS`,\n '^XZ',\n ].join('\\n');\n }\n\n /**\n * Echo a value\n * @param {EchoOptions} options - Input data\n * @returns {Promise<EchoResult & {platform: string, serviceAvailable: boolean}>} Echo result with platform info\n */\n async echo(options) {\n console.log('ZebraPrinter: echo called with options:', options);\n const serviceOk = await this._checkService();\n return {\n value: options.value,\n platform: 'web',\n serviceAvailable: serviceOk,\n };\n }\n\n /**\n * Check if required permissions are granted\n * @returns {Promise<PermissionResult>} Permission status\n */\n async checkPermissions() {\n const serviceOk = await this._checkService();\n const bleSupported = this._isBleSupported();\n\n // With BLE support, we can work even without printer-server\n const hasPermissions = serviceOk || bleSupported;\n\n if (!hasPermissions) {\n console.warn(\n 'ZebraPrinter: no print method available (no printer-server, no BLE)'\n );\n return {\n hasPermissions: false,\n missingPermissions: ['printer-server', 'bluetooth'],\n bluetoothSupported: false,\n bleSupported: false,\n webMode: true,\n serviceAvailable: false,\n };\n }\n\n return {\n hasPermissions: true,\n missingPermissions: [],\n bluetoothSupported: bleSupported,\n bleSupported: bleSupported,\n webMode: true,\n serviceAvailable: serviceOk,\n // New: indicate which methods are available\n tcpAvailable: serviceOk,\n bleAvailable: bleSupported,\n };\n }\n\n /**\n * Request required permissions\n * @returns {Promise<PermissionResult>} Permission status\n */\n async requestPermissions() {\n // Not needed on web - just check service\n return await this.checkPermissions();\n }\n\n /**\n * Print text to the connected printer\n * @param {PrintTextOptions} options - Parameters with ZPL text\n * @returns {Promise<PrintResult>} Print result\n */\n async printText(options) {\n const { text } = options || {};\n\n if (!text) {\n return {\n success: false,\n message: 'No text provided for printing',\n error: 'Missing text parameter',\n };\n }\n\n const zplPayload = this._wrapTextIfNeeded(text);\n\n // If connected via BLE, use BLE printing\n if (this.connectedPrinter?.type === 'bluetooth' && this.bleCharacteristic) {\n console.log('[BLE] Printing...');\n const success = await this._sendBlePrint(zplPayload);\n\n if (success) {\n return {\n success: true,\n message: 'Print successful (BLE)',\n zpl: `${zplPayload.slice(0, 100)}...`,\n bytes: zplPayload.length,\n method: 'bluetooth',\n };\n }\n\n return {\n success: false,\n message: 'BLE print failed',\n error: 'Failed to send data to printer via Bluetooth',\n };\n }\n\n // Otherwise use TCP/IP via printer-server\n const result = await this._fetch('/print', {\n method: 'POST',\n body: JSON.stringify({\n zpl: zplPayload,\n ip: this.connectedPrinter?.ip,\n }),\n });\n\n if (result.success) {\n return {\n success: true,\n message: 'Print successful',\n zpl: `${zplPayload.slice(0, 100)}...`,\n bytes: zplPayload.length,\n method: 'tcp',\n };\n }\n\n return {\n success: false,\n message: result.error || 'Print failed',\n error: result.error,\n };\n }\n\n /**\n * Get printer status\n * @returns {Promise<PrinterStatus>} Printer status\n */\n async getStatus() {\n if (!this.connectedPrinter) {\n return {\n connected: false,\n status: 'disconnected',\n };\n }\n\n // BLE connection status\n if (this.connectedPrinter.type === 'bluetooth') {\n const isConnected =\n this.bleDevice?.gatt?.connected === true &&\n this.bleCharacteristic !== null;\n return {\n connected: isConnected,\n status: isConnected ? 'connected' : 'disconnected',\n printerAddress: this.connectedPrinter.address,\n printerType: 'bluetooth',\n };\n }\n\n // TCP/IP status\n const result = await this._fetch('/check', {\n method: 'POST',\n body: JSON.stringify({ ip: this.connectedPrinter.ip }),\n });\n\n return {\n connected: result.reachable === true,\n status: result.reachable ? 'connected' : 'disconnected',\n printerAddress: this.connectedPrinter.ip,\n printerType: 'network',\n };\n }\n\n /**\n * Check printer status with ZPL command\n * @returns {Promise<PrinterStatusResult>} Status request result\n */\n async checkPrinterStatus() {\n if (!this.connectedPrinter) {\n return {\n success: false,\n message: 'No printer connected',\n error: 'Not connected',\n };\n }\n\n const statusCommand = '~HS';\n\n // BLE status check\n if (this.connectedPrinter.type === 'bluetooth' && this.bleCharacteristic) {\n const success = await this._sendBlePrint(statusCommand);\n return {\n success,\n message: success\n ? 'Status command sent (BLE)'\n : 'Failed to send status command',\n command: statusCommand,\n method: 'bluetooth',\n };\n }\n\n // TCP/IP status check\n const result = await this._fetch('/print', {\n method: 'POST',\n body: JSON.stringify({\n zpl: statusCommand,\n ip: this.connectedPrinter.ip,\n }),\n });\n\n return {\n success: result.success,\n message: result.success ? 'Status command sent' : result.error,\n command: statusCommand,\n method: 'tcp',\n };\n }\n\n /**\n * Scan for available printers\n * @param {{subnet?: string, useBle?: boolean, skipCache?: boolean}} [options] - Custom subnet or BLE mode\n * @returns {Promise<ScanResult>} List of found printers\n */\n async scanForPrinters(options = {}) {\n const { useBle, skipCache } = options;\n const serviceOk = await this._checkService();\n const bleSupported = this._isBleSupported();\n\n // Check if last saved printer is still reachable (fast reconnect)\n if (!skipCache && !useBle) {\n const lastPrinter = this._loadFromStorage();\n if (lastPrinter?.ip && serviceOk) {\n console.log('[Cache] Checking:', lastPrinter.ip);\n const check = await this._fetch('/check', {\n method: 'POST',\n body: JSON.stringify({ ip: lastPrinter.ip }),\n });\n\n if (check.reachable) {\n console.log('[Cache] Printer reachable');\n // Auto-connect to last printer\n this.connectedPrinter = lastPrinter;\n return {\n success: true,\n printers: [\n {\n name: lastPrinter.name || `Zebra @ ${lastPrinter.ip}`,\n address: lastPrinter.ip,\n type: 'network',\n paired: true, // Mark as \"paired\" since it was saved\n },\n ],\n count: 1,\n fromCache: true,\n autoConnected: true,\n };\n }\n console.log('[Cache] Printer not reachable, scanning...');\n }\n }\n\n // If explicitly requesting BLE or printer-server not available\n if (useBle || !serviceOk) {\n if (!bleSupported) {\n return {\n success: false,\n error:\n 'Web Bluetooth is not supported in this browser. Use Chrome or Edge.',\n printers: [],\n count: 0,\n };\n }\n\n console.log('[Web] Using BLE scan...');\n return await this._scanBlePrinters();\n }\n\n const subnet = options.subnet || this.defaultSubnet || '192.168.1';\n\n // Try TCP/IP scan first\n const result = await this._fetch(\n `/scan?subnet=${encodeURIComponent(subnet)}`\n );\n\n if (result.success && result.printers?.length > 0) {\n return {\n success: true,\n printers: (result.printers || []).map((p) => ({\n name: p.name || `Zebra @ ${p.ip}`,\n address: p.ip || p.address,\n type: 'network',\n paired: false,\n })),\n count: result.printers?.length || 0,\n method: 'tcp',\n };\n }\n\n // Fallback to BLE if TCP/IP found nothing and BLE is supported\n if (bleSupported) {\n console.log('[Web] TCP/IP found nothing, trying BLE...');\n const bleResult = await this._scanBlePrinters();\n\n if (bleResult.success) {\n return {\n ...bleResult,\n method: 'bluetooth',\n tcpFallback: true,\n };\n }\n }\n\n return {\n success: false,\n error: result.error || 'No printers found',\n printers: [],\n count: 0,\n bleAvailable: bleSupported,\n };\n }\n\n /**\n * Connect to a printer\n * @param {ConnectOptions} options - Connection parameters\n * @returns {Promise<ConnectResult>} Connection result\n */\n async connect(options) {\n const { address, type } = options || {};\n\n // BLE connection (like iOS)\n if (type === 'bluetooth') {\n if (!this._isBleSupported()) {\n return {\n success: false,\n connected: false,\n error:\n 'Web Bluetooth is not supported in this browser. Use Chrome or Edge.',\n };\n }\n\n console.log('[Web] Connecting via BLE...');\n return await this._connectBle(address);\n }\n\n // If no address provided but BLE devices were discovered, connect via BLE\n if (!address && this.discoveredBleDevices.length > 0) {\n console.log('[Web] No IP, using discovered BLE device...');\n return await this._connectBle(this.discoveredBleDevices[0].id);\n }\n\n if (!address) {\n // No address and no BLE devices - try to scan BLE\n if (this._isBleSupported()) {\n console.log('[Web] No address, scanning BLE...');\n const scanResult = await this._scanBlePrinters();\n if (scanResult.success && scanResult.printers.length > 0) {\n return await this._connectBle(scanResult.printers[0].address);\n }\n }\n\n return {\n success: false,\n connected: false,\n error: 'Printer address (IP) not provided',\n };\n }\n\n // TCP/IP connection via printer-server\n const result = await this._fetch('/connect', {\n method: 'POST',\n body: JSON.stringify({ ip: address }),\n });\n\n if (result.success) {\n this.connectedPrinter = {\n ip: address,\n name: result.printer?.name || `Zebra @ ${address}`,\n type: 'network',\n };\n\n // Save to localStorage for quick reconnect\n this._saveToStorage(this.connectedPrinter);\n\n return {\n success: true,\n connected: true,\n address,\n type: 'network',\n message: 'Connected to printer',\n };\n }\n\n // If TCP connection failed and BLE is supported, offer BLE as fallback\n if (this._isBleSupported()) {\n console.log('[Web] TCP failed, trying BLE...');\n return await this._connectBle(address);\n }\n\n return {\n success: false,\n connected: false,\n error: result.error || 'Connection failed',\n };\n }\n\n /**\n * Connect to printer by MAC address (web - redirect to IP)\n * @param {ConnectOptions} options - Connection parameters\n * @returns {Promise<ConnectResult>} Connection result\n */\n async connectByAddress(options) {\n console.warn('ZebraPrinter Web: connectByAddress - use IP address on web');\n return await this.connect(options);\n }\n\n /**\n * Check device by address\n * @param {ConnectOptions} options - Parameters with address\n * @returns {Promise<ConnectResult>} Reachability info\n */\n async checkDeviceByAddress(options) {\n const { address } = options || {};\n\n if (!address) {\n return {\n success: false,\n error: 'Address not provided',\n };\n }\n\n const result = await this._fetch('/check', {\n method: 'POST',\n body: JSON.stringify({ ip: address }),\n });\n\n return {\n success: true,\n reachable: result.reachable,\n address,\n };\n }\n\n /**\n * Disconnect from the printer\n * @param {{clearSaved?: boolean}} [options] - Options for disconnect\n * @returns {Promise<DisconnectResult>} Disconnect result\n */\n async disconnect(options = {}) {\n // Disconnect BLE if connected\n if (this.connectedPrinter?.type === 'bluetooth') {\n this._disconnectBle();\n }\n\n // Optionally clear saved printer\n if (options.clearSaved) {\n this._saveToStorage(null);\n }\n\n this.connectedPrinter = null;\n await Promise.resolve();\n return {\n success: true,\n connected: false,\n };\n }\n\n /**\n * Get device network info (web not supported directly)\n * @returns {Promise<{supported: boolean, type: string, error?: string, ip?: string, ssid?: string}>} Network info proxied via printer-server if available\n */\n async getNetworkInfo() {\n const serviceOk = await this._checkService();\n if (!serviceOk) {\n return {\n supported: false,\n type: 'unknown',\n error: 'Printer service not available for network info',\n };\n }\n\n const result = await this._fetch('/network-info', { method: 'GET' });\n\n if (result?.success) {\n return {\n supported: true,\n type: result.type || 'unknown',\n ip: result.ip,\n ssid: result.ssid,\n };\n }\n\n return {\n supported: false,\n type: 'unknown',\n error: result?.error || 'Network info not available',\n };\n }\n\n // ═══════════════════════════════════════════════════════════════════════════\n // DEV HELPER METHODS\n // ═══════════════════════════════════════════════════════════════════════════\n\n /**\n * Get saved printer from localStorage\n * @returns {Object|null} Saved printer settings\n */\n getSavedPrinter() {\n return this._loadFromStorage();\n }\n\n /**\n * Try to auto-connect to saved printer\n * @returns {Promise<ConnectResult>} Connection result\n */\n async autoConnect() {\n const savedPrinter = this._loadFromStorage();\n\n if (!savedPrinter) {\n return {\n success: false,\n connected: false,\n error: 'No saved printer found',\n };\n }\n\n console.log('[AutoConnect] Trying:', savedPrinter.name);\n\n // For BLE printers, need to re-scan and connect\n if (savedPrinter.type === 'bluetooth') {\n return await this.connect({\n type: 'bluetooth',\n address: savedPrinter.address,\n });\n }\n\n // For TCP/IP printers, check if reachable first\n if (savedPrinter.ip) {\n const check = await this._fetch('/check', {\n method: 'POST',\n body: JSON.stringify({ ip: savedPrinter.ip }),\n });\n\n if (check.reachable) {\n this.connectedPrinter = savedPrinter;\n return {\n success: true,\n connected: true,\n address: savedPrinter.ip,\n type: 'network',\n message: 'Auto-connected to saved printer',\n fromCache: true,\n };\n }\n }\n\n return {\n success: false,\n connected: false,\n error: 'Saved printer not reachable',\n };\n }\n\n /**\n * Show PWA-style printer picker dialog\n * Creates a native-feeling modal for printer selection\n * @param {{title?: string, scanOnOpen?: boolean}} [options] - Dialog options\n * @returns {Promise<{success: boolean, printer?: Object, cancelled?: boolean}>} Selected printer or cancellation\n */\n async showPrinterPicker(options = {}) {\n const { title = 'Select Printer', scanOnOpen = true } = options;\n\n const { promise, resolve } = Promise.withResolvers();\n\n // Create modal container\n const overlay = document.createElement('div');\n overlay.id = 'zebra-printer-picker';\n overlay.innerHTML = this._getPickerHTML(title);\n document.body.append(overlay);\n\n // Store state for this picker instance\n const pickerState = {\n printers: [],\n resolve,\n cleanup: () => overlay.remove(),\n };\n\n // Setup event handlers\n this._setupPickerEvents(overlay, pickerState);\n\n // Auto-scan if requested\n if (scanOnOpen) {\n await this._updatePickerPrinters(overlay, {});\n }\n\n return promise;\n }\n\n /**\n * Get picker HTML template\n * @private\n * @param {string} title - Dialog title\n * @returns {string} HTML string\n */\n _getPickerHTML(title) {\n const bleButton = this._isBleSupported()\n ? '<button class=\"zpp-btn zpp-btn-ble\" data-action=\"ble\">BLE</button>'\n : '';\n\n return `\n <style>\n #zebra-printer-picker {\n position: fixed;\n inset: 0;\n z-index: 999999;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(4px);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n }\n .zpp-modal {\n background: white;\n border-radius: 16px;\n width: 90%;\n max-width: 400px;\n max-height: 80vh;\n overflow: hidden;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);\n animation: zpp-slideUp 0.3s ease-out;\n }\n @keyframes zpp-slideUp {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .zpp-header {\n padding: 20px;\n border-bottom: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .zpp-header h2 { margin: 0; font-size: 18px; font-weight: 600; color: #111827; }\n .zpp-close { background: none; border: none; padding: 8px; cursor: pointer; border-radius: 8px; color: #6b7280; font-size: 18px; }\n .zpp-close:hover { background: #f3f4f6; }\n .zpp-content { padding: 16px; max-height: 400px; overflow-y: auto; }\n .zpp-loading { text-align: center; padding: 40px 20px; color: #6b7280; }\n .zpp-spinner {\n width: 40px; height: 40px;\n border: 3px solid #e5e7eb; border-top-color: #3b82f6;\n border-radius: 50%; animation: zpp-spin 1s linear infinite;\n margin: 0 auto 16px;\n }\n @keyframes zpp-spin { to { transform: rotate(360deg); } }\n .zpp-list { list-style: none; margin: 0; padding: 0; }\n .zpp-item {\n display: flex; align-items: center; padding: 16px;\n border: 1px solid #e5e7eb; border-radius: 12px;\n margin-bottom: 8px; cursor: pointer; transition: all 0.15s ease;\n }\n .zpp-item:hover { border-color: #3b82f6; background: #eff6ff; }\n .zpp-item.saved { border-color: #10b981; background: #ecfdf5; }\n .zpp-icon {\n width: 40px; height: 40px; background: #f3f4f6; border-radius: 10px;\n display: flex; align-items: center; justify-content: center;\n margin-right: 12px; font-size: 20px;\n }\n .zpp-info { flex: 1; }\n .zpp-name { font-weight: 500; color: #111827; margin-bottom: 2px; }\n .zpp-addr { font-size: 13px; color: #6b7280; }\n .zpp-badge { font-size: 11px; padding: 2px 8px; border-radius: 9999px; background: #10b981; color: white; margin-left: 8px; }\n .zpp-empty { text-align: center; padding: 40px 20px; color: #6b7280; }\n .zpp-actions { padding: 16px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; }\n .zpp-btn {\n flex: 1; padding: 12px 16px; border-radius: 10px;\n font-size: 14px; font-weight: 500; cursor: pointer;\n border: none; transition: all 0.15s ease;\n }\n .zpp-btn-secondary { background: #f3f4f6; color: #374151; }\n .zpp-btn-secondary:hover { background: #e5e7eb; }\n .zpp-btn-primary { background: #3b82f6; color: white; }\n .zpp-btn-primary:hover { background: #2563eb; }\n .zpp-btn-ble { background: #8b5cf6; color: white; }\n .zpp-btn-ble:hover { background: #7c3aed; }\n </style>\n <div class=\"zpp-modal\">\n <div class=\"zpp-header\">\n <h2>${title}</h2>\n <button class=\"zpp-close\" data-action=\"close\">✕</button>\n </div>\n <div class=\"zpp-content\">\n <div class=\"zpp-loading\">\n <div class=\"zpp-spinner\"></div>\n <div>Searching for printers...</div>\n </div>\n </div>\n <div class=\"zpp-actions\">\n <button class=\"zpp-btn zpp-btn-secondary\" data-action=\"cancel\">Cancel</button>\n <button class=\"zpp-btn zpp-btn-primary\" data-action=\"rescan\">Rescan</button>\n ${bleButton}\n </div>\n </div>\n `;\n }\n\n /**\n * Setup picker event handlers\n * @private\n * @param {HTMLElement} overlay - Picker overlay element\n * @param {Object} state - Picker state object\n */\n _setupPickerEvents(overlay, state) {\n // Handle button clicks\n overlay.addEventListener('click', async (e) => {\n const action = e.target.dataset?.action;\n\n if (action === 'close' || action === 'cancel') {\n state.cleanup();\n state.resolve({ success: false, cancelled: true });\n return;\n }\n\n if (action === 'rescan') {\n await this._updatePickerPrinters(overlay, { skipCache: true });\n return;\n }\n\n if (action === 'ble') {\n await this._updatePickerPrinters(overlay, { useBle: true });\n return;\n }\n\n // Check if clicked on printer item\n const item = e.target.closest('.zpp-item');\n if (item) {\n const printer = {\n address: item.dataset.address,\n type: item.dataset.type,\n name: item.dataset.name,\n };\n\n state.cleanup();\n\n // Auto-connect to selected printer\n const connectResult = await this.connect({\n address: printer.address,\n type: printer.type,\n });\n\n state.resolve({\n success: connectResult.success,\n printer: connectResult.success ? printer : undefined,\n error: connectResult.error,\n });\n }\n });\n\n // Close on overlay click (outside modal)\n overlay.addEventListener('click', (e) => {\n if (e.target === overlay) {\n state.cleanup();\n state.resolve({ success: false, cancelled: true });\n }\n });\n }\n\n /**\n * Update picker with scanned printers\n * @private\n * @param {HTMLElement} overlay - Picker overlay element\n * @param {Object} options - Scan options\n */\n async _updatePickerPrinters(overlay, options) {\n const content = overlay.querySelector('.zpp-content');\n const loadingMsg = options.useBle\n ? 'Scanning for Bluetooth printers...'\n : 'Searching for printers...';\n\n content.innerHTML = `\n <div class=\"zpp-loading\">\n <div class=\"zpp-spinner\"></div>\n <div>${loadingMsg}</div>\n </div>\n `;\n\n const result = await this.scanForPrinters(options);\n const printers = result.printers || [];\n\n if (printers.length === 0) {\n content.innerHTML = `\n <div class=\"zpp-empty\">\n <div style=\"font-size: 32px; margin-bottom: 16px; opacity: 0.5;\">⎙</div>\n <div>No printers found</div>\n <div style=\"font-size: 13px; margin-top: 8px;\">Make sure the printer is on and connected to the network</div>\n </div>\n `;\n return;\n }\n\n const savedPrinter = this._loadFromStorage();\n let html = '<ul class=\"zpp-list\">';\n\n for (const p of printers) {\n const isSaved =\n savedPrinter?.ip === p.address || savedPrinter?.address === p.address;\n const icon = p.type === 'bluetooth' ? 'BT' : 'IP';\n const typeLabel = p.type === 'bluetooth' ? 'Bluetooth' : 'Network';\n const badge = p.paired ? '<span class=\"zpp-badge\">Saved</span>' : '';\n\n html += `\n <li class=\"zpp-item ${isSaved ? 'saved' : ''}\" \n data-address=\"${p.address}\" \n data-type=\"${p.type}\" \n data-name=\"${p.name}\">\n <div class=\"zpp-icon\">${icon}</div>\n <div class=\"zpp-info\">\n <div class=\"zpp-name\">${p.name}${badge}</div>\n <div class=\"zpp-addr\">${p.address} • ${typeLabel}</div>\n </div>\n </li>\n `;\n }\n\n html += '</ul>';\n content.innerHTML = html;\n }\n}\n","import { registerPlugin } from '@capacitor/core';\n\nimport { ZebraPrinterWeb } from './web';\n\nconst ZebraPrinter = registerPlugin('ZebraPrinter', {\n web: () => new ZebraPrinterWeb(),\n // iOS and Android plugins will be auto-discovered via the Capacitor config\n});\n\nexport { ZebraPrinter };\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,QAAQ,GAAG,cAAc;;AAE/B;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,GAAG,EAAE,CAAC;AACrD,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC;AACtC,uBAAuB,EAAE,CAAC,CAAC,IAAI,CAAC;AAChC,uBAAuB,EAAE,CAAC,CAAC,IAAI,CAAC;AAChC,gCAAgC,EAAE,IAAI,CAAC;AACvC;AACA,kCAAkC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;AACnD,kCAAkC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC;AAC7D;AACA;AACA,MAAM,CAAC;AACP,IAAI;;AAEJ,IAAI,IAAI,IAAI,OAAO;AACnB,IAAI,OAAO,CAAC,SAAS,GAAG,IAAI;AAC5B,EAAE;AACF;;ACpwCK,MAAC,YAAY,GAAG,cAAc,CAAC,cAAc,EAAE;AACpD,EAAE,GAAG,EAAE,MAAM,IAAI,eAAe,EAAE;AAClC;AACA,CAAC;;;;"}
1
+ {"version":3,"file":"plugin.js","names":["createConsola"],"sources":["../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/core.mjs","../../node_modules/.bun/consola@3.4.2/node_modules/consola/dist/browser.mjs","../../node_modules/.bun/@nitra+consola@2.3.0/node_modules/@nitra/consola/src/browser.js","../src/web.js","../src/index.js"],"sourcesContent":["const LogLevels = {\n silent: Number.NEGATIVE_INFINITY,\n fatal: 0,\n error: 0,\n warn: 1,\n log: 2,\n info: 3,\n success: 3,\n fail: 3,\n ready: 3,\n start: 3,\n box: 3,\n debug: 4,\n trace: 5,\n verbose: Number.POSITIVE_INFINITY\n};\nconst LogTypes = {\n // Silent\n silent: {\n level: -1\n },\n // Level 0\n fatal: {\n level: LogLevels.fatal\n },\n error: {\n level: LogLevels.error\n },\n // Level 1\n warn: {\n level: LogLevels.warn\n },\n // Level 2\n log: {\n level: LogLevels.log\n },\n // Level 3\n info: {\n level: LogLevels.info\n },\n success: {\n level: LogLevels.success\n },\n fail: {\n level: LogLevels.fail\n },\n ready: {\n level: LogLevels.info\n },\n start: {\n level: LogLevels.info\n },\n box: {\n level: LogLevels.info\n },\n // Level 4\n debug: {\n level: LogLevels.debug\n },\n // Level 5\n trace: {\n level: LogLevels.trace\n },\n // Verbose\n verbose: {\n level: LogLevels.verbose\n }\n};\n\nfunction isPlainObject$1(value) {\n if (value === null || typeof value !== \"object\") {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {\n return false;\n }\n if (Symbol.iterator in value) {\n return false;\n }\n if (Symbol.toStringTag in value) {\n return Object.prototype.toString.call(value) === \"[object Module]\";\n }\n return true;\n}\n\nfunction _defu(baseObject, defaults, namespace = \".\", merger) {\n if (!isPlainObject$1(defaults)) {\n return _defu(baseObject, {}, namespace, merger);\n }\n const object = Object.assign({}, defaults);\n for (const key in baseObject) {\n if (key === \"__proto__\" || key === \"constructor\") {\n continue;\n }\n const value = baseObject[key];\n if (value === null || value === void 0) {\n continue;\n }\n if (merger && merger(object, key, value, namespace)) {\n continue;\n }\n if (Array.isArray(value) && Array.isArray(object[key])) {\n object[key] = [...value, ...object[key]];\n } else if (isPlainObject$1(value) && isPlainObject$1(object[key])) {\n object[key] = _defu(\n value,\n object[key],\n (namespace ? `${namespace}.` : \"\") + key.toString(),\n merger\n );\n } else {\n object[key] = value;\n }\n }\n return object;\n}\nfunction createDefu(merger) {\n return (...arguments_) => (\n // eslint-disable-next-line unicorn/no-array-reduce\n arguments_.reduce((p, c) => _defu(p, c, \"\", merger), {})\n );\n}\nconst defu = createDefu();\n\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n}\nfunction isLogObj(arg) {\n if (!isPlainObject(arg)) {\n return false;\n }\n if (!arg.message && !arg.args) {\n return false;\n }\n if (arg.stack) {\n return false;\n }\n return true;\n}\n\nlet paused = false;\nconst queue = [];\nclass Consola {\n options;\n _lastLog;\n _mockFn;\n /**\n * Creates an instance of Consola with specified options or defaults.\n *\n * @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.\n */\n constructor(options = {}) {\n const types = options.types || LogTypes;\n this.options = defu(\n {\n ...options,\n defaults: { ...options.defaults },\n level: _normalizeLogLevel(options.level, types),\n reporters: [...options.reporters || []]\n },\n {\n types: LogTypes,\n throttle: 1e3,\n throttleMin: 5,\n formatOptions: {\n date: true,\n colors: false,\n compact: true\n }\n }\n );\n for (const type in types) {\n const defaults = {\n type,\n ...this.options.defaults,\n ...types[type]\n };\n this[type] = this._wrapLogFn(defaults);\n this[type].raw = this._wrapLogFn(\n defaults,\n true\n );\n }\n if (this.options.mockFn) {\n this.mockTypes();\n }\n this._lastLog = {};\n }\n /**\n * Gets the current log level of the Consola instance.\n *\n * @returns {number} The current log level.\n */\n get level() {\n return this.options.level;\n }\n /**\n * Sets the minimum log level that will be output by the instance.\n *\n * @param {number} level - The new log level to set.\n */\n set level(level) {\n this.options.level = _normalizeLogLevel(\n level,\n this.options.types,\n this.options.level\n );\n }\n /**\n * Displays a prompt to the user and returns the response.\n * Throw an error if `prompt` is not supported by the current configuration.\n *\n * @template T\n * @param {string} message - The message to display in the prompt.\n * @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.\n * @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.\n */\n prompt(message, opts) {\n if (!this.options.prompt) {\n throw new Error(\"prompt is not supported!\");\n }\n return this.options.prompt(message, opts);\n }\n /**\n * Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.\n *\n * @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.\n * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n */\n create(options) {\n const instance = new Consola({\n ...this.options,\n ...options\n });\n if (this._mockFn) {\n instance.mockTypes(this._mockFn);\n }\n return instance;\n }\n /**\n * Creates a new Consola instance with the specified default log object properties.\n *\n * @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.\n * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n */\n withDefaults(defaults) {\n return this.create({\n ...this.options,\n defaults: {\n ...this.options.defaults,\n ...defaults\n }\n });\n }\n /**\n * Creates a new Consola instance with a specified tag, which will be included in every log.\n *\n * @param {string} tag - The tag to include in each log of the new instance.\n * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n */\n withTag(tag) {\n return this.withDefaults({\n tag: this.options.defaults.tag ? this.options.defaults.tag + \":\" + tag : tag\n });\n }\n /**\n * Adds a custom reporter to the Consola instance.\n * Reporters will be called for each log message, depending on their implementation and log level.\n *\n * @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.\n * @returns {Consola} The current Consola instance.\n */\n addReporter(reporter) {\n this.options.reporters.push(reporter);\n return this;\n }\n /**\n * Removes a custom reporter from the Consola instance.\n * If no reporter is specified, all reporters will be removed.\n *\n * @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.\n * @returns {Consola} The current Consola instance.\n */\n removeReporter(reporter) {\n if (reporter) {\n const i = this.options.reporters.indexOf(reporter);\n if (i !== -1) {\n return this.options.reporters.splice(i, 1);\n }\n } else {\n this.options.reporters.splice(0);\n }\n return this;\n }\n /**\n * Replaces all reporters of the Consola instance with the specified array of reporters.\n *\n * @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.\n * @returns {Consola} The current Consola instance.\n */\n setReporters(reporters) {\n this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];\n return this;\n }\n wrapAll() {\n this.wrapConsole();\n this.wrapStd();\n }\n restoreAll() {\n this.restoreConsole();\n this.restoreStd();\n }\n /**\n * Overrides console methods with Consola logging methods for consistent logging.\n */\n wrapConsole() {\n for (const type in this.options.types) {\n if (!console[\"__\" + type]) {\n console[\"__\" + type] = console[type];\n }\n console[type] = this[type].raw;\n }\n }\n /**\n * Restores the original console methods, removing Consola overrides.\n */\n restoreConsole() {\n for (const type in this.options.types) {\n if (console[\"__\" + type]) {\n console[type] = console[\"__\" + type];\n delete console[\"__\" + type];\n }\n }\n }\n /**\n * Overrides standard output and error streams to redirect them through Consola.\n */\n wrapStd() {\n this._wrapStream(this.options.stdout, \"log\");\n this._wrapStream(this.options.stderr, \"log\");\n }\n _wrapStream(stream, type) {\n if (!stream) {\n return;\n }\n if (!stream.__write) {\n stream.__write = stream.write;\n }\n stream.write = (data) => {\n this[type].raw(String(data).trim());\n };\n }\n /**\n * Restores the original standard output and error streams, removing the Consola redirection.\n */\n restoreStd() {\n this._restoreStream(this.options.stdout);\n this._restoreStream(this.options.stderr);\n }\n _restoreStream(stream) {\n if (!stream) {\n return;\n }\n if (stream.__write) {\n stream.write = stream.__write;\n delete stream.__write;\n }\n }\n /**\n * Pauses logging, queues incoming logs until resumed.\n */\n pauseLogs() {\n paused = true;\n }\n /**\n * Resumes logging, processing any queued logs.\n */\n resumeLogs() {\n paused = false;\n const _queue = queue.splice(0);\n for (const item of _queue) {\n item[0]._logFn(item[1], item[2]);\n }\n }\n /**\n * Replaces logging methods with mocks if a mock function is provided.\n *\n * @param {ConsolaOptions[\"mockFn\"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions[\"mockFn\"]}.\n */\n mockTypes(mockFn) {\n const _mockFn = mockFn || this.options.mockFn;\n this._mockFn = _mockFn;\n if (typeof _mockFn !== \"function\") {\n return;\n }\n for (const type in this.options.types) {\n this[type] = _mockFn(type, this.options.types[type]) || this[type];\n this[type].raw = this[type];\n }\n }\n _wrapLogFn(defaults, isRaw) {\n return (...args) => {\n if (paused) {\n queue.push([this, defaults, args, isRaw]);\n return;\n }\n return this._logFn(defaults, args, isRaw);\n };\n }\n _logFn(defaults, args, isRaw) {\n if ((defaults.level || 0) > this.level) {\n return false;\n }\n const logObj = {\n date: /* @__PURE__ */ new Date(),\n args: [],\n ...defaults,\n level: _normalizeLogLevel(defaults.level, this.options.types)\n };\n if (!isRaw && args.length === 1 && isLogObj(args[0])) {\n Object.assign(logObj, args[0]);\n } else {\n logObj.args = [...args];\n }\n if (logObj.message) {\n logObj.args.unshift(logObj.message);\n delete logObj.message;\n }\n if (logObj.additional) {\n if (!Array.isArray(logObj.additional)) {\n logObj.additional = logObj.additional.split(\"\\n\");\n }\n logObj.args.push(\"\\n\" + logObj.additional.join(\"\\n\"));\n delete logObj.additional;\n }\n logObj.type = typeof logObj.type === \"string\" ? logObj.type.toLowerCase() : \"log\";\n logObj.tag = typeof logObj.tag === \"string\" ? logObj.tag : \"\";\n const resolveLog = (newLog = false) => {\n const repeated = (this._lastLog.count || 0) - this.options.throttleMin;\n if (this._lastLog.object && repeated > 0) {\n const args2 = [...this._lastLog.object.args];\n if (repeated > 1) {\n args2.push(`(repeated ${repeated} times)`);\n }\n this._log({ ...this._lastLog.object, args: args2 });\n this._lastLog.count = 1;\n }\n if (newLog) {\n this._lastLog.object = logObj;\n this._log(logObj);\n }\n };\n clearTimeout(this._lastLog.timeout);\n const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;\n this._lastLog.time = logObj.date;\n if (diffTime < this.options.throttle) {\n try {\n const serializedLog = JSON.stringify([\n logObj.type,\n logObj.tag,\n logObj.args\n ]);\n const isSameLog = this._lastLog.serialized === serializedLog;\n this._lastLog.serialized = serializedLog;\n if (isSameLog) {\n this._lastLog.count = (this._lastLog.count || 0) + 1;\n if (this._lastLog.count > this.options.throttleMin) {\n this._lastLog.timeout = setTimeout(\n resolveLog,\n this.options.throttle\n );\n return;\n }\n }\n } catch {\n }\n }\n resolveLog(true);\n }\n _log(logObj) {\n for (const reporter of this.options.reporters) {\n reporter.log(logObj, {\n options: this.options\n });\n }\n }\n}\nfunction _normalizeLogLevel(input, types = {}, defaultLevel = 3) {\n if (input === void 0) {\n return defaultLevel;\n }\n if (typeof input === \"number\") {\n return input;\n }\n if (types[input] && types[input].level !== void 0) {\n return types[input].level;\n }\n return defaultLevel;\n}\nConsola.prototype.add = Consola.prototype.addReporter;\nConsola.prototype.remove = Consola.prototype.removeReporter;\nConsola.prototype.clear = Consola.prototype.removeReporter;\nConsola.prototype.withScope = Consola.prototype.withTag;\nConsola.prototype.mock = Consola.prototype.mockTypes;\nConsola.prototype.pause = Consola.prototype.pauseLogs;\nConsola.prototype.resume = Consola.prototype.resumeLogs;\nfunction createConsola(options = {}) {\n return new Consola(options);\n}\n\nexport { Consola, LogLevels, LogTypes, createConsola };\n","import { createConsola as createConsola$1 } from './core.mjs';\nexport { Consola, LogLevels, LogTypes } from './core.mjs';\n\nclass BrowserReporter {\n options;\n defaultColor;\n levelColorMap;\n typeColorMap;\n constructor(options) {\n this.options = { ...options };\n this.defaultColor = \"#7f8c8d\";\n this.levelColorMap = {\n 0: \"#c0392b\",\n // Red\n 1: \"#f39c12\",\n // Yellow\n 3: \"#00BCD4\"\n // Cyan\n };\n this.typeColorMap = {\n success: \"#2ecc71\"\n // Green\n };\n }\n _getLogFn(level) {\n if (level < 1) {\n return console.__error || console.error;\n }\n if (level === 1) {\n return console.__warn || console.warn;\n }\n return console.__log || console.log;\n }\n log(logObj) {\n const consoleLogFn = this._getLogFn(logObj.level);\n const type = logObj.type === \"log\" ? \"\" : logObj.type;\n const tag = logObj.tag || \"\";\n const color = this.typeColorMap[logObj.type] || this.levelColorMap[logObj.level] || this.defaultColor;\n const style = `\n background: ${color};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `;\n const badge = `%c${[tag, type].filter(Boolean).join(\":\")}`;\n if (typeof logObj.args[0] === \"string\") {\n consoleLogFn(\n `${badge}%c ${logObj.args[0]}`,\n style,\n // Empty string as style resets to default console style\n \"\",\n ...logObj.args.slice(1)\n );\n } else {\n consoleLogFn(badge, style, ...logObj.args);\n }\n }\n}\n\nfunction createConsola(options = {}) {\n const consola2 = createConsola$1({\n reporters: options.reporters || [new BrowserReporter({})],\n prompt(message, options2 = {}) {\n if (options2.type === \"confirm\") {\n return Promise.resolve(confirm(message));\n }\n return Promise.resolve(prompt(message));\n },\n ...options\n });\n return consola2;\n}\nconst consola = createConsola();\n\nexport { consola, createConsola, consola as default };\n","/* global location, process, import */\nimport { consola } from 'consola'\n\nconst options = {}\n\n// Vite Debug mode\nif (typeof __CONSOLA_LEVEL_DEBUG__ !== 'undefined') {\n options.level = 4\n} else if (typeof location !== 'undefined' && location.protocol === 'http:') {\n options.level = 4\n} else if (typeof process !== 'undefined' && (process.env.DEV || process.env.CONSOLA_LEVEL_DEBUG)) {\n // Quasar Debug mode\n options.level = 4\n}\n\n// Canvas Popup Reporter для дублювання повідомлень у вигляді спливаючих вікон\nclass CanvasPopupReporter {\n // Константи\n static PADDING = 12\n static LABEL_PADDING = 8\n static LINE_HEIGHT = 20\n static BUTTON_SIZE = 18\n static BUTTON_PADDING = 6\n static MIN_HEIGHT = 36\n static MAX_MESSAGE_LENGTH = 500\n static FONT_TEXT = '13px -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'\n static FONT_MONO = '11px monospace'\n\n constructor() {\n this.canvas = null\n this.ctx = null\n this.messages = []\n this.messageId = 0\n this.initCanvas()\n }\n\n initCanvas() {\n if (typeof document === 'undefined') return\n\n // Чекаємо, поки DOM буде готовий\n const init = () => {\n if (!document.body) {\n setTimeout(init, 10)\n return\n }\n\n // Створюємо canvas, якщо його ще немає\n let canvas = document.querySelector('#consola-popup-canvas')\n if (!canvas) {\n canvas = document.createElement('canvas')\n canvas.id = 'consola-popup-canvas'\n canvas.style.position = 'fixed'\n canvas.style.top = '0'\n canvas.style.left = '0'\n canvas.style.width = '100%'\n canvas.style.height = '100%'\n canvas.style.pointerEvents = 'auto'\n canvas.style.zIndex = '999999'\n document.body.append(canvas)\n\n // Додаємо обробник кліків для кнопок закриття\n canvas.addEventListener('click', e => this.handleClick(e))\n }\n\n this.canvas = canvas\n this.resizeCanvas()\n window.addEventListener('resize', () => this.resizeCanvas())\n\n // Почати анімацію\n this.animate()\n }\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', init)\n } else {\n init()\n }\n }\n\n handleClick(event) {\n if (!this.canvas || !this.ctx) return\n\n const rect = this.canvas.getBoundingClientRect()\n const x = event.clientX - rect.left\n const y = event.clientY - rect.top\n\n // Перевіряємо клік по повідомленнях (знизу вгору)\n for (let i = this.messages.length - 1; i >= 0; i--) {\n const msg = this.messages[i]\n\n // Перевіряємо клік по лінку файлу\n if (msg.fileInfo && msg.fileLinkX && msg.fileLinkY && msg.fileLinkWidth) {\n const fileLinkHeight = 14\n if (\n x >= msg.fileLinkX - msg.fileLinkWidth &&\n x <= msg.fileLinkX &&\n y >= msg.fileLinkY &&\n y <= msg.fileLinkY + fileLinkHeight\n ) {\n // Виводимо інформацію про файл у консоль (для відкриття в DevTools)\n console.log(`%c${msg.fileInfo.file}:${msg.fileInfo.line}`, 'color: #1976D2; text-decoration: underline;')\n // Не видаляємо повідомлення при кліку на лінк\n return\n }\n }\n\n // Перевіряємо клік по кнопці закриття\n const buttonX = msg.x + (msg.width || 200) - CanvasPopupReporter.BUTTON_SIZE - CanvasPopupReporter.BUTTON_PADDING\n const buttonY = msg.y + CanvasPopupReporter.BUTTON_PADDING\n\n if (\n x >= buttonX &&\n x <= buttonX + CanvasPopupReporter.BUTTON_SIZE &&\n y >= buttonY &&\n y <= buttonY + CanvasPopupReporter.BUTTON_SIZE\n ) {\n // Видаляємо повідомлення\n const index = this.messages.findIndex(m => m.id === msg.id)\n if (index !== -1) {\n this.messages.splice(index, 1)\n }\n return\n }\n }\n }\n\n resizeCanvas() {\n if (!this.canvas) return\n this.canvas.width = window.innerWidth\n this.canvas.height = window.innerHeight\n this.ctx = this.canvas.getContext('2d')\n }\n\n getColorForType(type) {\n const colors = {\n trace: '#9E9E9E',\n debug: '#607D8B',\n info: '#2196F3',\n log: '#2196F3',\n warn: '#FFC107',\n error: '#D32F2F',\n fatal: '#7B1FA2',\n success: '#4CAF50',\n start: '#00BCD4',\n box: '#9E9E9E',\n ready: '#4CAF50',\n fail: '#D32F2F'\n }\n return colors[type] || colors.log || '#616161'\n }\n\n getTypeLabel(type) {\n return type || 'log'\n }\n\n getFileInfo() {\n try {\n const stack = new Error('Stack trace').stack\n if (!stack) return null\n\n const skipPatterns = ['CanvasPopupReporter', 'browser.js', 'consola', 'createLogger']\n const lines = stack.split('\\n').slice(4, 15)\n\n for (const line of lines) {\n const trimmed = line.trim()\n const shouldSkip = skipPatterns.some(pattern => trimmed.includes(pattern))\n\n if (!shouldSkip) {\n const match =\n trimmed.match(/\\(?([^()]+):(\\d+):(\\d+)\\)?/) || trimmed.match(/at\\s+[^(]*\\(?([^:]+):(\\d+):(\\d+)\\)?/)\n\n if (match) {\n let file = match[1].trim()\n const lineNum = match[2]\n\n // Очищаємо ім'я файлу\n if (file.includes('://')) {\n file = file.slice(file.indexOf('://') + 3).slice(file.indexOf('/'))\n }\n if (file.includes('/src/')) {\n file = file.slice(file.indexOf('/src/') + 5)\n }\n const queryIndex = file.indexOf('?')\n if (queryIndex > 0) file = file.slice(0, queryIndex)\n const hashIndex = file.indexOf('#')\n if (hashIndex > 0) file = file.slice(0, hashIndex)\n if (file.startsWith('/')) file = file.slice(1)\n\n if (file && lineNum) {\n return { file, line: parseInt(lineNum, 10), column: parseInt(match[3], 10), fullPath: match[0] }\n }\n }\n }\n }\n } catch {\n // Ігноруємо помилки\n }\n return null\n }\n\n formatMessage(logObj) {\n const args = logObj.args || []\n if (args.length === 0) return ''\n\n const message = args\n .map(arg => {\n if (arg instanceof Error) {\n let msg = `${arg.name || 'Error'}: ${arg.message || ''}`\n if (arg.stack && arg.stack !== arg.message) {\n msg += '\\n' + arg.stack.split('\\n').slice(0, 3).join('\\n')\n }\n return msg\n }\n if (arg === null) return 'null'\n if (arg === undefined) return 'undefined'\n if (typeof arg === 'object') {\n try {\n const str = arg.toString?.()\n if (str && str !== '[object Object]') return str\n return JSON.stringify(arg, null, 2)\n } catch {\n return String(arg)\n }\n }\n return String(arg)\n })\n .join(' ')\n\n return message.length > CanvasPopupReporter.MAX_MESSAGE_LENGTH\n ? message.slice(0, CanvasPopupReporter.MAX_MESSAGE_LENGTH) + '...'\n : message\n }\n\n calculateMessageHeight(message, maxWidth) {\n if (!this.ctx) return CanvasPopupReporter.MIN_HEIGHT\n\n this.ctx.save()\n this.ctx.font = CanvasPopupReporter.FONT_TEXT\n\n const words = message.split(' ')\n const lines = []\n let currentLine = ''\n\n for (const word of words) {\n const testLine = currentLine ? `${currentLine} ${word}` : word\n if (this.ctx.measureText(testLine).width > maxWidth && currentLine) {\n lines.push(currentLine)\n currentLine = word\n } else {\n currentLine = testLine\n }\n }\n if (currentLine) lines.push(currentLine)\n\n this.ctx.restore()\n return Math.max(\n CanvasPopupReporter.MIN_HEIGHT,\n lines.length * CanvasPopupReporter.LINE_HEIGHT + CanvasPopupReporter.PADDING * 2\n )\n }\n\n log(logObj) {\n if (!this.canvas || !this.ctx) return\n\n const message = this.formatMessage(logObj)\n if (!message) return\n\n // Використовуємо type замість level для правильного визначення типу повідомлення\n const type = logObj.type || 'log'\n const color = this.getColorForType(type)\n const typeLabel = this.getTypeLabel(type)\n const id = this.messageId++\n\n // Отримуємо інформацію про файл та рядок\n const fileInfo = this.getFileInfo()\n\n // Розраховуємо висоту повідомлення\n // Враховуємо ширину префікса типу\n this.ctx.save()\n this.ctx.font = CanvasPopupReporter.FONT_MONO\n const labelWidth = this.ctx.measureText(typeLabel).width + 16\n\n // Розраховуємо ширину для файлу/рядка\n let fileLinkWidth = 0\n if (fileInfo) {\n const fileLinkText = `${fileInfo.file}:${fileInfo.line}`\n fileLinkWidth = this.ctx.measureText(fileLinkText).width + 12\n }\n this.ctx.restore()\n\n const maxWidth = this.canvas.width - 40\n const textMaxWidth =\n maxWidth -\n labelWidth -\n CanvasPopupReporter.PADDING * 2 -\n CanvasPopupReporter.BUTTON_SIZE -\n CanvasPopupReporter.BUTTON_PADDING -\n fileLinkWidth\n const boxHeight = this.calculateMessageHeight(message, textMaxWidth)\n\n this.messages.push({\n id,\n text: message,\n color,\n type,\n typeLabel,\n fileInfo,\n timestamp: Date.now(),\n y: this.canvas.height, // Починаємо знизу\n opacity: 1,\n x: 20,\n height: boxHeight,\n width: 0 // Буде встановлено під час малювання\n })\n }\n\n animate() {\n if (!this.canvas || !this.ctx) return\n\n // Очищаємо canvas\n this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)\n\n // Малюємо всі повідомлення знизу вгору\n let currentY = this.canvas.height - 20\n for (let i = this.messages.length - 1; i >= 0; i--) {\n const msg = this.messages[i]\n const msgHeight = msg.height || 60\n const targetY = currentY - msgHeight\n msg.y += (targetY - msg.y) * 0.1 // Плавна анімація\n\n // Оновлюємо поточну позицію для наступного повідомлення (вище)\n currentY = targetY - 10\n\n // Налаштування тексту\n this.ctx.save()\n this.ctx.globalAlpha = msg.opacity\n this.ctx.font = '13px -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'\n this.ctx.textBaseline = 'top'\n\n const padding = CanvasPopupReporter.PADDING\n const labelPadding = CanvasPopupReporter.LABEL_PADDING\n const maxWidth = this.canvas.width - 40\n const lineHeight = CanvasPopupReporter.LINE_HEIGHT\n\n // Розраховуємо ширину префікса типу\n this.ctx.font = CanvasPopupReporter.FONT_MONO\n const labelWidth = this.ctx.measureText(msg.typeLabel || 'log').width + labelPadding * 2\n\n // Оголошуємо розміри кнопки заздалегідь\n const buttonSize = CanvasPopupReporter.BUTTON_SIZE\n const buttonPadding = CanvasPopupReporter.BUTTON_PADDING\n\n // Розраховуємо ширину для файлу/рядка\n let fileLinkWidth = 0\n let fileLinkText = ''\n if (msg.fileInfo) {\n fileLinkText = `${msg.fileInfo.file}:${msg.fileInfo.line}`\n this.ctx.font = CanvasPopupReporter.FONT_MONO\n fileLinkWidth = this.ctx.measureText(fileLinkText).width + 12\n }\n\n // Оновлюємо висоту повідомлення, якщо потрібно\n this.ctx.font = CanvasPopupReporter.FONT_TEXT\n const textMaxWidthForHeight = maxWidth - labelWidth - padding * 2 - fileLinkWidth - buttonSize - buttonPadding\n const calculatedHeight = this.calculateMessageHeight(msg.text, textMaxWidthForHeight)\n if (msg.height !== calculatedHeight) {\n msg.height = calculatedHeight\n }\n\n // Розбиваємо текст на рядки\n const words = msg.text.split(' ')\n const lines = []\n let currentLine = ''\n const textMaxWidth = textMaxWidthForHeight\n\n for (const word of words) {\n const testLine = currentLine ? currentLine + ' ' + word : word\n const metrics = this.ctx.measureText(testLine)\n if (metrics.width > textMaxWidth && currentLine) {\n lines.push(currentLine)\n currentLine = word\n } else {\n currentLine = testLine\n }\n }\n if (currentLine) {\n lines.push(currentLine)\n }\n\n const maxTextWidth = lines.length > 0 ? Math.max(...lines.map(line => this.ctx.measureText(line).width)) : 0\n const boxWidth = Math.min(\n labelWidth + padding * 2 + maxTextWidth + fileLinkWidth + buttonSize + buttonPadding,\n maxWidth\n )\n const boxHeight = Math.max(msg.height || calculatedHeight, CanvasPopupReporter.MIN_HEIGHT)\n\n // Зберігаємо позицію файлу для обробки кліків\n msg.fileLinkX = msg.x + labelWidth + padding * 2 + maxTextWidth\n msg.fileLinkY = msg.y + padding\n msg.fileLinkWidth = fileLinkWidth\n\n // Зберігаємо ширину для обробки кліків\n msg.width = boxWidth\n\n // Малюємо фон (білий з тінню, як в консолі)\n this.ctx.fillStyle = '#ffffff'\n this.ctx.fillRect(msg.x, msg.y, boxWidth, boxHeight)\n\n // Тінь\n this.ctx.shadowColor = 'rgba(0, 0, 0, 0.1)'\n this.ctx.shadowBlur = 8\n this.ctx.shadowOffsetX = 0\n this.ctx.shadowOffsetY = 2\n this.ctx.fillRect(msg.x, msg.y, boxWidth, boxHeight)\n this.ctx.shadowBlur = 0\n this.ctx.shadowOffsetX = 0\n this.ctx.shadowOffsetY = 0\n\n // Тонка рамка\n this.ctx.strokeStyle = '#e0e0e0'\n this.ctx.lineWidth = 1\n this.ctx.strokeRect(msg.x, msg.y, boxWidth, boxHeight)\n\n // Малюємо кольоровий префікс типу (як в консолі)\n this.ctx.fillStyle = msg.color\n this.ctx.fillRect(msg.x, msg.y, labelWidth, boxHeight)\n\n // Текст префікса (lowercase, як в консолі)\n this.ctx.fillStyle = '#ffffff'\n this.ctx.font = CanvasPopupReporter.FONT_MONO\n this.ctx.fontWeight = 'bold'\n const labelTextY = msg.y + boxHeight / 2 - 6\n this.ctx.textAlign = 'center'\n this.ctx.fillText(msg.typeLabel, msg.x + labelWidth / 2, labelTextY)\n this.ctx.textAlign = 'left'\n\n // Малюємо текст повідомлення (чорний, як в консолі)\n this.ctx.fillStyle = '#212121'\n this.ctx.font = CanvasPopupReporter.FONT_TEXT\n const textStartX = msg.x + labelWidth + padding\n for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {\n this.ctx.fillText(lines[lineIndex], textStartX, msg.y + padding + lineIndex * lineHeight, maxTextWidth)\n }\n\n // Малюємо лінк файлу/рядка (справа, як в консолі)\n if (msg.fileInfo && fileLinkText) {\n this.ctx.fillStyle = '#1976D2' // Синій колір для лінку, як в консолі\n this.ctx.font = CanvasPopupReporter.FONT_MONO\n this.ctx.textAlign = 'right'\n const fileLinkX = msg.x + boxWidth - buttonSize - buttonPadding - 6\n const fileLinkY = msg.y + padding + 2\n this.ctx.fillText(fileLinkText, fileLinkX, fileLinkY)\n this.ctx.textAlign = 'left'\n\n // Підкреслення для лінку\n this.ctx.strokeStyle = '#1976D2'\n this.ctx.lineWidth = 1\n const textMetrics = this.ctx.measureText(fileLinkText)\n this.ctx.beginPath()\n this.ctx.moveTo(fileLinkX - textMetrics.width, fileLinkY + 11)\n this.ctx.lineTo(fileLinkX, fileLinkY + 11)\n this.ctx.stroke()\n }\n\n // Малюємо кнопку закриття (мінімалістична, як в консолі)\n const buttonX = msg.x + boxWidth - buttonSize - buttonPadding\n const buttonY = msg.y + buttonPadding\n\n // Hover ефект (якщо потрібно)\n // Фон кнопки при наведенні буде оброблятися через CSS або додаткову логіку\n\n // Хрестик на кнопці (сірий, мінімалістичний)\n this.ctx.strokeStyle = '#999999'\n this.ctx.lineWidth = 1.5\n this.ctx.lineCap = 'round'\n const crossPadding = 4\n this.ctx.beginPath()\n this.ctx.moveTo(buttonX + crossPadding, buttonY + crossPadding)\n this.ctx.lineTo(buttonX + buttonSize - crossPadding, buttonY + buttonSize - crossPadding)\n this.ctx.moveTo(buttonX + buttonSize - crossPadding, buttonY + crossPadding)\n this.ctx.lineTo(buttonX + crossPadding, buttonY + buttonSize - crossPadding)\n this.ctx.stroke()\n\n this.ctx.restore()\n }\n\n requestAnimationFrame(() => this.animate())\n }\n}\n\n// Перевіряємо змінну середовища VITE_CONSOLA_POPUP_DEBUG\nlet isPopupDebugEnabled = false\n\n// Vite замінює import.meta.env.VITE_* під час збірки\n// Використовуємо прямий доступ до import.meta.env, оскільки Vite обробляє це під час збірки\nif (typeof document !== 'undefined') {\n try {\n // Vite замінює цей код під час збірки\n // eslint-disable-next-line no-undef\n const envValue = import.meta.env?.VITE_CONSOLA_POPUP_DEBUG\n if (envValue !== undefined && envValue !== null && envValue !== '') {\n // Vite завжди повертає рядки для змінних середовища\n isPopupDebugEnabled = String(envValue).toLowerCase() === 'true' || envValue === true\n }\n } catch {\n // Ігноруємо помилки, якщо import.meta недоступний\n }\n}\n\nif (!isPopupDebugEnabled && typeof process !== 'undefined' && process.env) {\n const processValue = process.env.VITE_CONSOLA_POPUP_DEBUG\n if (processValue) {\n isPopupDebugEnabled = String(processValue).toLowerCase() === 'true'\n }\n}\n\n// Створюємо один екземпляр репортера, якщо потрібно\n// НЕ встановлюємо options.reporters, щоб стандартний BrowserReporter працював\n// Додамо наш репортер після створення екземпляра через addReporter\nlet canvasPopupReporter = null\nif (isPopupDebugEnabled && typeof document !== 'undefined') {\n canvasPopupReporter = new CanvasPopupReporter()\n}\n\nconst defaultConsola = consola.create(options)\n\n// Додаємо canvas репортер до default екземпляра, якщо потрібно (не замінює стандартний)\nif (isPopupDebugEnabled && typeof document !== 'undefined' && canvasPopupReporter) {\n defaultConsola.addReporter(canvasPopupReporter)\n}\n\nexport default defaultConsola\n\n// Експортуємо consola з нашими опціями, а не базовий\nexport { defaultConsola as consola }\n\n/**\n * pass import.meta.url\n * example: const consola = createLogger(import.meta.url)\n *\n * @param {String} _url - The import.meta.url or file URL to use for logger creation\n * @returns {Consola} A consola logger instance\n */\nexport const createLogger = _url => {\n return defaultConsola\n}\n","import { WebPlugin } from '@capacitor/core'\nimport { consola } from '@nitra/consola'\n\nexport class ZebraWeb extends WebPlugin {\n async print(zpl) {\n try {\n consola.debug('Запит на підключення до принтера...', 'info')\n\n // Запитуємо порт\n const port = await navigator.serial.requestPort()\n consola.debug(\"Порт вибрано, відкриваємо з'єднання...\", 'info')\n\n // Відкриваємо з'єднання з налаштуваннями для Zebra принтера\n await port.open({\n baudRate: 9600, // Можна спробувати 115200 якщо не працює\n dataBits: 8,\n parity: 'none',\n stopBits: 1,\n flowControl: 'none'\n })\n\n consola.debug(\"З'єднання відкрито!\", 'success')\n\n // Отримуємо writer для відправки даних\n const writer = port.writable.getWriter()\n\n // Оновлюємо стан\n isConnected.value = true\n consola.debug('Принтер готовий до друку', 'success')\n } catch (error) {\n consola.debug(`Помилка підключення: ${error.message}`, 'error')\n isConnected.value = false\n }\n\n console.consola.debug('print from web capacitor plugin', zpl)\n return true\n }\n}\n","import { registerPlugin } from '@capacitor/core'\n\nconst Zebra = registerPlugin('Zebra', {\n web: () => import('./web.js').then(m => new m.ZebraWeb())\n})\n\nexport { Zebra }\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqEA,SAAS,gBAAgB,OAAO;AAC9B,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;CAET,MAAM,YAAY,OAAO,eAAe,MAAM;AAC9C,KAAI,cAAc,QAAQ,cAAc,OAAO,aAAa,OAAO,eAAe,UAAU,KAAK,KAC/F,QAAO;AAET,KAAI,OAAO,YAAY,MACrB,QAAO;AAET,KAAI,OAAO,eAAe,MACxB,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM,KAAK;AAE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I,aACF,uBAAsB,OAAO,aAAa,CAAC,aAAa,KAAK;;CAO7D,sBAAsB;AAC1B,KAAI,uBAAuB,OAAO,aAAa,YAC7C,uBAAsB,IAAI,qBAAqB;CAG3C,iBAAiB,QAAQ,OAAO,QAAQ;AAG9C,KAAI,uBAAuB,OAAO,aAAa,eAAe,oBAC5D,gBAAe,YAAY,oBAAoB;;;;;;;;eC/gBT;CAE3B,WAAb,cAA8B,UAAU;EACtC,MAAM,MAAM,KAAK;AACf,OAAI;AACF,mBAAQ,MAAM,uCAAuC,OAAO;IAG5D,MAAM,OAAO,MAAM,UAAU,OAAO,aAAa;AACjD,mBAAQ,MAAM,0CAA0C,OAAO;AAG/D,UAAM,KAAK,KAAK;KACd,UAAU;KACV,UAAU;KACV,QAAQ;KACR,UAAU;KACV,aAAa;KACd,CAAC;AAEF,mBAAQ,MAAM,uBAAuB,UAAU;AAGhC,SAAK,SAAS,WAAW;AAGxC,gBAAY,QAAQ;AACpB,mBAAQ,MAAM,4BAA4B,UAAU;YAC7C,OAAO;AACd,mBAAQ,MAAM,wBAAwB,MAAM,WAAW,QAAQ;AAC/D,gBAAY,QAAQ;;AAGtB,WAAQ,QAAQ,MAAM,mCAAmC,IAAI;AAC7D,UAAO;;;;;;;ACjCX,MAAM,QAAQ,eAAe,SAAS,EACpC,mEAA8B,MAAK,MAAK,IAAI,EAAE,UAAU,CAAC,EAC1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import Foundation
2
+
3
+ @objc public class Zebra: NSObject {
4
+ @objc public func echo(_ value: String) -> String {
5
+ print(value)
6
+ return value
7
+ }
8
+ }
@@ -0,0 +1,23 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ /**
5
+ * Please read the Capacitor iOS Plugin Development Guide
6
+ * here: https://capacitorjs.com/docs/plugins/ios
7
+ */
8
+ @objc(ZebraPlugin)
9
+ public class ZebraPlugin: CAPPlugin, CAPBridgedPlugin {
10
+ public let identifier = "ZebraPlugin"
11
+ public let jsName = "Zebra"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "echo", returnType: CAPPluginReturnPromise)
14
+ ]
15
+ private let implementation = Zebra()
16
+
17
+ @objc func echo(_ call: CAPPluginCall) {
18
+ let value = call.getString("value") ?? ""
19
+ call.resolve([
20
+ "value": implementation.echo(value)
21
+ ])
22
+ }
23
+ }
@@ -0,0 +1,15 @@
1
+ import XCTest
2
+ @testable import ZebraPlugin
3
+
4
+ class ZebraTests: XCTestCase {
5
+ func testEcho() {
6
+ // This is an example of a functional test case for a plugin.
7
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
8
+
9
+ let implementation = Zebra()
10
+ let value = "Hello, World!"
11
+ let result = implementation.echo(value)
12
+
13
+ XCTAssertEqual(value, result)
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,73 +1,65 @@
1
1
  {
2
2
  "name": "@nitra/zebra",
3
- "version": "6.2.0",
4
- "description": "Nitra capacitor components",
5
- "main": "dist/plugin.js",
6
- "module": "dist/plugin.js",
7
- "type": "module",
8
- "exports": {
9
- ".": "./index.js",
10
- "./plugin": "./dist/plugin.js"
11
- },
12
- "files": [
13
- "dist/",
14
- "ios/",
15
- "android/",
16
- "NitraZebra.podspec",
17
- "README.md"
18
- ],
19
- "scripts": {
20
- "build": "yarn run clean && rollup -c rollup.config.mjs",
21
- "clean": "rimraf ./dist",
22
- "watch": "rollup -c rollup.config.mjs --watch",
23
- "prepublishOnly": "yarn run build",
24
- "prettier": "prettier \"**/*.{css,html,js,java}\" --plugin=prettier-plugin-java",
25
- "fix": "npx eslint --fix . && npx prettier --write . "
26
- },
3
+ "version": "7.0.0",
4
+ "description": "Zebra printer",
27
5
  "keywords": [
28
6
  "capacitor",
29
- "plugin",
30
7
  "native",
31
- "zebra",
32
- "printer"
8
+ "plugin",
9
+ "printer",
10
+ "zebra"
33
11
  ],
34
- "repository": {
35
- "type": "git",
36
- "url": "git+https://github.com/nitra/zebra.git",
37
- "directory": "npm"
38
- },
39
- "author": "v@nitra.ai",
40
- "license": "ISC",
41
12
  "bugs": {
42
13
  "url": "https://github.com/nitra/zebra/issues"
43
14
  },
44
- "homepage": "https://github.com/nitra/zebra",
45
- "engines": {
46
- "node": ">=18.0.0"
15
+ "license": "MIT",
16
+ "author": "nitra",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/nitra/zebra.git"
47
20
  },
48
- "dependencies": {
49
- "@capacitor/core": "^7.4.3"
21
+ "files": [
22
+ "NitraZebra.podspec",
23
+ "Package.swift",
24
+ "android/build.gradle",
25
+ "dist/",
26
+ "ios/Sources",
27
+ "ios/Tests",
28
+ "android/src/main/"
29
+ ],
30
+ "type": "module",
31
+ "main": "dist/plugin.js",
32
+ "module": "dist/plugin.js",
33
+ "scripts": {
34
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
35
+ "verify:ios": "xcodebuild -scheme NitraZebra -destination generic/platform=iOS",
36
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
37
+ "verify:web": "npm run build",
38
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
39
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
40
+ "eslint": "eslint . --ext js",
41
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
42
+ "swiftlint": "node-swiftlint",
43
+ "build": "npm run clean && rolldown -c rolldown.config.mjs",
44
+ "clean": "rimraf ./dist",
45
+ "prepublishOnly": "npm run build"
50
46
  },
51
- "peerDependencies": {
52
- "@capacitor/core": "^7.0.0"
47
+ "dependencies": {
48
+ "@nitra/consola": "^2.4.0"
53
49
  },
54
50
  "devDependencies": {
55
- "@capacitor/android": "^7.4.2",
56
- "@capacitor/cli": "^7.0.0",
57
- "@capacitor/docgen": "^0.3.0",
58
- "@capacitor/ios": "^7.4.2",
59
- "@ionic/eslint-config": "^0.4.0",
60
- "@ionic/prettier-config": "^4.0.0",
51
+ "@capacitor/android": "^7.0.0",
52
+ "@capacitor/core": "^7.0.0",
53
+ "@capacitor/ios": "^7.0.0",
61
54
  "@ionic/swiftlint-config": "^2.0.0",
62
- "@rollup/plugin-commonjs": "^25.0.0",
63
- "@rollup/plugin-node-resolve": "^15.0.0",
64
- "eslint": "^8.57.0",
65
- "prettier": "^3.4.2",
66
- "prettier-plugin-java": "^2.6.6",
67
- "rimraf": "^6.0.1",
68
- "rollup": "^4.30.1",
55
+ "prettier-plugin-java": "^2.7.7",
56
+ "rimraf": "^6.1.0",
57
+ "rolldown": "^1.0.0-rc",
69
58
  "swiftlint": "^2.0.0"
70
59
  },
60
+ "peerDependencies": {
61
+ "@capacitor/core": ">=7.0.0"
62
+ },
71
63
  "capacitor": {
72
64
  "ios": {
73
65
  "src": "ios"
File without changes
@@ -1,2 +0,0 @@
1
- #Wed Sep 03 16:39:24 EEST 2025
2
- gradle.version=8.9
File without changes
package/android/.project DELETED
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>nitra-zebra</name>
4
- <comment>Project nitra-zebra created by Buildship.</comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- <buildCommand>
9
- <name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10
- <arguments>
11
- </arguments>
12
- </buildCommand>
13
- </buildSpec>
14
- <natures>
15
- <nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
- </natures>
17
- <filteredResources>
18
- <filter>
19
- <id>1762760610250</id>
20
- <name></name>
21
- <type>30</type>
22
- <matcher>
23
- <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
- <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
- </matcher>
26
- </filter>
27
- </filteredResources>
28
- </projectDescription>
@@ -1,3 +0,0 @@
1
- // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2
- include ':capacitor-android'
3
- project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
@@ -1,19 +0,0 @@
1
- # Project-wide Gradle settings.
2
- # IDE (e.g. Android Studio) users:
3
- # Gradle settings configured through the IDE *will override*
4
- # any settings specified in this file.
5
- # For more details on how to configure your build environment visit
6
- # http://www.gradle.org/docs/current/userguide/build_environment.html
7
- # Specifies the JVM arguments used for the daemon process.
8
- # The setting is particularly useful for tweaking memory settings.
9
- org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10
- # When configured, Gradle will run in incubating parallel mode.
11
- # This option should only be used with decoupled projects. More details, visit
12
- # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13
- # org.gradle.parallel=true
14
- # AndroidX package structure to make it clearer which packages are bundled with the
15
- # Android operating system, and which are packaged with your app's APK
16
- # https://developer.android.com/topic/libraries/support-library/androidx-rn
17
- android.useAndroidX=true
18
- # Automatically convert third-party libraries to use AndroidX
19
- android.enableJetifier=true
@@ -1,21 +0,0 @@
1
- # Add project specific ProGuard rules here.
2
- # You can control the set of applied configuration files using the
3
- # proguardFiles setting in build.gradle.
4
- #
5
- # For more details, see
6
- # http://developer.android.com/guide/developing/tools/proguard.html
7
-
8
- # If your project uses WebView with JS, uncomment the following
9
- # and specify the fully qualified class name to the JavaScript interface
10
- # class:
11
- #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
- # public *;
13
- #}
14
-
15
- # Uncomment this to preserve the line number information for
16
- # debugging stack traces.
17
- #-keepattributes SourceFile,LineNumberTable
18
-
19
- # If you keep the line number information, uncomment this to
20
- # hide the original source file name.
21
- #-renamesourcefileattribute SourceFile