diff --git a/CHANGELOG.md b/CHANGELOG.md index 238485ab..fc192760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,173 +9,175 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Bibata Rainbow packages move to own repo -- Format `svg` files +- Bibata Rainbow packages move to own repo +- puppeteer `svg` element timeout fixed +- optional options typing in `BitmapGenerator.ts` +- Format `svg` files ## [Bibata v1.1.0] - 26 Feb 2021 ### Added -- new **[copr](https://copr.fedorainfracloud.org/coprs/peterwu/rendezvous/package/bibata-cursor-themes/)** package by @peterwu -- `.svg` files separated to `/svg` -- Customizable Windows & UNIX cursors #91 -- Easy build system with `Make` supports -- Make docs in[README.md](./README.md#manual-build) -- use builtin clickgen WinPackager for Windows package -- Constant frames in animated cursors -- Smooth animation in Windows cursors -- `install` & `uninstall` with `make` commands +- new **[copr](https://copr.fedorainfracloud.org/coprs/peterwu/rendezvous/package/bibata-cursor-themes/)** package by @peterwu +- `.svg` files separated to `/svg` +- Customizable Windows & UNIX cursors #91 +- Easy build system with `Make` supports +- Make docs in[README.md](./README.md#manual-build) +- use builtin clickgen WinPackager for Windows package +- Constant frames in animated cursors +- Smooth animation in Windows cursors +- `install` & `uninstall` with `make` commands ### Changed -- Individual cursor build with clickgen v1.1.8 #93 -- puppeteer 'single-process' args removed -- All Bitmapping code structured in `bitmapper` directory -- builder code structured inside `builder` directory -- `builder` package renamed to `bbpkg` -- Symblinks provided by `bbpkg`(new Bibata builder) -- Automatic build environment setup with `make` -- Logging file removed -- Fix dnf runtime requirements packages ful1e5/apple_cursor#34 -- Fix grabbing cursors symlinks #87 -- Fix Cursors not available for Login Window in Linux Mint 20 #88 -- Dirty pixel in `move` cursor fixed #94 +- Individual cursor build with clickgen v1.1.8 #93 +- puppeteer 'single-process' args removed +- All Bitmapping code structured in `bitmapper` directory +- builder code structured inside `builder` directory +- `builder` package renamed to `bbpkg` +- Symblinks provided by `bbpkg`(new Bibata builder) +- Automatic build environment setup with `make` +- Logging file removed +- Fix dnf runtime requirements packages ful1e5/apple_cursor#34 +- Fix grabbing cursors symlinks #87 +- Fix Cursors not available for Login Window in Linux Mint 20 #88 +- Dirty pixel in `move` cursor fixed #94 ## [Bibata v1.0.3] - 10 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** +- 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) +- 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) ## [Bibata v1.0.2] - 30 Oct 2020 ### Added -- Separate **GitHib Action** workflow for **pull-request** -- **pkg_info.py** inside `builder` module -- `builder` module docs +- Separate **GitHib Action** workflow for **pull-request** +- **pkg_info.py** inside `builder` module +- `builder` module docs ### Changed -- Windows Resize cursors wrong implementation fixed **#76** [Reopen] -- **Rich Black** color in `watch: background` (Bibata Amber) **#78** -- PyPi Requirements provided inside `setup.py` -- locked clickgen to **1.1.7** -- Package information provider module changed to `builder/pkg_info.py` +- Windows Resize cursors wrong implementation fixed **#76** [Reopen] +- **Rich Black** color in `watch: background` (Bibata Amber) **#78** +- PyPi Requirements provided inside `setup.py` +- locked clickgen to **1.1.7** +- Package information provider module changed to `builder/pkg_info.py` ## [Bibata v1.0.1] - 8 Oct 2020 ### Added -- **[builder](./builder/)** python package -- Build only **x11** cursors by passing `--x11` flag in `build.py` -- Build only **win** cursors by passing `--win` flag in `build.py` -- Bump up **clickgen** version to **1.1.7** (KDE cursors fix patch) -- `22px` size added (suggestion by **@gotroot** from pling.com) +- **[builder](./builder/)** python package +- Build only **x11** cursors by passing `--x11` flag in `build.py` +- Build only **win** cursors by passing `--win` flag in `build.py` +- Bump up **clickgen** version to **1.1.7** (KDE cursors fix patch) +- `22px` size added (suggestion by **@gotroot** from pling.com) ### Changed -- Browser args changed in `bibata-core` **BitmapGenerator** -- **yarn** scripts updated -- **yarn-packages** description updated -- **Installation** docs updated in [README.md](./README.md) & [PLING.bbcode](./PLING.bbcode) -- remove additional comments in **[PULL_REQUEST_TEMPLATE.md](https://github.com/ful1e5/Bibata_Cursor/commit/085221352038a199aae99f828d64b2ae91ace493)** -- #76 Wrong implementation resize cursors **[closed]** -- #74 `Pillow` pip requirements checking in installation of **clickgen** +- Browser args changed in `bibata-core` **BitmapGenerator** +- **yarn** scripts updated +- **yarn-packages** description updated +- **Installation** docs updated in [README.md](./README.md) & [PLING.bbcode](./PLING.bbcode) +- remove additional comments in **[PULL_REQUEST_TEMPLATE.md](https://github.com/ful1e5/Bibata_Cursor/commit/085221352038a199aae99f828d64b2ae91ace493)** +- #76 Wrong implementation resize cursors **[closed]** +- #74 `Pillow` pip requirements checking in installation of **clickgen** ## [Bibata v1.0.0] - 3 Oct 2020 ### Changed -- `main` as **default** branch -- Package **size** reduced -- Build process with `python` & [**clickgen**](https://github.com/ful1e5/clickgen) -- Cursors Redesign => `all_scroll`, `pencil`, `wayland_cursor`, `xcursor` and all `pointer symbols`(with Bigger Symbols) cursors -- `Bibata Oil` is **end of life** -- Bitmaps Rendering with [**puppeteer**](https://github.com/puppeteer/puppeteer) -- Build Docs +- `main` as **default** branch +- Package **size** reduced +- Build process with `python` & [**clickgen**](https://github.com/ful1e5/clickgen) +- Cursors Redesign => `all_scroll`, `pencil`, `wayland_cursor`, `xcursor` and all `pointer symbols`(with Bigger Symbols) cursors +- `Bibata Oil` is **end of life** +- Bitmaps Rendering with [**puppeteer**](https://github.com/puppeteer/puppeteer) +- Build Docs ### Added -- Bibata Original (Old Bibata) -- Windows Package with **Double Click** installation 😍 -- Maintaining [CHANGELOG.md](./CHANGELOG.md) -- [CURSORS.md](./CURSORS.md) for all cursors information -- [PLING.bbcode](./PLING.bbcode) for pling.com Product page docs -- [GitHub Actions](https://github.com/ful1e5/Bibata_Cursor/actions) added -- New Build with **10x** faster rendering. -- Customizable Colors in **Bibata** Cursors. -- Auto framing in animated cursors with [**pixelmatch**](https://github.com/mapbox/pixelmatch) +- Bibata Original (Old Bibata) +- Windows Package with **Double Click** installation 😍 +- Maintaining [CHANGELOG.md](./CHANGELOG.md) +- [CURSORS.md](./CURSORS.md) for all cursors information +- [PLING.bbcode](./PLING.bbcode) for pling.com Product page docs +- [GitHub Actions](https://github.com/ful1e5/Bibata_Cursor/actions) added +- New Build with **10x** faster rendering. +- Customizable Colors in **Bibata** Cursors. +- Auto framing in animated cursors with [**pixelmatch**](https://github.com/mapbox/pixelmatch) ## [Bibata v0.4.2] - 12 January 2020 ### Changed -- same names in Oil and Classic [Fixed again] +- same names in Oil and Classic [Fixed again] ## [Bibata v0.4.2.beta.1] - 22 December 2019 ### Changed -- Bibata Logo resigned +- Bibata Logo resigned ## [Bibata v0.4.2.alpha.2] - 1 December 2019 ### Added -- Fresh new Aminated cursors -- Missing KDE Cursors -- Added custom animation-delay tweak script +- Fresh new Aminated cursors +- Missing KDE Cursors +- Added custom animation-delay tweak script ### Changed -- Glitch fixed in watch cursor(loading state) -- Bibata Amber Color changed to #FF8000 -- Bibata Oil is inspired on **adwaita gtk** theme color #272728 +- Glitch fixed in watch cursor(loading state) +- Bibata Amber Color changed to #FF8000 +- Bibata Oil is inspired on **adwaita gtk** theme color #272728 ## [Bibata v0.4.2.alpha.1] - 13 November 2019 ### Added -- New build process using python -- Common .svg file for all cursor source(i.e. time saving for modification) -- Bibata Classic Flavor -- Available for Windows user +- New build process using python +- Common .svg file for all cursor source(i.e. time saving for modification) +- Bibata Classic Flavor +- Available for Windows user ### Changed -- Color & Shadow changed for easy visibility -- Cursor's corner-shape changed -- Hot-spots changed +- Color & Shadow changed for easy visibility +- Cursor's corner-shape changed +- Hot-spots changed ## [Bibata v.0.4.1] - 3 September 2018 ### Changed -- Locations Fixed -- AUR added in README.md +- Locations Fixed +- AUR added in README.md ## [Bibata v0.3.1] - 16 March 2018 ### Changed -- Redesign Crosshair +- Redesign Crosshair ## [Bibata v0.3] - 3 February 2018 ### Added -- Initial release 🎊 +- Initial release 🎊 [unreleased]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.1.0...main [bibata v1.1.0]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.3...v1.1.0 diff --git a/bitmapper/packages/core/src/BitmapsGenerator.ts b/bitmapper/packages/core/src/BitmapsGenerator.ts index 4d4144b4..7a017ba6 100644 --- a/bitmapper/packages/core/src/BitmapsGenerator.ts +++ b/bitmapper/packages/core/src/BitmapsGenerator.ts @@ -47,7 +47,7 @@ class BitmapsGenerator { } const html = toHTML(content); - await page.setContent(html); + await page.setContent(html, { timeout: 0 }); const svg = await page.$("#container svg"); @@ -57,11 +57,7 @@ class BitmapsGenerator { return svg; } - public async generateStatic( - browser: Browser, - content: string, - key: string - ) { + public async generateStatic(browser: Browser, content: string, key: string) { const page = await browser.newPage(); const svg = await this.getSvgElement(page, content); @@ -86,15 +82,15 @@ class BitmapsGenerator { } private async stopAnimation(page: Page) { - //@ts-ignore - await page._client.send("Animation.setPlaybackRate", { + const client = await page.target().createCDPSession(); + await client.send("Animation.setPlaybackRate", { playbackRate: 0, }); } private async resumeAnimation(page: Page, playbackRate: number) { - //@ts-ignore - await page._client.send("Animation.setPlaybackRate", { + const client = await page.target().createCDPSession(); + await client.send("Animation.setPlaybackRate", { playbackRate, }); } @@ -108,18 +104,18 @@ class BitmapsGenerator { browser: Browser, content: string, key: string, - options: { - playbackRate: number; - diff: number; - frameLimit: number; - framePadding: number; - } = { - playbackRate: 0.3, - diff: 0, - frameLimit: 300, - framePadding: 4, + options?: { + playbackRate?: number; + diff?: number; + frameLimit?: number; + framePadding?: number; } ) { + const opt = Object.assign( + { playbackRate: 0.1, diff: 0, frameLimit: 300, framePadding: 4 }, + options + ); + const page = await browser.newPage(); const svg = await this.getSvgElement(page, content); await this.stopAnimation(page); @@ -130,22 +126,22 @@ class BitmapsGenerator { // Rendering frames till `imgN` matched to `imgN-1` (When Animation is done) while (!breakRendering) { - if (index > options.frameLimit) { + if (index > opt.frameLimit) { throw new Error("Reached the frame limit."); } - this.resumeAnimation(page, options.playbackRate); + await this.resumeAnimation(page, opt.playbackRate); const img: string | Buffer = await this.screenshot(svg); - this.stopAnimation(page); + await this.stopAnimation(page); if (index > 1) { // @ts-ignore const diff = matchImages(prevImg, img); - if (diff <= options.diff) { + if (diff <= opt.diff) { breakRendering = !breakRendering; } } - const number = frameNumber(index, options.framePadding); + const number = frameNumber(index, opt.framePadding); const frame = `${key}-${number}.png`; this.saveFrameImage(frame, img); @@ -153,7 +149,6 @@ class BitmapsGenerator { prevImg = img; ++index; } - await page.close(); } } diff --git a/builder/bbpkg/configure.py b/builder/bbpkg/configure.py index 5cd23cea..4b89fef7 100644 --- a/builder/bbpkg/configure.py +++ b/builder/bbpkg/configure.py @@ -16,7 +16,7 @@ def to_tuple(x: X) -> Tuple[X, X]: def get_config(bitmaps_dir, **kwargs) -> Dict[str, Any]: - """Return configuration of `GoogleDot` pointers. + """Return configuration of `Bibata` pointers. ``` Args: