├── .editorconfig ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── README.md ├── apps └── rebebuca-website │ ├── .gitignore │ ├── .npmrc │ ├── .vitepress │ ├── config.ts │ ├── headerMdPlugin.ts │ └── theme │ │ ├── components │ │ ├── Rebebuca.vue │ │ ├── Roles.vue │ │ ├── banner │ │ │ ├── index.less │ │ │ └── index.vue │ │ ├── constants.ts │ │ ├── content │ │ │ ├── index.less │ │ │ └── index.vue │ │ ├── footer │ │ │ ├── index.less │ │ │ └── index.vue │ │ ├── head │ │ │ ├── index.less │ │ │ └── index.vue │ │ └── preferences.ts │ │ ├── index.ts │ │ └── styles │ │ ├── badges.css │ │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ │ ├── index.css │ │ ├── inline-demo.css │ │ ├── options-boxes.css │ │ ├── pages.css │ │ ├── style-guide.css │ │ ├── theme.css │ │ ├── utilities.css │ │ └── vue-mastery.css │ ├── README.md │ ├── env.d.ts │ ├── package.json │ ├── src │ ├── guide │ │ ├── config.md │ │ ├── ffmpeg命令-运行-停止-重启-清除输出日志.md │ │ ├── imgs │ │ │ ├── a1.png │ │ │ ├── a10.png │ │ │ ├── a14.png │ │ │ ├── a15.png │ │ │ ├── a16.png │ │ │ ├── a17.png │ │ │ ├── a18.png │ │ │ ├── a19.png │ │ │ ├── a2.png │ │ │ ├── a20.png │ │ │ ├── a3.png │ │ │ ├── a30.png │ │ │ ├── a31.png │ │ │ ├── a34.png │ │ │ ├── a36.png │ │ │ ├── a37.png │ │ │ ├── a38.png │ │ │ ├── a39.png │ │ │ ├── a4.png │ │ │ ├── a40.png │ │ │ ├── a5.png │ │ │ ├── a6.png │ │ │ ├── a7.png │ │ │ ├── a8.png │ │ │ ├── a9.png │ │ │ ├── b1.png │ │ │ ├── b10.png │ │ │ ├── b12.png │ │ │ ├── b13.png │ │ │ ├── b14.png │ │ │ ├── b15.png │ │ │ ├── b2.png │ │ │ ├── b3.png │ │ │ ├── b4.png │ │ │ ├── b5.png │ │ │ ├── b6.png │ │ │ ├── b7.png │ │ │ ├── b8.png │ │ │ ├── b9.png │ │ │ ├── config-1.png │ │ │ ├── config-2.png │ │ │ └── qun.png │ │ ├── introduction.md │ │ ├── qun.md │ │ ├── startup.md │ │ ├── 分组监控.md │ │ ├── 新增-编辑-插入-删除ffmpeg命令参数.md │ │ ├── 新建-编辑-复制-删除ffmpeg命令.md │ │ ├── 新建-编辑-查找-删除分组.md │ │ ├── 案例-分离视频音频流.md │ │ ├── 案例-推流.md │ │ ├── 案例-视频剪切.md │ │ ├── 案例-视频压缩.md │ │ └── 案例-视频格式转换.md │ ├── index.md │ └── public │ │ ├── _headers │ │ ├── _redirects │ │ ├── images │ │ ├── logo.png │ │ └── m7s │ │ │ ├── 404.png │ │ │ ├── btn-bg.png │ │ │ ├── cute.png │ │ │ ├── dmg-size.png │ │ │ ├── footer-bg.png │ │ │ ├── footer │ │ │ ├── lx-active.png │ │ │ ├── lx.png │ │ │ ├── wx-active.png │ │ │ ├── wx-pay.jpg │ │ │ ├── wx-qun.jpg │ │ │ ├── wx-qun.png │ │ │ ├── wx.png │ │ │ ├── zf-active.png │ │ │ ├── zf-pay.jpg │ │ │ └── zf.png │ │ │ ├── go-m7s.png │ │ │ ├── jessibuca.png │ │ │ ├── logo.png │ │ │ ├── m7s.png │ │ │ ├── monibuca.png │ │ │ ├── plugin-go-code.png │ │ │ ├── plugin.png │ │ │ ├── qun.png │ │ │ ├── title-bar.png │ │ │ └── ui.png │ │ ├── logo.svg │ │ ├── service-worker.js │ │ └── svg │ │ ├── banner.svg │ │ └── logo.svg │ └── tsconfig.json ├── package.json ├── packages ├── shared │ ├── .npmignore │ ├── README.md │ ├── configs │ │ └── tsconfig.base.json │ ├── package.json │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── types │ │ └── index.ts │ └── utils │ │ └── index.ts ├── theme │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── core │ │ │ ├── components │ │ │ │ ├── VTBackdrop.vue │ │ │ │ ├── VTFlyout.vue │ │ │ │ ├── VTHamburger.vue │ │ │ │ ├── VTLink.vue │ │ │ │ ├── VTMenu.vue │ │ │ │ ├── VTMenuGroup.vue │ │ │ │ ├── VTMenuLink.vue │ │ │ │ ├── VTSocialLink.vue │ │ │ │ ├── VTSocialLinks.vue │ │ │ │ ├── VTSwitch.vue │ │ │ │ ├── VTSwitchAppearance.vue │ │ │ │ └── icons │ │ │ │ │ ├── VTIconAlignJustify.vue │ │ │ │ │ ├── VTIconAlignLeft.vue │ │ │ │ │ ├── VTIconAlignRight.vue │ │ │ │ │ ├── VTIconChevronDown.vue │ │ │ │ │ ├── VTIconChevronLeft.vue │ │ │ │ │ ├── VTIconChevronRight.vue │ │ │ │ │ ├── VTIconChevronUp.vue │ │ │ │ │ ├── VTIconCode.vue │ │ │ │ │ ├── VTIconCodePen.vue │ │ │ │ │ ├── VTIconCommand.vue │ │ │ │ │ ├── VTIconDiscord.vue │ │ │ │ │ ├── VTIconEdit.vue │ │ │ │ │ ├── VTIconExternalLink.vue │ │ │ │ │ ├── VTIconFacebook.vue │ │ │ │ │ ├── VTIconGitHub.vue │ │ │ │ │ ├── VTIconGlobe.vue │ │ │ │ │ ├── VTIconHeart.vue │ │ │ │ │ ├── VTIconInstagram.vue │ │ │ │ │ ├── VTIconLanguages.vue │ │ │ │ │ ├── VTIconLink.vue │ │ │ │ │ ├── VTIconLinkedIn.vue │ │ │ │ │ ├── VTIconMail.vue │ │ │ │ │ ├── VTIconMapPin.vue │ │ │ │ │ ├── VTIconMoon.vue │ │ │ │ │ ├── VTIconMoreHorizontal.vue │ │ │ │ │ ├── VTIconPlus.vue │ │ │ │ │ ├── VTIconSearch.vue │ │ │ │ │ ├── VTIconSlack.vue │ │ │ │ │ ├── VTIconSun.vue │ │ │ │ │ ├── VTIconTwitter.vue │ │ │ │ │ └── VTIconYouTube.vue │ │ │ ├── composables │ │ │ │ └── FocusContainer.ts │ │ │ ├── index.ts │ │ │ ├── styles │ │ │ │ ├── base.css │ │ │ │ ├── index.css │ │ │ │ ├── variables.css │ │ │ │ ├── vt-backdrop.css │ │ │ │ ├── vt-badge.css │ │ │ │ ├── vt-box.css │ │ │ │ ├── vt-doc-base.css │ │ │ │ ├── vt-doc-code.css │ │ │ │ ├── vt-doc-custom-blocks.css │ │ │ │ ├── vt-flyout.css │ │ │ │ ├── vt-hamburger.css │ │ │ │ ├── vt-link.css │ │ │ │ ├── vt-menu-group.css │ │ │ │ ├── vt-menu-link.css │ │ │ │ ├── vt-menu.css │ │ │ │ ├── vt-social-link.css │ │ │ │ ├── vt-social-links.css │ │ │ │ ├── vt-switch-appearance.css │ │ │ │ └── vt-switch.css │ │ │ └── types │ │ │ │ ├── menu.ts │ │ │ │ └── socialLink.ts │ │ ├── index.ts │ │ ├── shim.d.ts │ │ └── vitepress │ │ │ ├── components │ │ │ ├── VPAlgoliaSearchBox.vue │ │ │ ├── VPAnnouncer.vue │ │ │ ├── VPApp.vue │ │ │ ├── VPCarbonAds.vue │ │ │ ├── VPContent.vue │ │ │ ├── VPContentDoc.vue │ │ │ ├── VPContentDocFooter.vue │ │ │ ├── VPContentDocOutline.vue │ │ │ ├── VPContentPage.vue │ │ │ ├── VPFooter.vue │ │ │ ├── VPLocalNav.vue │ │ │ ├── VPNav.vue │ │ │ ├── VPNavBar.vue │ │ │ ├── VPNavBarAppearance.vue │ │ │ ├── VPNavBarExtra.vue │ │ │ ├── VPNavBarHamburger.vue │ │ │ ├── VPNavBarMenu.vue │ │ │ ├── VPNavBarMenuGroup.vue │ │ │ ├── VPNavBarMenuLink.vue │ │ │ ├── VPNavBarSearch.vue │ │ │ ├── VPNavBarSocialLinks.vue │ │ │ ├── VPNavBarTitle.vue │ │ │ ├── VPNavScreen.vue │ │ │ ├── VPNavScreenAppearance.vue │ │ │ ├── VPNavScreenMenu.vue │ │ │ ├── VPNavScreenMenuGroup.vue │ │ │ ├── VPNavScreenMenuGroupLink.vue │ │ │ ├── VPNavScreenMenuGroupSection.vue │ │ │ ├── VPNavScreenMenuLink.vue │ │ │ ├── VPNavScreenSocialLinks.vue │ │ │ ├── VPNotFound.vue │ │ │ ├── VPSidebar.vue │ │ │ ├── VPSidebarGroup.vue │ │ │ ├── VPSidebarLink.vue │ │ │ └── VPSkipLink.vue │ │ │ ├── composables │ │ │ ├── config.ts │ │ │ ├── nav.ts │ │ │ ├── outline.ts │ │ │ └── sidebar.ts │ │ │ ├── config.ts │ │ │ ├── config │ │ │ ├── baseConfig.js │ │ │ ├── highlight.js │ │ │ └── inlined-scripts │ │ │ │ └── applyDarkMode.js │ │ │ ├── fonts │ │ │ ├── inter-cyrillic-ext.woff2 │ │ │ ├── inter-cyrillic.woff2 │ │ │ ├── inter-greek-ext.woff2 │ │ │ ├── inter-greek.woff2 │ │ │ ├── inter-latin-ext.woff2 │ │ │ ├── inter-latin.woff2 │ │ │ └── inter-vietnamese.woff2 │ │ │ ├── imgs │ │ │ └── rebebuca.png │ │ │ ├── index.ts │ │ │ ├── styles │ │ │ ├── fonts.css │ │ │ ├── index.css │ │ │ └── variables.css │ │ │ ├── support │ │ │ ├── sidebar.ts │ │ │ └── utils.ts │ │ │ └── svg │ │ │ └── logo.svg │ ├── tsconfig.json │ └── types │ │ └── vue-shim.d.ts └── ui │ ├── .npmignore │ ├── package.json │ ├── rollup.config.js │ ├── tsconfig.json │ └── vue │ ├── Logo.vue │ ├── index.ts │ └── shims-vue.d.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── vercel.json /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | indent_style = space 4 | indent_size = 2 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.md] 10 | trim_trailing_whitespace = false 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | es/ 4 | lib/ 5 | .DS_Store 6 | .vercel 7 | .turbo 8 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmmirror.com 2 | shamefully-hoist=true 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | dist/ 4 | es/ 5 | lib/ 6 | .vercel/ 7 | pnpm-lock.yaml 8 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "jsxSingleQuote": true, 4 | "semi": false, 5 | "useTabs": false, 6 | "tabWidth": 2, 7 | "bracketSpacing": true, 8 | "jsxBracketSameLine": false, 9 | "arrowParens": "always", 10 | "trailingComma": "none" 11 | } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # website 2 | 3 | ## 本地开发 4 | 5 | ```bash 6 | npm i -g pnpm 7 | pnpm i 8 | pnpm dev --filter "m7s-website" 9 | # or 10 | npm run dev 11 | ``` 12 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | es/ 4 | node_modules/ 5 | .DS_Store 6 | 7 | # debug 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | .vercel 12 | .turbo 13 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmmirror.com 2 | shamefully-hoist=true 3 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfigWithTheme } from 'vitepress' 2 | import { searchForWorkspaceRoot } from 'vite' 3 | import type { Config as ThemeConfig } from '@vue/theme' 4 | import baseConfig from '@vue/theme/config' 5 | import { headerPlugin } from './headerMdPlugin' 6 | 7 | const nav = [ 8 | { 9 | text: 'Guide', 10 | activeMatch: '/guide/', 11 | link: '/guide/introduction.html' 12 | } 13 | ] 14 | 15 | export const sidebar = { 16 | '/guide/': [ 17 | { 18 | text: 'Guide', 19 | items: [ 20 | { text: '介绍', link: '/guide/introduction' }, 21 | { text: '快速起步', link: '/guide/startup' }, 22 | { text: '新建-编辑-查找-删除分组', link: '/guide/新建-编辑-查找-删除分组' }, 23 | { text: '新建-编辑-复制-删除ffmpeg命令', link: '/guide/新建-编辑-复制-删除ffmpeg命令' }, 24 | { text: '新增-编辑-插入-删除ffmpeg命令参数', link: '/guide/新增-编辑-插入-删除ffmpeg命令参数' }, 25 | { text: 'ffmpeg命令-运行-停止-重启-清除输出日志', link: '/guide/ffmpeg命令-运行-停止-重启-清除输出日志' }, 26 | { text: '分组监控', link: '/guide/分组监控' }, 27 | { text: '案例-视频格式转换', link: '/guide/案例-视频格式转换' }, 28 | { text: '案例-视频剪切', link: '/guide/案例-视频剪切' }, 29 | { text: '案例-视频压缩', link: '/guide/案例-视频压缩' }, 30 | { text: '案例-分离视频音频流', link: '/guide/案例-分离视频音频流' }, 31 | { text: '案例-推流', link: '/guide/案例-推流' }, 32 | { text: '配置', link: '/guide/config' }, 33 | { text: '进群交流', link: '/guide/qun' } 34 | ] 35 | } 36 | ] 37 | } 38 | 39 | export default defineConfigWithTheme({ 40 | extends: baseConfig, 41 | 42 | lang: 'en-zh', 43 | title: 'Rebebuca', 44 | description: 'Rebebuca - 桌面端 FFMPEG 管理器', 45 | srcDir: 'src', 46 | scrollOffset: 'header', 47 | lastUpdated: true, 48 | 49 | head: [ 50 | [ 51 | 'link', 52 | { 53 | rel: 'stylesheet', 54 | href: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css' 55 | } 56 | ], 57 | [ 58 | 'script', 59 | { 60 | src: 'https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js' 61 | } 62 | ], 63 | [ 64 | 'script', 65 | { 66 | src: 'https://cdn.usefathom.com/script.js', 67 | 'data-site': 'XNOLWPLB', 68 | 'data-spa': 'auto', 69 | defer: '' 70 | } 71 | ], 72 | [ 73 | 'meta', 74 | { 75 | name: 'keywords', 76 | content: 'ffmpeg,推流,拉流,tauri' 77 | } 78 | ], 79 | [ 80 | 'meta', 81 | { 82 | name: 'description', 83 | content: '桌面端 FFMPEG 管理器' 84 | } 85 | ] 86 | ], 87 | 88 | themeConfig: { 89 | nav, 90 | sidebar, 91 | 92 | // socialLinks: [{ icon: 'github', link: 'https://github.com/godkun/website' }], 93 | 94 | editLink: { 95 | repo: 'godkun/website', 96 | text: 'Edit this page on GitHub' 97 | } 98 | }, 99 | 100 | markdown: { 101 | config(md) { 102 | md.use(headerPlugin) 103 | } 104 | }, 105 | 106 | vite: { 107 | define: { 108 | __VUE_OPTIONS_API__: false 109 | }, 110 | optimizeDeps: { 111 | include: ['gsap', 'dynamics.js'], 112 | exclude: ['@vue/repl'] 113 | }, 114 | // @ts-ignore 115 | ssr: { 116 | external: ['@vue/repl'] 117 | }, 118 | server: { 119 | host: true, 120 | fs: { 121 | allow: [ 122 | // search up for workspace root 123 | searchForWorkspaceRoot(process.cwd()) 124 | ] 125 | } 126 | }, 127 | build: { 128 | minify: 'terser', 129 | chunkSizeWarningLimit: Infinity 130 | }, 131 | json: { 132 | stringify: true 133 | } 134 | }, 135 | 136 | vue: { 137 | reactivityTransform: true 138 | } 139 | }) 140 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/headerMdPlugin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A markdown-it plugin to support custom header metadata 3 | * Headers that end with * are Options API only 4 | * Headers that end with ** are Composition API only 5 | * This plugin strips the markers and augments the extracted header data, 6 | * which can be then used by the theme to filter headers. 7 | * 8 | * TODO: we will likely also need special syntax for preserving the same anchor 9 | * links across translations similar to the one at 10 | * https://github.com/vitejs/docs-cn/tree/main/.vitepress/markdown-it-custom-anchor 11 | */ 12 | 13 | import MarkdownIt from 'markdown-it' 14 | import { MarkdownRenderer } from 'vitepress' 15 | import mdItCustomAttrs from 'markdown-it-custom-attrs' 16 | 17 | declare module 'vitepress' { 18 | interface Header { 19 | compositionOnly?: boolean 20 | optionsOnly?: boolean 21 | } 22 | } 23 | 24 | export const headerPlugin = (md: MarkdownIt) => { 25 | md.use(mdItCustomAttrs, 'image', { 26 | 'data-fancybox': 'gallery' 27 | }) 28 | const originalOpen = md.renderer.rules.heading_open! 29 | md.renderer.rules.heading_open = (tokens, i, ...rest) => { 30 | for (const child of tokens[i + 1].children!) { 31 | if (child.type === 'text' && child.content.endsWith('*')) { 32 | child.content = child.content.replace(/\s*\*+$/, '') 33 | } 34 | } 35 | return originalOpen.call(null, tokens, i, ...rest) 36 | } 37 | 38 | md.renderer.rules.heading_close = (tokens, i, options, _env, self) => { 39 | const headers = (md as MarkdownRenderer).__data?.headers 40 | if (headers) { 41 | const last = headers[headers.length - 1] 42 | if (last.title.endsWith('*')) { 43 | if (last.title.endsWith('**')) { 44 | last.compositionOnly = true 45 | } else { 46 | last.optionsOnly = true 47 | } 48 | last.title = last.title.replace(/\s*\*+$/, '') 49 | } 50 | } 51 | return self.renderToken(tokens, i, options) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/banner/index.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 24 | 27 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/constants.ts: -------------------------------------------------------------------------------- 1 | const data = [ 2 | { 3 | name: '文档', 4 | children: [ 5 | { 6 | name: '使用指南', 7 | url: '/guide/introduction.html' 8 | } 9 | ] 10 | }, 11 | { 12 | name: '下载', 13 | children: [ 14 | { 15 | name: 'Windows', 16 | url: 'https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca.msi' 17 | }, 18 | { 19 | name: 'Mac', 20 | url: 'https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca.dmg' 21 | }, 22 | { 23 | name: 'Mac(arm64)', 24 | url: 'https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca-aarch64.dmg' 25 | }, 26 | { 27 | name: 'Linux', 28 | url: 'https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/rebebuca_amd64.deb' 29 | } 30 | ] 31 | }, 32 | { 33 | name: '不卡系列', 34 | children: [ 35 | { 36 | name: 'Rebebuca', 37 | url: '/' 38 | }, 39 | { 40 | name: 'Monibuca', 41 | url: 'https://m7s.live' 42 | }, 43 | { 44 | name: 'Jessibuca', 45 | url: 'https://jessibuca.com' 46 | } 47 | ] 48 | } 49 | ] 50 | 51 | export default data 52 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/content/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 107 | 108 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/footer/index.less: -------------------------------------------------------------------------------- 1 | .footer { 2 | // height: 519px; 3 | background: rgb(38, 42, 118); 4 | display: flex; 5 | justify-content: center; 6 | align-items: center; 7 | position: relative; 8 | padding-top: 50px; 9 | padding-bottom: 30px; 10 | .box { 11 | width: 1200px; 12 | } 13 | .p1 { 14 | display: flex; 15 | border-bottom: 1px solid #c9cfdf; 16 | padding-bottom: 15px; 17 | justify-content: space-between; 18 | .item { 19 | .title { 20 | height: 26px; 21 | font-size: 26px; 22 | font-weight: bold; 23 | color: #fff7ef; 24 | line-height: 31px; 25 | margin-bottom: 37px; 26 | } 27 | .product { 28 | margin-bottom: 37px; 29 | height: 26px; 30 | font-size: 26px; 31 | color: #ded6cb; 32 | line-height: 31px; 33 | } 34 | .icon-list { 35 | margin-top: 10px; 36 | position: relative; 37 | // width: 120px; 38 | 39 | .hover { 40 | width: 200px; 41 | position: absolute; 42 | bottom: 50px; 43 | 44 | img { 45 | height: 195px; 46 | } 47 | } 48 | 49 | .icon { 50 | display: inline-block; 51 | width: 36px; 52 | height: 36px; 53 | margin-right: 12px; 54 | 55 | img { 56 | width: 36px; 57 | height: 36px; 58 | } 59 | } 60 | } 61 | .qun { 62 | height: 300px; 63 | } 64 | } 65 | } 66 | .p2 { 67 | margin-top: 74px; 68 | width: 1200px; 69 | text-align: center; 70 | height: 34px; 71 | font-size: 25px; 72 | font-weight: normal; 73 | color: #fff7ef; 74 | line-height: 31px; 75 | } 76 | } 77 | 78 | @media (max-width: 960px) { 79 | #footer { 80 | height: 100%; 81 | padding: 10px; 82 | padding-top: 20px; 83 | // margin-top: 10px; 84 | .box { 85 | width: 100%; 86 | .p1 { 87 | flex-wrap: wrap; 88 | .support { 89 | display: none; 90 | } 91 | .item { 92 | width: 33%; 93 | .title { 94 | font-size: 22px; 95 | } 96 | .product { 97 | font-size: 22px; 98 | margin-bottom: 27px; 99 | font-size: 20px; 100 | } 101 | .qun { 102 | height: 150px; 103 | object-fit: contain; 104 | // margin-left: -100%; 105 | } 106 | } 107 | .wap { 108 | width: 100%; 109 | display: flex; 110 | .title { 111 | font-size: 22px; 112 | margin-right: 40px; 113 | } 114 | .qun { 115 | height: 150px; 116 | object-fit: contain; 117 | } 118 | } 119 | .icon-list { 120 | display: none; 121 | } 122 | } 123 | .p2 { 124 | font-size: 22px; 125 | width: 100%; 126 | margin-top: 10px; 127 | } 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/footer/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 60 | 62 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/head/index.less: -------------------------------------------------------------------------------- 1 | @media (max-width: 960px) { 2 | .main { 3 | display: none !important; 4 | } 5 | } 6 | .main { 7 | width: 100%; 8 | display: flex; 9 | justify-content: center; 10 | background: #1c2857; 11 | height: 60px; 12 | margin-top: -70px; 13 | z-index: 100; 14 | position: fixed; 15 | top: 70px; 16 | color: #fff; 17 | .box { 18 | display: flex; 19 | justify-content: space-between; 20 | width: 1200px; 21 | .left { 22 | display: flex; 23 | align-items: center; 24 | .logo { 25 | margin-left: 10px; 26 | font-size: 30px; 27 | } 28 | img { 29 | height: 40px; 30 | } 31 | } 32 | .right { 33 | font-size: 22px; 34 | display: flex; 35 | justify-content: space-between; 36 | .item { 37 | padding: 0 37px; 38 | position: relative; 39 | line-height: 60px; 40 | &:hover { 41 | cursor: pointer; 42 | background: linear-gradient(270deg, #f96e1f 0%, #ffe300 100%); 43 | color: #fff; 44 | .nav-sheet-container { 45 | display: block !important; 46 | } 47 | } 48 | .nav-sheet-container { 49 | display: none; 50 | position: absolute; 51 | left: 0; 52 | top: px; 53 | padding-top: 5px; 54 | width: max-content; 55 | width: 100%; 56 | box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.08); 57 | background: #263b6d; 58 | z-index: 100; 59 | .nav-sheet-item { 60 | line-height: 40px; 61 | height: 40px; 62 | font-size: 18px; 63 | color: #fff; 64 | text-align: center; 65 | display: block; 66 | &:hover { 67 | background: linear-gradient(270deg, #f96e1f 0%, #ffe300 100%); 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/head/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 37 | 38 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/components/preferences.ts: -------------------------------------------------------------------------------- 1 | import { Header } from 'vitepress' 2 | import { ref } from 'vue' 3 | 4 | const hasStorage = typeof localStorage !== 'undefined' 5 | const get = (key: string, defaultValue = false): boolean => 6 | hasStorage 7 | ? JSON.parse(localStorage.getItem(key) || String(defaultValue)) 8 | : defaultValue 9 | 10 | export const preferCompositionKey = 'vue-docs-prefer-composition' 11 | export const preferComposition = ref(get(preferCompositionKey)) 12 | 13 | export const preferSFCKey = 'vue-docs-prefer-sfc' 14 | export const preferSFC = ref(get(preferSFCKey, true)) 15 | 16 | export function filterHeadersByPreference(h: Header) { 17 | return preferComposition.value ? !h.optionsOnly : !h.compositionOnly 18 | } 19 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | import './styles/index.css' 2 | import './styles/iconfont/iconfont.css' 3 | import { h, App } from 'vue' 4 | import { VPTheme } from '@m7s/theme' 5 | 6 | import { 7 | preferComposition, 8 | preferSFC, 9 | filterHeadersByPreference 10 | } from './components/preferences' 11 | 12 | export default Object.assign({}, VPTheme, { 13 | Layout: () => { 14 | // @ts-ignore 15 | return h(VPTheme.Layout, null, {}) 16 | }, 17 | enhanceApp({ app }: { app: App }) { 18 | app.provide('prefer-composition', preferComposition) 19 | app.provide('prefer-sfc', preferSFC) 20 | app.provide('filter-headers', filterHeadersByPreference) 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/badges.css: -------------------------------------------------------------------------------- 1 | .vt-badge.wip:before { 2 | content: 'WIP'; 3 | } 4 | 5 | .vt-badge.ts { 6 | background-color: #3178c6; 7 | } 8 | .vt-badge.ts:before { 9 | content: 'TS'; 10 | } 11 | 12 | .vt-badge.dev-only, 13 | .vt-badge.experimental { 14 | color: var(--vt-c-text-light-1); 15 | background-color: var(--vt-c-yellow); 16 | } 17 | 18 | .vt-badge.dev-only:before { 19 | content: 'Dev only'; 20 | } 21 | 22 | .vt-badge.experimental:before { 23 | content: 'Experimental'; 24 | } 25 | 26 | .vt-badge[data-text]:before { 27 | content: attr(data-text); 28 | } 29 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; /* Project id 3224825 */ 3 | src: url('iconfont.woff2?t=1646556626696') format('woff2'), 4 | url('iconfont.woff?t=1646556626696') format('woff'), 5 | url('iconfont.ttf?t=1646556626696') format('truetype'); 6 | } 7 | 8 | .iconfont { 9 | font-family: 'iconfont' !important; 10 | font-size: 16px; 11 | font-style: normal; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | } 15 | 16 | .icon-linux:before { 17 | content: '\e6c1'; 18 | } 19 | 20 | .icon-apple:before { 21 | content: '\e87e'; 22 | } 23 | 24 | .icon-windows:before { 25 | content: '\ea06'; 26 | } 27 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "3224825", 3 | "name": "m7s", 4 | "font_family": "iconfont", 5 | "css_prefix_text": "icon-", 6 | "description": "", 7 | "glyphs": [ 8 | { 9 | "icon_id": "1261898", 10 | "name": "linux", 11 | "font_class": "linux", 12 | "unicode": "e6c1", 13 | "unicode_decimal": 59073 14 | }, 15 | { 16 | "icon_id": "4936967", 17 | "name": "apple", 18 | "font_class": "apple", 19 | "unicode": "e87e", 20 | "unicode_decimal": 59518 21 | }, 22 | { 23 | "icon_id": "11983514", 24 | "name": "windows", 25 | "font_class": "windows", 26 | "unicode": "ea06", 27 | "unicode_decimal": 59910 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.woff -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/.vitepress/theme/styles/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/index.css: -------------------------------------------------------------------------------- 1 | @import './theme.css'; 2 | @import './pages.css'; 3 | @import './badges.css'; 4 | @import './options-boxes.css'; 5 | @import './inline-demo.css'; 6 | @import './utilities.css'; 7 | @import './style-guide.css'; 8 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/inline-demo.css: -------------------------------------------------------------------------------- 1 | .vt-doc a[href^="https://sfc.vuejs.org"]:before 2 | { 3 | content: '▶'; 4 | width: 20px; 5 | height: 20px; 6 | display: inline-block; 7 | border-radius: 10px; 8 | vertical-align: middle; 9 | position: relative; 10 | top: -2px; 11 | color: var(--vt-c-green); 12 | border: 2px solid var(--vt-c-green); 13 | margin-right: 8px; 14 | margin-left: 4px; 15 | line-height: 15px; 16 | padding-left: 4.5px; 17 | font-size: 11px; 18 | } 19 | 20 | .demo { 21 | padding: 22px 24px; 22 | border-radius: 8px; 23 | box-shadow: var(--vt-shadow-2); 24 | margin-bottom: 1.2em; 25 | transition: background-color 0.5s ease; 26 | } 27 | 28 | .dark .demo { 29 | background-color: var(--vt-c-bg-soft); 30 | } 31 | 32 | .demo p { 33 | margin: 0; 34 | } 35 | 36 | .demo button { 37 | background-color: var(--vt-c-bg-mute); 38 | transition: background-color 0.5s; 39 | padding: 5px 12px; 40 | border: 1px solid var(--vt-c-divider); 41 | border-radius: 8px; 42 | font-size: 0.9em; 43 | font-weight: 600; 44 | } 45 | 46 | .demo button + button { 47 | margin-left: 1em; 48 | } 49 | 50 | .demo input, 51 | .demo textarea, 52 | .demo select { 53 | border: 1px solid var(--vt-c-divider); 54 | border-radius: 4px; 55 | padding: 0.2em 0.6em; 56 | margin-top: 10px; 57 | background: transparent; 58 | transition: background-color 0.5s; 59 | } 60 | 61 | .dark .demo select { 62 | background: var(--vt-c-bg-soft); 63 | } 64 | 65 | .dark .demo select option { 66 | background: transparent; 67 | } 68 | 69 | .demo input:not([type]):focus, 70 | .demo textarea:focus, 71 | .demo select:focus { 72 | outline: 1px solid blue; 73 | } 74 | 75 | .demo select { 76 | /* this was set by normalize.css */ 77 | -webkit-appearance: listbox; 78 | } 79 | 80 | .demo label { 81 | margin: 0 1em 0 0.4em; 82 | } 83 | 84 | .demo select[multiple] { 85 | width: 100px; 86 | } 87 | 88 | .demo h1 { 89 | margin: 10px 0 0; 90 | } 91 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/options-boxes.css: -------------------------------------------------------------------------------- 1 | .next-steps { 2 | margin-top: 3rem; 3 | } 4 | 5 | .next-steps .vt-box { 6 | border: 1px solid var(--vt-c-bg-soft); 7 | } 8 | 9 | .next-steps .vt-box:hover { 10 | border-color: var(--vt-c-green-light); 11 | transition: border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 12 | } 13 | 14 | .vt-doc .next-steps-link { 15 | font-size: 20px; 16 | line-height: 1.4; 17 | letter-spacing: -0.02em; 18 | margin-bottom: 0.75em; 19 | display: block; 20 | color: var(--vt-c-green); 21 | } 22 | 23 | .vt-doc .next-steps-caption { 24 | margin-bottom: 0; 25 | color: var(--vt-c-text-2); 26 | transition: color 0.5s; 27 | } 28 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/pages.css: -------------------------------------------------------------------------------- 1 | /* always show anchors on /api/ and /style-guide/ pages */ 2 | .vt-doc.api h2 .header-anchor, 3 | .vt-doc.style-guide h2 .header-anchor { 4 | opacity: 1; 5 | } 6 | 7 | .vt-doc.sponsor h3 { 8 | text-align: center; 9 | padding-bottom: 1em; 10 | border-bottom: 1px solid var(--vt-c-divider-light); 11 | } 12 | 13 | .vt-doc.sponsor h3 .header-anchor { 14 | display: none; 15 | } 16 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/style-guide.css: -------------------------------------------------------------------------------- 1 | .style-example { 2 | border-radius: 8px 8px 12px 12px; 3 | margin: 1.6em 0; 4 | padding: 1.6em 1.6em 0.1px; 5 | position: relative; 6 | border: 1px solid transparent; 7 | transition: background-color 0.25s ease, border-color 0.25s ease; 8 | } 9 | 10 | .vt-doc .style-example h3 { 11 | margin: 0; 12 | font-size: 1.1em; 13 | } 14 | 15 | .style-example-bad { 16 | background: #f7e8e8; 17 | } 18 | .dark .style-example-bad { 19 | background: transparent; 20 | border-color: var(--vt-c-red); 21 | } 22 | 23 | .style-example-bad h3 { 24 | color: var(--vt-c-red); 25 | } 26 | 27 | .style-example-good { 28 | background: #ecfaf7; 29 | } 30 | .dark .style-example-good { 31 | background: transparent; 32 | border-color: var(--vt-c-green); 33 | } 34 | 35 | .style-example-good h3 { 36 | color: var(--vt-c-green); 37 | } 38 | 39 | .details summary { 40 | font-weight: bold !important; 41 | } 42 | 43 | .style-verb { 44 | font-size: 0.6em; 45 | display: inline-block; 46 | border-radius: 6px; 47 | font-size: 0.65em; 48 | line-height: 1; 49 | font-weight: 600; 50 | padding: 0.35em 0.4em 0.3em; 51 | position: relative; 52 | top: -0.15em; 53 | margin-right: 0.5em; 54 | color: var(--vt-c-bg); 55 | transition: color 0.5s; 56 | background-color: var(--vt-c-brand); 57 | } 58 | 59 | .style-verb.avoid { 60 | background-color: var(--vt-c-red); 61 | } 62 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/theme.css: -------------------------------------------------------------------------------- 1 | .VPFooter { 2 | display: none; 3 | } 4 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/utilities.css: -------------------------------------------------------------------------------- 1 | .nowrap { 2 | white-space: nowrap; 3 | } 4 | 5 | .sr-only { 6 | position: absolute; 7 | width: 1px; 8 | height: 1px; 9 | padding: 0; 10 | margin: -1px; 11 | overflow: hidden; 12 | clip: rect(0, 0, 0, 0); 13 | border: 0; 14 | } 15 | -------------------------------------------------------------------------------- /apps/rebebuca-website/.vitepress/theme/styles/vue-mastery.css: -------------------------------------------------------------------------------- 1 | .vue-mastery-link { 2 | background-color: var(--vt-c-bg-soft); 3 | border-radius: 8px; 4 | padding: 8px 16px 8px 8px; 5 | transition: color 0.5s, background-color 0.5s; 6 | } 7 | 8 | .vue-mastery-link a { 9 | display: flex; 10 | align-items: center; 11 | } 12 | 13 | .vue-mastery-link .banner { 14 | background-color: var(--vt-c-white-soft); 15 | border-radius: 4px; 16 | width: 96px; 17 | height: 56px; 18 | object-fit: cover; 19 | } 20 | 21 | .vue-mastery-link .description { 22 | flex: 1; 23 | font-weight: 500; 24 | font-size: 14px; 25 | line-height: 20px; 26 | color: var(--vt-c-text-1); 27 | margin: 0 0 0 16px; 28 | transition: color 0.5s; 29 | } 30 | 31 | .vue-mastery-link .description span { 32 | color: var(--vt-c-brand); 33 | } 34 | 35 | .vue-mastery-link .logo-wrapper { 36 | position: relative; 37 | width: 48px; 38 | height: 48px; 39 | border-radius: 50%; 40 | background-color: var(--vt-c-white); 41 | display: flex; 42 | justify-content: center; 43 | align-items: center; 44 | } 45 | 46 | .vue-mastery-link .logo-wrapper img { 47 | width: 25px; 48 | object-fit: contain; 49 | } 50 | 51 | @media (max-width: 576px) { 52 | .vue-mastery-link .banner { 53 | width: 56px; 54 | } 55 | 56 | .vue-mastery-link .description { 57 | font-size: 12px; 58 | line-height: 18px; 59 | } 60 | .vue-mastery-link .logo-wrapper { 61 | position: relative; 62 | width: 32px; 63 | height: 32px; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /apps/rebebuca-website/README.md: -------------------------------------------------------------------------------- 1 | ## Rebebuca 2 | 3 | Rebebuca 是一个使用 Rust 开发的 桌面端 FFMPEG 管理器。可以帮助我们更好的管理繁多复杂的 ffmpeg 参数和 ffmpeg 命令运行状态。具备以下特性: 4 | 5 | 6 | ### 功能丰富 7 | 8 | - 支持软件自动更新 9 | - 支持中英语言切换、暗黑模式主题 10 | - 拥有数据库储存能力,支持数据长期保存 11 | - 基于分组列表 + 分组详情的交互模式,拥有更好的用户体验 12 | - 分组列表支持分组增删改查、分组状态监控 13 | - 分组详情支持 ffmpeg 请求增删改查,并支持对 ffmpeg 执行进程进行停止、重启等操作 14 | - ffmpeg 参数支持可视化配置、输入联想、手动选择、一键复制等操作 15 | 16 | ### 体积轻量 17 | 18 | 在包含 ffmpeg 二进制程序后,安装包只有 30M 不到 19 | 20 | ### 跨平台 21 | 22 | 支持 Windows 、 Mac 、 Mac(arm64) 、Linux 安装 23 | -------------------------------------------------------------------------------- /apps/rebebuca-website/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | declare module '@vue/theme/config' { 5 | import { UserConfig } from 'vitepress' 6 | const config: () => Promise 7 | export default config 8 | } 9 | 10 | declare module '@vue/theme/highlight' { 11 | const createHighlighter: () => Promise<(input: string) => string> 12 | export default createHighlighter 13 | } 14 | -------------------------------------------------------------------------------- /apps/rebebuca-website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rebebuca-website", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vitepress", 7 | "build": "vitepress build", 8 | "serve": "vitepress serve", 9 | "preinstall": "npx only-allow pnpm" 10 | }, 11 | "dependencies": { 12 | "@m7s/shared": "workspace:*", 13 | "@m7s/theme": "workspace:*", 14 | "@m7s/ui": "workspace:*", 15 | "@vue/repl": "^1.0.0", 16 | "@vue/theme": "^1.0.1", 17 | "dynamics.js": "^1.1.5", 18 | "gsap": "^3.9.0", 19 | "highlight.js": "^11.5.0", 20 | "vitepress": "0.22.2", 21 | "vue": "^3.2.31" 22 | }, 23 | "devDependencies": { 24 | "@types/markdown-it": "^12.2.3", 25 | "@types/node": "^16.9.1", 26 | "less": "^4.1.2", 27 | "markdown-it-custom-attrs": "^1.0.2" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/config.md: -------------------------------------------------------------------------------- 1 | # 配置 2 | 3 | 4 | ## 应用配色主题 5 | 6 | 如下图所示: 7 | 8 | ![](./imgs/config-1.png) 9 | 10 | 有三种配色主题可供设置 11 | 12 | - 系统主题(默认设置) 13 | - 深色主题 14 | - 浅色主题 15 | 16 | 17 | ## 中英文切换 18 | 19 | 如下图所示: 20 | 21 | ![](./imgs/config-2.png) 22 | 23 | 点击中文或者 English 即可切换成对应的语言。 24 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/ffmpeg命令-运行-停止-重启-清除输出日志.md: -------------------------------------------------------------------------------- 1 | # ffmpeg命令-运行-停止-重启-清除输出日志 2 | 3 | ## 运行ffmpeg命令 4 | 5 | 如下图所示: 6 | 7 | ![](./imgs/a19.png) 8 | 9 | 10 | 操作步骤: 11 | 12 | 1. 点击运行按钮 13 | 2. 右侧会立刻打印运行日志 14 | 3. 运行成功且完成, output 后会展示 success ; 运行中, output 后会展示 running; 运行失败, output 后会展示 failed; 15 | 16 | 17 | ## 停止ffmpeg命令 18 | 19 | 操作步骤: 20 | 21 | 1. 点击 stop 按钮,即可停止当前 ffmpeg 命令的运行,也就是杀掉了当前 ffmpeg 命令运行的进程 22 | 23 | 24 | ## 重启ffmpeg命令 25 | 26 | 操作步骤: 27 | 28 | 1. 点击 restart 按钮,即可杀掉当前 ffmpeg 命令进程,同时重新运行该 ffmpeg 命令 29 | 30 | 31 | ## 清除ffmpeg命令输出日志 32 | 33 | 操作步骤: 34 | 35 | 1. 点击 clear 按钮,即可清除当前 ffmpeg 命令的输出日志 36 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a1.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a10.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a14.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a15.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a16.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a17.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a18.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a19.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a2.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a20.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a3.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a30.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a31.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a34.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a36.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a37.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a38.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a39.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a4.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a40.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a5.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a6.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a7.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a8.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/a9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/a9.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b1.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b10.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b12.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b13.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b14.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b15.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b2.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b3.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b4.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b5.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b6.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b7.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b8.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/b9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/b9.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/config-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/config-1.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/config-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/config-2.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/imgs/qun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/guide/imgs/qun.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/introduction.md: -------------------------------------------------------------------------------- 1 | # 介绍 2 | 3 | ## 什么是 Rebebuca ? 4 | 5 | Rebebuca 是一个使用 Rust 开发的 桌面端 FFMPEG 管理器。可以帮助我们更好的管理繁多复杂的 ffmpeg 参数和 ffmpeg 命令运行状态。具备以下特性: 6 | 7 | 8 | ### 功能丰富 9 | 10 | - 支持软件自动更新 11 | - 支持中英语言切换、暗黑模式主题 12 | - 拥有数据库储存能力,支持数据长期保存 13 | - 基于分组列表 + 分组详情的交互模式,拥有更好的用户体验 14 | - 分组列表支持分组增删改查、分组状态监控 15 | - 分组详情支持 ffmpeg 请求增删改查,并支持对 ffmpeg 执行进程进行停止、重启等操作 16 | - ffmpeg 参数支持可视化配置、输入联想、手动选择、一键复制等操作 17 | 18 | ### 体积轻量 19 | 20 | 在包含 ffmpeg 二进制程序后,安装包只有 30M 不到 21 | 22 | ### 跨平台 23 | 24 | 支持 Windows 、 Mac 、 Mac(arm64) 、Linux 安装 25 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/qun.md: -------------------------------------------------------------------------------- 1 | # 进群交流 2 | 3 | 微信扫下方二维码进群交流。 4 | 5 | 6 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/startup.md: -------------------------------------------------------------------------------- 1 | # 快速起步 2 | 3 | ## 安装 4 | 5 | - Windows 下载地址:[rebebuca.msi](https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca.msi) 6 | - Mac 安装下载地址:[rebebuca.dmg](https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca.dmg) 7 | - Mac(arm64) 安装下载地址:[rebebuca.dmg](https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/Rebebuca-aarch64.dmg) 8 | - Linux 下载地址:[rebebuca_amd64.deb](https://gitee.com/cuteyk/rebebuca-update/releases/download/1.0.0/rebebuca_amd64.deb) 9 | 10 | 11 | ## 启动软件 12 | 13 | 下载完成后,启动 rebebuca ,会出现下图所示界面: 14 | 15 | ![](./imgs/a1.png) 16 | 17 | 18 | 点击 default 分组,进入详情页,如下图所示: 19 | 20 | ![](./imgs/a2.png) 21 | 22 | 23 | 在 Arg tab 下选择 -h 参数,然后点击运行,如下图所示: 24 | 25 | 26 | ![](./imgs/a3.png) 27 | 28 | 29 | 查看右边输出日志,向下滑动到底部,即可发现运行成功。 30 | 31 | 至此, Rebebuca 的最基本使用已经完成。 32 | 33 | 34 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/分组监控.md: -------------------------------------------------------------------------------- 1 | # 新建-编辑-查找-删除分组 2 | 3 | 如下图所示: 4 | 5 | ![](./imgs/a20.png) 6 | 7 | 常用功能案例分组,底部有 total 、 running 、 failed 三个关键词。分别代表的含义如下: 8 | 9 | - total : 当前分组详情有多少个 ffmpeg 命令 10 | - running : 当前分组详情有多少个 ffmpeg 命令 正在运行中 11 | - failed : 当前分组详情有多少个 ffmpeg 命令 运行失败 12 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/新增-编辑-插入-删除ffmpeg命令参数.md: -------------------------------------------------------------------------------- 1 | # 新增-编辑-插入-删除ffmpeg命令参数 2 | 3 | 新建命令后,我们就可以对该命令进行动态参数配置 4 | 5 | ## 新建ffmpeg命令参数 6 | 7 | 如下图所示: 8 | 9 | ![](./imgs/a14.png) 10 | 11 | 12 | 操作步骤: 13 | 14 | 1. 点击下拉框,既可以下拉选择 ffmpeg 参数,也可以手动输入参数关键字,支持模糊匹配。同时鼠标悬浮,右侧会有参数解释提示 15 | 2. 如果没有找到你想要的参数,可以直接输入你的参数 16 | 3. 输入参数 key 后,如果该参数无 value ,则 value 输入框不填 17 | 4. 输入参数 key 后,如果该参数有 value ,则在 value 输入框中输入 value , 如输入了 -i 参数, 则需要指定输入文件路径,这时我们可以点击右侧的选择文件路径按钮,来选择我们的输入文件,如视频文件,效果图如下: 18 | 19 | ![](./imgs/a15.png) 20 | 21 | 5. 输入参数后,如果存在输出对象,如下图所示: 需要点击 Output Tab , 输入输出值,我们可以点击右侧选择文件路径按钮,来选择输出对象的目录,选择好后,我们再在目录路径后面定义好我们的输出文件名和格式 22 | 23 | ![](./imgs/a16.png) 24 | 25 | 26 | 至此,完成新建 ffmpeg 命令参数操作。 27 | 28 | ## 编辑ffmpeg命令参数 29 | 30 | 直接对已经存在的参数进行编辑即可 31 | 32 | ## 插入ffmpeg命令参数 33 | 34 | 如下图所示: 35 | 36 | ![](./imgs/a17.png) 37 | 38 | 操作步骤: 39 | 40 | 1. 点击右侧插入按钮,选择向上插入或向下插入 41 | 2. 当前参数的上面或下面或多出一个空的参数选型 42 | 43 | 至此,完成插入ffmpeg命令参数操作。 44 | 45 | 46 | ## 删除ffmpeg命令参数 47 | 48 | 如下图所示: 49 | 50 | ![](./imgs/a18.png) 51 | 52 | 操作步骤: 53 | 54 | 1. 点击右侧删除按钮,删除按钮会变成感叹号,此时,再次点击才能删除 55 | 56 | 至此,完成删除ffmpeg命令参数操作。 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/新建-编辑-复制-删除ffmpeg命令.md: -------------------------------------------------------------------------------- 1 | # 新建-编辑-复制-删除ffmpeg命令 2 | 3 | ## 新建命令 4 | 5 | 进入常用功能案例分组详情 6 | 7 | 如下图所示: 8 | 9 | ![](./imgs/a9.png) 10 | 11 | 操作步骤: 12 | 13 | 1. 鼠标移动到添加按钮上 14 | 2. 点击新建FFMPEG命令 15 | 3. 弹出命令新建弹窗,输入命令名称(如-h命令、视频剪切、推流、拉流等) 16 | 4. 点击确定,完成命令新建 17 | 18 | 至此,完成新建命令操作。 19 | 20 | ## 编辑命令 21 | 22 | 如下图所示: 23 | 24 | ![](./imgs/a10.png) 25 | 26 | 操作步骤: 27 | 28 | 1. 鼠标点击命令向下箭头 29 | 2. 点击修改配置 30 | 3. 弹出命令修改弹窗,可对名称进行修改 31 | 4. 点击确定,完成修改 32 | 33 | 至此,完成修改命令操作。 34 | 35 | ## 复制命令 36 | 37 | 图省略。 38 | 39 | 操作步骤: 40 | 41 | 1. 鼠标点击命令向下箭头 42 | 2. 点击复制命令 43 | 3. 弹出修改命令弹窗,修改命令名称 44 | 4. 点击确定,完成复制,该复制操作,会将命令的 ffmpeg 参数也全部复制。 45 | 46 | 至此,完成复制命令操作。 47 | 48 | ## 删除命令 49 | 50 | 图省略。 51 | 52 | 操作步骤: 53 | 54 | 1. 鼠标点击命令向下箭头 55 | 2. 点击删除命令 56 | 3. 弹出删除弹窗 57 | 4. 点击确定,完成删除 58 | 59 | 至此,完成删除命令操作。 60 | 61 | 62 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/新建-编辑-查找-删除分组.md: -------------------------------------------------------------------------------- 1 | # 新建-编辑-查找-删除分组 2 | 3 | ## 新建分组 4 | 5 | 启动软件后,默认会有一个分组,名叫 default , 我们可以新建分组。 6 | 7 | 如下图所示: 8 | 9 | ![](./imgs/a4.png) 10 | 11 | 操作步骤: 12 | 13 | 1. 点击新建分组 14 | 2. 输入分组名称(必填)、分组描述(选填) 15 | 3. 点击确定 16 | 17 | 至此,完成新建分组操作。 18 | 19 | ## 编辑分组 20 | 21 | 如下图所示: 22 | 23 | ![](./imgs/a5.png) 24 | 25 | 操作步骤: 26 | 27 | 1. 鼠标移动到分组操作图标上 28 | 2. 点击修改 29 | 3. 弹出分组修改弹窗,可对分组名称、分组描述进行修改 30 | 4. 点击确定,完成修改,或者点击蒙层,关闭弹窗,取消修改 31 | 32 | 至此,完成编辑分组操作。 33 | 34 | 35 | ## 查找分组 36 | 37 | 如下图所示: 38 | 39 | ![](./imgs/a6.png) 40 | 41 | 操作步骤: 42 | 43 | 1. 在搜索框中输入常 44 | 2. 会自动模糊查找名称包含常字的分组 45 | 46 | 至此,完成查找分组操作。 47 | 48 | 49 | ## 删除分组 50 | 51 | 如下图所示: 52 | 53 | ![](./imgs/a7.png) 54 | 55 | 操作步骤: 56 | 57 | 1. 鼠标移动到分组操作图标上 58 | 2. 点击删除 59 | 3. 弹出删除分组弹窗,点击确定,完成删除,或者点击叉号,取消删除 60 | 61 | 至此,完成删除分组操作。 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/案例-分离视频音频流.md: -------------------------------------------------------------------------------- 1 | # 案例-分离视频音频流 2 | 3 | ## 分离视频流 4 | 5 | 6 | 如下图所示: 7 | 8 | ![](./imgs/a36.png) 9 | 10 | 整体命令如下 11 | 12 | ```sh 13 | ffmpeg -i "/Users/godkun/Desktop/jq.mp4" -vcodec "copy" -an "/Users/godkun/Desktop/spl.mp4" 14 | ``` 15 | 16 | 操作步骤: 17 | 18 | 1. 新建视频剪切命令 19 | 2. 参考上图,完成 Arg tab 参数的设置 20 | 3. 完成 Output tab 输出值的设置 21 | 4. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示分离视频流成功 22 | 23 | 24 | ## 分离音频流 25 | 26 | 27 | 如下图所示: 28 | 29 | ![](./imgs/a37.png) 30 | 31 | 整体命令如下 32 | 33 | ```sh 34 | ffmpeg -i "/Users/godkun/Desktop/jq.mp4" -acodec "copy" -vn "/Users/godkun/Desktop/ypl.mp4" 35 | ``` 36 | 37 | 操作步骤: 38 | 39 | 1. 新建视频剪切命令 40 | 2. 参考上图,完成 Arg tab 参数的设置 41 | 3. 完成 Output tab 输出值的设置 42 | 4. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示分离音频流成功 43 | 44 | 45 | 最终输出对象如下图所示: 46 | 47 | ![](./imgs/a38.png) 48 | 49 | 50 | 至此,分离视频音频流案例介绍完毕。 51 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/案例-推流.md: -------------------------------------------------------------------------------- 1 | # 案例-推流 2 | 3 | 如下图所示: 4 | 5 | ![](./imgs/a39.png) 6 | 7 | 整体命令如下 8 | 9 | ```sh 10 | ffmpeg -i "/Users/godkun/Desktop/jq.flv" -vcodec "copy" -acodec "copy" -f "flv" -c:v "h264" -c:a "aac" "rtmp://localhost/live/test" 11 | ``` 12 | 13 | 操作步骤: 14 | 15 | 1. 新建视频剪切命令 16 | 2. 参考上图,完成 Arg tab 参数的设置 17 | 3. 完成 Output tab 输出值的设置 18 | 4. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示推流成功 19 | 20 | 21 | 这里的推流地址是通过启动 Monibuca 来生成的。 22 | 23 | Monibuca 官网: https://m7s.live 24 | 25 | 启动效果图如下: 26 | 27 | ![](./imgs/a40.png) 28 | 29 | 30 | 至此,推流案例介绍完毕。 31 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/案例-视频剪切.md: -------------------------------------------------------------------------------- 1 | # 案例-视频剪切 2 | 3 | 如下图所示: 4 | 5 | ![](./imgs/a31.png) 6 | 7 | 整体命令如下 8 | 9 | ```sh 10 | ffmpeg -i "/Users/godkun/Desktop/kun.mp4" -ss "0:10:0" -t "0:0:30" -vcodec "copy" -acodec "copy" "/Users/godkun/Desktop/jq.mp4" 11 | ``` 12 | 13 | 命令含义: 对 kun.mp4 进行原装剪切,剪切开始时间是第 10 分钟,剪切时长是 30 秒。输出对象是 jq.mp4 14 | 15 | 操作步骤: 16 | 17 | 1. 新建视频剪切命令 18 | 2. 参考上图,完成 Arg tab 参数的设置 19 | 3. 完成 Output tab 输出值的设置 20 | 4. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示剪切成功 21 | 22 | 23 | 从上图可以可以看到输出对象 jq.mp4 时长为 30 秒。 24 | 25 | 至此,视频格式剪切案例介绍完毕。 26 | 27 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/案例-视频压缩.md: -------------------------------------------------------------------------------- 1 | # 案例-视频压缩 2 | 3 | 如下图所示: 4 | 5 | ![](./imgs/a34.png) 6 | 7 | 整体命令如下 8 | 9 | ```sh 10 | ffmpeg -i "/Users/godkun/Desktop/jq.mp4" -c:v "libx265" -x265-params "crf=18" -y "/Users/godkun/Desktop/ys.mp4" 11 | ``` 12 | 13 | 操作步骤: 14 | 15 | 1. 新建视频剪切命令 16 | 2. 参考上图,完成 Arg tab 参数的设置 17 | 3. 完成 Output tab 输出值的设置 18 | 4. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示压缩成功 19 | 20 | 至此,视频压缩案例介绍完毕。 21 | 22 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/guide/案例-视频格式转换.md: -------------------------------------------------------------------------------- 1 | # 案例-视频格式转换 2 | 3 | ## 将 mp4 格式转换成 flv 格式 4 | 5 | 如下图所示: 6 | 7 | ![](./imgs/a30.png) 8 | 9 | 整体命令如下 10 | 11 | ```sh 12 | ffmpeg -i "/Users/godkun/Desktop/kun.mp4" -acodec "aac" "/Users/godkun/Desktop/kun.flv" 13 | ``` 14 | 15 | 操作步骤: 16 | 17 | 1. 新建视频格式转换命令 18 | 2. 在 Arg tab 下输入 -i 参数,点击选择文件,选中需要输入的文件,如 /Users/godkun/Desktop/kun.mp4 19 | 3. 在 Arg tab 下输入 -acodec 参数,值输入 aac 20 | 4. 在 Output tab 下点击选择文件夹路径,确定输出文件的目录,如 /Users/godkun/Desktop/ 21 | 5. 在 Output tab 对选中的输出文件目录进行添加文件名,最终输出值为 /Users/godkun/Desktop/kun.flv 22 | 6. 点击运行按钮,进行命令运行,等待运行结束,如显示成功,则表示转换成功 23 | 24 | 至此,视频格式转换案例介绍完毕。 25 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | page: true 3 | title: Rebebuca - 桌面端 FFMPEG 管理器 4 | --- 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/_headers: -------------------------------------------------------------------------------- 1 | /* 2 | X-Frame-Options: DENY 3 | 4 | /assets/* 5 | cache-control: max-age=31536000 6 | cache-control: immutable 7 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/_redirects: -------------------------------------------------------------------------------- 1 | /guide/ /guide/introduction.html 2 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/logo.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/404.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/btn-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/btn-bg.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/cute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/cute.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/dmg-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/dmg-size.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer-bg.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/lx-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/lx-active.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/lx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/lx.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/wx-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/wx-active.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/wx-pay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/wx-pay.jpg -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/wx-qun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/wx-qun.jpg -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/wx-qun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/wx-qun.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/wx.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/zf-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/zf-active.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/zf-pay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/zf-pay.jpg -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/footer/zf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/footer/zf.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/go-m7s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/go-m7s.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/jessibuca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/jessibuca.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/logo.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/m7s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/m7s.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/monibuca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/monibuca.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/plugin-go-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/plugin-go-code.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/plugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/plugin.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/qun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/qun.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/title-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/title-bar.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/images/m7s/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/apps/rebebuca-website/src/public/images/m7s/ui.png -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Monibuca 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/service-worker.js: -------------------------------------------------------------------------------- 1 | // force clearing previous service worker 2 | self.addEventListener('install', function (e) { 3 | self.skipWaiting() 4 | }) 5 | 6 | self.addEventListener('activate', function (e) { 7 | self.registration 8 | .unregister() 9 | .then(function () { 10 | return self.clients.matchAll() 11 | }) 12 | .then(function (clients) { 13 | clients.forEach((client) => client.navigate(client.url)) 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/svg/banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /apps/rebebuca-website/src/public/svg/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Monibuca 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /apps/rebebuca-website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "target": "esnext", 5 | "moduleResolution": "node", 6 | "esModuleInterop": true, 7 | "resolveJsonModule": true, 8 | "allowJs": true, 9 | "strict": true, 10 | "baseUrl": ".", 11 | "paths": { 12 | "/@theme/*": [".vitepress/theme/*"] 13 | } 14 | }, 15 | "include": ["env.d.ts", "src/**/*", ".vitepress/**/*"] 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "website", 3 | "workspace": [ 4 | "m7s-website", 5 | "@m7s/shared", 6 | "@m7s/theme", 7 | "@m7s/ui" 8 | ], 9 | "scripts": { 10 | "dev": "turbo run dev", 11 | "build": "turbo run build", 12 | "deploy:rebebuca": "turbo run build --scope=rebebuca-website --includeDependencies --no-deps", 13 | "format": "prettier --write ." 14 | }, 15 | "turbo": { 16 | "pipeline": { 17 | "dev": { 18 | "cache": false 19 | }, 20 | "build": { 21 | "dependsOn": [ 22 | "^build" 23 | ], 24 | "outputs": [ 25 | "./apps/rebebuca-website/.vitepress/dist/**" 26 | ] 27 | } 28 | } 29 | }, 30 | "lint-staged": { 31 | "*.{js,ts,json,vue,md}": [ 32 | "prettier --config .prettierrc.json --write" 33 | ] 34 | }, 35 | "devDependencies": { 36 | "@vercel/node": "^1.14.1", 37 | "lint-staged": "^12.3.8", 38 | "pnpm": "^6.32.6", 39 | "prettier": "^2.6.2", 40 | "turbo": "^1.2.2" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/shared/.npmignore: -------------------------------------------------------------------------------- 1 | tsup.config.ts 2 | tsconfig.json 3 | node_modules 4 | -------------------------------------------------------------------------------- /packages/shared/README.md: -------------------------------------------------------------------------------- 1 | # @m7s/shared 2 | -------------------------------------------------------------------------------- /packages/shared/configs/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "skipLibCheck": true, 4 | "skipDefaultLibCheck": true, 5 | "strictNullChecks": true, 6 | "strictFunctionTypes": true, 7 | "strictPropertyInitialization": true, 8 | "useUnknownInCatchVariables": false, 9 | "noImplicitThis": true, 10 | "noUnusedLocals": true, 11 | "noUnusedParameters": true, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "moduleResolution": "node", 15 | "allowSyntheticDefaultImports": true, 16 | "esModuleInterop": true, 17 | "experimentalDecorators": true, 18 | "emitDecoratorMetadata": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@m7s/shared", 3 | "version": "0.0.1", 4 | "private": true, 5 | "description": "An infrastructure monorepo shared library for all projects and apps.", 6 | "scripts": { 7 | "prepare": "npm run build", 8 | "dev": "tsup --watch", 9 | "build": "tsup" 10 | }, 11 | "browser": { 12 | "./types": "./dist/types/index.js", 13 | "./utils": "./dist/utils/index.js" 14 | }, 15 | "exports": { 16 | "./types": { 17 | "import": "./dist/types/index.mjs", 18 | "require": "./dist/types/index.js" 19 | }, 20 | "./utils": { 21 | "import": "./dist/utils/index.mjs", 22 | "require": "./dist/utils/index.js" 23 | } 24 | }, 25 | "devDependencies": { 26 | "tsup": "^5.11.11", 27 | "typescript": "^4.5.2" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./configs/tsconfig.base.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "target": "es6", 6 | "module": "commonjs", 7 | "baseUrl": "." 8 | }, 9 | "include": ["**/*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/shared/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup' 2 | 3 | export default defineConfig({ 4 | entry: ['utils/index.ts', 'types/index.ts'], 5 | clean: true, 6 | dts: true, 7 | outDir: 'dist', 8 | format: ['cjs', 'esm'] 9 | }) 10 | -------------------------------------------------------------------------------- /packages/shared/types/index.ts: -------------------------------------------------------------------------------- 1 | export enum UrlEnum { 2 | M7S_WIN = 'https://monibuca.com/windows.tgz', 3 | M7S_IOS = 'https://monibuca.com/mac.tgz', 4 | M7S_LINUX = 'https://monibuca.com/linux.tgz' 5 | } 6 | -------------------------------------------------------------------------------- /packages/shared/utils/index.ts: -------------------------------------------------------------------------------- 1 | export const name = 'godkun' 2 | -------------------------------------------------------------------------------- /packages/theme/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /packages/theme/.gitignore: -------------------------------------------------------------------------------- 1 | /coverage 2 | /node_modules 3 | dist 4 | TODOs.md 5 | .DS_Store -------------------------------------------------------------------------------- /packages/theme/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021-present Evan You 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/theme/README.md: -------------------------------------------------------------------------------- 1 | # Vue Theme 2 | 3 | This is the [VitePress](https://vitepress.vuejs.org/) theme for the official Vue documentation at `vuejs.org`. 4 | 5 | Please note this theme is solely dedicated for `vuejs.org` and isn't meant to be used as a content-neutral theme. It does **not** follow semver and may contain hard-coded logic specific to the Vue documentation. 6 | 7 | ## Development Setup 8 | 9 | This repo can be developed on its own since it is a self-contained VitePress theme. Make sure to use [pnpm](https://pnpm.io/) as the package manager when installing deps. A demo app is available in `/demo` and can be run with `npm run dev`: 10 | 11 | ```bash 12 | $ pnpm install 13 | $ npm run dev 14 | ``` 15 | 16 | ## Developing with Real Content 17 | 18 | To work on this theme in the context of the `vuejs.org` website requires cloning both repos and linking the theme into the docs repo: 19 | 20 | 1. Clone repositories: 21 | 22 | ```bash 23 | git clone git@github.com:vuejs/docs.git 24 | git clone git@github.com:vuejs/theme.git 25 | ``` 26 | 27 | 2. Link theme into docs repo: 28 | 29 | ```bash 30 | # In ./theme 31 | pnpm install 32 | # Make @vue/theme available for global linking 33 | pnpm link --global 34 | 35 | # in ./docs 36 | pnpm install 37 | # Link teme 38 | pnpm link --global @vue/theme 39 | ``` 40 | 41 | 3. Start VitePress server: 42 | 43 | ```bash 44 | # in ./docs 45 | pnpm run dev 46 | ``` 47 | 48 | ### Available Scripts 49 | 50 | Here is the list of available scripts that can be used during the development. 51 | 52 | ```bash 53 | # Boot local dev server. 54 | $ npm run dev 55 | 56 | # Build demo, then serve locally. This is for testing 57 | # production build in the local environment. 58 | $ npm run serve 59 | 60 | # Run lint via Prettier. 61 | $ npm run lint 62 | 63 | # Run type check via tsc. 64 | $ npm run type 65 | ``` 66 | 67 | ## License 68 | 69 | [MIT](http://opensource.org/licenses/MIT) 70 | 71 | Copyright (c) 2021-present Evan You 72 | -------------------------------------------------------------------------------- /packages/theme/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@m7s/theme", 3 | "version": "1.0.1", 4 | "description": "The design system for Vue.js.", 5 | "main": "src/index.ts", 6 | "exports": { 7 | ".": "./src/index.ts", 8 | "./config": "./src/vitepress/config/baseConfig.js", 9 | "./highlight": "./src/vitepress/config/highlight.js" 10 | }, 11 | "files": [ 12 | "src", 13 | "types" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/vuejs/theme.git" 18 | }, 19 | "keywords": [ 20 | "vue", 21 | "design-system" 22 | ], 23 | "author": "Evan You", 24 | "license": "MIT", 25 | "homepage": "https://theme.vuejs.org", 26 | "bugs": { 27 | "url": "https://github.com/vuejs/theme/issues" 28 | }, 29 | "scripts": { 30 | "lint": "prettier --check --write --parser typescript \"{__tests__,docs,src,types}/**/*.ts\"", 31 | "lint:fail": "prettier --check --parser typescript \"{__tests__,docs,src,types}/**/*.ts\"", 32 | "type": "tsc --noEmit", 33 | "test": "yarn lint && yarn type", 34 | "dev": "vitepress dev demo", 35 | "demo-build": "vitepress build demo", 36 | "build": "vitepress build", 37 | "serve": "yarn demo-build && vitepress serve demo" 38 | }, 39 | "dependencies": { 40 | "@docsearch/css": "^3.0.0-alpha.41", 41 | "@docsearch/js": "^3.0.0-alpha.41", 42 | "@vueuse/core": "^7.3.0", 43 | "body-scroll-lock": "^3.1.5", 44 | "normalize.css": "^8.0.1", 45 | "shiki": "^0.9.15" 46 | }, 47 | "devDependencies": { 48 | "@m7s/ui": "workspace:*", 49 | "@types/body-scroll-lock": "^2.6.1", 50 | "@types/estree": "^0.0.48", 51 | "prettier": "^2.4.1", 52 | "typescript": "~4.3.5", 53 | "vitepress": "^0.20.9", 54 | "vue": "^3.2.26" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTBackdrop.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTFlyout.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 55 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTHamburger.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTLink.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 26 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTMenu.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTMenuGroup.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTMenuLink.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTSocialLink.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 46 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTSocialLinks.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTSwitch.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/VTSwitchAppearance.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 51 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconAlignJustify.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconAlignLeft.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconAlignRight.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconChevronDown.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconChevronLeft.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconChevronRight.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconChevronUp.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconCode.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconCodePen.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconCommand.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconDiscord.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconEdit.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconExternalLink.vue: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconFacebook.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconGitHub.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconGlobe.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconHeart.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconInstagram.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconLanguages.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconLink.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconLinkedIn.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconMail.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconMapPin.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconMoon.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconMoreHorizontal.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconPlus.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconSearch.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconSlack.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconSun.vue: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconTwitter.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/components/icons/VTIconYouTube.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/theme/src/core/composables/FocusContainer.ts: -------------------------------------------------------------------------------- 1 | import { Ref, ref, watch, readonly, onUnmounted } from 'vue' 2 | 3 | interface FocusContainerOptions { 4 | elRef: Ref 5 | onFocus?: () => void 6 | onBlur?: () => void 7 | } 8 | 9 | export const focusedElement = ref() 10 | let active = false 11 | let listeners = 0 12 | 13 | export function useFocusContainer(options: FocusContainerOptions) { 14 | const containsFocus = ref(false) 15 | if (typeof window !== 'undefined') { 16 | !active && activateFocusTracking() 17 | listeners++ 18 | 19 | const unwatch = watch(focusedElement, (el) => { 20 | if ( 21 | el === options.elRef.value || 22 | options.elRef.value?.contains(el as Node) 23 | ) { 24 | containsFocus.value = true 25 | options.onFocus?.() 26 | } else { 27 | containsFocus.value = false 28 | options.onBlur?.() 29 | } 30 | }) 31 | 32 | onUnmounted(() => { 33 | unwatch() 34 | listeners-- 35 | if (!listeners) { 36 | deactivateFocusTracking() 37 | } 38 | }) 39 | } 40 | 41 | return readonly(containsFocus) 42 | } 43 | 44 | function activateFocusTracking() { 45 | document.addEventListener('focusin', handleFocusIn) 46 | active = true 47 | focusedElement.value = document.activeElement as HTMLElement 48 | } 49 | 50 | function deactivateFocusTracking() { 51 | document.removeEventListener('focusin', handleFocusIn) 52 | } 53 | 54 | function handleFocusIn() { 55 | focusedElement.value = document.activeElement as HTMLElement 56 | } 57 | -------------------------------------------------------------------------------- /packages/theme/src/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types/menu' 2 | export * from './types/socialLink' 3 | 4 | export { default as VTIconAlignJustify } from './components/icons/VTIconAlignJustify.vue' 5 | export { default as VTIconAlignLeft } from './components/icons/VTIconAlignLeft.vue' 6 | export { default as VTIconAlignRight } from './components/icons/VTIconAlignRight.vue' 7 | export { default as VTIconCode } from './components/icons/VTIconCode.vue' 8 | export { default as VTIconCodePen } from './components/icons/VTIconCodePen.vue' 9 | export { default as VTIconCommand } from './components/icons/VTIconCommand.vue' 10 | export { default as VTIconChevronDown } from './components/icons/VTIconChevronDown.vue' 11 | export { default as VTIconChevronLeft } from './components/icons/VTIconChevronLeft.vue' 12 | export { default as VTIconChevronRight } from './components/icons/VTIconChevronRight.vue' 13 | export { default as VTIconChevronUp } from './components/icons/VTIconChevronUp.vue' 14 | export { default as VTIconDiscord } from './components/icons/VTIconDiscord.vue' 15 | export { default as VTIconExternalLink } from './components/icons/VTIconExternalLink.vue' 16 | export { default as VTIconFacebook } from './components/icons/VTIconFacebook.vue' 17 | export { default as VTIconGitHub } from './components/icons/VTIconGitHub.vue' 18 | export { default as VTIconGlobe } from './components/icons/VTIconGlobe.vue' 19 | export { default as VTIconHeart } from './components/icons/VTIconHeart.vue' 20 | export { default as VTIconInstagram } from './components/icons/VTIconInstagram.vue' 21 | export { default as VTIconLanguages } from './components/icons/VTIconLanguages.vue' 22 | export { default as VTIconLink } from './components/icons/VTIconLink.vue' 23 | export { default as VTIconLinkedIn } from './components/icons/VTIconLinkedIn.vue' 24 | export { default as VTIconMail } from './components/icons/VTIconMail.vue' 25 | export { default as VTIconMapPin } from './components/icons/VTIconMapPin.vue' 26 | export { default as VTIconMoreHorizontal } from './components/icons/VTIconMoreHorizontal.vue' 27 | export { default as VTIconMoon } from './components/icons/VTIconMoon.vue' 28 | export { default as VTIconPlus } from './components/icons/VTIconPlus.vue' 29 | export { default as VTIconSearch } from './components/icons/VTIconSearch.vue' 30 | export { default as VTIconSlack } from './components/icons/VTIconSlack.vue' 31 | export { default as VTIconSun } from './components/icons/VTIconSun.vue' 32 | export { default as VTIconTwitter } from './components/icons/VTIconTwitter.vue' 33 | export { default as VTIconYouTube } from './components/icons/VTIconYouTube.vue' 34 | export { default as VTIconEdit } from './components/icons/VTIconEdit.vue' 35 | 36 | export { default as VTBackdrop } from './components/VTBackdrop.vue' 37 | export { default as VTFlyout } from './components/VTFlyout.vue' 38 | export { default as VTHamburger } from './components/VTHamburger.vue' 39 | export { default as VTLink } from './components/VTLink.vue' 40 | export { default as VTMenu } from './components/VTMenu.vue' 41 | export { default as VTSocialLink } from './components/VTSocialLink.vue' 42 | export { default as VTSocialLinks } from './components/VTSocialLinks.vue' 43 | export { default as VTSwitch } from './components/VTSwitch.vue' 44 | export { default as VTSwitchAppearance } from './components/VTSwitchAppearance.vue' 45 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/index.css: -------------------------------------------------------------------------------- 1 | @import 'normalize.css'; 2 | @import './variables.css'; 3 | @import './base.css'; 4 | @import './vt-backdrop.css'; 5 | @import './vt-doc-base.css'; 6 | @import './vt-doc-code.css'; 7 | @import './vt-doc-custom-blocks.css'; 8 | @import './vt-flyout.css'; 9 | @import './vt-hamburger.css'; 10 | @import './vt-link.css'; 11 | @import './vt-menu.css'; 12 | @import './vt-menu-group.css'; 13 | @import './vt-menu-link.css'; 14 | @import './vt-social-link.css'; 15 | @import './vt-social-links.css'; 16 | @import './vt-switch.css'; 17 | @import './vt-switch-appearance.css'; 18 | @import './vt-box.css'; 19 | @import './vt-badge.css'; 20 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-backdrop.css: -------------------------------------------------------------------------------- 1 | .vt-backdrop { 2 | position: fixed; 3 | top: 0; 4 | right: 0; 5 | bottom: 0; 6 | left: 0; 7 | background: rgba(0, 0, 0, .6); 8 | transition: opacity .5s; 9 | } 10 | 11 | .vt-backdrop.fade-enter-from, 12 | .vt-backdrop.fade-leave-to { 13 | opacity: 0; 14 | } 15 | 16 | .vt-backdrop.fade-leave-active { 17 | transition-duration: .3s; 18 | } 19 | 20 | @media (min-width: 960px) { 21 | .vt-backdrop { 22 | display: none; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-badge.css: -------------------------------------------------------------------------------- 1 | .vt-badge { 2 | display: inline-block; 3 | border-radius: 6px; 4 | font-size: 0.65em; 5 | line-height: 1; 6 | font-weight: 600; 7 | padding: 0.35em 0.4em 0.3em; 8 | position: relative; 9 | top: -0.65em; 10 | margin-left: 0.5em; 11 | color: var(--vt-c-bg); 12 | transition: color 0.5s; 13 | background-color: var(--vt-c-brand); 14 | } 15 | 16 | .vt-badge.warning { 17 | color: var(--vt-c-text-light-1); 18 | background-color: var(--vt-c-yellow); 19 | } 20 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-box.css: -------------------------------------------------------------------------------- 1 | .vt-box-container { 2 | display: flex; 3 | flex-wrap: wrap; 4 | justify-content: space-between; 5 | } 6 | 7 | .vt-box-container .vt-box { 8 | background-color: var(--vt-c-bg-soft); 9 | transition: color 0.5s, background-color 0.5s; 10 | padding: 28px 36px; 11 | border-radius: 8px; 12 | flex: 0 32%; /* default 3 column */ 13 | font-size: 14px; 14 | font-weight: 500; 15 | } 16 | 17 | @media (max-width: 768px) { 18 | .vt-box-container .vt-box { 19 | flex: 0 100%; 20 | margin-bottom: 20px; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-doc-custom-blocks.css: -------------------------------------------------------------------------------- 1 | .vt-doc .custom-block { 2 | margin: 28px 0; 3 | padding: 20px 24px 4px 42px; 4 | border-radius: 8px; 5 | overflow-x: auto; 6 | transition: color 0.5s, background-color 0.5s; 7 | position: relative; 8 | font-size: 14px; 9 | line-height: 1.6; 10 | font-weight: 500; 11 | color: rgba(0, 0, 0, 0.55); 12 | background-color: var(--vt-c-bg-soft); 13 | } 14 | 15 | .dark .vt-doc .custom-block { 16 | color: var(--vt-c-text-2); 17 | } 18 | 19 | .vt-doc .custom-block:before { 20 | content: 'ⓘ'; 21 | position: absolute; 22 | font-weight: 600; 23 | font-size: 15px; 24 | top: 20px; 25 | left: 17px; 26 | } 27 | 28 | .vt-doc .custom-block.warning:before, 29 | .vt-doc .custom-block.danger:before { 30 | content: '⚠'; 31 | font-size: 17px; 32 | top: 19px; 33 | left: 16ppx; 34 | } 35 | 36 | .vt-doc .custom-block .custom-block-title { 37 | margin-bottom: 8px; 38 | font-size: 15px; 39 | font-weight: 500; 40 | color: var(--vt-c-text-1); 41 | transition: color 0.5s; 42 | } 43 | 44 | .vt-doc .custom-block.tip { 45 | border: 1px solid var(--vt-c-brand); 46 | } 47 | .vt-doc .custom-block.tip:before { 48 | color: var(--vt-c-brand); 49 | } 50 | 51 | .vt-doc .custom-block.warning { 52 | border: 1px solid var(--vt-c-yellow); 53 | } 54 | .vt-doc .custom-block.warning:before { 55 | color: var(--vt-c-yellow); 56 | } 57 | 58 | .vt-doc .custom-block.danger { 59 | border: 1px solid var(--vt-c-red); 60 | } 61 | .vt-doc .custom-block.danger .custom-block-title, 62 | .vt-doc .custom-block.danger:before { 63 | color: var(--vt-c-red); 64 | } 65 | 66 | .vt-doc .custom-block ul li:before { 67 | top: 0.55rem; 68 | } 69 | .vt-doc .custom-block ol li:before { 70 | top: 1px; 71 | font-size: 13px; 72 | } 73 | 74 | .vt-doc .custom-block :not(pre) > code { 75 | font-size: 13px; 76 | background-color: rgba(27, 31, 35, 0.05); 77 | } 78 | 79 | .dark .vt-doc .custom-block :not(pre) > code { 80 | background-color: rgba(0, 0, 0, 0.2); 81 | } 82 | 83 | .vt-doc .custom-block.danger a, 84 | .vt-doc .custom-block.warning a { 85 | color: var(--vt-c-text-code); 86 | } 87 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-flyout.css: -------------------------------------------------------------------------------- 1 | .vt-flyout { 2 | position: relative; 3 | } 4 | 5 | .vt-flyout:hover { 6 | color: var(--vt-c-bland); 7 | transition: color .25s; 8 | } 9 | 10 | .vt-flyout:hover .vt-flyout-button-text { 11 | color: var(--vt-c-text-2); 12 | } 13 | 14 | .vt-flyout:hover .vt-flyout-button-icon { 15 | fill: var(--vt-c-text-2); 16 | } 17 | 18 | .vt-flyout:hover .vt-flyout-menu, 19 | .vt-flyout-button[aria-expanded="true"] + .vt-flyout-menu { 20 | opacity: 1; 21 | visibility: visible; 22 | transform: translateY(0); 23 | } 24 | 25 | .vt-flyout-button { 26 | display: flex; 27 | align-items: center; 28 | padding: 0 12px; 29 | height: var(--vt-nav-height); 30 | color: var(--vt-c-text-1); 31 | transition: color .5s; 32 | } 33 | 34 | .vt-flyout-button-text { 35 | display: flex; 36 | align-items: center; 37 | line-height: var(--vt-nav-height); 38 | font-size: 13px; 39 | font-weight: 500; 40 | color: var(--vt-c-text-1); 41 | transition: color .25s; 42 | } 43 | 44 | .vt-flyout-button-text-icon { 45 | margin-left: 4px; 46 | width: 14px; 47 | height: 14px; 48 | fill: currentColor; 49 | } 50 | 51 | .vt-flyout-button-icon { 52 | width: 20px; 53 | height: 20px; 54 | fill: currentColor; 55 | transition: fill .25s; 56 | } 57 | 58 | .vt-flyout-menu { 59 | position: absolute; 60 | top: calc(var(--vt-nav-height) / 2 + 15px); 61 | right: 0; 62 | opacity: 0; 63 | visibility: hidden; 64 | transform: translateY(-4px); 65 | transition: opacity .25s, visibility .25s, transform .25s; 66 | } 67 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-hamburger.css: -------------------------------------------------------------------------------- 1 | .vt-hamburger { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | } 6 | 7 | .vt-hamburger:hover .vt-hamburger-top { top: 0; left: 0; transform: translateX(4px); } 8 | .vt-hamburger:hover .vt-hamburger-middle { top: 6; left: 0; transform: translateX(0); } 9 | .vt-hamburger:hover .vt-hamburger-bottom { top: 12px; left: 0; transform: translateX(8px); } 10 | 11 | .vt-hamburger.is-active .vt-hamburger-top { top: 6px; transform: translateX(0) rotate(225deg); } 12 | .vt-hamburger.is-active .vt-hamburger-middle { top: 6px; transform: translateX(16px); } 13 | .vt-hamburger.is-active .vt-hamburger-bottom { top: 6px; transform: translateX(0) rotate(135deg); } 14 | 15 | .vt-hamburger.is-active:hover .vt-hamburger-top, 16 | .vt-hamburger.is-active:hover .vt-hamburger-middle, 17 | .vt-hamburger.is-active:hover .vt-hamburger-bottom { 18 | background-color: var(--vt-c-text-2); 19 | transition: top .25s, background-color .25s, transform .25s; 20 | } 21 | 22 | .vt-hamburger-container { 23 | position: relative; 24 | width: 16px; 25 | height: 14px; 26 | overflow: hidden; 27 | } 28 | 29 | .vt-hamburger-top, 30 | .vt-hamburger-middle, 31 | .vt-hamburger-bottom { 32 | position: absolute; 33 | width: 16px; 34 | height: 2px; 35 | background-color: var(--vt-c-text-1); 36 | transition: top .25s, background-color .5s, transform .25s; 37 | } 38 | 39 | .vt-hamburger-top { top: 0; left: 0; transform: translateX(0); } 40 | .vt-hamburger-middle { top: 6px; left: 0; transform: translateX(8px); } 41 | .vt-hamburger-bottom { top: 12px; left: 0; transform: translateX(4px); } 42 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-link.css: -------------------------------------------------------------------------------- 1 | .vt-link-icon { 2 | display: inline-block; 3 | margin-top: -2px; 4 | margin-left: 4px; 5 | width: 11px; 6 | height: 11px; 7 | fill: var(--vt-c-text-3); 8 | transition: fill 0.25s; 9 | } 10 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-menu-group.css: -------------------------------------------------------------------------------- 1 | .vt-menu-group-title { 2 | padding: 0 18px; 3 | line-height: 28px; 4 | font-size: 10px; 5 | font-weight: 600; 6 | color: var(--vt-c-text-3); 7 | text-transform: uppercase; 8 | transition: color .25s; 9 | } 10 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-menu-link.css: -------------------------------------------------------------------------------- 1 | .vt-menu-link { 2 | display: block; 3 | padding: 0 18px; 4 | line-height: 28px; 5 | font-size: 13px; 6 | font-weight: 400; 7 | color: var(--vt-c-text-1); 8 | white-space: nowrap; 9 | transition: color .25s; 10 | } 11 | 12 | .vt-menu-link:hover { 13 | color: var(--vt-c-brand); 14 | } 15 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-menu.css: -------------------------------------------------------------------------------- 1 | .vt-menu { 2 | border-radius: 8px; 3 | padding: 12px 0; 4 | min-width: 192px; 5 | border: 1px solid transparent; 6 | background: var(--vt-c-bg); 7 | box-shadow: var(--vt-shadow-3); 8 | transition: background-color .5s; 9 | } 10 | 11 | .dark .vt-menu { 12 | background: var(--vt-c-bg); 13 | box-shadow: var(--vt-shadow-1); 14 | border: 1px solid var(--vt-c-divider-light); 15 | } 16 | 17 | .vt-menu-items { 18 | transition: border-color .5s; 19 | } 20 | 21 | .vt-menu .vt-menu-group { 22 | padding: 0 0 12px; 23 | } 24 | 25 | .vt-menu .vt-menu-group + .vt-menu-group { 26 | border-top: 1px solid var(--vt-c-divider-light); 27 | padding: 11px 0 12px; 28 | } 29 | 30 | .vt-menu .vt-menu-group:last-child { 31 | padding-bottom: 0; 32 | } 33 | 34 | .vt-menu .vt-menu-group + .vt-menu-item-item { 35 | border-top: 1px solid var(--vt-c-divider-light); 36 | padding: 11px 16px 0; 37 | } 38 | 39 | .vt-menu .vt-menu-item { 40 | padding: 0 16px; 41 | white-space: nowrap; 42 | } 43 | 44 | .vt-menu-label { 45 | flex-grow: 1; 46 | line-height: 28px; 47 | font-size: 12px; 48 | font-weight: 500; 49 | color: var(--vt-c-text-2); 50 | transition: color .5s; 51 | } 52 | 53 | .vt-menu-action { 54 | padding-left: 24px; 55 | } 56 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-social-link.css: -------------------------------------------------------------------------------- 1 | .vt-social-link { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | color: var(--vt-c-text-2); 6 | transition: color .5s; 7 | } 8 | 9 | .vt-social-link.is-small { 10 | width: 36px; 11 | height: 36px; 12 | } 13 | 14 | .vt-social-link.is-small .vt-social-link-icon { 15 | width: 20px; 16 | height: 20px; 17 | } 18 | 19 | .vt-social-link.is-medium { 20 | width: 48px; 21 | height: 48px; 22 | } 23 | 24 | .vt-social-link.is-medium .vt-social-link-icon { 25 | width: 24px; 26 | height: 24px; 27 | } 28 | 29 | .vt-social-link:hover { 30 | color: var(--vt-c-text-1); 31 | transition: color .25s; 32 | } 33 | 34 | .vt-social-link-icon { 35 | fill: currentColor; 36 | } 37 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-social-links.css: -------------------------------------------------------------------------------- 1 | .vt-social-links { 2 | display: flex; 3 | justify-content: center; 4 | } 5 | -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-switch-appearance.css: -------------------------------------------------------------------------------- 1 | .vt-switch-appearance-sun { 2 | opacity: 1; 3 | } 4 | .vt-switch-appearance-moon { 5 | opacity: 0; 6 | } 7 | 8 | .dark .vt-switch-appearance-sun { 9 | opacity: 0; 10 | } 11 | .dark .vt-switch-appearance-moon { 12 | opacity: 1; 13 | } 14 | 15 | .dark .vt-switch-appearance .vt-switch-check { 16 | transform: translateX(18px); 17 | } -------------------------------------------------------------------------------- /packages/theme/src/core/styles/vt-switch.css: -------------------------------------------------------------------------------- 1 | .vt-switch { 2 | position: relative; 3 | border-radius: 11px; 4 | display: block; 5 | width: 40px; 6 | height: 22px; 7 | flex-shrink: 0; 8 | border: 1px solid var(--vt-c-divider); 9 | background-color: var(--vt-c-bg-mute); 10 | transition: border-color 0.25s, background-color 0.25s; 11 | } 12 | 13 | .vt-switch:hover { 14 | border-color: var(--vt-c-gray); 15 | } 16 | 17 | .vt-switch-check { 18 | position: absolute; 19 | top: 1px; 20 | left: 1px; 21 | width: 18px; 22 | height: 18px; 23 | border-radius: 50%; 24 | background-color: var(--vt-c-white); 25 | box-shadow: var(--vt-shadow-1); 26 | transition: background-color 0.25s, transform 0.25s; 27 | } 28 | 29 | .dark .vt-switch-check { 30 | background-color: var(--vt-c-black); 31 | } 32 | 33 | .vt-switch-icon { 34 | position: relative; 35 | display: block; 36 | width: 18px; 37 | height: 18px; 38 | border-radius: 50%; 39 | overflow: hidden; 40 | } 41 | 42 | .vt-switch-icon svg { 43 | position: absolute; 44 | top: 3px; 45 | left: 3px; 46 | width: 12px; 47 | height: 12px; 48 | fill: var(--vt-c-text-2); 49 | } 50 | 51 | .dark .vt-switch-icon svg { 52 | fill: var(--vt-c-text-1); 53 | transition: opacity 0.25s; 54 | } 55 | -------------------------------------------------------------------------------- /packages/theme/src/core/types/menu.ts: -------------------------------------------------------------------------------- 1 | export type MenuItem = MenuItemWithLink | MenuItemWithChildren 2 | 3 | export interface MenuItemWithLink { 4 | text: string 5 | link: string 6 | } 7 | 8 | export interface MenuItemWithChildren { 9 | text: string 10 | items: MenuItemChild[] 11 | } 12 | 13 | export type MenuItemChild = MenuItemWithLink | MenuItemChildWithChildren 14 | 15 | export interface MenuItemChildWithChildren { 16 | text?: string 17 | items: MenuItemWithLink[] 18 | } 19 | -------------------------------------------------------------------------------- /packages/theme/src/core/types/socialLink.ts: -------------------------------------------------------------------------------- 1 | export interface SocialLink { 2 | icon: SocialLinkIcon 3 | link: string 4 | } 5 | 6 | export type SocialLinkIcon = 7 | | 'discord' 8 | | 'facebook' 9 | | 'github' 10 | | 'linkedin' 11 | | 'slack' 12 | | 'twitter' 13 | | 'languages' 14 | 15 | export type SocialLinkSize = 'small' | 'medium' 16 | -------------------------------------------------------------------------------- /packages/theme/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './core' 2 | export * from './vitepress' 3 | -------------------------------------------------------------------------------- /packages/theme/src/shim.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@docsearch/js' { 2 | function docsearch(props: T): void 3 | export default docsearch 4 | } 5 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPAlgoliaSearchBox.vue: -------------------------------------------------------------------------------- 1 | 119 | 120 | 123 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPAnnouncer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPApp.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 85 | 86 | 100 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPCarbonAds.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 42 | 43 | 71 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPContent.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 34 | 35 | 59 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPContentDocFooter.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 60 | 61 | 101 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPContentDocOutline.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 60 | 61 | 115 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPContentPage.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPFooter.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 20 | 52 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPLocalNav.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 37 | 38 | 107 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNav.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 20 | 21 | 37 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBar.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 35 | 36 | 82 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarAppearance.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 25 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarExtra.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 35 | 36 | 66 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarHamburger.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | 21 | 33 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarMenu.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | 19 | 30 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarMenuGroup.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | 25 | 31 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarMenuLink.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 30 | 31 | 50 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarSocialLinks.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | 17 | 29 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavBarTitle.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | 14 | 50 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreen.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 38 | 39 | 97 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenAppearance.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 34 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenMenu.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 25 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenMenuGroup.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 54 | 55 | 117 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenMenuGroupLink.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | 34 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenMenuGroupSection.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | 23 | 37 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenMenuLink.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 19 | 35 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNavScreenSocialLinks.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPNotFound.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 24 | 25 | 38 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPSidebar.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 42 | 43 | 119 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPSidebarGroup.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 32 | 33 | 52 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPSidebarLink.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 24 | 25 | 56 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/components/VPSkipLink.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 41 | 42 | 66 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/composables/config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | computed, 4 | defineComponent, 5 | h, 6 | inject, 7 | InjectionKey, 8 | provide, 9 | Ref 10 | } from 'vue' 11 | import { useData } from 'vitepress' 12 | import { 13 | Config, 14 | MultiSidebarConfig, 15 | SidebarConfig, 16 | SidebarGroup 17 | } from '../config' 18 | import { MenuItem, MenuItemChild } from '../../core' 19 | import { normalizeLink } from '../support/utils' 20 | 21 | const configSymbol: InjectionKey> = Symbol('config') 22 | 23 | /** 24 | * Wrap root App component to provide the resolved theme config 25 | * so that we reuse the same computed ref across the entire app instead of 26 | * re-creating one in every consumer component. 27 | */ 28 | export function withConfigProvider(App: Component) { 29 | return defineComponent({ 30 | name: 'VPConfigProvider', 31 | setup(_, { slots }) { 32 | const { theme } = useData() 33 | const config = computed(() => resolveConfig(theme.value)) 34 | provide(configSymbol, config) 35 | return () => h(App, null, slots) 36 | } 37 | }) 38 | } 39 | 40 | export function useConfig() { 41 | return { 42 | config: inject(configSymbol)! 43 | } 44 | } 45 | 46 | function resolveConfig(config: Config): Config { 47 | return Object.assign( 48 | { 49 | appearance: true 50 | }, 51 | config, 52 | { 53 | nav: config.nav?.map(normalizeMenuItem), 54 | sidebar: config.sidebar && normalizeSideBar(config.sidebar) 55 | } 56 | ) 57 | } 58 | 59 | function normalizeMenuItem(item: T): T { 60 | if ('link' in item) { 61 | return Object.assign({}, item, { 62 | link: normalizeLink(item.link) 63 | }) 64 | } else { 65 | return Object.assign({}, item, { items: item.items.map(normalizeMenuItem) }) 66 | } 67 | } 68 | 69 | function normalizeSideBar(sidebar: SidebarConfig): SidebarConfig { 70 | if (Array.isArray(sidebar)) { 71 | return sidebar.map(normalizeMenuItem) 72 | } else { 73 | const ret: MultiSidebarConfig = {} 74 | for (const key in sidebar) { 75 | ret[key] = normalizeSideBar(sidebar[key]) as SidebarGroup[] 76 | } 77 | return ret 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/composables/nav.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export function useNav() { 4 | const isScreenOpen = ref(false) 5 | 6 | function openScreen() { 7 | isScreenOpen.value = true 8 | window.addEventListener('resize', closeScreenOnTabletWindow) 9 | } 10 | 11 | function closeScreen() { 12 | isScreenOpen.value = false 13 | window.removeEventListener('resize', closeScreenOnTabletWindow) 14 | } 15 | 16 | function toggleScreen() { 17 | isScreenOpen.value ? closeScreen() : openScreen() 18 | } 19 | 20 | /** 21 | * Close screen when the user resizes the window wider than tablet size. 22 | */ 23 | function closeScreenOnTabletWindow() { 24 | window.outerWidth >= 768 && closeScreen() 25 | } 26 | 27 | return { 28 | isScreenOpen, 29 | openScreen, 30 | closeScreen, 31 | toggleScreen 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/composables/sidebar.ts: -------------------------------------------------------------------------------- 1 | import { ref, computed } from 'vue' 2 | import { useRoute, useData } from 'vitepress' 3 | import { getSidebar } from '../support/sidebar' 4 | import { useConfig } from './config' 5 | 6 | export function useSidebar() { 7 | const route = useRoute() 8 | const { config } = useConfig() 9 | const { frontmatter } = useData() 10 | 11 | const isOpen = ref(false) 12 | 13 | const sidebar = computed(() => { 14 | const sidebarConfig = config.value.sidebar 15 | const relativePath = route.data.relativePath 16 | 17 | return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [] 18 | }) 19 | 20 | const hasSidebar = computed( 21 | () => frontmatter.value.sidebar !== false && sidebar.value.length > 0 22 | ) 23 | 24 | function open() { 25 | isOpen.value = true 26 | } 27 | 28 | function close() { 29 | isOpen.value = false 30 | } 31 | 32 | function toggle() { 33 | isOpen.value ? close() : open() 34 | } 35 | 36 | return { 37 | isOpen, 38 | sidebar, 39 | hasSidebar, 40 | open, 41 | close, 42 | toggle 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | MenuItemChildWithChildren, 3 | MenuItemWithLink, 4 | SocialLink 5 | } from '../core' 6 | 7 | export interface Config { 8 | /** 9 | * The appearance option to enable/disable light/dark mode. 10 | * 11 | * @default true 12 | */ 13 | appearance?: boolean 14 | 15 | /** 16 | * The social links to be displayed at the end of the nav bar. Perfect for 17 | * placing links to social services such as GitHub, Twitter, Facebook, etc. 18 | */ 19 | socialLinks?: SocialLink[] 20 | 21 | /** 22 | * The nav items. 23 | */ 24 | nav?: NavItem[] 25 | 26 | /** 27 | * The sidebar items. 28 | */ 29 | sidebar?: SidebarConfig 30 | 31 | /** 32 | * Info for the edit link 33 | */ 34 | editLink?: { 35 | /** 36 | * Repo of the site. 37 | * e.g. `vuejs/docs#next` 38 | * 39 | * If a branch isn't specified, it defaults to `main`. 40 | */ 41 | repo?: string 42 | text?: string 43 | } 44 | 45 | /** 46 | * Global footer settings. The footer will only be displayed when a page has 47 | * the frontmatter option `page: true`. You may pass `footer: false` to the 48 | * frontmatter to hide the footer. 49 | */ 50 | footer?: { 51 | license?: { 52 | text: string 53 | link: string 54 | } 55 | 56 | copyright?: string 57 | } 58 | 59 | /** 60 | * Algolia configuration for the site search. 61 | */ 62 | algolia?: AlgoliaSearchOptions 63 | 64 | /** 65 | * CarbonAds configuration 66 | */ 67 | carbonAds?: { 68 | code: string 69 | placement: string 70 | } 71 | } 72 | 73 | /** 74 | * The Algolia search options. Partially copied from 75 | * @docsearch/react/dist/esm/DocSearch.d.ts 76 | */ 77 | export interface AlgoliaSearchOptions { 78 | appId?: string 79 | apiKey: string 80 | indexName: string 81 | placeholder?: string 82 | searchParameters?: any 83 | disableUserPersonalization?: boolean 84 | initialQuery?: string 85 | } 86 | 87 | export type NavItem = NavItemWithLink | NavItemWithChildren 88 | 89 | export type NavItemWithLink = MenuItemWithLink & { 90 | /** 91 | * activeMatch is expected to be a regex string 92 | * We can't use actual RegExp object here because it isn't serializable 93 | */ 94 | activeMatch?: string 95 | } 96 | 97 | export interface NavItemWithChildren { 98 | text?: string 99 | activeMatch?: string 100 | items: (NavItemWithLink | MenuItemChildWithChildren)[] 101 | } 102 | 103 | export type SidebarConfig = SidebarGroup[] | MultiSidebarConfig 104 | 105 | export interface MultiSidebarConfig { 106 | [path: string]: SidebarGroup[] 107 | } 108 | 109 | export interface SidebarGroup { 110 | text: string 111 | items: MenuItemWithLink[] 112 | } 113 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/config/baseConfig.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is intended to be required from VitePress 3 | * consuming project's config file. 4 | * 5 | * It runs in Node.js. 6 | */ 7 | 8 | // for local-linked development 9 | const deps = ['@vue/theme', '@vueuse/core', 'body-scroll-lock'] 10 | 11 | /** 12 | * @type {() => Promise} 13 | */ 14 | module.exports = async () => ({ 15 | vite: { 16 | ssr: { 17 | noExternal: deps 18 | }, 19 | optimizeDeps: { 20 | exclude: deps 21 | } 22 | }, 23 | 24 | head: [ 25 | [ 26 | 'link', 27 | { 28 | rel: 'icon', 29 | href: '/logo.svg' 30 | } 31 | ], 32 | ...(process.env.NODE_ENV === 'production' 33 | ? [ 34 | [ 35 | 'link', 36 | { 37 | rel: 'preload', 38 | href: '/assets/inter-latin.7b37fe23.woff2', 39 | as: 'font', 40 | type: 'font/woff2', 41 | crossorigin: 'anonymous' 42 | } 43 | ] 44 | ] 45 | : []), 46 | [ 47 | 'script', 48 | {}, 49 | require('fs').readFileSync( 50 | require('path').resolve( 51 | __dirname, 52 | './inlined-scripts/applyDarkMode.js' 53 | ), 54 | 'utf-8' 55 | ) 56 | ] 57 | ], 58 | 59 | markdown: { 60 | highlight: await require('./highlight')() 61 | }, 62 | 63 | shouldPreload: (link) => { 64 | // make algolia chunk prefetch instead of preload 65 | return !link.includes('Algolia') 66 | } 67 | }) 68 | -------------------------------------------------------------------------------- /packages/theme/src/vitepress/config/highlight.js: -------------------------------------------------------------------------------- 1 | const htmlEscapes = { 2 | '&': '&', 3 | '<': '<', 4 | '>': '>', 5 | '"': '"', 6 | "'": ''' 7 | } 8 | 9 | function escapeHtml(html) { 10 | return html.replace(/[&<>"']/g, (chr) => htmlEscapes[chr]) 11 | } 12 | 13 | module.exports = async (theme = 'material-palenight') => { 14 | const highlighter = await require('shiki').getHighlighter({ 15 | theme 16 | }) 17 | 18 | return (code, lang) => { 19 | if (!lang || lang === 'text') { 20 | return `
${escapeHtml(code)}
` 21 | } 22 | return highlighter.codeToHtml(code, lang).replace(/^/, '
')
23 |   }
24 | }
25 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/config/inlined-scripts/applyDarkMode.js:
--------------------------------------------------------------------------------
 1 | ;(() => {
 2 |   const saved = localStorage.getItem('vue-theme-appearance')
 3 |   if (
 4 |     !saved || saved === 'auto'
 5 |       ? window.matchMedia(`(prefers-color-scheme: dark)`).matches
 6 |       : saved === 'dark'
 7 |   ) {
 8 |     document.documentElement.classList.add('dark')
 9 |   }
10 | })()
11 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-cyrillic-ext.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-cyrillic-ext.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-cyrillic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-cyrillic.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-greek-ext.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-greek-ext.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-greek.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-greek.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-latin-ext.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-latin-ext.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-latin.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-latin.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/fonts/inter-vietnamese.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/fonts/inter-vietnamese.woff2


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/imgs/rebebuca.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/godkun/website/2ed2b513a7d47371c58bb277d1f1998a042e6042/packages/theme/src/vitepress/imgs/rebebuca.png


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/index.ts:
--------------------------------------------------------------------------------
 1 | import './styles/index.css'
 2 | import VPApp from './components/VPApp.vue'
 3 | import VPNotFound from './components/VPNotFound.vue'
 4 | import { Theme } from 'vitepress'
 5 | import { withConfigProvider } from './composables/config'
 6 | 
 7 | const VPTheme: Theme = {
 8 |   Layout: withConfigProvider(VPApp),
 9 |   NotFound: VPNotFound
10 | }
11 | 
12 | export { VPTheme }
13 | 
14 | export type { Config } from './config'
15 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/styles/fonts.css:
--------------------------------------------------------------------------------
 1 | @font-face {
 2 |   font-family: Inter;
 3 |   font-style: normal;
 4 |   font-weight: 100 900;
 5 |   font-display: swap;
 6 |   src: url(../fonts/inter-latin.woff2) format('woff2');
 7 |   unicode-range: U+00??, U+0131, U+0152-0153, U+02bb-02bc, U+02c6, U+02da,
 8 |     U+02dc, U+2000-206f, U+2074, U+20ac, U+2122, U+2191, U+2193, U+2212, U+2215,
 9 |     U+feff, U+fffd;
10 | }
11 | @font-face {
12 |   font-family: Inter;
13 |   font-style: normal;
14 |   font-weight: 400 500 600 700 900;
15 |   font-display: swap;
16 |   src: url(../fonts/inter-latin-ext.woff2) format('woff2');
17 |   unicode-range: U+0100-024f, U+0259, U+1e??, U+2020, U+20a0-20ab, U+20ad-20cf,
18 |     U+2113, U+2c60-2c7f, U+a720-a7ff;
19 | }
20 | @font-face {
21 |   font-family: Inter;
22 |   font-style: normal;
23 |   font-weight: 400 500 600 700 900;
24 |   font-display: swap;
25 |   src: url(../fonts/inter-cyrillic.woff2) format('woff2');
26 |   unicode-range: U+0400-045f, U+0490-0491, U+04b0-04b1, U+2116;
27 | }
28 | @font-face {
29 |   font-family: Inter;
30 |   font-style: normal;
31 |   font-weight: 400 500 600 700 900;
32 |   font-display: swap;
33 |   src: url(../fonts/inter-cyrillic-ext.woff2) format('woff2');
34 |   unicode-range: U+0460-052f, U+1c80-1c88, U+20b4, U+2de0-2dff, U+a640-a69f,
35 |     U+fe2e-fe2f;
36 | }
37 | @font-face {
38 |   font-family: Inter;
39 |   font-style: normal;
40 |   font-weight: 400 500 600 700 900;
41 |   font-display: swap;
42 |   src: url(../fonts/inter-greek.woff2) format('woff2');
43 |   unicode-range: U+0370-03ff;
44 | }
45 | @font-face {
46 |   font-family: Inter;
47 |   font-style: normal;
48 |   font-weight: 400 500 600 700 900;
49 |   font-display: swap;
50 |   src: url(../fonts/inter-greek-ext.woff2) format('woff2');
51 |   unicode-range: U+1f??;
52 | }
53 | @font-face {
54 |   font-family: Inter;
55 |   font-style: normal;
56 |   font-weight: 400 500 600 700 900;
57 |   font-display: swap;
58 |   src: url(../fonts/inter-vietnamese.woff2) format('woff2');
59 |   unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01a0-01a1,
60 |     U+01af-01b0, U+1ea0-1ef9, U+20ab;
61 | }
62 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/styles/index.css:
--------------------------------------------------------------------------------
1 | @import '../../core/styles/index.css';
2 | @import './fonts.css';
3 | @import './variables.css';
4 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/styles/variables.css:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * Layouts
 3 |  * -------------------------------------------------------------------------- */
 4 | 
 5 | :root {
 6 |   /* Z Indexes */
 7 |   --vp-z-index-local-nav: 10;
 8 |   --vp-z-index-nav: 20;
 9 |   --vp-z-index-banner: 30;
10 |   --vp-z-index-backdrop: 40;
11 |   --vp-z-index-sidebar: 50;
12 | 
13 |   /* Screen Size */
14 |   --vp-screen-max-width: 1376px;
15 | }
16 | 
17 | /**
18 |  * Component: Sidebar
19 |  * -------------------------------------------------------------------------- */
20 | 
21 | :root {
22 |   --vp-sidebar-width-mobile: 320px;
23 |   --vp-sidebar-width-small: 272px;
24 | }
25 | 
26 | html.dark {
27 |   color-scheme: dark;
28 | }
29 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/support/sidebar.ts:
--------------------------------------------------------------------------------
 1 | import { SidebarConfig, SidebarGroup } from '../config'
 2 | import { ensureStartingSlash } from './utils'
 3 | 
 4 | /**
 5 |  * Get the `SidebarConfig` from sidebar option. This method will ensure to get
 6 |  * correct sidebar config from `MultiSideBarConfig` with various path
 7 |  * combinations such as matching `guide/` and `/guide/`. If no matching config
 8 |  * was found, it will return empty array.
 9 |  */
10 | export function getSidebar(
11 |   sidebar: SidebarConfig,
12 |   path: string
13 | ): SidebarGroup[] {
14 |   if (Array.isArray(sidebar)) {
15 |     return sidebar
16 |   }
17 | 
18 |   path = ensureStartingSlash(path)
19 | 
20 |   for (const dir in sidebar) {
21 |     // make sure the multi sidebar key starts with slash too
22 |     if (path.startsWith(ensureStartingSlash(dir))) {
23 |       return sidebar[dir]
24 |     }
25 |   }
26 | 
27 |   return []
28 | }
29 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/support/utils.ts:
--------------------------------------------------------------------------------
 1 | import { withBase } from 'vitepress'
 2 | import { ref } from 'vue'
 3 | 
 4 | export const hashRE = /#.*$/
 5 | export const extRE = /(index)?\.(md|html)$/
 6 | export const outboundRE = /^[a-z]+:/i
 7 | 
 8 | export function isExternal(path: string): boolean {
 9 |   return outboundRE.test(path)
10 | }
11 | 
12 | export function ensureStartingSlash(path: string): string {
13 |   return /^\//.test(path) ? path : `/${path}`
14 | }
15 | 
16 | export function normalizeLink(url: string): string {
17 |   if (isExternal(url)) {
18 |     return url
19 |   }
20 |   const { pathname, search, hash } = new URL(url, 'http://vuejs.org')
21 |   return withBase(
22 |     pathname.endsWith('/') || pathname.endsWith('.html')
23 |       ? url
24 |       : `${pathname.replace(/(\.md)?$/, '.html')}${search}${hash}`
25 |   )
26 | }
27 | 
28 | const inBrowser = typeof window !== 'undefined'
29 | const hashRef = ref(inBrowser ? location.hash : '')
30 | if (inBrowser) {
31 |   window.addEventListener('hashchange', () => {
32 |     hashRef.value = location.hash
33 |   })
34 | }
35 | 
36 | export function isActive(
37 |   currentPath: string,
38 |   matchPath?: string,
39 |   asRegex = false
40 | ): boolean {
41 |   if (matchPath === undefined) {
42 |     return false
43 |   }
44 |   currentPath = normalize(`/${currentPath}`)
45 |   if (asRegex) {
46 |     return new RegExp(matchPath).test(currentPath)
47 |   } else {
48 |     if (normalize(matchPath) !== currentPath) {
49 |       return false
50 |     }
51 |     const hashMatch = matchPath.match(hashRE)
52 |     if (hashMatch) {
53 |       return hashRef.value === hashMatch[0]
54 |     }
55 |     return true
56 |   }
57 | }
58 | 
59 | export function normalize(path: string): string {
60 |   return decodeURI(path).replace(hashRE, '').replace(extRE, '')
61 | }
62 | 


--------------------------------------------------------------------------------
/packages/theme/src/vitepress/svg/logo.svg:
--------------------------------------------------------------------------------
 1 | 
 2 |   
 3 |     
14 |     
15 |       
16 |       
17 |     
18 |   
19 |   
20 |     Monibuca
21 |     
22 |   
23 | 
24 | 


--------------------------------------------------------------------------------
/packages/theme/tsconfig.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "compilerOptions": {
 3 |     "baseUrl": ".",
 4 |     "module": "esnext",
 5 |     "moduleResolution": "node",
 6 |     "strict": true,
 7 |     "esModuleInterop": true,
 8 |     "noUnusedLocals": true,
 9 |     "lib": ["ESNext", "DOM"],
10 |     "types": ["vite/client"],
11 |     "paths": {
12 |       "@vue/theme": ["src/index.ts"]
13 |     }
14 |   },
15 |   "include": [
16 |     "src",
17 |     "types",
18 |     "demo/.vitepress/theme"
19 |   ],
20 |   "exclude": ["node_modules"]
21 | }
22 | 


--------------------------------------------------------------------------------
/packages/theme/types/vue-shim.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue' {
2 |   import { ComponentOptions } from 'vue'
3 |   const comp: ComponentOptions
4 |   export default comp
5 | }
6 | 


--------------------------------------------------------------------------------
/packages/ui/.npmignore:
--------------------------------------------------------------------------------
1 | rollup.config.js
2 | tsconfig.json
3 | node_modules
4 | 


--------------------------------------------------------------------------------
/packages/ui/package.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "name": "@m7s/ui",
 3 |   "version": "1.0.2",
 4 |   "description": "An infrastructure monorepo ui library for all front-end apps.",
 5 |   "publishConfig": {
 6 |     "access": "public",
 7 |     "registry": "https://registry.npmjs.org/"
 8 |   },
 9 |   "browser": {
10 |     "./vue": "./es/vue/index.js"
11 |   },
12 |   "exports": {
13 |     "./vue": {
14 |       "import": "./es/vue/index.js",
15 |       "require": "./lib/vue/index.cjs"
16 |     }
17 |   },
18 |   "scripts": {
19 |     "start": "npm run dev",
20 |     "dev": "rollup --config rollup.config.js --watch",
21 |     "build": "rollup --config rollup.config.js",
22 |     "prepare": "npm run build"
23 |   },
24 |   "dependencies": {
25 |     "lodash-es": "^4.17.21"
26 |   },
27 |   "peerDependencies": {
28 |     "vue": "^3.0.0"
29 |   },
30 |   "devDependencies": {
31 |     "@m7s/shared": "workspace:*",
32 |     "vue": "^3.2.26",
33 |     "@types/lodash-es": "^4.17.5",
34 |     "@babel/core": "^7.14.5",
35 |     "@babel/node": "^7.14.5",
36 |     "@babel/plugin-proposal-object-rest-spread": "^7.14.5",
37 |     "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
38 |     "@babel/plugin-transform-runtime": "^7.14.5",
39 |     "@babel/preset-env": "^7.14.5",
40 |     "@babel/runtime": "^7.14.5",
41 |     "@rollup/plugin-babel": "^5.3.0",
42 |     "@rollup/plugin-commonjs": "^21.0.1",
43 |     "@rollup/plugin-node-resolve": "^13.1.1",
44 |     "rollup": "^2.60.2",
45 |     "postcss": "^8.4.5",
46 |     "rollup-plugin-postcss": "^4.0.2",
47 |     "rollup-plugin-typescript2": "^0.31.1",
48 |     "rollup-plugin-vue": "^6.0.0",
49 |     "tslib": "^2.3.0",
50 |     "typescript": "^4.5.2"
51 |   },
52 |   "keywords": [],
53 |   "author": "",
54 |   "license": "ISC"
55 | }
56 | 


--------------------------------------------------------------------------------
/packages/ui/rollup.config.js:
--------------------------------------------------------------------------------
 1 | import { defineConfig } from 'rollup'
 2 | import commonjs from '@rollup/plugin-commonjs'
 3 | import postcss from 'rollup-plugin-postcss'
 4 | import { nodeResolve as resolve } from '@rollup/plugin-node-resolve'
 5 | import typescript from 'rollup-plugin-typescript2'
 6 | import vue from 'rollup-plugin-vue'
 7 | import { babel } from '@rollup/plugin-babel'
 8 | import { name } from './package.json'
 9 | 
10 | export default defineConfig([
11 |   {
12 |     input: 'vue/index.ts',
13 |     external: ['vue'],
14 |     plugins: [
15 |       vue(),
16 |       typescript(),
17 |       resolve({
18 |         extensions: ['.ts', '.js', '.vue']
19 |       }),
20 |       postcss({}),
21 |       commonjs(),
22 |       babel({
23 |         presets: ['@babel/preset-env'],
24 |         plugins: [
25 |           '@babel/plugin-proposal-object-rest-spread',
26 |           '@babel/plugin-syntax-object-rest-spread',
27 |           [
28 |             '@babel/plugin-transform-runtime',
29 |             {
30 |               absoluteRuntime: false,
31 |               corejs: false,
32 |               helpers: false,
33 |               regenerator: true,
34 |               useESModules: false
35 |             }
36 |           ]
37 |         ],
38 |         babelrc: false,
39 |         extensions: [
40 |           '.js',
41 |           '.ts',
42 |           '.tsx',
43 |           '.jsx',
44 |           '.es6',
45 |           '.es',
46 |           '.mjs',
47 |           '.vue'
48 |         ]
49 |       })
50 |     ],
51 |     output: [
52 |       {
53 |         name,
54 |         file: './dist/vue/index.js',
55 |         format: 'umd',
56 |         exports: 'named',
57 |         globals: {
58 |           vue: 'Vue'
59 |         }
60 |       },
61 |       {
62 |         name,
63 |         file: './es/vue/index.js',
64 |         format: 'es'
65 |       },
66 |       {
67 |         name,
68 |         file: './lib/vue/index.cjs',
69 |         format: 'commonjs'
70 |       }
71 |     ]
72 |   }
73 | ])
74 | 


--------------------------------------------------------------------------------
/packages/ui/tsconfig.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "extends": "@m7s/shared/configs/tsconfig.base.json",
 3 |   "compilerOptions": {
 4 |     "module": "esnext",
 5 |     "isolatedModules": true,
 6 |     "noEmit": true
 7 |   },
 8 |   "include": ["vue"]
 9 | }
10 | 


--------------------------------------------------------------------------------
/packages/ui/vue/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Logo } from './Logo.vue'
2 | 


--------------------------------------------------------------------------------
/packages/ui/vue/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.vue'
2 | 


--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 |   - 'packages/**'
3 |   - 'apps/**'
4 | 


--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "headers": [
 3 |     {
 4 |       "source": "/(.*)",
 5 |       "headers": [
 6 |         {
 7 |           "key": "Access-Control-Allow-Origin",
 8 |           "value": "*"
 9 |         },
10 |         {
11 |           "key": "Access-Control-Allow-Headers",
12 |           "value": "content-type"
13 |         },
14 |         {
15 |           "key": "Access-Control-Allow-Methods",
16 |           "value": "DELETE,PUT,POST,GET,OPTIONS"
17 |         }
18 |       ]
19 |     }
20 |   ],
21 |   "rewrites": [
22 |     {
23 |       "source": "/engine/(.*)",
24 |       "destination": "/api/engine"
25 |     },
26 |     {
27 |       "source": "/plugin/(.*)",
28 |       "destination": "/api/plugin"
29 |     }
30 |   ]
31 | }
32 | 


--------------------------------------------------------------------------------