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,239 @@
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDBookCall: Block = {
4
+ slug: 'DD-BookCall',
5
+ interfaceName: 'DDBookCall',
6
+ labels: {
7
+ singular: 'Studio Book Call',
8
+ plural: 'Studio Book Call Sections'
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'tabs',
13
+ tabs: [
14
+ {
15
+ label: 'Info',
16
+ fields: [
17
+ {
18
+ name: 'eyebrow',
19
+ type: 'text',
20
+ label: 'Eyebrow Label',
21
+ defaultValue: 'Schedule a Call'
22
+ },
23
+ {
24
+ name: 'headlineMain',
25
+ type: 'text',
26
+ label: 'Headline (Main)',
27
+ required: true,
28
+ defaultValue: 'Book a call with'
29
+ },
30
+ {
31
+ name: 'headlineAccent',
32
+ type: 'text',
33
+ label: 'Headline (Accent)',
34
+ defaultValue: 'our team'
35
+ },
36
+ {
37
+ name: 'description',
38
+ type: 'textarea',
39
+ label: 'Description',
40
+ defaultValue:
41
+ "Pick a time that works for you. We'll send a calendar invite with everything you need."
42
+ },
43
+ {
44
+ name: 'callTypes',
45
+ type: 'array',
46
+ label: 'Call Types',
47
+ minRows: 1,
48
+ maxRows: 6,
49
+ admin: {
50
+ description: 'Session types the user can pick from in the left sidebar.'
51
+ },
52
+ fields: [
53
+ {
54
+ type: 'row',
55
+ fields: [
56
+ {
57
+ name: 'value',
58
+ type: 'text',
59
+ label: 'Value (slug)',
60
+ required: true,
61
+ admin: {
62
+ width: '33%',
63
+ description: 'Internal key, e.g. discovery'
64
+ }
65
+ },
66
+ {
67
+ name: 'label',
68
+ type: 'text',
69
+ label: 'Label',
70
+ required: true,
71
+ admin: { width: '34%' }
72
+ },
73
+ {
74
+ name: 'duration',
75
+ type: 'text',
76
+ label: 'Duration',
77
+ required: true,
78
+ admin: { width: '33%', description: 'e.g. 30 min' }
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ type: 'row',
84
+ fields: [
85
+ {
86
+ name: 'iconName',
87
+ type: 'text',
88
+ label: 'Lucide Icon Name',
89
+ admin: {
90
+ width: '50%',
91
+ description: 'e.g. Search, Compass, Code2'
92
+ }
93
+ },
94
+ {
95
+ name: 'desc',
96
+ type: 'text',
97
+ label: 'Short Description',
98
+ admin: { width: '50%', description: 'e.g. Explore scope & fit' }
99
+ }
100
+ ]
101
+ }
102
+ ],
103
+ defaultValue: [
104
+ {
105
+ value: 'discovery',
106
+ label: 'Discovery Call',
107
+ duration: '30 min',
108
+ iconName: 'Search',
109
+ desc: 'Explore scope & fit'
110
+ },
111
+ {
112
+ value: 'strategy',
113
+ label: 'Strategy Session',
114
+ duration: '60 min',
115
+ iconName: 'Compass',
116
+ desc: 'Deep dive into your project'
117
+ },
118
+ {
119
+ value: 'technical',
120
+ label: 'Technical Review',
121
+ duration: '45 min',
122
+ iconName: 'Code2',
123
+ desc: 'Architecture & implementation'
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ name: 'features',
129
+ type: 'array',
130
+ label: '"What to Expect" Items',
131
+ admin: {
132
+ description: 'Bullet points in the left sidebar below call types.'
133
+ },
134
+ fields: [
135
+ {
136
+ type: 'row',
137
+ fields: [
138
+ {
139
+ name: 'iconName',
140
+ type: 'text',
141
+ label: 'Lucide Icon Name',
142
+ admin: { width: '50%', description: 'e.g. Video, CalendarCheck, FileText' }
143
+ },
144
+ {
145
+ name: 'text',
146
+ type: 'text',
147
+ label: 'Text',
148
+ required: true,
149
+ admin: { width: '50%' }
150
+ }
151
+ ]
152
+ }
153
+ ],
154
+ defaultValue: [
155
+ { iconName: 'Video', text: 'Google Meet or Zoom' },
156
+ { iconName: 'CalendarCheck', text: 'Calendar invite sent instantly' },
157
+ { iconName: 'FileText', text: 'Pre-call briefing document' },
158
+ { iconName: 'Lock', text: 'NDA available on request' }
159
+ ]
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ label: 'Form',
165
+ fields: [
166
+ {
167
+ name: 'form',
168
+ type: 'relationship',
169
+ relationTo: 'forms',
170
+ label: 'Payload Form',
171
+ required: true,
172
+ admin: {
173
+ description:
174
+ 'Select the Payload Form Builder form used to store Book Call submissions. Fields must include: name, email, company, call_type, preferred_date, preferred_time, notes.'
175
+ }
176
+ },
177
+ {
178
+ name: 'timeSlots',
179
+ type: 'array',
180
+ label: 'Available Time Slots',
181
+ admin: {
182
+ description: 'Time slots shown in the booking grid.'
183
+ },
184
+ fields: [
185
+ {
186
+ name: 'slot',
187
+ type: 'text',
188
+ label: 'Time Slot',
189
+ required: true,
190
+ admin: { description: 'e.g. 9:00 AM' }
191
+ }
192
+ ],
193
+ defaultValue: [
194
+ { slot: '9:00 AM' },
195
+ { slot: '9:30 AM' },
196
+ { slot: '10:00 AM' },
197
+ { slot: '10:30 AM' },
198
+ { slot: '11:00 AM' },
199
+ { slot: '11:30 AM' },
200
+ { slot: '1:00 PM' },
201
+ { slot: '1:30 PM' },
202
+ { slot: '2:00 PM' },
203
+ { slot: '2:30 PM' },
204
+ { slot: '3:00 PM' },
205
+ { slot: '3:30 PM' },
206
+ { slot: '4:00 PM' },
207
+ { slot: '4:30 PM' }
208
+ ]
209
+ },
210
+ {
211
+ name: 'footerNote',
212
+ type: 'text',
213
+ label: 'Form Footer Note',
214
+ defaultValue: `No charge. No commitment. We'll confirm within a few hours.`
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ label: 'Settings',
220
+ fields: [
221
+ {
222
+ name: 'sectionId',
223
+ type: 'text',
224
+ label: 'Section ID',
225
+ defaultValue: 'book-call'
226
+ },
227
+ {
228
+ name: 'customCSS',
229
+ type: 'code',
230
+ label: 'Custom CSS',
231
+ admin: { language: 'css' }
232
+ }
233
+ ]
234
+ }
235
+ ]
236
+ }
237
+ ]
238
+ }
239
+
@@ -0,0 +1,112 @@
1
+ {
2
+ "type": "block",
3
+ "name": "DD-BookCall",
4
+ "label": "Studio Book Call",
5
+ "sourceName": "StudioBookCallBlock",
6
+ "portableName": "DD-BookCall",
7
+ "slug": "DD-BookCall",
8
+ "version": "0.0.1",
9
+ "source": {
10
+ "repo": "Hadizainal/DesignsDustedv3",
11
+ "originalPath": "src/blocks/StudioBookCallBlock",
12
+ "originalSlug": "studioBookCallBlock",
13
+ "originalConfigExport": "StudioBookCallBlock",
14
+ "originalComponentExport": "StudioBookCallBlock",
15
+ "originalInterfaceName": "StudioBookCallBlock"
16
+ },
17
+ "files": [
18
+ {
19
+ "from": "Component.tsx",
20
+ "to": "src/blocks/DD-BookCall/Component.tsx"
21
+ },
22
+ {
23
+ "from": "config.ts",
24
+ "to": "src/blocks/DD-BookCall/config.ts"
25
+ }
26
+ ],
27
+ "dependencies": [
28
+ {
29
+ "name": "lucide-react"
30
+ }
31
+ ],
32
+ "sharedFiles": [
33
+ {
34
+ "from": "templates/shared/components/ui/input.tsx",
35
+ "to": "src/components/ui/input.tsx",
36
+ "required": true,
37
+ "safeToCopy": true
38
+ },
39
+ {
40
+ "from": "templates/shared/utilities/getURL.ts",
41
+ "to": "src/utilities/getURL.ts",
42
+ "required": true,
43
+ "safeToCopy": true
44
+ },
45
+ {
46
+ "from": "templates/shared/utilities/canUseDOM.ts",
47
+ "to": "src/utilities/canUseDOM.ts",
48
+ "required": true,
49
+ "safeToCopy": true
50
+ }
51
+ ],
52
+ "requiredProjectFiles": [
53
+ {
54
+ "path": "src/utilities/ui.ts",
55
+ "reason": "Shared Input component uses the cn utility. If missing, add cn or replace the Input component classes."
56
+ }
57
+ ],
58
+ "optionalProjectFiles": [
59
+ {
60
+ "path": "src/blocks/Forms",
61
+ "reason": "Config uses relationTo: forms. The target project should have Payload Form Builder or an equivalent forms."
62
+ }
63
+ ],
64
+ "collectionRegistration": {
65
+ "enabled": true,
66
+ "collections": [
67
+ "Pages",
68
+ "Posts"
69
+ ]
70
+ },
71
+ "renderBlocksRegistration": {
72
+ "enabled": true
73
+ },
74
+ "renderBlocksBehavior": {
75
+ "wrapperless": false
76
+ },
77
+ "pageRouteIntegration": {
78
+ "required": false,
79
+ "manualSteps": []
80
+ },
81
+ "manual": [
82
+ "Confirm the target project has a Payload forms collection or Payload Form Builder configured because this block relates to forms.",
83
+ "Create/select a Payload form with fields named name, email, company, call_type, preferred_date, preferred_time, and notes.",
84
+ "Register DDBookCall in Pages/Posts blocks arrays if automatic registration was skipped.",
85
+ "Register DD-BookCall in RenderBlocks if automatic registration was skipped.",
86
+ "Run payload generate:types after schema changes.",
87
+ "Run payload generate:importmap if admin/component imports changed."
88
+ ],
89
+ "manualSteps": [
90
+ "Confirm the target project has a Payload forms collection or Payload Form Builder configured because this block relates to forms.",
91
+ "Create/select a Payload form with fields named name, email, company, call_type, preferred_date, preferred_time, and notes.",
92
+ "Register DDBookCall in Pages/Posts blocks arrays if automatic registration was skipped.",
93
+ "Register DD-BookCall in RenderBlocks if automatic registration was skipped.",
94
+ "Run payload generate:types after schema changes.",
95
+ "Run payload generate:importmap if admin/component imports changed."
96
+ ],
97
+ "patchTargets": {
98
+ "blockConfigRegistration": {
99
+ "description": "Installer can add import { DDBookCall } from '@/blocks/DD-BookCall/config' and add DDBookCall to clear Pages/Posts blocks arrays."
100
+ },
101
+ "renderBlocksRegistration": {
102
+ "description": "Installer can register DD-BookCall in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
103
+ }
104
+ },
105
+ "notes": [
106
+ "Converted from DesignsDustedv3 StudioBookCallBlock.",
107
+ "The generated Payload type import was replaced with a local portable props type so the block can be copied before payload generate:types.",
108
+ "Installer must not overwrite existing shared files."
109
+ ],
110
+ "exportName": "DDBookCall",
111
+ "interfaceName": "DDBookCall"
112
+ }
@@ -0,0 +1,144 @@
1
+ "use client";
2
+ import React, { useRef, useState } from "react";
3
+ import * as LucideIcons from "lucide-react";
4
+ import { cn } from "@/utilities/ui";
5
+ export type DDCardTemplate01Props = Record<string, any>;
6
+
7
+ // ─── SpotlightCard ────────────────────────────────────────────────────────────
8
+ interface SpotlightCardProps {
9
+ children: React.ReactNode;
10
+ className?: string;
11
+ spotlightColor?: string;
12
+ enableTilt?: boolean;
13
+ style?: React.CSSProperties;
14
+ }
15
+
16
+ function SpotlightCard({
17
+ children,
18
+ className,
19
+ spotlightColor = "rgba(214,211,209,0.08)",
20
+ enableTilt = true,
21
+ style,
22
+ }: SpotlightCardProps) {
23
+ const cardRef = useRef<HTMLDivElement>(null);
24
+ const [pos, setPos] = useState<{ x: number; y: number } | null>(null);
25
+ const [tilt, setTilt] = useState({ rx: 0, ry: 0 });
26
+
27
+ const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
28
+ if (!cardRef.current) return;
29
+ const rect = cardRef.current.getBoundingClientRect();
30
+ const x = e.clientX - rect.left;
31
+ const y = e.clientY - rect.top;
32
+ setPos({ x, y });
33
+ if (enableTilt) {
34
+ const rx = (y / rect.height - 0.5) * -10;
35
+ const ry = (x / rect.width - 0.5) * 10;
36
+ setTilt({ rx, ry });
37
+ }
38
+ };
39
+
40
+ const handleMouseLeave = () => {
41
+ setPos(null);
42
+ setTilt({ rx: 0, ry: 0 });
43
+ };
44
+
45
+ return (
46
+ <div
47
+ ref={cardRef}
48
+ className={cn("relative overflow-hidden", className)}
49
+ onMouseMove={handleMouseMove}
50
+ onMouseLeave={handleMouseLeave}
51
+ style={
52
+ enableTilt
53
+ ? {
54
+ ...style,
55
+ transform: `perspective(800px) rotateX(${tilt.rx}deg) rotateY(${tilt.ry}deg)`,
56
+ transition: "transform 0.1s ease",
57
+ }
58
+ : style
59
+ }
60
+ >
61
+ {pos && (
62
+ <div
63
+ className="pointer-events-none absolute inset-0 z-0 transition-opacity duration-300"
64
+ style={{
65
+ background: `radial-gradient(400px circle at ${pos.x}px ${pos.y}px, ${spotlightColor}, transparent 60%)`,
66
+ }}
67
+ />
68
+ )}
69
+ <div className="relative z-10">{children}</div>
70
+ </div>
71
+ );
72
+ }
73
+
74
+ // ─── Dynamic Icon ─────────────────────────────────────────────────────────────
75
+ function DynamicIcon({
76
+ name,
77
+ ...props
78
+ }: { name?: string | null } & Omit<LucideIcons.LucideProps, "name">) {
79
+ if (!name) return null;
80
+ const Icon = (
81
+ LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>
82
+ )[name];
83
+ if (!Icon) return null;
84
+ return <Icon {...props} />;
85
+ }
86
+
87
+ // ─── Component ────────────────────────────────────────────────────────────────
88
+ export const DDCardTemplate01: React.FC<DDCardTemplate01Props> = ({
89
+ eyebrow,
90
+ headline,
91
+ description,
92
+ iconName = "ShieldCheck",
93
+ glowColor = "rgba(214,211,209,0.08)",
94
+ enableTilt = true,
95
+ minHeight = "220px",
96
+ className,
97
+ sectionId,
98
+ customCSS,
99
+ }) => {
100
+ return (
101
+ <div
102
+ id={sectionId ?? undefined}
103
+ className="spotlight-card overflow-clip py-8"
104
+ >
105
+ {customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
106
+ <SpotlightCard
107
+ spotlightColor={glowColor ?? undefined}
108
+ enableTilt={enableTilt ?? true}
109
+ className={cn(
110
+ "border border-stone-50 dark:border-stone-950 bg-stone-100 dark:bg-stone-900 hover:shadow-2xl transition-all hover:transition-all duration-900 hover:duration-900 flex flex-col justify-between p-6 max-w-[100rem] mx-auto",
111
+ className,
112
+ )}
113
+ style={{ minHeight: minHeight ?? "220px" }}
114
+ >
115
+ <div className="w-11 h-11 flex items-center justify-center rounded-xl border border-stone-300 text-stone-300 mb-6">
116
+ <DynamicIcon
117
+ className="text-stone-600 dark:text-stone-300"
118
+ name={iconName ?? "ShieldCheck"}
119
+ size={20}
120
+ />
121
+ </div>
122
+ <div>
123
+ {eyebrow && (
124
+ <p className="text-xs font-semibold text-stone-600 dark:text-stone-400 tracking-widest uppercase mb-2">
125
+ {eyebrow}
126
+ </p>
127
+ )}
128
+ {headline && (
129
+ <h3 className="text-2xl font-semibold text-stone-900 dark:text-stone-50 mb-3">
130
+ {headline}
131
+ </h3>
132
+ )}
133
+ {description && (
134
+ <p className="text-sm text-stone-600 dark:text-stone-400 leading-relaxed max-w-md">
135
+ {description}
136
+ </p>
137
+ )}
138
+ </div>
139
+ </SpotlightCard>
140
+ </div>
141
+ );
142
+ };
143
+
144
+ export default DDCardTemplate01;
@@ -0,0 +1,106 @@
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDCardTemplate01: Block = {
4
+ slug: 'DD-CardTemplate01',
5
+ interfaceName: 'DDCardTemplate01',
6
+ labels: {
7
+ singular: 'Studio Card (Template 01)',
8
+ plural: 'Studio Cards (Template 01)'
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'tabs',
13
+ tabs: [
14
+ {
15
+ label: 'Content',
16
+ fields: [
17
+ {
18
+ name: 'eyebrow',
19
+ type: 'text',
20
+ label: 'Eyebrow Label',
21
+ admin: {
22
+ description: 'Small uppercase label above the headline e.g. "Architecture"'
23
+ }
24
+ },
25
+ {
26
+ name: 'headline',
27
+ type: 'text',
28
+ label: 'Headline',
29
+ required: true,
30
+ defaultValue: 'Production-Ready Architecture'
31
+ },
32
+ {
33
+ name: 'description',
34
+ type: 'textarea',
35
+ label: 'Description',
36
+ defaultValue:
37
+ 'Every component is built with real-world production requirements in mind — not just demos. Proper error handling, loading states, and edge cases included.'
38
+ },
39
+ {
40
+ name: 'iconName',
41
+ type: 'text',
42
+ label: 'Lucide Icon Name',
43
+ defaultValue: 'ShieldCheck',
44
+ admin: {
45
+ description: 'Lucide icon name e.g. ShieldCheck, LayoutGrid, Zap, Users'
46
+ }
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ label: 'Style',
52
+ fields: [
53
+ {
54
+ name: 'glowColor',
55
+ type: 'text',
56
+ label: 'Spotlight Glow Color',
57
+ defaultValue: 'rgba(214,211,209,0.08)',
58
+ admin: {
59
+ description: 'CSS rgba color for the spotlight glow on hover'
60
+ }
61
+ },
62
+ {
63
+ name: 'enableTilt',
64
+ type: 'checkbox',
65
+ label: 'Enable Tilt',
66
+ defaultValue: true
67
+ },
68
+ {
69
+ name: 'minHeight',
70
+ type: 'text',
71
+ label: 'Min Height',
72
+ defaultValue: '220px',
73
+ admin: {
74
+ description: 'e.g. 220px, 300px'
75
+ }
76
+ },
77
+ {
78
+ name: 'className',
79
+ type: 'text',
80
+ label: 'Additional CSS Classes',
81
+ admin: {
82
+ description: 'Extra Tailwind classes for the card wrapper'
83
+ }
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ label: 'Settings',
89
+ fields: [
90
+ {
91
+ name: 'sectionId',
92
+ type: 'text',
93
+ label: 'Section ID'
94
+ },
95
+ {
96
+ name: 'customCSS',
97
+ type: 'code',
98
+ label: 'Custom CSS',
99
+ admin: { language: 'css' }
100
+ }
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "type": "block",
3
+ "name": "DD-CardTemplate01",
4
+ "label": "Studio Card Template01",
5
+ "sourceName": "StudioCardTemplate01",
6
+ "portableName": "DD-CardTemplate01",
7
+ "slug": "DD-CardTemplate01",
8
+ "version": "0.0.1",
9
+ "source": {
10
+ "repo": "Hadizainal/DesignsDustedv3",
11
+ "originalPath": "src/blocks/StudioCardTemplate01",
12
+ "originalSlug": "studioCardTemplate01",
13
+ "originalConfigExport": "StudioCardTemplate01",
14
+ "originalComponentExport": "StudioCardTemplate01",
15
+ "originalInterfaceName": "StudioCardTemplate01"
16
+ },
17
+ "files": [
18
+ {
19
+ "from": "Component.tsx",
20
+ "to": "src/blocks/DD-CardTemplate01/Component.tsx"
21
+ },
22
+ {
23
+ "from": "config.ts",
24
+ "to": "src/blocks/DD-CardTemplate01/config.ts"
25
+ }
26
+ ],
27
+ "dependencies": [
28
+ {
29
+ "name": "lucide-react"
30
+ }
31
+ ],
32
+ "sharedFiles": [],
33
+ "requiredProjectFiles": [
34
+ {
35
+ "path": "src/utilities/ui.ts",
36
+ "reason": "Block uses the cn utility from @/utilities/ui."
37
+ }
38
+ ],
39
+ "optionalProjectFiles": [],
40
+ "collectionRegistration": {
41
+ "enabled": true,
42
+ "collections": [
43
+ "Pages",
44
+ "Posts"
45
+ ]
46
+ },
47
+ "renderBlocksRegistration": {
48
+ "enabled": true
49
+ },
50
+ "renderBlocksBehavior": {
51
+ "wrapperless": false
52
+ },
53
+ "pageRouteIntegration": {
54
+ "required": false,
55
+ "manualSteps": []
56
+ },
57
+ "manual": [
58
+ "Register DDCardTemplate01 in Pages/Posts blocks arrays if automatic registration was skipped.",
59
+ "Register DD-CardTemplate01 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
+ "Register DDCardTemplate01 in Pages/Posts blocks arrays if automatic registration was skipped.",
65
+ "Register DD-CardTemplate01 in RenderBlocks if automatic registration was skipped.",
66
+ "Run payload generate:types after schema changes.",
67
+ "Run payload generate:importmap if admin/component imports changed."
68
+ ],
69
+ "patchTargets": {
70
+ "blockConfigRegistration": {
71
+ "description": "Installer can add import { DDCardTemplate01 } from '@/blocks/DD-CardTemplate01/config' and add DDCardTemplate01 to clear Pages/Posts blocks arrays."
72
+ },
73
+ "renderBlocksRegistration": {
74
+ "description": "Installer can register DD-CardTemplate01 in src/blocks/**/RenderBlocks.tsx when the blockComponents map is clear."
75
+ }
76
+ },
77
+ "notes": [
78
+ "Converted from DesignsDustedv3 StudioCardTemplate01.",
79
+ "Generated Payload type imports are replaced with portable fallback types when needed.",
80
+ "Installer must not overwrite existing target files."
81
+ ],
82
+ "exportName": "DDCardTemplate01",
83
+ "interfaceName": "DDCardTemplate01"
84
+ }