logbubble 0.2.0 → 0.2.2
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 +6 -2
- package/dist/ui/dragHandler.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ A lightweight, floating log viewer for monitoring network requests and console l
|
|
|
8
8
|
|
|
9
9
|
[View on npm](https://www.npmjs.com/package/logbubble)
|
|
10
10
|
|
|
11
|
+
## Demo Video
|
|
12
|
+
|
|
13
|
+
[](https://youtu.be/pU-_eQViwQI)
|
|
14
|
+
|
|
11
15
|
## Features
|
|
12
16
|
|
|
13
17
|
✨ **Floating UI**: Non-intrusive bubble interface that stays accessible without blocking your app
|
|
@@ -64,11 +68,11 @@ npm install logbubble
|
|
|
64
68
|
|
|
65
69
|
```javascript
|
|
66
70
|
// vite.config.js
|
|
67
|
-
import
|
|
71
|
+
import logBubblePlugin from "logbubble/vite-logbubble-plugin";
|
|
68
72
|
|
|
69
73
|
export default {
|
|
70
74
|
plugins: [
|
|
71
|
-
|
|
75
|
+
logBubblePlugin(),
|
|
72
76
|
// ...other plugins
|
|
73
77
|
],
|
|
74
78
|
};
|
package/dist/ui/dragHandler.js
CHANGED
|
@@ -12,8 +12,8 @@ export class DragHandler {
|
|
|
12
12
|
this.didActuallyDrag = false;
|
|
13
13
|
this.buttonX = 0;
|
|
14
14
|
this.buttonY = 0;
|
|
15
|
-
this.buttonX = window.innerWidth -
|
|
16
|
-
this.buttonY =
|
|
15
|
+
this.buttonX = window.innerWidth - 72;
|
|
16
|
+
this.buttonY = 24;
|
|
17
17
|
this.updateButtonPosition();
|
|
18
18
|
}
|
|
19
19
|
attachListeners() {
|
|
@@ -94,7 +94,7 @@ export class DragHandler {
|
|
|
94
94
|
}
|
|
95
95
|
snapToCorner() {
|
|
96
96
|
const buttonSize = 48;
|
|
97
|
-
const margin =
|
|
97
|
+
const margin = 24;
|
|
98
98
|
const centerX = this.buttonX + buttonSize / 2;
|
|
99
99
|
const centerY = this.buttonY + buttonSize / 2;
|
|
100
100
|
const isLeftHalf = centerX < window.innerWidth / 2;
|