@stonecrop/nuxt 0.4.16 → 0.4.18

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,9 +1,9 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
3
  "configKey": "stonecrop",
4
- "version": "0.4.16",
4
+ "version": "0.4.18",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.4",
6
+ "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "unknown"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -2,15 +2,6 @@ import { createResolver, defineNuxtModule, addLayout, extendPages, addPlugin } f
2
2
  import { existsSync, readdirSync } from 'node:fs';
3
3
  import { extname } from 'node:path';
4
4
 
5
-
6
-
7
- // -- Unbuild CommonJS Shims --
8
- import __cjs_url__ from 'url';
9
- import __cjs_path__ from 'path';
10
- import __cjs_mod__ from 'module';
11
- const __filename = __cjs_url__.fileURLToPath(import.meta.url);
12
- const __dirname = __cjs_path__.dirname(__filename);
13
- const require = __cjs_mod__.createRequire(import.meta.url);
14
5
  const { resolve } = createResolver(import.meta.url);
15
6
  const module = defineNuxtModule({
16
7
  meta: {
@@ -3,8 +3,7 @@
3
3
  <pre>{{ stonecrop }}</pre>
4
4
  </template>
5
5
 
6
- <script setup lang="ts">
7
- import { useStonecrop } from '@stonecrop/stonecrop'
8
-
9
- const { stonecrop } = useStonecrop()
6
+ <script setup>
7
+ import { useStonecrop } from "@stonecrop/stonecrop";
8
+ const { stonecrop } = useStonecrop();
10
9
  </script>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -3,24 +3,17 @@
3
3
  <AForm v-model="schema" :data="schemaData" :key="componentKey" />
4
4
  </template>
5
5
 
6
- <script setup lang="ts">
7
- import type { SchemaTypes } from '@stonecrop/aform'
8
- import { useRoute } from 'nuxt/app'
9
- import { onMounted, ref } from 'vue'
10
-
11
- const route = useRoute()
12
- const schema = ref<SchemaTypes[]>([])
13
- const schemaData = ref<any[]>([])
14
- const componentKey = ref(0)
15
-
6
+ <script setup>
7
+ import { useRoute } from "nuxt/app";
8
+ import { onMounted, ref } from "vue";
9
+ const route = useRoute();
10
+ const schema = ref([]);
11
+ const schemaData = ref([]);
12
+ const componentKey = ref(0);
16
13
  onMounted(async () => {
17
- // wait for the route-based schema to be resolved
18
- schema.value = route.meta.schema as SchemaTypes[]
19
-
20
- const res = await $fetch(`/api${route.path}`)
21
- schemaData.value = res as any[]
22
-
23
- // re-render form when data is available
24
- componentKey.value++
25
- })
14
+ schema.value = route.meta.schema;
15
+ const res = await $fetch(`/api${route.path}`);
16
+ schemaData.value = res;
17
+ componentKey.value++;
18
+ });
26
19
  </script>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/dist/types.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { NuxtModule } from '@nuxt/schema'
2
2
 
3
- import type { default as Module } from './module.js'
3
+ import type { default as Module } from './module.mjs'
4
4
 
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
- export { default } from './module.js'
7
+ export { default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "Nuxt module for Stonecrop",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,38 +15,45 @@
15
15
  },
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./dist/types.d.ts",
19
- "import": "./dist/module.mjs",
20
- "require": "./dist/module.cjs"
18
+ "types": "./dist/types.d.mts",
19
+ "import": "./dist/module.mjs"
20
+ }
21
+ },
22
+ "main": "./dist/module.mjs",
23
+ "typesVersions": {
24
+ "*": {
25
+ ".": [
26
+ "./dist/types.d.mts"
27
+ ]
21
28
  }
22
29
  },
23
- "main": "./dist/module.cjs",
24
- "types": "./dist/types.d.ts",
25
30
  "files": [
26
31
  "dist"
27
32
  ],
28
33
  "dependencies": {
29
- "@nuxt/kit": "^3.15.4",
30
- "pinia": "^3.0.1",
31
- "@stonecrop/aform": "0.4.16",
32
- "@stonecrop/atable": "0.4.16",
33
- "@stonecrop/stonecrop": "0.4.16"
34
+ "@nuxt/kit": "^3.17.6",
35
+ "pinia": "^3.0.3",
36
+ "@stonecrop/aform": "0.4.18",
37
+ "@stonecrop/stonecrop": "0.4.18",
38
+ "@stonecrop/atable": "0.4.18"
34
39
  },
35
40
  "devDependencies": {
36
- "@nuxt/devtools": "^1.7.0",
37
- "@nuxt/module-builder": "^0.8.4",
38
- "@nuxt/schema": "^3.15.4",
39
- "@nuxt/test-utils": "^3.17.0",
40
- "eslint": "^8.40.0",
41
+ "@nuxt/devtools": "^2.6.2",
42
+ "@nuxt/module-builder": "^1.0.1",
43
+ "@nuxt/schema": "^3.17.6",
44
+ "@nuxt/test-utils": "^3.19.2",
45
+ "eslint": "^8.57.1",
46
+ "happy-dom": "^18.0.1",
41
47
  "h3": "*",
42
48
  "nitropack": "*",
43
- "nuxi": "^3.22.2",
44
- "nuxt": "^3.15.4",
45
- "typescript": "~5.6.3",
46
- "vue": "^3.5.13",
47
- "vite": "^6.1.1",
48
- "vitest": "^3.0.6",
49
- "vue-router": "^4.5.0"
49
+ "nuxi": "^3.25.1",
50
+ "nuxt": "^3.17.6",
51
+ "typescript": "^5.8.3",
52
+ "vue": "^3.5.17",
53
+ "vite": "^6.3.5",
54
+ "vitest": "^3.2.4",
55
+ "vue-router": "^4.5.1",
56
+ "vue-tsc": "~2.2.10"
50
57
  },
51
58
  "scripts": {
52
59
  "_phase:build": "rushx dev:prepare && nuxt-module-build build",
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- declare const _default: _nuxt_schema.NuxtModule<{
4
- router: {};
5
- docbuilder: boolean;
6
- }, {
7
- router: {};
8
- docbuilder: boolean;
9
- }, false>;
10
-
11
- export { _default as default };
package/dist/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module'