@nitra/zebra 6.2.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitraZebra.podspec +16 -13
- package/Package.swift +28 -0
- package/README.md +112 -0
- package/android/build.gradle +16 -14
- package/android/src/main/AndroidManifest.xml +4 -21
- package/android/src/main/java/dev/nitra/zebra/Zebra.java +227 -0
- package/android/src/main/java/dev/nitra/zebra/ZebraPlugin.java +128 -0
- package/dist/index.d.ts +26 -0
- package/dist/plugin.js +1080 -1295
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/ZebraPlugin/Zebra.swift +8 -0
- package/ios/Sources/ZebraPlugin/ZebraPlugin.swift +23 -0
- package/ios/Tests/ZebraPluginTests/ZebraTests.swift +15 -0
- package/package.json +49 -54
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.project +0 -28
- package/android/capacitor.settings.gradle +0 -3
- package/android/gradle.properties +0 -19
- package/android/proguard-rules.pro +0 -21
- package/android/src/main/java/com/nitra/zebra_printer_plugin/ZebraPrinter.java +0 -1418
- package/android/src/main/res/xml/capacitor_plugins.xml +0 -4
- package/android/variables.gradle +0 -14
- package/ios/Info.plist +0 -36
- package/ios/Plugin/ZebraPrinterPlugin.m +0 -16
- package/ios/Plugin/ZebraPrinterPlugin.swift +0 -465
- /package/android/{.gradle/8.9/dependencies-accessors/gc.properties → src/main/res/.gitkeep} +0 -0
package/dist/plugin.js.map
CHANGED
|
@@ -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;AACA,MAAM,kBAAkB,GAAG,sCA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A0B,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","getViteEnvVar"],"sources":["../../node_modules/.bun/@capacitor+preferences@7.0.3+12459b436ab1bc92/node_modules/@capacitor/preferences/dist/esm/web.js","../../node_modules/.bun/@capacitor+preferences@7.0.3+12459b436ab1bc92/node_modules/@capacitor/preferences/dist/esm/index.js","../src/utils/validate.js","../../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.4.1/node_modules/@nitra/consola/src/otel-reporter.js","../../node_modules/.bun/@nitra+consola@2.4.1/node_modules/@nitra/consola/src/browser.js","../src/web.js","../src/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class PreferencesWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.group = 'CapacitorStorage';\n }\n async configure({ group }) {\n if (typeof group === 'string') {\n this.group = group;\n }\n }\n async get(options) {\n const value = this.impl.getItem(this.applyPrefix(options.key));\n return { value };\n }\n async set(options) {\n this.impl.setItem(this.applyPrefix(options.key), options.value);\n }\n async remove(options) {\n this.impl.removeItem(this.applyPrefix(options.key));\n }\n async keys() {\n const keys = this.rawKeys().map(k => k.substring(this.prefix.length));\n return { keys };\n }\n async clear() {\n for (const key of this.rawKeys()) {\n this.impl.removeItem(key);\n }\n }\n async migrate() {\n var _a;\n const migrated = [];\n const existing = [];\n const oldprefix = '_cap_';\n const keys = Object.keys(this.impl).filter(k => k.indexOf(oldprefix) === 0);\n for (const oldkey of keys) {\n const key = oldkey.substring(oldprefix.length);\n const value = (_a = this.impl.getItem(oldkey)) !== null && _a !== void 0 ? _a : '';\n const { value: currentValue } = await this.get({ key });\n if (typeof currentValue === 'string') {\n existing.push(key);\n }\n else {\n await this.set({ key, value });\n migrated.push(key);\n }\n }\n return { migrated, existing };\n }\n async removeOld() {\n const oldprefix = '_cap_';\n const keys = Object.keys(this.impl).filter(k => k.indexOf(oldprefix) === 0);\n for (const oldkey of keys) {\n this.impl.removeItem(oldkey);\n }\n }\n get impl() {\n return window.localStorage;\n }\n get prefix() {\n return this.group === 'NativeStorage' ? '' : `${this.group}.`;\n }\n rawKeys() {\n return Object.keys(this.impl).filter(k => k.indexOf(this.prefix) === 0);\n }\n applyPrefix(key) {\n return this.prefix + key;\n }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nconst Preferences = registerPlugin('Preferences', {\n web: () => import('./web').then(m => new m.PreferencesWeb()),\n});\nexport * from './definitions';\nexport { Preferences };\n//# sourceMappingURL=index.js.map","export function normalizePrintArg(zpl) {\n if (typeof zpl !== 'string') {\n throw new TypeError('Expected \"zpl\" to be a string')\n }\n\n const command = zpl.trim()\n if (!command) {\n throw new Error('ZPL команда порожня')\n }\n\n return command\n}\n","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","// Отримання змінних середовища з Vite (import.meta.env)\nconst getViteEnvVar = name => {\n try {\n // eslint-disable-next-line no-undef\n const viteName = `VITE_${name}`\n // eslint-disable-next-line no-undef\n return import.meta?.env?.[viteName]\n } catch {\n return null\n }\n}\n\n// OpenTelemetry Reporter для експорту логів до OpenTelemetry Collector через HTTP\nexport class OpenTelemetryReporter {\n constructor(options = {}) {\n this.endpoint =\n options.endpoint || getViteEnvVar('OTEL_EXPORTER_OTLP_LOGS_ENDPOINT') || 'http://localhost:4318/v1/logs'\n this.serviceName = options.serviceName || getViteEnvVar('OTEL_SERVICE_NAME') || 'consola-service'\n this.serviceVersion = options.serviceVersion || getViteEnvVar('OTEL_SERVICE_VERSION') || '1.0.0'\n this.batchSize = options.batchSize || parseInt(getViteEnvVar('OTEL_BATCH_SIZE') || '10', 10)\n this.flushInterval = options.flushInterval || parseInt(getViteEnvVar('OTEL_FLUSH_INTERVAL') || '5000', 10)\n this.buffer = []\n this.flushTimer = null\n this.headers = {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n\n // Запускаємо таймер для періодичної відправки\n if (this.flushInterval > 0) {\n this.startFlushTimer()\n }\n }\n\n formatMessage(logObj) {\n const args = logObj.args || []\n if (args.length === 0) return ''\n\n return 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\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 return JSON.stringify(arg, null, 2)\n } catch {\n return String(arg)\n }\n }\n return String(arg)\n })\n .join(' ')\n }\n\n getSeverityNumber(type) {\n // Маппінг типів consola до OpenTelemetry severity numbers\n const severityMap = {\n trace: 1, // TRACE\n debug: 5, // DEBUG\n info: 9, // INFO\n log: 9, // INFO\n warn: 13, // WARN\n error: 17, // ERROR\n fatal: 21, // FATAL\n success: 9, // INFO\n start: 9, // INFO\n ready: 9, // INFO\n fail: 17 // ERROR\n }\n return severityMap[type] || 9\n }\n\n getSeverityText(type) {\n const textMap = {\n trace: 'TRACE',\n debug: 'DEBUG',\n info: 'INFO',\n log: 'INFO',\n warn: 'WARN',\n error: 'ERROR',\n fatal: 'FATAL',\n success: 'INFO',\n start: 'INFO',\n ready: 'INFO',\n fail: 'ERROR'\n }\n return textMap[type] || 'INFO'\n }\n\n getFileInfo() {\n try {\n const stack = new Error('Stack trace').stack\n if (!stack) return null\n\n const skipPatterns = ['OpenTelemetryReporter', 'otel-reporter.js', '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 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) }\n }\n }\n }\n }\n } catch {\n // Ігноруємо помилки\n }\n return null\n }\n\n createLogRecord(logObj) {\n const type = logObj.type || 'log'\n const message = this.formatMessage(logObj)\n const fileInfo = this.getFileInfo()\n const timestamp = Date.now() * 1000000 // наносекунди\n\n const logRecord = {\n timeUnixNano: timestamp.toString(),\n severityNumber: this.getSeverityNumber(type),\n severityText: this.getSeverityText(type),\n body: {\n stringValue: message\n },\n attributes: [\n {\n key: 'log.type',\n value: { stringValue: type }\n }\n ]\n }\n\n // Додаємо інформацію про файл, якщо доступна\n if (fileInfo) {\n logRecord.attributes.push(\n {\n key: 'code.filepath',\n value: { stringValue: fileInfo.file }\n },\n {\n key: 'code.lineno',\n value: { intValue: fileInfo.line }\n }\n )\n if (fileInfo.column) {\n logRecord.attributes.push({\n key: 'code.colno',\n value: { intValue: fileInfo.column }\n })\n }\n }\n\n // Додаємо додаткові атрибути з logObj, якщо вони є\n if (logObj.extra && typeof logObj.extra === 'object') {\n for (const [key, value] of Object.entries(logObj.extra)) {\n logRecord.attributes.push({\n key: `extra.${key}`,\n value: { stringValue: String(value) }\n })\n }\n }\n\n return logRecord\n }\n\n async sendLogs(logs) {\n if (logs.length === 0) return\n\n const resourceLogs = {\n resource: {\n attributes: [\n {\n key: 'service.name',\n value: { stringValue: this.serviceName }\n },\n {\n key: 'service.version',\n value: { stringValue: this.serviceVersion }\n }\n ]\n },\n scopeLogs: [\n {\n scope: {\n name: 'consola',\n version: '1.0.0'\n },\n logRecords: logs\n }\n ]\n }\n\n const payload = {\n resourceLogs: [resourceLogs]\n }\n\n try {\n const response = await fetch(this.endpoint, {\n method: 'POST',\n mode: 'cors',\n headers: this.headers,\n body: JSON.stringify(payload)\n })\n\n if (!response.ok) {\n console.warn(`OpenTelemetry export failed: ${response.status} ${response.statusText}`)\n }\n } catch (error) {\n // Тихо ігноруємо помилки, щоб не порушити роботу додатку\n console.warn('OpenTelemetry export error:', error?.message || String(error))\n }\n }\n\n async flush() {\n if (this.buffer.length === 0) return\n\n const logsToSend = [...this.buffer]\n this.buffer = []\n await this.sendLogs(logsToSend)\n }\n\n startFlushTimer() {\n if (this.flushTimer) {\n clearInterval(this.flushTimer)\n }\n this.flushTimer = setInterval(() => {\n this.flush().catch(error => {\n console.warn('OpenTelemetry flush error:', error?.message || String(error))\n })\n }, this.flushInterval)\n }\n\n log(logObj) {\n try {\n const logRecord = this.createLogRecord(logObj)\n this.buffer.push(logRecord)\n\n // Відправляємо одразу, якщо буфер досяг максимального розміру\n if (this.buffer.length >= this.batchSize) {\n this.flush().catch(error => {\n console.warn('OpenTelemetry flush error:', error?.message || String(error))\n })\n }\n } catch (error) {\n // Тихо ігноруємо помилки\n console.warn('OpenTelemetry log processing error:', error?.message || String(error))\n }\n }\n\n destroy() {\n if (this.flushTimer) {\n clearInterval(this.flushTimer)\n this.flushTimer = null\n }\n // Відправляємо залишкові логи перед знищенням\n return this.flush()\n }\n}\n\n/**\n * Створює OpenTelemetry репортер для експорту логів до OpenTelemetry Collector\n *\n * @param {Object} options - Опції репортера\n * @param {String} options.endpoint - URL endpoint OpenTelemetry Collector (за замовчуванням: http://localhost:4318/v1/logs)\n * @param {String} options.serviceName - Ім'я сервісу (за замовчуванням: consola-service)\n * @param {String} options.serviceVersion - Версія сервісу (за замовчуванням: 1.0.0)\n * @param {Number} options.batchSize - Розмір батча для відправки (за замовчуванням: 10)\n * @param {Number} options.flushInterval - Інтервал автоматичної відправки в мс (за замовчуванням: 5000)\n * @param {Object} options.headers - Додаткові HTTP заголовки\n * @returns {OpenTelemetryReporter} Екземпляр OpenTelemetry репортера\n *\n * @example\n * import { createOpenTelemetryReporter } from '@nitra/consola'\n * const otelReporter = createOpenTelemetryReporter({\n * endpoint: 'http://localhost:4318/v1/logs',\n * serviceName: 'my-app',\n * serviceVersion: '1.0.0'\n * })\n * consola.addReporter(otelReporter)\n */\nexport const createOpenTelemetryReporter = (options = {}) => {\n return new OpenTelemetryReporter(options)\n}\n","/* global location, process, import */\nimport { consola } from 'consola'\nimport { OpenTelemetryReporter } from './otel-reporter.js'\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// HTML Popup Reporter — дублювання повідомлень у вигляді спливаючих блоків (без canvas)\nconst POPUP_PADDING = 12\nconst POPUP_LABEL_PADDING = 8\nconst POPUP_LINE_HEIGHT = 20\nconst POPUP_BUTTON_SIZE = 18\nconst POPUP_BUTTON_PADDING = 6\nconst POPUP_MIN_HEIGHT = 36\nconst POPUP_MAX_MESSAGE_LENGTH = 500\n\nconst POPUP_STYLES = `\n#consola-popup-container { position: fixed; inset: 0; pointer-events: none; z-index: 999999; }\n.consola-popup { pointer-events: auto; position: fixed; left: 20px; max-width: calc(100vw - 40px); min-height: ${POPUP_MIN_HEIGHT}px;\n display: flex; align-items: stretch; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border: 1px solid #e0e0e0;\n font: 13px -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; }\n.consola-popup-label { flex-shrink: 0; padding: 0 ${POPUP_LABEL_PADDING}px; display: flex; align-items: center; justify-content: center;\n color: #fff; font: 11px monospace; font-weight: bold; text-transform: lowercase; }\n.consola-popup-content { flex: 1; min-width: 0; padding: ${POPUP_PADDING}px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; }\n.consola-popup-text { flex: 1 1 auto; min-width: 0; color: #212121; line-height: ${POPUP_LINE_HEIGHT}px; white-space: pre-wrap; word-break: break-word; }\n.consola-popup-filelink { flex: 0 0 auto; color: #1976D2; font: 11px monospace; text-decoration: underline; cursor: pointer; }\n.consola-popup-filelink:hover { text-decoration: underline; }\n.consola-popup-close { flex-shrink: 0; width: ${POPUP_BUTTON_SIZE}px; height: ${POPUP_BUTTON_SIZE}px; margin: ${POPUP_BUTTON_PADDING}px; padding: 0; border: none; background: transparent;\n color: #999; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 2px; }\n.consola-popup-close:hover { background: rgba(0,0,0,0.06); color: #666; }\n`\n\nclass HtmlPopupReporter {\n constructor() {\n this.container = null\n this.messages = []\n this.messageId = 0\n this.init()\n }\n\n init() {\n if (typeof document === 'undefined') return\n\n const doInit = () => {\n if (!document.body) {\n setTimeout(doInit, 10)\n return\n }\n\n let container = document.querySelector('#consola-popup-container')\n if (!container) {\n const style = document.createElement('style')\n style.textContent = POPUP_STYLES\n document.head.append(style)\n container = document.createElement('div')\n container.id = 'consola-popup-container'\n document.body.append(container)\n }\n\n this.container = container\n this.animate()\n }\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', doInit)\n } else {\n doInit()\n }\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 = ['HtmlPopupReporter', '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 > POPUP_MAX_MESSAGE_LENGTH ? message.slice(0, POPUP_MAX_MESSAGE_LENGTH) + '...' : message\n }\n\n log(logObj) {\n if (!this.container) return\n\n const text = this.formatMessage(logObj)\n if (!text) return\n\n const type = logObj.type || 'log'\n const color = this.getColorForType(type)\n const typeLabel = this.getTypeLabel(type)\n const id = this.messageId++\n const fileInfo = this.getFileInfo()\n\n const popup = document.createElement('div')\n popup.className = 'consola-popup'\n popup.dataset.id = String(id)\n popup.style.bottom = `${window.innerHeight}px`\n popup.style.backgroundColor = '#fff'\n\n const label = document.createElement('span')\n label.className = 'consola-popup-label'\n label.style.backgroundColor = color\n label.textContent = typeLabel\n\n const content = document.createElement('div')\n content.className = 'consola-popup-content'\n\n const textEl = document.createElement('div')\n textEl.className = 'consola-popup-text'\n textEl.textContent = text\n\n content.append(textEl)\n\n if (fileInfo) {\n const fileLink = document.createElement('span')\n fileLink.className = 'consola-popup-filelink'\n fileLink.textContent = `${fileInfo.file}:${fileInfo.line}`\n fileLink.role = 'button'\n fileLink.tabIndex = 0\n fileLink.addEventListener('click', e => {\n e.preventDefault()\n console.log(`%c${fileInfo.file}:${fileInfo.line}`, 'color: #1976D2; text-decoration: underline;')\n })\n content.append(fileLink)\n }\n\n const closeBtn = document.createElement('button')\n closeBtn.type = 'button'\n closeBtn.className = 'consola-popup-close'\n closeBtn.setAttribute('aria-label', 'Close')\n closeBtn.textContent = '×'\n closeBtn.addEventListener('click', () => {\n const idx = this.messages.findIndex(m => m.id === id)\n if (idx !== -1) {\n const entry = this.messages[idx]\n if (entry.el && entry.el.parentNode) entry.el.remove()\n this.messages.splice(idx, 1)\n }\n })\n\n popup.append(label, content, closeBtn)\n this.container.append(popup)\n\n const height = popup.offsetHeight\n this.messages.push({\n id,\n el: popup,\n targetBottom: 20,\n currentBottom: window.innerHeight,\n height\n })\n }\n\n animate() {\n if (!this.container) return\n\n let offset = 20\n for (let i = this.messages.length - 1; i >= 0; i--) {\n const msg = this.messages[i]\n if (msg.el && msg.el.parentNode) {\n const h = msg.el.offsetHeight\n msg.height = h\n msg.targetBottom = offset\n msg.currentBottom += (msg.targetBottom - msg.currentBottom) * 0.1\n msg.el.style.bottom = `${Math.round(msg.currentBottom)}px`\n offset += h + 10\n }\n }\n\n requestAnimationFrame(() => this.animate())\n }\n}\n\n// Отримання змінних середовища з Vite (import.meta.env)\nconst getViteEnvVar = name => {\n try {\n // eslint-disable-next-line no-undef\n const viteName = `VITE_${name}`\n // eslint-disable-next-line no-undef\n return import.meta?.env?.[viteName]\n } catch {\n return null\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 htmlPopupReporter = null\nif (isPopupDebugEnabled && typeof document !== 'undefined') {\n htmlPopupReporter = new HtmlPopupReporter()\n}\n\nconst defaultConsola = consola.create(options)\n\n// Додаємо HTML репортер до default екземпляра, якщо потрібно (не замінює стандартний)\nif (isPopupDebugEnabled && typeof document !== 'undefined' && htmlPopupReporter) {\n defaultConsola.addReporter(htmlPopupReporter)\n}\n\n// Перевіряємо змінні середовища Vite для OpenTelemetry експорту\nlet openTelemetryReporter = null\nconst otelEndpoint = getViteEnvVar('OTEL_EXPORTER_OTLP_LOGS_ENDPOINT')\n\nif (otelEndpoint) {\n openTelemetryReporter = new OpenTelemetryReporter()\n defaultConsola.addReporter(openTelemetryReporter)\n}\n\nexport default defaultConsola\n\n// Експортуємо consola з нашими опціями, а не базовий\nexport { defaultConsola as consola }\n\n// Експортуємо OpenTelemetryReporter та createOpenTelemetryReporter для прямого використання\nexport { createOpenTelemetryReporter, OpenTelemetryReporter } from './otel-reporter.js'\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","/// <reference path=\"./web-serial.d.ts\" />\nimport { 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 // Запитуємо порт (Web Serial API)\n const serial = navigator.serial\n if (!serial) throw new Error('Web Serial API не підтримується в цьому браузері')\n const port = await 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 consola.debug('Принтер готовий до друку', 'success')\n\n if (!port || !writer) {\n consola.debug('Помилка: Принтер не підключено', 'error')\n return\n }\n\n consola.debug(`Відправка ZPL команди: ${zpl.slice(0, 50)}...`, 'info')\n\n // Конвертуємо текст в Uint8Array\n const encoder = new TextEncoder()\n const data = encoder.encode(zpl)\n\n // Відправляємо дані\n await writer.write(data)\n\n // Чекаємо трохи для обробки принтером\n // await new Promise(resolve => setTimeout(resolve, 500))\n\n consola.debug(`✓ Команда відправлена (${data.length} байт)`, 'success')\n consola.debug('print from web capacitor plugin', zpl)\n return {\n success: true,\n bytesSent: data.length\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n consola.debug(`Помилка підключення: ${message}`, 'error')\n\n // Спробуємо перепідключитися\n // await disconnect()\n throw error\n }\n }\n\n getPairedDevices() {\n return { devices: [] }\n }\n}\n","import { Capacitor, registerPlugin } from '@capacitor/core'\nimport { Preferences } from '@capacitor/preferences'\nimport { normalizePrintArg } from './utils/validate.js'\n\nconst ZebraPlugin = registerPlugin('Zebra', {\n web: () => import('./web.js').then(m => new m.ZebraWeb())\n})\n\nconst Zebra = {\n // oxlint-disable-next-line require-await\n async print(arg) {\n const zpl = normalizePrintArg(arg)\n if (Capacitor.getPlatform() === 'web') {\n return ZebraPlugin.print({ zpl })\n }\n // Перевіряємо чи є збережена адреса принтера в Preferences\n const { value } = await Preferences.get({ key: 'printer_address' })\n\n // Якщо не збережена, то запитуємо привязані пристрої Bluetooth\n if (!value) {\n const { devices } = await ZebraPlugin.getPairedDevices()\n if (devices.length > 0) {\n return { success: false, message: 'device list', devices }\n }\n // Якщо не знайдено привязані пристрої, то повідомляємо користувача\n return { success: false, message: 'No paired devices found' }\n }\n if (value) {\n return ZebraPlugin.print({ zpl, address: value })\n }\n return ZebraPlugin.print({ zpl })\n }\n // setPrinterAddress(options) {\n // return ZebraPlugin.setPrinterAddress(options)\n // },\n // getPairedDevices() {\n // return ZebraPlugin.getPairedDevices()\n // }\n}\n\nexport { Zebra }\n"],"x_google_ignoreList":[0,1,3,4,5,6],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CACa,iBAAb,cAAoC,UAAU;EAC1C,cAAc;AACV,SAAM,GAAG,UAAU;AACnB,QAAK,QAAQ;;EAEjB,MAAM,UAAU,EAAE,SAAS;AACvB,OAAI,OAAO,UAAU,SACjB,MAAK,QAAQ;;EAGrB,MAAM,IAAI,SAAS;AAEf,UAAO,EAAE,OADK,KAAK,KAAK,QAAQ,KAAK,YAAY,QAAQ,IAAI,CAAC,EAC9C;;EAEpB,MAAM,IAAI,SAAS;AACf,QAAK,KAAK,QAAQ,KAAK,YAAY,QAAQ,IAAI,EAAE,QAAQ,MAAM;;EAEnE,MAAM,OAAO,SAAS;AAClB,QAAK,KAAK,WAAW,KAAK,YAAY,QAAQ,IAAI,CAAC;;EAEvD,MAAM,OAAO;AAET,UAAO,EAAE,MADI,KAAK,SAAS,CAAC,KAAI,MAAK,EAAE,UAAU,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,MAAM,MAAM,kBAAkB,IAAI;AAClC,KAAI,UAAU,aAAa,KAAK,MAC9B,QAAO,YAAY,MAAM,EAAE,KAAK,CAAC;CAGnC,MAAM,EAAE,UAAU,MAAM,YAAY,IAAI,EAAE,KAAK,mBAAmB,CAAC;AAGnE,KAAI,CAAC,OAAO;EACV,MAAM,EAAE,YAAY,MAAM,YAAY,kBAAkB;AACxD,MAAI,QAAQ,SAAS,EACnB,QAAO;GAAE,SAAS;GAAO,SAAS;GAAe;GAAS;AAG5D,SAAO;GAAE,SAAS;GAAO,SAAS;GAA2B;;AAE/D,KAAI,MACF,QAAO,YAAY,MAAM;EAAE;EAAK,SAAS;EAAO,CAAC;AAEnD,QAAO,YAAY,MAAM,EAAE,KAAK,CAAC;GAQpC"}
|
|
@@ -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,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitra/zebra",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
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.1",
|
|
4
|
+
"description": "Zebra printer",
|
|
27
5
|
"keywords": [
|
|
28
6
|
"capacitor",
|
|
29
|
-
"plugin",
|
|
30
7
|
"native",
|
|
31
|
-
"
|
|
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
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "nitra",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/nitra/zebra.git"
|
|
47
20
|
},
|
|
48
|
-
"
|
|
49
|
-
"
|
|
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
|
+
"types": "dist/index.d.ts",
|
|
34
|
+
"scripts": {
|
|
35
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
36
|
+
"verify:ios": "xcodebuild -scheme NitraZebra -destination generic/platform=iOS",
|
|
37
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
38
|
+
"verify:web": "npm run build",
|
|
39
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
40
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
41
|
+
"eslint": "eslint . --ext js",
|
|
42
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
43
|
+
"swiftlint": "node-swiftlint",
|
|
44
|
+
"build": "npm run clean && rolldown -c rolldown.config.mjs",
|
|
45
|
+
"clean": "rimraf ./dist",
|
|
46
|
+
"prepublishOnly": "npm run build"
|
|
50
47
|
},
|
|
51
|
-
"
|
|
52
|
-
"@
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@nitra/consola": "^2.4.1"
|
|
53
50
|
},
|
|
54
51
|
"devDependencies": {
|
|
55
|
-
"@capacitor/android": "^7.
|
|
56
|
-
"@capacitor/
|
|
57
|
-
"@capacitor/
|
|
58
|
-
"@capacitor/ios": "^7.4.2",
|
|
59
|
-
"@ionic/eslint-config": "^0.4.0",
|
|
60
|
-
"@ionic/prettier-config": "^4.0.0",
|
|
52
|
+
"@capacitor/android": "^7.0.0",
|
|
53
|
+
"@capacitor/core": "^7.0.0",
|
|
54
|
+
"@capacitor/ios": "^7.0.0",
|
|
61
55
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"prettier-plugin-java": "^2.6.6",
|
|
67
|
-
"rimraf": "^6.0.1",
|
|
68
|
-
"rollup": "^4.30.1",
|
|
56
|
+
"prettier-plugin-java": "^2.7.7",
|
|
57
|
+
"rimraf": "^6.1.0",
|
|
58
|
+
"rolldown": "^1.0.0-rc",
|
|
59
|
+
"rolldown-plugin-dts": "^0.15.3",
|
|
69
60
|
"swiftlint": "^2.0.0"
|
|
70
61
|
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@capacitor/core": ">=7.0.0",
|
|
64
|
+
"@capacitor/preferences": ">=7.0.0"
|
|
65
|
+
},
|
|
71
66
|
"capacitor": {
|
|
72
67
|
"ios": {
|
|
73
68
|
"src": "ios"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
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,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
|