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,231 @@
|
|
|
1
|
+
import type { Block } from 'payload'
|
|
2
|
+
|
|
3
|
+
export const DDHorizontalScroll: Block = {
|
|
4
|
+
slug: 'DD-HorizontalScroll',
|
|
5
|
+
dbName: 'shs',
|
|
6
|
+
interfaceName: 'DDHorizontalScroll',
|
|
7
|
+
labels: {
|
|
8
|
+
singular: 'Studio Horizontal Scroll',
|
|
9
|
+
plural: 'Studio Horizontal Scrolls'
|
|
10
|
+
},
|
|
11
|
+
fields: [
|
|
12
|
+
{
|
|
13
|
+
type: 'tabs',
|
|
14
|
+
tabs: [
|
|
15
|
+
{
|
|
16
|
+
label: 'Content',
|
|
17
|
+
fields: [
|
|
18
|
+
{
|
|
19
|
+
name: 'sectionLabel',
|
|
20
|
+
type: 'text',
|
|
21
|
+
label: 'Section Label',
|
|
22
|
+
defaultValue: 'The Process',
|
|
23
|
+
admin: {
|
|
24
|
+
description: 'Eyebrow label shown in the top-left corner of the section.'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'slides',
|
|
29
|
+
type: 'array',
|
|
30
|
+
label: 'Slides',
|
|
31
|
+
minRows: 1,
|
|
32
|
+
maxRows: 8,
|
|
33
|
+
admin: {
|
|
34
|
+
description:
|
|
35
|
+
'Each slide renders as one full-width horizontal panel. Drag to reorder.',
|
|
36
|
+
initCollapsed: true
|
|
37
|
+
},
|
|
38
|
+
fields: [
|
|
39
|
+
{
|
|
40
|
+
type: 'row',
|
|
41
|
+
fields: [
|
|
42
|
+
{
|
|
43
|
+
name: 'watermark',
|
|
44
|
+
type: 'text',
|
|
45
|
+
label: 'Phase Label',
|
|
46
|
+
defaultValue: '01',
|
|
47
|
+
admin: { width: '50%' }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'phase',
|
|
51
|
+
type: 'text',
|
|
52
|
+
label: 'Phase Label',
|
|
53
|
+
defaultValue: 'Phase 01',
|
|
54
|
+
admin: { width: '50%' }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'accent',
|
|
58
|
+
type: 'select',
|
|
59
|
+
label: 'Accent Colour',
|
|
60
|
+
defaultValue: 'lime',
|
|
61
|
+
options: [
|
|
62
|
+
{ label: 'Lime (#84cc16)', value: 'lime' },
|
|
63
|
+
{ label: 'Purple (#9803e2)', value: 'purple' }
|
|
64
|
+
],
|
|
65
|
+
admin: { width: '50%' }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'icon',
|
|
69
|
+
type: 'select',
|
|
70
|
+
label: 'Icon',
|
|
71
|
+
defaultValue: 'penRuler',
|
|
72
|
+
options: [
|
|
73
|
+
{ label: 'Pencil Ruler (Design)', value: 'penRuler' },
|
|
74
|
+
{ label: 'Code (Development)', value: 'code2' },
|
|
75
|
+
{ label: 'Rocket (Launch)', value: 'rocket' },
|
|
76
|
+
{ label: 'Trending Up (Growth)', value: 'trendingUp' },
|
|
77
|
+
{ label: 'Settings (Automation)', value: 'settings' },
|
|
78
|
+
{ label: 'Bar Chart (Analytics)', value: 'barChart2' },
|
|
79
|
+
{ label: 'Users (Team)', value: 'users' },
|
|
80
|
+
{ label: 'Globe (Web)', value: 'globe' },
|
|
81
|
+
{ label: 'Zap (Performance)', value: 'zap' },
|
|
82
|
+
{ label: 'Layers (Stack)', value: 'layers' },
|
|
83
|
+
{ label: 'Shield Check (Security)', value: 'shieldCheck' },
|
|
84
|
+
{ label: 'Lightbulb (Ideas)', value: 'lightbulb' },
|
|
85
|
+
{ label: 'Puzzle (Integration)', value: 'puzzle' },
|
|
86
|
+
{ label: 'Star (Premium)', value: 'star' }
|
|
87
|
+
],
|
|
88
|
+
admin: { width: '50%' }
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'headline',
|
|
94
|
+
type: 'text',
|
|
95
|
+
label: 'Headline',
|
|
96
|
+
defaultValue: 'Phase Title',
|
|
97
|
+
admin: {
|
|
98
|
+
description: 'Use \\n for a line break e.g. "UX & UI\\nDesign".'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'row',
|
|
103
|
+
fields: [
|
|
104
|
+
{
|
|
105
|
+
name: 'sub',
|
|
106
|
+
type: 'text',
|
|
107
|
+
label: 'Sub Headline',
|
|
108
|
+
defaultValue: 'Short punchy line.',
|
|
109
|
+
admin: { width: '60%' }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'visualType',
|
|
113
|
+
type: 'select',
|
|
114
|
+
label: 'Visual Panel',
|
|
115
|
+
defaultValue: 'wireframe',
|
|
116
|
+
options: [
|
|
117
|
+
{ label: 'Wireframe / UI Mockup', value: 'wireframe' },
|
|
118
|
+
{ label: 'Code Editor', value: 'codeEditor' },
|
|
119
|
+
{ label: 'Deploy Pipeline', value: 'pipeline' },
|
|
120
|
+
{ label: 'Marketing Funnel', value: 'funnel' },
|
|
121
|
+
{ label: 'Automation Flow', value: 'automation' }
|
|
122
|
+
],
|
|
123
|
+
admin: { width: '40%' }
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'collapsible',
|
|
129
|
+
label: 'Custom Media (Optional)',
|
|
130
|
+
admin: {
|
|
131
|
+
description:
|
|
132
|
+
'Upload custom media to replace the default visual. If set, overrides the Visual Panel setting above.'
|
|
133
|
+
},
|
|
134
|
+
fields: [
|
|
135
|
+
{
|
|
136
|
+
name: 'customMediaType',
|
|
137
|
+
type: 'select',
|
|
138
|
+
label: 'Media Type',
|
|
139
|
+
options: [
|
|
140
|
+
{ label: 'Image', value: 'image' },
|
|
141
|
+
{ label: 'Video', value: 'video' },
|
|
142
|
+
{ label: 'Lottie Animation', value: 'lottie' }
|
|
143
|
+
],
|
|
144
|
+
admin: {
|
|
145
|
+
description: 'Select the type of media you want to upload.'
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'customMedia',
|
|
150
|
+
type: 'upload',
|
|
151
|
+
label: 'Media File',
|
|
152
|
+
relationTo: 'media',
|
|
153
|
+
admin: {
|
|
154
|
+
condition: (_, siblingData) => Boolean(siblingData?.customMediaType),
|
|
155
|
+
description:
|
|
156
|
+
'Upload your custom image, video, or Lottie file. Will display at full size with object-contain.'
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'body',
|
|
163
|
+
type: 'textarea',
|
|
164
|
+
label: 'Body Text',
|
|
165
|
+
defaultValue: 'Describe this phase in detail.'
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'tags',
|
|
169
|
+
type: 'array',
|
|
170
|
+
label: 'Tags',
|
|
171
|
+
maxRows: 8,
|
|
172
|
+
admin: {
|
|
173
|
+
description: 'Chip labels shown below the body text.'
|
|
174
|
+
},
|
|
175
|
+
fields: [
|
|
176
|
+
{
|
|
177
|
+
name: 'tag',
|
|
178
|
+
type: 'text',
|
|
179
|
+
label: 'Tag',
|
|
180
|
+
required: true
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: 'Settings',
|
|
190
|
+
fields: [
|
|
191
|
+
{
|
|
192
|
+
name: 'sectionId',
|
|
193
|
+
type: 'text',
|
|
194
|
+
label: 'Section ID',
|
|
195
|
+
admin: {
|
|
196
|
+
description: 'HTML id for anchor links (e.g. "process"). No # needed.'
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'sticky',
|
|
201
|
+
type: 'checkbox',
|
|
202
|
+
label: 'Sticky (required for scroll)',
|
|
203
|
+
defaultValue: true,
|
|
204
|
+
admin: {
|
|
205
|
+
description:
|
|
206
|
+
'Keeps the section pinned to the top so GSAP can drive the horizontal scroll. Must stay enabled.'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'enableCustomCSS',
|
|
211
|
+
type: 'checkbox',
|
|
212
|
+
label: 'Enable Custom CSS',
|
|
213
|
+
defaultValue: false
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'customCSS',
|
|
217
|
+
type: 'code',
|
|
218
|
+
label: 'Custom CSS',
|
|
219
|
+
admin: {
|
|
220
|
+
language: 'css',
|
|
221
|
+
condition: (_, siblingData) => Boolean(siblingData?.enableCustomCSS),
|
|
222
|
+
description:
|
|
223
|
+
'Scoped via #sectionId or .shs-wrapper. Use :host as a shorthand for the wrapper selector.'
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-HorizontalScroll",
|
|
4
|
+
"label": "Studio Horizontal Scroll",
|
|
5
|
+
"sourceName": "StudioHorizontalScroll",
|
|
6
|
+
"portableName": "DD-HorizontalScroll",
|
|
7
|
+
"slug": "DD-HorizontalScroll",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/DesignsDustedv3",
|
|
11
|
+
"originalPath": "src/blocks/StudioHorizontalScroll",
|
|
12
|
+
"originalSlug": "studioHorizontalScroll",
|
|
13
|
+
"originalConfigExport": "StudioHorizontalScroll",
|
|
14
|
+
"originalComponentExport": "StudioHorizontalScroll",
|
|
15
|
+
"originalInterfaceName": "StudioHorizontalScrollBlock"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-HorizontalScroll/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "config.ts",
|
|
24
|
+
"to": "src/blocks/DD-HorizontalScroll/config.ts"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dependencies": [
|
|
28
|
+
{
|
|
29
|
+
"name": "@lottiefiles/dotlottie-react"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "gsap"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "lucide-react"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"sharedFiles": [],
|
|
39
|
+
"requiredProjectFiles": [],
|
|
40
|
+
"optionalProjectFiles": [],
|
|
41
|
+
"collectionRegistration": {
|
|
42
|
+
"enabled": true,
|
|
43
|
+
"collections": [
|
|
44
|
+
"Pages",
|
|
45
|
+
"Posts"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"renderBlocksRegistration": {
|
|
49
|
+
"enabled": true
|
|
50
|
+
},
|
|
51
|
+
"renderBlocksBehavior": {
|
|
52
|
+
"wrapperless": false
|
|
53
|
+
},
|
|
54
|
+
"pageRouteIntegration": {
|
|
55
|
+
"required": false,
|
|
56
|
+
"manualSteps": []
|
|
57
|
+
},
|
|
58
|
+
"manual": [
|
|
59
|
+
"Register DDHorizontalScroll in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
60
|
+
"Register DD-HorizontalScroll in RenderBlocks if automatic registration was skipped.",
|
|
61
|
+
"Run payload generate:types after schema changes.",
|
|
62
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
63
|
+
],
|
|
64
|
+
"manualSteps": [
|
|
65
|
+
"Register DDHorizontalScroll in Pages/Posts blocks arrays if automatic registration was skipped.",
|
|
66
|
+
"Register DD-HorizontalScroll in RenderBlocks if automatic registration was skipped.",
|
|
67
|
+
"Run payload generate:types after schema changes.",
|
|
68
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
69
|
+
],
|
|
70
|
+
"patchTargets": {
|
|
71
|
+
"blockConfigRegistration": {
|
|
72
|
+
"description": "Installer can add import { DDHorizontalScroll } from '@/blocks/DD-HorizontalScroll/config' and add DDHorizontalScroll to clear Pages/Posts blocks arrays."
|
|
73
|
+
},
|
|
74
|
+
"renderBlocksRegistration": {
|
|
75
|
+
"description": "Installer can register DD-HorizontalScroll in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"notes": [
|
|
79
|
+
"Converted from DesignsDustedv3 StudioHorizontalScroll.",
|
|
80
|
+
"Generated Payload type imports are replaced with portable fallback types when needed.",
|
|
81
|
+
"Installer must not overwrite existing target files."
|
|
82
|
+
],
|
|
83
|
+
"exportName": "DDHorizontalScroll",
|
|
84
|
+
"interfaceName": "DDHorizontalScroll"
|
|
85
|
+
}
|