diff --git a/.changeset/shared-theme-package.md b/.changeset/shared-theme-package.md new file mode 100644 index 0000000..8ad3fe3 --- /dev/null +++ b/.changeset/shared-theme-package.md @@ -0,0 +1,6 @@ +--- +'@crypt.fyi/extension': patch +'@crypt.fyi/web': patch +--- + +Share design tokens, fonts and theme logic through a new private `@crypt.fyi/theme` package. The extension settings page adopts the redesigned look with a System/Light/Dark control, which also fixes it always rendering dark. diff --git a/AGENTS.md b/AGENTS.md index f8a524a..5323460 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ pnpm + Turborepo monorepo (`Node >= 22`, Active LTS 26 in `.nvmrc`/CI/Docker; `p | `@crypt.fyi/server` | Fastify API + Redis | | `@crypt.fyi/cli` | npm CLI | | `@crypt.fyi/extension` | Chrome extension | +| `@crypt.fyi/theme` | Design tokens, fonts and theme logic shared by web and extension (private, no build) | Encryption/decryption and key material live in `@crypt.fyi/core` and must stay client-side. The server stores ciphertext and verification hashes only — never plaintext secrets or raw keys/passwords. @@ -58,6 +59,10 @@ When adding or changing UI copy: 2. Update **every** locale file (`en`, `es`, `de`, `fr`, `zh`) 3. Register new languages in `index.ts` (`resources` + `supportedLanguages`) +## Theming + +Change colors, fonts, radii and theme behavior in `packages/theme`, not per package, so web and the extension stay in step. UI components are not shared: web uses React/shadcn and the extension settings page is plain HTML. + ## Coding norms - TypeScript everywhere; avoid `any`. Match existing Prettier/ESLint setup — do not restate style guides here. diff --git a/packages/extension/README.md b/packages/extension/README.md index 29836bb..8d2bbbf 100644 --- a/packages/extension/README.md +++ b/packages/extension/README.md @@ -13,6 +13,10 @@ This browser extension allows you to quickly encrypt and share text selections u Password defaults are intentionally not supported — use the web app when a password is required. +## Theme + +Settings page styling comes from [`@crypt.fyi/theme`](../theme/README.md), the same tokens, fonts and System/Light/Dark logic the web client uses. Its theme choice is stored separately from the web client because the two have different origins. + ## Development 1. Install dependencies: diff --git a/packages/extension/package.json b/packages/extension/package.json index cd2a7af..f15d06f 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -6,6 +6,7 @@ "type": "module", "dependencies": { "@crypt.fyi/core": "workspace:*", + "@crypt.fyi/theme": "workspace:*", "webextension-polyfill": "^0.12.0", "zod": "^4.1.5" }, diff --git a/packages/extension/src/options/index.html b/packages/extension/src/options/index.html index e9cf1b8..7fb8598 100644 --- a/packages/extension/src/options/index.html +++ b/packages/extension/src/options/index.html @@ -6,46 +6,128 @@ crypt.fyi settings -
-
-

Browser extension

-

crypt.fyi

-

+

+
+
+
+ +
+

crypt.fyi

+

Browser extension

+
+
+
+ + + +
+
+

Defaults used when you encrypt text from the context menu.

-
-
-

- Endpoints -

-