@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.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* TsUtilsLib v2.
|
|
2
|
+
* TsUtilsLib v2.3.0 (esm)
|
|
3
3
|
* (c) 2023-2025 PahkaSoft
|
|
4
4
|
* Licensed under the MIT License
|
|
5
5
|
*/
|
|
@@ -1447,6 +1447,7 @@ __export(dom_exports, {
|
|
|
1447
1447
|
getPadding: () => getPadding,
|
|
1448
1448
|
getWidth: () => getWidth,
|
|
1449
1449
|
hasClass: () => hasClass,
|
|
1450
|
+
injectCss: () => injectCss,
|
|
1450
1451
|
removeClass: () => removeClass,
|
|
1451
1452
|
removeFromParent: () => removeFromParent,
|
|
1452
1453
|
setHeight: () => setHeight,
|
|
@@ -1630,6 +1631,15 @@ function getCanvasTextWidth(text, font) {
|
|
|
1630
1631
|
ctx.font = font;
|
|
1631
1632
|
return ctx.measureText(text).width;
|
|
1632
1633
|
}
|
|
1634
|
+
function injectCss(styleId, styleCss) {
|
|
1635
|
+
if (styleId === "" || styleCss === "") return;
|
|
1636
|
+
if (typeof document === "undefined") return;
|
|
1637
|
+
if (document.getElementById(styleId)) return;
|
|
1638
|
+
const style = document.createElement("style");
|
|
1639
|
+
style.id = styleId;
|
|
1640
|
+
style.textContent = styleCss;
|
|
1641
|
+
document.head.appendChild(style);
|
|
1642
|
+
}
|
|
1633
1643
|
|
|
1634
1644
|
// src/utils/math/index.ts
|
|
1635
1645
|
var math_exports = {};
|
|
@@ -4367,7 +4377,7 @@ var LinkedList = class _LinkedList extends BaseContainer {
|
|
|
4367
4377
|
|
|
4368
4378
|
// src/index.ts
|
|
4369
4379
|
function getLibInfo() {
|
|
4370
|
-
return "TsUtilsLib v2.
|
|
4380
|
+
return "TsUtilsLib v2.3.0 (esm)";
|
|
4371
4381
|
}
|
|
4372
4382
|
|
|
4373
4383
|
export { AnchoredRect, assert_exports as Assert, BaseContainer, BiMap, cookies_exports as Cookies, DefaultArray, DefaultEqualityFn, device_exports as Device, guard_exports as Guard, IndexArray, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, utils_exports as Utils, ValueSet, Vec, asMulti, getLibInfo };
|