@cssxjs/runtime 0.2.27 → 0.2.29
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 +11 -0
- package/package.json +2 -2
- package/platformHelpers/web.js +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.29](https://github.com/startupjs/startupjs/compare/v0.2.28...v0.2.29) (2025-12-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **runtime:** show warning about missing window just once ([b2f07d7](https://github.com/startupjs/startupjs/commit/b2f07d7a6b4f203477057db61c8a2456660d9e87))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.2.27](https://github.com/startupjs/startupjs/compare/v0.2.26...v0.2.27) (2025-12-16)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @cssxjs/runtime
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cssxjs/runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"optional": true
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "a7b85051685eb9d3810f70ccf5136e68524ca5b4"
|
|
58
58
|
}
|
package/platformHelpers/web.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import dimensions, { getDimensionsInitialized, setDimensionsInitialized } from '../dimensions.js'
|
|
2
2
|
|
|
3
|
+
let shownWarningGetDimensions = false
|
|
4
|
+
let shownWarningInitDimensionsUpdater = false
|
|
5
|
+
|
|
3
6
|
export function getDimensions () {
|
|
4
7
|
if (typeof window === 'undefined' || !window.innerWidth || !window.innerHeight) {
|
|
5
|
-
|
|
8
|
+
if (!shownWarningGetDimensions) {
|
|
9
|
+
console.warn('[cssx] No "window" global variable. Falling back to constant window width and height of 1024x768')
|
|
10
|
+
shownWarningGetDimensions = true
|
|
11
|
+
}
|
|
6
12
|
return { width: 1024, height: 768 }
|
|
7
13
|
}
|
|
8
14
|
return {
|
|
@@ -24,7 +30,10 @@ export function initDimensionsUpdater () {
|
|
|
24
30
|
if (getDimensionsInitialized()) return
|
|
25
31
|
setDimensionsInitialized(true)
|
|
26
32
|
if (typeof window === 'undefined' || !window.innerWidth || !window.addEventListener) {
|
|
27
|
-
|
|
33
|
+
if (!shownWarningInitDimensionsUpdater) {
|
|
34
|
+
console.warn('[cssx] No "window" global variable. Setting default window width to 1024 and skipping updater.')
|
|
35
|
+
shownWarningInitDimensionsUpdater = true
|
|
36
|
+
}
|
|
28
37
|
dimensions.width = 1024
|
|
29
38
|
return
|
|
30
39
|
}
|