-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOSMonterey cursors added 🎊 fixed #66
- Loading branch information
Showing
10 changed files
with
187 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "monterey", | ||
"version": "1.2.2", | ||
"description": "macOS Monterey cursors", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "npx tsc --build", | ||
"render": "yarn build && node dist/index.js" | ||
}, | ||
"author": "Kaiz Khatri", | ||
"license": "GPL-3.0", | ||
"private": true, | ||
"devDependencies": { | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Colors } from "core/src/types"; | ||
|
||
interface Config { | ||
themeName: string; | ||
color: Colors; | ||
} | ||
|
||
const black = "#000000"; | ||
const white = "#FFFFFF"; | ||
|
||
const config: Config[] = [ | ||
{ | ||
themeName: "macOSMonterey", | ||
color: { | ||
base: black, | ||
outline: white, | ||
}, | ||
}, | ||
{ | ||
themeName: "macOSMonterey-White", | ||
color: { | ||
base: white, | ||
outline: black, | ||
}, | ||
}, | ||
]; | ||
|
||
export { config }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import path from "path"; | ||
|
||
import { BitmapsGenerator, SVGHandler } from "core"; | ||
import { config } from "./config"; | ||
|
||
const root = path.resolve(__dirname, "../../../../"); | ||
const svgDir = path.resolve(root, "svg", "monterey"); | ||
|
||
const main = async () => { | ||
for (const { themeName, color } of config) { | ||
console.log("=>", themeName); | ||
|
||
const bitmapsDir = path.resolve(root, "bitmaps", themeName); | ||
const svg = new SVGHandler.SvgDirectoryParser(svgDir); | ||
|
||
const png = new BitmapsGenerator(bitmapsDir); | ||
const browser = await png.getBrowser(); | ||
|
||
for (let { key, content } of svg.getStatic()) { | ||
console.log(" -> Saving", key, "..."); | ||
|
||
content = SVGHandler.colorSvg(content, color); | ||
await png.generateStatic(browser, content, key); | ||
} | ||
|
||
for (let { key, content } of svg.getAnimated()) { | ||
console.log(" -> Saving", key, "..."); | ||
|
||
content = SVGHandler.colorSvg(content, color); | ||
await png.generateAnimated(browser, content, key); | ||
} | ||
|
||
await browser.close(); | ||
} | ||
}; | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
{ | ||
"references": [{ "path": "../core" }], | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"outDir": "dist" | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters