Skip to content

fix(layer): resolve UI components from layer directory in multi-layer setup#3

Merged
amondnet merged 6 commits intomainfrom
fix/layer-component-resolution
Dec 3, 2025
Merged

fix(layer): resolve UI components from layer directory in multi-layer setup#3
amondnet merged 6 commits intomainfrom
fix/layer-component-resolution

Conversation

@amondnet
Copy link
Copy Markdown
Contributor

Summary

This PR fixes component resolution issues in multi-layer Nuxt setups where UI components are defined in the layer package but need to be discovered at runtime.

  • Fixed shadcn.ts module to properly discover UI components from Nuxt layer packages
  • Updated shadcn configuration to search node_modules for @pleaseai/docs-layer when resolving components
  • Modified templates to use UiSeparator prefix for correct component references
  • Added comprehensive content components for documentation rendering (Prose, Tabs, Steps, Callout, etc.)
  • Fixed ESLint issues with missing return type annotations
  • Added SSR width plugin for layout measurement

Key Changes

Core Fix:

  • /packages/layer/modules/shadcn.ts - Enhanced layer component discovery logic
  • /packages/layer/nuxt.config.ts - Updated shadcn module configuration

UI Components Added:

  • Alert, Collapsible, Tabs components with full structure
  • Content components for documentation (30+ Prose components, Tabs, Steps, Callout, etc.)

ESLint Compliance:

  • Fixed missing return types in /packages/layer/utils/git.ts
  • Fixed missing return types in /packages/layer/utils/meta.ts
  • Fixed missing return types in /packages/layer/app/composables/useNavigation.ts

Documentation Updates:

  • Enhanced component documentation with examples
  • Updated installation and configuration guides
  • Added component overview and usage examples

Test Plan

  • Verify all UI components render correctly in the documentation site
  • Check that layer components are properly resolved in multi-layer setup
  • Run ESLint checks: bun lint:fix
  • Test type checking: cd packages/layer && bun typecheck
  • Build documentation: bun build
  • Run development server: bun dev and test component rendering

… setup

- Fixed shadcn.ts to properly discover UI components from Nuxt layer packages
- Updated shadcn module to search node_modules for @pleaseai/docs-layer when resolving components
- Modified templates to use UiSeparator prefix for component references
- Added missing return type annotations to utils and composables (ESLint compliance)
- Added content components for documentation rendering
- Updated nuxt.config.ts shadcn configuration for layer compatibility
- Fixed process import in utils/git.ts for node environment

This resolves component resolution issues in multi-layer Nuxt setups where UI components
are defined in the layer package but need to be discovered at runtime.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Nov 28, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
docs-please 7f2af98 Dec 02 2025, 12:53 AM

…layer setup

- Add useNuxt() to content.config.ts to resolve app's content directory
- Register content components globally via components:dirs hook
- Add CopyButton, CodeBlockCommand components and Icons.ts from shadcn-vue
- Add tooltip UI components via shadcn-vue CLI
- Add useConfig composable for package manager preference
- Fix container utility class definition for Tailwind CSS v4
- Add @tabler/icons-vue dependency for icon components
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 1, 2025

Deploying docs-please with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7f2af98
Status: ✅  Deploy successful!
Preview URL: https://b61ed963.docs-please.pages.dev
Branch Preview URL: https://fix-layer-component-resoluti.docs-please.pages.dev

View logs

…layer setup

- Register app/components/app and app/components/docs directories explicitly
- Fix CSS module to import main.css after @source directives
- Remove duplicate tailwindcss import from main.css
- Use @Utility directive for container class (Tailwind v4 syntax)
- Add exsolve dependency for module path resolution
@amondnet amondnet self-assigned this Dec 1, 2025
- Keep component registration hooks for app, docs, content directories
- Use main's updated component implementations
- Preserve exsolve dependency and CSS module changes
- Update landing page to main's new design
@amondnet amondnet merged commit 1f40071 into main Dec 3, 2025
1 of 3 checks passed
@amondnet amondnet deleted the fix/layer-component-resolution branch December 3, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant