@threlte/flex 2.1.1 → 2.2.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.
|
@@ -40,10 +40,13 @@
|
|
|
40
40
|
*/
|
|
41
41
|
const { width: computedWidth, height: computedHeight } = createUseDimensionsContext()
|
|
42
42
|
|
|
43
|
+
let shouldReflow = $state(false)
|
|
44
|
+
const reflow = () => (shouldReflow = true)
|
|
45
|
+
|
|
43
46
|
/**
|
|
44
47
|
* Reflowing inside useTask automatically batches reflows to 1 per frame.
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
useTask(
|
|
47
50
|
Symbol('threlte-flex-reflow'),
|
|
48
51
|
() => {
|
|
49
52
|
flexContext.emit('reflow:before')
|
|
@@ -107,11 +110,11 @@
|
|
|
107
110
|
height: computedHeight.current
|
|
108
111
|
})
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
shouldReflow = false
|
|
111
114
|
},
|
|
112
115
|
{
|
|
113
116
|
stage: reflowStage,
|
|
114
|
-
|
|
117
|
+
running: () => shouldReflow
|
|
115
118
|
}
|
|
116
119
|
)
|
|
117
120
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threlte/flex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"author": "Grischa Erbe <hello@legrisch.com> (https://legrisch.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Components to easily use the flexbox spec with Threlte",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"typescript": "5.9.2",
|
|
29
29
|
"typescript-eslint": "^8.32.0",
|
|
30
30
|
"vite": "^7.1.4",
|
|
31
|
-
"@threlte/core": "8.
|
|
32
|
-
"@threlte/extras": "9.
|
|
31
|
+
"@threlte/core": "8.4.0",
|
|
32
|
+
"@threlte/extras": "9.8.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"mitt": "^3.0.1",
|