@grove-dev/starlight 0.1.9 → 0.1.14
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/core/config/override.ts +3 -3
- package/core/plugin.ts +4 -4
- package/package.json +1 -1
package/core/config/override.ts
CHANGED
|
@@ -31,17 +31,17 @@ export function override(
|
|
|
31
31
|
const components = { ...starlightConfig.components };
|
|
32
32
|
for (const override of overrides) {
|
|
33
33
|
if (starlightConfig.components?.[override] != null) {
|
|
34
|
-
const fallback =
|
|
34
|
+
const fallback = `@grove-dev/starlight/components/overrides/${override}.astro`;
|
|
35
35
|
|
|
36
36
|
logger.warn(
|
|
37
37
|
`A \`<${override}>\` component override is already defined in your Starlight configuration.`
|
|
38
38
|
);
|
|
39
39
|
logger.warn(
|
|
40
|
-
`To use
|
|
40
|
+
`To use \`@grove-dev/starlight/components\`, either remove this override or manually render the content from \`${fallback}\`.`
|
|
41
41
|
);
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
|
-
components[override] =
|
|
44
|
+
components[override] = `@grove-dev/starlight/components/overrides/${override}.astro`;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return components;
|
package/core/plugin.ts
CHANGED
|
@@ -13,7 +13,7 @@ const parseConfig = (userConfig?: LucodeStarlightUserConfig): LucodeStarlightCon
|
|
|
13
13
|
|
|
14
14
|
if (!parsedConfig.success) {
|
|
15
15
|
throw new Error(
|
|
16
|
-
`The provided plugin configuration for
|
|
16
|
+
`The provided plugin configuration for @grove-dev/starlight is invalid.\n${parsedConfig.error.issues.map((issue) => issue.message).join('\n')}`
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -29,9 +29,9 @@ const plugin = (userConfig?: LucodeStarlightUserConfig): StarlightPlugin =>
|
|
|
29
29
|
components: override(config, COMPONENT_OVERRIDES, logger),
|
|
30
30
|
customCss: [
|
|
31
31
|
...(config.customCss ?? []),
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
32
|
+
'@grove-dev/starlight/styles/layers',
|
|
33
|
+
'@grove-dev/starlight/styles/theme',
|
|
34
|
+
'@grove-dev/starlight/styles/base',
|
|
35
35
|
],
|
|
36
36
|
expressiveCode: expressiveCode(config),
|
|
37
37
|
});
|