@authme/util 2.8.26 → 2.8.27

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 (3) hide show
  1. package/index.cjs +7 -17
  2. package/index.js +7 -17
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -25,7 +25,6 @@ require('core-js/modules/es.array.includes.js');
25
25
  require('core-js/modules/es.string.includes.js');
26
26
  var fileSaver = require('file-saver');
27
27
  var JSZip = require('jszip');
28
- require('core-js/modules/es.number.to-fixed.js');
29
28
  require('core-js/modules/es.parse-int.js');
30
29
  var Lottie = require('lottie-web');
31
30
  require('core-js/modules/es.array.sort.js');
@@ -977,8 +976,6 @@ function getCanvasSize(video) {
977
976
  videoWidth = video.videoWidth;
978
977
  videoHeight = video.videoHeight;
979
978
  }
980
- console.log('=== 相機解析度 ===', videoWidth, 'x', videoHeight);
981
- console.log('視窗尺寸:', window.innerWidth, 'x', window.innerHeight);
982
979
  const result = {
983
980
  height: 0,
984
981
  width: 0,
@@ -1012,12 +1009,6 @@ function getCanvasSize(video) {
1012
1009
  const resizeRatio = Math.min(1, maxDimension / Math.max(result.width, result.height));
1013
1010
  result.canvasWidth = Math.floor(result.width * resizeRatio);
1014
1011
  result.canvasHeight = Math.floor(result.height * resizeRatio);
1015
- console.log('調整比例:', resizeRatio.toFixed(3));
1016
- console.log('=== 最終輸出解析度 ===', result.canvasWidth, 'x', result.canvasHeight);
1017
- console.log('裁切區域:', `${result.width}x${result.height} 起始點:(${result.startX}, ${result.startY})`);
1018
- const totalPixels = result.canvasWidth * result.canvasHeight;
1019
- const estimatedMB = totalPixels * 4 / 1024 / 1024; // 4 bytes per pixel (RGBA)
1020
- console.log('估計記憶體用量:', estimatedMB.toFixed(2), 'MB (未壓縮)');
1021
1012
  return result;
1022
1013
  });
1023
1014
  }
@@ -1067,11 +1058,11 @@ const uiThemeText = (dom, textStyle, distance) => {
1067
1058
  parent.style.display = 'block';
1068
1059
  // Adjust based on direction if provided
1069
1060
  if (textStyle.direction === 'top') {
1070
- parent.style.top = distance || '10vh';
1061
+ parent.style.top = distance || '7vh';
1071
1062
  parent.style.bottom = 'unset';
1072
1063
  } else if (textStyle.direction === 'bottom') {
1073
1064
  parent.style.top = 'unset';
1074
- parent.style.bottom = distance || '10vh';
1065
+ parent.style.bottom = distance || '7vh';
1075
1066
  }
1076
1067
  }
1077
1068
  };
@@ -1089,11 +1080,11 @@ const uiThemeHint = (dom, hintStyle, distance) => {
1089
1080
  parent.style.position = 'absolute';
1090
1081
  // Adjust based on direction if provided
1091
1082
  if (hintStyle.direction === 'top') {
1092
- parent.style.top = distance || '10vh';
1083
+ parent.style.top = distance || '7vh';
1093
1084
  parent.style.bottom = 'unset';
1094
1085
  } else {
1095
1086
  parent.style.top = 'unset';
1096
- parent.style.bottom = distance || '10vh';
1087
+ parent.style.bottom = distance || '7vh';
1097
1088
  }
1098
1089
  }
1099
1090
  };
@@ -1152,8 +1143,7 @@ const uiThemeButton = (dom, buttonStyle, disabled) => {
1152
1143
  dom.style.borderStyle = 'solid';
1153
1144
  // dom.style.height = `${buttonStyle.cornerRadius * 2}px`;
1154
1145
  dom.style.height = `48px`;
1155
- dom.style.width = `calc(100% - ${buttonStyle.cornerRadius * 2}px)`;
1156
- dom.style.maxWidth = `327px`;
1146
+ dom.style.width = `774px`;
1157
1147
  };
1158
1148
  const uiThemeSmallButton = (dom, buttonStyle) => {
1159
1149
  dom.style.borderRadius = `${buttonStyle.cornerRadius}px`;
@@ -3251,8 +3241,8 @@ const themeConfigDefault = {
3251
3241
  };
3252
3242
 
3253
3243
  var name = "authme/sdk";
3254
- var version$1 = "2.8.26";
3255
- var date = "2025-09-30T03:00:07+0000";
3244
+ var version$1 = "2.8.27";
3245
+ var date = "2025-10-02T06:50:39+0000";
3256
3246
  var packageInfo = {
3257
3247
  name: name,
3258
3248
  version: version$1,
package/index.js CHANGED
@@ -21,7 +21,6 @@ import 'core-js/modules/es.array.includes.js';
21
21
  import 'core-js/modules/es.string.includes.js';
22
22
  import { saveAs } from 'file-saver';
23
23
  import JSZip from 'jszip';
24
- import 'core-js/modules/es.number.to-fixed.js';
25
24
  import 'core-js/modules/es.parse-int.js';
26
25
  import Lottie from 'lottie-web';
27
26
  import 'core-js/modules/es.array.sort.js';
@@ -967,8 +966,6 @@ function getCanvasSize(video) {
967
966
  videoWidth = video.videoWidth;
968
967
  videoHeight = video.videoHeight;
969
968
  }
970
- console.log('=== 相機解析度 ===', videoWidth, 'x', videoHeight);
971
- console.log('視窗尺寸:', window.innerWidth, 'x', window.innerHeight);
972
969
  const result = {
973
970
  height: 0,
974
971
  width: 0,
@@ -1002,12 +999,6 @@ function getCanvasSize(video) {
1002
999
  const resizeRatio = Math.min(1, maxDimension / Math.max(result.width, result.height));
1003
1000
  result.canvasWidth = Math.floor(result.width * resizeRatio);
1004
1001
  result.canvasHeight = Math.floor(result.height * resizeRatio);
1005
- console.log('調整比例:', resizeRatio.toFixed(3));
1006
- console.log('=== 最終輸出解析度 ===', result.canvasWidth, 'x', result.canvasHeight);
1007
- console.log('裁切區域:', `${result.width}x${result.height} 起始點:(${result.startX}, ${result.startY})`);
1008
- const totalPixels = result.canvasWidth * result.canvasHeight;
1009
- const estimatedMB = totalPixels * 4 / 1024 / 1024; // 4 bytes per pixel (RGBA)
1010
- console.log('估計記憶體用量:', estimatedMB.toFixed(2), 'MB (未壓縮)');
1011
1002
  return result;
1012
1003
  });
1013
1004
  }
@@ -1057,11 +1048,11 @@ const uiThemeText = (dom, textStyle, distance) => {
1057
1048
  parent.style.display = 'block';
1058
1049
  // Adjust based on direction if provided
1059
1050
  if (textStyle.direction === 'top') {
1060
- parent.style.top = distance || '10vh';
1051
+ parent.style.top = distance || '7vh';
1061
1052
  parent.style.bottom = 'unset';
1062
1053
  } else if (textStyle.direction === 'bottom') {
1063
1054
  parent.style.top = 'unset';
1064
- parent.style.bottom = distance || '10vh';
1055
+ parent.style.bottom = distance || '7vh';
1065
1056
  }
1066
1057
  }
1067
1058
  };
@@ -1079,11 +1070,11 @@ const uiThemeHint = (dom, hintStyle, distance) => {
1079
1070
  parent.style.position = 'absolute';
1080
1071
  // Adjust based on direction if provided
1081
1072
  if (hintStyle.direction === 'top') {
1082
- parent.style.top = distance || '10vh';
1073
+ parent.style.top = distance || '7vh';
1083
1074
  parent.style.bottom = 'unset';
1084
1075
  } else {
1085
1076
  parent.style.top = 'unset';
1086
- parent.style.bottom = distance || '10vh';
1077
+ parent.style.bottom = distance || '7vh';
1087
1078
  }
1088
1079
  }
1089
1080
  };
@@ -1142,8 +1133,7 @@ const uiThemeButton = (dom, buttonStyle, disabled) => {
1142
1133
  dom.style.borderStyle = 'solid';
1143
1134
  // dom.style.height = `${buttonStyle.cornerRadius * 2}px`;
1144
1135
  dom.style.height = `48px`;
1145
- dom.style.width = `calc(100% - ${buttonStyle.cornerRadius * 2}px)`;
1146
- dom.style.maxWidth = `327px`;
1136
+ dom.style.width = `774px`;
1147
1137
  };
1148
1138
  const uiThemeSmallButton = (dom, buttonStyle) => {
1149
1139
  dom.style.borderRadius = `${buttonStyle.cornerRadius}px`;
@@ -3241,8 +3231,8 @@ const themeConfigDefault = {
3241
3231
  };
3242
3232
 
3243
3233
  var name = "authme/sdk";
3244
- var version$1 = "2.8.26";
3245
- var date = "2025-09-30T03:00:07+0000";
3234
+ var version$1 = "2.8.27";
3235
+ var date = "2025-10-02T06:50:39+0000";
3246
3236
  var packageInfo = {
3247
3237
  name: name,
3248
3238
  version: version$1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authme/util",
3
- "version": "2.8.26",
3
+ "version": "2.8.27",
4
4
  "peerDependencies": {
5
5
  "core-js": "^3.6.0",
6
6
  "file-saver": "2.0.5",