pi-studio 0.6.2 → 0.6.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/CHANGELOG.md +6 -0
- package/client/studio.css +5 -5
- package/index.ts +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `pi-studio` are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.6.3] — 2026-04-29
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Polished rendered code blocks so ordinary code text uses normal foreground, Python function definitions keep function-name highlighting, and fenced-block borders are softened to better match theme intent.
|
|
11
|
+
- Slightly sharpened footer metadata and shortcut text for better readability across darker custom themes.
|
|
12
|
+
|
|
7
13
|
## [0.6.2] — 2026-04-29
|
|
8
14
|
|
|
9
15
|
### Changed
|
package/client/studio.css
CHANGED
|
@@ -1143,7 +1143,7 @@
|
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
1145
|
.rendered-markdown pre code {
|
|
1146
|
-
color: var(--
|
|
1146
|
+
color: var(--text);
|
|
1147
1147
|
white-space: inherit;
|
|
1148
1148
|
}
|
|
1149
1149
|
|
|
@@ -1846,7 +1846,7 @@
|
|
|
1846
1846
|
footer {
|
|
1847
1847
|
border-top: 1px solid var(--panel-border);
|
|
1848
1848
|
padding: 8px 12px;
|
|
1849
|
-
color: var(--muted);
|
|
1849
|
+
color: var(--studio-footer-text, var(--muted));
|
|
1850
1850
|
font-size: 12px;
|
|
1851
1851
|
min-height: 32px;
|
|
1852
1852
|
background: var(--panel);
|
|
@@ -1903,7 +1903,7 @@
|
|
|
1903
1903
|
.footer-meta {
|
|
1904
1904
|
grid-area: meta;
|
|
1905
1905
|
justify-self: start;
|
|
1906
|
-
color: var(--muted);
|
|
1906
|
+
color: var(--studio-footer-text, var(--muted));
|
|
1907
1907
|
font-size: 11px;
|
|
1908
1908
|
text-align: left;
|
|
1909
1909
|
max-width: 100%;
|
|
@@ -1954,12 +1954,12 @@
|
|
|
1954
1954
|
grid-area: hint;
|
|
1955
1955
|
justify-self: end;
|
|
1956
1956
|
align-self: center;
|
|
1957
|
-
color: var(--muted);
|
|
1957
|
+
color: var(--studio-footer-text, var(--muted));
|
|
1958
1958
|
font-size: 11px;
|
|
1959
1959
|
white-space: nowrap;
|
|
1960
1960
|
text-align: right;
|
|
1961
1961
|
font-style: normal;
|
|
1962
|
-
opacity: 0.
|
|
1962
|
+
opacity: 0.86;
|
|
1963
1963
|
display: inline-flex;
|
|
1964
1964
|
align-items: center;
|
|
1965
1965
|
gap: 8px;
|
package/index.ts
CHANGED
|
@@ -4341,6 +4341,13 @@ async function writeStudioSystemClipboard(text: string): Promise<{ ok: true; met
|
|
|
4341
4341
|
return { ok: false, error: errors.join("; ") || "No system clipboard command is available." };
|
|
4342
4342
|
}
|
|
4343
4343
|
|
|
4344
|
+
function decorateStudioPandocSyntaxHtml(html: string): string {
|
|
4345
|
+
return html.replace(
|
|
4346
|
+
/(<span class="kw">def<\/span>)(\s*)([A-Za-z_][A-Za-z0-9_]*)(?=\s*\()/g,
|
|
4347
|
+
(_match, keyword: string, spacing: string, name: string) => `${keyword}${spacing}<span class="fu">${name}</span>`,
|
|
4348
|
+
);
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4344
4351
|
async function renderStudioMarkdownWithPandoc(markdown: string, isLatex?: boolean, resourcePath?: string, sourcePath?: string): Promise<string> {
|
|
4345
4352
|
const pandocCommand = process.env.PANDOC_PATH?.trim() || "pandoc";
|
|
4346
4353
|
const markdownWithoutHtmlComments = isLatex ? markdown : stripStudioMarkdownHtmlComments(markdown);
|
|
@@ -4421,6 +4428,7 @@ async function renderStudioMarkdownWithPandoc(markdown: string, isLatex?: boolea
|
|
|
4421
4428
|
} else {
|
|
4422
4429
|
html = decorateStudioPreviewPageBreakHtml(html);
|
|
4423
4430
|
}
|
|
4431
|
+
html = decorateStudioPandocSyntaxHtml(html);
|
|
4424
4432
|
succeed(stripMathMlAnnotationTags(html));
|
|
4425
4433
|
return;
|
|
4426
4434
|
}
|
|
@@ -6210,6 +6218,8 @@ function buildThemeCssVars(style: StudioThemeStyle): Record<string, string> {
|
|
|
6210
6218
|
style.mode === "light" ? 0.13 : 0.18,
|
|
6211
6219
|
style.mode === "light" ? "rgba(15, 23, 42, 0.06)" : "rgba(255, 255, 255, 0.07)",
|
|
6212
6220
|
);
|
|
6221
|
+
const rawCodeBlockBorder = blendColors(style.palette.mdCodeBlockBorder, style.palette.panel2, style.mode === "light" ? 0.62 : 0.72);
|
|
6222
|
+
const codeBlockBorder = capBorderContrast(rawCodeBlockBorder, style.palette.panel2, style.mode === "light" ? 1.16 : 1.18);
|
|
6213
6223
|
const diffAddedBg = withAlpha(style.palette.ok, style.mode === "light" ? 0.10 : 0.14, "rgba(46, 160, 67, 0.12)");
|
|
6214
6224
|
const diffRemovedBg = withAlpha(style.palette.error, style.mode === "light" ? 0.10 : 0.14, "rgba(248, 81, 73, 0.12)");
|
|
6215
6225
|
const okSoft = withAlpha(style.palette.ok, style.mode === "light" ? 0.10 : 0.12, "rgba(115, 209, 61, 0.08)");
|
|
@@ -6228,6 +6238,7 @@ function buildThemeCssVars(style: StudioThemeStyle): Record<string, string> {
|
|
|
6228
6238
|
const scratchpadHeaderBg = style.mode === "light" ? lightSecondarySurface : style.palette.panel2;
|
|
6229
6239
|
const scratchpadBodyBg = style.mode === "light" ? lightPrimarySurface : style.palette.panel;
|
|
6230
6240
|
const infoText = blendColors(style.palette.text, style.palette.muted, style.mode === "light" ? 0.36 : 0.30);
|
|
6241
|
+
const footerText = blendColors(style.palette.text, style.palette.muted, style.mode === "light" ? 0.50 : 0.42);
|
|
6231
6242
|
const headerActionBg = style.mode === "light" ? lightPrimarySurface : "transparent";
|
|
6232
6243
|
const headerActionHoverBg = style.mode === "light" ? lightPrimarySurface : style.palette.panel2;
|
|
6233
6244
|
const headerActionBorder = style.mode === "light" ? controlBorder : "transparent";
|
|
@@ -6264,7 +6275,7 @@ function buildThemeCssVars(style: StudioThemeStyle): Record<string, string> {
|
|
|
6264
6275
|
"--md-link-url": style.palette.mdLinkUrl,
|
|
6265
6276
|
"--md-code": style.palette.mdCode,
|
|
6266
6277
|
"--md-codeblock": style.palette.mdCodeBlock,
|
|
6267
|
-
"--md-codeblock-border":
|
|
6278
|
+
"--md-codeblock-border": codeBlockBorder,
|
|
6268
6279
|
"--md-quote": style.palette.mdQuote,
|
|
6269
6280
|
"--md-quote-border": style.palette.mdQuoteBorder,
|
|
6270
6281
|
"--md-hr": style.palette.mdHr,
|
|
@@ -6298,6 +6309,7 @@ function buildThemeCssVars(style: StudioThemeStyle): Record<string, string> {
|
|
|
6298
6309
|
"--scratchpad-header-bg": scratchpadHeaderBg,
|
|
6299
6310
|
"--scratchpad-body-bg": scratchpadBodyBg,
|
|
6300
6311
|
"--studio-info-text": infoText,
|
|
6312
|
+
"--studio-footer-text": footerText,
|
|
6301
6313
|
"--studio-header-action-bg": headerActionBg,
|
|
6302
6314
|
"--studio-header-action-hover-bg": headerActionHoverBg,
|
|
6303
6315
|
"--studio-header-action-border": headerActionBorder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-studio",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Two-pane browser workspace for pi with prompt/response editing, annotations, critiques, prompt/response history, and live Markdown/LaTeX/code preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|