@unhead/ssr 0.1.2 → 0.1.4
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.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +5 -3
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const SelfClosingTags = ["meta", "link", "base"];
|
|
4
|
+
|
|
3
5
|
const propsToString = (props) => {
|
|
4
6
|
const handledAttributes = [];
|
|
5
7
|
for (const [key, value] of Object.entries(props)) {
|
|
@@ -13,8 +15,6 @@ const propsToString = (props) => {
|
|
|
13
15
|
return handledAttributes.length > 0 ? ` ${handledAttributes.join(" ")}` : "";
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
const SelfClosingTags = ["meta", "link", "base"];
|
|
17
|
-
|
|
18
18
|
const tagToString = (tag) => {
|
|
19
19
|
const attrs = propsToString(tag.props);
|
|
20
20
|
const openTag = `<${tag.tag}${attrs}>`;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HeadClient, SSRHeadPayload } from '@unhead/schema';
|
|
2
2
|
|
|
3
|
-
declare function renderSSRHead<T extends
|
|
3
|
+
declare function renderSSRHead<T extends {}>(ctx: HeadClient<T>): Promise<SSRHeadPayload>;
|
|
4
4
|
|
|
5
5
|
export { renderSSRHead };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const SelfClosingTags = ["meta", "link", "base"];
|
|
2
|
+
|
|
1
3
|
const propsToString = (props) => {
|
|
2
4
|
const handledAttributes = [];
|
|
3
5
|
for (const [key, value] of Object.entries(props)) {
|
|
@@ -11,8 +13,6 @@ const propsToString = (props) => {
|
|
|
11
13
|
return handledAttributes.length > 0 ? ` ${handledAttributes.join(" ")}` : "";
|
|
12
14
|
};
|
|
13
15
|
|
|
14
|
-
const SelfClosingTags = ["meta", "link", "base"];
|
|
15
|
-
|
|
16
16
|
const tagToString = (tag) => {
|
|
17
17
|
const attrs = propsToString(tag.props);
|
|
18
18
|
const openTag = `<${tag.tag}${attrs}>`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"packageManager": "pnpm@7.14.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,19 +19,21 @@
|
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
+
"require": "./dist/index.cjs",
|
|
22
23
|
"import": "./dist/index.mjs"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
26
|
+
"main": "dist/index.cjs",
|
|
25
27
|
"module": "dist/index.mjs",
|
|
26
28
|
"types": "dist/index.d.ts",
|
|
27
29
|
"files": [
|
|
28
30
|
"dist"
|
|
29
31
|
],
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"@unhead/schema": "0.1.
|
|
33
|
+
"@unhead/schema": "0.1.4"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"zhead": "1.0.0-beta.
|
|
36
|
+
"zhead": "1.0.0-beta.5"
|
|
35
37
|
},
|
|
36
38
|
"scripts": {
|
|
37
39
|
"build": "unbuild .",
|