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 +110 -78
- package/dist/insikt.es.js +3347 -75
- package/dist/insikt.es.js.map +1 -1
- package/dist/insikt.umd.js +1 -1
- package/dist/insikt.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,119 +1,151 @@
|
|
|
1
|
-
# INSIKT
|
|
1
|
+
# INSIKT
|
|
2
|
+
|
|
2
3
|
[](https://www.npmjs.com/package/insikt.js)
|
|
3
4
|
[](https://bundlephobia.com/package/insikt.js)
|
|
4
5
|
[](LICENSE)
|
|
5
6
|
[](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
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
- Fetch
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
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
|
-
|
|
41
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
75
|
-
##
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
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
|
-
|
|
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
|