mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
Both registry files carried the same de-branding leftover: Registry imported twice, once from @hanzo/docs-cli/build and once from fuma-cli/compiler. The first is `export * from` the second, so it was the same type under the same name. They also set env and onResolve. Neither is on the Registry interface and fuma-cli's runtime never reads either -- zero references in its dist -- so both were inert. onResolve called resolveExternal, which nothing exports; had anything reached that line it would have thrown. The two copies disagreed about the argument anyway: base-ui's named docs-ui, radix-ui's named base-ui, its own alternative rather than itself. Removing them takes five type errors off each package and changes no generated output.
349 lines
7.3 KiB
TypeScript
349 lines
7.3 KiB
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import type { Registry } from '@hanzo/docs-cli/build';
|
|
import * as path from 'node:path';
|
|
import { commonComponents, findSlotComponents } from '../../shared/registry.ts';
|
|
|
|
const dir = path.join(path.dirname(fileURLToPath(import.meta.url)), '../src');
|
|
|
|
// in shadcn cli, the order of files matters when writing import paths on consumer's codebase
|
|
export const registry: Registry = {
|
|
name: 'hanzo/base-ui',
|
|
dir,
|
|
tsconfigPath: '../tsconfig.json',
|
|
packageJson: '../package.json',
|
|
components: [
|
|
...commonComponents,
|
|
...(await findSlotComponents(dir)),
|
|
{
|
|
name: 'layouts/sidebar',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/sidebar/base.tsx',
|
|
target: '<dir>/docs-sidebar/base.tsx',
|
|
},
|
|
{
|
|
type: 'components',
|
|
path: 'components/sidebar/page-tree.tsx',
|
|
target: '<dir>/docs-sidebar/page-tree.tsx',
|
|
},
|
|
{
|
|
type: 'components',
|
|
path: 'components/sidebar/link-item.tsx',
|
|
target: '<dir>/docs-sidebar/link-item.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'layouts/shared',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/shared/index.tsx',
|
|
target: '<dir>/shared/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/shared',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/shared/client.tsx',
|
|
target: '<dir>/shared/client.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/shared',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'layouts/docs',
|
|
files: [
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/docs/index.tsx',
|
|
target: '<dir>/docs/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/docs',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/docs/client.tsx',
|
|
target: '<dir>/docs/client.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/docs',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/docs/page/index.tsx',
|
|
target: '<dir>/docs/page/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/docs/page',
|
|
},
|
|
},
|
|
],
|
|
unlisted: true,
|
|
},
|
|
{
|
|
name: 'layouts/flux',
|
|
files: [
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/flux/index.tsx',
|
|
target: '<dir>/flux/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/flux',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/flux/page/index.tsx',
|
|
target: '<dir>/flux/page/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/flux/page',
|
|
},
|
|
},
|
|
],
|
|
unlisted: true,
|
|
},
|
|
{
|
|
name: 'layouts/notebook',
|
|
files: [
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/notebook/index.tsx',
|
|
target: '<dir>/notebook/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/notebook',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/notebook/client.tsx',
|
|
target: '<dir>/notebook/client.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/notebook',
|
|
},
|
|
},
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/notebook/page/index.tsx',
|
|
target: '<dir>/notebook/page/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/notebook/page',
|
|
},
|
|
},
|
|
],
|
|
unlisted: true,
|
|
},
|
|
{
|
|
name: 'layouts/home',
|
|
files: [
|
|
{
|
|
type: 'layout',
|
|
path: 'layouts/home/index.tsx',
|
|
target: '<dir>/home/index.tsx',
|
|
meta: {
|
|
preserveAs: 'layouts/home',
|
|
},
|
|
},
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/navigation-menu.tsx',
|
|
},
|
|
],
|
|
unlisted: true,
|
|
},
|
|
{
|
|
name: 'accordion',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/accordion.tsx',
|
|
},
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/accordion.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'github-info',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/github-info.tsx',
|
|
},
|
|
],
|
|
description: 'A card to display GitHub repo info',
|
|
},
|
|
{
|
|
name: 'banner',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/banner.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'callout',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/callout.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'card',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/card.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'codeblock',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/codeblock.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'files',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/files.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'heading',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/heading.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'image-zoom',
|
|
description: 'Zoomable Image',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/image-zoom.tsx',
|
|
},
|
|
{
|
|
type: 'css',
|
|
path: 'components/image-zoom.css',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'inline-toc',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/inline-toc.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'steps',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/steps.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'tabs',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/tabs.tsx',
|
|
},
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/tabs.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'type-table',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'components/type-table.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'button',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/button.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'popover',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/popover.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'scroll-area',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/scroll-area.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'collapsible',
|
|
unlisted: true,
|
|
files: [
|
|
{
|
|
type: 'ui',
|
|
path: 'components/ui/collapsible.tsx',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'ai/page-actions',
|
|
description: 'Common page actions',
|
|
files: [
|
|
{
|
|
type: 'components',
|
|
path: 'layouts/shared/page-actions.tsx',
|
|
target: '<dir>/ai/page-actions.tsx',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
dependencies: {
|
|
'@hanzo/docs-core': null,
|
|
'@hanzo/docs-base-ui': null,
|
|
react: null,
|
|
},
|
|
};
|