tiny-essentials 1.22.4 β 1.22.6
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/changelog/1/1/0.md +1 -0
- package/changelog/1/10/0.md +19 -0
- package/changelog/1/10/2.md +23 -0
- package/changelog/1/11/0.md +66 -0
- package/changelog/1/12/0.md +54 -0
- package/changelog/1/12/1.md +37 -0
- package/changelog/1/12/2.md +29 -0
- package/changelog/1/13/0.md +41 -0
- package/changelog/1/13/1.md +7 -0
- package/changelog/1/13/2.md +13 -0
- package/changelog/1/14/0.md +33 -0
- package/changelog/1/15/0.md +39 -0
- package/changelog/1/16/0.md +42 -0
- package/changelog/1/16/1.md +43 -0
- package/changelog/1/16/2.md +29 -0
- package/changelog/1/17/0.md +28 -0
- package/changelog/1/17/1.md +40 -0
- package/changelog/1/18/0.md +43 -0
- package/changelog/1/18/1.md +12 -0
- package/changelog/1/19/1.md +21 -0
- package/changelog/1/19/2.md +23 -0
- package/changelog/1/19/3.md +15 -0
- package/changelog/1/2/0.md +5 -0
- package/changelog/1/2/1.md +5 -0
- package/changelog/1/20/0.md +9 -0
- package/changelog/1/20/1.md +40 -0
- package/changelog/1/20/2.md +22 -0
- package/changelog/1/20/3.md +39 -0
- package/changelog/1/21/0.md +23 -0
- package/changelog/1/21/1.md +12 -0
- package/changelog/1/21/10.md +23 -0
- package/changelog/1/21/2.md +9 -0
- package/changelog/1/21/3.md +9 -0
- package/changelog/1/21/4.md +9 -0
- package/changelog/1/21/6.md +23 -0
- package/changelog/1/21/7.md +16 -0
- package/changelog/1/21/8.md +5 -0
- package/changelog/1/21/9.md +17 -0
- package/changelog/1/22/1.md +28 -0
- package/changelog/1/22/2.md +17 -0
- package/changelog/1/22/3.md +11 -0
- package/changelog/1/22/4.md +35 -0
- package/changelog/1/22/5.md +23 -0
- package/changelog/1/22/6.md +25 -0
- package/changelog/1/3/1.md +4 -0
- package/changelog/1/3/2.md +2 -0
- package/changelog/1/4/0.md +5 -0
- package/changelog/1/5/0.md +4 -0
- package/changelog/1/5/1.md +2 -0
- package/changelog/1/6/0.md +6 -0
- package/changelog/1/7/0.md +3 -0
- package/changelog/1/7/1.md +3 -0
- package/changelog/1/8/0.md +3 -0
- package/changelog/1/8/1.md +2 -0
- package/changelog/1/8/2.md +2 -0
- package/changelog/1/8/3.md +3 -0
- package/changelog/1/8/4.md +2 -0
- package/changelog/1/8/5.md +6 -0
- package/changelog/1/9/0.md +27 -0
- package/changelog/1/9/1.md +5 -0
- package/changelog/1/9/2.md +14 -0
- package/dist/v1/TinyDragger.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyHtml.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/libs/TinyHtml.cjs +400 -20
- package/dist/v1/libs/TinyHtml.d.mts +220 -6
- package/dist/v1/libs/TinyHtml.mjs +384 -23
- package/docs/v1/libs/TinyHtml.md +36 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is the first module release. I should have done that in version 1.0.0, but I accidentally forgot.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
### π `TinyRateLimiter` Updates in v1.10.0 π―
|
|
2
|
+
|
|
3
|
+
This version brings a bunch of internal improvements and cleanup to `TinyRateLimiter`, making it faster, cleaner, and more memory-friendly. Hereβs whatβs new:
|
|
4
|
+
|
|
5
|
+
* π¦ **New memory optimization logic**: The limiter can now keep only the latest N entries per group (`#maxMemory`) to reduce memory usage. Automatically calls `onMemoryExceeded(groupId)` if defined.
|
|
6
|
+
* π§ͺ **Improved rate limit check**: The `isRateLimited()` method is now faster and more consistent, even when `interval` is disabled.
|
|
7
|
+
* π§Ό **Better cleanup system**: Groups now use either their own TTL or fallback to `maxIdle`, and the internal `_cleanup()` handles expiration gracefully.
|
|
8
|
+
* π **New metrics method**: `getMetrics(groupId)` now returns hit count, last hit, spacing average, and time since last hit in one call!
|
|
9
|
+
* π **New helpers**:
|
|
10
|
+
|
|
11
|
+
* `getAllUserMappings()` β returns user β group map as plain object π
|
|
12
|
+
* `getAverageHitSpacing()` β computes average time between hits
|
|
13
|
+
* `getTimeSinceLastHit()` β useful for time-based triggers
|
|
14
|
+
* β οΈ **Deprecated**: `reset(userId)` is now deprecated β use `resetUserGroup(userId)` instead.
|
|
15
|
+
* π **Fully isolated internals**: All core options (`interval`, `maxHits`, `maxIdle`) now throw if misconfigured. Stronger encapsulation and clearer API.
|
|
16
|
+
|
|
17
|
+
This release keeps the class drop-in compatible with previous versions but brings real performance and control benefits under scale. Enjoy! π§©π‘
|
|
18
|
+
|
|
19
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.9.2...1.10.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## π¦ Release `v1.10.2` β Object Detection Upgrade! π§±β¨
|
|
2
|
+
|
|
3
|
+
### β¨ What's New
|
|
4
|
+
|
|
5
|
+
#### π§Ό `isJsonObject(value)` β **Now Stronger Than Ever!**
|
|
6
|
+
|
|
7
|
+
Our object purity checker has been upgraded to strictly validate **only** plain JSON-style objects.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
isPureJsonObject({}); // β
true
|
|
11
|
+
isPureJsonObject(new Date()); // β false
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This means:
|
|
15
|
+
|
|
16
|
+
* β No `Array`, `Date`, `Map`, `Set`, `Buffer`, or any other exotic object
|
|
17
|
+
* β
Only `{}` or `new Object()` style values pass
|
|
18
|
+
|
|
19
|
+
> Tip: Use `isJsonObject()` when you want **real JSON-like purity**, not just "typeof object" π
|
|
20
|
+
|
|
21
|
+
> I just did a quick review of the JSDoc comments in the `objFilter.mjs` file β no deep changes, just a light inspection. π
|
|
22
|
+
|
|
23
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.10.0...1.10.2
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# π Tiny-Essentials v1.11.0 β The Notification Update! π¨π
|
|
2
|
+
|
|
3
|
+
Tiny hi! Weβre back with a super tiny fresh new version of **Tiny-Essentials**. :3
|
|
4
|
+
|
|
5
|
+
### π What's New in v1.11.0?
|
|
6
|
+
|
|
7
|
+
Say hello to **two new notification systems** that just landed in this release:
|
|
8
|
+
|
|
9
|
+
## ποΈ TinyNotifyCenter
|
|
10
|
+
|
|
11
|
+
- **Dynamic notifications** with optional **titles**, **avatars**, and rich **HTML/text** content
|
|
12
|
+
- Individual **close buttons** for each notification, plus a **clear all** button with a sleek broom icon π§Ή
|
|
13
|
+
- Mark notifications as **read/unread** with visual distinction
|
|
14
|
+
- Clickable notifications with custom `onClick` handlers
|
|
15
|
+
- Overlay with dimmed background and intuitive outside-click to close the notification list
|
|
16
|
+
- Smooth animations on notification removal, preventing UI freezes
|
|
17
|
+
- Live badge count that recalculates accurately from the DOM
|
|
18
|
+
- Easy-to-use static template injection for instant integration
|
|
19
|
+
|
|
20
|
+
## π¨ Design
|
|
21
|
+
|
|
22
|
+
The UI is minimal but expressive, placing the notification bell at the top-right corner, with a badge showing unread counts. Notifications appear in a clean list, with avatars for quick identification.
|
|
23
|
+
|
|
24
|
+
## βοΈ Usage
|
|
25
|
+
|
|
26
|
+
Simply call `.add()` with your message or structured notification object, and watch your notifications come to life!
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## π£ TinyToast - Lightweight Notification System
|
|
31
|
+
|
|
32
|
+
**TinyToast** is a flexible and minimalist toast/notification system built with JavaScript.
|
|
33
|
+
Easily display beautiful, customizable, auto-dismissable toasts with optional avatars and click events!
|
|
34
|
+
|
|
35
|
+
## π¬ Showing Notifications
|
|
36
|
+
|
|
37
|
+
### Basic Message
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
toaster.show('Hello world!');
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### With Options
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
toaster.show({
|
|
47
|
+
message: 'File uploaded successfully!',
|
|
48
|
+
title: 'Success',
|
|
49
|
+
onClick: (event, close) => {
|
|
50
|
+
alert('Notification clicked!');
|
|
51
|
+
close(); // Close the notification manually
|
|
52
|
+
},
|
|
53
|
+
html: false,
|
|
54
|
+
avatar: 'https://example.com/avatar.png'
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## π More Documentation
|
|
60
|
+
|
|
61
|
+
For a complete reference of all options, internals, and usage patterns, check out the detailed documentation file:
|
|
62
|
+
|
|
63
|
+
> π **docs/v1/libs/TinyNotifyCenter.md**
|
|
64
|
+
> π **docs/v1/libs/TinyToastNotify.md**
|
|
65
|
+
|
|
66
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.10.2...1.11.0
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## π§© Release Summary β `v1.12.0` (June 26, 2025)
|
|
2
|
+
|
|
3
|
+
### β¨ Highlights
|
|
4
|
+
|
|
5
|
+
* π¦ **New Module: `TinyDragger`**
|
|
6
|
+
A fully customizable drag-and-drop class with advanced features like jail boundaries, collision detection, vibration feedback, proxy cloning, and auto-revert on drop.
|
|
7
|
+
π Full documentation: [`TinyDragger.md`](https://github.com/JasminDreasond/Tiny-Essentials/tree/main/docs/v1/libs/TinyDragger.md)
|
|
8
|
+
|
|
9
|
+
* π§ͺ **Test Suite & Examples**
|
|
10
|
+
|
|
11
|
+
* Test HTML environment: `test/html/TinyDragger`
|
|
12
|
+
* Style examples:
|
|
13
|
+
`dist/v1/css/TinyDraggerExample.css`
|
|
14
|
+
`dist/v1/css/TinyDraggerExample.min.css`
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
### π οΈ Whatβs New (Summary of Commits)
|
|
19
|
+
|
|
20
|
+
#### June 23, 2025
|
|
21
|
+
|
|
22
|
+
* β Added `TinyDragDropDetector` and fullscreen utilities.
|
|
23
|
+
* π Created docs for `TinyDragDropDetector`.
|
|
24
|
+
|
|
25
|
+
#### June 24, 2025
|
|
26
|
+
|
|
27
|
+
* π§Ό Added destroy methods to `TinyToastNotify` and `TinyNotifyCenter`.
|
|
28
|
+
|
|
29
|
+
#### June 25, 2025
|
|
30
|
+
|
|
31
|
+
* π Improved `fileManager` and `html` utility scripts.
|
|
32
|
+
* π€ Added `TinyUploadClicker` for custom file input behavior.
|
|
33
|
+
* π§ Added `getLatestBackupPath()` utility.
|
|
34
|
+
|
|
35
|
+
#### June 26, 2025
|
|
36
|
+
|
|
37
|
+
* π§± Built and finalized **`TinyDragger`** core functionality.
|
|
38
|
+
* π Added jsDoc support and runtime validators.
|
|
39
|
+
* βοΈ Included support for:
|
|
40
|
+
|
|
41
|
+
* `dropInJailOnly`
|
|
42
|
+
* `classDragCollision`
|
|
43
|
+
* `revertOnDrop`, `lockInsideJail`, and collision strategies
|
|
44
|
+
* β¨ New API methods:
|
|
45
|
+
|
|
46
|
+
* Getters/setters for config flags (`getDropInJailOnly()`, etc.)
|
|
47
|
+
* `checkDragCollision()` and `execCollision()` exposed
|
|
48
|
+
* Access to internal references (proxy, jail, collision, etc.)
|
|
49
|
+
* Getter for full vibration config and individual patterns
|
|
50
|
+
* π§½ Cleanup logic enhanced in `destroy()` method.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.11.0...1.12.0
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
## π TinyDragger β Multi-Collision Support!
|
|
2
|
+
|
|
3
|
+
### β¨ What's New
|
|
4
|
+
|
|
5
|
+
* π **Multi-collision support**
|
|
6
|
+
Now supports detecting **multiple collided elements** during dragging.
|
|
7
|
+
|
|
8
|
+
* New methods:
|
|
9
|
+
|
|
10
|
+
* `getAllCollidedElements(x, y)`
|
|
11
|
+
* `getAllCollidedElementsByRect(rect)`
|
|
12
|
+
* Internal handling of multiple collisions added via:
|
|
13
|
+
|
|
14
|
+
* `#addCollision(el)`
|
|
15
|
+
* `#removeCollision()`
|
|
16
|
+
|
|
17
|
+
* π§ Internal helpers for precise collision logic:
|
|
18
|
+
|
|
19
|
+
* `#getCollidedElement(...)`
|
|
20
|
+
* `#getCollidedElementByRect(...)`
|
|
21
|
+
|
|
22
|
+
* π§Ό Clean handling of collision CSS class for all intersecting elements.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### π Improvements
|
|
27
|
+
|
|
28
|
+
* Improved method consistency and validation logic.
|
|
29
|
+
* Full JSDoc annotations for new methods.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### π Note
|
|
34
|
+
|
|
35
|
+
Backward compatibility preserved. Single-element collision behavior remains by default β multi-collision is **optional**.
|
|
36
|
+
|
|
37
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.12.0...1.12.1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## ποΈ File Manager Migration β 2025-06-27
|
|
2
|
+
|
|
3
|
+
### β¨ Overview
|
|
4
|
+
|
|
5
|
+
This release introduces major improvements and module restructuring focused on the new `fileManager` system.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### β
Whatβs New
|
|
10
|
+
|
|
11
|
+
* **π Migrated `fileManager` structure**
|
|
12
|
+
|
|
13
|
+
* Internal restructuring to support a cleaner and more maintainable file management flow.
|
|
14
|
+
|
|
15
|
+
* **π New Async Utilities**
|
|
16
|
+
The following asynchronous file utilities were added:
|
|
17
|
+
|
|
18
|
+
* `listFilesAsync`
|
|
19
|
+
* `listDirsAsync`
|
|
20
|
+
* `fileSizeAsync`
|
|
21
|
+
* `dirSizeAsync`
|
|
22
|
+
* `isDirEmptyAsync`
|
|
23
|
+
* `clearDirectoryAsync`
|
|
24
|
+
|
|
25
|
+
* **π§ Fixed Module Import Issues**
|
|
26
|
+
|
|
27
|
+
* Resolved `fs` and `path` import problems caused by incorrect module usage in TypeScript.
|
|
28
|
+
|
|
29
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.12.1...1.12.2
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
### π What's New
|
|
2
|
+
|
|
3
|
+
### π `TinyDomReadyManager`
|
|
4
|
+
|
|
5
|
+
A flexible DOM readiness manager built to go beyond `DOMContentLoaded`!
|
|
6
|
+
|
|
7
|
+
#### β
Key Features:
|
|
8
|
+
|
|
9
|
+
* π **Callback queue** with `priority`, `once`, and `filter` support
|
|
10
|
+
* β¨ **`domOnly` mode** to execute handlers immediately after the DOM is ready, skipping async waits
|
|
11
|
+
* β³ **Promise integration** β delays full readiness until all custom promises resolve
|
|
12
|
+
* π§ **Safe execution**, with internal try-catch for all filters and handlers
|
|
13
|
+
* π New `isReady()` and `isDomReady()` public methods to track current readiness state
|
|
14
|
+
|
|
15
|
+
#### π Usage Example:
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
manager.onReady(() => {
|
|
19
|
+
console.log('DOM-only logic!');
|
|
20
|
+
}, { domOnly: true, priority: 10 });
|
|
21
|
+
|
|
22
|
+
manager.onReady(() => {
|
|
23
|
+
console.log('Waits for external API...');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
manager.addPromise(fetch('/api'));
|
|
27
|
+
manager.init();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### π§ͺ Internal Notes
|
|
33
|
+
|
|
34
|
+
* Handlers are sorted by priority
|
|
35
|
+
* `domOnly: true` handlers always run first
|
|
36
|
+
* The system is considered fully ready only after:
|
|
37
|
+
|
|
38
|
+
* DOMContentLoaded
|
|
39
|
+
* All added promises resolved
|
|
40
|
+
|
|
41
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.12.2...1.13.0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## β¨ New Utility Added: `installWindowHiddenScript`
|
|
2
|
+
|
|
3
|
+
This release introduces the `installWindowHiddenScript` function β a lightweight utility that dynamically applies CSS classes to an element based on window/tab visibility and focus state.
|
|
4
|
+
|
|
5
|
+
### π Highlights
|
|
6
|
+
|
|
7
|
+
* π§ Automatically detects when the window is visible or hidden
|
|
8
|
+
* π Triggers the initial state immediately on install
|
|
9
|
+
* π§ Returns a cleanup function to remove all listeners
|
|
10
|
+
|
|
11
|
+
Perfect for status indicators, visual feedback, and more!
|
|
12
|
+
|
|
13
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.13.1...1.13.2
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## π¦ Tiny updates time!
|
|
2
|
+
|
|
3
|
+
Tiny big upgrade incoming! This release brings **new utilities**!
|
|
4
|
+
|
|
5
|
+
### β¨ New Features
|
|
6
|
+
|
|
7
|
+
* **π `TinyNotifications`**
|
|
8
|
+
A utility class to manage browser notifications with sound, custom icons, text truncation, and click behavior.
|
|
9
|
+
|
|
10
|
+
* **βοΈ `safeTextTrim(text, limit)`**
|
|
11
|
+
Trims a text string to a specified character limit, attempting to avoid cutting words in half. If a space is found before the limit and itβs not too far from the limit (at least a fraction controlled by `safeCutZone`), the cut is made at that space; otherwise, the text is hard-cut at the limit. If the input text is shorter than or equal to the limit, it is returned unchanged.
|
|
12
|
+
|
|
13
|
+
* **π `readFileBlob(file, method)`**
|
|
14
|
+
A helper to read files using any `FileReader` method (`readAsText`, `readAsDataURL`, etc.).
|
|
15
|
+
Easy Promise-based file access.
|
|
16
|
+
|
|
17
|
+
* **𧬠`readBase64Blob(base64Data, mimeType)`**
|
|
18
|
+
Reads a file and returns its Base64 content using the FileReader API, with optional formatting as a full Data URL.
|
|
19
|
+
|
|
20
|
+
### π§ Enhancements
|
|
21
|
+
|
|
22
|
+
* **π§Ώ `installWindowHiddenScript()` now supports callbacks**
|
|
23
|
+
You can now hook into visibility change events (e.g. when the tab is hidden or regained focus) with custom behavior.
|
|
24
|
+
|
|
25
|
+
* **π `fetchJson()` now accepts arrays**
|
|
26
|
+
A bug was fixed where `Array` values werenβt properly serialized.
|
|
27
|
+
Arrays are now sent safely via JSON body β glitch resolved β
|
|
28
|
+
|
|
29
|
+
### π οΈ Documentation
|
|
30
|
+
|
|
31
|
+
* Updated JSDocs across all new methods and adjusted the internal style for consistency.
|
|
32
|
+
|
|
33
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.13.2...1.14.0
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
### π Highlights
|
|
2
|
+
|
|
3
|
+
#### π New Features
|
|
4
|
+
|
|
5
|
+
* **π Viewport Utilities:**
|
|
6
|
+
|
|
7
|
+
* `isInViewport` and `isScrolledIntoView` have been introduced, allowing developers to easily check if an element is visible or has been scrolled into view.
|
|
8
|
+
|
|
9
|
+
* **π§± Advanced Collision System (Major Update):**
|
|
10
|
+
|
|
11
|
+
* Brand new **collision detection utilities** added, replacing older logic with more powerful, accurate, and structured alternatives.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
### β¨ Improvements
|
|
16
|
+
|
|
17
|
+
* π **JSdoc Enhancements:**
|
|
18
|
+
|
|
19
|
+
* All collision utilities were documented with fully descriptive and consistent JSDoc blocks.
|
|
20
|
+
* New typedefs added: `Dirs`, `CollDirs`, `NegCollDirs`, `CollData`, `CollCenter`, `ObjRect`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### π Documentation
|
|
25
|
+
|
|
26
|
+
* π **New Documentation File:**
|
|
27
|
+
|
|
28
|
+
* A dedicated collision.md file was created under the `basics/` directory.
|
|
29
|
+
* It includes a full breakdown of the new collision API with emoji-powered sectioning, examples, and explanation of return structures.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### β
Summary
|
|
34
|
+
|
|
35
|
+
This update introduces a **major upgrade to collision detection and viewport logic**, making `tiny-essentials` more powerful and developer-friendly for UI interactions, animations, and layout-aware behavior.
|
|
36
|
+
|
|
37
|
+
> π¬ If you're using any geometry, layout, or scroll-based logic β this release is especially for you!
|
|
38
|
+
|
|
39
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.14.0...1.15.0
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
### β¨ Highlights
|
|
2
|
+
|
|
3
|
+
This release introduces **`TinyHtml`**, a new utility designed to simplify and empower DOM manipulation in a clean, chainable, and jQuery-inspired way.
|
|
4
|
+
|
|
5
|
+
### π¦ What's new
|
|
6
|
+
|
|
7
|
+
* **π§± TinyHtml**
|
|
8
|
+
|
|
9
|
+
* Lightweight and modern DOM utility class.
|
|
10
|
+
* Provides intuitive methods for:
|
|
11
|
+
|
|
12
|
+
* β
Element querying and traversal
|
|
13
|
+
* π― Event binding (`on`, `once`, `off`, `trigger`)
|
|
14
|
+
* π§© Attribute and property management
|
|
15
|
+
* π Size and position handling (`offset`, `outerWidth`, etc.)
|
|
16
|
+
* π§² Collision detection (including directional locking)
|
|
17
|
+
* π Viewport visibility checks (`isInViewport`, `isScrolledIntoView`)
|
|
18
|
+
* ποΈ DOM removal and utilities like `remove`, `index`, etc.
|
|
19
|
+
* Fully supports both static and instance-based usage.
|
|
20
|
+
|
|
21
|
+
### π οΈ Improvements & Internal
|
|
22
|
+
|
|
23
|
+
* Added internal event registry for better event management in `TinyHtml`.
|
|
24
|
+
* Enhanced compatibility for viewport and scroll calculations on `window`.
|
|
25
|
+
|
|
26
|
+
### β οΈ Deprecated Functions (to be removed in future release)
|
|
27
|
+
|
|
28
|
+
The following utility functions are now officially part of the `TinyHtml` class and have been marked as **deprecated**. They will remain temporarily available for backward compatibility, but **will be removed in a future release**.
|
|
29
|
+
|
|
30
|
+
| π§ Function | β
Replacement | βΉοΈ Status |
|
|
31
|
+
| ------------------------- | ---------------------------------------------- | ------------- |
|
|
32
|
+
| `areHtmlElsColliding` | `TinyHtml.isCollWith(el1, el2)` | β οΈ Deprecated |
|
|
33
|
+
| `areHtmlElsPerfColliding` | `TinyHtml.isCollPerfWith(el1, el2)` | β οΈ Deprecated |
|
|
34
|
+
| `getHtmlElBordersWidth` | `TinyHtml.borderWidth(el)` | β οΈ Deprecated |
|
|
35
|
+
| `getHtmlElBorders` | `TinyHtml.border(el)` | β οΈ Deprecated |
|
|
36
|
+
| `getHtmlElMargin` | `TinyHtml.margin(el)` | β οΈ Deprecated |
|
|
37
|
+
| `getHtmlElPadding` | `TinyHtml.padding(el)` | β οΈ Deprecated |
|
|
38
|
+
| `isInViewport` | `TinyHtml.isInViewport(el)` | β οΈ Deprecated |
|
|
39
|
+
| `isScrolledIntoView` | `TinyHtml.isScrolledIntoView(el)` | β οΈ Deprecated |
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.15.0...1.16.0
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
### π What's New?
|
|
2
|
+
|
|
3
|
+
#### π¦ `TinyAfterScrollWatcher`
|
|
4
|
+
|
|
5
|
+
This new utility makes it easier to respond when scrolling stops β perfect for optimizing animations, loading events, or interface feedback.
|
|
6
|
+
|
|
7
|
+
* π§ Detects when scrolling *ends* on an element or the window.
|
|
8
|
+
* β±οΈ Configurable inactivity timeout (default: 100ms).
|
|
9
|
+
* π Queue-based callback system for multiple triggers.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
const watcher = new TinyAfterScrollWatcher(window);
|
|
13
|
+
watcher.onScroll(() => {
|
|
14
|
+
watcher.doAfterScroll(() => {
|
|
15
|
+
console.log('[customBox] Scroll stopped!');
|
|
16
|
+
});
|
|
17
|
+
})
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use cases:
|
|
21
|
+
|
|
22
|
+
* Lazy-loading content
|
|
23
|
+
* UI transitions after scroll
|
|
24
|
+
* Analytics or tracking user movement
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### π¨ New Inline Style Getter
|
|
29
|
+
|
|
30
|
+
`style()` now uses the elementβs actual `style` attribute instead of `getComputedStyle`, allowing much more precise control over inline styles.
|
|
31
|
+
|
|
32
|
+
#### Example:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
TinyHtml.setStyle(element, 'backgroundColor', 'skyblue');
|
|
36
|
+
TinyHtml.getStyle(element, 'backgroundColor'); // "skyblue"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
* π§© Supports `camelCase` and `kebab-case`.
|
|
40
|
+
* π Unified with alias converter system (`cssPropAliases`).
|
|
41
|
+
* π§Ό Returns only **inline-defined** values (not computed ones).
|
|
42
|
+
|
|
43
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.16.0...1.16.1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
### β¨ What's New
|
|
2
|
+
|
|
3
|
+
#### `TinyAfterScrollWatcher` gets smarter with `onStop()`! πβ¨
|
|
4
|
+
|
|
5
|
+
You can now register functions to run **immediately after scrolling stops**, even **before** the `doAfterScroll()` queue is processed.
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
watcher.onStop(() => {
|
|
9
|
+
console.log('Scroll just stopped!');
|
|
10
|
+
});
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Need to remove it later? You can do that too:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
watcher.offStop(myStopCallback);
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### β
Summary
|
|
22
|
+
|
|
23
|
+
* β **Added**: `onStop(fn)` β triggers functions immediately after scroll ends.
|
|
24
|
+
* β **Added**: `offStop(fn)` β unregisters a previously added stop callback.
|
|
25
|
+
* π `onStop` runs **before** the `doAfterScroll` queue.
|
|
26
|
+
|
|
27
|
+
Enjoy the added precision! π
|
|
28
|
+
|
|
29
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.16.1...1.16.2
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## β¨ New Additions
|
|
2
|
+
|
|
3
|
+
This version brings two new utilities and a set of important improvements to existing features:
|
|
4
|
+
|
|
5
|
+
### β¨ New: TinySmartScroller
|
|
6
|
+
|
|
7
|
+
A customizable smart scroll utility with helpers to manage scroll position, height detection, container boundaries, and more, already usable for scroll-related enhancements and element visibility tracking.
|
|
8
|
+
|
|
9
|
+
### π² New: UltraRandomMsgGen
|
|
10
|
+
|
|
11
|
+
A flexible message generator for producing randomized messages with weighted logic. Useful for notification test systems, or random text.
|
|
12
|
+
|
|
13
|
+
### π οΈ TinyHtml updates
|
|
14
|
+
|
|
15
|
+
* `TinyHtml.query()` and `TinyHtml.getById()` now **return `null`** instead of **throw error** when the element is not found, making handling more consistent.
|
|
16
|
+
* Methods that previously returned `undefined` now support **chainable calls**, improving fluency in chaining TinyHtml operations.
|
|
17
|
+
* New helpers: `isInContainer`, `isFullyInContainer`, `boolCheck`, `isPageTop`, `isPageBottom`, and DOM creation helpers like `createTextNode()` and `createElementFrom()`.
|
|
18
|
+
* New `fetchBlob()` now available alongside `fetchJson()`, using the same logic structure but returns a Blob instead of JSON. Great for downloading files or media.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## π Documentation & Maintenance
|
|
23
|
+
|
|
24
|
+
* Various legacy utilities now include **deprecated tags in their jsDoc**, for safety and clarity.
|
|
25
|
+
π **Note**: These are *not* scheduled for removal β theyβre just flagged to avoid misuse or overreliance on unstable patterns.
|
|
26
|
+
* Improved jsDoc coverage across new and existing classes.
|
|
27
|
+
|
|
28
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.16.2...1.17.0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## β¨ New Features
|
|
2
|
+
|
|
3
|
+
### πΊ `TinyHtml.animate()`
|
|
4
|
+
|
|
5
|
+
You can now apply animations using the Web Animations API on one or more TinyElements with:
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
TinyHtml.animate(el, keyframes, options);
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or use the instance shortcut:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
el.animate(keyframes, options);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Supports both simple keyframe arrays and `PropertyIndexedKeyframes`.
|
|
18
|
+
Useful for declarative UI transitions without third-party libraries!
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### π― `TinyHtml.scrollToXY()`
|
|
23
|
+
|
|
24
|
+
A new method to **smoothly scroll** any element (or the window) to specific coordinates.
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
TinyHtml.scrollToXY(el, {
|
|
28
|
+
targetX: 100,
|
|
29
|
+
targetY: 200,
|
|
30
|
+
duration: 500,
|
|
31
|
+
easing: 'easeInOutQuad',
|
|
32
|
+
onAnimation: ({ x, y, time, isComplete }) => { ... }
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
* π§ Supports custom duration and easing names from `TinyHtml.easings`.
|
|
37
|
+
* π Provides per-frame callback (`onAnimation`) with scroll position and progress.
|
|
38
|
+
* π‘ Works for `HTMLElement` and `window`.
|
|
39
|
+
|
|
40
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.17.0...1.17.1
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## π¦ Text Power + Clipboard Magic! β¨
|
|
2
|
+
|
|
3
|
+
### π‘ What's New
|
|
4
|
+
|
|
5
|
+
#### βοΈ **TinyTextRangeEditor**
|
|
6
|
+
|
|
7
|
+
A powerful and flexible utility for manipulating text ranges inside `input` and `textarea` elements. Itβs designed for rich editing, precise control, and extensibility.
|
|
8
|
+
|
|
9
|
+
Features include:
|
|
10
|
+
|
|
11
|
+
* π― `insertText`, `wrapWithTag`, `insertSelfClosingTag`, `toggleTag`, `toggleCode` and more!
|
|
12
|
+
* π Chainable API support for clean syntax.
|
|
13
|
+
* β οΈ Built-in error throwing to prevent misuse.
|
|
14
|
+
* π§ Auto-spacing for inserted values (optional).
|
|
15
|
+
* π― Focus control and inline tag logic.
|
|
16
|
+
* π§© Attribute handling and fine-grained cursor/selection positioning.
|
|
17
|
+
|
|
18
|
+
#### π **TinyClipboard**
|
|
19
|
+
|
|
20
|
+
A clean and smart clipboard manager that supports:
|
|
21
|
+
|
|
22
|
+
* β
Modern `navigator.clipboard` API.
|
|
23
|
+
* π οΈ Fallback using `document.execCommand`.
|
|
24
|
+
* π Custom copy functions for both text and blobs.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### π§± Improvements
|
|
29
|
+
|
|
30
|
+
#### π§± **TinyHtml**
|
|
31
|
+
|
|
32
|
+
* βοΈ Added `listenForPaste`, `hasEventListener`, and `hasExactEventListener` methods to enhance DOM event logic.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### π Documentation
|
|
37
|
+
|
|
38
|
+
* π `TinyTextRangeEditor` and `TinyClipboard` added to the official documentation menu!
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
Enjoy the new editing powers and clipboard flexibility!
|
|
43
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.17.1...1.18.0
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## π οΈ Import Optimization!
|
|
2
|
+
|
|
3
|
+
This is a small but meaningful update focused on **performance and modularity**. Weβve moved two utility functions β `countObj` and `isJsonObject` β from `objFilter.mjs` into a new, dedicated file: `objChecker.mjs`.
|
|
4
|
+
|
|
5
|
+
### β¨ What's changed:
|
|
6
|
+
|
|
7
|
+
* β»οΈ **Refactored**: `countObj` and `isJsonObject` are now in their own module: `objChecker.mjs`.
|
|
8
|
+
* π This change helps reduce overhead by allowing more granular imports when using tree-shaking or custom bundlers.
|
|
9
|
+
|
|
10
|
+
No logic was changed β just cleaner structure and better control over what you load!
|
|
11
|
+
|
|
12
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.18.0...1.18.1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
### π New Utilities
|
|
2
|
+
This version brings **a big expansion of utilities** with new modules, major improvements, and extended documentation! π
|
|
3
|
+
|
|
4
|
+
* π **TinyTimeout**: Precise timeout controller with full jsDocs, tests, and examples.
|
|
5
|
+
* π¨ **TinyColorConverter**: Full **HSL** support and improved rainbow examples.
|
|
6
|
+
* π½ **TinyLocalStorage**: Powerful JSON-based storage with support for `Date`, `RegExp`, `BigInt`, `Symbol`, and more!
|
|
7
|
+
* π‘ **TinyEvents**: Minimal event system and listener limit handling.
|
|
8
|
+
|
|
9
|
+
### π Documentation & Examples
|
|
10
|
+
|
|
11
|
+
* All new modules fully documented and added to the main index.
|
|
12
|
+
* Examples updated to showcase real use-cases.
|
|
13
|
+
* README improvements for better onboarding.
|
|
14
|
+
|
|
15
|
+
### π οΈ Other Enhancements
|
|
16
|
+
|
|
17
|
+
* π§ **TinySmartScroller**: Listener system upgraded and integrated with `TinyEvents`.
|
|
18
|
+
* Minor internal fixes and file restructuring.
|
|
19
|
+
* Callback improvements for `installWindowHiddenScript`.
|
|
20
|
+
|
|
21
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.18.1...1.19.1
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## π‘οΈ Safer Custom Types
|
|
2
|
+
|
|
3
|
+
This patch release brings security and consistency improvements to the custom JSON type system of TinyLocalStorage! πβ¨
|
|
4
|
+
|
|
5
|
+
### π§ What's Changed
|
|
6
|
+
|
|
7
|
+
* **π§ `freezeType` flag added to `registerJsonType()`**
|
|
8
|
+
You can now freeze custom types to prevent them from being accidentally overwritten or removed.
|
|
9
|
+
|
|
10
|
+
* **β Secure deletion control**
|
|
11
|
+
`deleteJsonType()` now throws an error if you try to delete a frozen type. No more silent mistakes! π
|
|
12
|
+
|
|
13
|
+
* **π΅οΈββοΈ New helper: `hasJsonType()`**
|
|
14
|
+
Quickly check if a type is already registered.
|
|
15
|
+
|
|
16
|
+
* **π `getString()` now safely serializes values**
|
|
17
|
+
Improved internal handling ensures safer string output for objects, special types, and edge cases β preventing unexpected runtime issues or unsafe output formatting.
|
|
18
|
+
|
|
19
|
+
### β οΈ Security Notes
|
|
20
|
+
|
|
21
|
+
These changes prevent accidental or malicious tampering with critical type behavior by allowing type freezing and validation before registration. Perfect for safely extending JSON logic in shared environments!
|
|
22
|
+
|
|
23
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.19.1...1.19.2
|