@jaak.ai/stamps 1.0.0-dev.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.
Files changed (122) hide show
  1. package/README.md +385 -0
  2. package/dist/cjs/document-detector_19.cjs.entry.js +8528 -0
  3. package/dist/cjs/index-5e4e5e7d.js +1685 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +22 -0
  6. package/dist/cjs/mb-tooltip.cjs.entry.js +26 -0
  7. package/dist/cjs/stamps.cjs.js +23 -0
  8. package/dist/collection/collection-manifest.json +31 -0
  9. package/dist/collection/components/document-detector/document-detector.css +154 -0
  10. package/dist/collection/components/document-detector/document-detector.js +383 -0
  11. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.css +360 -0
  12. package/dist/collection/components/shared/mb-api-process-status/mb-api-process-status.js +124 -0
  13. package/dist/collection/components/shared/mb-button/mb-button.css +95 -0
  14. package/dist/collection/components/shared/mb-button/mb-button.js +201 -0
  15. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.css +100 -0
  16. package/dist/collection/components/shared/mb-button-classic/mb-button-classic.js +130 -0
  17. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.css +740 -0
  18. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.js +827 -0
  19. package/dist/collection/components/shared/mb-camera-experience/mb-camera-experience.utils.js +55 -0
  20. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.css +124 -0
  21. package/dist/collection/components/shared/mb-camera-selection/mb-camera-selection.js +194 -0
  22. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.css +80 -0
  23. package/dist/collection/components/shared/mb-camera-toolbar/mb-camera-toolbar.js +275 -0
  24. package/dist/collection/components/shared/mb-completed/mb-completed.css +17 -0
  25. package/dist/collection/components/shared/mb-completed/mb-completed.js +48 -0
  26. package/dist/collection/components/shared/mb-component/mb-component.css +321 -0
  27. package/dist/collection/components/shared/mb-component/mb-component.js +2269 -0
  28. package/dist/collection/components/shared/mb-component/mb-component.utils.js +14 -0
  29. package/dist/collection/components/shared/mb-container/mb-container.css +7 -0
  30. package/dist/collection/components/shared/mb-container/mb-container.js +23 -0
  31. package/dist/collection/components/shared/mb-feedback/mb-feedback.css +36 -0
  32. package/dist/collection/components/shared/mb-feedback/mb-feedback.js +91 -0
  33. package/dist/collection/components/shared/mb-feedback/mb-feedback.utils.js +11 -0
  34. package/dist/collection/components/shared/mb-help/mb-help.css +191 -0
  35. package/dist/collection/components/shared/mb-help/mb-help.js +409 -0
  36. package/dist/collection/components/shared/mb-help/mb-help.model.js +5 -0
  37. package/dist/collection/components/shared/mb-image-box/mb-image-box.css +78 -0
  38. package/dist/collection/components/shared/mb-image-box/mb-image-box.js +150 -0
  39. package/dist/collection/components/shared/mb-modal/mb-modal.css +106 -0
  40. package/dist/collection/components/shared/mb-modal/mb-modal.js +239 -0
  41. package/dist/collection/components/shared/mb-overlay/mb-overlay.css +46 -0
  42. package/dist/collection/components/shared/mb-overlay/mb-overlay.js +76 -0
  43. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.css +24 -0
  44. package/dist/collection/components/shared/mb-progress-tracker/mb-progress-tracker.js +80 -0
  45. package/dist/collection/components/shared/mb-screen/mb-screen.css +19 -0
  46. package/dist/collection/components/shared/mb-screen/mb-screen.js +48 -0
  47. package/dist/collection/components/shared/mb-spinner/mb-spinner.css +30 -0
  48. package/dist/collection/components/shared/mb-spinner/mb-spinner.js +67 -0
  49. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.css +62 -0
  50. package/dist/collection/components/shared/mb-tooltip/mb-tooltip.js +150 -0
  51. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.css +91 -0
  52. package/dist/collection/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.js +96 -0
  53. package/dist/collection/index.js +1 -0
  54. package/dist/collection/utils/data-structures.js +189 -0
  55. package/dist/collection/utils/device.helpers.js +37 -0
  56. package/dist/collection/utils/error-structures.js +47 -0
  57. package/dist/collection/utils/generic.helpers.js +82 -0
  58. package/dist/collection/utils/sdk.service.js +943 -0
  59. package/dist/collection/utils/state-lifter.js +3 -0
  60. package/dist/collection/utils/status.document-detector.js +15 -0
  61. package/dist/collection/utils/translation.service.js +97 -0
  62. package/dist/esm/document-detector_19.entry.js +8506 -0
  63. package/dist/esm/index-dc740acb.js +1656 -0
  64. package/dist/esm/index.js +1 -0
  65. package/dist/esm/loader.js +18 -0
  66. package/dist/esm/mb-tooltip.entry.js +22 -0
  67. package/dist/esm/polyfills/core-js.js +11 -0
  68. package/dist/esm/polyfills/css-shim.js +1 -0
  69. package/dist/esm/polyfills/dom.js +79 -0
  70. package/dist/esm/polyfills/es5-html-element.js +1 -0
  71. package/dist/esm/polyfills/index.js +34 -0
  72. package/dist/esm/polyfills/system.js +6 -0
  73. package/dist/esm/stamps.js +18 -0
  74. package/dist/index.cjs.js +1 -0
  75. package/dist/index.js +1 -0
  76. package/dist/stamps/index.esm.js +0 -0
  77. package/dist/stamps/p-02990b18.entry.js +9 -0
  78. package/dist/stamps/p-7f07a434.js +2 -0
  79. package/dist/stamps/p-ec3f5972.entry.js +1 -0
  80. package/dist/stamps/stamps.esm.js +1 -0
  81. package/dist/types/components/document-detector/document-detector.d.ts +84 -0
  82. package/dist/types/components/shared/mb-api-process-status/mb-api-process-status.d.ts +30 -0
  83. package/dist/types/components/shared/mb-button/mb-button.d.ts +41 -0
  84. package/dist/types/components/shared/mb-button-classic/mb-button-classic.d.ts +27 -0
  85. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.d.ts +141 -0
  86. package/dist/types/components/shared/mb-camera-experience/mb-camera-experience.utils.d.ts +3 -0
  87. package/dist/types/components/shared/mb-camera-selection/mb-camera-selection.d.ts +33 -0
  88. package/dist/types/components/shared/mb-camera-toolbar/mb-camera-toolbar.d.ts +54 -0
  89. package/dist/types/components/shared/mb-completed/mb-completed.d.ts +12 -0
  90. package/dist/types/components/shared/mb-component/mb-component.d.ts +308 -0
  91. package/dist/types/components/shared/mb-component/mb-component.utils.d.ts +3 -0
  92. package/dist/types/components/shared/mb-container/mb-container.d.ts +8 -0
  93. package/dist/types/components/shared/mb-feedback/mb-feedback.d.ts +19 -0
  94. package/dist/types/components/shared/mb-feedback/mb-feedback.utils.d.ts +2 -0
  95. package/dist/types/components/shared/mb-help/mb-help.d.ts +66 -0
  96. package/dist/types/components/shared/mb-help/mb-help.model.d.ts +9 -0
  97. package/dist/types/components/shared/mb-image-box/mb-image-box.d.ts +35 -0
  98. package/dist/types/components/shared/mb-modal/mb-modal.d.ts +53 -0
  99. package/dist/types/components/shared/mb-overlay/mb-overlay.d.ts +17 -0
  100. package/dist/types/components/shared/mb-progress-tracker/mb-progress-tracker.d.ts +19 -0
  101. package/dist/types/components/shared/mb-screen/mb-screen.d.ts +12 -0
  102. package/dist/types/components/shared/mb-spinner/mb-spinner.d.ts +16 -0
  103. package/dist/types/components/shared/mb-tooltip/mb-tooltip.d.ts +10 -0
  104. package/dist/types/components/shared/mb-tooltip-advanced/mb-tooltip-advanced.d.ts +7 -0
  105. package/dist/types/components.d.ts +1381 -0
  106. package/dist/types/index.d.ts +1 -0
  107. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  108. package/dist/types/utils/data-structures.d.ts +264 -0
  109. package/dist/types/utils/device.helpers.d.ts +7 -0
  110. package/dist/types/utils/error-structures.d.ts +44 -0
  111. package/dist/types/utils/generic.helpers.d.ts +21 -0
  112. package/dist/types/utils/sdk.service.d.ts +52 -0
  113. package/dist/types/utils/state-lifter.d.ts +3 -0
  114. package/dist/types/utils/status.document-detector.d.ts +14 -0
  115. package/dist/types/utils/translation.service.d.ts +77 -0
  116. package/loader/cdn.js +3 -0
  117. package/loader/index.cjs.js +3 -0
  118. package/loader/index.d.ts +21 -0
  119. package/loader/index.es2017.js +3 -0
  120. package/loader/index.js +4 -0
  121. package/loader/package.json +11 -0
  122. package/package.json +63 -0
@@ -0,0 +1,14 @@
1
+ import * as BlinkIDSDK from "@microblink/blinkid-in-browser-sdk";
2
+ function getSDKWasmType(wasmType) {
3
+ switch (wasmType) {
4
+ case "BASIC":
5
+ return BlinkIDSDK.WasmType.Basic;
6
+ case "ADVANCED":
7
+ return BlinkIDSDK.WasmType.Advanced;
8
+ case "ADVANCED_WITH_THREADS":
9
+ return BlinkIDSDK.WasmType.AdvancedWithThreads;
10
+ default:
11
+ return null;
12
+ }
13
+ }
14
+ export { getSDKWasmType };
@@ -0,0 +1,7 @@
1
+ :host {
2
+ display: block;
3
+ min-width: 280px;
4
+ width: 100%;
5
+ height: 100%;
6
+ font-family: var(--mb-font-family);
7
+ }
@@ -0,0 +1,23 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { setWebComponentParts } from "../../../utils/generic.helpers";
3
+ export class MbContainer {
4
+ componentDidLoad() {
5
+ setWebComponentParts(this.hostEl);
6
+ }
7
+ render() {
8
+ return (h(Host, null, h("slot", null)));
9
+ }
10
+ static get is() { return "mb-container"; }
11
+ static get encapsulation() { return "shadow"; }
12
+ static get originalStyleUrls() {
13
+ return {
14
+ "$": ["mb-container.scss"]
15
+ };
16
+ }
17
+ static get styleUrls() {
18
+ return {
19
+ "$": ["mb-container.css"]
20
+ };
21
+ }
22
+ static get elementRef() { return "hostEl"; }
23
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright (c) Microblink Ltd. All rights reserved.
3
+ *
4
+ * SASS variables, not customizable via CSS variables
5
+ */
6
+ /**
7
+ * Camera experiences
8
+ */
9
+ :host {
10
+ display: none;
11
+ }
12
+ :host p {
13
+ margin: 4px 16px;
14
+ font-family: var(--mb-font-family);
15
+ font-size: var(--mb-feedback-font-size);
16
+ font-style: var(--mb-feedback-font-style);
17
+ font-weight: var(--mb-feedback-font-weight);
18
+ letter-spacing: var(--mb-feedback-letter-spacing);
19
+ line-height: var(--mb-feedback-line-height);
20
+ text-align: right;
21
+ text-transform: var(--mb-feedback-text-transform);
22
+ }
23
+ :host p.info {
24
+ color: var(--mb-feedback-font-color-info);
25
+ }
26
+ :host p.error {
27
+ color: var(--mb-feedback-font-color-error);
28
+ }
29
+
30
+ :host(.visible) {
31
+ display: block;
32
+ }
33
+
34
+ :host([dir=rtl]) p {
35
+ text-align: left;
36
+ }
@@ -0,0 +1,91 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { setWebComponentParts, classNames, } from "../../../utils/generic.helpers";
3
+ import * as Utils from "./mb-feedback.utils";
4
+ export class MbFeedback {
5
+ constructor() {
6
+ this.paragraphClassName = undefined;
7
+ this.paragraphValue = undefined;
8
+ this.visible = false;
9
+ }
10
+ /**
11
+ * Call when FeedbackMessage which should be displayed.
12
+ */
13
+ async show(feedback) {
14
+ this.paragraphValue = feedback.message;
15
+ this.paragraphClassName = Utils.getFeedbackClassName(feedback.state);
16
+ }
17
+ componentDidLoad() {
18
+ setWebComponentParts(this.hostEl);
19
+ }
20
+ render() {
21
+ return (h(Host, { class: classNames({ visible: this.visible }) }, h("p", { class: this.paragraphClassName }, this.paragraphValue)));
22
+ }
23
+ static get is() { return "mb-feedback"; }
24
+ static get encapsulation() { return "shadow"; }
25
+ static get originalStyleUrls() {
26
+ return {
27
+ "$": ["mb-feedback.scss"]
28
+ };
29
+ }
30
+ static get styleUrls() {
31
+ return {
32
+ "$": ["mb-feedback.css"]
33
+ };
34
+ }
35
+ static get properties() {
36
+ return {
37
+ "visible": {
38
+ "type": "boolean",
39
+ "mutable": false,
40
+ "complexType": {
41
+ "original": "boolean",
42
+ "resolved": "boolean",
43
+ "references": {}
44
+ },
45
+ "required": false,
46
+ "optional": false,
47
+ "docs": {
48
+ "tags": [],
49
+ "text": "Set to 'true' if component should be visible."
50
+ },
51
+ "attribute": "visible",
52
+ "reflect": false,
53
+ "defaultValue": "false"
54
+ }
55
+ };
56
+ }
57
+ static get states() {
58
+ return {
59
+ "paragraphClassName": {},
60
+ "paragraphValue": {}
61
+ };
62
+ }
63
+ static get methods() {
64
+ return {
65
+ "show": {
66
+ "complexType": {
67
+ "signature": "(feedback: FeedbackMessage) => Promise<void>",
68
+ "parameters": [{
69
+ "tags": [],
70
+ "text": ""
71
+ }],
72
+ "references": {
73
+ "Promise": {
74
+ "location": "global"
75
+ },
76
+ "FeedbackMessage": {
77
+ "location": "import",
78
+ "path": "../../../utils/data-structures"
79
+ }
80
+ },
81
+ "return": "Promise<void>"
82
+ },
83
+ "docs": {
84
+ "text": "Call when FeedbackMessage which should be displayed.",
85
+ "tags": []
86
+ }
87
+ }
88
+ };
89
+ }
90
+ static get elementRef() { return "hostEl"; }
91
+ }
@@ -0,0 +1,11 @@
1
+ function getFeedbackClassName(state) {
2
+ switch (state) {
3
+ case "FEEDBACK_ERROR":
4
+ return "error";
5
+ case "FEEDBACK_INFO":
6
+ return "info";
7
+ default:
8
+ return "";
9
+ }
10
+ }
11
+ export { getFeedbackClassName };
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Copyright (c) Microblink Ltd. All rights reserved.
3
+ *
4
+ * SASS variables, not customizable via CSS variables
5
+ */
6
+ /**
7
+ * Camera experiences
8
+ */
9
+ :host {
10
+ font-family: inherit;
11
+ visibility: hidden;
12
+ opacity: 0;
13
+ }
14
+
15
+ :host(.visible) {
16
+ visibility: visible;
17
+ opacity: 1;
18
+ }
19
+
20
+ .lobby {
21
+ display: block;
22
+ position: absolute;
23
+ right: 40px;
24
+ bottom: 40px;
25
+ width: auto;
26
+ height: auto;
27
+ }
28
+ .lobby mb-tooltip-advanced {
29
+ --background-color: var(--mb-help-lobby-button-tooltip-background-color);
30
+ --font-color: var(--mb-help-lobby-button-tooltip-font-color);
31
+ }
32
+ .lobby mb-tooltip-advanced::part(tooltip) {
33
+ left: -46px;
34
+ right: calc(50% - 19px);
35
+ bottom: 41px;
36
+ width: auto;
37
+ }
38
+
39
+ .lobby button {
40
+ width: 36px;
41
+ height: 36px;
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
+ padding: 0px;
46
+ background-color: var(--mb-help-lobby-button-background-color);
47
+ border: 1px solid var(--mb-help-lobby-button-border-color);
48
+ border-radius: 50%;
49
+ cursor: pointer;
50
+ }
51
+
52
+ .lobby button:hover {
53
+ background-color: var(--mb-help-lobby-button-hovered-background-color);
54
+ border-color: var(--mb-help-lobby-button-hovered-border-color);
55
+ }
56
+
57
+ .lobby button:focus {
58
+ background-color: var(--mb-help-lobby-button-focused-background-color);
59
+ border-color: var(--mb-help-lobby-button-focused-border-color);
60
+ }
61
+
62
+ .lobby button svg.icon-question-mark {
63
+ width: auto;
64
+ height: 18px;
65
+ }
66
+
67
+ mb-overlay {
68
+ background-color: var(--mb-help-modal-backdrop-color);
69
+ }
70
+
71
+ mb-modal::part(mb-modal-inner) {
72
+ background-color: var(--mb-help-modal-background-color);
73
+ border-radius: var(--mb-modal-border-radius);
74
+ }
75
+
76
+ .modal-content {
77
+ display: block;
78
+ padding-top: 20px;
79
+ }
80
+
81
+ .modal-content .svg-container {
82
+ display: flex;
83
+ justify-content: center;
84
+ margin-bottom: 24px;
85
+ }
86
+
87
+ .modal-content .svg-container svg {
88
+ width: 280px;
89
+ height: auto;
90
+ margin: 0px auto;
91
+ }
92
+
93
+ .modal-content p.title {
94
+ font-family: inherit;
95
+ font-style: normal;
96
+ font-weight: 700;
97
+ font-size: 24px;
98
+ line-height: 32px;
99
+ text-align: center;
100
+ color: var(--mb-help-font-color-primary);
101
+ margin-bottom: 8px;
102
+ }
103
+
104
+ .modal-content p.description {
105
+ font-family: inherit;
106
+ font-style: normal;
107
+ font-weight: 400;
108
+ font-size: 16px;
109
+ line-height: 24px;
110
+ text-align: center;
111
+ margin-bottom: 0px;
112
+ color: var(--mb-help-font-color-secondary);
113
+ min-height: 96px;
114
+ }
115
+
116
+ .modal-content .progress-tracker-container {
117
+ display: flex;
118
+ justify-content: center;
119
+ margin-top: 48px;
120
+ }
121
+
122
+ .modal-content .buttons {
123
+ display: flex;
124
+ flex-direction: row;
125
+ align-items: center;
126
+ justify-content: center;
127
+ margin-top: 40px;
128
+ margin-bottom: 0px;
129
+ }
130
+
131
+ .modal-content .buttons mb-button-classic {
132
+ margin: 0px 8px;
133
+ }
134
+
135
+ .modal-content .buttons mb-button-classic::part(button) {
136
+ min-width: 200px;
137
+ width: auto;
138
+ }
139
+
140
+ .modal-content .buttons.onboarding {
141
+ margin-top: 24px;
142
+ margin-bottom: 20px;
143
+ }
144
+
145
+ .modal-content .buttons.onboarding mb-button-classic::part(button) {
146
+ min-width: 155px;
147
+ width: auto;
148
+ height: 56px;
149
+ }
150
+
151
+ .modal-content mb-progress-tracker {
152
+ --mb-progress-tracker-dot-active-color: var(--mb-help-progress-tracker-dot-active-color);
153
+ --mb-progress-tracker-dot-inactive-color: var(--mb-help-progress-tracker-dot-inactive-color);
154
+ }
155
+
156
+ @media only screen and (max-width: 568px) {
157
+ .lobby {
158
+ bottom: 30px;
159
+ right: 20px;
160
+ }
161
+
162
+ .modal-content p.description {
163
+ text-align: left;
164
+ min-height: 120px;
165
+ }
166
+
167
+ .modal-content .progress-tracker-container {
168
+ margin-top: 24px;
169
+ }
170
+
171
+ .modal-content .buttons {
172
+ margin-top: 24px;
173
+ }
174
+
175
+ .modal-content .buttons mb-button-classic {
176
+ margin: 0px 4px;
177
+ }
178
+
179
+ .modal-content .buttons mb-button-classic::part(button) {
180
+ min-width: 112px;
181
+ width: auto;
182
+ }
183
+ }
184
+ @media only screen and (min-width: 568px) {
185
+ mb-modal {
186
+ width: 500px;
187
+ max-width: 100%;
188
+ margin-left: auto;
189
+ margin-right: auto;
190
+ }
191
+ }