svelte-log-view 5.1.7 → 6.0.1
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/package.json +6 -6
- package/src/LogView.svelte +22 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-log-view",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
42
42
|
"@semantic-release/exec": "^6.0.3",
|
|
43
|
-
"@semantic-release/github": "^10.1.
|
|
43
|
+
"@semantic-release/github": "^10.1.3",
|
|
44
44
|
"@semantic-release/release-notes-generator": "^14.0.1",
|
|
45
45
|
"@sveltejs/vite-plugin-svelte": "^3.1.1",
|
|
46
46
|
"documentation": "^14.0.3",
|
|
47
|
-
"mf-styling": "^3.1.
|
|
47
|
+
"mf-styling": "^3.1.7",
|
|
48
48
|
"npm-pkgbuild": "^15.3.26",
|
|
49
49
|
"reader-line-iterator": "^1.2.0",
|
|
50
50
|
"semantic-release": "^24.0.0",
|
|
51
|
-
"svelte": "^5.0.0-next.
|
|
51
|
+
"svelte": "^5.0.0-next.201",
|
|
52
52
|
"testcafe": "^3.6.2",
|
|
53
|
-
"vite": "^5.3.
|
|
54
|
-
"vite-plugin-compression2": "^1.1.
|
|
53
|
+
"vite": "^5.3.5",
|
|
54
|
+
"vite-plugin-compression2": "^1.1.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"svelte": "^5.0.0-next.0"
|
package/src/LogView.svelte
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { onDestroy } from "svelte";
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
source,
|
|
6
|
+
visibleRows = 10000,
|
|
7
|
+
entries = [],
|
|
8
|
+
visible = entries,
|
|
9
|
+
follow = $bindable(true),
|
|
10
|
+
selected = $bindable(0),
|
|
11
|
+
start = $bindable(0)
|
|
12
|
+
} = $props();
|
|
11
13
|
|
|
12
14
|
let content;
|
|
13
15
|
|
|
14
16
|
onDestroy(() => source.abort());
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
let done = false;
|
|
19
|
+
|
|
20
|
+
$effect(() => {
|
|
21
|
+
if(!done) {
|
|
22
|
+
fetchFollow();
|
|
23
|
+
done = true;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
16
26
|
|
|
17
27
|
async function fetchFollow() {
|
|
18
28
|
let current;
|
|
@@ -130,7 +140,8 @@
|
|
|
130
140
|
|
|
131
141
|
function onclick(event) {
|
|
132
142
|
setFollow(false);
|
|
133
|
-
|
|
143
|
+
const height = event.target.getBoundingClientRect().height; // +4 borde ?
|
|
144
|
+
setSelected(start + Math.floor(event.clientY / height));
|
|
134
145
|
}
|
|
135
146
|
</script>
|
|
136
147
|
|