@paypay/mini-app-js-sdk 1.69.0 → 1.70.0
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.
|
@@ -50,8 +50,8 @@ function normalizeNativeResponseData(data2) {
|
|
|
50
50
|
}
|
|
51
51
|
class JsBridge {
|
|
52
52
|
constructor(global2) {
|
|
53
|
-
this.version = "1.
|
|
54
|
-
this.revision = "
|
|
53
|
+
this.version = "1.70.0";
|
|
54
|
+
this.revision = "77b6db0";
|
|
55
55
|
this.messageHandlers = /* @__PURE__ */ new Map();
|
|
56
56
|
this.responseCallbacks = /* @__PURE__ */ new Map();
|
|
57
57
|
this.global = global2;
|
|
@@ -1961,6 +1961,14 @@ function checkVersion(minVersion) {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
return semVerCompare(appVersion, minVersion);
|
|
1963
1963
|
}
|
|
1964
|
+
function getPlatformFontSize() {
|
|
1965
|
+
const fontSize = getValueFromUA("FontSize");
|
|
1966
|
+
if (fontSize === "LARGE" || fontSize === "EXTRA_LARGE") {
|
|
1967
|
+
return fontSize;
|
|
1968
|
+
} else {
|
|
1969
|
+
return "REGULAR";
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1964
1972
|
function delay(time2 = 100) {
|
|
1965
1973
|
return new Promise((resolve2) => {
|
|
1966
1974
|
setTimeout(() => {
|
|
@@ -2108,7 +2116,7 @@ const opaUrl = () => {
|
|
|
2108
2116
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
2109
2117
|
const headers = new Headers({
|
|
2110
2118
|
"Content-Type": "application/json",
|
|
2111
|
-
"Client-Version": "1.
|
|
2119
|
+
"Client-Version": "1.70.0",
|
|
2112
2120
|
"Client-OS-Type": getRuntime(),
|
|
2113
2121
|
...customHeaders
|
|
2114
2122
|
});
|
|
@@ -36049,7 +36057,8 @@ async function execute$d(params) {
|
|
|
36049
36057
|
(_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params, {
|
|
36050
36058
|
appVersion,
|
|
36051
36059
|
sdkVersion,
|
|
36052
|
-
preferredLanguage
|
|
36060
|
+
preferredLanguage,
|
|
36061
|
+
fontSize: getPlatformFontSize()
|
|
36053
36062
|
});
|
|
36054
36063
|
}
|
|
36055
36064
|
function getDeviceInformation(params) {
|
|
@@ -36708,7 +36717,7 @@ function debug(params) {
|
|
|
36708
36717
|
function execute$a(params) {
|
|
36709
36718
|
var _a2;
|
|
36710
36719
|
(_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
|
|
36711
|
-
v: "1.
|
|
36720
|
+
v: "1.70.0"
|
|
36712
36721
|
});
|
|
36713
36722
|
}
|
|
36714
36723
|
function useCallBack(props, ctx) {
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export declare function isPayPayMiniApp(): boolean;
|
|
|
42
42
|
export declare function getAppVersion(): string | null;
|
|
43
43
|
export declare function semVerCompare(a: string, b: string): boolean;
|
|
44
44
|
export declare function checkVersion(minVersion: string): boolean;
|
|
45
|
+
declare type FontSize = 'REGULAR' | 'LARGE' | 'EXTRA_LARGE';
|
|
46
|
+
export declare function getPlatformFontSize(): FontSize;
|
|
45
47
|
export declare function delay(time?: number): Promise<boolean>;
|
|
46
48
|
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string | null | undefined) => {
|
|
47
49
|
errorCode: MiniAppErrorType;
|