@apps-in-toss/web-framework 2.6.1 → 3.0.0-beta.9d42c0b

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.
@@ -1,85 +0,0 @@
1
- import { AppsInTossPluginOptions } from '@apps-in-toss/plugins';
2
-
3
- type F = (...args: any[]) => any;
4
- type DeepRequiredKeysOnly<T> = {
5
- [K in keyof T]-?: T[K] extends object ? (T[K] extends F ? T[K] : DeepRequiredKeysOnly<T[K]>) : T[K];
6
- };
7
-
8
- interface AppsInTossWebConfig extends Omit<AppsInTossPluginOptions, 'appType' | 'target'> {
9
- appName: string;
10
- web: {
11
- /**
12
- * @default 'localhost'
13
- */
14
- host?: string;
15
- port: number;
16
- commands: {
17
- dev: string;
18
- build: string;
19
- };
20
- };
21
- webViewProps?: {
22
- /**
23
- * WebView frame type
24
- *
25
- * @default 'partner'
26
- */
27
- type?: 'partner'
28
- /**
29
- * @deprecated Use 'partner' instead.
30
- */
31
- | 'external' | 'game';
32
- /**
33
- *
34
- * @default false
35
- * @platform — ios
36
- *
37
- * Boolean that determines whether HTML5 videos play inline or use the native full-screen controller. The default value is false.
38
- * NOTE : In order for video to play inline, not only does this property need to be set to true, but the video element in the HTML document must also include the webkit-playsinline attribute.
39
- */
40
- allowsInlineMediaPlayback?: boolean;
41
- /**
42
- * @default true
43
- * @platform — ios
44
- *
45
- * Boolean value that determines whether the web view bounces when it reaches the edge of the content.
46
- *
47
- */
48
- bounces?: boolean;
49
- /**
50
- *
51
- * @default true
52
- * @platform - ios
53
- * Boolean value that determines whether a pull to refresh gesture is available in the WebView. The default value is false. If true, sets bounces automatically to true
54
- */
55
- pullToRefreshEnabled?: boolean;
56
- /**
57
- * https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER Sets the overScrollMode. Possible values are:
58
- * 'always' (default)
59
- * 'content'
60
- * 'never'
61
- * @platform — android
62
- * @default 'always'
63
- */
64
- overScrollMode?: 'always' | 'content' | 'never';
65
- /**
66
- * https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#mediaplaybackrequiresuseraction
67
- * Boolean that determines whether HTML5 audio and video requires the user
68
- * to tap them before they start playing. The default value is `true`.
69
- */
70
- mediaPlaybackRequiresUserAction?: boolean;
71
- /**
72
- * https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#allowsbackforwardnavigationgestures
73
- * this will be able horizontal swipe gestures. The default value is `true`.
74
- */
75
- allowsBackForwardNavigationGestures?: boolean;
76
- };
77
- /**
78
- * @default 'dist'
79
- */
80
- outdir?: string;
81
- }
82
- type AppsInTossWebConfigResponse = DeepRequiredKeysOnly<AppsInTossWebConfig>;
83
- declare const defineConfig: (config: AppsInTossWebConfig) => AppsInTossWebConfigResponse;
84
-
85
- export { type AppsInTossWebConfig, type AppsInTossWebConfigResponse, defineConfig };
@@ -1,599 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __esm = (fn, res) => function __init() {
8
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
- };
10
- var __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
-
30
- // ../../../.yarn/__virtual__/tsup-virtual-5fd798e2dc/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js
31
- var init_esm_shims = __esm({
32
- "../../../.yarn/__virtual__/tsup-virtual-5fd798e2dc/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js"() {
33
- "use strict";
34
- }
35
- });
36
-
37
- // ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js
38
- var require_validateReport = __commonJS({
39
- "../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js"(exports) {
40
- "use strict";
41
- init_esm_shims();
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports._validateReport = void 0;
44
- var _validateReport2 = (array) => {
45
- const reportable = (path) => {
46
- if (array.length === 0)
47
- return true;
48
- const last = array[array.length - 1].path;
49
- return path.length > last.length || last.substring(0, path.length) !== path;
50
- };
51
- return (exceptable, error) => {
52
- var _a;
53
- if (exceptable && reportable(error.path)) {
54
- if (error.value === void 0)
55
- (_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
56
- "The value at this path is `undefined`.",
57
- "",
58
- `Please fill the \`${error.expected}\` typed value next time.`
59
- ].join("\n");
60
- array.push(error);
61
- }
62
- return false;
63
- };
64
- };
65
- exports._validateReport = _validateReport2;
66
- }
67
- });
68
-
69
- // ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js
70
- var require_createStandardSchema = __commonJS({
71
- "../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js"(exports) {
72
- "use strict";
73
- init_esm_shims();
74
- Object.defineProperty(exports, "__esModule", { value: true });
75
- exports._createStandardSchema = void 0;
76
- var _createStandardSchema2 = (fn) => Object.assign(fn, {
77
- "~standard": {
78
- version: 1,
79
- vendor: "typia",
80
- validate: (input) => {
81
- const result = fn(input);
82
- if (result.success) {
83
- return {
84
- value: result.data
85
- };
86
- } else {
87
- return {
88
- issues: result.errors.map((error) => ({
89
- message: `expected ${error.expected}, got ${error.value}`,
90
- path: typiaPathToStandardSchemaPath(error.path)
91
- }))
92
- };
93
- }
94
- }
95
- }
96
- });
97
- exports._createStandardSchema = _createStandardSchema2;
98
- var PathParserState;
99
- (function(PathParserState2) {
100
- PathParserState2[PathParserState2["Start"] = 0] = "Start";
101
- PathParserState2[PathParserState2["Property"] = 1] = "Property";
102
- PathParserState2[PathParserState2["StringKey"] = 2] = "StringKey";
103
- PathParserState2[PathParserState2["NumberKey"] = 3] = "NumberKey";
104
- })(PathParserState || (PathParserState = {}));
105
- var typiaPathToStandardSchemaPath = (path) => {
106
- if (!path.startsWith("$input")) {
107
- throw new Error(`Invalid path: ${JSON.stringify(path)}`);
108
- }
109
- const segments = [];
110
- let currentSegment = "";
111
- let state = PathParserState.Start;
112
- let index = "$input".length - 1;
113
- while (index < path.length - 1) {
114
- index++;
115
- const char = path[index];
116
- if (state === PathParserState.Property) {
117
- if (char === "." || char === "[") {
118
- segments.push({
119
- key: currentSegment
120
- });
121
- state = PathParserState.Start;
122
- } else if (index === path.length - 1) {
123
- currentSegment += char;
124
- segments.push({
125
- key: currentSegment
126
- });
127
- index++;
128
- state = PathParserState.Start;
129
- } else {
130
- currentSegment += char;
131
- }
132
- } else if (state === PathParserState.StringKey) {
133
- if (char === '"') {
134
- segments.push({
135
- key: JSON.parse(currentSegment + char)
136
- });
137
- index += 2;
138
- state = PathParserState.Start;
139
- } else if (char === "\\") {
140
- currentSegment += path[index];
141
- index++;
142
- currentSegment += path[index];
143
- } else {
144
- currentSegment += char;
145
- }
146
- } else if (state === PathParserState.NumberKey) {
147
- if (char === "]") {
148
- segments.push({
149
- key: Number.parseInt(currentSegment)
150
- });
151
- index++;
152
- state = PathParserState.Start;
153
- } else {
154
- currentSegment += char;
155
- }
156
- }
157
- if (state === PathParserState.Start && index < path.length - 1) {
158
- const newChar = path[index];
159
- currentSegment = "";
160
- if (newChar === "[") {
161
- if (path[index + 1] === '"') {
162
- state = PathParserState.StringKey;
163
- index++;
164
- currentSegment = '"';
165
- } else {
166
- state = PathParserState.NumberKey;
167
- }
168
- } else if (newChar === ".") {
169
- state = PathParserState.Property;
170
- } else {
171
- throw new Error("Unreachable: pointer points invalid character");
172
- }
173
- }
174
- }
175
- if (state !== PathParserState.Start) {
176
- throw new Error(`Failed to parse path: ${JSON.stringify(path)}`);
177
- }
178
- return segments;
179
- };
180
- }
181
- });
182
-
183
- // src/config/index.ts
184
- init_esm_shims();
185
-
186
- // src/config/defineConfig.ts
187
- init_esm_shims();
188
-
189
- // ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/index.mjs
190
- init_esm_shims();
191
-
192
- // ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
193
- init_esm_shims();
194
- function isPlainObject(value) {
195
- if (!value || typeof value !== "object") {
196
- return false;
197
- }
198
- const proto = Object.getPrototypeOf(value);
199
- const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
200
- if (!hasObjectPrototype) {
201
- return false;
202
- }
203
- return Object.prototype.toString.call(value) === "[object Object]";
204
- }
205
-
206
- // ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/object/merge.mjs
207
- init_esm_shims();
208
- function merge(target, source) {
209
- const sourceKeys = Object.keys(source);
210
- for (let i = 0; i < sourceKeys.length; i++) {
211
- const key = sourceKeys[i];
212
- const sourceValue = source[key];
213
- const targetValue = target[key];
214
- if (Array.isArray(sourceValue)) {
215
- if (Array.isArray(targetValue)) {
216
- target[key] = merge(targetValue, sourceValue);
217
- } else {
218
- target[key] = merge([], sourceValue);
219
- }
220
- } else if (isPlainObject(sourceValue)) {
221
- if (isPlainObject(targetValue)) {
222
- target[key] = merge(targetValue, sourceValue);
223
- } else {
224
- target[key] = merge({}, sourceValue);
225
- }
226
- } else if (targetValue === void 0 || sourceValue !== void 0) {
227
- target[key] = sourceValue;
228
- }
229
- }
230
- return target;
231
- }
232
-
233
- // src/plugins/appsInTossWeb.ts
234
- init_esm_shims();
235
- var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
236
- var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
237
- var validateAppInTossWebPluginOptions = (() => {
238
- const _io0 = (input) => "object" === typeof input.commands && null !== input.commands && _io1(input.commands) && ("object" === typeof input.brand && null !== input.brand && _io2(input.brand)) && (void 0 === input.navigationBar || "object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) && _io3(input.navigationBar)) && (void 0 === input.webViewProps || "object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) && _io8(input.webViewProps)) && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem)));
239
- const _io1 = (input) => "string" === typeof input.build;
240
- const _io2 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
241
- const _io3 = (input) => (void 0 === input.withBackButton || "boolean" === typeof input.withBackButton) && (void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton) && (void 0 === input.initialAccessoryButton || "object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton && _io4(input.initialAccessoryButton));
242
- const _io4 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
243
- const _io5 = (input) => "object" === typeof input.source && null !== input.source && _io6(input.source) && (null !== input.name && void 0 === input.name);
244
- const _io6 = (input) => "string" === typeof input.uri;
245
- const _io7 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
246
- const _io8 = (input) => (void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type) && (void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback) && (void 0 === input.bounces || "boolean" === typeof input.bounces) && (void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled) && (void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode) && (void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction) && (void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures);
247
- const _io9 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
248
- const _io10 = (input) => "geolocation" === input.name && "access" === input.access;
249
- const _io11 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
250
- const _io12 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
251
- const _io13 = (input) => "camera" === input.name && "access" === input.access;
252
- const _io14 = (input) => "microphone" === input.name && "access" === input.access;
253
- const _iu0 = (input) => (() => {
254
- if ("microphone" === input.name)
255
- return _io14(input);
256
- else if ("camera" === input.name)
257
- return _io13(input);
258
- else if ("photos" === input.name)
259
- return _io12(input);
260
- else if ("contacts" === input.name)
261
- return _io11(input);
262
- else if ("geolocation" === input.name)
263
- return _io10(input);
264
- else if ("clipboard" === input.name)
265
- return _io9(input);
266
- else
267
- return false;
268
- })();
269
- const _iu1 = (input) => (() => {
270
- if ("string" === typeof input.name)
271
- return _io7(input);
272
- else if ("object" === typeof input.source && null !== input.source && _io6(input.source))
273
- return _io5(input);
274
- else
275
- return false;
276
- })();
277
- const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.commands && null !== input.commands || _report(_exceptionable, {
278
- path: _path + ".commands",
279
- expected: "__type",
280
- value: input.commands
281
- })) && _vo1(input.commands, _path + ".commands", _exceptionable) || _report(_exceptionable, {
282
- path: _path + ".commands",
283
- expected: "__type",
284
- value: input.commands
285
- }), ("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
286
- path: _path + ".brand",
287
- expected: "__type.o1",
288
- value: input.brand
289
- })) && _vo2(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
290
- path: _path + ".brand",
291
- expected: "__type.o1",
292
- value: input.brand
293
- }), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
294
- path: _path + ".navigationBar",
295
- expected: "(__type.o2 | undefined)",
296
- value: input.navigationBar
297
- })) && _vo3(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
298
- path: _path + ".navigationBar",
299
- expected: "(__type.o2 | undefined)",
300
- value: input.navigationBar
301
- }), void 0 === input.webViewProps || ("object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) || _report(_exceptionable, {
302
- path: _path + ".webViewProps",
303
- expected: "(__type.o6 | undefined)",
304
- value: input.webViewProps
305
- })) && _vo8(input.webViewProps, _path + ".webViewProps", _exceptionable) || _report(_exceptionable, {
306
- path: _path + ".webViewProps",
307
- expected: "(__type.o6 | undefined)",
308
- value: input.webViewProps
309
- }), (Array.isArray(input.permissions) || _report(_exceptionable, {
310
- path: _path + ".permissions",
311
- expected: "Array<Permission>",
312
- value: input.permissions
313
- })) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
314
- path: _path + ".permissions[" + _index2 + "]",
315
- expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | MicrophonePermission | PhotosPermission)",
316
- value: elem
317
- })) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
318
- path: _path + ".permissions[" + _index2 + "]",
319
- expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | MicrophonePermission | PhotosPermission)",
320
- value: elem
321
- })).every((flag) => flag) || _report(_exceptionable, {
322
- path: _path + ".permissions",
323
- expected: "Array<Permission>",
324
- value: input.permissions
325
- })].every((flag) => flag);
326
- const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.build || _report(_exceptionable, {
327
- path: _path + ".build",
328
- expected: "string",
329
- value: input.build
330
- })].every((flag) => flag);
331
- const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
332
- path: _path + ".displayName",
333
- expected: "string",
334
- value: input.displayName
335
- }), "string" === typeof input.primaryColor || _report(_exceptionable, {
336
- path: _path + ".primaryColor",
337
- expected: "string",
338
- value: input.primaryColor
339
- }), "string" === typeof input.icon || _report(_exceptionable, {
340
- path: _path + ".icon",
341
- expected: "string",
342
- value: input.icon
343
- })].every((flag) => flag);
344
- const _vo3 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
345
- path: _path + ".withBackButton",
346
- expected: "(boolean | undefined)",
347
- value: input.withBackButton
348
- }), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
349
- path: _path + ".withHomeButton",
350
- expected: "(boolean | undefined)",
351
- value: input.withHomeButton
352
- }), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
353
- path: _path + ".initialAccessoryButton",
354
- expected: "(InitialAccessoryButton | undefined)",
355
- value: input.initialAccessoryButton
356
- })) && _vo4(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
357
- path: _path + ".initialAccessoryButton",
358
- expected: "(InitialAccessoryButton | undefined)",
359
- value: input.initialAccessoryButton
360
- })].every((flag) => flag);
361
- const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
362
- path: _path + ".id",
363
- expected: "string",
364
- value: input.id
365
- }), "string" === typeof input.title || _report(_exceptionable, {
366
- path: _path + ".title",
367
- expected: "string",
368
- value: input.title
369
- }), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
370
- path: _path + ".icon",
371
- expected: "(__type.o3 | __type.o5)",
372
- value: input.icon
373
- })) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
374
- path: _path + ".icon",
375
- expected: "(__type.o3 | __type.o5)",
376
- value: input.icon
377
- })].every((flag) => flag);
378
- const _vo5 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
379
- path: _path + ".source",
380
- expected: "__type.o4",
381
- value: input.source
382
- })) && _vo6(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
383
- path: _path + ".source",
384
- expected: "__type.o4",
385
- value: input.source
386
- }), (null !== input.name || _report(_exceptionable, {
387
- path: _path + ".name",
388
- expected: "undefined",
389
- value: input.name
390
- })) && (void 0 === input.name || _report(_exceptionable, {
391
- path: _path + ".name",
392
- expected: "undefined",
393
- value: input.name
394
- }))].every((flag) => flag);
395
- const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
396
- path: _path + ".uri",
397
- expected: "string",
398
- value: input.uri
399
- })].every((flag) => flag);
400
- const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
401
- path: _path + ".name",
402
- expected: "string",
403
- value: input.name
404
- }), (null !== input.source || _report(_exceptionable, {
405
- path: _path + ".source",
406
- expected: "undefined",
407
- value: input.source
408
- })) && (void 0 === input.source || _report(_exceptionable, {
409
- path: _path + ".source",
410
- expected: "undefined",
411
- value: input.source
412
- }))].every((flag) => flag);
413
- const _vo8 = (input, _path, _exceptionable = true) => [void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type || _report(_exceptionable, {
414
- path: _path + ".type",
415
- expected: '("external" | "game" | "partner" | undefined)',
416
- value: input.type
417
- }), void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback || _report(_exceptionable, {
418
- path: _path + ".allowsInlineMediaPlayback",
419
- expected: "(boolean | undefined)",
420
- value: input.allowsInlineMediaPlayback
421
- }), void 0 === input.bounces || "boolean" === typeof input.bounces || _report(_exceptionable, {
422
- path: _path + ".bounces",
423
- expected: "(boolean | undefined)",
424
- value: input.bounces
425
- }), void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled || _report(_exceptionable, {
426
- path: _path + ".pullToRefreshEnabled",
427
- expected: "(boolean | undefined)",
428
- value: input.pullToRefreshEnabled
429
- }), void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode || _report(_exceptionable, {
430
- path: _path + ".overScrollMode",
431
- expected: '("always" | "content" | "never" | undefined)',
432
- value: input.overScrollMode
433
- }), void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction || _report(_exceptionable, {
434
- path: _path + ".mediaPlaybackRequiresUserAction",
435
- expected: "(boolean | undefined)",
436
- value: input.mediaPlaybackRequiresUserAction
437
- }), void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures || _report(_exceptionable, {
438
- path: _path + ".allowsBackForwardNavigationGestures",
439
- expected: "(boolean | undefined)",
440
- value: input.allowsBackForwardNavigationGestures
441
- })].every((flag) => flag);
442
- const _vo9 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
443
- path: _path + ".name",
444
- expected: '"clipboard"',
445
- value: input.name
446
- }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
447
- path: _path + ".access",
448
- expected: '("read" | "write")',
449
- value: input.access
450
- })].every((flag) => flag);
451
- const _vo10 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
452
- path: _path + ".name",
453
- expected: '"geolocation"',
454
- value: input.name
455
- }), "access" === input.access || _report(_exceptionable, {
456
- path: _path + ".access",
457
- expected: '"access"',
458
- value: input.access
459
- })].every((flag) => flag);
460
- const _vo11 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
461
- path: _path + ".name",
462
- expected: '"contacts"',
463
- value: input.name
464
- }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
465
- path: _path + ".access",
466
- expected: '("read" | "write")',
467
- value: input.access
468
- })].every((flag) => flag);
469
- const _vo12 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
470
- path: _path + ".name",
471
- expected: '"photos"',
472
- value: input.name
473
- }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
474
- path: _path + ".access",
475
- expected: '("read" | "write")',
476
- value: input.access
477
- })].every((flag) => flag);
478
- const _vo13 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
479
- path: _path + ".name",
480
- expected: '"camera"',
481
- value: input.name
482
- }), "access" === input.access || _report(_exceptionable, {
483
- path: _path + ".access",
484
- expected: '"access"',
485
- value: input.access
486
- })].every((flag) => flag);
487
- const _vo14 = (input, _path, _exceptionable = true) => ["microphone" === input.name || _report(_exceptionable, {
488
- path: _path + ".name",
489
- expected: '"microphone"',
490
- value: input.name
491
- }), "access" === input.access || _report(_exceptionable, {
492
- path: _path + ".access",
493
- expected: '"access"',
494
- value: input.access
495
- })].every((flag) => flag);
496
- const _vu0 = (input, _path, _exceptionable = true) => (() => {
497
- if ("microphone" === input.name)
498
- return _vo14(input, _path, _exceptionable);
499
- else if ("camera" === input.name)
500
- return _vo13(input, _path, _exceptionable);
501
- else if ("photos" === input.name)
502
- return _vo12(input, _path, _exceptionable);
503
- else if ("contacts" === input.name)
504
- return _vo11(input, _path, _exceptionable);
505
- else if ("geolocation" === input.name)
506
- return _vo10(input, _path, _exceptionable);
507
- else if ("clipboard" === input.name)
508
- return _vo9(input, _path, _exceptionable);
509
- else
510
- return _report(_exceptionable, {
511
- path: _path,
512
- expected: "(MicrophonePermission | CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
513
- value: input
514
- });
515
- })();
516
- const _vu1 = (input, _path, _exceptionable = true) => (() => {
517
- if ("string" === typeof input.name)
518
- return _vo7(input, _path, _exceptionable);
519
- else if ("object" === typeof input.source && null !== input.source && _vo6(input.source, _path + ".source", false))
520
- return _vo5(input, _path, _exceptionable);
521
- else
522
- return _report(_exceptionable, {
523
- path: _path,
524
- expected: "(__type.o5 | __type.o3)",
525
- value: input
526
- });
527
- })();
528
- const __is = (input) => "object" === typeof input && null !== input && _io0(input);
529
- let errors;
530
- let _report;
531
- return __typia_transform__createStandardSchema._createStandardSchema((input) => {
532
- if (false === __is(input)) {
533
- errors = [];
534
- _report = __typia_transform__validateReport._validateReport(errors);
535
- ((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
536
- path: _path + "",
537
- expected: "AppsInTossWebPluginOptions",
538
- value: input2
539
- })) && _vo0(input2, _path + "", true) || _report(true, {
540
- path: _path + "",
541
- expected: "AppsInTossWebPluginOptions",
542
- value: input2
543
- }))(input, "$input", true);
544
- const success = 0 === errors.length;
545
- return success ? {
546
- success,
547
- data: input
548
- } : {
549
- success,
550
- errors,
551
- data: input
552
- };
553
- }
554
- return {
555
- success: true,
556
- data: input
557
- };
558
- });
559
- })();
560
-
561
- // src/config/defineConfig.ts
562
- var defineConfig = (config) => {
563
- const defaultConfig = {
564
- scheme: "intoss",
565
- outdir: "dist",
566
- web: {
567
- host: "localhost"
568
- },
569
- webViewProps: {
570
- type: "partner",
571
- mediaPlaybackRequiresUserAction: true,
572
- allowsInlineMediaPlayback: false,
573
- bounces: true,
574
- allowsBackForwardNavigationGestures: true,
575
- pullToRefreshEnabled: true,
576
- overScrollMode: "always"
577
- },
578
- navigationBar: {
579
- withBackButton: true,
580
- withHomeButton: false
581
- }
582
- };
583
- const merged = merge(defaultConfig, config);
584
- const result = validateAppInTossWebPluginOptions({
585
- commands: merged.web.commands,
586
- permissions: merged.permissions,
587
- brand: merged.brand,
588
- navigationBar: merged.navigationBar,
589
- webViewProps: merged.webViewProps
590
- });
591
- if (!result.success) {
592
- console.error("[Apps In Toss Plugin] \uD50C\uB7EC\uADF8\uC778 \uC635\uC158\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. granite.config.ts \uAD6C\uC131\uC744 \uD655\uC778\uD574\uC8FC\uC138\uC694.");
593
- process.exit(1);
594
- }
595
- return merged;
596
- };
597
- export {
598
- defineConfig
599
- };