pi-studio 0.1.9 → 0.2.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/CHANGELOG.md +33 -0
- package/README.md +37 -14
- package/assets/screenshots/dark-code-mode.png +0 -0
- package/assets/screenshots/dark-julia-fenced.png +0 -0
- package/assets/screenshots/dark-math.png +0 -0
- package/assets/screenshots/dark-mermaid.png +0 -0
- package/assets/screenshots/dark-workspace.png +0 -0
- package/assets/screenshots/light-code-mode.png +0 -0
- package/assets/screenshots/light-math.png +0 -0
- package/assets/screenshots/light-workspace.png +0 -0
- package/index.ts +642 -76
- package/package.json +1 -1
- package/assets/screenshots/dark-annotation.png +0 -0
- package/assets/screenshots/dark-critique.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `pi-studio` are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.2.1] — 2026-03-02
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Language-aware syntax highlighting**: selectable `Lang:` dropdown (Markdown, JavaScript, TypeScript, Python, Bash, JSON, Rust, C, C++, Julia, Fortran, R, MATLAB).
|
|
9
|
+
- Language auto-detected from file extension when loading files; manually overridable via dropdown.
|
|
10
|
+
- Full-document code highlighting in editor Raw view when a non-markdown language is selected (reuses fenced-block tokenizer across entire content).
|
|
11
|
+
- Code-aware Preview: when a code language is selected, Preview renders syntax-highlighted `<pre>` instead of sending to pandoc.
|
|
12
|
+
- Language preference persisted to `localStorage` across sessions.
|
|
13
|
+
- New tokenizer patterns for Rust, C/C++, Julia, Fortran, R, and MATLAB (keywords, strings, comments, numbers).
|
|
14
|
+
- Expanded file-accept list for Load file content (`.h`, `.hpp`, `.jl`, `.f90`, `.f95`, `.f03`, `.f`, `.for`, `.r`, `.R`, `.m`, `.lua`).
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Renamed "Load file in editor" → "Load file content" (clarifies that file content is copied, not edited in-place).
|
|
18
|
+
- Lang selector visibility: shown when syntax highlight is On (Raw view) or in Preview mode; hidden otherwise.
|
|
19
|
+
- Updated README with comprehensive screenshot gallery (markdown, math, mermaid, code mode, fenced code).
|
|
20
|
+
|
|
21
|
+
## [0.2.0] — 2026-03-02
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Luminance-based canvas color derivation from theme surface colors — proper bg/panel/panel2 tiers instead of flat mid-tone mapping.
|
|
25
|
+
- Dedicated `--editor-bg` CSS variable — editor text box pushed toward white (light) for a crisp paper feel.
|
|
26
|
+
- `Cmd/Ctrl+Enter` keyboard shortcut to trigger "Run editor text" when editor pane is active.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- Renamed "Highlight markdown: On/Off" → "Syntax highlight: On/Off".
|
|
30
|
+
- Renamed "Editor: Markdown" / "Response: Markdown" → "Editor: Raw" / "Response: Raw" (future-proofing for non-markdown formats).
|
|
31
|
+
- Active pane indicator simplified to subtle border color change (removed thick top accent bar).
|
|
32
|
+
- Panel shadows, button hierarchy (filled accent for primary actions), heading scale, blockquote/table styling improvements.
|
|
33
|
+
|
|
5
34
|
## [Unreleased]
|
|
6
35
|
|
|
7
36
|
### Added
|
|
@@ -39,6 +68,10 @@ All notable changes to `pi-studio` are documented here.
|
|
|
39
68
|
- Studio still live-updates latest response when assistant output arrives outside studio requests (e.g., manual send from pi editor).
|
|
40
69
|
- Preview pane typography/style now follows the higher-fidelity `/preview-browser` rendering style more closely.
|
|
41
70
|
- Preview mode now uses pandoc code highlighting output for syntax-colored code blocks.
|
|
71
|
+
- Preview markdown styling now maps markdown (`md*`) and syntax (`syntax*`) theme tokens for closer parity with terminal rendering.
|
|
72
|
+
- Theme surface mapping now uses theme-export backgrounds when available (`pageBg`, `cardBg`, `infoBg`) for clearer depth across `bg/panel/panel2`.
|
|
73
|
+
- Mermaid preview now uses palette-driven Mermaid defaults (base theme + theme variables) for better visual fit with active pi themes.
|
|
74
|
+
- Studio chrome was refined for a cleaner visual hierarchy (subtle panel shadows, primary action emphasis, lighter active-pane accent bar, softer heading scale, table striping, and tinted blockquotes).
|
|
42
75
|
- Hardened Studio preview HTTP handling and added client-side preview-request timeout to avoid stuck "Rendering preview…" states.
|
|
43
76
|
|
|
44
77
|
### Fixed
|
package/README.md
CHANGED
|
@@ -6,21 +6,37 @@ Status: experimental alpha.
|
|
|
6
6
|
|
|
7
7
|
## Screenshots
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**Markdown workspace — dark** (syntax-highlighted editor + rendered preview with code blocks, inline math, blockquotes)
|
|
10
10
|
|
|
11
11
|

|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**Markdown workspace — light**
|
|
14
14
|
|
|
15
|
-

|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**Math rendering** (LaTeX source → MathML: PDEs, matrices, display equations)
|
|
18
18
|
|
|
19
|
-

|
|
20
|
+
|
|
21
|
+
**Math rendering — light**
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
**Mermaid diagrams** (fenced mermaid block → rendered flowchart with theme-aware colors)
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
**Code mode — dark** (TypeScript file with language-aware syntax highlighting, auto-detected from file extension)
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
**Code mode — light**
|
|
34
|
+
|
|
35
|
+

|
|
20
36
|
|
|
21
|
-
**
|
|
37
|
+
**Fenced code highlighting** (Julia code block inside markdown with token coloring)
|
|
22
38
|
|
|
23
|
-

|
|
24
40
|
|
|
25
41
|
## Features
|
|
26
42
|
|
|
@@ -31,11 +47,18 @@ Status: experimental alpha.
|
|
|
31
47
|
- Response load helpers:
|
|
32
48
|
- non-critique: **Load response into editor**
|
|
33
49
|
- critique: **Load critique (notes)** / **Load critique (full)**
|
|
34
|
-
- File actions: **Save As…**, **Save file**, **Load file
|
|
35
|
-
- View toggles: `Editor:
|
|
50
|
+
- File actions: **Save As…**, **Save file**, **Load file content**
|
|
51
|
+
- View toggles: `Editor: Raw|Preview`, `Response: Raw|Preview`
|
|
36
52
|
- Preview mode supports MathML equations and Mermaid fenced diagrams
|
|
37
|
-
-
|
|
38
|
-
-
|
|
53
|
+
- **Language-aware syntax highlighting** with selectable language mode:
|
|
54
|
+
- Markdown (default): headings, links, code fences, lists, quotes, inline code
|
|
55
|
+
- Code languages: JavaScript, TypeScript, Python, Bash, JSON, Rust, C, C++, Julia, Fortran, R, MATLAB
|
|
56
|
+
- Keywords, strings, comments, numbers, and variables highlighted using theme syntax color tokens
|
|
57
|
+
- Language auto-detected from file extension on file load; manually selectable via `Lang:` dropdown
|
|
58
|
+
- Applies to both editor Raw view (highlight overlay) and fenced code blocks in markdown
|
|
59
|
+
- Preview mode renders syntax-highlighted code when a non-markdown language is selected
|
|
60
|
+
- Separate syntax highlight toggles for editor and response Raw views, with local preference persistence
|
|
61
|
+
- Theme-aware browser UI based on current pi theme, with refined surface depth and lighter visual chrome
|
|
39
62
|
|
|
40
63
|
## Commands
|
|
41
64
|
|
|
@@ -73,15 +96,15 @@ pi -e https://github.com/omaclaren/pi-studio
|
|
|
73
96
|
|
|
74
97
|
- Local-only server (`127.0.0.1`) with rotating session tokens.
|
|
75
98
|
- One studio request at a time.
|
|
76
|
-
- Pi Studio
|
|
99
|
+
- Pi Studio supports both markdown workflows (model responses, plans, and notes) and code file editing with language-aware syntax highlighting.
|
|
77
100
|
- Studio URLs include a token query parameter; avoid sharing full Studio URLs.
|
|
78
101
|
- Preview panes render markdown via `pandoc` (`gfm+tex_math_dollars` → HTML5 + MathML), including pandoc code syntax highlighting, sanitized in-browser with `dompurify`.
|
|
79
|
-
-
|
|
102
|
+
- Preview markdown/code colors are mapped from active theme markdown (`md*`) and syntax (`syntax*`) tokens for closer terminal-vs-browser parity.
|
|
103
|
+
- Mermaid fenced `mermaid` code blocks are rendered client-side in preview mode (Mermaid v11 loaded from jsDelivr), with palette-driven defaults for better theme fit.
|
|
80
104
|
- If Mermaid cannot load or a diagram fails to render, preview shows an inline warning and keeps source text visible.
|
|
81
105
|
- Preview rendering normalizes Obsidian wiki-image syntax (`![[path]]`, `![[path|alt]]`) into standard markdown images.
|
|
82
106
|
- Install pandoc for full preview rendering (`brew install pandoc` on macOS).
|
|
83
107
|
- If `pandoc` is unavailable, preview falls back to plain markdown text with an inline warning.
|
|
84
|
-
- Some screenshots may show the Grammarly browser widget. Grammarly is a separate browser extension and is not part of pi-studio, but it works alongside it.
|
|
85
108
|
|
|
86
109
|
## License
|
|
87
110
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|