react-native-inapp-inspector 2.4.2 → 2.5.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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +523 -2
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- package/dist/commonjs/components/AnimatedBrandOwl.js +32 -32
- package/dist/commonjs/components/AppHeaderLogo.js +6 -6
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- package/dist/commonjs/components/BrandSquareIcon.js +33 -33
- package/dist/commonjs/components/ConsoleLogCard.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +2 -2
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/commonjs/components/Inspector/ConsoleTab.js +5 -5
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -11
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -25
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +114 -32
- package/dist/commonjs/components/Inspector/MainScreen.js +26 -19
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +38 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/PushCard.js +1 -1
- package/dist/commonjs/components/Inspector/PushDetail.js +9 -9
- package/dist/commonjs/components/Inspector/PushTab.js +3 -3
- package/dist/commonjs/components/Inspector/ReduxTab.js +9 -7
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +102 -73
- package/dist/commonjs/components/Inspector/SocketCard.js +1 -1
- package/dist/commonjs/components/Inspector/SocketDetail.js +73 -63
- package/dist/commonjs/components/Inspector/SocketTab.js +4 -4
- package/dist/commonjs/components/Inspector/StorageTab.js +10 -10
- package/dist/commonjs/components/Inspector/SupportModal.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +1 -1
- package/dist/commonjs/components/JsonViewer.js +47 -45
- package/dist/commonjs/components/LogCard.js +22 -20
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +27 -0
- package/dist/commonjs/components/NetworkIcons.js +103 -5
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +1 -1
- package/dist/commonjs/i18n/index.js +1 -1
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +4 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +7 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +21 -0
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- package/dist/esm/components/AnimatedBrandOwl.js +114 -114
- package/dist/esm/components/AppHeaderLogo.js +7 -7
- package/dist/esm/components/BrandCircleIcon.js +70 -70
- package/dist/esm/components/BrandSquareIcon.js +61 -61
- package/dist/esm/components/ConsoleLogCard.js +1 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +14 -14
- package/dist/esm/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/esm/components/Inspector/ConsoleTab.js +17 -17
- package/dist/esm/components/Inspector/CrashTab.js +202 -169
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +56 -51
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +140 -58
- package/dist/esm/components/Inspector/MainScreen.js +61 -54
- package/dist/esm/components/Inspector/MediaGalleryTab.js +55 -52
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/esm/components/Inspector/NetworkTab.js +74 -74
- package/dist/esm/components/Inspector/PushCard.js +1 -1
- package/dist/esm/components/Inspector/PushDetail.js +18 -18
- package/dist/esm/components/Inspector/PushTab.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +18 -16
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +224 -195
- package/dist/esm/components/Inspector/SocketCard.js +8 -8
- package/dist/esm/components/Inspector/SocketDetail.js +106 -96
- package/dist/esm/components/Inspector/SocketTab.js +18 -18
- package/dist/esm/components/Inspector/StorageTab.js +47 -47
- package/dist/esm/components/Inspector/SupportModal.js +64 -64
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/JsonViewer.js +51 -49
- package/dist/esm/components/LogCard.js +41 -39
- package/dist/esm/components/ModuleErrorBoundary.js +10 -10
- package/dist/esm/components/NetworkIcons.d.ts +27 -0
- package/dist/esm/components/NetworkIcons.js +101 -3
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/telemetry.js +1 -1
- package/dist/esm/i18n/index.js +1 -1
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +7 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/interfaces.d.ts +21 -0
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +429 -0
- package/package.json +10 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +57 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,150 +1,372 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,o,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(o,a);(!r||("get"in r?!o.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(e,i,r)}):(function(e,o,a,i){i===void 0&&(i=a),e[i]=o[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,o){Object.defineProperty(e,"default",{enumerable:!0,value:o})}):function(e,o){e.default=o}),__importStar=this&&this.__importStar||(function(){var e=function(o){return e=Object.getOwnPropertyNames||function(a){var i=[];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i[i.length]=r);return i},e(o)};return function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var i=e(o),r=0;r<i.length;r++)i[r]!=="default"&&__createBinding(a,o,i[r]);return __setModuleDefault(a,o),a}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MediaPreviewModal=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_linear_gradient_1=__importDefault(require("react-native-linear-gradient")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),ConfirmationModal_1=require("./ConfirmationModal"),NetworkIcons_1=require("../NetworkIcons"),capture_1=require("../../capture"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),i18n_1=require("../../i18n"),NativeInspector_1=require("../../native/NativeInspector"),MediaPreviewModal=({item:e,visible:o,onClose:a,onDelete:i,onConvertToGif:r})=>{const{t}=(0,i18n_1.useTranslation)(),[u,y]=(0,react_1.useState)(!1),[_,h]=(0,react_1.useState)(!1),[s,v]=(0,react_1.useState)(!1),[m,g]=(0,react_1.useState)(!1),[T,p]=(0,react_1.useState)(!1);if(!e)return null;const c=()=>{e?.uri&&(0,helpers_1.copyImageOrMediaToClipboard)(e.uri,e.type==="image"?"Image":"Media")},b=async()=>{try{g(!0),await capture_1.ScreenCapture.playVideo(e.uri)}catch{(0,toast_1.showToast)(t("mediaGallery.playError","Unable to play video"))}finally{g(!1)}},f=()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),p(!0)},x=async()=>{if(r){y(!0);try{await r(e),(0,toast_1.showToast)(t("mediaGallery.convertedSuccess"))}catch{(0,toast_1.showToast)(t("mediaGallery.convertFailed"))}finally{y(!1)}}},w=async()=>{try{const d=e.uri.startsWith("file://")||e.uri.startsWith("content://")||e.uri.startsWith("http")?e.uri:`file://${e.uri}`,A=react_native_1.Platform.select({ios:{url:d,title:e.filename},default:{title:e.filename,message:e.filename,url:d}});(await react_native_1.Share.share(A)).action===react_native_1.Share.sharedAction&&(0,toast_1.showToast)(t("mediaGallery.shareSuccess","Shared successfully"))}catch(d){d?.message!=="User did not share"&&(0,toast_1.showToast)(t("mediaGallery.shareUnavailable","Sharing not available on this device"))}},l=e.type==="video",C=e.type==="gif",n=e.durationMs?(e.durationMs/1e3).toFixed(1):null,S=n?`00:${Number(n)<10?"0":""}${n}`:null;return<react_native_1.Modal visible={o}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={a}>
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,h,w,m){m===void 0&&(m=w);var y=Object.getOwnPropertyDescriptor(h,w);(!y||("get"in y?!h.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return h[w]}}),Object.defineProperty(o,m,y)}):(function(o,h,w,m){m===void 0&&(m=w),o[m]=h[w]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,h){Object.defineProperty(o,"default",{enumerable:!0,value:h})}):function(o,h){o.default=h}),__importStar=this&&this.__importStar||(function(){var o=function(h){return o=Object.getOwnPropertyNames||function(w){var m=[];for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(m[m.length]=y);return m},o(h)};return function(h){if(h&&h.__esModule)return h;var w={};if(h!=null)for(var m=o(h),y=0;y<m.length;y++)m[y]!=="default"&&__createBinding(w,h,m[y]);return __setModuleDefault(w,h),w}})(),__importDefault=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MediaPreviewModal=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),react_native_linear_gradient_1=__importDefault(require("react-native-linear-gradient")),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),ConfirmationModal_1=require("./ConfirmationModal"),NetworkIcons_1=require("../NetworkIcons"),capture_1=require("../../capture"),editor_1=require("../../editor"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),i18n_1=require("../../i18n"),NativeInspector_1=require("../../native/NativeInspector"),COLOR_PALETTE=["#EF4444","#F59E0B","#38BDF8","#10B981","#A855F7","#FFFFFF","#0F172A"],MediaPreviewModal=({item:o,visible:h,onClose:w,onDelete:m,onConvertToGif:y})=>{const{t:n}=(0,i18n_1.useTranslation)(),[de,he]=(0,react_1.useState)(!1),[P,v]=(0,react_1.useState)(!1),[Be,F]=(0,react_1.useState)(null),[Me,O]=(0,react_1.useState)(o?.width),[Re,I]=(0,react_1.useState)(o?.height),[ze,D]=(0,react_1.useState)(o?.sizeBytes),[Ve,J]=(0,react_1.useState)(o?.durationMs),[Pe,Q]=(0,react_1.useState)(!1),[Fe,pe]=(0,react_1.useState)(!1),[Oe,ee]=(0,react_1.useState)(!1),[l,S]=(0,react_1.useState)("none"),[ue,N]=(0,react_1.useState)(1),[$,ge]=(0,react_1.useState)(0),[te,Ie]=(0,react_1.useState)("free"),[i,T]=(0,react_1.useState)({x:.1,y:.15,width:.8,height:.7}),[A,ye]=(0,react_1.useState)("#EF4444"),[j,De]=(0,react_1.useState)(4),[E,q]=(0,react_1.useState)([]),[oe,U]=(0,react_1.useState)(null),[ht,$e]=(0,react_1.useState)("rect"),[He,ie]=(0,react_1.useState)([]),[We,X]=(0,react_1.useState)([]),[Le,G]=(0,react_1.useState)(!1),[be,fe]=(0,react_1.useState)(null),[Y,Z]=(0,react_1.useState)(""),[Ee,ae]=(0,react_1.useState)([]),pt=(0,react_1.useRef)(null),[we,me]=(0,react_1.useState)({width:react_native_1.Dimensions.get("window").width-16,height:react_native_1.Dimensions.get("window").height*.72,pageX:0,pageY:0}),z=(0,react_1.useRef)(l);z.current=l;const Te=(0,react_1.useRef)(A);Te.current=A;const Ce=(0,react_1.useRef)(j);Ce.current=j;const xe=(0,react_1.useRef)(i);xe.current=i;const re=(0,react_1.useRef)(we);re.current=we;const Ge=(0,react_1.useRef)(react_native_1.PanResponder.create({onStartShouldSetPanResponder:()=>z.current==="draw",onMoveShouldSetPanResponder:()=>z.current==="draw",onPanResponderGrant:e=>{const{locationX:t,locationY:a}=e.nativeEvent;U([{x:t,y:a}])},onPanResponderMove:e=>{const{locationX:t,locationY:a}=e.nativeEvent;U(g=>g?[...g,{x:t,y:a}]:[{x:t,y:a}])},onPanResponderRelease:()=>{U(e=>(e&&e.length>1&&q(t=>[...t,{id:`stroke_${Date.now()}_${Math.random()}`,points:e,color:Te.current,strokeWidth:Ce.current}]),null))}})).current,K=(0,react_1.useRef)({mode:"none",startX:0,startY:0,origBox:{x:.08,y:.1,width:.84,height:.75}}),Ne=(0,react_1.useRef)(react_native_1.PanResponder.create({onStartShouldSetPanResponder:()=>z.current==="crop",onStartShouldSetPanResponderCapture:()=>z.current==="crop",onMoveShouldSetPanResponder:()=>z.current==="crop",onMoveShouldSetPanResponderCapture:()=>z.current==="crop",onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:e=>{const t=re.current,a=t.width>50?t.width:react_native_1.Dimensions.get("window").width-16,g=t.height>50?t.height:react_native_1.Dimensions.get("window").height*.72,{locationX:L,locationY:k}=e.nativeEvent,p=Math.max(0,Math.min(1,L/a)),d=Math.max(0,Math.min(1,k/g)),_=xe.current,B=_.x,R=_.y,s=_.x+_.width,c=_.y+_.height,b=Math.max(.08,40/a),f=Math.max(.08,40/g);let r="none";Math.abs(p-B)<=b&&Math.abs(d-R)<=f?r="tl":Math.abs(p-s)<=b&&Math.abs(d-R)<=f?r="tr":Math.abs(p-B)<=b&&Math.abs(d-c)<=f?r="bl":Math.abs(p-s)<=b&&Math.abs(d-c)<=f?r="br":Math.abs(d-R)<=f&&p>=B&&p<=s?r="top":Math.abs(d-c)<=f&&p>=B&&p<=s?r="bottom":Math.abs(p-B)<=b&&d>=R&&d<=c?r="left":Math.abs(p-s)<=b&&d>=R&&d<=c?r="right":p>=B&&p<=s&&d>=R&&d<=c?r="center":r="new",K.current={mode:r,startX:p,startY:d,origBox:{..._}}},onPanResponderMove:(e,t)=>{const a=re.current,g=a.width>0?a.width:react_native_1.Dimensions.get("window").width-16,L=a.height>0?a.height:react_native_1.Dimensions.get("window").height*.7;if(!g||!L)return;const k=t.dx/g,p=t.dy/L,{mode:d,startX:_,startY:B,origBox:R}=K.current,{x:s,y:c,width:b,height:f}=R;if(d==="center"){const r=Math.max(0,Math.min(1-b,s+k)),C=Math.max(0,Math.min(1-f,c+p));T(ce=>({...ce,x:r,y:C}))}else if(d==="new"){const r=Math.max(0,Math.min(1,_+k)),C=Math.max(0,Math.min(1,B+p)),ce=Math.min(_,r),st=Math.min(B,C),ct=Math.max(.04,Math.abs(r-_)),dt=Math.max(.04,Math.abs(C-B));T({x:ce,y:st,width:ct,height:dt})}else if(d==="tl"){const r=Math.max(0,Math.min(s+b-.04,s+k)),C=Math.max(0,Math.min(c+f-.04,c+p));T({x:r,y:C,width:b-(r-s),height:f-(C-c)})}else if(d==="tr"){const r=Math.max(0,Math.min(c+f-.04,c+p)),C=Math.max(.04,Math.min(1-s,b+k));T({x:s,y:r,width:C,height:f-(r-c)})}else if(d==="bl"){const r=Math.max(0,Math.min(s+b-.04,s+k)),C=Math.max(.04,Math.min(1-c,f+p));T({x:r,y:c,width:b-(r-s),height:C})}else if(d==="br"){const r=Math.max(.04,Math.min(1-s,b+k)),C=Math.max(.04,Math.min(1-c,f+p));T({x:s,y:c,width:r,height:C})}else if(d==="top"){const r=Math.max(0,Math.min(c+f-.04,c+p));T({x:s,y:r,width:b,height:f-(r-c)})}else if(d==="bottom"){const r=Math.max(.04,Math.min(1-c,f+p));T({x:s,y:c,width:b,height:r})}else if(d==="left"){const r=Math.max(0,Math.min(s+b-.04,s+k));T({x:r,y:c,width:b-(r-s),height:f})}else if(d==="right"){const r=Math.max(.04,Math.min(1-s,b+k));T({x:s,y:c,width:r,height:f})}},onPanResponderRelease:()=>{K.current.mode="none"},onPanResponderTerminate:()=>{K.current.mode="none"}})).current;if(react_1.default.useEffect(()=>{o?.uri&&(F(o.uri),O(o.width),I(o.height),D(o.sizeBytes),J(o.durationMs),Q(!1),ge(0),N(1),S("none"),q([]),U(null),ie([]),X([]),ae([]),T({x:.08,y:.1,width:.84,height:.75}))},[o?.uri,o?.width,o?.height,o?.sizeBytes,o?.durationMs]),!o||!h)return null;const u=Be||o.uri,H=Me??o.width,W=Re??o.height,_e=ze??o.sizeBytes,ne=Ve??o.durationMs,M=o.type==="video",ve=o.type==="gif",x=o.type==="image",je=$===90||$===270?H&&W?Math.min(W/H,H/W,.75):.72:1,qe=()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),N(e=>Math.min(4,parseFloat((e+.25).toFixed(2))))},Ue=()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),N(e=>Math.max(1,parseFloat((e-.25).toFixed(2))))},Xe=()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),N(1)},Ye=async()=>{if(!u||!x)return;(0,NativeInspector_1.triggerNativeHaptic)("light");const e=($+90)%360;if(ge(e),(0,toast_1.showToast)(n("mediaGallery.rotatedSuccess",`Rotated ${e}\xB0`)),!P){v(!0);try{const t=await editor_1.MediaEditor.editPhoto({uri:u,rotation:90});t?.uri&&(F(t.uri),t.width&&O(t.width),t.height&&I(t.height),t.size&&D(t.size))}catch{}finally{v(!1)}}},Ze=()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),q(e=>e.slice(0,-1))},Ke=()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),q([])},Je=e=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),S("crop"),Ie(e),T(e==="1:1"?{x:.15,y:.2,width:.7,height:.7}:e==="4:3"?{x:.1,y:.2,width:.8,height:.6}:e==="16:9"?{x:.05,y:.25,width:.9,height:.506}:e==="9:16"?{x:.25,y:.1,width:.5,height:.888}:e==="3:2"?{x:.1,y:.2,width:.8,height:.533}:{x:.08,y:.1,width:.84,height:.75})},Qe=async()=>{if(!(!u||!x)){(0,NativeInspector_1.triggerNativeHaptic)("medium"),v(!0);try{const e=await editor_1.MediaEditor.cropToDefect(u,{x:i.x,y:i.y,width:i.width,height:i.height,isNormalized:!0});e?.uri&&(F(e.uri),e.width&&O(e.width),e.height&&I(e.height),e.size&&D(e.size),(0,toast_1.showToast)(n("mediaGallery.croppedSuccess","Image Cropped")),S("none"))}catch{(0,toast_1.showToast)(n("mediaGallery.cropFailed","Crop failed"))}finally{v(!1)}}},le=e=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),$e(e);const t={id:`shape_${Date.now()}`,type:e,x:.25,y:.35,width:e==="circle"?.4:.5,height:e==="circle"?.4:.25,color:A};ie(a=>[...a,t]),(0,toast_1.showToast)(n("mediaGallery.shapeAdded",`${e.toUpperCase()} Added`))},et=()=>{(0,NativeInspector_1.triggerNativeHaptic)("light");const e={id:`blur_${Date.now()}`,x:.12,y:.35,width:.76,height:.12};ae(t=>[...t,e]),(0,toast_1.showToast)(n("mediaGallery.blurAdded","Blur Mask Added"))},Se=e=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),e?(fe(e),Z(e.text)):(fe(null),Z("")),G(!0)},tt=()=>{if(!Y.trim()){G(!1);return}if(be)X(e=>e.map(t=>t.id===be.id?{...t,text:Y.trim(),color:A}:t));else{const e={id:`text_${Date.now()}`,text:Y.trim(),x:.2,y:.4,color:AppColors_1.AppColors.white,bgColor:A==="#FFFFFF"?"#0F172A":A};X(t=>[...t,e])}G(!1),Z(""),(0,toast_1.showToast)(n("mediaGallery.textAdded","Text Added"))},ot=async e=>{if(!(!u||!x||P)){(0,NativeInspector_1.triggerNativeHaptic)("medium"),v(!0);try{const t=await editor_1.MediaEditor.editPhoto({uri:u,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(t?.uri){F(t.uri);const a=Math.round((H||1080)*e),g=Math.round((W||1920)*e);O(a),I(g),t.size&&D(Math.round(t.size*e*e)),(0,toast_1.showToast)(n("mediaGallery.resizedSuccess",`Resized to ${Math.round(e*100)}% (${a}\xD7${g})`)),S("none")}}catch{(0,toast_1.showToast)(n("mediaGallery.resizeFailed","Resize failed"))}finally{v(!1)}}},se=()=>{u&&((0,NativeInspector_1.triggerNativeHaptic)("light"),(0,helpers_1.copyImageOrMediaToClipboard)(u,x?"Image":"Media"))},it=async()=>{try{(0,NativeInspector_1.triggerNativeHaptic)("light");const e=u.startsWith("file://")||u.startsWith("content://")||u.startsWith("http")?u:`file://${u}`,t=react_native_1.Platform.select({ios:{url:e,title:o.filename},default:{title:o.filename,message:o.filename,url:e}});(await react_native_1.Share.share(t)).action===react_native_1.Share.sharedAction&&(0,toast_1.showToast)(n("mediaGallery.shareSuccess","Shared successfully"))}catch(e){e?.message!=="User did not share"&&(0,toast_1.showToast)(n("mediaGallery.shareUnavailable","Sharing not available on this device"))}},at=()=>{(0,NativeInspector_1.triggerNativeHaptic)("medium"),ee(!0)},Ae=async()=>{if(y){he(!0);try{await y(o),(0,toast_1.showToast)(n("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{(0,toast_1.showToast)(n("mediaGallery.convertFailed","Conversion failed"))}finally{he(!1)}}},ke=async()=>{try{pe(!0),await capture_1.ScreenCapture.playVideo(u)}catch{(0,toast_1.showToast)(n("mediaGallery.playError","Unable to play video"))}finally{pe(!1)}},rt=async()=>{if(!(!u||!M||P)){v(!0),(0,NativeInspector_1.triggerNativeHaptic)("light");try{const t=Math.min(ne||1e4,5e3),a=await editor_1.MediaEditor.trimReproClip(u,0,t,{quality:"medium"});a?.uri&&(F(a.uri),a.width&&O(a.width),a.height&&I(a.height),a.size&&D(a.size),a.durationMs&&J(a.durationMs),(0,toast_1.showToast)(n("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{(0,toast_1.showToast)(n("mediaGallery.trimFailed","Trim failed"))}finally{v(!1)}}},nt=async()=>{if(!(!u||!M||P)){v(!0),(0,NativeInspector_1.triggerNativeHaptic)("light");try{const e=await editor_1.MediaEditor.muteVideo(u);e?.uri&&(F(e.uri),e.width&&O(e.width),e.height&&I(e.height),e.size&&D(e.size),e.durationMs&&J(e.durationMs),(0,toast_1.showToast)(n("mediaGallery.mutedSuccess","Audio Stripped")))}catch{(0,toast_1.showToast)(n("mediaGallery.muteFailed","Mute failed"))}finally{v(!1)}}},V=ne?(ne/1e3).toFixed(1):null,lt=V?`00:${Number(V)<10?"0":""}${V}`:null;return<react_native_1.Modal visible={h}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={w}>
|
|
2
2
|
<react_native_1.StatusBar translucent backgroundColor="transparent"barStyle="light-content"/>
|
|
3
3
|
<react_native_1.View style={previewStyles.overlay}>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<react_native_1.
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
<react_native_1.View style={previewStyles.header}>
|
|
6
|
+
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.indigo600,AppColors_1.AppColors.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={react_native_1.StyleSheet.absoluteFill}pointerEvents="none"/>
|
|
7
|
+
<react_native_1.View style={previewStyles.headerInner}>
|
|
8
|
+
<react_native_1.TouchableOpacity activeOpacity={.8}onPress={se}style={previewStyles.headerLeft}>
|
|
9
|
+
<react_native_1.View style={previewStyles.badge}>
|
|
10
|
+
{M?<NetworkIcons_1.FilmIcon size={11}color={AppColors_1.AppColors.white}/>:ve?<NetworkIcons_1.GifIcon size={11}color={AppColors_1.AppColors.white}/>:<NetworkIcons_1.ImageIcon size={11}color={AppColors_1.AppColors.white}/>}
|
|
11
|
+
<react_native_1.Text style={previewStyles.badgeText}>
|
|
12
|
+
{(o.format||(M?"mp4":ve?"gif":"png")).toUpperCase()}
|
|
13
|
+
</react_native_1.Text>
|
|
14
|
+
</react_native_1.View>
|
|
15
|
+
<react_native_1.View style={previewStyles.headerTextCol}>
|
|
16
|
+
<react_native_1.Text style={previewStyles.title}numberOfLines={1}>
|
|
17
|
+
{o.filename||(o.uri?o.uri.split("/").pop():"")||"Capture"}
|
|
18
|
+
</react_native_1.Text>
|
|
19
|
+
<react_native_1.Text style={previewStyles.subtitle}numberOfLines={1}>
|
|
20
|
+
{(0,helpers_1.formatBytes)(_e||0)}
|
|
21
|
+
{o.timestamp?` \u2022 ${new Date(o.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`:""}
|
|
22
|
+
</react_native_1.Text>
|
|
23
|
+
</react_native_1.View>
|
|
24
|
+
</react_native_1.TouchableOpacity>
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
<react_native_1.View style={previewStyles.headerRight}>
|
|
28
|
+
{M&&y&&<TouchableScale_1.default accessible={!0}accessibilityRole="button"accessibilityLabel={n("mediaGallery.convertToGif","Convert to GIF")}onPress={Ae}disabled={de}style={[previewStyles.headerActionBtn,{backgroundColor:`${AppColors_1.AppColors.warningAmber}33`,borderColor:`${AppColors_1.AppColors.warningAmber}66`}]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
29
|
+
<NetworkIcons_1.GifIcon size={13}color={AppColors_1.AppColors.warningAmber}/>
|
|
30
|
+
</TouchableScale_1.default>}
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
<TouchableScale_1.default accessible={!0}accessibilityRole="button"accessibilityLabel={n("mediaGallery.copyUri","Copy URI")}onPress={se}style={previewStyles.headerActionBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
33
|
+
<NetworkIcons_1.CopyIcon size={13}color={AppColors_1.AppColors.white}/>
|
|
34
|
+
</TouchableScale_1.default>
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
<TouchableScale_1.default accessible={!0}accessibilityRole="button"accessibilityLabel={n("mediaGallery.share","Share")}onPress={it}style={previewStyles.headerActionBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
37
|
+
<NetworkIcons_1.ShareIcon size={13}color={AppColors_1.AppColors.white}/>
|
|
38
|
+
</TouchableScale_1.default>
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
<TouchableScale_1.default accessible={!0}accessibilityRole="button"accessibilityLabel={n("mediaGallery.delete","Delete")}onPress={at}style={previewStyles.headerDeleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
41
|
+
<NetworkIcons_1.TrashIcon size={13}color={AppColors_1.AppColors.white}/>
|
|
42
|
+
</TouchableScale_1.default>
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
<react_native_1.TouchableOpacity accessible={!0}accessibilityRole="button"accessibilityLabel={n("common.close","Close")}onPress={w}style={previewStyles.headerCloseBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
45
|
+
<NetworkIcons_1.CloseWhite size={12}/>
|
|
46
|
+
</react_native_1.TouchableOpacity>
|
|
47
|
+
</react_native_1.View>
|
|
44
48
|
</react_native_1.View>
|
|
45
|
-
</
|
|
49
|
+
</react_native_1.View>
|
|
46
50
|
|
|
47
51
|
|
|
48
|
-
<react_native_1.
|
|
49
|
-
<react_native_1.
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
<react_native_1.SafeAreaView style={previewStyles.stageSafe}>
|
|
53
|
+
<react_native_1.View style={previewStyles.stage}>
|
|
54
|
+
<react_native_1.View onLayout={e=>{const{width:t,height:a}=e.nativeEvent.layout;t>20&&a>20&&me(g=>({...g,width:t,height:a}))}}style={previewStyles.previewCard}>
|
|
55
|
+
{M?o.thumbnailUri&&!Pe?<>
|
|
56
|
+
<react_native_1.Image source={{uri:o.thumbnailUri}}style={previewStyles.image}resizeMode="contain"onError={()=>Q(!0)}/>
|
|
57
|
+
<react_native_1.View style={previewStyles.videoImageOverlay}/>
|
|
58
|
+
</>:<react_native_1.View style={previewStyles.videoFallbackBackdrop}>
|
|
59
|
+
<react_native_1.View style={previewStyles.videoFallbackGlow}/>
|
|
60
|
+
<NetworkIcons_1.FilmIcon size={52}color={AppColors_1.AppColors.sky400}/>
|
|
61
|
+
<react_native_1.Text style={previewStyles.videoFallbackTitle}>
|
|
62
|
+
{o.width&&o.height?`${o.width} \xD7 ${o.height}`:"HD Video Recording"}
|
|
63
|
+
</react_native_1.Text>
|
|
64
|
+
<react_native_1.Text style={previewStyles.videoFallbackSubtitle}>
|
|
65
|
+
{V?`${V}s duration`:"MP4 Video"} • {(0,helpers_1.formatBytes)(o.sizeBytes)}
|
|
66
|
+
</react_native_1.Text>
|
|
67
|
+
</react_native_1.View>:<react_native_1.View onLayout={e=>{const{width:t,height:a}=e.nativeEvent.layout;t>20&&a>20&&me(g=>({...g,width:t,height:a}))}}style={[previewStyles.canvasContainer,{transform:[{scale:ue*je},{rotate:`${$}deg`}]}]}{...l==="draw"?Ge.panHandlers:{}}>
|
|
68
|
+
<react_native_1.Image key={u}source={{uri:u}}style={previewStyles.image}resizeMode="contain"onError={()=>Q(!0)}/>
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<react_native_1.Text style={previewStyles.centerPlayText}>
|
|
72
|
-
{t("mediaGallery.playVideo","Play Video")}
|
|
73
|
-
</react_native_1.Text>
|
|
74
|
-
</react_native_1.View>
|
|
75
|
-
</react_native_1.View>}
|
|
70
|
+
|
|
71
|
+
<react_native_svg_1.default style={react_native_1.StyleSheet.absoluteFill}pointerEvents={l==="draw"?"auto":"none"}>
|
|
72
|
+
<react_native_svg_1.G>
|
|
73
|
+
{E.map(e=>{if(e.points.length<2)return null;const t=e.points.reduce((a,g,L)=>L===0?`M ${g.x} ${g.y}`:`${a} L ${g.x} ${g.y}`,"");return<react_native_svg_1.Path key={e.id}d={t}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"strokeLinejoin="round"fill="none"/>})}
|
|
74
|
+
{oe&&oe.length>1&&<react_native_svg_1.Path d={oe.reduce((e,t,a)=>a===0?`M ${t.x} ${t.y}`:`${e} L ${t.x} ${t.y}`,"")}stroke={A}strokeWidth={j}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
|
|
75
|
+
</react_native_svg_1.G>
|
|
76
|
+
</react_native_svg_1.default>
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
{He.map(e=><react_native_1.View key={e.id}style={[previewStyles.shapeItem,{left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.width*100}%`,height:`${e.height*100}%`,borderColor:e.color,borderRadius:e.type==="circle"?999:e.type==="ellipse"?36:8}]}>
|
|
80
|
+
<react_native_1.TouchableOpacity style={previewStyles.shapeDeleteBadge}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),ie(t=>t.filter(a=>a.id!==e.id))}}>
|
|
81
|
+
<NetworkIcons_1.CloseWhite size={8}/>
|
|
82
|
+
</react_native_1.TouchableOpacity>
|
|
83
|
+
</react_native_1.View>)}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
{Ee.map(e=><react_native_1.View key={e.id}style={[previewStyles.blurItem,{left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.width*100}%`,height:`${e.height*100}%`}]}>
|
|
87
|
+
<react_native_1.Text style={previewStyles.blurItemText}>PRIVACY MASK</react_native_1.Text>
|
|
88
|
+
<react_native_1.TouchableOpacity style={previewStyles.shapeDeleteBadge}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),ae(t=>t.filter(a=>a.id!==e.id))}}>
|
|
89
|
+
<NetworkIcons_1.CloseWhite size={8}/>
|
|
90
|
+
</react_native_1.TouchableOpacity>
|
|
91
|
+
</react_native_1.View>)}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
{We.map(e=><react_native_1.TouchableOpacity key={e.id}activeOpacity={.85}onPress={()=>Se(e)}style={[previewStyles.textAnnotationPill,{left:`${e.x*100}%`,top:`${e.y*100}%`,backgroundColor:e.bgColor}]}>
|
|
95
|
+
<react_native_1.Text style={[previewStyles.textAnnotationText,{color:e.color}]}>
|
|
96
|
+
{e.text}
|
|
97
|
+
</react_native_1.Text>
|
|
98
|
+
<react_native_1.TouchableOpacity style={previewStyles.textDeleteBtn}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),X(t=>t.filter(a=>a.id!==e.id))}}>
|
|
99
|
+
<NetworkIcons_1.CloseWhite size={8}/>
|
|
100
|
+
</react_native_1.TouchableOpacity>
|
|
101
|
+
</react_native_1.TouchableOpacity>)}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
{l==="crop"&&<react_native_1.View style={previewStyles.cropOverlayMask}{...Ne.panHandlers}>
|
|
105
|
+
|
|
106
|
+
<react_native_1.View pointerEvents="none"style={[previewStyles.cropDimMask,{top:0,left:0,right:0,height:`${i.y*100}%`}]}/>
|
|
107
|
+
|
|
108
|
+
<react_native_1.View pointerEvents="none"style={[previewStyles.cropDimMask,{top:`${(i.y+i.height)*100}%`,left:0,right:0,bottom:0}]}/>
|
|
109
|
+
|
|
110
|
+
<react_native_1.View pointerEvents="none"style={[previewStyles.cropDimMask,{top:`${i.y*100}%`,left:0,width:`${i.x*100}%`,height:`${i.height*100}%`}]}/>
|
|
111
|
+
|
|
112
|
+
<react_native_1.View pointerEvents="none"style={[previewStyles.cropDimMask,{top:`${i.y*100}%`,left:`${(i.x+i.width)*100}%`,right:0,height:`${i.height*100}%`}]}/>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<react_native_svg_1.default style={react_native_1.StyleSheet.absoluteFill}pointerEvents="none">
|
|
116
|
+
<react_native_svg_1.Rect x={`${i.x*100}%`}y={`${i.y*100}%`}width={`${i.width*100}%`}height={`${i.height*100}%`}stroke="#FFFFFF"strokeWidth="2.5"strokeDasharray="8, 5"fill="rgba(56, 189, 248, 0.10)"/>
|
|
117
|
+
<react_native_svg_1.Line x1={`${i.x*100}%`}y1={`${(i.y+i.height*.333)*100}%`}x2={`${(i.x+i.width)*100}%`}y2={`${(i.y+i.height*.333)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
|
|
118
|
+
<react_native_svg_1.Line x1={`${i.x*100}%`}y1={`${(i.y+i.height*.666)*100}%`}x2={`${(i.x+i.width)*100}%`}y2={`${(i.y+i.height*.666)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
|
|
119
|
+
<react_native_svg_1.Line x1={`${(i.x+i.width*.333)*100}%`}y1={`${i.y*100}%`}x2={`${(i.x+i.width*.333)*100}%`}y2={`${(i.y+i.height)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
|
|
120
|
+
<react_native_svg_1.Line x1={`${(i.x+i.width*.666)*100}%`}y1={`${i.y*100}%`}x2={`${(i.x+i.width*.666)*100}%`}y2={`${(i.y+i.height)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
|
|
121
|
+
</react_native_svg_1.default>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<react_native_1.View pointerEvents="none"style={[previewStyles.cropBoxFrame,{left:`${i.x*100}%`,top:`${i.y*100}%`,width:`${i.width*100}%`,height:`${i.height*100}%`}]}>
|
|
125
|
+
|
|
126
|
+
<react_native_1.View style={[previewStyles.cropCornerBracket,previewStyles.bracketTL]}/>
|
|
127
|
+
<react_native_1.View style={[previewStyles.cropCornerBracket,previewStyles.bracketTR]}/>
|
|
128
|
+
<react_native_1.View style={[previewStyles.cropCornerBracket,previewStyles.bracketBL]}/>
|
|
129
|
+
<react_native_1.View style={[previewStyles.cropCornerBracket,previewStyles.bracketBR]}/>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<react_native_1.View style={previewStyles.cropEdgeBarTop}/>
|
|
133
|
+
<react_native_1.View style={previewStyles.cropEdgeBarBottom}/>
|
|
134
|
+
<react_native_1.View style={previewStyles.cropEdgeBarLeft}/>
|
|
135
|
+
<react_native_1.View style={previewStyles.cropEdgeBarRight}/>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<react_native_1.View style={previewStyles.cropCenterPill}>
|
|
139
|
+
<react_native_1.Text style={previewStyles.cropCenterPillText}>
|
|
140
|
+
{te.toUpperCase()} • {Math.round(i.width*100)}% × {Math.round(i.height*100)}%
|
|
141
|
+
</react_native_1.Text>
|
|
142
|
+
</react_native_1.View>
|
|
143
|
+
</react_native_1.View>
|
|
144
|
+
</react_native_1.View>}
|
|
145
|
+
</react_native_1.View>}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
{M&&<react_native_1.TouchableOpacity activeOpacity={.9}onPress={ke}style={previewStyles.centerPlayContainer}>
|
|
149
|
+
<react_native_1.View style={previewStyles.centerPlayGlow}/>
|
|
150
|
+
<react_native_1.View style={previewStyles.centerPlayCircle}>
|
|
151
|
+
<NetworkIcons_1.PlayIcon size={28}color={AppColors_1.AppColors.white}/>
|
|
152
|
+
</react_native_1.View>
|
|
153
|
+
<react_native_1.View style={previewStyles.centerPlayPill}>
|
|
154
|
+
<react_native_1.Text style={previewStyles.centerPlayText}>
|
|
155
|
+
{Fe?n("mediaGallery.playing","Playing Video..."):n("mediaGallery.playVideo","Play Video")}
|
|
156
|
+
</react_native_1.Text>
|
|
157
|
+
</react_native_1.View>
|
|
158
|
+
</react_native_1.TouchableOpacity>}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
{M&&<react_native_1.View style={previewStyles.topLeftBadgeOverlay}pointerEvents="none">
|
|
162
|
+
<react_native_1.View style={previewStyles.metaPill}>
|
|
163
|
+
<NetworkIcons_1.FilmIcon size={11}color={AppColors_1.AppColors.sky400}/>
|
|
164
|
+
<react_native_1.Text style={previewStyles.metaPillText}>
|
|
165
|
+
{lt||(V?`${V}s`:"VIDEO")}
|
|
166
|
+
</react_native_1.Text>
|
|
167
|
+
</react_native_1.View>
|
|
168
|
+
</react_native_1.View>}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
{x&&$>0&&<react_native_1.View style={previewStyles.topLeftBadgeOverlay}pointerEvents="none">
|
|
172
|
+
<react_native_1.View style={[previewStyles.metaPill,{backgroundColor:"rgba(99, 102, 241, 0.90)"}]}>
|
|
173
|
+
<NetworkIcons_1.RotateIcon size={11}color={AppColors_1.AppColors.white}/>
|
|
174
|
+
<react_native_1.Text style={previewStyles.metaPillText}>{$}°</react_native_1.Text>
|
|
175
|
+
</react_native_1.View>
|
|
176
|
+
</react_native_1.View>}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<react_native_1.TouchableOpacity activeOpacity={.8}onPress={se}style={previewStyles.bottomRightBadgeOverlay}>
|
|
79
180
|
<react_native_1.View style={previewStyles.metaPill}>
|
|
80
|
-
<NetworkIcons_1.
|
|
181
|
+
<NetworkIcons_1.CopyIcon size={10}color={AppColors_1.AppColors.sky400}/>
|
|
81
182
|
<react_native_1.Text style={previewStyles.metaPillText}>
|
|
82
|
-
{
|
|
183
|
+
{H&&W?`${H} \xD7 ${W} \u2022 `:""}
|
|
184
|
+
{(0,helpers_1.formatBytes)(_e)}
|
|
83
185
|
</react_native_1.Text>
|
|
84
186
|
</react_native_1.View>
|
|
85
|
-
</react_native_1.
|
|
187
|
+
</react_native_1.TouchableOpacity>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
{x&&<react_native_1.View style={previewStyles.floatingZoomBar}>
|
|
191
|
+
<TouchableScale_1.default onPress={qe}style={previewStyles.zoomBtn}accessibilityLabel="Zoom In">
|
|
192
|
+
<NetworkIcons_1.ZoomInIcon size={15}color={AppColors_1.AppColors.white}/>
|
|
193
|
+
</TouchableScale_1.default>
|
|
86
194
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
195
|
+
<react_native_1.TouchableOpacity onPress={Xe}activeOpacity={.8}style={previewStyles.zoomLevelBadge}>
|
|
196
|
+
<react_native_1.Text style={previewStyles.zoomLevelText}>
|
|
197
|
+
{Math.round(ue*100)}%
|
|
198
|
+
</react_native_1.Text>
|
|
199
|
+
</react_native_1.TouchableOpacity>
|
|
200
|
+
|
|
201
|
+
<TouchableScale_1.default onPress={Ue}style={previewStyles.zoomBtn}accessibilityLabel="Zoom Out">
|
|
202
|
+
<NetworkIcons_1.ZoomOutIcon size={15}color={AppColors_1.AppColors.white}/>
|
|
203
|
+
</TouchableScale_1.default>
|
|
204
|
+
</react_native_1.View>}
|
|
205
|
+
</react_native_1.View>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
{x&&l==="crop"&&<react_native_1.View style={previewStyles.cropSubToolBar}>
|
|
209
|
+
|
|
210
|
+
<react_native_1.View style={previewStyles.cropActionHeaderRow}>
|
|
211
|
+
<react_native_1.Text style={previewStyles.cropHeaderTitle}>Drag box or corners to crop</react_native_1.Text>
|
|
212
|
+
<react_native_1.View style={previewStyles.cropActionButtons}>
|
|
213
|
+
<react_native_1.TouchableOpacity onPress={()=>S("none")}style={previewStyles.cancelActionBtn}>
|
|
214
|
+
<react_native_1.Text style={previewStyles.cancelActionText}>Cancel</react_native_1.Text>
|
|
215
|
+
</react_native_1.TouchableOpacity>
|
|
216
|
+
<react_native_1.TouchableOpacity onPress={Qe}style={previewStyles.applyActionBtn}>
|
|
217
|
+
<react_native_1.Text style={previewStyles.applyActionText}>Apply Crop</react_native_1.Text>
|
|
218
|
+
</react_native_1.TouchableOpacity>
|
|
219
|
+
</react_native_1.View>
|
|
91
220
|
</react_native_1.View>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={previewStyles.subToolScroll}>
|
|
224
|
+
{["free","1:1","4:3","16:9","9:16","3:2"].map(e=><react_native_1.TouchableOpacity key={e}onPress={()=>Je(e)}style={[previewStyles.ratioChip,te===e&&previewStyles.ratioChipActive]}>
|
|
225
|
+
<react_native_1.Text style={[previewStyles.ratioChipText,te===e&&previewStyles.ratioChipTextActive]}>
|
|
226
|
+
{e.toUpperCase()}
|
|
227
|
+
</react_native_1.Text>
|
|
228
|
+
</react_native_1.TouchableOpacity>)}
|
|
229
|
+
</react_native_1.ScrollView>
|
|
230
|
+
</react_native_1.View>}
|
|
231
|
+
|
|
232
|
+
{x&&l==="resize"&&<react_native_1.View style={previewStyles.subToolBar}>
|
|
233
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={previewStyles.subToolScroll}>
|
|
234
|
+
{[{label:"75% HD",scale:.75},{label:"50% Half",scale:.5},{label:"25% Mini",scale:.25}].map(e=><react_native_1.TouchableOpacity key={e.label}onPress={()=>ot(e.scale)}style={previewStyles.ratioChip}>
|
|
235
|
+
<react_native_1.Text style={previewStyles.ratioChipText}>{e.label}</react_native_1.Text>
|
|
236
|
+
</react_native_1.TouchableOpacity>)}
|
|
237
|
+
<react_native_1.TouchableOpacity onPress={()=>S("none")}style={previewStyles.cancelActionBtn}>
|
|
238
|
+
<react_native_1.Text style={previewStyles.cancelActionText}>Done</react_native_1.Text>
|
|
239
|
+
</react_native_1.TouchableOpacity>
|
|
240
|
+
</react_native_1.ScrollView>
|
|
241
|
+
</react_native_1.View>}
|
|
242
|
+
|
|
243
|
+
{x&&l==="draw"&&<react_native_1.View style={previewStyles.subToolBar}>
|
|
244
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={previewStyles.subToolScroll}>
|
|
245
|
+
{COLOR_PALETTE.map(e=><react_native_1.TouchableOpacity key={e}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),ye(e)}}style={[previewStyles.colorDot,{backgroundColor:e},A===e&&previewStyles.colorDotActive]}/>)}
|
|
246
|
+
<react_native_1.View style={previewStyles.subDivider}/>
|
|
247
|
+
{[2,4,8].map(e=><react_native_1.TouchableOpacity key={e}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),De(e)}}style={[previewStyles.strokeWidthBtn,j===e&&previewStyles.strokeWidthBtnActive]}>
|
|
248
|
+
<react_native_1.View style={[previewStyles.strokeDot,{width:e+2,height:e+2,backgroundColor:A}]}/>
|
|
249
|
+
</react_native_1.TouchableOpacity>)}
|
|
250
|
+
<react_native_1.TouchableOpacity onPress={Ze}disabled={E.length===0}style={[previewStyles.actionPillBtn,E.length===0&&{opacity:.4}]}>
|
|
251
|
+
<NetworkIcons_1.UndoIcon size={13}color={AppColors_1.AppColors.white}/>
|
|
252
|
+
<react_native_1.Text style={previewStyles.actionPillText}>Undo</react_native_1.Text>
|
|
253
|
+
</react_native_1.TouchableOpacity>
|
|
254
|
+
<react_native_1.TouchableOpacity onPress={Ke}disabled={E.length===0}style={[previewStyles.actionPillBtn,E.length===0&&{opacity:.4}]}>
|
|
255
|
+
<react_native_1.Text style={previewStyles.actionPillText}>Clear</react_native_1.Text>
|
|
256
|
+
</react_native_1.TouchableOpacity>
|
|
257
|
+
</react_native_1.ScrollView>
|
|
258
|
+
</react_native_1.View>}
|
|
259
|
+
|
|
260
|
+
{x&&l==="shapes"&&<react_native_1.View style={previewStyles.subToolBar}>
|
|
261
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={previewStyles.subToolScroll}>
|
|
262
|
+
<react_native_1.TouchableOpacity onPress={()=>le("rect")}style={previewStyles.shapeOptionBtn}>
|
|
263
|
+
<NetworkIcons_1.RectangleIcon size={14}color={AppColors_1.AppColors.sky400}/>
|
|
264
|
+
<react_native_1.Text style={previewStyles.shapeOptionText}>Rectangle</react_native_1.Text>
|
|
265
|
+
</react_native_1.TouchableOpacity>
|
|
266
|
+
<react_native_1.TouchableOpacity onPress={()=>le("circle")}style={previewStyles.shapeOptionBtn}>
|
|
267
|
+
<NetworkIcons_1.CircleIconOutline size={14}color={AppColors_1.AppColors.amber400}/>
|
|
268
|
+
<react_native_1.Text style={previewStyles.shapeOptionText}>Circle</react_native_1.Text>
|
|
269
|
+
</react_native_1.TouchableOpacity>
|
|
270
|
+
<react_native_1.TouchableOpacity onPress={()=>le("ellipse")}style={previewStyles.shapeOptionBtn}>
|
|
271
|
+
<NetworkIcons_1.EllipseIconOutline size={14}color={AppColors_1.AppColors.violet600}/>
|
|
272
|
+
<react_native_1.Text style={previewStyles.shapeOptionText}>Ellipse</react_native_1.Text>
|
|
273
|
+
</react_native_1.TouchableOpacity>
|
|
274
|
+
<react_native_1.View style={previewStyles.subDivider}/>
|
|
275
|
+
{COLOR_PALETTE.slice(0,4).map(e=><react_native_1.TouchableOpacity key={e}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),ye(e)}}style={[previewStyles.colorDot,{backgroundColor:e},A===e&&previewStyles.colorDotActive]}/>)}
|
|
276
|
+
</react_native_1.ScrollView>
|
|
92
277
|
</react_native_1.View>}
|
|
93
278
|
|
|
94
279
|
|
|
95
|
-
<react_native_1.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</react_native_1.TouchableOpacity>
|
|
104
|
-
</react_native_1.TouchableOpacity>
|
|
105
|
-
</react_native_1.View>
|
|
280
|
+
<react_native_1.View style={previewStyles.bottomTesterDock}>
|
|
281
|
+
{x&&<>
|
|
282
|
+
<TouchableScale_1.default onPress={()=>S(l==="crop"?"none":"crop")}style={[previewStyles.dockToolBtn,l==="crop"&&previewStyles.dockToolBtnActive]}>
|
|
283
|
+
<NetworkIcons_1.CropIcon size={16}color={l==="crop"?AppColors_1.AppColors.white:AppColors_1.AppColors.sky400}/>
|
|
284
|
+
<react_native_1.Text style={[previewStyles.dockToolLabel,l==="crop"&&{color:AppColors_1.AppColors.white}]}>
|
|
285
|
+
Crop
|
|
286
|
+
</react_native_1.Text>
|
|
287
|
+
</TouchableScale_1.default>
|
|
106
288
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
289
|
+
<TouchableScale_1.default onPress={()=>S(l==="resize"?"none":"resize")}style={[previewStyles.dockToolBtn,l==="resize"&&previewStyles.dockToolBtnActive]}>
|
|
290
|
+
<NetworkIcons_1.ResizeIcon size={16}color={l==="resize"?AppColors_1.AppColors.white:AppColors_1.AppColors.emerald400}/>
|
|
291
|
+
<react_native_1.Text style={[previewStyles.dockToolLabel,l==="resize"&&{color:AppColors_1.AppColors.white}]}>
|
|
292
|
+
Resize
|
|
293
|
+
</react_native_1.Text>
|
|
294
|
+
</TouchableScale_1.default>
|
|
295
|
+
|
|
296
|
+
<TouchableScale_1.default onPress={()=>S(l==="draw"?"none":"draw")}style={[previewStyles.dockToolBtn,l==="draw"&&previewStyles.dockToolBtnActive]}>
|
|
297
|
+
<NetworkIcons_1.PenIcon size={16}color={l==="draw"?AppColors_1.AppColors.white:AppColors_1.AppColors.rose400}/>
|
|
298
|
+
<react_native_1.Text style={[previewStyles.dockToolLabel,l==="draw"&&{color:AppColors_1.AppColors.white}]}>
|
|
299
|
+
Draw
|
|
300
|
+
</react_native_1.Text>
|
|
301
|
+
</TouchableScale_1.default>
|
|
302
|
+
|
|
303
|
+
<TouchableScale_1.default onPress={()=>S(l==="shapes"?"none":"shapes")}style={[previewStyles.dockToolBtn,l==="shapes"&&previewStyles.dockToolBtnActive]}>
|
|
304
|
+
<NetworkIcons_1.ShapesIcon size={16}color={l==="shapes"?AppColors_1.AppColors.white:AppColors_1.AppColors.amber400}/>
|
|
305
|
+
<react_native_1.Text style={[previewStyles.dockToolLabel,l==="shapes"&&{color:AppColors_1.AppColors.white}]}>
|
|
306
|
+
Shapes
|
|
307
|
+
</react_native_1.Text>
|
|
308
|
+
</TouchableScale_1.default>
|
|
309
|
+
|
|
310
|
+
<TouchableScale_1.default onPress={()=>Se()}style={previewStyles.dockToolBtn}>
|
|
311
|
+
<NetworkIcons_1.TypeIcon size={16}color={AppColors_1.AppColors.indigo400}/>
|
|
312
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>Text</react_native_1.Text>
|
|
313
|
+
</TouchableScale_1.default>
|
|
314
|
+
|
|
315
|
+
<TouchableScale_1.default onPress={et}style={previewStyles.dockToolBtn}>
|
|
316
|
+
<NetworkIcons_1.BlurIcon size={16}color={AppColors_1.AppColors.sky300}/>
|
|
317
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>Blur</react_native_1.Text>
|
|
318
|
+
</TouchableScale_1.default>
|
|
319
|
+
|
|
320
|
+
<TouchableScale_1.default onPress={Ye}style={previewStyles.dockToolBtn}>
|
|
321
|
+
<NetworkIcons_1.RotateIcon size={16}color={AppColors_1.AppColors.violet600}/>
|
|
322
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>Rotate</react_native_1.Text>
|
|
323
|
+
</TouchableScale_1.default>
|
|
324
|
+
</>}
|
|
325
|
+
|
|
326
|
+
{M&&<>
|
|
327
|
+
<TouchableScale_1.default onPress={rt}disabled={P}style={previewStyles.dockToolBtn}>
|
|
328
|
+
<NetworkIcons_1.ScissorsIcon size={16}color={AppColors_1.AppColors.sky400}/>
|
|
329
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>{n("media.trim5s","Trim 5s")}</react_native_1.Text>
|
|
330
|
+
</TouchableScale_1.default>
|
|
331
|
+
|
|
332
|
+
<TouchableScale_1.default onPress={nt}disabled={P}style={previewStyles.dockToolBtn}>
|
|
333
|
+
<NetworkIcons_1.VolumeXIcon size={16}color={AppColors_1.AppColors.amber400}/>
|
|
334
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>{n("media.muteAudio","Mute Audio")}</react_native_1.Text>
|
|
335
|
+
</TouchableScale_1.default>
|
|
336
|
+
|
|
337
|
+
{y&&<TouchableScale_1.default onPress={Ae}disabled={de}style={previewStyles.dockToolBtn}>
|
|
338
|
+
<NetworkIcons_1.GifIcon size={16}color={AppColors_1.AppColors.violet600}/>
|
|
339
|
+
<react_native_1.Text style={previewStyles.dockToolLabel}>{n("media.toGif","To GIF")}</react_native_1.Text>
|
|
340
|
+
</TouchableScale_1.default>}
|
|
341
|
+
|
|
342
|
+
<TouchableScale_1.default onPress={ke}style={[previewStyles.dockToolBtn,previewStyles.dockPrimaryBtn]}>
|
|
343
|
+
<NetworkIcons_1.PlayIcon size={16}color={AppColors_1.AppColors.white}/>
|
|
344
|
+
<react_native_1.Text style={[previewStyles.dockToolLabel,{color:AppColors_1.AppColors.white}]}>{n("media.play","Play")}</react_native_1.Text>
|
|
345
|
+
</TouchableScale_1.default>
|
|
346
|
+
</>}
|
|
347
|
+
</react_native_1.View>
|
|
144
348
|
</react_native_1.View>
|
|
145
|
-
</react_native_1.
|
|
349
|
+
</react_native_1.SafeAreaView>
|
|
146
350
|
</react_native_1.View>
|
|
147
351
|
|
|
148
352
|
|
|
149
|
-
<
|
|
150
|
-
|
|
353
|
+
<react_native_1.Modal visible={Le}transparent={!0}animationType="fade"onRequestClose={()=>G(!1)}>
|
|
354
|
+
<react_native_1.View style={previewStyles.modalBackdrop}>
|
|
355
|
+
<react_native_1.View style={previewStyles.textModalCard}>
|
|
356
|
+
<react_native_1.Text style={previewStyles.textModalTitle}>Add Text Note / Callout</react_native_1.Text>
|
|
357
|
+
<react_native_1.TextInput style={previewStyles.textModalInput}placeholder="e.g. Defect: Button overlap"placeholderTextColor="rgba(255,255,255,0.4)"value={Y}onChangeText={Z}autoFocus={!0}multiline={!0}/>
|
|
358
|
+
<react_native_1.View style={previewStyles.textModalActions}>
|
|
359
|
+
<react_native_1.TouchableOpacity onPress={()=>G(!1)}style={previewStyles.modalCancelBtn}>
|
|
360
|
+
<react_native_1.Text style={previewStyles.modalCancelText}>Cancel</react_native_1.Text>
|
|
361
|
+
</react_native_1.TouchableOpacity>
|
|
362
|
+
<react_native_1.TouchableOpacity onPress={tt}style={previewStyles.modalConfirmBtn}>
|
|
363
|
+
<react_native_1.Text style={previewStyles.modalConfirmText}>Place Text</react_native_1.Text>
|
|
364
|
+
</react_native_1.TouchableOpacity>
|
|
365
|
+
</react_native_1.View>
|
|
366
|
+
</react_native_1.View>
|
|
367
|
+
</react_native_1.View>
|
|
368
|
+
</react_native_1.Modal>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
<ConfirmationModal_1.ConfirmationModal visible={Oe}title={n("mediaGallery.deleteTitle","Delete Media?")}message={n("mediaGallery.deleteMessage",{filename:o.filename})}confirmText={n("mediaGallery.delete","Delete")}cancelText={n("common.cancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{ee(!1),m(o),w()}}onCancel={()=>ee(!1)}/>
|
|
372
|
+
</react_native_1.Modal>};exports.MediaPreviewModal=MediaPreviewModal;const previewStyles=react_native_1.StyleSheet.create({overlay:{flex:1,backgroundColor:AppColors_1.AppColors.slate900},header:{width:"100%",zIndex:10,borderBottomWidth:react_native_1.StyleSheet.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.25)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:14,paddingTop:react_native_1.Platform.OS==="ios"?52:react_native_1.StatusBar.currentHeight?react_native_1.StatusBar.currentHeight+8:18,paddingBottom:12,minHeight:react_native_1.Platform.OS==="ios"?94:64},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},badge:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:3,borderRadius:5,backgroundColor:"rgba(255, 255, 255, 0.22)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.38)"},badgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,letterSpacing:.4,color:AppColors_1.AppColors.white},title:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:12.5,color:AppColors_1.AppColors.white,letterSpacing:-.1},subtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10.5,color:"rgba(255, 255, 255, 0.7)",marginTop:1},headerActionBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(255, 255, 255, 0.22)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.38)",alignItems:"center",justifyContent:"center"},headerDeleteBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(239, 68, 68, 0.35)",borderWidth:1,borderColor:"rgba(252, 165, 165, 0.55)",alignItems:"center",justifyContent:"center"},headerCloseBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(244, 63, 94, 0.28)",borderWidth:1,borderColor:"rgba(251, 113, 133, 0.48)",alignItems:"center",justifyContent:"center"},stageSafe:{flex:1,width:"100%"},stage:{flex:1,width:"100%",alignItems:"center",justifyContent:"center",padding:8},previewCard:{flex:1,width:"100%",borderRadius:14,overflow:"hidden",backgroundColor:"#090D1A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},image:{width:"100%",height:"100%"},videoImageOverlay:{...react_native_1.StyleSheet.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:AppColors_1.AppColors.slate900,alignItems:"center",justifyContent:"center",padding:24},videoFallbackGlow:{position:"absolute",width:150,height:150,borderRadius:75,backgroundColor:"rgba(56, 189, 248, 0.08)"},videoFallbackTitle:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:15,color:AppColors_1.AppColors.white,marginTop:12},videoFallbackSubtitle:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},centerPlayContainer:{position:"absolute",alignItems:"center",justifyContent:"center",gap:8},centerPlayGlow:{position:"absolute",width:80,height:80,borderRadius:40,backgroundColor:"rgba(56, 189, 248, 0.22)"},centerPlayCircle:{width:62,height:62,borderRadius:31,backgroundColor:AppColors_1.AppColors.sky500,alignItems:"center",justifyContent:"center",paddingLeft:3,shadowColor:AppColors_1.AppColors.sky500,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:8},centerPlayPill:{backgroundColor:"rgba(15, 23, 42, 0.90)",paddingHorizontal:12,paddingVertical:4,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)"},centerPlayText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.white,letterSpacing:.3},topLeftBadgeOverlay:{position:"absolute",top:12,left:12},bottomRightBadgeOverlay:{position:"absolute",bottom:12,right:12},metaPill:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"rgba(15, 23, 42, 0.90)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)"},metaPillText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:11,color:AppColors_1.AppColors.white,letterSpacing:.2},floatingZoomBar:{position:"absolute",right:12,top:"35%",backgroundColor:"rgba(15, 23, 42, 0.92)",borderRadius:20,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",paddingVertical:6,paddingHorizontal:4,alignItems:"center",gap:6,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:4},shadowOpacity:.45,shadowRadius:8,elevation:10},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:2},zoomLevelText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9.5,color:AppColors_1.AppColors.sky400,letterSpacing:.2},subToolBar:{width:"100%",backgroundColor:"rgba(15, 23, 42, 0.96)",borderRadius:12,paddingVertical:6,paddingHorizontal:8,marginTop:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},subToolScroll:{flexDirection:"row",alignItems:"center",gap:8},ratioChip:{paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.14)"},ratioChipActive:{backgroundColor:AppColors_1.AppColors.indigo600,borderColor:AppColors_1.AppColors.indigo400},ratioChipText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.8)"},ratioChipTextActive:{color:AppColors_1.AppColors.white,fontFamily:AppFonts_1.AppFonts.interBold},applyActionBtn:{backgroundColor:AppColors_1.AppColors.emerald600,paddingHorizontal:12,paddingVertical:5,borderRadius:8},applyActionText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11,color:AppColors_1.AppColors.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:10,paddingVertical:5,borderRadius:8},cancelActionText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.8)"},colorDot:{width:22,height:22,borderRadius:11,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:AppColors_1.AppColors.white,transform:[{scale:1.25}]},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.15)",marginHorizontal:4},strokeWidthBtn:{width:24,height:24,borderRadius:12,backgroundColor:"rgba(255, 255, 255, 0.08)",alignItems:"center",justifyContent:"center"},strokeWidthBtnActive:{backgroundColor:"rgba(255, 255, 255, 0.25)"},strokeDot:{borderRadius:99},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10,color:AppColors_1.AppColors.white},shapeOptionBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},shapeOptionText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.white},shapeItem:{position:"absolute",borderWidth:2.5,borderStyle:"solid"},shapeDeleteBadge:{position:"absolute",top:-8,right:-8,width:16,height:16,borderRadius:8,backgroundColor:AppColors_1.AppColors.rose500,alignItems:"center",justifyContent:"center"},blurItem:{position:"absolute",backgroundColor:"rgba(15, 23, 42, 0.95)",borderWidth:1.5,borderColor:"rgba(56, 189, 248, 0.7)",borderRadius:6,alignItems:"center",justifyContent:"center"},blurItemText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.sky300,letterSpacing:.6},textAnnotationPill:{position:"absolute",flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.35)",shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropSubToolBar:{width:"100%",backgroundColor:"rgba(15, 23, 42, 0.96)",borderRadius:12,paddingVertical:8,paddingHorizontal:10,marginTop:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},cropActionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:4,borderBottomWidth:react_native_1.StyleSheet.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},cropHeaderTitle:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.65)"},cropActionButtons:{flexDirection:"row",alignItems:"center",gap:8},cropOverlayMask:{...react_native_1.StyleSheet.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"dashed",borderColor:AppColors_1.AppColors.white,backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:4},cropGridH:{position:"absolute",left:0,right:0,height:1,borderTopWidth:1,borderStyle:"dashed",borderColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,borderLeftWidth:1,borderStyle:"dashed",borderColor:"rgba(255, 255, 255, 0.45)"},cropHandleTouchArea:{position:"absolute",width:38,height:38,alignItems:"center",justifyContent:"center",zIndex:10},handleAreaTL:{top:-19,left:-19},handleAreaTR:{top:-19,right:-19},handleAreaBL:{bottom:-19,left:-19},handleAreaBR:{bottom:-19,right:-19},cropCornerBracket:{position:"absolute",width:14,height:14,borderColor:AppColors_1.AppColors.white,backgroundColor:AppColors_1.AppColors.sky500,borderRadius:2,borderWidth:2,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:2},shadowOpacity:.6,shadowRadius:3,elevation:4},bracketTL:{top:-7,left:-7},bracketTR:{top:-7,right:-7},bracketBL:{bottom:-7,left:-7},bracketBR:{bottom:-7,right:-7},cropEdgeBarTop:{position:"absolute",top:-3,left:"35%",right:"35%",height:6,backgroundColor:AppColors_1.AppColors.white,borderRadius:3},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"35%",right:"35%",height:6,backgroundColor:AppColors_1.AppColors.white,borderRadius:3},cropEdgeBarLeft:{position:"absolute",left:-3,top:"35%",bottom:"35%",width:6,backgroundColor:AppColors_1.AppColors.white,borderRadius:3},cropEdgeBarRight:{position:"absolute",right:-3,top:"35%",bottom:"35%",width:6,backgroundColor:AppColors_1.AppColors.white,borderRadius:3},cropCenterPill:{position:"absolute",top:6,alignSelf:"center",backgroundColor:"rgba(14, 165, 233, 0.92)",paddingHorizontal:8,paddingVertical:2.5,borderRadius:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.25)"},cropCenterPillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.white,letterSpacing:.4},bottomTesterDock:{flexDirection:"row",alignItems:"center",justifyContent:"space-around",width:"100%",paddingVertical:10,paddingHorizontal:6,marginTop:6,backgroundColor:"rgba(15, 23, 42, 0.94)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.14)",gap:4},dockToolBtn:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:6,paddingHorizontal:2,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.06)",gap:3},dockToolBtnActive:{backgroundColor:AppColors_1.AppColors.indigo600,borderColor:AppColors_1.AppColors.indigo400,borderWidth:1},dockPrimaryBtn:{backgroundColor:AppColors_1.AppColors.indigo600},dockToolLabel:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:9.5,color:"rgba(255, 255, 255, 0.85)",letterSpacing:.1},modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",alignItems:"center",justifyContent:"center",padding:20},textModalCard:{width:"100%",maxWidth:360,backgroundColor:"#0F172A",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:16,gap:12},textModalTitle:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:14,color:AppColors_1.AppColors.white},textModalInput:{minHeight:80,backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:10,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",padding:12,fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:13,color:AppColors_1.AppColors.white,textAlignVertical:"top"},textModalActions:{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:10},modalCancelBtn:{paddingHorizontal:14,paddingVertical:8,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.1)"},modalCancelText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:AppColors_1.AppColors.indigo600},modalConfirmText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:12,color:AppColors_1.AppColors.white}});
|