@har-analyzer/components 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Entry } from 'har-format';
2
2
  import { Har } from 'har-format';
3
3
  import { JSX } from 'react/jsx-runtime';
4
+ import { PropsWithChildren } from 'react';
4
5
 
5
6
  declare const CONTENT_TYPE_GROUPS: readonly [...("JSON" | "XML" | "JS" | "CSS" | "HTML" | "Doc" | "Img" | "Font" | "Media")[], "Other"];
6
7
 
@@ -18,6 +19,10 @@ export declare function getUniqueHeaderNames(harEntries: HAREntry[], type: 'requ
18
19
 
19
20
  export declare function HARAnalyzer({ logo, appName }: HARAnalyzerProps): JSX.Element;
20
21
 
22
+ export declare function HARAnalyzerPreferencesProvider({ store, children }: PropsWithChildren<{
23
+ store: PreferencesStore;
24
+ }>): JSX.Element;
25
+
21
26
  declare interface HARAnalyzerProps {
22
27
  logo?: React.ReactNode;
23
28
  appName?: string;
@@ -59,6 +64,11 @@ declare type HARResponseWithError = HAREntryWithoutError['response'] & {
59
64
 
60
65
  export declare function isErrorResponse(harEntry: HAREntry): boolean;
61
66
 
67
+ declare interface PreferencesStore {
68
+ getPreference: (key: string) => Promise<string | undefined>;
69
+ setPreference: (key: string, value: string) => Promise<void>;
70
+ }
71
+
62
72
  export declare function useHAREntriesFilters(harEntries: HAREntry[]): {
63
73
  filteredHAREntries: HAREntry[];
64
74
  HAREntriesFilters: () => JSX.Element;
package/dist/index.js CHANGED
@@ -1,19 +1,21 @@
1
1
  import { default as t } from "./har-analyzer.js";
2
- import { default as o } from "./har-content-viewer.js";
3
- import { u as n } from "./chunks/index.js";
4
- import { default as R } from "./har-entry-viewer.js";
5
- import { default as l } from "./har-file-uploader.js";
6
- import { a as A, g as H, b as m, c as d, d as u, i as E } from "./chunks/har.js";
2
+ import { default as s } from "./har-analyzer-preferences.js";
3
+ import { default as n } from "./har-content-viewer.js";
4
+ import { u as f } from "./chunks/index.js";
5
+ import { default as A } from "./har-entry-viewer.js";
6
+ import { default as p } from "./har-file-uploader.js";
7
+ import { a as d, g as m, b as u, c as x, d as E, i as g } from "./chunks/har.js";
7
8
  export {
8
9
  t as HARAnalyzer,
9
- o as HARContentViewer,
10
- R as HAREntryViewer,
11
- l as HARFileUploader,
12
- A as getEntriesFromHAR,
13
- H as getHARContentFromFile,
14
- m as getHAREntriesFilteredByContentType,
15
- d as getHAREntriesWithErrorResponse,
16
- u as getUniqueHeaderNames,
17
- E as isErrorResponse,
18
- n as useHAREntriesFilters
10
+ s as HARAnalyzerPreferencesProvider,
11
+ n as HARContentViewer,
12
+ A as HAREntryViewer,
13
+ p as HARFileUploader,
14
+ d as getEntriesFromHAR,
15
+ m as getHARContentFromFile,
16
+ u as getHAREntriesFilteredByContentType,
17
+ x as getHAREntriesWithErrorResponse,
18
+ E as getUniqueHeaderNames,
19
+ g as isErrorResponse,
20
+ f as useHAREntriesFilters
19
21
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@har-analyzer/components",
3
3
  "type": "module",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "description": "Reusable React components for HAR Analyzer",
6
6
  "author": "Allan Joshua",
7
7
  "license": "MIT",
@@ -62,8 +62,8 @@
62
62
  "buffer": "^6.0.3",
63
63
  "date-fns": "^4.1.0",
64
64
  "date-fns-tz": "^3.2.0",
65
+ "local-db-storage": "^2.0.0",
65
66
  "pretty-bytes": "^7.0.0",
66
- "react-error-boundary": "^6.0.0",
67
- "use-local-storage-state": "^19.5.0"
67
+ "react-error-boundary": "^6.0.0"
68
68
  }
69
69
  }