@useavalon/vue 0.1.5 → 0.1.7
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/server/renderer.js +1 -1
- package/package.json +7 -5
package/dist/server/renderer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSSRApp as e}from"vue";import{renderToString as t}from"vue/server-renderer";import{extractCSS as n,generateScopeId as r,applyScopeToHTML as i}from"./css-extractor.js";import{toImportSpecifier as a}from"@useavalon/core/utils";import{resolveIslandPath as o}from"@useavalon/avalon/islands/framework-detection";export async function render(a){let{component:o,props:s={},src:l,condition:u=`on:client`,ssrOnly:d=!1}=a;try{let a=await t(e(await c(l),s)),
|
|
1
|
+
import{createSSRApp as e}from"vue";import{renderToString as t}from"vue/server-renderer";import{extractCSS as n,generateScopeId as r,applyScopeToHTML as i}from"./css-extractor.js";import{toImportSpecifier as a}from"@useavalon/core/utils";import{resolveIslandPath as o}from"@useavalon/avalon/islands/framework-detection";export async function render(a){let{component:o,props:s={},src:l,condition:u=`on:client`,ssrOnly:d=!1}=a;try{let a=await t(e(o||await c(l),s)),f=``,p=``;try{p=r(l),f=await n(l,{scopeId:p})}catch{}let m=a;return f&&(m=i(a,p)),{html:m,css:f||void 0,scopeId:p||void 0,hydrationData:{src:l,props:s,framework:`vue`,condition:u,ssrOnly:d}}}catch(e){throw Error(`Vue SSR rendering failed: ${e}`)}}async function c(e){if(process.env.NODE_ENV!==`production`&&globalThis.__viteDevServer){let t=globalThis.__viteDevServer,n=await o(e),r=await t.ssrLoadModule(n);return r.default||r}let t=await import(a(e.replace(`/islands/`,`/dist/ssr/islands/`).replace(`.vue`,`.js`)));return t.default||t}export function getComponentMetadata(e){return typeof e==`object`&&e?{name:e.name||`Anonymous`,type:`component`,hasSetup:`setup`in e,hasTemplate:`template`in e,hasRender:`render`in e}:{type:typeof e}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useavalon/vue",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Vue integration for Avalon islands architecture",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"islands",
|
|
16
16
|
"vue",
|
|
17
17
|
"ssr",
|
|
18
|
-
"hydration"
|
|
18
|
+
"hydration",
|
|
19
|
+
"composition-api"
|
|
19
20
|
],
|
|
20
21
|
"exports": {
|
|
21
22
|
".": "./dist/mod.js",
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"build": "bun run ../../../scripts/build-package.ts",
|
|
29
|
-
"prepublishOnly": "bun run build"
|
|
30
|
+
"prepublishOnly": "bun run build",
|
|
31
|
+
"postpublish": "bun run ../../../scripts/postpublish.ts"
|
|
30
32
|
},
|
|
31
33
|
"files": [
|
|
32
34
|
"dist/**/*.js",
|
|
@@ -34,8 +36,8 @@
|
|
|
34
36
|
"README.md"
|
|
35
37
|
],
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@useavalon/avalon": "
|
|
38
|
-
"@useavalon/core": "
|
|
39
|
+
"@useavalon/avalon": "workspace:^",
|
|
40
|
+
"@useavalon/core": "workspace:^",
|
|
39
41
|
"@vitejs/plugin-vue": "^5.2.4"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|