Skip to content

Commit 3f307da

Browse files
Copilothotlong
andcommitted
Extract chatbot and timeline to plugin packages
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 5f897da commit 3f307da

9 files changed

Lines changed: 239 additions & 8 deletions

File tree

packages/components/src/ui/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export * from './calendar';
1919
export * from './calendar-view';
2020
export * from './card';
2121
export * from './carousel';
22-
export * from './chatbot';
2322
export * from './checkbox';
2423
export * from './collapsible';
2524
export * from './combobox';
@@ -60,7 +59,6 @@ export * from './switch';
6059
export * from './table';
6160
export * from './tabs';
6261
export * from './textarea';
63-
export * from './timeline';
6462
export * from './toast';
6563
export { Toaster as ToastNotifier } from './toaster';
6664
export * from './toggle-group';
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@object-ui/plugin-chatbot",
3+
"version": "0.3.0",
4+
"type": "module",
5+
"license": "MIT",
6+
"description": "Chatbot interface plugin for Object UI",
7+
"homepage": "https://www.objectui.org",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/objectstack-ai/objectui.git",
11+
"directory": "packages/plugin-chatbot"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/objectstack-ai/objectui/issues"
15+
},
16+
"main": "dist/index.umd.cjs",
17+
"module": "dist/index.js",
18+
"types": "dist/index.d.ts",
19+
"exports": {
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"import": "./dist/index.js",
23+
"require": "./dist/index.umd.cjs"
24+
}
25+
},
26+
"scripts": {
27+
"build": "vite build",
28+
"test": "vitest run",
29+
"test:watch": "vitest",
30+
"type-check": "tsc --noEmit",
31+
"lint": "eslint ."
32+
},
33+
"dependencies": {
34+
"@object-ui/components": "workspace:*",
35+
"@object-ui/core": "workspace:*",
36+
"@object-ui/react": "workspace:*",
37+
"@object-ui/types": "workspace:*",
38+
"lucide-react": "^0.468.0"
39+
},
40+
"peerDependencies": {
41+
"react": "^18.0.0 || ^19.0.0",
42+
"react-dom": "^18.0.0 || ^19.0.0"
43+
},
44+
"devDependencies": {
45+
"@types/react": "^18.3.12",
46+
"@types/react-dom": "^18.3.1",
47+
"@vitejs/plugin-react": "^4.2.1",
48+
"typescript": "^5.9.3",
49+
"vite": "^7.3.1",
50+
"vite-plugin-dts": "^4.5.4"
51+
}
52+
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
*/
88

99
import * as React from "react"
10-
import { cn } from "../lib/utils"
11-
import { Button } from "./button"
12-
import { Input } from "./input"
13-
import { ScrollArea } from "./scroll-area"
14-
import { Avatar, AvatarFallback, AvatarImage } from "./avatar"
10+
import { cn } from "@object-ui/components"
11+
import { Button, Input, ScrollArea, Avatar, AvatarFallback, AvatarImage } from "@object-ui/components"
1512
import { Send } from "lucide-react"
1613

1714
// Message type definition
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"jsx": "react-jsx",
6+
"baseUrl": ".",
7+
"paths": {
8+
"@/*": ["src/*"]
9+
},
10+
"noEmit": false,
11+
"declaration": true,
12+
"composite": true,
13+
"declarationMap": true,
14+
"skipLibCheck": true
15+
},
16+
"include": ["src"],
17+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
18+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import { defineConfig } from 'vite';
10+
import react from '@vitejs/plugin-react';
11+
import dts from 'vite-plugin-dts';
12+
import { resolve } from 'path';
13+
14+
export default defineConfig({
15+
plugins: [
16+
react(),
17+
dts({
18+
insertTypesEntry: true,
19+
include: ['src'],
20+
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
21+
skipDiagnostics: true,
22+
}),
23+
],
24+
resolve: {
25+
alias: {
26+
'@': resolve(__dirname, './src'),
27+
},
28+
},
29+
build: {
30+
lib: {
31+
entry: resolve(__dirname, 'src/index.tsx'),
32+
name: 'ObjectUIPluginChatbot',
33+
fileName: 'index',
34+
},
35+
rollupOptions: {
36+
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', 'lucide-react'],
37+
output: {
38+
globals: {
39+
react: 'React',
40+
'react-dom': 'ReactDOM',
41+
'@object-ui/components': 'ObjectUIComponents',
42+
'@object-ui/core': 'ObjectUICore',
43+
'@object-ui/react': 'ObjectUIReact',
44+
'lucide-react': 'LucideReact',
45+
},
46+
},
47+
},
48+
},
49+
});
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "@object-ui/plugin-timeline",
3+
"version": "0.3.0",
4+
"type": "module",
5+
"license": "MIT",
6+
"description": "Timeline component plugin for Object UI",
7+
"homepage": "https://www.objectui.org",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/objectstack-ai/objectui.git",
11+
"directory": "packages/plugin-timeline"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/objectstack-ai/objectui/issues"
15+
},
16+
"main": "dist/index.umd.cjs",
17+
"module": "dist/index.js",
18+
"types": "dist/index.d.ts",
19+
"exports": {
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"import": "./dist/index.js",
23+
"require": "./dist/index.umd.cjs"
24+
}
25+
},
26+
"scripts": {
27+
"build": "vite build",
28+
"test": "vitest run",
29+
"test:watch": "vitest",
30+
"type-check": "tsc --noEmit",
31+
"lint": "eslint ."
32+
},
33+
"dependencies": {
34+
"@object-ui/components": "workspace:*",
35+
"@object-ui/core": "workspace:*",
36+
"@object-ui/react": "workspace:*",
37+
"@object-ui/types": "workspace:*"
38+
},
39+
"peerDependencies": {
40+
"react": "^18.0.0 || ^19.0.0",
41+
"react-dom": "^18.0.0 || ^19.0.0"
42+
},
43+
"devDependencies": {
44+
"@types/react": "^18.3.12",
45+
"@types/react-dom": "^18.3.1",
46+
"@vitejs/plugin-react": "^4.2.1",
47+
"typescript": "^5.9.3",
48+
"vite": "^7.3.1",
49+
"vite-plugin-dts": "^4.5.4"
50+
}
51+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import * as React from "react"
10-
import { cn } from "../lib/utils"
10+
import { cn } from "@object-ui/components"
1111

1212
const Timeline = React.forwardRef<
1313
HTMLOListElement,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"jsx": "react-jsx",
6+
"baseUrl": ".",
7+
"paths": {
8+
"@/*": ["src/*"]
9+
},
10+
"noEmit": false,
11+
"declaration": true,
12+
"composite": true,
13+
"declarationMap": true,
14+
"skipLibCheck": true
15+
},
16+
"include": ["src"],
17+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
18+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import { defineConfig } from 'vite';
10+
import react from '@vitejs/plugin-react';
11+
import dts from 'vite-plugin-dts';
12+
import { resolve } from 'path';
13+
14+
export default defineConfig({
15+
plugins: [
16+
react(),
17+
dts({
18+
insertTypesEntry: true,
19+
include: ['src'],
20+
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
21+
skipDiagnostics: true,
22+
}),
23+
],
24+
resolve: {
25+
alias: {
26+
'@': resolve(__dirname, './src'),
27+
},
28+
},
29+
build: {
30+
lib: {
31+
entry: resolve(__dirname, 'src/index.tsx'),
32+
name: 'ObjectUIPluginTimeline',
33+
fileName: 'index',
34+
},
35+
rollupOptions: {
36+
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react'],
37+
output: {
38+
globals: {
39+
react: 'React',
40+
'react-dom': 'ReactDOM',
41+
'@object-ui/components': 'ObjectUIComponents',
42+
'@object-ui/core': 'ObjectUICore',
43+
'@object-ui/react': 'ObjectUIReact',
44+
},
45+
},
46+
},
47+
},
48+
});

0 commit comments

Comments
 (0)