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.
Files changed (102) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -0
  3. package/bin/index.js +8 -0
  4. package/package.json +40 -0
  5. package/src/cli.js +79 -0
  6. package/src/commands/add.js +327 -0
  7. package/src/commands/doctor.js +21 -0
  8. package/src/commands/list.js +18 -0
  9. package/src/installers/checkRequirements.js +101 -0
  10. package/src/installers/copyTemplateFiles.js +79 -0
  11. package/src/installers/installDependencies.js +69 -0
  12. package/src/installers/patchPayloadBlocksArray.js +122 -0
  13. package/src/installers/patchRenderBlocks.js +110 -0
  14. package/src/installers/runGenerators.js +3 -0
  15. package/src/installers/writeInstalledBlockReadme.js +117 -0
  16. package/src/registry/listTemplates.js +17 -0
  17. package/src/registry/loadTemplateManifest.js +20 -0
  18. package/src/registry/validateTemplateManifest.js +69 -0
  19. package/src/utils/logger.js +8 -0
  20. package/src/utils/packageManager.js +42 -0
  21. package/src/utils/paths.js +7 -0
  22. package/src/utils/project.js +122 -0
  23. package/src/utils/strings.js +7 -0
  24. package/templates/blocks/DD-BookCall/Component.tsx +573 -0
  25. package/templates/blocks/DD-BookCall/config.ts +239 -0
  26. package/templates/blocks/DD-BookCall/manifest.json +112 -0
  27. package/templates/blocks/DD-CardTemplate01/Component.tsx +144 -0
  28. package/templates/blocks/DD-CardTemplate01/config.ts +106 -0
  29. package/templates/blocks/DD-CardTemplate01/manifest.json +84 -0
  30. package/templates/blocks/DD-Carousel-A/Component.tsx +266 -0
  31. package/templates/blocks/DD-Carousel-A/config.ts +163 -0
  32. package/templates/blocks/DD-Carousel-A/manifest.json +86 -0
  33. package/templates/blocks/DD-Carousel-B/Component.tsx +432 -0
  34. package/templates/blocks/DD-Carousel-B/config.ts +176 -0
  35. package/templates/blocks/DD-Carousel-B/manifest.json +86 -0
  36. package/templates/blocks/DD-ComparisonTable/Component.tsx +272 -0
  37. package/templates/blocks/DD-ComparisonTable/config.ts +105 -0
  38. package/templates/blocks/DD-ComparisonTable/manifest.json +78 -0
  39. package/templates/blocks/DD-Contact/Component.tsx +439 -0
  40. package/templates/blocks/DD-Contact/config.ts +217 -0
  41. package/templates/blocks/DD-Contact/manifest.json +107 -0
  42. package/templates/blocks/DD-FeatCat/Component.tsx +361 -0
  43. package/templates/blocks/DD-FeatCat/config.ts +204 -0
  44. package/templates/blocks/DD-FeatCat/manifest.json +87 -0
  45. package/templates/blocks/DD-FeatStrip/Component.tsx +615 -0
  46. package/templates/blocks/DD-FeatStrip/config.ts +134 -0
  47. package/templates/blocks/DD-FeatStrip/manifest.json +82 -0
  48. package/templates/blocks/DD-Hero/Component.tsx +317 -0
  49. package/templates/blocks/DD-Hero/config.ts +267 -0
  50. package/templates/blocks/DD-Hero/manifest.json +92 -0
  51. package/templates/blocks/DD-HorizontalScroll/Component.tsx +995 -0
  52. package/templates/blocks/DD-HorizontalScroll/config.ts +231 -0
  53. package/templates/blocks/DD-HorizontalScroll/manifest.json +85 -0
  54. package/templates/blocks/DD-MasonaryMedia/Component.tsx +571 -0
  55. package/templates/blocks/DD-MasonaryMedia/config.ts +390 -0
  56. package/templates/blocks/DD-MasonaryMedia/manifest.json +101 -0
  57. package/templates/blocks/DD-MasonaryMedia/vendor.d.ts +2 -0
  58. package/templates/blocks/DD-Pricing/Component.tsx +380 -0
  59. package/templates/blocks/DD-Pricing/config.ts +215 -0
  60. package/templates/blocks/DD-Pricing/manifest.json +78 -0
  61. package/templates/blocks/DD-Process/Component.tsx +155 -0
  62. package/templates/blocks/DD-Process/config.ts +150 -0
  63. package/templates/blocks/DD-Process/manifest.json +82 -0
  64. package/templates/blocks/DD-Section/Component.tsx +327 -0
  65. package/templates/blocks/DD-Section/config.ts +214 -0
  66. package/templates/blocks/DD-Section/manifest.json +85 -0
  67. package/templates/blocks/DD-Services/Component.tsx +188 -0
  68. package/templates/blocks/DD-Services/config.ts +149 -0
  69. package/templates/blocks/DD-Services/manifest.json +95 -0
  70. package/templates/blocks/DD-ShowcaseGrid/Component.tsx +317 -0
  71. package/templates/blocks/DD-ShowcaseGrid/config.ts +197 -0
  72. package/templates/blocks/DD-ShowcaseGrid/manifest.json +80 -0
  73. package/templates/blocks/DD-Slider-A/Component.tsx +252 -0
  74. package/templates/blocks/DD-Slider-A/config.ts +118 -0
  75. package/templates/blocks/DD-Slider-A/manifest.json +86 -0
  76. package/templates/blocks/DD-StackCards/Component.tsx +496 -0
  77. package/templates/blocks/DD-StackCards/config.ts +399 -0
  78. package/templates/blocks/DD-StackCards/manifest.json +87 -0
  79. package/templates/blocks/DD-Team/Component.tsx +265 -0
  80. package/templates/blocks/DD-Team/config.ts +173 -0
  81. package/templates/blocks/DD-Team/manifest.json +82 -0
  82. package/templates/blocks/DD-TechStack/Component.tsx +189 -0
  83. package/templates/blocks/DD-TechStack/config.ts +153 -0
  84. package/templates/blocks/DD-TechStack/manifest.json +118 -0
  85. package/templates/blocks/DD-Testimonials/Component.tsx +147 -0
  86. package/templates/blocks/DD-Testimonials/config.ts +120 -0
  87. package/templates/blocks/DD-Testimonials/manifest.json +87 -0
  88. package/templates/blocks/DD-Work/Component.tsx +328 -0
  89. package/templates/blocks/DD-Work/config.ts +165 -0
  90. package/templates/blocks/DD-Work/manifest.json +87 -0
  91. package/templates/blocks/DD-Work-B/Component.tsx +320 -0
  92. package/templates/blocks/DD-Work-B/config.ts +165 -0
  93. package/templates/blocks/DD-Work-B/manifest.json +75 -0
  94. package/templates/shared/components/ui/anims/fade.tsx +83 -0
  95. package/templates/shared/components/ui/button.tsx +233 -0
  96. package/templates/shared/components/ui/input.tsx +41 -0
  97. package/templates/shared/fields/lucide-icon-picker/Cell.tsx +24 -0
  98. package/templates/shared/fields/lucide-icon-picker/README.md +160 -0
  99. package/templates/shared/fields/lucide-icon-picker/field.ts +40 -0
  100. package/templates/shared/fields/lucide-icon-picker/index.tsx +203 -0
  101. package/templates/shared/utilities/canUseDOM.ts +1 -0
  102. package/templates/shared/utilities/getURL.ts +31 -0
@@ -0,0 +1,399 @@
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDStackCards: Block = {
4
+ slug: 'DD-StackCards',
5
+ interfaceName: 'DDStackCards',
6
+ labels: {
7
+ singular: 'Studio Stack Cards',
8
+ plural: 'Studio Stack Cards Sections'
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'tabs',
13
+ tabs: [
14
+ {
15
+ label: 'Cards',
16
+ fields: [
17
+ {
18
+ name: 'cards',
19
+ type: 'array',
20
+ label: 'Cards',
21
+ minRows: 1,
22
+ admin: {
23
+ description:
24
+ 'Each card stacks on top of the previous as the user scrolls. Cards are pinned progressively.'
25
+ },
26
+ fields: [
27
+ {
28
+ type: 'row',
29
+ fields: [
30
+ {
31
+ name: 'iconName',
32
+ type: 'text',
33
+ label: 'Lucide Icon Name',
34
+ required: true,
35
+ admin: {
36
+ width: '50%',
37
+ description:
38
+ 'e.g. Layout, Code2, Database, Gauge, SearchCheck, GitBranch, Layers'
39
+ }
40
+ },
41
+ {
42
+ name: 'number',
43
+ type: 'text',
44
+ label: 'Card Number',
45
+ admin: {
46
+ width: '50%',
47
+ description: 'e.g. 01, 02 — displayed as the index label'
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ name: 'title',
54
+ type: 'text',
55
+ label: 'Title',
56
+ required: true
57
+ },
58
+ {
59
+ name: 'content',
60
+ type: 'richText',
61
+ label: 'Description'
62
+ },
63
+ {
64
+ type: 'row',
65
+ fields: [
66
+ {
67
+ name: 'statValue',
68
+ type: 'text',
69
+ label: 'Stat Value',
70
+ admin: {
71
+ width: '50%',
72
+ description: 'e.g. 3.2×, 0.8s, 98+, +180%'
73
+ }
74
+ },
75
+ {
76
+ name: 'statLabel',
77
+ type: 'text',
78
+ label: 'Stat Label',
79
+ admin: {
80
+ width: '50%',
81
+ description: 'e.g. avg. conversion lift'
82
+ }
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ name: 'tags',
88
+ type: 'array',
89
+ label: 'Tags',
90
+ fields: [
91
+ {
92
+ name: 'tag',
93
+ type: 'text',
94
+ label: 'Tag',
95
+ required: true
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ type: 'row',
101
+ fields: [
102
+ {
103
+ name: 'ctaLabel',
104
+ type: 'text',
105
+ label: 'CTA Label',
106
+ defaultValue: 'Learn more',
107
+ admin: { width: '50%' }
108
+ },
109
+ {
110
+ name: 'ctaHref',
111
+ type: 'text',
112
+ label: 'CTA Link',
113
+ defaultValue: '#',
114
+ admin: { width: '50%' }
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ name: 'accentVariant',
120
+ type: 'select',
121
+ label: 'Accent Color',
122
+ defaultValue: 'lime',
123
+ options: [
124
+ { label: 'Lime', value: 'lime' },
125
+ { label: 'Purple', value: 'purple' }
126
+ ]
127
+ },
128
+ {
129
+ name: 'image',
130
+ type: 'upload',
131
+ label: 'Card Image (Right Panel)',
132
+ relationTo: 'media',
133
+ admin: {
134
+ description:
135
+ 'Optional image displayed in the right panel. If not provided, a large icon watermark is shown instead.'
136
+ }
137
+ }
138
+ ],
139
+ defaultValue: [
140
+ {
141
+ iconName: 'Layout',
142
+ number: '01',
143
+ title: 'UX / UI Design',
144
+ statValue: '3.2×',
145
+ statLabel: 'avg. conversion lift',
146
+ tags: [
147
+ { tag: 'User Research' },
148
+ { tag: 'Wireframing' },
149
+ { tag: 'Design Systems' }
150
+ ],
151
+ ctaLabel: 'Learn more',
152
+ ctaHref: '#',
153
+ accentVariant: 'lime'
154
+ },
155
+ {
156
+ iconName: 'Code2',
157
+ number: '02',
158
+ title: 'Web Development',
159
+ statValue: '0.8s',
160
+ statLabel: 'avg. load time',
161
+ tags: [{ tag: 'React / Next.js' }, { tag: 'TypeScript' }, { tag: 'Edge CDN' }],
162
+ ctaLabel: 'Learn more',
163
+ ctaHref: '#',
164
+ accentVariant: 'purple'
165
+ },
166
+ {
167
+ iconName: 'Database',
168
+ number: '03',
169
+ title: 'CMS Systems',
170
+ statValue: '100%',
171
+ statLabel: 'content ownership',
172
+ tags: [{ tag: 'Headless CMS' }, { tag: 'Payload' }, { tag: 'Contentful' }],
173
+ ctaLabel: 'Learn more',
174
+ ctaHref: '#',
175
+ accentVariant: 'lime'
176
+ },
177
+ {
178
+ iconName: 'Gauge',
179
+ number: '04',
180
+ title: 'Performance Optimisation',
181
+ statValue: '98+',
182
+ statLabel: 'lighthouse score',
183
+ tags: [{ tag: 'Core Web Vitals' }, { tag: 'Lighthouse' }, { tag: 'CDN Tuning' }],
184
+ ctaLabel: 'Learn more',
185
+ ctaHref: '#',
186
+ accentVariant: 'purple'
187
+ },
188
+ {
189
+ iconName: 'SearchCheck',
190
+ number: '05',
191
+ title: 'SEO & Analytics',
192
+ statValue: '+180%',
193
+ statLabel: 'avg. organic growth',
194
+ tags: [{ tag: 'Technical SEO' }, { tag: 'GA4' }, { tag: 'Schema Markup' }],
195
+ ctaLabel: 'Learn more',
196
+ ctaHref: '#',
197
+ accentVariant: 'lime'
198
+ },
199
+ {
200
+ iconName: 'GitBranch',
201
+ number: '06',
202
+ title: 'Scalable Systems',
203
+ statValue: '∞',
204
+ statLabel: 'scalable by design',
205
+ tags: [{ tag: 'CI/CD' }, { tag: 'Microservices' }, { tag: 'Cloud Infra' }],
206
+ ctaLabel: 'Learn more',
207
+ ctaHref: '#',
208
+ accentVariant: 'purple'
209
+ }
210
+ ]
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ label: 'Layout',
216
+ fields: [
217
+ {
218
+ type: 'collapsible',
219
+ label: 'Desktop',
220
+ admin: {
221
+ initCollapsed: false
222
+ },
223
+ fields: [
224
+ {
225
+ type: 'row',
226
+ fields: [
227
+ {
228
+ name: 'cardOffset',
229
+ type: 'number',
230
+ label: 'Desktop Card Peek Offset (px)',
231
+ defaultValue: 14,
232
+ admin: {
233
+ width: '50%',
234
+ description: 'How many px each card peeks above the previous stacked card.'
235
+ }
236
+ },
237
+ {
238
+ name: 'initialStickyTop',
239
+ type: 'number',
240
+ label: 'Desktop Initial Sticky Top (px)',
241
+ defaultValue: 0,
242
+ admin: {
243
+ width: '50%',
244
+ description: 'Top offset in px for the first card when pinned.'
245
+ }
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ type: 'row',
251
+ fields: [
252
+ {
253
+ name: 'depthZ',
254
+ type: 'number',
255
+ label: 'Desktop Depth Z (px)',
256
+ defaultValue: 40,
257
+ admin: {
258
+ width: '50%',
259
+ description: 'How far each card recedes in 3D space per stacked level.'
260
+ }
261
+ },
262
+ {
263
+ name: 'scaleStep',
264
+ type: 'number',
265
+ label: 'Desktop Scale Step per Level',
266
+ defaultValue: 0.18,
267
+ admin: {
268
+ width: '50%',
269
+ description: 'Scale reduction per stacked level.'
270
+ }
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ type: 'collapsible',
278
+ label: 'Tablet',
279
+ admin: {
280
+ initCollapsed: true
281
+ },
282
+ fields: [
283
+ {
284
+ type: 'row',
285
+ fields: [
286
+ {
287
+ name: 'cardOffsetTablet',
288
+ type: 'number',
289
+ label: 'Tablet Card Peek Offset (px)',
290
+ defaultValue: 10,
291
+ admin: {
292
+ width: '50%'
293
+ }
294
+ },
295
+ {
296
+ name: 'initialStickyTopTablet',
297
+ type: 'number',
298
+ label: 'Tablet Initial Sticky Top (px)',
299
+ defaultValue: 0,
300
+ admin: {
301
+ width: '50%'
302
+ }
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ type: 'row',
308
+ fields: [
309
+ {
310
+ name: 'depthZTablet',
311
+ type: 'number',
312
+ label: 'Tablet Depth Z (px)',
313
+ defaultValue: 24,
314
+ admin: {
315
+ width: '50%'
316
+ }
317
+ },
318
+ {
319
+ name: 'scaleStepTablet',
320
+ type: 'number',
321
+ label: 'Tablet Scale Step per Level',
322
+ defaultValue: 0.08,
323
+ admin: {
324
+ width: '50%'
325
+ }
326
+ }
327
+ ]
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ type: 'collapsible',
333
+ label: 'Mobile',
334
+ admin: {
335
+ initCollapsed: true
336
+ },
337
+ fields: [
338
+ {
339
+ type: 'row',
340
+ fields: [
341
+ {
342
+ name: 'cardOffsetMobile',
343
+ type: 'number',
344
+ label: 'Mobile Card Peek Offset (px)',
345
+ defaultValue: 7,
346
+ admin: {
347
+ width: '50%'
348
+ }
349
+ },
350
+ {
351
+ name: 'initialStickyTopMobile',
352
+ type: 'number',
353
+ label: 'Mobile Initial Sticky Top (px)',
354
+ defaultValue: 0,
355
+ admin: {
356
+ width: '50%'
357
+ }
358
+ }
359
+ ]
360
+ },
361
+ {
362
+ type: 'row',
363
+ fields: [
364
+ {
365
+ name: 'depthZMobile',
366
+ type: 'number',
367
+ label: 'Mobile Depth Z (px)',
368
+ defaultValue: 12,
369
+ admin: {
370
+ width: '50%'
371
+ }
372
+ },
373
+ {
374
+ name: 'scaleStepMobile',
375
+ type: 'number',
376
+ label: 'Mobile Scale Step per Level',
377
+ defaultValue: 0.045,
378
+ admin: {
379
+ width: '50%'
380
+ }
381
+ }
382
+ ]
383
+ }
384
+ ]
385
+ }
386
+ ]
387
+ }
388
+ ]
389
+ },
390
+ {
391
+ name: 'sectionId',
392
+ type: 'text',
393
+ label: 'Section ID',
394
+ admin: {
395
+ description: 'HTML id attribute for anchor linking, e.g. "engine"'
396
+ }
397
+ }
398
+ ]
399
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "type": "block",
3
+ "name": "DD-StackCards",
4
+ "label": "Studio Stack Cards",
5
+ "sourceName": "StudioStackCards",
6
+ "portableName": "DD-StackCards",
7
+ "slug": "DD-StackCards",
8
+ "version": "0.0.1",
9
+ "source": {
10
+ "repo": "Hadizainal/DesignsDustedv3",
11
+ "originalPath": "src/blocks/StudioStackCards",
12
+ "originalSlug": "studioStackCards",
13
+ "originalConfigExport": "StudioStackCards",
14
+ "originalComponentExport": "StudioStackCards",
15
+ "originalInterfaceName": "StudioStackCards"
16
+ },
17
+ "files": [
18
+ {
19
+ "from": "Component.tsx",
20
+ "to": "src/blocks/DD-StackCards/Component.tsx"
21
+ },
22
+ {
23
+ "from": "config.ts",
24
+ "to": "src/blocks/DD-StackCards/config.ts"
25
+ }
26
+ ],
27
+ "dependencies": [
28
+ {
29
+ "name": "gsap"
30
+ },
31
+ {
32
+ "name": "lucide-react"
33
+ }
34
+ ],
35
+ "sharedFiles": [],
36
+ "requiredProjectFiles": [],
37
+ "optionalProjectFiles": [],
38
+ "collectionRegistration": {
39
+ "enabled": true,
40
+ "collections": [
41
+ "Pages",
42
+ "Posts"
43
+ ]
44
+ },
45
+ "renderBlocksRegistration": {
46
+ "enabled": true
47
+ },
48
+ "renderBlocksBehavior": {
49
+ "wrapperless": false
50
+ },
51
+ "pageRouteIntegration": {
52
+ "required": false,
53
+ "manualSteps": []
54
+ },
55
+ "manual": [
56
+ "RichText rendering was replaced with fallback markup; reconnect the target project RichText renderer manually if needed.",
57
+ "defaultLexical was removed from config; re-add project-specific Lexical features manually if needed.",
58
+ "Register DDStackCards in Pages/Posts blocks arrays if automatic registration was skipped.",
59
+ "Register DD-StackCards in RenderBlocks if automatic registration was skipped.",
60
+ "Run payload generate:types after schema changes.",
61
+ "Run payload generate:importmap if admin/component imports changed."
62
+ ],
63
+ "manualSteps": [
64
+ "RichText rendering was replaced with fallback markup; reconnect the target project RichText renderer manually if needed.",
65
+ "defaultLexical was removed from config; re-add project-specific Lexical features manually if needed.",
66
+ "Register DDStackCards in Pages/Posts blocks arrays if automatic registration was skipped.",
67
+ "Register DD-StackCards in RenderBlocks if automatic registration was skipped.",
68
+ "Run payload generate:types after schema changes.",
69
+ "Run payload generate:importmap if admin/component imports changed."
70
+ ],
71
+ "patchTargets": {
72
+ "blockConfigRegistration": {
73
+ "description": "Installer can add import { DDStackCards } from '@/blocks/DD-StackCards/config' and add DDStackCards to clear Pages/Posts blocks arrays."
74
+ },
75
+ "renderBlocksRegistration": {
76
+ "description": "Installer can register DD-StackCards in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
77
+ }
78
+ },
79
+ "notes": [
80
+ "Converted from DesignsDustedv3 StudioStackCards.",
81
+ "Generated Payload type imports are replaced with portable fallback types when needed.",
82
+ "Installer must not overwrite existing target files.",
83
+ "Project-specific RichText/defaultLexical setup is intentionally not bundled."
84
+ ],
85
+ "exportName": "DDStackCards",
86
+ "interfaceName": "DDStackCards"
87
+ }