@xenterprises/nuxt-x-marketing 1.0.2 → 1.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/README.md +130 -11
- package/app/components/X/Mark/CodeBlock/index.vue +19 -7
- package/app/components/X/Mark/Divider/Glow.vue +25 -19
- package/app/components/X/Mark/Section/Stitch.vue +45 -31
- package/app/composables/{useParallax.ts → useParallax.js} +6 -7
- package/app/composables/{useScrollReveal.ts → useScrollReveal.js} +4 -4
- package/nuxt.config.ts +1 -11
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -23
- package/.nuxtrc +0 -1
- package/.playground/app.config.ts +0 -74
- package/.playground/app.vue +0 -269
- package/.playground/components/AppFooter.vue +0 -103
- package/.playground/components/AppHeader.vue +0 -41
- package/.playground/components/CodeExample.vue +0 -70
- package/.playground/components/ComponentPlayground.vue +0 -117
- package/.playground/components/DocsHeader.vue +0 -19
- package/.playground/layouts/default.vue +0 -15
- package/.playground/layouts/docs-layout.vue +0 -161
- package/.playground/layouts/docs.vue +0 -11
- package/.playground/nuxt.config.ts +0 -5
- package/.playground/package-lock.json +0 -6
- package/.playground/pages/blog/author.vue +0 -145
- package/.playground/pages/blog/card.vue +0 -149
- package/.playground/pages/blog/cta.vue +0 -131
- package/.playground/pages/blog/detail.vue +0 -471
- package/.playground/pages/blog/list.vue +0 -261
- package/.playground/pages/blog/navigation.vue +0 -228
- package/.playground/pages/blog/sidebar.vue +0 -279
- package/.playground/pages/config.vue +0 -289
- package/.playground/pages/content/comparison.vue +0 -253
- package/.playground/pages/content/cta.vue +0 -245
- package/.playground/pages/content/features.vue +0 -217
- package/.playground/pages/content/newsletter-section.vue +0 -260
- package/.playground/pages/content/newsletter.vue +0 -200
- package/.playground/pages/content/pricing.vue +0 -335
- package/.playground/pages/content/testimonials.vue +0 -188
- package/.playground/pages/hero.vue +0 -257
- package/.playground/pages/index.vue +0 -381
- package/.playground/pages/layout/footer.vue +0 -210
- package/.playground/pages/layout/legal-footer.vue +0 -121
- package/.playground/pages/layout/navbar.vue +0 -285
- package/.playground/pages/layout/section.vue +0 -266
- package/.playground/pages/layout/x-legal.vue +0 -199
- package/.playground/pages/modals/feature-modal.vue +0 -320
- package/.playground/pages/modals/image-lightbox.vue +0 -277
- package/.playground/pages/modals/video-modal.vue +0 -222
- package/.playground/pages/notifications/announcement-bar.vue +0 -164
- package/.playground/pages/notifications/cookie-banner.vue +0 -210
- package/.playground/pages/notifications/cookie-toast.vue +0 -143
- package/.playground/pages/notifications/gdpr.vue +0 -276
- package/.playground/pages/notifications/social-proof-toast.vue +0 -515
- package/.playground/pages/ui/badge.vue +0 -161
- package/.playground/pages/ui/bg-pattern.vue +0 -177
- package/.playground/pages/ui/glass-card.vue +0 -179
- package/.playground/pages/ui/glow-divider.vue +0 -179
- package/.playground/pages/ui/promo-card.vue +0 -259
- package/.playground/pages/ui/section-stitch.vue +0 -411
- package/.playground/pages/utilities/back-to-top.vue +0 -153
- package/.playground/pages/utilities/popup-chat.vue +0 -224
- package/componentList.json +0 -2129
- package/screenshots/playground-home.png +0 -0
- package/tsconfig.json +0 -3
- /package/app/composables/{useXBlog.ts → useXBlog.js} +0 -0
package/README.md
CHANGED
|
@@ -988,24 +988,143 @@ npm run test:e2e
|
|
|
988
988
|
|
|
989
989
|
---
|
|
990
990
|
|
|
991
|
+
## Composables
|
|
992
|
+
|
|
993
|
+
| Composable | Description |
|
|
994
|
+
|------------|-------------|
|
|
995
|
+
| `useScrollReveal(options?)` | Intersection Observer scroll animations. Auto-adds `is-visible` class to `[data-reveal]`, `.xFadeUp`, `.xFadeIn`, `.xFadeLeft`, `.xFadeRight`, `.xScale`, `.xFadeUp-stagger` elements. |
|
|
996
|
+
| `useStaggerReveal(selector, delay?)` | Adds incremental `transition-delay` to `[data-reveal]` children inside a container. |
|
|
997
|
+
| `useParallax(options?)` | Parallax scroll effect for `.xParallax[data-parallax-speed]` elements. Uses `requestAnimationFrame` for performance. |
|
|
998
|
+
| `useElementParallax(speed?)` | Individual element parallax via template ref. Returns `{ elementRef }`. |
|
|
999
|
+
| `useXBlog()` | Blog data fetching composable. Reads `runtimeConfig.public.apiURL`. |
|
|
1000
|
+
|
|
1001
|
+
All composables are SSR-safe — they guard lifecycle hooks with `getCurrentInstance()` and `import.meta.client` checks.
|
|
1002
|
+
|
|
1003
|
+
---
|
|
1004
|
+
|
|
1005
|
+
## Environment Variables
|
|
1006
|
+
|
|
1007
|
+
| Name | Required | Description |
|
|
1008
|
+
|------|----------|-------------|
|
|
1009
|
+
| `NUXT_PUBLIC_API_URL` | No | Base API URL for blog composable (used by `useXBlog`) |
|
|
1010
|
+
| Marker.io Project ID | No | Set via `appConfig.xMarketing.config.markerProjectId` (not env var) |
|
|
1011
|
+
| Newsletter Org ID | No | Set via `appConfig.xMarketing.config.emailMarketingNewsletters.organizationId` |
|
|
1012
|
+
|
|
1013
|
+
The layer itself has no required environment variables. All configuration is done via `app.config.ts`.
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
991
1017
|
## CSS Classes
|
|
992
1018
|
|
|
993
|
-
|
|
1019
|
+
### Typography
|
|
1020
|
+
|
|
1021
|
+
| Class | Description |
|
|
1022
|
+
|-------|-------------|
|
|
1023
|
+
| `xText-display` | Display heading — `clamp(3rem, 8vw, 6rem)`, weight 700, tight tracking |
|
|
1024
|
+
| `xText-headline` | Section headline — `clamp(2rem, 5vw, 3.5rem)`, weight 600 |
|
|
1025
|
+
| `xText-title` | Card/feature title — `clamp(1.25rem, 3vw, 1.75rem)`, weight 600 |
|
|
1026
|
+
| `xText-body` | Body text — `1.125rem`, line-height 1.7 |
|
|
1027
|
+
| `xText-small` | Captions/labels — `0.875rem` |
|
|
1028
|
+
| `xText-eyebrow` | Uppercase label — `0.75rem`, 0.1em tracking |
|
|
1029
|
+
| `xText-balance` | Applies `text-wrap: balance` |
|
|
1030
|
+
| `xText-gradient` | Gradient text using primary color |
|
|
1031
|
+
|
|
1032
|
+
### Scroll Animations
|
|
1033
|
+
|
|
1034
|
+
| Class | Description |
|
|
1035
|
+
|-------|-------------|
|
|
1036
|
+
| `xFadeUp` | Fade in + slide up (24px) on scroll |
|
|
1037
|
+
| `xFadeIn` | Simple fade in on scroll |
|
|
1038
|
+
| `xFadeLeft` | Fade in from left (-24px) on scroll |
|
|
1039
|
+
| `xFadeRight` | Fade in from right (24px) on scroll |
|
|
1040
|
+
| `xScale` | Scale in (0.95 → 1) on scroll |
|
|
1041
|
+
| `xFadeUp-stagger` | Stagger children with 100ms delay increments (up to 6 children) |
|
|
1042
|
+
| `[data-reveal]` | Legacy fade up (40px) on scroll |
|
|
1043
|
+
|
|
1044
|
+
### Hover Effects
|
|
1045
|
+
|
|
1046
|
+
| Class | Description |
|
|
1047
|
+
|-------|-------------|
|
|
1048
|
+
| `xHover-lift` | Lift up 4px + shadow on hover |
|
|
1049
|
+
| `xHover-grow` | Scale to 1.02 on hover |
|
|
1050
|
+
| `xHover-glow` | Primary color glow shadow on hover |
|
|
1051
|
+
| `xHover-glow-neutral` | Neutral glow shadow on hover |
|
|
1052
|
+
| `xHover-glow-subtle` | Subtle glow shadow on hover |
|
|
1053
|
+
| `xHover-zoom` | Zoom child `<img>` to 1.08 on hover |
|
|
1054
|
+
|
|
1055
|
+
### Glass & Glow
|
|
994
1056
|
|
|
995
1057
|
| Class | Description |
|
|
996
1058
|
|-------|-------------|
|
|
997
|
-
| `
|
|
998
|
-
| `
|
|
999
|
-
| `
|
|
1000
|
-
| `
|
|
1001
|
-
| `
|
|
1002
|
-
| `
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1059
|
+
| `xGlass` | Glassmorphism — 20px blur, white/70 bg, border, shadow |
|
|
1060
|
+
| `xGlass-subtle` | Light glassmorphism — 8px blur |
|
|
1061
|
+
| `xGlass-heavy` | Heavy glassmorphism — 40px blur |
|
|
1062
|
+
| `xGlow-divider` | Glowing horizontal divider line |
|
|
1063
|
+
| `xGlow-border` | Glowing gradient border |
|
|
1064
|
+
| `xGlow-text` | Text glow shadow |
|
|
1065
|
+
|
|
1066
|
+
### Overlays
|
|
1067
|
+
|
|
1068
|
+
| Class | Description |
|
|
1069
|
+
|-------|-------------|
|
|
1070
|
+
| `xOverlay-light` | 30% black overlay |
|
|
1071
|
+
| `xOverlay-heavy` | 60% black overlay |
|
|
1072
|
+
| `xOverlay-gradient` | Bottom-to-top gradient overlay |
|
|
1073
|
+
| `xOverlay-vignette` | Radial vignette overlay |
|
|
1074
|
+
|
|
1075
|
+
### Parallax
|
|
1076
|
+
|
|
1077
|
+
| Class | Description |
|
|
1078
|
+
|-------|-------------|
|
|
1079
|
+
| `xParallax` | JS-driven parallax (use with `data-parallax-speed="0.3"`) |
|
|
1080
|
+
| `xParallax-bg` | CSS-only parallax (`background-attachment: fixed`) |
|
|
1081
|
+
|
|
1082
|
+
All animations respect `prefers-reduced-motion: reduce`.
|
|
1083
|
+
|
|
1084
|
+
---
|
|
1085
|
+
|
|
1086
|
+
## How It Works
|
|
1087
|
+
|
|
1088
|
+
The layer provides a complete marketing website toolkit built on Nuxt UI v4:
|
|
1089
|
+
|
|
1090
|
+
1. **Component Registration**: All components in `app/components/X/Mark/` are auto-imported by Nuxt with the `XMark` prefix (e.g., `X/Mark/Hero/index.vue` → `<XMarkHero>`). Branded X Enterprises components live under `X/X/` with the `XX` prefix.
|
|
1091
|
+
|
|
1092
|
+
2. **Design System**: `app/assets/css/x-marketing.css` defines CSS custom properties for typography scale, spacing, colors, shadows, and motion. It uses Tailwind CSS v4 with `@theme static` for custom color palettes ("brand" and "deep"). Dark mode overrides use `.dark` selector.
|
|
1093
|
+
|
|
1094
|
+
3. **Animations**: A client-side plugin (`marketing.client.ts`) auto-initializes `useScrollReveal()` and `useParallax()` globally on mount. Components that need scroll animations can also call `useScrollReveal()` directly.
|
|
1095
|
+
|
|
1096
|
+
4. **Configuration**: `app.config.ts` provides the `xMarketing` namespace with header/footer/blog configuration and Nuxt UI theme overrides. Consumer apps merge their own `app.config.ts` to customize.
|
|
1097
|
+
|
|
1098
|
+
5. **Type System**: `app/types/marketing.d.ts` exports interfaces for all data structures (BlogPost, Feature, PricingPlan, Testimonial, etc.) used across components.
|
|
1099
|
+
|
|
1100
|
+
---
|
|
1101
|
+
|
|
1102
|
+
## Layer Architecture
|
|
1103
|
+
|
|
1104
|
+
| Path | Purpose |
|
|
1105
|
+
|------|---------|
|
|
1106
|
+
| `nuxt.config.ts` | Registers `@nuxt/ui`, loads CSS, enables SSR and devtools |
|
|
1107
|
+
| `app/app.config.ts` | Default xMarketing config + Nuxt UI theme overrides + type augmentation |
|
|
1108
|
+
| `app/app.vue` | Default app shell with navbar, newsletter, footer (override in consumer app) |
|
|
1109
|
+
| `app/assets/css/x-marketing.css` | Full design system: colors, typography, animations, effects |
|
|
1110
|
+
| `app/components/X/Mark/` | Generic marketing components (auto-imported as `XMark*`) |
|
|
1111
|
+
| `app/components/X/X/` | X Enterprises branded components (auto-imported as `XX*`) |
|
|
1112
|
+
| `app/components/X/Footer/` | Legacy footer components |
|
|
1113
|
+
| `app/components/X/Header/` | Legacy header components |
|
|
1114
|
+
| `app/composables/` | Composables: useScrollReveal, useParallax, useXBlog |
|
|
1115
|
+
| `app/plugins/marketing.client.ts` | Client plugin: auto-initializes scroll/parallax globally |
|
|
1116
|
+
| `app/types/marketing.d.ts` | TypeScript interfaces for all data structures |
|
|
1117
|
+
| `app/pages/` | Default blog pages (index + detail with slug routing) |
|
|
1118
|
+
|
|
1119
|
+
### Overriding in Consumer Apps
|
|
1120
|
+
|
|
1121
|
+
- **nuxt.config.ts**: Consumer config merges with layer config. Add modules, runtime config, etc.
|
|
1122
|
+
- **app.config.ts**: Deep-merges with layer defaults. Set `xMarketing.header`, `xMarketing.footer`, etc.
|
|
1123
|
+
- **app.vue**: Override entirely by creating your own `app.vue` in the consumer app.
|
|
1124
|
+
- **Pages**: Consumer pages take precedence. Override `/blog` by creating `pages/blog/index.vue`.
|
|
1006
1125
|
|
|
1007
1126
|
---
|
|
1008
1127
|
|
|
1009
1128
|
## License
|
|
1010
1129
|
|
|
1011
|
-
|
|
1130
|
+
UNLICENSED - Proprietary to X Enterprises.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
<!-- Shiki Highlighter - wrapped in ClientOnly for SSR compatibility -->
|
|
25
25
|
<ClientOnly>
|
|
26
|
-
<Shiki :code="code" :lang="
|
|
26
|
+
<Shiki :code="code" :lang="language" />
|
|
27
27
|
<template #fallback>
|
|
28
28
|
<pre class="shiki-fallback"><code>{{ code }}</code></pre>
|
|
29
29
|
</template>
|
|
@@ -31,12 +31,24 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
|
-
<script setup
|
|
35
|
-
const props = defineProps
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
<script setup>
|
|
35
|
+
const props = defineProps({
|
|
36
|
+
/** Code string to highlight */
|
|
37
|
+
code: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
/** Language for syntax highlighting */
|
|
42
|
+
language: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: '',
|
|
45
|
+
},
|
|
46
|
+
/** Show copy button */
|
|
47
|
+
showCopy: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
40
52
|
|
|
41
53
|
const copied = ref(false);
|
|
42
54
|
|
|
@@ -28,25 +28,31 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
|
-
<script setup
|
|
32
|
-
const props =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
31
|
+
<script setup>
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
/** Color theme - any Tailwind color or 'white' */
|
|
34
|
+
color: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'primary',
|
|
37
|
+
},
|
|
38
|
+
/** Vertical spacing (padding) */
|
|
39
|
+
spacing: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'py-16',
|
|
42
|
+
},
|
|
43
|
+
/** Glow intensity */
|
|
44
|
+
intensity: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: 'medium',
|
|
47
|
+
validator: (v) => ['none', 'subtle', 'medium', 'strong'].includes(v),
|
|
48
|
+
},
|
|
49
|
+
/** Line height */
|
|
50
|
+
height: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'default',
|
|
53
|
+
validator: (v) => ['thin', 'default', 'thick'].includes(v),
|
|
54
|
+
},
|
|
55
|
+
})
|
|
50
56
|
|
|
51
57
|
const heightClass = computed(() => {
|
|
52
58
|
const heights = {
|
|
@@ -25,37 +25,51 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script setup
|
|
29
|
-
const props =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
28
|
+
<script setup>
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
/** Shape variant */
|
|
31
|
+
variant: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'diagonal',
|
|
34
|
+
validator: (v) => ['concave', 'convex', 'diagonal', 'slant', 'clouds', 'waves', 'tilt', 'peaks', 'scallop', 'arrow'].includes(v),
|
|
35
|
+
},
|
|
36
|
+
/** Top section color */
|
|
37
|
+
topColor: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'rgb(243 244 246)',
|
|
40
|
+
},
|
|
41
|
+
/** Bottom section color */
|
|
42
|
+
bottomColor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'rgb(249 250 251)',
|
|
45
|
+
},
|
|
46
|
+
/** Height size */
|
|
47
|
+
height: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: 'md',
|
|
50
|
+
validator: (v) => ['sm', 'md', 'lg', 'xl', '2xl', '3xl'].includes(v),
|
|
51
|
+
},
|
|
52
|
+
/** Reverse direction (flip horizontally) */
|
|
53
|
+
reverse: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
/** Invert vertically (swap top/bottom) */
|
|
58
|
+
invert: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
/** Show glow line */
|
|
63
|
+
glow: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
/** Glow line color */
|
|
68
|
+
glowColor: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'rgba(99, 102, 241, 0.5)',
|
|
71
|
+
},
|
|
72
|
+
})
|
|
59
73
|
|
|
60
74
|
const heightValue = computed(() => {
|
|
61
75
|
const heights = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parallax Scroll Effect Composable
|
|
3
3
|
* Implements smooth parallax scrolling for background elements
|
|
4
|
-
* From spec-prompt.md specification
|
|
5
4
|
*/
|
|
6
5
|
export const useParallax = (options = {}) => {
|
|
7
6
|
// Only register lifecycle hooks when inside a component instance
|
|
@@ -13,8 +12,8 @@ export const useParallax = (options = {}) => {
|
|
|
13
12
|
...options,
|
|
14
13
|
};
|
|
15
14
|
|
|
16
|
-
const elements = ref
|
|
17
|
-
let handleScroll
|
|
15
|
+
const elements = ref([]);
|
|
16
|
+
let handleScroll = null;
|
|
18
17
|
|
|
19
18
|
const initParallax = () => {
|
|
20
19
|
if (import.meta.client) {
|
|
@@ -28,7 +27,7 @@ export const useParallax = (options = {}) => {
|
|
|
28
27
|
const scrollY = window.scrollY;
|
|
29
28
|
|
|
30
29
|
elements.value.forEach((el) => {
|
|
31
|
-
const speed = parseFloat(
|
|
30
|
+
const speed = parseFloat(el.dataset.parallaxSpeed || String(defaultOptions.defaultSpeed));
|
|
32
31
|
const rect = el.getBoundingClientRect();
|
|
33
32
|
const offsetTop = rect.top + scrollY;
|
|
34
33
|
|
|
@@ -36,7 +35,7 @@ export const useParallax = (options = {}) => {
|
|
|
36
35
|
const offset = (scrollY - offsetTop) * speed;
|
|
37
36
|
|
|
38
37
|
// Apply the transform
|
|
39
|
-
|
|
38
|
+
el.style.transform = `translateY(${offset}px)`;
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
41
|
|
|
@@ -89,8 +88,8 @@ export const useParallax = (options = {}) => {
|
|
|
89
88
|
* Usage: const { elementRef } = useElementParallax(0.3)
|
|
90
89
|
*/
|
|
91
90
|
export const useElementParallax = (speed = 0.5) => {
|
|
92
|
-
const elementRef = ref
|
|
93
|
-
let handleScroll
|
|
91
|
+
const elementRef = ref(null);
|
|
92
|
+
let handleScroll = null;
|
|
94
93
|
|
|
95
94
|
onMounted(() => {
|
|
96
95
|
if (import.meta.client && elementRef.value) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - .xFadeUp, .xFadeIn, .xFadeLeft, .xFadeRight, .xScale classes
|
|
9
9
|
* - .xFadeUp-stagger for staggered child animations
|
|
10
10
|
*/
|
|
11
|
-
export const useScrollReveal = (options
|
|
11
|
+
export const useScrollReveal = (options = {}) => {
|
|
12
12
|
// Only register lifecycle hooks when inside a component instance
|
|
13
13
|
const instance = getCurrentInstance();
|
|
14
14
|
if (!instance) return { initScrollReveal: () => {}, cleanup: () => {} };
|
|
@@ -19,7 +19,7 @@ export const useScrollReveal = (options: Record<string, unknown> = {}) => {
|
|
|
19
19
|
...options,
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const observer = ref
|
|
22
|
+
const observer = ref(null);
|
|
23
23
|
|
|
24
24
|
// Selector for all animation elements
|
|
25
25
|
const animationSelectors = [
|
|
@@ -82,7 +82,7 @@ export const useScrollReveal = (options: Record<string, unknown> = {}) => {
|
|
|
82
82
|
/**
|
|
83
83
|
* Helper to add staggered reveal delays to child elements
|
|
84
84
|
*/
|
|
85
|
-
export const useStaggerReveal = (containerSelector
|
|
85
|
+
export const useStaggerReveal = (containerSelector, staggerDelay = 100) => {
|
|
86
86
|
if (import.meta.client) {
|
|
87
87
|
onMounted(() => {
|
|
88
88
|
setTimeout(() => {
|
|
@@ -90,7 +90,7 @@ export const useStaggerReveal = (containerSelector: string, staggerDelay = 100)
|
|
|
90
90
|
if (container) {
|
|
91
91
|
const children = container.querySelectorAll('[data-reveal]');
|
|
92
92
|
children.forEach((child, index) => {
|
|
93
|
-
|
|
93
|
+
child.style.transitionDelay = `${index * staggerDelay}ms`;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}, 100);
|
package/nuxt.config.ts
CHANGED
|
@@ -9,16 +9,6 @@ export default defineNuxtConfig({
|
|
|
9
9
|
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
|
-
modules: ["@nuxt/ui"
|
|
13
|
-
shiki: {
|
|
14
|
-
bundledThemes: ["github-dark-default", "github-light-default"],
|
|
15
|
-
bundledLangs: ["javascript", "typescript", "vue", "html", "css", "json", "yaml", "sql", "markdown", "bash", "shellscript"],
|
|
16
|
-
defaultTheme: "github-dark-default",
|
|
17
|
-
langAlias: {
|
|
18
|
-
shell: "bash",
|
|
19
|
-
sh: "bash",
|
|
20
|
-
zsh: "bash",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
12
|
+
modules: ["@nuxt/ui"],
|
|
23
13
|
css: [resolve(__dirname, "app/assets/css/x-marketing.css")],
|
|
24
14
|
});
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(curl:*)",
|
|
5
|
-
"Bash(npm run dev:*)",
|
|
6
|
-
"Bash(cat:*)",
|
|
7
|
-
"Bash(npm install:*)",
|
|
8
|
-
"Bash(find:*)",
|
|
9
|
-
"Bash(ls:*)",
|
|
10
|
-
"Skill(frontend-design)",
|
|
11
|
-
"Bash(git log:*)",
|
|
12
|
-
"Bash(test:*)",
|
|
13
|
-
"Bash(timeout 300 npx playwright test:*)",
|
|
14
|
-
"Bash(npx playwright test:*)",
|
|
15
|
-
"Bash(npx playwright install:*)",
|
|
16
|
-
"Bash({} ;)",
|
|
17
|
-
"mcp__plugin_context7_context7__resolve-library-id",
|
|
18
|
-
"mcp__plugin_context7_context7__query-docs",
|
|
19
|
-
"Bash(git reset:*)",
|
|
20
|
-
"Bash(python3:*)"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}
|
package/.nuxtrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
typescript.includeWorkspace = true
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export default defineAppConfig({
|
|
2
|
-
xMarketing: {
|
|
3
|
-
name: "X Marketing Components",
|
|
4
|
-
config: {
|
|
5
|
-
markerProjectId: "",
|
|
6
|
-
emailMarketingNewsletters: {
|
|
7
|
-
organizationId: "", // Disabled for documentation playground
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
header: {
|
|
11
|
-
logo: {
|
|
12
|
-
src: "https://cdn.x.enterprises/logo-x.png",
|
|
13
|
-
srcDark: "https://cdn.x.enterprises/logo-x.png",
|
|
14
|
-
alt: "nuxt-x-marketing",
|
|
15
|
-
},
|
|
16
|
-
nav: {
|
|
17
|
-
links: [
|
|
18
|
-
{ label: "Features", to: "#features" },
|
|
19
|
-
{ label: "Testimonials", to: "#testimonials" },
|
|
20
|
-
{ label: "Pricing", to: "#pricing" },
|
|
21
|
-
{ label: "Blog", to: "/blog/card" },
|
|
22
|
-
],
|
|
23
|
-
buttons: [
|
|
24
|
-
{ label: "Sign In", to: "#" },
|
|
25
|
-
{ label: "Get Started", to: "#", color: "primary" },
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
footer: {
|
|
30
|
-
bg: {
|
|
31
|
-
color: "bg-gray-900",
|
|
32
|
-
},
|
|
33
|
-
logo: {
|
|
34
|
-
src: "https://cdn.x.enterprises/logo-x.png",
|
|
35
|
-
alt: "nuxt-x-marketing",
|
|
36
|
-
},
|
|
37
|
-
body: "A comprehensive collection of beautifully designed marketing components built with Nuxt UI v4 and Tailwind CSS. Perfect for landing pages, marketing sites, and SaaS products.",
|
|
38
|
-
socials: [
|
|
39
|
-
{ name: "GitHub", url: "https://github.com", icon: "i-lucide-github" },
|
|
40
|
-
{ name: "Twitter", url: "https://twitter.com", icon: "i-lucide-twitter" },
|
|
41
|
-
{ name: "LinkedIn", url: "https://linkedin.com", icon: "i-lucide-linkedin" },
|
|
42
|
-
],
|
|
43
|
-
columns: [
|
|
44
|
-
{
|
|
45
|
-
headerLabel: "Product",
|
|
46
|
-
links: [
|
|
47
|
-
{ label: "Features", to: "#features" },
|
|
48
|
-
{ label: "Pricing", to: "#pricing" },
|
|
49
|
-
{ label: "Changelog", to: "#" },
|
|
50
|
-
{ label: "Roadmap", to: "#" },
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
headerLabel: "Company",
|
|
55
|
-
links: [
|
|
56
|
-
{ label: "About", to: "#" },
|
|
57
|
-
{ label: "Blog", to: "/blog/card" },
|
|
58
|
-
{ label: "Careers", to: "#" },
|
|
59
|
-
{ label: "Contact", to: "#" },
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
headerLabel: "Resources",
|
|
64
|
-
links: [
|
|
65
|
-
{ label: "Documentation", to: "#" },
|
|
66
|
-
{ label: "Guides", to: "#" },
|
|
67
|
-
{ label: "Help Center", to: "#" },
|
|
68
|
-
{ label: "Community", to: "#" },
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
});
|