nimbus-docs 0.1.3 → 0.1.4
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/dist/cli/index.js +1 -1
- package/dist/content.d.ts +5 -74
- package/dist/content.d.ts.map +1 -1
- package/dist/content.js +2 -2
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +925 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -18
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +53 -147
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +108 -30
- package/dist/schemas.js.map +1 -1
- package/dist/strict-keys-D06tc9YZ.js +35 -0
- package/dist/strict-keys-D06tc9YZ.js.map +1 -0
- package/dist/types.d.ts +53 -19
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/NimbusHead.astro +0 -4
package/dist/cli/index.js
CHANGED
package/dist/content.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentProp, DefineSchemaOptions, DocSchemaConfig, componentsSchema, defineDocSchema, defineSchema, docsSchema, partialsSchema } from "./schemas.js";
|
|
1
2
|
import { z } from "astro/zod";
|
|
2
3
|
import * as astro_loaders0 from "astro/loaders";
|
|
3
4
|
|
|
@@ -38,79 +39,9 @@ interface PartialsCollectionOptions {
|
|
|
38
39
|
*/
|
|
39
40
|
declare function docsCollection(options?: DocsCollectionOptions): {
|
|
40
41
|
loader: astro_loaders0.Loader;
|
|
41
|
-
schema: z.ZodObject<{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
template: z.ZodDefault<z.ZodEnum<{
|
|
45
|
-
doc: "doc";
|
|
46
|
-
splash: "splash";
|
|
47
|
-
}>>;
|
|
48
|
-
sidebar: z.ZodOptional<z.ZodObject<{
|
|
49
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
label: z.ZodOptional<z.ZodString>;
|
|
51
|
-
badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
52
|
-
text: z.ZodString;
|
|
53
|
-
variant: z.ZodDefault<z.ZodEnum<{
|
|
54
|
-
success: "success";
|
|
55
|
-
default: "default";
|
|
56
|
-
info: "info";
|
|
57
|
-
note: "note";
|
|
58
|
-
tip: "tip";
|
|
59
|
-
warning: "warning";
|
|
60
|
-
caution: "caution";
|
|
61
|
-
danger: "danger";
|
|
62
|
-
}>>;
|
|
63
|
-
}, z.core.$strip>]>>;
|
|
64
|
-
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
hideChildren: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
|
-
hero: z.ZodOptional<z.ZodObject<{
|
|
68
|
-
title: z.ZodOptional<z.ZodString>;
|
|
69
|
-
tagline: z.ZodOptional<z.ZodString>;
|
|
70
|
-
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
|
-
text: z.ZodString;
|
|
72
|
-
link: z.ZodString;
|
|
73
|
-
variant: z.ZodDefault<z.ZodEnum<{
|
|
74
|
-
primary: "primary";
|
|
75
|
-
secondary: "secondary";
|
|
76
|
-
outline: "outline";
|
|
77
|
-
}>>;
|
|
78
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
79
|
-
}, z.core.$strip>>>;
|
|
80
|
-
}, z.core.$strip>>;
|
|
81
|
-
head: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
82
|
-
tag: z.ZodEnum<{
|
|
83
|
-
link: "link";
|
|
84
|
-
meta: "meta";
|
|
85
|
-
script: "script";
|
|
86
|
-
style: "style";
|
|
87
|
-
}>;
|
|
88
|
-
attrs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
89
|
-
content: z.ZodOptional<z.ZodString>;
|
|
90
|
-
}, z.core.$strip>>>;
|
|
91
|
-
draft: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
-
noindex: z.ZodDefault<z.ZodBoolean>;
|
|
93
|
-
llms: z.ZodDefault<z.ZodBoolean>;
|
|
94
|
-
aiDeprioritize: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
-
pagefind: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
-
tableOfContents: z.ZodOptional<z.ZodObject<{
|
|
97
|
-
minHeadingLevel: z.ZodDefault<z.ZodNumber>;
|
|
98
|
-
maxHeadingLevel: z.ZodDefault<z.ZodNumber>;
|
|
99
|
-
}, z.core.$strip>>;
|
|
100
|
-
lastUpdated: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
101
|
-
socialImage: z.ZodOptional<z.ZodString>;
|
|
102
|
-
prev: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
103
|
-
link: z.ZodOptional<z.ZodString>;
|
|
104
|
-
label: z.ZodOptional<z.ZodString>;
|
|
105
|
-
}, z.core.$strip>, z.ZodLiteral<false>]>>;
|
|
106
|
-
next: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
107
|
-
link: z.ZodOptional<z.ZodString>;
|
|
108
|
-
label: z.ZodOptional<z.ZodString>;
|
|
109
|
-
}, z.core.$strip>, z.ZodLiteral<false>]>>;
|
|
110
|
-
previousSlug: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
111
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
112
|
-
[x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
113
|
-
}, z.core.$strip>;
|
|
42
|
+
schema: z.ZodObject<Readonly<{
|
|
43
|
+
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
44
|
+
}>, z.core.$loose>;
|
|
114
45
|
};
|
|
115
46
|
/**
|
|
116
47
|
* Returns an Astro content-collection config (`{ loader, schema }`) for the
|
|
@@ -157,5 +88,5 @@ declare function componentsCollection(options?: ComponentsCollectionOptions): {
|
|
|
157
88
|
}, z.core.$strip>;
|
|
158
89
|
};
|
|
159
90
|
//#endregion
|
|
160
|
-
export { ComponentsCollectionOptions, DocsCollectionOptions, PartialsCollectionOptions, componentsCollection, docsCollection, partialsCollection };
|
|
91
|
+
export { type ComponentProp, ComponentsCollectionOptions, type DefineSchemaOptions, type DocSchemaConfig, DocsCollectionOptions, PartialsCollectionOptions, componentsCollection, componentsSchema, defineDocSchema, defineSchema, docsCollection, docsSchema, partialsCollection, partialsSchema };
|
|
161
92
|
//# sourceMappingURL=content.d.ts.map
|
package/dist/content.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","names":[],"sources":["../src/content.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","names":[],"sources":["../src/content.ts"],"mappings":";;;;;UAoCiB,qBAAA;EAsCa;;;;EAjC5B,IAAA;;;;;EAKA,OAAA;;;;;;EAMA,YAAA,GAAe,MAAA,SAAe,CAAA,CAAE,UAAA;AAAA;AAAA,UAGjB,yBAAA;;;;;EAKf,IAAA;;;;;EAKA,OAAA;AAAA;;;AAwBF;;iBAfgB,cAAA,CAAe,OAAA,GAAS,qBAAA;UAA0B,cAAA,CAAA,MAAA;;;;;;;;;iBAelD,kBAAA,CAAmB,OAAA,GAAS,yBAAA;UAA8B,cAAA,CAAA,MAAA;;;;;UAUzD,2BAAA;;;;;EAKf,IAAA;;;;;EAKA,OAAA;AAAA;;;;;AAVF;;;;iBAqBgB,oBAAA,CAAqB,OAAA,GAAS,2BAAA;UAAgC,cAAA,CAAA,MAAA"}
|
package/dist/content.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentsSchema, defineDocSchema, partialsSchema } from "./schemas.js";
|
|
1
|
+
import { componentsSchema, defineDocSchema, defineSchema, docsSchema, partialsSchema } from "./schemas.js";
|
|
2
2
|
import { glob } from "astro/loaders";
|
|
3
3
|
|
|
4
4
|
//#region src/content.ts
|
|
@@ -70,5 +70,5 @@ function componentsCollection(options = {}) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
|
-
export { componentsCollection, docsCollection, partialsCollection };
|
|
73
|
+
export { componentsCollection, componentsSchema, defineDocSchema, defineSchema, docsCollection, docsSchema, partialsCollection, partialsSchema };
|
|
74
74
|
//# sourceMappingURL=content.js.map
|
package/dist/content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","names":[],"sources":["../src/content.ts"],"sourcesContent":["/**\n * Content collection helpers for `nimbus-docs/content`.\n *\n * Users plug these into their `src/content.config.ts`:\n *\n * import { defineCollection } from \"astro:content\";\n * import { docsCollection, partialsCollection } from \"nimbus-docs/content\";\n *\n * export const collections = {\n * docs: defineCollection(docsCollection()),\n * partials: defineCollection(partialsCollection()),\n * };\n *\n * Extend the docs schema with extra frontmatter fields:\n *\n * docs: defineCollection(docsCollection({\n * schemaFields: { author: z.string(), tags: z.array(z.string()) },\n * })),\n */\n\nimport { glob } from \"astro/loaders\";\nimport type { z } from \"astro/zod\";\n\nimport { componentsSchema, defineDocSchema, partialsSchema } from \"./schemas.js\";\n\nexport interface DocsCollectionOptions {\n /**\n * Directory under `src/content/` to load docs from.\n * Default: `\"docs\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"** /*.{md,mdx}\"` (space added to avoid breaking this comment).\n */\n pattern?: string;\n /**\n * Extra fields merged into the default docs schema. Lets users add\n * project-specific frontmatter (author, tags, etc.) without rebuilding\n * the whole schema.\n */\n schemaFields?: Record<string, z.ZodTypeAny>;\n}\n\nexport interface PartialsCollectionOptions {\n /**\n * Directory under `src/content/` to load partials from.\n * Default: `\"partials\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"** /*.{md,mdx}\"`.\n */\n pattern?: string;\n}\n\nconst DEFAULT_PATTERN = \"**/*.{md,mdx}\";\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * docs collection. Pass to `defineCollection()`.\n */\nexport function docsCollection(options: DocsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"docs\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n const schema = defineDocSchema({ fields: options.schemaFields });\n\n return {\n loader: glob({ base, pattern }),\n schema,\n };\n}\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * partials collection. Pass to `defineCollection()`.\n */\nexport function partialsCollection(options: PartialsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"partials\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n\n return {\n loader: glob({ base, pattern }),\n schema: partialsSchema,\n };\n}\n\nexport interface ComponentsCollectionOptions {\n /**\n * Directory under `src/content/` to load component entries from.\n * Default: `\"components\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"**\\/*.{md,mdx}\"`.\n */\n pattern?: string;\n}\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * components collection — for sites documenting their own UI components.\n *\n * Pairs with the `component-showcase` registry recipe, which installs the\n * matching `<Showcase>` / `<Example>` MDX wrappers and the `/components`\n * route. Frontmatter shape: `{ title, tagline, props }`.\n */\nexport function componentsCollection(options: ComponentsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"components\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n\n return {\n loader: glob({ base, pattern }),\n schema: componentsSchema,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"content.js","names":[],"sources":["../src/content.ts"],"sourcesContent":["/**\n * Content collection helpers for `nimbus-docs/content`.\n *\n * Users plug these into their `src/content.config.ts`:\n *\n * import { defineCollection } from \"astro:content\";\n * import { docsCollection, partialsCollection } from \"nimbus-docs/content\";\n *\n * export const collections = {\n * docs: defineCollection(docsCollection()),\n * partials: defineCollection(partialsCollection()),\n * };\n *\n * Extend the docs schema with extra frontmatter fields:\n *\n * docs: defineCollection(docsCollection({\n * schemaFields: { author: z.string(), tags: z.array(z.string()) },\n * })),\n */\n\nimport { glob } from \"astro/loaders\";\nimport type { z } from \"astro/zod\";\n\nimport { componentsSchema, defineDocSchema, partialsSchema } from \"./schemas.js\";\n\n// Re-export the public schema factories from `nimbus-docs/content` so users\n// have a single import for content-config concerns (collections + schemas).\nexport {\n defineDocSchema,\n defineSchema,\n docsSchema,\n partialsSchema,\n componentsSchema,\n} from \"./schemas.js\";\nexport type { DefineSchemaOptions, DocSchemaConfig, ComponentProp } from \"./schemas.js\";\n\nexport interface DocsCollectionOptions {\n /**\n * Directory under `src/content/` to load docs from.\n * Default: `\"docs\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"** /*.{md,mdx}\"` (space added to avoid breaking this comment).\n */\n pattern?: string;\n /**\n * Extra fields merged into the default docs schema. Lets users add\n * project-specific frontmatter (author, tags, etc.) without rebuilding\n * the whole schema.\n */\n schemaFields?: Record<string, z.ZodTypeAny>;\n}\n\nexport interface PartialsCollectionOptions {\n /**\n * Directory under `src/content/` to load partials from.\n * Default: `\"partials\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"** /*.{md,mdx}\"`.\n */\n pattern?: string;\n}\n\nconst DEFAULT_PATTERN = \"**/*.{md,mdx}\";\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * docs collection. Pass to `defineCollection()`.\n */\nexport function docsCollection(options: DocsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"docs\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n const schema = defineDocSchema({ fields: options.schemaFields });\n\n return {\n loader: glob({ base, pattern }),\n schema,\n };\n}\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * partials collection. Pass to `defineCollection()`.\n */\nexport function partialsCollection(options: PartialsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"partials\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n\n return {\n loader: glob({ base, pattern }),\n schema: partialsSchema,\n };\n}\n\nexport interface ComponentsCollectionOptions {\n /**\n * Directory under `src/content/` to load component entries from.\n * Default: `\"components\"`.\n */\n base?: string;\n /**\n * Glob pattern relative to `base`.\n * Default: `\"**\\/*.{md,mdx}\"`.\n */\n pattern?: string;\n}\n\n/**\n * Returns an Astro content-collection config (`{ loader, schema }`) for the\n * components collection — for sites documenting their own UI components.\n *\n * Pairs with the `component-showcase` registry recipe, which installs the\n * matching `<Showcase>` / `<Example>` MDX wrappers and the `/components`\n * route. Frontmatter shape: `{ title, tagline, props }`.\n */\nexport function componentsCollection(options: ComponentsCollectionOptions = {}) {\n const base = `./src/content/${options.base ?? \"components\"}`;\n const pattern = options.pattern ?? DEFAULT_PATTERN;\n\n return {\n loader: glob({ base, pattern }),\n schema: componentsSchema,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoEA,MAAM,kBAAkB;;;;;AAMxB,SAAgB,eAAe,UAAiC,EAAE,EAAE;CAClE,MAAM,OAAO,iBAAiB,QAAQ,QAAQ;CAC9C,MAAM,UAAU,QAAQ,WAAW;CACnC,MAAM,SAAS,gBAAgB,EAAE,QAAQ,QAAQ,cAAc,CAAC;AAEhE,QAAO;EACL,QAAQ,KAAK;GAAE;GAAM;GAAS,CAAC;EAC/B;EACD;;;;;;AAOH,SAAgB,mBAAmB,UAAqC,EAAE,EAAE;AAI1E,QAAO;EACL,QAAQ,KAAK;GAAE,MAJJ,iBAAiB,QAAQ,QAAQ;GAIvB,SAHP,QAAQ,WAAW;GAGH,CAAC;EAC/B,QAAQ;EACT;;;;;;;;;;AAwBH,SAAgB,qBAAqB,UAAuC,EAAE,EAAE;AAI9E,QAAO;EACL,QAAQ,KAAK;GAAE,MAJJ,iBAAiB,QAAQ,QAAQ;GAIvB,SAHP,QAAQ,WAAW;GAGH,CAAC;EAC/B,QAAQ;EACT"}
|