Files
supabase/apps/ui-library/config/docs.ts
T
Tiago AntunesandIvan Vasilov 9bf981f371 feat(ui-library): add Realtime Monaco ui component (#41766)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES
## What kind of change does this PR introduce?

Adds a new Realtime Monaco component to the UI Library, enabling
collaborative code editing with Supabase Realtime synchronization using
Monaco Editor and Yjs.

## Additional context

This is WIP and used for discuss further changes to the y-supabase
provider.

## Demo

https://github.com/user-attachments/assets/84a761e5-73bb-478e-979a-682121ffee89



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added a new Realtime Monaco collaborative code editor component with
real-time synchronization support across multiple frameworks (Next.js,
React, React Router, Tanstack).

* **Documentation**
* Added comprehensive documentation and usage guides for the Realtime
Monaco component across all supported frameworks.

* **Dependencies**
* Added Monaco editor, Yjs, y-monaco, and Supabase collaboration
packages.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-03-17 13:55:03 +01:00

154 lines
4.0 KiB
TypeScript

import { SidebarNavGroup } from '@/types/nav'
export const gettingStarted: SidebarNavGroup = {
title: 'Getting Started',
items: [
{
title: 'Introduction',
href: '/docs/getting-started/introduction',
items: [],
commandItemLabel: 'Introduction',
},
{
title: 'Quick Start',
href: '/docs/getting-started/quickstart',
items: [],
commandItemLabel: 'Quick Start',
},
{
title: 'FAQ',
href: '/docs/getting-started/faq',
items: [],
commandItemLabel: 'FAQ',
},
],
}
export const aiEditorsRules: SidebarNavGroup = {
title: 'AI Editors Rules',
items: [
{
title: 'Prompts',
href: '/docs/ai-editors-rules/prompts',
items: [],
commandItemLabel: 'AI Editors Rules',
},
],
}
export const platformBlocks: SidebarNavGroup = {
title: 'Platform',
items: [
{
title: 'Platform Kit',
href: '/docs/platform/platform-kit',
items: [],
commandItemLabel: 'Platform Kit',
},
],
}
// Component definitions with supported frameworks
export const componentPages: SidebarNavGroup = {
title: 'Components',
items: [
{
title: 'Client',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/client',
items: [],
commandItemLabel: 'Supabase Client',
},
{
title: 'Password-Based Auth',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/password-based-auth',
items: [],
commandItemLabel: 'Password-Based Auth',
},
{
title: 'Social Auth',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/social-auth',
items: [],
new: true,
commandItemLabel: 'Social Auth',
},
{
title: 'Dropzone',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/dropzone',
items: [],
commandItemLabel: 'Dropzone (File Upload)',
},
{
title: 'Realtime Cursor',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/realtime-cursor',
items: [],
commandItemLabel: 'Realtime Cursor',
},
{
title: 'Realtime Monaco',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
href: '/docs/nextjs/realtime-monaco',
items: [],
commandItemLabel: 'Realtime Monaco',
},
{
title: 'Current User Avatar',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/current-user-avatar',
items: [],
commandItemLabel: 'Current User Avatar',
},
{
title: 'Realtime Avatar Stack',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react', 'vue', 'nuxtjs'],
href: '/docs/nextjs/realtime-avatar-stack',
items: [],
commandItemLabel: 'Realtime Avatar Stack',
},
{
title: 'Realtime Chat',
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
href: '/docs/nextjs/realtime-chat',
items: [],
commandItemLabel: 'Realtime Chat',
},
{
title: 'Infinite Query Hook',
supportedFrameworks: [],
href: '/docs/infinite-query-hook',
new: true,
items: [],
commandItemLabel: 'Infinite Query Hook',
},
],
}
export const COMMAND_ITEMS = [
...gettingStarted.items.map((item) => ({
label: item.commandItemLabel,
href: item.href,
})),
...aiEditorsRules.items.map((item) => ({
label: item.commandItemLabel,
href: item.href,
})),
...componentPages.items.map((item) => ({
label: item.commandItemLabel,
href: item.href,
})),
]
// Framework titles for display
export const frameworkTitles: Record<string, string> = {
nextjs: 'Next.js',
'react-router': 'React Router',
tanstack: 'TanStack Start',
react: 'React SPA',
vue: 'Vue',
nuxtjs: 'Nuxt.js',
}