@qr-platform/qr-code.js 0.8.17 → 0.8.19
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/.github/workflows/gh-pages.yml +50 -0
- package/.github/workflows/publish.yml +24 -4
- package/CHANGELOG.md +6 -1
- package/README.md +44 -21
- package/docs/documentation.md +11 -0
- package/docs/usage-guide.md +11 -0
- package/lib/qr-code-js-node.js +1 -1
- package/lib/qr-code-js.js +1 -1
- package/package.json +5 -5
@@ -0,0 +1,50 @@
|
|
1
|
+
name: Deploy Documentation with GitHub Pages
|
2
|
+
|
3
|
+
on:
|
4
|
+
# Runs on pushes targeting the default branch
|
5
|
+
push:
|
6
|
+
branches: ["main"]
|
7
|
+
|
8
|
+
# Allows you to run this workflow manually from the Actions tab
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
12
|
+
permissions:
|
13
|
+
contents: read
|
14
|
+
pages: write
|
15
|
+
id-token: write
|
16
|
+
|
17
|
+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
18
|
+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
19
|
+
concurrency:
|
20
|
+
group: "pages"
|
21
|
+
cancel-in-progress: false
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
# Build job
|
25
|
+
build:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
steps:
|
28
|
+
- name: Checkout
|
29
|
+
uses: actions/checkout@v4
|
30
|
+
- name: Setup Pages
|
31
|
+
uses: actions/configure-pages@v5
|
32
|
+
- name: Build with Jekyll
|
33
|
+
uses: actions/jekyll-build-pages@v1
|
34
|
+
with:
|
35
|
+
source: ./
|
36
|
+
destination: ./_site
|
37
|
+
- name: Upload artifact
|
38
|
+
uses: actions/upload-pages-artifact@v3
|
39
|
+
|
40
|
+
# Deployment job
|
41
|
+
deploy:
|
42
|
+
environment:
|
43
|
+
name: github-pages
|
44
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
45
|
+
runs-on: ubuntu-latest
|
46
|
+
needs: build
|
47
|
+
steps:
|
48
|
+
- name: Deploy to GitHub Pages
|
49
|
+
id: deployment
|
50
|
+
uses: actions/deploy-pages@v4
|
@@ -4,15 +4,35 @@ on:
|
|
4
4
|
push:
|
5
5
|
branches:
|
6
6
|
- main
|
7
|
+
workflow_dispatch: # Enables manual triggering
|
7
8
|
|
8
9
|
jobs:
|
9
10
|
publish:
|
10
11
|
runs-on: ubuntu-latest
|
11
12
|
steps:
|
12
13
|
- name: Checkout code
|
13
|
-
uses: actions/checkout@
|
14
|
+
uses: actions/checkout@v4
|
14
15
|
|
15
|
-
- name:
|
16
|
+
- name: Set up Node.js
|
17
|
+
uses: actions/setup-node@v4
|
18
|
+
with:
|
19
|
+
node-version: '22'
|
20
|
+
registry-url: 'https://registry.npmjs.org'
|
21
|
+
|
22
|
+
- name: Check if version exists
|
23
|
+
id: check_version
|
16
24
|
run: |
|
17
|
-
|
18
|
-
npm
|
25
|
+
VERSION=$(node -p "require('./package.json').version")
|
26
|
+
if npm view ${GITHUB_REPOSITORY#*/}@${VERSION} version >/dev/null 2>&1; then
|
27
|
+
echo "Version ${VERSION} already exists on npm, skipping publish."
|
28
|
+
echo "skip_publish=true" >> $GITHUB_OUTPUT
|
29
|
+
else
|
30
|
+
echo "Version ${VERSION} does not exist, proceeding with publish."
|
31
|
+
echo "skip_publish=false" >> $GITHUB_OUTPUT
|
32
|
+
fi
|
33
|
+
|
34
|
+
- name: Publish to npm
|
35
|
+
if: steps.check_version.outputs.skip_publish == 'false'
|
36
|
+
run: npm publish --access public
|
37
|
+
env:
|
38
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CHANGELOG.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
# @qr-platform/qr-code-js
|
2
2
|
|
3
|
+
## 0.8.19
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 5cfd829: Readme, Documentation, License updates
|
8
|
+
|
3
9
|
## 0.8.17
|
4
10
|
|
5
11
|
### Patch Changes
|
6
12
|
|
7
|
-
- 809309c: Domain validation from token
|
8
13
|
- a3d5390: Update to Validation and Node library
|
9
14
|
|
10
15
|
## 0.8.16
|
package/README.md
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
# QRCode.js -
|
1
|
+
# QRCode.js - Simple, Beautiful, Reliable
|
2
2
|
|
3
3
|
[](https://badge.fury.io/js/%40qr-platform%2Fqr-code.js)
|
4
4
|
|
5
5
|
<!-- Add other badges like build status, coverage, etc. if available -->
|
6
6
|
|
7
|
-
##
|
8
|
-
##### Create Beautiful, Reliable QR Codes with Ease
|
7
|
+
## Create Beautiful, Reliable QR Codes with Ease
|
9
8
|
|
10
|
-
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](https://qr-platform.com): All-in-One QR Codes Management Solution.
|
9
|
+
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](https://www.qr-platform.com): All-in-One QR Codes Management Solution.
|
11
10
|
|
12
|
-

|
11
|
+
<!--  Placeholder: Replace with an actual representative image URL if available -->
|
13
12
|
|
14
13
|
## ✨ Features
|
15
14
|
* **Core QR Code Generation**: Encode any text, URL, or data.
|
@@ -26,19 +25,33 @@ QRCode.js is a professional JavaScript/TypeScript library for creating customize
|
|
26
25
|
|
27
26
|
## 🚀 Installation
|
28
27
|
|
28
|
+
|
29
|
+
#### NPM ⤵️
|
30
|
+
|
29
31
|
```bash
|
30
|
-
# Using npm
|
31
32
|
npm install @qr-platform/qr-code.js
|
33
|
+
```
|
32
34
|
|
33
|
-
|
35
|
+
#### YARN ⤵️
|
36
|
+
```bash
|
34
37
|
yarn add @qr-platform/qr-code.js
|
35
|
-
|
36
|
-
|
38
|
+
```
|
39
|
+
#### PNPM ⤵️
|
40
|
+
```bash
|
37
41
|
pnpm add @qr-platform/qr-code.js
|
38
42
|
```
|
39
43
|
|
40
44
|
## 💡 Basic Usage
|
41
45
|
|
46
|
+
```typescript
|
47
|
+
import { QRCodeJs } from '@qr-platform/qr-code.js';
|
48
|
+
|
49
|
+
const qrCode = new QRCodeJs({ data: 'https://example.com' });
|
50
|
+
qrCode.append(document.getElementById('qr-container'));
|
51
|
+
|
52
|
+
```
|
53
|
+
#### or
|
54
|
+
|
42
55
|
```typescript
|
43
56
|
import { QRCodeJs, Options } from '@qr-platform/qr-code.js';
|
44
57
|
|
@@ -91,14 +104,14 @@ qrCode.serialize().then(svgString => {
|
|
91
104
|
| `imageOptions` | Options for the embedded image (size, margin). | `{ imageSize: 0.3, margin: 2 }` |
|
92
105
|
| `borderOptions` | **Premium.** Options for decorative borders. | `{ hasBorder: true, thickness: 20, ... }` |
|
93
106
|
|
94
|
-
|
107
|
+
#### For a full list of options, see the [API Reference Guide](https://qr-platform.github.io/qr-code.js/docs/api-reference-guide.html).
|
95
108
|
|
96
109
|
## 🎨 Examples
|
97
110
|
|
98
111
|
Explore various configurations:
|
99
112
|
|
100
|
-
*
|
101
|
-
*
|
113
|
+
* #### [Basic Examples](https://qr-platform.github.io/qr-code.js/docs/examples.html) Get started with common use cases.
|
114
|
+
* #### [Advanced Examples](https://qr-platform.github.io/qr-code.js/docs/advanced-examples.html) Dive deep into customization possibilities.
|
102
115
|
|
103
116
|
## 🖥️ Node.js Usage
|
104
117
|
|
@@ -128,7 +141,17 @@ qrCode.serialize().then(svgString => {
|
|
128
141
|
**Key Differences:**
|
129
142
|
* Import from `@qr-platform/qr-code.js/node`.
|
130
143
|
* Methods requiring a DOM like `append()` or `download()` are not available. Use `serialize()` to get the SVG string.
|
131
|
-
* License activation (if needed) persists only in memory per session. See [License Management](
|
144
|
+
* License activation (if needed) persists only in memory per session. See [License Management](https://qr-platform.github.io/qr-code.js/docs/license-management.html) for details.
|
145
|
+
* **Peer Dependencies:** You must install the required `peerDependencies` for Node.js functionality.
|
146
|
+
|
147
|
+
Install automatically using npx:
|
148
|
+
```bash
|
149
|
+
npx i-peers
|
150
|
+
```
|
151
|
+
Install manually using npm:
|
152
|
+
````bash
|
153
|
+
npm i @xmldom/xmldom @undecaf/zbar-wasm image-size jose jimp @resvg/resvg-js file-type
|
154
|
+
````
|
132
155
|
|
133
156
|
## 🔑 License Management (Free vs. Premium)
|
134
157
|
|
@@ -172,17 +195,17 @@ const qrPremium = new QRCodeJs({
|
|
172
195
|
});
|
173
196
|
```
|
174
197
|
|
175
|
-
|
198
|
+
##### For full details on activation, persistence, configuration, and backend implementation, see the [License Management Guide](https://qr-platform.github.io/qr-code.js/docs/license-management.html).
|
176
199
|
|
177
200
|
## 📚 Documentation
|
178
201
|
|
179
|
-
*
|
180
|
-
*
|
181
|
-
*
|
182
|
-
*
|
183
|
-
*
|
184
|
-
*
|
202
|
+
* ##### [Usage Guide](https://qr-platform.github.io/qr-code.js/docs/usage-guide.html) Comprehensive guide covering all options.
|
203
|
+
* ##### [API Reference](https://qr-platform.github.io/qr-code.js/docs/api-reference-guide.html) Detailed reference for all options, methods, and enums.
|
204
|
+
* ##### [TypeScript Definitions](https://qr-platform.github.io/qr-code.js/docs/typescript-types-definitions.html) Full TypeScript type definitions.
|
205
|
+
* ##### [Basic Examples](https://qr-platform.github.io/qr-code.js/docs/examples.html) Simple examples to get started.
|
206
|
+
* ##### [Advanced Examples](https://qr-platform.github.io/qr-code.js/docs/advanced-examples.html) Complex customization examples.
|
207
|
+
* ##### [License Management](https://qr-platform.github.io/qr-code.js/docs/license-management.html) Details on free vs. premium features and activation.
|
185
208
|
|
186
209
|
## 📜 License
|
187
210
|
|
188
|
-
This
|
211
|
+
This Software is licensed, not sold, by QR-Platform ("Licensor") for use only under the terms of this license. The source code for the Software is proprietary, confidential, and is **not** provided or licensed under this agreement. Licensor reserves all rights not expressly granted to User - see the [LICENSE](https://qr-platform.github.io/qr-code.js/LICENSE.md) file for details. Premium features require a separate commercial license from [QR-Platform](https://www.qr-platform.com).
|
package/docs/documentation.md
CHANGED
@@ -827,6 +827,17 @@ qrCode.serialize().then(svgString => {
|
|
827
827
|
### Key Differences & Considerations
|
828
828
|
|
829
829
|
- **Import Path**: Use `import { QRCodeJs } from '@qr-platform/qr-code.js/node';`.
|
830
|
+
|
831
|
+
- **Peer Dependencies:** You must install the required `peerDependencies` for Node.js functionality.
|
832
|
+
|
833
|
+
Install automatically using npx:
|
834
|
+
```bash
|
835
|
+
npx i-peers @qr-platform/qr-code.js
|
836
|
+
```
|
837
|
+
Install manually using npm:
|
838
|
+
```bash
|
839
|
+
npm i @xmldom/xmldom @undecaf/zbar-wasm image-size jose jimp @resvg/resvg-js file-type
|
840
|
+
```
|
830
841
|
- **No Canvas/Download**: Methods relying on browser APIs like `append()`, `download()`, or internal canvas generation are not available or behave differently in the Node.js version.
|
831
842
|
- **License Management**: Use the static methods described in the [License Management](#license-management) section.
|
832
843
|
- **Border Branding**: Similar to the browser version, Node.js will add "QR-Platform" branding to borders in the free version. To remove this, you'll need to activate a license.
|
package/docs/usage-guide.md
CHANGED
@@ -410,6 +410,17 @@ To use QRCode.js in a Node.js environment:
|
|
410
410
|
- **Key considerations**:
|
411
411
|
- Use `serialize()` to obtain the SVG as a string for further processing.
|
412
412
|
|
413
|
+
- **Peer Dependencies:** You must install the required `peerDependencies` for Node.js functionality.
|
414
|
+
|
415
|
+
Install automatically using npx:
|
416
|
+
```bash
|
417
|
+
npx i-peers @qr-platform/qr-code.js
|
418
|
+
```
|
419
|
+
Install manually using npm:
|
420
|
+
```bash
|
421
|
+
npm i @xmldom/xmldom @undecaf/zbar-wasm image-size jose jimp @resvg/resvg-js file-type
|
422
|
+
```
|
423
|
+
|
413
424
|
---
|
414
425
|
<a id="license-management"></a>
|
415
426
|
### License Management
|