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

borisous-lib

v1.0.0

Published

``` npm i @fad-producto/desktop-id-capture ``` *"Requires access token configuration for private FAD repositories."

Readme

FadMobileIdCapture

1 - Instal packages

```
npm i @fad-producto/desktop-id-capture
```
*"Requires access token configuration for private FAD repositories."

2 - Add angular.json configuration

"architect": {
    "build": {
        "options": {
            "assets": [
                {
                    "glob": "**/*",
                    "input": "node_modules/@fad-producto/desktop-id-capture/assets/tf-models",
                    "output": "./assets/tf-models"
                },
                {
                    "glob": "**/*",
                    "input": "node_modules/@fad-producto/desktop-id-capture/assets/tfLite",
                    "output": "./"
                },
                {
                    "glob": "**/*",
                    "input": "node_modules/@fad-producto/desktop-id-capture/assets/images/svg",
                    "output": "./assets/images/svg"
                }
            ],
            "scripts": [
                "node_modules/@fad-producto/desktop-id-capture/assets/opencv.js"
            ]
        ...

3 - add skipLibCheck configuration (tsconfig.json)

"compilerOptions": {
    "skipLibCheck": true,

4 - Import component - app.module.ts

import { DesktopMexicanIdModule } from '@fad-producto/desktop-id-capture';

@NgModule({ imports: [ DesktopMexicanIdModule,

5 - Component Inputs & Outputs

Inputs

<fad-desktop-id-capture
    [configuration]="IdCaptureConfigurationModel"
    (getData)="getData($event)"
    (onError)="onError($event)"
    ...

| Name                     | Type                           | Required | Default              | Description                                              |
| ------------------------ | ------------------------------ | -------- | -------------------- | -------------------------------------------------------- |
| configuration            | IdCaptureConfigurationModel    | true     |                      | sets component configuration                             |


class IdCaptureConfigurationModel
| Name                     | Type                           | Required | Default              | Description                                              |
| ------------------------ | ------------------------------ | -------- | -------------------- | -------------------------------------------------------- |
| labels                   | RetryLabelsConfigurationModel  | false    | *defaultLabelsConfig | Legends to display on component                          |
| requiresBackSide         | boolean                        | false    | false                | indicates if is required to capture both parts of the id |
| showResponsePreview      | boolean                        | false    | true                 | show or hide preview before response                     |
| photoRetries             | number                         | false    | 5                    | number of capture retries allowed                        |
| deviceId                 | string                         | false    | default camera       | camera device id                                         |
| tfModelPath              | string                         | false    | /                    | ruta de archivos wasm de tf                              |

-> labels: RetryLabelsConfigurationModel = {
    frontTitle: 'ENFOQUE EL FRENTE DEL DOCUMENTO',
    backTitle: 'ENFOQUE EL REVERSO DEL DOCUMENTO',
    resultDescription: 'Verifica que la foto de tu identificación sea correcta y legible',
    nextButtonLabel: 'Continuar',
    retryButtonLabel: 'Volver a Tomar',
    buttonColor: '#ab0000'
};

Outputs

getData($event) {
    console.log('Scanner result: ', $event);
}

onError($event) {
    console.log('Scanner error: ', $event);
}

| Name             |  Return                | Description                                        |
| ---------------- | ---------------------- | -------------------------------------------------- |
| getData          | DataResponseModel      | Fires when scanning was completed                  |
| onError          | ResponseErrorModel     | Fires when an error happens                        |

Data Structure

DataResponseModel
    frontImage: string,
    crop: string[],         // two crops, left and right, choose one
    backImage: string
    modelType: string

ResponseErrorModel
    error: string; (*ErrorMessages enum)
    message: string; (Error string detail)
    code: number; (*ErrorCodes enum)

export enum ErrorMessages {
    BROWSER_NOT_SUPPORTED =  'Navegador no soportado',
    NOT_ACCEPT_CAMERA_PERMISSION = 'No tienes permisos para acceder a la cámara',
    MAX_TIME_LIMIT =  'Tiempo máximo superado',
    ORIENTATION_TITLE = 'Por favor coloca tu dispositivo de forma vertical',
    ORIENTATION_INSTRUCTIONS = 'Te sugerimos bloquear el giro automático en tu dispositivo para una mejor experiencia',
    NOT_SUPPORTED_TITLE = 'Atención',
    NOT_SUPPORTED_INSTRUCTIONS = 'Este es un navegador no soportado',
    NOT_DETECTED = 'No se puede identificar el documento',
    NOT_CREATED = 'No fue posible iniciar el componente',
    MODEL_ERROR = 'Se presento un error al cargar el modelo de predicción',
    PERSPECTIVE_ERROR = 'Se presento un error al interpretar la perspectiva',
}

export enum ErrorCodes {
    BROWSER_NOT_SUPPORTED= -1,
    NOT_ACCEPT_CAMERA_PERMISSION = -2,
    MAX_TIME_LIMIT = -3,
    ORIENTATION = -4,
    NOT_SUPPORTED = -5,
    NOT_DETECTED = -6,
    NOT_CREATED = -7,
    MODEL_ERROR = -8,
    PERSPECTIVE_ERROR = -9
}

##############################################

Error in project: global is not defined

Add in polyfills.ts
    (window as any).global = window;

Error on build

Error: Module not found: Error: Can't resolve '../tflite_web_api_client'
    -> configure tsModelPath 
    -> npm i @tensorflow/[email protected] --force