nuxt-modern-cropper 0.1.6 → 0.1.8

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 CHANGED
@@ -10,11 +10,24 @@ Power-packed wrapper over cropperjs@next.
10
10
  This package is just a module wrapper over [vue-modern-cropper](https://github.com/NamesMT/vue-modern-cropper), for more information check it's repo.
11
11
  <!-- - [📖 &nbsp;Documentation](https://example.com) -->
12
12
 
13
- ## Installation
13
+ ## Table of Contents
14
+ <details>
15
+
16
+ <summary>TOC</summary>
17
+
18
+ - [Nuxt Modern Cropper](#nuxt-modern-cropper)
19
+ - [Table of Contents](#table-of-contents)
20
+ - [Usage](#usage)
21
+ - [Install \& Setup](#install--setup)
22
+ - [Contribution](#contribution)
23
+
24
+ </details>
14
25
 
15
- Install the package
26
+ ## Usage
27
+
28
+ ### Install & Setup
16
29
  ```bash
17
- pnpm add -D vue-modern-cropper nuxt-modern-cropper
30
+ pnpm add -D nuxt-modern-cropper vue-modern-cropper
18
31
  ```
19
32
 
20
33
  Add `nuxt-modern-cropper` to your Nuxt config file:
@@ -30,6 +43,12 @@ export default defineNuxtConfig({
30
43
 
31
44
  That's it! You can now use `<ModernCropper />` in your Nuxt app ✨
32
45
 
46
+ To infer the type of the component for `ref` creation, make sure to use `import type` to avoid build error, because the module is client-only.
47
+ ```ts
48
+ import type { ModernCropper } from '#components'
49
+
50
+ const cropperRef = ref<InstanceType<typeof ModernCropper>>()
51
+ ```
33
52
 
34
53
  ## Contribution
35
54
 
package/dist/module.d.mts CHANGED
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
4
  }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
 
7
7
  export { type ModuleOptions, _default as default };
package/dist/module.d.ts CHANGED
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
4
  }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
 
7
7
  export { type ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "nuxt-modern-cropper",
3
3
  "configKey": "modernCropper",
4
- "version": "0.1.6",
4
+ "version": "0.1.8",
5
5
  "builder": {
6
- "@nuxt/module-builder": "0.8.1",
6
+ "@nuxt/module-builder": "0.8.3",
7
7
  "unbuild": "2.0.0"
8
8
  }
9
9
  }
@@ -1,2 +1,2 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
1
+ declare const _default: any;
2
2
  export default _default;
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "nuxt-modern-cropper",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Power-packed wrapper over cropperjs@next",
5
5
  "repository": "namesmt/nuxt-modern-cropper",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
+ "keywords": [
9
+ "nuxt",
10
+ "nuxt-module",
11
+ "cropper",
12
+ "cropperjs",
13
+ "image",
14
+ "avatar"
15
+ ],
8
16
  "exports": {
9
17
  ".": {
10
18
  "types": "./dist/types.d.ts",
@@ -29,26 +37,25 @@
29
37
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
30
38
  },
31
39
  "dependencies": {
32
- "@nuxt/kit": "^3.12.3"
40
+ "@nuxt/kit": "^3.13.0"
33
41
  },
34
42
  "devDependencies": {
35
- "@nuxt/devtools": "^1.3.9",
36
- "@nuxt/eslint-config": "^0.3.13",
37
- "@nuxt/module-builder": "^0.8.1",
38
- "@nuxt/schema": "^3.12.3",
39
- "@nuxt/test-utils": "^3.13.1",
40
- "@types/node": "^20.14.11",
43
+ "@nuxt/devtools": "^1.3.14",
44
+ "@nuxt/eslint-config": "^0.5.2",
45
+ "@nuxt/module-builder": "^0.8.3",
46
+ "@nuxt/schema": "^3.13.0",
47
+ "@nuxt/test-utils": "^3.14.1",
48
+ "@types/node": "^20.16.1",
41
49
  "changelogen": "^0.5.5",
42
- "eslint": "^9.7.0",
43
- "nuxt": "^3.12.3",
50
+ "eslint": "^9.9.1",
51
+ "nuxt": "^3.13.0",
44
52
  "typescript": "latest",
45
- "vitest": "^2.0.3",
46
- "vue-modern-cropper": "0.x",
47
- "vue-tsc": "^2.0.26"
53
+ "vitest": "^2.0.5",
54
+ "vue-tsc": "^2.0.29"
48
55
  },
49
56
  "peerDependencies": {
50
- "vue-modern-cropper": "0.x",
51
- "@types/node": "^14.18.0 || >=16.10.0"
57
+ "@types/node": "^14.18.0 || >=16.10.0",
58
+ "vue-modern-cropper": "0.x"
52
59
  },
53
60
  "peerDependenciesMeta": {
54
61
  "vue-modern-cropper": {