react-native-inapp-inspector 2.5.0 → 2.5.2
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/README.ar.md +151 -53
- package/README.de.md +150 -52
- package/README.es.md +139 -42
- package/README.fr.md +151 -53
- package/README.hi.md +141 -43
- package/README.ja.md +150 -69
- package/README.ko.md +153 -55
- package/README.md +73 -14
- package/README.pt-BR.md +152 -54
- package/README.ru.md +153 -55
- package/README.zh-CN.md +95 -219
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +154 -9
- package/dist/commonjs/capture.d.ts +5 -2
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +12 -12
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +17 -17
- package/dist/commonjs/components/Inspector/InspectorHeader.js +41 -41
- package/dist/commonjs/components/Inspector/MainScreen.js +15 -15
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +52 -34
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +20 -18
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +744 -304
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +56 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.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.js +1 -1
- package/dist/commonjs/native/NativeInspector.d.ts +4 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/commonjs/types/interfaces.d.ts +2 -0
- package/dist/esm/capture.d.ts +5 -2
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/Inspector/FabLauncher.js +37 -37
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +30 -30
- package/dist/esm/components/Inspector/InspectorHeader.js +34 -34
- package/dist/esm/components/Inspector/MainScreen.js +51 -51
- package/dist/esm/components/Inspector/MediaGalleryTab.js +100 -82
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +20 -18
- package/dist/esm/components/Inspector/MediaPreviewModal.js +774 -334
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +256 -203
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.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.js +3 -3
- package/dist/esm/native/NativeInspector.d.ts +4 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
- package/dist/esm/types/interfaces.d.ts +2 -0
- package/ios/NetworkInspectorModule.mm +487 -224
- package/package.json +1 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +22 -0
- package/src/native/NativeNetworkInspector.ts +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,
|
|
2
|
-
`);(0,helpers_1.copyToClipboard)(o,`${e.length} Media URIs`),(0,toast_1.showToast)(`${e.length} file URIs copied to clipboard`)},
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,r,s,n){n===void 0&&(n=s);var l=Object.getOwnPropertyDescriptor(r,s);(!l||("get"in l?!r.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return r[s]}}),Object.defineProperty(t,n,l)}):(function(t,r,s,n){n===void 0&&(n=s),t[n]=r[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}):function(t,r){t.default=r}),__importStar=this&&this.__importStar||(function(){var t=function(r){return t=Object.getOwnPropertyNames||function(s){var n=[];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(n[n.length]=l);return n},t(r)};return function(r){if(r&&r.__esModule)return r;var s={};if(r!=null)for(var n=t(r),l=0;l<n.length;l++)n[l]!=="default"&&__createBinding(s,r,n[l]);return __setModuleDefault(s,r),s}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MediaGalleryTab=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),TouchableScale_1=__importDefault(require("../TouchableScale")),EmptyState_1=__importDefault(require("../EmptyState")),NetworkIcons_1=require("../NetworkIcons"),MediaPreviewModal_1=require("./MediaPreviewModal"),capture_1=require("../../capture"),helpers_1=require("../../helpers"),toast_1=require("../../helpers/toast"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),ConfirmationModal_1=require("./ConfirmationModal"),MediaGalleryTab=()=>{const{t}=(0,i18n_1.useTranslation)(),{refreshMediaCount:r,switchActiveTab:s,previewMediaItem:n,setPreviewMediaItem:l}=(0,InspectorContext_1.useInspector)(),[c,A]=(0,react_1.useState)([]),[V,v]=(0,react_1.useState)(!1),[d,z]=(0,react_1.useState)("all"),[p,b]=(0,react_1.useState)(new Set),[u,S]=(0,react_1.useState)("grid"),[C,m]=(0,react_1.useState)({visible:!1,title:"",message:"",onConfirm:()=>{}}),x=async()=>{try{const e=d==="image"?"image":d==="video"?"video":"any",o=await capture_1.ScreenCapture.pickMedia({mediaType:e});o&&(await h(),r?.().catch(()=>{}),(0,toast_1.showToast)(o.type==="video"?t("mediaGallery.importedVideo","Video imported from Camera Roll"):t("mediaGallery.importedPhoto","Photo imported from Camera Roll")),l(o))}catch{(0,toast_1.showToast)(t("mediaGallery.importFailed","Failed to import media"))}},h=(0,react_1.useCallback)(async()=>{try{const e=await capture_1.ScreenCapture.getMediaList();A(e),r?.().catch(()=>{})}catch{A([])}},[r]);(0,react_1.useEffect)(()=>{h()},[h]);const M=async()=>{v(!0),await h(),v(!1)},g=(0,react_1.useMemo)(()=>d==="all"?c:c.filter(e=>e.type===d),[c,d]),w=(0,react_1.useMemo)(()=>c.reduce((e,o)=>e+(o.sizeBytes||0),0),[c]),I=(0,react_1.useCallback)(e=>{b(o=>{const i=new Set(o);return i.has(e)?i.delete(e):i.add(e),i})},[]),B=async e=>{await capture_1.ScreenCapture.deleteMedia(e.uri),b(i=>{const a=new Set(i);return a.delete(e.id),a}),await h(),await r?.()===0&&s("apis"),(0,toast_1.showToast)(t("mediaGallery.deleted"))},k=e=>{e?.uri&&(0,helpers_1.copyImageOrMediaToClipboard)(e.uri,e.type==="image"?"Image":"Media")},R=()=>{const e=c.filter(i=>p.has(i.id));if(e.length===0)return;const o=e.map(i=>i.uri).join(`
|
|
2
|
+
`);(0,helpers_1.copyToClipboard)(o,`${e.length} Media URIs`),(0,toast_1.showToast)(`${e.length} file URIs copied to clipboard`)},G=async e=>{try{const o=e.uri.startsWith("file://")||e.uri.startsWith("content://")||e.uri.startsWith("http")?e.uri:`file://${e.uri}`;await react_native_1.Share.share({url:o,title:e.filename,message:e.filename})}catch{(0,toast_1.showToast)(t("mediaGallery.shareUnavailable","Sharing not available on this device"))}},O=async()=>{const e=c.filter(o=>p.has(o.id));if(e.length!==0)try{const o=e[0],i=o.uri.startsWith("file://")||o.uri.startsWith("content://")||o.uri.startsWith("http")?o.uri:`file://${o.uri}`;await react_native_1.Share.share({url:i,title:o.filename,message:e.length===1?o.filename:`${e.length} items: ${e.map(a=>a.filename).join(", ")}`})}catch{(0,toast_1.showToast)(t("mediaGallery.shareUnavailable","Sharing not available on this device"))}},D=()=>{const e=p.size;e!==0&&m({visible:!0,title:t("mediaGallery.deleteSelectedTitle","Delete Selected Media"),message:t("mediaGallery.deleteSelectedMessage",{count:e,defaultValue:`Are you sure you want to permanently delete ${e} media items?`}),confirmText:t("mediaGallery.delete","Delete"),cancelText:t("common.cancel","Cancel"),onConfirm:async()=>{m(a=>({...a,visible:!1}));const o=c.filter(a=>p.has(a.id));for(const a of o)await capture_1.ScreenCapture.deleteMedia(a.uri);b(new Set),await h(),await r?.()===0&&s("apis"),(0,toast_1.showToast)(t("mediaGallery.deletedCount",{count:o.length}))}})},F=()=>{m({visible:!0,title:t("mediaGallery.purgeTitle","Purge Gallery"),message:t("mediaGallery.purgeMessage",{count:c.length,size:(0,helpers_1.formatBytes)(w),defaultValue:`Are you sure you want to delete all ${c.length} media files (${(0,helpers_1.formatBytes)(w)})? This cannot be undone.`}),confirmText:t("common.clearAll","Clear All"),cancelText:t("common.cancel","Cancel"),onConfirm:async()=>{m(e=>({...e,visible:!1})),await capture_1.ScreenCapture.clearAllMedia(),b(new Set),await h(),await r?.(),s("apis"),(0,toast_1.showToast)(t("mediaGallery.allPurged"))}})},P=async e=>{await capture_1.ScreenCapture.convertToGif(e.uri,{fps:12,width:480})&&(await h(),r?.().catch(()=>{}))},W=(e,o)=>{const i=o?AppColors_1.AppColors.sky400:AppColors_1.AppColors.slate400,a=12;switch(e){case"all":return<NetworkIcons_1.ScreencastIcon size={a}color={i}/>;case"image":return<NetworkIcons_1.ImageIcon size={a}color={i}/>;case"video":return<NetworkIcons_1.FilmIcon size={a}color={i}/>;case"gif":return<NetworkIcons_1.GifIcon size={a}color={i}/>}},$=({item:e})=>{if(!e)return null;const o=e.type==="video",i=e.type==="gif",a=o&&e.thumbnailUri||e.uri,y=!!(e.id&&p.has(e.id)),T=(e.format||(o?"mp4":i?"gif":"png")).toUpperCase(),_=e.filename||(e.uri?e.uri.split("/").pop():"")||"Capture",f=e.timestamp?new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"";return<TouchableScale_1.default onPress={()=>l(e)}style={[galleryStyles.card,y&&galleryStyles.cardSelected]}>
|
|
3
3
|
<react_native_1.View style={galleryStyles.thumbnailContainer}>
|
|
4
4
|
{a?<react_native_1.Image source={{uri:a}}style={galleryStyles.thumbnail}resizeMode="cover"/>:<react_native_1.View style={galleryStyles.thumbnailFallback}>
|
|
5
5
|
{o?<NetworkIcons_1.FilmIcon size={26}color={AppColors_1.AppColors.sky400}/>:<NetworkIcons_1.ImageIcon size={26}color={AppColors_1.AppColors.slate400}/>}
|
|
6
6
|
</react_native_1.View>}
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
<react_native_1.TouchableOpacity onPress={()=>e.id&&
|
|
10
|
-
{
|
|
9
|
+
<react_native_1.TouchableOpacity onPress={()=>e.id&&I(e.id)}style={[galleryStyles.checkbox,y&&galleryStyles.checkboxSelected]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
10
|
+
{y&&<NetworkIcons_1.CheckIcon size={12}color={AppColors_1.AppColors.white}/>}
|
|
11
11
|
</react_native_1.TouchableOpacity>
|
|
12
12
|
|
|
13
13
|
{o&&<react_native_1.View style={galleryStyles.miniPlayCircle}>
|
|
14
14
|
<NetworkIcons_1.PlayIcon size={14}color={AppColors_1.AppColors.white}/>
|
|
15
15
|
</react_native_1.View>}
|
|
16
16
|
<react_native_1.View style={galleryStyles.typeBadge}>
|
|
17
|
-
{o?<NetworkIcons_1.FilmIcon size={11}color={AppColors_1.AppColors.sky400}/>:
|
|
17
|
+
{o?<NetworkIcons_1.FilmIcon size={11}color={AppColors_1.AppColors.sky400}/>:i?<NetworkIcons_1.GifIcon size={11}color={AppColors_1.AppColors.warningAmber}/>:<NetworkIcons_1.ImageIcon size={11}color={AppColors_1.AppColors.emerald500}/>}
|
|
18
18
|
<react_native_1.Text style={galleryStyles.typeBadgeText}>
|
|
19
19
|
{T}
|
|
20
20
|
</react_native_1.Text>
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
</react_native_1.Text>
|
|
38
38
|
</>:null}
|
|
39
39
|
</react_native_1.View>
|
|
40
|
-
<react_native_1.TouchableOpacity onPress={()=>
|
|
40
|
+
<react_native_1.TouchableOpacity onPress={()=>k(e)}style={galleryStyles.gridCopyBtn}hitSlop={{top:6,bottom:6,left:6,right:6}}>
|
|
41
41
|
<NetworkIcons_1.CopyIcon size={11}color={AppColors_1.AppColors.slate400}/>
|
|
42
42
|
</react_native_1.TouchableOpacity>
|
|
43
43
|
</react_native_1.View>
|
|
44
44
|
</react_native_1.View>
|
|
45
|
-
</TouchableScale_1.default>}
|
|
45
|
+
</TouchableScale_1.default>},L=({item:e})=>{if(!e)return null;const o=e.type==="video",i=e.type==="gif",a=o&&e.thumbnailUri||e.uri,y=!!(e.id&&p.has(e.id)),T=(e.format||(o?"mp4":i?"gif":"png")).toUpperCase(),_=e.filename||(e.uri?e.uri.split("/").pop():"")||"Capture",f=e.timestamp?`${new Date(e.timestamp).toLocaleDateString([],{month:"short",day:"numeric"})} ${new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:"";return<TouchableScale_1.default onPress={()=>l(e)}style={[galleryStyles.listRow,y&&galleryStyles.listRowSelected]}>
|
|
46
46
|
|
|
47
|
-
<react_native_1.TouchableOpacity onPress={()=>e.id&&
|
|
48
|
-
{
|
|
47
|
+
<react_native_1.TouchableOpacity onPress={()=>e.id&&I(e.id)}style={[galleryStyles.listCheckbox,y&&galleryStyles.checkboxSelected]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
48
|
+
{y&&<NetworkIcons_1.CheckIcon size={12}color={AppColors_1.AppColors.white}/>}
|
|
49
49
|
</react_native_1.TouchableOpacity>
|
|
50
50
|
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</react_native_1.Text>
|
|
66
66
|
<react_native_1.View style={galleryStyles.listMetaRow}>
|
|
67
67
|
<react_native_1.View style={galleryStyles.listBadge}>
|
|
68
|
-
{o?<NetworkIcons_1.FilmIcon size={10}color={AppColors_1.AppColors.sky400}/>:
|
|
68
|
+
{o?<NetworkIcons_1.FilmIcon size={10}color={AppColors_1.AppColors.sky400}/>:i?<NetworkIcons_1.GifIcon size={10}color={AppColors_1.AppColors.warningAmber}/>:<NetworkIcons_1.ImageIcon size={10}color={AppColors_1.AppColors.emerald500}/>}
|
|
69
69
|
<react_native_1.Text style={galleryStyles.listBadgeText}>
|
|
70
70
|
{T}
|
|
71
71
|
</react_native_1.Text>
|
|
@@ -84,15 +84,15 @@
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
<react_native_1.View style={galleryStyles.listActionsRow}>
|
|
87
|
-
<react_native_1.TouchableOpacity onPress={()=>
|
|
87
|
+
<react_native_1.TouchableOpacity onPress={()=>k(e)}style={galleryStyles.listCopyBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
88
88
|
<NetworkIcons_1.CopyIcon size={13}color={AppColors_1.AppColors.slate200}/>
|
|
89
89
|
</react_native_1.TouchableOpacity>
|
|
90
90
|
|
|
91
|
-
<react_native_1.TouchableOpacity onPress={()=>
|
|
91
|
+
<react_native_1.TouchableOpacity onPress={()=>G(e)}style={galleryStyles.listShareBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
92
92
|
<NetworkIcons_1.ShareIcon size={13}color={AppColors_1.AppColors.sky400}/>
|
|
93
93
|
</react_native_1.TouchableOpacity>
|
|
94
94
|
|
|
95
|
-
<react_native_1.TouchableOpacity onPress={()=>
|
|
95
|
+
<react_native_1.TouchableOpacity onPress={()=>B(e)}style={galleryStyles.listDeleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
96
96
|
<NetworkIcons_1.TrashIcon size={13}color={AppColors_1.AppColors.red500}/>
|
|
97
97
|
</react_native_1.TouchableOpacity>
|
|
98
98
|
</react_native_1.View>
|
|
@@ -100,58 +100,68 @@
|
|
|
100
100
|
|
|
101
101
|
<react_native_1.View style={galleryStyles.filterBar}>
|
|
102
102
|
<react_native_1.View style={galleryStyles.chipGroup}>
|
|
103
|
-
{["all","image","video","gif"].map(e=>{const o=
|
|
103
|
+
{["all","image","video","gif"].map(e=>{const o=d===e,i=e==="all"?t("mediaGallery.all",{count:c.length}):t(e==="image"?"mediaGallery.photos":e==="video"?"mediaGallery.videos":"mediaGallery.gifs");return<react_native_1.TouchableOpacity key={e}onPress={()=>z(e)}style={[galleryStyles.chip,o&&galleryStyles.chipActive]}>
|
|
104
104
|
{W(e,o)}
|
|
105
105
|
<react_native_1.Text style={[galleryStyles.chipText,o&&galleryStyles.chipTextActive]}>
|
|
106
|
-
{
|
|
106
|
+
{i}
|
|
107
107
|
</react_native_1.Text>
|
|
108
108
|
</react_native_1.TouchableOpacity>})}
|
|
109
109
|
</react_native_1.View>
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
<react_native_1.View style={galleryStyles.
|
|
113
|
-
<react_native_1.TouchableOpacity onPress={
|
|
114
|
-
<NetworkIcons_1.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
<react_native_1.View style={galleryStyles.rightControls}>
|
|
113
|
+
<react_native_1.TouchableOpacity onPress={x}style={galleryStyles.importBtn}accessibilityLabel="Open Camera Roll"hitSlop={{top:6,bottom:6,left:6,right:6}}>
|
|
114
|
+
<NetworkIcons_1.CameraRollIcon size={12}color={AppColors_1.AppColors.sky400}/>
|
|
115
|
+
<react_native_1.Text style={galleryStyles.importBtnText}>
|
|
116
|
+
{d==="image"?"Photos":d==="video"?"Videos":"Import"}
|
|
117
|
+
</react_native_1.Text>
|
|
118
118
|
</react_native_1.TouchableOpacity>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<react_native_1.View style={galleryStyles.viewToggleContainer}>
|
|
122
|
+
<react_native_1.TouchableOpacity onPress={()=>S("grid")}style={[galleryStyles.viewToggleBtn,u==="grid"&&galleryStyles.viewToggleBtnActive]}>
|
|
123
|
+
<NetworkIcons_1.GridIcon size={13}color={u==="grid"?AppColors_1.AppColors.white:AppColors_1.AppColors.slate400}/>
|
|
124
|
+
</react_native_1.TouchableOpacity>
|
|
125
|
+
<react_native_1.TouchableOpacity onPress={()=>S("list")}style={[galleryStyles.viewToggleBtn,u==="list"&&galleryStyles.viewToggleBtnActive]}>
|
|
126
|
+
<NetworkIcons_1.ListIcon size={13}color={u==="list"?AppColors_1.AppColors.white:AppColors_1.AppColors.slate400}/>
|
|
127
|
+
</react_native_1.TouchableOpacity>
|
|
128
|
+
</react_native_1.View>
|
|
119
129
|
</react_native_1.View>
|
|
120
130
|
</react_native_1.View>
|
|
121
131
|
|
|
122
132
|
|
|
123
|
-
{
|
|
133
|
+
{c.length>0&&<react_native_1.View style={galleryStyles.subBar}>
|
|
124
134
|
<react_native_1.View style={galleryStyles.resultCountWrapper}>
|
|
125
|
-
<react_native_1.Text style={[galleryStyles.resultCountText,
|
|
126
|
-
{
|
|
135
|
+
<react_native_1.Text style={[galleryStyles.resultCountText,p.size>0&&galleryStyles.resultCountTextSelected]}>
|
|
136
|
+
{p.size>0?t("mediaGallery.selectedOfResults",{selected:p.size,total:g.length,defaultValue:`Selected ${p.size} of ${g.length} results`}):g.length!==c.length?t("mediaGallery.showingFilteredResults",{count:g.length,total:c.length,defaultValue:`Showing ${g.length} of ${c.length} results`}):t("mediaGallery.showingResults",{count:g.length,defaultValue:`Showing ${g.length} results`})}
|
|
127
137
|
</react_native_1.Text>
|
|
128
138
|
</react_native_1.View>
|
|
129
139
|
|
|
130
140
|
<react_native_1.View style={galleryStyles.actionsGroup}>
|
|
131
|
-
{
|
|
132
|
-
<react_native_1.TouchableOpacity onPress={
|
|
141
|
+
{p.size>0&&<>
|
|
142
|
+
<react_native_1.TouchableOpacity onPress={R}style={galleryStyles.copySelectedBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
133
143
|
<NetworkIcons_1.CopyIcon size={12}color={AppColors_1.AppColors.slate200}/>
|
|
134
144
|
<react_native_1.Text style={galleryStyles.copySelectedBtnText}>
|
|
135
145
|
{t("mediaGallery.copyUri","Copy URI")}
|
|
136
146
|
</react_native_1.Text>
|
|
137
147
|
</react_native_1.TouchableOpacity>
|
|
138
148
|
|
|
139
|
-
<react_native_1.TouchableOpacity onPress={
|
|
149
|
+
<react_native_1.TouchableOpacity onPress={O}style={galleryStyles.shareSelectedBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
140
150
|
<NetworkIcons_1.ShareIcon size={12}color={AppColors_1.AppColors.sky400}/>
|
|
141
151
|
<react_native_1.Text style={galleryStyles.shareSelectedBtnText}>
|
|
142
152
|
{t("mediaGallery.share","Share")}
|
|
143
153
|
</react_native_1.Text>
|
|
144
154
|
</react_native_1.TouchableOpacity>
|
|
145
155
|
|
|
146
|
-
<react_native_1.TouchableOpacity onPress={
|
|
156
|
+
<react_native_1.TouchableOpacity onPress={D}style={galleryStyles.deleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
147
157
|
<NetworkIcons_1.TrashIcon size={13}color={AppColors_1.AppColors.red500}/>
|
|
148
158
|
<react_native_1.Text style={galleryStyles.deleteBtnText}>
|
|
149
|
-
{t("mediaGallery.deleteSelected",{count:
|
|
159
|
+
{t("mediaGallery.deleteSelected",{count:p.size})}
|
|
150
160
|
</react_native_1.Text>
|
|
151
161
|
</react_native_1.TouchableOpacity>
|
|
152
162
|
</>}
|
|
153
163
|
|
|
154
|
-
<react_native_1.TouchableOpacity onPress={
|
|
164
|
+
<react_native_1.TouchableOpacity onPress={F}style={galleryStyles.clearBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
155
165
|
<NetworkIcons_1.TrashIcon size={13}color={AppColors_1.AppColors.red500}/>
|
|
156
166
|
<react_native_1.Text style={galleryStyles.clearBtnText}>
|
|
157
167
|
{t("mediaGallery.purge",{size:(0,helpers_1.formatBytes)(w)})}
|
|
@@ -161,10 +171,18 @@
|
|
|
161
171
|
</react_native_1.View>}
|
|
162
172
|
|
|
163
173
|
|
|
164
|
-
<react_native_1.FlatList key={
|
|
174
|
+
<react_native_1.FlatList key={u}data={g}keyExtractor={e=>e.id}renderItem={u==="grid"?$:L}numColumns={u==="grid"?2:1}columnWrapperStyle={u==="grid"?galleryStyles.columnWrapper:void 0}style={{flex:1}}contentContainerStyle={[galleryStyles.listContent,{flexGrow:1}]}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"refreshControl={<react_native_1.RefreshControl refreshing={V}onRefresh={M}tintColor={AppColors_1.AppColors.sky400}/>}ListEmptyComponent={<react_native_1.View style={galleryStyles.emptyContainer}>
|
|
175
|
+
<EmptyState_1.default customTitle={d==="image"?"No Photos Found":d==="video"?"No Videos Found":t("mediaGallery.noMediaTitle")}customSub={d==="image"?"Take a screenshot or import photos from Camera Roll.":d==="video"?"Record a video or import videos from Camera Roll.":t("mediaGallery.noMediaDesc")}showReload={!1}/>
|
|
176
|
+
<react_native_1.TouchableOpacity onPress={x}style={galleryStyles.emptyImportBtn}activeOpacity={.8}>
|
|
177
|
+
<NetworkIcons_1.CameraRollIcon size={14}color={AppColors_1.AppColors.white}/>
|
|
178
|
+
<react_native_1.Text style={galleryStyles.emptyImportBtnText}>
|
|
179
|
+
{d==="image"?t("mediaGallery.importPhotos","Import Photos from Camera Roll"):d==="video"?t("mediaGallery.importVideos","Import Videos from Camera Roll"):t("mediaGallery.openCameraRoll","Open Camera Roll")}
|
|
180
|
+
</react_native_1.Text>
|
|
181
|
+
</react_native_1.TouchableOpacity>
|
|
182
|
+
</react_native_1.View>}/>
|
|
165
183
|
|
|
166
184
|
|
|
167
|
-
<MediaPreviewModal_1.MediaPreviewModal item={
|
|
185
|
+
<MediaPreviewModal_1.MediaPreviewModal item={n}visible={!!n}onClose={()=>l(null)}onDelete={B}onConvertToGif={P}/>
|
|
168
186
|
|
|
169
|
-
<ConfirmationModal_1.ConfirmationModal visible={
|
|
170
|
-
</react_native_1.View>};exports.MediaGalleryTab=MediaGalleryTab;const{width:WINDOW_WIDTH}=react_native_1.Dimensions.get("window"),CARD_WIDTH=(WINDOW_WIDTH-36)/2,galleryStyles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.slate850},filterBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:9,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.borderGlassLight,gap:8},chipGroup:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},chip:{flexDirection:"row",alignItems:"center",gap:4.5,paddingHorizontal:8,paddingVertical:4.5,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha06,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha10},chipActive:{backgroundColor:`${AppColors_1.AppColors.sky400}2E`,borderColor:AppColors_1.AppColors.sky400},chipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.slate400},chipTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.sky400},subBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:7,backgroundColor:`${AppColors_1.AppColors.slate900}99`,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.borderGlassLight,gap:8},resultCountWrapper:{flexDirection:"row",alignItems:"center",flexShrink:1},resultCountText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.slate400},resultCountTextSelected:{fontFamily:AppFonts_1.AppFonts.interSemiBold,color:AppColors_1.AppColors.sky400},actionsGroup:{flexDirection:"row",alignItems:"center",gap:6},viewToggleContainer:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.whiteAlpha06,borderRadius:6,padding:2,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha10},viewToggleBtn:{paddingHorizontal:7,paddingVertical:4,borderRadius:4,alignItems:"center",justifyContent:"center"},viewToggleBtnActive:{backgroundColor:`${AppColors_1.AppColors.violet600}80`},deleteBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}26`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}80`},deleteBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.red500},clearBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}1F`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}4D`},clearBtnText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,color:AppColors_1.AppColors.red500},listContent:{padding:12,gap:10},columnWrapper:{gap:12},card:{width:CARD_WIDTH,backgroundColor:AppColors_1.AppColors.slate800,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassLight,overflow:"hidden"},cardSelected:{borderColor:AppColors_1.AppColors.violet600,borderWidth:1.5},thumbnailContainer:{width:"100%",height:110,backgroundColor:AppColors_1.AppColors.slate850,position:"relative"},thumbnail:{width:"100%",height:"100%"},thumbnailFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.slate900},checkbox:{position:"absolute",top:6,left:6,width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center",zIndex:10},checkboxSelected:{backgroundColor:AppColors_1.AppColors.violet600,borderColor:AppColors_1.AppColors.violet600},miniPlayCircle:{position:"absolute",top:"50%",left:"50%",width:32,height:32,marginTop:-16,marginLeft:-16,borderRadius:16,backgroundColor:`${AppColors_1.AppColors.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:2,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},typeBadge:{position:"absolute",top:6,right:6,flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.badgeGlassDark,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassMedium},typeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.slate200},cardInfo:{padding:8,gap:3},cardTitle:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.white},cardMetaRow:{flexDirection:"row",alignItems:"center",gap:4},cardMeta:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.slate400},cardMetaDot:{fontSize:10,color:AppColors_1.AppColors.whiteAlpha30},listRow:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.slate800,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassLight,padding:8,gap:10},listRowSelected:{borderColor:AppColors_1.AppColors.violet600,borderWidth:1.5,backgroundColor:`${AppColors_1.AppColors.violet600}14`},listCheckbox:{width:20,height:20,borderRadius:4,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center"},listThumbContainer:{width:46,height:46,borderRadius:6,backgroundColor:AppColors_1.AppColors.slate850,overflow:"hidden",position:"relative"},listThumb:{width:"100%",height:"100%"},listThumbFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.slate900},listMiniPlay:{position:"absolute",top:"50%",left:"50%",width:20,height:20,marginTop:-10,marginLeft:-10,borderRadius:10,backgroundColor:`${AppColors_1.AppColors.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:1},listInfo:{flex:1,gap:4,minWidth:0},listTitle:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.white},listMetaRow:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"},listBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.badgeGlassDark,paddingHorizontal:4,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassMedium},listBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.slate200},gridCopyBtn:{padding:3,borderRadius:4,backgroundColor:AppColors_1.AppColors.whiteAlpha08},listActionsRow:{flexDirection:"row",alignItems:"center",gap:6},listCopyBtn:{padding:6,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha10,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha15},listShareBtn:{padding:6,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.sky400}18`,borderWidth:1,borderColor:`${AppColors_1.AppColors.sky400}40`},listDeleteBtn:{padding:6,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}33`},copySelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha10,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha20},copySelectedBtnText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.slate200},shareSelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.sky400}20`,borderWidth:1,borderColor:`${AppColors_1.AppColors.sky400}60`},shareSelectedBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.sky400}});
|
|
187
|
+
<ConfirmationModal_1.ConfirmationModal visible={C.visible}title={C.title}message={C.message}confirmText={C.confirmText}cancelText={C.cancelText}isDestructive={!0}icon="trash"onConfirm={C.onConfirm}onCancel={()=>m(e=>({...e,visible:!1}))}/>
|
|
188
|
+
</react_native_1.View>};exports.MediaGalleryTab=MediaGalleryTab;const{width:WINDOW_WIDTH}=react_native_1.Dimensions.get("window"),CARD_WIDTH=(WINDOW_WIDTH-36)/2,galleryStyles=react_native_1.StyleSheet.create({container:{flex:1,backgroundColor:AppColors_1.AppColors.slate850},filterBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:9,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.borderGlassLight,gap:8},chipGroup:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},chip:{flexDirection:"row",alignItems:"center",gap:4.5,paddingHorizontal:8,paddingVertical:4.5,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha06,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha10},chipActive:{backgroundColor:`${AppColors_1.AppColors.sky400}2E`,borderColor:AppColors_1.AppColors.sky400},chipText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.slate400},chipTextActive:{fontFamily:AppFonts_1.AppFonts.interBold,color:AppColors_1.AppColors.sky400},subBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:7,backgroundColor:`${AppColors_1.AppColors.slate900}99`,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.borderGlassLight,gap:8},resultCountWrapper:{flexDirection:"row",alignItems:"center",flexShrink:1},resultCountText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11,color:AppColors_1.AppColors.slate400},resultCountTextSelected:{fontFamily:AppFonts_1.AppFonts.interSemiBold,color:AppColors_1.AppColors.sky400},actionsGroup:{flexDirection:"row",alignItems:"center",gap:6},rightControls:{flexDirection:"row",alignItems:"center",gap:6},importBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${AppColors_1.AppColors.sky500}1F`,borderColor:`${AppColors_1.AppColors.sky400}44`,borderWidth:1,paddingHorizontal:8,paddingVertical:4.5,borderRadius:6},importBtnText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:11,color:AppColors_1.AppColors.sky400},emptyContainer:{alignItems:"center",justifyContent:"center",paddingVertical:36},emptyImportBtn:{flexDirection:"row",alignItems:"center",gap:7,backgroundColor:AppColors_1.AppColors.sky500,paddingHorizontal:16,paddingVertical:10,borderRadius:8,marginTop:18,shadowColor:AppColors_1.AppColors.sky500,shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:6,elevation:3},emptyImportBtnText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:13,color:AppColors_1.AppColors.white},viewToggleContainer:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.whiteAlpha06,borderRadius:6,padding:2,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha10},viewToggleBtn:{paddingHorizontal:7,paddingVertical:4,borderRadius:4,alignItems:"center",justifyContent:"center"},viewToggleBtnActive:{backgroundColor:`${AppColors_1.AppColors.violet600}80`},deleteBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}26`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}80`},deleteBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.red500},clearBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}1F`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}4D`},clearBtnText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:10.5,color:AppColors_1.AppColors.red500},listContent:{padding:12,gap:10},columnWrapper:{gap:12},card:{width:CARD_WIDTH,backgroundColor:AppColors_1.AppColors.slate800,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassLight,overflow:"hidden"},cardSelected:{borderColor:AppColors_1.AppColors.violet600,borderWidth:1.5},thumbnailContainer:{width:"100%",height:110,backgroundColor:AppColors_1.AppColors.slate850,position:"relative"},thumbnail:{width:"100%",height:"100%"},thumbnailFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.slate900},checkbox:{position:"absolute",top:6,left:6,width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center",zIndex:10},checkboxSelected:{backgroundColor:AppColors_1.AppColors.violet600,borderColor:AppColors_1.AppColors.violet600},miniPlayCircle:{position:"absolute",top:"50%",left:"50%",width:32,height:32,marginTop:-16,marginLeft:-16,borderRadius:16,backgroundColor:`${AppColors_1.AppColors.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:2,shadowColor:AppColors_1.AppColors.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},typeBadge:{position:"absolute",top:6,right:6,flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.badgeGlassDark,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassMedium},typeBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9,color:AppColors_1.AppColors.slate200},cardInfo:{padding:8,gap:3},cardTitle:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:11.5,color:AppColors_1.AppColors.white},cardMetaRow:{flexDirection:"row",alignItems:"center",gap:4},cardMeta:{fontFamily:AppFonts_1.AppFonts.interRegular,fontSize:10,color:AppColors_1.AppColors.slate400},cardMetaDot:{fontSize:10,color:AppColors_1.AppColors.whiteAlpha30},listRow:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.slate800,borderRadius:8,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassLight,padding:8,gap:10},listRowSelected:{borderColor:AppColors_1.AppColors.violet600,borderWidth:1.5,backgroundColor:`${AppColors_1.AppColors.violet600}14`},listCheckbox:{width:20,height:20,borderRadius:4,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center"},listThumbContainer:{width:46,height:46,borderRadius:6,backgroundColor:AppColors_1.AppColors.slate850,overflow:"hidden",position:"relative"},listThumb:{width:"100%",height:"100%"},listThumbFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:AppColors_1.AppColors.slate900},listMiniPlay:{position:"absolute",top:"50%",left:"50%",width:20,height:20,marginTop:-10,marginLeft:-10,borderRadius:10,backgroundColor:`${AppColors_1.AppColors.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:1},listInfo:{flex:1,gap:4,minWidth:0},listTitle:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.white},listMetaRow:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"},listBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:AppColors_1.AppColors.badgeGlassDark,paddingHorizontal:4,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:AppColors_1.AppColors.borderGlassMedium},listBadgeText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:8.5,color:AppColors_1.AppColors.slate200},gridCopyBtn:{padding:3,borderRadius:4,backgroundColor:AppColors_1.AppColors.whiteAlpha08},listActionsRow:{flexDirection:"row",alignItems:"center",gap:6},listCopyBtn:{padding:6,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha10,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha15},listShareBtn:{padding:6,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.sky400}18`,borderWidth:1,borderColor:`${AppColors_1.AppColors.sky400}40`},listDeleteBtn:{padding:6,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.red500}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.red500}33`},copySelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:AppColors_1.AppColors.whiteAlpha10,borderWidth:1,borderColor:AppColors_1.AppColors.whiteAlpha20},copySelectedBtnText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.slate200},shareSelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${AppColors_1.AppColors.sky400}20`,borderWidth:1,borderColor:`${AppColors_1.AppColors.sky400}60`},shareSelectedBtnText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.sky400}});
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CapturedMediaItem } from '../../capture';
|
|
3
|
-
export type EditorTool = 'none' | 'crop' | '
|
|
4
|
-
export type
|
|
3
|
+
export type EditorTool = 'none' | 'crop' | 'adjust' | 'draw' | 'text' | 'resize' | 'preview' | 'trim' | 'audio' | 'speed' | 'gif' | 'snapshot';
|
|
4
|
+
export type DrawModeOption = 'brush' | 'highlighter' | 'arrow' | 'rect' | 'circle' | 'spotlight' | 'step' | 'redact' | 'pixelate';
|
|
5
|
+
export type AdjustModeOption = 'brightness' | 'contrast' | 'saturation' | 'warmth' | 'exposure' | 'vignette';
|
|
6
|
+
export type PhotoFilterPreset = 'none' | 'vibrant' | 'mono' | 'sepia' | 'vintage' | 'noir' | 'cool' | 'warm' | 'fade';
|
|
7
|
+
export interface ImageAdjustments {
|
|
8
|
+
brightness: number;
|
|
9
|
+
contrast: number;
|
|
10
|
+
saturation: number;
|
|
11
|
+
warmth: number;
|
|
12
|
+
exposure: number;
|
|
13
|
+
vignette: number;
|
|
14
|
+
}
|
|
5
15
|
export type AspectRatioOption = 'free' | '1:1' | '4:3' | '16:9' | '9:16' | '3:2';
|
|
6
16
|
export interface InkStroke {
|
|
7
17
|
id: string;
|
|
18
|
+
type: DrawModeOption;
|
|
8
19
|
points: Array<{
|
|
9
20
|
x: number;
|
|
10
21
|
y: number;
|
|
11
22
|
}>;
|
|
12
23
|
color: string;
|
|
13
24
|
strokeWidth: number;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
height: number;
|
|
22
|
-
color: string;
|
|
25
|
+
rect?: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
stepNumber?: number;
|
|
23
32
|
}
|
|
24
33
|
export interface TextItem {
|
|
25
34
|
id: string;
|
|
@@ -29,13 +38,6 @@ export interface TextItem {
|
|
|
29
38
|
color: string;
|
|
30
39
|
bgColor: string;
|
|
31
40
|
}
|
|
32
|
-
export interface BlurBox {
|
|
33
|
-
id: string;
|
|
34
|
-
x: number;
|
|
35
|
-
y: number;
|
|
36
|
-
width: number;
|
|
37
|
-
height: number;
|
|
38
|
-
}
|
|
39
41
|
interface MediaPreviewModalProps {
|
|
40
42
|
item: CapturedMediaItem | null;
|
|
41
43
|
visible: boolean;
|