@qrcodesdk/angular 0.0.1 → 0.0.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @qrcodesdk/angular
2
2
 
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 210c615: Replace the renderer and styling APIs with the new `matrix`, `style`, `accessibility`, and `image` option groups. Rename visual styling types, renderer image options, and CLI flags to match the new vocabulary. Add `@qrcodesdk/core/payload` for payload helpers, expose them from the core entry point, and improve rendering performance across SVG, canvas, and PNG output.
8
+ - 358292a: Improve rendered output accessibility and browser reliability. SVG output now uses valid title and ARIA markup, canvases can receive accessible labels, images default to an empty alt attribute, SVG download URLs remain alive until the download starts, and Angular SVG downloads safely no-op during server rendering.
9
+ - 358292a: Tighten package export surfaces by marking cross-package implementation types as internal, using explicit Angular component exports, and emitting React's shared interfaces as type-only exports. React components now also use the platform's native child replacement API.
10
+ - 358292a: Refresh generated package READMEs with clearer setup, renderer, customization, download, and runtime guidance. Expand the Angular peer range to support Angular 20 through 22.
11
+ - Updated dependencies [358292a]
12
+ - @qrcodesdk/browser@0.0.2
13
+ - @qrcodesdk/core@0.0.2
14
+
3
15
  ## 0.0.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- <!-- Generated from apps/docs/src/content/docs/packages/angular.mdx. Run `pnpm --filter docs generate-readmes` to update. -->
1
+ <!-- Generated from apps/docs/src/content/docs/packages/angular.mdx. Run `pnpm turbo run generate-readmes --filter=docs` to update. -->
2
2
 
3
- <p align="center"><img src="https://qrcodesdk.dev/favicon.svg" alt="QRCodeSDK logo" width="240"></p>
3
+ <div align="center"><img src="https://qrcodesdk.dev/favicon.svg" alt="QRCodeSDK logo" width="240"></div>
4
4
 
5
5
  # @qrcodesdk/angular
6
6
 
7
- [![Open @qrcodesdk/angular on npmx.dev](https://npmx.dev/api/registry/badge/name/@qrcodesdk/angular?color=7469B6&style=shieldsio)](https://npmx.dev/@qrcodesdk/angular) ![@qrcodesdk/angular version](https://npmx.dev/api/registry/badge/version/@qrcodesdk/angular?color=7469B6&label=version&style=shieldsio) ![@qrcodesdk/angular install size](<https://npmx.dev/api/registry/badge/size/@qrcodesdk/angular?color=7469B6&label=install size&style=shieldsio>) ![@qrcodesdk/angular download/mo](https://npmx.dev/api/registry/badge/downloads-month/@qrcodesdk/angular?color=7469B6&label=download/mo&style=shieldsio) [![@qrcodesdk/angular Source code](<https://npmx.dev/api/registry/badge/name/@qrcodesdk/angular?color=7469B6&label=Source code&value=GitHub ↗&style=shieldsio>)](https://github.com/Dafnik/qrcodesdk/tree/main/packages/angular)
7
+ [![Open @qrcodesdk/angular on npmx.dev](https://npmx.dev/api/registry/badge/name/@qrcodesdk/angular?color=24272c&style=shieldsio)](https://npmx.dev/@qrcodesdk/angular) ![@qrcodesdk/angular version](https://npmx.dev/api/registry/badge/version/@qrcodesdk/angular?color=24272c&label=version&style=shieldsio) ![@qrcodesdk/angular install size](https://npmx.dev/api/registry/badge/size/@qrcodesdk/angular?color=24272c&label=install%20size&style=shieldsio) ![@qrcodesdk/angular download/mo](https://npmx.dev/api/registry/badge/downloads-month/@qrcodesdk/angular?color=24272c&label=download%2Fmo&style=shieldsio) [![@qrcodesdk/angular source code](https://npmx.dev/api/registry/badge/name/@qrcodesdk/angular?color=24272c&label=source%20code&value=GitHub%20%E2%86%97&style=shieldsio)](https://github.com/Dafnik/qrcodesdk/tree/main/packages/angular)
8
8
 
9
- **[Live Demo](https://qrcodesdk.dev/playground/?package=angular)**
9
+ **[Documentation](https://qrcodesdk.dev) | [Live Demo](https://qrcodesdk.dev/playground/?package=angular)**
10
10
 
11
- `@qrcodesdk/angular` provides Angular components for rendering QR codes as inline SVG, PNG-backed Image elements, and Canvas elements.
11
+ Angular components for rendering QR codes as inline SVG, PNG-backed Image elements, and Canvas elements.
12
12
 
13
13
  ## Install
14
14
 
15
15
  ```sh
16
- npm install @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
16
+ npm install @qrcodesdk/angular
17
17
  ```
18
18
 
19
19
  ```sh
20
- pnpm add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
20
+ pnpm add @qrcodesdk/angular
21
21
  ```
22
22
 
23
23
  <details>
@@ -26,25 +26,25 @@ pnpm add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
26
26
  **vp**
27
27
 
28
28
  ```sh
29
- vp add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
29
+ vp add @qrcodesdk/angular
30
30
  ```
31
31
 
32
32
  **deno**
33
33
 
34
34
  ```sh
35
- deno add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
35
+ deno add @qrcodesdk/angular
36
36
  ```
37
37
 
38
38
  **bun**
39
39
 
40
40
  ```sh
41
- bun add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
41
+ bun add @qrcodesdk/angular
42
42
  ```
43
43
 
44
44
  **yarn**
45
45
 
46
46
  ```sh
47
- yarn add @qrcodesdk/angular @qrcodesdk/core @qrcodesdk/browser
47
+ yarn add @qrcodesdk/angular
48
48
  ```
49
49
 
50
50
  </details>
@@ -62,49 +62,37 @@ import {QRCodeCanvas, QRCodeImage, QRCodeSVG} from '@qrcodesdk/angular';
62
62
  selector: 'app-root',
63
63
  imports: [QRCodeSVG, QRCodeImage, QRCodeCanvas],
64
64
  template: `
65
- <qrcode-svg data="https://qrcodesdk.dev" />
66
- <qrcode-image data="https://qrcodesdk.dev" />
67
- <qrcode-canvas data="https://qrcodesdk.dev" />
65
+ <qrcode-svg payload="https://qrcodesdk.dev" />
66
+ <qrcode-image payload="https://qrcodesdk.dev" />
67
+ <qrcode-canvas payload="https://qrcodesdk.dev" />
68
68
  `,
69
69
  })
70
70
  export class App {}
71
71
  ```
72
72
 
73
- ## Components
74
-
75
- | Component | Selector | Output | Download support |
76
- | -------------- | --------------- | ------------------ | ---------------- |
77
- | `QRCodeSVG` | `qrcode-svg` | Inline SVG element | SVG |
78
- | `QRCodeImage` | `qrcode-image` | PNG-backed `<img>` | PNG |
79
- | `QRCodeCanvas` | `qrcode-canvas` | `<canvas>` element | None |
80
-
81
- All components accept:
82
-
83
- | Input | Type | Description |
84
- | --------- | -------------------------- | ------------------------------------------- |
85
- | `data` | `string \| number` | Required QR code payload. |
86
- | `options` | Component-specific options | Optional matrix and renderer configuration. |
73
+ ## Version compatibility
87
74
 
88
- `options` supports shared matrix options such as `version`, `mode`, `errorCorrectionLevel`, and `mask`. Renderer options match the corresponding QRCodeSDK renderer:
75
+ | @qrcodesdk/angular | Angular |
76
+ | ------------------ | ----------------------------- |
77
+ | `0.x.x` | `^20.0.0` `^21.0.0` `^22.0.0` |
89
78
 
90
- - `QRCodeSVG` uses `QRCodeSVGOptions`.
91
- - `QRCodeImage` uses `QRCodeImageOptions`.
92
- - `QRCodeCanvas` uses `QRCodeCanvasOptions`.
93
-
94
- Import `QRCodeSVGOptions` from `@qrcodesdk/core`. Import `QRCodeImageOptions` and `QRCodeCanvasOptions` from `@qrcodesdk/browser`.
79
+ ## Components
95
80
 
96
- ## Matrix options
81
+ | Component | Selector | Output | Download support |
82
+ | -------------- | --------------- | -------------------- | ---------------- |
83
+ | `QRCodeSVG` | `qrcode-svg` | `Inline SVG element` | SVG |
84
+ | `QRCodeImage` | `qrcode-image` | `PNG-backed <img>` | PNG |
85
+ | `QRCodeCanvas` | `qrcode-canvas` | `<canvas> element` | None |
97
86
 
98
- The `options` input combines the component's renderer options with the shared QR matrix options:
87
+ ### Options
99
88
 
100
- | Option | Type | Default | Description |
101
- | ---------------------- | ---------------------------------------- | --------- | ----------------------- |
102
- | `mode` | `'numeric' \| 'alphanumeric' \| 'octet'` | Automatic | Encoding mode. |
103
- | `errorCorrectionLevel` | `'L' \| 'M' \| 'Q' \| 'H'` | `'M'` | Error correction level. |
104
- | `version` | `1` through `40` | Automatic | Pins the QR version. |
105
- | `mask` | `0` through `7` | Automatic | Pins the QR mask. |
89
+ | Prop | Type | Description |
90
+ | --------- | ---------------------------- | ------------------------------------------- |
91
+ | `data` | `string \| number` | Required QR code payload. |
92
+ | `options` | `Component-specific options` | Optional matrix and renderer configuration. |
106
93
 
107
- Most applications should let the builder select the mode, version, and mask automatically.
94
+ All three components are standalone. Add the components you use to the host component's
95
+ `imports` array, then bind `payload` and `options` with normal Angular template syntax.
108
96
 
109
97
  ## Live examples
110
98
 
@@ -121,10 +109,12 @@ import {QRCodeSVG} from '@qrcodesdk/angular';
121
109
  template: `
122
110
  <qrcode-svg
123
111
  [options]="{
124
- title: 'QR code for qrcodesdk.dev',
125
- ariaLabel: 'Scan to open qrcodesdk.dev',
112
+ accessibility: {
113
+ title: 'QR code for qrcodesdk.dev',
114
+ ariaLabel: 'Scan to open qrcodesdk.dev',
115
+ },
126
116
  }"
127
- data="https://qrcodesdk.dev" />
117
+ payload="https://qrcodesdk.dev" />
128
118
  `,
129
119
  })
130
120
  export class QRCodeSVGExample {}
@@ -142,15 +132,16 @@ import type {QRCodeImageOptions} from '@qrcodesdk/browser';
142
132
  selector: 'qrcode-angular-image-example',
143
133
  imports: [QRCodeImage],
144
134
  template: `
145
- <qrcode-image [options]="options" data="https://qrcodesdk.dev" />
135
+ <qrcode-image [options]="options" payload="https://qrcodesdk.dev" />
146
136
  `,
147
137
  })
148
138
  export class QRCodeImageExample {
149
139
  protected readonly options: QRCodeImageOptions = {
150
- size: 8,
151
- margin: 4,
152
- alt: 'QR code for qrcodesdk.dev',
153
- ariaLabel: 'Scan to open qrcodesdk.dev',
140
+ style: {moduleSize: 8, quietZone: 4},
141
+ accessibility: {
142
+ alt: 'QR code for qrcodesdk.dev',
143
+ ariaLabel: 'Scan to open qrcodesdk.dev',
144
+ },
154
145
  };
155
146
  }
156
147
  ```
@@ -167,16 +158,16 @@ import type {QRCodeCanvasOptions} from '@qrcodesdk/browser';
167
158
  selector: 'qrcode-angular-canvas-example',
168
159
  imports: [QRCodeCanvas],
169
160
  template: `
170
- <qrcode-canvas [options]="options" data="https://qrcodesdk.dev" />
161
+ <qrcode-canvas [options]="options" payload="https://qrcodesdk.dev" />
171
162
  `,
172
163
  })
173
164
  export class QRCodeCanvasExample {
174
165
  protected readonly options: QRCodeCanvasOptions = {
175
- size: 8,
176
- margin: 4,
177
- colors: {
178
- colorDark: '#111827',
179
- colorLight: '#ffffff',
166
+ style: {
167
+ moduleSize: 8,
168
+ quietZone: 4,
169
+ foreground: '#111827',
170
+ background: '#ffffff',
180
171
  },
181
172
  };
182
173
  }
@@ -193,13 +184,13 @@ import {QRCodeImage} from '@qrcodesdk/angular';
193
184
  selector: 'qrcode-angular-download-image-example',
194
185
  imports: [QRCodeImage],
195
186
  template: `
196
- <div class="flex flex-col items-center">
187
+ <div class="flex flex-col items-center gap-2">
197
188
  <qrcode-image
198
189
  #qrcode
199
190
  [options]="{
200
- alt: 'QR code for qrcodesdk.dev',
191
+ accessibility: {alt: 'QR code for qrcodesdk.dev'},
201
192
  }"
202
- data="https://qrcodesdk.dev" />
193
+ payload="https://qrcodesdk.dev" />
203
194
  <button class="btn-primary" (click)="qrcode.download('qrcodesdk')" type="button">
204
195
  Download PNG
205
196
  </button>
@@ -215,66 +206,12 @@ export class QRCodeDownloadImageExample {
215
206
  }
216
207
  ```
217
208
 
218
- ## Renderer options
219
-
220
- | Option | Components | Type | Default |
221
- | ----------------------- | ---------- | ---------------------------- | -----------------: |
222
- | `size` | All | `number` | `5` |
223
- | `margin` | All | `number` | `4` |
224
- | `colors.colorDark` | All | `string` | `'#000000'` |
225
- | `colors.colorLight` | All | `string` | `'#ffffff'` |
226
- | `dotsOptions` | All | `QRCodeDotsOptions` | `{type: 'square'}` |
227
- | `cornersSquareOptions` | All | `QRCodeCornersSquareOptions` | `{type: 'square'}` |
228
- | `cornersDotOptions` | All | `QRCodeCornersDotOptions` | `{type: 'square'}` |
229
- | `alt` | SVG, Image | `string` | `undefined` |
230
- | `ariaLabel` | SVG, Image | `string` | `undefined` |
231
- | `title` | SVG, Image | `string` | `undefined` |
232
- | `image.source` | All | Renderer-specific source | `undefined` |
233
- | `image.size` | All | `number` | `0.4` |
234
- | `image.padding` | All | `number` | `1` |
235
- | `image.clearBackground` | All | `boolean` | `true` |
236
-
237
- Color options use hash-prefixed values such as `#111827`. All built-in renderers require a positive safe integer `size` and a non-negative safe integer `margin`.
238
-
239
- Module, finder-ring, and finder-center options pass through to every component. Their optional
240
- colors independently inherit `colors.colorDark`.
241
-
242
- ### Prepared center images
243
-
244
- Pass prepared data through the existing `options` input. For browser output, finish decoding and
245
- only instantiate the component when the source is ready:
246
-
247
- ```ts
248
- readonly logo = signal<HTMLImageElement | undefined>(undefined);
249
-
250
- async selectLogo(file: File | undefined) {
251
- if (!file) return;
209
+ ## Center images
252
210
 
253
- const source = new Image();
254
- const localUrl = URL.createObjectURL(file);
255
- source.src = localUrl;
256
-
257
- try {
258
- await source.decode();
259
- this.logo.set(source);
260
- } finally {
261
- URL.revokeObjectURL(localUrl);
262
- }
263
- }
264
- ```
265
-
266
- ```angular-html
267
- <input #logoInput (change)="selectLogo(logoInput.files?.[0])" accept="image/*" type="file" />
268
-
269
- @if (logo(); as source) {
270
- <qrcode-image
271
- [options]="{errorCorrectionLevel: 'H', image: {source, size: 0.3}}"
272
- data="https://qrcodesdk.dev" />
273
- }
274
- ```
275
-
276
- Use an embedded `data:image/...` URL for `QRCodeSVG`. Components never load paths or URLs
277
- themselves, and SVG/PNG downloads include the overlay.
211
+ Load and decode a browser image first, store the resulting `HTMLImageElement` in a signal, and
212
+ instantiate the component inside an `@if` block once the signal has a value. See
213
+ [Add a center image](https://qrcodesdk.dev/guides/center-images/#angular) for the complete
214
+ component and template.
278
215
 
279
216
  ## Download files
280
217
 
@@ -282,10 +219,10 @@ themselves, and SVG/PNG downloads include the overlay.
282
219
  - `QRCodeImage` exposes `download(filename?)` and writes a PNG file.
283
220
 
284
221
  ```angular-html
285
- <qrcode-svg #qrcodeSvg data="https://qrcodesdk.dev" />
222
+ <qrcode-svg #qrcodeSvg payload="https://qrcodesdk.dev" />
286
223
  <button (click)="qrcodeSvg.download('qrcodesdk')" type="button">Download SVG</button>
287
224
 
288
- <qrcode-image #qrcodeImage data="https://qrcodesdk.dev" />
225
+ <qrcode-image #qrcodeImage payload="https://qrcodesdk.dev" />
289
226
  <button (click)="qrcodeImage.download('qrcodesdk')" type="button">Download PNG</button>
290
227
  ```
291
228
 
@@ -293,24 +230,41 @@ The appropriate `.svg` or `.png` extension is appended when necessary.
293
230
 
294
231
  `QRCodeCanvas` does not include a download method. Use `QRCodeImage` when you want built-in PNG download support.
295
232
 
233
+ See [Download or save](https://qrcodesdk.dev/guides/download-or-save/#download-from-angular) for template-reference
234
+ downloads and manual Canvas export.
235
+
296
236
  ## Server-side rendering
297
237
 
298
238
  `QRCodeSVG` produces runtime-neutral SVG and can render on the server.
299
239
 
300
240
  `QRCodeImage` and `QRCodeCanvas` rely on browser DOM and Canvas APIs, so they skip element creation and downloads outside the browser and populate their host after hydration.
301
241
 
242
+ ## Shared options
243
+
244
+ The `options` input combines matrix options with the selected renderer's options. Use the
245
+ [builder reference](https://qrcodesdk.dev/reference/builder/) for encoding, version, mask, and error correction;
246
+ [Customize output](https://qrcodesdk.dev/guides/customize/) for shared visual options; and the dedicated
247
+ [renderer references](https://qrcodesdk.dev/reference/renderers/) for output-specific options and constraints.
248
+
302
249
  ## Public API
303
250
 
304
251
  ```ts
305
- import {QRCodeCanvas, QRCodeImage, QRCodeSVG} from '@qrcodesdk/angular';
306
- import type {QRCodeCanvasOptions, QRCodeImageOptions} from '@qrcodesdk/browser';
307
- import type {QRCodeSVGOptions} from '@qrcodesdk/core';
252
+ import {
253
+ QRCodeCanvas,
254
+ type QRCodeCanvasOptions,
255
+ QRCodeImage,
256
+ type QRCodeImageOptions,
257
+ QRCodeSVG,
258
+ type QRCodeSVGOptions,
259
+ } from '@qrcodesdk/angular';
308
260
  ```
309
261
 
310
262
  ## Documentation
311
263
 
312
264
  - [@qrcodesdk/angular](https://qrcodesdk.dev/packages/angular/)
313
- - [Customize QR Codes](https://qrcodesdk.dev/advanced/customize/)
314
- - [Render SVG](https://qrcodesdk.dev/renderers/core/svg/)
315
- - [Render to an Image Element](https://qrcodesdk.dev/renderers/browser/image/)
316
- - [Render to Canvas](https://qrcodesdk.dev/renderers/browser/canvas/)
265
+ - [Customize appearance](https://qrcodesdk.dev/guides/customize/)
266
+ - [Add a center image](https://qrcodesdk.dev/guides/center-images/)
267
+ - [Download or save a QR code as SVG or PNG](https://qrcodesdk.dev/guides/download-or-save/)
268
+ - [SVG string renderer](https://qrcodesdk.dev/reference/renderers/svg/)
269
+ - [PNG-backed Image element renderer](https://qrcodesdk.dev/reference/renderers/image/)
270
+ - [Canvas element renderer](https://qrcodesdk.dev/reference/renderers/canvas/)
@@ -12,17 +12,26 @@ function replaceElementChildren(renderer, element, child) {
12
12
  renderer.appendChild(nativeElement, child);
13
13
  }
14
14
 
15
+ function splitOptions(options) {
16
+ if (!options)
17
+ return [undefined, undefined];
18
+ const { matrix, ...renderer } = options;
19
+ return [matrix, renderer];
20
+ }
21
+
15
22
  class QRCodeCanvas {
16
23
  renderer = inject(Renderer2);
17
24
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
18
25
  qrcode = inject(ElementRef);
19
- data = input.required(/* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
26
+ payload = input.required(/* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
21
28
  options = input(/* @ts-ignore */
22
29
  ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
23
- canvasRenderer = computed(() => QRCodeCanvasRenderer(this.options()), /* @ts-ignore */
30
+ resolvedOptions = computed(() => splitOptions(this.options()), /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "resolvedOptions" }] : /* istanbul ignore next */ []));
32
+ canvasRenderer = computed(() => QRCodeCanvasRenderer(this.resolvedOptions()[1]), /* @ts-ignore */
24
33
  ...(ngDevMode ? [{ debugName: "canvasRenderer" }] : /* istanbul ignore next */ []));
25
- qrcodeBuilder = computed(() => qrcode(this.data()).config(this.options()).renderer(this.canvasRenderer()), /* @ts-ignore */
34
+ qrcodeBuilder = computed(() => qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.canvasRenderer()), /* @ts-ignore */
26
35
  ...(ngDevMode ? [{ debugName: "qrcodeBuilder" }] : /* istanbul ignore next */ []));
27
36
  constructor() {
28
37
  effect(() => {
@@ -32,28 +41,30 @@ class QRCodeCanvas {
32
41
  replaceElementChildren(this.renderer, this.qrcode, canvas);
33
42
  });
34
43
  }
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: QRCodeCanvas, isStandalone: true, selector: "qrcode-canvas", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeCanvas, deps: [], target: i0.ɵɵFactoryTarget.Component });
45
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: QRCodeCanvas, isStandalone: true, selector: "qrcode-canvas", inputs: { payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
37
46
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeCanvas, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeCanvas, decorators: [{
39
48
  type: Component,
40
49
  args: [{
41
50
  selector: 'qrcode-canvas',
42
51
  template: '',
43
52
  }]
44
- }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
53
+ }], ctorParameters: () => [], propDecorators: { payload: [{ type: i0.Input, args: [{ isSignal: true, alias: "payload", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
45
54
 
46
55
  class QRCodeImage {
47
56
  renderer = inject(Renderer2);
48
57
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
49
58
  qrcode = inject(ElementRef);
50
- data = input.required(/* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
59
+ payload = input.required(/* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
52
61
  options = input(/* @ts-ignore */
53
62
  ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
54
- imageRenderer = computed(() => QRCodeImageRenderer(this.options()), /* @ts-ignore */
63
+ resolvedOptions = computed(() => splitOptions(this.options()), /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "resolvedOptions" }] : /* istanbul ignore next */ []));
65
+ imageRenderer = computed(() => QRCodeImageRenderer(this.resolvedOptions()[1]), /* @ts-ignore */
55
66
  ...(ngDevMode ? [{ debugName: "imageRenderer" }] : /* istanbul ignore next */ []));
56
- qrcodeBuilder = computed(() => qrcode(this.data()).config(this.options()).renderer(this.imageRenderer()), /* @ts-ignore */
67
+ qrcodeBuilder = computed(() => qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.imageRenderer()), /* @ts-ignore */
57
68
  ...(ngDevMode ? [{ debugName: "qrcodeBuilder" }] : /* istanbul ignore next */ []));
58
69
  constructor() {
59
70
  effect(() => {
@@ -71,27 +82,30 @@ class QRCodeImage {
71
82
  filename,
72
83
  }));
73
84
  }
74
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: QRCodeImage, isStandalone: true, selector: "qrcode-image", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeImage, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: QRCodeImage, isStandalone: true, selector: "qrcode-image", inputs: { payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
76
87
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeImage, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeImage, decorators: [{
78
89
  type: Component,
79
90
  args: [{
80
91
  selector: 'qrcode-image',
81
92
  template: '',
82
93
  }]
83
- }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
94
+ }], ctorParameters: () => [], propDecorators: { payload: [{ type: i0.Input, args: [{ isSignal: true, alias: "payload", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
84
95
 
85
96
  class QRCodeSVG {
86
97
  renderer = inject(Renderer2);
98
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
87
99
  qrcode = inject(ElementRef);
88
- data = input.required(/* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
100
+ payload = input.required(/* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
90
102
  options = input(/* @ts-ignore */
91
103
  ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
92
- svgRenderer = computed(() => QRCodeSVGRenderer(this.options()), /* @ts-ignore */
104
+ resolvedOptions = computed(() => splitOptions(this.options()), /* @ts-ignore */
105
+ ...(ngDevMode ? [{ debugName: "resolvedOptions" }] : /* istanbul ignore next */ []));
106
+ svgRenderer = computed(() => QRCodeSVGRenderer(this.resolvedOptions()[1]), /* @ts-ignore */
93
107
  ...(ngDevMode ? [{ debugName: "svgRenderer" }] : /* istanbul ignore next */ []));
94
- qrcodeBuilder = computed(() => qrcode(this.data()).config(this.options()).renderer(this.svgRenderer()), /* @ts-ignore */
108
+ qrcodeBuilder = computed(() => qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.svgRenderer()), /* @ts-ignore */
95
109
  ...(ngDevMode ? [{ debugName: "qrcodeBuilder" }] : /* istanbul ignore next */ []));
96
110
  constructor() {
97
111
  effect(() => {
@@ -101,21 +115,23 @@ class QRCodeSVG {
101
115
  });
102
116
  }
103
117
  download(filename) {
118
+ if (!this.isBrowser)
119
+ return;
104
120
  this.qrcodeBuilder().render(QRCodeDownloadSVGRenderer({
105
121
  renderer: this.svgRenderer(),
106
122
  filename,
107
123
  }));
108
124
  }
109
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeSVG, deps: [], target: i0.ɵɵFactoryTarget.Component });
110
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: QRCodeSVG, isStandalone: true, selector: "qrcode-svg", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
125
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeSVG, deps: [], target: i0.ɵɵFactoryTarget.Component });
126
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: QRCodeSVG, isStandalone: true, selector: "qrcode-svg", inputs: { payload: { classPropertyName: "payload", publicName: "payload", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
111
127
  }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: QRCodeSVG, decorators: [{
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: QRCodeSVG, decorators: [{
113
129
  type: Component,
114
130
  args: [{
115
131
  selector: 'qrcode-svg',
116
132
  template: '',
117
133
  }]
118
- }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
134
+ }], ctorParameters: () => [], propDecorators: { payload: [{ type: i0.Input, args: [{ isSignal: true, alias: "payload", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
119
135
 
120
136
  /*
121
137
  * Public API Surface of angular
@@ -1 +1 @@
1
- {"version":3,"file":"qrcodesdk-angular.mjs","sources":["../../../src/lib/render-element.ts","../../../src/lib/QRCodeCanvas.ts","../../../src/lib/QRCodeImage.ts","../../../src/lib/QRCodeSVG.ts","../../../src/public-api.ts","../../../src/qrcodesdk-angular.ts"],"sourcesContent":["import type {ElementRef, Renderer2} from '@angular/core';\n\nexport function replaceElementChildren<TElement extends HTMLElement>(\n renderer: Renderer2,\n element: ElementRef<TElement>,\n child: Element,\n): void {\n const nativeElement = element.nativeElement;\n\n while (nativeElement.firstChild) {\n renderer.removeChild(nativeElement, nativeElement.firstChild);\n }\n\n renderer.appendChild(nativeElement, child);\n}\n","import {isPlatformBrowser} from '@angular/common';\nimport {\n Component,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport {type QRCodeCanvasOptions, QRCodeCanvasRenderer} from '@qrcodesdk/browser';\nimport {type QRCodeInputData, qrcode} from '@qrcodesdk/core';\n\nimport {replaceElementChildren} from './render-element';\n\n@Component({\n selector: 'qrcode-canvas',\n template: '',\n})\nexport class QRCodeCanvas {\n private readonly renderer = inject(Renderer2);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly qrcode = inject(ElementRef);\n\n data = input.required<QRCodeInputData>();\n\n options = input<QRCodeCanvasOptions>();\n\n readonly canvasRenderer = computed(() => QRCodeCanvasRenderer(this.options()));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.data()).config(this.options()).renderer(this.canvasRenderer()),\n );\n\n constructor() {\n effect(() => {\n if (!this.isBrowser) return;\n\n const canvas = this.qrcodeBuilder().render();\n\n replaceElementChildren(this.renderer, this.qrcode, canvas);\n });\n }\n}\n","import {isPlatformBrowser} from '@angular/common';\nimport {\n Component,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport {\n QRCodeDownloadImageRenderer,\n type QRCodeImageOptions,\n QRCodeImageRenderer,\n} from '@qrcodesdk/browser';\nimport {type QRCodeInputData, qrcode} from '@qrcodesdk/core';\n\nimport {replaceElementChildren} from './render-element';\n\n@Component({\n selector: 'qrcode-image',\n template: '',\n})\nexport class QRCodeImage {\n private readonly renderer = inject(Renderer2);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly qrcode = inject(ElementRef);\n\n data = input.required<QRCodeInputData>();\n\n options = input<QRCodeImageOptions>();\n\n readonly imageRenderer = computed(() => QRCodeImageRenderer(this.options()));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.data()).config(this.options()).renderer(this.imageRenderer()),\n );\n\n constructor() {\n effect(() => {\n if (!this.isBrowser) return;\n\n const image = this.qrcodeBuilder().render();\n\n replaceElementChildren(this.renderer, this.qrcode, image);\n });\n }\n\n public download(filename?: string): void {\n if (!this.isBrowser) return;\n\n this.qrcodeBuilder().render(\n QRCodeDownloadImageRenderer({\n renderer: this.imageRenderer(),\n filename,\n }),\n );\n }\n}\n","import {Component, ElementRef, Renderer2, computed, effect, inject, input} from '@angular/core';\n\nimport {QRCodeDownloadSVGRenderer} from '@qrcodesdk/browser';\nimport {\n type QRCodeInputData,\n type QRCodeSVGOptions,\n QRCodeSVGRenderer,\n qrcode,\n} from '@qrcodesdk/core';\n\n@Component({\n selector: 'qrcode-svg',\n template: '',\n})\nexport class QRCodeSVG {\n private readonly renderer = inject(Renderer2);\n private readonly qrcode = inject(ElementRef);\n\n data = input.required<QRCodeInputData>();\n\n options = input<QRCodeSVGOptions>();\n\n readonly svgRenderer = computed(() => QRCodeSVGRenderer(this.options()));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.data()).config(this.options()).renderer(this.svgRenderer()),\n );\n\n constructor() {\n effect(() => {\n const qrcodeBuilder = this.qrcodeBuilder();\n const svg = qrcodeBuilder.render();\n\n this.renderer.setProperty(this.qrcode.nativeElement, 'innerHTML', svg);\n });\n }\n\n public download(filename?: string): void {\n this.qrcodeBuilder().render(\n QRCodeDownloadSVGRenderer({\n renderer: this.svgRenderer(),\n filename,\n }),\n );\n }\n}\n","/*\n * Public API Surface of angular\n */\n\nexport * from './lib/QRCodeCanvas';\nexport * from './lib/QRCodeImage';\nexport * from './lib/QRCodeSVG';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAEgB,sBAAsB,CACpC,QAAmB,EACnB,OAA6B,EAC7B,KAAc,EAAA;AAEd,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa;AAE3C,IAAA,OAAO,aAAa,CAAC,UAAU,EAAE;QAC/B,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC;IAC/D;AAEA,IAAA,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC;AAC5C;;MCOa,YAAY,CAAA;AACN,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAClD,IAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;IAE5C,IAAI,GAAG,KAAK,CAAC,QAAQ;6EAAmB;AAExC,IAAA,OAAO,GAAG,KAAK;2FAAuB;AAE7B,IAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;uFAAC;AAErE,IAAA,aAAa,GAAG,QAAQ,CAAC,MAChC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;sFAC3E;AAED,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,IAAI,CAAC,SAAS;gBAAE;YAErB,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE;YAE5C,sBAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5D,Q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GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE;AAC1C,YAAA,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,EAAE;AAElC,YAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,EAAE,GAAG,CAAC;AACxE,QAAA,CAAC,CAAC;IACJ;AAEO,IAAA,QAAQ,CAAC,QAAiB,EAAA;AAC/B,QAAA,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CACzB,yBAAyB,CAAC;AACxB,YAAA,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE;YAC5B,QAAQ;AACT,SAAA,CAAC,CACH;IACH;uGA9BW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,oUAFV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAED,SAAS,EAAA,UAAA,EAAA,CAAA;kBAJrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACbD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"qrcodesdk-angular.mjs","sources":["../../../src/lib/render-element.ts","../../../src/lib/split-options.ts","../../../src/lib/QRCodeCanvas.ts","../../../src/lib/QRCodeImage.ts","../../../src/lib/QRCodeSVG.ts","../../../src/public-api.ts","../../../src/qrcodesdk-angular.ts"],"sourcesContent":["import type {ElementRef, Renderer2} from '@angular/core';\n\nexport function replaceElementChildren<TElement extends HTMLElement>(\n renderer: Renderer2,\n element: ElementRef<TElement>,\n child: Element,\n): void {\n const nativeElement = element.nativeElement;\n\n while (nativeElement.firstChild) {\n renderer.removeChild(nativeElement, nativeElement.firstChild);\n }\n\n renderer.appendChild(nativeElement, child);\n}\n","import type {QRCodeMatrixOptions} from '@qrcodesdk/core';\n\nexport function splitOptions<T extends {readonly matrix?: QRCodeMatrixOptions}>(\n options: T | undefined,\n): readonly [QRCodeMatrixOptions | undefined, Omit<T, 'matrix'> | undefined] {\n if (!options) return [undefined, undefined];\n const {matrix, ...renderer} = options;\n return [matrix, renderer];\n}\n","import {isPlatformBrowser} from '@angular/common';\nimport {\n Component,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport {type QRCodeCanvasOptions, QRCodeCanvasRenderer} from '@qrcodesdk/browser';\nimport {type QRCodePayload, qrcode} from '@qrcodesdk/core';\n\nimport {replaceElementChildren} from './render-element';\nimport {splitOptions} from './split-options';\n\n@Component({\n selector: 'qrcode-canvas',\n template: '',\n})\nexport class QRCodeCanvas {\n private readonly renderer = inject(Renderer2);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly qrcode = inject(ElementRef);\n\n payload = input.required<QRCodePayload>();\n\n options = input<QRCodeCanvasOptions>();\n\n readonly resolvedOptions = computed(() => splitOptions(this.options()));\n readonly canvasRenderer = computed(() => QRCodeCanvasRenderer(this.resolvedOptions()[1]));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.canvasRenderer()),\n );\n\n constructor() {\n effect(() => {\n if (!this.isBrowser) return;\n\n const canvas = this.qrcodeBuilder().render();\n\n replaceElementChildren(this.renderer, this.qrcode, canvas);\n });\n }\n}\n","import {isPlatformBrowser} from '@angular/common';\nimport {\n Component,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport {\n QRCodeDownloadImageRenderer,\n type QRCodeImageOptions,\n QRCodeImageRenderer,\n} from '@qrcodesdk/browser';\nimport {type QRCodePayload, qrcode} from '@qrcodesdk/core';\n\nimport {replaceElementChildren} from './render-element';\nimport {splitOptions} from './split-options';\n\n@Component({\n selector: 'qrcode-image',\n template: '',\n})\nexport class QRCodeImage {\n private readonly renderer = inject(Renderer2);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly qrcode = inject(ElementRef);\n\n payload = input.required<QRCodePayload>();\n\n options = input<QRCodeImageOptions>();\n\n readonly resolvedOptions = computed(() => splitOptions(this.options()));\n readonly imageRenderer = computed(() => QRCodeImageRenderer(this.resolvedOptions()[1]));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.imageRenderer()),\n );\n\n constructor() {\n effect(() => {\n if (!this.isBrowser) return;\n\n const image = this.qrcodeBuilder().render();\n\n replaceElementChildren(this.renderer, this.qrcode, image);\n });\n }\n\n public download(filename?: string): void {\n if (!this.isBrowser) return;\n\n this.qrcodeBuilder().render(\n QRCodeDownloadImageRenderer({\n renderer: this.imageRenderer(),\n filename,\n }),\n );\n }\n}\n","import {isPlatformBrowser} from '@angular/common';\nimport {\n Component,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\n\nimport {QRCodeDownloadSVGRenderer} from '@qrcodesdk/browser';\nimport {\n type QRCodePayload,\n type QRCodeSVGOptions,\n QRCodeSVGRenderer,\n qrcode,\n} from '@qrcodesdk/core';\n\nimport {splitOptions} from './split-options';\n\n@Component({\n selector: 'qrcode-svg',\n template: '',\n})\nexport class QRCodeSVG {\n private readonly renderer = inject(Renderer2);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly qrcode = inject(ElementRef);\n\n payload = input.required<QRCodePayload>();\n\n options = input<QRCodeSVGOptions>();\n\n readonly resolvedOptions = computed(() => splitOptions(this.options()));\n readonly svgRenderer = computed(() => QRCodeSVGRenderer(this.resolvedOptions()[1]));\n\n readonly qrcodeBuilder = computed(() =>\n qrcode(this.payload()).options(this.resolvedOptions()[0]).renderer(this.svgRenderer()),\n );\n\n constructor() {\n effect(() => {\n const qrcodeBuilder = this.qrcodeBuilder();\n const svg = qrcodeBuilder.render();\n\n this.renderer.setProperty(this.qrcode.nativeElement, 'innerHTML', svg);\n });\n }\n\n public download(filename?: string): void {\n if (!this.isBrowser) return;\n\n this.qrcodeBuilder().render(\n QRCodeDownloadSVGRenderer({\n renderer: this.svgRenderer(),\n filename,\n }),\n );\n }\n}\n","/*\n * Public API Surface of angular\n */\n\nexport {QRCodeCanvas} from './lib/QRCodeCanvas';\nexport {QRCodeImage} from './lib/QRCodeImage';\nexport {QRCodeSVG} from './lib/QRCodeSVG';\nexport type {QRCodeCanvasOptions, QRCodeImageOptions} from '@qrcodesdk/browser';\nexport type {QRCodeSVGOptions} from '@qrcodesdk/core';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAEgB,sBAAsB,CACpC,QAAmB,EACnB,OAA6B,EAC7B,KAAc,EAAA;AAEd,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa;AAE3C,IAAA,OAAO,aAAa,CAAC,UAAU,EAAE;QAC/B,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC;IAC/D;AAEA,IAAA,QAAQ,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC;AAC5C;;ACZM,SAAU,YAAY,CAC1B,OAAsB,EAAA;AAEtB,IAAA,IAAI,CAAC,OAAO;AAAE,QAAA,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;IAC3C,MAAM,EAAC,MAAM,EAAE,GAAG,QAAQ,EAAC,GAAG,OAAO;AACrC,IAAA,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3B;;MCca,YAAY,CAAA;AACN,IAAA,QAAQ,GAAG,MAAM,CAA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V,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE;AAC1C,YAAA,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,EAAE;AAElC,YAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,EAAE,GAAG,CAAC;AACxE,QAAA,CAAC,CAAC;IACJ;AAEO,IAAA,QAAQ,CAAC,QAAiB,EAAA;QAC/B,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE;AAErB,QAAA,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CACzB,yBAAyB,CAAC;AACxB,YAAA,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE;YAC5B,QAAQ;AACT,SAAA,CAAC,CACH;IACH;uGAlCW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,6UAFV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAED,SAAS,EAAA,UAAA,EAAA,CAAA;kBAJrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACzBD;;AAEG;;ACFH;;AAEG;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrcodesdk/angular",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "@qrcodesdk/angular provides standalone Angular components for rendering QR codes as SVG, PNG-backed image elements, and canvas elements.",
5
5
  "sideEffects": false,
6
6
  "private": false,
@@ -46,14 +46,14 @@
46
46
  "provenance": true
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/common": "^22.0.0",
50
- "@angular/core": "^22.0.0",
51
- "rxjs": "^7.0.0",
52
- "@qrcodesdk/core": "^0.0.1",
53
- "@qrcodesdk/browser": "^0.0.1"
49
+ "@angular/common": "^20.0.0 || ^21.0.0 || ^22.0.0",
50
+ "@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0",
51
+ "rxjs": "^7.0.0"
54
52
  },
55
53
  "dependencies": {
56
- "tslib": "^2.3.0"
54
+ "@qrcodesdk/browser": "0.0.2",
55
+ "@qrcodesdk/core": "0.0.2",
56
+ "tslib": "^2.8.1"
57
57
  },
58
58
  "module": "fesm2022/qrcodesdk-angular.mjs",
59
59
  "typings": "types/qrcodesdk-angular.d.ts",
@@ -1,37 +1,41 @@
1
1
  import * as _qrcodesdk_core from '@qrcodesdk/core';
2
- import { QRCodeInputData, QRCodeSVGOptions } from '@qrcodesdk/core';
2
+ import { QRCodePayload, QRCodeSVGOptions } from '@qrcodesdk/core';
3
+ export { QRCodeSVGOptions } from '@qrcodesdk/core';
3
4
  import * as _angular_core from '@angular/core';
4
5
  import { QRCodeCanvasOptions, QRCodeImageOptions } from '@qrcodesdk/browser';
6
+ export { QRCodeCanvasOptions, QRCodeImageOptions } from '@qrcodesdk/browser';
5
7
 
6
8
  declare class QRCodeCanvas {
7
9
  private readonly renderer;
8
10
  private readonly isBrowser;
9
11
  private readonly qrcode;
10
- data: _angular_core.InputSignal<QRCodeInputData>;
12
+ payload: _angular_core.InputSignal<QRCodePayload>;
11
13
  options: _angular_core.InputSignal<QRCodeCanvasOptions | undefined>;
14
+ readonly resolvedOptions: _angular_core.Signal<readonly [_qrcodesdk_core.QRCodeMatrixOptions | undefined, Omit<QRCodeCanvasOptions, "matrix"> | undefined]>;
12
15
  readonly canvasRenderer: _angular_core.Signal<_qrcodesdk_core.QRCodeRenderer<HTMLCanvasElement>>;
13
16
  readonly qrcodeBuilder: _angular_core.Signal<_qrcodesdk_core.QRCodeBuilder<{
14
- readonly hasData: true;
15
- readonly _data: QRCodeInputData;
17
+ readonly hasPayload: true;
18
+ readonly _payload: QRCodePayload;
16
19
  }, {
17
20
  readonly hasRenderer: true;
18
21
  readonly output: HTMLCanvasElement;
19
22
  }>>;
20
23
  constructor();
21
24
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QRCodeCanvas, never>;
22
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeCanvas, "qrcode-canvas", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
25
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeCanvas, "qrcode-canvas", never, { "payload": { "alias": "payload"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
23
26
  }
24
27
 
25
28
  declare class QRCodeImage {
26
29
  private readonly renderer;
27
30
  private readonly isBrowser;
28
31
  private readonly qrcode;
29
- data: _angular_core.InputSignal<QRCodeInputData>;
32
+ payload: _angular_core.InputSignal<QRCodePayload>;
30
33
  options: _angular_core.InputSignal<QRCodeImageOptions | undefined>;
34
+ readonly resolvedOptions: _angular_core.Signal<readonly [_qrcodesdk_core.QRCodeMatrixOptions | undefined, Omit<QRCodeImageOptions, "matrix"> | undefined]>;
31
35
  readonly imageRenderer: _angular_core.Signal<_qrcodesdk_core.QRCodeRenderer<HTMLImageElement>>;
32
36
  readonly qrcodeBuilder: _angular_core.Signal<_qrcodesdk_core.QRCodeBuilder<{
33
- readonly hasData: true;
34
- readonly _data: QRCodeInputData;
37
+ readonly hasPayload: true;
38
+ readonly _payload: QRCodePayload;
35
39
  }, {
36
40
  readonly hasRenderer: true;
37
41
  readonly output: HTMLImageElement;
@@ -39,18 +43,20 @@ declare class QRCodeImage {
39
43
  constructor();
40
44
  download(filename?: string): void;
41
45
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QRCodeImage, never>;
42
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeImage, "qrcode-image", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
46
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeImage, "qrcode-image", never, { "payload": { "alias": "payload"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
43
47
  }
44
48
 
45
49
  declare class QRCodeSVG {
46
50
  private readonly renderer;
51
+ private readonly isBrowser;
47
52
  private readonly qrcode;
48
- data: _angular_core.InputSignal<QRCodeInputData>;
53
+ payload: _angular_core.InputSignal<QRCodePayload>;
49
54
  options: _angular_core.InputSignal<QRCodeSVGOptions | undefined>;
55
+ readonly resolvedOptions: _angular_core.Signal<readonly [_qrcodesdk_core.QRCodeMatrixOptions | undefined, Omit<QRCodeSVGOptions, "matrix"> | undefined]>;
50
56
  readonly svgRenderer: _angular_core.Signal<_qrcodesdk_core.QRCodeRenderer<string>>;
51
57
  readonly qrcodeBuilder: _angular_core.Signal<_qrcodesdk_core.QRCodeBuilder<{
52
- readonly hasData: true;
53
- readonly _data: QRCodeInputData;
58
+ readonly hasPayload: true;
59
+ readonly _payload: QRCodePayload;
54
60
  }, {
55
61
  readonly hasRenderer: true;
56
62
  readonly output: string;
@@ -58,7 +64,7 @@ declare class QRCodeSVG {
58
64
  constructor();
59
65
  download(filename?: string): void;
60
66
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<QRCodeSVG, never>;
61
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeSVG, "qrcode-svg", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
67
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<QRCodeSVG, "qrcode-svg", never, { "payload": { "alias": "payload"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
62
68
  }
63
69
 
64
70
  export { QRCodeCanvas, QRCodeImage, QRCodeSVG };