@apps-in-toss/framework 0.0.18 → 0.0.19

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 CHANGED
@@ -319,7 +319,7 @@ var TossPay = {
319
319
  };
320
320
 
321
321
  // src/components/WebView.tsx
322
- var import_react_native11 = require("@toss-design-system/react-native");
322
+ var import_react_native12 = require("@toss-design-system/react-native");
323
323
  var import_private = require("@toss-design-system/react-native/private");
324
324
  var import_react3 = require("react");
325
325
  var import_react_native_bedrock5 = require("react-native-bedrock");
@@ -328,8 +328,9 @@ var bedrockConstantBridges = __toESM(require("react-native-bedrock/constant-brid
328
328
 
329
329
  // src/components/GameWebView.tsx
330
330
  var import_react_native_webview = require("@react-native-bedrock/native/react-native-webview");
331
+ var import_react_native10 = require("@toss-design-system/react-native");
331
332
  var import_react2 = require("react");
332
- var import_react_native10 = require("react-native");
333
+ var import_react_native11 = require("react-native");
333
334
  var import_react_native_bedrock4 = require("react-native-bedrock");
334
335
 
335
336
  // src/components/GameWebViewNavigationBar/GameNavigationBar.tsx
@@ -413,6 +414,9 @@ function GameNavigationBar({ onClose }) {
413
414
  import_react_native9.TouchableOpacity,
414
415
  {
415
416
  hitSlop: { left: 8, right: 8 },
417
+ accessibilityRole: "button",
418
+ accessible: true,
419
+ accessibilityLabel: "\uB2EB\uAE30",
416
420
  style: {
417
421
  padding: import_react_native9.Platform.OS === "ios" ? 7 : 9
418
422
  },
@@ -428,16 +432,35 @@ function GameNavigationBar({ onClose }) {
428
432
  // src/components/GameWebView.tsx
429
433
  var import_jsx_runtime4 = require("react/jsx-runtime");
430
434
  var GameWebView = (0, import_react2.forwardRef)(function GameWebView2(props, ref) {
435
+ const { openConfirm } = (0, import_react_native10.useDialog)();
436
+ const { brandDisplayName } = getAppsInTossGlobals();
437
+ (0, import_react2.useEffect)(() => {
438
+ if (import_react_native11.Platform.OS === "ios") {
439
+ (0, import_react_native_bedrock4.setIosSwipeGestureEnabled)({ isEnabled: false });
440
+ return () => {
441
+ (0, import_react_native_bedrock4.setIosSwipeGestureEnabled)({ isEnabled: true });
442
+ };
443
+ }
444
+ return;
445
+ }, []);
431
446
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
432
447
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
433
448
  GameNavigationBar,
434
449
  {
435
- onClose: () => {
436
- (0, import_react_native_bedrock4.closeView)();
450
+ onClose: async () => {
451
+ const isConfirmed = await openConfirm({
452
+ title: `${brandDisplayName}\uC744 \uC885\uB8CC\uD560\uAE4C\uC694?`,
453
+ leftButton: "\uCDE8\uC18C",
454
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
455
+ closeOnDimmerClick: true
456
+ });
457
+ if (isConfirmed) {
458
+ (0, import_react_native_bedrock4.closeView)();
459
+ }
437
460
  }
438
461
  }
439
462
  ),
440
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native10.View, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_webview.WebView, { ref, ...props }) })
463
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native11.View, { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_webview.WebView, { ref, ...props }) })
441
464
  ] });
442
465
  });
443
466
 
@@ -478,8 +501,8 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
478
501
  var appsInTossGlobals = getAppsInTossGlobals();
479
502
  var TYPES = ["partner", "external", "game"];
480
503
  var WEBVIEW_TYPES = {
481
- partner: import_react_native11.PartnerWebViewScreen,
482
- external: import_react_native11.ExternalWebViewScreen,
504
+ partner: import_react_native12.PartnerWebViewScreen,
505
+ external: import_react_native12.ExternalWebViewScreen,
483
506
  game: GameWebView
484
507
  };
485
508
  function mergeSchemeQueryParamsInto(url) {
package/dist/index.js CHANGED
@@ -287,9 +287,10 @@ import * as bedrockConstantBridges from "react-native-bedrock/constant-bridges";
287
287
  import {
288
288
  WebView as PlainWebView
289
289
  } from "@react-native-bedrock/native/react-native-webview";
290
- import { forwardRef } from "react";
291
- import { View as View3 } from "react-native";
292
- import { closeView } from "react-native-bedrock";
290
+ import { useDialog } from "@toss-design-system/react-native";
291
+ import { forwardRef, useEffect as useEffect2 } from "react";
292
+ import { Platform as Platform4, View as View3 } from "react-native";
293
+ import { closeView, setIosSwipeGestureEnabled } from "react-native-bedrock";
293
294
 
294
295
  // src/components/GameWebViewNavigationBar/GameNavigationBar.tsx
295
296
  import { SvgXml } from "@react-native-bedrock/native/react-native-svg";
@@ -372,6 +373,9 @@ function GameNavigationBar({ onClose }) {
372
373
  TouchableOpacity,
373
374
  {
374
375
  hitSlop: { left: 8, right: 8 },
376
+ accessibilityRole: "button",
377
+ accessible: true,
378
+ accessibilityLabel: "\uB2EB\uAE30",
375
379
  style: {
376
380
  padding: Platform3.OS === "ios" ? 7 : 9
377
381
  },
@@ -387,12 +391,31 @@ function GameNavigationBar({ onClose }) {
387
391
  // src/components/GameWebView.tsx
388
392
  import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
389
393
  var GameWebView = forwardRef(function GameWebView2(props, ref) {
394
+ const { openConfirm } = useDialog();
395
+ const { brandDisplayName } = getAppsInTossGlobals();
396
+ useEffect2(() => {
397
+ if (Platform4.OS === "ios") {
398
+ setIosSwipeGestureEnabled({ isEnabled: false });
399
+ return () => {
400
+ setIosSwipeGestureEnabled({ isEnabled: true });
401
+ };
402
+ }
403
+ return;
404
+ }, []);
390
405
  return /* @__PURE__ */ jsxs2(Fragment3, { children: [
391
406
  /* @__PURE__ */ jsx4(
392
407
  GameNavigationBar,
393
408
  {
394
- onClose: () => {
395
- closeView();
409
+ onClose: async () => {
410
+ const isConfirmed = await openConfirm({
411
+ title: `${brandDisplayName}\uC744 \uC885\uB8CC\uD560\uAE4C\uC694?`,
412
+ leftButton: "\uCDE8\uC18C",
413
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
414
+ closeOnDimmerClick: true
415
+ });
416
+ if (isConfirmed) {
417
+ closeView();
418
+ }
396
419
  }
397
420
  }
398
421
  ),
@@ -554,12 +577,12 @@ function ensureValue(value, name) {
554
577
  }
555
578
 
556
579
  // src/hooks/useGeolocation.ts
557
- import { useState, useEffect as useEffect2 } from "react";
580
+ import { useState, useEffect as useEffect3 } from "react";
558
581
  import { useVisibility } from "react-native-bedrock";
559
582
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
560
583
  const isVisible = useVisibility();
561
584
  const [location, setLocation] = useState(null);
562
- useEffect2(() => {
585
+ useEffect3(() => {
563
586
  if (!isVisible) {
564
587
  return;
565
588
  }
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.18",
4
+ "version": "0.0.19",
5
5
  "description": "The framework for Apps In Toss",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -56,12 +56,12 @@
56
56
  "ait": "./bin/ait.js"
57
57
  },
58
58
  "dependencies": {
59
- "@apps-in-toss/cli": "0.0.18",
60
- "@apps-in-toss/plugins": "0.0.18"
59
+ "@apps-in-toss/cli": "0.0.19",
60
+ "@apps-in-toss/plugins": "0.0.19"
61
61
  },
62
62
  "devDependencies": {
63
- "@react-native-bedrock/mpack-next": "^0.0.18",
64
- "@react-native-bedrock/native": "0.0.16",
63
+ "@react-native-bedrock/mpack-next": "0.0.17",
64
+ "@react-native-bedrock/native": "0.0.17",
65
65
  "@toss-design-system/react-native": "^0.4.1",
66
66
  "@types/kill-port": "^2.0.1",
67
67
  "@types/react": "18.3.3",
@@ -72,7 +72,7 @@
72
72
  "kill-port": "^2.0.1",
73
73
  "react": "18.2.0",
74
74
  "react-native": "0.72.6",
75
- "react-native-bedrock": "^0.0.18",
75
+ "react-native-bedrock": "0.0.17",
76
76
  "tsup": "^8.3.5",
77
77
  "typescript": "4.9.5",
78
78
  "vitest": "^3.0.3",
@@ -90,5 +90,5 @@
90
90
  "publishConfig": {
91
91
  "access": "public"
92
92
  },
93
- "gitHead": "2563312f28a4702050104bebd4c1289183c705d2"
93
+ "gitHead": "205a7b9571d501f2b64c9b6ad80cae377baec49d"
94
94
  }