finch-markdown-editor 0.2.12 → 0.2.13
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/dist/codemirror.js +1 -1
- package/dist/panel.css +40 -3
- package/dist/panel.js +7 -7
- package/package.json +1 -1
package/dist/panel.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
--bg:var(--finch-bg-
|
|
2
|
+
--bg:var(--finch-bg-main,#f7f7f8);
|
|
3
3
|
--card:var(--finch-bg-elevated,#fff);
|
|
4
4
|
--text:var(--finch-text-primary,#1d1d20);
|
|
5
5
|
--muted:var(--finch-text-secondary,#777);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
@media (prefers-color-scheme: dark) {
|
|
10
10
|
:root{
|
|
11
|
-
--bg:var(--finch-bg-
|
|
11
|
+
--bg:var(--finch-bg-main,#17171a);
|
|
12
12
|
--card:var(--finch-bg-elevated,#242429);
|
|
13
13
|
--text:var(--finch-text-primary,#eee);
|
|
14
14
|
--muted:var(--finch-text-secondary,#aaa);
|
|
@@ -177,7 +177,7 @@ body.app-view .status-inline-btn:hover{background:var(--finch-bg-hover,var(--bg)
|
|
|
177
177
|
|
|
178
178
|
/* Full-screen App View shell. The same document remains a compact, host-toolbar-
|
|
179
179
|
driven Panel App until finch:env explicitly identifies the appView surface. */
|
|
180
|
-
.app-toolbar{height:48px;flex:none;align-items:center;gap:12px;padding:7px 12px;border-bottom:1px solid var(--border);background:var(--
|
|
180
|
+
.app-toolbar{height:48px;flex:none;align-items:center;gap:12px;padding:7px 12px;border-bottom:1px solid var(--border);background:var(--finch-bg-main)}
|
|
181
181
|
body.app-view .app-toolbar{display:flex!important}
|
|
182
182
|
.app-toolbar-group{display:flex;align-items:center;gap:6px;flex:none}
|
|
183
183
|
.app-toolbar-end{margin-left:auto}
|
|
@@ -194,6 +194,43 @@ body.app-view .app-toolbar{display:flex!important}
|
|
|
194
194
|
.app-tool-label{min-width:auto;padding:0 9px}.ic-save,.ic-save-check{display:inline-flex;align-items:center}.ic-save[hidden],.ic-save-check[hidden]{display:none}.app-menu-wrap{position:relative}.app-menu{position:absolute;z-index:32;top:calc(100% + 7px);right:0;min-width:174px;padding:5px;border:1px solid var(--border);border-radius:9px;background:var(--card);box-shadow:0 2px 8px rgba(0,0,0,.12)}
|
|
195
195
|
.app-menu button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;border:0;border-radius:6px;background:transparent;color:var(--text);font:12px var(--finch-font-body,system-ui);text-align:left;cursor:pointer}.app-menu button:hover{background:var(--finch-bg-hover,var(--bg))}.app-menu button.checked{color:var(--text);background:var(--finch-bg-active,color-mix(in srgb,var(--text) 10%,transparent));font-weight:600}.app-menu button:disabled{color:var(--muted);cursor:default;opacity:.5}.app-menu button:disabled:hover{background:transparent}.app-menu hr{margin:5px 3px;border:0;border-top:1px solid var(--border)}
|
|
196
196
|
.app-document-meta{min-width:0;display:flex;flex-direction:column;gap:1px}.app-document-meta strong,.app-document-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-document-meta strong{font-size:13px}.app-document-meta span{max-width:34vw;color:var(--muted);font-size:11px}
|
|
197
|
+
/* Focus mode ("专注") in App View: instead of just dimming inactive editor
|
|
198
|
+
lines (see codemirror.ts), collapse the entire toolbar down to a single
|
|
199
|
+
floating toggle pinned top-right, out of the writing surface's way. Both
|
|
200
|
+
toolbar groups hide except #appFocus itself, so the same button — now a
|
|
201
|
+
lone pill — re-expands the toolbar on the next click. Gated on
|
|
202
|
+
has-document as well as focus-mode: a restored focusMode can be true
|
|
203
|
+
before any document is open, and the Home screen still needs its full
|
|
204
|
+
toolbar (Library/Home/Open) to navigate. */
|
|
205
|
+
body.app-view.has-document.focus-mode .app-toolbar{
|
|
206
|
+
position:fixed;top:10px;right:16px;left:auto;width:auto;height:auto;
|
|
207
|
+
padding:0;gap:0;border:0;background:transparent;z-index:20;
|
|
208
|
+
}
|
|
209
|
+
body.app-view.has-document.focus-mode .app-toolbar-group:not(.app-toolbar-end){display:none!important}
|
|
210
|
+
body.app-view.has-document.focus-mode .app-toolbar-end{margin-left:0}
|
|
211
|
+
body.app-view.has-document.focus-mode .app-toolbar-end>*:not(#appFocus){display:none!important}
|
|
212
|
+
body.app-view.has-document.focus-mode #appFocus{
|
|
213
|
+
width:36px;height:36px;padding:0;border-color:var(--border);border-radius:999px;
|
|
214
|
+
background:var(--card);box-shadow:0 6px 18px rgba(0,0,0,.16);
|
|
215
|
+
opacity:.62;transition:opacity .15s ease;
|
|
216
|
+
animation:mdFocusPillIn .22s cubic-bezier(.16,1,.3,1);
|
|
217
|
+
}
|
|
218
|
+
body.app-view.has-document.focus-mode #appFocus:hover,
|
|
219
|
+
body.app-view.has-document.focus-mode #appFocus:focus-visible{opacity:1}
|
|
220
|
+
/* Rises up into its resting corner rather than just fading in place. */
|
|
221
|
+
@keyframes mdFocusPillIn{from{opacity:0;transform:translateY(14px)}to{opacity:.62;transform:translateY(0)}}
|
|
222
|
+
/* The button sits flush against the right edge here (unlike its normal
|
|
223
|
+
toolbar position), so the shared centered tooltip (`.app-tool[data-
|
|
224
|
+
tooltip]::after` uses left:50%/translate(-50%,..)) would spill past the
|
|
225
|
+
window's right edge and get clipped. Anchor it to the button's right
|
|
226
|
+
edge instead — the id selector's specificity is enough to beat the
|
|
227
|
+
shared rule without touching it. */
|
|
228
|
+
body.app-view.has-document.focus-mode #appFocus[data-tooltip]::after{
|
|
229
|
+
left:auto;right:0;transform:translateY(-3px);
|
|
230
|
+
}
|
|
231
|
+
body.app-view.has-document.focus-mode #appFocus[data-tooltip]:hover::after{
|
|
232
|
+
transform:translateY(0);
|
|
233
|
+
}
|
|
197
234
|
body.app-view .stage{display:grid;grid-template-columns:minmax(0,1fr) 6px var(--preview-width,480px);background:var(--bg)}
|
|
198
235
|
body.app-view .pane{position:relative;inset:auto;min-width:0;min-height:0}
|
|
199
236
|
body.app-view .pane.active{display:block}
|