@jaak.ai/stamps 2.0.0 → 2.1.0-dev.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/README.md +11 -1
- package/dist/cjs/jaak-stamps-webcomponent.cjs.js +1 -1
- package/dist/cjs/jaak-stamps.cjs.entry.js +759 -623
- package/dist/cjs/jaak-stamps.cjs.entry.js.map +1 -1
- package/dist/cjs/jaak-stamps.entry.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/my-component/my-component.css +178 -11
- package/dist/collection/components/my-component/my-component.js +566 -250
- package/dist/collection/components/my-component/my-component.js.map +1 -1
- package/dist/collection/services/CameraService.js +156 -344
- package/dist/collection/services/CameraService.js.map +1 -1
- package/dist/collection/services/DetectionService.js +68 -38
- package/dist/collection/services/DetectionService.js.map +1 -1
- package/dist/collection/services/EventBusService.js +1 -1
- package/dist/collection/services/EventBusService.js.map +1 -1
- package/dist/collection/services/ServiceContainer.js +4 -13
- package/dist/collection/services/ServiceContainer.js.map +1 -1
- package/dist/collection/services/interfaces/ICameraService.js.map +1 -1
- package/dist/collection/types/component-types.js.map +1 -1
- package/dist/components/jaak-stamps.js +763 -626
- package/dist/components/jaak-stamps.js.map +1 -1
- package/dist/esm/jaak-stamps-webcomponent.js +1 -1
- package/dist/esm/jaak-stamps.entry.js +759 -623
- package/dist/esm/jaak-stamps.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps-webcomponent.esm.js +1 -1
- package/dist/jaak-stamps-webcomponent/jaak-stamps.entry.esm.js.map +1 -1
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js +2 -0
- package/dist/jaak-stamps-webcomponent/p-41e88688.entry.js.map +1 -0
- package/dist/types/components/my-component/my-component.d.ts +68 -17
- package/dist/types/components.d.ts +14 -8
- package/dist/types/services/CameraService.d.ts +12 -14
- package/dist/types/services/DetectionService.d.ts +10 -3
- package/dist/types/services/ServiceContainer.d.ts +1 -2
- package/dist/types/services/interfaces/ICameraService.d.ts +3 -12
- package/dist/types/types/component-types.d.ts +3 -0
- package/package.json +2 -2
- package/dist/collection/services/LoggerService.js +0 -40
- package/dist/collection/services/LoggerService.js.map +0 -1
- package/dist/collection/services/interfaces/ILogger.js +0 -2
- package/dist/collection/services/interfaces/ILogger.js.map +0 -1
- package/dist/jaak-stamps-webcomponent/p-2264b5b4.entry.js +0 -2
- package/dist/jaak-stamps-webcomponent/p-2264b5b4.entry.js.map +0 -1
- package/dist/types/services/LoggerService.d.ts +0 -12
- package/dist/types/services/interfaces/ILogger.d.ts +0 -8
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-BfhtOB0D.js');
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["jaak-stamps.cjs",[[1,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]
|
|
8
|
+
return index.bootstrapLazy([["jaak-stamps.cjs",[[1,"jaak-stamps",{"debug":[4],"alignmentTolerance":[2,"alignment-tolerance"],"maskSize":[2,"mask-size"],"cropMargin":[2,"crop-margin"],"useDocumentClassification":[4,"use-document-classification"],"useDocumentDetector":[4,"use-document-detector"],"preferredCamera":[1,"preferred-camera"],"captureDelay":[2,"capture-delay"],"enableBackDocumentTimer":[4,"enable-back-document-timer"],"backDocumentTimerDuration":[2,"back-document-timer-duration"],"detectionBoxes":[32],"sideAlignment":[32],"isMaskReady":[32],"shouldMirrorVideo":[32],"showCameraSelector":[32],"isSwitchingCamera":[32],"hasDocumentDetected":[32],"cameraInfoWithAutofocus":[32],"currentStatus":[32],"performanceData":[32],"backDocumentTimerRemaining":[32],"showManualCaptureButton":[32],"getCapturedImages":[64],"isProcessCompleted":[64],"startCapture":[64],"stopCapture":[64],"resetCapture":[64],"skipBackCapture":[64],"getStatus":[64],"preloadModel":[64],"getCameraInfo":[64],"setPreferredCamera":[64],"setCaptureDelay":[64],"getCaptureDelay":[64]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -170,18 +170,21 @@ video {
|
|
|
170
170
|
top: 50%;
|
|
171
171
|
left: 50%;
|
|
172
172
|
transform: translate(-50%, -50%);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
background: rgba(0, 0, 0, 0.25);
|
|
174
|
+
backdrop-filter: blur(20px);
|
|
175
|
+
border-radius: 12px;
|
|
176
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
177
|
+
color: #ffffff;
|
|
178
|
+
font-size: 12px;
|
|
179
|
+
font-weight: 500;
|
|
176
180
|
text-align: center;
|
|
177
181
|
white-space: normal;
|
|
178
|
-
|
|
179
|
-
backdrop-filter: blur(12px);
|
|
180
|
-
padding: 12px 20px;
|
|
181
|
-
border-radius: 8px;
|
|
182
|
+
padding: 13px;
|
|
182
183
|
max-width: 300px;
|
|
183
184
|
z-index: 20;
|
|
184
|
-
|
|
185
|
+
height: fit-content;
|
|
186
|
+
width: fit-content;
|
|
187
|
+
animation: slideInFromTopCentered 0.3s ease-out;
|
|
185
188
|
}
|
|
186
189
|
|
|
187
190
|
/* Quality indicator */
|
|
@@ -523,6 +526,81 @@ video {
|
|
|
523
526
|
max-width: 300px;
|
|
524
527
|
}
|
|
525
528
|
|
|
529
|
+
/* Sección unificada para captura del reverso */
|
|
530
|
+
.back-capture-section {
|
|
531
|
+
position: absolute;
|
|
532
|
+
bottom: 20px;
|
|
533
|
+
left: 50%;
|
|
534
|
+
transform: translateX(-50%);
|
|
535
|
+
z-index: 25;
|
|
536
|
+
display: flex;
|
|
537
|
+
flex-direction: column;
|
|
538
|
+
align-items: center;
|
|
539
|
+
width: 100%;
|
|
540
|
+
max-width: 320px;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
.back-capture-buttons {
|
|
545
|
+
display: flex;
|
|
546
|
+
gap: 12px;
|
|
547
|
+
align-items: center;
|
|
548
|
+
justify-content: center;
|
|
549
|
+
flex-wrap: wrap;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.capture-button {
|
|
553
|
+
pointer-events: auto;
|
|
554
|
+
background: #fff;
|
|
555
|
+
color: #333;
|
|
556
|
+
border: none;
|
|
557
|
+
border-radius: 25px;
|
|
558
|
+
padding: 12px 24px;
|
|
559
|
+
font-size: 14px;
|
|
560
|
+
font-weight: 600;
|
|
561
|
+
cursor: pointer;
|
|
562
|
+
transition: all 0.3s ease;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.capture-button:hover {
|
|
566
|
+
background: #f8f9fa;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.capture-button:active {
|
|
570
|
+
background: #e9ecef;
|
|
571
|
+
transform: translateY(1px);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.capture-button:disabled {
|
|
575
|
+
background: #e9ecef;
|
|
576
|
+
color: #6c757d;
|
|
577
|
+
cursor: not-allowed;
|
|
578
|
+
transform: none;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/* Responsive para móviles */
|
|
582
|
+
@media (max-width: 480px) {
|
|
583
|
+
.back-capture-section {
|
|
584
|
+
bottom: 16px;
|
|
585
|
+
max-width: 300px;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
.back-capture-buttons {
|
|
590
|
+
flex-direction: column;
|
|
591
|
+
gap: 8px;
|
|
592
|
+
width: 100%;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.capture-button,
|
|
596
|
+
.back-capture-buttons .skip-button {
|
|
597
|
+
width: 100%;
|
|
598
|
+
max-width: 200px;
|
|
599
|
+
padding: 10px 20px;
|
|
600
|
+
font-size: 13px;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
526
604
|
.skip-explanation {
|
|
527
605
|
background: rgba(0, 0, 0, 0.5);
|
|
528
606
|
color: #ffffff;
|
|
@@ -575,6 +653,7 @@ video {
|
|
|
575
653
|
display: flex;
|
|
576
654
|
gap: 8px;
|
|
577
655
|
pointer-events: auto;
|
|
656
|
+
animation: slideInFromTop 0.3s ease-out;
|
|
578
657
|
}
|
|
579
658
|
|
|
580
659
|
|
|
@@ -665,6 +744,18 @@ video {
|
|
|
665
744
|
}
|
|
666
745
|
}
|
|
667
746
|
|
|
747
|
+
/* Animación específica para elementos centrados */
|
|
748
|
+
@keyframes slideInFromTopCentered {
|
|
749
|
+
0% {
|
|
750
|
+
opacity: 0;
|
|
751
|
+
transform: translate(-50%, -50%) translateY(-8px) scale(0.95);
|
|
752
|
+
}
|
|
753
|
+
100% {
|
|
754
|
+
opacity: 1;
|
|
755
|
+
transform: translate(-50%, -50%) translateY(0) scale(1);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
668
759
|
.camera-selector-header {
|
|
669
760
|
display: flex;
|
|
670
761
|
justify-content: space-between;
|
|
@@ -715,8 +806,9 @@ video {
|
|
|
715
806
|
cursor: pointer;
|
|
716
807
|
transition: all 0.2s ease;
|
|
717
808
|
display: flex;
|
|
718
|
-
justify-content:
|
|
809
|
+
justify-content: flex-start;
|
|
719
810
|
align-items: center;
|
|
811
|
+
gap: 8px;
|
|
720
812
|
color: rgba(255, 255, 255, 0.9);
|
|
721
813
|
}
|
|
722
814
|
|
|
@@ -735,14 +827,25 @@ video {
|
|
|
735
827
|
white-space: nowrap;
|
|
736
828
|
overflow: hidden;
|
|
737
829
|
text-overflow: ellipsis;
|
|
738
|
-
margin-right:
|
|
830
|
+
margin-right: 0;
|
|
739
831
|
font-weight: 400;
|
|
832
|
+
display: flex;
|
|
833
|
+
align-items: center;
|
|
834
|
+
gap: 6px;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.camera-label .autofocus-icon {
|
|
838
|
+
font-size: 12px;
|
|
839
|
+
color: #ffffff !important;
|
|
840
|
+
opacity: 0.8;
|
|
841
|
+
flex-shrink: 0;
|
|
740
842
|
}
|
|
741
843
|
|
|
742
844
|
.selected-indicator {
|
|
743
845
|
font-size: 14px;
|
|
744
846
|
color: #ffffff;
|
|
745
847
|
opacity: 0.9;
|
|
848
|
+
flex-shrink: 0;
|
|
746
849
|
}
|
|
747
850
|
|
|
748
851
|
.device-info {
|
|
@@ -891,6 +994,12 @@ video {
|
|
|
891
994
|
.status-description {
|
|
892
995
|
font-size: 9px;
|
|
893
996
|
}
|
|
997
|
+
|
|
998
|
+
.guide-text {
|
|
999
|
+
font-size: 11px;
|
|
1000
|
+
padding: 4px 8px;
|
|
1001
|
+
border-radius: 8px;
|
|
1002
|
+
}
|
|
894
1003
|
}
|
|
895
1004
|
|
|
896
1005
|
/* Animación de carga mejorada */
|
|
@@ -956,7 +1065,7 @@ video {
|
|
|
956
1065
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
957
1066
|
z-index: 35;
|
|
958
1067
|
width: fit-content;
|
|
959
|
-
animation:
|
|
1068
|
+
animation: slideInFromTop 0.3s ease-out;
|
|
960
1069
|
transition: all 0.3s ease;
|
|
961
1070
|
}
|
|
962
1071
|
|
|
@@ -1115,3 +1224,61 @@ video {
|
|
|
1115
1224
|
font-size: 10px;
|
|
1116
1225
|
}
|
|
1117
1226
|
}
|
|
1227
|
+
|
|
1228
|
+
/* Sección de captura manual */
|
|
1229
|
+
.manual-capture-section {
|
|
1230
|
+
position: absolute;
|
|
1231
|
+
bottom: 20px;
|
|
1232
|
+
left: 50%;
|
|
1233
|
+
transform: translateX(-50%);
|
|
1234
|
+
z-index: 25;
|
|
1235
|
+
display: flex;
|
|
1236
|
+
flex-direction: column;
|
|
1237
|
+
align-items: center;
|
|
1238
|
+
width: 100%;
|
|
1239
|
+
max-width: 300px;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
.manual-capture-button {
|
|
1244
|
+
pointer-events: auto;
|
|
1245
|
+
background: #fff;
|
|
1246
|
+
color: #333;
|
|
1247
|
+
border: none;
|
|
1248
|
+
border-radius: 25px;
|
|
1249
|
+
padding: 12px 24px;
|
|
1250
|
+
font-size: 14px;
|
|
1251
|
+
font-weight: 600;
|
|
1252
|
+
cursor: pointer;
|
|
1253
|
+
transition: all 0.3s ease;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.manual-capture-button:hover {
|
|
1257
|
+
background: #f8f9fa;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.manual-capture-button:active {
|
|
1261
|
+
background: #e9ecef;
|
|
1262
|
+
transform: translateY(1px);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
.manual-capture-button:disabled {
|
|
1266
|
+
background: #e9ecef;
|
|
1267
|
+
color: #6c757d;
|
|
1268
|
+
cursor: not-allowed;
|
|
1269
|
+
transform: none;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/* Responsive para móviles */
|
|
1273
|
+
@media (max-width: 480px) {
|
|
1274
|
+
.manual-capture-section {
|
|
1275
|
+
bottom: 16px;
|
|
1276
|
+
max-width: 280px;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
.manual-capture-button {
|
|
1281
|
+
padding: 10px 20px;
|
|
1282
|
+
font-size: 13px;
|
|
1283
|
+
}
|
|
1284
|
+
}
|