@alliance-droid/svelte-docs-system 0.0.2 → 0.1.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/README.md +155 -23
- package/dist/components/APITable.svelte.d.ts +21 -0
- package/dist/components/Breadcrumbs.svelte.d.ts +14 -0
- package/dist/components/Callout.svelte.d.ts +15 -0
- package/dist/components/CodeBlock.svelte.d.ts +12 -0
- package/{src/lib → dist}/components/DocLayout.svelte +18 -6
- package/dist/components/DocLayout.svelte.d.ts +18 -0
- package/dist/components/DocsPage.svelte +39 -0
- package/dist/components/DocsPage.svelte.d.ts +8 -0
- package/dist/components/Documentation.svelte +639 -0
- package/dist/components/Footer.svelte.d.ts +10 -0
- package/dist/components/Image.svelte.d.ts +15 -0
- package/{src/lib → dist}/components/Navbar.svelte +4 -4
- package/dist/components/Navbar.svelte.d.ts +10 -0
- package/{src/lib → dist}/components/Search.svelte +2 -2
- package/dist/components/Search.svelte.d.ts +6 -0
- package/{template-starter/src/lib → dist}/components/Sidebar.svelte +2 -2
- package/dist/components/Sidebar.svelte.d.ts +9 -0
- package/dist/components/Tabs.svelte.d.ts +16 -0
- package/dist/config.d.ts +93 -0
- package/dist/config.js +89 -0
- package/dist/configLoader.d.ts +48 -0
- package/dist/configLoader.js +187 -0
- package/dist/configParser.d.ts +27 -0
- package/dist/configParser.js +208 -0
- package/{template-starter/src/lib/index.ts → dist/index.d.ts} +6 -7
- package/dist/index.js +18 -0
- package/dist/navigationBuilder.d.ts +64 -0
- package/dist/navigationBuilder.js +225 -0
- package/dist/plugin.d.ts +30 -0
- package/dist/plugin.js +172 -0
- package/dist/routing.d.ts +48 -0
- package/dist/routing.js +92 -0
- package/dist/stores/i18n.d.ts +20 -0
- package/dist/stores/i18n.js +119 -0
- package/dist/stores/nav.d.ts +20 -0
- package/dist/stores/nav.js +15 -0
- package/dist/stores/search.d.ts +49 -0
- package/dist/stores/search.js +127 -0
- package/dist/stores/theme.d.ts +7 -0
- package/dist/stores/theme.js +152 -0
- package/dist/stores/version.d.ts +18 -0
- package/dist/stores/version.js +93 -0
- package/dist/themeCustomization.d.ts +46 -0
- package/dist/themeCustomization.js +188 -0
- package/dist/utils/highlight.d.ts +13 -0
- package/dist/utils/highlight.js +83 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/markdown.d.ts +40 -0
- package/dist/utils/markdown.js +165 -0
- package/package.json +44 -23
- package/COMPONENTS.md +0 -365
- package/COVERAGE_REPORT.md +0 -663
- package/SEARCH_VERIFICATION.md +0 -229
- package/TEST_SUMMARY.md +0 -344
- package/bin/init.js +0 -821
- package/docs/COMPONENT_LIBRARY_INTEGRATION_REPORT.md +0 -153
- package/docs/DARK_MODE_AUDIT_REPORT.md +0 -403
- package/docs/E2E_TESTS.md +0 -354
- package/docs/TESTING.md +0 -754
- package/docs/THEME_INHERITANCE.md +0 -192
- package/docs/de/index.md +0 -41
- package/docs/en/COMPONENTS.md +0 -443
- package/docs/en/api/examples.md +0 -100
- package/docs/en/api/overview.md +0 -69
- package/docs/en/components/index.md +0 -622
- package/docs/en/config/navigation.md +0 -505
- package/docs/en/config/theme-and-colors.md +0 -395
- package/docs/en/getting-started/integration.md +0 -406
- package/docs/en/guides/common-setups.md +0 -651
- package/docs/en/index.md +0 -243
- package/docs/en/markdown.md +0 -102
- package/docs/en/routing.md +0 -64
- package/docs/en/setup.md +0 -52
- package/docs/en/troubleshooting.md +0 -704
- package/docs/es/index.md +0 -41
- package/docs/fr/index.md +0 -41
- package/docs/ja/index.md +0 -41
- package/pagefind.toml +0 -8
- package/postcss.config.js +0 -5
- package/src/app.css +0 -119
- package/src/app.d.ts +0 -13
- package/src/app.html +0 -11
- package/src/lib/components/APITable.test.ts +0 -153
- package/src/lib/components/Breadcrumbs.test.ts +0 -148
- package/src/lib/components/Callout.test.ts +0 -100
- package/src/lib/components/CodeBlock.test.ts +0 -133
- package/src/lib/components/Image.test.ts +0 -163
- package/src/lib/components/Sidebar.svelte +0 -110
- package/src/lib/components/Tabs.test.ts +0 -102
- package/src/lib/config.test.ts +0 -140
- package/src/lib/config.ts +0 -179
- package/src/lib/configIntegration.test.ts +0 -272
- package/src/lib/configLoader.ts +0 -231
- package/src/lib/configParser.test.ts +0 -217
- package/src/lib/configParser.ts +0 -234
- package/src/lib/index.ts +0 -37
- package/src/lib/integration.test.ts +0 -426
- package/src/lib/navigationBuilder.test.ts +0 -338
- package/src/lib/navigationBuilder.ts +0 -268
- package/src/lib/performance.test.ts +0 -369
- package/src/lib/routing.test.ts +0 -202
- package/src/lib/routing.ts +0 -127
- package/src/lib/search-functionality.test.ts +0 -493
- package/src/lib/stores/i18n.test.ts +0 -180
- package/src/lib/stores/i18n.ts +0 -143
- package/src/lib/stores/nav.ts +0 -36
- package/src/lib/stores/search.test.ts +0 -140
- package/src/lib/stores/search.ts +0 -162
- package/src/lib/stores/theme.test.ts +0 -117
- package/src/lib/stores/theme.ts +0 -167
- package/src/lib/stores/version.test.ts +0 -139
- package/src/lib/stores/version.ts +0 -111
- package/src/lib/themeCustomization.test.ts +0 -223
- package/src/lib/themeCustomization.ts +0 -212
- package/src/lib/utils/highlight.test.ts +0 -136
- package/src/lib/utils/highlight.ts +0 -100
- package/src/lib/utils/index.ts +0 -7
- package/src/lib/utils/markdown.test.ts +0 -357
- package/src/lib/utils/markdown.ts +0 -77
- package/src/routes/+layout.server.ts +0 -1
- package/src/routes/+layout.svelte +0 -29
- package/src/routes/+page.svelte +0 -165
- package/src/routes/quote-demo/+page.svelte +0 -141
- package/static/robots.txt +0 -3
- package/svelte.config.js +0 -15
- package/tailwind.config.ts +0 -55
- package/template-starter/.github/workflows/build.yml +0 -40
- package/template-starter/.github/workflows/deploy-github-pages.yml +0 -47
- package/template-starter/.github/workflows/deploy-netlify.yml +0 -41
- package/template-starter/.github/workflows/deploy-vercel.yml +0 -64
- package/template-starter/NPM-PACKAGE-SETUP.md +0 -233
- package/template-starter/README.md +0 -320
- package/template-starter/docs/_config.json +0 -39
- package/template-starter/docs/api/components.md +0 -257
- package/template-starter/docs/api/overview.md +0 -169
- package/template-starter/docs/guides/configuration.md +0 -145
- package/template-starter/docs/guides/github-pages-deployment.md +0 -254
- package/template-starter/docs/guides/netlify-deployment.md +0 -159
- package/template-starter/docs/guides/vercel-deployment.md +0 -131
- package/template-starter/docs/index.md +0 -49
- package/template-starter/docs/setup.md +0 -149
- package/template-starter/package.json +0 -31
- package/template-starter/pagefind.toml +0 -3
- package/template-starter/postcss.config.js +0 -5
- package/template-starter/src/app.css +0 -34
- package/template-starter/src/app.d.ts +0 -13
- package/template-starter/src/app.html +0 -11
- package/template-starter/src/lib/components/APITable.svelte +0 -120
- package/template-starter/src/lib/components/APITable.test.ts +0 -96
- package/template-starter/src/lib/components/Breadcrumbs.svelte +0 -85
- package/template-starter/src/lib/components/Breadcrumbs.test.ts +0 -82
- package/template-starter/src/lib/components/Callout.svelte +0 -60
- package/template-starter/src/lib/components/Callout.test.ts +0 -91
- package/template-starter/src/lib/components/CodeBlock.svelte +0 -68
- package/template-starter/src/lib/components/CodeBlock.test.ts +0 -62
- package/template-starter/src/lib/components/DocLayout.svelte +0 -84
- package/template-starter/src/lib/components/Footer.svelte +0 -78
- package/template-starter/src/lib/components/Image.svelte +0 -100
- package/template-starter/src/lib/components/Image.test.ts +0 -81
- package/template-starter/src/lib/components/Navbar.svelte +0 -141
- package/template-starter/src/lib/components/Search.svelte +0 -248
- package/template-starter/src/lib/components/Tabs.svelte +0 -48
- package/template-starter/src/lib/components/Tabs.test.ts +0 -89
- package/template-starter/src/routes/+layout.svelte +0 -28
- package/template-starter/src/routes/+page.svelte +0 -92
- package/template-starter/svelte.config.js +0 -17
- package/template-starter/tailwind.config.ts +0 -17
- package/template-starter/tsconfig.json +0 -13
- package/template-starter/vite.config.ts +0 -6
- package/tests/e2e/example.spec.ts +0 -345
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -6
- package/vitest.config.ts +0 -33
- package/vitest.setup.ts +0 -21
- /package/{src/lib → dist}/assets/favicon.svg +0 -0
- /package/{src/lib → dist}/components/APITable.svelte +0 -0
- /package/{src/lib → dist}/components/Breadcrumbs.svelte +0 -0
- /package/{src/lib → dist}/components/Callout.svelte +0 -0
- /package/{src/lib → dist}/components/CodeBlock.svelte +0 -0
- /package/{src/lib → dist}/components/Footer.svelte +0 -0
- /package/{src/lib → dist}/components/Image.svelte +0 -0
- /package/{src/lib → dist}/components/Tabs.svelte +0 -0
- /package/{src/lib → dist}/svelte-component-library.d.ts +0 -0
package/docs/en/api/examples.md
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: API Examples
|
|
3
|
-
description: Code examples for using the documentation system
|
|
4
|
-
author: Andrew
|
|
5
|
-
date: 2026-02-05
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# API Examples
|
|
9
|
-
|
|
10
|
-
Here are practical examples of using the documentation system.
|
|
11
|
-
|
|
12
|
-
## Loading a Document
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
import { loadMarkdownBySlug } from '$lib/markdown';
|
|
16
|
-
|
|
17
|
-
const doc = await loadMarkdownBySlug('./docs', 'setup');
|
|
18
|
-
|
|
19
|
-
console.log(doc.title); // "Setup Guide"
|
|
20
|
-
console.log(doc.slug); // "setup"
|
|
21
|
-
console.log(doc.html); // <h1>Setup Guide</h1>...
|
|
22
|
-
console.log(doc.metadata); // { title, author, date }
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Scanning All Documents
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { scanDocsFolder, getSlugs } from '$lib/scanner';
|
|
29
|
-
|
|
30
|
-
const structure = await scanDocsFolder('./docs');
|
|
31
|
-
const slugs = getSlugs(structure);
|
|
32
|
-
|
|
33
|
-
slugs.forEach(slug => {
|
|
34
|
-
console.log(`Found: ${slug}`);
|
|
35
|
-
});
|
|
36
|
-
// Output:
|
|
37
|
-
// Found: index
|
|
38
|
-
// Found: setup
|
|
39
|
-
// Found: routing
|
|
40
|
-
// Found: api/overview
|
|
41
|
-
// Found: api/examples
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Building Navigation
|
|
45
|
-
|
|
46
|
-
```typescript
|
|
47
|
-
import { scanDocsFolder, buildNavStructure } from '$lib/scanner';
|
|
48
|
-
|
|
49
|
-
const structure = await scanDocsFolder('./docs');
|
|
50
|
-
const nav = buildNavStructure(structure);
|
|
51
|
-
|
|
52
|
-
// nav contains hierarchical structure for building sidebar
|
|
53
|
-
console.log(nav);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## In a SvelteKit Route
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
// src/routes/docs/[...slug]/+page.ts
|
|
60
|
-
import { loadMarkdownBySlug } from '$lib/markdown';
|
|
61
|
-
import { error } from '@sveltejs/kit';
|
|
62
|
-
|
|
63
|
-
export async function load({ params }) {
|
|
64
|
-
const slug = params.slug || 'index';
|
|
65
|
-
const doc = await loadMarkdownBySlug('./docs', slug);
|
|
66
|
-
|
|
67
|
-
if (!doc) {
|
|
68
|
-
throw error(404, 'Page not found');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return { doc };
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Extracting Metadata
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
import { extractMetadata } from '$lib/markdown';
|
|
79
|
-
|
|
80
|
-
const meta = await extractMetadata('./docs/setup.md');
|
|
81
|
-
console.log(meta);
|
|
82
|
-
// { title: 'Setup Guide', author: 'Andrew', date: '2026-02-05' }
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Generating Table of Contents
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
import { loadMarkdownBySlug, generateTableOfContents } from '$lib/markdown';
|
|
89
|
-
|
|
90
|
-
const doc = await loadMarkdownBySlug('./docs', 'setup');
|
|
91
|
-
const toc = generateTableOfContents(doc.html);
|
|
92
|
-
|
|
93
|
-
toc.forEach(item => {
|
|
94
|
-
console.log(`${' '.repeat(item.level - 2)}${item.text}`);
|
|
95
|
-
});
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Next Steps
|
|
99
|
-
|
|
100
|
-
Explore the [Routing System](/docs/routing) to learn more about how the system works.
|
package/docs/en/api/overview.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: API Overview
|
|
3
|
-
description: Overview of the documentation system API
|
|
4
|
-
author: Andrew
|
|
5
|
-
date: 2026-02-05
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# API Overview
|
|
9
|
-
|
|
10
|
-
The documentation system provides utility functions for working with markdown files and routing.
|
|
11
|
-
|
|
12
|
-
## Core Utilities
|
|
13
|
-
|
|
14
|
-
### scanDocsFolder(docsPath: string)
|
|
15
|
-
|
|
16
|
-
Scans the docs folder and returns a structure of all markdown files.
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
const structure = await scanDocsFolder('./docs');
|
|
20
|
-
// Returns: { 'setup': {...}, 'api/overview': {...} }
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### loadMarkdownBySlug(docsPath: string, slug: string)
|
|
24
|
-
|
|
25
|
-
Loads and parses a markdown file by its slug.
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
const doc = await loadMarkdownBySlug('./docs', 'setup');
|
|
29
|
-
// Returns: { content, html, metadata, slug, title }
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### generateTableOfContents(htmlContent: string)
|
|
33
|
-
|
|
34
|
-
Generates a table of contents from rendered markdown.
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
const toc = generateTableOfContents(htmlContent);
|
|
38
|
-
// Returns: [{ level: 2, text: 'Setup', id: 'setup' }, ...]
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Data Types
|
|
42
|
-
|
|
43
|
-
### ParsedMarkdown
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
interface ParsedMarkdown {
|
|
47
|
-
content: string; // Raw markdown
|
|
48
|
-
html: string; // Rendered HTML
|
|
49
|
-
metadata: FrontMatter; // YAML frontmatter
|
|
50
|
-
slug: string; // URL slug
|
|
51
|
-
title: string; // Page title
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### FrontMatter
|
|
56
|
-
|
|
57
|
-
```typescript
|
|
58
|
-
interface FrontMatter {
|
|
59
|
-
title?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
author?: string;
|
|
62
|
-
date?: string;
|
|
63
|
-
[key: string]: any; // Custom fields
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Examples
|
|
68
|
-
|
|
69
|
-
See [API Examples](/docs/api/examples) for complete code samples.
|