tiny-essentials 1.25.0 → 1.25.1
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 +1 -1
- package/changelog/1/25/1.md +18 -0
- package/dist/v1/TinyAnalogClock.min.js +1 -0
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyTextDiffer.min.js +1 -0
- package/dist/v1/build/TinyAnalogClock.cjs +7 -0
- package/dist/v1/build/TinyAnalogClock.d.mts +3 -0
- package/dist/v1/build/TinyAnalogClock.mjs +2 -0
- package/dist/v1/build/TinyTextDiffer.cjs +7 -0
- package/dist/v1/build/TinyTextDiffer.d.mts +3 -0
- package/dist/v1/build/TinyTextDiffer.mjs +2 -0
- package/dist/v1/index.cjs +4 -0
- package/dist/v1/index.d.mts +3 -1
- package/dist/v1/index.mjs +3 -1
- package/dist/v1/libs/TinyAnalogClock.cjs +738 -0
- package/dist/v1/libs/TinyAnalogClock.d.mts +342 -0
- package/dist/v1/libs/TinyAnalogClock.mjs +653 -0
- package/dist/v1/libs/TinyTextDiffer.cjs +288 -0
- package/dist/v1/libs/TinyTextDiffer.d.mts +109 -0
- package/dist/v1/libs/TinyTextDiffer.mjs +255 -0
- package/docs/v1/README.md +2 -0
- package/docs/v1/libs/TinyAnalogClock.md +295 -0
- package/docs/v1/libs/TinyTextDiffer.md +114 -0
- package/package.json +9 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{TinyTextDiffer:()=>r});const r=class{#e=[];#t=!1;get history(){return[...this.#e]}set history(e){if(!Array.isArray(e))throw new TypeError("History data must be provided as an array.");if(!e.every(e=>"string"==typeof e))throw new TypeError("All items in the history array must be strings.");this.#e=[...e]}get size(){return this.#e.length}constructor(e=[]){this.history=e}#r(){if(this.#t)throw new Error("Cannot perform operations on a destroyed TinyTextDiffer instance.")}#s(e){if("number"!=typeof e)throw new TypeError("The provided index must be a valid number.")}#i(e){if("string"!=typeof e)throw new TypeError("The provided text must be a valid string.")}get(e){if(this.#r(),this.#s(e),void 0===this.#e[e])throw new Error(`No text version found at index ${e}.`);return this.#e[e]}has(e){return this.#r(),this.#s(e),void 0!==this.#e[e]}add(e){this.#r(),this.#i(e),this.#e.push(e)}remove(){return this.#r(),this.#e.pop()}addAt(e,t){this.#r(),this.#s(e),this.#i(t),this.#e.splice(e,0,t)}removeAt(e){this.#r(),this.#s(e);const t=this.#e.length;return this.#e.splice(e,1),t!==this.#e.length}clear(){this.#r(),this.#e=[]}compare(...e){this.#r();const t=e.length;if(0===t||t%2!=0)throw new Error("The compare method requires an even number of indices to form comparison pairs.");const r=[];for(let s=0;s<t;s+=2){const i=s+1;if(i>t-1)continue;this.#s(e[s]),this.#s(e[i]);const h=this.#e[e[s]],o=this.#e[e[i]];r.push(this._computeDiff(h,o))}return r}_computeDiff(e,t){const r=e.length,s=t.length,i=Array(r+1).fill(null).map(()=>Array(s+1).fill(0));let h=1,o=1;for(h=1;h<=r;h++)for(o=1;o<=s;o++)e[h-1]===t[o-1]?i[h][o]=i[h-1][o-1]+1:i[h][o]=Math.max(i[h-1][o],i[h][o-1]);h=r,o=s;const n=[];for(;h>0||o>0;)h>0&&o>0&&e[h-1]===t[o-1]?(n.unshift({value:e[h-1],type:"normal"}),h--,o--):o>0&&(0===h||i[h][o-1]>=i[h-1][o])?(n.unshift({value:t[o-1],type:"added"}),o--):h>0&&(0===o||i[h][o-1]<i[h-1][o])&&(n.unshift({value:e[h-1],type:"deleted"}),h--);return n.reduce((e,t)=>{const r=e.length-1;return e.length>0&&e[r].type===t.type?e[r].value+=t.value:e.push(t),e},[])}destroy(){this.#t||(this.#e=[],this.#t=!0)}};window.TinyTextDiffer=t.TinyTextDiffer})();
|
package/dist/v1/index.cjs
CHANGED
|
@@ -47,6 +47,8 @@ var TinySimpleDice = require('./libs/TinySimpleDice.cjs');
|
|
|
47
47
|
var TinyElementObserver = require('./libs/TinyElementObserver.cjs');
|
|
48
48
|
var TinyLoadingScreen = require('./libs/TinyLoadingScreen.cjs');
|
|
49
49
|
var TinyColorValidator = require('./libs/TinyColorValidator.cjs');
|
|
50
|
+
var TinyAnalogClock = require('./libs/TinyAnalogClock.cjs');
|
|
51
|
+
var TinyTextDiffer = require('./libs/TinyTextDiffer.cjs');
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
|
|
@@ -175,3 +177,5 @@ exports.TinySimpleDice = TinySimpleDice;
|
|
|
175
177
|
exports.TinyElementObserver = TinyElementObserver;
|
|
176
178
|
exports.TinyLoadingScreen = TinyLoadingScreen;
|
|
177
179
|
exports.TinyColorValidator = TinyColorValidator;
|
|
180
|
+
exports.TinyAnalogClock = TinyAnalogClock;
|
|
181
|
+
exports.TinyTextDiffer = TinyTextDiffer;
|
package/dist/v1/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import TinyTextDiffer from './libs/TinyTextDiffer.mjs';
|
|
2
|
+
import TinyAnalogClock from './libs/TinyAnalogClock.mjs';
|
|
1
3
|
import TinyColorValidator from './libs/TinyColorValidator.mjs';
|
|
2
4
|
import TinyLoadingScreen from './libs/TinyLoadingScreen.mjs';
|
|
3
5
|
import TinyElementObserver from './libs/TinyElementObserver.mjs';
|
|
@@ -123,5 +125,5 @@ import { getTimeDuration } from './basics/clock.mjs';
|
|
|
123
125
|
import { shuffleArray } from './basics/array.mjs';
|
|
124
126
|
import { toTitleCase } from './basics/text.mjs';
|
|
125
127
|
import { toTitleCaseLowerFirst } from './basics/text.mjs';
|
|
126
|
-
export { TinyColorValidator, TinyLoadingScreen, TinyElementObserver, 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, diffArrayList, diffStrings, 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 };
|
|
128
|
+
export { TinyTextDiffer, TinyAnalogClock, TinyColorValidator, TinyLoadingScreen, TinyElementObserver, 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, diffArrayList, diffStrings, 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 };
|
|
127
129
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/v1/index.mjs
CHANGED
|
@@ -45,7 +45,9 @@ import TinySimpleDice from './libs/TinySimpleDice.mjs';
|
|
|
45
45
|
import TinyElementObserver from './libs/TinyElementObserver.mjs';
|
|
46
46
|
import TinyLoadingScreen from './libs/TinyLoadingScreen.mjs';
|
|
47
47
|
import TinyColorValidator from './libs/TinyColorValidator.mjs';
|
|
48
|
+
import TinyAnalogClock from './libs/TinyAnalogClock.mjs';
|
|
49
|
+
import TinyTextDiffer from './libs/TinyTextDiffer.mjs';
|
|
48
50
|
// import TinyHtmlElems from './libs/TinyHtml/index.mjs';
|
|
49
|
-
export {
|
|
51
|
+
export { TinyTextDiffer, TinyAnalogClock,
|
|
50
52
|
// TinyHtmlElems,
|
|
51
53
|
TinyColorValidator, TinyLoadingScreen, TinyElementObserver, 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, diffArrayList, diffStrings, 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, };
|