@lacspace/form 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.
Files changed (2) hide show
  1. package/README.md +20 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,12 +5,20 @@
5
5
  **Typed, validated, spam-protected form handling โ€” built for Next.js Server Actions.**
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@lacspace/form?color=%2316a34a&label=npm)](https://www.npmjs.com/package/@lacspace/form)
8
+ [![minzipped](https://img.shields.io/bundlephobia/minzip/@lacspace/form?label=minzip)](https://bundlephobia.com/package/@lacspace/form)
9
+ [![types](https://img.shields.io/badge/types-included-blue)](https://www.npmjs.com/package/@lacspace/form)
8
10
  [![license](https://img.shields.io/npm/l/@lacspace/form?color=green)](https://github.com/lacspace/npm-packages/blob/main/LICENSE)
9
11
 
10
12
  </div>
11
13
 
12
14
  > Take a `FormData`, validate it against a schema, block bots with a honeypot + timing check, and get back **either your typed data or per-field errors ready to re-render**. Framework-agnostic, zero dependencies.
13
15
 
16
+ - ๐Ÿ“ฅ `formDataToObject(fd)` โ€” `FormData` โ†’ plain object (repeated keys โ†’ arrays, files passed through)
17
+ - โœ… `createForm({ schema })` โ†’ `{ handle, action }` โ€” `action` drops straight into React's `useActionState`
18
+ - ๐Ÿฏ Spam guard โ€” a `honeypot` field + `minSubmitMs` timing check, internal fields stripped before validation
19
+ - ๐ŸŽฏ Typed result โ€” `{ ok: true, data }` or `{ ok: false, errors, values, spam? }` to re-render with input intact
20
+ - ๐ŸŒ Zero dependencies ยท isomorphic ยท fully typed
21
+
14
22
  ## Install
15
23
 
16
24
  ```bash
@@ -88,16 +96,22 @@ Pairs with [`@lacspace/validate`](https://www.npmjs.com/package/@lacspace/valida
88
96
 
89
97
  ## Licensing
90
98
 
91
- Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-free-1.0)** โ€” MIT-equivalent freedoms. Use it in personal and commercial projects at no cost; just keep the notice. See the **[Lacspace Licence Centre](https://lacspace.com/licenses)**.
99
+ 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)**.
100
+
101
+ <!-- LACSPACE-DEV-PLATFORM -->
92
102
 
93
103
  ---
94
104
 
95
- <div align="center">
105
+ ## The Lacspace Developer Platform
96
106
 
97
- **Part of the Lacspace ecosystem โ€” zero-dependency, isomorphic TypeScript packages.**
107
+ `@lacspace/form` is part of **80+ zero-dependency, isomorphic TypeScript packages** โ€” one standard library for the modern web. Explore the ecosystem:
98
108
 
99
- [All packages โ†—](https://lacspace.com/packages) ยท [npm org โ†—](https://www.npmjs.com/org/lacspace) ยท [Licence Centre โ†—](https://lacspace.com/licenses) ยท [GitHub โ†—](https://github.com/lacspace/npm-packages)
109
+ - ๐Ÿ“ฆ **This package, documented** โ€” https://developer.lacspace.com/packages/form
110
+ - ๐Ÿ—‚๏ธ **All 80+ packages** โ€” https://developer.lacspace.com/packages
111
+ - ๐Ÿงญ **Developer handbook** โ€” guides & runnable recipes โ€” https://developer.lacspace.com/handbook
112
+ - ๐Ÿงช **Live playground** โ€” run any package in your browser โ€” https://developer.lacspace.com/playground
113
+ - ๐Ÿ–ฅ๏ธ **Finished app templates** โ€” https://templates.lacspace.com
114
+ - ๐Ÿš€ **Scaffold a full app** โ€” `npm create lacspace-app@latest`
100
115
 
101
- </div>
116
+ Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** โ€” a permissive, free-to-use licence.
102
117
 
103
- <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/form",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "End-to-end form handling for the server โ€” turn FormData into typed, validated data with a honeypot + timing spam guard, and get back your data or per-field errors ready to re-render. Shaped for Next.js Server Actions. Zero-dependency, isomorphic.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -45,7 +45,7 @@
45
45
  ],
46
46
  "author": "Lacspace <contact@lacspace.com>",
47
47
  "license": "SEE LICENSE IN LICENSE",
48
- "homepage": "https://lacspace.com/packages",
48
+ "homepage": "https://developer.lacspace.com/packages/form",
49
49
  "repository": {
50
50
  "type": "git",
51
51
  "url": "git+https://github.com/lacspace/npm-packages.git",