@asdp/ferryui 0.1.22-dev.8895 → 0.1.22-dev.8918

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/dist/index.mjs CHANGED
@@ -378,7 +378,7 @@ var useStyles2 = makeStyles({
378
378
  insetInlineEnd: "15% !important"
379
379
  },
380
380
  [`@media (min-width: ${extendedTokens.breakpointMd}) and (max-width: ${extendedTokens.breakpointLg})`]: {
381
- insetInlineEnd: "13% !important"
381
+ insetInlineEnd: "11% !important"
382
382
  }
383
383
  },
384
384
  closeButtonWithoutNav: {
@@ -8199,17 +8199,6 @@ var ModalPassengerForm = ({
8199
8199
  }
8200
8200
  });
8201
8201
  setStream(mediaStream);
8202
- if (videoRef.current) {
8203
- videoRef.current.srcObject = mediaStream;
8204
- const playPromise = videoRef.current.play();
8205
- if (playPromise !== void 0) {
8206
- playPromise.catch((error) => {
8207
- if (error.name !== "AbortError") {
8208
- console.error("Video play error:", error);
8209
- }
8210
- });
8211
- }
8212
- }
8213
8202
  } catch (err) {
8214
8203
  console.error("Failed to start camera:", err);
8215
8204
  alert(mergedLabels.cameraPermissionError);
@@ -8238,6 +8227,21 @@ var ModalPassengerForm = ({
8238
8227
  startCamera();
8239
8228
  }
8240
8229
  }, [isModalScanOpen, scanStatus, startCamera]);
8230
+ useEffect(() => {
8231
+ if (isModalScanOpen && scanStatus === "idle" && stream && videoRef.current) {
8232
+ if (videoRef.current.srcObject !== stream) {
8233
+ videoRef.current.srcObject = stream;
8234
+ const playPromise = videoRef.current.play();
8235
+ if (playPromise !== void 0) {
8236
+ playPromise.catch((error) => {
8237
+ if (error.name !== "AbortError") {
8238
+ console.error("Video play error:", error);
8239
+ }
8240
+ });
8241
+ }
8242
+ }
8243
+ }
8244
+ }, [isModalScanOpen, scanStatus, stream]);
8241
8245
  useEffect(() => {
8242
8246
  if (!isModalScanOpen) {
8243
8247
  stopCamera();
@@ -8270,6 +8274,7 @@ var ModalPassengerForm = ({
8270
8274
  let city = "";
8271
8275
  for (const line of lines) {
8272
8276
  const lower = line.toLowerCase();
8277
+ console.log({ lower });
8273
8278
  if (lower.includes("nama") && !lower.includes("kewarganegaraan")) {
8274
8279
  name = line.replace(/.*nama\s*[:;]?\s*/i, "").trim();
8275
8280
  } else if (lower.includes("nik")) {