grantthomas-nuxt 1.0.29 → 1.0.30

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": "@grantthomas/nuxt",
3
3
  "configKey": "grantThomasNuxt",
4
- "version": "1.0.29",
4
+ "version": "1.0.30",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -36,6 +36,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
36
36
  type: StringConstructor;
37
37
  default: null;
38
38
  };
39
+ hideAspectRatioSelector: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
39
43
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
44
  error: (...args: any[]) => void;
41
45
  cancel: (...args: any[]) => void;
@@ -78,6 +82,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
78
82
  type: StringConstructor;
79
83
  default: null;
80
84
  };
85
+ hideAspectRatioSelector: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
81
89
  }>> & Readonly<{
82
90
  onError?: ((...args: any[]) => any) | undefined;
83
91
  onCancel?: ((...args: any[]) => any) | undefined;
@@ -93,4 +101,5 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
93
101
  outputMimeType: string;
94
102
  quality: number;
95
103
  fileName: string;
104
+ hideAspectRatioSelector: boolean;
96
105
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -35,6 +35,10 @@ const props = defineProps({
35
35
  fileName: {
36
36
  type: String,
37
37
  default: null
38
+ },
39
+ hideAspectRatioSelector: {
40
+ type: Boolean,
41
+ default: false
38
42
  }
39
43
  });
40
44
  const emit = defineEmits(["crop", "cancel", "ready", "change", "error"]);
@@ -54,7 +58,7 @@ const aspectRatioOptions = [
54
58
  ];
55
59
  const selectedAspectRatio = ref(props.defaultAspectRatio || null);
56
60
  const showAspectRatioSelector = computed(() => {
57
- return props.aspectRatio === null;
61
+ return props.aspectRatio === null && !props.hideAspectRatioSelector;
58
62
  });
59
63
  const parsedAspectRatio = computed(() => {
60
64
  const ratioString = props.aspectRatio || selectedAspectRatio.value;
@@ -78,6 +82,12 @@ const stencilProps = computed(() => {
78
82
  }
79
83
  return props2;
80
84
  });
85
+ const defaultSize = ({ imageSize, visibleArea }) => {
86
+ return {
87
+ width: imageSize.width,
88
+ height: imageSize.height
89
+ };
90
+ };
81
91
  const finalOutputMimeType = computed(() => {
82
92
  const type = props.outputMimeType || actualMimeType.value || props.mimeType || "image/png";
83
93
  const supportedTypes = ["image/png", "image/jpeg", "image/webp"];
@@ -240,6 +250,7 @@ const onError = (error) => {
240
250
  ref="cropper"
241
251
  :src="processedImageUrl"
242
252
  :stencil-props="stencilProps"
253
+ :default-size="defaultSize"
243
254
  class="cropper"
244
255
  @ready="onReady"
245
256
  @change="onChange"
@@ -36,6 +36,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
36
36
  type: StringConstructor;
37
37
  default: null;
38
38
  };
39
+ hideAspectRatioSelector: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
39
43
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
44
  error: (...args: any[]) => void;
41
45
  cancel: (...args: any[]) => void;
@@ -78,6 +82,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
78
82
  type: StringConstructor;
79
83
  default: null;
80
84
  };
85
+ hideAspectRatioSelector: {
86
+ type: BooleanConstructor;
87
+ default: boolean;
88
+ };
81
89
  }>> & Readonly<{
82
90
  onError?: ((...args: any[]) => any) | undefined;
83
91
  onCancel?: ((...args: any[]) => any) | undefined;
@@ -93,4 +101,5 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
93
101
  outputMimeType: string;
94
102
  quality: number;
95
103
  fileName: string;
104
+ hideAspectRatioSelector: boolean;
96
105
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grantthomas-nuxt",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "Crud module for Nuxt 3 interacting with sibling .net project",
5
5
  "repository": "Tap-Leagues/GrantThomas.Nuxt",
6
6
  "license": "MIT",