@gluhar/app 2.6.0 → 2.6.1
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/CHANGELOG.md +11 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/SanityImg.vue +15 -13
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.6.1](https://github.com/gluharry/gluhar/compare/@gluhar/app@2.6.0...@gluhar/app@2.6.1) (2025-02-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🩹 Fixes
|
|
10
|
+
|
|
11
|
+
- SanityImg to import useMessage and fix by prop ([deec5d1](https://github.com/gluharry/gluhar/commit/deec5d1a5f8bbcbc9e823767ab95b195e867c909))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.6.0](https://github.com/gluharry/gluhar/compare/@gluhar/app@2.5.2...@gluhar/app@2.6.0) (2025-02-07)
|
|
7
18
|
|
|
8
19
|
|
package/dist/module.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, ref } from "#imports";
|
|
2
|
+
import { computed, ref, useMessages } from "#imports";
|
|
3
3
|
import type { SanityImage } from "@gluhar/sanity/types";
|
|
4
4
|
import imageUrlBuilder from "@sanity/image-url";
|
|
5
5
|
import type { ImageFormat } from "@sanity/image-url/lib/types/types";
|
|
6
6
|
import sanityConfig from "~/config/sanity.config";
|
|
7
7
|
|
|
8
|
-
const props =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
8
|
+
const props =
|
|
9
|
+
withDefaults(
|
|
10
|
+
defineProps<{
|
|
11
|
+
image?: SanityImage;
|
|
12
|
+
by?: "width" | "height" | "both";
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
format?: ImageFormat | null;
|
|
16
|
+
}>(),
|
|
17
|
+
);
|
|
18
18
|
|
|
19
19
|
const { l } = useMessages();
|
|
20
20
|
|
|
@@ -33,10 +33,12 @@ const src = computed(() => {
|
|
|
33
33
|
let url = urlFor(props.image);
|
|
34
34
|
|
|
35
35
|
if (props.width) url = url.width(props.width);
|
|
36
|
-
else if (width && props.by === "
|
|
36
|
+
else if (width && (props.by === "width" || !props.by))
|
|
37
|
+
url = url.width(Math.ceil(width));
|
|
37
38
|
|
|
38
39
|
if (props.height) url = url.height(props.height);
|
|
39
|
-
else if (height && props.by === "
|
|
40
|
+
else if (height && (props.by === "height" || !props.by))
|
|
41
|
+
url = url.height(Math.ceil(height));
|
|
40
42
|
|
|
41
43
|
url = url.format(props.format ?? "webp");
|
|
42
44
|
url = url.quality(100);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluhar/app",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Gluhar main package. This combines and configures @gluhar/theme, @gluhar/i18n, @gluhar/sanity and @gluhar/core into one main package. Provides numerous components, composables, utils and types.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@gluhar/core": "^2.0.0",
|
|
41
41
|
"@gluhar/i18n": "^2.0.0",
|
|
42
42
|
"@gluhar/sanity": "^2.0.3",
|
|
43
|
-
"@gluhar/theme": "^2.0.
|
|
43
|
+
"@gluhar/theme": "^2.0.3",
|
|
44
44
|
"@nuxt/kit": "^3.13.1",
|
|
45
45
|
"@pinia/nuxt": "^0.5.4",
|
|
46
46
|
"@sanity/image-url": "^1.1.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"nuxt": "^3.13.1",
|
|
60
60
|
"vitest": "^2.0.5"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "eface90f2dee58d45f4d217f2d3de388f67ed3fc"
|
|
63
63
|
}
|