@altano/textfit 1.0.0 → 1.0.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/dist/index.d.ts +2 -1
- package/dist/index.js +1 -2
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ interface Options {
|
|
|
42
42
|
*/
|
|
43
43
|
sizeMultipleOf?: number;
|
|
44
44
|
}
|
|
45
|
-
declare function textFit(elements: HTMLElement | HTMLElement[], options?: Options): void;
|
|
45
|
+
declare function textFit(elements: HTMLElement | HTMLElement[], options?: Options): void;
|
|
46
|
+
//#endregion
|
|
46
47
|
export { Options, textFit };
|
|
47
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -11,8 +11,7 @@ const defaultSettings = {
|
|
|
11
11
|
};
|
|
12
12
|
function textFit(elements, options = {}) {
|
|
13
13
|
const settings = Object.assign({}, defaultSettings, options);
|
|
14
|
-
|
|
15
|
-
els.forEach((el) => {
|
|
14
|
+
(Array.isArray(elements) ? elements : [elements]).forEach((el) => {
|
|
16
15
|
processItem(el, settings);
|
|
17
16
|
});
|
|
18
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altano/textfit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A fast, jQuery-free text sizing component that quickly fits single and multi-line text to the width (and optionally height) of its container.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fit",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dist/**/*.d.ts"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@arethetypeswrong/cli": "^0.
|
|
31
|
-
"@playwright/test": "1.
|
|
32
|
-
"@types/node": "^
|
|
30
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
31
|
+
"@playwright/test": "1.58.2",
|
|
32
|
+
"@types/node": "^25.5.0",
|
|
33
33
|
"depcheck": "^1.4.7",
|
|
34
|
-
"tsdown": "^0.
|
|
35
|
-
"typescript": "^5.
|
|
36
|
-
"vite": "^
|
|
37
|
-
"vitest": "^
|
|
34
|
+
"tsdown": "^0.21.4",
|
|
35
|
+
"typescript": "^5.9.3",
|
|
36
|
+
"vite": "^7.3.1",
|
|
37
|
+
"vitest": "^4.1.0",
|
|
38
38
|
"@altano/build-config": "0.0.1",
|
|
39
39
|
"@altano/tsconfig": "0.0.1"
|
|
40
40
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "tsdown --config ../build-config/tsdown.config.browser.ts",
|
|
45
|
+
"build": "tsdown --config-loader unrun --config ../build-config/tsdown.config.browser.ts",
|
|
46
46
|
"check:exports": "attw --pack . --profile esm-only --quiet",
|
|
47
47
|
"check:types:src": "tsc --noEmit",
|
|
48
48
|
"check:types:test": "tsc --noEmit --project ./tests/tsconfig.json",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"lint": "eslint",
|
|
54
54
|
"lint:fix": "TIMING=1 pnpm lint --fix",
|
|
55
55
|
"lint:timing": "TIMING=1 pnpm lint",
|
|
56
|
-
"test:e2e": "playwright test",
|
|
56
|
+
"test:e2e": "NODE_OPTIONS='--no-experimental-strip-types' playwright test",
|
|
57
57
|
"test:e2e:server": "vite --strictPort --port 8173 ./tests/e2e",
|
|
58
58
|
"test:e2e:ui": "playwright test --ui"
|
|
59
59
|
}
|