@chayns-components/scanner 5.0.33 → 5.0.34

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.
Files changed (2) hide show
  1. package/AI_USAGE.md +68 -0
  2. package/package.json +5 -4
package/AI_USAGE.md ADDED
@@ -0,0 +1,68 @@
1
+ # @chayns-components/scanner
2
+
3
+ React component package providing `CodeScanner` for chayns applications.
4
+
5
+ Documented components: `CodeScanner`.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import { CodeScanner } from '@chayns-components/scanner';
11
+ ```
12
+
13
+ ## Typical Usage
14
+
15
+ ```tsx
16
+ <CodeScanner
17
+ errorMessages={{
18
+ alreadyInUse: 'Die Kamera wird bereits von einer anderen Anwendung verwendet.',
19
+ cameraNotAvailable: 'Die Kameranutzung ist nicht möglich.',
20
+ noCodeFound: 'Es konnte kein Code gefunden werden.',
21
+ noPermission: 'Um einen QR-Code zu scannen, aktiviere Deine Kamera.',
22
+ }}
23
+ shouldTriggerForSameCode
24
+ />
25
+ ```
26
+
27
+ ## CodeScanner
28
+
29
+ `CodeScanner` is exported by `@chayns-components/scanner` and should be imported from the public package entry point.
30
+
31
+ ### Import
32
+
33
+ ```ts
34
+ import { CodeScanner } from '@chayns-components/scanner';
35
+ ```
36
+
37
+ ### Examples
38
+
39
+ #### General
40
+
41
+ ```tsx
42
+ <CodeScanner
43
+ errorMessages={{
44
+ alreadyInUse: 'Die Kamera wird bereits von einer anderen Anwendung verwendet.',
45
+ cameraNotAvailable: 'Die Kameranutzung ist nicht möglich.',
46
+ noCodeFound: 'Es konnte kein Code gefunden werden.',
47
+ noPermission: 'Um einen QR-Code zu scannen, aktiviere Deine Kamera.',
48
+ }}
49
+ shouldTriggerForSameCode
50
+ />
51
+ ```
52
+
53
+ ### Props
54
+
55
+ No prop documentation available.
56
+
57
+ ### Types
58
+
59
+ No additional exported types documented.
60
+
61
+ ### Usage Notes
62
+
63
+ - Import `CodeScanner` directly from `@chayns-components/scanner` instead of internal source paths.
64
+ - Start with one of the documented Storybook examples and adapt the props incrementally for your use case.
65
+
66
+ ### Anti Patterns
67
+
68
+ - Avoid imports from internal paths such as `@chayns-components/scanner/src/...`; always use the public package export.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/scanner",
3
- "version": "5.0.33",
3
+ "version": "5.0.34",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -33,7 +33,8 @@
33
33
  "test": "__tests__"
34
34
  },
35
35
  "files": [
36
- "lib"
36
+ "lib",
37
+ "AI_USAGE.md"
37
38
  ],
38
39
  "repository": {
39
40
  "type": "git",
@@ -71,7 +72,7 @@
71
72
  "typescript": "^5.9.3"
72
73
  },
73
74
  "dependencies": {
74
- "@chayns-components/core": "^5.0.33"
75
+ "@chayns-components/core": "^5.0.34"
75
76
  },
76
77
  "peerDependencies": {
77
78
  "chayns-api": ">=2.2.0",
@@ -83,5 +84,5 @@
83
84
  "publishConfig": {
84
85
  "access": "public"
85
86
  },
86
- "gitHead": "5e41d9af042b3c272c8c08b67a9c9bf4911902f6"
87
+ "gitHead": "7c7c2d7dacbc7c8031f3bcef885e4f63b8f49b1a"
87
88
  }