diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/assets/palette.png b/assets/palette.png deleted file mode 100644 index 588f66f..0000000 Binary files a/assets/palette.png and /dev/null differ diff --git a/assets/preview-dawn.png b/assets/preview-dawn.png deleted file mode 100644 index 3ceaaa5..0000000 Binary files a/assets/preview-dawn.png and /dev/null differ diff --git a/assets/preview-moon.png b/assets/preview-moon.png deleted file mode 100644 index a88f8c0..0000000 Binary files a/assets/preview-moon.png and /dev/null differ diff --git a/assets/preview.png b/assets/preview.png deleted file mode 100644 index 73df378..0000000 Binary files a/assets/preview.png and /dev/null differ diff --git a/index.js b/index.js index 3feffc3..e68f215 100644 --- a/index.js +++ b/index.js @@ -1,13 +1,10 @@ const variants = { - /** - * @deprecated Renamed to `core` - */ - base: { + main: { base: "#191724", surface: "#1f1d2e", overlay: "#26233a", - inactive: "#555169", - subtle: "#6e6a86", + muted: "#6e6a86", + subtle: "#908caa", text: "#e0def4", love: "#eb6f92", gold: "#f6c177", @@ -15,29 +12,16 @@ const variants = { pine: "#31748f", foam: "#9ccfd8", iris: "#c4a7e7", - highlight: "#2a2837", - }, - core: { - base: "#191724", - surface: "#1f1d2e", - overlay: "#26233a", - inactive: "#555169", - subtle: "#6e6a86", - text: "#e0def4", - love: "#eb6f92", - gold: "#f6c177", - rose: "#ebbcba", - pine: "#31748f", - foam: "#9ccfd8", - iris: "#c4a7e7", - highlight: "#2a2837", + highlightLow: "#21202e", + highlightMed: "#403d52", + highlightHigh: "#524f67", }, moon: { base: "#232136", surface: "#2a273f", overlay: "#393552", - inactive: "#59546d", - subtle: "#817c9c", + muted: "#6e6a86", + subtle: "#908caa", text: "#e0def4", love: "#eb6f92", gold: "#f6c177", @@ -45,14 +29,16 @@ const variants = { pine: "#3e8fb0", foam: "#9ccfd8", iris: "#c4a7e7", - highlight: "#312f44", + highlightLow: "#2a283e", + highlightMed: "#44415a", + highlightHigh: "#56526e", }, dawn: { base: "#faf4ed", surface: "#fffaf3", overlay: "#f2e9de", - inactive: "#9893a5", - subtle: "#6e6a86", + muted: "#9893a5", + subtle: "#797593", text: "#575279", love: "#b4637a", gold: "#ea9d34", @@ -60,21 +46,29 @@ const variants = { pine: "#286983", foam: "#56949f", iris: "#907aa9", - highlight: "#eee9e6", + highlightLow: "#f4ede8", + highlightMed: "#dfdad9", + highlightHigh: "#cecacd", }, }; +const variantNames = ["main", "moon", "dawn"]; + exports.decorateConfig = (config) => { - const variant = (config.theme && config.theme.variant) || "core"; + const variant = + (config.theme && + variantNames.includes(config.theme.variant) && + config.theme.variant) || + "main"; const palette = variants[variant]; if ( - config.theme && + config.theme && Object.keys(config.theme).includes(variant) && - typeof config.theme[variant] === 'object' - ) { + typeof config.theme[variant] === "object" + ) { for (const param of Object.keys(config.theme[variant])) { - palette[param] = config.theme[variant][param] + palette[param] = config.theme[variant][param]; } } @@ -101,8 +95,9 @@ exports.decorateConfig = (config) => { padding: config.padding || "12px 30px 30px 30px", backgroundColor: palette.base, foregroundColor: palette.text, - cursorColor: palette.inactive, - selectionColor: palette.highlight, + cursorColor: palette.highlightHigh, + cursorAccentColor: palette.text, + selectionColor: palette.highlightMed, borderColor: "#0000", css: ` .tab_text { color: ${palette.subtle} } diff --git a/package.json b/package.json index 7e45e6b..de952e7 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,24 @@ { "name": "hyper-rose-pine", "version": "2.2.0", - "description": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist.", + "description": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist", "license": "MIT", - "files": [ - "index.js" - ], + "repository": "rose-pine/hyper", + "funding": "https://github.com/rose-pine/hyper?sponsor=1", + "author": "fvrests", "scripts": { "release": "npx np --no-publish --no-tests" }, + "files": [ + "index.js" + ], "keywords": [ "hyper", "hyper-theme", - "theme", - "ui", - "terminal", - "rose pine", + "minimal", + "aesthetic", + "pastel", "classy", - "dark theme", - "subtle", - "minimalist", - "minimal" - ], - "author": "fvrests", - "repository": { - "type": "git", - "url": "https://github.com/fvrests/hyper-rose-pine" - } + "soft" + ] } diff --git a/readme.md b/readme.md index ea7b4c0..b0edbb4 100644 --- a/readme.md +++ b/readme.md @@ -19,21 +19,26 @@ $ hyper i hyper-rose-pine or -```js +```javascript // ~/.hyper.js plugins: ["hyper-rose-pine"], ``` ## Options -```js +```javascript config: { theme: { - // Default: core - // Can be core, moon or dawn + // @usage 'main' | 'moon' | 'dawn' + // @default 'main' variant: 'dawn', + + // Optionally, override Rosé Pine palette per variant: + // https://rosepinetheme.com/palette + main: {}, + moon: {}, dawn: { - inactive: '#DFFF00' + muted: '#dfff00' } } } @@ -43,12 +48,12 @@ config: { **Rosé Pine** -![Hyper with Rosé Pine](assets/preview.png) +![Hyper with Rosé Pine](https://user-images.githubusercontent.com/1474821/216485794-402f4eac-7978-4846-bb6f-527078759b81.png) **Rosé Pine Moon** -![Hyper with Rosé Pine Moon](assets/preview-moon.png) +![Hyper with Rosé Pine Moon](https://user-images.githubusercontent.com/1474821/216485807-dc3537e6-a716-415b-b314-1a21eb807fc5.png) **Rosé Pine Dawn** -![Hyper with Rosé Pine Dawn](assets/preview-dawn.png) +![Hyper with Rosé Pine Dawn](https://user-images.githubusercontent.com/1474821/216485812-7f098984-e2cf-4ffd-973d-bec615a93128.png)