@linear_non/stellar-libs 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/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # stellar-libs
2
+
3
+ A collection of lightweight, reusable frontend UI behavior modules — built to work seamlessly with [`stellar-kit`](https://www.npmjs.com/package/@linear_non/stellar-kit) and the [Stellar](https://github.com/nonlinearstudio/stellar) frontend system. Each library is self-contained, configurable, and designed to be dropped into modular websites.
4
+
5
+ ## ✨ Features
6
+
7
+ - **Sticky**: Basic sticky logic for DOM elements
8
+ - **SplitOnScroll**: Text splitting + reveal synced to scroll
9
+ - **Smooth**: Smooth scroll instance using Virtual Scroll
10
+ - Designed for plug-and-play usage inside Stellar Template
11
+ - Works with `kitStore`, `Resize`, `Scroll`, `Raf`, and GSAP if needed
12
+
13
+ ## 📦 Installation
14
+
15
+ ```bash
16
+ npm install @linear_non/stellar-libs
17
+ ```
18
+
19
+ > Note: Some libraries rely on `stellar-kit` for shared events, scroll, or utilities. Be sure to install both if needed:
20
+
21
+ ```bash
22
+ npm install @linear_non/stellar-kit
23
+ ```
24
+
25
+ ## 📁 Folder Structure
26
+
27
+ ```
28
+ stellar-libs/
29
+ ├── src/
30
+ │ ├── Sticky/ # Sticky behavior module
31
+ │ ├── SplitOnScroll/ # Scroll-triggered text reveals
32
+ │ ├── Smooth/ # Smooth scrolling system
33
+ │ └── ScrollBar/ # Custom scrollbar component
34
+ ├── dev/ # Dev playgrounds for each lib
35
+ ├── index.js # Entry point for exports
36
+ └── vite.config.js # Vite config to run individual demos
37
+ ```
38
+
39
+ ## 🧪 Local Development
40
+
41
+ ```bash
42
+ npm install
43
+ npm run dev
44
+ ```
45
+
46
+ > This launches a Vite server and scans `dev/*/index.html` to preview each module. You can open individual demos for testing.
47
+
48
+ ## 🛠️ Usage Example
49
+
50
+ ```js
51
+ import { Sticky } from "@linear_non/stellar-libs";
52
+
53
+ const sticky = new Sticky({
54
+ el: qs(".sticky"),
55
+ sticky: qs(".sticky-content"),
56
+ });
57
+ ```
58
+
59
+ > You can find usage examples in each library’s README file also an HTML markup example. You can see a live example inside the `dev/` folder.
60
+
61
+ ---
62
+
63
+ ### ✅ TODO
64
+
65
+ - [ ] Implement `Marquee` module
66
+ - [ ] Implement `Dropdown` module
67
+ - [ ] Implement `Lenis` scroll
68
+ - [ ] Update Readme files for each component
69
+
70
+ ---
71
+
72
+ Made with ❤️ by [Non-Linear Studio](https://non-linear.studio)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linear_non/stellar-libs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Reusable JavaScript libraries for Non-Linear Studio projects.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "author": "Non-Linear Studio",
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@linear_non/stellar-kit": "^1.0.7"
28
+ "@linear_non/stellar-kit": "^1.0.11"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@linear_non/prettier-config": "^1.0.6",
@@ -1,4 +1,5 @@
1
1
  import { splitText, reverseSplit } from "@linear_non/stellar-kit/utils";
2
+ import { EVENTS } from "@linear_non/stellar-kit/events";
2
3
  import { ScrollTrigger } from "@linear_non/stellar-kit/libraries/gsap";
3
4
 
4
5
  export default class SplitonScroll {
@@ -41,9 +42,9 @@ export default class SplitonScroll {
41
42
 
42
43
  handleEnter() {
43
44
  const split = splitText(this.splitText);
44
- split.on("ready", (splits) => {
45
+ split.on(EVENTS.APP_SPLITTEXT_READY, (splits) => {
45
46
  this.splits = [...splits];
46
- this.animateCallback();
47
+ this.animateCallback([...splits]);
47
48
  });
48
49
  }
49
50
 
package/src/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import Sticky from "./Sticky";
2
2
  import Smooth from "./Smooth";
3
+ import SplitonScroll from "./SplitOnScroll";
3
4
 
4
- export { Sticky, Smooth };
5
+ export { Sticky, Smooth, SplitonScroll };