@zikojs/astro 0.3.3 → 0.3.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/package.json +2 -2
- package/src/client.js +0 -1
- package/src/server.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zikojs/astro",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Use Zikojs components within Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-integration",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zikojs/server": "^0.6.
|
|
24
|
+
"@zikojs/server": "^0.6.1",
|
|
25
25
|
"ziko": "^2.0.0-beta.8"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
package/src/client.js
CHANGED
package/src/server.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { renderToString } from "@zikojs/server/server-only-utils"
|
|
2
|
-
import {
|
|
2
|
+
import { is_async } from "ziko/internal-utils/checkers"
|
|
3
3
|
function check(Component, attributes) {
|
|
4
4
|
if (typeof Component !== "function") return false;
|
|
5
5
|
return true
|
|
6
6
|
}
|
|
7
7
|
async function renderToStaticMarkup(Component, props, { default: children, ...slotted }, metadata) {
|
|
8
|
-
const UI =
|
|
8
|
+
const UI = is_async(Component) ? await Component(props) : Component(props).useClient()
|
|
9
9
|
const html = renderToString(UI)
|
|
10
10
|
console.log({metadata})
|
|
11
11
|
return {
|