blume 0.2.0 → 0.3.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.
- package/dist/cli/index.js +1921 -560
- package/dist/cli/index.js.map +36 -24
- package/dist/types/core/data.d.ts +16 -0
- package/dist/types/core/define-components.d.ts +9 -2
- package/dist/types/core/diagnostics.d.ts +5 -0
- package/dist/types/core/schema.d.ts +26 -502
- package/dist/types/core/types.d.ts +2 -2
- package/docs/02-deployment.mdx +21 -2
- package/docs/advanced/custom-pages.mdx +63 -1
- package/docs/configuration/ai.mdx +20 -3
- package/docs/configuration/customization.mdx +103 -5
- package/docs/configuration/index.mdx +13 -0
- package/docs/configuration/seo.mdx +5 -0
- package/docs/content/islands.mdx +73 -0
- package/docs/content/navigation.mdx +25 -0
- package/docs/index.mdx +3 -12
- package/docs/reference/cli.mdx +42 -0
- package/package.json +3 -1
- package/src/ai/ask-context.ts +131 -0
- package/src/ai/ask-data.ts +25 -0
- package/src/astro/component-slots.ts +165 -0
- package/src/astro/generate.ts +132 -13
- package/src/astro/integration.ts +59 -0
- package/src/astro/pages.ts +5 -12
- package/src/astro/templates.ts +92 -44
- package/src/blume-modules.d.ts +25 -0
- package/src/cli/commands/build.ts +186 -1
- package/src/cli/commands/check.ts +62 -0
- package/src/cli/commands/dev.ts +21 -1
- package/src/cli/commands/doctor.ts +23 -6
- package/src/cli/commands/init.ts +163 -15
- package/src/cli/commands/validate.ts +16 -2
- package/src/cli/index.ts +15 -0
- package/src/cli/internal-error.ts +63 -0
- package/src/cli/log.ts +30 -1
- package/src/cli/prepare.ts +17 -3
- package/src/cli/required-secrets.ts +44 -0
- package/src/components/BlumePage.astro +107 -0
- package/src/components/index.ts +3 -3
- package/src/components/islands/ask-ai.tsx +15 -1
- package/src/components/islands/hooks.ts +188 -0
- package/src/components/layout/Empty.astro +6 -0
- package/src/components/layout/Header.astro +24 -39
- package/src/components/layout/Logo.astro +50 -0
- package/src/components/layout/NavSelector.astro +75 -0
- package/src/components/layout/PageLayout.astro +38 -2
- package/src/components/layout/RootLayout.astro +70 -4
- package/src/components/layout/hydration-hint.ts +30 -0
- package/src/components/layout/overrides.ts +6 -4
- package/src/components/props.ts +68 -0
- package/src/core/builtin-tags.ts +39 -0
- package/src/core/component-diagnostics.ts +44 -0
- package/src/core/component-overrides.ts +478 -0
- package/src/core/config.ts +8 -0
- package/src/core/data.ts +14 -0
- package/src/core/define-components.ts +9 -2
- package/src/core/diagnostics.ts +90 -1
- package/src/core/graph.ts +7 -0
- package/src/core/nav-diagnostics.ts +205 -0
- package/src/core/project-graph.ts +40 -1
- package/src/core/schema.ts +28 -96
- package/src/core/sources/normalize.ts +51 -0
- package/src/core/types.ts +2 -2
- package/src/deploy/redirects.ts +43 -0
- package/src/migrate/mintlify/config.ts +1 -176
- package/src/migrate/starlight/config.ts +0 -4
- package/src/og/card.ts +163 -38
- package/src/registry/eject.ts +39 -9
- package/src/registry/registry.ts +166 -0
- package/src/runtime/index.ts +61 -0
- package/src/vite-env.d.ts +14 -0
|
@@ -110,6 +110,22 @@ export interface BlumeDataConfig {
|
|
|
110
110
|
structuredData: boolean;
|
|
111
111
|
theme: ResolvedConfig["theme"];
|
|
112
112
|
title: string;
|
|
113
|
+
/** Table-of-contents settings: whether to show it and the heading range. */
|
|
114
|
+
toc: ResolvedConfig["toc"];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The compact snapshot the layout serializes into the page for React island
|
|
118
|
+
* hooks (`blume/hooks`). Islands hydrate independently, so this is read from a
|
|
119
|
+
* `<script type="application/json" id="blume-client-data">` tag rather than
|
|
120
|
+
* React context.
|
|
121
|
+
*/
|
|
122
|
+
export interface BlumeClientData {
|
|
123
|
+
config: BlumeDataConfig;
|
|
124
|
+
navigation: Navigation;
|
|
125
|
+
page: {
|
|
126
|
+
route: string;
|
|
127
|
+
title: string;
|
|
128
|
+
};
|
|
113
129
|
}
|
|
114
130
|
/** The `blume:data` module a Blume site's custom pages import. */
|
|
115
131
|
export interface BlumeData {
|
|
@@ -15,10 +15,17 @@ export interface IslandDescriptor {
|
|
|
15
15
|
export type ComponentOverride = ComponentReference | IslandDescriptor;
|
|
16
16
|
/** User-authored component overrides, grouped by surface. */
|
|
17
17
|
export interface ComponentOverrides {
|
|
18
|
+
/**
|
|
19
|
+
* Interactive framework components made available in every `.mdx` page. Like
|
|
20
|
+
* `mdx`, but hydrated: entries default to `client: "visible"`. Shorthand for
|
|
21
|
+
* an `mdx` descriptor with a client mode, and the config-file equivalent of
|
|
22
|
+
* dropping a component in the `islands/` folder.
|
|
23
|
+
*/
|
|
24
|
+
islands?: Record<string, ComponentOverride>;
|
|
25
|
+
/** Layout slot overrides (`Header`, `Sidebar`, `Footer`, ...). */
|
|
26
|
+
layout?: Record<string, ComponentOverride>;
|
|
18
27
|
/** MDX component map overrides (`Callout`, `Card`, ...). */
|
|
19
28
|
mdx?: Record<string, ComponentOverride>;
|
|
20
|
-
/** Layout slot overrides (`Header`, `Sidebar`, `Search`, ...). */
|
|
21
|
-
layout?: Record<string, ComponentOverride>;
|
|
22
29
|
}
|
|
23
30
|
/**
|
|
24
31
|
* Identity helper for authoring `components.ts`. Provides type inference and a
|
|
@@ -6,10 +6,15 @@ export declare class BlumeError extends Error {
|
|
|
6
6
|
constructor(diagnostic: Diagnostic);
|
|
7
7
|
}
|
|
8
8
|
export declare const createDiagnostic: (diagnostic: Diagnostic) => Diagnostic;
|
|
9
|
+
/** The docs URL that explains a diagnostic code, if one is mapped. */
|
|
10
|
+
export declare const resolveDocsUrl: (code: string) => string | undefined;
|
|
11
|
+
/** Fill in `docsUrl` from the code map where a diagnostic doesn't set its own. */
|
|
12
|
+
export declare const enrichDiagnostic: (diagnostic: Diagnostic) => Diagnostic;
|
|
9
13
|
/** Convert a ZodError into Blume diagnostics, anchored to a file. */
|
|
10
14
|
export declare const diagnosticsFromZod: (error: ZodError, options: {
|
|
11
15
|
code: string;
|
|
12
16
|
file?: string;
|
|
17
|
+
source?: string;
|
|
13
18
|
}) => Diagnostic[];
|
|
14
19
|
/** Format a single diagnostic for terminal output. */
|
|
15
20
|
export declare const formatDiagnostic: (diagnostic: Diagnostic, root?: string) => string;
|