@vue-solana/nuxt 0.2.1 → 0.2.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.
- package/README.md +3 -1
- package/dist/module.cjs +11 -8
- package/dist/module.mjs +11 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ https://faucet.solana.com
|
|
|
57
57
|
|
|
58
58
|
## Auto-Imported Composables
|
|
59
59
|
|
|
60
|
-
The module auto-imports these composables from `@vue-solana/vue
|
|
60
|
+
The module auto-imports these composables from direct `@vue-solana/vue/*` subpaths rather than the root Vue package barrel. This keeps Nuxt SSR bundles from pulling in unrelated Solana runtime code just because a page uses one composable.
|
|
61
61
|
|
|
62
62
|
- `useSolana()`
|
|
63
63
|
- `useSolanaRpc()`
|
|
@@ -66,6 +66,8 @@ The module auto-imports these composables from `@vue-solana/vue`:
|
|
|
66
66
|
- `useSolanaBalance()`
|
|
67
67
|
- `useSolanaSignAndSendTransaction()`
|
|
68
68
|
|
|
69
|
+
The runtime plugin is client-only. Auto-imported composables can be called during SSR and return inert state until hydration provides the real client context. Trigger RPC and wallet work from client lifecycle hooks or user actions.
|
|
70
|
+
|
|
69
71
|
## Read RPC State
|
|
70
72
|
|
|
71
73
|
```vue
|
package/dist/module.cjs
CHANGED
|
@@ -19,19 +19,22 @@ const module$1 = kit.defineNuxtModule({
|
|
|
19
19
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
20
20
|
...options
|
|
21
21
|
};
|
|
22
|
-
kit.addPlugin(
|
|
22
|
+
kit.addPlugin({
|
|
23
|
+
src: resolver.resolve("./runtime/plugin"),
|
|
24
|
+
mode: "client"
|
|
25
|
+
});
|
|
23
26
|
kit.addImports([
|
|
24
|
-
{ name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue" },
|
|
25
|
-
{ name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue" },
|
|
26
|
-
{ name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue" },
|
|
27
|
+
{ name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue/useBalance" },
|
|
28
|
+
{ name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue/useConnection" },
|
|
29
|
+
{ name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue/useRpc" },
|
|
27
30
|
{
|
|
28
31
|
name: "useSignAndSendTransaction",
|
|
29
32
|
as: "useSolanaSignAndSendTransaction",
|
|
30
|
-
from: "@vue-solana/vue"
|
|
33
|
+
from: "@vue-solana/vue/useSignAndSendTransaction"
|
|
31
34
|
},
|
|
32
|
-
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
|
|
33
|
-
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" },
|
|
34
|
-
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue" }
|
|
35
|
+
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue/useSolana" },
|
|
36
|
+
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue/useWallet" },
|
|
37
|
+
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue/useWallets" }
|
|
35
38
|
]);
|
|
36
39
|
}
|
|
37
40
|
});
|
package/dist/module.mjs
CHANGED
|
@@ -16,19 +16,22 @@ const module$1 = defineNuxtModule({
|
|
|
16
16
|
...typeof publicConfig.solana === "object" && publicConfig.solana !== null ? publicConfig.solana : {},
|
|
17
17
|
...options
|
|
18
18
|
};
|
|
19
|
-
addPlugin(
|
|
19
|
+
addPlugin({
|
|
20
|
+
src: resolver.resolve("./runtime/plugin"),
|
|
21
|
+
mode: "client"
|
|
22
|
+
});
|
|
20
23
|
addImports([
|
|
21
|
-
{ name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue" },
|
|
22
|
-
{ name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue" },
|
|
23
|
-
{ name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue" },
|
|
24
|
+
{ name: "useBalance", as: "useSolanaBalance", from: "@vue-solana/vue/useBalance" },
|
|
25
|
+
{ name: "useConnection", as: "useSolanaConnection", from: "@vue-solana/vue/useConnection" },
|
|
26
|
+
{ name: "useRpc", as: "useSolanaRpc", from: "@vue-solana/vue/useRpc" },
|
|
24
27
|
{
|
|
25
28
|
name: "useSignAndSendTransaction",
|
|
26
29
|
as: "useSolanaSignAndSendTransaction",
|
|
27
|
-
from: "@vue-solana/vue"
|
|
30
|
+
from: "@vue-solana/vue/useSignAndSendTransaction"
|
|
28
31
|
},
|
|
29
|
-
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue" },
|
|
30
|
-
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue" },
|
|
31
|
-
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue" }
|
|
32
|
+
{ name: "useSolana", as: "useSolana", from: "@vue-solana/vue/useSolana" },
|
|
33
|
+
{ name: "useWallet", as: "useSolanaWallet", from: "@vue-solana/vue/useWallet" },
|
|
34
|
+
{ name: "useWallets", as: "useSolanaWallets", from: "@vue-solana/vue/useWallets" }
|
|
32
35
|
]);
|
|
33
36
|
}
|
|
34
37
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/nuxt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Nuxt module for Solana applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@vue-solana/core": "0.2.1",
|
|
42
|
-
"@vue-solana/vue": "0.2.
|
|
42
|
+
"@vue-solana/vue": "0.2.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@solana/web3-compat": "^0.0.21",
|