@c2n/reorder-list 0.0.10 → 0.0.12

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/package.json +3 -3
  2. package/react.d.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c2n/reorder-list",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "dist/reorder-list.js",
6
6
  "exports": {
@@ -60,12 +60,12 @@
60
60
  }
61
61
  },
62
62
  "dependencies": {
63
- "@c2n/core": "0.0.10",
63
+ "@c2n/core": "0.0.12",
64
64
  "@lit-labs/motion": "1.1.0",
65
65
  "lit": "3.3.3"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@c2n/config": "*"
69
69
  },
70
- "gitHead": "8d57710b3345fcb01cdb4cb15d2d43ba8bf21642"
70
+ "gitHead": "43e38b42ac221ffeef99a773c42dd3356961d26a"
71
71
  }
package/react.d.ts CHANGED
@@ -6,12 +6,18 @@
6
6
  //
7
7
  // Register the elements at module scope before React renders, or React writes an object prop as an
8
8
  // attribute and it stringifies.
9
+ //
10
+ // On a server-rendered page (Next.js, React Router SSR) write a camelCase property by its kebab-case attribute
11
+ // name ('row-key', not rowKey): the server emits props verbatim, HTML lowercases them, and hydration does not
12
+ // set properties. Those names are listed next to the properties below.
9
13
 
10
14
  import type { DetailedHTMLProps, HTMLAttributes } from 'react'
11
15
  import type { ReorderList } from '@c2n/reorder-list'
12
16
 
13
17
  /** Standard React host-element attributes plus the element's own public properties. */
14
18
  type C2Props<T> = DetailedHTMLProps<HTMLAttributes<T>, T> & Partial<Omit<T, keyof HTMLElement>>
19
+ /** What React writes to a custom element's attribute: true becomes the empty string, false removes it. */
20
+ type Attribute = string | number | boolean
15
21
 
16
22
  declare module 'react' {
17
23
  namespace JSX {