radiant-docs-validator 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ // src/shiki-theme-config.ts
2
+ import { bundledThemes } from "shiki";
3
+ var DEFAULT_SHIKI_LIGHT_THEME = "github-light";
4
+ var DEFAULT_SHIKI_DARK_THEME = "github-dark";
5
+ var SHIKI_BUNDLED_THEME_NAMES = Object.keys(bundledThemes).sort();
6
+ var SHIKI_BUNDLED_THEME_NAME_SET = new Set(SHIKI_BUNDLED_THEME_NAMES);
7
+ function isBundledShikiThemeName(value) {
8
+ return SHIKI_BUNDLED_THEME_NAME_SET.has(value);
9
+ }
10
+
11
+ export {
12
+ DEFAULT_SHIKI_LIGHT_THEME,
13
+ DEFAULT_SHIKI_DARK_THEME,
14
+ SHIKI_BUNDLED_THEME_NAMES,
15
+ isBundledShikiThemeName
16
+ };
@@ -0,0 +1,10 @@
1
+ // src/frontmatter-schema.ts
2
+ import { z } from "zod";
3
+ var docsSchema = z.object({
4
+ title: z.string().optional(),
5
+ description: z.string().optional()
6
+ }).passthrough();
7
+
8
+ export {
9
+ docsSchema
10
+ };
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const docsSchema: z.ZodObject<{
4
+ title: z.ZodOptional<z.ZodString>;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
+ title: z.ZodOptional<z.ZodString>;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
10
+ title: z.ZodOptional<z.ZodString>;
11
+ description: z.ZodOptional<z.ZodString>;
12
+ }, z.ZodTypeAny, "passthrough">>;
13
+
14
+ export { docsSchema };
@@ -0,0 +1,6 @@
1
+ import {
2
+ docsSchema
3
+ } from "./chunk-SXKC5VM6.js";
4
+ export {
5
+ docsSchema
6
+ };
@@ -0,0 +1,170 @@
1
+ export { docsSchema } from './frontmatter-schema.js';
2
+ export { CodeSyntaxThemeByMode, DEFAULT_SHIKI_DARK_THEME, DEFAULT_SHIKI_LIGHT_THEME, SHIKI_BUNDLED_THEME_NAMES, isBundledShikiThemeName } from './shiki-theme-config.js';
3
+ import 'zod';
4
+
5
+ type DocsValidatorOptions = {
6
+ docsRoot: string;
7
+ };
8
+ declare function configureDocsValidator({ docsRoot, }: DocsValidatorOptions): void;
9
+ type NavPage = {
10
+ page: string;
11
+ icon?: string | null;
12
+ tag?: NavTag;
13
+ title?: string;
14
+ };
15
+ type NavOpenApiPageRef = {
16
+ source: string;
17
+ endpoint: string;
18
+ };
19
+ type NavOpenApiPage = {
20
+ openapi: NavOpenApiPageRef;
21
+ title?: string;
22
+ tag?: NavTag;
23
+ };
24
+ type NavGroup = {
25
+ group: string;
26
+ pages: (string | NavPage | NavGroup | NavOpenApiPage)[];
27
+ icon?: string | null;
28
+ expanded?: boolean;
29
+ tag?: NavTag;
30
+ };
31
+ type NavOpenApi = {
32
+ source: string;
33
+ include?: string[];
34
+ exclude?: string[];
35
+ };
36
+ type NavigationItem = {
37
+ pages?: (string | NavPage | NavGroup | NavOpenApiPage)[];
38
+ menu?: NavMenu;
39
+ openapi?: string | NavOpenApi;
40
+ };
41
+ type NavMenuItem = {
42
+ label: string;
43
+ submenu: Omit<NavigationItem, "menu">;
44
+ icon?: string | null;
45
+ };
46
+ type NavMenu = {
47
+ type?: "dropdown" | "segmented";
48
+ label?: string;
49
+ items: NavMenuItem[];
50
+ };
51
+ type NavbarItem = {
52
+ text: string;
53
+ href: string;
54
+ icon?: string | null;
55
+ color?: string | ThemeColorByMode;
56
+ };
57
+ type HiddenPageRoute = {
58
+ filePath: string;
59
+ href: string;
60
+ };
61
+ type LogoVariant = string | {
62
+ image: string;
63
+ padding?: {
64
+ top?: number;
65
+ bottom?: number;
66
+ };
67
+ };
68
+ type Logo = {
69
+ light?: LogoVariant;
70
+ dark?: LogoVariant;
71
+ href?: string;
72
+ pill?: string | false;
73
+ };
74
+ type ThemeColorByMode = {
75
+ light?: string;
76
+ dark?: string;
77
+ };
78
+ type NavTag = string | {
79
+ text: string;
80
+ color?: string | ThemeColorByMode;
81
+ };
82
+ declare const BASE_COLOR_OPTIONS: readonly ["slate", "gray", "zinc", "neutral", "stone", "taupe", "mauve", "mist", "olive"];
83
+ type BaseColorOption = (typeof BASE_COLOR_OPTIONS)[number];
84
+ type BaseColorByMode = {
85
+ light: BaseColorOption;
86
+ dark: BaseColorOption;
87
+ };
88
+ declare const DEFAULT_THEME_COLOR_LIGHT = "#171717";
89
+ declare const DEFAULT_THEME_COLOR_DARK = "#f5f5f5";
90
+ type CardCoverTheme = {
91
+ colors?: string[];
92
+ colorSeed?: string;
93
+ };
94
+ type CardButtonTheme = {
95
+ color?: string | ThemeColorByMode;
96
+ };
97
+ type CardTheme = {
98
+ cover?: CardCoverTheme;
99
+ button?: CardButtonTheme;
100
+ };
101
+ type CodeSyntaxThemeConfig = string | {
102
+ light?: string;
103
+ dark?: string;
104
+ };
105
+ type CodeTheme = {
106
+ syntaxTheme?: CodeSyntaxThemeConfig;
107
+ };
108
+ type TagTheme = {
109
+ color?: string | ThemeColorByMode;
110
+ };
111
+ type DocsTheme = {
112
+ baseColor?: BaseColorOption | BaseColorByMode;
113
+ themeColor?: string | ThemeColorByMode;
114
+ card?: CardTheme;
115
+ code?: CodeTheme;
116
+ tag?: TagTheme;
117
+ };
118
+ type AssistantIcon = {
119
+ src?: string;
120
+ };
121
+ type AssistantButtonSize = "small" | "default";
122
+ type AssistantButtonConfig = {
123
+ size?: AssistantButtonSize;
124
+ color?: string | ThemeColorByMode;
125
+ };
126
+ type AssistantNavbarButtonConfig = {
127
+ enabled?: boolean;
128
+ text?: string;
129
+ color?: string | ThemeColorByMode;
130
+ };
131
+ type AssistantConfig = {
132
+ button?: AssistantButtonConfig;
133
+ navbarButton?: AssistantNavbarButtonConfig;
134
+ heading?: string;
135
+ questions?: string[];
136
+ icon?: AssistantIcon;
137
+ };
138
+ type DocsConfig = {
139
+ title: string;
140
+ logo?: Logo;
141
+ theme?: DocsTheme;
142
+ assistant?: AssistantConfig;
143
+ home?: string;
144
+ navigation: NavigationItem;
145
+ navbar?: {
146
+ blur?: boolean;
147
+ primary?: NavbarItem;
148
+ secondary?: NavbarItem;
149
+ links?: NavbarItem[];
150
+ };
151
+ playground?: {
152
+ proxy?: boolean;
153
+ };
154
+ footer?: Footer;
155
+ hiddenPageRoutes?: HiddenPageRoute[];
156
+ };
157
+ type SocialPlatform = "x" | "website" | "facebook" | "youtube" | "discord" | "slack" | "github" | "linkedin" | "instagram" | "hacker-news" | "medium" | "telegram" | "bluesky" | "threads" | "reddit" | "podcast";
158
+ type FooterLink = {
159
+ text: string;
160
+ href: string;
161
+ };
162
+ type Footer = {
163
+ socials?: Partial<Record<SocialPlatform, string>>;
164
+ links?: FooterLink[];
165
+ };
166
+ declare function loadOpenApiSpec(filePathOrUrl: string): Promise<any>;
167
+ declare function getConfig(): Promise<DocsConfig>;
168
+ declare function validateMdxContent(): Promise<void>;
169
+
170
+ export { type AssistantButtonConfig, type AssistantButtonSize, type AssistantConfig, type AssistantIcon, type AssistantNavbarButtonConfig, BASE_COLOR_OPTIONS, type BaseColorByMode, type BaseColorOption, type CardButtonTheme, type CardCoverTheme, type CardTheme, type CodeSyntaxThemeConfig, type CodeTheme, DEFAULT_THEME_COLOR_DARK, DEFAULT_THEME_COLOR_LIGHT, type DocsConfig, type DocsTheme, type DocsValidatorOptions, type Footer, type FooterLink, type HiddenPageRoute, type Logo, type LogoVariant, type NavGroup, type NavMenu, type NavMenuItem, type NavOpenApi, type NavOpenApiPage, type NavOpenApiPageRef, type NavPage, type NavTag, type NavbarItem, type NavigationItem, type SocialPlatform, type TagTheme, type ThemeColorByMode, configureDocsValidator, getConfig, loadOpenApiSpec, validateMdxContent };