newhelper-js 2.1.4 → 2.1.5
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/LICENSE +24 -24
- package/README-en.md +27 -27
- package/README.md +33 -28
- package/docs.md +283 -283
- package/history.md +31 -31
- package/newHelper.js +1041 -1041
- package/package.json +45 -45
package/LICENSE
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
BSD 2-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026, MIOBOMB
|
|
4
|
-
|
|
5
|
-
Redistribution and use in source and binary forms, with or without
|
|
6
|
-
modification, are permitted provided that the following conditions are met:
|
|
7
|
-
|
|
8
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
-
list of conditions and the following disclaimer.
|
|
10
|
-
|
|
11
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
-
this list of conditions and the following disclaimer in the documentation
|
|
13
|
-
and/or other materials provided with the distribution.
|
|
14
|
-
|
|
15
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, MIOBOMB
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README-en.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# newHelper.js
|
|
2
|
-
- [русская версия](README.md)
|
|
3
|
-
- A library for creating ultra-lightweight yet highly functional admin panels, one of the best examples of Object Hub. The total bundle of the entire site is only 280 kb of pure code, and the internal admin panel with all HTML+CSS+JS weighs only 25 kilobytes (with gzip, the size is even smaller). I try to keep the library in a "Modular Monolith" state.
|
|
4
|
-
Current version - 2.1, with good documentation in the code
|
|
5
|
-
## Included modules:
|
|
6
|
-
- Advanced window engine (resize, fullscreen, taskbar, 6.29 KB)
|
|
7
|
-
- Convenient hotkeys (press/release callbacks, 1.16 KB)
|
|
8
|
-
- Router (1.48 KB)
|
|
9
|
-
- Ultra-light i18n analog (1.30 KB)
|
|
10
|
-
- Custom lazy-load (0.97 KB)
|
|
11
|
-
- Error catching module (0.54 KB)
|
|
12
|
-
- Simple HTTP client with file upload progress (0.82 KB)
|
|
13
|
-
- DOM helpers (0.61 KB)
|
|
14
|
-
- Storage isolation (0.31 KB)
|
|
15
|
-
|
|
16
|
-
## Features
|
|
17
|
-
- The library uses a classic connection with a script tag and requires no bundlers/compilers. But if you really want to, you can configure it, but why? It's the assembly language of the web world.
|
|
18
|
-
- Dependencies? Nope, it's vanilla ES6.
|
|
19
|
-
- The library size mentioned at the beginning is the size of the source code, so minification + gzip will reduce the size even further.
|
|
20
|
-
- Due to the minimalistic code, you can freely override any built-in method to suit your needs. In extreme cases, you can resort to modifying the library's code, but we don't recommend this if you plan to update to the latest versions.
|
|
21
|
-
- All the code is written inside a single "_" and uses only three global event listeners. Because of this, conflicts with other libraries are minimal. If you're willing, you can try running newHelper alongside jQuery, or if you really want reactivity, try it in combination with ultra-light reactive frameworks (the only decent one I know of is alpine.js).
|
|
22
|
-
- If you're a follower of "14-kilobyte sites," you can safely run the library through a minifier. The minified code of the library shouldn't weigh more than 5 kilobytes, and if you discard modules you don't need, even less (for example, the window engine code makes up approximately 50% of the entire library code; if you don't need the window engine, you're left with a 2-kilobyte gzip core).
|
|
23
|
-
- If you learn to use lazy loading properly, your already lightweight sites will become many times lighter (for instance, the initial traffic of Object Hub decreased from 330kb to 180kb at startup due to splitting everything into lazyload modules).
|
|
24
|
-
- A couple of my sites not related to admin panels are based on this library - GDPS Helper (a catalog of private Geometry Dash servers, but it also has an admin panel for demon lists), Object Hub (a wiki-engine-like catalog and HR platform for the OSC community; the wiki engine heavily uses windows instead of MediaWiki crutches). If you want, you can not only assemble an admin panel in 2 hours but also write a mega-site in a couple of weeks.
|
|
25
|
-
- The library was born 3 years ago as an internal tool for the GDPS Helper website. It evolved due to my disdain for the heaviness of React. Later, the GDPS Helper source code became the foundation for Object Hub, during the development of which the window engine, hotkeys, and more powerful lazy loading appeared.
|
|
26
|
-
- As a developer, I try to follow the Unix philosophy. For example, simplicity over complexity - there are only 600 lines of code. Or modularity - even though my modules are slightly interconnected, each module is responsible for its own thing.
|
|
27
|
-
- Continuing the previous point, you can use newHelper.js anywhere and everywhere. Its application is limited only by your imagination. Want to make a cool admin panel? The library is aimed at that. Want to write a full-fledged web forum? If you still remember GDPS Helper or Object Hub, it's entirely possible. Want to write your own frontend for the Yandex API? If you have a lot of time, please go ahead.
|
|
1
|
+
# newHelper.js
|
|
2
|
+
- [русская версия](README.md)
|
|
3
|
+
- A library for creating ultra-lightweight yet highly functional admin panels, one of the best examples of Object Hub. The total bundle of the entire site is only 280 kb of pure code, and the internal admin panel with all HTML+CSS+JS weighs only 25 kilobytes (with gzip, the size is even smaller). I try to keep the library in a "Modular Monolith" state.
|
|
4
|
+
Current version - 2.1, with good documentation in the code
|
|
5
|
+
## Included modules:
|
|
6
|
+
- Advanced window engine (resize, fullscreen, taskbar, 6.29 KB)
|
|
7
|
+
- Convenient hotkeys (press/release callbacks, 1.16 KB)
|
|
8
|
+
- Router (1.48 KB)
|
|
9
|
+
- Ultra-light i18n analog (1.30 KB)
|
|
10
|
+
- Custom lazy-load (0.97 KB)
|
|
11
|
+
- Error catching module (0.54 KB)
|
|
12
|
+
- Simple HTTP client with file upload progress (0.82 KB)
|
|
13
|
+
- DOM helpers (0.61 KB)
|
|
14
|
+
- Storage isolation (0.31 KB)
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
- The library uses a classic connection with a script tag and requires no bundlers/compilers. But if you really want to, you can configure it, but why? It's the assembly language of the web world.
|
|
18
|
+
- Dependencies? Nope, it's vanilla ES6.
|
|
19
|
+
- The library size mentioned at the beginning is the size of the source code, so minification + gzip will reduce the size even further.
|
|
20
|
+
- Due to the minimalistic code, you can freely override any built-in method to suit your needs. In extreme cases, you can resort to modifying the library's code, but we don't recommend this if you plan to update to the latest versions.
|
|
21
|
+
- All the code is written inside a single "_" and uses only three global event listeners. Because of this, conflicts with other libraries are minimal. If you're willing, you can try running newHelper alongside jQuery, or if you really want reactivity, try it in combination with ultra-light reactive frameworks (the only decent one I know of is alpine.js).
|
|
22
|
+
- If you're a follower of "14-kilobyte sites," you can safely run the library through a minifier. The minified code of the library shouldn't weigh more than 5 kilobytes, and if you discard modules you don't need, even less (for example, the window engine code makes up approximately 50% of the entire library code; if you don't need the window engine, you're left with a 2-kilobyte gzip core).
|
|
23
|
+
- If you learn to use lazy loading properly, your already lightweight sites will become many times lighter (for instance, the initial traffic of Object Hub decreased from 330kb to 180kb at startup due to splitting everything into lazyload modules).
|
|
24
|
+
- A couple of my sites not related to admin panels are based on this library - GDPS Helper (a catalog of private Geometry Dash servers, but it also has an admin panel for demon lists), Object Hub (a wiki-engine-like catalog and HR platform for the OSC community; the wiki engine heavily uses windows instead of MediaWiki crutches). If you want, you can not only assemble an admin panel in 2 hours but also write a mega-site in a couple of weeks.
|
|
25
|
+
- The library was born 3 years ago as an internal tool for the GDPS Helper website. It evolved due to my disdain for the heaviness of React. Later, the GDPS Helper source code became the foundation for Object Hub, during the development of which the window engine, hotkeys, and more powerful lazy loading appeared.
|
|
26
|
+
- As a developer, I try to follow the Unix philosophy. For example, simplicity over complexity - there are only 600 lines of code. Or modularity - even though my modules are slightly interconnected, each module is responsible for its own thing.
|
|
27
|
+
- Continuing the previous point, you can use newHelper.js anywhere and everywhere. Its application is limited only by your imagination. Want to make a cool admin panel? The library is aimed at that. Want to write a full-fledged web forum? If you still remember GDPS Helper or Object Hub, it's entirely possible. Want to write your own frontend for the Yandex API? If you have a lot of time, please go ahead.
|
package/README.md
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
# newHelper.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
1
|
+
# newHelper.js
|
|
2
|
+
Наш дискорд сервер!
|
|
3
|
+
Our discord server!
|
|
4
|
+
https://discord.gg/zetb62mqsS (newHelper.js dev)
|
|
5
|
+
Сейчас передо мной стоит вопрос - делать ли движок плагинов? и если делать выносить движок окон в внешний плагин?
|
|
6
|
+
|
|
7
|
+
- [english version](README-en.md)
|
|
8
|
+
- [документация](docs.md)
|
|
9
|
+
- Библиотека для создания сверхлёгких но очень функциональных админ панелей, один из лучших примеров Object hub, Общий бандл всего сайта составляет всего 280 кб чистого кода, внутренная админ панель со всем html+css+js весит всего 25 килобайт (при gzip размер ещё ниже). Я стараюсь придерживать библиотеку в состоянии "Модульного монолита".
|
|
10
|
+
Текущая версия - 2.1.2, с хорошей документацией в коде
|
|
11
|
+
## Модули в комплекте
|
|
12
|
+
- Широкий движок окон (ресайз, разворот на весь экран, taskbar, 6.29 кб)
|
|
13
|
+
- Удобные горячие клавиши (press/release колбеки, 1.16 кб)
|
|
14
|
+
- Роутер (1.48 кб)
|
|
15
|
+
- Ультралёгкий аналог i18n (1.30 кб)
|
|
16
|
+
- Самописный lazy-load (0.97 кб)
|
|
17
|
+
- Модуль отлова ошибок (0.54 кб)
|
|
18
|
+
- Простой http клиент с прогрессом загрузки файлов (0.82 кб)
|
|
19
|
+
- DOM-хелперы (0.61 кб)
|
|
20
|
+
- Изоляция над Storage (0.31 кб)
|
|
21
|
+
|
|
22
|
+
## Особенности
|
|
23
|
+
- Библиотека использует классическое подключение с тегом script и не требует никаких сборщиков/компиляторов. Но если очень хочется вы можете настроить его, но зачем? это же ассемблер из мира веб
|
|
24
|
+
- Зависимости? неа, это ванильный ES8
|
|
25
|
+
- Указанный в начале размер библиотеки является размером исходного кода, так что минификация+gzip уменьшат размер ещё сильнее
|
|
26
|
+
- Из-за минималистичности кода вы можете спокойно переопределить любой встроенный метод под свои нужны. В крайнем случае можно прибегнуть к модификации кода библиотеки, но такое мы не рекомендуем делать в случае если вы собираетесь обновляться до самых последних версий
|
|
27
|
+
- Весь код написан внутри одного "_" и использованием всего трёх глобальных читателей событий. Из-за этого конфликты с остальными библиотеками минимальны, если вы готовы то можете пробовать запустить newHelper вместе с jQuery или если вы очень хотите реактивность то пробуйте в связке с ультралёгкими реактивными фреймворками (у меня на слуху из адекватных alpine.js)
|
|
28
|
+
- Если вы последователь "14 килобайтных сайтов" то можете смело прогнать библиотеку через минификатор, минифицированный код библиотеки не должен весить больше 5 килобайт, а если отбросить ненужные вам модули и то меньше (например код движка окон составляет приблизительно 50% всего кода библиотеки, если вам не нужен движок окон - оставляйте 2 килобайта gzip-ядра)
|
|
29
|
+
- Если вы научитесь грамотно использовать ленивую загрузку, то ваши и без того лёгкие сайты станут в разы легче (тот же стартовый трафик Object Hub уменьшился 330кб до 180кб при старте из-за разбития всего на lazyload модули)
|
|
30
|
+
- На базе этой библиотеки работает парочка моих сайтов не связанных с админ панелями - GDPS Helper (каталог приватных серверов geometry dash, но там тоже идёт админка для демонлистов), Object hub (каталог с элементами вики движка и hr-платформы для OSC сообщества, вики движок во всю использует окна вместо костылей mediawiki). Если захотеть можно не только админку за 2 часа собрать, но и написать мегасайт за пару недель
|
|
31
|
+
- Библиотека родилась 3 года назад как внутренний инструмент веб сайта GDPS Helper, развивалась она из-за презрения к тяжеловесности react, позже исходный код GDPS Helper стал основоположником Object Hub, в процессе развития которого как раз таки и появились движок окон, горячих клавиш, и более мощная ленивая загрузка
|
|
32
|
+
- Я как разработчик стараюсь следовать философии Unix систем, как пример простота превыше сложности - в коде всего 600 строк кода, или модульность, пусть у меня модули и чуть чуть связаны но каждый модуль отвечает за свою вещь
|
|
33
|
+
- Продолжая прошлый пункт, вы можете использовать newHelper.js везде и всюду, его применение ограничено лишь вашей фантазией, хотите сделать классную админку? либа на это и целится. хотите написать полноценный веб форум? если вы ещё помните GDPS Helper или Object hub это вполне возможно. хотите написать свой фронтенд к Яндекс API? если у вас много времени пожалуйста
|