@kunalnagarco/jquery-peek-a-bar 4.0.25 → 4.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,6 +110,10 @@ Show the bar.
110
110
 
111
111
  Hide the bar.
112
112
 
113
+ ### bar.destroy()
114
+
115
+ Remove the bar from the DOM and cancel any pending autohide timer.
116
+
113
117
  ## Example
114
118
 
115
119
  Please check out the complete example below:
@@ -129,7 +133,7 @@ var bar = $.peekABar({
129
133
  opacity: '0.8',
130
134
  cssClass: 'custom-class',
131
135
  position: 'bottom',
132
- closeOnClick: true
136
+ closeOnClick: true,
133
137
  onShow: function() {
134
138
  console.log('called after bar is shown');
135
139
  },
@@ -152,6 +156,10 @@ bar.show({
152
156
  });
153
157
  ```
154
158
 
159
+ ## Browser Support
160
+
161
+ All modern browsers are supported. IE11 and below are **not** supported as of v5.0.0.
162
+
155
163
  ## Support
156
164
 
157
165
  For any issues/queries, please open a new [Github Issue](https://github.com/kunalnagarco/jquery.peekABar/issues).
@@ -1 +1,11 @@
1
- .peek-a-bar{margin:0;position:fixed;width:100%;left:0;right:0;text-align:center}
1
+ .peek-a-bar {
2
+ margin: 0;
3
+ position: fixed;
4
+ width: 100%;
5
+ left: 0;
6
+ right: 0;
7
+ text-align: center;
8
+ z-index: 9999;
9
+ }
10
+
11
+ /*# sourceMappingURL=jquery.peekabar.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../../src/scss/peekabar.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA","file":"jquery.peekabar.css"}
@@ -1,2 +1 @@
1
- .peek-a-bar{margin:0;position:fixed;width:100%;left:0;right:0;text-align:center}
2
- /*# sourceMappingURL=jquery.peekabar.min.css.map */
1
+ .peek-a-bar{margin:0;position:fixed;width:100%;left:0;right:0;text-align:center;z-index:9999}/*# sourceMappingURL=jquery.peekabar.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["dist/css/jquery.peekabar.css"],"names":[],"mappings":"AAAA,YAAY,OAAO,EAAE,SAAS,MAAM,MAAM,KAAK,KAAK,EAAE,MAAM,EAAE,WAAW"}
1
+ {"version":3,"sourceRoot":"","sources":["../../src/scss/peekabar.scss"],"names":[],"mappings":"AAAA,YACE,SACA,eACA,WACA,OACA,QACA,kBACA","file":"jquery.peekabar.min.css"}
@@ -1,82 +1,93 @@
1
- "use strict";
2
-
3
- /**
4
- * @license
5
- * @kunalnagarco/jquery-peek-a-bar <https://kunalnagarco.github.io/jquery.peekABar>
6
- * Copyright 2019 Kunal Nagar
7
- * Available under MIT license
1
+ /*!
2
+ * jQuery peekABar
3
+ * https://kunalnagarco.github.io/jquery.peekABar
4
+ *
5
+ * Copyright (c) 2019-2026 Kunal Nagar
6
+ * Released under the MIT License
7
+ * https://opensource.org/licenses/MIT
8
8
  */
9
- (function ($) {
10
- 'use strict';
11
-
12
- $.peekABar = function (options) {
13
- var _this = this;
14
- var that = this,
15
- rand = parseInt(Math.random() * 100000000, 0);
9
+ (function($) {
10
+ "use strict";
11
+ let _instanceCount = 0;
12
+ $.peekABar = function(options) {
13
+ let that = this;
16
14
  this.bar = {};
17
15
  this.settings = {};
18
- var defaults = {
19
- html: 'Your Message Here',
20
- delay: 3000,
16
+ this._autohideTimer = null;
17
+ let defaults = {
18
+ html: "Your Message Here",
19
+ delay: 3e3,
21
20
  autohide: false,
22
- padding: '1em',
23
- backgroundColor: 'rgb(195, 195, 195)',
21
+ padding: "1em",
22
+ backgroundColor: "rgb(195, 195, 195)",
24
23
  animation: {
25
- type: 'slide',
26
- duration: 'slow'
24
+ type: "slide",
25
+ duration: "slow"
27
26
  },
28
27
  cssClass: null,
29
- opacity: '1',
30
- position: 'top',
28
+ opacity: "1",
29
+ position: "top",
31
30
  closeOnClick: false,
32
- onShow: function onShow() {},
33
- onHide: function onHide() {}
31
+ onShow() {
32
+ },
33
+ onHide() {
34
+ }
34
35
  };
35
- var init = function init() {
36
- that.settings = $.extend({}, defaults, options);
36
+ let init = () => {
37
+ that.settings = $.extend(true, {}, defaults, options);
37
38
  _create();
38
39
  _applyCustomSettings();
39
40
  };
40
- this.show = function (args) {
41
- if (args !== undefined) {
41
+ this.show = (args) => {
42
+ if (args !== void 0) {
42
43
  if (args.html) {
43
- _this.bar.html(args.html);
44
+ this.bar.html(args.html);
44
45
  }
45
46
  }
46
- switch (_this.settings.animation.type) {
47
- case 'slide':
48
- _this.bar.slideDown(that.settings.animation.duration);
47
+ const duration = that.settings.animation.duration;
48
+ const onShowDone = () => that.settings.onShow.call(that, args);
49
+ switch (this.settings.animation.type) {
50
+ case "slide":
51
+ this.bar.slideDown(duration, onShowDone);
49
52
  break;
50
- case 'fade':
51
- _this.bar.fadeIn(that.settings.animation.duration);
53
+ case "fade":
54
+ this.bar.css("opacity", 0).show().animate({ opacity: that.settings.opacity }, duration, onShowDone);
52
55
  break;
53
56
  }
54
- if (_this.settings.autohide) {
55
- setTimeout(function () {
57
+ if (this.settings.autohide) {
58
+ clearTimeout(this._autohideTimer);
59
+ this._autohideTimer = setTimeout(() => {
56
60
  that.hide();
57
- }, _this.settings.delay);
61
+ }, this.settings.delay);
58
62
  }
59
- _this.settings.onShow.call(_this, args);
60
63
  };
61
- this.hide = function () {
62
- switch (_this.settings.animation.type) {
63
- case 'slide':
64
- _this.bar.slideUp(that.settings.animation.duration);
64
+ this.hide = () => {
65
+ const duration = that.settings.animation.duration;
66
+ const onHideDone = () => that.settings.onHide.call(that);
67
+ switch (this.settings.animation.type) {
68
+ case "slide":
69
+ this.bar.slideUp(duration, onHideDone);
65
70
  break;
66
- case 'fade':
67
- _this.bar.fadeOut(that.settings.animation.duration);
71
+ case "fade":
72
+ this.bar.animate({ opacity: 0 }, duration, () => {
73
+ that.bar.hide();
74
+ onHideDone();
75
+ });
68
76
  break;
69
77
  }
70
- _this.settings.onHide.call(_this);
71
78
  };
72
- var _create = function _create() {
73
- that.bar = $('<div></div>').addClass('peek-a-bar').attr('id', '__peek_a_bar_' + rand);
74
- $('html').append(that.bar);
79
+ this.destroy = () => {
80
+ clearTimeout(that._autohideTimer);
81
+ that.bar.remove();
82
+ };
83
+ let _create = () => {
84
+ const id = ++_instanceCount;
85
+ that.bar = $("<div></div>").addClass("peek-a-bar").attr("id", "__peek_a_bar_" + id);
86
+ $("html").append(that.bar);
75
87
  that.bar.hide();
76
88
  };
77
- var _applyCustomSettings = function _applyCustomSettings() {
89
+ let _applyCustomSettings = () => {
78
90
  _applyHTML();
79
- _applyAutohide();
80
91
  _applyPadding();
81
92
  _applyBackgroundColor();
82
93
  _applyOpacity();
@@ -84,45 +95,36 @@
84
95
  _applyPosition();
85
96
  _applyCloseOnClick();
86
97
  };
87
- var _applyHTML = function _applyHTML() {
98
+ let _applyHTML = () => {
88
99
  that.bar.html(that.settings.html);
89
100
  };
90
- var _applyAutohide = function _applyAutohide() {
91
- if (that.settings.autohide) {
92
- setTimeout(function () {
93
- that.hide();
94
- }, that.settings.delay);
95
- }
96
- };
97
- var _applyPadding = function _applyPadding() {
98
- that.bar.css('padding', that.settings.padding);
101
+ let _applyPadding = () => {
102
+ that.bar.css("padding", that.settings.padding);
99
103
  };
100
- var _applyBackgroundColor = function _applyBackgroundColor() {
101
- that.bar.css('background-color', that.settings.backgroundColor);
104
+ let _applyBackgroundColor = () => {
105
+ that.bar.css("background-color", that.settings.backgroundColor);
102
106
  };
103
- var _applyCSSClass = function _applyCSSClass() {
107
+ let _applyCSSClass = () => {
104
108
  if (that.settings.cssClass !== null) {
105
109
  that.bar.addClass(that.settings.cssClass);
106
110
  }
107
111
  };
108
- var _applyOpacity = function _applyOpacity() {
109
- that.bar.css('opacity', that.settings.opacity);
112
+ let _applyOpacity = () => {
113
+ that.bar.css("opacity", that.settings.opacity);
110
114
  };
111
- var _applyPosition = function _applyPosition() {
115
+ let _applyPosition = () => {
112
116
  switch (that.settings.position) {
113
- case 'top':
114
- that.bar.css('top', 0);
115
- break;
116
- case 'bottom':
117
- that.bar.css('bottom', 0);
117
+ case "bottom":
118
+ that.bar.css({ bottom: 0, top: "" });
118
119
  break;
120
+ case "top":
119
121
  default:
120
- that.bar.css('top', 0);
122
+ that.bar.css({ top: 0, bottom: "" });
121
123
  }
122
124
  };
123
- var _applyCloseOnClick = function _applyCloseOnClick() {
125
+ let _applyCloseOnClick = () => {
124
126
  if (that.settings.closeOnClick) {
125
- that.bar.click(function () {
127
+ that.bar.css("cursor", "pointer").click(() => {
126
128
  that.hide();
127
129
  });
128
130
  }
@@ -1,2 +1,9 @@
1
- (f=>{f.peekABar=function(t){var s=this,i=this,n=parseInt(1e8*Math.random(),0),a=(this.bar={},{html:"Your Message Here",delay:3e3,autohide:!(this.settings={}),padding:"1em",backgroundColor:"rgb(195, 195, 195)",animation:{type:"slide",duration:"slow"},cssClass:null,opacity:"1",position:"top",closeOnClick:!1,onShow:function(){},onHide:function(){}}),e=(this.show=function(t){switch(void 0!==t&&t.html&&s.bar.html(t.html),s.settings.animation.type){case"slide":s.bar.slideDown(i.settings.animation.duration);break;case"fade":s.bar.fadeIn(i.settings.animation.duration)}s.settings.autohide&&setTimeout(function(){i.hide()},s.settings.delay),s.settings.onShow.call(s,t)},this.hide=function(){switch(s.settings.animation.type){case"slide":s.bar.slideUp(i.settings.animation.duration);break;case"fade":s.bar.fadeOut(i.settings.animation.duration)}s.settings.onHide.call(s)},function(){i.bar=f("<div></div>").addClass("peek-a-bar").attr("id","__peek_a_bar_"+n),f("html").append(i.bar),i.bar.hide()}),o=function(){c(),d(),r(),l(),b(),u(),g(),h()},c=function(){i.bar.html(i.settings.html)},d=function(){i.settings.autohide&&setTimeout(function(){i.hide()},i.settings.delay)},r=function(){i.bar.css("padding",i.settings.padding)},l=function(){i.bar.css("background-color",i.settings.backgroundColor)},u=function(){null!==i.settings.cssClass&&i.bar.addClass(i.settings.cssClass)},b=function(){i.bar.css("opacity",i.settings.opacity)},g=function(){switch(i.settings.position){case"top":i.bar.css("top",0);break;case"bottom":i.bar.css("bottom",0);break;default:i.bar.css("top",0)}},h=function(){i.settings.closeOnClick&&i.bar.click(function(){i.hide()})};return i.settings=f.extend({},a,t),e(),o(),this}})(jQuery);
2
- //# sourceMappingURL=jquery.peekabar.min.js.map
1
+ /*!
2
+ * jQuery peekABar
3
+ * https://kunalnagarco.github.io/jquery.peekABar
4
+ *
5
+ * Copyright (c) 2019-2026 Kunal Nagar
6
+ * Released under the MIT License
7
+ * https://opensource.org/licenses/MIT
8
+ */(function(e){"use strict";let o=0;e.peekABar=function(n){let t=this;this.bar={},this.settings={},this._autohideTimer=null;let l={html:"Your Message Here",delay:3e3,autohide:!1,padding:"1em",backgroundColor:"rgb(195, 195, 195)",animation:{type:"slide",duration:"slow"},cssClass:null,opacity:"1",position:"top",closeOnClick:!1,onShow(){},onHide(){}},r=()=>{t.settings=e.extend(!0,{},l,n),d(),c()};this.show=s=>{s!==void 0&&s.html&&this.bar.html(s.html);const i=t.settings.animation.duration,a=()=>t.settings.onShow.call(t,s);switch(this.settings.animation.type){case"slide":this.bar.slideDown(i,a);break;case"fade":this.bar.css("opacity",0).show().animate({opacity:t.settings.opacity},i,a);break}this.settings.autohide&&(clearTimeout(this._autohideTimer),this._autohideTimer=setTimeout(()=>{t.hide()},this.settings.delay))},this.hide=()=>{const s=t.settings.animation.duration,i=()=>t.settings.onHide.call(t);switch(this.settings.animation.type){case"slide":this.bar.slideUp(s,i);break;case"fade":this.bar.animate({opacity:0},s,()=>{t.bar.hide(),i()});break}},this.destroy=()=>{clearTimeout(t._autohideTimer),t.bar.remove()};let d=()=>{const s=++o;t.bar=e("<div></div>").addClass("peek-a-bar").attr("id","__peek_a_bar_"+s),e("html").append(t.bar),t.bar.hide()},c=()=>{h(),p(),u(),g(),b(),m(),y()},h=()=>{t.bar.html(t.settings.html)},p=()=>{t.bar.css("padding",t.settings.padding)},u=()=>{t.bar.css("background-color",t.settings.backgroundColor)},b=()=>{t.settings.cssClass!==null&&t.bar.addClass(t.settings.cssClass)},g=()=>{t.bar.css("opacity",t.settings.opacity)},m=()=>{switch(t.settings.position){case"bottom":t.bar.css({bottom:0,top:""});break;case"top":default:t.bar.css({top:0,bottom:""})}},y=()=>{t.settings.closeOnClick&&t.bar.css("cursor","pointer").click(()=>{t.hide()})};return r(),this}})(jQuery);
9
+ //# sourceMappingURL=jquery.peekabar.min.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"jquery.peekabar.min.js","sources":["jquery.peekabar.js"],"names":["$","peekABar","options","_this","this","that","rand","parseInt","Math","random","defaults","bar","html","delay","autohide","settings","padding","backgroundColor","animation","type","duration","cssClass","opacity","position","closeOnClick","onShow","onHide","_create","show","args","undefined","slideDown","fadeIn","setTimeout","hide","call","slideUp","fadeOut","addClass","attr","append","_applyCustomSettings","_applyHTML","_applyAutohide","_applyPadding","_applyBackgroundColor","_applyOpacity","_applyCSSClass","_applyPosition","_applyCloseOnClick","css","click","extend","jQuery"],"mappings":"CAQWA,IAGTA,EAAEC,SAAW,SAAUC,GACrB,IAAIC,EAAQC,KACRC,EAAOD,KACTE,EAAOC,SAAyB,IAAhBC,KAAKC,OAAO,EAAe,CAAC,EAG1CC,GAFJN,KAAKO,IAAM,GAEI,CACbC,KAAM,oBACNC,MAAO,IACPC,SAAU,EAJZV,KAAKW,SAAW,IAKdC,QAAS,MACTC,gBAAiB,qBACjBC,UAAW,CACTC,KAAM,QACNC,SAAU,MACZ,EACAC,SAAU,KACVC,QAAS,IACTC,SAAU,MACVC,aAAc,CAAA,EACdC,OAAQ,aACRC,OAAQ,YACV,GAsCIC,GAhCJvB,KAAKwB,KAAO,SAAUC,GAMpB,OALaC,KAAAA,IAATD,GACEA,EAAKjB,MACPT,EAAMQ,IAAIC,KAAKiB,EAAKjB,IAAI,EAGpBT,EAAMY,SAASG,UAAUC,MAC/B,IAAK,QACHhB,EAAMQ,IAAIoB,UAAU1B,EAAKU,SAASG,UAAUE,QAAQ,EACpD,MACF,IAAK,OACHjB,EAAMQ,IAAIqB,OAAO3B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W7C,EAAKU,SAASO,OAAO,CAC/C,EACI0B,EAAiB,WACnB,OAAQ3C,EAAKU,SAASQ,UACpB,IAAK,MACHlB,EAAKM,IAAIuC,IAAI,MAAO,CAAC,EACrB,MACF,IAAK,SACH7C,EAAKM,IAAIuC,IAAI,SAAU,CAAC,EACxB,MACF,QACE7C,EAAKM,IAAIuC,IAAI,MAAO,CAAC,CACzB,CACF,EACID,EAAqB,WACnB5C,EAAKU,SAASS,cAChBnB,EAAKM,IAAIwC,MAAM,WACb9C,EAAK6B,KAAK,CACZ,CAAC,CAEL,EAEA,OA/FE7B,EAAKU,SAAWf,EAAEoD,OAAO,GAAI1C,EAAUR,CAAO,EAC9CyB,EAAQ,EACRc,EAAqB,EA6FhBrC,IACT,CACD,GAAEiD,MAAM"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/js/peekabar.js"],
4
+ "sourcesContent": ["/*!\n * jQuery peekABar\n * https://kunalnagarco.github.io/jquery.peekABar\n *\n * Copyright (c) 2019-2026 Kunal Nagar\n * Released under the MIT License\n * https://opensource.org/licenses/MIT\n */\n(function ($) {\n 'use strict';\n\n let _instanceCount = 0;\n\n $.peekABar = function (options) {\n let that = this;\n\n this.bar = {};\n this.settings = {};\n this._autohideTimer = null;\n\n let defaults = {\n html: 'Your Message Here',\n delay: 3000,\n autohide: false,\n padding: '1em',\n backgroundColor: 'rgb(195, 195, 195)',\n animation: {\n type: 'slide',\n duration: 'slow',\n },\n cssClass: null,\n opacity: '1',\n position: 'top',\n closeOnClick: false,\n\n onShow() {},\n onHide() {},\n };\n\n let init = () => {\n that.settings = $.extend(true, {}, defaults, options);\n _create();\n _applyCustomSettings();\n };\n\n this.show = (args) => {\n if (args !== undefined) {\n if (args.html) {\n this.bar.html(args.html);\n }\n }\n\n const duration = that.settings.animation.duration;\n const onShowDone = () => that.settings.onShow.call(that, args);\n\n switch (this.settings.animation.type) {\n case 'slide':\n this.bar.slideDown(duration, onShowDone);\n break;\n case 'fade':\n this.bar\n .css('opacity', 0)\n .show()\n .animate({ opacity: that.settings.opacity }, duration, onShowDone);\n break;\n }\n\n if (this.settings.autohide) {\n clearTimeout(this._autohideTimer);\n this._autohideTimer = setTimeout(() => {\n that.hide();\n }, this.settings.delay);\n }\n };\n\n this.hide = () => {\n const duration = that.settings.animation.duration;\n const onHideDone = () => that.settings.onHide.call(that);\n\n switch (this.settings.animation.type) {\n case 'slide':\n this.bar.slideUp(duration, onHideDone);\n break;\n case 'fade':\n this.bar.animate({ opacity: 0 }, duration, () => {\n that.bar.hide();\n onHideDone();\n });\n break;\n }\n };\n\n this.destroy = () => {\n clearTimeout(that._autohideTimer);\n that.bar.remove();\n };\n\n let _create = () => {\n const id = ++_instanceCount;\n that.bar = $('<div></div>')\n .addClass('peek-a-bar')\n .attr('id', '__peek_a_bar_' + id);\n $('html').append(that.bar);\n that.bar.hide();\n };\n\n let _applyCustomSettings = () => {\n _applyHTML();\n _applyPadding();\n _applyBackgroundColor();\n _applyOpacity();\n _applyCSSClass();\n _applyPosition();\n _applyCloseOnClick();\n };\n\n let _applyHTML = () => {\n that.bar.html(that.settings.html);\n };\n\n let _applyPadding = () => {\n that.bar.css('padding', that.settings.padding);\n };\n\n let _applyBackgroundColor = () => {\n that.bar.css('background-color', that.settings.backgroundColor);\n };\n\n let _applyCSSClass = () => {\n if (that.settings.cssClass !== null) {\n that.bar.addClass(that.settings.cssClass);\n }\n };\n\n let _applyOpacity = () => {\n that.bar.css('opacity', that.settings.opacity);\n };\n\n let _applyPosition = () => {\n switch (that.settings.position) {\n case 'bottom':\n that.bar.css({ bottom: 0, top: '' });\n break;\n case 'top':\n default:\n that.bar.css({ top: 0, bottom: '' });\n }\n };\n\n let _applyCloseOnClick = () => {\n if (that.settings.closeOnClick) {\n that.bar.css('cursor', 'pointer').click(() => {\n that.hide();\n });\n }\n };\n\n init();\n\n return this;\n };\n})(jQuery);\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQ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I,IAAI,SAAU,SAAS,EAAE,MAAM,IAAM,CAC5CA,EAAK,KAAK,CACZ,CAAC,CAEL,EAEA,OAAAE,EAAK,EAEE,IACT,CACF,GAAG,MAAM",
6
+ "names": ["$", "_instanceCount", "options", "that", "defaults", "init", "_create", "_applyCustomSettings", "args", "duration", "onShowDone", "onHideDone", "id", "_applyHTML", "_applyPadding", "_applyBackgroundColor", "_applyOpacity", "_applyCSSClass", "_applyPosition", "_applyCloseOnClick"]
7
+ }
package/package.json CHANGED
@@ -1,40 +1,34 @@
1
1
  {
2
2
  "name": "@kunalnagarco/jquery-peek-a-bar",
3
- "version": "4.0.25",
3
+ "version": "4.0.26",
4
4
  "description": "A jQuery plugin for a notification bar with a lot of customization options.",
5
5
  "main": "dist/js/jquery.peekabar.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
- "prebuild": "rm -rf build",
11
- "build": "grunt build",
10
+ "prebuild": "rm -rf dist",
11
+ "build": "npm run build:js && npm run build:css",
12
+ "build:js": "esbuild src/js/peekabar.js --platform=browser --outfile=dist/js/jquery.peekabar.js && esbuild src/js/peekabar.js --platform=browser --minify --sourcemap --outfile=dist/js/jquery.peekabar.min.js",
13
+ "build:css": "sass src/scss/peekabar.scss dist/css/jquery.peekabar.css && sass src/scss/peekabar.scss dist/css/jquery.peekabar.min.css --style=compressed --source-map",
14
+ "watch:js": "esbuild src/js/peekabar.js --platform=browser --minify --sourcemap --outfile=dist/js/jquery.peekabar.min.js --watch",
15
+ "watch:css": "sass --watch src/scss/peekabar.scss dist/css/jquery.peekabar.min.css --style=compressed --source-map",
12
16
  "release": "semantic-release"
13
17
  },
14
18
  "author": "Kunal Nagar <knlnagar@gmail.com>",
15
19
  "license": "MIT",
16
20
  "devDependencies": {
17
- "@babel/core": "7.28.5",
18
- "@babel/preset-env": "7.28.5",
19
21
  "@semantic-release/changelog": "6.0.3",
20
22
  "@semantic-release/commit-analyzer": "13.0.1",
21
23
  "@semantic-release/git": "10.0.1",
22
- "@semantic-release/github": "11.0.6",
23
- "@semantic-release/npm": "12.0.2",
24
+ "@semantic-release/github": "12.0.6",
25
+ "@semantic-release/npm": "13.1.5",
24
26
  "@semantic-release/release-notes-generator": "14.1.0",
25
27
  "conventional-changelog-conventionalcommits": "9.1.0",
26
- "grunt": "1.6.1",
27
- "grunt-babel": "8.0.0",
28
- "grunt-contrib-copy": "1.0.0",
29
- "grunt-contrib-cssmin": "5.0.0",
30
- "grunt-contrib-uglify": "5.2.2",
31
- "grunt-contrib-watch": "1.1.0",
32
- "grunt-sass": "*",
33
- "load-grunt-tasks": "5.1.0",
34
- "sass": "1.85.1",
28
+ "esbuild": "0.25.2",
35
29
  "prettier": "3.8.1",
36
- "semantic-release": "24.2.9",
37
- "time-grunt": "2.0.0"
30
+ "sass": "1.85.1",
31
+ "semantic-release": "25.0.3"
38
32
  },
39
33
  "keywords": [
40
34
  "jquery-plugin",