@qr-platform/qr-code.js 0.8.23 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/docs/advanced-examples.md +84 -0
- package/docs/api-reference-guide.md +38 -0
- package/docs/documentation.md +182 -0
- package/docs/examples.md +145 -27
- package/docs/template-update-plan.md +53 -0
- package/docs/usage-guide.md +47 -0
- package/lib/core/qr-code-js.d.ts +11 -0
- package/lib/core/qr-styles.d.ts +4 -0
- package/lib/index.d.ts +34 -7
- package/lib/index.js +1 -1
- package/lib/node.d.ts +34 -9
- package/lib/node.js +1 -1
- package/lib/types/style-options.d.ts +37 -0
- package/lib/utils/style-mapper.d.ts +13 -0
- package/package.json +1 -1
@@ -0,0 +1,37 @@
|
|
1
|
+
import { Gradient } from '../utils/gradient';
|
2
|
+
import { CornerDotType, CornerSquareType, DotType, ImageMode } from '../utils/options';
|
3
|
+
/**
|
4
|
+
* Simplified options for styling QR codes.
|
5
|
+
* These options are mapped to the more detailed QRCodeJs Options structure.
|
6
|
+
*/
|
7
|
+
export interface StyleOptions {
|
8
|
+
primaryColor?: string;
|
9
|
+
secondaryColor?: string;
|
10
|
+
thirdColor?: string;
|
11
|
+
backgroundColor?: string;
|
12
|
+
dotsGradient?: Gradient;
|
13
|
+
cornersDotGradient?: Gradient;
|
14
|
+
cornersGradient?: Gradient;
|
15
|
+
backgroundGradient?: Gradient;
|
16
|
+
dotShape?: DotType;
|
17
|
+
cornerSquareShape?: CornerSquareType;
|
18
|
+
cornerDotShape?: CornerDotType;
|
19
|
+
logo?: string | Buffer | Blob;
|
20
|
+
logoSize?: number;
|
21
|
+
logoMode?: ImageMode;
|
22
|
+
logoMargin?: number;
|
23
|
+
logoFillColor?: string;
|
24
|
+
logoFillGradient?: Gradient;
|
25
|
+
borderColor?: string;
|
26
|
+
borderThickness?: number;
|
27
|
+
borderRadius?: string | number;
|
28
|
+
borderTextTop?: string;
|
29
|
+
borderTextRight?: string;
|
30
|
+
borderTextBottom?: string;
|
31
|
+
borderTextLeft?: string;
|
32
|
+
borderFontFace?: string;
|
33
|
+
borderFontSize?: number;
|
34
|
+
borderFontColor?: string;
|
35
|
+
borderLetterSpacing?: number;
|
36
|
+
borderFontWeight?: string;
|
37
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { RecursivePartial } from '../types/helper';
|
2
|
+
import { StyleOptions } from '../types/style-options';
|
3
|
+
import { Options } from './options';
|
4
|
+
/**
|
5
|
+
* Maps simplified StyleOptions to the detailed QRCodeJs Options structure.
|
6
|
+
* @param styles - The StyleOptions object to map.
|
7
|
+
* @returns A RecursivePartial<Options> object reflecting the styles.
|
8
|
+
*/
|
9
|
+
export declare function mapStyleToOptions(styles: StyleOptions): RecursivePartial<Options>;
|
10
|
+
export declare function validateStyleOptions(styles: any): {
|
11
|
+
isValid: boolean;
|
12
|
+
errors: string[];
|
13
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@qr-platform/qr-code.js",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.9.0",
|
4
4
|
"description": "QRCode.js is a professional JavaScript/TypeScript library for creating customized QR codes, offering a blend of simplicity and sophistication. With versatile styling options—dot shapes, colors, gradients, embedded images, borders, and text—it enables you to design unique, visually appealing QR codes that work flawlessly with standard scanners. QRCode.js is part of QR-Platform: All-in-One QR Codes Management Solution.",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./lib/node.js",
|