@qr-platform/qr-code.js 0.8.17 โ†’ 0.8.20

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.
@@ -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,40 @@ 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@v2
14
+ uses: actions/checkout@v4
14
15
 
15
- - name: Publish to npm
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
+ # --- Check if version already exists ---
23
+ - name: Check if version exists on npm
24
+ id: check_version
16
25
  run: |
17
- npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
18
- npm publish --access public
26
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
27
+ VERSION=$(node -p "require('./package.json').version")
28
+ echo "Checking if package '${PACKAGE_NAME}@${VERSION}' exists on npm..."
29
+ if npm view "${PACKAGE_NAME}@${VERSION}" version > /dev/null 2>&1; then
30
+ echo "Version ${VERSION} of ${PACKAGE_NAME} already exists on npm. Skipping publish."
31
+ echo "skip_publish=true" >> $GITHUB_OUTPUT
32
+ else
33
+ echo "Version ${VERSION} of ${PACKAGE_NAME} does not exist on npm. Proceeding with publish."
34
+ echo "skip_publish=false" >> $GITHUB_OUTPUT
35
+ fi
36
+
37
+ # --- Publish Step ---
38
+ - name: Publish to npm
39
+ # Only run this step if check_version determined skip_publish is 'false'
40
+ if: steps.check_version.outputs.skip_publish == 'false'
41
+ run: npm publish
42
+ env:
43
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,10 +1,21 @@
1
1
  # @qr-platform/qr-code-js
2
2
 
3
+ ## 0.8.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 90fd9b4: Update to license manager domain check array
8
+
9
+ ## 0.8.19
10
+
11
+ ### Patch Changes
12
+
13
+ - 5cfd829: Readme, Documentation, License updates
14
+
3
15
  ## 0.8.17
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - 809309c: Domain validation from token
8
19
  - a3d5390: Update to Validation and Node library
9
20
 
10
21
  ## 0.8.16
package/README.md CHANGED
@@ -1,15 +1,14 @@
1
- # QRCode.js - @qr-platform/qr-code.js
1
+ # QRCode.js - Simple, Beautiful, Reliable
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/%40qr-platform%2Fqr-code.js.svg)](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
- ## Simple, Beautiful, Reliable
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
- ![QR Code Styling Example](https://raw.githubusercontent.com/qr-platform/qr-code.js/main/src/assets/qr-styling.png) <!-- Placeholder: Replace with an actual representative image URL if available -->
11
+ <!-- ![QR Code Styling Example](https://raw.githubusercontent.com/qr-platform/qr-code.js/main/src/assets/qr-styling.png) 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
- # Using yarn
35
+ #### YARN โคต๏ธ
36
+ ```bash
34
37
  yarn add @qr-platform/qr-code.js
35
-
36
- # Using pnpm
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
- *For a full list of options, see the [API Reference Guide](./docs/api-reference-guide.md#start).*
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
- * **[Basic Examples](./docs/examples.md#start):** Get started with common use cases.
101
- * **[Advanced Examples](./docs/advanced-examples.md#start):** Dive deep into customization possibilities.
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](./docs/license-management.md#start).
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
- *For full details on activation, persistence, configuration, and backend implementation, see the [License Management Guide](./docs/license-management.md#start).*
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
- * **[Usage Guide](./docs/usage-guide.md#start):** Comprehensive guide covering all options.
180
- * **[API Reference](./docs/api-reference-guide.md#start):** Detailed reference for all options, methods, and enums.
181
- * **[TypeScript Definitions](./docs/typescript-types-definitions.md#start):** Full TypeScript type definitions.
182
- * **[Basic Examples](./docs/examples.md#start):** Simple examples to get started.
183
- * **[Advanced Examples](./docs/advanced-examples.md#start):** Complex customization examples.
184
- * **[License Management](./docs/license-management.md#start):** Details on free vs. premium features and activation.
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 project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. Premium features require a separate commercial license from [QR-Platform](https://qr-platform.com).
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).
@@ -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.
@@ -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