blocks-dusted 0.1.4 → 0.1.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blocks-dusted",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Manifest-driven CLI for installing reusable Payload CMS blocks.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,4 +37,4 @@
37
37
  },
38
38
  "homepage": "https://github.com/Hadizainal/blocks-dusted#readme",
39
39
  "license": "MIT"
40
- }
40
+ }
@@ -44,7 +44,7 @@ export async function addTemplate({
44
44
  const missingRequired = checks.missingRequirements ?? []
45
45
  if (missingRequired.length > 0) {
46
46
  throw new Error(
47
- `Required project files are missing:\n${missingRequired.map((check) => `- ${check.path}: ${check.reason}`).join('\n')}`,
47
+ `Required project files are missing:\n${missingRequired.map(formatMissingRequirement).join('\n')}`,
48
48
  )
49
49
  }
50
50
  }
@@ -353,6 +353,11 @@ export async function addTemplate({
353
353
  )
354
354
  }
355
355
 
356
+ function formatMissingRequirement(check) {
357
+ const resolution = check.resolution ? `\n Resolve: ${check.resolution}` : ''
358
+ return `- ${check.path}: ${check.reason}${resolution}`
359
+ }
360
+
356
361
  function collectionRegistrationResults({ isCollectionTemplate, manifest, action }) {
357
362
  if (!isCollectionTemplate) {
358
363
  return [{ status: 'skipped', reason: `${manifest.type} templates do not use Payload config collection registration` }]
@@ -73,7 +73,8 @@
73
73
  },
74
74
  {
75
75
  "path": "src/components/ui/navigation-menu.tsx",
76
- "reason": "HeaderDD02 desktop navigation renders the target project's NavigationMenu primitives."
76
+ "reason": "HeaderDD02 desktop navigation renders the target project's NavigationMenu primitives.",
77
+ "resolution": "Install the shadcn/radix NavigationMenu primitive used by the target project, or copy the target project's existing navigation-menu.tsx to src/components/ui/navigation-menu.tsx before installing HeaderDD02."
77
78
  },
78
79
  {
79
80
  "path": "src/components/RichText/index.tsx",
@@ -85,7 +86,8 @@
85
86
  },
86
87
  {
87
88
  "path": "src/components/animate-ui/components/animate/tooltip.tsx",
88
- "reason": "HeaderDD02 MobileBottomNav uses the target tooltip primitives."
89
+ "reason": "HeaderDD02 MobileBottomNav uses the target tooltip primitives.",
90
+ "resolution": "Install or copy the animate-ui tooltip primitive that exports TooltipProvider, Tooltip, TooltipTrigger, and TooltipContent at src/components/animate-ui/components/animate/tooltip.tsx before installing HeaderDD02."
89
91
  }
90
92
  ],
91
93
  "collectionRegistration": {
@@ -101,7 +103,8 @@
101
103
  "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.",
102
104
  "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.",
103
105
  "Verify the target `src/fields/defaultLexical.ts` exports a compatible `defaultLexical` helper that accepts `defaultLexical({ features: [] })` and does not inject unrelated project-specific blocks.",
104
- "Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers."
106
+ "Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers.",
107
+ "If HeaderDD02 reports missing UI primitives, add `src/components/ui/navigation-menu.tsx` and `src/components/animate-ui/components/animate/tooltip.tsx` from the target design system before rerunning the installer."
105
108
  ],
106
109
  "manualSteps": [
107
110
  "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.",
@@ -110,7 +113,8 @@
110
113
  "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.",
111
114
  "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.",
112
115
  "Verify the target `src/fields/defaultLexical.ts` exports a compatible `defaultLexical` helper that accepts `defaultLexical({ features: [] })` and does not inject unrelated project-specific blocks.",
113
- "Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers."
116
+ "Wire `HeaderDD02` into the target Header global or render it directly after confirming the target project will not render two headers.",
117
+ "If HeaderDD02 reports missing UI primitives, add `src/components/ui/navigation-menu.tsx` and `src/components/animate-ui/components/animate/tooltip.tsx` from the target design system before rerunning the installer."
114
118
  ],
115
119
  "notes": [
116
120
  "Converted from DesignsDustedv3 Header02 after tracing Header/variants/Header02/index.tsx and its direct imports.",