@xenterprises/nuxt-x-marketing 1.0.3 → 1.1.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.
Files changed (63) hide show
  1. package/LICENSE +69 -29
  2. package/README.md +130 -11
  3. package/app/components/X/Mark/CodeBlock/index.vue +19 -7
  4. package/app/components/X/Mark/Divider/Glow.vue +25 -19
  5. package/app/components/X/Mark/Section/Stitch.vue +45 -31
  6. package/app/composables/{useParallax.ts → useParallax.js} +6 -7
  7. package/app/composables/{useScrollReveal.ts → useScrollReveal.js} +4 -4
  8. package/package.json +2 -2
  9. package/.claude/settings.local.json +0 -8
  10. package/.nuxtrc +0 -1
  11. package/.playground/app.config.ts +0 -74
  12. package/.playground/app.vue +0 -269
  13. package/.playground/components/AppFooter.vue +0 -103
  14. package/.playground/components/AppHeader.vue +0 -41
  15. package/.playground/components/CodeExample.vue +0 -70
  16. package/.playground/components/ComponentPlayground.vue +0 -117
  17. package/.playground/components/DocsHeader.vue +0 -19
  18. package/.playground/layouts/default.vue +0 -15
  19. package/.playground/layouts/docs-layout.vue +0 -161
  20. package/.playground/layouts/docs.vue +0 -11
  21. package/.playground/nuxt.config.ts +0 -17
  22. package/.playground/pages/blog/author.vue +0 -145
  23. package/.playground/pages/blog/card.vue +0 -149
  24. package/.playground/pages/blog/cta.vue +0 -131
  25. package/.playground/pages/blog/detail.vue +0 -471
  26. package/.playground/pages/blog/list.vue +0 -261
  27. package/.playground/pages/blog/navigation.vue +0 -228
  28. package/.playground/pages/blog/sidebar.vue +0 -279
  29. package/.playground/pages/config.vue +0 -289
  30. package/.playground/pages/content/comparison.vue +0 -253
  31. package/.playground/pages/content/cta.vue +0 -245
  32. package/.playground/pages/content/features.vue +0 -217
  33. package/.playground/pages/content/newsletter-section.vue +0 -260
  34. package/.playground/pages/content/newsletter.vue +0 -200
  35. package/.playground/pages/content/pricing.vue +0 -335
  36. package/.playground/pages/content/testimonials.vue +0 -188
  37. package/.playground/pages/hero.vue +0 -257
  38. package/.playground/pages/index.vue +0 -381
  39. package/.playground/pages/layout/footer.vue +0 -210
  40. package/.playground/pages/layout/legal-footer.vue +0 -121
  41. package/.playground/pages/layout/navbar.vue +0 -285
  42. package/.playground/pages/layout/section.vue +0 -266
  43. package/.playground/pages/layout/x-legal.vue +0 -199
  44. package/.playground/pages/modals/feature-modal.vue +0 -320
  45. package/.playground/pages/modals/image-lightbox.vue +0 -277
  46. package/.playground/pages/modals/video-modal.vue +0 -222
  47. package/.playground/pages/notifications/announcement-bar.vue +0 -164
  48. package/.playground/pages/notifications/cookie-banner.vue +0 -210
  49. package/.playground/pages/notifications/cookie-toast.vue +0 -143
  50. package/.playground/pages/notifications/gdpr.vue +0 -276
  51. package/.playground/pages/notifications/social-proof-toast.vue +0 -515
  52. package/.playground/pages/ui/badge.vue +0 -161
  53. package/.playground/pages/ui/bg-pattern.vue +0 -177
  54. package/.playground/pages/ui/glass-card.vue +0 -179
  55. package/.playground/pages/ui/glow-divider.vue +0 -179
  56. package/.playground/pages/ui/promo-card.vue +0 -259
  57. package/.playground/pages/ui/section-stitch.vue +0 -411
  58. package/.playground/pages/utilities/back-to-top.vue +0 -153
  59. package/.playground/pages/utilities/popup-chat.vue +0 -224
  60. package/componentList.json +0 -2129
  61. package/screenshots/playground-home.png +0 -0
  62. package/tsconfig.json +0 -3
  63. /package/app/composables/{useXBlog.ts → useXBlog.js} +0 -0
package/LICENSE CHANGED
@@ -4,54 +4,94 @@ Copyright (c) 2024-2026 X Enterprises LLC. All Rights Reserved.
4
4
 
5
5
  This software and associated documentation files (the "Software") are the
6
6
  exclusive property of X Enterprises LLC, a Washington limited liability
7
- company.
7
+ company ("X Enterprises"). The Software is distributed through public
8
+ package registries (including npm) for operational convenience only; such
9
+ distribution does not grant any rights beyond those expressly stated below.
8
10
 
9
11
  TERMS AND CONDITIONS
10
12
 
11
13
  1. OWNERSHIP
12
14
  All rights, title, and interest in and to the Software, including all
13
15
  intellectual property rights, are and shall remain the exclusive property
14
- of X Enterprises LLC.
16
+ of X Enterprises. No rights are granted except as expressly set forth in
17
+ this License.
15
18
 
16
- 2. RESTRICTIONS
17
- Without the prior written consent of X Enterprises LLC, you may not:
18
- - Copy, modify, or distribute the Software
19
- - Reverse engineer, decompile, or disassemble the Software
20
- - Sublicense, sell, lease, or otherwise transfer the Software
21
- - Remove or alter any proprietary notices or labels
19
+ 2. PERMITTED USE
20
+ Subject to the restrictions in Section 3, you are permitted to download,
21
+ install, and execute the Software solely as a dependency of:
22
22
 
23
- 3. AUTHORIZED USE
24
- Use of this Software is limited to authorized employees, contractors, and
25
- agents of X Enterprises LLC, solely for purposes approved by X Enterprises
26
- LLC.
23
+ (a) software developed, owned, or operated by X Enterprises;
24
+
25
+ (b) software that X Enterprises has developed, delivered, or licensed to
26
+ a third party ("Client") under a written engagement agreement with
27
+ X Enterprises, when such use is performed by or on behalf of that
28
+ Client; or
29
+
30
+ (c) end-user access to, or consumption of, a product or service described
31
+ in (a) or (b), provided that such access does not involve
32
+ redistribution, modification, or separate use of the Software.
33
+
34
+ Permitted Use includes automated installation and execution by continuous
35
+ integration systems, container builds, hosting platforms, and similar
36
+ infrastructure, to the extent necessary to support (a), (b), or (c).
37
+
38
+ 3. RESTRICTIONS
39
+ Except as expressly permitted in Section 2, and without the prior written
40
+ consent of X Enterprises, you may not:
41
+
42
+ (a) copy, modify, adapt, translate, or create derivative works of the
43
+ Software for any purpose outside the scope of Section 2;
44
+
45
+ (b) redistribute, republish, sublicense, sell, lease, rent, or otherwise
46
+ transfer the Software, in whole or in part, whether standalone or
47
+ bundled with other software;
48
+
49
+ (c) reverse engineer, decompile, disassemble, or attempt to derive the
50
+ source code or underlying ideas, algorithms, structure, or
51
+ organization of the Software, except to the extent such activity is
52
+ expressly permitted by applicable law notwithstanding this
53
+ restriction;
54
+
55
+ (d) use the Software, in whole or in part, to develop, operate, or
56
+ provide any product or service that competes with or substitutes for
57
+ any X Enterprises product or service;
58
+
59
+ (e) remove, obscure, or alter any copyright, trademark, license, or other
60
+ proprietary notice contained in or on the Software; or
61
+
62
+ (f) use the Software in violation of any applicable law or regulation.
27
63
 
28
64
  4. NO WARRANTY
29
65
  THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
66
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
67
  FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
32
- X ENTERPRISES LLC BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
33
- WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF,
34
- OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
- SOFTWARE.
68
+ X ENTERPRISES BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
69
+ WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT
70
+ OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
71
+ THE SOFTWARE.
36
72
 
37
73
  5. LIMITATION OF LIABILITY
38
- IN NO EVENT SHALL X ENTERPRISES LLC BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
39
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
40
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
41
- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
43
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
44
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
74
+ IN NO EVENT SHALL X ENTERPRISES BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
75
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
76
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
77
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
78
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
79
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
80
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45
81
 
46
82
  6. GOVERNING LAW
47
- This license shall be governed by and construed in accordance with the laws
48
- of the State of Washington, United States, without regard to its conflict
49
- of law provisions.
83
+ This License shall be governed by and construed in accordance with the
84
+ laws of the State of Washington, United States, without regard to its
85
+ conflict of law provisions. Exclusive jurisdiction for any dispute
86
+ arising out of this License shall lie in the state or federal courts
87
+ located in King County, Washington.
50
88
 
51
89
  7. TERMINATION
52
- This license is effective until terminated. X Enterprises LLC may terminate
53
- this license at any time without notice. Upon termination, you must destroy
54
- all copies of the Software in your possession.
90
+ This License is effective until terminated. Your rights under this
91
+ License will terminate automatically and without notice if you fail to
92
+ comply with any term herein. Upon termination, you must cease all use of
93
+ the Software and destroy all copies in your possession or control.
94
+ Sections 1, 3, 4, 5, 6, and 7 survive termination.
55
95
 
56
96
  For licensing inquiries, contact: legal@x.enterprises
57
97
 
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
- The layer provides utility classes for consistent styling:
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
- | `xText-display` | Large display heading |
998
- | `xText-headline` | Section headline |
999
- | `xText-title` | Card/feature title |
1000
- | `xText-eyebrow` | Small uppercase label |
1001
- | `xText-balance` | Text wrap balance |
1002
- | `xFadeUp` | Scroll-triggered fade-in animation |
1003
- | `xHover-zoom` | Zoom on hover effect |
1004
- | `xParallax` | Parallax scroll effect |
1005
- | `xGlass` | Glassmorphism effect |
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
- MIT License - see LICENSE file for details.
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="(language as any)" />
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 lang="ts">
35
- const props = defineProps<{
36
- code: string;
37
- language?: string;
38
- showCopy?: boolean;
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 lang="ts">
32
- const props = withDefaults(
33
- defineProps<{
34
- /** Color theme - any Tailwind color or 'white' */
35
- color?: string
36
- /** Vertical spacing (padding) */
37
- spacing?: string
38
- /** Glow intensity */
39
- intensity?: 'none' | 'subtle' | 'medium' | 'strong'
40
- /** Line height */
41
- height?: 'thin' | 'default' | 'thick'
42
- }>(),
43
- {
44
- color: 'primary',
45
- spacing: 'py-16',
46
- intensity: 'medium',
47
- height: 'default',
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 lang="ts">
29
- const props = withDefaults(
30
- defineProps<{
31
- /** Shape variant */
32
- variant?: 'concave' | 'convex' | 'diagonal' | 'slant' | 'clouds' | 'waves' | 'tilt' | 'peaks' | 'scallop' | 'arrow'
33
- /** Top section color */
34
- topColor?: string
35
- /** Bottom section color */
36
- bottomColor?: string
37
- /** Height size */
38
- height?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'
39
- /** Reverse direction (flip horizontally) */
40
- reverse?: boolean
41
- /** Invert vertically (swap top/bottom) */
42
- invert?: boolean
43
- /** Show glow line */
44
- glow?: boolean
45
- /** Glow line color */
46
- glowColor?: string
47
- }>(),
48
- {
49
- variant: 'diagonal',
50
- topColor: 'rgb(243 244 246)',
51
- bottomColor: 'rgb(249 250 251)',
52
- height: 'md',
53
- reverse: false,
54
- invert: false,
55
- glow: false,
56
- glowColor: 'rgba(99, 102, 241, 0.5)',
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<Element[]>([]);
17
- let handleScroll: (() => void) | null = null;
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((el as HTMLElement).dataset.parallaxSpeed || String(defaultOptions.defaultSpeed));
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
- (el as HTMLElement).style.transform = `translateY(${offset}px)`;
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<HTMLElement | null>(null);
93
- let handleScroll: (() => void) | null = null;
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: Record<string, unknown> = {}) => {
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<IntersectionObserver | null>(null);
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: string, staggerDelay = 100) => {
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
- (child as HTMLElement).style.transitionDelay = `${index * staggerDelay}ms`;
93
+ child.style.transitionDelay = `${index * staggerDelay}ms`;
94
94
  });
95
95
  }
96
96
  }, 100);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@xenterprises/nuxt-x-marketing",
3
- "license": "UNLICENSED",
3
+ "license": "SEE LICENSE IN LICENSE",
4
4
  "type": "module",
5
- "version": "1.0.3",
5
+ "version": "1.1.1",
6
6
  "main": "./nuxt.config.ts",
7
7
  "scripts": {
8
8
  "dev": "nuxi dev .playground",
@@ -1,8 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(git add:*)",
5
- "Bash(git commit:*)"
6
- ]
7
- }
8
- }
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
- });