@lacspace/hooks 1.0.1 → 1.0.3
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 +34 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @lacspace/hooks
|
|
2
4
|
|
|
3
|
-
**Essential, SSR-safe React hooks — everything you reach for, zero
|
|
5
|
+
**Essential, SSR-safe React hooks — everything you reach for, in one zero-dependency package.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@lacspace/hooks)
|
|
8
|
+
[](https://packagephobia.com/result?p=@lacspace/hooks)
|
|
9
|
+
[](https://bundlephobia.com/package/@lacspace/hooks)
|
|
10
|
+
[](https://www.npmjs.com/package/@lacspace/hooks)
|
|
11
|
+
[](https://github.com/lacspace/npm-packages/blob/main/LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> Instead of installing a handful of single-purpose hook libraries, get **28 SSR-safe, fully-typed React hooks** — storage, debounce/throttle, media queries, click-outside, clipboard and more — in one tree-shakeable package.
|
|
16
|
+
|
|
17
|
+
- 💾 `useLocalStorage` / `useSessionStorage` — JSON state, cross-tab sync, SSR-safe
|
|
18
|
+
- ⏱️ `useDebounce` / `useDebouncedCallback` / `useThrottle` / `useInterval` / `useTimeout`
|
|
19
|
+
- 🖱️ `useOnClickOutside` / `useHover` / `useEventListener` / `useIntersectionObserver`
|
|
20
|
+
- 📐 `useMediaQuery` / `useWindowSize` / `useScrollPosition`
|
|
21
|
+
- 🧰 `useToggle` / `useCounter` / `useDisclosure` / `useCopyToClipboard` / `useIdle` + more
|
|
22
|
+
- ⚡ Zero deps · 🌍 SSR-safe · 📦 ESM + CJS · fully typed · tree-shakeable
|
|
4
23
|
|
|
5
24
|
## Install
|
|
6
25
|
|
|
@@ -112,12 +131,22 @@ function Share({ url }: { url: string }) {
|
|
|
112
131
|
|
|
113
132
|
## Licensing
|
|
114
133
|
|
|
115
|
-
Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-free-1.0)** —
|
|
134
|
+
Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** — permissive freedoms. Use it in personal and commercial projects at no cost; just keep the notice. See the **[Lacspace Licence Centre](https://lacspace.com/licenses)**.
|
|
135
|
+
|
|
136
|
+
<!-- LACSPACE-DEV-PLATFORM -->
|
|
116
137
|
|
|
117
138
|
---
|
|
118
139
|
|
|
119
|
-
|
|
140
|
+
## The Lacspace Developer Platform
|
|
141
|
+
|
|
142
|
+
`@lacspace/hooks` is part of **80+ zero-dependency, isomorphic TypeScript packages** — one standard library for the modern web. Explore the ecosystem:
|
|
143
|
+
|
|
144
|
+
- 📦 **This package, documented** — https://developer.lacspace.com/packages/hooks
|
|
145
|
+
- 🗂️ **All 80+ packages** — https://developer.lacspace.com/packages
|
|
146
|
+
- 🧭 **Developer handbook** — guides & runnable recipes — https://developer.lacspace.com/handbook
|
|
147
|
+
- 🧪 **Live playground** — run any package in your browser — https://developer.lacspace.com/playground
|
|
148
|
+
- 🖥️ **Finished app templates** — https://templates.lacspace.com
|
|
149
|
+
- 🚀 **Scaffold a full app** — `npm create lacspace-app@latest`
|
|
120
150
|
|
|
121
|
-
|
|
151
|
+
Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** — a permissive, free-to-use licence.
|
|
122
152
|
|
|
123
|
-
<div align="center"><sub>Built with care by <a href="https://lacspace.com">Lacspace</a> · Lacspace Free Licence · <a href="https://github.com/lacspace/npm-packages">source</a></sub></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lacspace/hooks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Essential, SSR-safe React hooks — useLocalStorage, useDebounce, useMediaQuery, useOnClickOutside, useCopyToClipboard and 20+ more. Zero-dependency, fully typed, isomorphic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"author": "Lacspace <contact@lacspace.com>",
|
|
46
46
|
"license": "SEE LICENSE IN LICENSE",
|
|
47
|
-
"homepage": "https://lacspace.com/packages",
|
|
47
|
+
"homepage": "https://developer.lacspace.com/packages/hooks",
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
50
50
|
"url": "git+https://github.com/lacspace/npm-packages.git",
|