react-native-inapp-inspector 2.3.25 → 2.4.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/README.md +26 -5
- package/dist/commonjs/components/AnalyticsDetail.js +9 -6
- package/dist/commonjs/components/AppHeaderLogo.js +4 -6
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +11 -15
- package/dist/commonjs/components/Inspector/ConsoleTab.js +11 -14
- package/dist/commonjs/components/Inspector/CrashDetail.js +7 -6
- package/dist/commonjs/components/Inspector/CrashTab.js +14 -14
- package/dist/commonjs/components/Inspector/DebuggingTab.js +6 -6
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +77 -43
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -9
- package/dist/commonjs/components/Inspector/InspectorHeader.js +93 -70
- package/dist/commonjs/components/Inspector/LogDetail.js +10 -7
- package/dist/commonjs/components/Inspector/MainScreen.js +67 -29
- package/dist/commonjs/components/Inspector/NetworkDetail.js +29 -28
- package/dist/commonjs/components/Inspector/NetworkFilterModal.js +1 -1
- package/dist/commonjs/components/Inspector/NetworkTab.js +87 -85
- package/dist/commonjs/components/Inspector/PushCard.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushCard.js +89 -0
- package/dist/commonjs/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/commonjs/components/Inspector/PushDetail.js +190 -0
- package/dist/commonjs/components/Inspector/PushTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/PushTab.js +45 -0
- package/dist/commonjs/components/Inspector/ReduxDetail.js +16 -13
- package/dist/commonjs/components/Inspector/ReduxTab.js +13 -23
- package/dist/commonjs/components/Inspector/SettingsPanel.js +253 -105
- package/dist/commonjs/components/Inspector/StorageTab.js +35 -35
- package/dist/commonjs/components/Inspector/TabBar.js +9 -8
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +2 -2
- package/dist/commonjs/components/JsonViewer.js +77 -90
- package/dist/commonjs/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/commonjs/components/ModuleErrorBoundary.js +33 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +3 -3
- package/dist/commonjs/components/NetworkIcons.js +10 -6
- package/dist/commonjs/components/SegmentedTabs.d.ts +4 -1
- package/dist/commonjs/components/SegmentedTabs.js +12 -8
- package/dist/commonjs/components/ShareButton.d.ts +11 -0
- package/dist/commonjs/components/ShareButton.js +6 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/commonjs/customHooks/pushNotificationLogger.js +1 -0
- package/dist/commonjs/helpers/memoryManager.d.ts +2 -1
- package/dist/commonjs/helpers/memoryManager.js +1 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +13 -0
- package/dist/commonjs/helpers/shareFormatter.js +7 -0
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/index.d.ts +5 -2
- package/dist/commonjs/index.js +4 -4
- package/dist/commonjs/push.d.ts +4 -0
- package/dist/commonjs/push.js +1 -0
- package/dist/commonjs/types/enums.d.ts +30 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/interfaces.d.ts +63 -7
- package/dist/esm/components/AnalyticsDetail.js +28 -25
- package/dist/esm/components/AppHeaderLogo.js +5 -7
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +14 -14
- package/dist/esm/components/Inspector/AnalyticsTab.js +35 -39
- package/dist/esm/components/Inspector/ConsoleTab.js +50 -53
- package/dist/esm/components/Inspector/CrashDetail.js +11 -10
- package/dist/esm/components/Inspector/CrashTab.js +14 -14
- package/dist/esm/components/Inspector/DebuggingTab.js +10 -10
- package/dist/esm/components/Inspector/DeviceInfoTab.js +208 -174
- package/dist/esm/components/Inspector/FabLauncher.js +41 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +138 -115
- package/dist/esm/components/Inspector/LogDetail.js +24 -21
- package/dist/esm/components/Inspector/MainScreen.js +100 -62
- package/dist/esm/components/Inspector/NetworkDetail.js +88 -87
- package/dist/esm/components/Inspector/NetworkFilterModal.js +8 -8
- package/dist/esm/components/Inspector/NetworkTab.js +136 -134
- package/dist/esm/components/Inspector/PushCard.d.ts +4 -0
- package/dist/esm/components/Inspector/PushCard.js +89 -0
- package/dist/esm/components/Inspector/PushDetail.d.ts +4 -0
- package/dist/esm/components/Inspector/PushDetail.js +190 -0
- package/dist/esm/components/Inspector/PushTab.d.ts +3 -0
- package/dist/esm/components/Inspector/PushTab.js +45 -0
- package/dist/esm/components/Inspector/ReduxDetail.js +40 -37
- package/dist/esm/components/Inspector/ReduxTab.js +103 -113
- package/dist/esm/components/Inspector/SettingsPanel.js +406 -258
- package/dist/esm/components/Inspector/StorageTab.js +158 -158
- package/dist/esm/components/Inspector/TabBar.js +28 -27
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +1 -1
- package/dist/esm/components/JsonViewer.js +101 -114
- package/dist/esm/components/ModuleErrorBoundary.d.ts +24 -0
- package/dist/esm/components/ModuleErrorBoundary.js +33 -0
- package/dist/esm/components/NetworkIcons.d.ts +3 -3
- package/dist/esm/components/NetworkIcons.js +7 -3
- package/dist/esm/components/SegmentedTabs.d.ts +4 -1
- package/dist/esm/components/SegmentedTabs.js +12 -8
- package/dist/esm/components/ShareButton.d.ts +11 -0
- package/dist/esm/components/ShareButton.js +6 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/customHooks/pushNotificationLogger.d.ts +19 -0
- package/dist/esm/customHooks/pushNotificationLogger.js +1 -0
- package/dist/esm/helpers/memoryManager.d.ts +2 -1
- package/dist/esm/helpers/memoryManager.js +1 -1
- package/dist/esm/helpers/settingsStore.d.ts +1 -0
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +13 -0
- package/dist/esm/helpers/shareFormatter.js +7 -0
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/push.d.ts +4 -0
- package/dist/esm/push.js +1 -0
- package/dist/esm/types/enums.d.ts +30 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/interfaces.d.ts +63 -7
- package/package.json +53 -10
- package/src/native/NativeInspector.ts +0 -1
- package/dist/commonjs/components/BrandSquareIcon.d.ts +0 -5
- package/dist/commonjs/components/BrandSquareIcon.js +0 -112
- package/dist/esm/components/BrandSquareIcon.d.ts +0 -5
- package/dist/esm/components/BrandSquareIcon.js +0 -112
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,l,o){o===void 0&&(o=l);var r=Object.getOwnPropertyDescriptor(t,l);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,o,r)}):(function(e,t,l,o){o===void 0&&(o=l),e[o]=t[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(l){var o=[];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(o[o.length]=r);return o},e(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(l,t,o[r]);return __setModuleDefault(l,t),l}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../i18n"),TreeNode_1=__importDefault(require("./TreeNode")),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),NetworkIcons_1=require("./NetworkIcons"),AppColors_1=require("../styles/AppColors"),helpers_1=require("../helpers"),NativeInspector_1=require("../native/NativeInspector"),monoFont=react_native_1.Platform.select({ios:"Menlo",android:"monospace",default:"monospace"}),getTypeDetails=e=>e===null?{label:"null",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:e===void 0?{label:"undef",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:Array.isArray(e)?{label:`arr[${e.length}]`,color:AppColors_1.AppColors.blue600,bg:AppColors_1.AppColors.blueBg,border:AppColors_1.AppColors.sky100}:typeof e=="object"?{label:`obj{${Object.keys(e).length}}`,color:AppColors_1.AppColors.violet600,bg:AppColors_1.AppColors.purple50,border:AppColors_1.AppColors.purple200}:typeof e=="number"?{label:"num",color:AppColors_1.AppColors.amber600,bg:AppColors_1.AppColors.amber100,border:AppColors_1.AppColors.amber200}:typeof e=="boolean"?{label:"bool",color:AppColors_1.AppColors.pink600,bg:AppColors_1.AppColors.roseBg,border:AppColors_1.AppColors.roseBorder}:{label:"str",color:AppColors_1.AppColors.emerald600,bg:AppColors_1.AppColors.emeraldBg,border:AppColors_1.AppColors.emeraldBorder},RawValueText=react_1.default.memo(({text:e,search:t,detectLinks:l})=>{const o=e.trim();let r=localStyles.rawMonospaceText;return o.startsWith('"')?r=localStyles.syntaxString:o==="null"||o.startsWith("null,")||o==="undefined"?r=localStyles.syntaxNull:o==="true"||o.startsWith("true,")||o==="false"||o.startsWith("false,")?r=localStyles.syntaxBoolean:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?,?$/.test(o)&&(r=localStyles.syntaxNumber),<HighlightText_1.default text={e}search={t}detectLinks={l}style={r}selectable={!0}highlightStyle={localStyles.highlight}/>}),RawJsonLine=react_1.default.memo(({line:e,search:t,detectLinks:l})=>{const o=e.match(/^(\s+)(.*)$/),r=o?o[1]:"",d=o?o[2]:e,u=r?r.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7"):"",
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,l,o){o===void 0&&(o=l);var r=Object.getOwnPropertyDescriptor(t,l);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,o,r)}):(function(e,t,l,o){o===void 0&&(o=l),e[o]=t[l]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(l){var o=[];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(o[o.length]=r);return o},e(t)};return function(t){if(t&&t.__esModule)return t;var l={};if(t!=null)for(var o=e(t),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(l,t,o[r]);return __setModuleDefault(l,t),l}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../i18n"),TreeNode_1=__importDefault(require("./TreeNode")),HighlightText_1=__importDefault(require("./HighlightText")),TouchableScale_1=__importDefault(require("./TouchableScale")),NetworkIcons_1=require("./NetworkIcons"),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts"),helpers_1=require("../helpers"),NativeInspector_1=require("../native/NativeInspector"),monoFont=react_native_1.Platform.select({ios:"Menlo",android:"monospace",default:"monospace"}),getTypeDetails=e=>e===null?{label:"null",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:e===void 0?{label:"undef",color:AppColors_1.AppColors.errorColor,bg:AppColors_1.AppColors.errorCardBg,border:AppColors_1.AppColors.errorBorder}:Array.isArray(e)?{label:`arr[${e.length}]`,color:AppColors_1.AppColors.blue600,bg:AppColors_1.AppColors.blueBg,border:AppColors_1.AppColors.sky100}:typeof e=="object"?{label:`obj{${Object.keys(e).length}}`,color:AppColors_1.AppColors.violet600,bg:AppColors_1.AppColors.purple50,border:AppColors_1.AppColors.purple200}:typeof e=="number"?{label:"num",color:AppColors_1.AppColors.amber600,bg:AppColors_1.AppColors.amber100,border:AppColors_1.AppColors.amber200}:typeof e=="boolean"?{label:"bool",color:AppColors_1.AppColors.pink600,bg:AppColors_1.AppColors.roseBg,border:AppColors_1.AppColors.roseBorder}:{label:"str",color:AppColors_1.AppColors.emerald600,bg:AppColors_1.AppColors.emeraldBg,border:AppColors_1.AppColors.emeraldBorder},RawValueText=react_1.default.memo(({text:e,search:t,detectLinks:l})=>{const o=e.trim();let r=localStyles.rawMonospaceText;return o.startsWith('"')?r=localStyles.syntaxString:o==="null"||o.startsWith("null,")||o==="undefined"?r=localStyles.syntaxNull:o==="true"||o.startsWith("true,")||o==="false"||o.startsWith("false,")?r=localStyles.syntaxBoolean:/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?,?$/.test(o)&&(r=localStyles.syntaxNumber),<HighlightText_1.default text={e}search={t}detectLinks={l}style={r}selectable={!0}highlightStyle={localStyles.highlight}/>}),RawJsonLine=react_1.default.memo(({line:e,search:t,detectLinks:l})=>{const o=e.match(/^(\s+)(.*)$/),r=o?o[1]:"",d=o?o[2]:e,u=r?r.replace(/ /g,"\xB7 ").replace(/ /g,"\xB7"):"",i=d.match(/^("(?:[^"\\]|\\.)*")(\s*:\s*)(.*)$/);if(i){const s=i[1],y=i[2],c=i[3];return<react_native_1.View style={localStyles.rawLineContentRow}>
|
|
2
2
|
{u.length>0&&<react_native_1.Text style={localStyles.indentDots}>{u}</react_native_1.Text>}
|
|
3
|
-
<HighlightText_1.default text={
|
|
4
|
-
<react_native_1.Text style={localStyles.syntaxColon}>{
|
|
5
|
-
<RawValueText text={
|
|
3
|
+
<HighlightText_1.default text={s}search={t}style={localStyles.syntaxKey}selectable={!0}highlightStyle={localStyles.highlight}/>
|
|
4
|
+
<react_native_1.Text style={localStyles.syntaxColon}>{y}</react_native_1.Text>
|
|
5
|
+
<RawValueText text={c}search={t}detectLinks={l}/>
|
|
6
6
|
</react_native_1.View>}return<react_native_1.View style={localStyles.rawLineContentRow}>
|
|
7
7
|
{u.length>0&&<react_native_1.Text style={localStyles.indentDots}>{u}</react_native_1.Text>}
|
|
8
8
|
<RawValueText text={d}search={t}detectLinks={l}/>
|
|
9
|
-
</react_native_1.View>}),JsonTableRow=react_1.default.memo(({itemKey:e,val:t,search:l,index:o})=>{const[r,d]=(0,react_1.useState)(!1),u=t!==null&&typeof t=="object",
|
|
10
|
-
`)||
|
|
9
|
+
</react_native_1.View>}),JsonTableRow=react_1.default.memo(({itemKey:e,val:t,search:l,index:o})=>{const[r,d]=(0,react_1.useState)(!1),u=t!==null&&typeof t=="object",i=getTypeDetails(t);let s="";if(t===null)s="null";else if(t===void 0)s="undefined";else if(u)try{s=JSON.stringify(t,null,2)}catch{s=String(t)}else s=String(t);const y=s.includes(`
|
|
10
|
+
`)||s.length>80;return<react_native_1.View style={[localStyles.tableRow,o%2===1&&localStyles.tableRowAlt]}>
|
|
11
11
|
|
|
12
12
|
<react_native_1.View style={localStyles.tableColKey}>
|
|
13
13
|
<HighlightText_1.default text={e}search={l}style={localStyles.tableCellKey}highlightStyle={localStyles.highlight}/>
|
|
14
|
-
<react_native_1.View style={[localStyles.typePill,{backgroundColor:
|
|
15
|
-
<react_native_1.Text style={[localStyles.typePillText,{color:
|
|
16
|
-
{
|
|
14
|
+
<react_native_1.View style={[localStyles.typePill,{backgroundColor:i.bg,borderColor:i.border}]}>
|
|
15
|
+
<react_native_1.Text style={[localStyles.typePillText,{color:i.color}]}>
|
|
16
|
+
{i.label}
|
|
17
17
|
</react_native_1.Text>
|
|
18
18
|
</react_native_1.View>
|
|
19
19
|
</react_native_1.View>
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
|
|
22
22
|
<react_native_1.View style={localStyles.tableColVal}>
|
|
23
23
|
<react_native_1.View style={u?localStyles.tableCodeBox:void 0}>
|
|
24
|
-
<HighlightText_1.default text={
|
|
24
|
+
<HighlightText_1.default text={s}search={l}style={[localStyles.tableCellValue,t==null?localStyles.syntaxNull:void 0,typeof t=="number"?localStyles.syntaxNumber:void 0,typeof t=="boolean"?localStyles.syntaxBoolean:void 0,typeof t=="string"?localStyles.syntaxString:void 0]}highlightStyle={localStyles.highlight}numberOfLines={r?void 0:3}selectable={!0}/>
|
|
25
25
|
</react_native_1.View>
|
|
26
|
-
{
|
|
26
|
+
{y&&<react_native_1.TouchableOpacity onPress={()=>d(c=>!c)}hitSlop={6}style={localStyles.showMoreBtn}>
|
|
27
27
|
<react_native_1.Text style={localStyles.showMoreText}>
|
|
28
28
|
{r?"Collapse":"Expand"}
|
|
29
29
|
</react_native_1.Text>
|
|
30
30
|
<NetworkIcons_1.ChevronIcon direction={r?"up":"down"}size={9}color="#4F46E5"/>
|
|
31
31
|
</react_native_1.TouchableOpacity>}
|
|
32
32
|
</react_native_1.View>
|
|
33
|
-
</react_native_1.View>}),JsonViewer=react_1.default.memo(({data:e,search:t,forceOpen:l,defaultExpandDepth:o=1,wrap:r,fullHeight:d=!1,maxHeight:u,mode:
|
|
34
|
-
`):[""],[
|
|
35
|
-
`).length:1,[a,
|
|
33
|
+
</react_native_1.View>}),JsonViewer=react_1.default.memo(({data:e,search:t,forceOpen:l,defaultExpandDepth:o=1,wrap:r,fullHeight:d=!1,maxHeight:u,mode:i,onModeChange:s,hideTabs:y=!1})=>{const{t:c}=(0,i18n_1.useTranslation)(),[P,B]=(0,react_1.useState)(i??"raw"),[F,z]=(0,react_1.useState)(!1),[f,R]=(0,react_1.useState)(r??!0),[w,N]=(0,react_1.useState)("compact"),[b,H]=(0,react_1.useState)(l),[D,M]=(0,react_1.useState)(!1),a=s&&i?i:P,m=n=>{B(n),s&&s(n)};(0,react_1.useEffect)(()=>{r!==void 0&&R(r)},[r]),(0,react_1.useEffect)(()=>{l!==void 0&&H(l)},[l]),(0,react_1.useEffect)(()=>{i&&B(i)},[i]);const g=(0,react_1.useMemo)(()=>{if(e==null)return"";if(typeof e=="string"){const n=e.trim();try{const p=JSON.parse(n);return JSON.stringify(p,null,2)}catch{return e}}try{return JSON.stringify(e,null,2)??""}catch{return String(e)||""}},[e]),S=(0,react_1.useMemo)(()=>{if(typeof e=="string"){const n=e.trim();try{const p=JSON.parse(n);return JSON.stringify(p)}catch{return e}}try{return JSON.stringify(e)??""}catch{return String(e)||""}},[e]),I=w==="formatted"?g:S,k=5e4,h=typeof I=="string"?I:"",W=h.length>k&&!D,A=W?h.slice(0,k):h,V=(0,react_1.useMemo)(()=>A?A.split(`
|
|
34
|
+
`):[""],[A]),q=(0,react_1.useMemo)(()=>a==="raw"?V.length:g?g.split(`
|
|
35
|
+
`).length:1,[a,V.length,g]),J=(0,react_1.useMemo)(()=>(0,helpers_1.getSize)(e),[e]),E=(0,react_1.useCallback)(()=>{(0,NativeInspector_1.triggerNativeHaptic)("success"),(0,helpers_1.copyToClipboard)(w==="compact"?S:g,"JSON"),z(!0),setTimeout(()=>z(!1),1200)},[w,S,g]),v=typeof e=="object"&&e!==null,L=e==null||v&&Object.keys(e).length===0,j=()=>{if(!v)return<react_native_1.View style={localStyles.tableRow}>
|
|
36
36
|
<react_native_1.View style={localStyles.tableColKey}>
|
|
37
37
|
<react_native_1.Text style={localStyles.tableCellKey}>
|
|
38
|
-
{
|
|
38
|
+
{c("network.jsonViewer.value")}
|
|
39
39
|
</react_native_1.Text>
|
|
40
40
|
</react_native_1.View>
|
|
41
41
|
<react_native_1.View style={localStyles.tableColVal}>
|
|
42
42
|
<react_native_1.Text style={localStyles.tableCellValue}>{String(e)}</react_native_1.Text>
|
|
43
43
|
</react_native_1.View>
|
|
44
|
-
</react_native_1.View>;let n=Object.keys(e);if(t&&t.trim().length>0){const p=t.trim().toLowerCase();n=n.filter(
|
|
44
|
+
</react_native_1.View>;let n=Object.keys(e);if(t&&t.trim().length>0){const p=t.trim().toLowerCase();n=n.filter(x=>{const T=e[x],K=typeof T=="object"&&T!==null?JSON.stringify(T):String(T);return x.toLowerCase().includes(p)||K.toLowerCase().includes(p)})}return n.length===0?<react_native_1.View style={localStyles.emptyContainer}>
|
|
45
45
|
<react_native_1.Text style={localStyles.emptyText}>
|
|
46
|
-
{t&&t.trim().length>0?"No matching keys or values found":
|
|
46
|
+
{t&&t.trim().length>0?"No matching keys or values found":c("network.jsonViewer.emptyTable")}
|
|
47
47
|
</react_native_1.Text>
|
|
48
48
|
</react_native_1.View>:<react_native_1.View style={localStyles.tableView}>
|
|
49
49
|
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
</react_native_1.Text>
|
|
54
54
|
<react_native_1.Text style={[localStyles.tableHeaderCell,{flex:3}]}>VALUE</react_native_1.Text>
|
|
55
55
|
</react_native_1.View>
|
|
56
|
-
{n.map((p,
|
|
57
|
-
</react_native_1.View>},
|
|
58
|
-
{
|
|
56
|
+
{n.map((p,x)=><JsonTableRow key={p}index={x}itemKey={p}val={e[p]}search={t}/>)}
|
|
57
|
+
</react_native_1.View>},C=<TreeNode_1.default data={e}search={t}forceOpen={b}defaultExpandDepth={b?99:o}/>,_=()=><react_native_1.View style={localStyles.rawLinesWrapper}>
|
|
58
|
+
{V.map((n,p)=><react_native_1.View key={p}style={localStyles.rawCodeLineRow}>
|
|
59
59
|
|
|
60
60
|
<react_native_1.View style={localStyles.gutterCell}>
|
|
61
61
|
<react_native_1.Text style={localStyles.gutterNumber}selectable={!1}>
|
|
@@ -65,81 +65,68 @@
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
<react_native_1.View style={localStyles.rawTextCell}>
|
|
68
|
-
<RawJsonLine line={n}search={t}detectLinks={
|
|
68
|
+
<RawJsonLine line={n}search={t}detectLinks={h.length<2e4}/>
|
|
69
69
|
</react_native_1.View>
|
|
70
70
|
</react_native_1.View>)}
|
|
71
|
-
</react_native_1.View>,
|
|
71
|
+
</react_native_1.View>,O=()=>W?<react_native_1.TouchableOpacity onPress={()=>M(!0)}activeOpacity={.8}style={localStyles.truncationBanner}>
|
|
72
72
|
<react_native_1.Text style={localStyles.truncationText}>
|
|
73
|
-
Showing first 50 KB ({Math.round(
|
|
73
|
+
Showing first 50 KB ({Math.round(h.length/1024)} KB
|
|
74
74
|
total) · Tap to load full payload
|
|
75
75
|
</react_native_1.Text>
|
|
76
|
-
</react_native_1.TouchableOpacity>:null
|
|
76
|
+
</react_native_1.TouchableOpacity>:null;return<react_native_1.View style={[localStyles.container,d&&{flex:1}]}>
|
|
77
77
|
|
|
78
78
|
<react_native_1.View style={localStyles.snippetHeader}>
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
80
|
+
{!y&&<react_native_1.View style={localStyles.snippetTabs}>
|
|
81
|
+
<TouchableScale_1.default onPress={()=>m("raw")}style={[localStyles.snippetTabBtn,a==="raw"&&localStyles.snippetTabBtnActive]}>
|
|
82
|
+
<NetworkIcons_1.RawIcon color={a==="raw"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
83
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="raw"&&localStyles.snippetTabTextActive]}>
|
|
84
|
+
{c("network.jsonViewer.raw","Raw")}
|
|
85
|
+
</react_native_1.Text>
|
|
86
|
+
</TouchableScale_1.default>
|
|
87
|
+
|
|
88
|
+
<TouchableScale_1.default onPress={()=>m("pretty")}style={[localStyles.snippetTabBtn,a==="pretty"&&localStyles.snippetTabBtnActive]}>
|
|
89
|
+
<NetworkIcons_1.PrettyIcon color={a==="pretty"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
90
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="pretty"&&localStyles.snippetTabTextActive]}>
|
|
91
|
+
{c("network.jsonViewer.pretty","Pretty")}
|
|
92
|
+
</react_native_1.Text>
|
|
93
|
+
</TouchableScale_1.default>
|
|
94
|
+
|
|
95
|
+
<TouchableScale_1.default onPress={()=>m("table")}style={[localStyles.snippetTabBtn,a==="table"&&localStyles.snippetTabBtnActive]}>
|
|
96
|
+
<NetworkIcons_1.TableIcon color={a==="table"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText}size={11.5}/>
|
|
97
|
+
<react_native_1.Text style={[localStyles.snippetTabText,a==="table"&&localStyles.snippetTabTextActive]}>
|
|
98
|
+
{c("network.jsonViewer.table","Table")}
|
|
99
|
+
</react_native_1.Text>
|
|
100
|
+
</TouchableScale_1.default>
|
|
101
|
+
</react_native_1.View>}
|
|
93
102
|
|
|
94
103
|
|
|
95
104
|
<react_native_1.View style={localStyles.headerRight}>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<react_native_1.Text style={[localStyles.
|
|
100
|
-
{
|
|
101
|
-
</react_native_1.Text>
|
|
102
|
-
</TouchableScale_1.default>
|
|
103
|
-
|
|
104
|
-
<TouchableScale_1.default onPress={()=>A("raw")}style={[localStyles.snippetTabBtn,a==="raw"&&[localStyles.snippetTabBtnActive,{backgroundColor:AppColors_1.AppColors.sky600,shadowColor:AppColors_1.AppColors.sky600}]]}>
|
|
105
|
-
<NetworkIcons_1.RawIcon color={a==="raw"?AppColors_1.AppColors.white:AppColors_1.AppColors.grayTextWeak}size={11}/>
|
|
106
|
-
<react_native_1.Text style={[localStyles.snippetTabText,a==="raw"&&localStyles.snippetTabTextActive]}>
|
|
107
|
-
{i("network.jsonViewer.raw","Raw")}
|
|
105
|
+
|
|
106
|
+
{a==="raw"&&<>
|
|
107
|
+
<TouchableScale_1.default onPress={()=>N(n=>n==="compact"?"formatted":"compact")}style={[localStyles.toolToggleBtn,w==="compact"&&localStyles.toolToggleBtnActive]}>
|
|
108
|
+
<react_native_1.Text style={[localStyles.toolToggleText,w==="compact"&&localStyles.toolToggleTextActive]}>
|
|
109
|
+
{c("jsonViewer.min","Min")}
|
|
108
110
|
</react_native_1.Text>
|
|
109
111
|
</TouchableScale_1.default>
|
|
110
112
|
|
|
111
|
-
<TouchableScale_1.default onPress={()=>
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
{i("network.jsonViewer.table","Table")}
|
|
113
|
+
<TouchableScale_1.default onPress={()=>R(n=>!n)}style={[localStyles.toolToggleBtn,f&&localStyles.toolToggleBtnActive]}>
|
|
114
|
+
<react_native_1.Text style={[localStyles.toolToggleText,f&&localStyles.toolToggleTextActive]}>
|
|
115
|
+
{c("jsonViewer.wrap","Wrap")}
|
|
115
116
|
</react_native_1.Text>
|
|
116
117
|
</TouchableScale_1.default>
|
|
117
|
-
|
|
118
|
+
</>}
|
|
118
119
|
|
|
119
120
|
|
|
120
|
-
{a==="pretty"&&
|
|
121
|
+
{a==="pretty"&&v&&<TouchableScale_1.default onPress={()=>H(n=>!n)}style={[localStyles.toolToggleBtn,b&&localStyles.toolToggleBtnActive]}>
|
|
121
122
|
<react_native_1.Text style={[localStyles.toolToggleText,b&&localStyles.toolToggleTextActive]}>
|
|
122
|
-
{b?
|
|
123
|
-
</react_native_1.Text>
|
|
124
|
-
</TouchableScale_1.default>}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
{a==="raw"&&<TouchableScale_1.default onPress={()=>M(n=>n==="compact"?"formatted":"compact")}style={[localStyles.toolToggleBtn,g==="compact"&&localStyles.toolToggleBtnActive]}>
|
|
128
|
-
<react_native_1.Text style={[localStyles.toolToggleText,g==="compact"&&localStyles.toolToggleTextActive]}>
|
|
129
|
-
{g==="compact"?i("jsonViewer.min","Min"):i("jsonViewer.indent","Indent")}
|
|
130
|
-
</react_native_1.Text>
|
|
131
|
-
</TouchableScale_1.default>}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{a==="raw"&&<TouchableScale_1.default onPress={()=>R(n=>!n)}style={[localStyles.toolToggleBtn,w&&localStyles.toolToggleBtnActive]}>
|
|
135
|
-
<react_native_1.Text style={[localStyles.toolToggleText,w&&localStyles.toolToggleTextActive]}>
|
|
136
|
-
{i("jsonViewer.wrap","Wrap")}
|
|
123
|
+
{b?c("jsonViewer.fold","Fold"):c("jsonViewer.expand","Expand")}
|
|
137
124
|
</react_native_1.Text>
|
|
138
125
|
</TouchableScale_1.default>}
|
|
139
126
|
|
|
140
127
|
|
|
141
|
-
<TouchableScale_1.default onPress={
|
|
142
|
-
{F?<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.emerald500}size={
|
|
128
|
+
<TouchableScale_1.default onPress={E}hitSlop={6}style={[localStyles.copyBtn,F&&localStyles.copyBtnSuccess]}>
|
|
129
|
+
{F?<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.emerald500}size={13}/>:<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.grayText}size={13}/>}
|
|
143
130
|
</TouchableScale_1.default>
|
|
144
131
|
</react_native_1.View>
|
|
145
132
|
</react_native_1.View>
|
|
@@ -147,44 +134,44 @@
|
|
|
147
134
|
|
|
148
135
|
<react_native_1.View style={[localStyles.editorBody,d&&{flex:1,maxHeight:void 0},!d&&u!=null&&{maxHeight:u}]}>
|
|
149
136
|
|
|
150
|
-
{a==="pretty"&&(
|
|
137
|
+
{a==="pretty"&&(L?<react_native_1.View style={localStyles.emptyContainer}>
|
|
151
138
|
<react_native_1.Text style={localStyles.emptyText}>
|
|
152
|
-
{
|
|
139
|
+
{c("network.jsonViewer.emptyPayload")}
|
|
153
140
|
</react_native_1.Text>
|
|
154
|
-
</react_native_1.View>:
|
|
155
|
-
{
|
|
156
|
-
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.prettyContainer}>{
|
|
141
|
+
</react_native_1.View>:f?d?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={localStyles.prettyContainer}showsVerticalScrollIndicator={!0}>
|
|
142
|
+
{C}
|
|
143
|
+
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.prettyContainer}>{C}</react_native_1.View>:d?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{flexGrow:1}}showsVerticalScrollIndicator={!0}>
|
|
157
144
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.prettyContainer}>
|
|
158
|
-
{
|
|
145
|
+
{C}
|
|
159
146
|
</react_native_1.ScrollView>
|
|
160
147
|
</react_native_1.ScrollView>:<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.prettyContainer}>
|
|
161
|
-
{
|
|
148
|
+
{C}
|
|
162
149
|
</react_native_1.ScrollView>)}
|
|
163
150
|
|
|
164
151
|
|
|
165
152
|
{a==="raw"&&(d?<react_native_1.ScrollView style={localStyles.fullHeightScrollView}contentContainerStyle={localStyles.fullHeightScrollContent}showsVerticalScrollIndicator={!0}showsHorizontalScrollIndicator={!1}>
|
|
166
|
-
{
|
|
167
|
-
{
|
|
153
|
+
{f?<react_native_1.View style={localStyles.rawEditorFullWidth}>
|
|
154
|
+
{_()}
|
|
168
155
|
</react_native_1.View>:<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.rawHorizontalContent}>
|
|
169
156
|
<react_native_1.View style={{flexDirection:"column"}}>
|
|
170
|
-
{
|
|
157
|
+
{_()}
|
|
171
158
|
</react_native_1.View>
|
|
172
159
|
</react_native_1.ScrollView>}
|
|
173
|
-
{
|
|
160
|
+
{O()}
|
|
174
161
|
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.rawEditorAutoHeight}>
|
|
175
|
-
{
|
|
176
|
-
{
|
|
162
|
+
{f?<react_native_1.View style={localStyles.rawEditorFullWidth}>
|
|
163
|
+
{_()}
|
|
177
164
|
</react_native_1.View>:<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!0}contentContainerStyle={localStyles.rawHorizontalContent}>
|
|
178
165
|
<react_native_1.View style={{flexDirection:"column"}}>
|
|
179
|
-
{
|
|
166
|
+
{_()}
|
|
180
167
|
</react_native_1.View>
|
|
181
168
|
</react_native_1.ScrollView>}
|
|
182
|
-
{
|
|
169
|
+
{O()}
|
|
183
170
|
</react_native_1.View>)}
|
|
184
171
|
|
|
185
172
|
|
|
186
173
|
{a==="table"&&(d?<react_native_1.ScrollView style={{flex:1}}contentContainerStyle={{flexGrow:1}}showsVerticalScrollIndicator={!0}>
|
|
187
|
-
{
|
|
188
|
-
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.tableView}>{
|
|
174
|
+
{j()}
|
|
175
|
+
</react_native_1.ScrollView>:<react_native_1.View style={localStyles.tableView}>{j()}</react_native_1.View>)}
|
|
189
176
|
</react_native_1.View>
|
|
190
|
-
</react_native_1.View>}),localStyles=react_native_1.StyleSheet.create({container:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden",shadowColor:AppColors_1.AppColors.brandPurple,shadowOpacity:.04,shadowRadius:6,shadowOffset:{width:0,height:2},elevation:2,width:"100%"},snippetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.grayBackground,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:8,paddingVertical:5,gap:6,minHeight:38},headerLeft:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:1,minWidth:0},langBadge:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,gap:4.5},langDot:{width:5,height:5,borderRadius:2.5,backgroundColor:AppColors_1.AppColors.emerald500},langBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.primaryBlack,fontWeight:"700",letterSpacing:.3},metaBadge:{backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,flexShrink:1},metaBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,fontWeight:"600"},headerRight:{flexDirection:"row",alignItems:"center",gap:4.5,flexShrink:0},snippetTabs:{flexDirection:"row",alignItems:"center",backgroundColor:`${AppColors_1.AppColors.
|
|
177
|
+
</react_native_1.View>}),localStyles=react_native_1.StyleSheet.create({container:{backgroundColor:AppColors_1.AppColors.white,borderRadius:12,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,overflow:"hidden",shadowColor:AppColors_1.AppColors.brandPurple,shadowOpacity:.04,shadowRadius:6,shadowOffset:{width:0,height:2},elevation:2,width:"100%"},snippetHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:AppColors_1.AppColors.grayBackground,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:8,paddingVertical:5,gap:6,minHeight:38},headerLeft:{flexDirection:"row",alignItems:"center",gap:5,flexShrink:1,minWidth:0},langBadge:{flexDirection:"row",alignItems:"center",backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,gap:4.5},langDot:{width:5,height:5,borderRadius:2.5,backgroundColor:AppColors_1.AppColors.emerald500},langBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.primaryBlack,fontWeight:"700",letterSpacing:.3},metaBadge:{backgroundColor:AppColors_1.AppColors.white,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,paddingHorizontal:6,paddingVertical:2.5,flexShrink:1},metaBadgeText:{fontFamily:monoFont,fontSize:9.5,color:AppColors_1.AppColors.grayTextWeak,fontWeight:"600"},headerRight:{flexDirection:"row",alignItems:"center",gap:4.5,flexShrink:0},snippetTabs:{flexDirection:"row",alignItems:"center",backgroundColor:`${AppColors_1.AppColors.slate200}80`,borderRadius:8,padding:2.5,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:2},snippetTabBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingVertical:3.5,paddingHorizontal:8,borderRadius:6},snippetTabBtnActive:{backgroundColor:AppColors_1.AppColors.brandPurple,shadowColor:AppColors_1.AppColors.brandPurple,shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:2,elevation:1},snippetTabText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},snippetTabTextActive:{color:AppColors_1.AppColors.white,fontFamily:AppFonts_1.AppFonts.interBold},toolToggleBtn:{paddingHorizontal:8,paddingVertical:3.5,borderRadius:6,backgroundColor:AppColors_1.AppColors.white,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"},toolToggleBtnActive:{backgroundColor:AppColors_1.AppColors.purpleShade50,borderColor:`${AppColors_1.AppColors.brandPurple}60`},toolToggleText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.grayText},toolToggleTextActive:{color:AppColors_1.AppColors.brandPurple,fontFamily:AppFonts_1.AppFonts.interBold},copyBtn:{width:27,height:27,borderRadius:6,backgroundColor:AppColors_1.AppColors.white,borderWidth:1,borderColor:AppColors_1.AppColors.grayBorderSecondary,alignItems:"center",justifyContent:"center"},copyBtnSuccess:{borderColor:AppColors_1.AppColors.greenMintBorder,backgroundColor:AppColors_1.AppColors.greenMintBg},editorBody:{backgroundColor:"#FFFFFF",minHeight:80},prettyContainer:{padding:10,minWidth:"100%",backgroundColor:"#FFFFFF"},fullHeightScrollView:{flex:1},fullHeightScrollContent:{flexGrow:1},rawEditorAutoHeight:{width:"100%"},rawEditorFullWidth:{width:"100%"},rawHorizontalContent:{minWidth:"100%"},rawLinesWrapper:{paddingVertical:6,backgroundColor:"#FFFFFF",width:"100%"},rawCodeLineRow:{flexDirection:"row",alignItems:"flex-start",minHeight:20,width:"100%"},gutterCell:{width:38,paddingRight:8,paddingTop:1,alignItems:"flex-end",justifyContent:"flex-start",borderRightWidth:1,borderRightColor:"#E2E8F0",backgroundColor:"#F8FAFC",userSelect:"none"},gutterNumber:{fontFamily:monoFont,fontSize:11,lineHeight:18,color:"#94A3B8",textAlign:"right"},rawTextCell:{flex:1,paddingLeft:8,paddingRight:8,paddingTop:1,alignItems:"flex-start"},rawLineContentRow:{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap",minHeight:18},indentDots:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:"#CBD5E1",letterSpacing:.5},rawMonospaceText:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.slate900},syntaxKey:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxKey,fontWeight:"700"},syntaxColon:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxColon,marginRight:4},syntaxString:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxString},syntaxNumber:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxNumber},syntaxBoolean:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxBoolean},syntaxNull:{fontFamily:monoFont,fontSize:11.5,lineHeight:18,color:AppColors_1.AppColors.syntaxNull,fontStyle:"italic"},truncationBanner:{margin:10,backgroundColor:AppColors_1.AppColors.purple50,paddingVertical:8,paddingHorizontal:12,borderRadius:6,alignItems:"center",borderWidth:1,borderColor:AppColors_1.AppColors.purple200},truncationText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:11,color:AppColors_1.AppColors.brandPurple},tableView:{flex:1,width:"100%"},tableHeaderRow:{flexDirection:"row",backgroundColor:AppColors_1.AppColors.slate100,borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.slate200,paddingVertical:7,paddingHorizontal:12},tableHeaderCell:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.slate600,letterSpacing:.5,textTransform:"uppercase"},tableRow:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:AppColors_1.AppColors.slate100,paddingVertical:8,paddingHorizontal:12,alignItems:"flex-start",backgroundColor:AppColors_1.AppColors.white},tableRowAlt:{backgroundColor:AppColors_1.AppColors.slate50},tableColKey:{flex:2,paddingRight:8},tableColVal:{flex:3},tableCellKey:{fontFamily:monoFont,fontSize:11.5,fontWeight:"700",color:AppColors_1.AppColors.brandPurple},typePill:{alignSelf:"flex-start",borderRadius:4,borderWidth:1,paddingHorizontal:4,paddingVertical:1,marginTop:3},typePillText:{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:9},tableCellValue:{fontFamily:monoFont,fontSize:11.5,color:AppColors_1.AppColors.slate900,lineHeight:17},tableCodeBox:{backgroundColor:AppColors_1.AppColors.slate100,borderRadius:6,borderWidth:1,borderColor:AppColors_1.AppColors.slate200,padding:6},showMoreBtn:{flexDirection:"row",alignItems:"center",gap:4,alignSelf:"flex-start",marginTop:4,paddingVertical:2,paddingHorizontal:4},showMoreText:{fontFamily:AppFonts_1.AppFonts.interSemiBold,fontSize:10.5,color:AppColors_1.AppColors.brandPurple},emptyContainer:{padding:24,alignItems:"center",justifyContent:"center"},emptyText:{fontFamily:AppFonts_1.AppFonts.interMedium,fontSize:12,color:AppColors_1.AppColors.slate500},highlight:{backgroundColor:AppColors_1.AppColors.yellow200,color:AppColors_1.AppColors.yellow800,fontFamily:monoFont,fontWeight:"700",borderRadius:2,paddingHorizontal:2}});exports.default=JsonViewer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface ModuleErrorBoundaryProps {
|
|
4
|
+
moduleName?: string;
|
|
5
|
+
fallback?: ReactNode | ((error: Error, retry: () => void) => ReactNode);
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
8
|
+
onRetry?: () => void;
|
|
9
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
interface ModuleErrorBoundaryState {
|
|
12
|
+
hasError: boolean;
|
|
13
|
+
error: Error | null;
|
|
14
|
+
copied: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class ModuleErrorBoundary extends Component<ModuleErrorBoundaryProps, ModuleErrorBoundaryState> {
|
|
17
|
+
state: ModuleErrorBoundaryState;
|
|
18
|
+
static getDerivedStateFromError(error: Error): Partial<ModuleErrorBoundaryState>;
|
|
19
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
20
|
+
handleRetry: () => void;
|
|
21
|
+
handleCopy: () => void;
|
|
22
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>> | React.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export default ModuleErrorBoundary;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var o=Object.getOwnPropertyDescriptor(e,t);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,o)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[r.length]=o);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(t,e,r[o]);return __setModuleDefault(t,e),t}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.ModuleErrorBoundary=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppFonts_1=require("../styles/AppFonts"),helpers_1=require("../helpers"),NetworkIcons_1=require("./NetworkIcons"),crashHandler_1=require("../customHooks/crashHandler"),enums_1=require("../types/enums");class ModuleErrorBoundary extends react_1.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null,copied:!1},this.handleRetry=()=>{this.setState({hasError:!1,error:null,copied:!1}),this.props.onRetry&&this.props.onRetry()},this.handleCopy=()=>{if(!this.state.error)return;const e=`[Module Error: ${this.props.moduleName||"Micro-Feature"}]
|
|
2
|
+
Message: ${this.state.error.message}
|
|
3
|
+
Stack: ${this.state.error.stack||"N/A"}`;(0,helpers_1.copyToClipboard)(e),this.setState({copied:!0}),setTimeout(()=>{this.setState({copied:!1})},2e3)}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){try{(0,crashHandler_1.handleInterceptedCrash)(e,e?.stack,!1,enums_1.CrashType.Js,t.componentStack||void 0)}catch{}this.props.onError&&this.props.onError(e,t)}render(){if(this.state.hasError&&this.state.error){const{fallback:e,moduleName:t="UI Module",containerStyle:r}=this.props;return typeof e=="function"?e(this.state.error,this.handleRetry):e||<react_native_1.View style={[styles.card,r]}>
|
|
4
|
+
<react_native_1.View style={styles.headerRow}>
|
|
5
|
+
<react_native_1.View style={styles.titleRow}>
|
|
6
|
+
<NetworkIcons_1.WarningTriangleIcon color="#DC2626"size={16}/>
|
|
7
|
+
<react_native_1.Text style={styles.moduleName}numberOfLines={1}>
|
|
8
|
+
{t}
|
|
9
|
+
</react_native_1.Text>
|
|
10
|
+
</react_native_1.View>
|
|
11
|
+
<react_native_1.View style={styles.badge}>
|
|
12
|
+
<react_native_1.Text style={styles.badgeText}>FAULT ISOLATED</react_native_1.Text>
|
|
13
|
+
</react_native_1.View>
|
|
14
|
+
</react_native_1.View>
|
|
15
|
+
|
|
16
|
+
<react_native_1.Text style={styles.message}numberOfLines={2}>
|
|
17
|
+
{this.state.error.message||"An unexpected rendering error occurred in this module."}
|
|
18
|
+
</react_native_1.Text>
|
|
19
|
+
|
|
20
|
+
<react_native_1.View style={styles.actionsRow}>
|
|
21
|
+
<react_native_1.TouchableOpacity style={styles.retryButton}onPress={this.handleRetry}activeOpacity={.7}>
|
|
22
|
+
<NetworkIcons_1.RefreshCcwIcon color="#FFFFFF"size={12}/>
|
|
23
|
+
<react_native_1.Text style={styles.retryText}>Retry Module</react_native_1.Text>
|
|
24
|
+
</react_native_1.TouchableOpacity>
|
|
25
|
+
|
|
26
|
+
<react_native_1.TouchableOpacity style={styles.copyButton}onPress={this.handleCopy}activeOpacity={.7}>
|
|
27
|
+
<NetworkIcons_1.CopyIcon color="#475569"size={12}/>
|
|
28
|
+
<react_native_1.Text style={styles.copyText}>
|
|
29
|
+
{this.state.copied?"Copied":"Copy Error"}
|
|
30
|
+
</react_native_1.Text>
|
|
31
|
+
</react_native_1.TouchableOpacity>
|
|
32
|
+
</react_native_1.View>
|
|
33
|
+
</react_native_1.View>}return this.props.children}}exports.ModuleErrorBoundary=ModuleErrorBoundary,exports.default=ModuleErrorBoundary;const styles=react_native_1.StyleSheet.create({card:{backgroundColor:"#FEF2F2",borderColor:"#FECDD3",borderWidth:1.2,borderRadius:16,padding:14,marginVertical:6,gap:10,...react_native_1.Platform.select({ios:{shadowColor:"#DC2626",shadowOffset:{width:0,height:2},shadowOpacity:.06,shadowRadius:6},android:{elevation:2}})},headerRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6},titleRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},moduleName:{fontSize:12.5,fontWeight:"800",color:"#991B1B",fontFamily:AppFonts_1.AppFonts.interBold,flexShrink:1},badge:{backgroundColor:"#FEE2E2",paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,borderColor:"#FCA5A5"},badgeText:{fontSize:8.5,fontWeight:"800",color:"#B91C1C",letterSpacing:.4},message:{fontSize:11.5,color:"#7F1D1D",lineHeight:16,fontFamily:AppFonts_1.AppFonts.interRegular},actionsRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},retryButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,backgroundColor:"#DC2626",paddingVertical:7,paddingHorizontal:12,borderRadius:9},retryText:{fontSize:11,fontWeight:"700",color:"#FFFFFF",fontFamily:AppFonts_1.AppFonts.interBold},copyButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:4,backgroundColor:"#F1F5F9",paddingVertical:7,paddingHorizontal:12,borderRadius:9,borderWidth:1,borderColor:"#E2E8F0"},copyText:{fontSize:11,fontWeight:"600",color:"#475569",fontFamily:AppFonts_1.AppFonts.interMedium}});
|
|
@@ -4,7 +4,6 @@ export interface IconProps {
|
|
|
4
4
|
size?: number;
|
|
5
5
|
strokeWidth?: number;
|
|
6
6
|
isExpanded?: boolean;
|
|
7
|
-
isPaused?: boolean;
|
|
8
7
|
active?: boolean;
|
|
9
8
|
direction?: 'up' | 'down' | string;
|
|
10
9
|
ascending?: boolean;
|
|
@@ -31,7 +30,6 @@ export declare const CircleXIcon: ({ color, size }: IconProps) => React.JSX.Elem
|
|
|
31
30
|
export declare const CircleAlertIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
32
31
|
export declare const FailIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
33
32
|
export declare const TrashIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
34
|
-
export declare const HeaderPauseIcon: ({ isPaused, color, size, }: IconProps) => React.JSX.Element;
|
|
35
33
|
export declare const ExportIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
36
34
|
export declare const ShareIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
37
35
|
export declare const SignalIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -49,7 +47,6 @@ export declare const DebugIcon: ({ color, size }: IconProps) => React.JSX.Elemen
|
|
|
49
47
|
export declare const SunIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
50
48
|
export declare const MoonIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
51
49
|
export { BrandCircleIcon } from './BrandCircleIcon';
|
|
52
|
-
export { BrandSquareIcon } from './BrandSquareIcon';
|
|
53
50
|
export declare const HtmlIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
54
51
|
export declare const CssIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
55
52
|
export declare const JsIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -168,3 +165,6 @@ export declare const NeutralFaceIcon: ({ color, size, }: IconProps) => React.JSX
|
|
|
168
165
|
export declare const SmileFaceIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
169
166
|
export declare const StarFaceIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
170
167
|
export declare const HeartFaceIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
168
|
+
export declare const BellIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
169
|
+
export declare const NotificationIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
170
|
+
export declare const CloudPushIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,o,r){r===void 0&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}):(function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(o){var r=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var o={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(o,t,r[n]);return __setModuleDefault(o,t),o}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserIcon=exports.LayersIcon=exports.WipeIcon=exports.FolderIcon=exports.SettingsIcon=exports.EyeIcon=exports.JsIcon=exports.CssIcon=exports.HtmlIcon=exports.
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,o,r){r===void 0&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}):(function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(o){var r=[];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var o={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(o,t,r[n]);return __setModuleDefault(o,t),o}})(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WarningTriangleIcon=exports.InfoCircleIcon=exports.UserIcon=exports.LayersIcon=exports.WipeIcon=exports.FolderIcon=exports.SettingsIcon=exports.EyeIcon=exports.JsIcon=exports.CssIcon=exports.HtmlIcon=exports.BrandCircleIcon=exports.MoonIcon=exports.SunIcon=exports.DebugIcon=exports.InsightsIcon=exports.AnalyticsIcon=exports.WhiteBackNavigation=exports.CloseWhite=exports.DownloadIcon=exports.FilterIcon=exports.ChevronIcon=exports.SortArrowIcon=exports.GlobeIcon=exports.DiffIcon=exports.SignalIcon=exports.ShareIcon=exports.ExportIcon=exports.TrashIcon=exports.FailIcon=exports.CircleAlertIcon=exports.CircleXIcon=exports.CircleCheckIcon=exports.CheckIcon=exports.TerminalIcon=exports.FetchIcon=exports.CopyIcon=exports.HeadersIcon=exports.ResponseIcon=exports.RequestIcon=exports.SizeIcon=exports.StatusIcon=exports.CalendarIcon=exports.ClockIcon=exports.ClearIcon=exports.SearchIcon=exports.ExpandCollapseIcon=exports.ScreenIcon=exports.MapPinIcon=exports.EmptyRadarIcon=void 0,exports.DiagnosticsIcon=exports.StackTraceIcon=exports.LayoutIcon=exports.ChipIcon=exports.SkullIcon=exports.ShieldAlertIcon=exports.CrashIcon=exports.UserCheckIcon=exports.TargetGoalIcon=exports.RepeatIcon=exports.PinIcon=exports.HourglassIcon=exports.FlameIcon=exports.CodeBracketsIcon=exports.AndroidIcon=exports.AppleIcon=exports.LinkChainIcon=exports.GitHubIcon=exports.StarIcon=exports.PackageBoxIcon=exports.ExternalLinkIcon=exports.MoneyIcon=exports.CartIcon=exports.TextAaIcon=exports.BrainIcon=exports.AtomIcon=exports.MapIcon=exports.SparkleIcon=exports.LightbulbIcon=exports.DocIcon=exports.FolderOpenIcon=exports.BanIcon=exports.BoltIcon=exports.PerformanceIcon=exports.ReduxIcon=exports.MetadataIcon=exports.StorageIcon=exports.RefreshCcwIcon=exports.TimelineIcon=exports.LiveStateIcon=exports.BundleIcon=exports.ForwardChevronIcon=exports.PackageIcon=exports.TableIcon=exports.RawIcon=exports.PrettyIcon=exports.SortIcon=exports.MotionIcon=exports.TrendingUpIcon=exports.ErrorCircleIcon=void 0,exports.ChevronUpIcon=exports.WrenchIcon=exports.BookOpenIcon=exports.MinimizeWindowIcon=exports.GridIcon=exports.ListIcon=exports.ScreencastIcon=exports.FilmIcon=exports.ImageIcon=exports.PauseIcon=exports.PlayIcon=exports.GifIcon=exports.MicrophoneIcon=exports.VideoCameraIcon=exports.CameraIcon=exports.LifeBuoyIcon=exports.SendIcon=exports.HelpCircleIcon=exports.HeadphonesIcon=exports.TurtleIcon=exports.RocketIcon=exports.UnlockIcon=exports.QrCodeIcon=exports.LockIcon=exports.PlusIcon=exports.PencilIcon=exports.DatabaseIcon=exports.ShieldCheckIcon=exports.WifiIcon=exports.CpuIcon=exports.MinimizeIcon=exports.MaximizeIcon=exports.ChevronDownIcon=exports.ResetIcon=exports.NpmIcon=exports.TagIcon=exports.BugIcon=exports.AlertTriangleIcon=exports.SmartphoneIcon=exports.KeyIcon=exports.BarChartIcon=exports.DiceIcon=exports.ZapIcon=exports.FlaskIcon=exports.LoadingSpinnerIcon=exports.ListenerIcon=exports.AllFramesIcon=exports.AppFramesIcon=exports.RawJsonIcon=exports.TrailIcon=void 0,exports.CloudPushIcon=exports.NotificationIcon=exports.BellIcon=exports.HeartFaceIcon=exports.StarFaceIcon=exports.SmileFaceIcon=exports.NeutralFaceIcon=exports.AngryFaceIcon=exports.SparklesIcon=exports.MessageSquareIcon=void 0;const react_1=__importDefault(require("react")),react_native_svg_1=__importStar(require("react-native-svg")),AppColors_1=require("../styles/AppColors"),EmptyRadarIcon=({color:e=AppColors_1.AppColors.purple,size:t=32})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
2
2
|
<react_native_svg_1.Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
3
3
|
<react_native_svg_1.Circle cx="12"cy="11"r="3"stroke={e}strokeWidth="1.5"/>
|
|
4
4
|
<react_native_svg_1.Path d="M12 14v3"stroke={e}strokeWidth="1.5"strokeLinecap="round"/>
|
|
@@ -60,9 +60,7 @@
|
|
|
60
60
|
<react_native_svg_1.Path d="M18 6L6 18M6 6l12 12"stroke={e}strokeWidth="3"strokeLinecap="round"strokeLinejoin="round"/>
|
|
61
61
|
</react_native_svg_1.default>;exports.FailIcon=FailIcon;const TrashIcon=({color:e=AppColors_1.AppColors.primaryLight,size:t=18})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
62
62
|
<react_native_svg_1.Path d="M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
63
|
-
</react_native_svg_1.default>;exports.TrashIcon=TrashIcon;const
|
|
64
|
-
{e?<react_native_svg_1.Path d="M5 3l14 9-14 9V3z"fill={t}/>:<react_native_svg_1.Path d="M6 5h3v14H6V5zm9 0h3v14h-3V5z"fill={t}/>}
|
|
65
|
-
</react_native_svg_1.default>;exports.HeaderPauseIcon=HeaderPauseIcon;const ExportIcon=({color:e=AppColors_1.AppColors.primaryLight,size:t=18})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
63
|
+
</react_native_svg_1.default>;exports.TrashIcon=TrashIcon;const ExportIcon=({color:e=AppColors_1.AppColors.primaryLight,size:t=18})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
66
64
|
<react_native_svg_1.Path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
67
65
|
</react_native_svg_1.default>;exports.ExportIcon=ExportIcon;const ShareIcon=({color:e=AppColors_1.AppColors.white,size:t=14})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
68
66
|
<react_native_svg_1.Path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8M16 6l-4-4-4 4M12 2v13"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
@@ -116,7 +114,7 @@
|
|
|
116
114
|
<react_native_svg_1.Path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
117
115
|
</react_native_svg_1.default>;exports.SunIcon=SunIcon;const MoonIcon=({color:e=AppColors_1.AppColors.white,size:t=16})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
118
116
|
<react_native_svg_1.Path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"fill={e}stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
119
|
-
</react_native_svg_1.default>;exports.MoonIcon=MoonIcon;var BrandCircleIcon_1=require("./BrandCircleIcon");Object.defineProperty(exports,"BrandCircleIcon",{enumerable:!0,get:function(){return BrandCircleIcon_1.BrandCircleIcon}});
|
|
117
|
+
</react_native_svg_1.default>;exports.MoonIcon=MoonIcon;var BrandCircleIcon_1=require("./BrandCircleIcon");Object.defineProperty(exports,"BrandCircleIcon",{enumerable:!0,get:function(){return BrandCircleIcon_1.BrandCircleIcon}});const HtmlIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=14})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
120
118
|
<react_native_svg_1.Path d="M17.5 8.5L21 12l-3.5 3.5M6.5 8.5L3 12l3.5 3.5M14 4.5l-4 15"stroke={e}strokeWidth="2.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
121
119
|
</react_native_svg_1.default>;exports.HtmlIcon=HtmlIcon;const CssIcon=({color:e=AppColors_1.AppColors.grayTextWeak,size:t=14})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
122
120
|
<react_native_svg_1.Path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
@@ -533,4 +531,10 @@
|
|
|
533
531
|
|
|
534
532
|
<react_native_svg_1.Path d="M15 8.2C14.3 7.4 13.2 7.5 12.7 8.2C12.1 9 12.4 10.1 15 11.6C17.6 10.1 17.9 9 17.3 8.2C16.8 7.5 15.7 7.4 15 8.2Z"fill={e}/>
|
|
535
533
|
<react_native_svg_1.Path d="M8 14.5C8 14.5 9.5 17.5 12 17.5C14.5 17.5 16 14.5 16 14.5"stroke={e}strokeWidth="1.8"strokeLinecap="round"/>
|
|
536
|
-
</react_native_svg_1.default>;exports.HeartFaceIcon=HeartFaceIcon;
|
|
534
|
+
</react_native_svg_1.default>;exports.HeartFaceIcon=HeartFaceIcon;const BellIcon=({color:e=AppColors_1.AppColors.brandPurple,size:t=20})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
535
|
+
<react_native_svg_1.Path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
536
|
+
<react_native_svg_1.Path d="M13.73 21a2 2 0 0 1-3.46 0"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
537
|
+
</react_native_svg_1.default>;exports.BellIcon=BellIcon,exports.NotificationIcon=exports.BellIcon;const CloudPushIcon=({color:e=AppColors_1.AppColors.brandPurple,size:t=20})=><react_native_svg_1.default width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
538
|
+
<react_native_svg_1.Path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
539
|
+
<react_native_svg_1.Path d="m12 13 3 3m0 0-3 3m3-3H7"stroke={e}strokeWidth="1.8"strokeLinecap="round"strokeLinejoin="round"/>
|
|
540
|
+
</react_native_svg_1.default>;exports.CloudPushIcon=CloudPushIcon;
|
|
@@ -12,7 +12,10 @@ interface SegmentedTabsProps {
|
|
|
12
12
|
activeKey: string;
|
|
13
13
|
onChange: (key: string) => void;
|
|
14
14
|
style?: ViewStyle | ViewStyle[];
|
|
15
|
+
scrollable?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare const DEFAULT_INNER_TAB_THEMES: Record<string, string>;
|
|
17
|
-
declare const SegmentedTabs: React.MemoExoticComponent<({ tabs, activeKey, onChange, style }: SegmentedTabsProps
|
|
18
|
+
declare const SegmentedTabs: React.MemoExoticComponent<({ tabs, activeKey, onChange, style, scrollable }: SegmentedTabsProps & {
|
|
19
|
+
scrollable?: boolean;
|
|
20
|
+
}) => React.JSX.Element>;
|
|
18
21
|
export default SegmentedTabs;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_INNER_TAB_THEMES=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts");exports.DEFAULT_INNER_TAB_THEMES={metadata:AppColors_1.AppColors.sky600,headers:AppColors_1.AppColors.teal600,request:AppColors_1.AppColors.amber600,response:AppColors_1.AppColors.brandPurple,req:AppColors_1.AppColors.amber600,res:AppColors_1.AppColors.brandPurple,output:AppColors_1.AppColors.teal600,arguments:AppColors_1.AppColors.amber600,stack:AppColors_1.AppColors.errorColor,caller:AppColors_1.AppColors.sky600,error:AppColors_1.AppColors.errorColor,app:AppColors_1.AppColors.green600,all:AppColors_1.AppColors.brandPurple,live:AppColors_1.AppColors.violet600,timeline:AppColors_1.AppColors.orange600,persisted:AppColors_1.AppColors.teal600,payload:AppColors_1.AppColors.violet600,diff:AppColors_1.AppColors.green600,raw:AppColors_1.AppColors.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_INNER_TAB_THEMES=void 0;const react_1=__importDefault(require("react")),react_native_1=require("react-native"),AppColors_1=require("../styles/AppColors"),AppFonts_1=require("../styles/AppFonts");exports.DEFAULT_INNER_TAB_THEMES={metadata:AppColors_1.AppColors.sky600,headers:AppColors_1.AppColors.teal600,request:AppColors_1.AppColors.amber600,response:AppColors_1.AppColors.brandPurple,req:AppColors_1.AppColors.amber600,res:AppColors_1.AppColors.brandPurple,output:AppColors_1.AppColors.teal600,arguments:AppColors_1.AppColors.amber600,stack:AppColors_1.AppColors.errorColor,caller:AppColors_1.AppColors.sky600,error:AppColors_1.AppColors.errorColor,app:AppColors_1.AppColors.green600,all:AppColors_1.AppColors.brandPurple,live:AppColors_1.AppColors.violet600,timeline:AppColors_1.AppColors.orange600,persisted:AppColors_1.AppColors.teal600,payload:AppColors_1.AppColors.violet600,diff:AppColors_1.AppColors.green600,raw:AppColors_1.AppColors.brandPurple,diagnostics:AppColors_1.AppColors.amber600,breadcrumbs:AppColors_1.AppColors.orange600,overview:AppColors_1.AppColors.sky600,json:AppColors_1.AppColors.brandPurple,tree:AppColors_1.AppColors.violet600,preview:AppColors_1.AppColors.brandPurple,delivery:AppColors_1.AppColors.amber600,domainAttrs:AppColors_1.AppColors.sky600,pretty:AppColors_1.AppColors.violet600,table:AppColors_1.AppColors.teal600,production:AppColors_1.AppColors.brandPurple,files:AppColors_1.AppColors.teal600,packages:AppColors_1.AppColors.orange600,media:AppColors_1.AppColors.pink600,optimizer:AppColors_1.AppColors.violet600,hardware:AppColors_1.AppColors.orange600,network:AppColors_1.AppColors.teal600,display:AppColors_1.AppColors.pink600,runtime:AppColors_1.AppColors.amber600,security:AppColors_1.AppColors.errorColor,fatal:AppColors_1.AppColors.errorColor,promise:AppColors_1.AppColors.orange600,render:AppColors_1.AppColors.pink600,native:AppColors_1.AppColors.cyan600,js:AppColors_1.AppColors.amber600,asyncStorage:AppColors_1.AppColors.brandPurple,mmkv:AppColors_1.AppColors.teal600};const SegmentedTabs=react_1.default.memo(({tabs:r,activeKey:a,onChange:i,style:s,scrollable:p})=>{const t=r.map(o=>{const e=a===o.key,l=o.themeColor||o.color||exports.DEFAULT_INNER_TAB_THEMES[o.key]||AppColors_1.AppColors.brandPurple;return<react_native_1.Pressable key={o.key}onPress={()=>i(o.key)}style={({pressed:n})=>[{flex:p?void 0:1,paddingVertical:7,paddingHorizontal:p?12:6,borderRadius:7,backgroundColor:e?l:"transparent",alignItems:"center",justifyContent:"center",gap:4.5,flexDirection:"row",opacity:n?.8:1},e&&{shadowColor:l,shadowOffset:{width:0,height:1},shadowOpacity:.28,shadowRadius:3,elevation:2}]}>
|
|
2
|
+
{o.icon?typeof o.icon=="function"?o.icon(e,l):o.icon:null}
|
|
3
|
+
<react_native_1.Text numberOfLines={1}style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:e?AppColors_1.AppColors.white:AppColors_1.AppColors.grayText,letterSpacing:.2}}>
|
|
4
|
+
{o.label}
|
|
5
|
+
</react_native_1.Text>
|
|
6
|
+
</react_native_1.Pressable>});return p?<react_native_1.View style={[{borderRadius:10,backgroundColor:`${AppColors_1.AppColors.slate200}80`,padding:3,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},s]}>
|
|
7
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
8
|
+
{t}
|
|
9
|
+
</react_native_1.ScrollView>
|
|
10
|
+
</react_native_1.View>:<react_native_1.View style={[{flexDirection:"row",borderRadius:10,backgroundColor:`${AppColors_1.AppColors.slate200}80`,padding:3,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor,gap:3,minWidth:0},s]}>
|
|
11
|
+
{t}
|
|
12
|
+
</react_native_1.View>});exports.default=SegmentedTabs;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface ShareButtonProps {
|
|
4
|
+
onShare: () => void | Promise<void>;
|
|
5
|
+
label?: string;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
color?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const ShareButton: React.MemoExoticComponent<({ onShare, label, style, color, size, }: ShareButtonProps) => React.JSX.Element>;
|
|
11
|
+
export default ShareButton;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,a,t){t===void 0&&(t=a);var n=Object.getOwnPropertyDescriptor(e,a);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(r,t,n)}):(function(r,e,a,t){t===void 0&&(t=a),r[t]=e[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),__importStar=this&&this.__importStar||(function(){var r=function(e){return r=Object.getOwnPropertyNames||function(a){var t=[];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[t.length]=n);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var t=r(e),n=0;n<t.length;n++)t[n]!=="default"&&__createBinding(a,e,t[n]);return __setModuleDefault(a,e),a}})(),__importDefault=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("./TouchableScale")),NetworkIcons_1=require("./NetworkIcons"),NativeInspector_1=require("../native/NativeInspector"),AppColors_1=require("../styles/AppColors"),styles_1=__importDefault(require("../styles")),ShareButton=react_1.default.memo(({onShare:r,label:e,style:a,color:t=AppColors_1.AppColors.brandPurple,size:n=14})=>{const[o,i]=(0,react_1.useState)(!1),s=(0,react_1.useCallback)(async()=>{try{(0,NativeInspector_1.triggerNativeHaptic)("medium"),await r(),i(!0),setTimeout(()=>i(!1),1200)}catch{}},[r]),u=[styles_1.default.iconSquareBtn,{backgroundColor:`${t}14`,borderColor:`${t}30`},o&&styles_1.default.iconSquareBtnSuccess,a];return<TouchableScale_1.default accessible={!0}accessibilityRole="button"accessibilityLabel={`Share ${e}`}accessibilityHint={`Opens native share sheet to export ${e}`}style={u}onPress={s}hitSlop={8}>
|
|
2
|
+
{o?<NetworkIcons_1.CheckIcon color={AppColors_1.AppColors.greenColor}size={n}strokeWidth={2.4}/>:<NetworkIcons_1.ShareIcon color={t}size={n}/>}
|
|
3
|
+
{e?<react_native_1.Text style={[styles_1.default.iconSquareBtnText,{color:o?AppColors_1.AppColors.greenColor:t}]}>
|
|
4
|
+
{o?"Shared":e}
|
|
5
|
+
</react_native_1.Text>:null}
|
|
6
|
+
</TouchableScale_1.default>});ShareButton.displayName="ShareButton",exports.default=ShareButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.
|
|
1
|
+
export declare const LIB_VERSION = "2.4.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.4.0";
|