Skip to content

Commit 98e2d1b

Browse files
authored
Merge pull request #22 from SkwalExe/fix-zindex
Fix zindex bug and fix npm scripts
2 parents 5e14cd4 + 1d9c1ea commit 98e2d1b

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.1.4 - 2024-07-19
2+
3+
### Fixed
4+
- Bug with ZIndex
5+
16
# 0.1.3 - 2024-05-25
27

38
### Fixed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import WinMB from '@skwalexe/winmb'
4848
If you use this method, the library will be available globally as `WinMB`.
4949

5050
```js
51-
<script src="https://cdn.jsdelivr.net/npm/@skwalexe/[email protected].3/dist/winmb.umd.js"></script>
51+
<script src="https://cdn.jsdelivr.net/npm/@skwalexe/[email protected].4/dist/winmb.umd.js"></script>
5252
```
5353

5454
# Using this library 📦
@@ -58,7 +58,7 @@ This library exports a `WinMB` class which acccepts the following parameters:
5858
- `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.
5959

6060
```js
61-
const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/[email protected].3/src/assets/')
61+
const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/[email protected].4/src/assets/')
6262
```
6363

6464
Once you instanciated the `WinMB` class, it exposes the follwing methods:

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@skwalexe/winmb",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "Windows-like dialogue boxes for your website",
55
"main": "./dist/lib-cjs/main.js",
66
"module": "./dist/lib-esm/main.js",
@@ -46,9 +46,9 @@
4646
"build:cjs": "tsc -m commonjs --target es2017 --outDir ./dist/lib-cjs/",
4747
"build:esm": "tsc -m es6 --target es2017 --outDir ./dist/lib-esm/",
4848
"build:umd": "rollup -c",
49-
"watch-esm": "pnpm run build:esm -- --watch",
50-
"watch-umd": "pnpm run build:umd -- --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload",
51-
"serve": "concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'",
49+
"watch-esm": "pnpm run build:esm --watch",
50+
"watch-umd": "pnpm run build:umd --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload",
51+
"serve": "pnpm run build:esm && concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'",
5252
"build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:umd"
5353
},
5454
"repository": {

Diff for: src/winmb.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default class WinMB {
9090
const messageBox = document.createElement('div')
9191
messageBox.classList.add(cssClass)
9292

93-
messageBox.style.zIndex = (this.boxList.length + 1).toString()
93+
messageBox.style.zIndex = (this.boxList.length + 10001).toString()
9494

9595
if (position === 'random')
9696
position = [GetRandomInt(0, window.innerWidth), GetRandomInt(0, window.innerHeight)]

0 commit comments

Comments
 (0)