tiny-essentials 1.21.0 → 1.21.2

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.
@@ -0,0 +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,{TinyNeedBar:()=>i});class r{#e=new Map;#t;#r;#i;get factors(){const e={};for(let[t,r]of this.#e.entries())e[t]={...r};return e}get currentPercent(){return this.#r/this.#t*100}set maxValue(e){if("number"!=typeof e||Number.isNaN(e)||e<=0)throw new TypeError("maxValue must be a positive number.");this.#t=e,this.#r=Math.min(this.#r,e)}get maxValue(){return this.#t}get currentValue(){return this.#r}set infiniteValue(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("infiniteValue must be a number.");this.#i=e,this.#r=Math.max(0,e),this.#r=Math.min(this.#r,this.#t)}get infiniteValue(){return this.#i}constructor(e=100,t=1,r=1){if("number"!=typeof e||Number.isNaN(e)||e<=0)throw new TypeError("maxValue must be a positive number.");this.#t=e,this.setFactor("main",t,r),this.#r=e,this.#i=e}getFactor(e){if("string"!=typeof e||!e)throw new TypeError("Key must be a non-empty string.");const t=this.#e.get(e);if(!t)throw new Error(`Factor with key "${e}" not found.`);return{...t}}hasFactor(e){if("string"!=typeof e||!e)throw new TypeError("Key must be a non-empty string.");return this.#e.has(e)}setFactor(e,t,r=1){if("string"!=typeof e||!e)throw new TypeError("Key must be a non-empty string.");if("number"!=typeof t||Number.isNaN(t))throw new TypeError("Amount must be a valid number.");if("number"!=typeof r||Number.isNaN(r))throw new TypeError("Multiplier must be a valid number.");this.#e.set(e,{amount:t,multiplier:r})}removeFactor(e){if("string"!=typeof e||!e)throw new TypeError("Key must be a non-empty string.");return this.#e.delete(e)}#n(e){const t=this.#i;return this.#i-=e,this.#r=Math.max(0,this.#r-e),{prevValue:t,removedTotal:e,removedPercent:e/this.#t*100,currentPercent:this.currentPercent,remainingValue:this.#r,infiniteRemaining:this.#i}}tick(){let e=0;for(let[t,r]of this.#e.entries())e+=r.amount*r.multiplier;return this.#n(e)}tickWithTempFactor(e){if("object"!=typeof e||null===e)throw new TypeError("You must provide a valid factor object.");if("number"!=typeof e.amount||Number.isNaN(e.amount))throw new TypeError('Temp factor "amount" must be a valid number.');if("multiplier"in e&&("number"!=typeof e.multiplier||Number.isNaN(e.multiplier)))throw new TypeError('Temp factor "multiplier" must be a valid number if provided.');let t=0;for(let[e,r]of this.#e.entries())t+=r.amount*r.multiplier;return e&&(t+=e.amount*(e.multiplier??1)),this.#n(t)}tickSingleFactor(e){if("object"!=typeof e||null===e)throw new TypeError("You must provide a valid factor object.");if("number"!=typeof e.amount||Number.isNaN(e.amount))throw new TypeError('Temp factor "amount" must be a valid number.');if("multiplier"in e&&("number"!=typeof e.multiplier||Number.isNaN(e.multiplier)))throw new TypeError('Temp factor "multiplier" must be a valid number if provided.');if(!e)throw new Error("You must provide a factor to apply.");const t=e.amount*(e.multiplier??1);return this.#n(t)}toJSON(){return{maxValue:this.#t,currentValue:this.#r,infiniteValue:this.#i,factors:this.factors}}static fromJSON(e){const t=new r(e.maxValue,0,0);t.infiniteValue=e.infiniteValue,t.#e.clear();for(const[r,i]of Object.entries(e.factors))t.setFactor(r,i.amount,i.multiplier);return t}clone(){return r.fromJSON(this.toJSON())}clearFactors(){this.#e.clear()}}const i=r;window.TinyNeedBar=t.TinyNeedBar})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={d:(r,o)=>{for(var a in o)e.o(o,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:o[a]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},r={};e.d(r,{TinySimpleDice:()=>o});const o=class{static rollArrayIndex(e){const r=Array.isArray(e),o=e instanceof Set;if(!r&&!o)throw new TypeError("rollArrayIndex expects an array or Set.");return Math.floor(Math.random()*(r?e.length:e.size))}#e;#r;get maxValue(){return this.#e}set maxValue(e){if(!Number.isInteger(e)||e<0)throw new TypeError("maxValue must be an integer greater than -1.");this.#e=e}get allowZero(){return this.#r}set allowZero(e){if("boolean"!=typeof e)throw new TypeError("allowZero must be a boolean.");this.#r=e}constructor({maxValue:e,allowZero:r=!0}){if("boolean"!=typeof r)throw new TypeError("allowZero must be an boolean.");if(!Number.isInteger(e)||e<0)throw new TypeError("maxValue must be an integer greater than -1.");this.#e=e,this.#r=r}roll(){const e=this.#r?0:1;return Math.floor(Math.random()*(this.#e-e+1))+e}};window.TinySimpleDice=r.TinySimpleDice})();
@@ -144,17 +144,7 @@ function formatCustomTimer(totalSeconds, level = 'seconds', format = '{time}') {
144
144
  parts.seconds = remaining;
145
145
  }
146
146
 
147
- // Calculate total
148
- const totalMap = {
149
- seconds: include.seconds ? totalSeconds : NaN,
150
- minutes: include.minutes ? totalSeconds / 60 : NaN,
151
- hours: include.hours ? totalSeconds / 3600 : NaN,
152
- days: include.days ? totalSeconds / 86400 : NaN,
153
- months: include.months ? parts.years * 12 + parts.months + (parts.days || 0) / 30 : NaN,
154
- years: include.years ? parts.years + (parts.months || 0) / 12 + (parts.days || 0) / 365 : NaN,
155
- };
156
-
157
- parts.total = +(totalMap[level] || 0).toFixed(2).replace(/\.00$/, '');
147
+ parts.total = +totalSeconds.toFixed(2).replace(/\.00$/, '');
158
148
 
159
149
  /**
160
150
  * Pads a number to ensure it is at least two digits long, using leading zeros if necessary.
@@ -211,6 +201,132 @@ function formatDayTimer(seconds) {
211
201
  return formatCustomTimer(seconds, 'days', '{days}d {hours}:{minutes}:{seconds}');
212
202
  }
213
203
 
204
+ /**
205
+ * Breaks down a duration in milliseconds into its time components.
206
+ *
207
+ * @param {number} totalMs - The total duration in milliseconds.
208
+ * @param {'milliseconds'|'seconds'|'minutes'|'hours'|'days'|'months'|'years'} [level='milliseconds'] - The highest level to calculate and display.
209
+ * @returns {{
210
+ * years: number|NaN,
211
+ * months: number|NaN,
212
+ * days: number|NaN,
213
+ * hours: number|NaN,
214
+ * minutes: number|NaN,
215
+ * seconds: number|NaN,
216
+ * milliseconds: number|NaN,
217
+ * total: number|NaN
218
+ * }}
219
+ */
220
+ function breakdownDuration(totalMs, level = 'milliseconds') {
221
+ totalMs = Math.max(0, Math.floor(totalMs));
222
+
223
+ const levels = ['milliseconds', 'seconds', 'minutes', 'hours', 'days', 'months', 'years'];
224
+ const index = levels.indexOf(level);
225
+
226
+ const include = {
227
+ years: index >= 6,
228
+ months: index >= 5,
229
+ days: index >= 4,
230
+ hours: index >= 3,
231
+ minutes: index >= 2,
232
+ seconds: index >= 1,
233
+ milliseconds: index >= 0,
234
+ };
235
+
236
+ const parts = {
237
+ years: include.years ? 0 : NaN,
238
+ months: include.months ? 0 : NaN,
239
+ days: include.days ? 0 : NaN,
240
+ hours: include.hours ? 0 : NaN,
241
+ minutes: include.minutes ? 0 : NaN,
242
+ seconds: include.seconds ? 0 : NaN,
243
+ milliseconds: include.milliseconds ? 0 : NaN,
244
+ total: NaN,
245
+ };
246
+
247
+ let remaining = totalMs;
248
+
249
+ if (include.years || include.months || include.days) {
250
+ const baseDate = new Date(1980, 0, 1);
251
+ const targetDate = new Date(baseDate.getTime() + remaining);
252
+ const workingDate = new Date(baseDate);
253
+
254
+ // Years
255
+ if (include.years) {
256
+ while (
257
+ new Date(
258
+ workingDate.getFullYear() + 1,
259
+ workingDate.getMonth(),
260
+ workingDate.getDate(),
261
+ ).getTime() <= targetDate.getTime()
262
+ ) {
263
+ workingDate.setFullYear(workingDate.getFullYear() + 1);
264
+ parts.years++;
265
+ }
266
+ }
267
+
268
+ // Months
269
+ if (include.months) {
270
+ while (
271
+ new Date(
272
+ workingDate.getFullYear(),
273
+ workingDate.getMonth() + 1,
274
+ workingDate.getDate(),
275
+ ).getTime() <= targetDate.getTime()
276
+ ) {
277
+ workingDate.setMonth(workingDate.getMonth() + 1);
278
+ parts.months++;
279
+ }
280
+ }
281
+
282
+ // Days
283
+ if (include.days) {
284
+ while (
285
+ new Date(
286
+ workingDate.getFullYear(),
287
+ workingDate.getMonth(),
288
+ workingDate.getDate() + 1,
289
+ ).getTime() <= targetDate.getTime()
290
+ ) {
291
+ workingDate.setDate(workingDate.getDate() + 1);
292
+ parts.days++;
293
+ }
294
+ }
295
+
296
+ remaining = targetDate.getTime() - workingDate.getTime();
297
+ }
298
+
299
+ if (include.hours) {
300
+ parts.hours = Math.floor(remaining / 3600000);
301
+ remaining %= 3600000;
302
+ }
303
+
304
+ if (include.minutes) {
305
+ parts.minutes = Math.floor(remaining / 60000);
306
+ remaining %= 60000;
307
+ }
308
+
309
+ if (include.seconds) {
310
+ parts.seconds = Math.floor(remaining / 1000);
311
+ remaining %= 1000;
312
+ }
313
+
314
+ if (include.milliseconds) {
315
+ parts.milliseconds = remaining;
316
+ }
317
+
318
+ // Totals
319
+ ({
320
+ months: include.months ? parts.years * 12 + parts.months + (parts.days || 0) / 30 : NaN,
321
+ years: include.years ? parts.years + (parts.months || 0) / 12 + (parts.days || 0) / 365 : NaN,
322
+ });
323
+
324
+ parts.total = +totalMs;
325
+
326
+ return parts;
327
+ }
328
+
329
+ exports.breakdownDuration = breakdownDuration;
214
330
  exports.formatCustomTimer = formatCustomTimer;
215
331
  exports.formatDayTimer = formatDayTimer;
216
332
  exports.formatTimer = formatTimer;
@@ -35,4 +35,30 @@ export function formatTimer(seconds: number): string;
35
35
  * @returns {string} The formatted timer string in "Xd HH:MM:SS" format.
36
36
  */
37
37
  export function formatDayTimer(seconds: number): string;
38
+ /**
39
+ * Breaks down a duration in milliseconds into its time components.
40
+ *
41
+ * @param {number} totalMs - The total duration in milliseconds.
42
+ * @param {'milliseconds'|'seconds'|'minutes'|'hours'|'days'|'months'|'years'} [level='milliseconds'] - The highest level to calculate and display.
43
+ * @returns {{
44
+ * years: number|NaN,
45
+ * months: number|NaN,
46
+ * days: number|NaN,
47
+ * hours: number|NaN,
48
+ * minutes: number|NaN,
49
+ * seconds: number|NaN,
50
+ * milliseconds: number|NaN,
51
+ * total: number|NaN
52
+ * }}
53
+ */
54
+ export function breakdownDuration(totalMs: number, level?: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "months" | "years"): {
55
+ years: number | number;
56
+ months: number | number;
57
+ days: number | number;
58
+ hours: number | number;
59
+ minutes: number | number;
60
+ seconds: number | number;
61
+ milliseconds: number | number;
62
+ total: number | number;
63
+ };
38
64
  //# sourceMappingURL=clock.d.mts.map
@@ -117,7 +117,7 @@ export function formatCustomTimer(totalSeconds, level = 'seconds', format = '{ti
117
117
  months: include.months ? parts.years * 12 + parts.months + (parts.days || 0) / 30 : NaN,
118
118
  years: include.years ? parts.years + (parts.months || 0) / 12 + (parts.days || 0) / 365 : NaN,
119
119
  };
120
- parts.total = +(totalMap[level] || 0).toFixed(2).replace(/\.00$/, '');
120
+ parts.total = +totalSeconds.toFixed(2).replace(/\.00$/, '');
121
121
  /**
122
122
  * Pads a number to ensure it is at least two digits long, using leading zeros if necessary.
123
123
  *
@@ -168,3 +168,98 @@ export function formatTimer(seconds) {
168
168
  export function formatDayTimer(seconds) {
169
169
  return formatCustomTimer(seconds, 'days', '{days}d {hours}:{minutes}:{seconds}');
170
170
  }
171
+ /**
172
+ * Breaks down a duration in milliseconds into its time components.
173
+ *
174
+ * @param {number} totalMs - The total duration in milliseconds.
175
+ * @param {'milliseconds'|'seconds'|'minutes'|'hours'|'days'|'months'|'years'} [level='milliseconds'] - The highest level to calculate and display.
176
+ * @returns {{
177
+ * years: number|NaN,
178
+ * months: number|NaN,
179
+ * days: number|NaN,
180
+ * hours: number|NaN,
181
+ * minutes: number|NaN,
182
+ * seconds: number|NaN,
183
+ * milliseconds: number|NaN,
184
+ * total: number|NaN
185
+ * }}
186
+ */
187
+ export function breakdownDuration(totalMs, level = 'milliseconds') {
188
+ totalMs = Math.max(0, Math.floor(totalMs));
189
+ const levels = ['milliseconds', 'seconds', 'minutes', 'hours', 'days', 'months', 'years'];
190
+ const index = levels.indexOf(level);
191
+ const include = {
192
+ years: index >= 6,
193
+ months: index >= 5,
194
+ days: index >= 4,
195
+ hours: index >= 3,
196
+ minutes: index >= 2,
197
+ seconds: index >= 1,
198
+ milliseconds: index >= 0,
199
+ };
200
+ const parts = {
201
+ years: include.years ? 0 : NaN,
202
+ months: include.months ? 0 : NaN,
203
+ days: include.days ? 0 : NaN,
204
+ hours: include.hours ? 0 : NaN,
205
+ minutes: include.minutes ? 0 : NaN,
206
+ seconds: include.seconds ? 0 : NaN,
207
+ milliseconds: include.milliseconds ? 0 : NaN,
208
+ total: NaN,
209
+ };
210
+ let remaining = totalMs;
211
+ if (include.years || include.months || include.days) {
212
+ const baseDate = new Date(1980, 0, 1);
213
+ const targetDate = new Date(baseDate.getTime() + remaining);
214
+ const workingDate = new Date(baseDate);
215
+ // Years
216
+ if (include.years) {
217
+ while (new Date(workingDate.getFullYear() + 1, workingDate.getMonth(), workingDate.getDate()).getTime() <= targetDate.getTime()) {
218
+ workingDate.setFullYear(workingDate.getFullYear() + 1);
219
+ parts.years++;
220
+ }
221
+ }
222
+ // Months
223
+ if (include.months) {
224
+ while (new Date(workingDate.getFullYear(), workingDate.getMonth() + 1, workingDate.getDate()).getTime() <= targetDate.getTime()) {
225
+ workingDate.setMonth(workingDate.getMonth() + 1);
226
+ parts.months++;
227
+ }
228
+ }
229
+ // Days
230
+ if (include.days) {
231
+ while (new Date(workingDate.getFullYear(), workingDate.getMonth(), workingDate.getDate() + 1).getTime() <= targetDate.getTime()) {
232
+ workingDate.setDate(workingDate.getDate() + 1);
233
+ parts.days++;
234
+ }
235
+ }
236
+ remaining = targetDate.getTime() - workingDate.getTime();
237
+ }
238
+ if (include.hours) {
239
+ parts.hours = Math.floor(remaining / 3600000);
240
+ remaining %= 3600000;
241
+ }
242
+ if (include.minutes) {
243
+ parts.minutes = Math.floor(remaining / 60000);
244
+ remaining %= 60000;
245
+ }
246
+ if (include.seconds) {
247
+ parts.seconds = Math.floor(remaining / 1000);
248
+ remaining %= 1000;
249
+ }
250
+ if (include.milliseconds) {
251
+ parts.milliseconds = remaining;
252
+ }
253
+ // Totals
254
+ const totalMap = {
255
+ milliseconds: include.milliseconds ? totalMs : NaN,
256
+ seconds: include.seconds ? totalMs / 1000 : NaN,
257
+ minutes: include.minutes ? totalMs / 60000 : NaN,
258
+ hours: include.hours ? totalMs / 3600000 : NaN,
259
+ days: include.days ? totalMs / 86400000 : NaN,
260
+ months: include.months ? parts.years * 12 + parts.months + (parts.days || 0) / 30 : NaN,
261
+ years: include.years ? parts.years + (parts.months || 0) / 12 + (parts.days || 0) / 365 : NaN,
262
+ };
263
+ parts.total = +totalMs;
264
+ return parts;
265
+ }
@@ -17,6 +17,7 @@ var collision = require('./collision.cjs');
17
17
  exports.arraySortPositions = arraySortPositions;
18
18
  exports.asyncReplace = replaceAsync;
19
19
  exports.shuffleArray = array.shuffleArray;
20
+ exports.breakdownDuration = clock.breakdownDuration;
20
21
  exports.formatCustomTimer = clock.formatCustomTimer;
21
22
  exports.formatDayTimer = clock.formatDayTimer;
22
23
  exports.formatTimer = clock.formatTimer;
@@ -1,3 +1,4 @@
1
+ import { breakdownDuration } from './clock.mjs';
1
2
  import { calculateMarketcap } from './simpleMath.mjs';
2
3
  import { compareMarketcap } from './simpleMath.mjs';
3
4
  import { getPercentage } from './simpleMath.mjs';
@@ -55,5 +56,5 @@ import { getTimeDuration } from './clock.mjs';
55
56
  import { shuffleArray } from './array.mjs';
56
57
  import { toTitleCase } from './text.mjs';
57
58
  import { toTitleCaseLowerFirst } from './text.mjs';
58
- export { calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst };
59
+ export { breakdownDuration, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst };
59
60
  //# sourceMappingURL=index.d.mts.map
@@ -1,7 +1,7 @@
1
1
  import arraySortPositions from '../../legacy/libs/arraySortPositions.mjs';
2
2
  import asyncReplace from '../../legacy/libs/replaceAsync.mjs';
3
3
  import { shuffleArray } from './array.mjs';
4
- import { formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration } from './clock.mjs';
4
+ import { breakdownDuration, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, } from './clock.mjs';
5
5
  import { readJsonBlob, saveJsonFile, fetchJson, installWindowHiddenScript, readFileBlob, readBase64Blob, fetchText, } from './html.mjs';
6
6
  import { extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, objType } from './objFilter.mjs';
7
7
  import { countObj, isJsonObject } from './objChecker.mjs';
@@ -9,4 +9,4 @@ import { documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen
9
9
  import { calculateMarketcap, compareMarketcap, formatBytes, genFibonacciSeq, getAge, getPercentage, getSimplePerc, ruleOfThree, } from './simpleMath.mjs';
10
10
  import { addAiMarkerShortcut, safeTextTrim, toTitleCase, toTitleCaseLowerFirst } from './text.mjs';
11
11
  import { areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, } from './collision.mjs';
12
- export { calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst, };
12
+ export { breakdownDuration, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst, };
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var TinyNeedBar = require('../libs/TinyNeedBar.cjs');
4
+
5
+
6
+
7
+ exports.TinyNeedBar = TinyNeedBar;
@@ -0,0 +1,3 @@
1
+ export { TinyNeedBar };
2
+ import TinyNeedBar from '../libs/TinyNeedBar.mjs';
3
+ //# sourceMappingURL=TinyNeedBar.d.mts.map
@@ -0,0 +1,2 @@
1
+ import TinyNeedBar from '../libs/TinyNeedBar.mjs';
2
+ export { TinyNeedBar };
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var TinySimpleDice = require('../libs/TinySimpleDice.cjs');
4
+
5
+
6
+
7
+ exports.TinySimpleDice = TinySimpleDice;
@@ -0,0 +1,3 @@
1
+ export { TinySimpleDice };
2
+ import TinySimpleDice from '../libs/TinySimpleDice.mjs';
3
+ //# sourceMappingURL=TinySimpleDice.d.mts.map
@@ -0,0 +1,2 @@
1
+ import TinySimpleDice from '../libs/TinySimpleDice.mjs';
2
+ export { TinySimpleDice };
package/dist/v1/index.cjs CHANGED
@@ -44,6 +44,8 @@ var TinyInventory = require('./libs/TinyInventory.cjs');
44
44
  var TinyInventoryTrader = require('./libs/TinyInventoryTrader.cjs');
45
45
  var TinyCookieConsent = require('./libs/TinyCookieConsent.cjs');
46
46
  var TinyI18 = require('./libs/TinyI18.cjs');
47
+ var TinyNeedBar = require('./libs/TinyNeedBar.cjs');
48
+ var TinySimpleDice = require('./libs/TinySimpleDice.cjs');
47
49
 
48
50
 
49
51
 
@@ -51,6 +53,7 @@ exports.asyncReplace = replaceAsync;
51
53
  exports.TinyLevelUp = userLevel;
52
54
  exports.arraySortPositions = arraySortPositions;
53
55
  exports.shuffleArray = array.shuffleArray;
56
+ exports.breakdownDuration = clock.breakdownDuration;
54
57
  exports.formatCustomTimer = clock.formatCustomTimer;
55
58
  exports.formatDayTimer = clock.formatDayTimer;
56
59
  exports.formatTimer = clock.formatTimer;
@@ -164,3 +167,5 @@ exports.TinyInventory = TinyInventory;
164
167
  exports.TinyInventoryTrader = TinyInventoryTrader;
165
168
  exports.TinyCookieConsent = TinyCookieConsent;
166
169
  exports.TinyI18 = TinyI18;
170
+ exports.TinyNeedBar = TinyNeedBar;
171
+ exports.TinySimpleDice = TinySimpleDice;
@@ -1,3 +1,5 @@
1
+ import TinySimpleDice from './libs/TinySimpleDice.mjs';
2
+ import TinyNeedBar from './libs/TinyNeedBar.mjs';
1
3
  import TinyI18 from './libs/TinyI18.mjs';
2
4
  import TinyCookieConsent from './libs/TinyCookieConsent.mjs';
3
5
  import TinyInventory from './libs/TinyInventory.mjs';
@@ -29,6 +31,7 @@ import TinyRateLimiter from './libs/TinyRateLimiter.mjs';
29
31
  import ColorSafeStringify from './libs/ColorSafeStringify.mjs';
30
32
  import TinyPromiseQueue from './libs/TinyPromiseQueue.mjs';
31
33
  import TinyLevelUp from '../legacy/libs/userLevel.mjs';
34
+ import { breakdownDuration } from './basics/clock.mjs';
32
35
  import { calculateMarketcap } from './basics/simpleMath.mjs';
33
36
  import { compareMarketcap } from './basics/simpleMath.mjs';
34
37
  import { getPercentage } from './basics/simpleMath.mjs';
@@ -115,5 +118,5 @@ import { getTimeDuration } from './basics/clock.mjs';
115
118
  import { shuffleArray } from './basics/array.mjs';
116
119
  import { toTitleCase } from './basics/text.mjs';
117
120
  import { toTitleCaseLowerFirst } from './basics/text.mjs';
118
- export { TinyI18, TinyCookieConsent, TinyInventory, TinyInventoryTrader, TinyArrayPaginator, TinyAdvancedRaffle, TinyDayNightCycle, TinyGamepad, TinyTextarea, TinyNewWinEvents, TinyIframeEvents, TinyLocalStorage, TinyEvents, TinyTimeout, TinyColorConverter, TinyClipboard, TinyTextRangeEditor, TinySmartScroller, UltraRandomMsgGen, TinyAfterScrollWatcher, TinyHtml, TinyNotifications, TinyDomReadyManager, TinyDragger, TinyDragDropDetector, TinyToastNotify, TinyNotifyCenter, TinyRateLimiter, ColorSafeStringify, TinyPromiseQueue, TinyLevelUp, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, isDirEmptyAsync, fileSizeAsync, dirSizeAsync, listFilesAsync, listDirsAsync, getLatestBackupPath, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, readJsonFile, writeJsonFile, ensureDirectory, clearDirectoryAsync, clearDirectory, fileExists, dirExists, isDirEmpty, ensureCopyFile, tryDeleteFile, writeTextFile, listFiles, listDirs, fileSize, dirSize, backupFile, restoreLatestBackup, renameFileBatch, renameFileRegex, renameFileAddPrefixSuffix, renameFileNormalizeCase, renameFilePadNumbers, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, checkObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst };
121
+ export { TinySimpleDice, TinyNeedBar, TinyI18, TinyCookieConsent, TinyInventory, TinyInventoryTrader, TinyArrayPaginator, TinyAdvancedRaffle, TinyDayNightCycle, TinyGamepad, TinyTextarea, TinyNewWinEvents, TinyIframeEvents, TinyLocalStorage, TinyEvents, TinyTimeout, TinyColorConverter, TinyClipboard, TinyTextRangeEditor, TinySmartScroller, UltraRandomMsgGen, TinyAfterScrollWatcher, TinyHtml, TinyNotifications, TinyDomReadyManager, TinyDragger, TinyDragDropDetector, TinyToastNotify, TinyNotifyCenter, TinyRateLimiter, ColorSafeStringify, TinyPromiseQueue, TinyLevelUp, breakdownDuration, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, isDirEmptyAsync, fileSizeAsync, dirSizeAsync, listFilesAsync, listDirsAsync, getLatestBackupPath, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, readJsonFile, writeJsonFile, ensureDirectory, clearDirectoryAsync, clearDirectory, fileExists, dirExists, isDirEmpty, ensureCopyFile, tryDeleteFile, writeTextFile, listFiles, listDirs, fileSize, dirSize, backupFile, restoreLatestBackup, renameFileBatch, renameFileRegex, renameFileAddPrefixSuffix, renameFileNormalizeCase, renameFilePadNumbers, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, checkObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst };
119
122
  //# sourceMappingURL=index.d.mts.map
package/dist/v1/index.mjs CHANGED
@@ -2,7 +2,7 @@ import asyncReplace from '../legacy/libs/replaceAsync.mjs';
2
2
  import TinyLevelUp from '../legacy/libs/userLevel.mjs';
3
3
  import arraySortPositions from '../legacy/libs/arraySortPositions.mjs';
4
4
  import { shuffleArray } from './basics/array.mjs';
5
- import { formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, } from './basics/clock.mjs';
5
+ import { breakdownDuration, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, } from './basics/clock.mjs';
6
6
  import { extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, objType, checkObj, } from './basics/objFilter.mjs';
7
7
  import { countObj, isJsonObject } from './basics/objChecker.mjs';
8
8
  import { documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, } from './basics/fullScreen.mjs';
@@ -42,4 +42,6 @@ import TinyInventory from './libs/TinyInventory.mjs';
42
42
  import TinyInventoryTrader from './libs/TinyInventoryTrader.mjs';
43
43
  import TinyCookieConsent from './libs/TinyCookieConsent.mjs';
44
44
  import TinyI18 from './libs/TinyI18.mjs';
45
- export { TinyI18, TinyCookieConsent, TinyInventory, TinyInventoryTrader, TinyArrayPaginator, TinyAdvancedRaffle, TinyDayNightCycle, TinyGamepad, TinyTextarea, TinyNewWinEvents, TinyIframeEvents, TinyLocalStorage, TinyEvents, TinyTimeout, TinyColorConverter, TinyClipboard, TinyTextRangeEditor, TinySmartScroller, UltraRandomMsgGen, TinyAfterScrollWatcher, TinyHtml, TinyNotifications, TinyDomReadyManager, TinyDragger, TinyDragDropDetector, TinyToastNotify, TinyNotifyCenter, TinyRateLimiter, ColorSafeStringify, TinyPromiseQueue, TinyLevelUp, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, isDirEmptyAsync, fileSizeAsync, dirSizeAsync, listFilesAsync, listDirsAsync, getLatestBackupPath, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, readJsonFile, writeJsonFile, ensureDirectory, clearDirectoryAsync, clearDirectory, fileExists, dirExists, isDirEmpty, ensureCopyFile, tryDeleteFile, writeTextFile, listFiles, listDirs, fileSize, dirSize, backupFile, restoreLatestBackup, renameFileBatch, renameFileRegex, renameFileAddPrefixSuffix, renameFileNormalizeCase, renameFilePadNumbers, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, checkObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst, };
45
+ import TinyNeedBar from './libs/TinyNeedBar.mjs';
46
+ import TinySimpleDice from './libs/TinySimpleDice.mjs';
47
+ export { TinySimpleDice, TinyNeedBar, TinyI18, TinyCookieConsent, TinyInventory, TinyInventoryTrader, TinyArrayPaginator, TinyAdvancedRaffle, TinyDayNightCycle, TinyGamepad, TinyTextarea, TinyNewWinEvents, TinyIframeEvents, TinyLocalStorage, TinyEvents, TinyTimeout, TinyColorConverter, TinyClipboard, TinyTextRangeEditor, TinySmartScroller, UltraRandomMsgGen, TinyAfterScrollWatcher, TinyHtml, TinyNotifications, TinyDomReadyManager, TinyDragger, TinyDragDropDetector, TinyToastNotify, TinyNotifyCenter, TinyRateLimiter, ColorSafeStringify, TinyPromiseQueue, TinyLevelUp, breakdownDuration, calculateMarketcap, compareMarketcap, getPercentage, areElsCollTop, areElsCollBottom, areElsCollLeft, areElsCollRight, areElsCollPerfTop, areElsCollPerfBottom, areElsCollPerfLeft, areElsCollPerfRight, areElsColliding, areElsPerfColliding, getElsColliding, getElsPerfColliding, getElsCollOverlap, getElsCollOverlapPos, getRectCenter, getElsRelativeCenterOffset, getElsCollDirDepth, getElsCollDetails, safeTextTrim, installWindowHiddenScript, genFibonacciSeq, isDirEmptyAsync, fileSizeAsync, dirSizeAsync, listFilesAsync, listDirsAsync, getLatestBackupPath, fetchJson, fetchText, readJsonBlob, readFileBlob, readBase64Blob, saveJsonFile, readJsonFile, writeJsonFile, ensureDirectory, clearDirectoryAsync, clearDirectory, fileExists, dirExists, isDirEmpty, ensureCopyFile, tryDeleteFile, writeTextFile, listFiles, listDirs, fileSize, dirSize, backupFile, restoreLatestBackup, renameFileBatch, renameFileRegex, renameFileAddPrefixSuffix, renameFileNormalizeCase, renameFilePadNumbers, documentIsFullScreen, isScreenFilled, requestFullScreen, exitFullScreen, isFullScreenMode, onFullScreenChange, offFullScreenChange, isJsonObject, arraySortPositions, formatBytes, addAiMarkerShortcut, extendObjType, reorderObjTypeOrder, cloneObjTypeOrder, countObj, checkObj, objType, ruleOfThree, getSimplePerc, asyncReplace, getAge, formatCustomTimer, formatDayTimer, formatTimer, getTimeDuration, shuffleArray, toTitleCase, toTitleCaseLowerFirst, };