pi-studio 0.5.4 → 0.5.5
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/CHANGELOG.md +9 -0
- package/index.ts +18 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -88,6 +88,15 @@ All notable changes to `pi-studio` are documented here.
|
|
|
88
88
|
|
|
89
89
|
## [Unreleased]
|
|
90
90
|
|
|
91
|
+
## [0.5.5] — 2026-03-09
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
- Improved raw-editor caret/overlay alignment in Syntax highlight mode:
|
|
95
|
+
- width-neutral annotation highlight styling
|
|
96
|
+
- more textarea-like wrap behavior in the highlight overlay
|
|
97
|
+
- preserved empty trailing lines in highlighted output so end-of-file blank lines stay aligned
|
|
98
|
+
- reduced raw overlay metric drift for comment/quote styling
|
|
99
|
+
|
|
91
100
|
## [0.5.4] — 2026-03-09
|
|
92
101
|
|
|
93
102
|
### Added
|
package/index.ts
CHANGED
|
@@ -2165,6 +2165,7 @@ ${cssVarsBlock}
|
|
|
2165
2165
|
border-radius: 8px;
|
|
2166
2166
|
background: var(--editor-bg);
|
|
2167
2167
|
overflow: hidden;
|
|
2168
|
+
overscroll-behavior: none;
|
|
2168
2169
|
}
|
|
2169
2170
|
|
|
2170
2171
|
.editor-highlight {
|
|
@@ -2177,7 +2178,9 @@ ${cssVarsBlock}
|
|
|
2177
2178
|
overflow: auto;
|
|
2178
2179
|
pointer-events: none;
|
|
2179
2180
|
white-space: pre-wrap;
|
|
2180
|
-
word-break:
|
|
2181
|
+
word-break: normal;
|
|
2182
|
+
overflow-wrap: break-word;
|
|
2183
|
+
overscroll-behavior: none;
|
|
2181
2184
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
2182
2185
|
font-size: 13px;
|
|
2183
2186
|
line-height: 1.45;
|
|
@@ -2197,6 +2200,7 @@ ${cssVarsBlock}
|
|
|
2197
2200
|
background: transparent;
|
|
2198
2201
|
resize: none;
|
|
2199
2202
|
outline: none;
|
|
2203
|
+
overscroll-behavior: none;
|
|
2200
2204
|
}
|
|
2201
2205
|
|
|
2202
2206
|
#sourceText.highlight-active {
|
|
@@ -2240,7 +2244,7 @@ ${cssVarsBlock}
|
|
|
2240
2244
|
|
|
2241
2245
|
.hl-code-com {
|
|
2242
2246
|
color: var(--syntax-comment);
|
|
2243
|
-
font-style:
|
|
2247
|
+
font-style: normal;
|
|
2244
2248
|
}
|
|
2245
2249
|
|
|
2246
2250
|
.hl-code-var,
|
|
@@ -2269,7 +2273,7 @@ ${cssVarsBlock}
|
|
|
2269
2273
|
|
|
2270
2274
|
.hl-quote {
|
|
2271
2275
|
color: var(--md-quote);
|
|
2272
|
-
font-style:
|
|
2276
|
+
font-style: normal;
|
|
2273
2277
|
}
|
|
2274
2278
|
|
|
2275
2279
|
.hl-link {
|
|
@@ -2284,9 +2288,10 @@ ${cssVarsBlock}
|
|
|
2284
2288
|
.hl-annotation {
|
|
2285
2289
|
color: var(--accent);
|
|
2286
2290
|
background: var(--accent-soft);
|
|
2287
|
-
border:
|
|
2291
|
+
border: 0;
|
|
2288
2292
|
border-radius: 4px;
|
|
2289
|
-
padding: 0
|
|
2293
|
+
padding: 0;
|
|
2294
|
+
box-shadow: inset 0 0 0 1px var(--marker-border);
|
|
2290
2295
|
}
|
|
2291
2296
|
|
|
2292
2297
|
.hl-annotation-muted {
|
|
@@ -3177,6 +3182,7 @@ ${cssVarsBlock}
|
|
|
3177
3182
|
let editorHighlightRenderRaf = null;
|
|
3178
3183
|
let annotationsEnabled = true;
|
|
3179
3184
|
const ANNOTATION_MARKER_REGEX = /\\[an:\\s*([^\\]\\n]+?)\\]/gi;
|
|
3185
|
+
const EMPTY_OVERLAY_LINE = "\\u200b";
|
|
3180
3186
|
const MERMAID_CDN_URL = "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";
|
|
3181
3187
|
const MERMAID_CONFIG = ${JSON.stringify(mermaidConfig)};
|
|
3182
3188
|
const MERMAID_UNAVAILABLE_MESSAGE = "Mermaid renderer unavailable. Showing mermaid blocks as code.";
|
|
@@ -5073,7 +5079,12 @@ ${cssVarsBlock}
|
|
|
5073
5079
|
}
|
|
5074
5080
|
|
|
5075
5081
|
if (inFence) {
|
|
5076
|
-
out.push(line.length > 0 ? highlightCodeLine(line, fenceLanguage) :
|
|
5082
|
+
out.push(line.length > 0 ? highlightCodeLine(line, fenceLanguage) : EMPTY_OVERLAY_LINE);
|
|
5083
|
+
continue;
|
|
5084
|
+
}
|
|
5085
|
+
|
|
5086
|
+
if (line.length === 0) {
|
|
5087
|
+
out.push(EMPTY_OVERLAY_LINE);
|
|
5077
5088
|
continue;
|
|
5078
5089
|
}
|
|
5079
5090
|
|
|
@@ -5112,7 +5123,7 @@ ${cssVarsBlock}
|
|
|
5112
5123
|
const out = [];
|
|
5113
5124
|
for (const line of lines) {
|
|
5114
5125
|
if (line.length === 0) {
|
|
5115
|
-
out.push(
|
|
5126
|
+
out.push(EMPTY_OVERLAY_LINE);
|
|
5116
5127
|
} else if (lang) {
|
|
5117
5128
|
out.push(highlightCodeLine(line, lang));
|
|
5118
5129
|
} else {
|