diff --git a/.gitignore b/.gitignore index 8e7ab3b..8a783a6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ coverage .cache-loader packages/logos-*/lib/* +packages/docusaurus-*/lib/* packages/logos-docusaurus-preset/static/common/data/team.json lerna-debug.log diff --git a/packages/docusaurus-og/package.json b/packages/docusaurus-og/package.json new file mode 100644 index 0000000..51d6973 --- /dev/null +++ b/packages/docusaurus-og/package.json @@ -0,0 +1,35 @@ +{ + "name": "@acid-info/docusaurus-og", + "version": "1.0.0-alpha.44", + "description": "Docusaurus local search plugin", + "main": "lib/index.js", + "types": "src/plugin.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/acid-info/logos-docusaurus-plugins.git", + "directory": "packages/docusaurus-search-local" + }, + "license": "MIT", + "scripts": { + "build": "tsc --build", + "watch": "tsc --build --watch", + "prepublishOnly": "yarn build" + }, + "dependencies": { + "@docusaurus/core": "^2.4.1", + "@docusaurus/module-type-aliases": "^2.4.1", + "@docusaurus/types": "^2.4.1", + "@docusaurus/utils": "^2.4.1", + "@docusaurus/utils-common": "^2.4.1", + "@docusaurus/utils-validation": "^2.4.1", + "@easyops-cn/docusaurus-search-local": "^0.33.6", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=16.14" + }, + "devDependencies": { + "@types/lodash": "^4.14.186" + }, + "gitHead": "d2ee08c6c0678f78ad70f5d04183f7f781d11563" +} diff --git a/packages/docusaurus-og/src/index.ts b/packages/docusaurus-og/src/index.ts new file mode 100644 index 0000000..89eeefd --- /dev/null +++ b/packages/docusaurus-og/src/index.ts @@ -0,0 +1,19 @@ +import type { LoadContext, Plugin } from '@docusaurus/types' +import { postBuildFactory } from './server/index' +import { PluginOptions } from './server/types/plugin.types' +export { imageRendererFactory } from './server/imageRenderer.factory' +export * from './server/types' +export type { PluginOptions } + +export default function logosTheme( + context: LoadContext, + options: PluginOptions, +): Plugin { + return { + name: 'docusaurus-og', + + async postBuild(props) { + await postBuildFactory(options)(props) + }, + } +} diff --git a/packages/docusaurus-og/src/plugin.d.ts b/packages/docusaurus-og/src/plugin.d.ts new file mode 100644 index 0000000..ccd487e --- /dev/null +++ b/packages/docusaurus-og/src/plugin.d.ts @@ -0,0 +1 @@ +export type * from './index' diff --git a/packages/docusaurus-og/src/server/blog.plugin.ts b/packages/docusaurus-og/src/server/blog.plugin.ts new file mode 100644 index 0000000..eda5e9a --- /dev/null +++ b/packages/docusaurus-og/src/server/blog.plugin.ts @@ -0,0 +1,125 @@ +import { + BlogContent, + PluginOptions as BlogPluginOptions, +} from '@docusaurus/plugin-content-blog' +import { LoadedPlugin, Props } from '@docusaurus/types' +import * as fs from 'fs' +import * as path from 'path' +import { Document } from './document' +import { ImageGenerator } from './imageGenerator' +import { BlogPageData } from './types/blog.types' +import { ImageRenderer } from './types/image.types' +import { PluginOptions } from './types/plugin.types' + +export class BlogPlugin { + static plugin = 'docusaurus-plugin-content-blog' + + pages: BlogPageData[] = [] + + constructor( + private context: Props, + private options: PluginOptions, + private imageGenerator: ImageGenerator, + private imageRenderer: ImageRenderer, + ) {} + + process = async () => { + await this.loadData() + await this.generate() + } + + loadData = async () => { + const plugins = this.context.plugins.filter( + (plugin) => plugin.name === BlogPlugin.plugin, + ) + + for (const plugin of plugins) { + await this.loadInstance(plugin) + } + } + + loadInstance = async (plugin: LoadedPlugin) => { + const content = plugin.content as BlogContent + const options = plugin.options as BlogPluginOptions + + content.blogListPaginated.forEach((value) => { + this.pages.push({ + data: value, + plugin: options, + pageType: 'list', + permalink: value.metadata.permalink, + }) + }) + + content.blogPosts.forEach((post) => { + this.pages.push({ + data: post, + plugin: options, + pageType: 'post', + permalink: post.metadata.permalink, + }) + }) + + if (content.blogTagsListPath) { + const filePath = this.getHtmlPath(content.blogTagsListPath) + fs.existsSync(filePath) && + this.pages.push({ + pageType: 'tags', + plugin: options, + data: { + permalink: content.blogTagsListPath, + }, + permalink: content.blogTagsListPath, + }) + } + + if (options.archiveBasePath) { + this.pages.push({ + plugin: options, + pageType: 'archive', + data: { permalink: options.archiveBasePath }, + permalink: options.archiveBasePath, + }) + } + + { + Object.entries(content.blogTags).map(([key, value]) => { + value.pages.forEach((page) => { + this.pages.push({ + pageType: 'tag', + plugin: options, + data: { ...page.metadata, label: value.label }, + permalink: page.metadata.permalink, + }) + }) + }) + } + } + + generate = async () => { + for (const page of this.pages) { + const image = await this.imageRenderer( + { + ...page, + websiteOutDir: this.context.outDir, + }, + this.context, + ) + + if (!image) continue + + const generated = await this.imageGenerator.generate(...image) + const document = new Document(this.getHtmlPath(page.permalink)) + + await document.load() + if (!document.loaded) continue + + await document.setImage(generated.url) + + await document.write() + } + } + + getHtmlPath = (permalink: string) => + path.join(this.context.outDir, permalink, 'index.html') +} diff --git a/packages/docusaurus-og/src/server/docs.plugin.ts b/packages/docusaurus-og/src/server/docs.plugin.ts new file mode 100644 index 0000000..9875b37 --- /dev/null +++ b/packages/docusaurus-og/src/server/docs.plugin.ts @@ -0,0 +1,87 @@ +import { + LoadedContent, + LoadedVersion, + PluginOptions as DocsPluginOptions, +} from '@docusaurus/plugin-content-docs' +import { LoadedPlugin, Props } from '@docusaurus/types' +import * as path from 'path' +import { Document } from './document' +import { ImageGenerator } from './imageGenerator' +import { DocsPageData } from './types/docs.types' +import { ImageRenderer } from './types/image.types' +import { PluginOptions } from './types/plugin.types' + +export class DocsPlugin { + static plugin = 'docusaurus-plugin-content-docs' + + docs: DocsPageData[] = [] + + constructor( + private context: Props, + private options: PluginOptions, + private imageGenerator: ImageGenerator, + private imageRenderer: ImageRenderer, + ) {} + + process = async () => { + await this.loadData() + await this.generate() + } + + loadData = async () => { + const { plugins = [] } = this.context + + const docPlugins = plugins.filter( + (plugin) => plugin.name === DocsPlugin.plugin, + ) + + for (const plugin of docPlugins) { + await this.loadInstance(plugin) + } + } + + loadInstance = async (plugin: LoadedPlugin) => { + const content = plugin.content as LoadedContent + const options = plugin.options as DocsPluginOptions + + const { loadedVersions } = content + + for (const version of loadedVersions) { + await this.loadVersion(options, version) + } + } + + loadVersion = async (options: DocsPluginOptions, version: LoadedVersion) => { + this.docs.push( + ...version.docs.map((doc) => ({ + version, + metadata: doc, + plugin: options, + })), + ) + } + + generate = async () => { + for (const doc of this.docs) { + const image = await this.imageRenderer( + { + ...doc, + websiteOutDir: this.context.outDir, + }, + this.context, + ) + + if (!image) continue + + const generated = await this.imageGenerator.generate(...image) + const document = new Document(this.getHtmlPath(doc)) + await document.load() + await document.setImage(generated.url) + + await document.write() + } + } + + getHtmlPath = (doc: DocsPageData) => + path.join(this.context.outDir, doc.metadata.permalink, 'index.html') +} diff --git a/packages/docusaurus-og/src/server/document.ts b/packages/docusaurus-og/src/server/document.ts new file mode 100644 index 0000000..e0ba136 --- /dev/null +++ b/packages/docusaurus-og/src/server/document.ts @@ -0,0 +1,57 @@ +import * as fsp from 'fs/promises' +import { HTMLElement, parse as parseHTML } from 'node-html-parser' + +export class Document { + root: HTMLElement + loaded = false + + constructor(private path: string) {} + + load = async () => { + const htmlString = await fsp.readFile(this.path, 'utf-8') + this.root = parseHTML(htmlString) + this.loaded = true + } + + write = async () => { + await fsp.writeFile(this.path, Buffer.from(this.root.outerHTML)) + } + + setImage = async (url: string) => { + this.updateMeta('property', 'og:image', { + content: url, + }) + this.updateMeta('property', 'image', { + content: url, + }) + } + + get head() { + return this.root.querySelector('head')! + } + + private getMeta(attr: string, value: string) { + const { head } = this + + let meta = head.querySelector(`meta[${attr}=${value}]`) + + if (!meta) { + meta = new HTMLElement('meta', {}, '', null, [0, 0]) + meta.setAttribute(attr, value) + head.appendChild(meta) + } + + return meta + } + + private updateMeta = ( + attr: string, + value: string, + attrs: Record, + ) => { + const el = this.getMeta(attr, value) + Object.entries(attrs).forEach(([key, value]) => el.setAttribute(key, value)) + + return el + } +} diff --git a/packages/docusaurus-og/src/server/imageGenerator.ts b/packages/docusaurus-og/src/server/imageGenerator.ts new file mode 100644 index 0000000..beedbfe --- /dev/null +++ b/packages/docusaurus-og/src/server/imageGenerator.ts @@ -0,0 +1,74 @@ +import * as fs from 'fs' +import * as fsp from 'fs/promises' +import hashObj from 'object-hash' +import path from 'path' +import React from 'react' + +// @ts-expect-error +import type Satori from 'satori' +// @ts-expect-error +import { type SatoriOptions } from 'satori' +import type Sharp from 'sharp' + +export type ImageGeneratorOptions = SatoriOptions +export type ImageGeneratorResult = { + url: string + relativePath: string + absolutePath: string +} + +export class ImageGenerator { + private satori: typeof Satori + private sharp: typeof Sharp + private cache: Record = {} + + private outDir: string = '' + + constructor( + private args: { + dir: string + websiteUrl: string + websiteOutDir: string + }, + ) { + this.outDir = path.join(this.args.websiteOutDir, this.args.dir) + } + + public init = async () => { + this.satori = await import('satori').then((mod) => mod.default) + this.sharp = await import('sharp').then((mod) => mod.default) + + if (!fs.existsSync(this.outDir)) + await fsp.mkdir(this.outDir, { recursive: true }) + } + + public generate = async ( + element: React.ReactNode, + options: ImageGeneratorOptions, + ): Promise => { + const hash = hashObj([element, options]) + if (this.cache[hash]) return this.cache[hash]! + + const imageName = `${hash}.png` + const absolutePath = path.join(this.outDir, imageName) + const relativePath = path.join( + '/', + this.args.dir, + absolutePath.slice(this.outDir.length), + ) + + const svg = await this.satori(element, options) + await this.sharp(Buffer.from(svg)).png().toFile(absolutePath) + + const url = new URL(this.args.websiteUrl) + url.pathname = relativePath + + this.cache[hash] = { + relativePath, + absolutePath, + url: url.toString(), + } + + return this.cache[hash]! + } +} diff --git a/packages/docusaurus-og/src/server/imageRenderer.factory.ts b/packages/docusaurus-og/src/server/imageRenderer.factory.ts new file mode 100644 index 0000000..5533871 --- /dev/null +++ b/packages/docusaurus-og/src/server/imageRenderer.factory.ts @@ -0,0 +1,26 @@ +import { PageData } from '../index' +import { BlogPageData } from './types/blog.types' +import { DocsPageData } from './types/docs.types' +import { ImageRenderer } from './types/image.types' + +export function imageRendererFactory( + plugin: 'docusaurus-plugin-content-docs', + handler: ImageRenderer, +): ImageRenderer +export function imageRendererFactory( + plugin: 'docusaurus-plugin-content-blog', + handler: ImageRenderer, +): ImageRenderer +export function imageRendererFactory( + plugin: 'docusaurus-plugin-content-pages', + handler: ImageRenderer, +): ImageRenderer +export function imageRendererFactory( + plugin: + | 'docusaurus-plugin-content-blog' + | 'docusaurus-plugin-content-docs' + | 'docusaurus-plugin-content-pages', + handler: ImageRenderer, +): ImageRenderer { + return handler +} diff --git a/packages/docusaurus-og/src/server/index.ts b/packages/docusaurus-og/src/server/index.ts new file mode 100644 index 0000000..04df23e --- /dev/null +++ b/packages/docusaurus-og/src/server/index.ts @@ -0,0 +1,34 @@ +import { Props } from '@docusaurus/types' +import { BlogPlugin } from './blog.plugin' +import { DocsPlugin } from './docs.plugin' +import { ImageGenerator } from './imageGenerator' +import { PagesPlugin } from './pages.plugin' +import { PluginOptions } from './types/plugin.types' + +const plugins = { + [DocsPlugin.plugin]: DocsPlugin, + [BlogPlugin.plugin]: BlogPlugin, + [PagesPlugin.plugin]: PagesPlugin, +} + +export const postBuildFactory = + (options: PluginOptions) => async (props: Props) => { + const imageGenerator = new ImageGenerator({ + websiteUrl: props.siteConfig.url, + websiteOutDir: props.outDir, + dir: options.path, + }) + + await imageGenerator.init() + + const pluginNames = Object.keys(options.imageRenderers) + + for (const pluginName of pluginNames) { + const renderer = options.imageRenderers[pluginName] + const Plugin = plugins[pluginName] + const plugin = + Plugin && new Plugin(props, options, imageGenerator, renderer!) + + plugin && (await plugin.process()) + } + } diff --git a/packages/docusaurus-og/src/server/pages.plugin.ts b/packages/docusaurus-og/src/server/pages.plugin.ts new file mode 100644 index 0000000..a84a9cb --- /dev/null +++ b/packages/docusaurus-og/src/server/pages.plugin.ts @@ -0,0 +1,93 @@ +import { + LoadedContent, + PluginOptions as PagesPluginOptions, +} from '@docusaurus/plugin-content-pages' +import { LoadedPlugin, Props } from '@docusaurus/types' +import * as path from 'path' +import { PageData } from '../index' +import { Document } from './document' +import { ImageGenerator } from './imageGenerator' +import { ImageRenderer } from './types/image.types' +import { PluginOptions } from './types/plugin.types' + +export class PagesPlugin { + static plugin = 'docusaurus-plugin-content-pages' + + pages: PageData[] = [] + + constructor( + private context: Props, + private options: PluginOptions, + private imageGenerator: ImageGenerator, + private imageRenderer: ImageRenderer, + ) {} + + process = async () => { + await this.loadData() + await this.generate() + } + + loadData = async () => { + const plugins = this.context.plugins.filter( + (plugin) => plugin.name === PagesPlugin.plugin, + ) + + for (const plugin of plugins) { + await this.loadInstance(plugin) + } + } + + loadInstance = async (plugin: LoadedPlugin) => { + const content = plugin.content as LoadedContent + const options = plugin.options as PagesPluginOptions + + for (const metadata of content) { + const doc = new Document(this.getHtmlPath(metadata.permalink)) + await doc.load() + + const title = + (doc.loaded && doc.root.querySelector('title')?.textContent) || '' + + const description = + (doc.loaded && + doc.root.querySelector('meta[name=description]')?.textContent) || + '' + + this.pages.push({ + metadata: { + ...metadata, + title, + description, + }, + plugin: options, + }) + } + } + + generate = async () => { + for (const page of this.pages) { + const image = await this.imageRenderer( + { + ...page, + websiteOutDir: this.context.outDir, + }, + this.context, + ) + + if (!image) continue + + const generated = await this.imageGenerator.generate(...image) + const document = new Document(this.getHtmlPath(page.metadata.permalink)) + + await document.load() + if (!document.loaded) continue + + await document.setImage(generated.url) + + await document.write() + } + } + + getHtmlPath = (permalink: string) => + path.join(this.context.outDir, permalink, 'index.html') +} diff --git a/packages/docusaurus-og/src/server/types/blog.types.ts b/packages/docusaurus-og/src/server/types/blog.types.ts new file mode 100644 index 0000000..f24b8f3 --- /dev/null +++ b/packages/docusaurus-og/src/server/types/blog.types.ts @@ -0,0 +1,44 @@ +import { + BlogPaginated, + BlogPost, + BlogTag, + PluginOptions, +} from '@docusaurus/plugin-content-blog' + +export type BlogPageType = + | 'post' + | 'list' + | 'archive' + | 'tags' + | 'tag' + | 'archive' + +export type BlogPageData = { + plugin: PluginOptions + permalink: string +} & ( + | { + pageType: Extract + data: BlogPost + } + | { + pageType: Extract + data: BlogPaginated + } + | { + pageType: Extract + data: { + permalink: string + } + } + | { + pageType: Extract + data: BlogTag['pages'][number]['metadata'] & Pick + } + | { + pageType: Extract + data: { + permalink: string + } + } +) diff --git a/packages/docusaurus-og/src/server/types/docs.types.ts b/packages/docusaurus-og/src/server/types/docs.types.ts new file mode 100644 index 0000000..f85caaa --- /dev/null +++ b/packages/docusaurus-og/src/server/types/docs.types.ts @@ -0,0 +1,11 @@ +import { + DocMetadata, + LoadedVersion, + PluginOptions, +} from '@docusaurus/plugin-content-docs' + +export type DocsPageData = { + plugin: PluginOptions + version: LoadedVersion + metadata: DocMetadata +} diff --git a/packages/docusaurus-og/src/server/types/image.types.ts b/packages/docusaurus-og/src/server/types/image.types.ts new file mode 100644 index 0000000..207c338 --- /dev/null +++ b/packages/docusaurus-og/src/server/types/image.types.ts @@ -0,0 +1,22 @@ +import { Props } from '@docusaurus/types' + +// @ts-expect-error +import type { SatoriOptions } from 'satori' + +export type ImageGeneratorOptions = SatoriOptions +export type ImageGeneratorResult = { + path: string + absolutePath: string +} + +export type ImageRenderer = ( + data: T, + context: Props, +) => + | [React.ReactNode, ImageGeneratorOptions] + | undefined + | void + | false + | Promise<[React.ReactNode, ImageGeneratorOptions] | undefined | void | false> + +export type ImageGenerator = (data: T) => string diff --git a/packages/docusaurus-og/src/server/types/index.ts b/packages/docusaurus-og/src/server/types/index.ts new file mode 100644 index 0000000..cc1bbfa --- /dev/null +++ b/packages/docusaurus-og/src/server/types/index.ts @@ -0,0 +1,5 @@ +export * from './blog.types' +export * from './docs.types' +export * from './image.types' +export * from './pages.types' +export * from './plugin.types' diff --git a/packages/docusaurus-og/src/server/types/pages.types.ts b/packages/docusaurus-og/src/server/types/pages.types.ts new file mode 100644 index 0000000..226146e --- /dev/null +++ b/packages/docusaurus-og/src/server/types/pages.types.ts @@ -0,0 +1,9 @@ +import { Metadata, PluginOptions } from '@docusaurus/plugin-content-pages' + +export type PageData = { + metadata: Omit & { + title: string + description?: string + } + plugin: PluginOptions +} diff --git a/packages/docusaurus-og/src/server/types/plugin.types.ts b/packages/docusaurus-og/src/server/types/plugin.types.ts new file mode 100644 index 0000000..6921026 --- /dev/null +++ b/packages/docusaurus-og/src/server/types/plugin.types.ts @@ -0,0 +1,6 @@ +import { ImageRenderer } from './image.types' + +export type PluginOptions = { + path: string + imageRenderers: Record +} diff --git a/packages/docusaurus-og/tsconfig.client.json b/packages/docusaurus-og/tsconfig.client.json new file mode 100644 index 0000000..0b248a0 --- /dev/null +++ b/packages/docusaurus-og/tsconfig.client.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo-client", + "rootDir": "src", + "outDir": "lib", + "module": "esnext", + "target": "esnext", + "lib": ["DOM"] + }, + "include": ["src/client/**/*", "src/*.d.ts"], + "exclude": ["**/__tests__/**"] +} diff --git a/packages/docusaurus-og/tsconfig.json b/packages/docusaurus-og/tsconfig.json new file mode 100644 index 0000000..771ecd9 --- /dev/null +++ b/packages/docusaurus-og/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": false, + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "rootDir": "src", + "outDir": "lib", + "target": "ES3", + "lib": ["DOM"] + }, + "include": ["src"], + "exclude": ["src/theme", "**/__tests__/**"] +} diff --git a/packages/docusaurus-playground/docusaurus.config.js b/packages/docusaurus-playground/docusaurus.config.js index 4a801e5..ec516dd 100644 --- a/packages/docusaurus-playground/docusaurus.config.js +++ b/packages/docusaurus-playground/docusaurus.config.js @@ -1,4 +1,5 @@ // @ts-check + // Note: type annotations allow type checking and IDEs autocompletion require('dotenv').config() diff --git a/packages/docusaurus-playground/package.json b/packages/docusaurus-playground/package.json index bb1c7bf..bbfbed6 100644 --- a/packages/docusaurus-playground/package.json +++ b/packages/docusaurus-playground/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.7", + "@acid-info/docusaurus-og": "1.0.0-alpha.19", "@docusaurus/core": "2.4.1", "@docusaurus/preset-classic": "2.4.1", "@docusaurus/theme-mermaid": "^2.4.1", diff --git a/packages/docusaurus-playground/src/pages/index.mdx b/packages/docusaurus-playground/src/pages/index.mdx index f3862a3..d320ad9 100644 --- a/packages/docusaurus-playground/src/pages/index.mdx +++ b/packages/docusaurus-playground/src/pages/index.mdx @@ -13,142 +13,14 @@ import { Box, } from '../components/mdx' - - - - THE STANDARD
- FOR WEB3 COMMUNICATIONS -
- {/* - - Waku is a decentralized communications network that enables private, censorship-resistant messaging for web3 - applications. - - * */} - - Waku is a decentralized communications network, built for generalized - private and censorship-resistant messaging, supporting resource-restricted - environments like phones and browsers - - - - Learn more - - - Run Waku - - -
- -
+{' '} - - - Decentralize your DApp - - - - - - - - - - - - - - - - - - - - - - + diff --git a/packages/logos-docusaurus-preset/package.json b/packages/logos-docusaurus-preset/package.json index 13253e3..db08960 100644 --- a/packages/logos-docusaurus-preset/package.json +++ b/packages/logos-docusaurus-preset/package.json @@ -18,6 +18,7 @@ "dependencies": { "@acid-info/logos-docusaurus-search-local": "^1.0.0-alpha.19", "@acid-info/logos-docusaurus-theme": "^1.0.0-alpha.46", + "@acid-info/docusaurus-og": "^1.0.0-alpha.44", "@docusaurus/core": "^2.4.1", "@docusaurus/module-type-aliases": "^2.4.1", "@docusaurus/preset-classic": "^2.4.1", diff --git a/packages/logos-docusaurus-preset/src/index.ts b/packages/logos-docusaurus-preset/src/index.ts index 1770882..eaae3c4 100644 --- a/packages/logos-docusaurus-preset/src/index.ts +++ b/packages/logos-docusaurus-preset/src/index.ts @@ -94,12 +94,34 @@ export default function logosPreset( ), ) - if (options.theme?.name === ThemeNames.Default) + if (options.theme?.name === ThemeNames.Default) { themes.push([ '@acid-info/logos-docusaurus-theme', options.theme?.options ?? {}, ]) + if (options.og) { + const imageRenderer = require('@acid-info/logos-docusaurus-theme/lib/client/components/OGImageRenderer/index.js') + + context.siteConfig.plugins = [ + ...(context.siteConfig.plugins ?? []), + + [ + '@acid-info/docusaurus-og', + /** @type {import('@acid-info/docusaurus-og').PluginOptions} */ + { + path: options.og.path || '_og', + imageRenderers: { + 'docusaurus-plugin-content-docs': imageRenderer.default.docs, + 'docusaurus-plugin-content-blog': imageRenderer.default.blog, + 'docusaurus-plugin-content-pages': imageRenderer.default.pages, + }, + }, + ], + ] + } + } + return { plugins, themes, diff --git a/packages/logos-docusaurus-preset/src/types/preset.ts b/packages/logos-docusaurus-preset/src/types/preset.ts index d00d44c..883f49f 100644 --- a/packages/logos-docusaurus-preset/src/types/preset.ts +++ b/packages/logos-docusaurus-preset/src/types/preset.ts @@ -1,5 +1,6 @@ import { PluginOptions as DocPluginOptions } from '@docusaurus/plugin-content-docs' import { DefaultThemeOptions } from './themes' +import { PluginOptions as OpenGraphPluginOptions } from '@acid-info/docusaurus-og' export enum ThemeNames { Default = 'default', @@ -49,4 +50,5 @@ export type PresetConfig = { customSiteConfig?: boolean docs?: Partial localSearch?: LocalSearchConfig + og?: Partial> | false } diff --git a/packages/logos-docusaurus-preset/src/validateOptions.ts b/packages/logos-docusaurus-preset/src/validateOptions.ts index 79d6513..5a8b78d 100644 --- a/packages/logos-docusaurus-preset/src/validateOptions.ts +++ b/packages/logos-docusaurus-preset/src/validateOptions.ts @@ -16,6 +16,7 @@ const schema = Joi.object({ .optional() .default({}), customSiteConfig: Joi.boolean().optional().default(false), + og: Joi.object().optional().default(false), }) export const validateOptions = ({ diff --git a/packages/logos-docusaurus-search-local/package.json b/packages/logos-docusaurus-search-local/package.json index 1c661f1..cd248aa 100644 --- a/packages/logos-docusaurus-search-local/package.json +++ b/packages/logos-docusaurus-search-local/package.json @@ -22,8 +22,11 @@ "@docusaurus/utils": "^2.4.1", "@docusaurus/utils-common": "^2.4.1", "@docusaurus/utils-validation": "^2.4.1", - "@easyops-cn/docusaurus-search-local": "^0.33.6", - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "node-html-parser": "^6.1.5", + "object-hash": "^3.0.0", + "satori": "^0.10.1", + "sharp": "^0.32.1" }, "engines": { "node": ">=16.14" diff --git a/packages/logos-docusaurus-theme/package.json b/packages/logos-docusaurus-theme/package.json index c036ab1..80ce967 100644 --- a/packages/logos-docusaurus-theme/package.json +++ b/packages/logos-docusaurus-theme/package.json @@ -21,6 +21,7 @@ }, "dependencies": { "@acid-info/lsd-react": "^0.1.0-alpha.15", + "@acid-info/docusaurus-og": "^1.0.0-alpha.44", "@docusaurus/core": "^2.4.1", "@docusaurus/mdx-loader": "^2.4.1", "@docusaurus/module-type-aliases": "^2.4.1", @@ -51,6 +52,7 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-use": "^17.4.0", + "sharp": "^0.32.1", "three": "^0.152.2", "three-stdlib": "^2.23.4", "utility-types": "^3.10.0" diff --git a/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx b/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx new file mode 100644 index 0000000..489a34c --- /dev/null +++ b/packages/logos-docusaurus-theme/src/client/components/OGImageRenderer/index.tsx @@ -0,0 +1,209 @@ +import { + ImageGeneratorOptions, + imageRendererFactory, +} from '@acid-info/docusaurus-og' +import { DocusaurusConfig } from '@docusaurus/types' +import { readFileSync } from 'fs' +import path from 'path' +import React from 'react' +import sharp from 'sharp' + +const options: ImageGeneratorOptions = { + width: 1200, + height: 630, + + fonts: [ + { + name: 'Roboto', + data: readFileSync( + path.resolve(__dirname, '../../static/fonts/roboto/Roboto-Regular.ttf'), + ), + weight: 400, + style: 'normal', + }, + ], +} + +const Layout: React.FC<{ + logo?: React.ReactNode + title: React.ReactNode + footer: React.ReactNode | Array +}> = ({ title, footer, logo }) => { + const dot = ( +
+ +
+ ) + + const footerItems = Array.isArray(footer) + ? footer.filter((item) => !!item) + : [footer] + + return ( +
+
+ {logo} +
+
+
{title}
+
+ {footerItems.map((item, index) => ( + +
{item}
+ {index < footerItems.length - 1 && dot} +
+ ))} +
+
+
+ ) +} + +const docsImageRenderer = imageRendererFactory( + 'docusaurus-plugin-content-docs', + async (doc, { outDir, siteConfig }) => { + if (doc.metadata.frontMatter.image) return + + const logo = await getLogo(siteConfig, outDir) + + return [ + + {doc.plugin.id === 'default' ? 'Docs' : doc.plugin.id} + , + doc.version.label && {doc.version.label}, + ]} + logo={} + />, + options, + ] + }, +) + +const blogImageRenderer = imageRendererFactory( + 'docusaurus-plugin-content-blog', + async (page, { outDir, siteConfig }) => { + if (page.pageType === 'post' && !!page.data.metadata.frontMatter.image) + return + + const { pageType, data } = page + + const logo = await getLogo(siteConfig, outDir) + + return [ + author.name) + .join(', ')}`, + ]} + logo={} + />, + options, + ] + }, +) + +const pagesImageRenderer = imageRendererFactory( + 'docusaurus-plugin-content-pages', + async (page, { outDir, siteConfig }) => { + const { metadata, plugin } = page + const url = new URL(siteConfig.url) + + const logo = await getLogo(siteConfig, outDir) + + return [ + } + />, + options, + ] + }, +) + +const getLogo = (() => { + const cache: Record = {} + + return async ( + siteConfig: DocusaurusConfig, + outDir: string, + ): Promise<{ src: any }> => { + const logo: any = (siteConfig.themeConfig as any).navbar.logo + + if (cache[logo.src]) return cache[logo.src] + + const isUrl = logo.src.startsWith('http') + + if (isUrl) return { src: logo.src } + + const logoPath = path.join(outDir, logo.src) + + const img = sharp(logoPath) + const buffer = await img.resize({ height: 120 }).toBuffer() + + cache[logo.src] = { src: buffer.buffer } + return cache[logo.src] + } +})() + +export default { + blog: blogImageRenderer, + docs: docsImageRenderer, + pages: pagesImageRenderer, +} diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/LICENSE.txt b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Black.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Black.ttf new file mode 100644 index 0000000..0112e7d Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Black.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BlackItalic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BlackItalic.ttf new file mode 100644 index 0000000..b2c6aca Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BlackItalic.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Bold.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Bold.ttf new file mode 100644 index 0000000..43da14d Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Bold.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BoldItalic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BoldItalic.ttf new file mode 100644 index 0000000..bcfdab4 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-BoldItalic.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Italic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Italic.ttf new file mode 100644 index 0000000..1b5eaa3 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Italic.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Light.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Light.ttf new file mode 100644 index 0000000..e7307e7 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Light.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-LightItalic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-LightItalic.ttf new file mode 100644 index 0000000..2d277af Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-LightItalic.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Medium.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Medium.ttf new file mode 100644 index 0000000..ac0f908 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Medium.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-MediumItalic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-MediumItalic.ttf new file mode 100644 index 0000000..fc36a47 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-MediumItalic.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Regular.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Regular.ttf new file mode 100644 index 0000000..ddf4bfa Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Regular.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Thin.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Thin.ttf new file mode 100644 index 0000000..2e0dee6 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-Thin.ttf differ diff --git a/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-ThinItalic.ttf b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-ThinItalic.ttf new file mode 100644 index 0000000..084f9c0 Binary files /dev/null and b/packages/logos-docusaurus-theme/src/client/static/fonts/roboto/Roboto-ThinItalic.ttf differ diff --git a/yarn.lock b/yarn.lock index 494f309..2bf765a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1477,6 +1477,21 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" +"@docusaurus/plugin-client-redirects@^2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-client-redirects/-/plugin-client-redirects-2.4.1.tgz#a28afcc4a1cb7657168ce37a57efd3194c20a53a" + integrity sha512-tp0j16gaLIJ4p+IR0P6KDOFsTOGGMY54MNPnmM61Vaqqt5omLqsuKUO8UlCGU1oW/4EIQOhXYy99XYY5MjE+7A== + dependencies: + "@docusaurus/core" "2.4.1" + "@docusaurus/logger" "2.4.1" + "@docusaurus/utils" "2.4.1" + "@docusaurus/utils-common" "2.4.1" + "@docusaurus/utils-validation" "2.4.1" + eta "^2.0.0" + fs-extra "^10.1.0" + lodash "^4.17.21" + tslib "^2.4.0" + "@docusaurus/plugin-content-blog@2.4.1", "@docusaurus/plugin-content-blog@^2.4.1": version "2.4.1" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.1.tgz#c705a8b1a36a34f181dcf43b7770532e4dcdc4a3" @@ -2986,6 +3001,14 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@shuding/opentype.js@1.4.0-beta.0": + version "1.4.0-beta.0" + resolved "https://registry.yarnpkg.com/@shuding/opentype.js/-/opentype.js-1.4.0-beta.0.tgz#5d1e7e9e056f546aad41df1c5043f8f85d39e24b" + integrity sha512-3NgmNyH3l/Hv6EvsWJbsvpcpUba6R8IREQ83nH83cyakCw7uM1arZKNfHwv1Wz6jgqrF/j4x5ELvR6PnK9nTcA== + dependencies: + fflate "^0.7.3" + string.prototype.codepointat "^0.2.1" + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" @@ -3399,6 +3422,11 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/katex@^0.11.0": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.11.1.tgz#34de04477dcf79e2ef6c8d23b41a3d81f9ebeaf5" + integrity sha512-DUlIj2nk0YnJdlWgsFuVKcX27MLW0KbKmGVoUHmFr+74FYYNUDAaj9ZqTADvsbE8rfxuVmSFc7KczYn5Y09ozg== + "@types/lodash@^4.14.186": version "4.14.195" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.195.tgz#bafc975b252eb6cea78882ce8a7b6bf22a6de632" @@ -4706,6 +4734,11 @@ base16@^1.0.0: resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" integrity sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ== +base64-js@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978" + integrity sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -5112,6 +5145,11 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== +camelize@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.1.tgz#89b7e16884056331a35d6b5ad064332c91daa6c3" + integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -5268,6 +5306,11 @@ chokidar@^2.0.0: optionalDependencies: fsevents "^1.2.7" +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" @@ -5517,16 +5560,32 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -color-name@~1.1.4: +color-name@^1.0.0, color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + colord@^2.9.1: version "2.9.3" resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" @@ -5582,7 +5641,7 @@ commander@^6.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^8.3.0: +commander@^8.0.0, commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== @@ -5974,6 +6033,21 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +css-background-parser@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/css-background-parser/-/css-background-parser-0.1.0.tgz#48a17f7fe6d4d4f1bca3177ddf16c5617950741b" + integrity sha512-2EZLisiZQ+7m4wwur/qiYJRniHX4K5Tc9w93MT3AS0WS1u5kaZ4FKXlOTBhOjc+CgEgPiGY+fX1yWD8UwpEqUA== + +css-box-shadow@1.0.0-3: + version "1.0.0-3" + resolved "https://registry.yarnpkg.com/css-box-shadow/-/css-box-shadow-1.0.0-3.tgz#9eaeb7140947bf5d649fc49a19e4bbaa5f602713" + integrity sha512-9jaqR6e7Ohds+aWwmhe6wILJ99xYQbfmK9QQB9CcMjDbTxPZjwEmUQpU91OG05Xgm8BahT5fW+svbsQGjS/zPg== + +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + integrity sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg== + css-declaration-sorter@^6.3.1: version "6.4.0" resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.4.0.tgz#630618adc21724484b3e9505bce812def44000ad" @@ -6034,6 +6108,15 @@ css-select@^5.1.0: domutils "^3.0.1" nth-check "^2.0.1" +css-to-react-native@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.2.0.tgz#cdd8099f71024e149e4f6fe17a7d46ecd55f1e32" + integrity sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^4.0.2" + css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" @@ -6536,6 +6619,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + dedent@0.7.0, dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -6721,6 +6811,11 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== +detect-libc@^2.0.0, detect-libc@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" + integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== + detect-newline@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" @@ -6971,6 +7066,11 @@ elkjs@^0.8.2: resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.8.2.tgz#c37763c5a3e24e042e318455e0147c912a7c248e" integrity sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ== +emoji-regex@^10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f" + integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -7624,6 +7724,11 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -7877,6 +7982,11 @@ fflate@^0.6.9, fflate@~0.6.9: resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.6.10.tgz#5f40f9659205936a2d18abf88b2e7781662b6d43" integrity sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg== +fflate@^0.7.3: + version "0.7.4" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.7.4.tgz#61587e5d958fdabb5a9368a302c25363f4f69f50" + integrity sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw== + figures@3.2.0, figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -8472,6 +8582,11 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + github-slugger@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.5.0.tgz#17891bbc73232051474d68bd867a34625c955f7d" @@ -8997,6 +9112,11 @@ hast-util-from-parse5@^6.0.0: vfile-location "^3.2.0" web-namespaces "^1.0.0" +hast-util-is-element@1.1.0, hast-util-is-element@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425" + integrity sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ== + hast-util-parse-selector@^2.0.0: version "2.2.5" resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a" @@ -9029,6 +9149,15 @@ hast-util-to-parse5@^6.0.0: xtend "^4.0.0" zwitch "^1.0.0" +hast-util-to-text@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/hast-util-to-text/-/hast-util-to-text-2.0.1.tgz#04f2e065642a0edb08341976084aa217624a0f8b" + integrity sha512-8nsgCARfs6VkwH2jJU9b8LNTuR4700na+0h3PqCaEk4MAnMDeu5P0tP8mjk9LLNGxIeQRLbiDbZVw6rku+pYsQ== + dependencies: + hast-util-is-element "^1.0.0" + repeat-string "^1.0.0" + unist-util-find-after "^3.0.0" + hastscript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" @@ -9040,7 +9169,7 @@ hastscript@^6.0.0: property-information "^5.0.0" space-separated-tokens "^1.0.0" -he@^1.2.0: +he@1.2.0, he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -9050,6 +9179,11 @@ heap@^0.2.6: resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== +hex-rgb@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/hex-rgb/-/hex-rgb-4.3.0.tgz#af5e974e83bb2fefe44d55182b004ec818c07776" + integrity sha512-Ox1pJVrDCyGHMG9CFg1tmrRUMRPRsAWYc/PinY0XzJU4K7y7vjNoLKIQ7BR5UJMCxNN8EM1MNDmHWA/B3aZUuw== + history@^4.9.0: version "4.10.1" resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" @@ -9638,6 +9772,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -10840,6 +10979,13 @@ just-diff@^6.0.0: resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== +katex@^0.13.0: + version "0.13.24" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.24.tgz#fe55455eb455698cb24b911a353d16a3c855d905" + integrity sha512-jZxYuKCma3VS5UuxOx/rFV1QyGSl3Uy/i0kTJF3HgQ5xMinCQVF8Zd4bMY/9aI9b9A2pjIBOsjSSm68ykTAr8w== + dependencies: + commander "^8.0.0" + keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -11107,6 +11253,14 @@ lilconfig@^2.0.3: resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== +linebreak@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-1.1.0.tgz#831cf378d98bced381d8ab118f852bd50d81e46b" + integrity sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ== + dependencies: + base64-js "0.0.8" + unicode-trie "^2.0.0" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -11693,6 +11847,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -11761,7 +11920,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -11862,6 +12021,11 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp-infer-owner@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" @@ -12004,6 +12168,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -12037,11 +12206,23 @@ no-case@^3.0.4: lower-case "^2.0.2" tslib "^2.0.3" +node-abi@^3.3.0: + version "3.45.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.45.0.tgz#f568f163a3bfca5aacfce1fbeee1fa2cc98441f5" + integrity sha512-iwXuFrMAcFVi/ZoZiqq8BzAdsLw9kxDfTC0HMyjXfSL/6CSDAGD5UmR7azrAgWV1zKYq7dUUMj4owusBWKLsiQ== + dependencies: + semver "^7.3.5" + node-addon-api@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== +node-addon-api@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" + integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== + node-cleanup@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" @@ -12094,6 +12275,14 @@ node-gyp@^9.0.0: tar "^6.1.2" which "^2.0.2" +node-html-parser@^6.1.5: + version "6.1.5" + resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-6.1.5.tgz#c819dceb13a10a7642ff92f94f870b4f77968097" + integrity sha512-fAaM511feX++/Chnhe475a0NHD8M7AxDInsqQpz6x63GRF7xYNdS8Vo5dKsIVPgsOvG7eioRRTZQnWBrhDHBSg== + dependencies: + css-select "^5.1.0" + he "1.2.0" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -12465,6 +12654,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + object-inspect@^1.12.3, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" @@ -12877,6 +13071,11 @@ pacote@^15.0.0, pacote@^15.0.8: ssri "^10.0.0" tar "^6.1.11" +pako@^0.2.5: + version "0.2.9" + resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + integrity sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA== + param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" @@ -12901,6 +13100,14 @@ parse-conflict-json@^3.0.0: just-diff "^6.0.0" just-diff-apply "^5.2.0" +parse-css-color@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/parse-css-color/-/parse-css-color-0.2.1.tgz#b687a583f2e42e66ffdfce80a570706966e807c9" + integrity sha512-bwS/GGIFV3b6KS4uwpzCFj4w297Yl3uqnSgIPsoQkx7GMLROXfMnWvxfNkL0oh8HVhZA4hvJoEoEIqonfJ3BWg== + dependencies: + color-name "^1.1.4" + hex-rgb "^4.1.0" + parse-entities@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" @@ -13501,7 +13708,7 @@ postcss-unique-selectors@^5.1.1: dependencies: postcss-selector-parser "^6.0.5" -postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: +postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== @@ -13533,6 +13740,24 @@ potpack@^1.0.1: resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.2.tgz#23b99e64eb74f5741ffe7656b5b5c4ddce8dfc14" integrity sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ== +prebuild-install@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -13863,7 +14088,7 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -rc@1.2.8, rc@^1.2.8: +rc@1.2.8, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -14379,6 +14604,26 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" +rehype-katex@5: + version "5.0.0" + resolved "https://registry.yarnpkg.com/rehype-katex/-/rehype-katex-5.0.0.tgz#b556f24fde918f28ba1cb642ea71c7e82f3373d7" + integrity sha512-ksSuEKCql/IiIadOHiKRMjypva9BLhuwQNascMqaoGLDVd0k2NlE2wMvgZ3rpItzRKCd6vs8s7MFbb8pcR0AEg== + dependencies: + "@types/katex" "^0.11.0" + hast-util-to-text "^2.0.0" + katex "^0.13.0" + rehype-parse "^7.0.0" + unified "^9.0.0" + unist-util-visit "^2.0.0" + +rehype-parse@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57" + integrity sha512-fOiR9a9xH+Le19i4fGzIEowAbwG7idy2Jzs4mOrFWBSJ0sNUgy0ev871dwWnbOo371SjgjG4pwzrbgSVrKxecw== + dependencies: + hast-util-from-parse5 "^6.0.0" + parse5 "^6.0.0" + relateurl@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" @@ -14398,6 +14643,11 @@ remark-footnotes@2.0.0: resolved "https://registry.yarnpkg.com/remark-footnotes/-/remark-footnotes-2.0.0.tgz#9001c4c2ffebba55695d2dd80ffb8b82f7e6303f" integrity sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ== +remark-math@3: + version "3.0.1" + resolved "https://registry.yarnpkg.com/remark-math/-/remark-math-3.0.1.tgz#85a02a15b15cad34b89a27244d4887b3a95185bb" + integrity sha512-epT77R/HK0x7NqrWHdSV75uNLwn8g9qTyMqCRCDujL0vj/6T6+yhdrR7mjELWtkse+Fw02kijAaBuVcHBor1+Q== + remark-mdx@1.6.22: version "1.6.22" resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.6.22.tgz#06a8dab07dcfdd57f3373af7f86bd0e992108bbd" @@ -14479,7 +14729,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== -repeat-string@^1.5.4, repeat-string@^1.6.1: +repeat-string@^1.0.0, repeat-string@^1.5.4, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== @@ -14907,6 +15157,31 @@ sass@^1.55.0: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" +sass@^1.62.1: + version "1.63.4" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.63.4.tgz#caf60643321044c61f6a0fe638a07abbd31cfb5d" + integrity sha512-Sx/+weUmK+oiIlI+9sdD0wZHsqpbgQg8wSwSnGBjwb5GwqFhYNwwnI+UWZtLjKvKyFlKkatRK235qQ3mokyPoQ== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + +satori@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/satori/-/satori-0.10.1.tgz#41d4f86acd5b67ab00580766ea7a09523850b2f3" + integrity sha512-F4bTCkDp931tLb7+UCNPBuSQwXhikrUkI4fBQo6fA8lF0Evqqgg3nDyUpRktQpR5Ry1DIiIVqLyEwkAms87ykg== + dependencies: + "@shuding/opentype.js" "1.4.0-beta.0" + css-background-parser "^0.1.0" + css-box-shadow "1.0.0-3" + css-to-react-native "^3.0.0" + emoji-regex "^10.2.1" + escape-html "^1.0.3" + linebreak "^1.1.0" + parse-css-color "^0.2.1" + postcss-value-parser "^4.2.0" + yoga-wasm-web "^0.3.3" + sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -15027,7 +15302,7 @@ semver@7.3.8: dependencies: lru-cache "^6.0.0" -semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0: version "7.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== @@ -15151,6 +15426,20 @@ shallowequal@^1.1.0: resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== +sharp@^0.32.1: + version "0.32.1" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.1.tgz#41aa0d0b2048b2e0ee453d9fcb14ec1f408390fe" + integrity sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg== + dependencies: + color "^4.2.3" + detect-libc "^2.0.1" + node-addon-api "^6.1.0" + prebuild-install "^7.1.1" + semver "^7.5.0" + simple-get "^4.0.1" + tar-fs "^2.1.1" + tunnel-agent "^0.6.0" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -15222,6 +15511,27 @@ sigstore@^1.0.0, sigstore@^1.3.0, sigstore@^1.4.0: make-fetch-happen "^11.0.1" tuf-js "^1.1.3" +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0, simple-get@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + sirv@^1.0.7: version "1.0.19" resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" @@ -15976,7 +16286,17 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar-stream@~2.2.0: +tar-fs@^2.0.0, tar-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4, tar-stream@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== @@ -16193,7 +16513,7 @@ tiny-glob@^0.2.6: globalyzer "0.1.0" globrex "^0.1.2" -tiny-inflate@^1.0.3: +tiny-inflate@^1.0.0, tiny-inflate@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" integrity sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw== @@ -16736,6 +17056,14 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== +unicode-trie@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-2.0.0.tgz#8fd8845696e2e14a8b67d78fa9e0dd2cad62fec8" + integrity sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ== + dependencies: + pako "^0.2.5" + tiny-inflate "^1.0.0" + unified@9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.0.tgz#67a62c627c40589edebbf60f53edfd4d822027f8" @@ -16748,7 +17076,7 @@ unified@9.2.0: trough "^1.0.0" vfile "^4.0.0" -unified@^9.2.2: +unified@^9.0.0, unified@^9.2.2: version "9.2.2" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975" integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== @@ -16818,6 +17146,13 @@ unist-builder@2.0.3, unist-builder@^2.0.0: resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== +unist-util-find-after@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unist-util-find-after/-/unist-util-find-after-3.0.0.tgz#5c65fcebf64d4f8f496db46fa8fd0fbf354b43e6" + integrity sha512-ojlBqfsBftYXExNu3+hHLfJQ/X1jYY/9vdm4yZWjIbf0VuWF6CRufci1ZyoD/wV2TYMKxXUoNuoqwy+CkgzAiQ== + dependencies: + unist-util-is "^4.0.0" + unist-util-generated@^1.0.0: version "1.1.6" resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b" @@ -17812,6 +18147,11 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yoga-wasm-web@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz#eb8e9fcb18e5e651994732f19a220cb885d932ba" + integrity sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA== + zstddec@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/zstddec/-/zstddec-0.0.2.tgz#57e2f28dd1ff56b750e07d158a43f0611ad9eeb4"