masua 0.11.8 → 0.12.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/LICENSE.md +1 -1
- package/index.ts +2 -2
- package/package.json +46 -23
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Matthias Giger, 2017 Spope
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/index.ts
CHANGED
|
@@ -195,7 +195,7 @@ function resizeThrottler(state: State) {
|
|
|
195
195
|
// ignore resize events as long as an actualResizeHandler execution is in the queue
|
|
196
196
|
if (!state.resizeTimeout) {
|
|
197
197
|
state.resizeTimeout = setTimeout(() => {
|
|
198
|
-
state.resizeTimeout
|
|
198
|
+
delete state.resizeTimeout
|
|
199
199
|
// IOS Safari throw random resize event on scroll, call layout only if size has changed
|
|
200
200
|
if (state.container.clientWidth !== state.width) {
|
|
201
201
|
layout(state)
|
|
@@ -222,7 +222,7 @@ function init(state: State) {
|
|
|
222
222
|
window.removeEventListener('resize', onResize)
|
|
223
223
|
if (state.resizeTimeout != null) {
|
|
224
224
|
window.clearTimeout(state.resizeTimeout)
|
|
225
|
-
state.resizeTimeout
|
|
225
|
+
delete state.resizeTimeout
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "masua",
|
|
3
3
|
"description": "Simple masonry layout library in TypeScript.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.1",
|
|
5
5
|
"repository": "github:tobua/masua",
|
|
6
6
|
"homepage": "https://tobua.github.io/masua",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,18 +11,22 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"check": "biome check --write .",
|
|
14
|
-
"types": "tsc"
|
|
14
|
+
"types": "tsc && tsc --project ./test/tsconfig.json"
|
|
15
15
|
},
|
|
16
|
+
"workspaces": [
|
|
17
|
+
"demo"
|
|
18
|
+
],
|
|
16
19
|
"devDependencies": {
|
|
17
|
-
"@biomejs/biome": "^2.
|
|
18
|
-
"@
|
|
19
|
-
"@types/
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"@biomejs/biome": "^2.5.3",
|
|
21
|
+
"@happy-dom/global-registrator": "^20.10.6",
|
|
22
|
+
"@types/bun": "^1.3.14",
|
|
23
|
+
"@types/react": "^19.2.17",
|
|
24
|
+
"typescript": "^7.0.2",
|
|
25
|
+
"zero-configuration": "^1.2.0"
|
|
22
26
|
},
|
|
23
27
|
"peerDependencies": {
|
|
24
28
|
"react": ">= 18",
|
|
25
|
-
"typescript": ">=
|
|
29
|
+
"typescript": ">= 6"
|
|
26
30
|
},
|
|
27
31
|
"peerDependenciesMeta": {
|
|
28
32
|
"react": {
|
|
@@ -32,9 +36,6 @@
|
|
|
32
36
|
"trustedDependencies": [
|
|
33
37
|
"zero-configuration"
|
|
34
38
|
],
|
|
35
|
-
"workspaces": [
|
|
36
|
-
"demo"
|
|
37
|
-
],
|
|
38
39
|
"type": "module",
|
|
39
40
|
"sideEffects": false,
|
|
40
41
|
"main": "./index.ts",
|
|
@@ -59,9 +60,6 @@
|
|
|
59
60
|
"react",
|
|
60
61
|
"typescript"
|
|
61
62
|
],
|
|
62
|
-
"publishConfig": {
|
|
63
|
-
"provenance": true
|
|
64
|
-
},
|
|
65
63
|
"configuration": {
|
|
66
64
|
"gitignore": "bundle",
|
|
67
65
|
"vscode": "biome",
|
|
@@ -77,18 +75,43 @@
|
|
|
77
75
|
}
|
|
78
76
|
]
|
|
79
77
|
},
|
|
80
|
-
"typescript":
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
78
|
+
"typescript": [
|
|
79
|
+
{
|
|
80
|
+
"extends": "plugin",
|
|
81
|
+
"compilerOptions": {
|
|
82
|
+
"jsx": "react-jsx",
|
|
83
|
+
"types": [
|
|
84
|
+
"bun"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"files": [
|
|
88
|
+
"index.ts",
|
|
89
|
+
"react.tsx"
|
|
90
|
+
]
|
|
84
91
|
},
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
{
|
|
93
|
+
"extends": "web",
|
|
94
|
+
"folder": "test",
|
|
95
|
+
"compilerOptions": {
|
|
96
|
+
"types": [
|
|
97
|
+
"bun",
|
|
98
|
+
"react"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"includes": [
|
|
102
|
+
"*.test.tsx"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
90
106
|
"biome": {
|
|
91
107
|
"extends": "recommended",
|
|
108
|
+
"linter": {
|
|
109
|
+
"rules": {
|
|
110
|
+
"performance": {
|
|
111
|
+
"noDelete": "off"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
92
115
|
"files": {
|
|
93
116
|
"includes": [
|
|
94
117
|
"**/*",
|