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.
Files changed (148) hide show
  1. package/package.json +1 -1
  2. package/src/installers/patchRenderBlocks.js +1 -1
  3. package/src/registry/validateTemplateManifest.js +2 -1
  4. package/templates/blocks/BannerDD790432/Component.tsx +63 -0
  5. package/templates/blocks/BannerDD790432/config.ts +54 -0
  6. package/templates/blocks/BannerDD790432/manifest.json +80 -0
  7. package/templates/blocks/Button47/Component.tsx +124 -0
  8. package/templates/blocks/Button47/config.ts +75 -0
  9. package/templates/blocks/Button47/link.ts +22 -0
  10. package/templates/blocks/Button47/manifest.json +105 -0
  11. package/templates/blocks/Button47/styles.module.scss +75 -0
  12. package/templates/blocks/DD-Accordion/Component.tsx +55 -36
  13. package/templates/blocks/DD-Accordion/config.ts +71 -59
  14. package/templates/blocks/DD-AnimText/Component.tsx +50 -32
  15. package/templates/blocks/DD-AnimText/config.ts +296 -295
  16. package/templates/blocks/DD-AsideNav/Component.tsx +323 -319
  17. package/templates/blocks/DD-Banner/Component.tsx +54 -51
  18. package/templates/blocks/DD-BookCall/Component.tsx +535 -535
  19. package/templates/blocks/DD-ButtonPop/Component.tsx +118 -117
  20. package/templates/blocks/DD-Card/Component.tsx +4 -4
  21. package/templates/blocks/DD-CardTemplate01/Component.tsx +139 -140
  22. package/templates/blocks/DD-CardsWithVariantV3/Component.tsx +472 -0
  23. package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/index.tsx +203 -0
  24. package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/styles.ts +87 -0
  25. package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/useInjectStyle.ts +39 -0
  26. package/templates/blocks/DD-CardsWithVariantV3/config.ts +326 -0
  27. package/templates/blocks/DD-CardsWithVariantV3/manifest.json +110 -0
  28. package/templates/blocks/DD-Carousel-A/Component.tsx +251 -249
  29. package/templates/blocks/DD-Carousel-B/Component.tsx +405 -403
  30. package/templates/blocks/DD-ComparisonTable/Component.tsx +255 -256
  31. package/templates/blocks/DD-Contact/Component.tsx +433 -435
  32. package/templates/blocks/DD-Counter/Component.tsx +11 -6
  33. package/templates/blocks/DD-DeliCard/Component.tsx +303 -0
  34. package/templates/blocks/DD-DeliCard/config.ts +186 -0
  35. package/templates/blocks/DD-DeliCard/manifest.json +94 -0
  36. package/templates/blocks/DD-FeatCat/Component.tsx +302 -302
  37. package/templates/blocks/DD-FeatProd/CircularGallery.tsx +1179 -0
  38. package/templates/blocks/DD-FeatProd/Component.tsx +484 -0
  39. package/templates/blocks/DD-FeatProd/config.ts +173 -0
  40. package/templates/blocks/DD-FeatProd/manifest.json +93 -0
  41. package/templates/blocks/DD-FeatServ/Component.tsx +607 -0
  42. package/templates/blocks/DD-FeatServ/config.ts +213 -0
  43. package/templates/blocks/DD-FeatServ/manifest.json +113 -0
  44. package/templates/blocks/DD-FeatStrip/Component.tsx +584 -585
  45. package/templates/blocks/DD-FluidBtn/ButtonsEyeCatching.tsx +627 -628
  46. package/templates/blocks/DD-FluidBtn/Component.tsx +46 -43
  47. package/templates/blocks/DD-GooeyInfo/Component.tsx +150 -149
  48. package/templates/blocks/DD-GooeyInfo/config.ts +136 -135
  49. package/templates/blocks/DD-Hero/Component.tsx +296 -297
  50. package/templates/blocks/DD-HeroPlas/Component.tsx +50 -0
  51. package/templates/blocks/DD-HeroPlas/ThreeScene.tsx +109 -0
  52. package/templates/blocks/DD-HeroPlas/config.ts +33 -0
  53. package/templates/blocks/DD-HeroPlas/manifest.json +88 -0
  54. package/templates/blocks/DD-HorizontalScroll/Component.tsx +937 -936
  55. package/templates/blocks/DD-Icon/Component.tsx +46 -81
  56. package/templates/blocks/DD-IconButton/Component.tsx +13 -20
  57. package/templates/blocks/DD-IdTag/Component.tsx +22 -21
  58. package/templates/blocks/DD-LineAnim/Component.tsx +42 -36
  59. package/templates/blocks/DD-LogoMarq/Component.tsx +38 -48
  60. package/templates/blocks/DD-Lottie/Component.tsx +11 -3
  61. package/templates/blocks/DD-MasonaryMedia/Component.tsx +544 -545
  62. package/templates/blocks/DD-MasonaryMedia/config.ts +389 -389
  63. package/templates/blocks/DD-Masonry/Component.tsx +654 -644
  64. package/templates/blocks/DD-Masonry/config.ts +475 -475
  65. package/templates/blocks/DD-MaterialSwatches/Component.tsx +85 -0
  66. package/templates/blocks/DD-MaterialSwatches/config.ts +232 -0
  67. package/templates/blocks/DD-MaterialSwatches/manifest.json +84 -0
  68. package/templates/blocks/DD-MaterialSwatches/material.ts +107 -0
  69. package/templates/blocks/DD-NineCanvas/Component.tsx +129 -0
  70. package/templates/blocks/DD-NineCanvas/RenderBlocks.tsx +244 -0
  71. package/templates/blocks/DD-NineCanvas/allowedCanvasBlocks.ts +6 -0
  72. package/templates/blocks/DD-NineCanvas/blockComponents.tsx +8 -0
  73. package/templates/blocks/DD-NineCanvas/canvas/CanvasGrid.tsx +316 -0
  74. package/templates/blocks/DD-NineCanvas/canvas/RadialNav.tsx +432 -0
  75. package/templates/blocks/DD-NineCanvas/canvas/canvas-panels.css +889 -0
  76. package/templates/blocks/DD-NineCanvas/canvas/icons/custom-icons.tsx +364 -0
  77. package/templates/blocks/DD-NineCanvas/config.ts +61 -0
  78. package/templates/blocks/DD-NineCanvas/manifest.json +165 -0
  79. package/templates/blocks/DD-NineCanvas/styles.scss +152 -0
  80. package/templates/blocks/DD-NineCanvas/tooltip/get-strict-context.tsx +26 -0
  81. package/templates/blocks/DD-NineCanvas/tooltip/primitives.tsx +178 -0
  82. package/templates/blocks/DD-NineCanvas/tooltip/tooltip.tsx +71 -0
  83. package/templates/blocks/DD-NineCanvas/tooltip/use-controlled-state.tsx +33 -0
  84. package/templates/blocks/DD-NineCanvas/utilities/FadeOnScroll.tsx +68 -0
  85. package/templates/blocks/DD-NineCanvas/utilities/ParallaxWrapper.tsx +157 -0
  86. package/templates/blocks/DD-NineCanvas/utilities/renderCustomCSS.ts +5 -0
  87. package/templates/blocks/DD-NineCanvas/utilities/webglCleanup.ts +27 -0
  88. package/templates/blocks/DD-PayloadAIAssistant/Component.tsx +78 -0
  89. package/templates/blocks/DD-PayloadAIAssistant/DustedBot.tsx +590 -0
  90. package/templates/blocks/DD-PayloadAIAssistant/config.ts +37 -0
  91. package/templates/blocks/DD-PayloadAIAssistant/demo.css +125 -0
  92. package/templates/blocks/DD-PayloadAIAssistant/manifest.json +93 -0
  93. package/templates/blocks/DD-PayloadAIAssistant/source-defaults.ts +17 -0
  94. package/templates/blocks/DD-PayloadAIAssistant/styles.ts +306 -0
  95. package/templates/blocks/DD-Pricing/Component.tsx +2 -3
  96. package/templates/blocks/DD-Pricing/config.ts +215 -215
  97. package/templates/blocks/DD-Process/Component.tsx +2 -2
  98. package/templates/blocks/DD-ProjHeader/Component.tsx +93 -91
  99. package/templates/blocks/DD-ProjSlider/Component.tsx +1 -1
  100. package/templates/blocks/DD-Section/Component.tsx +265 -266
  101. package/templates/blocks/DD-Separator/Component.tsx +66 -66
  102. package/templates/blocks/DD-Services/Component.tsx +176 -176
  103. package/templates/blocks/DD-ShowcaseGrid/Component.tsx +306 -307
  104. package/templates/blocks/DD-Slider-A/Component.tsx +2 -2
  105. package/templates/blocks/DD-StackCards/Component.tsx +172 -171
  106. package/templates/blocks/DD-Team/Component.tsx +247 -247
  107. package/templates/blocks/DD-TeamCards/Component.tsx +251 -251
  108. package/templates/blocks/DD-TechStack/Component.tsx +173 -174
  109. package/templates/blocks/DD-TestMarq/Component.tsx +158 -132
  110. package/templates/blocks/DD-Testim/Component.tsx +247 -247
  111. package/templates/blocks/DD-Testim2/Component.tsx +265 -256
  112. package/templates/blocks/DD-Testimonials/Component.tsx +139 -139
  113. package/templates/blocks/DD-Thanks/Component.tsx +1 -1
  114. package/templates/blocks/DD-Work/Component.tsx +318 -318
  115. package/templates/blocks/DD-Work-B/Component.tsx +294 -294
  116. package/templates/blocks/DDHG-CTASection2/Component.tsx +183 -184
  117. package/templates/blocks/DDHG-HighlightArc/Component.tsx +6 -3
  118. package/templates/blocks/DDHG-LogoMarquee/Component.tsx +45 -8
  119. package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +1 -3
  120. package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +9 -22
  121. package/templates/blocks/DDHG-ServiceHero/Component.tsx +10 -10
  122. package/templates/blocks/DDHG-TeamCards/Component.tsx +6 -35
  123. package/templates/blocks/Form/Checkbox/index.tsx +45 -0
  124. package/templates/blocks/Form/Component.tsx +163 -0
  125. package/templates/blocks/Form/Country/index.tsx +65 -0
  126. package/templates/blocks/Form/Country/options.ts +982 -0
  127. package/templates/blocks/Form/Email/index.tsx +38 -0
  128. package/templates/blocks/Form/Error/index.tsx +15 -0
  129. package/templates/blocks/Form/Message/index.tsx +13 -0
  130. package/templates/blocks/Form/Number/index.tsx +36 -0
  131. package/templates/blocks/Form/Select/index.tsx +63 -0
  132. package/templates/blocks/Form/State/index.tsx +64 -0
  133. package/templates/blocks/Form/State/options.ts +52 -0
  134. package/templates/blocks/Form/Text/index.tsx +32 -0
  135. package/templates/blocks/Form/Textarea/index.tsx +40 -0
  136. package/templates/blocks/Form/Width/index.tsx +13 -0
  137. package/templates/blocks/Form/config.ts +51 -0
  138. package/templates/blocks/Form/fields.tsx +21 -0
  139. package/templates/blocks/Form/manifest.json +168 -0
  140. package/templates/blocks/MediaBlock/Component.tsx +67 -0
  141. package/templates/blocks/MediaBlock/config.ts +14 -0
  142. package/templates/blocks/MediaBlock/manifest.json +92 -0
  143. package/templates/blocks/TransitionsDustedShowcase/Component.tsx +9 -0
  144. package/templates/blocks/TransitionsDustedShowcase/config.ts +13 -0
  145. package/templates/blocks/TransitionsDustedShowcase/manifest.json +80 -0
  146. package/templates/blocks/rawHtml/Component.tsx +25 -0
  147. package/templates/blocks/rawHtml/config.ts +56 -0
  148. package/templates/blocks/rawHtml/manifest.json +80 -0
@@ -0,0 +1,50 @@
1
+ 'use client'
2
+
3
+ import dynamic from 'next/dynamic'
4
+ import { Suspense } from 'react'
5
+
6
+ import { cn } from '@/utilities/ui'
7
+
8
+ const ThreeScene = dynamic(() => import('./ThreeScene'), {
9
+ ssr: false,
10
+ })
11
+
12
+ function LoadingDots() {
13
+ return (
14
+ <div className="absolute inset-0 flex items-center justify-center gap-2">
15
+ {[0, 1, 2].map((i) => (
16
+ <span
17
+ key={i}
18
+ className="w-2 h-2 rounded-full bg-indigo-500 dark:bg-indigo-300 animate-bounce"
19
+ style={{ animationDelay: `${i * 0.15}s` }}
20
+ />
21
+ ))}
22
+ </div>
23
+ )
24
+ }
25
+
26
+ export type DDHeroPlasProps = {
27
+ blockType?: 'DD-HeroPlas'
28
+ blockName?: string | null
29
+ containerClass?: string
30
+ }
31
+
32
+ export function DDHeroPlas(props: DDHeroPlasProps) {
33
+ const { containerClass } = props
34
+
35
+ return (
36
+ <div
37
+ suppressHydrationWarning
38
+ className={cn(
39
+ 'relative h-[520px] w-full overflow-hidden bg-stone-100 text-stone-900 dark:bg-stone-950 dark:text-stone-100',
40
+ containerClass,
41
+ )}
42
+ >
43
+ <Suspense fallback={<LoadingDots />}>
44
+ <ThreeScene />
45
+ </Suspense>
46
+ </div>
47
+ )
48
+ }
49
+
50
+ export default DDHeroPlas
@@ -0,0 +1,109 @@
1
+ 'use client'
2
+
3
+ import { useState, useRef, type RefObject } from 'react'
4
+ import { Canvas, useFrame } from '@react-three/fiber'
5
+ import { BakeShadows, SoftShadows, useCursor } from '@react-three/drei'
6
+
7
+ export default function ThreeScene({
8
+ eventSource,
9
+ }: {
10
+ eventSource?: HTMLElement | RefObject<HTMLElement> | null
11
+ }) {
12
+ return (
13
+ <div className="relative h-full w-full">
14
+ <Canvas
15
+ shadows
16
+ dpr={1.5}
17
+ camera={{ position: [-10, 10, 2], fov: 45 }}
18
+ // Allow the scene to stay interactive even when the canvas is visually "behind" other content.
19
+ // Pointer events are captured from `eventSource` (hero container), but the canvas itself
20
+ // does not block clicks on buttons/links.
21
+ eventSource={eventSource ?? undefined}
22
+ eventPrefix="client"
23
+ style={{ position: 'absolute', inset: 0, pointerEvents: eventSource ? 'none' : 'auto' }}
24
+ >
25
+ {/* Softer PCSS-style shadows (client-side) */}
26
+ <SoftShadows size={25} samples={12} focus={0.4} />
27
+ <Stage />
28
+ {Array.from({ length: 12 }, (_, i) => (
29
+ <Stair
30
+ key={i}
31
+ name={'stair-' + (i + 1)}
32
+ rotation={[-Math.PI / 2, 0, i / Math.PI / 2]}
33
+ position={[2 - Math.sin(i / 5) * 5, i * 0.5, 2 - Math.cos(i / 5) * 5]}
34
+ defaultColor={[5, 8, 9].includes(i) ? '#4f46e5' : i === 6 ? '#818cf8' : null}
35
+ />
36
+ ))}
37
+ </Canvas>
38
+ </div>
39
+ )
40
+ }
41
+
42
+ function Stair({
43
+ defaultColor = null,
44
+ ...props
45
+ }: {
46
+ defaultColor?: string | null
47
+ [key: string]: any
48
+ }) {
49
+ const ref = useRef()
50
+ const [hovered, setHovered] = useState(false)
51
+ const [clicked, setClicked] = useState<string | null>(defaultColor)
52
+ useFrame((state) =>
53
+ ref.current.scale.setScalar(hovered ? 1 + Math.sin(state.clock.elapsedTime * 10) / 50 : 1),
54
+ )
55
+ // Sets document.body.style.cursor: useCursor(flag, onPointerOver = 'pointer', onPointerOut = 'auto')
56
+ useCursor(hovered)
57
+ return (
58
+ <mesh
59
+ {...props}
60
+ ref={ref}
61
+ receiveShadow
62
+ castShadow
63
+ onClick={(e) => (
64
+ e.stopPropagation(),
65
+ setClicked((c) => (c === '#4f46e5' ? '#818cf8' : '#4f46e5'))
66
+ )}
67
+ onPointerOver={(e) => (e.stopPropagation(), setHovered(true))}
68
+ onPointerOut={(e) => setHovered(false)}
69
+ >
70
+ <boxGeometry args={[5, 8, 0.075]} />
71
+ <meshStandardMaterial
72
+ roughness={1}
73
+ transparent
74
+ opacity={0.6}
75
+ color={clicked ?? (hovered ? '#818cf8' : '#f5f5f4')}
76
+ />
77
+ </mesh>
78
+ )
79
+ }
80
+
81
+ function Stage() {
82
+ return (
83
+ <>
84
+ {/* Fill */}
85
+ <ambientLight intensity={0.4} />
86
+ {/* Main */}
87
+ <directionalLight
88
+ position={[1, 10, -2]}
89
+ intensity={1.5}
90
+ shadow-camera-far={70}
91
+ shadow-camera-left={-10}
92
+ shadow-camera-right={10}
93
+ shadow-camera-top={10}
94
+ shadow-camera-bottom={-10}
95
+ shadow-mapSize={[512, 512]}
96
+ castShadow
97
+ />
98
+ {/* Strip */}
99
+ <directionalLight position={[-10, -10, 2]} intensity={3} />
100
+ {/* Ground */}
101
+ <mesh receiveShadow rotation-x={-Math.PI / 2} position={[0, -0.75, 0]}>
102
+ <planeGeometry args={[20, 20]} />
103
+ <shadowMaterial opacity={0.25} />
104
+ </mesh>
105
+ {/* This freezes the shadow map, which is fast, but the model has to be static */}
106
+ <BakeShadows />
107
+ </>
108
+ )
109
+ }
@@ -0,0 +1,33 @@
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDHeroPlas: Block = {
4
+ slug: 'DD-HeroPlas',
5
+ labels: {
6
+ singular: 'DD Hero Plastics',
7
+ plural: 'DD Hero Plastics',
8
+ },
9
+ interfaceName: 'DDHeroPlas',
10
+ fields: [
11
+ {
12
+ admin: {
13
+ initCollapsed: true,
14
+ className: 'custom-css-class',
15
+ },
16
+ type: 'collapsible',
17
+ label: 'Add container class',
18
+ fields: [
19
+ {
20
+ name: 'containerClass',
21
+ type: 'textarea',
22
+ label: false,
23
+ required: false,
24
+ admin: {
25
+ description: 'Optional Tailwind/CSS classes applied to the block container.',
26
+ },
27
+ },
28
+ ],
29
+ },
30
+ ],
31
+ }
32
+
33
+ export default DDHeroPlas
@@ -0,0 +1,88 @@
1
+ {
2
+ "type": "block",
3
+ "name": "DD-HeroPlas",
4
+ "label": "Hero Plastics",
5
+ "sourceName": "DD-HeroPlas",
6
+ "portableName": "DD-HeroPlas",
7
+ "slug": "DD-HeroPlas",
8
+ "version": "0.0.1",
9
+ "source": {
10
+ "repo": "Hadizainal/Dusted-Payload-Blocks",
11
+ "originalPath": "CLI-TestGround/dusted-blocks-demo/src/blocks/DD-HeroPlas",
12
+ "originalSlug": "DD-HeroPlas",
13
+ "originalConfigExport": "DDHeroPlas",
14
+ "originalComponentExport": "DDHeroPlas",
15
+ "originalInterfaceName": "DDHeroPlas"
16
+ },
17
+ "files": [
18
+ {
19
+ "from": "Component.tsx",
20
+ "to": "src/blocks/DD-HeroPlas/Component.tsx"
21
+ },
22
+ {
23
+ "from": "ThreeScene.tsx",
24
+ "to": "src/blocks/DD-HeroPlas/ThreeScene.tsx"
25
+ },
26
+ {
27
+ "from": "config.ts",
28
+ "to": "src/blocks/DD-HeroPlas/config.ts"
29
+ }
30
+ ],
31
+ "dependencies": [
32
+ "@react-three/drei",
33
+ "@react-three/fiber",
34
+ "three"
35
+ ],
36
+ "sharedFiles": [],
37
+ "requiredProjectFiles": [
38
+ {
39
+ "path": "src/utilities/ui.ts",
40
+ "reason": "Component imports cn from @/utilities/ui."
41
+ }
42
+ ],
43
+ "optionalProjectFiles": [],
44
+ "collectionRegistration": {
45
+ "enabled": true,
46
+ "collections": [
47
+ "Pages",
48
+ "Posts"
49
+ ]
50
+ },
51
+ "renderBlocksRegistration": {
52
+ "enabled": true
53
+ },
54
+ "renderBlocksBehavior": {
55
+ "wrapperless": false
56
+ },
57
+ "pageRouteIntegration": {
58
+ "required": false,
59
+ "manualSteps": []
60
+ },
61
+ "manual": [
62
+ "Register DDHeroPlas in Pages/Posts block arrays if automatic registration was skipped.",
63
+ "Register DD-HeroPlas in RenderBlocks if automatic registration was skipped.",
64
+ "Run payload generate:types after schema changes.",
65
+ "Run payload generate:importmap if admin/component imports changed."
66
+ ],
67
+ "manualSteps": [
68
+ "Register DDHeroPlas in Pages/Posts block arrays if automatic registration was skipped.",
69
+ "Register DD-HeroPlas in RenderBlocks if automatic registration was skipped.",
70
+ "Run payload generate:types after schema changes.",
71
+ "Run payload generate:importmap if admin/component imports changed."
72
+ ],
73
+ "patchTargets": {
74
+ "blockConfigRegistration": {
75
+ "description": "Installer can register DDHeroPlas from @/blocks/DD-HeroPlas/config."
76
+ },
77
+ "renderBlocksRegistration": {
78
+ "description": "Installer can register DD-HeroPlas with component export DDHeroPlas."
79
+ }
80
+ },
81
+ "notes": [
82
+ "Promoted from the verified Dusted Blocks demo implementation.",
83
+ "Installer preserves existing destination files and reports project requirements before writing."
84
+ ],
85
+ "exportName": "DDHeroPlas",
86
+ "componentExportName": "DDHeroPlas",
87
+ "interfaceName": "DDHeroPlas"
88
+ }