blocks-dusted 0.1.1 → 0.1.2

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 (50) hide show
  1. package/README.md +967 -3
  2. package/package.json +2 -2
  3. package/src/commands/add.js +143 -45
  4. package/src/commands/list.js +2 -2
  5. package/src/installers/checkRequirements.js +1 -0
  6. package/src/installers/copyTemplateFiles.js +23 -2
  7. package/src/installers/patchPayloadConfigCollections.js +92 -0
  8. package/src/installers/writeInstalledBlockReadme.js +17 -4
  9. package/src/registry/listTemplates.js +16 -7
  10. package/src/registry/loadTemplateManifest.js +20 -11
  11. package/src/registry/validateTemplateManifest.js +6 -5
  12. package/src/utils/paths.js +7 -0
  13. package/templates/blocks/DD-BookCall/Component.tsx +535 -573
  14. package/templates/blocks/DD-CardTemplate01/Component.tsx +45 -49
  15. package/templates/blocks/DD-Carousel-A/Component.tsx +249 -266
  16. package/templates/blocks/DD-Carousel-B/Component.tsx +403 -432
  17. package/templates/blocks/DD-ComparisonTable/Component.tsx +256 -272
  18. package/templates/blocks/DD-Contact/Component.tsx +434 -439
  19. package/templates/blocks/DD-Contact/config.ts +8 -3
  20. package/templates/blocks/DD-FeatCat/Component.tsx +302 -361
  21. package/templates/blocks/DD-FeatCat/config.ts +201 -204
  22. package/templates/blocks/DD-FeatStrip/Component.tsx +171 -201
  23. package/templates/blocks/DD-Hero/Component.tsx +297 -317
  24. package/templates/blocks/DD-HorizontalScroll/Component.tsx +244 -303
  25. package/templates/blocks/DD-MasonaryMedia/Component.tsx +202 -228
  26. package/templates/blocks/DD-MasonaryMedia/config.ts +13 -14
  27. package/templates/blocks/DD-Pricing/Component.tsx +372 -380
  28. package/templates/blocks/DD-Process/Component.tsx +149 -155
  29. package/templates/blocks/DD-Section/Component.tsx +266 -327
  30. package/templates/blocks/DD-Services/Component.tsx +176 -188
  31. package/templates/blocks/DD-ShowcaseGrid/Component.tsx +307 -317
  32. package/templates/blocks/DD-Slider-A/Component.tsx +237 -252
  33. package/templates/blocks/DD-StackCards/Component.tsx +137 -160
  34. package/templates/blocks/DD-Team/Component.tsx +247 -265
  35. package/templates/blocks/DD-TechStack/Component.tsx +57 -72
  36. package/templates/blocks/DD-Testimonials/Component.tsx +147 -147
  37. package/templates/blocks/DD-Testimonials/config.ts +66 -66
  38. package/templates/blocks/DD-Work/Component.tsx +315 -328
  39. package/templates/blocks/DD-Work-B/Component.tsx +294 -320
  40. package/templates/collections/Testimonials/README.md +11 -0
  41. package/templates/collections/Testimonials/Testimonials.ts +161 -0
  42. package/templates/collections/Testimonials/manifest.json +55 -0
  43. package/templates/components/RichText/README.md +13 -0
  44. package/templates/components/RichText/converter/componentConverter/blocks.tsx +43 -0
  45. package/templates/components/RichText/converter/componentConverter/types.ts +11 -0
  46. package/templates/components/RichText/converter/index.tsx +18 -0
  47. package/templates/components/RichText/converter/internalLinks.tsx +45 -0
  48. package/templates/components/RichText/converter/textConverter.tsx +27 -0
  49. package/templates/components/RichText/index.tsx +35 -0
  50. package/templates/components/RichText/manifest.json +80 -0
@@ -1,204 +1,201 @@
1
- import type { Block } from 'payload'
2
-
3
- export const DDFeatCat: Block = {
4
- slug: 'DD-FeatCat',
5
- interfaceName: 'DDFeatCat',
6
- labels: {
7
- singular: 'Featured Categories',
8
- plural: 'Featured Categories'
9
- },
10
- fields: [
11
- {
12
- type: 'tabs',
13
- tabs: [
14
- {
15
- label: 'Header',
16
- fields: [
17
- {
18
- name: 'eyebrow',
19
- type: 'text',
20
- label: 'Eyebrow Label',
21
- defaultValue: 'What we offer'
22
- },
23
- {
24
- name: 'headlineMain',
25
- type: 'text',
26
- label: 'Headline (Main)',
27
- required: true,
28
- defaultValue: 'Everything you need'
29
- },
30
- {
31
- name: 'headlineAccent',
32
- type: 'text',
33
- label: 'Headline (Accent)',
34
- defaultValue: 'to ship faster'
35
- },
36
- {
37
- name: 'subtext',
38
- type: 'textarea',
39
- label: 'Subtext',
40
- defaultValue:
41
- 'From individual UI blocks to complete website systems — and the studio team to build it all for you.'
42
- }
43
- ]
44
- },
45
- {
46
- label: 'Categories',
47
- fields: [
48
- {
49
- name: 'categories',
50
- type: 'array',
51
- label: 'Category Cards',
52
- minRows: 1,
53
- maxRows: 6,
54
- defaultValue: [
55
- {
56
- title: 'UI Components',
57
- description:
58
- 'Production-ready blocks for hero sections, navigation, pricing, forms, and more. Drop into any Next.js project.',
59
- link: '/components',
60
- linkLabel: 'Browse Components',
61
- iconName: 'LayoutGrid',
62
- count: '120+ blocks',
63
- imageFallbackUrl:
64
- 'https://readdy.ai/api/search-image?query=collection%20of%20UI%20component%20blocks%20showing%20hero%2C%20pricing%2C%20navigation%2C%20and%20form%20elements%20arranged%20in%20a%20clean%20grid%20layout%20on%20dark%20background%2C%20modern%20developer%20tool%20aesthetic%2C%20dark%20theme&width=800&height=500&seq=cat1&orientation=landscape',
65
- iconColorClass: 'text-amber-400',
66
- iconBgClass: 'bg-amber-500/20'
67
- },
68
- {
69
- title: 'Website Templates',
70
- description:
71
- 'Full-site starters for SaaS, agencies, blogs, and e-commerce. Powered by Next.js and Payload CMS.',
72
- link: '/templates',
73
- linkLabel: 'Explore Templates',
74
- iconName: 'FileStack',
75
- count: '24+ templates',
76
- imageFallbackUrl:
77
- 'https://readdy.ai/api/search-image?query=website%20template%20previews%20showing%20SaaS%20landing%20page%2C%20agency%20portfolio%2C%20and%20blog%20layouts%20in%20a%20clean%20mockup%20display%20on%20dark%20background%2C%20professional%20web%20design%20showcase%2C%20dark%20theme&width=800&height=500&seq=cat2&orientation=landscape',
78
- iconColorClass: 'text-stone-300',
79
- iconBgClass: 'bg-stone-600/40'
80
- },
81
- {
82
- title: 'Studio Services',
83
- description:
84
- 'Custom UX/UI design, web development, CMS architecture, and digital product consulting from our expert team.',
85
- link: '/studio',
86
- linkLabel: 'Hire the Studio',
87
- iconName: 'Users',
88
- count: 'Custom projects',
89
- imageFallbackUrl:
90
- 'https://readdy.ai/api/search-image?query=design%20studio%20workspace%20with%20wireframes%2C%20design%20mockups%2C%20and%20development%20tools%20on%20a%20clean%20desk%2C%20professional%20creative%20agency%20environment%2C%20dark%20minimal%20aesthetic&width=800&height=500&seq=cat3&orientation=landscape',
91
- iconColorClass: 'text-emerald-400',
92
- iconBgClass: 'bg-emerald-500/20'
93
- }
94
- ],
95
- fields: [
96
- {
97
- name: 'title',
98
- type: 'text',
99
- label: 'Title',
100
- required: true
101
- },
102
- {
103
- name: 'description',
104
- type: 'textarea',
105
- label: 'Description',
106
- required: true
107
- },
108
- {
109
- name: 'link',
110
- type: 'text',
111
- label: 'Link URL',
112
- required: true
113
- },
114
- {
115
- name: 'linkLabel',
116
- type: 'text',
117
- label: 'Link Label',
118
- required: true
119
- },
120
- {
121
- name: 'iconName',
122
- type: 'text',
123
- label: 'Lucide Icon Name',
124
- admin: {
125
- description:
126
- 'Lucide icon name e.g. LayoutGrid, FileStack, Users, Zap. Ignored if Icon Image is set.'
127
- }
128
- },
129
- {
130
- name: 'iconImage',
131
- type: 'upload',
132
- label: 'Icon Image (SVG / PNG)',
133
- relationTo: 'media',
134
- admin: {
135
- description:
136
- 'Upload a custom SVG or image to use as the icon. Overrides Lucide Icon Name.'
137
- }
138
- },
139
- {
140
- name: 'count',
141
- type: 'text',
142
- label: 'Count / Badge Label',
143
- admin: {
144
- description: 'e.g. "120+ blocks", "Custom projects"'
145
- }
146
- },
147
- {
148
- name: 'image',
149
- type: 'upload',
150
- label: 'Card Image',
151
- relationTo: 'media'
152
- },
153
- {
154
- name: 'imageFallbackUrl',
155
- type: 'text',
156
- label: 'Image Fallback URL',
157
- admin: {
158
- placeholder: '/assets/placeholder/01.png',
159
- description: 'Used if no uploaded image is set'
160
- }
161
- },
162
- {
163
- name: 'iconColorClass',
164
- type: 'text',
165
- label: 'Icon Color Class',
166
- defaultValue: 'text-amber-400',
167
- admin: {
168
- description: 'Tailwind text-color class for the icon e.g. text-amber-400'
169
- }
170
- },
171
- {
172
- name: 'iconBgClass',
173
- type: 'text',
174
- label: 'Icon Background Class',
175
- defaultValue: 'bg-amber-500/20',
176
- admin: {
177
- description: 'Tailwind bg class for the icon container e.g. bg-amber-500/20'
178
- }
179
- }
180
- ]
181
- }
182
- ]
183
- },
184
- {
185
- label: 'Settings',
186
- fields: [
187
- {
188
- name: 'sectionId',
189
- type: 'text',
190
- label: 'Section ID',
191
- defaultValue: 'featured-categories'
192
- },
193
- {
194
- name: 'customCSS',
195
- type: 'code',
196
- label: 'Custom CSS',
197
- admin: { language: 'css' }
198
- }
199
- ]
200
- }
201
- ]
202
- }
203
- ]
204
- }
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDFeatCat: Block = {
4
+ slug: 'DD-FeatCat',
5
+ interfaceName: 'DDFeatCat',
6
+ labels: {
7
+ singular: 'Featured Categories',
8
+ plural: 'Featured Categories',
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'tabs',
13
+ tabs: [
14
+ {
15
+ label: 'Header',
16
+ fields: [
17
+ {
18
+ name: 'eyebrow',
19
+ type: 'text',
20
+ label: 'Eyebrow Label',
21
+ defaultValue: 'What we offer',
22
+ },
23
+ {
24
+ name: 'headlineMain',
25
+ type: 'text',
26
+ label: 'Headline (Main)',
27
+ required: true,
28
+ defaultValue: 'Everything you need',
29
+ },
30
+ {
31
+ name: 'headlineAccent',
32
+ type: 'text',
33
+ label: 'Headline (Accent)',
34
+ defaultValue: 'to ship faster',
35
+ },
36
+ {
37
+ name: 'subtext',
38
+ type: 'textarea',
39
+ label: 'Subtext',
40
+ defaultValue:
41
+ 'From individual UI blocks to complete website systems — and the studio team to build it all for you.',
42
+ },
43
+ ],
44
+ },
45
+ {
46
+ label: 'Categories',
47
+ fields: [
48
+ {
49
+ name: 'categories',
50
+ type: 'array',
51
+ label: 'Category Cards',
52
+ minRows: 1,
53
+ maxRows: 6,
54
+ defaultValue: [
55
+ {
56
+ title: 'UI Components',
57
+ description:
58
+ 'Production-ready blocks for hero sections, navigation, pricing, forms, and more. Drop into any Next.js project.',
59
+ link: '/components',
60
+ linkLabel: 'Browse Components',
61
+ iconName: 'LayoutGrid',
62
+ count: '120+ blocks',
63
+ imageFallbackUrl: '',
64
+ iconColorClass: 'text-amber-400',
65
+ iconBgClass: 'bg-amber-800/50',
66
+ },
67
+ {
68
+ title: 'Website Templates',
69
+ description:
70
+ 'Full-site starters for SaaS, agencies, blogs, and e-commerce. Powered by Next.js and Payload CMS.',
71
+ link: '/templates',
72
+ linkLabel: 'Explore Templates',
73
+ iconName: 'FileStack',
74
+ count: '24+ templates',
75
+ imageFallbackUrl: '',
76
+ iconColorClass: 'text-stone-300',
77
+ iconBgClass: 'bg-stone-600/40',
78
+ },
79
+ {
80
+ title: 'Studio Services',
81
+ description:
82
+ 'Custom UX/UI design, web development, CMS architecture, and digital product consulting from our expert team.',
83
+ link: '/studio',
84
+ linkLabel: 'Hire the Studio',
85
+ iconName: 'Users',
86
+ count: 'Custom projects',
87
+ imageFallbackUrl: '',
88
+ iconColorClass: 'text-emerald-400',
89
+ iconBgClass: 'bg-emerald-500/20',
90
+ },
91
+ ],
92
+ fields: [
93
+ {
94
+ name: 'title',
95
+ type: 'text',
96
+ label: 'Title',
97
+ required: true,
98
+ },
99
+ {
100
+ name: 'description',
101
+ type: 'textarea',
102
+ label: 'Description',
103
+ required: true,
104
+ },
105
+ {
106
+ name: 'link',
107
+ type: 'text',
108
+ label: 'Link URL',
109
+ required: true,
110
+ },
111
+ {
112
+ name: 'linkLabel',
113
+ type: 'text',
114
+ label: 'Link Label',
115
+ required: true,
116
+ },
117
+ {
118
+ name: 'iconName',
119
+ type: 'text',
120
+ label: 'Lucide Icon Name',
121
+ admin: {
122
+ description:
123
+ 'Lucide icon name e.g. LayoutGrid, FileStack, Users, Zap. Ignored if Icon Image is set.',
124
+ },
125
+ },
126
+ {
127
+ name: 'iconImage',
128
+ type: 'upload',
129
+ label: 'Icon Image (SVG / PNG)',
130
+ relationTo: 'media',
131
+ admin: {
132
+ description:
133
+ 'Upload a custom SVG or image to use as the icon. Overrides Lucide Icon Name.',
134
+ },
135
+ },
136
+ {
137
+ name: 'count',
138
+ type: 'text',
139
+ label: 'Count / Badge Label',
140
+ admin: {
141
+ description: 'e.g. "120+ blocks", "Custom projects"',
142
+ },
143
+ },
144
+ {
145
+ name: 'image',
146
+ type: 'upload',
147
+ label: 'Card Image',
148
+ relationTo: 'media',
149
+ },
150
+ {
151
+ name: 'imageFallbackUrl',
152
+ type: 'text',
153
+ label: 'Image Fallback URL',
154
+ admin: {
155
+ placeholder: '/assets/placeholder/01.png',
156
+ description: 'Used if no uploaded image is set',
157
+ },
158
+ },
159
+ {
160
+ name: 'iconColorClass',
161
+ type: 'text',
162
+ label: 'Icon Color Class',
163
+ defaultValue: 'text-amber-400',
164
+ admin: {
165
+ description: 'Tailwind text-color class for the icon e.g. text-amber-400',
166
+ },
167
+ },
168
+ {
169
+ name: 'iconBgClass',
170
+ type: 'text',
171
+ label: 'Icon Background Class',
172
+ defaultValue: 'bg-amber-500/20',
173
+ admin: {
174
+ description: 'Tailwind bg class for the icon container e.g. bg-amber-500/20',
175
+ },
176
+ },
177
+ ],
178
+ },
179
+ ],
180
+ },
181
+ {
182
+ label: 'Settings',
183
+ fields: [
184
+ {
185
+ name: 'sectionId',
186
+ type: 'text',
187
+ label: 'Section ID',
188
+ defaultValue: 'featured-categories',
189
+ },
190
+ {
191
+ name: 'customCSS',
192
+ type: 'code',
193
+ label: 'Custom CSS',
194
+ admin: { language: 'css' },
195
+ },
196
+ ],
197
+ },
198
+ ],
199
+ },
200
+ ],
201
+ }