From 1d9c1ea08cffc44ad1ab0637b1c36a416ddd9aa6 Mon Sep 17 00:00:00 2001 From: SkwalExe Date: Fri, 19 Jul 2024 18:35:18 +0200 Subject: [PATCH] Fix zindex bug and fix npm scripts --- CHANGELOG.md | 5 +++++ README.md | 4 ++-- package.json | 8 ++++---- src/winmb.ts | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f079071..31373a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.1.4 - 2024-07-19 + +### Fixed +- Bug with ZIndex + # 0.1.3 - 2024-05-25 ### Fixed diff --git a/README.md b/README.md index fbbd713..ae78418 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ import WinMB from '@skwalexe/winmb' If you use this method, the library will be available globally as `WinMB`. ```js - + ``` # Using this library 📦 @@ -58,7 +58,7 @@ This library exports a `WinMB` class which acccepts the following parameters: - `assetsUrl / required`: WinMB needs to load **remote assets** such as css stylesheets, sounds, and images, which you can host on your own servers. This parameter is used to tell WinMB where it can find these assets. You must provide a **base url**, to which WinMB will just append the requested asset's file name. If you don't want to host the assets yourself, you can use JSDelivr like in the example below. ```js -const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/WinMB.js@0.1.3/src/assets/') +const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/WinMB.js@0.1.4/src/assets/') ``` Once you instanciated the `WinMB` class, it exposes the follwing methods: diff --git a/package.json b/package.json index fcc41dd..321bf70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@skwalexe/winmb", - "version": "0.1.3", + "version": "0.1.4", "description": "Windows-like dialogue boxes for your website", "main": "./dist/lib-cjs/main.js", "module": "./dist/lib-esm/main.js", @@ -46,9 +46,9 @@ "build:cjs": "tsc -m commonjs --target es2017 --outDir ./dist/lib-cjs/", "build:esm": "tsc -m es6 --target es2017 --outDir ./dist/lib-esm/", "build:umd": "rollup -c", - "watch-esm": "pnpm run build:esm -- --watch", - "watch-umd": "pnpm run build:umd -- --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload", - "serve": "concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'", + "watch-esm": "pnpm run build:esm --watch", + "watch-umd": "pnpm run build:umd --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload", + "serve": "pnpm run build:esm && concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'", "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:umd" }, "repository": { diff --git a/src/winmb.ts b/src/winmb.ts index a532d43..4a4928d 100644 --- a/src/winmb.ts +++ b/src/winmb.ts @@ -90,7 +90,7 @@ export default class WinMB { const messageBox = document.createElement('div') messageBox.classList.add(cssClass) - messageBox.style.zIndex = (this.boxList.length + 1).toString() + messageBox.style.zIndex = (this.boxList.length + 10001).toString() if (position === 'random') position = [GetRandomInt(0, window.innerWidth), GetRandomInt(0, window.innerHeight)]