@apps-in-toss/framework 0.0.10 → 0.0.11
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 +36 -26
- package/dist/index.js +36 -26
- package/package.json +20 -10
- package/src/async-bridges.ts +7 -0
- package/src/constant-bridges.ts +1 -0
- package/src/event-bridges.ts +1 -0
- package/dist/cli-presets.cjs +0 -24
- package/dist/cli-presets.d.cts +0 -1
- package/dist/cli-presets.d.ts +0 -1
- package/dist/cli-presets.js +0 -2
- package/src/bridges.ts +0 -2
package/dist/index.cjs
CHANGED
|
@@ -73,12 +73,6 @@ var AppsInToss = {
|
|
|
73
73
|
registerApp
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
// src/native-event-emitter/index.ts
|
|
77
|
-
var native_event_emitter_exports = {};
|
|
78
|
-
__export(native_event_emitter_exports, {
|
|
79
|
-
startUpdateLocation: () => startUpdateLocation
|
|
80
|
-
});
|
|
81
|
-
|
|
82
76
|
// src/native-event-emitter/bedrock-event.ts
|
|
83
77
|
var import_react_native_bedrock3 = require("react-native-bedrock");
|
|
84
78
|
|
|
@@ -152,19 +146,6 @@ function startUpdateLocation(eventParams) {
|
|
|
152
146
|
return appsInTossEvent.addEventListener("updateLocationEvent", eventParams);
|
|
153
147
|
}
|
|
154
148
|
|
|
155
|
-
// src/native-modules/index.ts
|
|
156
|
-
var native_modules_exports = {};
|
|
157
|
-
__export(native_modules_exports, {
|
|
158
|
-
appLogin: () => appLogin,
|
|
159
|
-
fetchAlbumPhotos: () => fetchAlbumPhotos,
|
|
160
|
-
fetchContacts: () => fetchContacts,
|
|
161
|
-
getClipboardText: () => getClipboardText,
|
|
162
|
-
getCurrentLocation: () => getCurrentLocation,
|
|
163
|
-
getOperationalEnvironment: () => getOperationalEnvironment,
|
|
164
|
-
openCamera: () => openCamera,
|
|
165
|
-
setClipboardText: () => setClipboardText
|
|
166
|
-
});
|
|
167
|
-
|
|
168
149
|
// src/native-modules/setClipboardText.ts
|
|
169
150
|
async function setClipboardText(text) {
|
|
170
151
|
const permissionStatus = await requestPermission({ name: "clipboard", access: "write" });
|
|
@@ -263,8 +244,34 @@ function getOperationalEnvironment() {
|
|
|
263
244
|
var import_react_native_webview = require("@react-native-bedrock/native/react-native-webview");
|
|
264
245
|
var import_react = require("react");
|
|
265
246
|
var import_react_native_bedrock4 = require("react-native-bedrock");
|
|
266
|
-
var
|
|
267
|
-
var
|
|
247
|
+
var bedrockAsyncBridges = __toESM(require("react-native-bedrock/async-bridges"), 1);
|
|
248
|
+
var bedrockConstantBridges = __toESM(require("react-native-bedrock/constant-bridges"), 1);
|
|
249
|
+
|
|
250
|
+
// src/async-bridges.ts
|
|
251
|
+
var async_bridges_exports = {};
|
|
252
|
+
__export(async_bridges_exports, {
|
|
253
|
+
appLogin: () => appLogin,
|
|
254
|
+
fetchAlbumPhotos: () => fetchAlbumPhotos,
|
|
255
|
+
fetchContacts: () => fetchContacts,
|
|
256
|
+
getClipboardText: () => getClipboardText,
|
|
257
|
+
getCurrentLocation: () => getCurrentLocation,
|
|
258
|
+
openCamera: () => openCamera,
|
|
259
|
+
setClipboardText: () => setClipboardText
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// src/constant-bridges.ts
|
|
263
|
+
var constant_bridges_exports = {};
|
|
264
|
+
__export(constant_bridges_exports, {
|
|
265
|
+
getOperationalEnvironment: () => getOperationalEnvironment
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
// src/event-bridges.ts
|
|
269
|
+
var event_bridges_exports = {};
|
|
270
|
+
__export(event_bridges_exports, {
|
|
271
|
+
startUpdateLocation: () => startUpdateLocation
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// src/components/WebView.tsx
|
|
268
275
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
269
276
|
function WebView({ local, onMessage, ...props }) {
|
|
270
277
|
const uri = (0, import_react.useMemo)(() => {
|
|
@@ -276,15 +283,18 @@ function WebView({ local, onMessage, ...props }) {
|
|
|
276
283
|
const handler = (0, import_react_native_bedrock4.useBridgeHandler)({
|
|
277
284
|
onMessage,
|
|
278
285
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
279
|
-
eventListenerMap:
|
|
286
|
+
eventListenerMap: event_bridges_exports,
|
|
280
287
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
281
288
|
// @ts-expect-error
|
|
282
|
-
constantHandlerMap:
|
|
289
|
+
constantHandlerMap: {
|
|
290
|
+
...bedrockConstantBridges,
|
|
291
|
+
...constant_bridges_exports
|
|
292
|
+
},
|
|
283
293
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
284
294
|
// @ts-expect-error
|
|
285
|
-
|
|
286
|
-
...
|
|
287
|
-
...
|
|
295
|
+
asyncHandlerMap: {
|
|
296
|
+
...bedrockAsyncBridges,
|
|
297
|
+
...async_bridges_exports
|
|
288
298
|
}
|
|
289
299
|
});
|
|
290
300
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
package/dist/index.js
CHANGED
|
@@ -30,12 +30,6 @@ var AppsInToss = {
|
|
|
30
30
|
registerApp
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
// src/native-event-emitter/index.ts
|
|
34
|
-
var native_event_emitter_exports = {};
|
|
35
|
-
__export(native_event_emitter_exports, {
|
|
36
|
-
startUpdateLocation: () => startUpdateLocation
|
|
37
|
-
});
|
|
38
|
-
|
|
39
33
|
// src/native-event-emitter/bedrock-event.ts
|
|
40
34
|
import { BedrockEvent } from "react-native-bedrock";
|
|
41
35
|
|
|
@@ -109,19 +103,6 @@ function startUpdateLocation(eventParams) {
|
|
|
109
103
|
return appsInTossEvent.addEventListener("updateLocationEvent", eventParams);
|
|
110
104
|
}
|
|
111
105
|
|
|
112
|
-
// src/native-modules/index.ts
|
|
113
|
-
var native_modules_exports = {};
|
|
114
|
-
__export(native_modules_exports, {
|
|
115
|
-
appLogin: () => appLogin,
|
|
116
|
-
fetchAlbumPhotos: () => fetchAlbumPhotos,
|
|
117
|
-
fetchContacts: () => fetchContacts,
|
|
118
|
-
getClipboardText: () => getClipboardText,
|
|
119
|
-
getCurrentLocation: () => getCurrentLocation,
|
|
120
|
-
getOperationalEnvironment: () => getOperationalEnvironment,
|
|
121
|
-
openCamera: () => openCamera,
|
|
122
|
-
setClipboardText: () => setClipboardText
|
|
123
|
-
});
|
|
124
|
-
|
|
125
106
|
// src/native-modules/setClipboardText.ts
|
|
126
107
|
async function setClipboardText(text) {
|
|
127
108
|
const permissionStatus = await requestPermission({ name: "clipboard", access: "write" });
|
|
@@ -222,8 +203,34 @@ import {
|
|
|
222
203
|
} from "@react-native-bedrock/native/react-native-webview";
|
|
223
204
|
import { useMemo } from "react";
|
|
224
205
|
import { useBridgeHandler } from "react-native-bedrock";
|
|
225
|
-
import * as
|
|
226
|
-
import * as
|
|
206
|
+
import * as bedrockAsyncBridges from "react-native-bedrock/async-bridges";
|
|
207
|
+
import * as bedrockConstantBridges from "react-native-bedrock/constant-bridges";
|
|
208
|
+
|
|
209
|
+
// src/async-bridges.ts
|
|
210
|
+
var async_bridges_exports = {};
|
|
211
|
+
__export(async_bridges_exports, {
|
|
212
|
+
appLogin: () => appLogin,
|
|
213
|
+
fetchAlbumPhotos: () => fetchAlbumPhotos,
|
|
214
|
+
fetchContacts: () => fetchContacts,
|
|
215
|
+
getClipboardText: () => getClipboardText,
|
|
216
|
+
getCurrentLocation: () => getCurrentLocation,
|
|
217
|
+
openCamera: () => openCamera,
|
|
218
|
+
setClipboardText: () => setClipboardText
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// src/constant-bridges.ts
|
|
222
|
+
var constant_bridges_exports = {};
|
|
223
|
+
__export(constant_bridges_exports, {
|
|
224
|
+
getOperationalEnvironment: () => getOperationalEnvironment
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// src/event-bridges.ts
|
|
228
|
+
var event_bridges_exports = {};
|
|
229
|
+
__export(event_bridges_exports, {
|
|
230
|
+
startUpdateLocation: () => startUpdateLocation
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// src/components/WebView.tsx
|
|
227
234
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
228
235
|
function WebView({ local, onMessage, ...props }) {
|
|
229
236
|
const uri = useMemo(() => {
|
|
@@ -235,15 +242,18 @@ function WebView({ local, onMessage, ...props }) {
|
|
|
235
242
|
const handler = useBridgeHandler({
|
|
236
243
|
onMessage,
|
|
237
244
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
238
|
-
eventListenerMap:
|
|
245
|
+
eventListenerMap: event_bridges_exports,
|
|
239
246
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
240
247
|
// @ts-expect-error
|
|
241
|
-
constantHandlerMap:
|
|
248
|
+
constantHandlerMap: {
|
|
249
|
+
...bedrockConstantBridges,
|
|
250
|
+
...constant_bridges_exports
|
|
251
|
+
},
|
|
242
252
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
243
253
|
// @ts-expect-error
|
|
244
|
-
|
|
245
|
-
...
|
|
246
|
-
...
|
|
254
|
+
asyncHandlerMap: {
|
|
255
|
+
...bedrockAsyncBridges,
|
|
256
|
+
...async_bridges_exports
|
|
247
257
|
}
|
|
248
258
|
});
|
|
249
259
|
return /* @__PURE__ */ jsx2(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -23,9 +23,17 @@
|
|
|
23
23
|
"import": "./dist/plugins/index.js",
|
|
24
24
|
"require": "./dist/plugins/index.cjs"
|
|
25
25
|
},
|
|
26
|
-
"./bridges": {
|
|
27
|
-
"types": "./src/bridges.ts",
|
|
28
|
-
"default": "./src/bridges.ts"
|
|
26
|
+
"./async-bridges": {
|
|
27
|
+
"types": "./src/async-bridges.ts",
|
|
28
|
+
"default": "./src/async-bridges.ts"
|
|
29
|
+
},
|
|
30
|
+
"./constant-bridges": {
|
|
31
|
+
"types": "./src/constant-bridges.ts",
|
|
32
|
+
"default": "./src/constant-bridges.ts"
|
|
33
|
+
},
|
|
34
|
+
"./event-bridges": {
|
|
35
|
+
"types": "./src/event-bridges.ts",
|
|
36
|
+
"default": "./src/event-bridges.ts"
|
|
29
37
|
},
|
|
30
38
|
"./jest": {
|
|
31
39
|
"types": "./dist/jest/index.d.ts",
|
|
@@ -36,7 +44,9 @@
|
|
|
36
44
|
},
|
|
37
45
|
"files": [
|
|
38
46
|
"dist/**/*",
|
|
39
|
-
"src/bridges.ts",
|
|
47
|
+
"src/async-bridges.ts",
|
|
48
|
+
"src/constant-bridges.ts",
|
|
49
|
+
"src/event-bridges.ts",
|
|
40
50
|
"hermesc/**/*",
|
|
41
51
|
"plugins.d.ts",
|
|
42
52
|
"jest.d.ts"
|
|
@@ -45,11 +55,11 @@
|
|
|
45
55
|
"ait": "./bin/ait.js"
|
|
46
56
|
},
|
|
47
57
|
"dependencies": {
|
|
48
|
-
"@apps-in-toss/cli": "0.0.
|
|
58
|
+
"@apps-in-toss/cli": "0.0.11"
|
|
49
59
|
},
|
|
50
60
|
"devDependencies": {
|
|
51
|
-
"@react-native-bedrock/mpack-next": "0.0.
|
|
52
|
-
"@react-native-bedrock/native": "0.0.
|
|
61
|
+
"@react-native-bedrock/mpack-next": "0.0.13",
|
|
62
|
+
"@react-native-bedrock/native": "0.0.13",
|
|
53
63
|
"@ryoppippi/unplugin-typia": "^2.0.3",
|
|
54
64
|
"@toss-design-system/react-native": "^0",
|
|
55
65
|
"@types/archiver": "^6.0.3",
|
|
@@ -62,7 +72,7 @@
|
|
|
62
72
|
"picocolors": "^1.1.1",
|
|
63
73
|
"react": "18.2.0",
|
|
64
74
|
"react-native": "0.72.6",
|
|
65
|
-
"react-native-bedrock": "0.0.
|
|
75
|
+
"react-native-bedrock": "0.0.13",
|
|
66
76
|
"tsup": "^8.3.5",
|
|
67
77
|
"typescript": "4.9.5",
|
|
68
78
|
"typia": "^8.0.1",
|
|
@@ -80,5 +90,5 @@
|
|
|
80
90
|
"publishConfig": {
|
|
81
91
|
"access": "public"
|
|
82
92
|
},
|
|
83
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "d0dfa84af3118a71ea3705c440e639fb5b1a010b"
|
|
84
94
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './native-modules/setClipboardText.js';
|
|
2
|
+
export * from './native-modules/getClipboardText.js';
|
|
3
|
+
export * from './native-modules/fetchContacts.js';
|
|
4
|
+
export * from './native-modules/fetchAlbumPhotos.js';
|
|
5
|
+
export * from './native-modules/getCurrentLocation.js';
|
|
6
|
+
export * from './native-modules/openCamera.js';
|
|
7
|
+
export * from './native-modules/appLogin.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './native-modules/getOperationalEnvironment.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './native-event-emitter/startUpdateLocation.js';
|
package/dist/cli-presets.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/cli-presets.ts
|
|
18
|
-
var cli_presets_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(cli_presets_exports);
|
|
20
|
-
__reExport(cli_presets_exports, require("@apps-in-toss/cli-presets"), module.exports);
|
|
21
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
-
0 && (module.exports = {
|
|
23
|
-
...require("@apps-in-toss/cli-presets")
|
|
24
|
-
});
|
package/dist/cli-presets.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@apps-in-toss/cli-presets';
|
package/dist/cli-presets.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@apps-in-toss/cli-presets';
|
package/dist/cli-presets.js
DELETED
package/src/bridges.ts
DELETED