jhx 0.1.1 → 0.1.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 +4 -4
  2. package/package.json +13 -9
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <p align="center">
2
2
  <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nick-hio/jhx/main/assets/jhx-logo-light.svg">
4
- <img src="https://raw.githubusercontent.com/nick-hio/jhx/main/assets/jhx-logo-dark.svg" height="90" alt="Logo for jhx">
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nick-hio/jhx/main/assets/jhx-logo-dark-background.svg">
4
+ <img src="https://raw.githubusercontent.com/nick-hio/jhx/main/assets/jhx-logo-light-background.svg" height="90" alt="Logo for jhx">
5
5
  </picture>
6
6
  </p>
7
7
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  <div align="center">
13
13
  <a target="_blank" href="https://github.com/nick-hio/jhx">GitHub</a> •
14
- <a target="_blank" href="https://github.com/nick-hio/jhx">Documentation</a> •
14
+ <a target="_blank" href="https://jhx.dev">Documentation</a> •
15
15
  <a target="_blank" href="https://github.com/nick-hio/jhx/issues/new">Report an Issue</a>
16
16
  </div>
17
17
 
@@ -80,7 +80,7 @@ const attrs = jhx({
80
80
  target: '#container',
81
81
  });
82
82
 
83
- const button = (<button {...attrs}>Load Data</button>);
83
+ const Button = () => (<button {...attrs}>Load Data</button>);
84
84
  // <button hx-get="/api" hx-target="#container">Load Data</button>
85
85
  ```
86
86
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jhx",
3
- "description": "HTMX helper with type-safe attribute mapping. Converts props into HTMX `hx-*` attributes for templating.",
4
- "version": "0.1.1",
3
+ "description": "HTMX helper with type-safe attribute mapping. Converts props into `hx-*` attributes for templating.",
4
+ "version": "0.1.3",
5
5
  "author": "nick-hio",
6
6
  "homepage": "https://github.com/nick-hio/jhx/tree/main/packages/jhx#readme",
7
7
  "repository": {
@@ -41,19 +41,23 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "htmx.org": "^2.0.8",
45
- "react": "^18.0.0 || ^19.0.0"
44
+ "htmx.org": "^2.0.8"
45
+ },
46
+ "peerDependencies": {
47
+ "react": "^17.0.2 || ^18.0.0 || ^19.0.0",
48
+ "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@types/bun": "^1.3.2",
49
- "@types/node": "^24.10.0",
50
- "@types/react": "^19.2.2",
51
- "@types/react-dom": "^19.2.2",
52
- "react-dom": "^19.2.0",
52
+ "@types/node": "^24.10.1",
53
+ "@types/react": "^19.2.5",
54
+ "@types/react-dom": "^19.2.3",
53
55
  "esbuild": "^0.25.12",
54
56
  "eslint": "^9.39.1",
55
57
  "prettier": "^3.6.2",
56
- "rollup": "^4.53.1",
58
+ "react": "^19.2.0",
59
+ "react-dom": "^19.2.0",
60
+ "rollup": "^4.53.2",
57
61
  "typescript": "^5.9.3"
58
62
  }
59
63
  }