Skip to content

Commit 08a5333

Browse files
Copilothuangyiirene
andcommitted
Changes before error encountered
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 67b87fd commit 08a5333

7 files changed

Lines changed: 32 additions & 1 deletion

File tree

apps/site/app/components/ComponentDemo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ export { InteractiveDemo as ComponentDemo, DemoGrid } from './InteractiveDemo';
33

44
// Legacy exports for backward compatibility
55
export { InteractiveDemo, InteractiveDemo as CodeDemo } from './InteractiveDemo';
6+
7+
// Export types for use in MDX files
8+
export type { SchemaNode } from './InteractiveDemo';

apps/site/app/components/InteractiveDemo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { SchemaNode } from '@object-ui/core';
66
import { Tabs, Tab } from 'fumadocs-ui/components/tabs';
77
import { CodeBlock, Pre } from 'fumadocs-ui/components/codeblock';
88

9+
// Re-export SchemaNode type for use in MDX files
10+
export type { SchemaNode } from '@object-ui/core';
11+
912
interface InteractiveDemoProps {
1013
schema: SchemaNode;
1114
title?: string;

apps/site/app/components/ObjectUIProvider.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import { initializeComponents } from '@object-ui/components';
55
import { ComponentRegistry } from '@object-ui/core';
66
import { useEffect } from 'react';
77

8+
// Import plugins to register their component types
9+
import '@object-ui/plugin-editor';
10+
import '@object-ui/plugin-charts';
11+
import '@object-ui/plugin-kanban';
12+
import '@object-ui/plugin-markdown';
13+
814
export function ObjectUIProvider({ children }: { children: React.ReactNode }) {
915
// Explicitly call init to ensure components are registered
1016
useEffect(() => {

apps/site/mdx-components.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import defaultComponents from 'fumadocs-ui/mdx';
22
import { ComponentDemo, DemoGrid, CodeDemo } from './app/components/ComponentDemo';
33

4+
// Re-export types for use in MDX files
5+
export type { SchemaNode } from './app/components/ComponentDemo';
6+
47
export default {
58
...defaultComponents,
69
ComponentDemo,

apps/site/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"@object-ui/core": "workspace:*",
1515
"@object-ui/react": "workspace:*",
1616
"@object-ui/types": "workspace:*",
17+
"@object-ui/plugin-editor": "workspace:*",
18+
"@object-ui/plugin-charts": "workspace:*",
19+
"@object-ui/plugin-kanban": "workspace:*",
20+
"@object-ui/plugin-markdown": "workspace:*",
1721
"fumadocs-core": "^16.4.7",
1822
"fumadocs-mdx": "^14.2.6",
1923
"fumadocs-ui": "^16.4.7",

packages/types/src/feedback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @packageDocumentation
1616
*/
1717

18-
import type { BaseSchema, SchemaNode } from './base';
18+
import type { BaseSchema } from './base';
1919

2020
/**
2121
* Loading/Spinner component

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)