@apps-in-toss/native-modules 2.4.0 → 2.4.1
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.cjs +7 -5
- package/dist/index.js +7 -5
- package/package.json +2 -2
- package/src/BedrockModule/commonModule.ts +3 -5
- package/src/MiniAppModule/postMessage.ts +1 -8
- package/src/natives.ts +0 -1
- package/src/spec/CommonModule.brick.ts +3 -1
- package/src/spec/MiniAppModule.brick.ts +3 -1
- package/src/spec/TossCoreModule.brick.ts +3 -1
- package/src/TossCoreModule/instance.ts +0 -8
package/dist/index.cjs
CHANGED
|
@@ -78,9 +78,11 @@ __export(index_exports, {
|
|
|
78
78
|
});
|
|
79
79
|
module.exports = __toCommonJS(index_exports);
|
|
80
80
|
|
|
81
|
-
// src/MiniAppModule
|
|
81
|
+
// src/spec/MiniAppModule.brick.ts
|
|
82
82
|
var import_brick_module = require("brick-module");
|
|
83
83
|
var MiniAppModule = import_brick_module.BrickModule.get("MiniAppModule");
|
|
84
|
+
|
|
85
|
+
// src/MiniAppModule/postMessage.ts
|
|
84
86
|
function safePostMessage(method, params) {
|
|
85
87
|
return MiniAppModule.postMessage(method, params, {});
|
|
86
88
|
}
|
|
@@ -95,13 +97,13 @@ var import_react_native4 = require("@granite-js/react-native");
|
|
|
95
97
|
var import_types = require("@apps-in-toss/types");
|
|
96
98
|
var import_react_native = require("@granite-js/react-native");
|
|
97
99
|
|
|
98
|
-
// src/
|
|
100
|
+
// src/spec/TossCoreModule.brick.ts
|
|
99
101
|
var import_brick_module2 = require("brick-module");
|
|
100
|
-
var
|
|
102
|
+
var TossCoreModule = import_brick_module2.BrickModule.get("TossCoreModule");
|
|
101
103
|
|
|
102
|
-
// src/
|
|
104
|
+
// src/spec/CommonModule.brick.ts
|
|
103
105
|
var import_brick_module3 = require("brick-module");
|
|
104
|
-
var
|
|
106
|
+
var CommonModule = import_brick_module3.BrickModule.get("CommonModule");
|
|
105
107
|
|
|
106
108
|
// src/MiniAppModule/native-modules/permissions/openPermissionDialog.ts
|
|
107
109
|
function openPermissionDialog(permission) {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
// src/MiniAppModule
|
|
1
|
+
// src/spec/MiniAppModule.brick.ts
|
|
2
2
|
import { BrickModule } from "brick-module";
|
|
3
3
|
var MiniAppModule = BrickModule.get("MiniAppModule");
|
|
4
|
+
|
|
5
|
+
// src/MiniAppModule/postMessage.ts
|
|
4
6
|
function safePostMessage(method, params) {
|
|
5
7
|
return MiniAppModule.postMessage(method, params, {});
|
|
6
8
|
}
|
|
@@ -15,13 +17,13 @@ import { GraniteEvent } from "@granite-js/react-native";
|
|
|
15
17
|
import { GetCurrentLocationPermissionError } from "@apps-in-toss/types";
|
|
16
18
|
import { GraniteEventDefinition } from "@granite-js/react-native";
|
|
17
19
|
|
|
18
|
-
// src/
|
|
20
|
+
// src/spec/TossCoreModule.brick.ts
|
|
19
21
|
import { BrickModule as BrickModule2 } from "brick-module";
|
|
20
|
-
var
|
|
22
|
+
var TossCoreModule = BrickModule2.get("TossCoreModule");
|
|
21
23
|
|
|
22
|
-
// src/
|
|
24
|
+
// src/spec/CommonModule.brick.ts
|
|
23
25
|
import { BrickModule as BrickModule3 } from "brick-module";
|
|
24
|
-
var
|
|
26
|
+
var CommonModule = BrickModule3.get("CommonModule");
|
|
25
27
|
|
|
26
28
|
// src/MiniAppModule/native-modules/permissions/openPermissionDialog.ts
|
|
27
29
|
function openPermissionDialog(permission) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/native-modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"description": "Native Modules for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vitest": "^3.2.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@apps-in-toss/types": "2.4.
|
|
45
|
+
"@apps-in-toss/types": "2.4.1",
|
|
46
46
|
"brick-module": "0.5.0",
|
|
47
47
|
"es-toolkit": "^1.39.3"
|
|
48
48
|
},
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { BrickModule } from 'brick-module';
|
|
2
|
-
import type { CommonModuleSpec } from '../spec/CommonModule.brick';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* CommonModule Instance
|
|
6
3
|
* Native module instance accessed through BrickModule
|
|
7
4
|
*/
|
|
8
|
-
export const CommonModule = BrickModule.get<CommonModuleSpec>('CommonModule');
|
|
9
|
-
|
|
10
5
|
/**
|
|
11
6
|
* Deprecated exports for backward compatibility
|
|
12
7
|
*/
|
|
8
|
+
|
|
9
|
+
import { CommonModule } from '../spec/CommonModule.brick';
|
|
10
|
+
|
|
13
11
|
/** @deprecated Use CommonModule instead */
|
|
14
12
|
export const BedrockModule = CommonModule;
|
|
@@ -7,7 +7,6 @@ import type {
|
|
|
7
7
|
PermissionName,
|
|
8
8
|
PermissionStatus,
|
|
9
9
|
} from '@apps-in-toss/types';
|
|
10
|
-
import { BrickModule } from 'brick-module';
|
|
11
10
|
import type { AppsInTossSignTossCertParams } from './native-modules/appsInTossSignTossCert';
|
|
12
11
|
import type { CheckoutPaymentOptions, CheckoutPaymentResult } from './native-modules/checkoutPayment';
|
|
13
12
|
import type { GameCenterGameProfileResponse } from './native-modules/getGameCenterGameProfile';
|
|
@@ -16,7 +15,7 @@ import type { GrantPromotionRewardForGameResponse } from './native-modules/grant
|
|
|
16
15
|
import type { IapCreateOneTimePurchaseOrderResult, IapSubscriptionInfoResult } from './native-modules/iap';
|
|
17
16
|
import type { SaveBase64DataParams } from './native-modules/saveBase64Data';
|
|
18
17
|
import type { SubmitGameCenterLeaderBoardScoreResponse } from './native-modules/submitGameCenterLeaderBoardScore';
|
|
19
|
-
import
|
|
18
|
+
import { MiniAppModule } from '../spec/MiniAppModule.brick';
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Async Methods Map
|
|
@@ -107,12 +106,6 @@ export interface SyncMethodsMap {
|
|
|
107
106
|
stopUpdateLocation: (params: object) => void;
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
/**
|
|
111
|
-
* MiniAppModule Instance
|
|
112
|
-
* Native module instance accessed through BrickModule
|
|
113
|
-
*/
|
|
114
|
-
export const MiniAppModule = BrickModule.get<MiniAppModuleSpec>('MiniAppModule');
|
|
115
|
-
|
|
116
109
|
/**
|
|
117
110
|
* Type-safe postMessage wrapper
|
|
118
111
|
* Provides type inference for async method calls without requiring 'as unknown' casts
|
package/src/natives.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrickModuleSpec } from 'brick-module';
|
|
1
|
+
import { BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
2
|
|
|
3
3
|
interface ScreenAwakeModeParameter {
|
|
4
4
|
enabled: boolean;
|
|
@@ -46,3 +46,5 @@ export interface CommonModuleSpec extends BrickModuleSpec {
|
|
|
46
46
|
|
|
47
47
|
setLeftEdgeTouchEnabled(parameter: LeftEdgeTouchEnabledParameter): void;
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
export const CommonModule = BrickModule.get<CommonModuleSpec>('CommonModule');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Any, AnyObject, BrickModuleSpec } from 'brick-module';
|
|
1
|
+
import { Any, AnyObject, BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
2
|
import { CodegenTypes } from 'react-native';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -25,3 +25,5 @@ export interface MiniAppModuleSpec extends BrickModuleSpec {
|
|
|
25
25
|
body: AnyObject;
|
|
26
26
|
}>;
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
export const MiniAppModule = BrickModule.get<MiniAppModuleSpec>('MiniAppModule');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, BrickModuleSpec } from 'brick-module';
|
|
1
|
+
import { AnyObject, BrickModule, BrickModuleSpec } from 'brick-module';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* TossCoreModule Spec
|
|
@@ -9,3 +9,5 @@ export interface TossCoreModuleSpec extends BrickModuleSpec {
|
|
|
9
9
|
|
|
10
10
|
eventLog(params: AnyObject): Promise<void>;
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
export const TossCoreModule = BrickModule.get<TossCoreModuleSpec>('TossCoreModule');
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BrickModule } from 'brick-module';
|
|
2
|
-
import type { TossCoreModuleSpec } from '../spec/TossCoreModule.brick';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* TossCoreModule Instance
|
|
6
|
-
* Native module instance accessed through BrickModule
|
|
7
|
-
*/
|
|
8
|
-
export const TossCoreModule = BrickModule.get<TossCoreModuleSpec>('TossCoreModule');
|