Initial project upload

This commit is contained in:
Mohamed Mathar Irfan
2026-07-28 17:57:02 +05:30
commit ed6610d5d8
23919 changed files with 3003316 additions and 0 deletions

21
frontend/node_modules/qr-code-styling/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Denys Kozak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

218
frontend/node_modules/qr-code-styling/README.md generated vendored Normal file
View File

@@ -0,0 +1,218 @@
# QR Code Styling
[![Version](https://img.shields.io/npm/v/qr-code-styling.svg)](https://www.npmjs.org/package/qr-code-styling)
JavaScript library for generating QR codes with a logo and styling.
Try it here https://qr-code-styling.com
If you have issues / suggestions / notes / questions, please open an issue or contact me. Let's create a cool library together.
### Examples
<p float="left">
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/facebook_example_new.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/qr_code_example.png" width="240" />
<img style="display:inline-block" src="https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/src/assets/telegram_example_new.png" width="240" />
</p>
### Installation
```
npm install qr-code-styling
```
### Usage
```HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>QR Code Styling</title>
<script type="text/javascript" src="https://unpkg.com/qr-code-styling@1.5.0/lib/qr-code-styling.js"></script>
</head>
<body>
<div id="canvas"></div>
<script type="text/javascript">
const qrCode = new QRCodeStyling({
width: 300,
height: 300,
type: "svg",
data: "https://www.facebook.com/",
image: "https://upload.wikimedia.org/wikipedia/commons/5/51/Facebook_f_logo_%282019%29.svg",
dotsOptions: {
color: "#4267b2",
type: "rounded"
},
backgroundOptions: {
color: "#e9ebee",
},
imageOptions: {
crossOrigin: "anonymous",
margin: 20
}
});
qrCode.append(document.getElementById("canvas"));
qrCode.download({ name: "qr", extension: "svg" });
</script>
</body>
</html>
```
---
[**React example (Codesandbox)**](https://codesandbox.io/s/qr-code-styling-react-example-l8rwl?file=/src/App.js)
[**Angular example (Codesandbox)**](https://codesandbox.io/s/agitated-panini-tpgb2?file=/src/app/app.component.ts)
---
[**React example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/react)
[**Angular example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/angular)
[**Vue example (source)**](https://github.com/kozakdenys/qr-code-styling-examples/tree/master/examples/vue)
---
### API Documentation
#### QRCodeStyling instance
`new QRCodeStyling(options) => QRCodeStyling`
Param |Type |Description
-------|------|------------
options|object|Init object
`options` structure
Property |Type |Default Value|Description
-----------------------|-------------------------|-------------|-----------------------------------------------------
width |number |`300` |Size of canvas
height |number |`300` |Size of canvas
type |string (`'canvas' 'svg'`)|`canvas` |The type of the element that will be rendered
data |string | |The date will be encoded to the QR code
image |string | |The image will be copied to the center of the QR code
margin |number |`0` |Margin around canvas
qrOptions |object | |Options will be passed to `qrcode-generator` lib
imageOptions |object | |Specific image options, details see below
dotsOptions |object | |Dots styling options
cornersSquareOptions |object | |Square in the corners styling options
cornersDotOptionsHelper|object | |Dots in the corners styling options
backgroundOptions |object | |QR background styling options
`options.qrOptions` structure
Property |Type |Default Value
--------------------|--------------------------------------------------|-------------
typeNumber |number (`0 - 40`) |`0`
mode |string (`'Numeric' 'Alphanumeric' 'Byte' 'Kanji'`)|
errorCorrectionLevel|string (`'L' 'M' 'Q' 'H'`) |`'Q'`
`options.imageOptions` structure
Property |Type |Default Value|Description
------------------|---------------------------------------|-------------|------------------------------------------------------------------------------
hideBackgroundDots|boolean |`true` |Hide all dots covered by the image
imageSize |number |`0.4` |Coefficient of the image size. Not recommended to use ove 0.5. Lower is better
margin |number |`0` |Margin of the image in px
crossOrigin |string(`'anonymous' 'use-credentials'`)| |Set "anonymous" if you want to download QR code from other origins.
`options.dotsOptions` structure
Property|Type |Default Value|Description
--------|------------------------------------------------------------------------------|-------------|-------------------
color |string |`'#000'` |Color of QR dots
gradient|object | |Gradient of QR dots
type |string (`'rounded' 'dots' 'classy' 'classy-rounded' 'square' 'extra-rounded'`)|`'square'` |Style of QR dots
`options.backgroundOptions` structure
Property|Type |Default Value
--------|------|-------------
color |string|`'#fff'`
gradient|object|
`options.cornersSquareOptions` structure
Property|Type |Default Value|Description
--------|-----------------------------------------|-------------|-----------------
color |string | |Color of Corners Square
gradient|object | |Gradient of Corners Square
type |string (`'dot' 'square' 'extra-rounded'`)| |Style of Corners Square
`options.cornersDotOptions` structure
Property|Type |Default Value|Description
--------|-------------------------|-------------|-----------------
color |string | |Color of Corners Dot
gradient|object | |Gradient of Corners Dot
type |string (`'dot' 'square'`)| |Style of Corners Dot
Gradient structure
`options.dotsOptions.gradient`
`options.backgroundOptions.gradient`
`options.cornersSquareOptions.gradient`
`options.cornersDotOptions.gradient`
Property |Type |Default Value|Description
----------|----------------------------|-------------|---------------------------------------------------------
type |string (`'linear' 'radial'`)|"linear" |Type of gradient spread
rotation |number |0 |Rotation of gradient in radians (Math.PI === 180 degrees)
colorStops|array of objects | |Gradient colors. Example `[{ offset: 0, color: 'blue' }, { offset: 1, color: 'red' }]`
Gradient colorStops structure
`options.dotsOptions.gradient.colorStops[]`
`options.backgroundOptions.gradient.colorStops[]`
`options.cornersSquareOptions.gradient.colorStops[]`
`options.cornersDotOptions.gradient.colorStops[]`
Property|Type |Default Value|Description
--------|----------------|-------------|-----------------------------------
offset |number (`0 - 1`)| |Position of color in gradient range
color |string | |Color of stop in gradient range
#### QRCodeStyling methods
`QRCodeStyling.append(container) => void`
Param |Type |Description
---------|-----------|-----------
container|DOM element|This container will be used for appending of the QR code
`QRCodeStyling.getRawData(extension) => Promise<Blob>`
Param |Type |Default Value|Description
---------|------------------------------------|-------------|------------
extension|string (`'png' 'jpeg' 'webp' 'svg'`)|`'png'` |Blob type
`QRCodeStyling.update(options) => void`
Param |Type |Description
-------|------|--------------------------------------
options|object|The same options as for initialization
`QRCodeStyling.download(downloadOptions) => Promise<void>`
Param |Type |Description
---------------|------|------------
downloadOptions|object|Options with extension and name of file (not required)
`downloadOptions` structure
Property |Type |Default Value|Description
---------|------------------------------------|-------------|-----------------------------------------------------
name |string |`'qr'` |Name of the downloaded file
extension|string (`'png' 'jpeg' 'webp' 'svg'`)|`'png'` |File extension
### License
[MIT License](https://raw.githubusercontent.com/kozakdenys/qr-code-styling/master/LICENSE). Copyright (c) 2021 Denys Kozak

View File

@@ -0,0 +1,3 @@
import { CornerDotTypes } from "../types";
declare const _default: CornerDotTypes;
export default _default;

View File

@@ -0,0 +1,3 @@
import { CornerSquareTypes } from "../types";
declare const _default: CornerSquareTypes;
export default _default;

View File

@@ -0,0 +1,3 @@
import { DotTypes } from "../types";
declare const _default: DotTypes;
export default _default;

View File

@@ -0,0 +1,3 @@
import { DrawTypes } from "../types";
declare const _default: DrawTypes;
export default _default;

View File

@@ -0,0 +1,6 @@
import { ErrorCorrectionLevel } from "../types";
interface ErrorCorrectionLevels {
[key: string]: ErrorCorrectionLevel;
}
declare const _default: ErrorCorrectionLevels;
export default _default;

View File

@@ -0,0 +1,5 @@
interface ErrorCorrectionPercents {
[key: string]: number;
}
declare const _default: ErrorCorrectionPercents;
export default _default;

View File

@@ -0,0 +1,3 @@
import { GradientTypes } from "../types";
declare const _default: GradientTypes;
export default _default;

View File

@@ -0,0 +1,6 @@
import { Mode } from "../types";
interface Modes {
[key: string]: Mode;
}
declare const _default: Modes;
export default _default;

View File

@@ -0,0 +1,6 @@
import { TypeNumber } from "../types";
interface TypesMap {
[key: number]: TypeNumber;
}
declare const qrTypes: TypesMap;
export default qrTypes;

View File

@@ -0,0 +1,33 @@
import { RequiredOptions } from "./QROptions";
import { QRCode, Gradient, FilterFunction } from "../types";
export default class QRCanvas {
_canvas: HTMLCanvasElement;
_options: RequiredOptions;
_qr?: QRCode;
_image?: HTMLImageElement;
constructor(options: RequiredOptions);
get context(): CanvasRenderingContext2D | null;
get width(): number;
get height(): number;
getCanvas(): HTMLCanvasElement;
clear(): void;
drawQR(qr: QRCode): Promise<void>;
drawBackground(): void;
drawDots(filter?: FilterFunction): void;
drawCorners(filter?: FilterFunction): void;
loadImage(): Promise<void>;
drawImage({ width, height, count, dotSize }: {
width: number;
height: number;
count: number;
dotSize: number;
}): void;
_createGradient({ context, options, additionalRotation, x, y, size }: {
context: CanvasRenderingContext2D;
options: Gradient;
additionalRotation: number;
x: number;
y: number;
size: number;
}): CanvasGradient;
}

View File

@@ -0,0 +1,20 @@
import QRCanvas from "./QRCanvas";
import QRSVG from "./QRSVG";
import { RequiredOptions } from "./QROptions";
import { Extension, QRCode, Options, DownloadOptions } from "../types";
export default class QRCodeStyling {
_options: RequiredOptions;
_container?: HTMLElement;
_canvas?: QRCanvas;
_svg?: QRSVG;
_qr?: QRCode;
_canvasDrawingPromise?: Promise<void>;
_svgDrawingPromise?: Promise<void>;
constructor(options?: Partial<Options>);
static _clearContainer(container?: HTMLElement): void;
_getQRStylingElement(extension?: Extension): Promise<QRCanvas | QRSVG>;
update(options?: Partial<Options>): void;
append(container?: HTMLElement): void;
getRawData(extension?: Extension): Promise<Blob | null>;
download(downloadOptions?: Partial<DownloadOptions> | string): Promise<void>;
}

View File

@@ -0,0 +1,30 @@
import { DotType, Options, TypeNumber, ErrorCorrectionLevel, Mode, DrawType, Gradient } from "../types";
export interface RequiredOptions extends Options {
type: DrawType;
width: number;
height: number;
margin: number;
data: string;
qrOptions: {
typeNumber: TypeNumber;
mode?: Mode;
errorCorrectionLevel: ErrorCorrectionLevel;
};
imageOptions: {
hideBackgroundDots: boolean;
imageSize: number;
crossOrigin?: string;
margin: number;
};
dotsOptions: {
type: DotType;
color: string;
gradient?: Gradient;
};
backgroundOptions: {
color: string;
gradient?: Gradient;
};
}
declare const defaultOptions: RequiredOptions;
export default defaultOptions;

View File

@@ -0,0 +1,38 @@
import { RequiredOptions } from "./QROptions";
import { QRCode, FilterFunction, Gradient } from "../types";
export default class QRSVG {
_element: SVGElement;
_defs: SVGElement;
_dotsClipPath?: SVGElement;
_cornersSquareClipPath?: SVGElement;
_cornersDotClipPath?: SVGElement;
_options: RequiredOptions;
_qr?: QRCode;
_image?: HTMLImageElement;
constructor(options: RequiredOptions);
get width(): number;
get height(): number;
getElement(): SVGElement;
clear(): void;
drawQR(qr: QRCode): Promise<void>;
drawBackground(): void;
drawDots(filter?: FilterFunction): void;
drawCorners(): void;
loadImage(): Promise<void>;
drawImage({ width, height, count, dotSize }: {
width: number;
height: number;
count: number;
dotSize: number;
}): void;
_createColor({ options, color, additionalRotation, x, y, height, width, name }: {
options?: Gradient;
color?: string;
additionalRotation: number;
x: number;
y: number;
height: number;
width: number;
name: string;
}): void;
}

View File

@@ -0,0 +1,15 @@
import { CornerDotType, RotateFigureArgsCanvas, BasicFigureDrawArgsCanvas, DrawArgsCanvas } from "../../../types";
export default class QRCornerDot {
_context: CanvasRenderingContext2D;
_type: CornerDotType;
constructor({ context, type }: {
context: CanvasRenderingContext2D;
type: CornerDotType;
});
draw(x: number, y: number, size: number, rotation: number): void;
_rotateFigure({ x, y, size, context, rotation, draw }: RotateFigureArgsCanvas): void;
_basicDot(args: BasicFigureDrawArgsCanvas): void;
_basicSquare(args: BasicFigureDrawArgsCanvas): void;
_drawDot({ x, y, size, context, rotation }: DrawArgsCanvas): void;
_drawSquare({ x, y, size, context, rotation }: DrawArgsCanvas): void;
}

View File

@@ -0,0 +1,16 @@
import { CornerDotType, RotateFigureArgs, BasicFigureDrawArgs, DrawArgs } from "../../../types";
export default class QRCornerDot {
_element?: SVGElement;
_svg: SVGElement;
_type: CornerDotType;
constructor({ svg, type }: {
svg: SVGElement;
type: CornerDotType;
});
draw(x: number, y: number, size: number, rotation: number): void;
_rotateFigure({ x, y, size, rotation, draw }: RotateFigureArgs): void;
_basicDot(args: BasicFigureDrawArgs): void;
_basicSquare(args: BasicFigureDrawArgs): void;
_drawDot({ x, y, size, rotation }: DrawArgs): void;
_drawSquare({ x, y, size, rotation }: DrawArgs): void;
}

View File

@@ -0,0 +1,17 @@
import { CornerSquareType, RotateFigureArgsCanvas, BasicFigureDrawArgsCanvas, DrawArgsCanvas } from "../../../types";
export default class QRCornerSquare {
_context: CanvasRenderingContext2D;
_type: CornerSquareType;
constructor({ context, type }: {
context: CanvasRenderingContext2D;
type: CornerSquareType;
});
draw(x: number, y: number, size: number, rotation: number): void;
_rotateFigure({ x, y, size, context, rotation, draw }: RotateFigureArgsCanvas): void;
_basicDot(args: BasicFigureDrawArgsCanvas): void;
_basicSquare(args: BasicFigureDrawArgsCanvas): void;
_basicExtraRounded(args: BasicFigureDrawArgsCanvas): void;
_drawDot({ x, y, size, context, rotation }: DrawArgsCanvas): void;
_drawSquare({ x, y, size, context, rotation }: DrawArgsCanvas): void;
_drawExtraRounded({ x, y, size, context, rotation }: DrawArgsCanvas): void;
}

View File

@@ -0,0 +1,18 @@
import { CornerSquareType, DrawArgs, BasicFigureDrawArgs, RotateFigureArgs } from "../../../types";
export default class QRCornerSquare {
_element?: SVGElement;
_svg: SVGElement;
_type: CornerSquareType;
constructor({ svg, type }: {
svg: SVGElement;
type: CornerSquareType;
});
draw(x: number, y: number, size: number, rotation: number): void;
_rotateFigure({ x, y, size, rotation, draw }: RotateFigureArgs): void;
_basicDot(args: BasicFigureDrawArgs): void;
_basicSquare(args: BasicFigureDrawArgs): void;
_basicExtraRounded(args: BasicFigureDrawArgs): void;
_drawDot({ x, y, size, rotation }: DrawArgs): void;
_drawSquare({ x, y, size, rotation }: DrawArgs): void;
_drawExtraRounded({ x, y, size, rotation }: DrawArgs): void;
}

View File

@@ -0,0 +1,24 @@
import { DotType, GetNeighbor, RotateFigureArgsCanvas, BasicFigureDrawArgsCanvas, DrawArgsCanvas } from "../../../types";
export default class QRDot {
_context: CanvasRenderingContext2D;
_type: DotType;
constructor({ context, type }: {
context: CanvasRenderingContext2D;
type: DotType;
});
draw(x: number, y: number, size: number, getNeighbor: GetNeighbor): void;
_rotateFigure({ x, y, size, context, rotation, draw }: RotateFigureArgsCanvas): void;
_basicDot(args: BasicFigureDrawArgsCanvas): void;
_basicSquare(args: BasicFigureDrawArgsCanvas): void;
_basicSideRounded(args: BasicFigureDrawArgsCanvas): void;
_basicCornerRounded(args: BasicFigureDrawArgsCanvas): void;
_basicCornerExtraRounded(args: BasicFigureDrawArgsCanvas): void;
_basicCornersRounded(args: BasicFigureDrawArgsCanvas): void;
_basicCornersExtraRounded(args: BasicFigureDrawArgsCanvas): void;
_drawDot({ x, y, size, context }: DrawArgsCanvas): void;
_drawSquare({ x, y, size, context }: DrawArgsCanvas): void;
_drawRounded({ x, y, size, context, getNeighbor }: DrawArgsCanvas): void;
_drawExtraRounded({ x, y, size, context, getNeighbor }: DrawArgsCanvas): void;
_drawClassy({ x, y, size, context, getNeighbor }: DrawArgsCanvas): void;
_drawClassyRounded({ x, y, size, context, getNeighbor }: DrawArgsCanvas): void;
}

View File

@@ -0,0 +1,24 @@
import { DotType, GetNeighbor, DrawArgs, BasicFigureDrawArgs, RotateFigureArgs } from "../../../types";
export default class QRDot {
_element?: SVGElement;
_svg: SVGElement;
_type: DotType;
constructor({ svg, type }: {
svg: SVGElement;
type: DotType;
});
draw(x: number, y: number, size: number, getNeighbor: GetNeighbor): void;
_rotateFigure({ x, y, size, rotation, draw }: RotateFigureArgs): void;
_basicDot(args: BasicFigureDrawArgs): void;
_basicSquare(args: BasicFigureDrawArgs): void;
_basicSideRounded(args: BasicFigureDrawArgs): void;
_basicCornerRounded(args: BasicFigureDrawArgs): void;
_basicCornerExtraRounded(args: BasicFigureDrawArgs): void;
_basicCornersRounded(args: BasicFigureDrawArgs): void;
_drawDot({ x, y, size }: DrawArgs): void;
_drawSquare({ x, y, size }: DrawArgs): void;
_drawRounded({ x, y, size, getNeighbor }: DrawArgs): void;
_drawExtraRounded({ x, y, size, getNeighbor }: DrawArgs): void;
_drawClassy({ x, y, size, getNeighbor }: DrawArgs): void;
_drawClassyRounded({ x, y, size, getNeighbor }: DrawArgs): void;
}

12
frontend/node_modules/qr-code-styling/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import QRCodeStyling from "./core/QRCodeStyling";
import dotTypes from "./constants/dotTypes";
import cornerDotTypes from "./constants/cornerDotTypes";
import cornerSquareTypes from "./constants/cornerSquareTypes";
import errorCorrectionLevels from "./constants/errorCorrectionLevels";
import errorCorrectionPercents from "./constants/errorCorrectionPercents";
import modes from "./constants/modes";
import qrTypes from "./constants/qrTypes";
import drawTypes from "./constants/drawTypes";
export * from "./types";
export { dotTypes, cornerDotTypes, cornerSquareTypes, errorCorrectionLevels, errorCorrectionPercents, modes, qrTypes, drawTypes };
export default QRCodeStyling;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
interface ImageSizeOptions {
originalHeight: number;
originalWidth: number;
maxHiddenDots: number;
maxHiddenAxisDots?: number;
dotSize: number;
}
interface ImageSizeResult {
height: number;
width: number;
hideYDots: number;
hideXDots: number;
}
export default function calculateImageSize({ originalHeight, originalWidth, maxHiddenDots, maxHiddenAxisDots, dotSize }: ImageSizeOptions): ImageSizeResult;
export {};

View File

@@ -0,0 +1 @@
export default function downloadURI(uri: string, name: string): void;

View File

@@ -0,0 +1,2 @@
import { Mode } from "../types";
export default function getMode(data: string): Mode;

View File

@@ -0,0 +1,2 @@
import { UnknownObject } from "../types";
export default function mergeDeep(target: UnknownObject, ...sources: UnknownObject[]): UnknownObject;

View File

@@ -0,0 +1,2 @@
import { RequiredOptions } from "../core/QROptions";
export default function sanitizeOptions(options: RequiredOptions): RequiredOptions;

View File

@@ -0,0 +1,125 @@
export interface UnknownObject {
[key: string]: any;
}
export declare type DotType = "dots" | "rounded" | "classy" | "classy-rounded" | "square" | "extra-rounded";
export declare type CornerDotType = "dot" | "square";
export declare type CornerSquareType = "dot" | "square" | "extra-rounded";
export declare type Extension = "svg" | "png" | "jpeg" | "webp";
export declare type GradientType = "radial" | "linear";
export declare type DrawType = "canvas" | "svg";
export declare type Gradient = {
type: GradientType;
rotation?: number;
colorStops: {
offset: number;
color: string;
}[];
};
export interface DotTypes {
[key: string]: DotType;
}
export interface GradientTypes {
[key: string]: GradientType;
}
export interface CornerDotTypes {
[key: string]: CornerDotType;
}
export interface CornerSquareTypes {
[key: string]: CornerSquareType;
}
export interface DrawTypes {
[key: string]: DrawType;
}
export declare type TypeNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40;
export declare type ErrorCorrectionLevel = "L" | "M" | "Q" | "H";
export declare type Mode = "Numeric" | "Alphanumeric" | "Byte" | "Kanji";
export interface QRCode {
addData(data: string, mode?: Mode): void;
make(): void;
getModuleCount(): number;
isDark(row: number, col: number): boolean;
createImgTag(cellSize?: number, margin?: number): string;
createSvgTag(cellSize?: number, margin?: number): string;
createSvgTag(opts?: {
cellSize?: number;
margin?: number;
scalable?: boolean;
}): string;
createDataURL(cellSize?: number, margin?: number): string;
createTableTag(cellSize?: number, margin?: number): string;
createASCII(cellSize?: number, margin?: number): string;
renderTo2dContext(context: CanvasRenderingContext2D, cellSize?: number): void;
}
export declare type Options = {
type?: DrawType;
width?: number;
height?: number;
margin?: number;
data?: string;
image?: string;
qrOptions?: {
typeNumber?: TypeNumber;
mode?: Mode;
errorCorrectionLevel?: ErrorCorrectionLevel;
};
imageOptions?: {
hideBackgroundDots?: boolean;
imageSize?: number;
crossOrigin?: string;
margin?: number;
};
dotsOptions?: {
type?: DotType;
color?: string;
gradient?: Gradient;
};
cornersSquareOptions?: {
type?: CornerSquareType;
color?: string;
gradient?: Gradient;
};
cornersDotOptions?: {
type?: CornerDotType;
color?: string;
gradient?: Gradient;
};
backgroundOptions?: {
color?: string;
gradient?: Gradient;
};
};
export declare type FilterFunction = (i: number, j: number) => boolean;
export declare type DownloadOptions = {
name?: string;
extension?: Extension;
};
export declare type DrawArgs = {
x: number;
y: number;
size: number;
rotation?: number;
getNeighbor?: GetNeighbor;
};
export declare type BasicFigureDrawArgs = {
x: number;
y: number;
size: number;
rotation?: number;
};
export declare type RotateFigureArgs = {
x: number;
y: number;
size: number;
rotation?: number;
draw: () => void;
};
export declare type DrawArgsCanvas = DrawArgs & {
context: CanvasRenderingContext2D;
};
export declare type BasicFigureDrawArgsCanvas = BasicFigureDrawArgs & {
context: CanvasRenderingContext2D;
};
export declare type RotateFigureArgsCanvas = RotateFigureArgs & {
context: CanvasRenderingContext2D;
};
export declare type GetNeighbor = (x: number, y: number) => boolean;

67
frontend/node_modules/qr-code-styling/package.json generated vendored Normal file
View File

@@ -0,0 +1,67 @@
{
"name": "qr-code-styling",
"version": "1.5.0",
"description": "Add a style and an image to your QR code",
"main": "lib/qr-code-styling.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"dependencies": {
"qrcode-generator": "^1.4.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"canvas": "^2.6.1",
"clean-webpack-plugin": "^3.0.0",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.3.1",
"html-webpack-plugin": "^4.5.1",
"jest": "^26.6.3",
"jest-environment-jsdom-fifteen": "^1.0.0",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"ts-loader": "^8.0.14",
"typescript": "^4.1.3",
"webpack": "^5.12.3",
"webpack-cli": "^4.3.1",
"webpack-dev-server": "^3.11.1",
"webpack-merge": "^5.7.3"
},
"scripts": {
"build": "webpack --mode=production --config webpack.config.build.js",
"build:dev": "webpack --mode=development --config webpack.config.build.js",
"test": "jest",
"start": "webpack serve --open --config webpack.config.dev-server.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kozakdenys/qr-code-styling.git"
},
"keywords": [
"qr",
"qrcode",
"qr-code",
"js",
"qrjs",
"qrstyling",
"styling",
"qrbranding",
"branding",
"qrimage",
"image",
"qrlogo",
"logo",
"design"
],
"author": "Denys Kozak <kozak.denys.dev@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/kozakdenys/qr-code-styling/issues"
},
"homepage": "https://qr-code-styling.com"
}