@cropvue/nuxt 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Philip Rutberg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @cropvue/nuxt
2
+
3
+ Nuxt module for CropVue. Auto-imports all components and composables with SSR-safe client-only rendering.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ pnpm add cropvue @cropvue/core @cropvue/nuxt
9
+ ```
10
+
11
+ ## Configuration
12
+
13
+ ```ts
14
+ // nuxt.config.ts
15
+ export default defineNuxtConfig({
16
+ modules: ['@cropvue/nuxt'],
17
+ cropvue: {
18
+ outputFormat: 'webp',
19
+ outputQuality: 0.85,
20
+ },
21
+ })
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ All components and composables are auto-imported:
27
+
28
+ ```vue
29
+ <template>
30
+ <CropVue stencil="circle" @done="handleDone" />
31
+ </template>
32
+
33
+ <script setup>
34
+ const handleDone = (result) => {
35
+ console.log(result.blob, result.url)
36
+ }
37
+ </script>
38
+ ```
39
+
40
+ ## License
41
+
42
+ MIT
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ const kit = require('@nuxt/kit');
4
+
5
+ const module$1 = kit.defineNuxtModule({
6
+ meta: {
7
+ name: "@cropvue/nuxt",
8
+ configKey: "cropvue"
9
+ },
10
+ defaults: {
11
+ outputFormat: "auto",
12
+ outputQuality: 0.85
13
+ },
14
+ setup(_options, nuxt) {
15
+ const components = [
16
+ "CropVue",
17
+ "CropEditor",
18
+ "CropPreview",
19
+ "CropDropzone",
20
+ "CropToolbar",
21
+ "CropQueue",
22
+ "CropStencil"
23
+ ];
24
+ for (const name of components) {
25
+ kit.addComponent({
26
+ name,
27
+ export: name,
28
+ filePath: "cropvue",
29
+ mode: "client"
30
+ });
31
+ }
32
+ const composables = [
33
+ "useCropper",
34
+ "useDropzone",
35
+ "useImageQueue",
36
+ "useUploader",
37
+ "useCompressor"
38
+ ];
39
+ for (const name of composables) {
40
+ kit.addImports({ name, from: "@cropvue/core" });
41
+ }
42
+ nuxt.options.css.push("cropvue/styles");
43
+ }
44
+ });
45
+
46
+ module.exports = module$1;
@@ -0,0 +1,10 @@
1
+ import * as nuxt_schema from 'nuxt/schema';
2
+
3
+ interface CropVueModuleOptions {
4
+ outputFormat?: 'auto' | 'webp' | 'jpeg' | 'png';
5
+ outputQuality?: number;
6
+ }
7
+ declare const _default: nuxt_schema.NuxtModule<CropVueModuleOptions, CropVueModuleOptions, false>;
8
+
9
+ export = _default;
10
+ export type { CropVueModuleOptions };
@@ -0,0 +1,10 @@
1
+ import * as nuxt_schema from 'nuxt/schema';
2
+
3
+ interface CropVueModuleOptions {
4
+ outputFormat?: 'auto' | 'webp' | 'jpeg' | 'png';
5
+ outputQuality?: number;
6
+ }
7
+ declare const _default: nuxt_schema.NuxtModule<CropVueModuleOptions, CropVueModuleOptions, false>;
8
+
9
+ export { _default as default };
10
+ export type { CropVueModuleOptions };
@@ -0,0 +1,10 @@
1
+ import * as nuxt_schema from 'nuxt/schema';
2
+
3
+ interface CropVueModuleOptions {
4
+ outputFormat?: 'auto' | 'webp' | 'jpeg' | 'png';
5
+ outputQuality?: number;
6
+ }
7
+ declare const _default: nuxt_schema.NuxtModule<CropVueModuleOptions, CropVueModuleOptions, false>;
8
+
9
+ export = _default;
10
+ export type { CropVueModuleOptions };
@@ -0,0 +1,44 @@
1
+ import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit';
2
+
3
+ const module$1 = defineNuxtModule({
4
+ meta: {
5
+ name: "@cropvue/nuxt",
6
+ configKey: "cropvue"
7
+ },
8
+ defaults: {
9
+ outputFormat: "auto",
10
+ outputQuality: 0.85
11
+ },
12
+ setup(_options, nuxt) {
13
+ const components = [
14
+ "CropVue",
15
+ "CropEditor",
16
+ "CropPreview",
17
+ "CropDropzone",
18
+ "CropToolbar",
19
+ "CropQueue",
20
+ "CropStencil"
21
+ ];
22
+ for (const name of components) {
23
+ addComponent({
24
+ name,
25
+ export: name,
26
+ filePath: "cropvue",
27
+ mode: "client"
28
+ });
29
+ }
30
+ const composables = [
31
+ "useCropper",
32
+ "useDropzone",
33
+ "useImageQueue",
34
+ "useUploader",
35
+ "useCompressor"
36
+ ];
37
+ for (const name of composables) {
38
+ addImports({ name, from: "@cropvue/core" });
39
+ }
40
+ nuxt.options.css.push("cropvue/styles");
41
+ }
42
+ });
43
+
44
+ export { module$1 as default };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@cropvue/nuxt",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Nuxt module for CropVue - auto-imports and SSR handling",
7
+ "author": "Philip Rutberg",
8
+ "keywords": [
9
+ "nuxt",
10
+ "nuxt-module",
11
+ "vue",
12
+ "cropper",
13
+ "image-crop",
14
+ "headless"
15
+ ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/rutbergphilip/cropvue.git",
19
+ "directory": "packages/nuxt"
20
+ },
21
+ "homepage": "https://github.com/rutbergphilip/cropvue",
22
+ "bugs": "https://github.com/rutbergphilip/cropvue/issues",
23
+ "main": "./dist/module.cjs",
24
+ "module": "./dist/module.mjs",
25
+ "types": "./dist/module.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "import": "./dist/module.mjs",
29
+ "require": "./dist/module.cjs",
30
+ "types": "./dist/module.d.ts"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "dependencies": {
37
+ "@cropvue/core": "0.1.0",
38
+ "cropvue": "0.1.0"
39
+ },
40
+ "peerDependencies": {
41
+ "nuxt": "^3.0.0 || ^4.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@nuxt/kit": "^3.15.0",
45
+ "unbuild": "^3.6.0"
46
+ },
47
+ "scripts": {
48
+ "build": "unbuild",
49
+ "dev": "unbuild --stub"
50
+ }
51
+ }