@retion-miniapp/react-native 0.21.0 → 0.22.0
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.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +12 -12
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -432,6 +432,8 @@ declare const createMmkvStorage: (mmkv: {
|
|
|
432
432
|
set: (key: string, value: string) => void;
|
|
433
433
|
}) => MiniAppStorage;
|
|
434
434
|
|
|
435
|
+
/** Cách WebView xử lý bàn phím trên iOS — xem MiniAppHostProps.keyboard_mode. */
|
|
436
|
+
type MiniAppKeyboardMode = 'scroll' | 'lock' | 'resize';
|
|
435
437
|
/** Splash mặc định (chỉ dùng component RN) — ứng dụng truyền `splash` để thay bằng UI riêng. */
|
|
436
438
|
declare const DefaultMiniAppSplash: ({ app, is_dark, status, progress, retry }: MiniAppSplashProps) => React__default.JSX.Element;
|
|
437
439
|
interface MiniAppHostProps {
|
|
@@ -460,6 +462,15 @@ interface MiniAppHostProps {
|
|
|
460
462
|
* vd Sảnh merchant mở app con. Mặc định false: WebView chỉ đọc được thư mục của chính nó (iOS).
|
|
461
463
|
*/
|
|
462
464
|
allow_embedded_miniapps?: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Bàn phím trên iOS (Android luôn thu cửa sổ — adjustResize, không đổi):
|
|
467
|
+
* - 'scroll' (mặc định): như trình duyệt — WKWebView tự cuộn cả trang để input không bị che.
|
|
468
|
+
* - 'lock': web dạng app (h-dvh, cuộn trong div) TỰ đưa input lên theo `visualViewport` — chỉ khoá cuộn trang,
|
|
469
|
+
* trang không bị đẩy lên / lộ nền; WebView giữ nguyên kích thước.
|
|
470
|
+
* - 'resize': web dạng app KHÔNG tự xử lý bàn phím — khoá cuộn trang + WebView thu chiều cao theo bàn phím
|
|
471
|
+
* (web co lại, thanh đáy nằm trên bàn phím). Đừng dùng khi web đã tự nâng input (sẽ nâng 2 lần).
|
|
472
|
+
*/
|
|
473
|
+
keyboard_mode?: MiniAppKeyboardMode;
|
|
463
474
|
/** WebView đã tải xong tài liệu local. Hữu ích để app cha ẩn launch splash sau khi mini app sẵn sàng hiện. */
|
|
464
475
|
onWebLoadEnd?: (event: {
|
|
465
476
|
app_id: string;
|
|
@@ -467,7 +478,7 @@ interface MiniAppHostProps {
|
|
|
467
478
|
url: string;
|
|
468
479
|
}) => void;
|
|
469
480
|
}
|
|
470
|
-
declare const _default$1: React__default.MemoExoticComponent<({ container, splash, is_dark, bridge, close_on_back, opaque_background, allow_embedded_miniapps, onWebLoadEnd }: MiniAppHostProps) => React__default.JSX.Element | null>;
|
|
481
|
+
declare const _default$1: React__default.MemoExoticComponent<({ container, splash, is_dark, bridge, close_on_back, opaque_background, allow_embedded_miniapps, keyboard_mode, onWebLoadEnd }: MiniAppHostProps) => React__default.JSX.Element | null>;
|
|
471
482
|
|
|
472
483
|
interface OpenMiniAppArgs {
|
|
473
484
|
app: MiniAppLaunch;
|
|
@@ -1101,4 +1112,4 @@ interface UploadCapabilities {
|
|
|
1101
1112
|
/** XHR (không phải fetch) để có tiến trình upload; RN đọc file từ uri (cả content://), không nạp vào JS. */
|
|
1102
1113
|
declare const uploadToUrl: MiniAppUploader;
|
|
1103
1114
|
|
|
1104
|
-
export { CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
|
1115
|
+
export { CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -432,6 +432,8 @@ declare const createMmkvStorage: (mmkv: {
|
|
|
432
432
|
set: (key: string, value: string) => void;
|
|
433
433
|
}) => MiniAppStorage;
|
|
434
434
|
|
|
435
|
+
/** Cách WebView xử lý bàn phím trên iOS — xem MiniAppHostProps.keyboard_mode. */
|
|
436
|
+
type MiniAppKeyboardMode = 'scroll' | 'lock' | 'resize';
|
|
435
437
|
/** Splash mặc định (chỉ dùng component RN) — ứng dụng truyền `splash` để thay bằng UI riêng. */
|
|
436
438
|
declare const DefaultMiniAppSplash: ({ app, is_dark, status, progress, retry }: MiniAppSplashProps) => React__default.JSX.Element;
|
|
437
439
|
interface MiniAppHostProps {
|
|
@@ -460,6 +462,15 @@ interface MiniAppHostProps {
|
|
|
460
462
|
* vd Sảnh merchant mở app con. Mặc định false: WebView chỉ đọc được thư mục của chính nó (iOS).
|
|
461
463
|
*/
|
|
462
464
|
allow_embedded_miniapps?: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Bàn phím trên iOS (Android luôn thu cửa sổ — adjustResize, không đổi):
|
|
467
|
+
* - 'scroll' (mặc định): như trình duyệt — WKWebView tự cuộn cả trang để input không bị che.
|
|
468
|
+
* - 'lock': web dạng app (h-dvh, cuộn trong div) TỰ đưa input lên theo `visualViewport` — chỉ khoá cuộn trang,
|
|
469
|
+
* trang không bị đẩy lên / lộ nền; WebView giữ nguyên kích thước.
|
|
470
|
+
* - 'resize': web dạng app KHÔNG tự xử lý bàn phím — khoá cuộn trang + WebView thu chiều cao theo bàn phím
|
|
471
|
+
* (web co lại, thanh đáy nằm trên bàn phím). Đừng dùng khi web đã tự nâng input (sẽ nâng 2 lần).
|
|
472
|
+
*/
|
|
473
|
+
keyboard_mode?: MiniAppKeyboardMode;
|
|
463
474
|
/** WebView đã tải xong tài liệu local. Hữu ích để app cha ẩn launch splash sau khi mini app sẵn sàng hiện. */
|
|
464
475
|
onWebLoadEnd?: (event: {
|
|
465
476
|
app_id: string;
|
|
@@ -467,7 +478,7 @@ interface MiniAppHostProps {
|
|
|
467
478
|
url: string;
|
|
468
479
|
}) => void;
|
|
469
480
|
}
|
|
470
|
-
declare const _default$1: React__default.MemoExoticComponent<({ container, splash, is_dark, bridge, close_on_back, opaque_background, allow_embedded_miniapps, onWebLoadEnd }: MiniAppHostProps) => React__default.JSX.Element | null>;
|
|
481
|
+
declare const _default$1: React__default.MemoExoticComponent<({ container, splash, is_dark, bridge, close_on_back, opaque_background, allow_embedded_miniapps, keyboard_mode, onWebLoadEnd }: MiniAppHostProps) => React__default.JSX.Element | null>;
|
|
471
482
|
|
|
472
483
|
interface OpenMiniAppArgs {
|
|
473
484
|
app: MiniAppLaunch;
|
|
@@ -1101,4 +1112,4 @@ interface UploadCapabilities {
|
|
|
1101
1112
|
/** XHR (không phải fetch) để có tiến trình upload; RN đọc file từ uri (cả content://), không nạp vào JS. */
|
|
1102
1113
|
declare const uploadToUrl: MiniAppUploader;
|
|
1103
1114
|
|
|
1104
|
-
export { CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|
|
1115
|
+
export { CodeType, DEFAULT_MINIAPP_UPDATES_LABELS, DefaultMiniAppChangelogHistoryModal, DefaultMiniAppChangelogPrompt, DefaultMiniAppSplash, DefaultMiniAppUpdatePrompt, type InlineToken, type LocationOptions, type LocationResult, MINIAPP_CHANGELOG_KINDS, MINIAPP_PLATFORM_URL, type MiniAppBiometricAvailability, type MiniAppBiometricRequest, type MiniAppBiometricResult, type MiniAppBiometrics, type MiniAppBiometryType, type MiniAppBridgeOptions, type MiniAppCatalogEntry, type MiniAppCatalogItem, type MiniAppChangelog, type MiniAppChangelogActionsProps, MiniAppChangelogGroups, MiniAppChangelogHistory, type MiniAppChangelogHistoryRequest, type MiniAppChangelogKindStyle, type MiniAppChangelogPromptProps, type MiniAppChangelogRequest, type MiniAppChangelogState, MiniAppChangelogText, type MiniAppChangelogVersion, type MiniAppChannel, type MiniAppConfig, type MiniAppContainerProps, type MiniAppContext, type MiniAppDownloadState, type MiniAppDownloadStatus, type MiniAppDownloadTask, type MiniAppEvent, type MiniAppFileSystem, type MiniAppHandlerContext, type MiniAppHapticType, type MiniAppHistoryHeaderProps, _default$1 as MiniAppHost, type MiniAppHostData, BridgeError as MiniAppHostError, type MiniAppHostProps, type MiniAppKeepAlive, type MiniAppKeyboardMode, type MiniAppLaunch, type MiniAppLocalBundle, type MiniAppManifest, type MiniAppNativeHandlers, type MiniAppPaymentRequest, type MiniAppPaymentResult, type MiniAppPendingChangelog, type MiniAppPermission, type MiniAppPickedFile, type MiniAppSpeechProvider, type MiniAppSpeechStartContext, type MiniAppSplashProps, type MiniAppStorage, type MiniAppSyncResult, type MiniAppUpdate, type MiniAppUpdateActionProps, type MiniAppUpdatePromptProps, _default as MiniAppUpdates, type MiniAppUpdatesLabels, type MiniAppUpdatesProps, type MiniAppUpdatesTheme, MiniAppUpdatesThemeProvider, type MiniAppUploadCaller, type MiniAppUploadOptions, type MiniAppUploadProcessOptions, type MiniAppUploadProcessor, type MiniAppUploadRequest, type MiniAppUploadSource, type MiniAppUploadSourceRequest, type MiniAppUploadTarget, type MiniAppUploader, type MiniAppUrlUploadTarget, type OpenMiniAppArgs, type ReactNativeBiometricsLike, ScannerEndReason, ScannerEvent, ScannerLayout, ScannerMethod, type ScannerOptions, type ScannerResult, type SpeechOptions, ToastType, type UploadCapabilities, type UploadFileType, type UploadFilesResult, type UploadedFile, closeMiniApp, closeMiniAppChangelogHistory, configureMiniApp, createMmkvStorage, createReactNativeBiometrics, createRnfsFileSystem, dismissMiniAppChangelog, ensureMiniApp, fetchMiniAppChangelog, getLocalMiniApp, getMiniAppCatalog, getMiniAppCatalogEntry, getMiniAppChangelogSeen, getMiniAppStatuses, getMiniAppUpdate, getPendingChangelog, installBundledMiniApp, markMiniAppChangelogSeen, mergeMiniAppChangelog, onMiniAppEvent, openMiniApp, parseInlineMarkdown, pauseMiniApp, pauseMiniAppDownloads, preloadMiniApp, releaseSpeechFor, resolveMiniAppUpdatesTheme, restoreMiniApp, resumeMiniApp, resumeMiniAppDownloads, sendEventToWeb, showMiniAppChangelog, showMiniAppChangelogHistory, stripInlineMarkdown, syncMiniAppCatalog, uninstallMiniApp, updateMiniApp, uploadToUrl, useMiniAppChangelog, useMiniAppChangelogHistoryRequest, useMiniAppChangelogRequest, useMiniAppDownload, useMiniAppDownloadsPaused, useMiniAppUpdatesTheme };
|