blocks-dusted 0.1.12 → 0.1.13
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/package.json +1 -1
- package/src/installers/patchRenderBlocks.js +1 -1
- package/src/registry/validateTemplateManifest.js +2 -1
- package/templates/blocks/BannerDD790432/Component.tsx +63 -0
- package/templates/blocks/BannerDD790432/config.ts +54 -0
- package/templates/blocks/BannerDD790432/manifest.json +80 -0
- package/templates/blocks/Button47/Component.tsx +124 -0
- package/templates/blocks/Button47/config.ts +75 -0
- package/templates/blocks/Button47/link.ts +22 -0
- package/templates/blocks/Button47/manifest.json +105 -0
- package/templates/blocks/Button47/styles.module.scss +75 -0
- package/templates/blocks/DD-Accordion/Component.tsx +55 -36
- package/templates/blocks/DD-Accordion/config.ts +71 -59
- package/templates/blocks/DD-AnimText/Component.tsx +50 -32
- package/templates/blocks/DD-AnimText/config.ts +296 -295
- package/templates/blocks/DD-AsideNav/Component.tsx +323 -319
- package/templates/blocks/DD-Banner/Component.tsx +54 -51
- package/templates/blocks/DD-BookCall/Component.tsx +535 -535
- package/templates/blocks/DD-ButtonPop/Component.tsx +118 -117
- package/templates/blocks/DD-Card/Component.tsx +4 -4
- package/templates/blocks/DD-CardTemplate01/Component.tsx +139 -140
- package/templates/blocks/DD-CardsWithVariantV3/Component.tsx +472 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/index.tsx +203 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/styles.ts +87 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/useInjectStyle.ts +39 -0
- package/templates/blocks/DD-CardsWithVariantV3/config.ts +326 -0
- package/templates/blocks/DD-CardsWithVariantV3/manifest.json +110 -0
- package/templates/blocks/DD-Carousel-A/Component.tsx +251 -249
- package/templates/blocks/DD-Carousel-B/Component.tsx +405 -403
- package/templates/blocks/DD-ComparisonTable/Component.tsx +255 -256
- package/templates/blocks/DD-Contact/Component.tsx +433 -435
- package/templates/blocks/DD-Counter/Component.tsx +11 -6
- package/templates/blocks/DD-DeliCard/Component.tsx +303 -0
- package/templates/blocks/DD-DeliCard/config.ts +186 -0
- package/templates/blocks/DD-DeliCard/manifest.json +94 -0
- package/templates/blocks/DD-FeatCat/Component.tsx +302 -302
- package/templates/blocks/DD-FeatProd/CircularGallery.tsx +1179 -0
- package/templates/blocks/DD-FeatProd/Component.tsx +484 -0
- package/templates/blocks/DD-FeatProd/config.ts +173 -0
- package/templates/blocks/DD-FeatProd/manifest.json +93 -0
- package/templates/blocks/DD-FeatServ/Component.tsx +607 -0
- package/templates/blocks/DD-FeatServ/config.ts +213 -0
- package/templates/blocks/DD-FeatServ/manifest.json +113 -0
- package/templates/blocks/DD-FeatStrip/Component.tsx +584 -585
- package/templates/blocks/DD-FluidBtn/ButtonsEyeCatching.tsx +627 -628
- package/templates/blocks/DD-FluidBtn/Component.tsx +46 -43
- package/templates/blocks/DD-GooeyInfo/Component.tsx +150 -149
- package/templates/blocks/DD-GooeyInfo/config.ts +136 -135
- package/templates/blocks/DD-Hero/Component.tsx +296 -297
- package/templates/blocks/DD-HeroPlas/Component.tsx +50 -0
- package/templates/blocks/DD-HeroPlas/ThreeScene.tsx +109 -0
- package/templates/blocks/DD-HeroPlas/config.ts +33 -0
- package/templates/blocks/DD-HeroPlas/manifest.json +88 -0
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +937 -936
- package/templates/blocks/DD-Icon/Component.tsx +46 -81
- package/templates/blocks/DD-IconButton/Component.tsx +13 -20
- package/templates/blocks/DD-IdTag/Component.tsx +22 -21
- package/templates/blocks/DD-LineAnim/Component.tsx +42 -36
- package/templates/blocks/DD-LogoMarq/Component.tsx +38 -48
- package/templates/blocks/DD-Lottie/Component.tsx +11 -3
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +544 -545
- package/templates/blocks/DD-MasonaryMedia/config.ts +389 -389
- package/templates/blocks/DD-Masonry/Component.tsx +654 -644
- package/templates/blocks/DD-Masonry/config.ts +475 -475
- package/templates/blocks/DD-MaterialSwatches/Component.tsx +85 -0
- package/templates/blocks/DD-MaterialSwatches/config.ts +232 -0
- package/templates/blocks/DD-MaterialSwatches/manifest.json +84 -0
- package/templates/blocks/DD-MaterialSwatches/material.ts +107 -0
- package/templates/blocks/DD-NineCanvas/Component.tsx +129 -0
- package/templates/blocks/DD-NineCanvas/RenderBlocks.tsx +244 -0
- package/templates/blocks/DD-NineCanvas/allowedCanvasBlocks.ts +6 -0
- package/templates/blocks/DD-NineCanvas/blockComponents.tsx +8 -0
- package/templates/blocks/DD-NineCanvas/canvas/CanvasGrid.tsx +316 -0
- package/templates/blocks/DD-NineCanvas/canvas/RadialNav.tsx +432 -0
- package/templates/blocks/DD-NineCanvas/canvas/canvas-panels.css +889 -0
- package/templates/blocks/DD-NineCanvas/canvas/icons/custom-icons.tsx +364 -0
- package/templates/blocks/DD-NineCanvas/config.ts +61 -0
- package/templates/blocks/DD-NineCanvas/manifest.json +165 -0
- package/templates/blocks/DD-NineCanvas/styles.scss +152 -0
- package/templates/blocks/DD-NineCanvas/tooltip/get-strict-context.tsx +26 -0
- package/templates/blocks/DD-NineCanvas/tooltip/primitives.tsx +178 -0
- package/templates/blocks/DD-NineCanvas/tooltip/tooltip.tsx +71 -0
- package/templates/blocks/DD-NineCanvas/tooltip/use-controlled-state.tsx +33 -0
- package/templates/blocks/DD-NineCanvas/utilities/FadeOnScroll.tsx +68 -0
- package/templates/blocks/DD-NineCanvas/utilities/ParallaxWrapper.tsx +157 -0
- package/templates/blocks/DD-NineCanvas/utilities/renderCustomCSS.ts +5 -0
- package/templates/blocks/DD-NineCanvas/utilities/webglCleanup.ts +27 -0
- package/templates/blocks/DD-PayloadAIAssistant/Component.tsx +78 -0
- package/templates/blocks/DD-PayloadAIAssistant/DustedBot.tsx +590 -0
- package/templates/blocks/DD-PayloadAIAssistant/config.ts +37 -0
- package/templates/blocks/DD-PayloadAIAssistant/demo.css +125 -0
- package/templates/blocks/DD-PayloadAIAssistant/manifest.json +93 -0
- package/templates/blocks/DD-PayloadAIAssistant/source-defaults.ts +17 -0
- package/templates/blocks/DD-PayloadAIAssistant/styles.ts +306 -0
- package/templates/blocks/DD-Pricing/Component.tsx +2 -3
- package/templates/blocks/DD-Pricing/config.ts +215 -215
- package/templates/blocks/DD-Process/Component.tsx +2 -2
- package/templates/blocks/DD-ProjHeader/Component.tsx +93 -91
- package/templates/blocks/DD-ProjSlider/Component.tsx +1 -1
- package/templates/blocks/DD-Section/Component.tsx +265 -266
- package/templates/blocks/DD-Separator/Component.tsx +66 -66
- package/templates/blocks/DD-Services/Component.tsx +176 -176
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +306 -307
- package/templates/blocks/DD-Slider-A/Component.tsx +2 -2
- package/templates/blocks/DD-StackCards/Component.tsx +172 -171
- package/templates/blocks/DD-Team/Component.tsx +247 -247
- package/templates/blocks/DD-TeamCards/Component.tsx +251 -251
- package/templates/blocks/DD-TechStack/Component.tsx +173 -174
- package/templates/blocks/DD-TestMarq/Component.tsx +158 -132
- package/templates/blocks/DD-Testim/Component.tsx +247 -247
- package/templates/blocks/DD-Testim2/Component.tsx +265 -256
- package/templates/blocks/DD-Testimonials/Component.tsx +139 -139
- package/templates/blocks/DD-Thanks/Component.tsx +1 -1
- package/templates/blocks/DD-Work/Component.tsx +318 -318
- package/templates/blocks/DD-Work-B/Component.tsx +294 -294
- package/templates/blocks/DDHG-CTASection2/Component.tsx +183 -184
- package/templates/blocks/DDHG-HighlightArc/Component.tsx +6 -3
- package/templates/blocks/DDHG-LogoMarquee/Component.tsx +45 -8
- package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +1 -3
- package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +9 -22
- package/templates/blocks/DDHG-ServiceHero/Component.tsx +10 -10
- package/templates/blocks/DDHG-TeamCards/Component.tsx +6 -35
- package/templates/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/blocks/Form/Component.tsx +163 -0
- package/templates/blocks/Form/Country/index.tsx +65 -0
- package/templates/blocks/Form/Country/options.ts +982 -0
- package/templates/blocks/Form/Email/index.tsx +38 -0
- package/templates/blocks/Form/Error/index.tsx +15 -0
- package/templates/blocks/Form/Message/index.tsx +13 -0
- package/templates/blocks/Form/Number/index.tsx +36 -0
- package/templates/blocks/Form/Select/index.tsx +63 -0
- package/templates/blocks/Form/State/index.tsx +64 -0
- package/templates/blocks/Form/State/options.ts +52 -0
- package/templates/blocks/Form/Text/index.tsx +32 -0
- package/templates/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/blocks/Form/Width/index.tsx +13 -0
- package/templates/blocks/Form/config.ts +51 -0
- package/templates/blocks/Form/fields.tsx +21 -0
- package/templates/blocks/Form/manifest.json +168 -0
- package/templates/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/blocks/MediaBlock/config.ts +14 -0
- package/templates/blocks/MediaBlock/manifest.json +92 -0
- package/templates/blocks/TransitionsDustedShowcase/Component.tsx +9 -0
- package/templates/blocks/TransitionsDustedShowcase/config.ts +13 -0
- package/templates/blocks/TransitionsDustedShowcase/manifest.json +80 -0
- package/templates/blocks/rawHtml/Component.tsx +25 -0
- package/templates/blocks/rawHtml/config.ts +56 -0
- package/templates/blocks/rawHtml/manifest.json +80 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const electricBorderStyles = String.raw`
|
|
2
|
+
.electric-border {
|
|
3
|
+
--electric-light-color: oklch(from var(--electric-border-color) l c h);
|
|
4
|
+
--eb-border-width: 2px;
|
|
5
|
+
position: relative;
|
|
6
|
+
border-radius: inherit;
|
|
7
|
+
overflow: visible;
|
|
8
|
+
isolation: isolate;
|
|
9
|
+
align-self: start;
|
|
10
|
+
height: fit-content;
|
|
11
|
+
width: 100%;
|
|
12
|
+
will-change: transform, opacity;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.eb-svg {
|
|
16
|
+
position: fixed;
|
|
17
|
+
left: -10000px;
|
|
18
|
+
top: -10000px;
|
|
19
|
+
width: 10px;
|
|
20
|
+
height: 10px;
|
|
21
|
+
opacity: 0.001;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
will-change: transform, opacity;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.eb-content {
|
|
27
|
+
position: relative;
|
|
28
|
+
border-radius: inherit;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
will-change: transform, opacity;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.electric-border .simple-card-3 {
|
|
34
|
+
margin-block: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.eb-layers {
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
border-radius: inherit;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
z-index: 0;
|
|
43
|
+
padding: var(--eb-border-width);
|
|
44
|
+
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
|
45
|
+
-webkit-mask-composite: xor;
|
|
46
|
+
mask-composite: exclude;
|
|
47
|
+
will-change: transform, opacity;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.eb-stroke,
|
|
51
|
+
.eb-glow-1,
|
|
52
|
+
.eb-glow-2,
|
|
53
|
+
.eb-overlay-1,
|
|
54
|
+
.eb-overlay-2,
|
|
55
|
+
.eb-background-glow {
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
border-radius: inherit;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
will-change: transform, opacity;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.eb-stroke {
|
|
65
|
+
border: var(--eb-border-width) solid var(--electric-border-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.eb-glow-1 {
|
|
69
|
+
border: var(--eb-border-width) solid oklch(from var(--electric-border-color) l c h/0.6);
|
|
70
|
+
opacity: 0.5;
|
|
71
|
+
filter: blur(calc(0.5px + var(--eb-border-width) * 0.25));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.eb-glow-2 {
|
|
75
|
+
border: var(--eb-border-width) solid var(--electric-light-color);
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
filter: blur(calc(2px + var(--eb-border-width) * 0.5));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.eb-background-glow {
|
|
81
|
+
z-index: -1;
|
|
82
|
+
transform: scale(1.08);
|
|
83
|
+
filter: blur(32px);
|
|
84
|
+
opacity: 0.3;
|
|
85
|
+
background: linear-gradient(-30deg, var(--electric-light-color), transparent, var(--electric-border-color));
|
|
86
|
+
}
|
|
87
|
+
`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react'
|
|
4
|
+
|
|
5
|
+
const styleReferenceCounts = new Map<string, number>()
|
|
6
|
+
|
|
7
|
+
export const useInjectStyle = (css: string, id: string) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (!css || !id || typeof document === 'undefined') return
|
|
10
|
+
|
|
11
|
+
const existingCount = styleReferenceCounts.get(id) ?? 0
|
|
12
|
+
styleReferenceCounts.set(id, existingCount + 1)
|
|
13
|
+
|
|
14
|
+
let styleElement = document.getElementById(id) as HTMLStyleElement | null
|
|
15
|
+
|
|
16
|
+
if (!styleElement) {
|
|
17
|
+
styleElement = document.createElement('style')
|
|
18
|
+
styleElement.id = id
|
|
19
|
+
styleElement.setAttribute('data-injected-style', id)
|
|
20
|
+
document.head.appendChild(styleElement)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (styleElement.textContent !== css) {
|
|
24
|
+
styleElement.textContent = css
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return () => {
|
|
28
|
+
const nextCount = (styleReferenceCounts.get(id) ?? 1) - 1
|
|
29
|
+
|
|
30
|
+
if (nextCount <= 0) {
|
|
31
|
+
styleReferenceCounts.delete(id)
|
|
32
|
+
document.getElementById(id)?.remove()
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
styleReferenceCounts.set(id, nextCount)
|
|
37
|
+
}
|
|
38
|
+
}, [css, id])
|
|
39
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import type { Block } from 'payload'
|
|
2
|
+
import { defaultLexical } from '@/fields/defaultLexical'
|
|
3
|
+
|
|
4
|
+
export const DDCardsWithVariantV3: Block = {
|
|
5
|
+
slug: 'cardsWithVariantV3',
|
|
6
|
+
dbName: 'cwv3',
|
|
7
|
+
interfaceName: 'CardsWithVariantV3Block',
|
|
8
|
+
labels: {
|
|
9
|
+
singular: 'Card Variants Grid',
|
|
10
|
+
plural: 'Card Variants Grids'
|
|
11
|
+
},
|
|
12
|
+
fields: [
|
|
13
|
+
// Container & Grid Settings
|
|
14
|
+
{
|
|
15
|
+
admin: {
|
|
16
|
+
initCollapsed: true,
|
|
17
|
+
className: 'custom-group-field'
|
|
18
|
+
},
|
|
19
|
+
type: 'collapsible',
|
|
20
|
+
label: 'Layout Settings',
|
|
21
|
+
fields: [
|
|
22
|
+
{
|
|
23
|
+
name: 'containerClass',
|
|
24
|
+
type: 'text',
|
|
25
|
+
label: 'Container Classes',
|
|
26
|
+
admin: {
|
|
27
|
+
description: 'Additional Tailwind classes for the main container',
|
|
28
|
+
placeholder: 'px-4 py-8 bg-gray-50'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'gridClass',
|
|
33
|
+
type: 'text',
|
|
34
|
+
label: 'Grid Layout Classes',
|
|
35
|
+
defaultValue: 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4',
|
|
36
|
+
admin: {
|
|
37
|
+
description: 'Grid layout classes for card arrangement',
|
|
38
|
+
placeholder: 'grid grid-cols-1 md:grid-cols-2 gap-6'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// Cards Array
|
|
45
|
+
{
|
|
46
|
+
name: 'cards',
|
|
47
|
+
label: 'Cards Collection',
|
|
48
|
+
type: 'array',
|
|
49
|
+
minRows: 1,
|
|
50
|
+
maxRows: 12, // Reasonable limit
|
|
51
|
+
labels: {
|
|
52
|
+
singular: 'Card',
|
|
53
|
+
plural: 'Cards'
|
|
54
|
+
},
|
|
55
|
+
fields: [
|
|
56
|
+
// Card Variant Selection
|
|
57
|
+
{
|
|
58
|
+
name: 'variant',
|
|
59
|
+
type: 'select',
|
|
60
|
+
required: true,
|
|
61
|
+
options: [
|
|
62
|
+
{ label: 'Simple Card (Transparent)', value: 'SimpleCard_V1' },
|
|
63
|
+
{ label: 'Card with Avatar Support', value: 'SimpleCard_V2' },
|
|
64
|
+
{ label: 'Dashed Border with Icons', value: 'SimpleCard_V3' },
|
|
65
|
+
{ label: 'Drop Shadow Card', value: 'SimpleCard_V4' },
|
|
66
|
+
{ label: 'Glassmorphism Card', value: 'SimpleCard_V5' },
|
|
67
|
+
{ label: 'Accent Border Card', value: 'SimpleCard_V6' },
|
|
68
|
+
{ label: '3D Grid Card', value: 'SimpleCard_V7' }
|
|
69
|
+
],
|
|
70
|
+
defaultValue: 'SimpleCard_V1',
|
|
71
|
+
admin: {
|
|
72
|
+
description: 'Choose the visual style for this card'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// Rich Text Content
|
|
77
|
+
{
|
|
78
|
+
name: 'content',
|
|
79
|
+
label: 'Card Content',
|
|
80
|
+
type: 'richText',
|
|
81
|
+
required: true,
|
|
82
|
+
editor: defaultLexical
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
// Avatar Field (for V2 variant)
|
|
86
|
+
{
|
|
87
|
+
name: 'avatar',
|
|
88
|
+
type: 'upload',
|
|
89
|
+
relationTo: 'media',
|
|
90
|
+
label: 'Avatar Image',
|
|
91
|
+
admin: {
|
|
92
|
+
description: 'Optional avatar image (used in Card V2 variant)',
|
|
93
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V2'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'avatarPriority',
|
|
98
|
+
type: 'checkbox',
|
|
99
|
+
label: 'Avatar Priority Loading',
|
|
100
|
+
defaultValue: false,
|
|
101
|
+
admin: {
|
|
102
|
+
description: 'Enable priority loading for avatar image',
|
|
103
|
+
condition: (data, siblingData) =>
|
|
104
|
+
siblingData?.variant === 'SimpleCard_V2' && siblingData?.avatar
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'avatarImgClass',
|
|
109
|
+
type: 'text',
|
|
110
|
+
label: 'Avatar Image Classes',
|
|
111
|
+
defaultValue: 'object-contain',
|
|
112
|
+
admin: {
|
|
113
|
+
description: 'Tailwind classes for avatar image (e.g., object-cover, object-contain)',
|
|
114
|
+
placeholder: 'object-cover rounded-full',
|
|
115
|
+
condition: (data, siblingData) =>
|
|
116
|
+
siblingData?.variant === 'SimpleCard_V2' && siblingData?.avatar
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// Electric Border Settings
|
|
121
|
+
{
|
|
122
|
+
admin: {
|
|
123
|
+
initCollapsed: true,
|
|
124
|
+
className: 'electric-border-field'
|
|
125
|
+
},
|
|
126
|
+
type: 'collapsible',
|
|
127
|
+
label: 'Electric Border Effect (Optional)',
|
|
128
|
+
fields: [
|
|
129
|
+
{
|
|
130
|
+
name: 'electrifyBorder',
|
|
131
|
+
type: 'checkbox',
|
|
132
|
+
label: 'Enable Electric Border',
|
|
133
|
+
defaultValue: false,
|
|
134
|
+
admin: {
|
|
135
|
+
description: 'Add an animated electric border effect to this card'
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'row',
|
|
140
|
+
fields: [
|
|
141
|
+
{
|
|
142
|
+
name: 'electricColor',
|
|
143
|
+
type: 'text',
|
|
144
|
+
label: 'Electric Color',
|
|
145
|
+
defaultValue: '#7df9ff',
|
|
146
|
+
admin: {
|
|
147
|
+
width: '50%',
|
|
148
|
+
description: 'Color of the electric border effect (hex, rgb, or named color)',
|
|
149
|
+
condition: (data, siblingData) => Boolean(siblingData?.electrifyBorder)
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'electricSpeed',
|
|
154
|
+
type: 'number',
|
|
155
|
+
label: 'Animation Speed',
|
|
156
|
+
defaultValue: 1,
|
|
157
|
+
min: 0.1,
|
|
158
|
+
max: 5,
|
|
159
|
+
admin: {
|
|
160
|
+
width: '50%',
|
|
161
|
+
description: 'Speed of the electric animation (0.1 - 5.0)',
|
|
162
|
+
step: 0.1,
|
|
163
|
+
condition: (data, siblingData) => Boolean(siblingData?.electrifyBorder)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'row',
|
|
170
|
+
fields: [
|
|
171
|
+
{
|
|
172
|
+
name: 'electricChaos',
|
|
173
|
+
type: 'number',
|
|
174
|
+
label: 'Electric Chaos',
|
|
175
|
+
defaultValue: 0.5,
|
|
176
|
+
min: 0,
|
|
177
|
+
max: 2,
|
|
178
|
+
admin: {
|
|
179
|
+
width: '50%',
|
|
180
|
+
description: 'Intensity of the electric distortion (0 - 2.0)',
|
|
181
|
+
step: 0.1,
|
|
182
|
+
condition: (data, siblingData) => Boolean(siblingData?.electrifyBorder)
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'electricThickness',
|
|
187
|
+
type: 'number',
|
|
188
|
+
label: 'Border Thickness',
|
|
189
|
+
defaultValue: 2,
|
|
190
|
+
min: 1,
|
|
191
|
+
max: 10,
|
|
192
|
+
admin: {
|
|
193
|
+
width: '50%',
|
|
194
|
+
description: 'Thickness of the electric border in pixels (1 - 10)',
|
|
195
|
+
condition: (data, siblingData) => Boolean(siblingData?.electrifyBorder)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
// Custom Styling
|
|
204
|
+
{
|
|
205
|
+
admin: {
|
|
206
|
+
initCollapsed: true,
|
|
207
|
+
className: 'custom-styling-field'
|
|
208
|
+
},
|
|
209
|
+
type: 'collapsible',
|
|
210
|
+
label: 'Custom Styling (Optional)',
|
|
211
|
+
fields: [
|
|
212
|
+
{
|
|
213
|
+
name: 'servCardContClass',
|
|
214
|
+
type: 'text',
|
|
215
|
+
label: 'Content Classes',
|
|
216
|
+
admin: {
|
|
217
|
+
description: 'Additional Tailwind classes for the card content area',
|
|
218
|
+
placeholder: 'text-center text-white p-8'
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'simpleCard1Class',
|
|
223
|
+
type: 'text',
|
|
224
|
+
label: 'Simple Card V1 Custom Classes',
|
|
225
|
+
admin: {
|
|
226
|
+
description: 'Override default classes for SimpleCard_V1 parent container',
|
|
227
|
+
placeholder: 'bg-blue-500 border-2',
|
|
228
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V1'
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'simpleCard2Class',
|
|
233
|
+
type: 'text',
|
|
234
|
+
label: 'Simple Card V2 Custom Classes',
|
|
235
|
+
admin: {
|
|
236
|
+
description: 'Override default classes for SimpleCard_V2 parent container',
|
|
237
|
+
placeholder: 'bg-gradient-to-r from-blue-500 to-purple-600',
|
|
238
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V2'
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'simpleCard3Class',
|
|
243
|
+
type: 'text',
|
|
244
|
+
label: 'Simple Card V3 Custom Classes',
|
|
245
|
+
admin: {
|
|
246
|
+
description: 'Override default classes for SimpleCard_V3 (dashed border card)',
|
|
247
|
+
placeholder: 'border-lime-500 bg-gray-900',
|
|
248
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V3'
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: 'simpleCard4Class',
|
|
253
|
+
type: 'text',
|
|
254
|
+
label: 'Simple Card V4 Custom Classes',
|
|
255
|
+
admin: {
|
|
256
|
+
description: 'Override default classes for SimpleCard_V4 (drop shadow card)',
|
|
257
|
+
placeholder: 'shadow-blue-500 bg-white',
|
|
258
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V4'
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'simpleCard5Class',
|
|
263
|
+
type: 'text',
|
|
264
|
+
label: 'Simple Card V5 Custom Classes',
|
|
265
|
+
admin: {
|
|
266
|
+
description: 'Override default classes for SimpleCard_V5 (glassmorphism card)',
|
|
267
|
+
placeholder: 'bg-blue-500/30 backdrop-blur-xl',
|
|
268
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V5'
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'simpleCard6Class',
|
|
273
|
+
type: 'text',
|
|
274
|
+
label: 'Simple Card V6 Custom Classes',
|
|
275
|
+
admin: {
|
|
276
|
+
description: 'Override default classes for SimpleCard_V6 (accent border card)',
|
|
277
|
+
placeholder: 'border-purple-500 bg-gradient-to-br',
|
|
278
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V6'
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: 'simpleCard7Class',
|
|
283
|
+
type: 'text',
|
|
284
|
+
label: 'Simple Card V7 Custom Classes',
|
|
285
|
+
admin: {
|
|
286
|
+
description: 'Override default classes for SimpleCard_V7 (3D grid card)',
|
|
287
|
+
placeholder: 'shadow-2xl border-4',
|
|
288
|
+
condition: (data, siblingData) => siblingData?.variant === 'SimpleCard_V7'
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
// Custom CSS
|
|
292
|
+
{
|
|
293
|
+
name: 'enableCustomCSS',
|
|
294
|
+
type: 'checkbox',
|
|
295
|
+
label: 'Enable Custom CSS',
|
|
296
|
+
defaultValue: false,
|
|
297
|
+
admin: {
|
|
298
|
+
description: 'Enable custom CSS to style card variants and their nested elements'
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: 'customCSS',
|
|
303
|
+
type: 'code',
|
|
304
|
+
label: 'Custom CSS',
|
|
305
|
+
admin: {
|
|
306
|
+
language: 'css',
|
|
307
|
+
description:
|
|
308
|
+
'Write custom CSS to target card variants (e.g., .simple-card-1, .simple-card-2-div1). Tip: use ":host" to scope styles to this CardWithVariants instance (e.g., ":host .simple-card-2 { ... }"). Also, the selected variant custom class generates a helper wrapper class with "_card" suffix (e.g., "flt-serv-cards" -> ".flt-serv-cards_card").',
|
|
309
|
+
condition: (data, siblingData) => Boolean(siblingData?.enableCustomCSS)
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
// Keeps the existing read-only backend configuration preview available.
|
|
321
|
+
export const sourcePreview = {
|
|
322
|
+
file: 'source-config.ts.txt',
|
|
323
|
+
exportName: 'CardWithVariants',
|
|
324
|
+
slug: 'cards-with-variant-v3',
|
|
325
|
+
label: 'Cards with Variant — Version 3',
|
|
326
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-CardsWithVariantV3",
|
|
4
|
+
"label": "Cards With Variant V3",
|
|
5
|
+
"sourceName": "DD-CardsWithVariantV3",
|
|
6
|
+
"portableName": "DD-CardsWithVariantV3",
|
|
7
|
+
"slug": "cardsWithVariantV3",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/Dusted-Payload-Blocks",
|
|
11
|
+
"originalPath": "CLI-TestGround/dusted-blocks-demo/src/blocks/DD-CardsWithVariantV3",
|
|
12
|
+
"originalSlug": "cardsWithVariantV3",
|
|
13
|
+
"originalConfigExport": "DDCardsWithVariantV3",
|
|
14
|
+
"originalComponentExport": "CardWithVariants",
|
|
15
|
+
"originalInterfaceName": "CardsWithVariantV3Block"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-CardsWithVariantV3/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "ElectricBorder/index.tsx",
|
|
24
|
+
"to": "src/blocks/DD-CardsWithVariantV3/ElectricBorder/index.tsx"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"from": "ElectricBorder/styles.ts",
|
|
28
|
+
"to": "src/blocks/DD-CardsWithVariantV3/ElectricBorder/styles.ts"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"from": "ElectricBorder/useInjectStyle.ts",
|
|
32
|
+
"to": "src/blocks/DD-CardsWithVariantV3/ElectricBorder/useInjectStyle.ts"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"from": "config.ts",
|
|
36
|
+
"to": "src/blocks/DD-CardsWithVariantV3/config.ts"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"dependencies": [
|
|
40
|
+
"framer-motion"
|
|
41
|
+
],
|
|
42
|
+
"sharedFiles": [],
|
|
43
|
+
"requiredProjectFiles": [
|
|
44
|
+
{
|
|
45
|
+
"path": "src/fields/defaultLexical.ts",
|
|
46
|
+
"reason": "Payload config uses the project Lexical editor configuration."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "src/components/ui/anims/fade.tsx",
|
|
50
|
+
"reason": "Component renders TextFade."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "src/components/RichText/index.tsx",
|
|
54
|
+
"reason": "Component renders Payload rich text."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "src/components/Media/index.tsx",
|
|
58
|
+
"reason": "Component renders Payload media."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "src/utilities/ui.ts",
|
|
62
|
+
"reason": "Component imports cn from @/utilities/ui."
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"optionalProjectFiles": [],
|
|
66
|
+
"collectionRegistration": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"collections": [
|
|
69
|
+
"Pages",
|
|
70
|
+
"Posts"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"renderBlocksRegistration": {
|
|
74
|
+
"enabled": true
|
|
75
|
+
},
|
|
76
|
+
"renderBlocksBehavior": {
|
|
77
|
+
"wrapperless": false
|
|
78
|
+
},
|
|
79
|
+
"pageRouteIntegration": {
|
|
80
|
+
"required": false,
|
|
81
|
+
"manualSteps": []
|
|
82
|
+
},
|
|
83
|
+
"manual": [
|
|
84
|
+
"Register DDCardsWithVariantV3 in Pages/Posts block arrays if automatic registration was skipped.",
|
|
85
|
+
"Register cardsWithVariantV3 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
|
+
"Register DDCardsWithVariantV3 in Pages/Posts block arrays if automatic registration was skipped.",
|
|
91
|
+
"Register cardsWithVariantV3 in RenderBlocks if automatic registration was skipped.",
|
|
92
|
+
"Run payload generate:types after schema changes.",
|
|
93
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
94
|
+
],
|
|
95
|
+
"patchTargets": {
|
|
96
|
+
"blockConfigRegistration": {
|
|
97
|
+
"description": "Installer can register DDCardsWithVariantV3 from @/blocks/DD-CardsWithVariantV3/config."
|
|
98
|
+
},
|
|
99
|
+
"renderBlocksRegistration": {
|
|
100
|
+
"description": "Installer can register cardsWithVariantV3 with component export CardWithVariants."
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"notes": [
|
|
104
|
+
"Promoted from the verified Dusted Blocks demo implementation.",
|
|
105
|
+
"Installer preserves existing destination files and reports project requirements before writing."
|
|
106
|
+
],
|
|
107
|
+
"exportName": "DDCardsWithVariantV3",
|
|
108
|
+
"componentExportName": "CardWithVariants",
|
|
109
|
+
"interfaceName": "CardsWithVariantV3Block"
|
|
110
|
+
}
|