@stonecrop/nuxt 0.10.7 → 0.10.9

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
3
  "configKey": "stonecrop",
4
- "version": "0.10.7",
4
+ "version": "0.10.9",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -1,2 +1,9 @@
1
- declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
1
+ import { type Registry, type Stonecrop } from '@stonecrop/stonecrop';
2
+ declare const _default: import("nuxt/app").Plugin<{
3
+ registry: Registry;
4
+ stonecrop: Stonecrop;
5
+ }> & import("nuxt/app").ObjectPlugin<{
6
+ registry: Registry;
7
+ stonecrop: Stonecrop;
8
+ }>;
2
9
  export default _default;
@@ -3,14 +3,25 @@ import { install as NodeEditor } from "@stonecrop/node-editor";
3
3
  import StonecropPlugin from "@stonecrop/stonecrop";
4
4
  import { createPinia } from "pinia";
5
5
  import { defineNuxtPlugin, useRouter } from "nuxt/app";
6
- export default defineNuxtPlugin((nuxt) => {
7
- const router = useRouter();
8
- const app = nuxt.vueApp;
9
- if (!app.config.globalProperties.$pinia) {
10
- const pinia = createPinia();
11
- app.use(pinia);
6
+ export default defineNuxtPlugin({
7
+ name: "stonecrop",
8
+ setup(nuxt) {
9
+ const router = useRouter();
10
+ const app = nuxt.vueApp;
11
+ if (!app.config.globalProperties.$pinia) {
12
+ const pinia = createPinia();
13
+ app.use(pinia);
14
+ }
15
+ app.use(AForm);
16
+ app.use(NodeEditor);
17
+ app.use(StonecropPlugin, { router });
18
+ const registry = app.config.globalProperties.$registry;
19
+ const stonecrop = app.config.globalProperties.$stonecrop;
20
+ return {
21
+ provide: {
22
+ registry,
23
+ stonecrop
24
+ }
25
+ };
12
26
  }
13
- app.use(AForm);
14
- app.use(NodeEditor);
15
- app.use(StonecropPlugin, { router });
16
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
- "version": "0.10.7",
3
+ "version": "0.10.9",
4
4
  "description": "Nuxt module for Stonecrop",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,14 +44,14 @@
44
44
  "jiti": "^2.4.2",
45
45
  "pathe": "^2.0.3",
46
46
  "prompts": "^2.4.2",
47
- "@stonecrop/aform": "0.10.7",
48
- "@stonecrop/atable": "0.10.7",
49
- "@stonecrop/casl-middleware": "0.10.7",
50
- "@stonecrop/graphql-middleware": "0.10.7",
51
- "@stonecrop/node-editor": "0.10.7",
52
- "@stonecrop/nuxt-grafserv": "0.10.7",
53
- "@stonecrop/schema": "0.10.7",
54
- "@stonecrop/stonecrop": "0.10.7"
47
+ "@stonecrop/aform": "0.10.9",
48
+ "@stonecrop/atable": "0.10.9",
49
+ "@stonecrop/casl-middleware": "0.10.9",
50
+ "@stonecrop/graphql-middleware": "0.10.9",
51
+ "@stonecrop/node-editor": "0.10.9",
52
+ "@stonecrop/nuxt-grafserv": "0.10.9",
53
+ "@stonecrop/schema": "0.10.9",
54
+ "@stonecrop/stonecrop": "0.10.9"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@eslint/js": "^9.39.2",