blocks-dusted 0.1.6 → 0.1.9
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/README.md +15 -0
- package/package.json +1 -1
- package/src/cli.js +14 -1
- package/src/commands/header.js +106 -0
- package/templates/components/HeaderDD02/Component.client.tsx +9 -0
- package/templates/components/HeaderDD02/Component.tsx +10 -0
- package/templates/components/HeaderDD02/Header.config.ts +33 -0
- package/templates/components/HeaderDD02/MobileBottomNav/index.tsx +1 -1
- package/templates/components/HeaderDD02/Nav/index.tsx +9 -0
- package/templates/components/HeaderDD02/README.md +23 -16
- package/templates/components/HeaderDD02/hooks/revalidateHeader.ts +11 -0
- package/templates/components/HeaderDD02/index.tsx +1 -1
- package/templates/components/HeaderDD02/manifest.json +32 -16
package/README.md
CHANGED
|
@@ -356,6 +356,8 @@ pnpm dlx blocks-dusted doctor
|
|
|
356
356
|
pnpm dlx blocks-dusted add DD-Hero --dry-run
|
|
357
357
|
pnpm dlx blocks-dusted add DD-Hero
|
|
358
358
|
pnpm dlx blocks-dusted add RichText
|
|
359
|
+
pnpm dlx blocks-dusted header add HeaderDD02 --dry-run
|
|
360
|
+
pnpm dlx blocks-dusted header add HeaderDD02
|
|
359
361
|
```
|
|
360
362
|
|
|
361
363
|
Use `blocks-dusted list` first to see the exact available block names in the package. `DD-Hero` is an existing block in the current manifest registry.
|
|
@@ -378,6 +380,8 @@ blocks-dusted add DD-Hero --dry-run
|
|
|
378
380
|
blocks-dusted add DD-Hero --no-register
|
|
379
381
|
blocks-dusted add DD-Hero --cwd C:\Projects\my-payload-site
|
|
380
382
|
blocks-dusted add RichText --cwd C:\Projects\my-payload-site
|
|
383
|
+
blocks-dusted header add HeaderDD02 --dry-run
|
|
384
|
+
blocks-dusted header add HeaderDD02
|
|
381
385
|
```
|
|
382
386
|
|
|
383
387
|
`--cwd` targets a Payload project directory without changing your shell directory. Relative `--cwd` values resolve from the directory where you launched the command.
|
|
@@ -403,6 +407,17 @@ pnpm payload generate:importmap
|
|
|
403
407
|
|
|
404
408
|
The CLI does not run migrations or build the target project.
|
|
405
409
|
|
|
410
|
+
### Header workflows
|
|
411
|
+
|
|
412
|
+
Headers are active Payload globals and layout wiring, not ordinary page blocks. Use the dedicated header workflow when you want to activate a reusable header implementation.
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
pnpm dlx blocks-dusted header add HeaderDD02 --dry-run
|
|
416
|
+
pnpm dlx blocks-dusted header add HeaderDD02
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
The HeaderDD02 workflow backs up the active Header config, Nav renderer, and RowLabel before patching them. It installs the HeaderDD02 variant files, copies missing shared UI primitives, patches `src/Header/Nav/index.tsx` to render HeaderDD02, and patches `src/Header/config.ts` to expose HeaderDD02 fields while retaining legacy starter `navItems` as hidden data. Run Payload type and import-map generation after reviewing the changes.
|
|
420
|
+
|
|
406
421
|
## Payload Block Standard
|
|
407
422
|
|
|
408
423
|
### Purpose
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -2,6 +2,7 @@ import { readFile } from 'node:fs/promises'
|
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
3
|
import { addTemplate } from './commands/add.js'
|
|
4
4
|
import { doctor } from './commands/doctor.js'
|
|
5
|
+
import { addHeader } from './commands/header.js'
|
|
5
6
|
import { list } from './commands/list.js'
|
|
6
7
|
import { error, info } from './utils/logger.js'
|
|
7
8
|
import { packageRoot } from './utils/paths.js'
|
|
@@ -12,7 +13,8 @@ function printHelp() {
|
|
|
12
13
|
info('Usage:')
|
|
13
14
|
info(' blocks-dusted list')
|
|
14
15
|
info(' blocks-dusted doctor [--cwd <path>]')
|
|
15
|
-
info(' blocks-dusted add <
|
|
16
|
+
info(' blocks-dusted add <TemplateName> [--dry-run] [--no-register] [--cwd <path>]')
|
|
17
|
+
info(' blocks-dusted header add <HeaderName> [--dry-run] [--cwd <path>]')
|
|
16
18
|
info(' blocks-dusted --version')
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -34,6 +36,17 @@ export async function runCli(args, options = {}) {
|
|
|
34
36
|
|
|
35
37
|
if (command === 'list') return list()
|
|
36
38
|
if (command === 'doctor') return doctor({ targetDirectory })
|
|
39
|
+
if (command === 'header') {
|
|
40
|
+
const [subcommand, ...headerRest] = rest
|
|
41
|
+
if (subcommand !== 'add') throw new Error('Usage: blocks-dusted header add <HeaderName> [--dry-run]')
|
|
42
|
+
const headerName = headerRest.find((argument) => !argument.startsWith('-'))
|
|
43
|
+
return addHeader({
|
|
44
|
+
headerName,
|
|
45
|
+
targetDirectory,
|
|
46
|
+
dryRun: headerRest.includes('--dry-run'),
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
37
50
|
if (command === 'add') {
|
|
38
51
|
const templateName = rest.find((argument) => !argument.startsWith('-'))
|
|
39
52
|
return addTemplate({
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { copySharedFiles, copyTemplateFiles, backupExistingDestination, plannedBackupPath } from '../installers/copyTemplateFiles.js'
|
|
2
|
+
import { checkDependencies } from '../installers/installDependencies.js'
|
|
3
|
+
import { checkRequirements } from '../installers/checkRequirements.js'
|
|
4
|
+
import { loadTemplateManifest } from '../registry/loadTemplateManifest.js'
|
|
5
|
+
import { validateTemplateManifest } from '../registry/validateTemplateManifest.js'
|
|
6
|
+
import { heading, info, item, status } from '../utils/logger.js'
|
|
7
|
+
import { packageRoot } from '../utils/paths.js'
|
|
8
|
+
import { fileExists, validateTargetProject } from '../utils/project.js'
|
|
9
|
+
|
|
10
|
+
const SUPPORTED_HEADERS = new Set(['HeaderDD02'])
|
|
11
|
+
const ACTIVE_HEADER_DIRECTORY = 'src/Header'
|
|
12
|
+
|
|
13
|
+
export async function addHeader({ headerName, targetDirectory = process.cwd(), dryRun = false }) {
|
|
14
|
+
if (!headerName) throw new Error('A header name is required. Example: blocks-dusted header add HeaderDD02 --dry-run')
|
|
15
|
+
if (!SUPPORTED_HEADERS.has(headerName)) throw new Error(`Unsupported header workflow: ${headerName}`)
|
|
16
|
+
|
|
17
|
+
const { manifest, templateDirectory } = await loadTemplateManifest(headerName)
|
|
18
|
+
validateTemplateManifest(manifest)
|
|
19
|
+
if (manifest.type !== 'component') throw new Error(`${headerName} must be a component template.`)
|
|
20
|
+
|
|
21
|
+
const checks = await checkRequirements({ manifest, targetDirectory })
|
|
22
|
+
const dependencyChecks = await checkDependencies({ manifest, targetDirectory })
|
|
23
|
+
const project = await validateTargetProject(targetDirectory)
|
|
24
|
+
const missingRequired = checks.missingRequirements ?? []
|
|
25
|
+
if (missingRequired.length > 0) {
|
|
26
|
+
throw new Error(`Required project files are missing:\n${missingRequired.map(formatMissingRequirement).join('\n')}`)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const activeHeaderExists = await fileExists(`${targetDirectory}/${ACTIVE_HEADER_DIRECTORY}`)
|
|
30
|
+
const activeHeaderBackupPath = activeHeaderExists
|
|
31
|
+
? await plannedBackupPath({ destinationPath: ACTIVE_HEADER_DIRECTORY, targetDirectory })
|
|
32
|
+
: null
|
|
33
|
+
|
|
34
|
+
heading('Header workflow')
|
|
35
|
+
info(`Name: ${manifest.name}`)
|
|
36
|
+
info(`Target directory: ${targetDirectory}`)
|
|
37
|
+
info(`Payload config: ${project.payloadConfigPath}`)
|
|
38
|
+
info(`Source template path: ${templateDirectory}`)
|
|
39
|
+
info(`Active Header path: ${ACTIVE_HEADER_DIRECTORY}`)
|
|
40
|
+
|
|
41
|
+
heading(dryRun ? 'Files that would be installed' : 'Files to install')
|
|
42
|
+
for (const file of manifest.files) item(`${file.from} -> ${file.to}`)
|
|
43
|
+
|
|
44
|
+
heading('Required project files')
|
|
45
|
+
for (const check of checks.requiredFiles) status(check.exists, check.path, check.reason)
|
|
46
|
+
|
|
47
|
+
heading('Shared files')
|
|
48
|
+
if ((manifest.sharedFiles ?? []).length === 0) item('None')
|
|
49
|
+
for (const file of manifest.sharedFiles ?? []) item(`${file.from} -> ${file.to}`)
|
|
50
|
+
|
|
51
|
+
heading('Package dependencies')
|
|
52
|
+
for (const dependency of dependencyChecks.declared) {
|
|
53
|
+
const isMissing = dependencyChecks.missing.some((missing) => missing.name === dependency.name)
|
|
54
|
+
status(!isMissing, formatDependency(dependency), isMissing ? 'missing' : 'already listed')
|
|
55
|
+
}
|
|
56
|
+
if (dependencyChecks.missing.length > 0) item(`Install command: ${installCommandText(dependencyChecks.packageManager, dependencyChecks.missing)}`)
|
|
57
|
+
|
|
58
|
+
heading('Active Header backup')
|
|
59
|
+
if (activeHeaderBackupPath) item(dryRun ? `Would back up ${ACTIVE_HEADER_DIRECTORY} to ${activeHeaderBackupPath}` : `Will back up ${ACTIVE_HEADER_DIRECTORY} to ${activeHeaderBackupPath}`)
|
|
60
|
+
else item('No existing src/Header directory found; a new active Header will be installed.')
|
|
61
|
+
|
|
62
|
+
heading('Activation')
|
|
63
|
+
item('Install a complete active src/Header replacement wired to HeaderDD02.')
|
|
64
|
+
item('The previous Header folder is preserved as src/Header.bak, src/Header.bak.1, or the next available backup path.')
|
|
65
|
+
|
|
66
|
+
if (dryRun) {
|
|
67
|
+
const sharedResults = await copySharedFiles({ manifest, packageRoot, targetDirectory, dryRun: true })
|
|
68
|
+
heading('Dry-run shared file results')
|
|
69
|
+
if (sharedResults.length === 0) item('None')
|
|
70
|
+
sharedResults.forEach((result) => item(`${result.status}: ${result.to}${result.reason ? ` - ${result.reason}` : ''}`))
|
|
71
|
+
info('Dry run complete: no files were changed.')
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const sharedResults = await copySharedFiles({ manifest, packageRoot, targetDirectory })
|
|
76
|
+
if (activeHeaderExists) await backupExistingDestination({ destinationPath: ACTIVE_HEADER_DIRECTORY, targetDirectory })
|
|
77
|
+
const copiedFiles = await copyTemplateFiles({ manifest, templateDirectory, targetDirectory })
|
|
78
|
+
|
|
79
|
+
heading('Copied files')
|
|
80
|
+
copiedFiles.forEach((file) => item(file))
|
|
81
|
+
heading('Shared file results')
|
|
82
|
+
if (sharedResults.length === 0) item('None')
|
|
83
|
+
sharedResults.forEach((result) => item(`${result.status}: ${result.to}${result.reason ? ` - ${result.reason}` : ''}`))
|
|
84
|
+
heading('Dependency install')
|
|
85
|
+
item('Skipped: dependency installation is manual')
|
|
86
|
+
if (dependencyChecks.missing.length > 0) item(`Run manually: ${installCommandText(dependencyChecks.packageManager, dependencyChecks.missing)}`)
|
|
87
|
+
heading('Payload commands to run manually')
|
|
88
|
+
const payloadCommand = dependencyChecks.packageManager === 'npm' ? 'npx payload' : `${dependencyChecks.packageManager} payload`
|
|
89
|
+
item(`${payloadCommand} generate:types`)
|
|
90
|
+
item(`${payloadCommand} generate:importmap`)
|
|
91
|
+
info('Header workflow complete.')
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function formatMissingRequirement(check) {
|
|
95
|
+
const resolution = check.resolution ? `\n Resolve: ${check.resolution}` : ''
|
|
96
|
+
return `- ${check.path}: ${check.reason}${resolution}`
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function formatDependency(dependency) {
|
|
100
|
+
return `${dependency.name}${dependency.version ? `@${dependency.version}` : ''}`
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function installCommandText(packageManager, dependencies) {
|
|
104
|
+
const command = packageManager === 'yarn' ? ['yarn', 'add'] : packageManager === 'bun' ? ['bun', 'add'] : packageManager === 'npm' ? ['npm', 'install'] : ['pnpm', 'add']
|
|
105
|
+
return [...command, ...dependencies.map(formatDependency)].join(' ')
|
|
106
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Header as HeaderType } from '@/payload-types'
|
|
2
|
+
import { getCachedGlobal } from '@/utilities/getGlobals'
|
|
3
|
+
|
|
4
|
+
import { HeaderClient } from './Component.client'
|
|
5
|
+
|
|
6
|
+
export async function Header() {
|
|
7
|
+
const headerData = (await getCachedGlobal('header', 1)()) as HeaderType | null
|
|
8
|
+
|
|
9
|
+
return <HeaderClient data={headerData ?? ({} as HeaderType)} />
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { GlobalConfig } from 'payload'
|
|
2
|
+
|
|
3
|
+
import { HeaderDD02 } from '@/Header/variants/HeaderDD02/config'
|
|
4
|
+
|
|
5
|
+
import { revalidateHeader } from './hooks/revalidateHeader'
|
|
6
|
+
|
|
7
|
+
export const Header: GlobalConfig = {
|
|
8
|
+
slug: 'header',
|
|
9
|
+
access: {
|
|
10
|
+
read: () => true,
|
|
11
|
+
update: () => true,
|
|
12
|
+
},
|
|
13
|
+
fields: [
|
|
14
|
+
{
|
|
15
|
+
name: 'variant',
|
|
16
|
+
label: 'Variant',
|
|
17
|
+
type: 'select',
|
|
18
|
+
defaultValue: 'header02',
|
|
19
|
+
options: [{ label: 'Header DD 02', value: 'header02' }],
|
|
20
|
+
admin: {
|
|
21
|
+
position: 'sidebar',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'header02',
|
|
26
|
+
type: 'group',
|
|
27
|
+
fields: HeaderDD02,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
hooks: {
|
|
31
|
+
afterChange: [revalidateHeader],
|
|
32
|
+
},
|
|
33
|
+
}
|
|
@@ -133,7 +133,7 @@ export default function MobileBottomNav({ data }: MobileBottomNavProps) {
|
|
|
133
133
|
const pathname = usePathname()
|
|
134
134
|
const normalizedCurrentPathname = useMemo(() => normalizePath(pathname), [pathname])
|
|
135
135
|
|
|
136
|
-
const navItems = data?.header02?.navItems || []
|
|
136
|
+
const navItems = data?.header02?.navItems || (data as any)?.navItems || []
|
|
137
137
|
const showLabels = data?.header02?.showMobileLabels ?? true
|
|
138
138
|
|
|
139
139
|
useEffect(() => {
|
|
@@ -4,48 +4,55 @@ HeaderDD02 is the exported Header02 implementation from DesignsDustedv3.
|
|
|
4
4
|
|
|
5
5
|
This header uses the shared `defaultLexical` editor standard from `@/fields/defaultLexical`. Project-specific Lexical blocks are intentionally not bundled. The nested `BlocksFeature` uses an empty `blocks` array so each target project can register only the blocks it requires.
|
|
6
6
|
|
|
7
|
+
The header workflow backs up the active `src/Header` folder before installing a complete replacement Header shell wired directly to `HeaderDD02`.
|
|
8
|
+
|
|
7
9
|
Included files:
|
|
8
10
|
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
11
|
+
- `Component.tsx` for the active server Header component.
|
|
12
|
+
- `Component.client.tsx` for the active client Header wrapper.
|
|
13
|
+
- `Nav/index.tsx` to render `HeaderDD02` directly.
|
|
14
|
+
- `config.ts` for the active Payload Header global.
|
|
15
|
+
- `hooks/revalidateHeader.ts` for Header global revalidation.
|
|
16
|
+
- `RowLabel.tsx` for Payload admin array labels.
|
|
17
|
+
- `variants/HeaderDD02/index.tsx` for the HeaderDD02 desktop runtime.
|
|
18
|
+
- `variants/HeaderDD02/MobileBottomNav/index.tsx` because Header02 imports it directly.
|
|
19
|
+
- `variants/HeaderDD02/config.ts` for the Header02 field structure adapted to `HeaderDD02` and `defaultLexical`.
|
|
13
20
|
|
|
14
21
|
Not included:
|
|
15
22
|
|
|
16
23
|
- Header01 and Header03 implementations.
|
|
17
|
-
- The parent multi-variant Header shell.
|
|
18
24
|
- Source project Lexical blocks: `AnimatedText`, `ButtonWithIcon`, `CounterBlock`, and `MediaBlock`.
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
Removed source Lexical block imports: `@/blocks/AnimatedText/config`, `@/blocks/ButtonWithIcon/config`, `@/blocks/CounterBlock/config`, `@/blocks/MediaBlock/config`.
|
|
27
|
+
|
|
28
|
+
Before activating this header in an existing project, inspect the current Header global schema and stored Header data. The header workflow preserves the old active Header folder as `src/Header.bak`, `src/Header.bak.1`, or the next available backup path. It does not rewrite stored rich text data or run destructive migrations.
|
|
21
29
|
|
|
22
30
|
## AI handover prompt
|
|
23
31
|
|
|
24
32
|
```prompt
|
|
25
|
-
Review the newly installed HeaderDD02 files
|
|
33
|
+
Review the newly installed HeaderDD02 files in this project
|
|
26
34
|
|
|
27
35
|
Do not assume the source project architecture matches this repository.
|
|
28
36
|
|
|
29
37
|
Tasks:
|
|
30
38
|
|
|
31
|
-
1. Inspect the
|
|
32
|
-
2.
|
|
39
|
+
1. Inspect the active Header component, Payload Header global, frontend layout, fields, utilities, generated types and styling conventions.
|
|
40
|
+
2. Confirm `src/Header/Component.tsx`, `src/Header/Component.client.tsx`, `src/Header/Nav/index.tsx`, and `src/Header/config.ts` now point to HeaderDD02.
|
|
33
41
|
3. Reuse existing project utilities and fields where appropriate.
|
|
34
|
-
4.
|
|
42
|
+
4. Confirm the active Header global has not created a duplicate Header registration.
|
|
35
43
|
5. Keep the shared defaultLexical standard.
|
|
36
44
|
6. Keep BlocksFeature({ blocks: [] }).
|
|
37
|
-
7.
|
|
38
|
-
8.
|
|
39
|
-
9.
|
|
40
|
-
10. Report every file modified and any manual content migration required.
|
|
45
|
+
7. Preserve layout, providers, transitions and mobile behaviour that are intentionally kept by the target project.
|
|
46
|
+
8. Add any required CSS variables or utility classes using the current project's styling system.
|
|
47
|
+
9. Report every file modified and any manual content migration required.
|
|
41
48
|
|
|
42
49
|
Do not modify database records automatically.
|
|
43
50
|
Do not run destructive migrations.
|
|
44
|
-
Do not
|
|
51
|
+
Do not delete the backup folder until the replacement is verified.
|
|
45
52
|
```
|
|
46
53
|
|
|
47
54
|
## Bundled shared UI primitives
|
|
48
55
|
|
|
49
56
|
HeaderDD02 includes shared templates for `src/components/ui/navigation-menu.tsx`, `src/components/animate-ui/components/animate/tooltip.tsx`, `src/components/animate-ui/primitives/animate/tooltip.tsx`, `src/components/animate-ui/primitives/animate/slot.tsx`, and `src/lib/get-strict-context.tsx`. The installer copies them only when missing and preserves existing target files.
|
|
50
57
|
|
|
51
|
-
If package dependencies are missing, run the install command printed by the CLI, for example `pnpm add @radix-ui/react-navigation-menu class-variance-authority motion @floating-ui/react`.
|
|
58
|
+
If package dependencies are missing, run the install command printed by the CLI, for example `pnpm add @radix-ui/react-navigation-menu class-variance-authority motion @floating-ui/react`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GlobalAfterChangeHook } from 'payload'
|
|
2
|
+
import { revalidateTag } from 'next/cache'
|
|
3
|
+
|
|
4
|
+
export const revalidateHeader: GlobalAfterChangeHook = ({ doc, req: { payload, context } }) => {
|
|
5
|
+
if (!context.disableRevalidate) {
|
|
6
|
+
payload.logger.info('Revalidating header')
|
|
7
|
+
revalidateTag('global_header')
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return doc
|
|
11
|
+
}
|
|
@@ -251,7 +251,7 @@ export default function HeaderDD02({ data, variant = 'default', sticky = true }:
|
|
|
251
251
|
}, [enableHideOnScroll, scrollThreshold])
|
|
252
252
|
|
|
253
253
|
// Extract navItems from header02 data
|
|
254
|
-
const navItems = data?.header02?.navItems || []
|
|
254
|
+
const navItems = data?.header02?.navItems || (data as any)?.navItems || []
|
|
255
255
|
|
|
256
256
|
return (
|
|
257
257
|
<>
|
|
@@ -17,15 +17,33 @@
|
|
|
17
17
|
"@/blocks/CounterBlock/config",
|
|
18
18
|
"@/blocks/MediaBlock/config"
|
|
19
19
|
],
|
|
20
|
-
"excludedHeaderFiles": [
|
|
21
|
-
"src/Header/Component.tsx",
|
|
22
|
-
"src/Header/Component.client.tsx",
|
|
23
|
-
"src/Header/config.ts",
|
|
24
|
-
"src/Header/Nav/index.tsx",
|
|
25
|
-
"src/Header/hooks/revalidateHeader.ts"
|
|
26
|
-
]
|
|
20
|
+
"excludedHeaderFiles": []
|
|
27
21
|
},
|
|
28
22
|
"files": [
|
|
23
|
+
{
|
|
24
|
+
"from": "Component.tsx",
|
|
25
|
+
"to": "src/Header/Component.tsx"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"from": "Component.client.tsx",
|
|
29
|
+
"to": "src/Header/Component.client.tsx"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"from": "Header.config.ts",
|
|
33
|
+
"to": "src/Header/config.ts"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"from": "Nav/index.tsx",
|
|
37
|
+
"to": "src/Header/Nav/index.tsx"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"from": "hooks/revalidateHeader.ts",
|
|
41
|
+
"to": "src/Header/hooks/revalidateHeader.ts"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"from": "RowLabel.tsx",
|
|
45
|
+
"to": "src/Header/RowLabel.tsx"
|
|
46
|
+
},
|
|
29
47
|
{
|
|
30
48
|
"from": "index.tsx",
|
|
31
49
|
"to": "src/Header/variants/HeaderDD02/index.tsx"
|
|
@@ -38,10 +56,6 @@
|
|
|
38
56
|
"from": "config.ts",
|
|
39
57
|
"to": "src/Header/variants/HeaderDD02/config.ts"
|
|
40
58
|
},
|
|
41
|
-
{
|
|
42
|
-
"from": "RowLabel.tsx",
|
|
43
|
-
"to": "src/Header/RowLabel.tsx"
|
|
44
|
-
},
|
|
45
59
|
{
|
|
46
60
|
"from": "README.md",
|
|
47
61
|
"to": "src/Header/variants/HeaderDD02/README.md"
|
|
@@ -90,6 +104,10 @@
|
|
|
90
104
|
{
|
|
91
105
|
"path": "src/utilities/ui.ts",
|
|
92
106
|
"reason": "HeaderDD02 uses cn from @/utilities/ui."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"path": "src/utilities/getGlobals.ts",
|
|
110
|
+
"reason": "The active Header server component fetches the Payload header global through getCachedGlobal."
|
|
93
111
|
}
|
|
94
112
|
],
|
|
95
113
|
"collectionRegistration": {
|
|
@@ -101,8 +119,7 @@
|
|
|
101
119
|
"manual": [
|
|
102
120
|
"This header uses the shared `defaultLexical` editor standard from `@/fields/defaultLexical`. Project-specific Lexical blocks are intentionally not bundled. The nested `BlocksFeature` uses an empty `blocks` array so each target project can register only the blocks it requires.",
|
|
103
121
|
"Removed source Lexical block imports: `@/blocks/AnimatedText/config`, `@/blocks/ButtonWithIcon/config`, `@/blocks/CounterBlock/config`, `@/blocks/MediaBlock/config`.",
|
|
104
|
-
"HeaderDD02
|
|
105
|
-
"This component template does not yet patch an existing active Header global, replace Header/Component.tsx, or inspect database-stored Header content automatically. Review the existing Header global before activation and back up active files before wiring the variant into the target project.",
|
|
122
|
+
"HeaderDD02 header workflow backs up the existing active src/Header folder, then installs a complete replacement Header shell wired directly to HeaderDD02. Header01 and Header03 are not bundled.",
|
|
106
123
|
"Inspect any existing target Header richText data before replacing an active Header schema. Do not apply the empty nested blocks extension point to stored content that already depends on registered block node types.",
|
|
107
124
|
"Verify the target `src/fields/defaultLexical.ts` exports a compatible `defaultLexical` helper that accepts `defaultLexical({ features: [] })` and does not inject unrelated project-specific blocks.",
|
|
108
125
|
"Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers.",
|
|
@@ -111,8 +128,7 @@
|
|
|
111
128
|
"manualSteps": [
|
|
112
129
|
"This header uses the shared `defaultLexical` editor standard from `@/fields/defaultLexical`. Project-specific Lexical blocks are intentionally not bundled. The nested `BlocksFeature` uses an empty `blocks` array so each target project can register only the blocks it requires.",
|
|
113
130
|
"Removed source Lexical block imports: `@/blocks/AnimatedText/config`, `@/blocks/ButtonWithIcon/config`, `@/blocks/CounterBlock/config`, `@/blocks/MediaBlock/config`.",
|
|
114
|
-
"HeaderDD02
|
|
115
|
-
"This component template does not yet patch an existing active Header global, replace Header/Component.tsx, or inspect database-stored Header content automatically. Review the existing Header global before activation and back up active files before wiring the variant into the target project.",
|
|
131
|
+
"HeaderDD02 header workflow backs up the existing active src/Header folder, then installs a complete replacement Header shell wired directly to HeaderDD02. Header01 and Header03 are not bundled.",
|
|
116
132
|
"Inspect any existing target Header richText data before replacing an active Header schema. Do not apply the empty nested blocks extension point to stored content that already depends on registered block node types.",
|
|
117
133
|
"Verify the target `src/fields/defaultLexical.ts` exports a compatible `defaultLexical` helper that accepts `defaultLexical({ features: [] })` and does not inject unrelated project-specific blocks.",
|
|
118
134
|
"Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers.",
|
|
@@ -121,7 +137,7 @@
|
|
|
121
137
|
"notes": [
|
|
122
138
|
"Converted from DesignsDustedv3 Header02 after tracing Header/variants/Header02/index.tsx and its direct imports.",
|
|
123
139
|
"Header02 styling is inline Tailwind class usage plus style jsx global blocks in index.tsx and MobileBottomNav/index.tsx; no separate Header02 stylesheet was imported.",
|
|
124
|
-
"
|
|
140
|
+
"The header workflow now installs active Component.tsx, Component.client.tsx, config.ts, Nav, RowLabel, and revalidateHeader files so the installed header is wired into the project immediately.",
|
|
125
141
|
"NavigationMenu and animate-ui tooltip primitives are bundled as shared files because HeaderDD02 imports them directly."
|
|
126
142
|
],
|
|
127
143
|
"backupExistingDestination": true,
|