Publish src

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
This commit is contained in:
Joshua Castle
2024-03-24 00:16:33 -07:00
parent d2577f5d28
commit 9167ba6b07
30 changed files with 594 additions and 3 deletions
+27
View File
@@ -0,0 +1,27 @@
import { BlogPaginated, BlogPost, BlogTag, PluginOptions } from '@docusaurus/plugin-content-blog';
import { Document } from '../document';
export type BlogPageType = 'post' | 'list' | 'archive' | 'tags' | 'tag' | 'archive';
export type BlogPageData = {
plugin: PluginOptions;
permalink: string;
document: Document;
} & ({
pageType: Extract<BlogPageType, 'post'>;
data: BlogPost;
} | {
pageType: Extract<BlogPageType, 'list'>;
data: BlogPaginated;
} | {
pageType: Extract<BlogPageType, 'tags'>;
data: {
permalink: string;
};
} | {
pageType: Extract<BlogPageType, 'tag'>;
data: BlogTag['pages'][number]['metadata'] & Pick<BlogTag, 'label'>;
} | {
pageType: Extract<BlogPageType, 'archive'>;
data: {
permalink: string;
};
});
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+9
View File
@@ -0,0 +1,9 @@
/// <reference types="@docusaurus/plugin-content-docs/src/plugin-content-docs.js" />
import { DocMetadata, LoadedVersion, PluginOptions } from '@docusaurus/plugin-content-docs';
import { Document } from '../document';
export type DocsPageData = {
plugin: PluginOptions;
version: LoadedVersion;
metadata: DocMetadata;
document: Document;
};
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+10
View File
@@ -0,0 +1,10 @@
/// <reference types="react" />
import { Props } from '@docusaurus/types';
import type { SatoriOptions } from 'satori';
export type ImageGeneratorOptions = SatoriOptions;
export type ImageGeneratorResult = {
path: string;
absolutePath: string;
};
export type ImageRenderer<T = any> = (data: T, context: Props) => [React.ReactNode, ImageGeneratorOptions] | undefined | void | false | Promise<[React.ReactNode, ImageGeneratorOptions] | undefined | void | false>;
export type ImageGenerator<T = any> = (data: T) => string;
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+5
View File
@@ -0,0 +1,5 @@
export * from './blog.types';
export * from './docs.types';
export * from './image.types';
export * from './pages.types';
export * from './plugin.types';
+8
View File
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./blog.types"), exports);
tslib_1.__exportStar(require("./docs.types"), exports);
tslib_1.__exportStar(require("./image.types"), exports);
tslib_1.__exportStar(require("./pages.types"), exports);
tslib_1.__exportStar(require("./plugin.types"), exports);
+10
View File
@@ -0,0 +1,10 @@
import { Metadata, PluginOptions } from '@docusaurus/plugin-content-pages';
import { Document } from '../document';
export type PageData = {
metadata: Omit<Metadata, 'title' | 'description'> & {
title: string;
description?: string;
};
plugin: PluginOptions;
document: Document;
};
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+5
View File
@@ -0,0 +1,5 @@
import { ImageRenderer } from './image.types';
export type PluginOptions = {
path: string;
imageRenderers: Record<string, ImageRenderer>;
};
+2
View File
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });