diff --git a/package.json b/package.json index ab7bd3a..1afdd42 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "onCommand:nostr.publishEventFile", "onCommand:nostr.validateEventFile", "onCommand:nostr.publishLongForm", + "onCommand:nostr.publishTextNote", "onCommand:nostr.validateFrontMatter", "onCommand:nostr.fetchRelays", "onCommand:nostr.selectBackend", @@ -82,6 +83,12 @@ "category": "Nostr", "enablement": "editorLangId == markdown" }, + { + "command": "nostr.publishTextNote", + "title": "Nostr: Publish Current File as Text Note", + "category": "Nostr", + "enablement": "resourceScheme == file || resourceScheme == untitled" + }, { "command": "nostr.validateFrontMatter", "title": "Nostr: Validate Front-Matter", @@ -132,6 +139,11 @@ "when": "editorLangId == markdown", "group": "nostr@2" }, + { + "command": "nostr.publishTextNote", + "when": "resourceScheme == file || resourceScheme == untitled", + "group": "nostr@3" + }, { "command": "nostr.insertNoteHeader", "when": "editorLangId == markdown", diff --git a/plans/sidebar-aesthetics.md b/plans/sidebar-aesthetics.md new file mode 100644 index 0000000..0d56af0 --- /dev/null +++ b/plans/sidebar-aesthetics.md @@ -0,0 +1,159 @@ +# Sidebar Aesthetics Plan + +Apply the design rules from `~/lt/aesthetics/WEB.md` to the Nostr sidebar webview in [`src/ui/sidebar.ts`](../src/ui/sidebar.ts:1). + +## Context + +`WEB.md` defines a minimalist web aesthetic: + +- **Monochrome first**: black, white, one red accent, plus one muted grey. No other hues. +- **Monospaced by default**: one fixed-width family for body, buttons, inputs, labels. +- **Minimal CSS surface**: few variables, few classes, reuse shell styles. +- **Readable over clever**: 1px borders, single radius token, no gradients/shadows as decoration. +- **Grayscale media**: images desaturated at rest, color returns on hover. +- **Dark mode = swapped variables**, not swapped styles. +- **Spacing ladder**: 5, 10, 15, 20, 40 px only. +- **Transitions**: 0.2s for interactive feedback; 0.5s max for slide-outs. +- **Accessibility**: tab-reachable, accent focus ring, alt text, reduced-motion respected. + +The current sidebar is a VS Code webview that leans on `--vscode-*` theme variables with a generic VS Code look: mixed monospace/sans, blue-ish buttons, 2px radii, ad-hoc spacing (6px, 8px, 12px, 16px), no grayscale on avatars, no transitions. + +## Reconciliation: WEB.md tokens vs VS Code theme + +The sidebar lives inside VS Code, so it must respect the user's light/dark theme. We map the WEB.md four-token palette onto VS Code theme variables so the monochrome+accent system still tracks the active theme: + +| WEB.md token | Sidebar value | +|---------------------|------------------------------------------------------------| +| `--primary-color` | `var(--vscode-foreground)` | +| `--secondary-color` | `var(--vscode-sideBar-background)` | +| `--accent-color` | `var(--vscode-statusBarItem-errorBackground, #ff0000)` — red, used only for hover/active/focus/destructive | +| `--muted-color` | `var(--vscode-descriptionForeground)` | +| `--border-color` | `var(--vscode-panel-border, var(--muted-color))` | + +This keeps the "monochrome + one red scalpel" intent while remaining theme-aware. The accent resolves to red in most themes; where a theme overrides the error background we still get a single semantic accent. + +## Changes + +All changes are confined to the inline `