Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Prefer submitting manually from the browser? Open the [GitHub Web Theme Editor](
## Validation Rules

- Required fields: `name`, `type` (`"light"` or `"dark"`), `colors` (minimum: `background`, `foreground`, `primary`, `card`, `border`).
- Optional fields: `$schema`, `author`, `authorUrl` (`https://github.com/...`), `editorColors` (keys must start with `editor-`).
- Optional fields: `$schema`, `author`, `authorUrl` (`https://github.com/...`), `license` (SPDX ID, e.g. `"MIT"`), `copyright` (upstream or author notice), `editorColors` (keys must start with `editor-`).
- Supported CSS color formats: `#hex`, `rgb(...)`, `rgba(...)`, `hsl(...)`, `hsla(...)`, `oklch(...)`.
- Legacy `color-*` tokens (such as `color-bg`, `color-primary`) are not allowed.

## Porting Third-Party Themes

If your theme is a port of an existing open-source theme, you may include `license` and `copyright` fields in your theme JSON (they are preserved verbatim when installed through massCode) and add an entry to [THIRD_PARTY_LICENSES.md](./THIRD_PARTY_LICENSES.md).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 massCode

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.
57 changes: 57 additions & 0 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Third-Party Licenses & Attribution

Some themes in this repository are ports or adaptations of community color palettes originally published under open-source licenses. Their upstream sources, licenses, and copyright notices are listed below.

## Ported Themes (MIT License)

### Catppuccin Latte & Catppuccin Mocha
- **Upstream:** https://github.com/catppuccin/catppuccin
- **License:** MIT
- **Notice:** Copyright (c) 2021 Catppuccin

### Dracula
- **Upstream:** https://github.com/dracula/dracula-theme
- **License:** MIT
- **Notice:** Copyright (c) 2013 Zeno Rocha

### GitHub Light
- **Upstream:** https://github.com/primer/github-vscode-theme
- **License:** MIT
- **Notice:** Copyright (c) 2020 GitHub, Inc.

### One Light & One Dark
- **Upstream:** https://github.com/atom/one-light-syntax · https://github.com/atom/one-dark-syntax
- **License:** MIT
- **Notice:** Copyright (c) 2016 GitHub Inc.

### Rosé Pine Dawn
- **Upstream:** https://github.com/rose-pine/rose-pine-theme
- **License:** MIT
- **Notice:** Copyright (c) 2020 Rosé Pine

### Tokyo Night
- **Upstream:** https://github.com/enkia/tokyo-night-vscode-theme
- **License:** MIT
- **Notice:** Copyright (c) 2020 Enkia

---

## MIT License Text

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.
12 changes: 12 additions & 0 deletions schema/theme.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
"pattern": "^https://github\\.com/[A-Za-z0-9_.-]+(?:/[A-Za-z0-9_.-]+)?/?$",
"description": "GitHub profile or repository URL of the author"
},
"license": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Optional SPDX license identifier (e.g. MIT)"
},
"copyright": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Optional upstream or author copyright notice"
},
"type": {
"type": "string",
"enum": ["light", "dark"]
Expand Down
8 changes: 8 additions & 0 deletions scripts/build-registry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ function validateTheme(fileName, rawContent) {
errors.push(`${fileName}: "authorUrl" must be a valid https://github.com/... URL`)
}

if (data.license !== undefined && (typeof data.license !== 'string' || !data.license.trim() || data.license.trim().length > 64)) {
errors.push(`${fileName}: "license" must be a non-empty string (max 64 chars)`)
}

if (data.copyright !== undefined && (typeof data.copyright !== 'string' || !data.copyright.trim() || data.copyright.trim().length > 200)) {
errors.push(`${fileName}: "copyright" must be a non-empty string (max 200 chars)`)
}

if (!data.colors || typeof data.colors !== 'object' || Array.isArray(data.colors)) {
errors.push(`${fileName}: "colors" must be an object`)
}
Expand Down
Loading