refactor: single source for writing styles + action labels; add theme module
- src/lib/actions.ts: canonical ACTIONS/ACTION_LABELS/WRITING_STYLES; context-menu styles derived (WRITING_STYLES minus Default). Replaces the three duplicated style arrays in popup, content, and background. - src/lib/theme.ts: canonical palette. Existing hex literals in the entrypoints are swapped wholesale when light/dark theming lands, so the color plumbing is only rewritten once. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { safeSendMessage, safeStorageGet, safeStorageSet } from '@lib/messaging';
|
||||
|
||||
// ─── Constants ───────────────────────────────────────────────────────────────
|
||||
|
||||
const WRITING_STYLES = ['Default', 'Formal', 'Casual', 'Academic', 'Creative', 'Concise'];
|
||||
import { WRITING_STYLES } from '@lib/actions';
|
||||
|
||||
// ─── Types ───────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user