@nocturnium/svelte-ide 1.1.0 → 1.1.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.
@@ -17,13 +17,27 @@
17
17
  lineHeight: number;
18
18
  /** Gutter width in pixels */
19
19
  gutterWidth?: number;
20
+ /**
21
+ * Full height of the scrollable content in pixels. The layer must span the
22
+ * whole document (not just one viewport) or indicators below the first
23
+ * screenful get clipped — which previously hid every high-complexity region
24
+ * that sat past the initial view.
25
+ */
26
+ totalHeight?: number;
20
27
  /** Minimum score to show indicators (default: 50) */
21
28
  minScore?: number;
22
29
  /** Whether indicators are enabled */
23
30
  enabled?: boolean;
24
31
  }
25
32
 
26
- let { metrics, lineHeight, gutterWidth = 50, minScore = 50, enabled = true }: Props = $props();
33
+ let {
34
+ metrics,
35
+ lineHeight,
36
+ gutterWidth = 50,
37
+ totalHeight = 0,
38
+ minScore = 50,
39
+ enabled = true
40
+ }: Props = $props();
27
41
 
28
42
  // Filter regions that exceed the threshold
29
43
  let highlightedRegions = $derived(
@@ -116,7 +130,11 @@
116
130
  </script>
117
131
 
118
132
  {#if enabled && lineScores.size > 0}
119
- <div class="complexity-gutter" aria-hidden="true" style="width: {gutterWidth}px;">
133
+ <div
134
+ class="complexity-gutter"
135
+ aria-hidden="true"
136
+ style="width: {gutterWidth}px;{totalHeight ? ` height: ${totalHeight}px;` : ''}"
137
+ >
120
138
  {#each [...lineScores.entries()] as [line, data] (line)}
121
139
  <div
122
140
  class="complexity-gutter__indicator"
@@ -176,10 +194,11 @@
176
194
  position: absolute;
177
195
  top: 0;
178
196
  left: 0;
197
+ /* Height is set inline to the full content height so indicators below the
198
+ first viewport are not clipped. Fall back to the viewport when unknown. */
179
199
  bottom: 0;
180
200
  pointer-events: none;
181
201
  z-index: 5;
182
- overflow: hidden;
183
202
  }
184
203
 
185
204
  .complexity-gutter__indicator {
@@ -6,6 +6,13 @@ interface Props {
6
6
  lineHeight: number;
7
7
  /** Gutter width in pixels */
8
8
  gutterWidth?: number;
9
+ /**
10
+ * Full height of the scrollable content in pixels. The layer must span the
11
+ * whole document (not just one viewport) or indicators below the first
12
+ * screenful get clipped — which previously hid every high-complexity region
13
+ * that sat past the initial view.
14
+ */
15
+ totalHeight?: number;
9
16
  /** Minimum score to show indicators (default: 50) */
10
17
  minScore?: number;
11
18
  /** Whether indicators are enabled */
@@ -1005,6 +1005,7 @@
1005
1005
  metrics={complexityMetrics}
1006
1006
  {lineHeight}
1007
1007
  {gutterWidth}
1008
+ totalHeight={totalContentHeight}
1008
1009
  minScore={complexityThreshold}
1009
1010
  enabled={complexityHighlighting}
1010
1011
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocturnium/svelte-ide",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Svelte 5 code editor and IDE building blocks — custom editor, syntax highlighting, code folding, multi-cursor, LSP client, and optional realtime collaboration.",
5
5
  "author": "Nocturnium & Jordan Dziat <hello@nocturnium.ai> (https://nocturnium.ai)",
6
6
  "license": "MIT",