@edgedev/create-edge-site 1.0.6 → 1.0.7
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/components/Input.vue
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { MaskInput } from 'vue-3-mask'
|
|
3
|
-
|
|
4
2
|
export default {
|
|
5
3
|
inheritAttrs: false,
|
|
6
4
|
}
|
|
@@ -28,10 +26,10 @@ defineOptions({ inheritAttrs: false })
|
|
|
28
26
|
|
|
29
27
|
<template>
|
|
30
28
|
<Field v-slot="{ field }" :name="props.name">
|
|
31
|
-
<
|
|
29
|
+
<i-mask-input
|
|
32
30
|
v-if="props.type === 'phone'"
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
v-model:unmasked="model"
|
|
32
|
+
mask="(000) 000-0000"
|
|
35
33
|
v-bind="{ ...field, ...$attrs }"
|
|
36
34
|
/>
|
|
37
35
|
<input
|
|
@@ -14,6 +14,11 @@ const props = defineProps({
|
|
|
14
14
|
type: String,
|
|
15
15
|
required: false,
|
|
16
16
|
},
|
|
17
|
+
turnstileTheme: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: false,
|
|
20
|
+
default: 'light',
|
|
21
|
+
},
|
|
17
22
|
successMessage: {
|
|
18
23
|
type: String,
|
|
19
24
|
required: false,
|
|
@@ -116,6 +121,7 @@ const onSubmit = async (values, { resetForm }) => {
|
|
|
116
121
|
v-if="props.turnstileSiteSecret"
|
|
117
122
|
v-model="state.turnstileToken"
|
|
118
123
|
:site-key="props.turnstileSiteSecret"
|
|
124
|
+
:theme="props.turnstileTheme"
|
|
119
125
|
/>
|
|
120
126
|
<div v-if="state.submitResponse.sent" :class="state.submitResponse.success ? props.successClass : props.errorClass">
|
|
121
127
|
{{ state.submitResponse.message }}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// directives/scrollReveal.ts
|
|
2
|
+
import type { DirectiveBinding, ObjectDirective } from 'vue'
|
|
3
|
+
|
|
4
|
+
const scrollReveal: ObjectDirective = {
|
|
5
|
+
mounted(el: HTMLElement, binding: DirectiveBinding) {
|
|
6
|
+
const delay = binding.value?.delay || 0
|
|
7
|
+
|
|
8
|
+
el.classList.add(
|
|
9
|
+
'opacity-0',
|
|
10
|
+
'translate-y-8',
|
|
11
|
+
'transition-all',
|
|
12
|
+
'duration-700',
|
|
13
|
+
'ease-out'
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
const observer = new IntersectionObserver(
|
|
17
|
+
([entry]) => {
|
|
18
|
+
if (entry.isIntersecting) {
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
el.classList.remove('opacity-0', 'translate-y-8')
|
|
21
|
+
el.classList.add('opacity-100', 'translate-y-0')
|
|
22
|
+
}, delay)
|
|
23
|
+
observer.unobserve(el)
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{ threshold: 0.2 }
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
observer.observe(el)
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
// SSR shim to prevent Nuxt crash
|
|
33
|
+
getSSRProps() {
|
|
34
|
+
return {}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default scrollReveal
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgedev/create-edge-site",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Create Edge Starter Site",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-edge-site": "./bin/cli.js"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"scrollreveal": "^4.0.9",
|
|
25
25
|
"swiper": "^11.2.6",
|
|
26
26
|
"vue": "^3.5.13",
|
|
27
|
-
"vue-
|
|
27
|
+
"vue-imask": "^7.6.1",
|
|
28
28
|
"vue-router": "^4.5.0",
|
|
29
29
|
"vue-turnstile": "^1.0.11",
|
|
30
30
|
"zod": "^3.24.2"
|