blocks-dusted 0.1.0 → 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 +40 -40
  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,36 +1,36 @@
1
- import type { Block } from "payload";
1
+ import type { Block } from 'payload'
2
2
 
3
3
  export const DDTestimonials: Block = {
4
- slug: "DD-Testimonials",
5
- interfaceName: "DDTestimonials",
4
+ slug: 'DD-Testimonials',
5
+ interfaceName: 'DDTestimonials',
6
6
  labels: {
7
- singular: "Studio Testimonials",
8
- plural: "Studio Testimonials Sections",
7
+ singular: 'Studio Testimonials',
8
+ plural: 'Studio Testimonials Sections'
9
9
  },
10
10
  fields: [
11
11
  {
12
- type: "tabs",
12
+ type: 'tabs',
13
13
  tabs: [
14
14
  {
15
- label: "Header",
15
+ label: 'Header',
16
16
  fields: [
17
17
  {
18
- name: "eyebrow",
19
- type: "text",
20
- label: "Eyebrow Label",
21
- defaultValue: "Client Stories",
18
+ name: 'eyebrow',
19
+ type: 'text',
20
+ label: 'Eyebrow Label',
21
+ defaultValue: 'Client Stories'
22
22
  },
23
23
  {
24
- name: "headline",
25
- type: "text",
26
- label: "Headline",
24
+ name: 'headline',
25
+ type: 'text',
26
+ label: 'Headline',
27
27
  required: true,
28
- defaultValue: "Don't take our word for it",
29
- },
30
- ],
28
+ defaultValue: "Don't take our word for it"
29
+ }
30
+ ]
31
31
  },
32
32
  {
33
- label: "Testimonials",
33
+ label: 'Testimonials',
34
34
  fields: [
35
35
  // Reconnect option:
36
36
  // If the target project has a Testimonials collection, replace the standalone
@@ -47,74 +47,74 @@ export const DDTestimonials: Block = {
47
47
  // }
48
48
  // },
49
49
  {
50
- name: "testimonials",
51
- type: "array",
52
- label: "Testimonials",
50
+ name: 'testimonials',
51
+ type: 'array',
52
+ label: 'Testimonials',
53
53
  fields: [
54
54
  {
55
- name: "title",
56
- type: "text",
57
- label: "Author",
58
- required: true,
55
+ name: 'title',
56
+ type: 'text',
57
+ label: 'Author',
58
+ required: true
59
59
  },
60
60
  {
61
- name: "content",
62
- type: "richText",
63
- label: "Quote",
61
+ name: 'content',
62
+ type: 'richText',
63
+ label: 'Quote'
64
64
  },
65
65
  {
66
- name: "designation",
67
- type: "richText",
68
- label: "Designation",
66
+ name: 'designation',
67
+ type: 'richText',
68
+ label: 'Designation'
69
69
  },
70
70
  {
71
- name: "companyLogo",
72
- type: "upload",
73
- relationTo: "media",
74
- label: "Avatar / Logo",
71
+ name: 'companyLogo',
72
+ type: 'upload',
73
+ relationTo: 'media',
74
+ label: 'Avatar / Logo'
75
75
  },
76
76
  {
77
- name: "fallbackAvatarUrl",
78
- type: "text",
79
- label: "Fallback Avatar URL",
77
+ name: 'fallbackAvatarUrl',
78
+ type: 'text',
79
+ label: 'Fallback Avatar URL'
80
80
  },
81
81
  {
82
- name: "rating",
83
- type: "number",
84
- label: "Rating",
82
+ name: 'rating',
83
+ type: 'number',
84
+ label: 'Rating',
85
85
  defaultValue: 5,
86
86
  min: 1,
87
- max: 5,
88
- },
87
+ max: 5
88
+ }
89
89
  ],
90
90
  defaultValue: [
91
91
  {
92
- title: "DesignsDusted Client",
93
- fallbackAvatarUrl: "",
94
- rating: 5,
95
- },
96
- ],
97
- },
98
- ],
92
+ title: 'DesignsDusted Client',
93
+ fallbackAvatarUrl: '',
94
+ rating: 5
95
+ }
96
+ ]
97
+ }
98
+ ]
99
99
  },
100
100
  {
101
- label: "Settings",
101
+ label: 'Settings',
102
102
  fields: [
103
103
  {
104
- name: "sectionId",
105
- type: "text",
106
- label: "Section ID",
107
- defaultValue: "testimonials",
104
+ name: 'sectionId',
105
+ type: 'text',
106
+ label: 'Section ID',
107
+ defaultValue: 'testimonials'
108
108
  },
109
109
  {
110
- name: "customCSS",
111
- type: "code",
112
- label: "Custom CSS",
113
- admin: { language: "css" },
114
- },
115
- ],
116
- },
117
- ],
118
- },
119
- ],
120
- };
110
+ name: 'customCSS',
111
+ type: 'code',
112
+ label: 'Custom CSS',
113
+ admin: { language: 'css' }
114
+ }
115
+ ]
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ }