@pyreon/head 0.1.1 → 0.1.2

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 +9 -6
  2. package/package.json +6 -7
package/README.md CHANGED
@@ -10,8 +10,7 @@ bun add @pyreon/head
10
10
 
11
11
  ## Quick Start
12
12
 
13
- ```ts
14
- import { h } from "@pyreon/core"
13
+ ```tsx
15
14
  import { HeadProvider, useHead } from "@pyreon/head"
16
15
 
17
16
  const App = () => {
@@ -26,21 +25,25 @@ const App = () => {
26
25
  ],
27
26
  })
28
27
 
29
- return h("div", null, "Hello")
28
+ return <div>Hello</div>
30
29
  }
31
30
 
32
31
  // Wrap your app with HeadProvider
33
- const Root = () => h(HeadProvider, null, h(App, null))
32
+ const Root = () => (
33
+ <HeadProvider>
34
+ <App />
35
+ </HeadProvider>
36
+ )
34
37
  ```
35
38
 
36
39
  ## SSR
37
40
 
38
41
  Use `renderWithHead` to capture head tags during server-side rendering:
39
42
 
40
- ```ts
43
+ ```tsx
41
44
  import { renderWithHead } from "@pyreon/head"
42
45
 
43
- const { html, head } = renderWithHead(h(App, null))
46
+ const { html, head } = renderWithHead(<App />)
44
47
  // `head` contains the serialized <title>, <meta>, <link>, etc.
45
48
  ```
46
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/head",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Head tag management for Pyreon — works in SSR and CSR",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,14 +50,13 @@
50
50
  "dev": "vl_rolldown_build-watch",
51
51
  "test": "vitest run",
52
52
  "typecheck": "tsc --noEmit",
53
- "prepublishOnly": "bun run build",
54
- "prepack": "bun run ../../scripts/resolve-workspace-deps.ts pre",
55
- "postpack": "bun run ../../scripts/resolve-workspace-deps.ts post"
53
+ "lint": "biome check .",
54
+ "prepublishOnly": "bun run build"
56
55
  },
57
56
  "dependencies": {
58
- "@pyreon/core": "^0.1.1",
59
- "@pyreon/reactivity": "^0.1.1",
60
- "@pyreon/runtime-server": "^0.1.1"
57
+ "@pyreon/core": "workspace:*",
58
+ "@pyreon/reactivity": "workspace:*",
59
+ "@pyreon/runtime-server": "workspace:*"
61
60
  },
62
61
  "devDependencies": {
63
62
  "@happy-dom/global-registrator": "*",