starlight-sidebar-topics-dropdown 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # starlight-sidebar-topics-dropdown
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`01024d4`](https://github.com/trueberryless-org/starlight-sidebar-topics-dropdown/commit/01024d471326097f20087ac401bd1df4d9a8cd22) Thanks [@trueberryless](https://github.com/trueberryless)! - Small fixes and docs changes
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### Minor Changes
package/index.ts CHANGED
@@ -7,8 +7,9 @@ import {
7
7
  StarlightSidebarTopicsDropdownConfigSchema,
8
8
  type StarlightSidebarTopicsDropdownUserConfig,
9
9
  } from "./libs/config";
10
- import { overrideStarlightComponent, throwPluginError } from "./libs/plugin";
10
+ import { throwPluginError } from "./libs/plugin";
11
11
  import { vitePluginStarlightSidebarTopicsDropdown } from "./libs/vite";
12
+ import { overrideStarlightComponent } from "./libs/starlight";
12
13
 
13
14
  export type {
14
15
  StarlightSidebarTopicsDropdownConfig,
@@ -68,6 +69,7 @@ export default function starlightSidebarTopicsDropdownPlugin(
68
69
  ...overrideStarlightComponent(
69
70
  starlightConfig.components,
70
71
  logger,
72
+ "Sidebar",
71
73
  "Sidebar"
72
74
  ),
73
75
  },
package/libs/plugin.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { StarlightUserConfig } from "@astrojs/starlight/types";
2
- import type { AstroIntegrationLogger } from "astro";
3
1
  import { AstroError } from "astro/errors";
4
2
 
5
3
  export function throwPluginError(message: string, hint?: string): never {
@@ -9,24 +7,3 @@ export function throwPluginError(message: string, hint?: string): never {
9
7
  `See the error report above for more informations.\n\nIf you believe this is a bug, please file an issue at https://github.com/trueberryless-org/starlight-sidebar-topics-dropdown/issues/new/choose`
10
8
  );
11
9
  }
12
-
13
- export function overrideStarlightComponent(
14
- components: StarlightUserConfig["components"],
15
- logger: AstroIntegrationLogger,
16
- component: keyof NonNullable<StarlightUserConfig["components"]>
17
- ) {
18
- if (components?.[component]) {
19
- logger.warn(
20
- `It looks like you already have a \`${component}\` component override in your Starlight configuration.`
21
- );
22
- logger.warn(
23
- `To use \`starlight-sidebar-topics-dropdown\`, either remove your override or update it to render the content from \`starlight-sidebar-topics-dropdown/overrides/${component}.astro\`.`
24
- );
25
-
26
- return {};
27
- }
28
-
29
- return {
30
- [component]: `starlight-sidebar-topics-dropdown/overrides/${component}.astro`,
31
- };
32
- }
package/libs/starlight.ts CHANGED
@@ -14,11 +14,6 @@ export function overrideStarlightComponent(
14
14
  logger.warn(
15
15
  `To use \`starlight-sidebar-topics-dropdown\`, either remove your override or update it to render the content from \`starlight-sidebar-topics-dropdown/components/${component}.astro\`.`
16
16
  );
17
- // if (component === "DynamicVersionBadge") {
18
- // logger.warn(
19
- // "Notice that the `DynamicVersionBadge` component must be rendered AFTER the original Starlight `SiteTitle` component in the DOM. This ensures proper layout and behavior within the application."
20
- // );
21
- // }
22
17
 
23
18
  return {};
24
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-sidebar-topics-dropdown",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Starlight plugin to split your docs page into multiple subpages and switch between them with a dropdown menu in the sidebar.",
5
5
  "keywords": [
6
6
  "starlight",