@microblink/camera-manager 7.2.5 → 7.2.7
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/README.md +92 -0
- package/dist/camera-manager.js +1217 -1122
- package/package.json +3 -3
- package/types/core/Camera.d.ts +119 -77
- package/types/core/Camera.d.ts.map +1 -1
- package/types/core/CameraManager.d.ts +72 -65
- package/types/core/CameraManager.d.ts.map +1 -1
- package/types/core/cameraError.d.ts +1 -1
- package/types/core/cameraError.d.ts.map +1 -1
- package/types/core/cameraManagerStore.d.ts +15 -1
- package/types/core/cameraManagerStore.d.ts.map +1 -1
- package/types/core/cameraUtils.d.ts +1 -1
- package/types/core/cameraUtils.d.ts.map +1 -1
- package/types/core/utils.d.ts +1 -0
- package/types/core/utils.d.ts.map +1 -1
- package/types/index.rollup.d.ts +86 -27
- package/types/media-mock/createInputDeviceInfo.d.ts +1 -1
- package/types/media-mock/createInputDeviceInfo.d.ts.map +1 -1
- package/types/media-mock/fake-devices.d.ts +7 -3
- package/types/media-mock/fake-devices.d.ts.map +1 -1
- package/types/media-mock/fakeDevices/iPhoneX.d.ts +6 -0
- package/types/media-mock/fakeDevices/iPhoneX.d.ts.map +1 -0
- package/types/ui/CameraErrorModal.d.ts.map +1 -1
- package/types/ui/CameraSelector.d.ts.map +1 -1
- package/types/ui/CaptureScreen.d.ts +0 -4
- package/types/ui/CaptureScreen.d.ts.map +1 -1
- package/types/ui/Header.d.ts.map +1 -1
- package/types/ui/debounce.d.ts +14 -0
- package/types/ui/debounce.d.ts.map +1 -0
- package/types/ui/determineFitMode.d.ts +4 -1
- package/types/ui/determineFitMode.d.ts.map +1 -1
- package/types/ui/locales/ak.d.ts +19 -0
- package/types/ui/locales/ak.d.ts.map +1 -0
- package/types/ui/locales/am.d.ts +19 -0
- package/types/ui/locales/am.d.ts.map +1 -0
- package/types/ui/locales/ar.d.ts +19 -0
- package/types/ui/locales/ar.d.ts.map +1 -0
- package/types/ui/locales/bn.d.ts +19 -0
- package/types/ui/locales/bn.d.ts.map +1 -0
- package/types/ui/locales/cs.d.ts +19 -0
- package/types/ui/locales/cs.d.ts.map +1 -0
- package/types/ui/locales/da.d.ts +19 -0
- package/types/ui/locales/da.d.ts.map +1 -0
- package/types/ui/locales/de.d.ts +19 -0
- package/types/ui/locales/de.d.ts.map +1 -0
- package/types/ui/locales/el.d.ts +19 -0
- package/types/ui/locales/el.d.ts.map +1 -0
- package/types/ui/locales/en.d.ts +8 -8
- package/types/ui/locales/en_GB.d.ts +19 -0
- package/types/ui/locales/en_GB.d.ts.map +1 -0
- package/types/ui/locales/es.d.ts +19 -0
- package/types/ui/locales/es.d.ts.map +1 -0
- package/types/ui/locales/es_MX.d.ts +19 -0
- package/types/ui/locales/es_MX.d.ts.map +1 -0
- package/types/ui/locales/fa-latn.d.ts +19 -0
- package/types/ui/locales/fa-latn.d.ts.map +1 -0
- package/types/ui/locales/fi.d.ts +19 -0
- package/types/ui/locales/fi.d.ts.map +1 -0
- package/types/ui/locales/fil.d.ts +19 -0
- package/types/ui/locales/fil.d.ts.map +1 -0
- package/types/ui/locales/fr.d.ts +19 -0
- package/types/ui/locales/fr.d.ts.map +1 -0
- package/types/ui/locales/fr_CA.d.ts +19 -0
- package/types/ui/locales/fr_CA.d.ts.map +1 -0
- package/types/ui/locales/ha.d.ts +19 -0
- package/types/ui/locales/ha.d.ts.map +1 -0
- package/types/ui/locales/he.d.ts +19 -0
- package/types/ui/locales/he.d.ts.map +1 -0
- package/types/ui/locales/hi.d.ts +19 -0
- package/types/ui/locales/hi.d.ts.map +1 -0
- package/types/ui/locales/hr.d.ts +19 -0
- package/types/ui/locales/hr.d.ts.map +1 -0
- package/types/ui/locales/hu.d.ts +19 -0
- package/types/ui/locales/hu.d.ts.map +1 -0
- package/types/ui/locales/id.d.ts +19 -0
- package/types/ui/locales/id.d.ts.map +1 -0
- package/types/ui/locales/index.d.ts +60 -0
- package/types/ui/locales/index.d.ts.map +1 -0
- package/types/ui/locales/is.d.ts +19 -0
- package/types/ui/locales/is.d.ts.map +1 -0
- package/types/ui/locales/it.d.ts +19 -0
- package/types/ui/locales/it.d.ts.map +1 -0
- package/types/ui/locales/ja.d.ts +19 -0
- package/types/ui/locales/ja.d.ts.map +1 -0
- package/types/ui/locales/ka_GE.d.ts +19 -0
- package/types/ui/locales/ka_GE.d.ts.map +1 -0
- package/types/ui/locales/kk.d.ts +19 -0
- package/types/ui/locales/kk.d.ts.map +1 -0
- package/types/ui/locales/km_KH.d.ts +19 -0
- package/types/ui/locales/km_KH.d.ts.map +1 -0
- package/types/ui/locales/ko.d.ts +19 -0
- package/types/ui/locales/ko.d.ts.map +1 -0
- package/types/ui/locales/lv.d.ts +19 -0
- package/types/ui/locales/lv.d.ts.map +1 -0
- package/types/ui/locales/ms.d.ts +19 -0
- package/types/ui/locales/ms.d.ts.map +1 -0
- package/types/ui/locales/ne.d.ts +19 -0
- package/types/ui/locales/ne.d.ts.map +1 -0
- package/types/ui/locales/nl.d.ts +19 -0
- package/types/ui/locales/nl.d.ts.map +1 -0
- package/types/ui/locales/no.d.ts +19 -0
- package/types/ui/locales/no.d.ts.map +1 -0
- package/types/ui/locales/pl.d.ts +19 -0
- package/types/ui/locales/pl.d.ts.map +1 -0
- package/types/ui/locales/ps_AF.d.ts +19 -0
- package/types/ui/locales/ps_AF.d.ts.map +1 -0
- package/types/ui/locales/pt.d.ts +19 -0
- package/types/ui/locales/pt.d.ts.map +1 -0
- package/types/ui/locales/pt_BR.d.ts +19 -0
- package/types/ui/locales/pt_BR.d.ts.map +1 -0
- package/types/ui/locales/ro.d.ts +19 -0
- package/types/ui/locales/ro.d.ts.map +1 -0
- package/types/ui/locales/ru.d.ts +19 -0
- package/types/ui/locales/ru.d.ts.map +1 -0
- package/types/ui/locales/si.d.ts +19 -0
- package/types/ui/locales/si.d.ts.map +1 -0
- package/types/ui/locales/sk.d.ts +19 -0
- package/types/ui/locales/sk.d.ts.map +1 -0
- package/types/ui/locales/sl.d.ts +19 -0
- package/types/ui/locales/sl.d.ts.map +1 -0
- package/types/ui/locales/sr.d.ts +19 -0
- package/types/ui/locales/sr.d.ts.map +1 -0
- package/types/ui/locales/sv.d.ts +19 -0
- package/types/ui/locales/sv.d.ts.map +1 -0
- package/types/ui/locales/sw.d.ts +19 -0
- package/types/ui/locales/sw.d.ts.map +1 -0
- package/types/ui/locales/th.d.ts +19 -0
- package/types/ui/locales/th.d.ts.map +1 -0
- package/types/ui/locales/tr.d.ts +19 -0
- package/types/ui/locales/tr.d.ts.map +1 -0
- package/types/ui/locales/uk.d.ts +19 -0
- package/types/ui/locales/uk.d.ts.map +1 -0
- package/types/ui/locales/ur.d.ts +19 -0
- package/types/ui/locales/ur.d.ts.map +1 -0
- package/types/ui/locales/uz.d.ts +19 -0
- package/types/ui/locales/uz.d.ts.map +1 -0
- package/types/ui/locales/vi.d.ts +19 -0
- package/types/ui/locales/vi.d.ts.map +1 -0
- package/types/ui/locales/yo.d.ts +19 -0
- package/types/ui/locales/yo.d.ts.map +1 -0
- package/types/ui/locales/zh_CN.d.ts +19 -0
- package/types/ui/locales/zh_CN.d.ts.map +1 -0
- package/types/ui/locales/zh_TW.d.ts +19 -0
- package/types/ui/locales/zh_TW.d.ts.map +1 -0
package/README.md
CHANGED
|
@@ -76,3 +76,95 @@ const cameraUi = await createCameraManagerUi(cameraManager, document.body);
|
|
|
76
76
|
// Optionally, add cleanup:
|
|
77
77
|
cameraUi.dismount();
|
|
78
78
|
```
|
|
79
|
+
|
|
80
|
+
### Internationalization
|
|
81
|
+
|
|
82
|
+
You can customize UI strings either when creating the camera UI or at runtime:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
const cameraUi = await createCameraManagerUi(
|
|
86
|
+
cameraManager,
|
|
87
|
+
undefined,
|
|
88
|
+
{
|
|
89
|
+
localizationStrings: {
|
|
90
|
+
selected_camera: "My Updated String",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
At runtime:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
cameraUi.updateLocalization({
|
|
100
|
+
select_camera: "My updated string",
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Provided Translations
|
|
106
|
+
|
|
107
|
+
<details>
|
|
108
|
+
<summary>Click to see all available translation files</summary>
|
|
109
|
+
|
|
110
|
+
- [ak.ts](src/ui/locales/ak.ts)
|
|
111
|
+
- [am.ts](src/ui/locales/am.ts)
|
|
112
|
+
- [ar.ts](src/ui/locales/ar.ts)
|
|
113
|
+
- [bn.ts](src/ui/locales/bn.ts)
|
|
114
|
+
- [cs.ts](src/ui/locales/cs.ts)
|
|
115
|
+
- [da.ts](src/ui/locales/da.ts)
|
|
116
|
+
- [de.ts](src/ui/locales/de.ts)
|
|
117
|
+
- [el.ts](src/ui/locales/el.ts)
|
|
118
|
+
- [en.ts](src/ui/locales/en.ts)
|
|
119
|
+
- [en_GB.ts](src/ui/locales/en_GB.ts)
|
|
120
|
+
- [es.ts](src/ui/locales/es.ts)
|
|
121
|
+
- [es_MX.ts](src/ui/locales/es_MX.ts)
|
|
122
|
+
- [fa-latn.ts](src/ui/locales/fa-latn.ts)
|
|
123
|
+
- [fi.ts](src/ui/locales/fi.ts)
|
|
124
|
+
- [fil.ts](src/ui/locales/fil.ts)
|
|
125
|
+
- [fr.ts](src/ui/locales/fr.ts)
|
|
126
|
+
- [fr_CA.ts](src/ui/locales/fr_CA.ts)
|
|
127
|
+
- [ha.ts](src/ui/locales/ha.ts)
|
|
128
|
+
- [he.ts](src/ui/locales/he.ts)
|
|
129
|
+
- [hi.ts](src/ui/locales/hi.ts)
|
|
130
|
+
- [hr.ts](src/ui/locales/hr.ts)
|
|
131
|
+
- [hu.ts](src/ui/locales/hu.ts)
|
|
132
|
+
- [id.ts](src/ui/locales/id.ts)
|
|
133
|
+
- [is.ts](src/ui/locales/is.ts)
|
|
134
|
+
- [it.ts](src/ui/locales/it.ts)
|
|
135
|
+
- [ja.ts](src/ui/locales/ja.ts)
|
|
136
|
+
- [ka_GE.ts](src/ui/locales/ka_GE.ts)
|
|
137
|
+
- [kk.ts](src/ui/locales/kk.ts)
|
|
138
|
+
- [km_KH.ts](src/ui/locales/km_KH.ts)
|
|
139
|
+
- [ko.ts](src/ui/locales/ko.ts)
|
|
140
|
+
- [lv.ts](src/ui/locales/lv.ts)
|
|
141
|
+
- [ms.ts](src/ui/locales/ms.ts)
|
|
142
|
+
- [ne.ts](src/ui/locales/ne.ts)
|
|
143
|
+
- [nl.ts](src/ui/locales/nl.ts)
|
|
144
|
+
- [no.ts](src/ui/locales/no.ts)
|
|
145
|
+
- [pl.ts](src/ui/locales/pl.ts)
|
|
146
|
+
- [ps_AF.ts](src/ui/locales/ps_AF.ts)
|
|
147
|
+
- [pt.ts](src/ui/locales/pt.ts)
|
|
148
|
+
- [pt_BR.ts](src/ui/locales/pt_BR.ts)
|
|
149
|
+
- [ro.ts](src/ui/locales/ro.ts)
|
|
150
|
+
- [ru.ts](src/ui/locales/ru.ts)
|
|
151
|
+
- [si.ts](src/ui/locales/si.ts)
|
|
152
|
+
- [sk.ts](src/ui/locales/sk.ts)
|
|
153
|
+
- [sl.ts](src/ui/locales/sl.ts)
|
|
154
|
+
- [sr.ts](src/ui/locales/sr.ts)
|
|
155
|
+
- [sv.ts](src/ui/locales/sv.ts)
|
|
156
|
+
- [sw.ts](src/ui/locales/sw.ts)
|
|
157
|
+
- [th.ts](src/ui/locales/th.ts)
|
|
158
|
+
- [tr.ts](src/ui/locales/tr.ts)
|
|
159
|
+
- [uk.ts](src/ui/locales/uk.ts)
|
|
160
|
+
- [ur.ts](src/ui/locales/ur.ts)
|
|
161
|
+
- [uz.ts](src/ui/locales/uz.ts)
|
|
162
|
+
- [vi.ts](src/ui/locales/vi.ts)
|
|
163
|
+
- [yo.ts](src/ui/locales/yo.ts)
|
|
164
|
+
- [zh_CN.ts](src/ui/locales/zh_CN.ts)
|
|
165
|
+
- [zh_TW.ts](src/ui/locales/zh_TW.ts)
|
|
166
|
+
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
You can import any of these files directly or use them as a starting point for your own localization.
|