@sharadox/scroll-web-library 0.6.0 → 0.7.0-development.26

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 ADDED
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ What changed in each version of `@sharadox/scroll-web-library`, newest first.
4
+
5
+ ## 0.7.0
6
+
7
+ SmoothScroll brings the page CSS Lenis needs (html.lenis heights, no browser smoothing while it runs, nothing scrolls while stopped), so sites drop their copies; built with library-build so the stylesheet ships; useScrolledPast; current library versions
8
+
9
+ ## 0.4.1
10
+
11
+ SectionLink leaves Next.js scrolling on for sections of other pages ("/en#contact"), so they land on the section
12
+
13
+ ## 0.4.0
14
+
15
+ SectionLink; SmoothScroll handles "#top" (top of the open page) and anchors whose click a Next.js Link already took; next is a peer dependency
16
+
17
+ ## 0.3.1
18
+
19
+ A finger swipe's step glide starts after the touch event, so smooth scrolling (Lenis) no longer stops it on phones
20
+
21
+ ## 0.3.0
22
+
23
+ Glide, scroll-steps
package/README.md CHANGED
@@ -15,15 +15,15 @@ pnpm add @sharadox/scroll-web-library
15
15
 
16
16
  ## API
17
17
 
18
- | Import | Export |
19
- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
20
- | `…/scrolled-past` | `useScrolledPast(point)`: whether the page has scrolled past a distance (or a share of the window's height), kept up to date |
21
- | `…/smooth-scroll` | `<SmoothScroll duration? anchorOffset?>` (renders nothing; default 1.15 s and -60 px; `#top` glides to the top of any page; in a page or a layout, and a glide from one page never carries over to the next) |
22
- | `…/section-link` | `<SectionLink href>`: Next.js `Link` for a section: on this page (`#id`) scrolling is left to `SmoothScroll` (`scroll={false}`); on another page (`/en#id`) Next.js scrolls there |
23
- | `…/active-section` | `useActiveSection(ids)` → `{ active, within, page }` (keep `ids` stable, for example a module constant) |
24
- | `…/glide` | `glideTo(top, { duration? })` |
25
- | `…/glide-into-view` | `glideIntoView(element, { offset? = 96, duration? })`: glides the element's top to `offset` below the window's top when it isn't wholly in view |
26
- | `…/scroll-steps` | `useScrollSteps(sectionRef, count, { duration? })` (0.9 s by default) |
18
+ | Import | Export |
19
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
20
+ | `…/scrolled-past` | `useScrolledPast(point)`: whether the page has scrolled past a distance (or a share of the window's height), kept up to date |
21
+ | `…/smooth-scroll` | `<SmoothScroll duration? anchorOffset?>` (renders nothing; default 1.15 s and -60 px; `#top` glides to the top of any page; in a page or a layout, and a glide from one page never carries over to the next; it brings the page CSS smooth scrolling needs, so sites don't write it) |
22
+ | `…/section-link` | `<SectionLink href>`: Next.js `Link` for a section: on this page (`#id`) scrolling is left to `SmoothScroll` (`scroll={false}`); on another page (`/en#id`) Next.js scrolls there |
23
+ | `…/active-section` | `useActiveSection(ids)` → `{ active, within, page }` (keep `ids` stable, for example a module constant) |
24
+ | `…/glide` | `glideTo(top, { duration? })` |
25
+ | `…/glide-into-view` | `glideIntoView(element, { offset? = 96, duration? })`: glides the element's top to `offset` below the window's top when it isn't wholly in view |
26
+ | `…/scroll-steps` | `useScrollSteps(sectionRef, count, { duration? })` (0.9 s by default) |
27
27
 
28
28
  ## Develop
29
29
 
@@ -0,0 +1,12 @@
1
+ /* What Lenis (the smooth scrolling) needs from the page: it moves the page itself, so the browser's own smoothing
2
+ stays off while it runs, and nothing scrolls while it's stopped (a menu or a viewer is open). */
3
+ html.lenis,
4
+ html.lenis body {
5
+ height: auto;
6
+ }
7
+ .lenis.lenis-smooth {
8
+ scroll-behavior: auto !important;
9
+ }
10
+ .lenis.lenis-stopped {
11
+ overflow: hidden;
12
+ }
@@ -1,4 +1,5 @@
1
1
  import type { SmoothScrollProperties } from "@sharadox/scroll-web-library/smooth-scroll/type";
2
+ import "./index.css";
2
3
  /**
3
4
  * Smooth, inertial page scrolling, including in-page anchor links (plain ones and `SectionLink`s) and `#top`, which
4
5
  * glides to the top of whatever page is open. A link to the page already open (the logo on the home page, for one)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/smooth-scroll/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAc9F;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAe,EAAE,YAAkB,EAAE,EAAE,sBAAsB,QAqE3F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/smooth-scroll/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,aAAa,CAAC;AAcrB;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAe,EAAE,YAAkB,EAAE,EAAE,sBAAsB,QAqE3F"}
@@ -3,6 +3,7 @@ import Lenis from "lenis";
3
3
  import { usePathname } from "next/navigation";
4
4
  import { useEffect } from "react";
5
5
  import { registerGlider } from "@sharadox/scroll-web-library/glide";
6
+ import "./index.css";
6
7
  /** Milliseconds after a page opens while Next.js places it (at the top, an anchor or where it was). */
7
8
  const SETTLING = 300;
8
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/smooth-scroll/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,uGAAuG;AACvG,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB;;;GAGG;AACH,IAAI,YAAY,GAAwB,IAAI,CAAC;AAE7C,qFAAqF;AACrF,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,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QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC/C,KAAK,EAAE,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC;QACF,YAAY,GAAG,IAAI,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,oGAAoG;YACpG,IAAI,YAAY,KAAK,IAAI;gBAAE,OAAO;YAClC,IAAI,EAAE,CAAC;YACP,YAAY,GAAG,IAAI,CAAC;YACpB,cAAc,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC"}
package/llms.txt CHANGED
@@ -3,7 +3,7 @@
3
3
  > Smooth scrolling (Lenis) and active-section tracking for React.
4
4
 
5
5
  - /scrolled-past: useScrolledPast(point: px | (windowHeight) => px) → boolean, kept up to date on scroll and resize (a bar that turns solid, an action that appears below the hero)
6
- - /smooth-scroll: <SmoothScroll duration=1.15 anchorOffset=-60 /> — off with prefers-reduced-motion; handles a[href^="#"] clicks
6
+ - /smooth-scroll: <SmoothScroll duration=1.15 anchorOffset=-60 /> — off with prefers-reduced-motion; handles a[href^="#"] clicks; brings the page CSS Lenis needs (sites no longer write it)
7
7
  - /active-section: useActiveSection(ids: readonly string[]) → { active: id at viewport middle, within: 0–1 through it, page: 0–1 page progress }
8
8
  - Peer: react. License: Sharadox Open Source License 0.1.0
9
9
  - SmoothScroll works in a page or a layout (it starts afresh for every pathname). Each page's smoothing stops the moment the address is another page's (link, back or forward) and a new page stops the previous one's, so a glide or trackpad momentum from the old page never moves the new one; for 300 ms after a page opens, wheel and touch are left to the browser while Next.js places it (0.4.2).
@@ -11,8 +11,5 @@
11
11
  - /glide: glideTo(top, { duration? }) — through the running SmoothScroll (Lenis) or window.scrollTo (smooth, or auto with reduced motion); registerGlider is internal to SmoothScroll
12
12
  - /glide-into-view: glideIntoView(element, { offset? = 96, duration? }) — glides the element's top to offset below the window's top, only when it isn't wholly in view (0.5.0)
13
13
  - /scroll-steps: useScrollSteps(sectionRef, count, { duration? = 0.9 }) — while the section is pinned, each wheel gesture (a pause of 180 ms starts a new one) or finger swipe (30 px+) glides exactly one step; step i sits at top + (i + 0.5) / count × (height − innerHeight); past the ends the page scrolls on
14
- - 0.3.0: glide, scroll-steps
15
- - 0.3.1: a finger swipe's step glide starts after the touch event, so smooth scrolling (Lenis) no longer stops it on phones
16
14
  - /section-link: <SectionLink href …LinkProps> — next/link; for "#id" on this page scroll={false} (SmoothScroll glides), for "/path#id" Next.js navigates and scrolls as usual; SmoothScroll glides (or, with reduced motion, jumps) to the anchor even though Link took the click
17
- - 0.4.0: SectionLink; SmoothScroll handles "#top" (top of the open page) and anchors whose click a Next.js Link already took; next is a peer dependency
18
- - 0.4.1: SectionLink leaves Next.js scrolling on for sections of other pages ("/en#contact"), so they land on the section
15
+ - Changes by version: CHANGELOG.md (in the package)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/scroll-web-library",
3
- "version": "0.6.0",
3
+ "version": "0.7.0-development.26",
4
4
  "description": "Scrolling for React websites: smooth inertial scrolling with anchor jumps (Lenis) and the active section with page progress.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENCA.md",
@@ -25,7 +25,8 @@
25
25
  "LICENCA.md",
26
26
  "LICENSE.md",
27
27
  "NOTICE.md",
28
- "llms.txt"
28
+ "llms.txt",
29
+ "CHANGELOG.md"
29
30
  ],
30
31
  "sideEffects": [
31
32
  "**/*.css"
@@ -50,9 +51,10 @@
50
51
  "homepage": "https://github.com/Sharadox/scroll-web-library#readme",
51
52
  "devDependencies": {
52
53
  "@sharadox/es-lint-configuration-web-library": "^0.1.1",
54
+ "@sharadox/library-build-web-library": "^0.1.2",
53
55
  "@sharadox/prettier-configuration-web-library": "^0.1.0",
54
56
  "@sharadox/turborepo-configuration-web-library": "^0.1.0",
55
- "@sharadox/type-script-configuration-web-library": "^0.2.0",
57
+ "@sharadox/type-script-configuration-web-library": "^0.2.2",
56
58
  "@sharadox/vitest-configuration-web-library": "^0.1.2",
57
59
  "@testing-library/dom": "^10.4.2",
58
60
  "@testing-library/react": "^16.3.3",
@@ -64,25 +66,25 @@
64
66
  "happy-dom": "^21.0.4",
65
67
  "husky": "^9.1.7",
66
68
  "lint-staged": "^17.6.0",
69
+ "next": "16.4.5",
67
70
  "prettier": "^3.10.0",
68
71
  "react": "^19.3.1",
69
72
  "react-dom": "^19.3.1",
70
73
  "turbo": "^2.11.10",
71
74
  "typedoc": "^0.28.20",
72
75
  "typescript": "6.0.3",
73
- "vitest": "^5.1.0",
74
- "next": "16.4.5"
76
+ "vitest": "^5.1.0"
75
77
  },
76
78
  "dependencies": {
77
- "@sharadox/web-library": "^0.8.0",
79
+ "@sharadox/web-library": "^0.9.0",
78
80
  "lenis": "^1.3.27"
79
81
  },
80
82
  "peerDependencies": {
81
- "react": ">=19",
82
- "next": ">=16"
83
+ "next": ">=16",
84
+ "react": ">=19"
83
85
  },
84
86
  "scripts": {
85
- "build": "rm -rf distribution && tsc -p tsconfig.build.json",
87
+ "build": "library-build",
86
88
  "lint": "eslint --max-warnings=0 .",
87
89
  "format": "prettier --write .",
88
90
  "format:check": "prettier --check .",