@apps-in-toss/web-framework 2.6.1 → 3.0.0-beta.16e772d

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.
@@ -0,0 +1,52 @@
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 __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/config/index.ts
21
+ var config_exports = {};
22
+ __export(config_exports, {
23
+ defineConfig: () => defineConfig
24
+ });
25
+ module.exports = __toCommonJS(config_exports);
26
+ function defineConfig(config) {
27
+ return {
28
+ ...config,
29
+ appName: config.appName,
30
+ brand: config.brand,
31
+ permissions: config.permissions,
32
+ webView: {
33
+ mediaPlaybackRequiresUserAction: true,
34
+ allowsInlineMediaPlayback: false,
35
+ bounces: true,
36
+ allowsBackForwardNavigationGestures: true,
37
+ pullToRefreshEnabled: true,
38
+ overScrollMode: "always",
39
+ ...config.webView
40
+ },
41
+ navigationBar: {
42
+ withBackButton: true,
43
+ withHomeButton: false,
44
+ ...config.navigationBar
45
+ },
46
+ webBundleDir: config.webBundleDir ?? "dist"
47
+ };
48
+ }
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ defineConfig
52
+ });
@@ -0,0 +1,54 @@
1
+ interface AppsInTossConfig {
2
+ appName: string;
3
+ brand: {
4
+ primaryColor: string;
5
+ };
6
+ permissions: ({
7
+ name: "clipboard";
8
+ access: "read" | "write";
9
+ } | {
10
+ name: "geolocation";
11
+ access: "access";
12
+ } | {
13
+ name: "contacts";
14
+ access: "read" | "write";
15
+ } | {
16
+ name: "photos";
17
+ access: "read" | "write";
18
+ } | {
19
+ name: "camera";
20
+ access: "access";
21
+ } | {
22
+ name: "microphone";
23
+ access: "access";
24
+ })[];
25
+ navigationBar?: {
26
+ withBackButton?: boolean;
27
+ withHomeButton?: boolean;
28
+ initialAccessoryButton?: {
29
+ id: string;
30
+ title: string;
31
+ icon: {
32
+ source: {
33
+ uri: string;
34
+ };
35
+ name?: never;
36
+ } | {
37
+ name: string;
38
+ source?: never;
39
+ };
40
+ };
41
+ };
42
+ webView?: {
43
+ allowsInlineMediaPlayback?: boolean;
44
+ bounces?: boolean;
45
+ pullToRefreshEnabled?: boolean;
46
+ overScrollMode?: "always" | "content" | "never";
47
+ mediaPlaybackRequiresUserAction?: boolean;
48
+ allowsBackForwardNavigationGestures?: boolean;
49
+ };
50
+ webBundleDir?: string;
51
+ }
52
+ declare function defineConfig(config: AppsInTossConfig): AppsInTossConfig;
53
+
54
+ export { type AppsInTossConfig, defineConfig };
@@ -0,0 +1,54 @@
1
+ interface AppsInTossConfig {
2
+ appName: string;
3
+ brand: {
4
+ primaryColor: string;
5
+ };
6
+ permissions: ({
7
+ name: "clipboard";
8
+ access: "read" | "write";
9
+ } | {
10
+ name: "geolocation";
11
+ access: "access";
12
+ } | {
13
+ name: "contacts";
14
+ access: "read" | "write";
15
+ } | {
16
+ name: "photos";
17
+ access: "read" | "write";
18
+ } | {
19
+ name: "camera";
20
+ access: "access";
21
+ } | {
22
+ name: "microphone";
23
+ access: "access";
24
+ })[];
25
+ navigationBar?: {
26
+ withBackButton?: boolean;
27
+ withHomeButton?: boolean;
28
+ initialAccessoryButton?: {
29
+ id: string;
30
+ title: string;
31
+ icon: {
32
+ source: {
33
+ uri: string;
34
+ };
35
+ name?: never;
36
+ } | {
37
+ name: string;
38
+ source?: never;
39
+ };
40
+ };
41
+ };
42
+ webView?: {
43
+ allowsInlineMediaPlayback?: boolean;
44
+ bounces?: boolean;
45
+ pullToRefreshEnabled?: boolean;
46
+ overScrollMode?: "always" | "content" | "never";
47
+ mediaPlaybackRequiresUserAction?: boolean;
48
+ allowsBackForwardNavigationGestures?: boolean;
49
+ };
50
+ webBundleDir?: string;
51
+ }
52
+ declare function defineConfig(config: AppsInTossConfig): AppsInTossConfig;
53
+
54
+ export { type AppsInTossConfig, defineConfig };
package/dist/config.js ADDED
@@ -0,0 +1,27 @@
1
+ // src/config/index.ts
2
+ function defineConfig(config) {
3
+ return {
4
+ ...config,
5
+ appName: config.appName,
6
+ brand: config.brand,
7
+ permissions: config.permissions,
8
+ webView: {
9
+ mediaPlaybackRequiresUserAction: true,
10
+ allowsInlineMediaPlayback: false,
11
+ bounces: true,
12
+ allowsBackForwardNavigationGestures: true,
13
+ pullToRefreshEnabled: true,
14
+ overScrollMode: "always",
15
+ ...config.webView
16
+ },
17
+ navigationBar: {
18
+ withBackButton: true,
19
+ withHomeButton: false,
20
+ ...config.navigationBar
21
+ },
22
+ webBundleDir: config.webBundleDir ?? "dist"
23
+ };
24
+ }
25
+ export {
26
+ defineConfig
27
+ };