UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

42 lines (30 loc) â€ĸ 2.33 kB
### ✨ Highlights This release introduces **`TinyHtml`**, a new utility designed to simplify and empower DOM manipulation in a clean, chainable, and jQuery-inspired way. ### đŸ“Ļ What's new * **🧱 TinyHtml** * Lightweight and modern DOM utility class. * Provides intuitive methods for: * ✅ Element querying and traversal * đŸŽ¯ Event binding (`on`, `once`, `off`, `trigger`) * 🧩 Attribute and property management * 📏 Size and position handling (`offset`, `outerWidth`, etc.) * 🧲 Collision detection (including directional locking) * 👀 Viewport visibility checks (`isInViewport`, `isScrolledIntoView`) * đŸ—‘ī¸ DOM removal and utilities like `remove`, `index`, etc. * Fully supports both static and instance-based usage. ### đŸ› ī¸ Improvements & Internal * Added internal event registry for better event management in `TinyHtml`. * Enhanced compatibility for viewport and scroll calculations on `window`. ### âš ī¸ Deprecated Functions (to be removed in future release) 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**. | 🔧 Function | ✅ Replacement | â„šī¸ Status | | ------------------------- | ---------------------------------------------- | ------------- | | `areHtmlElsColliding` | `TinyHtml.isCollWith(el1, el2)` | âš ī¸ Deprecated | | `areHtmlElsPerfColliding` | `TinyHtml.isCollPerfWith(el1, el2)` | âš ī¸ Deprecated | | `getHtmlElBordersWidth` | `TinyHtml.borderWidth(el)` | âš ī¸ Deprecated | | `getHtmlElBorders` | `TinyHtml.border(el)` | âš ī¸ Deprecated | | `getHtmlElMargin` | `TinyHtml.margin(el)` | âš ī¸ Deprecated | | `getHtmlElPadding` | `TinyHtml.padding(el)` | âš ī¸ Deprecated | | `isInViewport` | `TinyHtml.isInViewport(el)` | âš ī¸ Deprecated | | `isScrolledIntoView` | `TinyHtml.isScrolledIntoView(el)` | âš ī¸ Deprecated | **Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.15.0...1.16.0