@tspro/ts-utils-lib 2.2.1 → 2.3.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.es5.iife.js +1 -1
- package/dist/index.es5.polyfilled.iife.js +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/index.d.mts +0 -1541
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
* TsUtilsLib v2.
|
|
4
|
+
* TsUtilsLib v2.3.0 (cjs)
|
|
5
5
|
* (c) 2023-2025 PahkaSoft
|
|
6
6
|
* Licensed under the MIT License
|
|
7
7
|
*/
|
|
@@ -1449,6 +1449,7 @@ __export(dom_exports, {
|
|
|
1449
1449
|
getPadding: () => getPadding,
|
|
1450
1450
|
getWidth: () => getWidth,
|
|
1451
1451
|
hasClass: () => hasClass,
|
|
1452
|
+
injectCss: () => injectCss,
|
|
1452
1453
|
removeClass: () => removeClass,
|
|
1453
1454
|
removeFromParent: () => removeFromParent,
|
|
1454
1455
|
setHeight: () => setHeight,
|
|
@@ -1632,6 +1633,15 @@ function getCanvasTextWidth(text, font) {
|
|
|
1632
1633
|
ctx.font = font;
|
|
1633
1634
|
return ctx.measureText(text).width;
|
|
1634
1635
|
}
|
|
1636
|
+
function injectCss(styleId, styleCss) {
|
|
1637
|
+
if (styleId === "" || styleCss === "") return;
|
|
1638
|
+
if (typeof document === "undefined") return;
|
|
1639
|
+
if (document.getElementById(styleId)) return;
|
|
1640
|
+
const style = document.createElement("style");
|
|
1641
|
+
style.id = styleId;
|
|
1642
|
+
style.textContent = styleCss;
|
|
1643
|
+
document.head.appendChild(style);
|
|
1644
|
+
}
|
|
1635
1645
|
|
|
1636
1646
|
// src/utils/math/index.ts
|
|
1637
1647
|
var math_exports = {};
|
|
@@ -4369,7 +4379,7 @@ var LinkedList = class _LinkedList extends BaseContainer {
|
|
|
4369
4379
|
|
|
4370
4380
|
// src/index.ts
|
|
4371
4381
|
function getLibInfo() {
|
|
4372
|
-
return "TsUtilsLib v2.
|
|
4382
|
+
return "TsUtilsLib v2.3.0 (cjs)";
|
|
4373
4383
|
}
|
|
4374
4384
|
|
|
4375
4385
|
exports.AnchoredRect = AnchoredRect;
|