npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

capacitor-yooga-pos

v0.2.2

Published

Capacitor plugin para hardware POS Elgin (PIX4/TPro/M8/M10) e iMin (D1/M10): display traseiro e impressora térmica.

Readme

capacitor-yooga-pos

Capacitor plugin para integração com hardware POS Elgin (linha PIX4 / TPro / M8 / M10) e iMin (D1 / M10 com display traseiro estilo TPro).

Funcionalidades atuais:

  • showLogoOnDisplay() — exibe a logo Yooga no display traseiro.
  • showPix({ value }) — exibe um QR Code PIX no display traseiro.
  • print({ html, ... }) — renderiza HTML em bitmap e imprime na térmica interna do terminal (compatível com Elgin M8/M10).

No iOS e na web os métodos são no-op, pois o hardware não existe nessas plataformas.

Install

npm install capacitor-yooga-pos
npx cap sync

Setup adicional no Android (obrigatório)

A SDK da Elgin é distribuída como AARs locais (android/libs/*.aar). O AGP 8 não permite que uma android-library empacote AARs locais (o build falha com "Direct local .aar file dependencies are not supported when building an AAR"), então este plugin declara esses AARs como compileOnly e o app consumidor precisa empacotá-los.

Cole no android/app/build.gradle do seu app Capacitor:

repositories {
    flatDir {
        dirs '../capacitor-cordova-android-plugins/src/main/libs',
             'libs',
             '../../node_modules/capacitor-yooga-pos/android/libs'
    }
}

dependencies {
    // AARs da Elgin vendorados em capacitor-yooga-pos.
    // AGP 8 não permite empacotar AARs dentro de uma android-library, então
    // o plugin declara como compileOnly e o app empacota aqui.
    // A v02.34.00 já embute libfree_image.so e DisplaySDK, dispensando a AAR display separada.
    implementation(name: 'e1-V02.34.00-release',         ext: 'aar')
    implementation(name: 'minipdvm8-v01.00.00-release',  ext: 'aar')
}

Workaround Capacitor 6 + AGP 8 (testClasses)

O sync do Android Studio com Capacitor 6 + AGP 8 pede :testClasses em todos os subprojetos, mas :capacitor-cordova-android-plugins não tem fontes de teste. Adicione no android/build.gradle (root) do app:

allprojects {
    repositories {
        google()
        mavenCentral()
    }
    afterEvaluate { project ->
        if (!project.tasks.findByName('testClasses')) {
            project.tasks.register('testClasses')
        }
    }
}

Uso

import { CapacitorYoogaPos } from 'capacitor-yooga-pos';

await CapacitorYoogaPos.showLogoOnDisplay();

await CapacitorYoogaPos.showPix({
  value: '00020126...PIX-COPIA-E-COLA...6304ABCD',
});

await CapacitorYoogaPos.print({
  html: '<html><body style="font-family:monospace">Cupom...</body></html>',
});

API

showLogoOnDisplay()

showLogoOnDisplay() => Promise<void>

Mostra a logo padrão da Yooga no display traseiro do terminal (Elgin PIX4 / TPro / iMin D1 / iMin M10).


showPix(...)

showPix(options: ShowPixOptions) => Promise<void>

Mostra um QR Code PIX no display traseiro do terminal.

| Param | Type | | ------------- | --------------------------------------------------------- | | options | ShowPixOptions |


print(...)

print(options: PrintOptions) => Promise<void>

Renderiza o HTML em bitmap e imprime na impressora térmica interna do terminal Elgin (M8/M10).

| Param | Type | | ------------- | ----------------------------------------------------- | | options | PrintOptions |


Interfaces

ShowPixOptions

| Prop | Type | Description | | ----------- | ------------------- | -------------------------------------------------------------------- | | value | string | Conteúdo do QR Code (copia-e-cola PIX) a ser exibido no display. |

PrintOptions

| Prop | Type | Description | | ---------------------- | -------------------- | -------------------------------------------------------------------------------------------- | | html | string | HTML completo a ser renderizado em bitmap e impresso na térmica interna. | | cutPaperLength | number | Quantidade de linhas em branco a avançar antes do corte (default 4). | | webViewZoom | number | Zoom de texto aplicado no WebView que renderiza o HTML (em %, default 100). | | bitmapWidth | number | Largura do bitmap gerado em pixels (default 384, padrão da térmica 58mm). | | measureDelay | number | Atraso (ms) antes de medir o conteúdo do WebView (default 0). | | screenshotDelay | number | Atraso (ms) antes de capturar o screenshot do WebView (default 0). | | strictMode | boolean | Se true, falha imediatamente em qualquer erro ao gerar o bitmap. | | timeout | number | Timeout total (ms) para conversão HTML -> bitmap (default 30000). | | builderTextZoom | number | Zoom de texto adicional aplicado no Html2Bitmap.Builder (em %, default 100). |