diff --git a/styles/src/buildLicenses.ts b/styles/src/buildLicenses.ts index b1e130e80034703a494d3db55bab47dfd1fadedd..793a14a3b21d68542d7a17d2643e5c286574ce02 100644 --- a/styles/src/buildLicenses.ts +++ b/styles/src/buildLicenses.ts @@ -1,7 +1,7 @@ import * as fs from "fs" import toml from "toml" import { schemeMeta } from "./colorSchemes" -import { Meta } from "./themes/common/colorScheme" +import { Meta, Verification } from "./themes/common/colorScheme" import https from "https" import crypto from "crypto" @@ -36,40 +36,45 @@ function getLicenseText( callback: (meta: Meta, license_text: string) => void ) { for (let meta of schemeMeta) { - // The following copied from the example code on nodejs.org: - // https://nodejs.org/api/http.html#httpgetoptions-callback - https - .get(meta.license.https_url, (res) => { - const { statusCode } = res + if (typeof meta.license.license_text == "string") { + callback(meta, meta.license.license_text) + } else { + let license_text_obj: Verification = meta.license.license_text; + // The following copied from the example code on nodejs.org: + // https://nodejs.org/api/http.html#httpgetoptions-callback + https + .get(license_text_obj.https_url, (res) => { + const { statusCode } = res - if (statusCode < 200 || statusCode >= 300) { - throw new Error( - `Failed to fetch license for: ${meta.name}, Status Code: ${statusCode}` - ) - } - - res.setEncoding("utf8") - let rawData = "" - res.on("data", (chunk) => { - rawData += chunk - }) - res.on("end", () => { - const hash = crypto - .createHash("sha256") - .update(rawData) - .digest("hex") - if (meta.license.license_checksum == hash) { - callback(meta, rawData) - } else { - throw Error( - `Checksum for ${meta.name} did not match file downloaded from ${meta.license.https_url}` + if (statusCode < 200 || statusCode >= 300) { + throw new Error( + `Failed to fetch license for: ${meta.name}, Status Code: ${statusCode}` ) } + + res.setEncoding("utf8") + let rawData = "" + res.on("data", (chunk) => { + rawData += chunk + }) + res.on("end", () => { + const hash = crypto + .createHash("sha256") + .update(rawData) + .digest("hex") + if (license_text_obj.license_checksum == hash) { + callback(meta, rawData) + } else { + throw Error( + `Checksum for ${meta.name} did not match file downloaded from ${license_text_obj.https_url}` + ) + } + }) }) - }) - .on("error", (e) => { - throw e - }) + .on("error", (e) => { + throw e + }) + } } } diff --git a/styles/src/themes/andromeda.ts b/styles/src/themes/andromeda.ts index 37a4d3c345d062b21485a5c0a806a6c232ee0eb7..369f1d7f2b60ab7b957feaa36fcb70047d606f06 100644 --- a/styles/src/themes/andromeda.ts +++ b/styles/src/themes/andromeda.ts @@ -34,10 +34,12 @@ export const meta: Meta = { author: "EliverLara", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/EliverLara/Andromeda/master/LICENSE.md", - license_checksum: - "2f7886f1a05cefc2c26f5e49de1a39fa4466413c1ccb06fc80960e73f5ed4b89", + license_text: { + https_url: + "https://raw.githubusercontent.com/EliverLara/Andromeda/master/LICENSE.md", + license_checksum: + "2f7886f1a05cefc2c26f5e49de1a39fa4466413c1ccb06fc80960e73f5ed4b89", + } }, url: "https://github.com/EliverLara/Andromeda", } diff --git a/styles/src/themes/atelier-cave.ts b/styles/src/themes/atelier-cave.ts index 7a85db97e9fe3d19aaa9bb5b21e5636b3ed385dc..21b846d708c349a8fa7b2779dd991ff5bcfa1605 100644 --- a/styles/src/themes/atelier-cave.ts +++ b/styles/src/themes/atelier-cave.ts @@ -55,9 +55,11 @@ export const meta: Meta = { author: "atelierbram", license: { SPDX: "MIT", - https_url: "https://atelierbram.mit-license.org/license.txt", - license_checksum: - "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5", + license_text: { + https_url: "https://atelierbram.mit-license.org/license.txt", + license_checksum: + "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5", + } }, url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave/", } diff --git a/styles/src/themes/atelier-sulphurpool.ts b/styles/src/themes/atelier-sulphurpool.ts index bfd105172a0c59240f83495f277848a7c5bc2eac..e34bc802389a20d7cf6a4cc1cb8dfbff80ed1cd8 100644 --- a/styles/src/themes/atelier-sulphurpool.ts +++ b/styles/src/themes/atelier-sulphurpool.ts @@ -35,9 +35,11 @@ export const meta: Meta = { author: "atelierbram", license: { SPDX: "MIT", - https_url: "https://atelierbram.mit-license.org/license.txt", - license_checksum: - "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5", + license_text: { + https_url: "https://atelierbram.mit-license.org/license.txt", + license_checksum: + "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5", + } }, url: "https://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool/", } diff --git a/styles/src/themes/common/colorScheme.ts b/styles/src/themes/common/colorScheme.ts index d2f0d17201c77a84e98093a682f8bd51165ba921..3b5b8f69329651f20a0ad5aef834eb9435e8b5d1 100644 --- a/styles/src/themes/common/colorScheme.ts +++ b/styles/src/themes/common/colorScheme.ts @@ -29,6 +29,10 @@ export interface Meta { export interface License { SPDX: SPDXExpression /// A url where we can download the license's text + license_text: Verification | string +} + +export interface Verification { https_url: string license_checksum: string } diff --git a/styles/src/themes/gruvbox-common.ts b/styles/src/themes/gruvbox-common.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3e63a31cf12ca19419548677a598661cafae39c --- /dev/null +++ b/styles/src/themes/gruvbox-common.ts @@ -0,0 +1,255 @@ +import chroma from "chroma-js" +import { Meta, ThemeSyntax } from "./common/colorScheme" +import { colorRamp, createColorScheme } from "./common/ramps" + +const name = "Gruvbox" + +const color = { + dark0_hard: "#1d2021", + dark0: "#282828", + dark0_soft: "#32302f", + dark1: "#3c3836", + dark2: "#504945", + dark3: "#665c54", + dark4: "#7c6f64", + dark4_256: "#7c6f64", + + gray_245: "#928374", + gray_244: "#928374", + + light0_hard: "#f9f5d7", + light0: "#fbf1c7", + light0_soft: "#f2e5bc", + light1: "#ebdbb2", + light2: "#d5c4a1", + light3: "#bdae93", + light4: "#a89984", + light4_256: "#a89984", + + bright_red: "#fb4934", + bright_green: "#b8bb26", + bright_yellow: "#fabd2f", + bright_blue: "#83a598", + bright_purple: "#d3869b", + bright_aqua: "#8ec07c", + bright_orange: "#fe8019", + + neutral_red: "#cc241d", + neutral_green: "#98971a", + neutral_yellow: "#d79921", + neutral_blue: "#458588", + neutral_purple: "#b16286", + neutral_aqua: "#689d6a", + neutral_orange: "#d65d0e", + + faded_red: "#9d0006", + faded_green: "#79740e", + faded_yellow: "#b57614", + faded_blue: "#076678", + faded_purple: "#8f3f71", + faded_aqua: "#427b58", + faded_orange: "#af3a03", +} + +interface ThemeColors { + red: string + green: string + yellow: string + blue: string + purple: string + aqua: string + orange: string + gray: string +} + +const darkNeutrals = [ + color.dark1, + color.dark2, + color.dark3, + color.dark4, + color.light4, + color.light3, + color.light2, + color.light1, + color.light0, +] + +const dark: ThemeColors = { + red: color.bright_red, + green: color.bright_green, + yellow: color.bright_yellow, + blue: color.bright_blue, + purple: color.bright_purple, + aqua: color.bright_aqua, + orange: color.bright_orange, + gray: color.light4, +} + +const lightNeutrals = [ + color.light1, + color.light2, + color.light3, + color.light4, + color.dark4, + color.dark3, + color.dark2, + color.dark1, + color.dark0, +] + +const light: ThemeColors = { + red: color.faded_red, + green: color.faded_green, + yellow: color.faded_yellow, + blue: color.faded_blue, + purple: color.faded_purple, + aqua: color.faded_aqua, + orange: color.faded_orange, + gray: color.dark4, +} + +const darkHardNeutral = [color.dark0_hard, ...darkNeutrals] +const darkNeutral = [color.dark0, ...darkNeutrals] +const darkSoftNeutral = [color.dark0_soft, ...darkNeutrals] + +const lightHardNeutral = [color.light0_hard, ...lightNeutrals] +const lightNeutral = [color.light0, ...lightNeutrals] +const lightSoftNeutral = [color.light0_soft, ...lightNeutrals] + +interface Variant { + name: string + appearance: "light" | "dark" + colors: ThemeColors +} + +const variant: Variant[] = [ + { + name: "Dark Hard", + appearance: "dark", + colors: dark, + }, + { + name: "Dark", + appearance: "dark", + colors: dark, + }, + { + name: "Dark Soft", + appearance: "dark", + colors: dark, + }, + { + name: "Light Hard", + appearance: "light", + colors: light, + }, + { + name: "Light", + appearance: "light", + + colors: light, + }, + { + name: "Light Soft", + appearance: "light", + colors: light, + }, +] + +const buildVariant = (variant: Variant) => { + const { colors } = variant + + const name = `Gruvbox ${variant.name}` + + const isLight = variant.appearance === "light" + + let neutral: string[] = [] + + switch (variant.name) { + case "Dark Hard": { + neutral = darkHardNeutral + break + } + case "Dark": { + neutral = darkNeutral + break + } + case "Dark Soft": { + neutral = darkSoftNeutral + break + } + case "Light Hard": { + neutral = lightHardNeutral + break + } + case "Light": { + neutral = lightNeutral + break + } + case "Light Soft": { + neutral = lightSoftNeutral + break + } + } + + const ramps = { + neutral: chroma.scale(isLight ? neutral.reverse() : neutral), + red: colorRamp(chroma(variant.colors.red)), + orange: colorRamp(chroma(variant.colors.orange)), + yellow: colorRamp(chroma(variant.colors.yellow)), + green: colorRamp(chroma(variant.colors.green)), + cyan: colorRamp(chroma(variant.colors.aqua)), + blue: colorRamp(chroma(variant.colors.blue)), + violet: colorRamp(chroma(variant.colors.purple)), + magenta: colorRamp(chroma(variant.colors.gray)), + } + + const syntax: ThemeSyntax = { + primary: { color: neutral[isLight ? 0 : 8] }, + "text.literal": { color: colors.blue }, + comment: { color: colors.gray }, + punctuation: { color: neutral[isLight ? 1 : 7] }, + "punctuation.bracket": { color: neutral[isLight ? 3 : 5] }, + "punctuation.list_marker": { color: neutral[isLight ? 0 : 8] }, + operator: { color: colors.aqua }, + boolean: { color: colors.purple }, + number: { color: colors.purple }, + string: { color: colors.green }, + "string.special": { color: colors.purple }, + "string.special.symbol": { color: colors.aqua }, + "string.regex": { color: colors.orange }, + type: { color: colors.yellow }, + enum: { color: colors.orange }, + tag: { color: colors.aqua }, + constant: { color: colors.yellow }, + keyword: { color: colors.red }, + function: { color: colors.green }, + "function.builtin": { color: colors.red }, + variable: { color: colors.blue }, + property: { color: neutral[isLight ? 0 : 8] }, + embedded: { color: colors.aqua }, + linkText: { color: colors.aqua }, + linkUri: { color: colors.purple }, + title: { color: colors.green }, + } + + return createColorScheme(name, isLight, ramps, syntax) +} + +// Variants +export const darkHard = buildVariant(variant[0]) +export const darkDefault = buildVariant(variant[1]) +export const darkSoft = buildVariant(variant[2]) +export const lightHard = buildVariant(variant[3]) +export const lightDefault = buildVariant(variant[4]) +export const lightSoft = buildVariant(variant[5]) + +export const meta: Meta = { + name, + license: { + SPDX: "MIT", // "MIT/X11" + license_text: "Copyright \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/ or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + author: "morhetz ", + url: "https://github.com/morhetz/gruvbox", +} diff --git a/styles/src/themes/gruvbox-dark-hard.ts b/styles/src/themes/gruvbox-dark-hard.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6e20e1020945474320537b332884d123fbaa543 --- /dev/null +++ b/styles/src/themes/gruvbox-dark-hard.ts @@ -0,0 +1,6 @@ +import { darkHard as dark, meta as commonMeta } from "./gruvbox-common"; + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Dark Hard` + +export { dark, meta } \ No newline at end of file diff --git a/styles/src/themes/gruvbox-dark-soft.ts b/styles/src/themes/gruvbox-dark-soft.ts new file mode 100644 index 0000000000000000000000000000000000000000..7eaefaa99ac3df5190506820215a581036ae1eb7 --- /dev/null +++ b/styles/src/themes/gruvbox-dark-soft.ts @@ -0,0 +1,7 @@ +import { darkSoft as dark, meta as commonMeta } from "./gruvbox-common"; + + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Dark Soft` + +export { dark, meta } \ No newline at end of file diff --git a/styles/src/themes/gruvbox-dark.ts b/styles/src/themes/gruvbox-dark.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea21933714e2bcc33e0eed28bb46f2998ebb0a16 --- /dev/null +++ b/styles/src/themes/gruvbox-dark.ts @@ -0,0 +1,7 @@ +import { darkDefault as dark, meta as commonMeta } from "./gruvbox-common"; + + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Dark` + +export { dark, meta } \ No newline at end of file diff --git a/styles/src/themes/gruvbox-light-hard.ts b/styles/src/themes/gruvbox-light-hard.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0f42ca4b7aea8fea65e1565cf61388045c8371f --- /dev/null +++ b/styles/src/themes/gruvbox-light-hard.ts @@ -0,0 +1,6 @@ +import { lightHard as light, meta as commonMeta } from "./gruvbox-common"; + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Dark Soft` + +export { light, meta } \ No newline at end of file diff --git a/styles/src/themes/gruvbox-light-soft.ts b/styles/src/themes/gruvbox-light-soft.ts new file mode 100644 index 0000000000000000000000000000000000000000..6743d29232931de6b5041977ba0c87cbec7a1e1a --- /dev/null +++ b/styles/src/themes/gruvbox-light-soft.ts @@ -0,0 +1,6 @@ +import { lightSoft as light, meta as commonMeta } from "./gruvbox-common"; + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Light Soft` + +export { light, meta } \ No newline at end of file diff --git a/styles/src/themes/gruvbox-light.ts b/styles/src/themes/gruvbox-light.ts new file mode 100644 index 0000000000000000000000000000000000000000..f64778d8564dbdcfd4e56b64d338ae1d7f3e3b2a --- /dev/null +++ b/styles/src/themes/gruvbox-light.ts @@ -0,0 +1,6 @@ +import { lightDefault as light, meta as commonMeta } from "./gruvbox-common"; + +let meta = { ...commonMeta }; +meta.name = `${commonMeta.name} Light` + +export { light, meta } \ No newline at end of file diff --git a/styles/src/themes/one-dark.ts b/styles/src/themes/one-dark.ts index 419e4065fe174c44fa646bc6201809a11ec8d681..f99b4114f3ec9fa35f97705cb708f3c300e460fe 100644 --- a/styles/src/themes/one-dark.ts +++ b/styles/src/themes/one-dark.ts @@ -74,10 +74,12 @@ export const meta: Meta = { author: "simurai", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/atom/atom/master/packages/one-light-ui/LICENSE.md", - license_checksum: - "d5af8fc171f6f600c0ab4e7597dca398dda80dbe6821ce01cef78e859e7a00f8", + license_text: { + https_url: + "https://raw.githubusercontent.com/atom/atom/master/packages/one-light-ui/LICENSE.md", + license_checksum: + "d5af8fc171f6f600c0ab4e7597dca398dda80dbe6821ce01cef78e859e7a00f8", + } }, url: "https://github.com/atom/atom/tree/master/packages/one-dark-ui", } diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one-light.ts index 267345ed4ecfb76376d7a293054bfbb6340ec906..534e4c16481a6dac6635f74084a2fcea1b36bb8d 100644 --- a/styles/src/themes/one-light.ts +++ b/styles/src/themes/one-light.ts @@ -73,10 +73,12 @@ export const meta: Meta = { author: "simurai", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/atom/atom/master/packages/one-light-ui/LICENSE.md", - license_checksum: - "d5af8fc171f6f600c0ab4e7597dca398dda80dbe6821ce01cef78e859e7a00f8", + license_text: { + https_url: + "https://raw.githubusercontent.com/atom/atom/master/packages/one-light-ui/LICENSE.md", + license_checksum: + "d5af8fc171f6f600c0ab4e7597dca398dda80dbe6821ce01cef78e859e7a00f8", + } }, url: "https://github.com/atom/atom/tree/master/packages/one-light-ui", } diff --git a/styles/src/themes/rose-pine-dawn.ts b/styles/src/themes/rose-pine-dawn.ts index bcd4e268bd54c6aae1f8d12734381b3a70a2420f..7f7d52079d4b2ea0977c04e8b2e121b6e7f14bf3 100644 --- a/styles/src/themes/rose-pine-dawn.ts +++ b/styles/src/themes/rose-pine-dawn.ts @@ -34,10 +34,12 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", - license_checksum: - "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + license_text: { + https_url: + "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", + license_checksum: + "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + } }, url: "https://github.com/edunfelt/base16-rose-pine-scheme", } diff --git a/styles/src/themes/rose-pine-moon.ts b/styles/src/themes/rose-pine-moon.ts index d40ea390ac819b083bbda2b7d25b56a93e7dbf39..a89d44487e04a9e48836b619d78967ea1576953f 100644 --- a/styles/src/themes/rose-pine-moon.ts +++ b/styles/src/themes/rose-pine-moon.ts @@ -34,10 +34,12 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", - license_checksum: - "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + license_text: { + https_url: + "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", + license_checksum: + "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + } }, url: "https://github.com/edunfelt/base16-rose-pine-scheme", } diff --git a/styles/src/themes/rose-pine.ts b/styles/src/themes/rose-pine.ts index 7b61ab56e7009a04c6b5ad210842ba4eb23b2e8b..87c9d34ffefe5d2e12bb1ce8cdfbfd3e6f058b6a 100644 --- a/styles/src/themes/rose-pine.ts +++ b/styles/src/themes/rose-pine.ts @@ -32,10 +32,12 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", - license_checksum: - "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + license_text: { + https_url: + "https://raw.githubusercontent.com/edunfelt/base16-rose-pine-scheme/main/LICENSE", + license_checksum: + "6ca1b9da8c78c8441c5aa43d024a4e4a7bf59d1ecca1480196e94fda0f91ee4a", + } }, url: "https://github.com/edunfelt/base16-rose-pine-scheme", } diff --git a/styles/src/themes/sandcastle.ts b/styles/src/themes/sandcastle.ts index b38416a966de5a3f4f89b74c69e6cda3bdb0aa1e..86179db3dbacd91f42a38739acb42efb55e7c745 100644 --- a/styles/src/themes/sandcastle.ts +++ b/styles/src/themes/sandcastle.ts @@ -32,10 +32,12 @@ export const meta: Meta = { author: "gessig", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/gessig/base16-sandcastle-scheme/master/LICENSE", - license_checksum: - "8399d44b4d935b60be9fee0a76d7cc9a817b4f3f11574c9d6d1e8fd57e72ffdc", + license_text: { + https_url: + "https://raw.githubusercontent.com/gessig/base16-sandcastle-scheme/master/LICENSE", + license_checksum: + "8399d44b4d935b60be9fee0a76d7cc9a817b4f3f11574c9d6d1e8fd57e72ffdc", + } }, url: "https://github.com/gessig/base16-sandcastle-scheme", } diff --git a/styles/src/themes/solarized.ts b/styles/src/themes/solarized.ts index 51baeed56403fdf08df3105075679e24f9902f4d..42306f68c3a6c4deea12006b88a320b596713ec1 100644 --- a/styles/src/themes/solarized.ts +++ b/styles/src/themes/solarized.ts @@ -35,10 +35,12 @@ export const meta: Metadata = { author: "Ethan Schoonover", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/altercation/solarized/master/LICENSE", - license_checksum: - "494aefdabf86acce06bd63001ad8aedad4ee38da23509d3f917d95aa3368b9a6", + license_text: { + https_url: + "https://raw.githubusercontent.com/altercation/solarized/master/LICENSE", + license_checksum: + "494aefdabf86acce06bd63001ad8aedad4ee38da23509d3f917d95aa3368b9a6", + } }, url: "https://github.com/altercation/solarized", } diff --git a/styles/src/themes/staff/gruvbox-medium.ts b/styles/src/themes/staff/gruvbox-medium.ts deleted file mode 100644 index 9e259bebc6c47c2cba0095587da2654fec46e51e..0000000000000000000000000000000000000000 --- a/styles/src/themes/staff/gruvbox-medium.ts +++ /dev/null @@ -1,138 +0,0 @@ -import chroma from "chroma-js" -import { colorRamp, createColorScheme } from "../common/ramps" - -const name = "Gruvbox" -const author = "Dawid Kurek (dawikur@gmail.com)" -const url = "https://github.com/morhetz/gruvbox" -const license = { - type: "MIT/X11", - url: "https://en.wikipedia.org/wiki/MIT_License", -} - -export const dark = createColorScheme(`${name} Dark Medium`, false, { - neutral: chroma.scale([ - "#282828", - "#3c3836", - "#504945", - "#665c54", - "#7C6F64", - "#928374", - "#A89984", - "#BDAE93", - "#D5C4A1", - "#EBDBB2", - "#FBF1C7", - ]), - red: chroma.scale([ - "#4D150F", - "#7D241A", - "#A31C17", - "#CC241D", - "#C83A29", - "#FB4934", - "#F06D61", - "#E6928E", - "#FFFFFF", - ]), - orange: chroma.scale([ - "#462307", - "#7F400C", - "#AB4A0B", - "#D65D0E", - "#CB6614", - "#FE8019", - "#F49750", - "#EBAE87", - "#FFFFFF", - ]), - yellow: chroma.scale([ - "#3D2C05", - "#7D5E17", - "#AC7A1A", - "#D79921", - "#E8AB28", - "#FABD2F", - "#F2C45F", - "#EBCC90", - "#FFFFFF", - ]), - green: chroma.scale([ - "#32330A", - "#5C5D13", - "#797814", - "#98971A", - "#93951E", - "#B8BB26", - "#C2C359", - "#CCCB8D", - "#FFFFFF", - ]), - cyan: chroma.scale([ - "#283D20", - "#47603E", - "#537D54", - "#689D6A", - "#719963", - "#8EC07C", - "#A1C798", - "#B4CEB5", - "#FFFFFF", - ]), - blue: chroma.scale([ - "#103738", - "#214C4D", - "#376A6C", - "#458588", - "#688479", - "#83A598", - "#92B3AE", - "#A2C2C4", - "#FFFFFF", - ]), - violet: chroma.scale([ - "#392228", - "#69434D", - "#8D4E6B", - "#B16286", - "#A86B7C", - "#D3869B", - "#D59BAF", - "#D8B1C3", - "#FFFFFF", - ]), - magenta: chroma.scale([ - "#48402C", - "#756D59", - "#867A69", - "#A89984", - "#BCAF8E", - "#EBDBB2", - "#DFD3BA", - "#D4CCC2", - "#FFFFFF", - ]), -}) - -export const light = createColorScheme(`${name} Light Medium`, true, { - neutral: chroma.scale([ - "#282828", - "#3c3836", - "#504945", - "#665c54", - "#7C6F64", - "#928374", - "#A89984", - "#BDAE93", - "#D5C4A1", - "#EBDBB2", - "#FBF1C7", - ]), - red: colorRamp(chroma("#9d0006")), - orange: colorRamp(chroma("#af3a03")), - yellow: colorRamp(chroma("#b57614")), - green: colorRamp(chroma("#79740e")), - cyan: colorRamp(chroma("#427b58")), - blue: colorRamp(chroma("#076678")), - violet: colorRamp(chroma("#8f3f71")), - magenta: colorRamp(chroma("#d65d0e")), -}) diff --git a/styles/src/themes/summercamp.ts b/styles/src/themes/summercamp.ts index 1114f496c2e16c806ff586c7daf4b2dc19c4b380..e8d1bd40b2538b3904127e6699ef4236dd9d6b98 100644 --- a/styles/src/themes/summercamp.ts +++ b/styles/src/themes/summercamp.ts @@ -34,9 +34,11 @@ export const meta: Meta = { url: "https://github.com/zoefiri/base16-sc", license: { SPDX: "MIT", - https_url: - "https://raw.githubusercontent.com/zoefiri/base16-sc/master/LICENSE", - license_checksum: - "fadcc834b7eaf2943800956600e8aeea4b495ecf6490f4c4b6c91556a90accaf", + license_text: { + https_url: + "https://raw.githubusercontent.com/zoefiri/base16-sc/master/LICENSE", + license_checksum: + "fadcc834b7eaf2943800956600e8aeea4b495ecf6490f4c4b6c91556a90accaf", + } }, }