svelte-log-view 6.3.1 → 6.3.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-log-view",
3
- "version": "6.3.1",
3
+ "version": "6.3.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -73,22 +73,16 @@
73
73
  }
74
74
 
75
75
  if (selected < 0) {
76
- const cursor = entries[0];
76
+ const additionalEntries = [];
77
77
 
78
- for (let i = 0; i < fetchAboveRows; i++) {
79
- entries.unshift();
78
+ for await (const entry of source.fetch(entries[0], -fetchAboveRows, fetchAboveRows)) {
79
+ additionalEntries.push(entry);
80
80
  }
81
81
 
82
- selected += fetchAboveRows;
83
- offsetRows += fetchAboveRows;
82
+ entries.unshift(...additionalEntries);
84
83
 
85
- let i = 0;
86
- for await (const entry of source.fetch(cursor, -fetchAboveRows, fetchAboveRows)) {
87
- entries[i++] = entry;
88
- if (i >= fetchAboveRows) {
89
- break;
90
- }
91
- }
84
+ selected += additionalEntries.length;
85
+ offsetRows += additionalEntries.length;
92
86
  }
93
87
 
94
88
  if (selected < offsetRows) {
@@ -157,10 +151,8 @@
157
151
  </script>
158
152
 
159
153
  <svelte:window {onkeydown} />
160
- <log-content bind:this={content}>
154
+ <log-content {onclick} {onkeydown} bind:this={content} role="none">
161
155
  {#each visible as entry, i (i)}
162
- <log-row {onclick} {onkeydown} role="none">
163
- {@render row(entry, selected, offsetRows + i, follow)}
164
- </log-row>
156
+ {@render row(entry, selected, offsetRows + i, follow)}
165
157
  {/each}
166
158
  </log-content>
package/src/log.css CHANGED
@@ -3,8 +3,3 @@ log-content {
3
3
  overflow-y: auto;
4
4
  display: block;
5
5
  }
6
-
7
- log-row {
8
- display: block;
9
- overflow: hidden;
10
- }