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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Testimonials Collection Template
|
|
2
|
+
|
|
3
|
+
Installs `src/collections/Testimonials.ts` and registers `Testimonials` in `payload.config.ts` when the collections array can be patched safely.
|
|
4
|
+
|
|
5
|
+
The source was adapted from the Raw Dusted Blocks Testimonials collection for the default Payload starter helper paths:
|
|
6
|
+
|
|
7
|
+
- `../access/authenticated`
|
|
8
|
+
- `../access/anyone`
|
|
9
|
+
- `@/fields/defaultLexical`
|
|
10
|
+
|
|
11
|
+
Review the installed collection before running Payload type generation.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { CollectionConfig } from 'payload'
|
|
2
|
+
|
|
3
|
+
import { authenticated } from '../access/authenticated'
|
|
4
|
+
import { anyone } from '../access/anyone'
|
|
5
|
+
import { defaultLexical } from '@/fields/defaultLexical'
|
|
6
|
+
|
|
7
|
+
export const Testimonials: CollectionConfig = {
|
|
8
|
+
slug: 'testimonials',
|
|
9
|
+
orderable: true,
|
|
10
|
+
labels: {
|
|
11
|
+
singular: 'Testimonial',
|
|
12
|
+
plural: 'Testimonials',
|
|
13
|
+
},
|
|
14
|
+
access: {
|
|
15
|
+
create: authenticated,
|
|
16
|
+
delete: authenticated,
|
|
17
|
+
read: anyone,
|
|
18
|
+
update: authenticated,
|
|
19
|
+
},
|
|
20
|
+
admin: {
|
|
21
|
+
useAsTitle: 'title',
|
|
22
|
+
defaultColumns: ['clientName', 'designation', 'company'],
|
|
23
|
+
},
|
|
24
|
+
fields: [
|
|
25
|
+
{
|
|
26
|
+
name: 'title',
|
|
27
|
+
type: 'text',
|
|
28
|
+
required: true,
|
|
29
|
+
index: true,
|
|
30
|
+
admin: {
|
|
31
|
+
description: 'Use client name as title to identify this testimonial.',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'row',
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: 'clientName',
|
|
39
|
+
type: 'richText',
|
|
40
|
+
label: "Client's Name",
|
|
41
|
+
required: true,
|
|
42
|
+
editor: defaultLexical,
|
|
43
|
+
admin: {
|
|
44
|
+
width: '50%',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'designation',
|
|
49
|
+
hidden: false,
|
|
50
|
+
type: 'richText',
|
|
51
|
+
label: 'Designation / Role',
|
|
52
|
+
required: false,
|
|
53
|
+
editor: defaultLexical,
|
|
54
|
+
admin: {
|
|
55
|
+
width: '50%',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'row',
|
|
62
|
+
fields: [
|
|
63
|
+
{
|
|
64
|
+
name: 'company',
|
|
65
|
+
type: 'richText',
|
|
66
|
+
label: 'Company',
|
|
67
|
+
required: false,
|
|
68
|
+
editor: defaultLexical,
|
|
69
|
+
admin: {
|
|
70
|
+
width: '50%',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'group',
|
|
75
|
+
label: false,
|
|
76
|
+
admin: {
|
|
77
|
+
width: '50%',
|
|
78
|
+
},
|
|
79
|
+
fields: [
|
|
80
|
+
{
|
|
81
|
+
name: 'companyLogo',
|
|
82
|
+
type: 'upload',
|
|
83
|
+
relationTo: 'media',
|
|
84
|
+
label: 'Company Logo / Avatar',
|
|
85
|
+
required: false,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'fallbackAvatarUrl',
|
|
89
|
+
type: 'text',
|
|
90
|
+
label: 'Fallback Logo/Avatar URL',
|
|
91
|
+
admin: {
|
|
92
|
+
description: 'External URL for avatar when no media upload is provided.',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'content',
|
|
101
|
+
type: 'richText',
|
|
102
|
+
label: 'Testimonial Content',
|
|
103
|
+
required: false,
|
|
104
|
+
editor: defaultLexical,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'row',
|
|
108
|
+
fields: [
|
|
109
|
+
{
|
|
110
|
+
name: 'rating',
|
|
111
|
+
type: 'number',
|
|
112
|
+
label: 'Star Rating (1-5)',
|
|
113
|
+
min: 1,
|
|
114
|
+
max: 5,
|
|
115
|
+
admin: {
|
|
116
|
+
description: 'Numeric star rating used by Studio Testimonials block.',
|
|
117
|
+
width: '50%',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'date',
|
|
122
|
+
type: 'text',
|
|
123
|
+
label: 'Date',
|
|
124
|
+
admin: {
|
|
125
|
+
description: 'Date string shown on marquee cards e.g. "March 2025".',
|
|
126
|
+
width: '50%',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'ratingText',
|
|
131
|
+
type: 'text',
|
|
132
|
+
label: 'Rating (Text)',
|
|
133
|
+
admin: {
|
|
134
|
+
description: 'Displayed rating string e.g. "5 stars" or "5.0" used by Marquee block.',
|
|
135
|
+
width: '100%',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'sourceLogo',
|
|
142
|
+
type: 'upload',
|
|
143
|
+
relationTo: 'media',
|
|
144
|
+
label: 'Source Platform Logo',
|
|
145
|
+
admin: {
|
|
146
|
+
description: 'Platform logo for marquee cards, e.g. Upwork or Fiverr logo.',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'sourceLogoAlt',
|
|
151
|
+
type: 'text',
|
|
152
|
+
label: 'Source Logo Alt Text',
|
|
153
|
+
defaultValue: 'logo alt',
|
|
154
|
+
admin: {
|
|
155
|
+
description: 'Alt text for the source platform logo.',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export default Testimonials
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "collection",
|
|
3
|
+
"name": "Testimonials",
|
|
4
|
+
"label": "Testimonials Collection",
|
|
5
|
+
"slug": "testimonials",
|
|
6
|
+
"version": "0.0.1",
|
|
7
|
+
"source": {
|
|
8
|
+
"referencePath": "Raw Dusted Blocks/dusted-src (to add into CLI)/src/collections/Testimonials.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"from": "Testimonials.ts",
|
|
13
|
+
"to": "src/collections/Testimonials.ts"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"dependencies": [],
|
|
17
|
+
"requiredProjectFiles": [
|
|
18
|
+
{
|
|
19
|
+
"path": "src/access/authenticated.ts",
|
|
20
|
+
"reason": "Testimonials uses the default authenticated access helper."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "src/access/anyone.ts",
|
|
24
|
+
"reason": "Testimonials uses the default anyone read access helper."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "src/fields/defaultLexical.ts",
|
|
28
|
+
"reason": "Testimonials richText fields use the project's defaultLexical editor helper."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/collections/Media.ts",
|
|
32
|
+
"reason": "Testimonials upload fields relate to the media collection."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"optionalProjectFiles": [
|
|
36
|
+
{
|
|
37
|
+
"path": "src/payload.config.ts",
|
|
38
|
+
"reason": "Installer can register Testimonials in the Payload collections array."
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"payloadConfigRegistration": {
|
|
42
|
+
"enabled": true,
|
|
43
|
+
"exportName": "Testimonials",
|
|
44
|
+
"importPath": "./collections/Testimonials"
|
|
45
|
+
},
|
|
46
|
+
"manual": [
|
|
47
|
+
"Review src/collections/Testimonials.ts against the target project's access helper paths, media slug, and defaultLexical helper before using it in production.",
|
|
48
|
+
"Run the target project's Payload type-generation command after installing the collection.",
|
|
49
|
+
"Run formatter, linter, TypeScript, and build checks after installation."
|
|
50
|
+
],
|
|
51
|
+
"notes": [
|
|
52
|
+
"This collection is based on the Raw Dusted Blocks Testimonials reference, adjusted to the default Payload starter access helper paths.",
|
|
53
|
+
"The installer patches payload.config collections registration only when it can find a clear collections array."
|
|
54
|
+
]
|
|
55
|
+
}
|