@linear_non/stellar-kit 1.0.11 → 1.1.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/README.md +2 -4
- package/events/Resize.js +7 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,9 +6,7 @@ A modular frontend utility kit for custom websites. Built for performance, exten
|
|
|
6
6
|
|
|
7
7
|
- RAF-based update loop (`Raf`)
|
|
8
8
|
- Virtual scroll support (`Scroll`)
|
|
9
|
-
- Smooth scrolling with transformable sections (`Smooth`)
|
|
10
9
|
- Viewport-based resize tracking (`Resize`)
|
|
11
|
-
- Custom scrollbar component
|
|
12
10
|
- Centralized event system (`Emitter`)
|
|
13
11
|
- Mouse tracking (`Mouse`)
|
|
14
12
|
- Utility helpers (DOM selection, bounds, clamping, etc.)
|
|
@@ -25,9 +23,9 @@ npm install @linear_non/stellar-kit
|
|
|
25
23
|
|
|
26
24
|
```
|
|
27
25
|
stellar-kit/
|
|
28
|
-
├── classes/ # Core logic:
|
|
26
|
+
├── classes/ # Core logic: Manager, Component.
|
|
29
27
|
├── events/ # Emitter system: Raf, Resize, Scroll, Mouse, etc.
|
|
30
|
-
├── utils/ # Utilities: bounds, clamp, selectors, etc.
|
|
28
|
+
├── utils/ # Utilities: bounds, clamp, selectors, sniffer, etc.
|
|
31
29
|
├── kitStore.js # Central store shared across all modules
|
|
32
30
|
└── index.js # Entry point for setupKit and kitStore access
|
|
33
31
|
```
|
package/events/Resize.js
CHANGED
|
@@ -52,11 +52,14 @@ export default class Resize {
|
|
|
52
52
|
|
|
53
53
|
updateBodyClasses() {
|
|
54
54
|
const { vw, vh } = sizes
|
|
55
|
-
const
|
|
56
|
-
const
|
|
55
|
+
const isLandscape = vw > vh
|
|
56
|
+
const isDesktop = sniffer.isDesktop
|
|
57
57
|
|
|
58
|
-
document.body.classList.
|
|
59
|
-
document.body.classList.
|
|
58
|
+
document.body.classList.toggle("is-landscape", isLandscape)
|
|
59
|
+
document.body.classList.toggle("is-portrait", !isLandscape)
|
|
60
|
+
|
|
61
|
+
document.body.classList.toggle("is-desktop", isDesktop)
|
|
62
|
+
document.body.classList.toggle("is-device", !isDesktop)
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
on() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linear_non/stellar-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Stellar frontend core for Non-Linear Studio projects.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"./utils": "./utils/index.js",
|
|
9
9
|
"./classes": "./classes/index.js",
|
|
10
10
|
"./events": "./events/index.js",
|
|
11
|
-
"./
|
|
11
|
+
"./gsap": "./libraries/gsap/index.js"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"scripts": {
|