@apps-in-toss/web-framework 0.0.8 → 0.0.10

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 (96) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +20 -0
  3. package/bin.js +2 -1
  4. package/dist/chunk-CH3CIAIW.js +7688 -0
  5. package/dist/chunk-DI2VGQ6M.js +53 -0
  6. package/dist/chunk-HL7M3JLX.js +53 -0
  7. package/dist/chunk-I3ZDGLIW.js +19 -0
  8. package/dist/chunk-LJBVSTWE.js +7687 -0
  9. package/dist/chunk-TZCMTMV7.js +38 -0
  10. package/dist/{chunk-MHAJE5QI.js → cli/chunk-HDRFXOPA.js} +30 -1
  11. package/dist/cli/chunk-RUDG2MMT.js +173587 -0
  12. package/dist/cli/index.cjs +644 -0
  13. package/dist/cli/index.d.cts +2 -0
  14. package/dist/cli/index.d.ts +2 -0
  15. package/dist/cli/index.js +96448 -0
  16. package/dist/{lib-EUN4APCZ.js → cli/lib-NMFBQRQ2.js} +1 -1
  17. package/dist/cli/typescript-THSIDFIK.js +6 -0
  18. package/dist/cli.cjs +480 -4518
  19. package/dist/cli.d.cts +1 -2
  20. package/dist/cli.d.ts +1 -2
  21. package/dist/cli.js +446 -3492
  22. package/dist/closeView.d.ts +24 -0
  23. package/dist/config/index.d.ts +47 -60
  24. package/dist/config/index.js +6 -7974
  25. package/dist/fetchAlbumPhotos.d.ts +75 -0
  26. package/dist/fetchContacts.d.ts +92 -0
  27. package/dist/generateHapticFeedback.d.ts +52 -0
  28. package/dist/getClipboardText.d.ts +42 -0
  29. package/dist/getCurrentLocation.d.ts +109 -0
  30. package/dist/getDeviceId.d.ts +32 -0
  31. package/dist/getLocale.d.ts +31 -0
  32. package/dist/getNetworkStatus.d.ts +55 -0
  33. package/dist/getSchemeUri.d.ts +26 -0
  34. package/dist/index.cjs +18 -0
  35. package/dist/index.d.cts +2 -0
  36. package/dist/index.d.ts +16 -0
  37. package/dist/index.js +1 -0
  38. package/dist/openCamera.d.ts +75 -0
  39. package/dist/plugins/index.cjs +7682 -0
  40. package/dist/plugins/index.d.cts +15 -0
  41. package/dist/plugins/index.d.ts +15 -0
  42. package/dist/plugins/index.js +11 -0
  43. package/dist/prebuilt/dev.android.js +155792 -0
  44. package/dist/prebuilt/dev.ios.js +155733 -0
  45. package/dist/prebuilt/prod.android.js +20 -0
  46. package/dist/prebuilt/prod.ios.js +20 -0
  47. package/dist/prebuilt/prod.json +14 -0
  48. package/dist/setClipboardText.d.ts +34 -0
  49. package/dist/setScreenAwakeMode.d.ts +69 -0
  50. package/dist/setSecureScreen.d.ts +34 -0
  51. package/dist/share.d.ts +37 -0
  52. package/dist/startUpdateLocation.d.ts +151 -0
  53. package/hermesc/0_72_6/linux64-bin/hermesc +0 -0
  54. package/hermesc/0_72_6/osx-bin/hermesc +0 -0
  55. package/hermesc/0_72_6/win64-bin/hermesc.exe +0 -0
  56. package/hermesc/0_72_6/win64-bin/icudt64.dll +0 -0
  57. package/hermesc/0_72_6/win64-bin/icuin64.dll +0 -0
  58. package/hermesc/0_72_6/win64-bin/icuio64.dll +0 -0
  59. package/hermesc/0_72_6/win64-bin/icutest64.dll +0 -0
  60. package/hermesc/0_72_6/win64-bin/icutu64.dll +0 -0
  61. package/hermesc/0_72_6/win64-bin/icuuc64.dll +0 -0
  62. package/hermesc/0_72_6/win64-bin/msvcp140.dll +0 -0
  63. package/hermesc/0_72_6/win64-bin/vcruntime140.dll +0 -0
  64. package/hermesc/0_72_6/win64-bin/vcruntime140_1.dll +0 -0
  65. package/package.json +52 -29
  66. package/src-web/appLogin.d.ts +30 -0
  67. package/src-web/closeView.d.ts +1 -2
  68. package/src-web/fetchAlbumPhotos.d.ts +2 -4
  69. package/src-web/fetchContacts.d.ts +1 -3
  70. package/src-web/generateHapticFeedback.d.ts +24 -27
  71. package/src-web/getClipboardText.d.ts +1 -3
  72. package/src-web/getCurrentLocation.d.ts +48 -13
  73. package/src-web/getDeviceId.d.ts +1 -2
  74. package/src-web/getLocale.d.ts +1 -2
  75. package/src-web/getNetworkStatus.d.ts +1 -2
  76. package/src-web/getOperationalEnvironment.d.ts +35 -0
  77. package/src-web/getPlatformOS.d.ts +28 -0
  78. package/src-web/getSchemeUri.d.ts +1 -2
  79. package/src-web/index.d.ts +3 -0
  80. package/src-web/index.js +1 -1
  81. package/src-web/openCamera.d.ts +1 -3
  82. package/src-web/setClipboardText.d.ts +1 -3
  83. package/src-web/setScreenAwakeMode.d.ts +1 -2
  84. package/src-web/setSecureScreen.d.ts +1 -2
  85. package/src-web/share.d.ts +1 -2
  86. package/src-web/startUpdateLocation.d.ts +45 -13
  87. package/dist/chunk-5AYTRYXW.js +0 -27
  88. package/dist/lib-OD73GAMK.js +0 -1007
  89. package/react-native/.babelrc +0 -41
  90. package/react-native/ait.d.ts +0 -8
  91. package/react-native/context.ts +0 -10
  92. package/react-native/index.ts +0 -4
  93. package/react-native/pages/_404.tsx +0 -1
  94. package/react-native/pages/index.tsx +0 -10
  95. package/react-native/react-native.config.cjs +0 -3
  96. package/react-native/src/_app.tsx +0 -12
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @public
3
+ * @tag BedrockModule
4
+ * @category BedrockModules
5
+ * @kind function
6
+ * @name closeView
7
+ * @description 현재 화면을 닫는 함수에요. 예를 들어, "닫기" 버튼을 눌러서 서비스를 종료할 때 사용할 수 있어요.
8
+ * @returns {Promise<void>}
9
+ *
10
+ * @example
11
+ * ### 닫기 버튼을 눌러 화면 닫기
12
+ *
13
+ * ```tsx
14
+ *
15
+ * import { closeView } from '@apps-in-toss/web-framework';
16
+ *
17
+ * function CloseButton() {
18
+ * return <input type="button" value="닫기" onClick={closeView} />;
19
+ * }
20
+ * ```
21
+ */
22
+ export declare function closeView(): Promise<void>;
23
+
24
+ export {};
@@ -1,73 +1,60 @@
1
- import { Permission, OAuthScope } from '@apps-in-toss/framework/plugins';
2
- import { BedrockConfigResponse } from 'react-native-bedrock/config';
3
- import { z } from 'zod';
4
-
5
- declare const AppsInTossConfigSchema: z.ZodObject<{
6
- appName: z.ZodString;
7
- web: z.ZodObject<{
8
- port: z.ZodNumber;
9
- commands: z.ZodObject<{
10
- dev: z.ZodString;
11
- build: z.ZodString;
12
- }, "strip", z.ZodTypeAny, {
13
- dev: string;
14
- build: string;
15
- }, {
16
- dev: string;
17
- build: string;
18
- }>;
19
- }, "strip", z.ZodTypeAny, {
20
- port: number;
21
- commands: {
22
- dev: string;
23
- build: string;
24
- };
25
- }, {
26
- port: number;
27
- commands: {
28
- dev: string;
29
- build: string;
30
- };
31
- }>;
32
- permissions: z.ZodArray<z.ZodType<Permission, z.ZodTypeDef, Permission>, "many">;
33
- outdir: z.ZodDefault<z.ZodString>;
34
- oauth: z.ZodObject<{
35
- scopes: z.ZodArray<z.ZodType<OAuthScope, z.ZodTypeDef, OAuthScope>, "many">;
36
- }, "strip", z.ZodTypeAny, {
37
- scopes: OAuthScope[];
38
- }, {
39
- scopes: OAuthScope[];
40
- }>;
41
- }, "strip", z.ZodTypeAny, {
42
- permissions: Permission[];
43
- oauth: {
44
- scopes: OAuthScope[];
45
- };
1
+ type PermissionReadWrite = 'read' | 'write';
2
+ type PermissionAccess = 'access';
3
+ type ClipboardPermission = {
4
+ name: 'clipboard';
5
+ access: PermissionReadWrite;
6
+ };
7
+ type GeolocationPermission = {
8
+ name: 'geolocation';
9
+ access: PermissionAccess;
10
+ };
11
+ type ContactsPermission = {
12
+ name: 'contacts';
13
+ access: PermissionReadWrite;
14
+ };
15
+ type PhotosPermission = {
16
+ name: 'photos';
17
+ access: PermissionReadWrite;
18
+ };
19
+ type CameraPermission = {
20
+ name: 'camera';
21
+ access: PermissionAccess;
22
+ };
23
+ type Permission = ClipboardPermission | GeolocationPermission | ContactsPermission | PhotosPermission | CameraPermission;
24
+ /**
25
+ * OAuth 인증시 사용할 수 있는 Scope 값이에요.
26
+ *
27
+ * - `user_name`: 유저 이름이에요.
28
+ * - `user_phone`: 유저 휴대폰 번호예요.
29
+ * - `user_birthday`: 유저 생년월일이에요.
30
+ * - `user_ci`: 유저를 식별하는 키인 CI(Connection Information) 값이에요.
31
+ * - `user_gender`: 유저의 성별이에요.
32
+ * - `user_nationality`: 유저의 국적이에요.
33
+ * - `user_email`: 유저의 이메일이에요. 토스 회원의 email이 존재하지 않는 경우 null 응답을 반환해요.
34
+ */
35
+ type OAuthScope = 'user_name' | 'user_phone' | 'user_birthday' | 'user_ci' | 'user_gender' | 'user_nationality' | 'user_email';
36
+ interface AppsInTossWebConfig {
46
37
  appName: string;
47
- outdir: string;
48
38
  web: {
39
+ /**
40
+ * @default 'localhost'
41
+ */
42
+ host?: string;
49
43
  port: number;
50
44
  commands: {
51
45
  dev: string;
52
46
  build: string;
53
47
  };
54
48
  };
55
- }, {
56
49
  permissions: Permission[];
57
50
  oauth: {
58
51
  scopes: OAuthScope[];
59
52
  };
60
- appName: string;
61
- web: {
62
- port: number;
63
- commands: {
64
- dev: string;
65
- build: string;
66
- };
67
- };
68
- outdir?: string | undefined;
69
- }>;
70
- type AppsInTossConfig = z.infer<typeof AppsInTossConfigSchema>;
71
- declare const defineConfig: (config: z.input<typeof AppsInTossConfigSchema>) => Promise<BedrockConfigResponse>;
53
+ /**
54
+ * @default 'dist'
55
+ */
56
+ outdir?: string;
57
+ }
58
+ declare const defineConfig: (config: AppsInTossWebConfig) => AppsInTossWebConfig;
72
59
 
73
- export { type AppsInTossConfig, defineConfig };
60
+ export { type AppsInTossWebConfig, defineConfig };