Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,12 @@ integration/import/**/rx.json
integration/import/**/operators.json


.nx/cache
.nx/cache

# VitePress
.cache
.vitepress/dist
**/.vitepress/cache/

**/components.d.ts
**/auto-imports.d.ts
143 changes: 143 additions & 0 deletions apps/rxjs.dev-next/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { defineConfig, type UserConfig } from 'vitepress'
import type { DefaultTheme, Outline } from 'vitepress/theme'
import typedocSidebar from '../docs/api/typedoc-sidebar.json';
import ui from '@nuxt/ui/vite'


export default defineConfig({
title: 'RxJS',
description: 'Reactive Extensions Library for JavaScript',
srcDir: 'docs',

// Markdown configuration
markdown: {
// Shiki is enabled by default in VitePress
// Code blocks will be highlighted automatically
theme: {
light: 'github-light',
dark: 'github-dark'
},
lineNumbers: true,
},

head: [
['link', { rel: 'icon', type: 'image/png', href: '/images/favicons/favicon-96x96.png', sizes: '96x96' }],
['link', { rel: 'icon', type: 'image/svg+xml', href: '/images/favicons/favicon.svg' }],
['link', { rel: 'shortcut icon', href: '/images/favicons/favicon.ico' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/images/favicons/apple-touch-icon.png' }],
['link', { rel: 'manifest', href: '/site.webmanifest' }]
],

vite: {
plugins: [
ui({
router: false,
ui: {
colors: {
primary: 'brand',
neutral: 'zinc'
}
}
}),
],
},

// Theme configuration
themeConfig: {
outline: {
level: [2, 3, 4, 5] as Outline['level'],
},
logo: { src: '/images/favicons/favicon.svg', width: 24, height: 24 },
socialLinks: [
{ icon: 'github', link: 'https://github.com/ReactiveX/rxjs' }
],
search: {
provider: 'local'
},
nav: [
{ text: 'Overview', link: '/guide/overview' },
{ text: 'API Reference', link: '/api' },
{
text: 'About',
items: [
{ text: 'Team', link: '/team' },
{ text: 'Code of Conduct', link: '/code-of-conduct' },
{ text: 'Black Lives Matter', link: '/black-lives-matter' }
]
},

],
sidebar: {
'/guide': [
{
text: 'Getting Started',
items: [
{
text: 'Overview', collapsed: true, items: [
{ text: 'Introduction', link: '/guide/overview' },
{ text: 'Observables', link: '/guide/observable' },
{ text: 'Observer', link: '/guide/observer' },
{ text: 'Operators', link: '/guide/operators' },
{ text: 'Subscription', link: '/guide/subscription' },
{ text: 'Subjects', link: '/guide/subject' },
{ text: 'Scheduler', link: '/guide/scheduler' },
{ text: 'Higher-Order Observables', link: '/guide/higher-order-observables' },
]
},
{
text: 'Installation',
link: '/guide/installation'
},
{
text: 'Importing',
link: '/guide/importing'
},
{
text: 'Glossary',
collapsed: true,
items: [
{ text: 'Core Semantics', link: '/guide/core-semantics' },
{ text: 'Glossary', link: '/guide/glossary-and-semantics' }
]
},
{
text: 'Testing',
items: [
{ text: 'Marble Testing', link: '/guide/testing/marble-testing' }
]
},
{ text: 'Migration Guide', link: '/deprecations' }
]
},
],
'/deprecations': [
{
text: 'Deprecations & Breaking Changes',
items: [
{
text: 'v7.x Breaking Changes',
link: '/deprecations/breaking-changes',
items: [
{ text: 'v6 to v7 change summary', link: '/deprecations/6-to-7-change-summary' },
{ text: 'Scheduler Argument', link: '/deprecations/scheduler-argument' },
{ text: 'Subscribe Arguments', link: '/deprecations/subscribe-arguments' },
{ text: 'ResultSelector Arguments', link: '/deprecations/result-selector' },
{ text: 'Array Arguments', link: '/deprecations/array-argument' },
{ text: 'Multicasting', link: '/deprecations/multicasting' },
{ text: 'Conversion to Promises', link: '/deprecations/to-promise' },

]
},
{ text: 'v6.x Changelog', link: 'https://github.com/ReactiveX/rxjs/blob/6.x/CHANGELOG.md' },
]
},
],
'/api': [
{
text: 'API Reference',
items: typedocSidebar,
}
]
}
},
} satisfies UserConfig<DefaultTheme.Config>);
12 changes: 12 additions & 0 deletions apps/rxjs.dev-next/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import DefaultTheme from 'vitepress/theme'
import type { Theme } from 'vitepress'
import ui from '@nuxt/ui/vue-plugin'

import './style.css'

export default {
extends: DefaultTheme,
enhanceApp({ app }) {
app.use(ui)
},
} satisfies Theme
17 changes: 17 additions & 0 deletions apps/rxjs.dev-next/.vitepress/theme/shiki.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Shiki is already integrated in VitePress by default
// This file can be used for custom Shiki configuration if needed

import type { UserConfig } from 'vitepress';

// VitePress uses Shiki by default for syntax highlighting
// No additional configuration needed unless we want custom themes or languages

export const shikiConfig = {
// VitePress default Shiki theme
theme: 'github-dark',
// Additional languages can be added here if needed
langs: ['typescript', 'javascript', 'json', 'bash'],
};



68 changes: 68 additions & 0 deletions apps/rxjs.dev-next/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@import 'tailwindcss';

/* Tell Tailwind where to scan for classes */
@source "../../../../node_modules/@nuxt/ui/dist/shared";
@source "../../components";
@source "../../docs";
@import '@nuxt/ui';

:root {
/* brand-1: most solid color for colored text (must satisfy contrast on brand-soft) */
--vp-c-brand-1: #f03aa0;
--vp-c-brand-2: #ee1090;
--vp-c-brand-3: #d00e80;
/* brand-soft: subtle background (semi-transparent, must satisfy contrast with brand-1 text) */
--vp-c-brand-soft: rgba(238, 16, 144, 0.14);

/* Hero section customization */
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: linear-gradient(-45deg, var(--vp-c-brand-3) 30%, var(--vp-c-brand-1) 50%);
}

.dark {
/* Dark mode brand colors - adjust if needed for better contrast */
--vp-c-brand-1: #f03aa0;
--vp-c-brand-2: #ee1090;
--vp-c-brand-3: #d00e80;
--vp-c-brand-soft: rgba(238, 16, 144, 0.16);

--vp-home-hero-name-background: linear-gradient(-45deg, var(--vp-c-brand-1) 30%, var(--vp-c-brand-3) 50%);
--vp-home-hero-image-filter: blur(160px);
}

@theme static {
/* Define new custom color */
--color-brand-300: #f03aa0;
--color-brand-400: #ee1090;
--color-brand-500: #ee1090;
--color-brand-600: #d00e80;
}

.only-dark {
display: none;
}
.dark .only-dark {
display: initial;
}
.dark .only-light {
display: none;
}

img[src*='marble'] {
border-radius: 8px;
}

button,
input,
optgroup,
select,
textarea {
border: revert-layer;
padding: revert-layer;
background-color: revert-layer;
}

.image-bg {
top: 60% !important;
left: 50% !important;
}
21 changes: 21 additions & 0 deletions apps/rxjs.dev-next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# RxJS Dev Next

This is the next-generation documentation site for RxJS, built with VitePress.

## Development

```bash
yarn dev
```

## Build

```bash
yarn build
```

## Preview

```bash
yarn preview
```
94 changes: 94 additions & 0 deletions apps/rxjs.dev-next/components/ApiSection.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<script lang="ts">
export const kindForUrl = (url: string) => {
const kindRe = /\/api\/.+\/(.+)\//;
return kindRe.exec(url)?.[1]!;
};

export const kindMappings = {
functions: {
icon: 'i-lucide-code',
color: 'success',
label: 'Functions',
value: 'functions',
},
classes: {
icon: 'i-lucide-box',
color: 'info',
label: 'Classes',
value: 'classes',
},
variables: {
icon: 'i-lucide-key',
color: 'primary',
label: 'Variables',
value: 'variables',
},
enumerations: {
icon: 'i-lucide-list-check',
color: 'warning',
label: 'Enumerations',
value: 'enumerations',
},
interfaces: {
icon: 'i-lucide-layout-dashboard',
color: 'neutral',
label: 'Interfaces',
value: 'interfaces',
},
'type-aliases': {
icon: 'i-lucide-type',
color: 'error',
label: 'Type Aliases',
value: 'type-aliases',
},
}

export const urlToKind = (url: string) => {
return kindMappings[kindForUrl(url)];
}
</script>

<script setup lang="ts">
defineProps<{
items: any[];
}>();


const makePageLinks = (items: any[]) => {
return items.map((item: any) => {
const kind = urlToKind(item.link);
return {
label: item.text,
to: item.link.replace('.md', ''),
icon: kind?.icon,
color: kind?.color,
};
});
}
</script>

<template>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-8" v-show="items.length > 0">
<UButton v-for="item in makePageLinks(items)" :key="item.label" :to="item.to" :color="item.color" variant="soft"
:icon="item.icon" class="w-full min-w-0 justify-start" :ui="{ base: 'min-w-0', leadingIcon: 'shrink-0' }">
<span class="min-w-0 flex-1 truncate">
{{ item.label }}
</span>
</UButton>
</div>
</template>

<style scoped>
:deep(ul) {
list-style: none !important;
margin-left: 0 !important;
margin-right: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
}

:deep(a) {
color: revert-layer !important;
text-decoration: none !important;
}
</style>
Loading
Loading