blocks-dusted 0.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/LICENSE +21 -0
- package/README.md +68 -0
- package/bin/index.js +8 -0
- package/package.json +40 -0
- package/src/cli.js +79 -0
- package/src/commands/add.js +327 -0
- package/src/commands/doctor.js +21 -0
- package/src/commands/list.js +18 -0
- package/src/installers/checkRequirements.js +101 -0
- package/src/installers/copyTemplateFiles.js +79 -0
- package/src/installers/installDependencies.js +69 -0
- package/src/installers/patchPayloadBlocksArray.js +122 -0
- package/src/installers/patchRenderBlocks.js +110 -0
- package/src/installers/runGenerators.js +3 -0
- package/src/installers/writeInstalledBlockReadme.js +117 -0
- package/src/registry/listTemplates.js +17 -0
- package/src/registry/loadTemplateManifest.js +20 -0
- package/src/registry/validateTemplateManifest.js +69 -0
- package/src/utils/logger.js +8 -0
- package/src/utils/packageManager.js +42 -0
- package/src/utils/paths.js +7 -0
- package/src/utils/project.js +122 -0
- package/src/utils/strings.js +7 -0
- package/templates/blocks/DD-BookCall/Component.tsx +573 -0
- package/templates/blocks/DD-BookCall/config.ts +239 -0
- package/templates/blocks/DD-BookCall/manifest.json +112 -0
- package/templates/blocks/DD-CardTemplate01/Component.tsx +144 -0
- package/templates/blocks/DD-CardTemplate01/config.ts +106 -0
- package/templates/blocks/DD-CardTemplate01/manifest.json +84 -0
- package/templates/blocks/DD-Carousel-A/Component.tsx +266 -0
- package/templates/blocks/DD-Carousel-A/config.ts +163 -0
- package/templates/blocks/DD-Carousel-A/manifest.json +86 -0
- package/templates/blocks/DD-Carousel-B/Component.tsx +432 -0
- package/templates/blocks/DD-Carousel-B/config.ts +176 -0
- package/templates/blocks/DD-Carousel-B/manifest.json +86 -0
- package/templates/blocks/DD-ComparisonTable/Component.tsx +272 -0
- package/templates/blocks/DD-ComparisonTable/config.ts +105 -0
- package/templates/blocks/DD-ComparisonTable/manifest.json +78 -0
- package/templates/blocks/DD-Contact/Component.tsx +439 -0
- package/templates/blocks/DD-Contact/config.ts +217 -0
- package/templates/blocks/DD-Contact/manifest.json +107 -0
- package/templates/blocks/DD-FeatCat/Component.tsx +361 -0
- package/templates/blocks/DD-FeatCat/config.ts +204 -0
- package/templates/blocks/DD-FeatCat/manifest.json +87 -0
- package/templates/blocks/DD-FeatStrip/Component.tsx +615 -0
- package/templates/blocks/DD-FeatStrip/config.ts +134 -0
- package/templates/blocks/DD-FeatStrip/manifest.json +82 -0
- package/templates/blocks/DD-Hero/Component.tsx +317 -0
- package/templates/blocks/DD-Hero/config.ts +267 -0
- package/templates/blocks/DD-Hero/manifest.json +92 -0
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +995 -0
- package/templates/blocks/DD-HorizontalScroll/config.ts +231 -0
- package/templates/blocks/DD-HorizontalScroll/manifest.json +85 -0
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +571 -0
- package/templates/blocks/DD-MasonaryMedia/config.ts +390 -0
- package/templates/blocks/DD-MasonaryMedia/manifest.json +101 -0
- package/templates/blocks/DD-MasonaryMedia/vendor.d.ts +2 -0
- package/templates/blocks/DD-Pricing/Component.tsx +380 -0
- package/templates/blocks/DD-Pricing/config.ts +215 -0
- package/templates/blocks/DD-Pricing/manifest.json +78 -0
- package/templates/blocks/DD-Process/Component.tsx +155 -0
- package/templates/blocks/DD-Process/config.ts +150 -0
- package/templates/blocks/DD-Process/manifest.json +82 -0
- package/templates/blocks/DD-Section/Component.tsx +327 -0
- package/templates/blocks/DD-Section/config.ts +214 -0
- package/templates/blocks/DD-Section/manifest.json +85 -0
- package/templates/blocks/DD-Services/Component.tsx +188 -0
- package/templates/blocks/DD-Services/config.ts +149 -0
- package/templates/blocks/DD-Services/manifest.json +95 -0
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +317 -0
- package/templates/blocks/DD-ShowcaseGrid/config.ts +197 -0
- package/templates/blocks/DD-ShowcaseGrid/manifest.json +80 -0
- package/templates/blocks/DD-Slider-A/Component.tsx +252 -0
- package/templates/blocks/DD-Slider-A/config.ts +118 -0
- package/templates/blocks/DD-Slider-A/manifest.json +86 -0
- package/templates/blocks/DD-StackCards/Component.tsx +496 -0
- package/templates/blocks/DD-StackCards/config.ts +399 -0
- package/templates/blocks/DD-StackCards/manifest.json +87 -0
- package/templates/blocks/DD-Team/Component.tsx +265 -0
- package/templates/blocks/DD-Team/config.ts +173 -0
- package/templates/blocks/DD-Team/manifest.json +82 -0
- package/templates/blocks/DD-TechStack/Component.tsx +189 -0
- package/templates/blocks/DD-TechStack/config.ts +153 -0
- package/templates/blocks/DD-TechStack/manifest.json +118 -0
- package/templates/blocks/DD-Testimonials/Component.tsx +147 -0
- package/templates/blocks/DD-Testimonials/config.ts +120 -0
- package/templates/blocks/DD-Testimonials/manifest.json +87 -0
- package/templates/blocks/DD-Work/Component.tsx +328 -0
- package/templates/blocks/DD-Work/config.ts +165 -0
- package/templates/blocks/DD-Work/manifest.json +87 -0
- package/templates/blocks/DD-Work-B/Component.tsx +320 -0
- package/templates/blocks/DD-Work-B/config.ts +165 -0
- package/templates/blocks/DD-Work-B/manifest.json +75 -0
- package/templates/shared/components/ui/anims/fade.tsx +83 -0
- package/templates/shared/components/ui/button.tsx +233 -0
- package/templates/shared/components/ui/input.tsx +41 -0
- package/templates/shared/fields/lucide-icon-picker/Cell.tsx +24 -0
- package/templates/shared/fields/lucide-icon-picker/README.md +160 -0
- package/templates/shared/fields/lucide-icon-picker/field.ts +40 -0
- package/templates/shared/fields/lucide-icon-picker/index.tsx +203 -0
- package/templates/shared/utilities/canUseDOM.ts +1 -0
- package/templates/shared/utilities/getURL.ts +31 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import type { Block } from 'payload'
|
|
2
|
+
|
|
3
|
+
export const DDHero: Block = {
|
|
4
|
+
slug: 'DD-Hero',
|
|
5
|
+
interfaceName: 'DDHero',
|
|
6
|
+
labels: {
|
|
7
|
+
singular: 'Studio Hero',
|
|
8
|
+
plural: 'Studio Heroes'
|
|
9
|
+
},
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
type: 'tabs',
|
|
13
|
+
tabs: [
|
|
14
|
+
{
|
|
15
|
+
label: 'Content',
|
|
16
|
+
fields: [
|
|
17
|
+
{
|
|
18
|
+
name: 'badge',
|
|
19
|
+
type: 'group',
|
|
20
|
+
label: 'Badge',
|
|
21
|
+
fields: [
|
|
22
|
+
{
|
|
23
|
+
name: 'show',
|
|
24
|
+
type: 'checkbox',
|
|
25
|
+
label: 'Show Badge',
|
|
26
|
+
defaultValue: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'text',
|
|
30
|
+
type: 'text',
|
|
31
|
+
label: 'Badge Text',
|
|
32
|
+
defaultValue: 'Accepting projects — Q2 2026',
|
|
33
|
+
admin: {
|
|
34
|
+
condition: (_, siblingData) => siblingData?.show
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'headlineMain',
|
|
41
|
+
type: 'text',
|
|
42
|
+
label: 'Headline (Main)',
|
|
43
|
+
defaultValue: 'We build what',
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'headlineAccent',
|
|
48
|
+
type: 'text',
|
|
49
|
+
label: 'Headline (Accent / Second Line)',
|
|
50
|
+
defaultValue: 'you imagine',
|
|
51
|
+
required: true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'description',
|
|
55
|
+
type: 'textarea',
|
|
56
|
+
label: 'Description',
|
|
57
|
+
defaultValue:
|
|
58
|
+
'DesignsDusted Studio is a small, focused team of designers and developers. We take on select projects where we can make a real impact — from product design to full-stack delivery.'
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
// BasicButton hidden
|
|
62
|
+
{
|
|
63
|
+
name: 'primaryCta',
|
|
64
|
+
type: 'group',
|
|
65
|
+
hidden: true,
|
|
66
|
+
label: 'Primary CTA Button',
|
|
67
|
+
fields: [
|
|
68
|
+
{
|
|
69
|
+
name: 'label',
|
|
70
|
+
type: 'text',
|
|
71
|
+
label: 'Label',
|
|
72
|
+
defaultValue: 'Start a Project'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'href',
|
|
76
|
+
type: 'text',
|
|
77
|
+
label: 'Link',
|
|
78
|
+
defaultValue: '#contact'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'iconName',
|
|
82
|
+
type: 'text',
|
|
83
|
+
label: 'Lucide Icon Name',
|
|
84
|
+
defaultValue: 'SendHorizonal',
|
|
85
|
+
admin: {
|
|
86
|
+
description: 'e.g. SendHorizonal, ArrowRight, Mail'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'secondaryCta',
|
|
93
|
+
type: 'group',
|
|
94
|
+
hidden: true,
|
|
95
|
+
label: 'Secondary CTA Button',
|
|
96
|
+
fields: [
|
|
97
|
+
{
|
|
98
|
+
name: 'label',
|
|
99
|
+
type: 'text',
|
|
100
|
+
label: 'Label',
|
|
101
|
+
defaultValue: 'View Our Work'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'href',
|
|
105
|
+
type: 'text',
|
|
106
|
+
label: 'Link',
|
|
107
|
+
defaultValue: '#work'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'iconName',
|
|
111
|
+
type: 'text',
|
|
112
|
+
label: 'Lucide Icon Name',
|
|
113
|
+
defaultValue: 'Images',
|
|
114
|
+
admin: {
|
|
115
|
+
description: 'e.g. Images, GalleryHorizontal, Eye'
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
// DustedFluidButtons
|
|
121
|
+
{
|
|
122
|
+
type: 'group',
|
|
123
|
+
label: 'CTA Buttons',
|
|
124
|
+
fields: [
|
|
125
|
+
{
|
|
126
|
+
name: 'showButtons',
|
|
127
|
+
type: 'checkbox',
|
|
128
|
+
label: 'Show Buttons',
|
|
129
|
+
defaultValue: true
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'buttons',
|
|
133
|
+
type: 'array',
|
|
134
|
+
label: 'Buttons',
|
|
135
|
+
maxRows: 3,
|
|
136
|
+
admin: {
|
|
137
|
+
condition: (_, siblingData) => siblingData?.showButtons
|
|
138
|
+
},
|
|
139
|
+
fields: [
|
|
140
|
+
{
|
|
141
|
+
name: 'variant',
|
|
142
|
+
type: 'select',
|
|
143
|
+
label: 'Button Variant',
|
|
144
|
+
options: [
|
|
145
|
+
{ label: 'V1', value: 'v1' },
|
|
146
|
+
{ label: 'V2', value: 'v2' },
|
|
147
|
+
{ label: 'V3', value: 'v3' }
|
|
148
|
+
],
|
|
149
|
+
defaultValue: 'v1'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'icon',
|
|
153
|
+
type: 'text',
|
|
154
|
+
label: 'Icon Name (Lucide)',
|
|
155
|
+
defaultValue: 'Goal',
|
|
156
|
+
admin: {
|
|
157
|
+
description:
|
|
158
|
+
'Enter a Lucide icon name. (e.g., ArrowRight, ChevronRight, ExternalLink)'
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'label',
|
|
163
|
+
type: 'text',
|
|
164
|
+
label: 'Button Label',
|
|
165
|
+
required: true
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'class',
|
|
169
|
+
type: 'text',
|
|
170
|
+
label: 'Extra CSS Class',
|
|
171
|
+
admin: {
|
|
172
|
+
description:
|
|
173
|
+
'Additional class(es) appended to the button (e.g. my-4, !rounded-full)'
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
defaultValue: [
|
|
178
|
+
{ variant: 'v1', icon: 'Goal', label: 'Explore Components' },
|
|
179
|
+
{ variant: 'v2', icon: 'Goal', label: 'Choose Lane' },
|
|
180
|
+
{ variant: 'v3', icon: 'Feather', label: 'How it works' }
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
// Stats
|
|
186
|
+
{
|
|
187
|
+
name: 'stats',
|
|
188
|
+
type: 'array',
|
|
189
|
+
label: 'Stats',
|
|
190
|
+
minRows: 0,
|
|
191
|
+
maxRows: 6,
|
|
192
|
+
fields: [
|
|
193
|
+
{
|
|
194
|
+
name: 'value',
|
|
195
|
+
type: 'text',
|
|
196
|
+
label: 'Value',
|
|
197
|
+
required: true
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'label',
|
|
201
|
+
type: 'text',
|
|
202
|
+
label: 'Label',
|
|
203
|
+
required: true
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
defaultValue: [
|
|
207
|
+
{ value: '40+', label: 'Projects Delivered' },
|
|
208
|
+
{ value: '98%', label: 'Client Satisfaction' },
|
|
209
|
+
{ value: '6yr', label: 'In Business' }
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: 'Background',
|
|
216
|
+
fields: [
|
|
217
|
+
{
|
|
218
|
+
name: 'backgroundImage',
|
|
219
|
+
type: 'upload',
|
|
220
|
+
relationTo: 'media',
|
|
221
|
+
label: 'Background Image',
|
|
222
|
+
admin: {
|
|
223
|
+
description: 'Full-bleed background image for the hero section.'
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'backgroundImageFallbackUrl',
|
|
228
|
+
type: 'text',
|
|
229
|
+
label: 'Fallback Background URL',
|
|
230
|
+
admin: {
|
|
231
|
+
description: 'Used when no background image is uploaded.'
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: 'Settings',
|
|
238
|
+
fields: [
|
|
239
|
+
{
|
|
240
|
+
name: 'sectionId',
|
|
241
|
+
type: 'text',
|
|
242
|
+
label: 'Section ID',
|
|
243
|
+
admin: {
|
|
244
|
+
description: 'Unique ID for anchor links (e.g. "hero")'
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'showScrollIndicator',
|
|
249
|
+
type: 'checkbox',
|
|
250
|
+
label: 'Show Scroll Indicator',
|
|
251
|
+
defaultValue: true
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: 'customCSS',
|
|
255
|
+
type: 'code',
|
|
256
|
+
label: 'Custom CSS',
|
|
257
|
+
admin: {
|
|
258
|
+
language: 'css',
|
|
259
|
+
description: 'Add custom CSS styles for this block.'
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-Hero",
|
|
4
|
+
"label": "Studio Hero Block",
|
|
5
|
+
"sourceName": "StudioHeroBlock",
|
|
6
|
+
"portableName": "DD-Hero",
|
|
7
|
+
"slug": "DD-Hero",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/DesignsDustedv3",
|
|
11
|
+
"originalPath": "src/blocks/StudioHeroBlock",
|
|
12
|
+
"originalSlug": "studioHeroBlock",
|
|
13
|
+
"originalConfigExport": "StudioHeroBlock",
|
|
14
|
+
"originalComponentExport": "StudioHeroBlock",
|
|
15
|
+
"originalInterfaceName": "StudioHeroBlock"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-Hero/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "config.ts",
|
|
24
|
+
"to": "src/blocks/DD-Hero/config.ts"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dependencies": [
|
|
28
|
+
{
|
|
29
|
+
"name": "framer-motion"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "lucide-react"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"sharedFiles": [
|
|
36
|
+
{
|
|
37
|
+
"from": "templates/shared/components/ui/anims/fade.tsx",
|
|
38
|
+
"to": "src/components/ui/anims/fade.tsx",
|
|
39
|
+
"required": true,
|
|
40
|
+
"safeToCopy": true
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"requiredProjectFiles": [],
|
|
44
|
+
"optionalProjectFiles": [],
|
|
45
|
+
"collectionRegistration": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"collections": [
|
|
48
|
+
"Pages",
|
|
49
|
+
"Posts"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"renderBlocksRegistration": {
|
|
53
|
+
"enabled": true
|
|
54
|
+
},
|
|
55
|
+
"renderBlocksBehavior": {
|
|
56
|
+
"wrapperless": false
|
|
57
|
+
},
|
|
58
|
+
"pageRouteIntegration": {
|
|
59
|
+
"required": false,
|
|
60
|
+
"manualSteps": []
|
|
61
|
+
},
|
|
62
|
+
"manual": [
|
|
63
|
+
"Replaced Badge, AnimatedShinyText, SplittingText, and ButtonDustedFluid with portable fallback markup; reconnect project UI components manually if desired.",
|
|
64
|
+
"Register DDHero in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
65
|
+
"Register DD-Hero in RenderBlocks if automatic registration was skipped.",
|
|
66
|
+
"Run payload generate:types after schema changes.",
|
|
67
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
68
|
+
],
|
|
69
|
+
"manualSteps": [
|
|
70
|
+
"Replaced Badge, AnimatedShinyText, SplittingText, and ButtonDustedFluid with portable fallback markup; reconnect project UI components manually if desired.",
|
|
71
|
+
"Register DDHero in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
72
|
+
"Register DD-Hero in RenderBlocks if automatic registration was skipped.",
|
|
73
|
+
"Run payload generate:types after schema changes.",
|
|
74
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
75
|
+
],
|
|
76
|
+
"patchTargets": {
|
|
77
|
+
"blockConfigRegistration": {
|
|
78
|
+
"description": "Installer can add import { DDHero } from '@/blocks/DD-Hero/config' and add DDHero to clear Pages/Posts blocks arrays."
|
|
79
|
+
},
|
|
80
|
+
"renderBlocksRegistration": {
|
|
81
|
+
"description": "Installer can register DD-Hero in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"notes": [
|
|
85
|
+
"Converted from DesignsDustedv3 StudioHeroBlock.",
|
|
86
|
+
"Generated Payload type imports are replaced with portable fallback types when needed.",
|
|
87
|
+
"Installer must not overwrite existing target files.",
|
|
88
|
+
"Project-specific hero UI components are intentionally not bundled."
|
|
89
|
+
],
|
|
90
|
+
"exportName": "DDHero",
|
|
91
|
+
"interfaceName": "DDHero"
|
|
92
|
+
}
|