@gridui/follow-scroll 1.0.7 → 1.0.9

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 CHANGED
@@ -6,3 +6,5 @@ Import components from `@gridui/follow-scroll` and load `@gridui/follow-scroll/s
6
6
  Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
7
7
 
8
8
  See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/follow-scroll/.changeset/history).
9
+
10
+ [Component reference](docs/reference/README.md) contains focused API pages for each public component.
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ var useFollowScroll = ({ threshold = 48, onFollowingChange } = {}) => {
71
71
 
72
72
  // src/follow-scroll/follow-scroll.tsx
73
73
  import { Button } from "@gridui/button";
74
- import { useScrollbars } from "@gridui/overlay";
74
+ import { useInteractionOutline, useScrollbars } from "@gridui/overlay";
75
75
  import { cn } from "@gridui/style-utils";
76
76
  import { jsx, jsxs } from "react/jsx-runtime";
77
77
  var FollowScroll = (props) => {
@@ -80,7 +80,8 @@ var FollowScroll = (props) => {
80
80
  ...threshold === void 0 ? {} : { threshold },
81
81
  ...onFollowingChange === void 0 ? {} : { onFollowingChange }
82
82
  });
83
- const scrollRef = useScrollbars({ ref: viewportRef });
83
+ const scrollbarRef = useScrollbars({ ref: viewportRef });
84
+ const scrollRef = useInteractionOutline({ ref: scrollbarRef });
84
85
  return /* @__PURE__ */ jsxs(
85
86
  "div",
86
87
  {
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/follow-scroll/use-follow-scroll.ts", "../src/follow-scroll/follow-scroll.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Follow Scroll\n * @namespace FollowScroll\n * @description Use Follow Scroll\n */\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport type FollowScrollOptions = {\n readonly threshold?: number;\n readonly onFollowingChange?: (following: boolean) => void;\n};\n\nexport const useFollowScroll = ({ threshold = 48, onFollowingChange }: FollowScrollOptions = {}) => {\n if (!Number.isFinite(threshold) || threshold < 0) {\n throw new Error(\"FollowScroll threshold must be finite and nonnegative.\");\n }\n const viewportRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const followingRef = useRef(true);\n const [\n following,\n setFollowing,\n ] = useState(true);\n const changeFollowing = useCallback((next: boolean) => {\n if (followingRef.current === next) {\n return;\n }\n followingRef.current = next;\n setFollowing(next);\n onFollowingChange?.(next);\n }, [onFollowingChange]);\n const scrollToEnd = useCallback(() => {\n const viewport = viewportRef.current;\n if (viewport) {\n changeFollowing(true);\n viewport.scrollTop = viewport.scrollHeight;\n }\n }, [changeFollowing]);\n useEffect(() => {\n const viewport = viewportRef.current;\n const content = contentRef.current;\n if (!viewport || !content) {\n return;\n }\n let frame = 0;\n const followGrowth = () => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n const distance = viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop;\n if (followingRef.current || distance <= threshold) {\n changeFollowing(true);\n viewport.scrollTop = viewport.scrollHeight;\n }\n });\n };\n const onScroll = () => {\n const distance = viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop;\n changeFollowing(distance <= threshold);\n };\n const observer = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(followGrowth);\n observer?.observe(content);\n observer?.observe(viewport);\n viewport.addEventListener(\"scroll\", onScroll);\n followGrowth();\n return () => {\n cancelAnimationFrame(frame);\n observer?.disconnect();\n viewport.removeEventListener(\"scroll\", onScroll);\n };\n }, [\n threshold,\n changeFollowing,\n ]);\n return {\n viewportRef,\n contentRef,\n following,\n scrollToEnd,\n };\n};\n", "/**\n * @author WMXPY\n * @package Follow Scroll\n * @namespace FollowScroll\n * @description Follow Scroll\n */\n\nimport { type FollowScrollOptions, useFollowScroll } from \"./use-follow-scroll\";\nimport { Button } from \"@gridui/button\";\nimport { useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type FollowScrollProps = Omit<ComponentPropsWithRef<\"div\">, \"onScroll\"> & FollowScrollOptions & {\n readonly label: string;\n readonly jumpLabel: string;\n};\n\nexport const FollowScroll: FC<FollowScrollProps> = (props: FollowScrollProps) => {\n const { ref: forwardedRef, label, jumpLabel, threshold, onFollowingChange, children, className, ...restProps } = props;\n const { viewportRef, contentRef, following, scrollToEnd } = useFollowScroll({\n ...(threshold === undefined ? {} : { threshold }),\n ...(onFollowingChange === undefined ? {} : { onFollowingChange }),\n });\n const scrollRef = useScrollbars({ ref: viewportRef });\n return (<div\n {...restProps}\n ref={forwardedRef}\n className={cn(\"gridui-follow-scroll\", className)}\n >\n <div\n ref={scrollRef}\n className=\"gridui-follow-scroll-viewport\"\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n >\n <div\n ref={contentRef}\n className=\"gridui-follow-scroll-content\"\n >\n {children}\n </div>\n </div>\n {!following && (<Button\n className=\"gridui-follow-scroll-jump\"\n size=\"small\"\n onClick={() => {\n scrollToEnd();\n viewportRef.current?.focus({ preventScroll: true });\n }}\n >\n {jumpLabel}\n </Button>)}\n </div>);\n};\n"],
5
- "mappings": ";AAOA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AAOlD,IAAM,kBAAkB,CAAC,EAAE,YAAY,IAAI,kBAAkB,IAAyB,CAAC,MAAM;AAChG,MAAI,CAAC,OAAO,SAAS,SAAS,KAAK,YAAY,GAAG;AAC9C,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC5E;AACA,QAAM,cAAc,OAAuB,IAAI;AAC/C,QAAM,aAAa,OAAuB,IAAI;AAC9C,QAAM,eAAe,OAAO,IAAI;AAChC,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,IAAI;AACj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;AACJ;;;ACzEA,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,UAAU;AAeP,SAYA,KAZA;AAPL,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM,EAAE,KAAK,cAAc,OAAO,WAAW,WAAW,mBAAmB,UAAU,WAAW,GAAG,UAAU,IAAI;AACjH,QAAM,EAAE,aAAa,YAAY,WAAW,YAAY,IAAI,gBAAgB;AAAA,IACxE,GAAI,cAAc,SAAY,CAAC,IAAI,EAAE,UAAU;AAAA,IAC/C,GAAI,sBAAsB,SAAY,CAAC,IAAI,EAAE,kBAAkB;AAAA,EACnE,CAAC;AACD,QAAM,YAAY,cAAc,EAAE,KAAK,YAAY,CAAC;AACpD,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,WAAW,GAAG,wBAAwB,SAAS;AAAA,MAE/C;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,KAAK;AAAA,YACL,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAY;AAAA,YACZ,UAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACG,KAAK;AAAA,gBACL,WAAU;AAAA,gBAET;AAAA;AAAA,YACL;AAAA;AAAA,QACJ;AAAA,QACC,CAAC,aAAc;AAAA,UAAC;AAAA;AAAA,YACb,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAS,MAAM;AACX,0BAAY;AACZ,0BAAY,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;AAAA,YACtD;AAAA,YAEC;AAAA;AAAA,QACL;AAAA;AAAA;AAAA,EACJ;AACJ;",
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Follow Scroll\n * @namespace FollowScroll\n * @description Use Follow Scroll\n */\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport type FollowScrollOptions = {\n readonly threshold?: number;\n readonly onFollowingChange?: (following: boolean) => void;\n};\n\nexport const useFollowScroll = ({ threshold = 48, onFollowingChange }: FollowScrollOptions = {}) => {\n if (!Number.isFinite(threshold) || threshold < 0) {\n throw new Error(\"FollowScroll threshold must be finite and nonnegative.\");\n }\n const viewportRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const followingRef = useRef(true);\n const [\n following,\n setFollowing,\n ] = useState(true);\n const changeFollowing = useCallback((next: boolean) => {\n if (followingRef.current === next) {\n return;\n }\n followingRef.current = next;\n setFollowing(next);\n onFollowingChange?.(next);\n }, [onFollowingChange]);\n const scrollToEnd = useCallback(() => {\n const viewport = viewportRef.current;\n if (viewport) {\n changeFollowing(true);\n viewport.scrollTop = viewport.scrollHeight;\n }\n }, [changeFollowing]);\n useEffect(() => {\n const viewport = viewportRef.current;\n const content = contentRef.current;\n if (!viewport || !content) {\n return;\n }\n let frame = 0;\n const followGrowth = () => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(() => {\n const distance = viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop;\n if (followingRef.current || distance <= threshold) {\n changeFollowing(true);\n viewport.scrollTop = viewport.scrollHeight;\n }\n });\n };\n const onScroll = () => {\n const distance = viewport.scrollHeight - viewport.clientHeight - viewport.scrollTop;\n changeFollowing(distance <= threshold);\n };\n const observer = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(followGrowth);\n observer?.observe(content);\n observer?.observe(viewport);\n viewport.addEventListener(\"scroll\", onScroll);\n followGrowth();\n return () => {\n cancelAnimationFrame(frame);\n observer?.disconnect();\n viewport.removeEventListener(\"scroll\", onScroll);\n };\n }, [\n threshold,\n changeFollowing,\n ]);\n return {\n viewportRef,\n contentRef,\n following,\n scrollToEnd,\n };\n};\n", "/**\n * @author WMXPY\n * @package Follow Scroll\n * @namespace FollowScroll\n * @description Follow Scroll\n */\n\nimport { type FollowScrollOptions, useFollowScroll } from \"./use-follow-scroll\";\nimport { Button } from \"@gridui/button\";\nimport { useInteractionOutline, useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type FollowScrollProps = Omit<ComponentPropsWithRef<\"div\">, \"onScroll\"> & FollowScrollOptions & {\n readonly label: string;\n readonly jumpLabel: string;\n};\n\nexport const FollowScroll: FC<FollowScrollProps> = (props: FollowScrollProps) => {\n const { ref: forwardedRef, label, jumpLabel, threshold, onFollowingChange, children, className, ...restProps } = props;\n const { viewportRef, contentRef, following, scrollToEnd } = useFollowScroll({\n ...(threshold === undefined ? {} : { threshold }),\n ...(onFollowingChange === undefined ? {} : { onFollowingChange }),\n });\n const scrollbarRef = useScrollbars({ ref: viewportRef });\n const scrollRef = useInteractionOutline({ ref: scrollbarRef });\n return (<div\n {...restProps}\n ref={forwardedRef}\n className={cn(\"gridui-follow-scroll\", className)}\n >\n <div\n ref={scrollRef}\n className=\"gridui-follow-scroll-viewport\"\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n >\n <div\n ref={contentRef}\n className=\"gridui-follow-scroll-content\"\n >\n {children}\n </div>\n </div>\n {!following && (<Button\n className=\"gridui-follow-scroll-jump\"\n size=\"small\"\n onClick={() => {\n scrollToEnd();\n viewportRef.current?.focus({ preventScroll: true });\n }}\n >\n {jumpLabel}\n </Button>)}\n </div>);\n};\n"],
5
+ "mappings": ";AAOA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AAOlD,IAAM,kBAAkB,CAAC,EAAE,YAAY,IAAI,kBAAkB,IAAyB,CAAC,MAAM;AAChG,MAAI,CAAC,OAAO,SAAS,SAAS,KAAK,YAAY,GAAG;AAC9C,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC5E;AACA,QAAM,cAAc,OAAuB,IAAI;AAC/C,QAAM,aAAa,OAAuB,IAAI;AAC9C,QAAM,eAAe,OAAO,IAAI;AAChC,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,IAAI;AACjB,QAAM,kBAAkB,YAAY,CAAC,SAAkB;AACnD,QAAI,aAA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BAAqB;AACrD,SAAS,UAAU;AAgBP,SAYA,KAZA;AARL,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM,EAAE,KAAK,cAAc,OAAO,WAAW,WAAW,mBAAmB,UAAU,WAAW,GAAG,UAAU,IAAI;AACjH,QAAM,EAAE,aAAa,YAAY,WAAW,YAAY,IAAI,gBAAgB;AAAA,IACxE,GAAI,cAAc,SAAY,CAAC,IAAI,EAAE,UAAU;AAAA,IAC/C,GAAI,sBAAsB,SAAY,CAAC,IAAI,EAAE,kBAAkB;AAAA,EACnE,CAAC;AACD,QAAM,eAAe,cAAc,EAAE,KAAK,YAAY,CAAC;AACvD,QAAM,YAAY,sBAAsB,EAAE,KAAK,aAAa,CAAC;AAC7D,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,WAAW,GAAG,wBAAwB,SAAS;AAAA,MAE/C;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,KAAK;AAAA,YACL,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAY;AAAA,YACZ,UAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACG,KAAK;AAAA,gBACL,WAAU;AAAA,gBAET;AAAA;AAAA,YACL;AAAA;AAAA,QACJ;AAAA,QACC,CAAC,aAAc;AAAA,UAAC;AAAA;AAAA,YACb,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAS,MAAM;AACX,0BAAY;AACZ,0BAAY,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;AAAA,YACtD;AAAA,YAEC;AAAA;AAAA,QACL;AAAA;AAAA;AAAA,EACJ;AACJ;",
6
6
  "names": []
7
7
  }
package/dist/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
2
  @layer theme, base, components, utilities;
3
3
  @layer utilities;
4
4
  @layer components {
package/docs/catalog.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/follow-scroll",
4
- "version": "1.0.7",
4
+ "version": "1.0.9",
5
5
  "category": "core",
6
6
  "description": "GridUI React follow scroll",
7
- "usage": "GridUI React follow scroll",
7
+ "usage": "Component reference contains focused API pages for each public component.",
8
8
  "documentation": [
9
9
  "README.md",
10
- "docs/follow-scroll.md"
10
+ "docs/follow-scroll.md",
11
+ "docs/reference/README.md",
12
+ "docs/reference/follow-scroll.md"
11
13
  ],
12
14
  "exports": [
13
15
  {
@@ -38,6 +40,7 @@
38
40
  "@gridui/follow-scroll/styles.css"
39
41
  ],
40
42
  "examples": [
43
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/follow-scroll/stories/live-content.mdx",
41
44
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/follow-scroll/stories/follow-scroll.stories.tsx"
42
45
  ]
43
46
  }
@@ -0,0 +1,4 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [FollowScroll](follow-scroll.md)
@@ -0,0 +1,75 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # FollowScroll
3
+
4
+ Keeps a scrollable feed following new content while the user remains near its end. Use it for logs, messages, or streamed output.
5
+
6
+ Import from ``@gridui/follow-scroll`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { FollowScroll } from "@gridui/follow-scroll";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/follow-scroll/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/follow-scroll/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/follow-scroll/stories/follow-scroll.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
+
18
+ ## API
19
+
20
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
+
22
+ ### children
23
+
24
+ ``ReactNode`` · Optional
25
+
26
+ Content rendered inside the component.
27
+
28
+ ### onFocus
29
+
30
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
31
+
32
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
33
+
34
+ ### onBlur
35
+
36
+ ``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
37
+
38
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
39
+
40
+ ### onChange
41
+
42
+ ``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
43
+
44
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
45
+
46
+ ### onSubmit
47
+
48
+ ``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
49
+
50
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
51
+
52
+ ### onClick
53
+
54
+ ``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
55
+
56
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
57
+
58
+ ### threshold
59
+
60
+ ``number | undefined`` · Optional
61
+
62
+ ### onFollowingChange
63
+
64
+ ``(following: boolean): void`` · Optional
65
+
66
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
67
+
68
+ ### label
69
+
70
+ ``string`` · Required
71
+
72
+ ### jumpLabel
73
+
74
+ ``string`` · Required
75
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/follow-scroll",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "GridUI React follow scroll",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -27,9 +27,9 @@
27
27
  "react-dom": "^19.2.0"
28
28
  },
29
29
  "dependencies": {
30
- "@gridui/button": "^3.1.2",
31
- "@gridui/overlay": "^1.2.2",
32
- "@gridui/style-utils": "^2.2.2",
30
+ "@gridui/button": "^4.1.0",
31
+ "@gridui/overlay": "^2.0.0",
32
+ "@gridui/style-utils": "^4.0.0",
33
33
  "@gridui/theme": "^2.5.3"
34
34
  },
35
35
  "devDependencies": {