Skip to content

Commit

Permalink
Merge pull request #83 from ful1e5/dev
Browse files Browse the repository at this point in the history
Bibata v1.0.3
  • Loading branch information
ful1e5 authored Nov 10, 2020
2 parents 78b548f + bd627b5 commit dc57c1a
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 33 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [v1.0.3] - 7 Nov 2020

### Added

- Case insensitive `colors key` replace in **bibata-core**
- **Alternate.cur** added in Windows package
- `minimumFrames` frames handler added for animated cursors in **bibata-core**

### Changed

- Files download reference change to [pling.com](https://www.pling.com/p/1197198/) in `PLING.bbcode`
- Scripts in `package.json`
- Change reference of **Alternate.cur** to `right_ptr`
- fixed #82 improvement to X-cursor (feature request)
- fixed #81 Corner resize cursors are not coloured (bug)

## [v1.0.2] - 30 Oct 2020

Expand Down Expand Up @@ -134,7 +145,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release 🎊

[unreleased]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.2...main
[unreleased]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.3...main
[v1.0.3]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.2...v1.0.3
[v1.0.2]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.1...v1.0.2
[v1.0.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.0...v1.0.1
[v1.0.0]: https://github.com/ful1e5/Bibata_Cursor/compare/v0.4.2...v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion CURSORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
| <img src="./packages/modern/src/svg/static/sb_h_double_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_h_double_arrow.svg" width="20%"/> | sb_h_double_arrow.svg | `None` | `SizeWE.cur` |
| <img src="./packages/modern/src/svg/static/sb_left_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_left_arrow.svg" width="20%"/> | sb_left_arrow.svg | `None` | |
| <img src="./packages/modern/src/svg/static/sb_right_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_right_arrow.svg" width="20%"/> | sb_right_arrow.svg | `None` | |
| <img src="./packages/modern/src/svg/static/sb_up_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_up_arrow.svg" width="20%"/> | sb_up_arrow.svg | `None` | `UpArrow.cur` |
| <img src="./packages/modern/src/svg/static/sb_up_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_up_arrow.svg" width="20%"/> | sb_up_arrow.svg | `None` | `Alternate.cur` |
| <img src="./packages/modern/src/svg/static/sb_v_double_arrow.svg" width="20%"/> | <img src="./packages/original/src/svg/static/sb_v_double_arrow.svg" width="20%"/> | sb_v_double_arrow.svg | `None` | `SizeNS.cur` |
| <img src="./packages/modern/src/svg/static/top_side.svg" width="20%"/> | <img src="./packages/original/src/svg/static/top_side.svg" width="20%"/> | top_side.svg | `None` | |
| <img src="./packages/modern/src/svg/static/bottom_side.svg" width="20%"/> | <img src="./packages/original/src/svg/static/bottom_side.svg" width="20%"/> | bottom_side.svg | `None` | |
Expand Down
6 changes: 3 additions & 3 deletions builder/bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-

import shutil
from os import path, listdir, rename, remove
from .config import ConfigProvider
from os import listdir, path, remove, rename

from .config import ConfigProvider

# Windows Cursors Config
windows_cursors = {
Expand All @@ -21,7 +21,7 @@
"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",
"right_ptr.cur": "Alternate.cur",
"wait.ani": "Wait.ani",
}

Expand Down
4 changes: 2 additions & 2 deletions builder/config.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import json
import shutil
from os import path, mkdir
import sys
import tempfile
from os import mkdir, path

from . import __path__
from .pkg_info import info
Expand Down
5 changes: 3 additions & 2 deletions builder/cursor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from clickgen import build_cursor_theme, build_win_cursor_theme, build_x11_cursor_theme

from .bundler import Bundler
from .config import ConfigProvider, hotspots, sizes, delay
from clickgen import build_x11_cursor_theme, build_cursor_theme, build_win_cursor_theme
from .config import ConfigProvider, delay, hotspots, sizes


class CursorBuilder:
Expand Down
2 changes: 1 addition & 1 deletion builder/pkg_info.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__version__ = "1.0.2"
__version__ = "1.0.3"

info = {
"pkg_name": "builder",
Expand Down
4 changes: 2 additions & 2 deletions builder/windows.inf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%,
"SizeNWSE.cur"
"SizeNESW.cur"
"SizeAll.cur"
"UpArrow.cur"
"Alternate.cur"
"Hand.cur"

[Strings]
Expand All @@ -48,5 +48,5 @@ horz = "SizeWE.cur"
dgn1 = "SizeNWSE.cur"
dgn2 = "SizeNESW.cur"
move = "SizeAll.cur"
alternate = "UpArrow.cur"
alternate = "Alternate.cur"
link = "Hand.cur"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bibata-cursor",
"version": "1.0.2",
"version": "1.0.3",
"description": "Material Based Cursors 🚀",
"main": "index.js",
"author": "Kaiz Khatri",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bibata-core",
"version": "1.0.2",
"version": "1.0.3",
"description": "Bibata core package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/BitmapsGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { matchImages } from "./utils/matchImages";
export class BitmapsGenerator {
private readonly staticCurs: Cursors;
private readonly animatedCurs: Cursors;
private readonly minimumFrames: number = 30;

/**
* @param source `BitmapsGenerator` Class's object arguments.
Expand Down Expand Up @@ -151,11 +152,10 @@ export class BitmapsGenerator {
img2Buff: newFrame
});

if (matched) {
if (matched && index > this.minimumFrames) {
breakRendering = true;
} else {
frames[key] = { buffer: newFrame };
setTimeout(() => {}, 1);
index++;
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/SvgHandler/ColoredSvgGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default class ColoredSvgGenerator {
let content = fs.readFileSync(cursor, "utf-8").toString();

content = content
.replace(new RegExp(keyColors.base, "g"), this.themeConfig.colors.base)
.replace(new RegExp(keyColors.base, "ig"), this.themeConfig.colors.base)
.replace(
new RegExp(keyColors.outline, "g"),
new RegExp(keyColors.outline, "ig"),
this.themeConfig.colors.outline
);

Expand All @@ -69,9 +69,9 @@ export default class ColoredSvgGenerator {
let content = fs.readFileSync(cursor, "utf-8").toString();

content = content
.replace(new RegExp(keyColors.base, "g"), this.themeConfig.colors.base)
.replace(new RegExp(keyColors.base, "ig"), this.themeConfig.colors.base)
.replace(
new RegExp(keyColors.outline, "g"),
new RegExp(keyColors.outline, "ig"),
this.themeConfig.colors.outline
);

Expand All @@ -83,14 +83,14 @@ export default class ColoredSvgGenerator {
}
const { background: b } = this.themeConfig.colors.watch;
content = content.replace(
new RegExp(keyColors.watch!.background, "g"),
new RegExp(keyColors.watch!.background, "ig"),
b
); // Watch Background
} catch (error) {
// === on error => replace `watch` color as `base` ===

content = content.replace(
new RegExp(keyColors.watch!.background, "g"),
new RegExp(keyColors.watch!.background, "ig"),
this.themeConfig.colors.base
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface Frames {
}

/**
* Hex Colors in string Formate.
* Hex Colors in string Format.
*
* `Example: `"#FFFFFF"
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/modern/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bibata-modern",
"version": "1.0.2",
"version": "1.0.3",
"description": "Rounded edges bibata cursors 🏳️‍🌈",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/modern/src/svg/static/x_cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/original/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bibata-original",
"version": "1.0.2",
"version": "1.0.3",
"description": "Sharp edges bibata cursors 🏳️‍🌈",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/original/src/svg/static/x_cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc57c1a

Please sign in to comment.