blocks-dusted 0.1.11 → 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 +5 -2
- package/src/cli.js +39 -3
- package/src/commands/shop.js +59 -0
- package/src/commands/warehouse.js +73 -0
- 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 +10 -9
- 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 +5 -5
- 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-Chip/Component.tsx +14 -14
- package/templates/blocks/DD-ComparisonTable/Component.tsx +255 -256
- package/templates/blocks/DD-Contact/Component.tsx +433 -434
- package/templates/blocks/DD-Counter/Component.tsx +18 -13
- 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 +16 -40
- 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 +4 -5
- 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-IframeMedia/Component.tsx +14 -10
- 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 -547
- 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 +368 -372
- package/templates/blocks/DD-Pricing/config.ts +215 -215
- package/templates/blocks/DD-Process/Component.tsx +147 -149
- package/templates/blocks/DD-Progress/Component.tsx +156 -141
- package/templates/blocks/DD-ProjHeader/Component.tsx +93 -91
- package/templates/blocks/DD-ProjSlider/Component.tsx +1 -1
- package/templates/blocks/DD-ProjSlider/config.ts +2 -2
- 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 +237 -237
- package/templates/blocks/DD-StackCards/Component.tsx +474 -473
- 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 +161 -168
- 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 -147
- package/templates/blocks/DD-TextMarq/Component.tsx +157 -157
- package/templates/blocks/DD-Thanks/Component.tsx +501 -500
- package/templates/blocks/DD-Work/Component.tsx +315 -315
- 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 +246 -243
- package/templates/blocks/DDHG-LogoMarquee/Component.tsx +180 -93
- package/templates/blocks/DDHG-LogoMarquee/config.ts +154 -66
- package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +225 -213
- package/templates/blocks/DDHG-ProcessSec/Component.tsx +38 -39
- package/templates/blocks/DDHG-ServiceDetails/Component.tsx +11 -11
- package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +30 -47
- package/templates/blocks/DDHG-ServiceHero/Component.tsx +10 -10
- package/templates/blocks/DDHG-ServiceOverview/Component.tsx +23 -23
- package/templates/blocks/DDHG-StatsFAQ/Component.tsx +40 -40
- package/templates/blocks/DDHG-TeamCards/Component.tsx +140 -131
- 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,37 @@
|
|
|
1
|
+
import type { Block, Field } from 'payload'
|
|
2
|
+
import { sourceDefaults } from './source-defaults'
|
|
3
|
+
// Presentation-only schema for plugin options. Not registered in Payload collections.
|
|
4
|
+
export const PayloadAIAssistantPreview: Block = {
|
|
5
|
+
slug: 'payload-ai-assistant',
|
|
6
|
+
labels: { singular: 'Payload AI Assistant — Plugin Reference', plural: 'Plugin References' },
|
|
7
|
+
fields: [
|
|
8
|
+
{
|
|
9
|
+
type: 'collapsible',
|
|
10
|
+
label: 'Plugin options (reference only)',
|
|
11
|
+
admin: {
|
|
12
|
+
description:
|
|
13
|
+
'These are source plugin defaults, not an installed or active configuration. The frontend is a static interface; AI, MCP and microphone actions are disabled.',
|
|
14
|
+
},
|
|
15
|
+
fields: [
|
|
16
|
+
...Object.entries(sourceDefaults).map(([name, value]): Field => {
|
|
17
|
+
const common = { name, label: name, defaultValue: value }
|
|
18
|
+
if (typeof value === 'boolean')
|
|
19
|
+
return { ...common, type: 'checkbox', defaultValue: value }
|
|
20
|
+
if (typeof value === 'number') return { ...common, type: 'number', defaultValue: value }
|
|
21
|
+
if (name === 'aiProvider')
|
|
22
|
+
return { ...common, type: 'select', defaultValue: value, options: ['openai', 'gemini'] }
|
|
23
|
+
return { ...common, type: 'text', defaultValue: value }
|
|
24
|
+
}),
|
|
25
|
+
{
|
|
26
|
+
name: 'resolveMcpApiKey',
|
|
27
|
+
type: 'textarea',
|
|
28
|
+
label: 'resolveMcpApiKey',
|
|
29
|
+
admin: {
|
|
30
|
+
description:
|
|
31
|
+
'Optional server callback: ({ req, user }) => string | null | Promise<string | null>. No callback or credential is supplied in this demo.',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
.ai-assistant-page {
|
|
2
|
+
max-width: 1120px;
|
|
3
|
+
margin: auto;
|
|
4
|
+
padding: 70px 24px 80px;
|
|
5
|
+
}
|
|
6
|
+
.ai-assistant-page__intro {
|
|
7
|
+
position: static;
|
|
8
|
+
max-width: 760px;
|
|
9
|
+
margin-bottom: 28px;
|
|
10
|
+
}
|
|
11
|
+
.ai-assistant-page h1 {
|
|
12
|
+
font-size: clamp(30px, 5vw, 48px);
|
|
13
|
+
line-height: 1.15;
|
|
14
|
+
margin: 12px 0;
|
|
15
|
+
}
|
|
16
|
+
.ai-assistant-page__intro p {
|
|
17
|
+
font-size: 15px;
|
|
18
|
+
line-height: 1.7;
|
|
19
|
+
opacity: 0.75;
|
|
20
|
+
}
|
|
21
|
+
.ai-assistant-page__intro a {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin-top: 16px;
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
text-underline-offset: 4px;
|
|
26
|
+
}
|
|
27
|
+
.ai-assistant-demo {
|
|
28
|
+
--theme-elevation-250: #9d92af;
|
|
29
|
+
--accent: #a697cf;
|
|
30
|
+
--theme-text: #f5f5f5;
|
|
31
|
+
--border-color-50: #ffffff15;
|
|
32
|
+
--color-base-950: #17141b;
|
|
33
|
+
max-width: 920px;
|
|
34
|
+
margin: auto;
|
|
35
|
+
}
|
|
36
|
+
.ai-assistant-demo__status {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
gap: 12px;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
padding: 12px 0;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
color: #b6a5cc;
|
|
44
|
+
}
|
|
45
|
+
.ai-assistant-demo .payload-ai-assistant__modal {
|
|
46
|
+
position: relative;
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 650px;
|
|
49
|
+
max-height: none;
|
|
50
|
+
}
|
|
51
|
+
.ai-assistant-demo .payload-ai-assistant__topbar {
|
|
52
|
+
position: relative;
|
|
53
|
+
min-height: 130px;
|
|
54
|
+
padding-right: 200px;
|
|
55
|
+
}
|
|
56
|
+
.ai-assistant-demo .payload-ai-assistant__topbar h2 {
|
|
57
|
+
font-size: 20px;
|
|
58
|
+
}
|
|
59
|
+
.ai-assistant-demo .ai-assistant-demo__note {
|
|
60
|
+
color: #c8b0f0;
|
|
61
|
+
}
|
|
62
|
+
.ai-assistant-demo .payload-ai-assistant__close {
|
|
63
|
+
position: absolute;
|
|
64
|
+
right: 12px;
|
|
65
|
+
top: 12px;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
opacity: 0.45;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
.ai-assistant-demo .payload-ai-assistant__composer textarea {
|
|
71
|
+
min-width: 0;
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.ai-assistant-demo .payload-ai-assistant__mic-button {
|
|
75
|
+
display: grid;
|
|
76
|
+
place-items: center;
|
|
77
|
+
}
|
|
78
|
+
.ai-assistant-demo .payload-ai-assistant__author {
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
}
|
|
81
|
+
@media (max-width: 600px) {
|
|
82
|
+
.ai-assistant-page {
|
|
83
|
+
padding: 40px 16px;
|
|
84
|
+
}
|
|
85
|
+
.ai-assistant-demo .payload-ai-assistant__modal {
|
|
86
|
+
height: 670px;
|
|
87
|
+
}
|
|
88
|
+
.ai-assistant-demo .payload-ai-assistant__topbar {
|
|
89
|
+
padding: 20px 90px 20px 18px;
|
|
90
|
+
min-height: 150px;
|
|
91
|
+
}
|
|
92
|
+
.ai-assistant-demo .payload-ai-assistant__dustedBot {
|
|
93
|
+
width: 80px;
|
|
94
|
+
height: 120px;
|
|
95
|
+
opacity: 0.5;
|
|
96
|
+
}
|
|
97
|
+
.ai-assistant-demo .dustedBotSVG {
|
|
98
|
+
right: -35px;
|
|
99
|
+
}
|
|
100
|
+
.ai-assistant-demo .payload-ai-assistant__composer {
|
|
101
|
+
grid-template-columns: 1fr;
|
|
102
|
+
margin: 0 12px 24px;
|
|
103
|
+
}
|
|
104
|
+
.ai-assistant-demo .payload-ai-assistant__composer-actions {
|
|
105
|
+
justify-content: flex-end;
|
|
106
|
+
}
|
|
107
|
+
.ai-assistant-demo .payload-ai-assistant__messages {
|
|
108
|
+
padding: 20px 18px;
|
|
109
|
+
margin-top: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ai-assistant-page {
|
|
114
|
+
width: 100%;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
}
|
|
118
|
+
.ai-assistant-demo {
|
|
119
|
+
width: 100%;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
}
|
|
122
|
+
.ai-assistant-demo .payload-ai-assistant__modal {
|
|
123
|
+
min-width: 0;
|
|
124
|
+
grid-template-columns: minmax(0, 1fr);
|
|
125
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "block",
|
|
3
|
+
"name": "DD-PayloadAIAssistant",
|
|
4
|
+
"label": "Payload AI Assistant",
|
|
5
|
+
"sourceName": "DD-PayloadAIAssistant",
|
|
6
|
+
"portableName": "DD-PayloadAIAssistant",
|
|
7
|
+
"slug": "payload-ai-assistant",
|
|
8
|
+
"version": "0.0.1",
|
|
9
|
+
"source": {
|
|
10
|
+
"repo": "Hadizainal/Dusted-Payload-Blocks",
|
|
11
|
+
"originalPath": "CLI-TestGround/dusted-blocks-demo/src/blocks/DD-PayloadAIAssistant",
|
|
12
|
+
"originalSlug": "payload-ai-assistant",
|
|
13
|
+
"originalConfigExport": "PayloadAIAssistantPreview",
|
|
14
|
+
"originalComponentExport": "PayloadAIAssistantDemo",
|
|
15
|
+
"originalInterfaceName": "PayloadAIAssistantPreview"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"from": "Component.tsx",
|
|
20
|
+
"to": "src/blocks/DD-PayloadAIAssistant/Component.tsx"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"from": "DustedBot.tsx",
|
|
24
|
+
"to": "src/blocks/DD-PayloadAIAssistant/DustedBot.tsx"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"from": "config.ts",
|
|
28
|
+
"to": "src/blocks/DD-PayloadAIAssistant/config.ts"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"from": "demo.css",
|
|
32
|
+
"to": "src/blocks/DD-PayloadAIAssistant/demo.css"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"from": "source-defaults.ts",
|
|
36
|
+
"to": "src/blocks/DD-PayloadAIAssistant/source-defaults.ts"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"from": "styles.ts",
|
|
40
|
+
"to": "src/blocks/DD-PayloadAIAssistant/styles.ts"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"dependencies": [
|
|
44
|
+
"lucide-react"
|
|
45
|
+
],
|
|
46
|
+
"sharedFiles": [],
|
|
47
|
+
"requiredProjectFiles": [],
|
|
48
|
+
"optionalProjectFiles": [],
|
|
49
|
+
"collectionRegistration": {
|
|
50
|
+
"enabled": true,
|
|
51
|
+
"collections": [
|
|
52
|
+
"Pages",
|
|
53
|
+
"Posts"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"renderBlocksRegistration": {
|
|
57
|
+
"enabled": true
|
|
58
|
+
},
|
|
59
|
+
"renderBlocksBehavior": {
|
|
60
|
+
"wrapperless": false
|
|
61
|
+
},
|
|
62
|
+
"pageRouteIntegration": {
|
|
63
|
+
"required": false,
|
|
64
|
+
"manualSteps": []
|
|
65
|
+
},
|
|
66
|
+
"manual": [
|
|
67
|
+
"Register PayloadAIAssistantPreview in Pages/Posts block arrays if automatic registration was skipped.",
|
|
68
|
+
"Register payload-ai-assistant in RenderBlocks if automatic registration was skipped.",
|
|
69
|
+
"Run payload generate:types after schema changes.",
|
|
70
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
71
|
+
],
|
|
72
|
+
"manualSteps": [
|
|
73
|
+
"Register PayloadAIAssistantPreview in Pages/Posts block arrays if automatic registration was skipped.",
|
|
74
|
+
"Register payload-ai-assistant in RenderBlocks if automatic registration was skipped.",
|
|
75
|
+
"Run payload generate:types after schema changes.",
|
|
76
|
+
"Run payload generate:importmap if admin/component imports changed."
|
|
77
|
+
],
|
|
78
|
+
"patchTargets": {
|
|
79
|
+
"blockConfigRegistration": {
|
|
80
|
+
"description": "Installer can register PayloadAIAssistantPreview from @/blocks/DD-PayloadAIAssistant/config."
|
|
81
|
+
},
|
|
82
|
+
"renderBlocksRegistration": {
|
|
83
|
+
"description": "Installer can register payload-ai-assistant with component export PayloadAIAssistantDemo."
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"notes": [
|
|
87
|
+
"Promoted from the verified Dusted Blocks demo implementation.",
|
|
88
|
+
"Installer preserves existing destination files and reports project requirements before writing."
|
|
89
|
+
],
|
|
90
|
+
"exportName": "PayloadAIAssistantPreview",
|
|
91
|
+
"componentExportName": "PayloadAIAssistantDemo",
|
|
92
|
+
"interfaceName": "PayloadAIAssistantPreview"
|
|
93
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Literal defaults from source-plugin.ts.txt. Reference data only; never install the plugin.
|
|
2
|
+
export const sourceDefaults = {
|
|
3
|
+
aiProvider: 'openai' as const,
|
|
4
|
+
adminUserCollection: 'users',
|
|
5
|
+
assistantActionPath:
|
|
6
|
+
'@/plugins/payload-dashboard-ai-assistant/components/AdminAIAssistantAction#AdminAIAssistantAction',
|
|
7
|
+
auditCollectionSlug: 'payload-ai-assistant-audit-logs',
|
|
8
|
+
auditLogs: true,
|
|
9
|
+
enabled: true,
|
|
10
|
+
endpointPath: '/payload-ai-assistant/chat' as const,
|
|
11
|
+
geminiBaseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai',
|
|
12
|
+
geminiModel: 'gemini-3.8-flash',
|
|
13
|
+
maxMessages: 12,
|
|
14
|
+
mcpApiKeyFieldName: 'payloadMcpApiKey',
|
|
15
|
+
mcpEndpoint: '/api/mcp',
|
|
16
|
+
openAIModel: 'gpt-4.1-mini',
|
|
17
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export const adminAIAssistantStyles = String.raw`
|
|
2
|
+
.payload-ai-assistant__action {
|
|
3
|
+
border: 1px solid var(--theme-elevation-200);
|
|
4
|
+
background: var(--theme-elevation-100);
|
|
5
|
+
color: var(--theme-text);
|
|
6
|
+
min-width: 38px;
|
|
7
|
+
height: 2.2rem;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
transition: all .3s;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.payload-ai-assistant__action:hover {
|
|
14
|
+
transform: translateY(-1px);
|
|
15
|
+
filter: grayscale(0) brightness(1);
|
|
16
|
+
background: var(--theme-elevation-100);
|
|
17
|
+
border-color: var(--theme-elevation-400);
|
|
18
|
+
box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.35);
|
|
19
|
+
transition: all .3s;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@supports (corner-shape: squircle) {
|
|
23
|
+
.payload-ai-assistant__action {
|
|
24
|
+
border-radius: 2rem;
|
|
25
|
+
corner-shape: squircle;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@supports not (corner-shape: squircle) {
|
|
30
|
+
.payload-ai-assistant__action {
|
|
31
|
+
border-radius: 6px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.payload-ai-assistant__overlay {
|
|
36
|
+
position: fixed;
|
|
37
|
+
inset: 0;
|
|
38
|
+
z-index: 10000;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
padding: 24px;
|
|
43
|
+
background: #000000b5;
|
|
44
|
+
backdrop-filter: blur(4px);
|
|
45
|
+
height: 100vh;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.payload-ai-assistant__modal {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-rows: auto 1fr auto auto;
|
|
51
|
+
width: min(920px, calc(100vw - 32px));
|
|
52
|
+
height: min(760px, calc(100vh - 32px));
|
|
53
|
+
border: 1px solid #2a2a2a;
|
|
54
|
+
border-radius: 8px;
|
|
55
|
+
background: radial-gradient(circle at top center, #050505, #161422);
|
|
56
|
+
backdrop-filter: blur(16px);
|
|
57
|
+
color: #f5f5f5;
|
|
58
|
+
box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
|
|
59
|
+
overflow: clip;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.payload-ai-assistant__topbar {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
gap: 16px;
|
|
67
|
+
padding: 18px 22px;
|
|
68
|
+
border-bottom: 1px solid #242424;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.payload-ai-assistant__topbar h2 {
|
|
72
|
+
margin: 0;
|
|
73
|
+
font-size: 18px;
|
|
74
|
+
line-height: 1.2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.payload-ai-assistant__topbar p {
|
|
78
|
+
margin: 4px 0 0;
|
|
79
|
+
color: #a5a5a5;
|
|
80
|
+
font-size: 13px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.payload-ai-assistant__close {
|
|
84
|
+
width: 32px;
|
|
85
|
+
height: 32px;
|
|
86
|
+
border: 0;
|
|
87
|
+
border-radius: 6px;
|
|
88
|
+
background: #242424;
|
|
89
|
+
color: #f5f5f5;
|
|
90
|
+
font-size: 2rem;
|
|
91
|
+
padding-bottom: 0.5rem;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.payload-ai-assistant__close:hover {
|
|
96
|
+
background: var(--accent);
|
|
97
|
+
color: #8100ff !important;
|
|
98
|
+
filter: drop-shadow(2px 4px 6px black);
|
|
99
|
+
text-shadow: 0 0 black;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.payload-ai-assistant__messages {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: 16px;
|
|
106
|
+
overflow-y: auto;
|
|
107
|
+
padding: 28px 24px;
|
|
108
|
+
margin-top: 2rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.payload-ai-assistant__message {
|
|
112
|
+
max-width: 78%;
|
|
113
|
+
white-space: pre-wrap;
|
|
114
|
+
line-height: 1.5;
|
|
115
|
+
font-size: 15px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.payload-ai-assistant__message--user {
|
|
119
|
+
align-self: flex-end;
|
|
120
|
+
padding: 13px 17px;
|
|
121
|
+
border-radius: 2rem 4rem 0 2rem;
|
|
122
|
+
background: #2929295c;
|
|
123
|
+
color: yellowgreen;
|
|
124
|
+
corner-shape: squircle;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.payload-ai-assistant__message--assistant {
|
|
128
|
+
align-self: flex-start;
|
|
129
|
+
color: #f4f4f4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.payload-ai-assistant__typing {
|
|
133
|
+
color: #a5a5a5;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.payload-ai-assistant__error {
|
|
137
|
+
margin: 0 24px 12px;
|
|
138
|
+
padding: 10px 12px;
|
|
139
|
+
border: 1px solid #7f1d1d;
|
|
140
|
+
border-radius: 6px;
|
|
141
|
+
background: #2a1212;
|
|
142
|
+
color: #fecaca;
|
|
143
|
+
font-size: 13px;
|
|
144
|
+
width: 100%;
|
|
145
|
+
max-width: 67rem;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-wrap: wrap;
|
|
148
|
+
overflow: auto;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.payload-ai-assistant__composer {
|
|
152
|
+
display: grid;
|
|
153
|
+
grid-template-columns: 1fr auto;
|
|
154
|
+
gap: 12px;
|
|
155
|
+
align-items: end;
|
|
156
|
+
margin: 0 24px 24px;
|
|
157
|
+
padding: 13px;
|
|
158
|
+
border: 1px solid #2c2c2c;
|
|
159
|
+
border-radius: 2rem;
|
|
160
|
+
corner-shape: squircle;
|
|
161
|
+
background: #171717;
|
|
162
|
+
box-shadow: var(--shadow-xl);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.payload-ai-assistant__composer-actions {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
scale: 0.9;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.payload-ai-assistant__mic-button {
|
|
173
|
+
min-width: 42px !important;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.payload-ai-assistant__mic-button[data-recording='true'] {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.payload-ai-assistant__composer textarea {
|
|
181
|
+
min-height: 48px;
|
|
182
|
+
max-height: 170px;
|
|
183
|
+
resize: vertical;
|
|
184
|
+
border: 0;
|
|
185
|
+
outline: 0;
|
|
186
|
+
background: transparent;
|
|
187
|
+
color: #f5f5f5;
|
|
188
|
+
font: inherit;
|
|
189
|
+
font-size: medium;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.payload-ai-assistant__composer:focus-within {
|
|
193
|
+
outline: 2px solid var(--accent);
|
|
194
|
+
outline-offset: 3px;
|
|
195
|
+
--shadow-2xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
196
|
+
box-shadow: var(--shadow-2xl);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.payload-ai-assistant__composer textarea::placeholder {
|
|
200
|
+
color: #8f8f8f;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.payload-ai-assistant__composer button {
|
|
204
|
+
min-width: 64px;
|
|
205
|
+
height: 42px;
|
|
206
|
+
border: 0;
|
|
207
|
+
border-radius: 2rem;
|
|
208
|
+
corner-shape: squircle;
|
|
209
|
+
background: #2f2f2f;
|
|
210
|
+
color: #f5f5f5;
|
|
211
|
+
font-size: 18px;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
--shadow-xl: 0 10px 20px -5px rgba(0, 0, 0, 0.1), 0 4px 20px -5px rgba(0, 0, 0, 0.1);
|
|
214
|
+
box-shadow: var(--shadow-xl);
|
|
215
|
+
transition: all .3s;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.payload-ai-assistant__composer button:hover {
|
|
219
|
+
background: var(--accent);
|
|
220
|
+
color: #8100ff !important;
|
|
221
|
+
filter:brightness(0.9);
|
|
222
|
+
--shadow-2xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
223
|
+
box-shadow: var(--shadow-2xl);
|
|
224
|
+
transition: all .3s;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.payload-ai-assistant__composer button:disabled {
|
|
228
|
+
cursor: not-allowed;
|
|
229
|
+
opacity: 0.45;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (max-width: 768px) {
|
|
233
|
+
.payload-ai-assistant__action {
|
|
234
|
+
margin-right: 1rem;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.payload-ai-assistant__overlay {
|
|
238
|
+
padding: 8px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.payload-ai-assistant__modal {
|
|
242
|
+
width: 100%;
|
|
243
|
+
height: 100%;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.payload-ai-assistant__message {
|
|
247
|
+
max-width: 92%;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.payload-ai-assistant__author {
|
|
252
|
+
display: flex;
|
|
253
|
+
float: right;
|
|
254
|
+
position: relative;
|
|
255
|
+
right: 0;
|
|
256
|
+
margin-top: -1rem;
|
|
257
|
+
margin-left: auto;
|
|
258
|
+
padding: 0 1rem 1rem;
|
|
259
|
+
font-size: smaller;
|
|
260
|
+
opacity: 0.1;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.dustedBotSVG-58,
|
|
264
|
+
.dustedBotSVG-59,
|
|
265
|
+
.dustedBotSVG-60,
|
|
266
|
+
.dustedBotSVG-61,
|
|
267
|
+
.dustedBotSVG-62,
|
|
268
|
+
.dustedBotSVG-63,
|
|
269
|
+
.dustedBotSVG-64,
|
|
270
|
+
.dustedBotSVG-65,
|
|
271
|
+
.dustedBotSVG-66,
|
|
272
|
+
.dustedBotSVG-67,
|
|
273
|
+
.dustedBotSVG-68,
|
|
274
|
+
.dustedBotSVG-69,
|
|
275
|
+
.dustedBotSVG-70,
|
|
276
|
+
.dustedBotSVG-71,
|
|
277
|
+
.dustedBotSVG-72 {
|
|
278
|
+
fill: darkgray;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.payload-ai-assistant__dustedBot {
|
|
282
|
+
position: absolute;
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
max-width: 14rem;
|
|
285
|
+
width: 100%;
|
|
286
|
+
height: 8rem;
|
|
287
|
+
right: 0;
|
|
288
|
+
top: 0;
|
|
289
|
+
pointer-events: none;
|
|
290
|
+
z-index: 0;
|
|
291
|
+
mix-blend-mode: exclusion;
|
|
292
|
+
border-bottom: 1px solid var(--border-color-50);
|
|
293
|
+
background: var(--color-base-950);
|
|
294
|
+
backdrop-filter: blur(10px);
|
|
295
|
+
box-shadow: var(--shadow-xl);
|
|
296
|
+
scale: 0.95;
|
|
297
|
+
transform-origin: top right;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.dustedBotSVG {
|
|
301
|
+
position: absolute;
|
|
302
|
+
height: 10rem;
|
|
303
|
+
top: 1rem;
|
|
304
|
+
right: 0;
|
|
305
|
+
}
|
|
306
|
+
`
|