From cf75b090d3f0ff633977df7af5426eb1c66549af Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Mon, 29 May 2023 15:45:13 +0200 Subject: [PATCH 1/8] feat: organize themes by folders with LICENSE --- styles/src/themes/andromeda/LICENSE | 21 +++++++++++++++++++ .../src/themes/{ => andromeda}/andromeda.ts | 4 ++-- .../{ => atelier-cave}/atelier-cave-dark.ts | 6 +++--- .../{ => atelier-cave}/atelier-cave-light.ts | 6 +++--- .../{ => atelier-dune}/atelier-dune-dark.ts | 6 +++--- .../{ => atelier-dune}/atelier-dune-light.ts | 6 +++--- .../atelier-estuary-dark.ts | 6 +++--- .../atelier-estuary-light.ts | 6 +++--- .../atelier-forest-dark.ts | 6 +++--- .../atelier-forest-light.ts | 6 +++--- .../{ => atelier-heath}/atelier-heath-dark.ts | 6 +++--- .../atelier-heath-light.ts | 6 +++--- .../atelier-lakeside-dark.ts | 6 +++--- .../atelier-lakeside-light.ts | 6 +++--- .../atelier-plateau-dark.ts | 6 +++--- .../atelier-plateau-light.ts | 6 +++--- .../atelier-savanna-dark.ts | 6 +++--- .../atelier-savanna-light.ts | 6 +++--- .../atelier-seaside-dark.ts | 6 +++--- .../atelier-seaside-light.ts | 6 +++--- .../atelier-sulphurpool-dark.ts | 6 +++--- .../atelier-sulphurpool-light.ts | 6 +++--- styles/src/themes/{ => ayu}/ayu-dark.ts | 4 ++-- styles/src/themes/{ => ayu}/ayu-light.ts | 4 ++-- styles/src/themes/{ => ayu}/ayu-mirage.ts | 4 ++-- styles/src/themes/gruvbox/LICENSE | 21 +++++++++++++++++++ .../themes/{ => gruvbox}/gruvbox-common.ts | 4 ++-- .../themes/{ => gruvbox}/gruvbox-dark-hard.ts | 0 .../themes/{ => gruvbox}/gruvbox-dark-soft.ts | 0 .../src/themes/{ => gruvbox}/gruvbox-dark.ts | 0 .../{ => gruvbox}/gruvbox-light-hard.ts | 0 .../{ => gruvbox}/gruvbox-light-soft.ts | 0 .../src/themes/{ => gruvbox}/gruvbox-light.ts | 0 styles/src/themes/one/LICENSE | 21 +++++++++++++++++++ styles/src/themes/{ => one}/one-dark.ts | 6 +++--- styles/src/themes/{ => one}/one-light.ts | 6 +++--- styles/src/themes/rose-pine/LICENSE | 21 +++++++++++++++++++ .../themes/{ => rose-pine}/rose-pine-dawn.ts | 4 ++-- .../themes/{ => rose-pine}/rose-pine-moon.ts | 4 ++-- .../src/themes/{ => rose-pine}/rose-pine.ts | 4 ++-- styles/src/themes/sandcastle/LICENSE | 21 +++++++++++++++++++ .../src/themes/{ => sandcastle}/sandcastle.ts | 4 ++-- styles/src/themes/solarized/LICENSE | 21 +++++++++++++++++++ .../src/themes/{ => solarized}/solarized.ts | 4 ++-- styles/src/themes/summercamp/LICENSE | 21 +++++++++++++++++++ .../src/themes/{ => summercamp}/summercamp.ts | 4 ++-- 46 files changed, 235 insertions(+), 88 deletions(-) create mode 100644 styles/src/themes/andromeda/LICENSE rename styles/src/themes/{ => andromeda}/andromeda.ts (91%) rename styles/src/themes/{ => atelier-cave}/atelier-cave-dark.ts (89%) rename styles/src/themes/{ => atelier-cave}/atelier-cave-light.ts (90%) rename styles/src/themes/{ => atelier-dune}/atelier-dune-dark.ts (89%) rename styles/src/themes/{ => atelier-dune}/atelier-dune-light.ts (90%) rename styles/src/themes/{ => atelier-estuary}/atelier-estuary-dark.ts (89%) rename styles/src/themes/{ => atelier-estuary}/atelier-estuary-light.ts (90%) rename styles/src/themes/{ => atelier-forest}/atelier-forest-dark.ts (89%) rename styles/src/themes/{ => atelier-forest}/atelier-forest-light.ts (90%) rename styles/src/themes/{ => atelier-heath}/atelier-heath-dark.ts (89%) rename styles/src/themes/{ => atelier-heath}/atelier-heath-light.ts (90%) rename styles/src/themes/{ => atelier-lakeside}/atelier-lakeside-dark.ts (90%) rename styles/src/themes/{ => atelier-lakeside}/atelier-lakeside-light.ts (90%) rename styles/src/themes/{ => atelier-plateau}/atelier-plateau-dark.ts (89%) rename styles/src/themes/{ => atelier-plateau}/atelier-plateau-light.ts (90%) rename styles/src/themes/{ => atelier-savanna}/atelier-savanna-dark.ts (89%) rename styles/src/themes/{ => atelier-savanna}/atelier-savanna-light.ts (90%) rename styles/src/themes/{ => atelier-seaside}/atelier-seaside-dark.ts (89%) rename styles/src/themes/{ => atelier-seaside}/atelier-seaside-light.ts (90%) rename styles/src/themes/{ => atelier-sulphurpool}/atelier-sulphurpool-dark.ts (90%) rename styles/src/themes/{ => atelier-sulphurpool}/atelier-sulphurpool-light.ts (90%) rename styles/src/themes/{ => ayu}/ayu-dark.ts (66%) rename styles/src/themes/{ => ayu}/ayu-light.ts (66%) rename styles/src/themes/{ => ayu}/ayu-mirage.ts (66%) create mode 100644 styles/src/themes/gruvbox/LICENSE rename styles/src/themes/{ => gruvbox}/gruvbox-common.ts (98%) rename styles/src/themes/{ => gruvbox}/gruvbox-dark-hard.ts (100%) rename styles/src/themes/{ => gruvbox}/gruvbox-dark-soft.ts (100%) rename styles/src/themes/{ => gruvbox}/gruvbox-dark.ts (100%) rename styles/src/themes/{ => gruvbox}/gruvbox-light-hard.ts (100%) rename styles/src/themes/{ => gruvbox}/gruvbox-light-soft.ts (100%) rename styles/src/themes/{ => gruvbox}/gruvbox-light.ts (100%) create mode 100644 styles/src/themes/one/LICENSE rename styles/src/themes/{ => one}/one-dark.ts (93%) rename styles/src/themes/{ => one}/one-light.ts (93%) create mode 100644 styles/src/themes/rose-pine/LICENSE rename styles/src/themes/{ => rose-pine}/rose-pine-dawn.ts (91%) rename styles/src/themes/{ => rose-pine}/rose-pine-moon.ts (91%) rename styles/src/themes/{ => rose-pine}/rose-pine.ts (91%) create mode 100644 styles/src/themes/sandcastle/LICENSE rename styles/src/themes/{ => sandcastle}/sandcastle.ts (91%) create mode 100644 styles/src/themes/solarized/LICENSE rename styles/src/themes/{ => solarized}/solarized.ts (91%) create mode 100644 styles/src/themes/summercamp/LICENSE rename styles/src/themes/{ => summercamp}/summercamp.ts (91%) diff --git a/styles/src/themes/andromeda/LICENSE b/styles/src/themes/andromeda/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..bdd549491fac6822878157337aa5dc4d09ef53f2 --- /dev/null +++ b/styles/src/themes/andromeda/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/andromeda.ts b/styles/src/themes/andromeda/andromeda.ts similarity index 91% rename from styles/src/themes/andromeda.ts rename to styles/src/themes/andromeda/andromeda.ts index 7eba7b1481aeba8b1429b323bb51c0f78c0a6069..adfea37d0694dc47350d96178478ef0b370117f3 100644 --- a/styles/src/themes/andromeda.ts +++ b/styles/src/themes/andromeda/andromeda.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Andromeda" diff --git a/styles/src/themes/atelier-cave-dark.ts b/styles/src/themes/atelier-cave/atelier-cave-dark.ts similarity index 89% rename from styles/src/themes/atelier-cave-dark.ts rename to styles/src/themes/atelier-cave/atelier-cave-dark.ts index a56e22cd92373997cc40d19eddf5b05e9cad5a02..a61db0e590eeea584b89481b5682cd37bb3ab2af 100644 --- a/styles/src/themes/atelier-cave-dark.ts +++ b/styles/src/themes/atelier-cave/atelier-cave-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-cave-light.ts b/styles/src/themes/atelier-cave/atelier-cave-light.ts similarity index 90% rename from styles/src/themes/atelier-cave-light.ts rename to styles/src/themes/atelier-cave/atelier-cave-light.ts index 3b180752cf97ea1bcc515c904deb20eafc03aea6..739fe1320b6cf49e81cdde5eb84113ea67e4eb3c 100644 --- a/styles/src/themes/atelier-cave-light.ts +++ b/styles/src/themes/atelier-cave/atelier-cave-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-dune-dark.ts b/styles/src/themes/atelier-dune/atelier-dune-dark.ts similarity index 89% rename from styles/src/themes/atelier-dune-dark.ts rename to styles/src/themes/atelier-dune/atelier-dune-dark.ts index 0ab402a99d4adf8f1e0ed41979d5cc9973696404..7a3c3fbd07dac797d97eb05c7c74e10f95f954ca 100644 --- a/styles/src/themes/atelier-dune-dark.ts +++ b/styles/src/themes/atelier-dune/atelier-dune-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-dune-light.ts b/styles/src/themes/atelier-dune/atelier-dune-light.ts similarity index 90% rename from styles/src/themes/atelier-dune-light.ts rename to styles/src/themes/atelier-dune/atelier-dune-light.ts index e6a09985d5e09f8612d0a41f7b3a898991b9b720..3ee60164b689f41db333f31b80f01dcbfc2a7de9 100644 --- a/styles/src/themes/atelier-dune-light.ts +++ b/styles/src/themes/atelier-dune/atelier-dune-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-estuary-dark.ts b/styles/src/themes/atelier-estuary/atelier-estuary-dark.ts similarity index 89% rename from styles/src/themes/atelier-estuary-dark.ts rename to styles/src/themes/atelier-estuary/atelier-estuary-dark.ts index c4ec50c1e00ed7731d069ed3f559204b9030b10c..5ec6df8d359ff6cf6c169d03d4cf4b252795f4bd 100644 --- a/styles/src/themes/atelier-estuary-dark.ts +++ b/styles/src/themes/atelier-estuary/atelier-estuary-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-estuary-light.ts b/styles/src/themes/atelier-estuary/atelier-estuary-light.ts similarity index 90% rename from styles/src/themes/atelier-estuary-light.ts rename to styles/src/themes/atelier-estuary/atelier-estuary-light.ts index 6fce0e44833d2d0bf8657a3465bcfb601b262644..bc583d41ac7cd7345c2b1d0b3ca11a6258658391 100644 --- a/styles/src/themes/atelier-estuary-light.ts +++ b/styles/src/themes/atelier-estuary/atelier-estuary-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-forest-dark.ts b/styles/src/themes/atelier-forest/atelier-forest-dark.ts similarity index 89% rename from styles/src/themes/atelier-forest-dark.ts rename to styles/src/themes/atelier-forest/atelier-forest-dark.ts index 7c47c55a830ed780f662d83d9f768d26207dc31e..72f958efdfad406d7a1e1504f735e6684851ef9c 100644 --- a/styles/src/themes/atelier-forest-dark.ts +++ b/styles/src/themes/atelier-forest/atelier-forest-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-forest-light.ts b/styles/src/themes/atelier-forest/atelier-forest-light.ts similarity index 90% rename from styles/src/themes/atelier-forest-light.ts rename to styles/src/themes/atelier-forest/atelier-forest-light.ts index 8ce06164769a7a8dfa15fc74a77b6aa0f3c9e3af..463350f822a2f8941b31a5e2e7bad93d0d8668f1 100644 --- a/styles/src/themes/atelier-forest-light.ts +++ b/styles/src/themes/atelier-forest/atelier-forest-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-heath-dark.ts b/styles/src/themes/atelier-heath/atelier-heath-dark.ts similarity index 89% rename from styles/src/themes/atelier-heath-dark.ts rename to styles/src/themes/atelier-heath/atelier-heath-dark.ts index 87458ab8f5ab68a30e602de9b62edbe1e4cf5c18..010169b0225b759ee4b10fbc6037d12f13eebd4e 100644 --- a/styles/src/themes/atelier-heath-dark.ts +++ b/styles/src/themes/atelier-heath/atelier-heath-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-heath-light.ts b/styles/src/themes/atelier-heath/atelier-heath-light.ts similarity index 90% rename from styles/src/themes/atelier-heath-light.ts rename to styles/src/themes/atelier-heath/atelier-heath-light.ts index 3db34370418f1cd27e305a3175e045e591e36ae9..09d39b6d6662b8f3018ea418c9278a15bc86d9c7 100644 --- a/styles/src/themes/atelier-heath-light.ts +++ b/styles/src/themes/atelier-heath/atelier-heath-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-lakeside-dark.ts b/styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts similarity index 90% rename from styles/src/themes/atelier-lakeside-dark.ts rename to styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts index a8297ef9fd307243f1c9c84f3caa1e627120a19e..59728f30f327a20fab35210d3400ed62176de870 100644 --- a/styles/src/themes/atelier-lakeside-dark.ts +++ b/styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-lakeside-light.ts b/styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts similarity index 90% rename from styles/src/themes/atelier-lakeside-light.ts rename to styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts index 408fabcaf36a50df5229ea0034d12c67bd3b3562..d26c4fe67945454b7bbd43b27f409fea9dc171bd 100644 --- a/styles/src/themes/atelier-lakeside-light.ts +++ b/styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-plateau-dark.ts b/styles/src/themes/atelier-plateau/atelier-plateau-dark.ts similarity index 89% rename from styles/src/themes/atelier-plateau-dark.ts rename to styles/src/themes/atelier-plateau/atelier-plateau-dark.ts index 731cb824e44eba0590c5f1dc4804121aa7f97cd9..8299116c0efbd484279cb01dd1f946e9923af3ba 100644 --- a/styles/src/themes/atelier-plateau-dark.ts +++ b/styles/src/themes/atelier-plateau/atelier-plateau-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-plateau-light.ts b/styles/src/themes/atelier-plateau/atelier-plateau-light.ts similarity index 90% rename from styles/src/themes/atelier-plateau-light.ts rename to styles/src/themes/atelier-plateau/atelier-plateau-light.ts index 96f295a69518b1216482776e44d5b36912f526da..7fcc4220accaca761cec203e9856102781a14b7d 100644 --- a/styles/src/themes/atelier-plateau-light.ts +++ b/styles/src/themes/atelier-plateau/atelier-plateau-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-savanna-dark.ts b/styles/src/themes/atelier-savanna/atelier-savanna-dark.ts similarity index 89% rename from styles/src/themes/atelier-savanna-dark.ts rename to styles/src/themes/atelier-savanna/atelier-savanna-dark.ts index dfcb4f27cbedd41608b941da97172d083e7a8e76..5b6f034563433379d30f27d4b5043b35d3402ee1 100644 --- a/styles/src/themes/atelier-savanna-dark.ts +++ b/styles/src/themes/atelier-savanna/atelier-savanna-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-savanna-light.ts b/styles/src/themes/atelier-savanna/atelier-savanna-light.ts similarity index 90% rename from styles/src/themes/atelier-savanna-light.ts rename to styles/src/themes/atelier-savanna/atelier-savanna-light.ts index 4bc1389fc9cf3cb3b4870a58665a510a65d4c9e2..498959487696546e2d5c540a44019fbb5262e6ac 100644 --- a/styles/src/themes/atelier-savanna-light.ts +++ b/styles/src/themes/atelier-savanna/atelier-savanna-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-seaside-dark.ts b/styles/src/themes/atelier-seaside/atelier-seaside-dark.ts similarity index 89% rename from styles/src/themes/atelier-seaside-dark.ts rename to styles/src/themes/atelier-seaside/atelier-seaside-dark.ts index 1326a277861e417711c3ea30d39230b227c9ac51..00631eff51f8e3431a8ae5c872a0428efe659dca 100644 --- a/styles/src/themes/atelier-seaside-dark.ts +++ b/styles/src/themes/atelier-seaside/atelier-seaside-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-seaside-light.ts b/styles/src/themes/atelier-seaside/atelier-seaside-light.ts similarity index 90% rename from styles/src/themes/atelier-seaside-light.ts rename to styles/src/themes/atelier-seaside/atelier-seaside-light.ts index 6f6823718aed9ba4e3d7325b9968b11ba5472b40..af6af2f02737968d5161118bb2442c6426cc6a1d 100644 --- a/styles/src/themes/atelier-seaside-light.ts +++ b/styles/src/themes/atelier-seaside/atelier-seaside-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-sulphurpool-dark.ts b/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts similarity index 90% rename from styles/src/themes/atelier-sulphurpool-dark.ts rename to styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts index dcfc0d932a67d7081f5bcdb195f6fc57cfc2d79f..140d02c2e6bc49a69e4dda59c4142dbcc6f714af 100644 --- a/styles/src/themes/atelier-sulphurpool-dark.ts +++ b/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-sulphurpool-light.ts b/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts similarity index 90% rename from styles/src/themes/atelier-sulphurpool-light.ts rename to styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts index b2b5f7c328ba86be296be0fb938bf850571dbef9..b6dba4c384cde17bafe88ce27cbf5a802b8ee020 100644 --- a/styles/src/themes/atelier-sulphurpool-light.ts +++ b/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "./common/atelier-common" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" +import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" const variant: Variant = { meta: { diff --git a/styles/src/themes/ayu-dark.ts b/styles/src/themes/ayu/ayu-dark.ts similarity index 66% rename from styles/src/themes/ayu-dark.ts rename to styles/src/themes/ayu/ayu-dark.ts index c7e86994feec6a78879b383e5bf71941084c0b9e..eb837231fe1b0d3818768ce0b149a512d6ea3f7d 100644 --- a/styles/src/themes/ayu-dark.ts +++ b/styles/src/themes/ayu/ayu-dark.ts @@ -1,5 +1,5 @@ -import { createColorScheme } from "./common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "./common/ayu-common" +import { createColorScheme } from "../common/ramps" +import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu-light.ts b/styles/src/themes/ayu/ayu-light.ts similarity index 66% rename from styles/src/themes/ayu-light.ts rename to styles/src/themes/ayu/ayu-light.ts index 9acabf6a3957a20aca2e3fa0181cf675840ddae4..9c29449db5bd323e21aa9004a1b2ac2731c0a617 100644 --- a/styles/src/themes/ayu-light.ts +++ b/styles/src/themes/ayu/ayu-light.ts @@ -1,5 +1,5 @@ -import { createColorScheme } from "./common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "./common/ayu-common" +import { createColorScheme } from "../common/ramps" +import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu-mirage.ts b/styles/src/themes/ayu/ayu-mirage.ts similarity index 66% rename from styles/src/themes/ayu-mirage.ts rename to styles/src/themes/ayu/ayu-mirage.ts index 2a01512673b73d104ead5fc20edf353b813c16bb..52bf5493922102fffd9cd8cc0eef24ba9bb2b720 100644 --- a/styles/src/themes/ayu-mirage.ts +++ b/styles/src/themes/ayu/ayu-mirage.ts @@ -1,5 +1,5 @@ -import { createColorScheme } from "./common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "./common/ayu-common" +import { createColorScheme } from "../common/ramps" +import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/gruvbox/LICENSE b/styles/src/themes/gruvbox/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2a9230614399a48916e74cfb74bd4625686c7bcb --- /dev/null +++ b/styles/src/themes/gruvbox/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts similarity index 98% rename from styles/src/themes/gruvbox-common.ts rename to styles/src/themes/gruvbox/gruvbox-common.ts index c42362c11c007e5371ad7134c7300667fe04304e..5958fe62aceeeba3c7c6b5191a8046eeecee5e93 100644 --- a/styles/src/themes/gruvbox-common.ts +++ b/styles/src/themes/gruvbox/gruvbox-common.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta, ThemeSyntax } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta, ThemeSyntax } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Gruvbox" diff --git a/styles/src/themes/gruvbox-dark-hard.ts b/styles/src/themes/gruvbox/gruvbox-dark-hard.ts similarity index 100% rename from styles/src/themes/gruvbox-dark-hard.ts rename to styles/src/themes/gruvbox/gruvbox-dark-hard.ts diff --git a/styles/src/themes/gruvbox-dark-soft.ts b/styles/src/themes/gruvbox/gruvbox-dark-soft.ts similarity index 100% rename from styles/src/themes/gruvbox-dark-soft.ts rename to styles/src/themes/gruvbox/gruvbox-dark-soft.ts diff --git a/styles/src/themes/gruvbox-dark.ts b/styles/src/themes/gruvbox/gruvbox-dark.ts similarity index 100% rename from styles/src/themes/gruvbox-dark.ts rename to styles/src/themes/gruvbox/gruvbox-dark.ts diff --git a/styles/src/themes/gruvbox-light-hard.ts b/styles/src/themes/gruvbox/gruvbox-light-hard.ts similarity index 100% rename from styles/src/themes/gruvbox-light-hard.ts rename to styles/src/themes/gruvbox/gruvbox-light-hard.ts diff --git a/styles/src/themes/gruvbox-light-soft.ts b/styles/src/themes/gruvbox/gruvbox-light-soft.ts similarity index 100% rename from styles/src/themes/gruvbox-light-soft.ts rename to styles/src/themes/gruvbox/gruvbox-light-soft.ts diff --git a/styles/src/themes/gruvbox-light.ts b/styles/src/themes/gruvbox/gruvbox-light.ts similarity index 100% rename from styles/src/themes/gruvbox-light.ts rename to styles/src/themes/gruvbox/gruvbox-light.ts diff --git a/styles/src/themes/one/LICENSE b/styles/src/themes/one/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..dc07dc10ad0de56ebe0bfad8d65e82f0f5d627ef --- /dev/null +++ b/styles/src/themes/one/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/one-dark.ts b/styles/src/themes/one/one-dark.ts similarity index 93% rename from styles/src/themes/one-dark.ts rename to styles/src/themes/one/one-dark.ts index 85417a0e68651341edded4689425b15a0d8f29b1..71062940a5cb8f4d9fc345b3abdcb3ab0d4d2ea6 100644 --- a/styles/src/themes/one-dark.ts +++ b/styles/src/themes/one/one-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { fontWeights } from "../common" -import { Meta, ThemeSyntax } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { fontWeights } from "../../common" +import { Meta, ThemeSyntax } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "One Dark" diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one/one-light.ts similarity index 93% rename from styles/src/themes/one-light.ts rename to styles/src/themes/one/one-light.ts index 7bf21aee17d4871681b33174e3b20bea06ced9fe..8ae42e8b1d161f291bc76dd462aae5e79b18e109 100644 --- a/styles/src/themes/one-light.ts +++ b/styles/src/themes/one/one-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" -import { fontWeights } from "../common" -import { Meta, ThemeSyntax } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { fontWeights } from "../../common" +import { Meta, ThemeSyntax } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "One Light" diff --git a/styles/src/themes/rose-pine/LICENSE b/styles/src/themes/rose-pine/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..dfd60136f95374fbe3e112a6051a4854b61ac4ec --- /dev/null +++ b/styles/src/themes/rose-pine/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Emilia Dunfelt + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/rose-pine-dawn.ts b/styles/src/themes/rose-pine/rose-pine-dawn.ts similarity index 91% rename from styles/src/themes/rose-pine-dawn.ts rename to styles/src/themes/rose-pine/rose-pine-dawn.ts index 427b05f72b8e5672897b7457738d4c43e2c6f603..48da855304781e58584368dfdf9f8ea088c25823 100644 --- a/styles/src/themes/rose-pine-dawn.ts +++ b/styles/src/themes/rose-pine/rose-pine-dawn.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Rosé Pine Dawn" diff --git a/styles/src/themes/rose-pine-moon.ts b/styles/src/themes/rose-pine/rose-pine-moon.ts similarity index 91% rename from styles/src/themes/rose-pine-moon.ts rename to styles/src/themes/rose-pine/rose-pine-moon.ts index be2f5a8dafd366803f13737c75bdb48d7e101aa9..2e13ca4b707d77747f58afbf28229bf9d381c2a9 100644 --- a/styles/src/themes/rose-pine-moon.ts +++ b/styles/src/themes/rose-pine/rose-pine-moon.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Rosé Pine Moon" diff --git a/styles/src/themes/rose-pine.ts b/styles/src/themes/rose-pine/rose-pine.ts similarity index 91% rename from styles/src/themes/rose-pine.ts rename to styles/src/themes/rose-pine/rose-pine.ts index 944550f1250ad01146f8622a8199cf027f4658ab..33d7d533e6508fd4217dc02f3b864f3fbb5c05fe 100644 --- a/styles/src/themes/rose-pine.ts +++ b/styles/src/themes/rose-pine/rose-pine.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Rosé Pine" diff --git a/styles/src/themes/sandcastle/LICENSE b/styles/src/themes/sandcastle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c66a06c51b46671cfe20194ac8ff545683c7a7e3 --- /dev/null +++ b/styles/src/themes/sandcastle/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 George Essig + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/sandcastle.ts b/styles/src/themes/sandcastle/sandcastle.ts similarity index 91% rename from styles/src/themes/sandcastle.ts rename to styles/src/themes/sandcastle/sandcastle.ts index 483f01b27a1850463348e0a9c575086a014d5f1b..0b265212562745717efef8871f23e69066673b59 100644 --- a/styles/src/themes/sandcastle.ts +++ b/styles/src/themes/sandcastle/sandcastle.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Sandcastle" diff --git a/styles/src/themes/solarized/LICENSE b/styles/src/themes/solarized/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..221eee6f152873e2e6c52ca4a89ac1d65118843b --- /dev/null +++ b/styles/src/themes/solarized/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011 Ethan Schoonover + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/solarized.ts b/styles/src/themes/solarized/solarized.ts similarity index 91% rename from styles/src/themes/solarized.ts rename to styles/src/themes/solarized/solarized.ts index 1210c4380608e812d39dec0f36d6ec69dab37e9b..13e3e34460bee124b1220f23556b6fd885a5d310 100644 --- a/styles/src/themes/solarized.ts +++ b/styles/src/themes/solarized/solarized.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta as Metadata } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta as Metadata } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Solarized" diff --git a/styles/src/themes/summercamp/LICENSE b/styles/src/themes/summercamp/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d7525414ad01c246c21e908666064d6db4233901 --- /dev/null +++ b/styles/src/themes/summercamp/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Zoe FiriH + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/summercamp.ts b/styles/src/themes/summercamp/summercamp.ts similarity index 91% rename from styles/src/themes/summercamp.ts rename to styles/src/themes/summercamp/summercamp.ts index 7df125e86606d299e52ffb07140f156744e086ce..41e101af0208f676261dec19cf0a55d714bf0ce0 100644 --- a/styles/src/themes/summercamp.ts +++ b/styles/src/themes/summercamp/summercamp.ts @@ -1,6 +1,6 @@ import chroma from "chroma-js" -import { Meta } from "./common/colorScheme" -import { colorRamp, createColorScheme } from "./common/ramps" +import { Meta } from "../common/colorScheme" +import { colorRamp, createColorScheme } from "../common/ramps" const name = "Summercamp" From 2269c19169741fc9a86e9cf9cbec50b4132e7782 Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 14:06:19 +0200 Subject: [PATCH 2/8] chore: add LICENSE files --- styles/src/themes/atelier-cave/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-dune/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-estuary/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-forest/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-heath/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-lakeside/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-plateau/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-savanna/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-seaside/LICENSE | 21 +++++++++++++++++++ styles/src/themes/atelier-sulphurpool/LICENSE | 21 +++++++++++++++++++ styles/src/themes/ayu/LICENSE | 21 +++++++++++++++++++ 11 files changed, 231 insertions(+) create mode 100644 styles/src/themes/atelier-cave/LICENSE create mode 100644 styles/src/themes/atelier-dune/LICENSE create mode 100644 styles/src/themes/atelier-estuary/LICENSE create mode 100644 styles/src/themes/atelier-forest/LICENSE create mode 100644 styles/src/themes/atelier-heath/LICENSE create mode 100644 styles/src/themes/atelier-lakeside/LICENSE create mode 100644 styles/src/themes/atelier-plateau/LICENSE create mode 100644 styles/src/themes/atelier-savanna/LICENSE create mode 100644 styles/src/themes/atelier-seaside/LICENSE create mode 100644 styles/src/themes/atelier-sulphurpool/LICENSE create mode 100644 styles/src/themes/ayu/LICENSE diff --git a/styles/src/themes/atelier-cave/LICENSE b/styles/src/themes/atelier-cave/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-cave/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-dune/LICENSE b/styles/src/themes/atelier-dune/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-dune/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-estuary/LICENSE b/styles/src/themes/atelier-estuary/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-estuary/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-forest/LICENSE b/styles/src/themes/atelier-forest/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-forest/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-heath/LICENSE b/styles/src/themes/atelier-heath/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-heath/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-lakeside/LICENSE b/styles/src/themes/atelier-lakeside/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-lakeside/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-plateau/LICENSE b/styles/src/themes/atelier-plateau/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-plateau/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-savanna/LICENSE b/styles/src/themes/atelier-savanna/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-savanna/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-seaside/LICENSE b/styles/src/themes/atelier-seaside/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-seaside/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-sulphurpool/LICENSE b/styles/src/themes/atelier-sulphurpool/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9f92967a0436d7118c20cf29bfb8844dba2699b1 --- /dev/null +++ b/styles/src/themes/atelier-sulphurpool/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file diff --git a/styles/src/themes/ayu/LICENSE b/styles/src/themes/ayu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6b83ef0582f26b04f37f8b78ef5a3121b3f3a326 --- /dev/null +++ b/styles/src/themes/ayu/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Ike Ku + +Permission 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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE 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. \ No newline at end of file From 0d62e76cd629d721997d0798ca50832dd28a9073 Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 15:52:32 +0200 Subject: [PATCH 3/8] refactor: colorSchemes --- styles/src/buildThemes.ts | 2 +- styles/src/colorSchemes.ts | 76 +++++++++++++++++++++----------------- 2 files changed, 44 insertions(+), 34 deletions(-) diff --git a/styles/src/buildThemes.ts b/styles/src/buildThemes.ts index 2a63a407cc4f83dba146991a5edf3757abdfab65..43537655733b10fc2dbaefebf208722acfa2effb 100644 --- a/styles/src/buildThemes.ts +++ b/styles/src/buildThemes.ts @@ -1,7 +1,7 @@ import * as fs from "fs" import { tmpdir } from "os" import * as path from "path" -import colorSchemes, { staffColorSchemes } from "./colorSchemes" +import { colorSchemes, staffColorSchemes } from "./colorSchemes" import app from "./styleTree/app" import { ColorScheme } from "./themes/common/colorScheme" import snakeCase from "./utils/snakeCase" diff --git a/styles/src/colorSchemes.ts b/styles/src/colorSchemes.ts index 4d2d7f6e0253c6b6dd8d6d579000f3d9cb53ad5f..e8d06870440e0d2fe1f1cb528ff04ed5e79b1f5f 100644 --- a/styles/src/colorSchemes.ts +++ b/styles/src/colorSchemes.ts @@ -2,53 +2,63 @@ import fs from "fs" import path from "path" import { ColorScheme, Meta } from "./themes/common/colorScheme" -const colorSchemes: ColorScheme[] = [] -export default colorSchemes +const THEMES_DIRECTORY = path.resolve(`${__dirname}/themes`) +const STAFF_DIRECTORY = path.resolve(`${__dirname}/themes/staff`) +const IGNORE_ITEMS = ["staff", "common", "template.ts"] +const ACCEPT_EXTENSION = ".ts" -const schemeMeta: Meta[] = [] -export { schemeMeta } +function getAllTsFiles(directoryPath: string) { + const files = fs.readdirSync(directoryPath) + const fileList: string[] = [] -const staffColorSchemes: ColorScheme[] = [] -export { staffColorSchemes } + for (const file of files) { + if (!IGNORE_ITEMS.includes(file)) { + const filePath = path.join(directoryPath, file) -const experimentalColorSchemes: ColorScheme[] = [] -export { experimentalColorSchemes } - -const themes_directory = path.resolve(`${__dirname}/themes`) - -function for_all_color_schemes_in( - themesPath: string, - callback: (module: any, path: string) => void -) { - for (const fileName of fs.readdirSync(themesPath)) { - if (fileName == "template.ts") continue - const filePath = path.join(themesPath, fileName) - - if (fs.statSync(filePath).isFile()) { - const colorScheme = require(filePath) - callback(colorScheme, path.basename(filePath)) + if (fs.statSync(filePath).isDirectory()) { + fileList.push(...getAllTsFiles(filePath)) + } else if (path.extname(file) === ACCEPT_EXTENSION) { + fileList.push(filePath) + } } } + + return fileList +} + +function getAllColorSchemes(directoryPath: string) { + const files = getAllTsFiles(directoryPath) + return files.map((filePath) => ({ + colorScheme: require(filePath), + filePath: path.basename(filePath), + })) } -function fillColorSchemes(themesPath: string, colorSchemes: ColorScheme[]) { - for_all_color_schemes_in(themesPath, (colorScheme, _path) => { +function getColorSchemes(directoryPath: string) { + const colorSchemes: ColorScheme[] = [] + + for (const { colorScheme } of getAllColorSchemes(directoryPath)) { if (colorScheme.dark) colorSchemes.push(colorScheme.dark) - if (colorScheme.light) colorSchemes.push(colorScheme.light) - }) + else if (colorScheme.light) colorSchemes.push(colorScheme.light) + } + + return colorSchemes } -fillColorSchemes(themes_directory, colorSchemes) -fillColorSchemes(path.resolve(`${themes_directory}/staff`), staffColorSchemes) +function getMeta(directoryPath: string) { + const meta: Meta[] = [] -function fillMeta(themesPath: string, meta: Meta[]) { - for_all_color_schemes_in(themesPath, (colorScheme, path) => { + for (const { colorScheme, filePath } of getAllColorSchemes(directoryPath)) { if (colorScheme.meta) { meta.push(colorScheme.meta) } else { - throw Error(`Public theme ${path} must have a meta field`) + throw Error(`Public theme ${filePath} must have a meta field`) } - }) + } + + return meta } -fillMeta(themes_directory, schemeMeta) +export const colorSchemes = getColorSchemes(THEMES_DIRECTORY) +export const staffColorSchemes = getColorSchemes(STAFF_DIRECTORY) +export const schemeMeta = getMeta(THEMES_DIRECTORY) From ac63043c273f724777a1ba9254ee6d8e6a882977 Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 16:52:28 +0200 Subject: [PATCH 4/8] chore: move similar themes to one folder --- styles/src/themes/atelier-dune/LICENSE | 21 ------------------- styles/src/themes/atelier-estuary/LICENSE | 21 ------------------- styles/src/themes/atelier-forest/LICENSE | 21 ------------------- styles/src/themes/atelier-heath/LICENSE | 21 ------------------- styles/src/themes/atelier-lakeside/LICENSE | 21 ------------------- styles/src/themes/atelier-plateau/LICENSE | 21 ------------------- styles/src/themes/atelier-savanna/LICENSE | 21 ------------------- styles/src/themes/atelier-seaside/LICENSE | 21 ------------------- styles/src/themes/atelier-sulphurpool/LICENSE | 21 ------------------- .../themes/{atelier-cave => atelier}/LICENSE | 0 .../atelier-cave-dark.ts | 2 +- .../atelier-cave-light.ts | 2 +- .../atelier-dune-dark.ts | 2 +- .../atelier-dune-light.ts | 2 +- .../atelier-estuary-dark.ts | 2 +- .../atelier-estuary-light.ts | 2 +- .../atelier-forest-dark.ts | 2 +- .../atelier-forest-light.ts | 2 +- .../atelier-heath-dark.ts | 2 +- .../atelier-heath-light.ts | 2 +- .../atelier-lakeside-dark.ts | 2 +- .../atelier-lakeside-light.ts | 2 +- .../atelier-plateau-dark.ts | 2 +- .../atelier-plateau-light.ts | 2 +- .../atelier-savanna-dark.ts | 2 +- .../atelier-savanna-light.ts | 2 +- .../atelier-seaside-dark.ts | 2 +- .../atelier-seaside-light.ts | 2 +- .../atelier-sulphurpool-dark.ts | 2 +- .../atelier-sulphurpool-light.ts | 2 +- 30 files changed, 20 insertions(+), 209 deletions(-) delete mode 100644 styles/src/themes/atelier-dune/LICENSE delete mode 100644 styles/src/themes/atelier-estuary/LICENSE delete mode 100644 styles/src/themes/atelier-forest/LICENSE delete mode 100644 styles/src/themes/atelier-heath/LICENSE delete mode 100644 styles/src/themes/atelier-lakeside/LICENSE delete mode 100644 styles/src/themes/atelier-plateau/LICENSE delete mode 100644 styles/src/themes/atelier-savanna/LICENSE delete mode 100644 styles/src/themes/atelier-seaside/LICENSE delete mode 100644 styles/src/themes/atelier-sulphurpool/LICENSE rename styles/src/themes/{atelier-cave => atelier}/LICENSE (100%) rename styles/src/themes/{atelier-cave => atelier}/atelier-cave-dark.ts (95%) rename styles/src/themes/{atelier-cave => atelier}/atelier-cave-light.ts (95%) rename styles/src/themes/{atelier-dune => atelier}/atelier-dune-dark.ts (95%) rename styles/src/themes/{atelier-dune => atelier}/atelier-dune-light.ts (95%) rename styles/src/themes/{atelier-estuary => atelier}/atelier-estuary-dark.ts (95%) rename styles/src/themes/{atelier-estuary => atelier}/atelier-estuary-light.ts (95%) rename styles/src/themes/{atelier-forest => atelier}/atelier-forest-dark.ts (95%) rename styles/src/themes/{atelier-forest => atelier}/atelier-forest-light.ts (95%) rename styles/src/themes/{atelier-heath => atelier}/atelier-heath-dark.ts (95%) rename styles/src/themes/{atelier-heath => atelier}/atelier-heath-light.ts (95%) rename styles/src/themes/{atelier-lakeside => atelier}/atelier-lakeside-dark.ts (95%) rename styles/src/themes/{atelier-lakeside => atelier}/atelier-lakeside-light.ts (95%) rename styles/src/themes/{atelier-plateau => atelier}/atelier-plateau-dark.ts (95%) rename styles/src/themes/{atelier-plateau => atelier}/atelier-plateau-light.ts (95%) rename styles/src/themes/{atelier-savanna => atelier}/atelier-savanna-dark.ts (95%) rename styles/src/themes/{atelier-savanna => atelier}/atelier-savanna-light.ts (95%) rename styles/src/themes/{atelier-seaside => atelier}/atelier-seaside-dark.ts (95%) rename styles/src/themes/{atelier-seaside => atelier}/atelier-seaside-light.ts (95%) rename styles/src/themes/{atelier-sulphurpool => atelier}/atelier-sulphurpool-dark.ts (95%) rename styles/src/themes/{atelier-sulphurpool => atelier}/atelier-sulphurpool-light.ts (95%) diff --git a/styles/src/themes/atelier-dune/LICENSE b/styles/src/themes/atelier-dune/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-dune/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-estuary/LICENSE b/styles/src/themes/atelier-estuary/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-estuary/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-forest/LICENSE b/styles/src/themes/atelier-forest/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-forest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-heath/LICENSE b/styles/src/themes/atelier-heath/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-heath/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-lakeside/LICENSE b/styles/src/themes/atelier-lakeside/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-lakeside/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-plateau/LICENSE b/styles/src/themes/atelier-plateau/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-plateau/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-savanna/LICENSE b/styles/src/themes/atelier-savanna/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-savanna/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-seaside/LICENSE b/styles/src/themes/atelier-seaside/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-seaside/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-sulphurpool/LICENSE b/styles/src/themes/atelier-sulphurpool/LICENSE deleted file mode 100644 index 9f92967a0436d7118c20cf29bfb8844dba2699b1..0000000000000000000000000000000000000000 --- a/styles/src/themes/atelier-sulphurpool/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Bram de Haan, http://atelierbramdehaan.nl - -Permission 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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE 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. \ No newline at end of file diff --git a/styles/src/themes/atelier-cave/LICENSE b/styles/src/themes/atelier/LICENSE similarity index 100% rename from styles/src/themes/atelier-cave/LICENSE rename to styles/src/themes/atelier/LICENSE diff --git a/styles/src/themes/atelier-cave/atelier-cave-dark.ts b/styles/src/themes/atelier/atelier-cave-dark.ts similarity index 95% rename from styles/src/themes/atelier-cave/atelier-cave-dark.ts rename to styles/src/themes/atelier/atelier-cave-dark.ts index a61db0e590eeea584b89481b5682cd37bb3ab2af..41ee6a745c9c9165c0e5610fb30c92bbbedce3a6 100644 --- a/styles/src/themes/atelier-cave/atelier-cave-dark.ts +++ b/styles/src/themes/atelier/atelier-cave-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-cave/atelier-cave-light.ts b/styles/src/themes/atelier/atelier-cave-light.ts similarity index 95% rename from styles/src/themes/atelier-cave/atelier-cave-light.ts rename to styles/src/themes/atelier/atelier-cave-light.ts index 739fe1320b6cf49e81cdde5eb84113ea67e4eb3c..9e0473bbfa0b63838329e21eaae11ba63abc2c53 100644 --- a/styles/src/themes/atelier-cave/atelier-cave-light.ts +++ b/styles/src/themes/atelier/atelier-cave-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-dune/atelier-dune-dark.ts b/styles/src/themes/atelier/atelier-dune-dark.ts similarity index 95% rename from styles/src/themes/atelier-dune/atelier-dune-dark.ts rename to styles/src/themes/atelier/atelier-dune-dark.ts index 7a3c3fbd07dac797d97eb05c7c74e10f95f954ca..c21ee61a6030c03ced3adb3ae399edb1c4ac999f 100644 --- a/styles/src/themes/atelier-dune/atelier-dune-dark.ts +++ b/styles/src/themes/atelier/atelier-dune-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-dune/atelier-dune-light.ts b/styles/src/themes/atelier/atelier-dune-light.ts similarity index 95% rename from styles/src/themes/atelier-dune/atelier-dune-light.ts rename to styles/src/themes/atelier/atelier-dune-light.ts index 3ee60164b689f41db333f31b80f01dcbfc2a7de9..956ae72c60f6da957abffb3c7234cea5441d50a3 100644 --- a/styles/src/themes/atelier-dune/atelier-dune-light.ts +++ b/styles/src/themes/atelier/atelier-dune-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-estuary/atelier-estuary-dark.ts b/styles/src/themes/atelier/atelier-estuary-dark.ts similarity index 95% rename from styles/src/themes/atelier-estuary/atelier-estuary-dark.ts rename to styles/src/themes/atelier/atelier-estuary-dark.ts index 5ec6df8d359ff6cf6c169d03d4cf4b252795f4bd..b9f1880d682fa8b9a9b23015beba5ffb355564b5 100644 --- a/styles/src/themes/atelier-estuary/atelier-estuary-dark.ts +++ b/styles/src/themes/atelier/atelier-estuary-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-estuary/atelier-estuary-light.ts b/styles/src/themes/atelier/atelier-estuary-light.ts similarity index 95% rename from styles/src/themes/atelier-estuary/atelier-estuary-light.ts rename to styles/src/themes/atelier/atelier-estuary-light.ts index bc583d41ac7cd7345c2b1d0b3ca11a6258658391..a9eeb612edb4a45fcf0d51bcf92f95c1122697dd 100644 --- a/styles/src/themes/atelier-estuary/atelier-estuary-light.ts +++ b/styles/src/themes/atelier/atelier-estuary-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-forest/atelier-forest-dark.ts b/styles/src/themes/atelier/atelier-forest-dark.ts similarity index 95% rename from styles/src/themes/atelier-forest/atelier-forest-dark.ts rename to styles/src/themes/atelier/atelier-forest-dark.ts index 72f958efdfad406d7a1e1504f735e6684851ef9c..352f1ea43efe7760e6752e7d5a313ad8a5ff3dd9 100644 --- a/styles/src/themes/atelier-forest/atelier-forest-dark.ts +++ b/styles/src/themes/atelier/atelier-forest-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-forest/atelier-forest-light.ts b/styles/src/themes/atelier/atelier-forest-light.ts similarity index 95% rename from styles/src/themes/atelier-forest/atelier-forest-light.ts rename to styles/src/themes/atelier/atelier-forest-light.ts index 463350f822a2f8941b31a5e2e7bad93d0d8668f1..1378c9b061490b0606e5e6b5297d81878cf5986e 100644 --- a/styles/src/themes/atelier-forest/atelier-forest-light.ts +++ b/styles/src/themes/atelier/atelier-forest-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-heath/atelier-heath-dark.ts b/styles/src/themes/atelier/atelier-heath-dark.ts similarity index 95% rename from styles/src/themes/atelier-heath/atelier-heath-dark.ts rename to styles/src/themes/atelier/atelier-heath-dark.ts index 010169b0225b759ee4b10fbc6037d12f13eebd4e..4c3519442271f6a0e5967dc2c4e5a276834ffa0d 100644 --- a/styles/src/themes/atelier-heath/atelier-heath-dark.ts +++ b/styles/src/themes/atelier/atelier-heath-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-heath/atelier-heath-light.ts b/styles/src/themes/atelier/atelier-heath-light.ts similarity index 95% rename from styles/src/themes/atelier-heath/atelier-heath-light.ts rename to styles/src/themes/atelier/atelier-heath-light.ts index 09d39b6d6662b8f3018ea418c9278a15bc86d9c7..51b9ef93988f2e4f0eb3527a6e2a4003a1a13647 100644 --- a/styles/src/themes/atelier-heath/atelier-heath-light.ts +++ b/styles/src/themes/atelier/atelier-heath-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts b/styles/src/themes/atelier/atelier-lakeside-dark.ts similarity index 95% rename from styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts rename to styles/src/themes/atelier/atelier-lakeside-dark.ts index 59728f30f327a20fab35210d3400ed62176de870..ece9179860ec0bd45db4849a179ce0ff7b7a77a8 100644 --- a/styles/src/themes/atelier-lakeside/atelier-lakeside-dark.ts +++ b/styles/src/themes/atelier/atelier-lakeside-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts b/styles/src/themes/atelier/atelier-lakeside-light.ts similarity index 95% rename from styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts rename to styles/src/themes/atelier/atelier-lakeside-light.ts index d26c4fe67945454b7bbd43b27f409fea9dc171bd..fd265d10c8acde6e989e5ac5e961aa706e0fc207 100644 --- a/styles/src/themes/atelier-lakeside/atelier-lakeside-light.ts +++ b/styles/src/themes/atelier/atelier-lakeside-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-plateau/atelier-plateau-dark.ts b/styles/src/themes/atelier/atelier-plateau-dark.ts similarity index 95% rename from styles/src/themes/atelier-plateau/atelier-plateau-dark.ts rename to styles/src/themes/atelier/atelier-plateau-dark.ts index 8299116c0efbd484279cb01dd1f946e9923af3ba..ef64782bda4109269beb52b9f8c9aa65486cb4f7 100644 --- a/styles/src/themes/atelier-plateau/atelier-plateau-dark.ts +++ b/styles/src/themes/atelier/atelier-plateau-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-plateau/atelier-plateau-light.ts b/styles/src/themes/atelier/atelier-plateau-light.ts similarity index 95% rename from styles/src/themes/atelier-plateau/atelier-plateau-light.ts rename to styles/src/themes/atelier/atelier-plateau-light.ts index 7fcc4220accaca761cec203e9856102781a14b7d..9fe51f5b7914d283bfcc4e2651bab2f987ede16a 100644 --- a/styles/src/themes/atelier-plateau/atelier-plateau-light.ts +++ b/styles/src/themes/atelier/atelier-plateau-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-savanna/atelier-savanna-dark.ts b/styles/src/themes/atelier/atelier-savanna-dark.ts similarity index 95% rename from styles/src/themes/atelier-savanna/atelier-savanna-dark.ts rename to styles/src/themes/atelier/atelier-savanna-dark.ts index 5b6f034563433379d30f27d4b5043b35d3402ee1..36de9b817f52bc490723a8ecc5d91f271dcb6f27 100644 --- a/styles/src/themes/atelier-savanna/atelier-savanna-dark.ts +++ b/styles/src/themes/atelier/atelier-savanna-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-savanna/atelier-savanna-light.ts b/styles/src/themes/atelier/atelier-savanna-light.ts similarity index 95% rename from styles/src/themes/atelier-savanna/atelier-savanna-light.ts rename to styles/src/themes/atelier/atelier-savanna-light.ts index 498959487696546e2d5c540a44019fbb5262e6ac..d5d9cb369d8da7b5a141b251b4af1d5ef8c9b978 100644 --- a/styles/src/themes/atelier-savanna/atelier-savanna-light.ts +++ b/styles/src/themes/atelier/atelier-savanna-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-seaside/atelier-seaside-dark.ts b/styles/src/themes/atelier/atelier-seaside-dark.ts similarity index 95% rename from styles/src/themes/atelier-seaside/atelier-seaside-dark.ts rename to styles/src/themes/atelier/atelier-seaside-dark.ts index 00631eff51f8e3431a8ae5c872a0428efe659dca..f7c49ad71eb1e885e92491f960560b5c7b72d24b 100644 --- a/styles/src/themes/atelier-seaside/atelier-seaside-dark.ts +++ b/styles/src/themes/atelier/atelier-seaside-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-seaside/atelier-seaside-light.ts b/styles/src/themes/atelier/atelier-seaside-light.ts similarity index 95% rename from styles/src/themes/atelier-seaside/atelier-seaside-light.ts rename to styles/src/themes/atelier/atelier-seaside-light.ts index af6af2f02737968d5161118bb2442c6426cc6a1d..1cf64614464a5d8b3e23576b1bc110d4c21ebff6 100644 --- a/styles/src/themes/atelier-seaside/atelier-seaside-light.ts +++ b/styles/src/themes/atelier/atelier-seaside-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts similarity index 95% rename from styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts rename to styles/src/themes/atelier/atelier-sulphurpool-dark.ts index 140d02c2e6bc49a69e4dda59c4142dbcc6f714af..b4a4e2a651981487b1e51c275d31d0c7ff70b029 100644 --- a/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-dark.ts +++ b/styles/src/themes/atelier/atelier-sulphurpool-dark.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { diff --git a/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts b/styles/src/themes/atelier/atelier-sulphurpool-light.ts similarity index 95% rename from styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts rename to styles/src/themes/atelier/atelier-sulphurpool-light.ts index b6dba4c384cde17bafe88ce27cbf5a802b8ee020..046adbdf4315a4d305d96b79046631513a133a91 100644 --- a/styles/src/themes/atelier-sulphurpool/atelier-sulphurpool-light.ts +++ b/styles/src/themes/atelier/atelier-sulphurpool-light.ts @@ -1,7 +1,7 @@ import chroma from "chroma-js" import { Meta } from "../common/colorScheme" import { colorRamp, createColorScheme } from "../common/ramps" -import { metaCommon, name, buildSyntax, Variant } from "../common/atelier-common" +import { metaCommon, name, buildSyntax, Variant } from "./common" const variant: Variant = { meta: { From 05d1dd6b11386002680d8d0df67e975c56517ce2 Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 16:53:12 +0200 Subject: [PATCH 5/8] refactor: move common to theme folder --- styles/src/colorSchemes.ts | 2 +- .../themes/{common/atelier-common.ts => atelier/common.ts} | 2 +- styles/src/themes/ayu/ayu-dark.ts | 2 +- styles/src/themes/ayu/ayu-light.ts | 2 +- styles/src/themes/ayu/ayu-mirage.ts | 2 +- styles/src/themes/{common/ayu-common.ts => ayu/common.ts} | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) rename styles/src/themes/{common/atelier-common.ts => atelier/common.ts} (96%) rename styles/src/themes/{common/ayu-common.ts => ayu/common.ts} (95%) diff --git a/styles/src/colorSchemes.ts b/styles/src/colorSchemes.ts index e8d06870440e0d2fe1f1cb528ff04ed5e79b1f5f..07eb26a591d6014ff6f73dcce73fe2ac86515e11 100644 --- a/styles/src/colorSchemes.ts +++ b/styles/src/colorSchemes.ts @@ -4,7 +4,7 @@ import { ColorScheme, Meta } from "./themes/common/colorScheme" const THEMES_DIRECTORY = path.resolve(`${__dirname}/themes`) const STAFF_DIRECTORY = path.resolve(`${__dirname}/themes/staff`) -const IGNORE_ITEMS = ["staff", "common", "template.ts"] +const IGNORE_ITEMS = ["staff", "common", "common.ts"] const ACCEPT_EXTENSION = ".ts" function getAllTsFiles(directoryPath: string) { diff --git a/styles/src/themes/common/atelier-common.ts b/styles/src/themes/atelier/common.ts similarity index 96% rename from styles/src/themes/common/atelier-common.ts rename to styles/src/themes/atelier/common.ts index 08a915d01948f300441d0904cbff2fd406e3dcba..7fb07f7a6e98beb2b9d7c53ee60f03bedcdcdc12 100644 --- a/styles/src/themes/common/atelier-common.ts +++ b/styles/src/themes/atelier/common.ts @@ -1,4 +1,4 @@ -import { License, Meta, ThemeSyntax } from "./colorScheme" +import { License, Meta, ThemeSyntax } from "../common/colorScheme" export interface Variant { meta: Meta diff --git a/styles/src/themes/ayu/ayu-dark.ts b/styles/src/themes/ayu/ayu-dark.ts index eb837231fe1b0d3818768ce0b149a512d6ea3f7d..1dc663f161b6baa862fb42cb07fc9ddbb9c5c3e0 100644 --- a/styles/src/themes/ayu/ayu-dark.ts +++ b/styles/src/themes/ayu/ayu-dark.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu/ayu-light.ts b/styles/src/themes/ayu/ayu-light.ts index 9c29449db5bd323e21aa9004a1b2ac2731c0a617..25435219447e1d7e4dd1125c59cb04cb420315eb 100644 --- a/styles/src/themes/ayu/ayu-light.ts +++ b/styles/src/themes/ayu/ayu-light.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu/ayu-mirage.ts b/styles/src/themes/ayu/ayu-mirage.ts index 52bf5493922102fffd9cd8cc0eef24ba9bb2b720..2ada3678ee47a95112bcff76150b8b2f54273f40 100644 --- a/styles/src/themes/ayu/ayu-mirage.ts +++ b/styles/src/themes/ayu/ayu-mirage.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/common/ayu-common.ts b/styles/src/themes/ayu/common.ts similarity index 95% rename from styles/src/themes/common/ayu-common.ts rename to styles/src/themes/ayu/common.ts index f08817ef492e7c56fac0e593ffd0d74d1e4d735b..2d3687801f82300cc95af15941ec1ce72ea5e3ad 100644 --- a/styles/src/themes/common/ayu-common.ts +++ b/styles/src/themes/ayu/common.ts @@ -1,8 +1,8 @@ import { dark, light, mirage } from "ayu" -import { ThemeSyntax } from "./syntax" +import { ThemeSyntax } from "../common/syntax" import chroma from "chroma-js" -import { colorRamp } from "./ramps" -import { Meta } from "./colorScheme" +import { colorRamp } from "../common/ramps" +import { Meta } from "../common/colorScheme" export const ayu = { dark, From 14efc18ecac7a601ad8481cde656a5dc6123ef2b Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 18:11:54 +0200 Subject: [PATCH 6/8] refactor: add license file and check it exists --- styles/src/colorSchemes.ts | 33 ++++++++++++++++++------- styles/src/themes/common/colorScheme.ts | 5 ++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/styles/src/colorSchemes.ts b/styles/src/colorSchemes.ts index 07eb26a591d6014ff6f73dcce73fe2ac86515e11..74f1a2a03c4e44e43640534755d804e8163413d3 100644 --- a/styles/src/colorSchemes.ts +++ b/styles/src/colorSchemes.ts @@ -1,11 +1,12 @@ import fs from "fs" import path from "path" -import { ColorScheme, Meta } from "./themes/common/colorScheme" +import { ColorScheme, MetaAndLicense } from "./themes/common/colorScheme" const THEMES_DIRECTORY = path.resolve(`${__dirname}/themes`) const STAFF_DIRECTORY = path.resolve(`${__dirname}/themes/staff`) const IGNORE_ITEMS = ["staff", "common", "common.ts"] const ACCEPT_EXTENSION = ".ts" +const LICENSE_FILE_NAME = "LICENSE" function getAllTsFiles(directoryPath: string) { const files = fs.readdirSync(directoryPath) @@ -30,7 +31,9 @@ function getAllColorSchemes(directoryPath: string) { const files = getAllTsFiles(directoryPath) return files.map((filePath) => ({ colorScheme: require(filePath), - filePath: path.basename(filePath), + filePath, + fileName: path.basename(filePath), + licenseFile: `${path.dirname(filePath)}/${LICENSE_FILE_NAME}`, })) } @@ -45,15 +48,27 @@ function getColorSchemes(directoryPath: string) { return colorSchemes } -function getMeta(directoryPath: string) { - const meta: Meta[] = [] +function getMetaAndLicense(directoryPath: string) { + const meta: MetaAndLicense[] = [] - for (const { colorScheme, filePath } of getAllColorSchemes(directoryPath)) { - if (colorScheme.meta) { - meta.push(colorScheme.meta) - } else { + for (const { colorScheme, filePath, licenseFile } of getAllColorSchemes( + directoryPath + )) { + const licenseExists = fs.existsSync(licenseFile) + if (!licenseExists) { + throw Error( + `Public theme should have a LICENSE file ${licenseFile}` + ) + } + + if (!colorScheme.meta) { throw Error(`Public theme ${filePath} must have a meta field`) } + + meta.push({ + meta: colorScheme.meta, + licenseFile, + }) } return meta @@ -61,4 +76,4 @@ function getMeta(directoryPath: string) { export const colorSchemes = getColorSchemes(THEMES_DIRECTORY) export const staffColorSchemes = getColorSchemes(STAFF_DIRECTORY) -export const schemeMeta = getMeta(THEMES_DIRECTORY) +export const schemeMeta = getMetaAndLicense(THEMES_DIRECTORY) diff --git a/styles/src/themes/common/colorScheme.ts b/styles/src/themes/common/colorScheme.ts index 3b5b8f69329651f20a0ad5aef834eb9435e8b5d1..657250f5f298ad79ee7ea9e248be51d20f24553e 100644 --- a/styles/src/themes/common/colorScheme.ts +++ b/styles/src/themes/common/colorScheme.ts @@ -19,6 +19,11 @@ export interface ColorScheme { syntax?: Partial } +export interface MetaAndLicense { + meta: Meta + licenseFile: string +} + export interface Meta { name: string author: string From 4568f80f2e7cbc7e822762bcf7d54e782998d02f Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 18:12:31 +0200 Subject: [PATCH 7/8] feat: read from LICENSE file --- styles/src/buildLicenses.ts | 78 ++++++++++--------------------------- 1 file changed, 20 insertions(+), 58 deletions(-) diff --git a/styles/src/buildLicenses.ts b/styles/src/buildLicenses.ts index 3367e50ff027601db2b68ead242dc3a266b21e1e..9a053e9c0c9ca7732a71b149a884df4a11b9391c 100644 --- a/styles/src/buildLicenses.ts +++ b/styles/src/buildLicenses.ts @@ -1,11 +1,9 @@ import * as fs from "fs" import toml from "toml" import { schemeMeta } from "./colorSchemes" -import { Meta, Verification } from "./themes/common/colorScheme" -import https from "https" -import crypto from "crypto" +import { MetaAndLicense } from "./themes/common/colorScheme" -const accepted_licenses_file = `${__dirname}/../../script/licenses/zed-licenses.toml` +const ACCEPTED_LICENSES_FILE = `${__dirname}/../../script/licenses/zed-licenses.toml` // Use the cargo-about configuration file as the source of truth for supported licenses. function parseAcceptedToml(file: string): string[] { @@ -20,8 +18,11 @@ function parseAcceptedToml(file: string): string[] { return obj.accepted } -function checkLicenses(schemeMeta: Meta[], licenses: string[]) { - for (let meta of schemeMeta) { +function checkLicenses( + schemeMetaWithLicense: MetaAndLicense[], + licenses: string[] +) { + for (const { meta } of schemeMetaWithLicense) { // FIXME: Add support for conjuctions and conditions if (licenses.indexOf(meta.license.SPDX) < 0) { throw Error( @@ -31,62 +32,23 @@ function checkLicenses(schemeMeta: Meta[], licenses: string[]) { } } -function getLicenseText( - schemeMeta: Meta[], - callback: (meta: Meta, license_text: string) => void -) { - for (let meta of schemeMeta) { - 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 (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 - }) - } +function generateLicenseFile(schemeMetaWithLicense: MetaAndLicense[]) { + for (const { meta, licenseFile } of schemeMetaWithLicense) { + const licenseText = fs.readFileSync(licenseFile).toString() + writeLicense(meta.name, meta.url, licenseText) } } -function writeLicense(schemeMeta: Meta, text: String) { +function writeLicense( + themeName: string, + themeUrl: string, + licenseText: String +) { process.stdout.write( - `## [${schemeMeta.name}](${schemeMeta.url})\n\n${text}\n********************************************************************************\n\n` + `## [${themeName}](${themeUrl})\n\n${licenseText}\n********************************************************************************\n\n` ) } -const accepted_licenses = parseAcceptedToml(accepted_licenses_file) -checkLicenses(schemeMeta, accepted_licenses) - -getLicenseText(schemeMeta, (meta, text) => { - writeLicense(meta, text) -}) +const acceptedLicenses = parseAcceptedToml(ACCEPTED_LICENSES_FILE) +checkLicenses(schemeMeta, acceptedLicenses) +generateLicenseFile(schemeMeta) From 51c7078f47827e3701c275e501bc2a040799d32b Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 18:16:50 +0200 Subject: [PATCH 8/8] chore: remove license_text --- styles/src/themes/andromeda/andromeda.ts | 6 ------ styles/src/themes/atelier/common.ts | 5 ----- styles/src/themes/ayu/common.ts | 6 ------ styles/src/themes/common/colorScheme.ts | 7 ------- styles/src/themes/gruvbox/gruvbox-common.ts | 2 -- styles/src/themes/one/one-dark.ts | 6 ------ styles/src/themes/one/one-light.ts | 6 ------ styles/src/themes/rose-pine/rose-pine-dawn.ts | 6 ------ styles/src/themes/rose-pine/rose-pine-moon.ts | 6 ------ styles/src/themes/rose-pine/rose-pine.ts | 6 ------ styles/src/themes/sandcastle/sandcastle.ts | 6 ------ styles/src/themes/solarized/solarized.ts | 6 ------ styles/src/themes/summercamp/summercamp.ts | 6 ------ 13 files changed, 74 deletions(-) diff --git a/styles/src/themes/andromeda/andromeda.ts b/styles/src/themes/andromeda/andromeda.ts index adfea37d0694dc47350d96178478ef0b370117f3..d7f7f53b90705bbee2431100797631d33bfbb041 100644 --- a/styles/src/themes/andromeda/andromeda.ts +++ b/styles/src/themes/andromeda/andromeda.ts @@ -34,12 +34,6 @@ export const meta: Meta = { author: "EliverLara", license: { SPDX: "MIT", - 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/common.ts b/styles/src/themes/atelier/common.ts index 7fb07f7a6e98beb2b9d7c53ee60f03bedcdcdc12..746834c88b0103daa7be8c73e75b96dd298e1c6a 100644 --- a/styles/src/themes/atelier/common.ts +++ b/styles/src/themes/atelier/common.ts @@ -29,11 +29,6 @@ export const metaCommon: { author: "Bram de Haan (http://atelierbramdehaan.nl)", license: { SPDX: "MIT", - license_text: { - https_url: "https://atelierbram.mit-license.org/license.txt", - license_checksum: - "f95ce526ef4e7eecf7a832bba0e3451cc1000f9ce63eb01ed6f64f8109f5d0a5", - }, }, } diff --git a/styles/src/themes/ayu/common.ts b/styles/src/themes/ayu/common.ts index 2d3687801f82300cc95af15941ec1ce72ea5e3ad..e586e2d22d7c8a2fdf237ed0f19d56e4eb3bc249 100644 --- a/styles/src/themes/ayu/common.ts +++ b/styles/src/themes/ayu/common.ts @@ -79,12 +79,6 @@ export const meta: Meta = { author: "dempfi", license: { SPDX: "MIT", - license_text: { - https_url: - "https://raw.githubusercontent.com/dempfi/ayu/master/LICENSE", - license_checksum: - "e0af0e0d1754c18ca075649d42f5c6d9a60f8bdc03c20dfd97105f2253a94173", - }, }, url: "https://github.com/dempfi/ayu", } diff --git a/styles/src/themes/common/colorScheme.ts b/styles/src/themes/common/colorScheme.ts index 657250f5f298ad79ee7ea9e248be51d20f24553e..5cf125ae8f723fd2130eacda5d00be3ad604bf6e 100644 --- a/styles/src/themes/common/colorScheme.ts +++ b/styles/src/themes/common/colorScheme.ts @@ -33,13 +33,6 @@ 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 } // License name -> License text diff --git a/styles/src/themes/gruvbox/gruvbox-common.ts b/styles/src/themes/gruvbox/gruvbox-common.ts index 5958fe62aceeeba3c7c6b5191a8046eeecee5e93..b113ce68c6f94450671247c066402ed6102095cb 100644 --- a/styles/src/themes/gruvbox/gruvbox-common.ts +++ b/styles/src/themes/gruvbox/gruvbox-common.ts @@ -248,8 +248,6 @@ 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/one/one-dark.ts b/styles/src/themes/one/one-dark.ts index 71062940a5cb8f4d9fc345b3abdcb3ab0d4d2ea6..1a88ddf7dce22e39e6712136b619e0ff2aefeccd 100644 --- a/styles/src/themes/one/one-dark.ts +++ b/styles/src/themes/one/one-dark.ts @@ -74,12 +74,6 @@ export const meta: Meta = { author: "simurai", license: { SPDX: "MIT", - 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/one-light.ts b/styles/src/themes/one/one-light.ts index 8ae42e8b1d161f291bc76dd462aae5e79b18e109..231ee3abb3d19cbc6f4bd9a0d4d150a578542db8 100644 --- a/styles/src/themes/one/one-light.ts +++ b/styles/src/themes/one/one-light.ts @@ -73,12 +73,6 @@ export const meta: Meta = { author: "simurai", license: { SPDX: "MIT", - 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/rose-pine-dawn.ts b/styles/src/themes/rose-pine/rose-pine-dawn.ts index 48da855304781e58584368dfdf9f8ea088c25823..cf953872e1a4f7a15e1e0bd3f49356ca86a5e11b 100644 --- a/styles/src/themes/rose-pine/rose-pine-dawn.ts +++ b/styles/src/themes/rose-pine/rose-pine-dawn.ts @@ -34,12 +34,6 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - 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/rose-pine-moon.ts b/styles/src/themes/rose-pine/rose-pine-moon.ts index 2e13ca4b707d77747f58afbf28229bf9d381c2a9..85ac5fd73ef73bc8e36f228a50c4ab1cc3749169 100644 --- a/styles/src/themes/rose-pine/rose-pine-moon.ts +++ b/styles/src/themes/rose-pine/rose-pine-moon.ts @@ -34,12 +34,6 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - 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/rose-pine.ts b/styles/src/themes/rose-pine/rose-pine.ts index 33d7d533e6508fd4217dc02f3b864f3fbb5c05fe..fe2817be1363076b6e171adf1fbd0469d1f85cdb 100644 --- a/styles/src/themes/rose-pine/rose-pine.ts +++ b/styles/src/themes/rose-pine/rose-pine.ts @@ -32,12 +32,6 @@ export const meta: Meta = { author: "edunfelt", license: { SPDX: "MIT", - 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/sandcastle.ts b/styles/src/themes/sandcastle/sandcastle.ts index 0b265212562745717efef8871f23e69066673b59..2544b6399a66168446f96b3d71654cad48d9fcdc 100644 --- a/styles/src/themes/sandcastle/sandcastle.ts +++ b/styles/src/themes/sandcastle/sandcastle.ts @@ -32,12 +32,6 @@ export const meta: Meta = { author: "gessig", license: { SPDX: "MIT", - 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/solarized.ts b/styles/src/themes/solarized/solarized.ts index 13e3e34460bee124b1220f23556b6fd885a5d310..6c826fbee75c7a18633a782bad1e0106c9cf81d7 100644 --- a/styles/src/themes/solarized/solarized.ts +++ b/styles/src/themes/solarized/solarized.ts @@ -35,12 +35,6 @@ export const meta: Metadata = { author: "Ethan Schoonover", license: { SPDX: "MIT", - 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/summercamp/summercamp.ts b/styles/src/themes/summercamp/summercamp.ts index 41e101af0208f676261dec19cf0a55d714bf0ce0..94c0072e4fddd5eda97851c4b0d8cc2908700303 100644 --- a/styles/src/themes/summercamp/summercamp.ts +++ b/styles/src/themes/summercamp/summercamp.ts @@ -34,11 +34,5 @@ export const meta: Meta = { url: "https://github.com/zoefiri/base16-sc", license: { SPDX: "MIT", - license_text: { - https_url: - "https://raw.githubusercontent.com/zoefiri/base16-sc/master/LICENSE", - license_checksum: - "fadcc834b7eaf2943800956600e8aeea4b495ecf6490f4c4b6c91556a90accaf", - }, }, }