Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/plugin-charts/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import React, { Suspense } from 'react';
import { ComponentRegistry } from '@object-ui/core';
import { Skeleton } from '@object-ui/components';
import type { ChartConfig } from './ChartContainerImpl';

// Export types for external use
export type { BarChartSchema } from './types';
Expand Down Expand Up @@ -124,10 +125,11 @@ export const ChartRenderer: React.FC<ChartRendererProps> = ({ schema }) => {
// 3. Auto-generate config/colors if missing
if (!config && series) {
const colors = (schema as any).colors || ['hsl(var(--chart-1))', 'hsl(var(--chart-2))', 'hsl(var(--chart-3))'];
config = {};
const newConfig: ChartConfig = {};
series.forEach((s: any, idx: number) => {
config[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
newConfig[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
});
config = newConfig;
}

return {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-chatbot/src/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useState } from 'react';
* - Use case: Connect to backend API or trigger custom actions on message send
*/
ComponentRegistry.register('chatbot',
({ schema, className, ...props }) => {
({ schema, className, ...props }: { schema: ChatbotSchema; className?: string; [key: string]: any }) => {
// Initialize messages from schema or use empty array
const [messages, setMessages] = useState<ChatMessage[]>(
schema.messages?.map((msg: any, idx: number) => ({
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-dashboard/src/DashboardRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { ComponentRegistry } from '@object-ui/core';
import type { DashboardSchema } from '@object-ui/types';
import type { DashboardSchema, DashboardWidgetSchema } from '@object-ui/types';
import { SchemaRenderer } from '@object-ui/react';
import { cn } from '@object-ui/components';
import { forwardRef } from 'react';
Expand All @@ -30,7 +30,7 @@ export const DashboardRenderer = forwardRef<HTMLDivElement, { schema: DashboardS
}}
{...props}
>
{schema.widgets?.map((widget) => (
{schema.widgets?.map((widget: DashboardWidgetSchema) => (
<div
key={widget.id}
className={cn("border rounded-lg p-4 bg-card text-card-foreground shadow-sm")}
Expand Down
17 changes: 12 additions & 5 deletions packages/plugin-dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"outDir": "dist",
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
// Removed explicit rootDir to prevent file not under rootDir errors when importing from workspace dependencies
"noEmit": false,
"declaration": true,
"declarationMap": true,
"composite": true,
"jsx": "react-jsx"
"declarationMap": true,
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
}