diff --git a/.gitconfig b/.gitconfig
new file mode 100644
index 0000000..c833a6e
--- /dev/null
+++ b/.gitconfig
@@ -0,0 +1,6 @@
+[user]
+ name=Kaiz Khatri
+ email=kaizmandhu@gmail.com
+[alias]
+ co=checkout
+ br=branch
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c1d54cc..368ef77 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -7,7 +7,6 @@ on:
- "**.bbcode"
- LICENSE
branches: [main, dev]
-
pull_request:
paths-ignore:
- "**.md"
@@ -18,78 +17,55 @@ on:
jobs:
build:
runs-on: ubuntu-latest
-
steps:
- uses: actions/checkout@v2
-
- name: Install build dependencies (apt)
- run: |
- sudo apt install libx11-dev libxcursor-dev libpng-dev
+ run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev
continue-on-error: false
-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
-
- - uses: actions/cache@v2
+ - name: Caching yarn packages
+ uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
-
- - uses: actions/setup-node@v1
+ - name: Set Up NodeJS 12.x
+ uses: actions/setup-node@v1
with:
node-version: "12.x"
- - run: yarn install
- - run: yarn render
-
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: "3.x"
-
- - name: Cache pip dependencies
+ - name: Caching pip packages
uses: actions/cache@v2
+ id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`)
with:
- # This path is specific to Ubuntu
path: ~/.cache/pip
- # Look to see if there is a cache hit for the corresponding requirements file
- key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- ${{ runner.os }}-
-
- - name: Install pip dependencies
- run: |
- python -m pip install --upgrade pip
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- continue-on-error: false
-
- - name: Generating `macOSBigSur` Cursor Theme
- run: python build.py
-
- - name: Compressing Artifacts
- run: |
- tar -cvzf logs.tar.gz build.log
- tar -cvzf bitmaps.tar.gz bitmaps
- tar -cvzf macOSBigSur.tar.gz themes
-
- - name: Uploading `macOSBigSur` Build Log artifact
- uses: actions/upload-artifact@v2
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v2
with:
- name: logs
- path: logs.tar.gz
-
+ python-version: "3.8"
+ - name: Generating `macOSBigSur` Cursor Theme
+ run: make
+ continue-on-error: false
+ - name: Compressing UNIX theme
+ run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur
- name: Uploading `bitmaps` artifact
uses: actions/upload-artifact@v2
with:
name: bitmaps
- path: bitmaps.tar.gz
-
- - name: Uploading `macOSBigSur` Theme artifact
+ path: bitmaps/*
+ - name: Uploading `macOSBigSur` UNIX Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur
path: macOSBigSur.tar.gz
+ - name: Uploading `macOSBigSur` Windows Theme artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: macOSBigSur_Windows
+ path: themes/macOSBigSur_Windows/*
diff --git a/.gitignore b/.gitignore
index 0c12ae6..586d00a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
########## Custom
bitmaps
themes
+builder/files.txt
########## Python
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0afe697..60822dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased]
+## [1.1.0] - 7 Feb 2021
+
+### Added
+
+- Smooth animation of `Animated Cursors`
+- Auto-Package by `clickgen`
+- Customize & Build with `make`
+- Organized project
+- Builder with `setup.py`
+- Cursors design #33 **fixed**
+
+### Changed
+
+- Variable length frames render **fixed**
+- Minimum frames rendering added.
+- Windows cursors are renamed
+- cursor's config moved to `builder/applbuild/constants.py`
+
+## [1.0.6] - 1 Nov 2020
+
+### Added
+
+- `left_ptr_watch` with **blue pinwheel**
+
+### Changed
+
+- `build.log` removed feature in **clickgen v1.1.8**
+- Repack Windows cursors
+- Removed npm scripts & documentation (`yon` package removed)
+- npm dependencies got upgraded (**dependabot** 🤖 security warning)
+
## [1.0.6] - 1 Nov 2020
### Added
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..817b625
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,51 @@
+theme := macOSBigSur
+src := ./themes/$(theme)
+
+local := ~/.icons
+local_dest := $(local)/$(theme)
+
+root := /usr/share/icons
+root_dest := $(root)/$(theme)
+
+all: clean render build
+
+unix: clean render bitmaps
+ @cd builder && make build_unix
+
+windows: clean render bitmaps
+ @cd builder && make build_windows
+
+.PHONY: all
+
+clean:
+ @rm -rf bitmaps themes
+
+render: bitmapper svg
+ @cd bitmapper && $(MAKE)
+
+build: bitmaps
+ @cd builder && $(MAKE)
+
+.ONESHELL:
+SHELL:=/bin/bash
+
+
+install: themes/macOSBigSur
+ @if [[ $EUID -ne 0 ]]; then
+ @echo "> Installing '$(theme)' cursors inside $(local)/..."
+ @mkdir -p $(local)
+ @cp -r $(src) $(local_dest) && echo "> Installed!"
+ @else
+ @echo "> Installing '$(theme)' cursors inside $(root)/..."
+ @mkdir -p $(root)
+ @sudo cp -r $(src) $(root_dest) && echo "> Installed!"
+ @fi
+
+uninstall:
+ @if [[ $EUID -ne 0 ]]; then
+ @echo "> Removing '$(local_dest)'..."
+ @rm -rf $(local_dest)
+ @else
+ @echo "> Removing '$(root_dest)'..."
+ @sudo rm -rf $(root_dest)
+ @fi
\ No newline at end of file
diff --git a/PLING.bbcode b/PLING.bbcode
index 4c38d9a..cd908cb 100644
--- a/PLING.bbcode
+++ b/PLING.bbcode
@@ -1,11 +1,12 @@
-[b]macOS Big Sur[/b] Cursor Theme with [b]HiDPi[/b] Display support. This Cursor is built with [b][url=https://github.com/ful1e5/clickgen]clickgen[/url][/b] and render with the [b][url=https://github.com/puppeteer/puppeteer/]puppeteer[/url][/b].
+[b]macOS Big Sur[/b] Cursor Theme with [b]HiDPI[/b] Display support. This Cursor is built with [b][url=https://github.com/ful1e5/clickgen]clickgen[/url][/b] and render with the [b][url=https://github.com/puppeteer/puppeteer/]puppeteer[/url][/b].
[i]Available Sizes[/i] [b]22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96[/b]
-[i]Get latest build[/i] @[b][url=https://github.com/ful1e5/apple_cursor/actions]GitHub Actions[/url][/b]
+[i]Get the latest build[/i] @[b][url=https://github.com/ful1e5/apple_cursor/actions]GitHub Actions[/url][/b]
[i]Release Notification[/i] at [b][url=https://twitter.com/ful1e5]Twitter[/url][/b](@ful1e5)
+For [i]Customizing Size[/i] check [b][url=https://github.com/ful1e5/apple_cursor#manual-build]README.md[/url][/b]
[b]Linux/X11 installation[/b]
-Get the latest stable Linux release from the [b][url=https://www.pling.com/p/1408466/#files-panel]Pling[/url][/b]. Unpack [b].tar.gz[/b] file and follow these [b]commands[/b].
+Get the latest stable Linux release from the [b][url=https://www.pling.com/p/1408466/#files-panel]Pling[/url][/b]. Unpack the [b].tar.gz[/b] file and follow these [b]commands[/b].
[b]Install[/b]
[b]For all user:[/b]
@@ -23,7 +24,7 @@ Get the latest stable Linux release from the [b][url=https://www.pling.com/p/140
[list=1]
[*]unzip [b]macOSBigSur_Windows.zip[/b] file[/*]
[*]Open [b]macOSBigSur_Windows/[/b] in Explorer, and [b]right-click[/b] on [b]install.inf[/b].[/*]
- [*]Click 'Install' from the context menu, and authorise the modifications to your system.[/*]
+ [*]Click 'Install' from the context menu, and authorize the modifications to your system.[/*]
[*]Open [i]Control Panel > Personalisation and Appearance > Change mouse pointers[/i], and select [b]MacOSBigSur Cursors[/b].[/*]
[*]Click '[b]Apply[/b]'.[/*]
[/list]
diff --git a/README.md b/README.md
index 43b0e75..d75c8ff 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
-
+
@@ -31,7 +31,7 @@
-
+
@@ -68,41 +68,42 @@
# Apple Cursor
-Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)** Cursor Theme for `Windows` and `Linux` with _HiDPi Support_ 🎉.
+Enjoy **[macOS Big Sur](https://www.apple.com/macos/big-sur-preview/)** Cursor Theme for `Windows` and `Linux` with _HiDPI Support_ 🎉.
Table of Contents (click to expand)
-- [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install)
- - [Manual Install](#manual-install)
- - [Linux/X11](#linuxx11)
- - [Windows](#windows)
- - [Preview:](#preview)
-- [Dependencies](#dependencies)
- - [Runtime Dependencies](#runtime-dependencies)
- - [Install Runtime Dependencies](#install-runtime-dependencies)
- - [macOS](#macos)
- - [Debain/ubuntu](#debainubuntu)
- - [ArchLinux/Manjaro](#archlinuxmanjaro)
- - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel)
- - [Build Dependencies](#build-dependencies)
- - [Node Packages](#node-packages)
- - [PyPi Packages](#pypi-packages)
- - [Build From Scratch](#build-from-scratch)
- - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions)
- - [Manual Build](#manual-build)
- - [Setup python environment](#setup-python-environment)
- - [Compile From Source](#compile-from-source)
- - [Using yarn](#using-yarn)
- - [Using npm](#using-npm)
- - [Install Build Theme](#install-build-theme)
- - [Linux](#linux)
- - [Windows](#windows-1)
-- [Bugs](#bugs)
-- [Getting Help](#getting-help)
-- [Contributing](#contributing)
- - [Support](#support)
+- [Apple Cursor](#apple-cursor)
+ - [Cursor Sizes](#cursor-sizes)
+ - [Colors](#colors)
+ - [Quick install](#quick-install)
+ - [Manual Install](#manual-install)
+ - [Linux/X11](#linuxx11)
+ - [Windows](#windows)
+ - [Preview:](#preview)
+- [Dependencies](#dependencies)
+ - [External Libraries](#external-libraries)
+ - [Install External Libraries](#install-external-libraries)
+ - [macOS](#macos)
+ - [Debain/ubuntu](#debainubuntu)
+ - [ArchLinux/Manjaro](#archlinuxmanjaro)
+ - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel)
+ - [Build Dependencies](#build-dependencies)
+ - [Node Packages](#node-packages)
+ - [PyPi Packages](#pypi-packages)
+ - [Build From Scratch](#build-from-scratch)
+ - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions)
+ - [Manual Build](#manual-build)
+ - [Build `XCursor` theme](#build-xcursor-theme)
+ - [Customize `XCursor` size](#customize-xcursor-size)
+ - [Install `XCursor` theme](#install-xcursor-theme)
+ - [Build `Windows` theme](#build-windows-theme)
+ - [Customize `Windows Cursor` size](#customize-windows-cursor-size)
+- [Bugs](#bugs)
+- [Getting Help](#getting-help)
+- [Contributing](#contributing)
+ - [Support](#support)
@@ -144,11 +145,6 @@ Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)**
#### Linux/X11
-
-
-
```bash
# extract `macOSBigSur.tar.gz`
tar -xvf macOSBigSur.tar.gz
@@ -170,12 +166,12 @@ sudo mv macOSBigSur /usr/share/icons/
#### Preview:
-> Detailed Cursors Informations inside [src/svgs/README.md](https://github.com/ful1e5/apple_cursor/blob/main/src/svg/README.md)
+> Check Figma file [here](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/Mac-Cursor?node-id=0%3A1)
-
+
macOSBigSur Cursors 🍎
@@ -184,18 +180,19 @@ sudo mv macOSBigSur /usr/share/icons/
# Dependencies
-## Runtime Dependencies
+## External Libraries
-- libxcursor-dev
-- libx11-dev
-- libpng-dev (<=1.6)
+- libxcursor
+- libx11
+- libpng (<=1.6)
-#### Install Runtime Dependencies
+#### Install External Libraries
##### macOS
```bash
-brew cask install xquartz libpng
+brew install --cask xquartz
+brew install libpng
```
##### Debain/ubuntu
@@ -218,84 +215,69 @@ sudo dnf install libX11-devel libXcursor-devel libpng-devel
## Build Dependencies
-- [nodejs](https://nodejs.org/en/) (<=12.x.x)
-- [yarn](https://classic.yarnpkg.com/en/docs/install/) / [npm](https://docs.npmjs.com/cli/install.html)
-- [python](https://www.python.org/downloads/) (<=3.6)
-- [pip3](https://pip.pypa.io/en/stable/installing/)
+- [gcc](https://gcc.gnu.org/install/)
+- [make](https://www.gnu.org/software/make/)
+- [nodejs](https://nodejs.org/en/) (<=12.x.x)
+- [yarn](https://classic.yarnpkg.com/en/docs/install/)
+- [python](https://www.python.org/downloads/) (<=3.8)
+- [pip3](https://pip.pypa.io/en/stable/installing/)
### Node Packages
-- [puppeteer](https://www.npmjs.com/package/puppeteer)
-- [pngjs](https://www.npmjs.com/package/pngjs)
-- [pixelmatch](https://www.npmjs.com/package/pixelmatch)
+- [puppeteer](https://www.npmjs.com/package/puppeteer)
+- [pngjs](https://www.npmjs.com/package/pngjs)
+- [pixelmatch](https://www.npmjs.com/package/pixelmatch)
### PyPi Packages
-- [clickgen](https://pypi.org/project/clickgen/s)
-- [Pillow](https://pypi.org/project/Pillow/)
+- [clickgen](https://pypi.org/project/clickgen/s)
## Build From Scratch
### ⚡ Auto Build (using GitHub Actions)
-GitHub Actions is automatically runs on every `push`(on **main** and **dev** branches) and `pull request`(on **main** branch), You found theme resources in `artifact` section of **build**.GitHub **Actions** available inside [.github/workflows](https://github.com/ful1e5/apple_cursor/tree/main/.github/workflows) directory.
+GitHub Actions is automatically runs on every `push`(on **main** and **dev** branches) and `pull request`(on **main** branch), You found theme resources in `artifact` section of **build**.GitHub **Actions** source is available inside [.github/workflows](https://github.com/ful1e5/apple_cursor/tree/main/.github/workflows) directory.
### Manual Build
-#### Setup python environment
-
```bash
-python3 -m pip install --upgrade pip # Update pip to latest
-python3 -m pip3 install virtualenv # Install python virtual environment
-virtualenv venv # Create new virtualenv named `venv`
-source venv/bin/activate # Activate virtualenv
-
-# For Deactivate virtualenv
-deactivate
+make
```
-#### Compile From Source
-
-> Make sure your [python environment](#setup-python-environment) setup and `virtualenv` is **active**.
-
-##### Using yarn
+#### Build `XCursor` theme
```bash
-yarn install # Install all Node Packages
-yarn py_install # Install all PyPi Packages
-yarn compile # Compile the cursor theme
+make unix
```
-##### Using npm
+#### Customize `XCursor` size
```bash
-npm install # Install all Node Packages
-npm py_install # Install all PyPi Packages
-npm compile # Compile the cursor theme
+make unix X_SIZES=22 # Only built '22px' pixel-size.
+make unix X_SIZES=22 24 32 # Multiple sizes are provided with ' '(Space)
```
-After build `bitmaps` and `themes` directory are generated at project **root**.
-
-### Install Build Theme
-
-All builded cursor themes are available inside `themes` directory.
-
-#### Linux
+#### Install `XCursor` theme
```bash
-cd ./themes
-rm -rf ~/.icons/macOSBigSur && cp macOSBigSur ~/.icons/ # installing Theme to local user(recommend)
+make install # install as user
+ # OR
+sudo make install # install as root
```
-#### Windows
+#### Build `Windows` theme
-1. unzip `macOSBigSur_Windows.zip` file
-2. Open the `settings` app.
-3. **Goto** `Devices` -> `Mouse` -> `Additional Mouse Options`.
-4. **Goto** the `pointers` tab.
-5. Replace each cursor in the currently applied cursor set with the corresponding cursor in the `macOSBigSur_Windows` folder.
-6. Click "**save as**" and type in the desired name.
-7. Click "**apply**" and "**ok**".
+```bash
+make windows
+```
+
+#### Customize `Windows Cursor` size
+
+```bash
+make windows WIN_SIZE=96 # Supports only one pixel-size
+```
+
+> For installation follow [these](#windows) steps.
@@ -334,4 +316,6 @@ Give a **★** or Follow on [GitHub](https://github.com/ful1e5),That's work as *
I'm Using Katana
+
+ I'm Using Katana
diff --git a/bitmapper/Makefile b/bitmapper/Makefile
new file mode 100644
index 0000000..cd1d300
--- /dev/null
+++ b/bitmapper/Makefile
@@ -0,0 +1,18 @@
+all: install render
+
+.PHONY: all
+
+install: node_modules package.json
+ @yarn install
+
+render:
+ @yarn render
+
+watch:
+ @yarn watch
+
+node_modules:
+ @mkdir -p $@
+
+clean:
+ @rm -rf node_modules yarn.lock
\ No newline at end of file
diff --git a/bitmapper/package.json b/bitmapper/package.json
new file mode 100644
index 0000000..5c5c22c
--- /dev/null
+++ b/bitmapper/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "apple_cursor_bitmapper",
+ "version": "1.1.0",
+ "main": "index.js",
+ "scripts": {
+ "watch": "nodemon --inspect src/index.ts",
+ "render": "yarn ts-node src/index.ts"
+ },
+ "repository": "git@github.com:ful1e5/apple_cursor.git",
+ "author": "Kaiz Khatri",
+ "license": "GPL-3.0",
+ "private": true,
+ "devDependencies": {
+ "@types/pixelmatch": "^5.2.2",
+ "@types/pngjs": "^3.4.2",
+ "@types/puppeteer": "^5.4.2",
+ "nodemon": "^2.0.7",
+ "ts-node": "^9.1.1",
+ "typescript": "^4.1.3"
+ },
+ "dependencies": {
+ "pixelmatch": "^5.2.1",
+ "pngjs": "^6.0.0",
+ "puppeteer": "^5.5.0"
+ }
+}
diff --git a/bitmapper/src/config.ts b/bitmapper/src/config.ts
new file mode 100644
index 0000000..6ab4744
--- /dev/null
+++ b/bitmapper/src/config.ts
@@ -0,0 +1,23 @@
+import path from "path";
+import { readdirSync, existsSync } from "fs";
+
+// Directory resolve
+const projectRoot = path.resolve(__dirname, "../../");
+
+const outDir = path.resolve(projectRoot, "bitmaps");
+const staticSvgDir = path.resolve(projectRoot, "svg", "static");
+const animatedSvgDir = path.resolve(projectRoot, "svg", "animated");
+
+// Generate a svg list
+if (!existsSync(staticSvgDir) || !existsSync(animatedSvgDir)) {
+ throw new Error("svg directory not found");
+}
+
+const staticCursors = readdirSync(staticSvgDir).map((f) =>
+ path.resolve(staticSvgDir, f)
+);
+const animatedCursors = readdirSync(animatedSvgDir).map((f) =>
+ path.resolve(animatedSvgDir, f)
+);
+
+export { staticCursors, animatedCursors, outDir };
diff --git a/bitmapper/src/index.ts b/bitmapper/src/index.ts
new file mode 100644
index 0000000..9cff291
--- /dev/null
+++ b/bitmapper/src/index.ts
@@ -0,0 +1,127 @@
+import fs from "fs";
+import path from "path";
+import puppeteer, { ElementHandle, Page } from "puppeteer";
+
+import { animatedCursors, outDir, staticCursors } from "./config";
+import { frameNumber } from "./utils/frameNumber";
+import { matchImages } from "./utils/matchImages";
+import { toHTML } from "./utils/toHTML";
+
+const getSVGElement = async (page: Page) => {
+ const svg = await page.$("#container svg");
+
+ if (!svg) {
+ throw new Error("svg element not found!");
+ }
+ return svg;
+};
+
+const screenshot = async (element: ElementHandle): Promise => {
+ return element.screenshot({
+ omitBackground: true,
+ encoding: "binary",
+ });
+};
+
+const stopAnimation = async (page: Page) => {
+ // @ts-ignore
+ await page._client.send("Animation.setPlaybackRate", {
+ playbackRate: 0,
+ });
+};
+
+const resumeAnimation = async (page: Page, playbackRate: number = 0.1) => {
+ // @ts-ignore
+ await page._client.send("Animation.setPlaybackRate", {
+ playbackRate,
+ });
+};
+
+const saveFrameImage = (key: string, frame: Buffer) => {
+ const out_path = path.resolve(outDir, key);
+ fs.writeFileSync(out_path, frame, { encoding: "binary" });
+};
+
+const main = async () => {
+ const browser = await puppeteer.launch({
+ ignoreDefaultArgs: ["--single-process", "--no-sandbox"],
+ headless: true,
+ });
+
+ if (!fs.existsSync(outDir)) {
+ fs.mkdirSync(outDir);
+ } else {
+ throw new Error(`out directory '${outDir}' already exists.`);
+ }
+
+ for (const svgFilePath of staticCursors) {
+ const svgData = fs.readFileSync(svgFilePath, "utf-8");
+ if (!svgData) {
+ throw new Error(`${svgFilePath} File Read error`);
+ }
+
+ const page = await browser.newPage();
+ const html = toHTML(svgData);
+
+ await page.setContent(html);
+ const svg = await getSVGElement(page);
+
+ const key = `${path.basename(svgFilePath, ".svg")}.png`;
+ const out = path.join(outDir, key);
+
+ console.log("Saving", key, "...");
+ await svg.screenshot({ omitBackground: true, path: out });
+ await page.close();
+ }
+
+ for (const svgFilePath of animatedCursors) {
+ const svgData = fs.readFileSync(svgFilePath, "utf8");
+ if (!svgData) {
+ throw new Error(`${svgFilePath} File Read error`);
+ }
+
+ const page = await browser.newPage();
+ const html = toHTML(svgData);
+
+ await page.setContent(html);
+ const svg = await getSVGElement(page);
+ await stopAnimation(page);
+
+ let index = 1;
+ const frameLimit = 300;
+ let breakRendering = false;
+ let prevImg: Buffer;
+
+ // Rendering frames till `imgN` matched to `imgN-1` (When Animation is done)
+ while (!breakRendering) {
+ if (index > frameLimit) {
+ throw new Error("Reached the frame limit.");
+ }
+
+ resumeAnimation(page);
+ const img = await screenshot(svg);
+ stopAnimation(page);
+
+ if (index > 1) {
+ // @ts-ignore
+ const diff = matchImages(prevImg, img);
+ if (diff <= 100) {
+ breakRendering = !breakRendering;
+ }
+ }
+ const frame = frameNumber(index, 3);
+ const key = `${path.basename(svgFilePath, ".svg")}-${frame}.png`;
+
+ console.log("Saving", key, "...");
+ saveFrameImage(key, img);
+
+ prevImg = img;
+ ++index;
+ }
+
+ await page.close();
+ }
+ await browser.close();
+};
+
+main();
diff --git a/bitmapper/src/utils/frameNumber.ts b/bitmapper/src/utils/frameNumber.ts
new file mode 100644
index 0000000..76d1165
--- /dev/null
+++ b/bitmapper/src/utils/frameNumber.ts
@@ -0,0 +1,7 @@
+export const frameNumber = (index: number, padding: number) => {
+ let result = "" + index;
+ while (result.length < padding) {
+ result = "0" + result;
+ }
+ return result;
+};
diff --git a/bitmapper/src/utils/matchImages.ts b/bitmapper/src/utils/matchImages.ts
new file mode 100644
index 0000000..6d09a95
--- /dev/null
+++ b/bitmapper/src/utils/matchImages.ts
@@ -0,0 +1,11 @@
+import Pixelmatch from "pixelmatch";
+import { PNG } from "pngjs";
+
+export const matchImages = (img1: Buffer, img2: Buffer): number => {
+ const { data: img1Data, width, height } = PNG.sync.read(img1);
+ const { data: imgNData } = PNG.sync.read(img2);
+
+ return Pixelmatch(img1Data, imgNData, null, width, height, {
+ threshold: 0.1,
+ });
+};
diff --git a/src/utils/htmlTemplate.ts b/bitmapper/src/utils/toHTML.ts
similarity index 68%
rename from src/utils/htmlTemplate.ts
rename to bitmapper/src/utils/toHTML.ts
index 05ea0cb..36fbbf4 100644
--- a/src/utils/htmlTemplate.ts
+++ b/bitmapper/src/utils/toHTML.ts
@@ -4,7 +4,7 @@ export const template = `
- Eggy Render Template
+ Render Template
@@ -15,5 +15,5 @@ export const template = `
`;
-export const generateRenderTemplate = (svg: string) =>
- template.replace("", svg);
+export const toHTML = (svgData: string): string =>
+ template.replace("", svgData);
diff --git a/bitmapper/tsconfig.json b/bitmapper/tsconfig.json
new file mode 100644
index 0000000..9bb0cc5
--- /dev/null
+++ b/bitmapper/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "strict": true,
+ "noUnusedLocals": true,
+ "strictNullChecks": true,
+ "esModuleInterop": true,
+ "target": "ES2015",
+ "module": "commonjs",
+ "lib": ["es2015", "dom"],
+ "noUnusedParameters": true
+ }
+}
diff --git a/yarn.lock b/bitmapper/yarn.lock
similarity index 75%
rename from yarn.lock
rename to bitmapper/yarn.lock
index 5d2fc66..df97966 100644
--- a/yarn.lock
+++ b/bitmapper/yarn.lock
@@ -2,27 +2,6 @@
# yarn lockfile v1
-"@babel/code-frame@^7.0.0":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
- integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
- dependencies:
- "@babel/highlight" "^7.10.4"
-
-"@babel/helper-validator-identifier@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
- integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
-
-"@babel/highlight@^7.10.4":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
- integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
- dependencies:
- "@babel/helper-validator-identifier" "^7.10.4"
- chalk "^2.0.0"
- js-tokens "^4.0.0"
-
"@sindresorhus/is@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
@@ -36,11 +15,11 @@
defer-to-connect "^1.0.1"
"@types/node@*":
- version "14.14.2"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.2.tgz#d25295f9e4ca5989a2c610754dc02a9721235eeb"
- integrity sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg==
+ version "14.14.22"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
+ integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
-"@types/pixelmatch@^5.2.1":
+"@types/pixelmatch@^5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.2.tgz#3403238d4b920bf2255fb6cbf9a098bef796ce62"
integrity sha512-ndpfW/H8+SAiI3wt+f8DlHGgB7OeBdgFgBJ6v/1l3SpJ0MCn9wtXFb4mUccMujN5S4DMmAh7MVy1O3WcXrHUKw==
@@ -54,10 +33,10 @@
dependencies:
"@types/node" "*"
-"@types/puppeteer@^3.0.1":
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.2.tgz#20085220593b560c7332b6d46aecaf81ae263540"
- integrity sha512-JRuHPSbHZBadOxxFwpyZPeRlpPTTeMbQneMdpFd8LXdyNfFSiX950CGewdm69g/ipzEAXAmMyFF1WOWJOL/nKw==
+"@types/puppeteer@^5.4.2":
+ version "5.4.2"
+ resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.2.tgz#80f3a1f54dedbbf750779716de81401549062072"
+ integrity sha512-yjbHoKjZFOGqA6bIEI2dfBE5UPqU0YGWzP+ipDVP1iGzmlhksVKTBVZfT3Aj3wnvmcJ2PQ9zcncwOwyavmafBw==
dependencies:
"@types/node" "*"
@@ -95,13 +74,6 @@ ansi-regex@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
-ansi-styles@^3.2.1:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
- integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
- dependencies:
- color-convert "^1.9.0"
-
ansi-styles@^4.1.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
@@ -122,27 +94,20 @@ arg@^4.1.0:
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
-argparse@^1.0.7:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
- integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
- dependencies:
- sprintf-js "~1.0.2"
-
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
-base64-js@^1.0.2:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
- integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
+base64-js@^1.3.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
+ integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
binary-extensions@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
- integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
+ integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
bl@^4.0.3:
version "4.0.3"
@@ -193,17 +158,12 @@ buffer-from@^1.0.0:
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
buffer@^5.2.1, buffer@^5.5.0:
- version "5.6.0"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786"
- integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
+ integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
dependencies:
- base64-js "^1.0.2"
- ieee754 "^1.1.4"
-
-builtin-modules@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
- integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
+ base64-js "^1.3.1"
+ ieee754 "^1.1.13"
cacheable-request@^6.0.0:
version "6.1.0"
@@ -223,15 +183,6 @@ camelcase@^5.3.1:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
-chalk@^2.0.0, chalk@^2.3.0:
- version "2.4.2"
- resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
- integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
- dependencies:
- ansi-styles "^3.2.1"
- escape-string-regexp "^1.0.5"
- supports-color "^5.3.0"
-
chalk@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
@@ -241,9 +192,9 @@ chalk@^3.0.0:
supports-color "^7.1.0"
chokidar@^3.2.2:
- version "3.4.3"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b"
- integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
+ integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
dependencies:
anymatch "~3.1.1"
braces "~3.0.2"
@@ -253,7 +204,7 @@ chokidar@^3.2.2:
normalize-path "~3.0.0"
readdirp "~3.5.0"
optionalDependencies:
- fsevents "~2.1.2"
+ fsevents "~2.3.1"
chownr@^1.1.1:
version "1.1.4"
@@ -277,13 +228,6 @@ clone-response@^1.0.2:
dependencies:
mimic-response "^1.0.0"
-color-convert@^1.9.0:
- version "1.9.3"
- resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
- integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
- dependencies:
- color-name "1.1.3"
-
color-convert@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
@@ -291,21 +235,11 @@ color-convert@^2.0.1:
dependencies:
color-name "~1.1.4"
-color-name@1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
- integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
-
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-commander@^2.12.1:
- version "2.20.3"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
- integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
-
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -323,16 +257,10 @@ configstore@^5.0.1:
write-file-atomic "^3.0.0"
xdg-basedir "^4.0.0"
-cross-spawn@^6.0.5:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
- integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
- dependencies:
- nice-try "^1.0.4"
- path-key "^2.0.1"
- semver "^5.5.0"
- shebang-command "^1.2.0"
- which "^1.2.9"
+create-require@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
+ integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
crypto-random-string@^2.0.0:
version "2.0.0"
@@ -340,9 +268,9 @@ crypto-random-string@^2.0.0:
integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
debug@4, debug@^4.1.0, debug@^4.1.1:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
- integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
+ integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
ms "2.1.2"
@@ -354,9 +282,9 @@ debug@^2.2.0:
ms "2.0.0"
debug@^3.2.6:
- version "3.2.6"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
- integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
+ version "3.2.7"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
+ integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
dependencies:
ms "^2.1.1"
@@ -377,10 +305,10 @@ defer-to-connect@^1.0.1:
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
-devtools-protocol@0.0.799653:
- version "0.0.799653"
- resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.799653.tgz#86fc95ce5bf4fdf4b77a58047ba9d2301078f119"
- integrity sha512-t1CcaZbvm8pOlikqrsIM9GOa7Ipp07+4h/q9u0JXBWjPCjHdBl9KkddX87Vv9vBHoBGtwV79sYQNGnQM6iS5gg==
+devtools-protocol@0.0.818844:
+ version "0.0.818844"
+ resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e"
+ integrity sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==
diff@^4.0.1:
version "4.0.2"
@@ -421,16 +349,6 @@ escape-goat@^2.0.0:
resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
-escape-string-regexp@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
- integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
-
-esprima@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
- integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-
extract-zip@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
@@ -474,15 +392,10 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
-fsevents@~2.1.2:
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
- integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==
-
-function-bind@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
- integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+fsevents@~2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f"
+ integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==
get-stream@^4.1.0:
version "4.1.0"
@@ -505,7 +418,7 @@ glob-parent@~5.1.0:
dependencies:
is-glob "^4.0.1"
-glob@^7.1.1, glob@^7.1.3:
+glob@^7.1.3:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -518,11 +431,11 @@ glob@^7.1.1, glob@^7.1.3:
path-is-absolute "^1.0.0"
global-dirs@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201"
- integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d"
+ integrity sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==
dependencies:
- ini "^1.3.5"
+ ini "1.3.7"
got@^9.6.0:
version "9.6.0"
@@ -561,13 +474,6 @@ has-yarn@^2.1.0:
resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==
-has@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
- integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
- dependencies:
- function-bind "^1.1.1"
-
http-cache-semantics@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
@@ -581,10 +487,10 @@ https-proxy-agent@^4.0.0:
agent-base "5"
debug "4"
-ieee754@^1.1.4:
- version "1.1.13"
- resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
- integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
+ieee754@^1.1.13:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
+ integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
ignore-by-default@^1.0.1:
version "1.0.1"
@@ -614,10 +520,15 @@ inherits@2, inherits@^2.0.3, inherits@^2.0.4:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
-ini@^1.3.5, ini@~1.3.0:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
- integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+ini@1.3.7:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84"
+ integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==
+
+ini@~1.3.0:
+ version "1.3.8"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
+ integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
is-binary-path@~2.1.0:
version "2.1.0"
@@ -633,13 +544,6 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"
-is-core-module@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d"
- integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==
- dependencies:
- has "^1.0.3"
-
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -700,24 +604,6 @@ is-yarn-global@^0.3.0:
resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
-isexe@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
- integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
-
-js-tokens@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
- integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
-
-js-yaml@^3.13.1:
- version "3.14.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
- integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
- dependencies:
- argparse "^1.0.7"
- esprima "^4.0.0"
-
json-buffer@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
@@ -778,7 +664,7 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"
-minimist@^1.2.0, minimist@^1.2.5:
+minimist@^1.2.0:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
@@ -788,32 +674,30 @@ mkdirp-classic@^0.5.2:
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
-mkdirp@^0.5.3:
- version "0.5.5"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
- integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
- dependencies:
- minimist "^1.2.5"
-
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
-ms@2.1.2, ms@^2.1.1:
+ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-nice-try@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
- integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
+ms@^2.1.1:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
-nodemon@^2.0.4:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.6.tgz#1abe1937b463aaf62f0d52e2b7eaadf28cc2240d"
- integrity sha512-4I3YDSKXg6ltYpcnZeHompqac4E6JeAMpGm8tJnB9Y3T0ehasLa4139dJOcCrB93HHrUMsCrKtoAlXTqT5n4AQ==
+node-fetch@^2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
+ integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
+
+nodemon@^2.0.7:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.7.tgz#6f030a0a0ebe3ea1ba2a38f71bf9bab4841ced32"
+ integrity sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==
dependencies:
chokidar "^3.2.2"
debug "^3.2.6"
@@ -894,16 +778,6 @@ path-is-absolute@^1.0.0:
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
-path-key@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
- integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
-
-path-parse@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
-
pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
@@ -933,10 +807,10 @@ pngjs@^4.0.1:
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe"
integrity sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==
-pngjs@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb"
- integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==
+pngjs@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821"
+ integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==
prepend-http@^2.0.0:
version "2.0.0"
@@ -967,21 +841,22 @@ pump@^3.0.0:
once "^1.3.1"
pupa@^2.0.1:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.0.tgz#9e4ec587952b5e4f2c06fe577b0e7db97e8ef721"
- integrity sha512-Pj8EhJzFiPwnf4dEXpuUWwH8M/Yl4vpl4cN2RX1i3R77DWvbY5ZPKni7CCKkOYxz+XKt2fieemsV+WTZbIlYzg==
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62"
+ integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==
dependencies:
escape-goat "^2.0.0"
-puppeteer@^5.2.1:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.3.1.tgz#324e190d89f25ac33dba539f57b82a18553f8646"
- integrity sha512-YTM1RaBeYrj6n7IlRXRYLqJHF+GM7tasbvrNFx6w1S16G76NrPq7oYFKLDO+BQsXNtS8kW2GxWCXjIMPvfDyaQ==
+puppeteer@^5.5.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.5.0.tgz#331a7edd212ca06b4a556156435f58cbae08af00"
+ integrity sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg==
dependencies:
debug "^4.1.0"
- devtools-protocol "0.0.799653"
+ devtools-protocol "0.0.818844"
extract-zip "^2.0.0"
https-proxy-agent "^4.0.0"
+ node-fetch "^2.6.1"
pkg-dir "^4.2.0"
progress "^2.0.1"
proxy-from-env "^1.0.0"
@@ -1017,9 +892,9 @@ readdirp@~3.5.0:
picomatch "^2.2.1"
registry-auth-token@^4.0.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.0.tgz#1d37dffda72bbecd0f581e4715540213a65eb7da"
- integrity sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250"
+ integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==
dependencies:
rc "^1.2.8"
@@ -1030,14 +905,6 @@ registry-url@^5.0.0:
dependencies:
rc "^1.2.8"
-resolve@^1.3.2:
- version "1.18.1"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130"
- integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==
- dependencies:
- is-core-module "^2.0.0"
- path-parse "^1.0.6"
-
responselike@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
@@ -1064,7 +931,7 @@ semver-diff@^3.1.1:
dependencies:
semver "^6.3.0"
-semver@^5.3.0, semver@^5.5.0, semver@^5.7.1:
+semver@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@@ -1074,18 +941,6 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-shebang-command@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
- integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
- dependencies:
- shebang-regex "^1.0.0"
-
-shebang-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
- integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
-
signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
@@ -1104,11 +959,6 @@ source-map@^0.6.0:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
-sprintf-js@~1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
- integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
-
string-width@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
@@ -1153,7 +1003,7 @@ strip-json-comments@~2.0.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
-supports-color@^5.3.0, supports-color@^5.5.0:
+supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
@@ -1168,19 +1018,19 @@ supports-color@^7.1.0:
has-flag "^4.0.0"
tar-fs@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5"
- integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
+ integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
dependencies:
chownr "^1.1.1"
mkdirp-classic "^0.5.2"
pump "^3.0.0"
- tar-stream "^2.0.0"
+ tar-stream "^2.1.4"
-tar-stream@^2.0.0:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.4.tgz#c4fb1a11eb0da29b893a5b25476397ba2d053bfa"
- integrity sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==
+tar-stream@^2.1.4:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
+ integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
dependencies:
bl "^4.0.3"
end-of-stream "^1.4.1"
@@ -1189,9 +1039,9 @@ tar-stream@^2.0.0:
readable-stream "^3.1.1"
term-size@^2.1.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753"
- integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54"
+ integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==
through@^2.3.8:
version "2.3.8"
@@ -1217,48 +1067,18 @@ touch@^3.1.0:
dependencies:
nopt "~1.0.10"
-ts-node@^8.10.2:
- version "8.10.2"
- resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d"
- integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==
+ts-node@^9.1.1:
+ version "9.1.1"
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
+ integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
dependencies:
arg "^4.1.0"
+ create-require "^1.1.0"
diff "^4.0.1"
make-error "^1.1.1"
source-map-support "^0.5.17"
yn "3.1.1"
-tslib@^1.13.0, tslib@^1.8.1:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
- integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
-tslint@^6.1.2:
- version "6.1.3"
- resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904"
- integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==
- dependencies:
- "@babel/code-frame" "^7.0.0"
- builtin-modules "^1.1.1"
- chalk "^2.3.0"
- commander "^2.12.1"
- diff "^4.0.1"
- glob "^7.1.1"
- js-yaml "^3.13.1"
- minimatch "^3.0.4"
- mkdirp "^0.5.3"
- resolve "^1.3.2"
- semver "^5.3.0"
- tslib "^1.13.0"
- tsutils "^2.29.0"
-
-tsutils@^2.29.0:
- version "2.29.0"
- resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
- integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==
- dependencies:
- tslib "^1.8.1"
-
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
@@ -1271,10 +1091,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
-typescript@^3.9.7:
- version "3.9.7"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
- integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
+typescript@^4.1.3:
+ version "4.1.3"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
+ integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
unbzip2-stream@^1.3.3:
version "1.4.3"
@@ -1329,13 +1149,6 @@ util-deprecate@^1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
-which@^1.2.9:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
- integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
- dependencies:
- isexe "^2.0.0"
-
widest-line@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca"
@@ -1359,23 +1172,15 @@ write-file-atomic@^3.0.0:
typedarray-to-buffer "^3.1.5"
ws@^7.2.3:
- version "7.3.1"
- resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8"
- integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==
+ version "7.4.2"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd"
+ integrity sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==
xdg-basedir@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13"
integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==
-yarn-or-npm@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/yarn-or-npm/-/yarn-or-npm-3.0.1.tgz#6336eea4dff7e23e226acc98c1a8ada17a1b8666"
- integrity sha512-fTiQP6WbDAh5QZAVdbMQkecZoahnbOjClTQhzv74WX5h2Uaidj1isf9FDes11TKtsZ0/ZVfZsqZ+O3x6aLERHQ==
- dependencies:
- cross-spawn "^6.0.5"
- pkg-dir "^4.2.0"
-
yauzl@^2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
diff --git a/build.py b/build.py
deleted file mode 100644
index 7679079..0000000
--- a/build.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import json
-import log
-from clickgen import build_cursor_theme
-
-from config import name, sizes, delay, bitmaps_dir, temp_folder
-from helper import init_build, pack_it
-
-
-def build() -> None:
- init_build()
- with open('./hotspots.json', 'r') as hotspot_file:
- hotspots = json.loads(hotspot_file.read())
- build_cursor_theme(name, image_dir=bitmaps_dir,
- cursor_sizes=sizes, out_path=temp_folder, hotspots=hotspots, archive=False, delay=delay)
- pack_it()
-
-
-if __name__ == "__main__":
- build()
diff --git a/builder/Makefile b/builder/Makefile
new file mode 100644
index 0000000..4776919
--- /dev/null
+++ b/builder/Makefile
@@ -0,0 +1,34 @@
+
+all: clean setup build
+
+.PHONY: all
+
+.ONESHELL:
+SHELL:=/bin/bash
+
+X_SIZES ?=22 24 28 32 40 48 56 64 72 80 88 96
+WIN_CANVAS_SIZE ?= 32
+WIN_SIZE ?= 24
+
+clean:
+ @rm -rf applbuild.egg-info build dist
+ @find -iname "*.pyc" -delete
+
+ # Removing setup.py package files if installed
+ @if [ -f "files.txt" ]; then
+ @xargs rm -rf < files.txt
+ @rm -rf files.txt
+ @fi
+
+setup: setup.py
+ @test -d venv || virtualenv venv
+ @. venv/bin/activate; python3 setup.py install --record files.txt
+
+build: setup build.py
+ @. venv/bin/activate; python3 build.py --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
+
+build_unix: setup build.py
+ @. venv/bin/activate; python3 build.py unix --xsizes $(X_SIZES)
+
+build_windows: setup build.py
+ @. venv/bin/activate; python3 build.py windows --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
\ No newline at end of file
diff --git a/builder/applbuild/__init__.py b/builder/applbuild/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py
new file mode 100644
index 0000000..89514ad
--- /dev/null
+++ b/builder/applbuild/configure.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from pathlib import Path
+from typing import Any, Dict, List, Tuple, TypeVar, Union
+
+from clickgen.util import LikePath, PNGProvider
+
+from applbuild.constants import WIN_CURSORS_CFG, WIN_DELAY, X_CURSORS_CFG, X_DELAY
+
+
+X = TypeVar("X")
+
+
+def to_tuple(x: X) -> Tuple[X, X]:
+ return (x, x)
+
+
+def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]:
+ """Return configuration of `macOSBigSur` pointers.
+
+ Args:
+
+ :bitmaps_dir: (str | Path) Path to .png file's directory.
+
+
+ Keywords Args:
+
+ :x_sizes: (List[int]) List of pixel-sizes for xcursors.
+
+ :win_canvas_size: (int) Windows cursor's canvas pixel-size.
+
+ :win_size: (int) Pixel-size for Windows cursor.
+
+
+ Example:
+
+ ```python
+ get_config("./bitmaps", x_sizes=[(24, 24), (32, 32)], win_canvas_size=(32, 32), win_size=(24, 24))
+ ```
+ """
+
+ w_size = to_tuple(kwargs.pop("win_size"))
+ w_canvas_size = to_tuple(kwargs.pop("win_canvas_size"))
+ x = kwargs.pop("x_sizes")
+
+ x_sizes = []
+ for s in x:
+ x_sizes.append(to_tuple(s))
+
+ png = PNGProvider(bitmaps_dir)
+ config: Dict[str, Any] = {}
+
+ for key, item in X_CURSORS_CFG.items():
+ x_hot: int = item.get("xhot", 0)
+ y_hot: int = item.get("yhot", 0)
+ hotspot: Tuple[int, int] = (x_hot, y_hot)
+
+ delay: int = item.get("delay", X_DELAY)
+ p: Union[List[Path], Path] = png.get(key)
+
+ data = {
+ "png": p,
+ "x_sizes": x_sizes,
+ "hotspot": hotspot,
+ "delay": delay,
+ }
+
+ win_data = WIN_CURSORS_CFG.get(key)
+
+ if win_data:
+ win_key = win_data.get("to")
+
+ position = win_data.get("position", "center")
+ win_delay: int = win_data.get("delay", WIN_DELAY)
+
+ canvas_size: Tuple[int, int] = win_data.get("canvas_size", w_canvas_size)
+ win_size: Tuple[int, int] = win_data.get("size", w_size)
+
+ # Because provided cursor size is bigger than cursor's canvas.
+ # Also, "position" settings will not effect on cursor because the cursor's canvas and cursor sizes are equals.
+ if (win_size[0] > canvas_size[0]) or (win_size[1] > canvas_size[1]):
+ canvas_size = win_size
+
+ config[key] = {
+ **data,
+ "win_key": win_key,
+ "position": position,
+ "canvas_size": canvas_size,
+ "win_size": win_size,
+ "win_delay": win_delay,
+ }
+ else:
+ config[key] = data
+
+ return config
diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py
new file mode 100644
index 0000000..94c2e9c
--- /dev/null
+++ b/builder/applbuild/constants.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from typing import Dict, List, Tuple
+
+# Info
+THEME_NAME = "macOSBigSur"
+COMMENT = "macOS Big Sur Pointers"
+AUTHOR = "Kaiz Khatri"
+URL = "https://github.com/ful1e5/apple_cursor"
+
+# XCursor
+X_DELAY: int = 10
+
+
+# Windows Cursor
+WIN_DELAY = 1
+
+X_CURSORS_CFG: Dict[str, Dict[str, int]] = {
+ ##########
+ # Static #
+ ##########
+ "all-scroll.png": {"xhot": 100, "yhot": 100},
+ "bottom_left_corner.png": {"xhot": 100, "yhot": 100},
+ "bottom_right_corner.png": {"xhot": 100, "yhot": 100},
+ "bottom_tee.png": {"xhot": 98, "yhot": 137},
+ "center_ptr.png": {"xhot": 100, "yhot": 70},
+ "context-menu.png": {"xhot": 43, "yhot": 61},
+ "copy.png": {"xhot": 67, "yhot": 46},
+ "cross.png": {"xhot": 100, "yhot": 100},
+ "crossed_circle.png": {"xhot": 67, "yhot": 46},
+ "crosshair.png": {"xhot": 100, "yhot": 100},
+ "dnd_no_drop.png": {"xhot": 100, "yhot": 100},
+ "dotbox.png": {"xhot": 100, "yhot": 100},
+ "hand1.png": {"xhot": 94, "yhot": 72},
+ "hand2.png": {"xhot": 67, "yhot": 46},
+ "left_ptr.png": {"xhot": 69, "yhot": 56},
+ "left_side.png": {"xhot": 100, "yhot": 100},
+ "left_tee.png": {"xhot": 100, "yhot": 100},
+ "link.png": {"xhot": 120, "yhot": 55},
+ "ll_angle.png": {"xhot": 100, "yhot": 100},
+ "lr_angle.png": {"xhot": 100, "yhot": 100},
+ "move.png": {"xhot": 80, "yhot": 71},
+ "pencil.png": {"xhot": 81, "yhot": 117},
+ "plus.png": {"xhot": 98, "yhot": 100},
+ "question_arrow.png": {"xhot": 99, "yhot": 99},
+ "right_ptr.png": {"xhot": 136, "yhot": 66},
+ "right_tee.png": {"xhot": 98, "yhot": 99},
+ "sb_down_arrow.png": {"xhot": 100, "yhot": 100},
+ "sb_h_double_arrow.png": {"xhot": 100, "yhot": 100},
+ "sb_left_arrow.png": {"xhot": 100, "yhot": 100},
+ "sb_right_arrow.png": {"xhot": 100, "yhot": 100},
+ "sb_up_arrow.png": {"xhot": 100, "yhot": 100},
+ "sb_v_double_arrow.png": {"xhot": 100, "yhot": 100},
+ "top_side.png": {"xhot": 100, "yhot": 100},
+ "top_tee.png": {"xhot": 100, "yhot": 100},
+ "ul_angle.png": {"xhot": 100, "yhot": 100},
+ "ur_angle.png": {"xhot": 100, "yhot": 100},
+ "vertical-text.png": {"xhot": 96, "yhot": 99},
+ "wayland-cursor.png": {"xhot": 100, "yhot": 100},
+ "X_cursor.png": {"xhot": 100, "yhot": 100},
+ "xterm.png": {"xhot": 100, "yhot": 104},
+ "zoom-in.png": {"xhot": 100, "yhot": 100},
+ "zoom-out.png": {"xhot": 100, "yhot": 100},
+ ############
+ # Animated #
+ ############
+ # Note: Animated cursors don't need an extension and frame numbers.
+ "left_ptr_watch": {"xhot": 67, "yhot": 46},
+ "wait": {"xhot": 100, "yhot": 100},
+}
+
+WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = {
+ ##########
+ # Static #
+ ##########
+ "right_ptr.png": {"to": "Alternate", "position": "top_right"},
+ "cross.png": {"to": "Cross"},
+ "left_ptr.png": {"to": "Default", "position": "top_left"},
+ "bottom_left_corner.png": {"to": "Diagonal_1"},
+ "bottom_right_corner.png": {"to": "Diagonal_2"},
+ "pencil.png": {"to": "Handwriting"},
+ "question_arrow.png": {"to": "Help", "position.png": "top_left"},
+ "sb_h_double_arrow.png": {"to": "Horizontal"},
+ "xterm.png": {"to": "IBeam", "position": "top_left"},
+ "hand2.png": {"to": "Link", "position": "top_left"},
+ "hand1.png": {"to": "Move"},
+ "crossed_circle.png": {"to": "Unavailiable", "position": "top_left"},
+ "sb_v_double_arrow.png": {"to": "Vertical"},
+ ############
+ # Animated #
+ ############
+ # Note: Animated cursors don't need frame numbers.
+ "left_ptr_watch": {"to": "Work", "position": "top_left"},
+ "wait": {"to": "Busy"},
+}
diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py
new file mode 100644
index 0000000..6e28d4d
--- /dev/null
+++ b/builder/applbuild/generator.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from pathlib import Path
+from typing import Any, Dict
+
+from clickgen.builders import WindowsCursor, XCursor
+from clickgen.core import CursorAlias
+from clickgen.packagers import WindowsPackager, XPackager
+
+from applbuild.constants import AUTHOR, COMMENT, THEME_NAME, URL
+from applbuild.symlinks import add_missing_xcursor
+
+
+def xbuild(
+ config: Dict[str, Dict[str, Any]],
+ x_out_dir: Path,
+) -> None:
+ """Build `macOSBigSur` cursor theme for only `X11`(UNIX) platform.
+
+ :config: (Dict) `macOSBigSur` configuration.
+
+ :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists.
+ """
+
+ for _, item in config.items():
+ png = item.get("png")
+ hotspot = item.get("hotspot")
+ x_sizes = item.get("x_sizes")
+ delay = item.get("delay")
+
+ with CursorAlias.from_bitmap(png, hotspot) as alias:
+ x_cfg = alias.create(x_sizes, delay)
+ print(f"Building '{x_cfg.stem}' XCursor...")
+ XCursor.create(x_cfg, x_out_dir)
+
+ add_missing_xcursor(x_out_dir / "cursors")
+ XPackager(x_out_dir, THEME_NAME, COMMENT)
+
+
+def wbuild(config: Dict[str, Dict[str, Any]], win_out_dir: Path) -> None:
+ """Build `macOSBigSur` cursor theme for only `Windows` platforms.
+
+ :config: (Dict) `macOSBigSur` configuration.
+
+ :win_out_dir: (Path) Path to the output directory, Where the `Windows` cursor theme package will generate. It also creates a directory if not exists.
+ """
+
+ for _, item in config.items():
+ png = item.get("png")
+ hotspot = item.get("hotspot")
+ x_sizes = item.get("x_sizes")
+ delay = item.get("delay")
+
+ with CursorAlias.from_bitmap(png, hotspot) as alias:
+ alias.create(x_sizes, delay)
+
+ if item.get("win_key"):
+ position = item.get("position")
+ win_size = item.get("win_size")
+ win_key = item.get("win_key")
+ canvas_size = item.get("canvas_size")
+ win_delay = item.get("win_delay")
+
+ win_cfg = alias.reproduce(
+ win_size, canvas_size, position, delay=win_delay
+ ).rename(win_key)
+ print(f"Building '{win_cfg.stem}' Windows Cursor...")
+ WindowsCursor.create(win_cfg, win_out_dir)
+
+ WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL)
+
+
+def build(
+ config: Dict[str, Dict[str, Any]], x_out_dir: Path, win_out_dir: Path
+) -> None:
+ """Build `macOSBigSur` cursor theme for `X11` & `Windows` platforms.
+
+ :config: (Dict) `macOSBigSur` configuration.
+
+ :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists.
+
+ :win_out_dir: (Path) Path to the output directory, Where the `Windows` cursor theme package will generate. It also creates a directory if not exists.
+ """
+
+ def win_build(item: Dict[str, Any], alias: CursorAlias) -> None:
+ position = item.get("position")
+ win_size = item.get("win_size")
+ win_key = item.get("win_key")
+ canvas_size = item.get("canvas_size")
+ win_delay = item.get("win_delay")
+
+ win_cfg = alias.reproduce(
+ win_size, canvas_size, position, delay=win_delay
+ ).rename(win_key)
+ print(f"Building '{win_cfg.stem}' Windows Cursor...")
+ WindowsCursor.create(win_cfg, win_out_dir)
+
+ for _, item in config.items():
+ png = item.get("png")
+ hotspot = item.get("hotspot")
+ x_sizes = item.get("x_sizes")
+ delay = item.get("delay")
+
+ with CursorAlias.from_bitmap(png, hotspot) as alias:
+ x_cfg = alias.create(x_sizes, delay)
+ print(f"Building '{x_cfg.stem}' XCursor...")
+ XCursor.create(x_cfg, x_out_dir)
+
+ if item.get("win_key"):
+ win_build(item, alias)
+
+ add_missing_xcursor(x_out_dir / "cursors")
+ XPackager(x_out_dir, THEME_NAME, COMMENT)
+
+ WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL)
diff --git a/builder/applbuild/symlinks.py b/builder/applbuild/symlinks.py
new file mode 100644
index 0000000..82a265d
--- /dev/null
+++ b/builder/applbuild/symlinks.py
@@ -0,0 +1,166 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+from typing import Dict, List, Union
+
+from clickgen.util import LikePath, chdir
+
+
+def add_missing_xcursor(directory: LikePath) -> None:
+ """Add missing `XCursor` to the Unix cursor package.
+
+ :directory: (Path|str) directory where XCursors are available.
+ """
+
+ symlinks: List[Dict[str, Union[str, List[str]]]] = [
+ {"src": "all-scroll", "links": ["fleur", "size_all"]},
+ {
+ "src": "bottom_left_corner",
+ "links": [
+ "fcf1c3c7cd4491d801f1e1c78f100000",
+ "sw-resize",
+ "ne-resize",
+ "size_bdiag",
+ "nesw-resize",
+ "top_right_corner",
+ "fd_double_arrow",
+ ],
+ },
+ {
+ "src": "bottom_right_corner",
+ "links": [
+ "c7088f0f3e6c8088236ef8e1e3e70000",
+ "top_left_corner",
+ "se-resize",
+ "nw-resize",
+ "size_fdiag",
+ "nwse-resize",
+ "bd_double_arrow",
+ ],
+ },
+ {
+ "src": "copy",
+ "links": [
+ "1081e37283d90000800003c07f3ef6bf",
+ "6407b0e94181790501fd1e167b474872",
+ "b66166c04f8c3109214a4fbd64a50fc8",
+ "dnd-copy",
+ ],
+ },
+ {
+ "src": "cross",
+ "links": ["cross_reverse", "diamond_cross", "tcross", "color-picker"],
+ },
+ {
+ "src": "crossed_circle",
+ "links": [
+ "03b6e0fcb3499374a867c041f52298f0",
+ "not-allowed",
+ "forbidden",
+ "circle",
+ ],
+ },
+ {"src": "dnd_no_drop", "links": ["no-drop"]},
+ {"src": "dotbox", "links": ["dot_box_mask", "draped_box", "icon", "target"]},
+ {"src": "hand1", "links": ["grab", "openhand"]},
+ {
+ "src": "hand2",
+ "links": [
+ "9d800788f1b08800ae810202380a0822",
+ "e29285e634086352946a0e7090d73106",
+ "pointer",
+ "pointing_hand",
+ ],
+ },
+ {"src": "left_ptr", "links": ["arrow", "default"]},
+ {
+ "src": "left_ptr_watch",
+ "links": [
+ "00000000000000020006000e7e9ffc3f",
+ "08e8e1c95fe2fc01f976f1e063a24ccd",
+ "3ecb610c1bf2410f44200f48c40d3599",
+ "progress",
+ ],
+ },
+ {"src": "left_side", "links": ["w-resize", "right_side", "e-resize"]},
+ {
+ "src": "link",
+ "links": [
+ "3085a0e285430894940527032f8b26df",
+ "640fb0e74195791501fd1ed57b41487f",
+ "a2a266d0498c3104214a47bd64ab0fc8",
+ "alias",
+ "dnd-link",
+ ],
+ },
+ {
+ "src": "move",
+ "links": [
+ "4498f0e0c1937ffe01fd06f973665830",
+ "9081237383d90e509aa00f00170e968f",
+ "fcf21c00b30f7e3f83fe0dfd12e71cff",
+ "grabbing",
+ "pointer_move",
+ "dnd-move",
+ "closedhand",
+ "dnd-none",
+ ],
+ },
+ {"src": "pencil", "links": ["draft"]},
+ {"src": "plus", "links": ["cell"]},
+ {
+ "src": "question_arrow",
+ "links": [
+ "5c6cd98b3f3ebcb1f9c7f1c204630408",
+ "d9ce0ab605698f320427677b458ad60b",
+ "help",
+ "left_ptr_help",
+ "whats_this",
+ "dnd-ask",
+ ],
+ },
+ {"src": "right_ptr", "links": ["draft_large", "draft_small"]},
+ {"src": "sb_down_arrow", "links": ["down-arrow"]},
+ {
+ "src": "sb_h_double_arrow",
+ "links": [
+ "028006030e0e7ebffc7f7070c0600140",
+ "14fef782d02440884392942c1120523",
+ "col-resize",
+ "ew-resize",
+ "h_double_arrow",
+ "size-hor",
+ "size_hor",
+ "split_h",
+ ],
+ },
+ {"src": "sb_left_arrow", "links": ["left-arrow"]},
+ {"src": "sb_right_arrow", "links": ["right-arrow"]},
+ {"src": "sb_up_arrow", "links": ["up-arrow"]},
+ {
+ "src": "sb_v_double_arrow",
+ "links": [
+ "00008160000006810000408080010102",
+ "2870a09082c103050810ffdffffe0204",
+ "double_arrow",
+ "ns-resize",
+ "row-resize",
+ "size-ver",
+ "size_ver",
+ "split_v",
+ "v_double_arrow",
+ ],
+ },
+ {"src": "top_side", "links": ["s-resize", "n-resize", "bottom_side"]},
+ {"src": "wait", "links": ["watch"]},
+ {"src": "X_cursor", "links": ["pirate", "x-cursor"]},
+ {"src": "xterm", "links": ["ibeam", "text"]},
+ ]
+
+ with chdir(directory):
+ for item in symlinks:
+ src = item.get("src")
+ for link in item.get("links"):
+ print(f"Creating symlink {src} -> {link}")
+ os.symlink(src, link)
diff --git a/builder/build.py b/builder/build.py
new file mode 100644
index 0000000..c55ab11
--- /dev/null
+++ b/builder/build.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import argparse
+from pathlib import Path
+
+from applbuild.configure import get_config
+from applbuild.generator import build, wbuild, xbuild
+
+parser = argparse.ArgumentParser(
+ prog="apple_builder",
+ description="'macOSBigSur' cursor build python script.",
+)
+
+# Positional Args.
+parser.add_argument(
+ "platform",
+ choices=("windows", "unix", "all"),
+ default="all",
+ const="all",
+ nargs="?",
+ help="Set package type, Which you want to build. (default: '%(default)s')",
+)
+
+
+# Optional Args.
+parser.add_argument(
+ "-p",
+ "--png-dir",
+ dest="png_dir",
+ metavar="PNG",
+ type=str,
+ default="../bitmaps",
+ help="To change pngs directory. (default: %(default)s)",
+)
+
+parser.add_argument(
+ "-o",
+ "--out-dir",
+ dest="out_dir",
+ metavar="OUT",
+ type=str,
+ default="../themes",
+ help="To change output directory. (default: %(default)s)",
+)
+
+
+parser.add_argument(
+ "-xs",
+ "--xsizes",
+ dest="xsizes",
+ metavar="INT",
+ nargs="+",
+ default=[
+ 22,
+ 24,
+ 28,
+ 32,
+ 40,
+ 48,
+ 56,
+ 64,
+ 72,
+ 80,
+ 88,
+ 96,
+ ],
+ type=int,
+ help="Set pixel-size for xcursor. (default: %(default)s)",
+)
+
+
+parser.add_argument(
+ "-ws",
+ "--win-size",
+ dest="win_size",
+ metavar="INT",
+ default=24,
+ type=int,
+ help="Set pixel-size for Windows cursors. (default: %(default)s)",
+)
+
+
+parser.add_argument(
+ "-wcs",
+ "--win-canvas-size",
+ dest="win_canvas_size",
+ metavar="INT",
+ default=32,
+ type=int,
+ help="Set pixel-size for Windows cursor's canvas. (default: %(default)s)",
+)
+
+# Preparing build
+args = parser.parse_args()
+
+bitmaps_dir = Path(args.png_dir)
+
+x_out_dir = Path(args.out_dir) / "macOSBigSur"
+win_out_dir = Path(args.out_dir) / "macOSBigSur_Windows"
+
+config = get_config(
+ bitmaps_dir,
+ x_sizes=args.xsizes,
+ win_canvas_size=args.win_canvas_size,
+ win_size=args.win_size,
+)
+
+if args.platform == "unix":
+ xbuild(config, x_out_dir)
+elif args.platform == "windows":
+ wbuild(config, win_out_dir)
+else:
+ build(config, x_out_dir, win_out_dir)
diff --git a/builder/setup.py b/builder/setup.py
new file mode 100644
index 0000000..5eaf231
--- /dev/null
+++ b/builder/setup.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from setuptools import setup
+
+setup(
+ name="applbuild",
+ version="1.1.0",
+ description="Generate 'macOSBigSur' cursor theme from PNGs file",
+ url="https://github.com/ful1e5/apple_cursor",
+ packages=["applbuild"],
+ package_dir={"applbuild": "applbuild"},
+ author="Kaiz Khatri",
+ author_email="kaizmandhu@gamil.com",
+ install_requires=["clickgen==1.1.8"],
+ classifiers=[
+ "Programming Language :: Python :: 3",
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
+ ],
+ python_requires=">=3.8",
+ zip_safe=True,
+)
\ No newline at end of file
diff --git a/config.py b/config.py
deleted file mode 100644
index 513c0cc..0000000
--- a/config.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import tempfile
-import json
-
-# Build Config
-delay = 50
-name = "macOSBigSur"
-sizes = [22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96]
-
-bitmaps_dir = "./bitmaps"
-package_dir = "./themes"
-temp_folder = tempfile.mkdtemp()
-
-# Cleanup Configs
-x11_out = name
-win_out = name + "_Windows"
-
-# getting author name
-with open("./package.json") as f:
- data = json.loads(f.read())
- author = data["author"]
-
-# Windows Cursors Config
-windows_cursors = {
- "left_ptr_watch.ani": "AppStarting.ani",
- "left_ptr.cur": "Arrow.cur",
- "crosshair.cur": "Cross.cur",
- "hand2.cur": "Hand.cur",
- "pencil.cur": "Handwriting.cur",
- "dnd-ask.cur": "Help.cur",
- "xterm.cur": "IBeam.cur",
- "circle.cur": "NO.cur",
- "all-scroll.cur": "SizeAll.cur",
- "bd_double_arrow.cur": "SizeNWSE.cur",
- "sb_v_double_arrow.cur": "SizeNS.cur",
- "fd_double_arrow.cur": "SizeNESW.cur",
- "sb_h_double_arrow.cur": "SizeWE.cur",
- "sb_up_arrow.cur": "UpArrow.cur",
- "wait.ani": "Wait.ani",
-}
-
-# Windows install.inf file content
-with open("./scripts/windows.inf") as f:
- data = f.read()
- window_install_inf_content = data.replace(
- "", name + " Cursors"
- ).replace("", author)
diff --git a/helper.py b/helper.py
deleted file mode 100644
index cdf4c20..0000000
--- a/helper.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import shutil
-import json
-import sys
-
-from config import name, temp_folder, bitmaps_dir, win_out, x11_out, window_install_inf_content, windows_cursors, package_dir
-from os import path, listdir, rename, remove
-
-
-x11_out_dir = path.join(package_dir, x11_out)
-win_out_dir = path.join(package_dir, win_out)
-
-
-def window_bundle() -> None:
- # Remove & Rename cursors
- # If Key found => Rename else Remove
- for cursor in listdir(win_out_dir):
- old_path = path.join(win_out_dir, cursor)
-
- try:
- new_path = path.join(win_out_dir, windows_cursors[cursor])
- rename(old_path, new_path)
- except KeyError:
- remove(old_path)
-
- # creating install.inf file
- install_inf_path = path.join(win_out_dir, "install.inf")
- with open(install_inf_path, "w") as file:
- file.write(window_install_inf_content)
-
-
-def init_build() -> None:
- """
- Print build version.
- Remove previously built packages && Check Bitmaps.
- """
- with open("./package.json", "r") as package_file:
- data = json.loads(package_file.read())
- version = data['version']
- print("⚡ Apple Cursor Version %s" % version)
-
- # cleanup old packages
- if path.exists(package_dir):
- shutil.rmtree(package_dir)
-
- # Checking Bitmaps directory
- if not path.exists(bitmaps_dir):
- print(
- "⚠ BITMAPS NOT FOUND.\n\n`yarn install && yarn render` to Generates Bitmaps")
- sys.exit(1)
-
-
-def pack_it() -> None:
- """
- Create Crisp 📦 Packages for Windows & X11 Cursor Theme.
- """
- # Rename directory
- shutil.move(path.join(temp_folder, name, "x11"), x11_out_dir)
- shutil.move(path.join(temp_folder, name, "win"), win_out_dir)
-
- # create install.inf file in Windows Theme
- window_bundle()
diff --git a/hotspots.json b/hotspots.json
deleted file mode 100644
index adbba3b..0000000
--- a/hotspots.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "all_scroll": { "xhot": 100, "yhot": 100 },
-
- "bottom_left_corner": { "xhot": 100, "yhot": 100 },
- "fd_double_arrow": { "xhot": 100, "yhot": 100 },
- "top_right_corner": { "xhot": 100, "yhot": 100 },
-
- "bottom_right_corner": { "xhot": 100, "yhot": 100 },
- "bd_double_arrow": { "xhot": 100, "yhot": 100 },
- "top_left_corner": { "xhot": 100, "yhot": 100 },
-
- "bottom_tee": { "xhot": 141, "yhot": 99 },
-
- "center_ptr": { "xhot": 61, "yhot": 100 },
-
- "circle": { "xhot": 47, "yhot": 39 },
- "crossed_circle": { "xhot": 47, "yhot": 39 },
- "dnd_no_drop": { "xhot": 47, "yhot": 39 },
-
- "context_menu": { "xhot": 61, "yhot": 58 },
-
- "copy": { "xhot": 47, "yhot": 39 },
- "dnd_copy": { "xhot": 47, "yhot": 39 },
-
- "cross": { "xhot": 100, "yhot": 100 },
- "tcross": { "xhot": 100, "yhot": 100 },
-
- "crosshair": { "xhot": 100, "yhot": 100 },
-
- "dotbox": { "xhot": 100, "yhot": 100 },
-
- "hand1": { "xhot": 94, "yhot": 105 },
-
- "hand2": { "xhot": 66, "yhot": 34 },
-
- "left_ptr": { "xhot": 68, "yhot": 41 },
-
- "left_side": { "xhot": 100, "yhot": 100 },
- "right_side": { "xhot": 100, "yhot": 100 },
-
- "left_tee": { "xhot": 100, "yhot": 58 },
-
- "link": { "xhot": 61, "yhot": 105 },
- "dnd_link": { "xhot": 61, "yhot": 105 },
-
- "ll_angle": { "xhot": 141, "yhot": 58 },
-
- "lr_angle": { "xhot": 141, "yhot": 138 },
-
- "move": { "xhot": 80, "yhot": 106 },
- "dnd_move": { "xhot": 80, "yhot": 106 },
- "dnd_none": { "xhot": 80, "yhot": 106 },
- "grabbing": { "xhot": 80, "yhot": 106 },
- "pointer_move": { "xhot": 80, "yhot": 106 },
-
- "pencil": { "xhot": 141, "yhot": 58 },
-
- "plus": { "xhot": 100, "yhot": 100 },
-
- "question_arrow": { "xhot": 105, "yhot": 105 },
- "dnd_ask": { "xhot": 105, "yhot": 105 },
-
- "right_ptr": { "xhot": 61, "yhot": 138 },
-
- "right_tee": { "xhot": 100, "yhot": 138 },
-
- "sb_down_arrow": { "xhot": 133, "yhot": 99 },
-
- "sb_h_double_arrow": { "xhot": 100, "yhot": 100 },
-
- "sb_left_arrow": { "xhot": 100, "yhot": 68 },
-
- "sb_right_arrow": { "xhot": 100, "yhot": 138 },
-
- "sb_up_arrow": { "xhot": 68, "yhot": 99 },
-
- "sb_v_double_arrow": { "xhot": 100, "yhot": 100 },
-
- "top_side": { "xhot": 100, "yhot": 100 },
- "bottom_side": { "xhot": 100, "yhot": 100 },
-
- "top_tee": { "xhot": 61, "yhot": 99 },
-
- "ul_angle": { "xhot": 61, "yhot": 65 },
-
- "ur_angle": { "xhot": 61, "yhot": 138 },
-
- "vertical_text": { "xhot": 100, "yhot": 102 },
-
- "wait": { "xhot": 104, "yhot": 105 },
- "left_ptr_watch": { "xhot": 104, "yhot": 105 },
-
- "wayland_cursor": { "xhot": 100, "yhot": 100 },
-
- "x_cursor": { "xhot": 100, "yhot": 100 },
-
- "xterm": { "xhot": 97, "yhot": 97 },
-
- "zoom_in": { "xhot": 76, "yhot": 78 },
-
- "zoom_out": { "xhot": 76, "yhot": 78 }
-}
diff --git a/log.py b/log.py
deleted file mode 100644
index e59183c..0000000
--- a/log.py
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-
-import logging
-
-logging.basicConfig(filename='build.log', filemode='w',
- format='%(name)s - %(levelname)s - %(message)s', level=logging.DEBUG)
diff --git a/nodemon.json b/nodemon.json
deleted file mode 100644
index cde9605..0000000
--- a/nodemon.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "restartable": "rs",
- "ignore": [".git", "node_modules/**/node_modules"],
- "verbose": true,
- "execMap": {
- "ts": "node --require ts-node/register"
- },
- "watch": ["src/"],
- "env": {
- "NODE_ENV": "development"
- },
- "ext": "js,json,ts"
-}
diff --git a/package.json b/package.json
deleted file mode 100644
index 74ec4af..0000000
--- a/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "apple_cursor",
- "version": "1.0.6",
- "description": "Enjoy upcoming `macOS Big Sur` Cursor Theme 🥳",
- "main": "index.js",
- "scripts": {
- "clean": "rm -rf bitmaps themes",
- "dev": "nodemon src/index.ts",
- "watch": "nodemon --inspect src/index.ts",
- "py_install": "pip install -r requirements.txt",
- "render": "npx ts-node src/index.ts",
- "build": "python build.py",
- "compile": "yon clean && yon render && yon build"
- },
- "repository": "git@github.com:ful1e5/apple_cursor.git",
- "author": "Kaiz Khatri",
- "license": "GPL-3.0",
- "private": true,
- "devDependencies": {
- "@types/puppeteer": "^3.0.1",
- "nodemon": "^2.0.4",
- "ts-node": "^8.10.2",
- "tslint": "^6.1.2",
- "typescript": "^3.9.7",
- "yarn-or-npm": "^3.0.1"
- },
- "dependencies": {
- "@types/pixelmatch": "^5.2.1",
- "@types/pngjs": "^3.4.2",
- "pixelmatch": "^5.2.1",
- "pngjs": "^5.0.0",
- "puppeteer": "^5.2.1"
- }
-}
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 4c7f1ea..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-clickgen==1.1.7
-Pillow==8.0.1
diff --git a/scripts/windows.inf b/scripts/windows.inf
deleted file mode 100644
index 0586241..0000000
--- a/scripts/windows.inf
+++ /dev/null
@@ -1,52 +0,0 @@
-[Version]
-signature="$CHICAGO$"
- By Kaiz Khatri
-https://github.com/ful1e5/apple_cursor
-
-[DefaultInstall]
-CopyFiles = Scheme.Cur
-AddReg = Scheme.Reg
-
-[DestinationDirs]
-Scheme.Cur = 10,"%CUR_DIR%"
-
-[Scheme.Reg]
-HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%,%10%\%CUR_DIR%\%help%,%10%\%CUR_DIR%\%work%,%10%\%CUR_DIR%\%busy%,%10%\%CUR_DIR%\%Cross%,%10%\%CUR_DIR%\%Text%,%10%\%CUR_DIR%\%Hand%,%10%\%CUR_DIR%\%Unavailiable%,%10%\%CUR_DIR%\%Vert%,%10%\%CUR_DIR%\%Horz%,%10%\%CUR_DIR%\%Dgn1%,%10%\%CUR_DIR%\%Dgn2%,%10%\%CUR_DIR%\%move%,%10%\%CUR_DIR%\%alternate%,%10%\%CUR_DIR%\%link%"
-
-; -- Installed files
-
-[Scheme.Cur]
-"Arrow.cur"
-"Help.cur"
-"AppStarting.ani"
-"Wait.ani"
-"Cross.cur"
-"IBeam.cur"
-"Handwriting.cur"
-"NO.cur"
-"SizeNS.cur"
-"SizeWE.cur"
-"SizeNWSE.cur"
-"SizeNESW.cur"
-"SizeAll.cur"
-"UpArrow.cur"
-"Hand.cur"
-
-[Strings]
-CUR_DIR = "Cursors\"
-SCHEME_NAME = ""
-pointer = "Arrow.cur"
-help = "Help.cur"
-work = "AppStarting.ani"
-busy = "Wait.ani"
-cross = "Cross.cur"
-text = "IBeam.cur"
-hand = "Handwriting.cur"
-unavailiable = "NO.cur"
-vert = "SizeNS.cur"
-horz = "SizeWE.cur"
-dgn1 = "SizeNWSE.cur"
-dgn2 = "SizeNESW.cur"
-move = "SizeAll.cur"
-alternate = "UpArrow.cur"
-link = "Hand.cur"
\ No newline at end of file
diff --git a/src/config.ts b/src/config.ts
deleted file mode 100644
index 843b7b5..0000000
--- a/src/config.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { resolve } from "path";
-import { readdirSync, existsSync } from "fs";
-
-// Source Directory
-const svgsDir = resolve(__dirname, "svg");
-if (!existsSync(svgsDir)) {
- console.log("Source .svg files not found");
-}
-
-const staticCursorsDir = resolve(svgsDir, "static");
-const animatedCursorsDir = resolve(svgsDir, "animated");
-
-// Out Directory
-const bitmapsDir = resolve(__dirname, "../", "bitmaps");
-
-// Cursors
-const staticCursors = readdirSync(staticCursorsDir).map((f) =>
- resolve(staticCursorsDir, f)
-);
-const animatedCursors = readdirSync(animatedCursorsDir).map((f) =>
- resolve(animatedCursorsDir, f)
-);
-
-// Animated Config
-const animatedClip = {
- x: 4,
- y: 4,
- width: 200,
- height: 200,
-};
-export { staticCursors, animatedCursors, bitmapsDir, animatedClip };
diff --git a/src/index.ts b/src/index.ts
deleted file mode 100644
index 5007114..0000000
--- a/src/index.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-import fs from "fs";
-import path from "path";
-import puppeteer from "puppeteer";
-
-import { generateRenderTemplate } from "./utils/htmlTemplate";
-import {
- staticCursors,
- bitmapsDir,
- animatedCursors,
- animatedClip,
-} from "./config";
-import { matchImages } from "./utils/matchImages";
-import { saveFrames, Frames } from "./utils/saveFrames";
-import { getFrameName } from "./utils/getFrameName";
-
-const main = async () => {
- const browser = await puppeteer.launch({
- ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
- headless: true,
- });
-
- if (!fs.existsSync(bitmapsDir)) {
- fs.mkdirSync(bitmapsDir);
- }
-
- try {
- console.log("📸 Rendering Static Cursors...");
-
- for (let svgPath of staticCursors) {
- const buffer = fs.readFileSync(path.resolve(svgPath), "utf8");
- if (!buffer) throw new Error(`${svgPath} File Read error`);
-
- // Generating HTML Template
- const data = buffer.toString();
- const template = generateRenderTemplate(data);
-
- // config
- const bitmapName = `${path.basename(svgPath, ".svg")}.png`;
- const out = path.resolve(bitmapsDir, bitmapName);
-
- // Render
- const page = await browser.newPage();
- await page.setContent(template);
-
- await page.waitForSelector("#container");
- const svgElement = await page.$("#container svg");
- if (!svgElement) throw new Error("svg element not found");
- await svgElement.screenshot({ omitBackground: true, path: out });
-
- await page.close();
- }
-
- console.log("🎥 Rendering Animated Cursors...");
-
- for (let svgPath of animatedCursors) {
- const buffer = fs.readFileSync(svgPath, "utf8");
- if (!buffer) throw new Error(`${svgPath} File Read error`);
-
- // Generating HTML Template
- const data = buffer.toString();
- const template = generateRenderTemplate(data);
-
- const page = await browser.newPage();
- await page.setContent(template, { waitUntil: "networkidle2" });
-
- await page.waitForSelector("#container");
- const svgElement = await page.$("#container svg");
- if (!svgElement) throw new Error("svg element not found");
-
- // Render Config
- let index = 1;
- let breakRendering = false;
- const frames: Frames = {};
- const firstKey = getFrameName(index, svgPath);
-
- console.log("Rendering", path.basename(svgPath), "...");
- console.log(firstKey);
-
- // 1st Frame
- frames[firstKey] = {
- buffer: await svgElement.screenshot({
- omitBackground: true,
- clip: animatedClip,
- encoding: "binary",
- }),
- };
-
- // Pushing frames until it match to 1st frame
- index++;
- while (!breakRendering) {
- const newFrame = await svgElement.screenshot({
- omitBackground: true,
- clip: animatedClip,
- encoding: "binary",
- });
- const key = getFrameName(index, svgPath);
- console.log(key);
- const diff = matchImages({
- img1Buff: frames[firstKey].buffer,
- img2Buff: newFrame,
- });
-
- if (!(diff < 700)) {
- frames[key] = { buffer: newFrame };
- } else {
- breakRendering = true;
- }
- index++;
- }
-
- saveFrames(frames);
-
- await page.close();
- }
-
- console.log(`\nBitmaps stored at ${bitmapsDir}\n\n🎉 Render Done.`);
- process.exit(0);
- } catch (error) {
- console.error(error);
- process.exit(1);
- }
-};
-
-main();
diff --git a/src/svg/README.md b/src/svg/README.md
deleted file mode 100644
index a50432e..0000000
--- a/src/svg/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# Cursor Source Info
-
-## Symbolic Cursors
-
-| Preview | Source | Symbolic links | Windows Cursor name |
-| :-------------------------------------------------------: | :---------------------: | :-------------------------------------------------------------: | :-----------------: |
-|
| all_scroll.svg | `None` | `SizeAll.cur` |
-|
| bottom_left_corner.svg | `fd_double_arrow.svg` `top_right_corner.svg` | `SizeNESW.cur` |
-|
| bottom_right_corner.svg | `bd_double_arrow.svg` `top_left_corner.svg` | `SizeNWSE.cur` |
-|
| bottom_tee.svg | `None` | |
-|
| center_ptr.svg | `None` | |
-|
| circle.svg | `crossed_circle.svg` `dnd_no_drop.svg` | `NO.cur` |
-|
| context_menu.svg | `None` | |
-|
| copy.svg | `dnd_copy.svg` | |
-|
| cross.svg | `tcross.svg` | |
-|
| crosshair.svg | `None` | `Cross.cur` |
-|
| dotbox.svg | `None` | |
-|
| hand1.svg | `None` | |
-|
| hand2.svg | `None` | `Hand.cur` |
-|
| left_ptr.svg | `None` | `Arrow.cur` |
-|
| left_ptr_watch.svg | `None` | `AppStarting.ani` |
-|
| left_side.svg | `right_side.svg` | |
-|
| left_tee.svg | `None` | |
-|
| link.svg | `dnd_link.svg` | |
-|
| ll_angle.svg | `None` | |
-|
| lr_angle.svg | `None` | |
-|
| move.svg | `dnd_move.svg` `dnd_none.svg` `grabbing.svg` `pointer_move.svg` | |
-|
| pencil.svg | `None` | `Handwriting.cur` |
-|
| plus.svg | `None` | |
-|
| question_arrow.svg | `dnd_ask.svg` | `Help.cur` |
-|
| right_ptr.svg | `None` | |
-|
| right_tee.svg | `None` | |
-|
| sb_down_arrow.svg | `None` | |
-|
| sb_h_double_arrow.svg | `None` | `SizeWE.cur` |
-|
| sb_left_arrow.svg | `None` | |
-|
| sb_right_arrow.svg | `None` | |
-|
| sb_up_arrow.svg | `None` | `UpArrow.cur` |
-|
| sb_v_double_arrow.svg | `None` | `SizeNS.cur` |
-|
| top_side.svg | `bottom_side.svg` | |
-|
| top_tee.svg | `None` | |
-|
| ul_angle.svg | `None` | |
-|
| ur_angle.svg | `None` | |
-|
| vertical_text.svg | `None` | |
-|
| wait.svg | `None` | `Wait.ani` |
-|
| wayland_cursor.svg | `None` | |
-|
| x_cursor.svg | `None` | |
-|
| xterm.svg | `None` | `IBeam.cur` |
-|
| zoom_in.svg | `None` | |
-|
| zoom_out.svg | `None` | |
-
-## Figma File
-
-[](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/Mac-Cursor?node-id=0%3A1)
diff --git a/src/svg/animated/left_ptr_watch.svg b/src/svg/animated/left_ptr_watch.svg
deleted file mode 100644
index 2d0707f..0000000
--- a/src/svg/animated/left_ptr_watch.svg
+++ /dev/null
@@ -1,42 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/animated/wait.svg b/src/svg/animated/wait.svg
deleted file mode 100644
index 4c2f3ba..0000000
--- a/src/svg/animated/wait.svg
+++ /dev/null
@@ -1,78 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/bd_double_arrow.svg b/src/svg/static/bd_double_arrow.svg
deleted file mode 120000
index a3a3e2d..0000000
--- a/src/svg/static/bd_double_arrow.svg
+++ /dev/null
@@ -1 +0,0 @@
-bottom_right_corner.svg
\ No newline at end of file
diff --git a/src/svg/static/bottom_left_corner.svg b/src/svg/static/bottom_left_corner.svg
deleted file mode 100644
index 1079273..0000000
--- a/src/svg/static/bottom_left_corner.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/bottom_right_corner.svg b/src/svg/static/bottom_right_corner.svg
deleted file mode 100644
index 61cf654..0000000
--- a/src/svg/static/bottom_right_corner.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/bottom_side.svg b/src/svg/static/bottom_side.svg
deleted file mode 120000
index 9c7bb92..0000000
--- a/src/svg/static/bottom_side.svg
+++ /dev/null
@@ -1 +0,0 @@
-top_side.svg
\ No newline at end of file
diff --git a/src/svg/static/circle.svg b/src/svg/static/circle.svg
deleted file mode 100644
index 903dc11..0000000
--- a/src/svg/static/circle.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/copy.svg b/src/svg/static/copy.svg
deleted file mode 100644
index 5390c7d..0000000
--- a/src/svg/static/copy.svg
+++ /dev/null
@@ -1,32 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/crossed_circle.svg b/src/svg/static/crossed_circle.svg
deleted file mode 100644
index 8535691..0000000
--- a/src/svg/static/crossed_circle.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/dnd_ask.svg b/src/svg/static/dnd_ask.svg
deleted file mode 120000
index 14c57d2..0000000
--- a/src/svg/static/dnd_ask.svg
+++ /dev/null
@@ -1 +0,0 @@
-question_arrow.svg
\ No newline at end of file
diff --git a/src/svg/static/dnd_copy.svg b/src/svg/static/dnd_copy.svg
deleted file mode 120000
index 4b1d7e7..0000000
--- a/src/svg/static/dnd_copy.svg
+++ /dev/null
@@ -1 +0,0 @@
-copy.svg
\ No newline at end of file
diff --git a/src/svg/static/dnd_link.svg b/src/svg/static/dnd_link.svg
deleted file mode 120000
index 4abb12d..0000000
--- a/src/svg/static/dnd_link.svg
+++ /dev/null
@@ -1 +0,0 @@
-link.svg
\ No newline at end of file
diff --git a/src/svg/static/dnd_move.svg b/src/svg/static/dnd_move.svg
deleted file mode 120000
index 37362fe..0000000
--- a/src/svg/static/dnd_move.svg
+++ /dev/null
@@ -1 +0,0 @@
-move.svg
\ No newline at end of file
diff --git a/src/svg/static/dnd_no_drop.svg b/src/svg/static/dnd_no_drop.svg
deleted file mode 100644
index e22810c..0000000
--- a/src/svg/static/dnd_no_drop.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/src/svg/static/dnd_none.svg b/src/svg/static/dnd_none.svg
deleted file mode 120000
index 37362fe..0000000
--- a/src/svg/static/dnd_none.svg
+++ /dev/null
@@ -1 +0,0 @@
-move.svg
\ No newline at end of file
diff --git a/src/svg/static/fd_double_arrow.svg b/src/svg/static/fd_double_arrow.svg
deleted file mode 120000
index acc15d0..0000000
--- a/src/svg/static/fd_double_arrow.svg
+++ /dev/null
@@ -1 +0,0 @@
-bottom_left_corner.svg
\ No newline at end of file
diff --git a/src/svg/static/grabbing.svg b/src/svg/static/grabbing.svg
deleted file mode 120000
index 37362fe..0000000
--- a/src/svg/static/grabbing.svg
+++ /dev/null
@@ -1 +0,0 @@
-move.svg
\ No newline at end of file
diff --git a/src/svg/static/hand1.svg b/src/svg/static/hand1.svg
deleted file mode 100644
index 032bde8..0000000
--- a/src/svg/static/hand1.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/left_ptr.svg b/src/svg/static/left_ptr.svg
deleted file mode 100644
index 6aa65d7..0000000
--- a/src/svg/static/left_ptr.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/left_side.svg b/src/svg/static/left_side.svg
deleted file mode 100644
index 0982847..0000000
--- a/src/svg/static/left_side.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/left_tee.svg b/src/svg/static/left_tee.svg
deleted file mode 100644
index f704d0e..0000000
--- a/src/svg/static/left_tee.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/link.svg b/src/svg/static/link.svg
deleted file mode 100644
index 60efe5a..0000000
--- a/src/svg/static/link.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/ll_angle.svg b/src/svg/static/ll_angle.svg
deleted file mode 100644
index 2d35f1b..0000000
--- a/src/svg/static/ll_angle.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/lr_angle.svg b/src/svg/static/lr_angle.svg
deleted file mode 100644
index dd90a0c..0000000
--- a/src/svg/static/lr_angle.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/move.svg b/src/svg/static/move.svg
deleted file mode 100644
index 3732775..0000000
--- a/src/svg/static/move.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/plus.svg b/src/svg/static/plus.svg
deleted file mode 100644
index 47940d4..0000000
--- a/src/svg/static/plus.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/pointer_move.svg b/src/svg/static/pointer_move.svg
deleted file mode 120000
index 37362fe..0000000
--- a/src/svg/static/pointer_move.svg
+++ /dev/null
@@ -1 +0,0 @@
-move.svg
\ No newline at end of file
diff --git a/src/svg/static/question_arrow.svg b/src/svg/static/question_arrow.svg
deleted file mode 100644
index 1cc74ef..0000000
--- a/src/svg/static/question_arrow.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/right_side.svg b/src/svg/static/right_side.svg
deleted file mode 120000
index 36e195a..0000000
--- a/src/svg/static/right_side.svg
+++ /dev/null
@@ -1 +0,0 @@
-left_side.svg
\ No newline at end of file
diff --git a/src/svg/static/right_tee.svg b/src/svg/static/right_tee.svg
deleted file mode 100644
index 02be6ac..0000000
--- a/src/svg/static/right_tee.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/sb_down_arrow.svg b/src/svg/static/sb_down_arrow.svg
deleted file mode 100644
index 52825d2..0000000
--- a/src/svg/static/sb_down_arrow.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/sb_left_arrow.svg b/src/svg/static/sb_left_arrow.svg
deleted file mode 100644
index f960fc4..0000000
--- a/src/svg/static/sb_left_arrow.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/sb_right_arrow.svg b/src/svg/static/sb_right_arrow.svg
deleted file mode 100644
index 4cb4e58..0000000
--- a/src/svg/static/sb_right_arrow.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/sb_up_arrow.svg b/src/svg/static/sb_up_arrow.svg
deleted file mode 100644
index 05c2594..0000000
--- a/src/svg/static/sb_up_arrow.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/tcross.svg b/src/svg/static/tcross.svg
deleted file mode 120000
index e0b26b0..0000000
--- a/src/svg/static/tcross.svg
+++ /dev/null
@@ -1 +0,0 @@
-cross.svg
\ No newline at end of file
diff --git a/src/svg/static/top_left_corner.svg b/src/svg/static/top_left_corner.svg
deleted file mode 120000
index a3a3e2d..0000000
--- a/src/svg/static/top_left_corner.svg
+++ /dev/null
@@ -1 +0,0 @@
-bottom_right_corner.svg
\ No newline at end of file
diff --git a/src/svg/static/top_right_corner.svg b/src/svg/static/top_right_corner.svg
deleted file mode 120000
index acc15d0..0000000
--- a/src/svg/static/top_right_corner.svg
+++ /dev/null
@@ -1 +0,0 @@
-bottom_left_corner.svg
\ No newline at end of file
diff --git a/src/svg/static/top_side.svg b/src/svg/static/top_side.svg
deleted file mode 100644
index b8666bc..0000000
--- a/src/svg/static/top_side.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/top_tee.svg b/src/svg/static/top_tee.svg
deleted file mode 100644
index 7c4d899..0000000
--- a/src/svg/static/top_tee.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/ul_angle.svg b/src/svg/static/ul_angle.svg
deleted file mode 100644
index 9d531e2..0000000
--- a/src/svg/static/ul_angle.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/ur_angle.svg b/src/svg/static/ur_angle.svg
deleted file mode 100644
index 622007d..0000000
--- a/src/svg/static/ur_angle.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/vertical_text.svg b/src/svg/static/vertical_text.svg
deleted file mode 100644
index e4bf3d8..0000000
--- a/src/svg/static/vertical_text.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/x_cursor.svg b/src/svg/static/x_cursor.svg
deleted file mode 100644
index c92c5ab..0000000
--- a/src/svg/static/x_cursor.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
\ No newline at end of file
diff --git a/src/svg/static/xterm.svg b/src/svg/static/xterm.svg
deleted file mode 100644
index 01ece7b..0000000
--- a/src/svg/static/xterm.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
\ No newline at end of file
diff --git a/src/utils/getFrameName.ts b/src/utils/getFrameName.ts
deleted file mode 100644
index 5b3dfff..0000000
--- a/src/utils/getFrameName.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import path from "path";
-
-export const frameNumber = (index: number, endIndex: number) => {
- let result = "" + index;
- while (result.length < endIndex) {
- result = "0" + result;
- }
- return result;
-};
-
-export const getFrameName = (index: number, fileName: string) => {
- const frame = frameNumber(index, 2);
- return `${path.basename(fileName, ".svg")}-${frame}.png`;
-};
diff --git a/src/utils/matchImages.ts b/src/utils/matchImages.ts
deleted file mode 100644
index 3c584a1..0000000
--- a/src/utils/matchImages.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { PNG } from "pngjs";
-import pixelmatch from "pixelmatch";
-
-interface MatchImagesArgs {
- img1Buff: Buffer;
- img2Buff: Buffer;
-}
-
-export const matchImages = ({ img1Buff, img2Buff }: MatchImagesArgs) => {
- const img1 = PNG.sync.read(img1Buff);
- const img2 = PNG.sync.read(img2Buff);
- const { width, height } = img1;
-
- const diff = new PNG({ width, height });
-
- return pixelmatch(img1.data, img2.data, diff.data, width, height, {
- threshold: 0.1,
- });
-};
diff --git a/src/utils/saveFrames.ts b/src/utils/saveFrames.ts
deleted file mode 100644
index f3be527..0000000
--- a/src/utils/saveFrames.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import fs from "fs";
-import path from "path";
-import { bitmapsDir } from "../config";
-
-export interface Frames {
- [fileName: string]: {
- buffer: Buffer;
- };
-}
-
-export const saveFrames = (frames: Frames) => {
- for (let [fileName, { buffer }] of Object.entries(frames)) {
- const out_path = path.resolve(bitmapsDir, fileName);
- fs.writeFileSync(out_path, buffer, { encoding: "binary" });
- }
-};
diff --git a/svg/animated/left_ptr_watch.svg b/svg/animated/left_ptr_watch.svg
new file mode 100644
index 0000000..eeae5ea
--- /dev/null
+++ b/svg/animated/left_ptr_watch.svg
@@ -0,0 +1,37 @@
+
\ No newline at end of file
diff --git a/svg/animated/wait.svg b/svg/animated/wait.svg
new file mode 100644
index 0000000..d09ca3e
--- /dev/null
+++ b/svg/animated/wait.svg
@@ -0,0 +1,73 @@
+
\ No newline at end of file
diff --git a/svg/static/X_cursor.svg b/svg/static/X_cursor.svg
new file mode 100644
index 0000000..fd06534
--- /dev/null
+++ b/svg/static/X_cursor.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/src/svg/static/all_scroll.svg b/svg/static/all-scroll.svg
similarity index 75%
rename from src/svg/static/all_scroll.svg
rename to svg/static/all-scroll.svg
index e7e538c..b6ba0f4 100644
--- a/src/svg/static/all_scroll.svg
+++ b/svg/static/all-scroll.svg
@@ -1,12 +1,9 @@
\ No newline at end of file
diff --git a/svg/static/bottom_right_corner.svg b/svg/static/bottom_right_corner.svg
new file mode 100644
index 0000000..1dcda9f
--- /dev/null
+++ b/svg/static/bottom_right_corner.svg
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/src/svg/static/bottom_tee.svg b/svg/static/bottom_tee.svg
similarity index 81%
rename from src/svg/static/bottom_tee.svg
rename to svg/static/bottom_tee.svg
index 306233b..db94cb5 100644
--- a/src/svg/static/bottom_tee.svg
+++ b/svg/static/bottom_tee.svg
@@ -1,7 +1,4 @@