blodemd 0.0.5 → 0.0.7
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.
- package/README.md +2 -2
- package/dev-server/app/[[...slug]]/page.tsx +139 -0
- package/dev-server/app/blodemd-dev/invalidate/route.ts +12 -0
- package/dev-server/app/blodemd-dev/static/[...path]/route.ts +32 -0
- package/dev-server/app/blodemd-dev/version/route.ts +14 -0
- package/dev-server/app/blodemd-internal/proxy/route.ts +86 -0
- package/dev-server/app/error.tsx +24 -0
- package/dev-server/app/favicon.ico +0 -0
- package/dev-server/app/globals.css +4 -0
- package/dev-server/app/layout.tsx +38 -0
- package/dev-server/app/not-found.tsx +18 -0
- package/dev-server/app/search/route.ts +17 -0
- package/dev-server/components/dev-reload-script.tsx +86 -0
- package/dev-server/components/providers.tsx +15 -0
- package/dev-server/lib/dev-state.ts +8 -0
- package/dev-server/lib/local-content-source.ts +103 -0
- package/dev-server/lib/local-runtime.tsx +558 -0
- package/dev-server/next-env.d.ts +5 -0
- package/dev-server/next.config.js +46 -0
- package/dev-server/package.json +57 -0
- package/dev-server/postcss.config.mjs +7 -0
- package/dev-server/public/glide-variable.woff2 +0 -0
- package/dev-server/tsconfig.json +50 -0
- package/dist/cli.mjs +311 -86
- package/dist/cli.mjs.map +1 -1
- package/docs/app/globals.css +457 -0
- package/docs/components/api/api-playground.tsx +295 -0
- package/docs/components/api/api-reference.tsx +121 -0
- package/docs/components/content/collection-index.tsx +114 -0
- package/docs/components/docs/contextual-menu.tsx +406 -0
- package/docs/components/docs/copy-page-menu.tsx +255 -0
- package/docs/components/docs/doc-header.tsx +210 -0
- package/docs/components/docs/doc-shell.tsx +313 -0
- package/docs/components/docs/doc-sidebar.tsx +211 -0
- package/docs/components/docs/doc-toc.tsx +45 -0
- package/docs/components/docs/mobile-nav.tsx +205 -0
- package/docs/components/icons/doc-icon.tsx +96 -0
- package/docs/components/mdx/accordion.tsx +83 -0
- package/docs/components/mdx/badge.tsx +79 -0
- package/docs/components/mdx/callout.tsx +88 -0
- package/docs/components/mdx/card.tsx +110 -0
- package/docs/components/mdx/code-block.tsx +75 -0
- package/docs/components/mdx/code-group.tsx +94 -0
- package/docs/components/mdx/color.tsx +87 -0
- package/docs/components/mdx/columns.tsx +25 -0
- package/docs/components/mdx/expandable.tsx +45 -0
- package/docs/components/mdx/field-layout.tsx +77 -0
- package/docs/components/mdx/frame.tsx +23 -0
- package/docs/components/mdx/get-text-content.ts +18 -0
- package/docs/components/mdx/icon.tsx +12 -0
- package/docs/components/mdx/index.tsx +107 -0
- package/docs/components/mdx/installer.tsx +20 -0
- package/docs/components/mdx/panel.tsx +11 -0
- package/docs/components/mdx/param-field.tsx +56 -0
- package/docs/components/mdx/preview.tsx +36 -0
- package/docs/components/mdx/prompt.tsx +63 -0
- package/docs/components/mdx/request-example.tsx +27 -0
- package/docs/components/mdx/response-field.tsx +42 -0
- package/docs/components/mdx/steps.tsx +92 -0
- package/docs/components/mdx/tabs.tsx +88 -0
- package/docs/components/mdx/tile.tsx +43 -0
- package/docs/components/mdx/tooltip.tsx +71 -0
- package/docs/components/mdx/tree.tsx +120 -0
- package/docs/components/mdx/type-table.tsx +71 -0
- package/docs/components/mdx/update.tsx +44 -0
- package/docs/components/mdx/video.tsx +12 -0
- package/docs/components/mdx/view.tsx +66 -0
- package/docs/components/providers.tsx +15 -0
- package/docs/components/ui/breadcrumb.tsx +92 -0
- package/docs/components/ui/button.tsx +90 -0
- package/docs/components/ui/card.tsx +92 -0
- package/docs/components/ui/command.tsx +139 -0
- package/docs/components/ui/dialog.tsx +97 -0
- package/docs/components/ui/field.tsx +237 -0
- package/docs/components/ui/input.tsx +105 -0
- package/docs/components/ui/label.tsx +22 -0
- package/docs/components/ui/popover.tsx +72 -0
- package/docs/components/ui/search.tsx +384 -0
- package/docs/components/ui/separator.tsx +26 -0
- package/docs/components/ui/sheet.tsx +104 -0
- package/docs/components/ui/sidebar.tsx +433 -0
- package/docs/components/ui/theme-toggle.tsx +62 -0
- package/docs/components/ui/tooltip.tsx +53 -0
- package/docs/lib/contextual-options.ts +193 -0
- package/docs/lib/docs-collection.ts +22 -0
- package/docs/lib/mdx.ts +87 -0
- package/docs/lib/navigation.ts +288 -0
- package/docs/lib/openapi.ts +158 -0
- package/docs/lib/routes.ts +44 -0
- package/docs/lib/server-cache.ts +83 -0
- package/docs/lib/shiki.ts +40 -0
- package/docs/lib/theme.ts +29 -0
- package/docs/lib/toc.ts +2 -0
- package/docs/lib/utils.ts +5 -0
- package/package.json +43 -6
- package/packages/@repo/common/dist/index.d.ts +9 -0
- package/packages/@repo/common/dist/index.d.ts.map +1 -0
- package/packages/@repo/common/dist/index.js +42 -0
- package/packages/@repo/common/package.json +34 -0
- package/packages/@repo/common/src/index.ts +51 -0
- package/packages/@repo/contracts/dist/api-key.d.ts +30 -0
- package/packages/@repo/contracts/dist/api-key.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/api-key.js +20 -0
- package/packages/@repo/contracts/dist/dates.d.ts +4 -0
- package/packages/@repo/contracts/dist/dates.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/dates.js +2 -0
- package/packages/@repo/contracts/dist/deployment.d.ts +71 -0
- package/packages/@repo/contracts/dist/deployment.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/deployment.js +46 -0
- package/packages/@repo/contracts/dist/domain.d.ts +94 -0
- package/packages/@repo/contracts/dist/domain.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/domain.js +36 -0
- package/packages/@repo/contracts/dist/ids.d.ts +14 -0
- package/packages/@repo/contracts/dist/ids.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/ids.js +10 -0
- package/packages/@repo/contracts/dist/index.d.ts +10 -0
- package/packages/@repo/contracts/dist/index.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/index.js +11 -0
- package/packages/@repo/contracts/dist/pagination.d.ts +23 -0
- package/packages/@repo/contracts/dist/pagination.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/pagination.js +15 -0
- package/packages/@repo/contracts/dist/project.d.ts +25 -0
- package/packages/@repo/contracts/dist/project.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/project.js +23 -0
- package/packages/@repo/contracts/dist/tenant.d.ts +111 -0
- package/packages/@repo/contracts/dist/tenant.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/tenant.js +56 -0
- package/packages/@repo/contracts/dist/user.d.ts +9 -0
- package/packages/@repo/contracts/dist/user.d.ts.map +1 -0
- package/packages/@repo/contracts/dist/user.js +9 -0
- package/packages/@repo/contracts/package.json +37 -0
- package/packages/@repo/contracts/src/api-key.ts +27 -0
- package/packages/@repo/contracts/src/dates.ts +4 -0
- package/packages/@repo/contracts/src/deployment.ts +73 -0
- package/packages/@repo/contracts/src/domain.ts +51 -0
- package/packages/@repo/contracts/src/ids.ts +22 -0
- package/packages/@repo/contracts/src/index.ts +11 -0
- package/packages/@repo/contracts/src/pagination.ts +21 -0
- package/packages/@repo/contracts/src/project.ts +30 -0
- package/packages/@repo/contracts/src/tenant.ts +92 -0
- package/packages/@repo/contracts/src/user.ts +12 -0
- package/packages/@repo/models/dist/docs-config.d.ts +985 -0
- package/packages/@repo/models/dist/docs-config.d.ts.map +1 -0
- package/packages/@repo/models/dist/docs-config.js +548 -0
- package/packages/@repo/models/dist/index.d.ts +3 -0
- package/packages/@repo/models/dist/index.d.ts.map +1 -0
- package/packages/@repo/models/dist/index.js +3 -0
- package/packages/@repo/models/dist/tenant.d.ts +25 -0
- package/packages/@repo/models/dist/tenant.d.ts.map +1 -0
- package/packages/@repo/models/dist/tenant.js +1 -0
- package/packages/@repo/models/package.json +37 -0
- package/packages/@repo/models/src/docs-config.ts +648 -0
- package/packages/@repo/models/src/index.ts +3 -0
- package/packages/@repo/models/src/tenant.ts +29 -0
- package/packages/@repo/prebuild/dist/index.d.ts +2 -0
- package/packages/@repo/prebuild/dist/index.d.ts.map +1 -0
- package/packages/@repo/prebuild/dist/index.js +2 -0
- package/packages/@repo/prebuild/dist/openapi.d.ts +43 -0
- package/packages/@repo/prebuild/dist/openapi.d.ts.map +1 -0
- package/packages/@repo/prebuild/dist/openapi.js +58 -0
- package/packages/@repo/prebuild/package.json +39 -0
- package/packages/@repo/prebuild/src/index.ts +2 -0
- package/packages/@repo/prebuild/src/openapi.ts +116 -0
- package/packages/@repo/previewing/dist/blob-source.d.ts +16 -0
- package/packages/@repo/previewing/dist/blob-source.d.ts.map +1 -0
- package/packages/@repo/previewing/dist/blob-source.js +110 -0
- package/packages/@repo/previewing/dist/content-source.d.ts +12 -0
- package/packages/@repo/previewing/dist/content-source.d.ts.map +1 -0
- package/packages/@repo/previewing/dist/content-source.js +1 -0
- package/packages/@repo/previewing/dist/fs-source.d.ts +11 -0
- package/packages/@repo/previewing/dist/fs-source.d.ts.map +1 -0
- package/packages/@repo/previewing/dist/fs-source.js +72 -0
- package/packages/@repo/previewing/dist/index.d.ts +120 -0
- package/packages/@repo/previewing/dist/index.d.ts.map +1 -0
- package/packages/@repo/previewing/dist/index.js +984 -0
- package/packages/@repo/previewing/package.json +41 -0
- package/packages/@repo/previewing/src/blob-source.ts +167 -0
- package/packages/@repo/previewing/src/content-source.ts +12 -0
- package/packages/@repo/previewing/src/fs-source.ts +104 -0
- package/packages/@repo/previewing/src/index.ts +1490 -0
- package/packages/@repo/validation/dist/index.d.ts +12 -0
- package/packages/@repo/validation/dist/index.d.ts.map +1 -0
- package/packages/@repo/validation/dist/index.js +30 -0
- package/packages/@repo/validation/package.json +37 -0
- package/packages/@repo/validation/src/index.ts +59 -0
- package/packages/@repo/validation/src/mintlify-docs-schema.json +5016 -0
- package/scripts/prepare-package.mjs +39 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContentType, FrontmatterByType, MintlifyDocsConfig, SiteConfig } from "@repo/models";
|
|
2
|
+
export type ValidationResult<T> = {
|
|
3
|
+
success: true;
|
|
4
|
+
data: T;
|
|
5
|
+
} | {
|
|
6
|
+
success: false;
|
|
7
|
+
errors: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const validateSiteConfig: (input: unknown) => ValidationResult<SiteConfig>;
|
|
10
|
+
export declare const validateDocsConfig: (input: unknown) => ValidationResult<MintlifyDocsConfig>;
|
|
11
|
+
export declare const validateFrontmatter: <Type extends ContentType>(type: Type, input: unknown) => ValidationResult<FrontmatterByType[Type]>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACX,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC1B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAQzC,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,KACb,gBAAgB,CAAC,UAAU,CAQ7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,KACb,gBAAgB,CAAC,kBAAkB,CAQrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,IAAI,SAAS,WAAW,EAC1D,MAAM,IAAI,EACV,OAAO,OAAO,KACb,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAS1C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FrontmatterSchemaByType, MintlifyDocsConfigSchema, SiteConfigSchema, } from "@repo/models";
|
|
2
|
+
const formatIssues = (issues) => issues.map((issue) => {
|
|
3
|
+
const path = issue.path.length ? issue.path.map(String).join(".") : "root";
|
|
4
|
+
return `${path}: ${issue.message}`;
|
|
5
|
+
});
|
|
6
|
+
export const validateSiteConfig = (input) => {
|
|
7
|
+
const result = SiteConfigSchema.safeParse(input);
|
|
8
|
+
if (result.success) {
|
|
9
|
+
return { data: result.data, success: true };
|
|
10
|
+
}
|
|
11
|
+
const issues = formatIssues(result.error.issues);
|
|
12
|
+
return { errors: issues, success: false };
|
|
13
|
+
};
|
|
14
|
+
export const validateDocsConfig = (input) => {
|
|
15
|
+
const result = MintlifyDocsConfigSchema.safeParse(input);
|
|
16
|
+
if (result.success) {
|
|
17
|
+
return { data: result.data, success: true };
|
|
18
|
+
}
|
|
19
|
+
const issues = formatIssues(result.error.issues);
|
|
20
|
+
return { errors: issues, success: false };
|
|
21
|
+
};
|
|
22
|
+
export const validateFrontmatter = (type, input) => {
|
|
23
|
+
const schema = FrontmatterSchemaByType[type];
|
|
24
|
+
const result = schema.safeParse(input);
|
|
25
|
+
if (result.success) {
|
|
26
|
+
return { data: result.data, success: true };
|
|
27
|
+
}
|
|
28
|
+
const issues = formatIssues(result.error.issues);
|
|
29
|
+
return { errors: issues, success: false };
|
|
30
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repo/validation",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./src/index.ts",
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./*": {
|
|
13
|
+
"types": "./src/*.ts",
|
|
14
|
+
"import": "./dist/*.js",
|
|
15
|
+
"default": "./dist/*.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rm -rf dist && tsc",
|
|
20
|
+
"check-types": "tsc --noEmit",
|
|
21
|
+
"lint": "oxlint .",
|
|
22
|
+
"lint:fix": "oxlint --fix .",
|
|
23
|
+
"format": "oxfmt --write .",
|
|
24
|
+
"format:check": "oxfmt ."
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@repo/models": "*"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@repo/typescript-config": "*",
|
|
31
|
+
"@types/node": "^22.19.15",
|
|
32
|
+
"oxfmt": "^0.42.0",
|
|
33
|
+
"oxlint": "^1.57.0",
|
|
34
|
+
"typescript": "6.0.2",
|
|
35
|
+
"ultracite": "^7.3.2"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FrontmatterSchemaByType,
|
|
3
|
+
MintlifyDocsConfigSchema,
|
|
4
|
+
SiteConfigSchema,
|
|
5
|
+
} from "@repo/models";
|
|
6
|
+
import type {
|
|
7
|
+
ContentType,
|
|
8
|
+
FrontmatterByType,
|
|
9
|
+
MintlifyDocsConfig,
|
|
10
|
+
SiteConfig,
|
|
11
|
+
} from "@repo/models";
|
|
12
|
+
|
|
13
|
+
export type ValidationResult<T> =
|
|
14
|
+
| { success: true; data: T }
|
|
15
|
+
| { success: false; errors: string[] };
|
|
16
|
+
|
|
17
|
+
const formatIssues = (issues: { path: PropertyKey[]; message: string }[]) =>
|
|
18
|
+
issues.map((issue) => {
|
|
19
|
+
const path = issue.path.length ? issue.path.map(String).join(".") : "root";
|
|
20
|
+
return `${path}: ${issue.message}`;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const validateSiteConfig = (
|
|
24
|
+
input: unknown
|
|
25
|
+
): ValidationResult<SiteConfig> => {
|
|
26
|
+
const result = SiteConfigSchema.safeParse(input);
|
|
27
|
+
if (result.success) {
|
|
28
|
+
return { data: result.data, success: true };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const issues = formatIssues(result.error.issues);
|
|
32
|
+
return { errors: issues, success: false };
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const validateDocsConfig = (
|
|
36
|
+
input: unknown
|
|
37
|
+
): ValidationResult<MintlifyDocsConfig> => {
|
|
38
|
+
const result = MintlifyDocsConfigSchema.safeParse(input);
|
|
39
|
+
if (result.success) {
|
|
40
|
+
return { data: result.data, success: true };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const issues = formatIssues(result.error.issues);
|
|
44
|
+
return { errors: issues, success: false };
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const validateFrontmatter = <Type extends ContentType>(
|
|
48
|
+
type: Type,
|
|
49
|
+
input: unknown
|
|
50
|
+
): ValidationResult<FrontmatterByType[Type]> => {
|
|
51
|
+
const schema = FrontmatterSchemaByType[type];
|
|
52
|
+
const result = schema.safeParse(input);
|
|
53
|
+
if (result.success) {
|
|
54
|
+
return { data: result.data as FrontmatterByType[Type], success: true };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const issues = formatIssues(result.error.issues);
|
|
58
|
+
return { errors: issues, success: false };
|
|
59
|
+
};
|