@lacspace/form 1.0.2 โ†’ 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 +12 -4
  2. package/package.json +1 -1
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,7 +96,7 @@ 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)** โ€” 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)**.
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)**.
92
100
 
93
101
  <!-- LACSPACE-DEV-PLATFORM -->
94
102
 
@@ -96,14 +104,14 @@ Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-
96
104
 
97
105
  ## The Lacspace Developer Platform
98
106
 
99
- `@lacspace/form` is part of **63 zero-dependency, isomorphic TypeScript packages** โ€” one standard library for the modern web. Explore the ecosystem:
107
+ `@lacspace/form` is part of **80+ zero-dependency, isomorphic TypeScript packages** โ€” one standard library for the modern web. Explore the ecosystem:
100
108
 
101
109
  - ๐Ÿ“ฆ **This package, documented** โ€” https://developer.lacspace.com/packages/form
102
- - ๐Ÿ—‚๏ธ **All 63 packages** โ€” https://developer.lacspace.com/packages
110
+ - ๐Ÿ—‚๏ธ **All 80+ packages** โ€” https://developer.lacspace.com/packages
103
111
  - ๐Ÿงญ **Developer handbook** โ€” guides & runnable recipes โ€” https://developer.lacspace.com/handbook
104
112
  - ๐Ÿงช **Live playground** โ€” run any package in your browser โ€” https://developer.lacspace.com/playground
105
113
  - ๐Ÿ–ฅ๏ธ **Finished app templates** โ€” https://templates.lacspace.com
106
114
  - ๐Ÿš€ **Scaffold a full app** โ€” `npm create lacspace-app@latest`
107
115
 
108
- Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-free-1.0)** โ€” a permissive, free-to-use licence.
116
+ Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** โ€” a permissive, free-to-use licence.
109
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacspace/form",
3
- "version": "1.0.2",
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",