nuxt-modern-cropper 0.1.8 → 1.6.10
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 +7 -5
- package/dist/module.d.mts +4 -3
- package/dist/module.d.ts +4 -3
- package/dist/module.json +2 -2
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/types.d.mts +7 -1
- package/dist/types.d.ts +7 -1
- package/package.json +27 -16
package/README.md
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
[![License][license-src]][license-href]
|
|
6
6
|
[![Nuxt][nuxt-src]][nuxt-href]
|
|
7
7
|
|
|
8
|
-
Power-packed wrapper over cropperjs
|
|
8
|
+
Power-packed wrapper over `cropperjs` (v2).
|
|
9
9
|
|
|
10
|
-
This package is
|
|
11
|
-
<!-- - [📖 Documentation](https://example.com) -->
|
|
10
|
+
This package is a Nuxt module wrapper over [vue-modern-cropper](https://github.com/NamesMT/vue-modern-cropper), for more information and examples check it's repo.
|
|
12
11
|
|
|
13
12
|
## Table of Contents
|
|
14
13
|
<details>
|
|
@@ -26,7 +25,7 @@ This package is just a module wrapper over [vue-modern-cropper](https://github.c
|
|
|
26
25
|
## Usage
|
|
27
26
|
|
|
28
27
|
### Install & Setup
|
|
29
|
-
```
|
|
28
|
+
```sh
|
|
30
29
|
pnpm add -D nuxt-modern-cropper vue-modern-cropper
|
|
31
30
|
```
|
|
32
31
|
|
|
@@ -43,11 +42,14 @@ export default defineNuxtConfig({
|
|
|
43
42
|
|
|
44
43
|
That's it! You can now use `<ModernCropper />` in your Nuxt app ✨
|
|
45
44
|
|
|
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.
|
|
45
|
+
>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
46
|
```ts
|
|
48
47
|
import type { ModernCropper } from '#components'
|
|
49
48
|
|
|
50
49
|
const cropperRef = ref<InstanceType<typeof ModernCropper>>()
|
|
50
|
+
|
|
51
|
+
// Or better, use `useTemplateRef` to automatically infer the type (vue 3.5+)
|
|
52
|
+
const cropperRef = useTemplateRef('cropperRef')
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
## Contribution
|
package/dist/module.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as nuxt_schema from 'nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { _default as default };
|
|
8
|
+
export type { ModuleOptions };
|
package/dist/module.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as nuxt_schema from 'nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { _default as default };
|
|
8
|
+
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.js'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
7
|
+
export { default } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
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'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-modern-cropper",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"description": "Power-packed wrapper over cropperjs@next",
|
|
5
5
|
"repository": "namesmt/nuxt-modern-cropper",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,29 +37,40 @@
|
|
|
37
37
|
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nuxt/kit": "^3.
|
|
40
|
+
"@nuxt/kit": "^3.16.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@nuxt/devtools": "^
|
|
44
|
-
"@nuxt/eslint-config": "^
|
|
45
|
-
"@nuxt/module-builder": "^0.8.
|
|
46
|
-
"@nuxt/schema": "^3.
|
|
47
|
-
"@nuxt/test-utils": "^3.
|
|
48
|
-
"@types/node": "
|
|
49
|
-
"changelogen": "^0.
|
|
50
|
-
"eslint": "^9.
|
|
51
|
-
"nuxt": "^3.
|
|
52
|
-
"typescript": "
|
|
53
|
-
"vitest": "^
|
|
54
|
-
"vue-tsc": "^2.
|
|
43
|
+
"@nuxt/devtools": "^2.3.1",
|
|
44
|
+
"@nuxt/eslint-config": "^1.2.0",
|
|
45
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
46
|
+
"@nuxt/schema": "^3.16.1",
|
|
47
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
48
|
+
"@types/node": "latest",
|
|
49
|
+
"changelogen": "^0.6.1",
|
|
50
|
+
"eslint": "^9.23.0",
|
|
51
|
+
"nuxt": "^3.16.1",
|
|
52
|
+
"typescript": "^5.8.2",
|
|
53
|
+
"vitest": "^3.0.9",
|
|
54
|
+
"vue-tsc": "^2.2.8"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"
|
|
58
|
-
"vue-modern-cropper": "0.x"
|
|
57
|
+
"vue-modern-cropper": "^1"
|
|
59
58
|
},
|
|
60
59
|
"peerDependenciesMeta": {
|
|
61
60
|
"vue-modern-cropper": {
|
|
62
61
|
"optional": false
|
|
63
62
|
}
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "pnpm@10.6.5",
|
|
65
|
+
"pnpm": {
|
|
66
|
+
"onlyBuiltDependencies": [
|
|
67
|
+
"@parcel/watcher",
|
|
68
|
+
"esbuild"
|
|
69
|
+
],
|
|
70
|
+
"overrides": {
|
|
71
|
+
"is-core-module": "npm:@nolyfill/is-core-module@^1.0.39",
|
|
72
|
+
"isarray": "npm:@nolyfill/isarray@^1.0.44",
|
|
73
|
+
"safe-buffer": "npm:@nolyfill/safe-buffer@^1.0.44"
|
|
74
|
+
}
|
|
64
75
|
}
|
|
65
76
|
}
|