@gluhar/app 4.0.5 → 4.2.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/CHANGELOG.md +22 -0
- package/dist/module.d.mts +3 -1
- package/dist/module.d.ts +3 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -0
- package/dist/runtime/components/GContactLink.vue +46 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
# [4.2.0](https://github.com/gluharco/gluhar/compare/@gluhar/app@4.1.0...@gluhar/app@4.2.0) (2025-09-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🚀 Enhancements
|
|
10
|
+
|
|
11
|
+
- Added an option to switch to @gluhar/v-gsap-nuxt for when the official package is slow to implement changes. ([0956651](https://github.com/gluharco/gluhar/commit/095665101cf45c980982bbde09165971e80b7e96))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.1.0](https://github.com/gluharco/gluhar/compare/@gluhar/app@4.0.5...@gluhar/app@4.1.0) (2025-07-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### 🚀 Enhancements
|
|
21
|
+
|
|
22
|
+
- GContactLink for coping phone and email to clipboard on desktop and tel: mailto: on mobile with data-cursor-text support ([df32796](https://github.com/gluharco/gluhar/commit/df32796c2e79dafb42cd3bbac12f4c1e5167648e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [4.0.5](https://github.com/gluharco/gluhar/compare/@gluhar/app@4.0.4...@gluhar/app@4.0.5) (2025-07-23)
|
|
7
29
|
|
|
8
30
|
**📝 Note:** Version bump only for package @gluhar/app
|
package/dist/module.d.mts
CHANGED
|
@@ -10,7 +10,9 @@ interface GluharAppOptions {
|
|
|
10
10
|
theme?: GluharThemeOptions | false;
|
|
11
11
|
i18n?: GluharI18nOptions | false;
|
|
12
12
|
sanity?: GluharSanityOptions | false;
|
|
13
|
-
vgsap?: ModuleOptions
|
|
13
|
+
vgsap?: (ModuleOptions & {
|
|
14
|
+
dev?: boolean;
|
|
15
|
+
}) | false;
|
|
14
16
|
image?: ModuleOptions$1 | false;
|
|
15
17
|
dayjs?: ModuleOptions$2 | false;
|
|
16
18
|
}
|
package/dist/module.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ interface GluharAppOptions {
|
|
|
10
10
|
theme?: GluharThemeOptions | false;
|
|
11
11
|
i18n?: GluharI18nOptions | false;
|
|
12
12
|
sanity?: GluharSanityOptions | false;
|
|
13
|
-
vgsap?: ModuleOptions
|
|
13
|
+
vgsap?: (ModuleOptions & {
|
|
14
|
+
dev?: boolean;
|
|
15
|
+
}) | false;
|
|
14
16
|
image?: ModuleOptions$1 | false;
|
|
15
17
|
dayjs?: ModuleOptions$2 | false;
|
|
16
18
|
}
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -23,6 +23,10 @@ const module = defineNuxtModule({
|
|
|
23
23
|
await installModule("@gluhar/sanity", sanity);
|
|
24
24
|
}
|
|
25
25
|
if (vgsap !== false) {
|
|
26
|
+
if (vgsap?.dev) {
|
|
27
|
+
await installModule("@gluhar/v-gsap-nuxt", vgsap);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
26
30
|
await installModule("v-gsap-nuxt", vgsap);
|
|
27
31
|
}
|
|
28
32
|
if (image !== false) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useResponsive, computed, ref } from "#imports";
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
phone?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
onCopy?: () => void;
|
|
8
|
+
}>();
|
|
9
|
+
|
|
10
|
+
const defaultCursorText = "Copy to clipboard";
|
|
11
|
+
const cursorText = ref(defaultCursorText);
|
|
12
|
+
|
|
13
|
+
const { isMobile } = useResponsive();
|
|
14
|
+
|
|
15
|
+
const href = computed(() => {
|
|
16
|
+
if (!isMobile.value) return undefined;
|
|
17
|
+
return props.phone ? `tel:${props.phone}` : `mailto:${props.email}`;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const handleClick = async (isPhone: boolean) => {
|
|
21
|
+
const value = isPhone ? props.phone : props.email;
|
|
22
|
+
|
|
23
|
+
if (isMobile.value) return;
|
|
24
|
+
|
|
25
|
+
await navigator.clipboard.writeText(value!);
|
|
26
|
+
|
|
27
|
+
props.onCopy?.();
|
|
28
|
+
|
|
29
|
+
cursorText.value = "Copied!";
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const onMouseLeave = () => {
|
|
33
|
+
cursorText.value = defaultCursorText;
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<a
|
|
39
|
+
:href
|
|
40
|
+
@click="handleClick(!!phone)"
|
|
41
|
+
:data-cursor-text="cursorText"
|
|
42
|
+
@mouseleave="onMouseLeave"
|
|
43
|
+
>
|
|
44
|
+
<slot> {{ phone || email }} </slot>
|
|
45
|
+
</a>
|
|
46
|
+
</template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluhar/app",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
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",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"v-gsap-nuxt": "^1.4.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
+
"@gluhar/v-gsap-nuxt": "^1.5.1",
|
|
54
55
|
"@nuxt/devtools": "latest",
|
|
55
56
|
"@nuxt/eslint-config": "^0.5.6",
|
|
56
57
|
"@nuxt/module-builder": "^0.8.3",
|
|
@@ -62,5 +63,5 @@
|
|
|
62
63
|
"nuxt": "^3.13.1",
|
|
63
64
|
"vitest": "^2.0.5"
|
|
64
65
|
},
|
|
65
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "dc7611b5d47401c0d3ed09089e17c720b17b3f85"
|
|
66
67
|
}
|