blocks-dusted 0.1.1 → 0.1.3
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 +967 -3
- package/package.json +2 -2
- package/src/commands/add.js +143 -45
- package/src/commands/list.js +2 -2
- package/src/installers/checkRequirements.js +1 -0
- package/src/installers/copyTemplateFiles.js +23 -2
- package/src/installers/patchPayloadConfigCollections.js +92 -0
- package/src/installers/writeInstalledBlockReadme.js +17 -4
- package/src/registry/listTemplates.js +16 -7
- package/src/registry/loadTemplateManifest.js +20 -11
- package/src/registry/validateTemplateManifest.js +6 -5
- package/src/utils/paths.js +7 -0
- package/templates/blocks/DD-BookCall/Component.tsx +535 -573
- package/templates/blocks/DD-CardTemplate01/Component.tsx +45 -49
- package/templates/blocks/DD-Carousel-A/Component.tsx +249 -266
- package/templates/blocks/DD-Carousel-B/Component.tsx +403 -432
- package/templates/blocks/DD-ComparisonTable/Component.tsx +256 -272
- package/templates/blocks/DD-Contact/Component.tsx +434 -439
- package/templates/blocks/DD-Contact/config.ts +8 -3
- package/templates/blocks/DD-FeatCat/Component.tsx +302 -361
- package/templates/blocks/DD-FeatCat/config.ts +201 -204
- package/templates/blocks/DD-FeatStrip/Component.tsx +171 -201
- package/templates/blocks/DD-Hero/Component.tsx +297 -317
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +244 -303
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +202 -228
- package/templates/blocks/DD-MasonaryMedia/config.ts +13 -14
- package/templates/blocks/DD-Pricing/Component.tsx +372 -380
- package/templates/blocks/DD-Process/Component.tsx +149 -155
- package/templates/blocks/DD-Section/Component.tsx +266 -327
- package/templates/blocks/DD-Services/Component.tsx +176 -188
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +307 -317
- package/templates/blocks/DD-Slider-A/Component.tsx +237 -252
- package/templates/blocks/DD-StackCards/Component.tsx +137 -160
- package/templates/blocks/DD-Team/Component.tsx +247 -265
- package/templates/blocks/DD-TechStack/Component.tsx +57 -72
- package/templates/blocks/DD-Testimonials/Component.tsx +147 -147
- package/templates/blocks/DD-Testimonials/config.ts +66 -66
- package/templates/blocks/DD-Work/Component.tsx +315 -328
- package/templates/blocks/DD-Work-B/Component.tsx +294 -320
- package/templates/collections/Testimonials/README.md +11 -0
- package/templates/collections/Testimonials/Testimonials.ts +161 -0
- package/templates/collections/Testimonials/manifest.json +55 -0
- package/templates/components/HeaderDD02/MobileBottomNav/index.tsx +545 -0
- package/templates/components/HeaderDD02/README.md +45 -0
- package/templates/components/HeaderDD02/RowLabel.tsx +33 -0
- package/templates/components/HeaderDD02/config.ts +302 -0
- package/templates/components/HeaderDD02/index.tsx +517 -0
- package/templates/components/HeaderDD02/manifest.json +123 -0
- package/templates/components/RichText/README.md +13 -0
- package/templates/components/RichText/converter/componentConverter/blocks.tsx +43 -0
- package/templates/components/RichText/converter/componentConverter/types.ts +11 -0
- package/templates/components/RichText/converter/index.tsx +18 -0
- package/templates/components/RichText/converter/internalLinks.tsx +45 -0
- package/templates/components/RichText/converter/textConverter.tsx +27 -0
- package/templates/components/RichText/index.tsx +35 -0
- package/templates/components/RichText/manifest.json +80 -0
|
@@ -1,188 +1,176 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useRef, useState } from
|
|
3
|
-
import * as LucideIcons from
|
|
4
|
-
import { TextFade } from
|
|
5
|
-
import { cn } from
|
|
6
|
-
export type DDServicesProps = Record<string, any
|
|
7
|
-
type TagItem = { id?: string | null; tag?: string | null }
|
|
8
|
-
type ServiceItem = {
|
|
9
|
-
id?: string | null
|
|
10
|
-
iconName?: string | null
|
|
11
|
-
number?: string | null
|
|
12
|
-
title?: string | null
|
|
13
|
-
description?: string | null
|
|
14
|
-
tags?: TagItem[] | null
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// ─── Dynamic Icon ─────────────────────────────────────────────────────────────
|
|
18
|
-
function DynamicIcon({
|
|
19
|
-
name,
|
|
20
|
-
size = 20,
|
|
21
|
-
...props
|
|
22
|
-
}: { name?: string | null } & Omit<LucideIcons.LucideProps,
|
|
23
|
-
if (!name) return null
|
|
24
|
-
const Icon = (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
{svc.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
</div>
|
|
178
|
-
)}
|
|
179
|
-
</div>
|
|
180
|
-
</SpotlightCard>
|
|
181
|
-
))}
|
|
182
|
-
</div>
|
|
183
|
-
)}
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</>
|
|
187
|
-
);
|
|
188
|
-
};
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { useRef, useState } from 'react'
|
|
3
|
+
import * as LucideIcons from 'lucide-react'
|
|
4
|
+
import { TextFade } from '@/components/ui/anims/fade'
|
|
5
|
+
import { cn } from '@/utilities/ui'
|
|
6
|
+
export type DDServicesProps = Record<string, any>
|
|
7
|
+
type TagItem = { id?: string | null; tag?: string | null }
|
|
8
|
+
type ServiceItem = {
|
|
9
|
+
id?: string | null
|
|
10
|
+
iconName?: string | null
|
|
11
|
+
number?: string | null
|
|
12
|
+
title?: string | null
|
|
13
|
+
description?: string | null
|
|
14
|
+
tags?: TagItem[] | null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// ─── Dynamic Icon ─────────────────────────────────────────────────────────────
|
|
18
|
+
function DynamicIcon({
|
|
19
|
+
name,
|
|
20
|
+
size = 20,
|
|
21
|
+
...props
|
|
22
|
+
}: { name?: string | null } & Omit<LucideIcons.LucideProps, 'name'>) {
|
|
23
|
+
if (!name) return null
|
|
24
|
+
const Icon = (LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>)[name]
|
|
25
|
+
if (!Icon) return null
|
|
26
|
+
return <Icon size={size} {...props} />
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ─── Spotlight Hover Card ─────────────────────────────────────────────────────
|
|
30
|
+
function SpotlightCard({ children, className }: { children: React.ReactNode; className?: string }) {
|
|
31
|
+
const ref = useRef<HTMLDivElement>(null)
|
|
32
|
+
const [pos, setPos] = useState<{ x: number; y: number } | null>(null)
|
|
33
|
+
|
|
34
|
+
const onMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
|
35
|
+
if (!ref.current) return
|
|
36
|
+
const rect = ref.current.getBoundingClientRect()
|
|
37
|
+
setPos({
|
|
38
|
+
x: e.clientX - rect.left,
|
|
39
|
+
y: e.clientY - rect.top,
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const onLeave = () => setPos(null)
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
ref={ref}
|
|
48
|
+
onMouseMove={onMove}
|
|
49
|
+
onMouseLeave={onLeave}
|
|
50
|
+
className={cn('relative overflow-hidden transition-all duration-300', className)}
|
|
51
|
+
>
|
|
52
|
+
{/* spotlight */}
|
|
53
|
+
{pos && (
|
|
54
|
+
<div
|
|
55
|
+
className="pointer-events-none absolute inset-0 z-0 transition-opacity duration-300"
|
|
56
|
+
style={{
|
|
57
|
+
background: `radial-gradient(500px circle at ${pos.x}px ${pos.y}px, rgba(132,204,22,0.12), transparent 60%)`,
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
|
|
62
|
+
{/* animated border glow */}
|
|
63
|
+
<div className="absolute inset-0 rounded-3xl border border-stone-100 dark:border-stone-800 group-hover:border-lime-500/60 transition-colors duration-300" />
|
|
64
|
+
|
|
65
|
+
{/* subtle noise / sheen */}
|
|
66
|
+
<div className="pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-[linear-gradient(120deg,transparent,rgba(255,255,255,0.05),transparent)]" />
|
|
67
|
+
|
|
68
|
+
<div className="relative z-10">{children}</div>
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ─── Component ────────────────────────────────────────────────────────────────
|
|
74
|
+
export const DDServices: React.FC<DDServicesProps> = ({
|
|
75
|
+
eyebrow,
|
|
76
|
+
headlineMain,
|
|
77
|
+
headlineAccent,
|
|
78
|
+
description,
|
|
79
|
+
services,
|
|
80
|
+
sectionId,
|
|
81
|
+
customCSS,
|
|
82
|
+
}) => {
|
|
83
|
+
const serviceItems = (services ?? []) as ServiceItem[]
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
{customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
|
|
88
|
+
|
|
89
|
+
<div id={sectionId ?? 'services'} className="py-24">
|
|
90
|
+
<div className="max-w-6xl lg:max-w-7xl mx-auto px-4 md:px-6">
|
|
91
|
+
{/* Header */}#BlockName-DDServices
|
|
92
|
+
<div className="max-w-2xl mb-16">
|
|
93
|
+
<TextFade direction="right" className="text-base" delay={0}>
|
|
94
|
+
{eyebrow && (
|
|
95
|
+
<p className="text-[11.5px] font-semibold text-stone-400 tracking-widest uppercase mb-3 top-caption">
|
|
96
|
+
{eyebrow}
|
|
97
|
+
</p>
|
|
98
|
+
)}
|
|
99
|
+
</TextFade>
|
|
100
|
+
|
|
101
|
+
<TextFade direction="up" className="mt-0" delay={0.3}>
|
|
102
|
+
<h2 className="text-3d text-4xl md:text-5xl font-bold text-stone-900 dark:text-stone-50 leading-tight mb-5">
|
|
103
|
+
{headlineMain}
|
|
104
|
+
</h2>
|
|
105
|
+
</TextFade>
|
|
106
|
+
|
|
107
|
+
<TextFade direction="up" className="-mt-6" delay={0.3}>
|
|
108
|
+
<h2 className="text-3d text-4xl md:text-5xl font-bold text-stone-400 leading-tight mb-5">
|
|
109
|
+
{headlineAccent}
|
|
110
|
+
</h2>
|
|
111
|
+
</TextFade>
|
|
112
|
+
|
|
113
|
+
<TextFade direction="down" className="px-1" delay={0.5}>
|
|
114
|
+
{description && (
|
|
115
|
+
<p className="text-stone-700 dark:text-stone-300 text-base leading-relaxed">
|
|
116
|
+
{description}
|
|
117
|
+
</p>
|
|
118
|
+
)}
|
|
119
|
+
</TextFade>
|
|
120
|
+
</div>
|
|
121
|
+
{/* Services Grid */}
|
|
122
|
+
{serviceItems.length > 0 && (
|
|
123
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
|
|
124
|
+
{serviceItems.map((svc, i) => (
|
|
125
|
+
<SpotlightCard
|
|
126
|
+
key={svc.id ?? i}
|
|
127
|
+
className="group bg-[#19171ca4] backdrop-blur-md rounded-3xl shadow-md hover:shadow-2xl hover:-translate-y-1 transition-all duration-300"
|
|
128
|
+
>
|
|
129
|
+
<div className="bg-dots h-full w-full shadow-inner brightness-90 absolute p-6 md:p-8">
|
|
130
|
+
{/* Icon Row */}
|
|
131
|
+
<div className="flex items-start justify-between mb-6">
|
|
132
|
+
<div className="w-12 h-12 flex items-center justify-center rounded-xl bg-stone-800/10 bg-lines border border-stone-600 group-hover:bg-stone-700 group-hover:scale-110 transition-all duration-300">
|
|
133
|
+
<DynamicIcon
|
|
134
|
+
className="text-stone-300 group-hover:text-lime-400 transition-colors duration-300"
|
|
135
|
+
name={svc.iconName}
|
|
136
|
+
size={20}
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
{svc.number && (
|
|
141
|
+
<span className="text-xs font-mono text-stone-400 group-hover:text-lime-400 transition-colors duration-300">
|
|
142
|
+
{svc.number}
|
|
143
|
+
</span>
|
|
144
|
+
)}
|
|
145
|
+
</div>
|
|
146
|
+
{/* Title */}
|
|
147
|
+
<h3 className="text-lg font-semibold text-stone-900 dark:text-stone-50 mb-3 group-hover:text-lime-300 transition-colors duration-300">
|
|
148
|
+
{svc.title}
|
|
149
|
+
</h3>
|
|
150
|
+
{/* Description */}
|
|
151
|
+
<p className="text-md text-stone-400 leading-relaxed mb-5 group-hover:text-stone-300 transition-colors duration-300">
|
|
152
|
+
{svc.description}
|
|
153
|
+
</p>
|
|
154
|
+
{/* Tags */}
|
|
155
|
+
{svc.tags && svc.tags.length > 0 && (
|
|
156
|
+
<div className="flex flex-wrap gap-2">
|
|
157
|
+
{svc.tags.map((t, ti) => (
|
|
158
|
+
<span
|
|
159
|
+
key={t.id ?? ti}
|
|
160
|
+
className="text-xs px-2.5 py-1 rounded-full bg-stone-800/10 bg-lines text-stone-400 border border-stone-700 group-hover:border-lime-500/40 group-hover:text-lime-300 transition-all duration-300"
|
|
161
|
+
>
|
|
162
|
+
{t.tag}
|
|
163
|
+
</span>
|
|
164
|
+
))}
|
|
165
|
+
</div>
|
|
166
|
+
)}
|
|
167
|
+
</div>
|
|
168
|
+
</SpotlightCard>
|
|
169
|
+
))}
|
|
170
|
+
</div>
|
|
171
|
+
)}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</>
|
|
175
|
+
)
|
|
176
|
+
}
|