diff --git a/apps/www/.vitepress/theme/components/APITable.vue b/apps/www/.vitepress/theme/components/APITable.vue new file mode 100644 index 00000000..d785cc1b --- /dev/null +++ b/apps/www/.vitepress/theme/components/APITable.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/.vitepress/theme/components/index.ts b/apps/www/.vitepress/theme/components/index.ts index 8e6df429..ec426bc3 100644 --- a/apps/www/.vitepress/theme/components/index.ts +++ b/apps/www/.vitepress/theme/components/index.ts @@ -1,5 +1,6 @@ export { default as CodeWrapper } from './CodeWrapper' export { default as ComponentPreview } from './ComponentPreview.vue' +export { default as APITable } from './APITable.vue' export { default as TabPreview } from './TabPreview.vue' export { default as TabMarkdown } from './TabMarkdown.vue' export { default as TabsMarkdown } from './TabsMarkdown.vue' diff --git a/apps/www/scripts/autogen.ts b/apps/www/scripts/autogen.ts index ca386e81..6fc10009 100644 --- a/apps/www/scripts/autogen.ts +++ b/apps/www/scripts/autogen.ts @@ -42,16 +42,16 @@ components.forEach((componentPath) => { let parsedString = '\n\n' if (meta.props.length) - parsedString += `\n` + parsedString += `\n` if (meta.events.length) - parsedString += `\n\n` + parsedString += `\n\n` if (meta.slots.length) - parsedString += `\n\n` + parsedString += `\n\n` if (meta.methods.length) - parsedString += `\n\n` + parsedString += `\n\n` writeFileSync(metaMdFilePath, parsedString) } @@ -90,7 +90,6 @@ function parseMeta(meta: ComponentMeta) { .filter(prop => !prop.global) .map((prop) => { let defaultValue = prop.default - let type = prop.type const { name, description, required } = prop if (name === 'as') @@ -99,13 +98,10 @@ function parseMeta(meta: ComponentMeta) { if (defaultValue === 'undefined') defaultValue = undefined - if (!type.includes('AcceptableValue')) - type = parseTypeFromSchema(prop.schema) || type - return ({ name, description: md.render(description), - type: type.replace(/\s*\|\s*undefined/g, ''), + type: prop.type.replace(/\s*\|\s*undefined/g, ''), required, default: defaultValue ?? undefined, }) diff --git a/apps/www/src/content/docs/charts/area.md b/apps/www/src/content/docs/charts/area.md index 72722ef1..8edbe955 100644 --- a/apps/www/src/content/docs/charts/area.md +++ b/apps/www/src/content/docs/charts/area.md @@ -26,3 +26,5 @@ npx shadcn-vue@latest add chart-area Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. + + diff --git a/apps/www/src/content/docs/charts/bar.md b/apps/www/src/content/docs/charts/bar.md index 7c5385b3..40e86efe 100644 --- a/apps/www/src/content/docs/charts/bar.md +++ b/apps/www/src/content/docs/charts/bar.md @@ -26,3 +26,5 @@ npx shadcn-vue@latest add chart-bar Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. + + diff --git a/apps/www/src/content/docs/charts/donut.md b/apps/www/src/content/docs/charts/donut.md index 3f07af01..236eecad 100644 --- a/apps/www/src/content/docs/charts/donut.md +++ b/apps/www/src/content/docs/charts/donut.md @@ -26,3 +26,5 @@ npx shadcn-vue@latest add chart-donut Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. + + diff --git a/apps/www/src/content/docs/charts/line.md b/apps/www/src/content/docs/charts/line.md index 00547d98..c48a40a0 100644 --- a/apps/www/src/content/docs/charts/line.md +++ b/apps/www/src/content/docs/charts/line.md @@ -26,3 +26,5 @@ npx shadcn-vue@latest add chart-line Follow the [guide](/docs/charts/guide.html#installation) to complete the setup. + + diff --git a/apps/www/src/content/meta/AreaChart.md b/apps/www/src/content/meta/AreaChart.md index c709e645..16b4c056 100644 --- a/apps/www/src/content/meta/AreaChart.md +++ b/apps/www/src/content/meta/AreaChart.md @@ -1,10 +1,10 @@ - - - - - -