starlight-heading-badges 0.4.0 → 0.5.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/CHANGELOG.md +18 -0
- package/components/HeadingBadgesMobileTableOfContents.astro +1 -2
- package/components/HeadingBadgesTableOfContents.astro +1 -3
- package/index.ts +1 -1
- package/libs/plugin.ts +2 -2
- package/overrides/MobileTableOfContents.astro +1 -3
- package/overrides/TableOfContents.astro +1 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# starlight-heading-badges
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#12](https://github.com/HiDeoo/starlight-heading-badges/pull/12) [`508982f`](https://github.com/HiDeoo/starlight-heading-badges/commit/508982fc5050e700669382f195aaa420a4b59748) Thanks [@HiDeoo](https://github.com/HiDeoo)! - ⚠️ **BREAKING CHANGE:** The minimum supported version of Starlight is now version `0.32.0`.
|
|
8
|
+
|
|
9
|
+
Please use the `@astrojs/upgrade` command to upgrade your project:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx @astrojs/upgrade
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 0.4.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#10](https://github.com/HiDeoo/starlight-heading-badges/pull/10) [`68a2977`](https://github.com/HiDeoo/starlight-heading-badges/commit/68a29775e0852ade39ae34cb92ba6522a01b2c9d) Thanks [@DaniFoldi](https://github.com/DaniFoldi)! - Moves `mdast-util-directive` package to non-dev dependencies to prevent issues in monorepos with hoisting disabled.
|
|
20
|
+
|
|
3
21
|
## 0.4.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { Icon } from '@astrojs/starlight/components'
|
|
8
|
-
import type { Props } from '@astrojs/starlight/props'
|
|
9
8
|
|
|
10
9
|
import TableOfContentsList from './TableOfContentsList.astro'
|
|
11
10
|
|
|
12
|
-
const { toc } = Astro.
|
|
11
|
+
const { toc } = Astro.locals.starlightRoute
|
|
13
12
|
---
|
|
14
13
|
|
|
15
14
|
{
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
* @see https://github.com/withastro/starlight/blob/1d32c8b0cec0ea5f66351b21b91748dfa78b404b/packages/starlight/components/TableOfContents.astro
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { Props } from '@astrojs/starlight/props'
|
|
8
|
-
|
|
9
7
|
import TableOfContentsList from './TableOfContentsList.astro'
|
|
10
8
|
|
|
11
|
-
const { toc } = Astro.
|
|
9
|
+
const { toc } = Astro.locals.starlightRoute
|
|
12
10
|
---
|
|
13
11
|
|
|
14
12
|
{
|
package/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ export default function starlightHeadingBadgesPlugin(): StarlightPlugin {
|
|
|
7
7
|
return {
|
|
8
8
|
name: 'starlight-heading-badges-plugin',
|
|
9
9
|
hooks: {
|
|
10
|
-
setup({ addIntegration, config: starlightConfig, logger, updateConfig }) {
|
|
10
|
+
'config:setup'({ addIntegration, config: starlightConfig, logger, updateConfig }) {
|
|
11
11
|
addIntegration(starlightHeadingBadgesIntegration())
|
|
12
12
|
|
|
13
13
|
updateConfig({
|
package/libs/plugin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HookParameters } from '@astrojs/starlight/types'
|
|
2
2
|
import type { AstroIntegrationLogger } from 'astro'
|
|
3
3
|
|
|
4
4
|
export function overrideComponents(
|
|
@@ -27,4 +27,4 @@ interface ComponentOverride {
|
|
|
27
27
|
fallback: string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
type StarlightUserConfig =
|
|
30
|
+
type StarlightUserConfig = HookParameters<'config:setup'>['config']
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { Props } from '@astrojs/starlight/props'
|
|
3
|
-
|
|
4
2
|
import HeadingBadgesMobileTableOfContents from '../components/HeadingBadgesMobileTableOfContents.astro'
|
|
5
3
|
---
|
|
6
4
|
|
|
7
|
-
<HeadingBadgesMobileTableOfContents
|
|
5
|
+
<HeadingBadgesMobileTableOfContents />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starlight-heading-badges",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Starlight plugin to add badges to your Markdown and MDX headings.",
|
|
6
6
|
"author": "HiDeoo <github@hideoo.dev> (https://hideoo.dev)",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@astrojs/markdown-remark": "^6.0.1",
|
|
19
19
|
"github-slugger": "^2.0.0",
|
|
20
|
+
"mdast-util-directive": "^3.0.0",
|
|
20
21
|
"unist-util-visit": "^5.0.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@playwright/test": "^1.49.1",
|
|
24
25
|
"@types/hast": "^3.0.4",
|
|
25
|
-
"@types/mdast": "^4.0.4"
|
|
26
|
-
"mdast-util-directive": "^3.0.0"
|
|
26
|
+
"@types/mdast": "^4.0.4"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@astrojs/starlight": ">=0.
|
|
29
|
+
"@astrojs/starlight": ">=0.32.0"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18"
|