@kickd0wn/react-dev-companion 0.1.0 → 0.2.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.
@@ -1,2 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export declare const DevCompanion: React.FC;
2
+ export interface DevCompanionProps {
3
+ position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
4
+ }
5
+ export declare const DevCompanion: React.FC<DevCompanionProps>;
@@ -0,0 +1,7 @@
1
+ import { NetworkLog } from '../core/fetchInterceptor';
2
+ interface NetworkTabProps {
3
+ logs: NetworkLog[];
4
+ onClear?: () => void;
5
+ }
6
+ export declare const NetworkTab: ({ logs, onClear }: NetworkTabProps) => import('react').JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const StorageTab: () => import('react').JSX.Element;
@@ -0,0 +1,19 @@
1
+ export declare const theme: {
2
+ bg: string;
3
+ cardBg: string;
4
+ hoverBg: string;
5
+ border: string;
6
+ borderSubtle: string;
7
+ textPrimary: string;
8
+ textSecondary: string;
9
+ accent: string;
10
+ accentHover: string;
11
+ success: string;
12
+ warning: string;
13
+ danger: string;
14
+ methodGet: string;
15
+ methodPost: string;
16
+ methodPut: string;
17
+ methodDelete: string;
18
+ };
19
+ export declare const injectDevCompanionStyles: () => void;
@@ -3,8 +3,13 @@ export interface NetworkLog {
3
3
  url: string;
4
4
  method: string;
5
5
  status?: number;
6
+ duration?: number;
6
7
  timestamp: string;
7
8
  }
8
9
  type LogCallback = (log: NetworkLog) => void;
10
+ export declare const networkConfig: {
11
+ isOffline: boolean;
12
+ delayMs: number;
13
+ };
9
14
  export declare const initFetchInterceptor: (onLog: LogCallback) => void;
10
15
  export {};
@@ -0,0 +1,5 @@
1
+ export declare const useKeyboardShortcut: (keyCombo: {
2
+ key: string;
3
+ ctrlOrCmd?: boolean;
4
+ shift?: boolean;
5
+ }, callback: () => void) => void;
@@ -0,0 +1,10 @@
1
+ export type StorageType = 'localStorage' | 'sessionStorage' | 'cookie';
2
+ export interface StorageItem {
3
+ key: string;
4
+ value: string;
5
+ }
6
+ export interface StorageExportData {
7
+ type: StorageType;
8
+ data: Record<string, string>;
9
+ timestamp: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { StorageItem, StorageType } from '../types/storage';
2
+ export declare const getCookies: () => StorageItem[];
3
+ export declare const setCookie: (key: string, value: string, days?: number) => void;
4
+ export declare const deleteCookie: (key: string) => void;
5
+ export declare const exportStorageJSON: (type: StorageType) => void;
package/package.json CHANGED
@@ -1,42 +1,54 @@
1
- {
2
- "name": "@kickd0wn/react-dev-companion",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "description": "A zero-dependency DevTools overlay for React and Next.js applications.",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.cjs",
13
- "types": "./dist/index.d.ts"
14
- }
15
- },
16
- "files": [
17
- "dist"
18
- ],
19
- "scripts": {
20
- "dev": "vite",
21
- "build": "tsc && vite build",
22
- "prepublishOnly": "npm run build"
23
- },
24
- "keywords": [
25
- "react",
26
- "nextjs",
27
- "devtools",
28
- "storage",
29
- "network-interceptor",
30
- "typescript"
31
- ],
32
- "author": "Kickz1nn <https://github.com/Kickz1nn>",
33
- "license": "MIT",
34
- "repository": {
35
- "type": "git",
36
- "url": "git+https://github.com/Kickz1nn/react-dev-companion.git"
37
- },
38
- "peerDependencies": {
39
- "react": ">=17.0.0",
40
- "react-dom": ">=17.0.0"
41
- }
1
+ {
2
+ "name": "@kickd0wn/react-dev-companion",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "description": "A zero-dependency DevTools overlay for React and Next.js applications.",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "dev": "vite",
21
+ "build": "tsc && vite build",
22
+ "playground": "npm --prefix playground run dev",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "keywords": [
26
+ "react",
27
+ "nextjs",
28
+ "devtools",
29
+ "storage",
30
+ "network-interceptor",
31
+ "typescript"
32
+ ],
33
+ "author": "Kickz1nn <https://github.com/Kickz1nn>",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/Kickz1nn/react-dev-companion.git"
38
+ },
39
+ "peerDependencies": {
40
+ "react": ">=17.0.0",
41
+ "react-dom": ">=17.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@commitlint/cli": "^21.2.4",
45
+ "@commitlint/config-conventional": "^21.2.4",
46
+ "@types/node": "^26.6.6",
47
+ "@types/react": "^19.3.0",
48
+ "@types/react-dom": "^19.3.0",
49
+ "@vitejs/plugin-react": "^6.2.1",
50
+ "typescript": "^6.0.3",
51
+ "vite": "^8.3.6",
52
+ "vite-plugin-dts": "^5.1.2"
53
+ }
42
54
  }