Skip to content

Commit cfdfca2

Browse files
committed
Merge main branch and resolve conflicts
- Merged test and test:watch scripts with type-check and lint scripts - Kept comprehensive test implementations over placeholder tests - All plugin packages now have full script support
2 parents 05a2803 + 858004f commit cfdfca2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4468
-194
lines changed

apps/playground/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
"@object-ui/designer": "workspace:*",
1717
"@object-ui/plugin-charts": "workspace:*",
1818
"@object-ui/plugin-editor": "workspace:*",
19+
"@object-ui/plugin-kanban": "workspace:*",
20+
"@object-ui/plugin-markdown": "workspace:*",
1921
"@object-ui/react": "workspace:*",
2022
"lucide-react": "^0.469.0",
2123
"react": "^18.3.1",
2224
"react-dom": "^18.3.1",
2325
"react-router-dom": "^7.12.0",
24-
"@object-ui/plugin-markdown": "workspace:*",
25-
"@object-ui/plugin-kanban": "workspace:*"
26+
"sonner": "^2.0.7"
2627
},
2728
"devDependencies": {
2829
"@eslint/js": "^9.39.1",

apps/playground/src/App.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
1+
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
2+
import { Toaster } from 'sonner';
23
import { Home } from './pages/Home';
34
import { Studio } from './pages/Studio';
5+
import { MyDesigns } from './pages/MyDesigns';
46
import '@object-ui/components';
57

68
// Import lazy-loaded plugins
@@ -15,9 +17,13 @@ import './index.css';
1517
export default function App() {
1618
return (
1719
<Router>
20+
<Toaster position="top-right" richColors />
1821
<Routes>
1922
<Route path="/" element={<Home />} />
20-
<Route path="/:id" element={<Studio />} />
23+
<Route path="/my-designs" element={<MyDesigns />} />
24+
<Route path="/studio/:id" element={<Studio />} />
25+
{/* Default redirect to first example if typed manually specifically */}
26+
<Route path="/studio" element={<Navigate to="/studio/dashboard" replace />} />
2127
</Routes>
2228
</Router>
2329
);

apps/playground/src/pages/Home.tsx

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from 'react';
22
import { useNavigate } from 'react-router-dom';
33
import { exampleCategories } from '../data/examples';
4-
import { LayoutTemplate, ArrowRight, Component, Layers, Database, Shield, Box } from 'lucide-react';
4+
import { LayoutTemplate, ArrowRight, Component, Layers, Database, Shield, Box, FolderOpen, Plus } from 'lucide-react';
55

66
const CategoryIcon = ({ name }: { name: string }) => {
77
switch (name) {
@@ -29,16 +29,32 @@ export const Home = () => {
2929
</div>
3030
<span className="font-bold text-xl tracking-tight bg-gradient-to-r from-gray-900 to-gray-600 bg-clip-text text-transparent">Object UI Studio</span>
3131
</div>
32-
<a
33-
href="https://github.com/objectql/objectui"
34-
target="_blank"
35-
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 bg-white/50 hover:bg-white border border-gray-200 rounded-lg transition-all shadow-sm hover:shadow"
36-
>
37-
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
38-
<path fillRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clipRule="evenodd" />
39-
</svg>
40-
GitHub
41-
</a>
32+
<div className="flex items-center gap-3">
33+
<button
34+
onClick={() => navigate('/studio/new')}
35+
className="flex items-center gap-2 px-4 py-2 text-sm font-semibold text-indigo-600 bg-indigo-50 hover:bg-indigo-100 border border-indigo-200 rounded-lg transition-all shadow-sm hover:shadow"
36+
>
37+
<Plus className="w-4 h-4" />
38+
New Design
39+
</button>
40+
<button
41+
onClick={() => navigate('/my-designs')}
42+
className="flex items-center gap-2 px-4 py-2 text-sm font-semibold text-gray-700 hover:text-gray-900 bg-white/50 hover:bg-white border border-gray-200 rounded-lg transition-all shadow-sm hover:shadow"
43+
>
44+
<FolderOpen className="w-4 h-4" />
45+
My Designs
46+
</button>
47+
<a
48+
href="https://github.com/objectql/objectui"
49+
target="_blank"
50+
className="flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 bg-white/50 hover:bg-white border border-gray-200 rounded-lg transition-all shadow-sm hover:shadow"
51+
>
52+
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
53+
<path fillRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clipRule="evenodd" />
54+
</svg>
55+
GitHub
56+
</a>
57+
</div>
4258
</div>
4359
</header>
4460

@@ -62,11 +78,28 @@ export const Home = () => {
6278
Build Stunning Interfaces,<br />
6379
<span className="bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 bg-clip-text text-transparent">Purely from JSON.</span>
6480
</h1>
65-
<p className="max-w-2xl mx-auto text-xl text-gray-600 leading-relaxed">
81+
<p className="max-w-2xl mx-auto text-xl text-gray-600 leading-relaxed mb-8">
6682
Object UI transforms JSON schemas into fully functional, accessible, and responsive React applications.
6783
<br className="hidden sm:block" />
68-
<span className="font-semibold text-gray-700">Select a template below to start building.</span>
84+
<span className="font-semibold text-gray-700">Select a template below or start from scratch.</span>
6985
</p>
86+
87+
<div className="flex justify-center gap-4">
88+
<button
89+
onClick={() => navigate('/studio/new')}
90+
className="flex items-center gap-2 px-6 py-3 text-lg font-bold text-white bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-700 hover:to-purple-700 rounded-xl shadow-lg shadow-indigo-300/50 transition-all transform hover:scale-105"
91+
>
92+
<Plus className="w-5 h-5" />
93+
Start New Design
94+
</button>
95+
<button
96+
onClick={() => navigate('/my-designs')}
97+
className="flex items-center gap-2 px-6 py-3 text-lg font-bold text-gray-700 bg-white hover:bg-gray-50 border-2 border-gray-200 rounded-xl shadow-lg transition-all transform hover:scale-105"
98+
>
99+
<FolderOpen className="w-5 h-5" />
100+
Open Saved
101+
</button>
102+
</div>
70103
</div>
71104

72105
{/* Category Filter */}

0 commit comments

Comments
 (0)