From f17bd16665323c8cd8b8b0b0e2085d2ea3857faf Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 28 Jul 2022 00:24:27 +0200 Subject: [PATCH] docs: update md files --- docs2/src/.vitepress/config.ts | 11 +++++--- docs2/src/.vitepress/theme/index.ts | 1 + docs2/src/assets/index.css | 32 ++--------------------- docs2/src/assets/polygon-scatter.svg | 1 - docs2/src/examples/edges/validation.md | 2 +- docs2/src/guide/composables.md | 4 +-- docs2/src/guide/edge.md | 24 ++++++++--------- docs2/src/guide/getting-started.md | 10 +++---- docs2/src/guide/node.md | 26 +++++++++---------- docs2/src/guide/theming.md | 16 +++++------- docs2/src/guide/utils/edge.md | 2 +- docs2/src/guide/utils/graph.md | 8 +++--- docs2/src/guide/utils/instance.md | 14 +++++----- docs2/src/guide/vue-flow/config.md | 36 +++++++++++++------------- docs2/src/guide/vue-flow/slots.md | 4 +-- docs2/src/guide/vue-flow/state.md | 12 ++++----- 16 files changed, 88 insertions(+), 115 deletions(-) delete mode 100644 docs2/src/assets/polygon-scatter.svg diff --git a/docs2/src/.vitepress/config.ts b/docs2/src/.vitepress/config.ts index 90a45c43..3f7ddfc7 100644 --- a/docs2/src/.vitepress/config.ts +++ b/docs2/src/.vitepress/config.ts @@ -1,7 +1,7 @@ import { resolve } from 'path' import { readdirSync, statSync } from 'fs' -import type { HeadConfig } from 'vitepress' -import { DefaultTheme, defineConfigWithTheme } from 'vitepress' +import type { DefaultTheme, HeadConfig } from 'vitepress' +import { defineConfigWithTheme } from 'vitepress' import WindiCSS from 'vite-plugin-windicss' import Icons from 'unplugin-icons/vite' import IconsResolver from 'unplugin-icons/resolver' @@ -10,7 +10,6 @@ import AutoImport from 'unplugin-auto-import/vite' import { useVueFlow } from '@braks/vue-flow' import { copyVueFlowPlugin } from './copy-plugin' import head from './head' -import SidebarGroup = DefaultTheme.SidebarGroup const { vueFlowVersion } = useVueFlow() @@ -18,7 +17,7 @@ function capitalize(str: string) { return str.charAt(0).toUpperCase() + str.slice(1) } -const typedocSidebarEntries = (): SidebarGroup[] => { +const typedocSidebarEntries = (): DefaultTheme.SidebarGroup[] => { const filePath = resolve(__dirname, '../../typedocs') const docsModules = readdirSync(filePath).filter((name) => statSync(`${filePath}/${name}`).isDirectory()) @@ -101,6 +100,7 @@ export default defineConfigWithTheme({ '/guide/': [ { text: 'Guide', + collapsible: true, items: [ { text: 'Introduction', link: '/guide/' }, { text: 'Getting Started', link: '/guide/getting-started' }, @@ -112,6 +112,7 @@ export default defineConfigWithTheme({ }, { text: 'Vue Flow', + collapsible: true, items: [ { text: 'Config / Props', link: '/guide/vue-flow/config' }, { text: 'State', link: '/guide/vue-flow/state' }, @@ -132,6 +133,7 @@ export default defineConfigWithTheme({ }, { text: 'Utilities', + collapsible: true, items: [ { text: 'Graph', link: '/guide/utils/graph' }, { text: 'Viewport', link: '/guide/utils/instance' }, @@ -140,6 +142,7 @@ export default defineConfigWithTheme({ }, { text: 'Components', + collapsible: true, items: [ { text: 'Background', link: '/guide/components/background' }, { text: 'MiniMap', link: '/guide/components/minimap' }, diff --git a/docs2/src/.vitepress/theme/index.ts b/docs2/src/.vitepress/theme/index.ts index fdea9ec0..92237c25 100644 --- a/docs2/src/.vitepress/theme/index.ts +++ b/docs2/src/.vitepress/theme/index.ts @@ -1,6 +1,7 @@ import type { Theme } from 'vitepress' import VueAnimXyz from '@animxyz/vue3' import DefaultTheme from 'vitepress/theme' +import '../../assets/index.css' const CustomTheme = { ...DefaultTheme, diff --git a/docs2/src/assets/index.css b/docs2/src/assets/index.css index 9734ccf0..22c2ac1d 100644 --- a/docs2/src/assets/index.css +++ b/docs2/src/assets/index.css @@ -1,32 +1,13 @@ :root { --primary: #BB86FC; --secondary: #03dac5; -} - -.dark { - --c-text-lighter: white !important; - --c-text: white !important; - --c-bg: black !important; -} - -.dark .tip { - --c-bg-light: gray; -} - -.tip { - --c-bg-light: white; + --vp-c-brand: #10b981; } html, body { @apply scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-green-500 scrollbar-track-black; } -.home { - --content-width: 100%; - max-width: 100% !important; - @apply !px-0; -} - .page a { @apply text-green-500 font-semibold; } @@ -39,14 +20,6 @@ html, body { --content-width: 100%; } -.theme-default-content { - @apply overflow-scroll md:overflow-hidden; -} - -.navbar { - @apply dark:bg-gray-900; -} - h1 { @apply text-xl lg:text-4xl mb-4 font-bold; } @@ -102,10 +75,9 @@ ul li { } } -.theme-container.examples .theme-default-content .vue-repl pre, .theme-default-content .vue-repl pre[class*=language-] { +.vue-repl pre, .vue-repl pre[class*=language-] { padding: unset; margin: unset; border-radius: unset; line-height: unset; - } diff --git a/docs2/src/assets/polygon-scatter.svg b/docs2/src/assets/polygon-scatter.svg deleted file mode 100644 index 5b07c11f..00000000 --- a/docs2/src/assets/polygon-scatter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs2/src/examples/edges/validation.md b/docs2/src/examples/edges/validation.md index c4037601..4d0f18ff 100644 --- a/docs2/src/examples/edges/validation.md +++ b/docs2/src/examples/edges/validation.md @@ -8,7 +8,7 @@ pageClass: examples Connections can be validated before edges are created and nodes get connected. ## Using a handle in a custom node -```vue:no-line-numbers +```vue
[ ... ] diff --git a/docs2/src/guide/composables.md b/docs2/src/guide/composables.md index 3d8a8f15..094d78ef 100644 --- a/docs2/src/guide/composables.md +++ b/docs2/src/guide/composables.md @@ -10,7 +10,7 @@ The composition API and the power of provide/inject allows us to act more flexib a component tree. Thus accessing the internal state of Vue Flow becomes super easy when using composition. -```vue:no-line-numbers +```vue