pi-studio 0.5.45 → 0.5.47
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 +18 -0
- package/README.md +1 -1
- package/client/studio-client.js +1212 -11
- package/client/studio.css +99 -5
- package/index.ts +5 -2
- package/package.json +1 -1
package/client/studio.css
CHANGED
|
@@ -661,6 +661,29 @@
|
|
|
661
661
|
-webkit-text-fill-color: transparent;
|
|
662
662
|
}
|
|
663
663
|
|
|
664
|
+
.editor-selection-comment-btn {
|
|
665
|
+
position: absolute;
|
|
666
|
+
top: 12px;
|
|
667
|
+
right: 12px;
|
|
668
|
+
z-index: 4;
|
|
669
|
+
min-height: 24px;
|
|
670
|
+
border-radius: 999px;
|
|
671
|
+
padding: 0 10px;
|
|
672
|
+
font-size: 12px;
|
|
673
|
+
line-height: 1;
|
|
674
|
+
background: var(--accent-soft);
|
|
675
|
+
border-color: var(--accent);
|
|
676
|
+
color: var(--accent);
|
|
677
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.editor-selection-comment-btn:hover,
|
|
681
|
+
.editor-selection-comment-btn:focus-visible {
|
|
682
|
+
background: var(--accent-soft-strong);
|
|
683
|
+
color: var(--accent);
|
|
684
|
+
border-color: var(--accent);
|
|
685
|
+
}
|
|
686
|
+
|
|
664
687
|
.hl-heading {
|
|
665
688
|
color: var(--md-heading);
|
|
666
689
|
font-weight: 700;
|
|
@@ -867,6 +890,75 @@
|
|
|
867
890
|
margin-bottom: 1em;
|
|
868
891
|
}
|
|
869
892
|
|
|
893
|
+
.preview-comment-block {
|
|
894
|
+
position: relative;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.preview-comment-block-content {
|
|
898
|
+
scroll-margin-top: 24px;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.preview-comment-controls {
|
|
902
|
+
position: absolute;
|
|
903
|
+
top: 0;
|
|
904
|
+
right: 0;
|
|
905
|
+
z-index: 4;
|
|
906
|
+
display: inline-flex;
|
|
907
|
+
align-items: center;
|
|
908
|
+
gap: 8px;
|
|
909
|
+
transform: translateY(-0.38rem);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
.preview-comment-summary {
|
|
913
|
+
display: none !important;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.preview-comment-add {
|
|
917
|
+
display: inline-flex;
|
|
918
|
+
align-items: center;
|
|
919
|
+
justify-content: center;
|
|
920
|
+
min-height: 24px;
|
|
921
|
+
border-radius: 999px;
|
|
922
|
+
padding: 0 10px;
|
|
923
|
+
font-size: 12px;
|
|
924
|
+
line-height: 1;
|
|
925
|
+
opacity: 0;
|
|
926
|
+
pointer-events: none;
|
|
927
|
+
transform: translateY(-2px);
|
|
928
|
+
transition: opacity 120ms ease, transform 120ms ease, color 120ms ease, border-color 120ms ease, background-color 120ms ease;
|
|
929
|
+
background: var(--accent-soft);
|
|
930
|
+
border-color: var(--accent);
|
|
931
|
+
color: var(--accent);
|
|
932
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.preview-comment-block.has-selection .preview-comment-add {
|
|
936
|
+
opacity: 1;
|
|
937
|
+
pointer-events: auto;
|
|
938
|
+
transform: translateY(0);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.preview-comment-add:hover,
|
|
942
|
+
.preview-comment-add:focus-visible {
|
|
943
|
+
background: var(--accent-soft-strong);
|
|
944
|
+
color: var(--accent);
|
|
945
|
+
border-color: var(--accent);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.preview-jump-highlight {
|
|
949
|
+
border-radius: 10px;
|
|
950
|
+
background: linear-gradient(to right, var(--accent-soft-strong) 0, var(--accent-soft) 3px, transparent 3px, transparent 100%);
|
|
951
|
+
box-shadow: 0 0 0 1px var(--accent-soft);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.preview-comment-inline-highlight {
|
|
955
|
+
background: var(--accent-soft-strong);
|
|
956
|
+
color: inherit;
|
|
957
|
+
border-radius: 4px;
|
|
958
|
+
padding: 0 0.08em;
|
|
959
|
+
box-shadow: 0 0 0 1px var(--accent-soft);
|
|
960
|
+
}
|
|
961
|
+
|
|
870
962
|
.rendered-markdown li::marker {
|
|
871
963
|
color: var(--md-list-bullet);
|
|
872
964
|
}
|
|
@@ -1856,14 +1948,16 @@
|
|
|
1856
1948
|
}
|
|
1857
1949
|
|
|
1858
1950
|
#reviewNotesAddBtn:not(:disabled) {
|
|
1859
|
-
|
|
1860
|
-
border-color: var(--
|
|
1861
|
-
|
|
1862
|
-
font-weight:
|
|
1951
|
+
color: var(--muted);
|
|
1952
|
+
border-color: var(--border-muted);
|
|
1953
|
+
background: var(--panel);
|
|
1954
|
+
font-weight: 500;
|
|
1863
1955
|
}
|
|
1864
1956
|
|
|
1865
1957
|
#reviewNotesAddBtn:not(:disabled):hover {
|
|
1866
|
-
|
|
1958
|
+
color: var(--text);
|
|
1959
|
+
border-color: var(--accent-soft-strong);
|
|
1960
|
+
background: var(--panel-2);
|
|
1867
1961
|
}
|
|
1868
1962
|
|
|
1869
1963
|
.review-note-delete-btn:not(:disabled) {
|
package/index.ts
CHANGED
|
@@ -121,6 +121,7 @@ interface PersistedStudioReviewNote {
|
|
|
121
121
|
lineStart: number;
|
|
122
122
|
lineEnd: number;
|
|
123
123
|
selectedText: string;
|
|
124
|
+
selectedDisplayText?: string;
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
interface StudioPersistentState {
|
|
@@ -285,6 +286,7 @@ function normalizePersistedStudioReviewNote(value: unknown): PersistedStudioRevi
|
|
|
285
286
|
lineStart,
|
|
286
287
|
lineEnd,
|
|
287
288
|
selectedText: typeof candidate.selectedText === "string" ? candidate.selectedText : "",
|
|
289
|
+
selectedDisplayText: typeof candidate.selectedDisplayText === "string" ? candidate.selectedDisplayText : "",
|
|
288
290
|
};
|
|
289
291
|
}
|
|
290
292
|
|
|
@@ -6173,6 +6175,7 @@ ${cssVarsBlock}
|
|
|
6173
6175
|
<div id="lineNumberMeasure" class="editor-line-number-measure" aria-hidden="true"></div>
|
|
6174
6176
|
<pre id="sourceHighlight" class="editor-highlight" aria-hidden="true"></pre>
|
|
6175
6177
|
<textarea id="sourceText" placeholder="Paste or edit text here.">${initialText}</textarea>
|
|
6178
|
+
<button id="editorSelectionCommentBtn" type="button" class="editor-selection-comment-btn" hidden title="Create a new local comment from the current editor selection.">Comment</button>
|
|
6176
6179
|
</div>
|
|
6177
6180
|
<div id="sourcePreview" class="panel-scroll rendered-markdown" hidden><pre class="plain-markdown"></pre></div>
|
|
6178
6181
|
</div>
|
|
@@ -6188,11 +6191,11 @@ ${cssVarsBlock}
|
|
|
6188
6191
|
<div class="review-notes-toolbar">
|
|
6189
6192
|
<span id="reviewNotesMeta" class="scratchpad-meta">No comments</span>
|
|
6190
6193
|
</div>
|
|
6191
|
-
<div id="reviewNotesEmptyState" class="review-notes-empty">No comments yet for this document. Select text
|
|
6194
|
+
<div id="reviewNotesEmptyState" class="review-notes-empty">No comments yet for this document. Select text in <strong>Editor (Raw)</strong> or <strong>Editor (Preview)</strong> and use <em>Comment</em>, or use <em>Line comment</em> in <strong>Editor (Raw)</strong>.</div>
|
|
6192
6195
|
<div id="reviewNotesList" class="review-notes-list" aria-live="polite"></div>
|
|
6193
6196
|
<div class="review-notes-dock-footer">
|
|
6194
6197
|
<div class="scratchpad-actions">
|
|
6195
|
-
<button id="reviewNotesAddBtn" type="button" title="Create a new local comment
|
|
6198
|
+
<button id="reviewNotesAddBtn" type="button" title="Create a new local comment on the current editor line.">Line comment</button>
|
|
6196
6199
|
<button id="reviewNotesInlineAllBtn" type="button" title="Toggle inline annotations for all non-empty comments.">All inline: Off</button>
|
|
6197
6200
|
<button id="reviewNotesDoneBtn" type="button" title="Hide the comments rail.">Hide</button>
|
|
6198
6201
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-studio",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.47",
|
|
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",
|