tiny-essentials 1.18.0 → 1.19.0

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.
Files changed (93) hide show
  1. package/README.md +17 -3
  2. package/dist/legacy/get/countObj.cjs +2 -2
  3. package/dist/legacy/get/countObj.d.mts +1 -1
  4. package/dist/legacy/get/countObj.mjs +1 -1
  5. package/dist/legacy/index.cjs +2 -1
  6. package/dist/node_modules/firebase-functions/lib/common/trace.cjs +0 -1
  7. package/dist/node_modules/firebase-functions/lib/logger/index.cjs +1 -0
  8. package/dist/v1/ColorSafeStringify.min.js +1 -1
  9. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  10. package/dist/v1/TinyBasicsEs.js +402 -390
  11. package/dist/v1/TinyBasicsEs.min.js +1 -1
  12. package/dist/v1/TinyClipboard.min.js +1 -1
  13. package/dist/v1/TinyColorConverter.js +617 -0
  14. package/dist/v1/TinyColorConverter.min.js +1 -0
  15. package/dist/v1/TinyDomReadyManager.min.js +1 -1
  16. package/dist/v1/TinyDragger.js +6 -2433
  17. package/dist/v1/TinyDragger.min.js +1 -2
  18. package/dist/v1/TinyEssentials.js +3546 -1388
  19. package/dist/v1/TinyEssentials.min.js +1 -1
  20. package/dist/v1/TinyEvents.js +402 -0
  21. package/dist/v1/TinyEvents.min.js +1 -0
  22. package/dist/v1/TinyHtml.min.js +1 -1
  23. package/dist/v1/TinyLocalStorage.js +1292 -0
  24. package/dist/v1/TinyLocalStorage.min.js +1 -0
  25. package/dist/v1/TinyNotifications.min.js +1 -1
  26. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  27. package/dist/v1/TinyPromiseQueue.min.js +1 -1
  28. package/dist/v1/TinyRateLimiter.js +2 -1
  29. package/dist/v1/TinyRateLimiter.min.js +1 -1
  30. package/dist/v1/TinySmartScroller.js +570 -52
  31. package/dist/v1/TinySmartScroller.min.js +1 -1
  32. package/dist/v1/TinyTextRangeEditor.min.js +1 -1
  33. package/dist/v1/TinyTimeout.js +233 -0
  34. package/dist/v1/TinyTimeout.min.js +1 -0
  35. package/dist/v1/TinyToastNotify.min.js +1 -1
  36. package/dist/v1/TinyUploadClicker.js +2087 -1129
  37. package/dist/v1/TinyUploadClicker.min.js +1 -1
  38. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  39. package/dist/v1/basics/html.cjs +16 -9
  40. package/dist/v1/basics/html.d.mts +12 -4
  41. package/dist/v1/basics/html.mjs +14 -7
  42. package/dist/v1/basics/index.cjs +3 -2
  43. package/dist/v1/basics/index.d.mts +2 -2
  44. package/dist/v1/basics/index.mjs +2 -1
  45. package/dist/v1/basics/objChecker.cjs +46 -0
  46. package/dist/v1/basics/objChecker.d.mts +29 -0
  47. package/dist/v1/basics/objChecker.mjs +45 -0
  48. package/dist/v1/basics/objFilter.cjs +4 -45
  49. package/dist/v1/basics/objFilter.d.mts +3 -28
  50. package/dist/v1/basics/objFilter.mjs +2 -45
  51. package/dist/v1/build/TinyColorConverter.cjs +7 -0
  52. package/dist/v1/build/TinyColorConverter.d.mts +3 -0
  53. package/dist/v1/build/TinyColorConverter.mjs +2 -0
  54. package/dist/v1/build/TinyEvents.cjs +7 -0
  55. package/dist/v1/build/TinyEvents.d.mts +3 -0
  56. package/dist/v1/build/TinyEvents.mjs +2 -0
  57. package/dist/v1/build/TinyLocalStorage.cjs +7 -0
  58. package/dist/v1/build/TinyLocalStorage.d.mts +3 -0
  59. package/dist/v1/build/TinyLocalStorage.mjs +2 -0
  60. package/dist/v1/build/TinyTimeout.cjs +7 -0
  61. package/dist/v1/build/TinyTimeout.d.mts +3 -0
  62. package/dist/v1/build/TinyTimeout.mjs +2 -0
  63. package/dist/v1/index.cjs +11 -2
  64. package/dist/v1/index.d.mts +7 -3
  65. package/dist/v1/index.mjs +7 -2
  66. package/dist/v1/libs/TinyColorConverter.cjs +578 -0
  67. package/dist/v1/libs/TinyColorConverter.d.mts +396 -0
  68. package/dist/v1/libs/TinyColorConverter.mjs +520 -0
  69. package/dist/v1/libs/TinyDragger.cjs +3 -3
  70. package/dist/v1/libs/TinyDragger.mjs +1 -1
  71. package/dist/v1/libs/TinyEvents.cjs +363 -0
  72. package/dist/v1/libs/TinyEvents.d.mts +160 -0
  73. package/dist/v1/libs/TinyEvents.mjs +328 -0
  74. package/dist/v1/libs/TinyLocalStorage.cjs +847 -0
  75. package/dist/v1/libs/TinyLocalStorage.d.mts +407 -0
  76. package/dist/v1/libs/TinyLocalStorage.mjs +740 -0
  77. package/dist/v1/libs/TinySmartScroller.cjs +207 -52
  78. package/dist/v1/libs/TinySmartScroller.d.mts +164 -16
  79. package/dist/v1/libs/TinySmartScroller.mjs +181 -52
  80. package/dist/v1/libs/TinyTimeout.cjs +194 -0
  81. package/dist/v1/libs/TinyTimeout.d.mts +89 -0
  82. package/dist/v1/libs/TinyTimeout.mjs +179 -0
  83. package/dist/v1/libs/TinyUploadClicker.cjs +6 -4
  84. package/docs/v1/README.md +5 -0
  85. package/docs/v1/basics/objChecker.md +47 -0
  86. package/docs/v1/basics/objFilter.md +0 -40
  87. package/docs/v1/libs/TinyColorConverter.md +220 -0
  88. package/docs/v1/libs/TinyEvents.md +199 -0
  89. package/docs/v1/libs/TinyLocalStorage.md +350 -0
  90. package/docs/v1/libs/TinyRateLimiter.md +0 -3
  91. package/docs/v1/libs/TinyTimeout.md +190 -0
  92. package/package.json +28 -5
  93. package/dist/v1/TinyDragger.min.js.LICENSE.txt +0 -8
package/README.md CHANGED
@@ -70,6 +70,14 @@ Check out the full documentation here:
70
70
 
71
71
  ---
72
72
 
73
+ ### 🔧 Recommended Tool: **JsStore**
74
+
75
+ Although not part of Tiny Essentials, we recommend using [**JsStore**](https://www.npmjs.com/package/jsstore) if you're looking for a well-maintained and developer-friendly solution to interact with **IndexedDB** using SQL-like syntax.
76
+
77
+ > 💬 *This is a personal recommendation. This project is not sponsored or affiliated with JsStore.*
78
+
79
+ ---
80
+
73
81
  ## 🤝 Contributions
74
82
 
75
83
  Feel free to fork, contribute, and create pull requests for improvements! Whether it's a bug fix or an additional feature, contributions are always welcome.
@@ -78,11 +86,17 @@ Feel free to fork, contribute, and create pull requests for improvements! Whethe
78
86
 
79
87
  This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
80
88
 
81
- ---
82
-
83
89
  ### 💡 Credits
84
90
 
85
91
  This project was inspired by the need for lightweight, reusable code that can be used across many different kinds of applications. Contributions and suggestions are always appreciated!
86
92
 
87
93
  > 🧠 **Note**: This documentation was written by [ChatGPT](https://openai.com/chatgpt), an AI assistant developed by OpenAI, based on the project structure and descriptions provided by the repository author.
88
- > If you find any inaccuracies or need improvements, feel free to contribute or open an issue!
94
+ > If you find any inaccuracies or need improvements, feel free to contribute or open an issue!
95
+
96
+ ---
97
+
98
+ <div align="center">
99
+ <a href="./test/img/"><img src="./test/img/5ec92aff-7a9d-4b86-bcc3-fe715def537a.png" height="300" /></a>
100
+ <br/>
101
+ Made with tiny love!
102
+ </div>
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var objFilter = require('../../v1/basics/objFilter.cjs');
3
+ var objChecker = require('../../v1/basics/objChecker.cjs');
4
4
 
5
5
 
6
6
 
7
- module.exports = objFilter.countObj;
7
+ module.exports = objChecker.countObj;
@@ -1,3 +1,3 @@
1
1
  export default countObj;
2
- import { countObj } from '../../v1/basics/objFilter.mjs';
2
+ import { countObj } from '../../v1/basics/objChecker.mjs';
3
3
  //# sourceMappingURL=countObj.d.mts.map
@@ -1,2 +1,2 @@
1
- import { countObj } from '../../v1/basics/objFilter.mjs';
1
+ import { countObj } from '../../v1/basics/objChecker.mjs';
2
2
  export default countObj;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var objChecker = require('../v1/basics/objChecker.cjs');
3
4
  var objFilter = require('../v1/basics/objFilter.cjs');
4
5
  var super_string_filter = require('./get/super_string_filter.cjs');
5
6
  var auth = require('./http/auth.cjs');
@@ -50,7 +51,7 @@ const legacyModules = {
50
51
  getObjType: objFilter.objType,
51
52
 
52
53
  // Count Obj
53
- countObj: objFilter.countObj,
54
+ countObj: objChecker.countObj,
54
55
 
55
56
  // HTTP Auth Generator
56
57
  httpAuth: auth,
@@ -11,7 +11,6 @@ function requireTrace () {
11
11
  Object.defineProperty(trace.__exports, "__esModule", { value: true });
12
12
  trace.__exports.extractTraceContext = trace.__exports.traceContext = void 0;
13
13
  const async_hooks_1 = require$$0;
14
- /* @internal */
15
14
  trace.__exports.traceContext = new async_hooks_1.AsyncLocalStorage();
16
15
  /**
17
16
  * A regex to match the Cloud Trace header.
@@ -66,6 +66,7 @@ function requireLogger () {
66
66
  returnObj[k] = removeCircular(obj[k], refs);
67
67
  }
68
68
  }
69
+ refs.pop();
69
70
  return returnObj;
70
71
  }
71
72
  /**
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},r={};e.d(r,{ColorSafeStringify:()=>s});class t{#e;static#r={default:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},solarized:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},monokai:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""}};constructor(e={}){this.#e={...t.#r.default,...e}}#t(e,r){const t=[];e=(e=(e=e.replace(/(?<!")\b(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b(?!")/g,`${r.number}$1${r.reset}`)).replace(/"([^"]+)":/g,((e,r)=>{const s=`___KEY${t.length}___`;return t.push({marker:s,key:r}),`${s}:`}))).replace(/"(?:\\.|[^"\\])*?"/g,(e=>{const t=e.slice(1,-1);return/^(https?|ftp):\/\/[^\s]+$/i.test(t)?`${r.string_url}${e}${r.reset}`:/^(true|false|null)$/.test(t)?`${r.string_bool}${e}${r.reset}`:/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(t)?`${r.string_number}${e}${r.reset}`:`${r.string}${e}${r.reset}`}));for(const{marker:s,key:o}of t){const t=new RegExp(s,"g");e=e.replace(t,`${r.key}"${o}"${r.reset}`)}return(e=(e=(e=(e=e.replace(/(?<!")\b(true|false)\b(?!")/g,`${r.boolean}$1${r.reset}`)).replace(/(?<!")\bnull\b(?!")/g,`${r.null}null${r.reset}`)).replace(/\[Circular\]/g,`${r.special}[Circular]${r.reset}`)).replace(/\[undefined\]/g,`${r.special}[undefined]${r.reset}`)).replace(/"function.*?[^\\]"/gs,`${r.func}$&${r.reset}`)}colorize(e,r={}){const t={...this.#e,...r};return this.#t(e,t)}getColors(){return{...this.#e}}updateColors(e){Object.assign(this.#e,e)}resetColors(){this.#e={...t.#r.default}}loadColorPreset(e){const r=t.#r[e];if(!r)throw new Error(`Preset "${e}" not found.`);this.#e={...r}}saveColorPreset(e,r){t.#r[e]={...r}}getAvailablePresets(){return Object.keys(t.#r)}}const s=t;window.ColorSafeStringify=r.ColorSafeStringify})();
1
+ (()=>{"use strict";var e={d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},r={};e.d(r,{ColorSafeStringify:()=>s});class t{#e;static#r={default:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},solarized:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""},monokai:{reset:"",key:"",string:"",string_url:"",string_bool:"",string_number:"",number:"",boolean:"",null:"",special:"",func:""}};constructor(e={}){this.#e={...t.#r.default,...e}}#t(e,r){const t=[];e=(e=(e=e.replace(/(?<!")\b(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b(?!")/g,`${r.number}$1${r.reset}`)).replace(/"([^"]+)":/g,(e,r)=>{const s=`___KEY${t.length}___`;return t.push({marker:s,key:r}),`${s}:`})).replace(/"(?:\\.|[^"\\])*?"/g,e=>{const t=e.slice(1,-1);return/^(https?|ftp):\/\/[^\s]+$/i.test(t)?`${r.string_url}${e}${r.reset}`:/^(true|false|null)$/.test(t)?`${r.string_bool}${e}${r.reset}`:/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(t)?`${r.string_number}${e}${r.reset}`:`${r.string}${e}${r.reset}`});for(const{marker:s,key:o}of t){const t=new RegExp(s,"g");e=e.replace(t,`${r.key}"${o}"${r.reset}`)}return(e=(e=(e=(e=e.replace(/(?<!")\b(true|false)\b(?!")/g,`${r.boolean}$1${r.reset}`)).replace(/(?<!")\bnull\b(?!")/g,`${r.null}null${r.reset}`)).replace(/\[Circular\]/g,`${r.special}[Circular]${r.reset}`)).replace(/\[undefined\]/g,`${r.special}[undefined]${r.reset}`)).replace(/"function.*?[^\\]"/gs,`${r.func}$&${r.reset}`)}colorize(e,r={}){const t={...this.#e,...r};return this.#t(e,t)}getColors(){return{...this.#e}}updateColors(e){Object.assign(this.#e,e)}resetColors(){this.#e={...t.#r.default}}loadColorPreset(e){const r=t.#r[e];if(!r)throw new Error(`Preset "${e}" not found.`);this.#e={...r}}saveColorPreset(e,r){t.#r[e]={...r}}getAvailablePresets(){return Object.keys(t.#r)}}const s=t;window.ColorSafeStringify=r.ColorSafeStringify})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{TinyAfterScrollWatcher:()=>r});const r=class{#e;#t=null;#r=[];#i=100;#o=new Set;#n=new Set;#s=!1;constructor(e=window,t=100){if(!(e instanceof Element||e instanceof Window))throw new TypeError("scrollTarget must be an Element or the Window object.");this.#e=e,this._checkTimer=this._checkTimer.bind(this),this.#e.addEventListener("scroll",this._checkTimer),this.#i=t}_checkTimer=()=>{this.#t&&clearTimeout(this.#t),this.#t=setTimeout((()=>{this.#t=null,this.#l()}),this.#i)};get inactivityTime(){return this.#i}set inactivityTime(e){if("number"!=typeof e||e<=0||!Number.isFinite(e))throw new Error("inactivityTime must be a positive number in milliseconds.");this.#i=e}#l(){if(!this.#s){for(const e of this.#n)"function"==typeof e&&e();for(;this.#r.length;){const e=this.#r.pop();"function"==typeof e&&e()}}}doAfterScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.lastScrollTime=Date.now(),this.#r.push(e)}onStop(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.add(e)}offStop(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.delete(e)}onScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#e.addEventListener("scroll",e),this.#o.add(e)}offScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#o.has(e)&&(this.#e.removeEventListener("scroll",e),this.#o.delete(e))}destroy(){if(!this.#s){this.#s=!0,this.#e.removeEventListener("scroll",this._checkTimer);for(const e of this.#o)this.#e.removeEventListener("scroll",e);this.#o.clear(),this.#n.clear()}}};window.TinyAfterScrollWatcher=t.TinyAfterScrollWatcher})();
1
+ (()=>{"use strict";var e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{TinyAfterScrollWatcher:()=>r});const r=class{#e;#t=null;#r=[];#i=100;#o=new Set;#n=new Set;#s=!1;constructor(e=window,t=100){if(!(e instanceof Element||e instanceof Window))throw new TypeError("scrollTarget must be an Element or the Window object.");this.#e=e,this._checkTimer=this._checkTimer.bind(this),this.#e.addEventListener("scroll",this._checkTimer),this.#i=t}_checkTimer=()=>{this.#t&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null,this.#l()},this.#i)};get inactivityTime(){return this.#i}set inactivityTime(e){if("number"!=typeof e||e<=0||!Number.isFinite(e))throw new Error("inactivityTime must be a positive number in milliseconds.");this.#i=e}#l(){if(!this.#s){for(const e of this.#n)"function"==typeof e&&e();for(;this.#r.length;){const e=this.#r.pop();"function"==typeof e&&e()}}}doAfterScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.lastScrollTime=Date.now(),this.#r.push(e)}onStop(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.add(e)}offStop(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#n.delete(e)}onScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#e.addEventListener("scroll",e),this.#o.add(e)}offScroll(e){if("function"!=typeof e)throw new TypeError("Argument must be a function.");this.#o.has(e)&&(this.#e.removeEventListener("scroll",e),this.#o.delete(e))}destroy(){if(!this.#s){this.#s=!0,this.#e.removeEventListener("scroll",this._checkTimer);for(const e of this.#o)this.#e.removeEventListener("scroll",e);this.#o.clear(),this.#n.clear()}}};window.TinyAfterScrollWatcher=t.TinyAfterScrollWatcher})();