@fresh-editor/fresh-editor 0.3.6 → 0.3.7
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 +91 -0
- package/package.json +1 -1
- package/plugins/audit_mode.i18n.json +84 -0
- package/plugins/audit_mode.ts +139 -3
- package/plugins/config-schema.json +27 -3
- package/plugins/dashboard.ts +18 -18
- package/plugins/flash.ts +22 -4
- package/plugins/git_blame.ts +10 -6
- package/plugins/git_log.ts +534 -124
- package/plugins/git_statusbar.i18n.json +72 -0
- package/plugins/git_statusbar.ts +133 -0
- package/plugins/lib/fresh.d.ts +305 -6
- package/plugins/lib/widgets.ts +111 -4
- package/plugins/live_diff.ts +156 -41
- package/plugins/merge_conflict.ts +89 -64
- package/plugins/orchestrator.ts +1982 -242
- package/plugins/pkg.ts +1 -1
- package/plugins/schemas/theme.schema.json +14 -0
- package/plugins/search_replace.i18n.json +140 -28
- package/plugins/search_replace.ts +674 -117
- package/plugins/tab_actions.i18n.json +212 -0
- package/plugins/tab_actions.ts +76 -0
- package/plugins/theme_editor.i18n.json +28 -0
- package/plugins/tsconfig.json +1 -0
- package/plugins/vi_mode.ts +11 -0
- package/themes/dark.json +1 -0
- package/themes/dracula.json +1 -0
- package/themes/high-contrast.json +1 -0
- package/themes/light.json +1 -0
- package/themes/nord.json +1 -0
- package/themes/nostalgia.json +1 -0
- package/themes/solarized-dark.json +1 -0
- package/themes/terminal.json +1 -0
package/plugins/git_blame.ts
CHANGED
|
@@ -87,10 +87,13 @@ const blameState: BlameState = {
|
|
|
87
87
|
// Color Definitions for Header Styling
|
|
88
88
|
// =============================================================================
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
// Blame headers are rendered via `addVirtualLine`, which accepts theme
|
|
91
|
+
// keys directly — so we don't expose colors as plugin settings. Themes
|
|
92
|
+
// drive the look; if a theme lacks specific blame keys, these fall
|
|
93
|
+
// through to the editor's status-bar palette which is what every theme
|
|
94
|
+
// defines.
|
|
95
|
+
const HEADER_FG_KEY = "ui.status_bar_fg";
|
|
96
|
+
const HEADER_BG_KEY = "ui.status_bar_bg";
|
|
94
97
|
|
|
95
98
|
// =============================================================================
|
|
96
99
|
// Mode Definition
|
|
@@ -373,7 +376,8 @@ function addBlameHeaders(): void {
|
|
|
373
376
|
// Clear existing headers first
|
|
374
377
|
editor.clearVirtualTextNamespace(blameState.bufferId, BLAME_NAMESPACE);
|
|
375
378
|
|
|
376
|
-
// Add a virtual line above each block
|
|
379
|
+
// Add a virtual line above each block. Pass theme keys so the headers
|
|
380
|
+
// restyle automatically when the user switches themes.
|
|
377
381
|
for (const block of blameState.blocks) {
|
|
378
382
|
const headerText = formatBlockHeader(block);
|
|
379
383
|
|
|
@@ -381,7 +385,7 @@ function addBlameHeaders(): void {
|
|
|
381
385
|
blameState.bufferId,
|
|
382
386
|
block.startByte, // anchor position
|
|
383
387
|
headerText, // text content
|
|
384
|
-
{ fg:
|
|
388
|
+
{ fg: HEADER_FG_KEY, bg: HEADER_BG_KEY },
|
|
385
389
|
true, // above (LineAbove)
|
|
386
390
|
BLAME_NAMESPACE, // namespace for bulk removal
|
|
387
391
|
0 // priority
|