@karaoke-cms/module-docs 0.13.0 → 0.15.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@karaoke-cms/module-docs",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.15.0",
5
5
  "description": "Docs module for karaoke-cms — documentation pages with sidebar navigation",
6
6
  "main": "./src/index.ts",
7
7
  "exports": {
@@ -23,13 +23,13 @@
23
23
  ],
24
24
  "peerDependencies": {
25
25
  "astro": ">=6.0.0",
26
- "@karaoke-cms/contracts": "^0.13.0"
26
+ "@karaoke-cms/contracts": "^0.15.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "astro": "^6.0.8",
30
30
  "vitest": "^4.1.1",
31
- "@karaoke-cms/astro": "0.13.0",
32
- "@karaoke-cms/contracts": "0.13.0"
31
+ "@karaoke-cms/astro": "0.15.0",
32
+ "@karaoke-cms/contracts": "0.15.0"
33
33
  },
34
34
  "scripts": {
35
35
  "test": "vitest run test/docs-factory.test.js"
@@ -24,7 +24,19 @@ export const cssContract: CssContract = {
24
24
  'docs-tag': { description: 'Tag chip on doc card or article', required: false },
25
25
  'docs-tag-list': { description: 'Wrapper around a list of doc tag chips', required: false },
26
26
  // Sidebar navigation
27
- 'docs-sidebar': { description: 'Sidebar nav wrapper', required: true },
28
- 'docs-sidebar-list': { description: 'List of nav links inside the sidebar', required: true },
29
- 'docs-sidebar-item': { description: 'Individual nav link in the sidebar', required: true },
27
+ 'docs-sidebar': { description: 'Sidebar nav wrapper', required: true },
28
+ 'docs-sidebar-list': { description: 'List of nav links inside the sidebar (legacy)', required: false },
29
+ 'docs-sidebar-item': { description: 'Individual nav link in the sidebar (legacy)', required: false },
30
+ 'docs-sidebar-wrap': { description: '<details> collapsible wrapper for sidebar panels', required: true },
31
+ 'docs-sidebar-toggle': { description: '<summary> toggle header for sidebar panels', required: true },
32
+ // Tree navigation
33
+ 'docs-tree': { description: 'Tree <ul> at any depth level', required: true },
34
+ 'docs-tree-root': { description: 'Modifier on the top-level docs-tree', required: false },
35
+ 'docs-tree-dir': { description: 'Directory <li> node in the tree', required: true },
36
+ 'docs-tree-summary': { description: '<summary> header of a directory node', required: true },
37
+ 'docs-tree-dir-name': { description: 'Plain label for a dir without an associated page', required: false },
38
+ 'docs-tree-dir-link': { description: 'Link on a dir that has an associated page', required: false },
39
+ 'docs-tree-file': { description: 'File <li> (leaf) node in the tree', required: true },
40
+ // Right sidebar
41
+ 'docs-page-nav': { description: 'Right sidebar showing siblings of current page', required: false },
30
42
  };
@@ -4,7 +4,6 @@
4
4
  import { getCollection, render } from 'astro:content';
5
5
  import DefaultPage from '@karaoke-cms/astro/layouts/DefaultPage.astro';
6
6
  import ModuleLoader from '@karaoke-cms/astro/components/ModuleLoader.astro';
7
- import { siteTitle } from 'virtual:karaoke-cms/config';
8
7
  import { resolveWikiImage } from '@karaoke-cms/astro';
9
8
 
10
9
  export async function getStaticPaths() {
@@ -23,7 +22,7 @@ const allDocs = (await getCollection('docs', ({ data }) => data.publish === true
23
22
  .sort((a, b) => a.data.title.localeCompare(b.data.title));
24
23
  ---
25
24
 
26
- <DefaultPage title={`${entry.data.title} — ${siteTitle}`} description={entry.data.description} type="article">
25
+ <DefaultPage title={entry.data.title} description={entry.data.description} type="article">
27
26
  <nav class="docs-sidebar" slot="left">
28
27
  <ul class="docs-sidebar-list">
29
28
  {allDocs.map(doc => (
@@ -3,13 +3,13 @@
3
3
  // For now, mount is assumed to be /docs.
4
4
  import { getCollection } from 'astro:content';
5
5
  import DefaultPage from '@karaoke-cms/astro/layouts/DefaultPage.astro';
6
- import { siteTitle } from 'virtual:karaoke-cms/config';
6
+ import { siteDescription } from 'virtual:karaoke-cms/config';
7
7
 
8
8
  const docs = (await getCollection('docs', ({ data }) => data.publish === true))
9
9
  .sort((a, b) => a.data.title.localeCompare(b.data.title));
10
10
  ---
11
11
 
12
- <DefaultPage title={`Docs — ${siteTitle}`}>
12
+ <DefaultPage title="Docs" description={siteDescription}>
13
13
  <div class="docs-home">
14
14
  <h1>Docs</h1>
15
15
  {docs.length > 0 ? (
@@ -3,13 +3,13 @@
3
3
  // For now, mount is assumed to be /docs.
4
4
  import { getCollection } from 'astro:content';
5
5
  import DefaultPage from '@karaoke-cms/astro/layouts/DefaultPage.astro';
6
- import { siteTitle } from 'virtual:karaoke-cms/config';
6
+ import { siteDescription } from 'virtual:karaoke-cms/config';
7
7
 
8
8
  const docs = (await getCollection('docs', ({ data }) => data.publish === true))
9
9
  .sort((a, b) => a.data.title.localeCompare(b.data.title));
10
10
  ---
11
11
 
12
- <DefaultPage title={`All Docs — ${siteTitle}`}>
12
+ <DefaultPage title="All Docs" description={siteDescription}>
13
13
  <div class="docs-list">
14
14
  <h1>All Docs</h1>
15
15
  {docs.length > 0 ? (