insikt.js 1.0.0 → 1.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.
package/README.md CHANGED
@@ -1,119 +1,151 @@
1
- # INSIKT
1
+ # INSIKT
2
+
2
3
  [![npm version](https://img.shields.io/npm/v/insikt.js.svg)](https://www.npmjs.com/package/insikt.js)
3
4
  [![Bundle Size](https://img.shields.io/bundlephobia/minzip/insikt.js)](https://bundlephobia.com/package/insikt.js)
4
5
  [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
6
  [![Deploy Pages](https://github.com/benneberg/insikt/actions/workflows/deploy-pages.yml/badge.svg)](https://github.com/benneberg/insikt/actions/workflows/deploy-pages.yml)
6
7
 
7
-
8
8
  **A mobile-first, zero-dependency developer console for debugging directly inside the browser.**
9
9
 
10
- Desktop DevTools are excellent. Mobile debugging is still painful. INSIKT provides a clean, elegant, mobile-first debugging experience directly inside the browser without requiring remote debugging setups or desktop tooling.
10
+ Desktop DevTools are excellent. Mobile debugging is still painful. INSIKT provides a clean, elegant debugging overlay that works directly in the browser no remote setups, no desktop tooling required.
11
11
 
12
12
  > 🌐 **Live Demo & Documentation**: [benneberg.github.io/insikt](https://benneberg.github.io/insikt/)
13
13
 
14
-
15
14
  ---
16
- # Features
17
- - Mobile-first debugging UI
18
- - Console log capture
19
- - Runtime error tracking
20
- - Fetch/XHR interception
21
- - Storage inspection
22
- - Built-in REPL
23
- - Floating overlay interface
24
- - Bookmarklet support
25
- - CDN delivery
26
- - NPM package
27
- - Zero dependencies
15
+
16
+ ## Features
17
+
18
+ - **Console capture** — intercepts `log`, `warn`, `error`, and `info` with timestamps and log-level styling
19
+ - **Network inspector** — monitors Fetch and XHR requests with status, duration, headers, and URL filtering
20
+ - **Runtime error tracking** — captures uncaught exceptions and unhandled promise rejections
21
+ - **Storage inspector** — browse localStorage, sessionStorage, cookies, and IndexedDB
22
+ - **Built-in REPL** — evaluate JavaScript expressions directly in the overlay
23
+ - **DOM inspector** — tap any element on the page to inspect its attributes and structure
24
+ - **Copy to clipboard** — export console logs or network requests as formatted text with one tap
25
+ - **Settings panel** — toggle timestamps, auto-scroll, max entries, font size, and network monitoring
26
+ - **Floating overlay UI** — non-intrusive FAB that stays out of the way until you need it
27
+ - **Bookmarklet support** — inject into any page without modifying source
28
+ - **Zero dependencies** — single file, no build step required for CDN usage
29
+
28
30
  ---
29
- # Why INSIKT?
30
- Desktop DevTools are excellent.
31
- Mobile debugging is still painful.
32
- INSIKT was built to provide a clean, elegant, mobile-first debugging experience directly inside the browser without requiring remote debugging setups or desktop tooling.
33
- The project focuses on:
34
- - simplicity
35
- - speed
36
- - visibility
37
- - minimalism
38
- - developer ergonomics
31
+
32
+ ## Why INSIKT?
33
+
34
+ Mobile debugging has no good native solution. Remote debugging requires cables, separate machines, or platform-specific setup. Browser-based tools exist but feel dated.
35
+
36
+ INSIKT is designed around three principles:
37
+
38
+ - **Precision** — only what you need, nothing you don't
39
+ - **Minimalism** — clean UI that stays out of the way until you need it
40
+ - **Portability** — works via NPM, CDN, or bookmarklet on any page
41
+
39
42
  ---
40
- # Installation
41
- ## NPM
43
+
44
+ ## Installation
45
+
46
+ ### NPM
47
+
42
48
  ```bash
43
49
  npm install insikt.js
44
50
  ```
51
+
45
52
  ```js
46
53
  import 'insikt.js';
47
54
  ```
55
+
56
+ INSIKT auto-initializes on import and exposes `window.insikt` for programmatic control.
57
+
48
58
  ---
49
- ## CDN
59
+
60
+ ### CDN
61
+
50
62
  ```html
51
63
  <script src="https://cdn.jsdelivr.net/npm/insikt.js/dist/insikt.umd.js"></script>
52
64
  ```
65
+
53
66
  ---
54
- ## Bookmarklet
55
- Create a bookmark with this URL:
56
- ```javascript
57
- javascript:(function(){
58
- const s=document.createElement('script');
59
- s.src='https://cdn.jsdelivr.net/npm/insikt.js/dist/insikt.umd.js';
60
- document.body.appendChild(s);
61
- })();
67
+
68
+ ### Bookmarklet
69
+
70
+ Inject INSIKT into any page without modifying its source. Create a bookmark with this URL:
71
+
72
+ ```
73
+ javascript:(function(){const s=document.createElement('script');s.src='https://cdn.jsdelivr.net/npm/insikt.js/dist/insikt.umd.js';document.body.appendChild(s);})();
62
74
  ```
75
+
63
76
  ---
64
- # Usage
65
- INSIKT auto-initializes when loaded.
66
- Global API:
77
+
78
+ ## API
79
+
80
+ INSIKT auto-initializes when loaded. The global `window.insikt` object is available for programmatic control:
81
+
67
82
  ```js
68
- window.insikt.toggle();
69
- window.insikt.clear();
70
- window.insikt.destroy();
71
- window.insikt.init();
83
+ window.insikt.toggle(); // Show or hide the panel
84
+ window.insikt.clear(); // Clear all captured logs
85
+ window.insikt.destroy(); // Remove INSIKT and restore original console/fetch/XHR
86
+ window.insikt.init(); // Re-initialize after destroy
72
87
  ```
88
+
73
89
  ---
74
- # Screenshots
75
- ## Floating Action Button
76
- (Add screenshot)
77
- ## Console Overlay
78
- (Add screenshot)
79
- ## Network Inspector
80
- (Add screenshot)
81
- ---
82
- # Architecture
83
- INSIKT uses:
84
- - console proxying
85
- - fetch/XHR interception
86
- - runtime error listeners
87
- - overlay-based UI rendering
88
- - centralized runtime state
89
- - automatic cleanup lifecycle
90
- The library is designed to remain lightweight and dependency-free.
91
- ---
92
- # Roadmap
93
- - [ ] console.table support
94
- - [ ] IndexedDB viewer
95
- - [ ] WebSocket inspector
96
- - [ ] Performance timeline
97
- - [ ] Plugin API
98
- - [ ] Theme system
99
- - [ ] Session export/import
90
+
91
+ ## Browser Support
92
+
93
+ | Browser | Support |
94
+ |---|---|
95
+ | Safari iOS | ✅ |
96
+ | Chrome Android | ✅ |
97
+ | Samsung Internet | ✅ |
98
+ | Chromium desktop | ✅ |
99
+
100
100
  ---
101
- # Browser Support
102
- - Safari iOS
103
- - Chrome Android
104
- - Samsung Internet
105
- - Chromium desktop browsers
101
+
102
+ ## Architecture
103
+
104
+ INSIKT is a single self-contained IIFE with no external dependencies.
105
+
106
+ - **Console proxying** — wraps `console.log/warn/error/info` and restores originals on destroy
107
+ - **Fetch/XHR interception** — patches `window.fetch` and `XMLHttpRequest` to capture network activity
108
+ - **Error listeners** — binds to `window.onerror` and `unhandledrejection`
109
+ - **Overlay UI** — appends a FAB and panel directly to `document.body`
110
+ - **Centralized state** — single runtime state object; fully reset on destroy
111
+
106
112
  ---
107
- # Development
113
+
114
+ ## Development
115
+
108
116
  ```bash
109
117
  npm install
110
118
  npm run dev
111
119
  ```
120
+
112
121
  Build production bundle:
122
+
113
123
  ```bash
114
124
  npm run build
115
125
  ```
126
+
127
+ Output is written to `dist/` as both ES module (`insikt.es.js`) and UMD (`insikt.umd.js`).
128
+
116
129
  ---
117
- # License
118
- MIT
119
130
 
131
+ ## Roadmap
132
+
133
+ **v1.2**
134
+ - [ ] `console.table` support
135
+ - [ ] `console.group` / `console.groupCollapsed` support
136
+ - [ ] Improved object inspection for deeply nested structures
137
+ - [ ] Network request and response body capture
138
+ - [ ] Persistent log buffer across page reloads
139
+
140
+ **v2.0**
141
+ - [ ] WebSocket inspector
142
+ - [ ] Performance timeline
143
+ - [ ] Log and network session export to file
144
+ - [ ] Plugin API
145
+ - [ ] React/Vue adapters
146
+
147
+ ---
148
+
149
+ ## License
150
+
151
+ MIT