@eqtylab/docs 0.3.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 +201 -0
- package/dist/chunk-55J6XMHW.js +3 -0
- package/dist/chunk-55J6XMHW.js.map +1 -0
- package/dist/chunk-ATIOPYKE.js +102 -0
- package/dist/chunk-ATIOPYKE.js.map +1 -0
- package/dist/chunk-GSSSQTEV.js +51 -0
- package/dist/chunk-GSSSQTEV.js.map +1 -0
- package/dist/chunk-IWKZQ4CW.js +68 -0
- package/dist/chunk-IWKZQ4CW.js.map +1 -0
- package/dist/chunk-K7PJRTK3.js +113 -0
- package/dist/chunk-K7PJRTK3.js.map +1 -0
- package/dist/chunk-VJN3HXKM.js +59 -0
- package/dist/chunk-VJN3HXKM.js.map +1 -0
- package/dist/chunk-ZZ45WAVR.js +20 -0
- package/dist/chunk-ZZ45WAVR.js.map +1 -0
- package/dist/config.d.ts +78 -0
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -0
- package/dist/dev.d.ts +6 -0
- package/dist/dev.js +84 -0
- package/dist/dev.js.map +1 -0
- package/dist/env.d.ts +17 -0
- package/dist/env.js +3 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +421 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/assert-mdx-only.d.ts +1 -0
- package/dist/internal/microlighter-grammars.d.ts +3 -0
- package/dist/internal/pagefind.d.ts +2 -0
- package/dist/internal/rehype-base-url.d.ts +5 -0
- package/dist/internal/rehype-base-url.js +3 -0
- package/dist/internal/rehype-base-url.js.map +1 -0
- package/dist/internal/rehype-code-fence.d.ts +1 -0
- package/dist/internal/rehype-prose-scope.d.ts +1 -0
- package/dist/internal/rehype-table-columns.d.ts +1 -0
- package/dist/internal/scan-consumer-pages.d.ts +7 -0
- package/dist/internal/virtual-config.d.ts +3 -0
- package/dist/loaders.d.ts +20 -0
- package/dist/loaders.js +85 -0
- package/dist/loaders.js.map +1 -0
- package/dist/nav.d.ts +57 -0
- package/dist/nav.js +222 -0
- package/dist/nav.js.map +1 -0
- package/dist/paths.d.ts +28 -0
- package/dist/paths.js +3 -0
- package/dist/paths.js.map +1 -0
- package/dist/runtime/chrome/GlobalSearch.module.css +26 -0
- package/dist/runtime/chrome/GlobalSearch.tsx +422 -0
- package/dist/runtime/chrome/Header.astro +105 -0
- package/dist/runtime/chrome/LinkIcon.astro +35 -0
- package/dist/runtime/chrome/NavDrawer.astro +60 -0
- package/dist/runtime/chrome/NavTree.astro +112 -0
- package/dist/runtime/chrome/NotFoundBody.tsx +12 -0
- package/dist/runtime/chrome/PageFooter.astro +80 -0
- package/dist/runtime/chrome/Prose.astro +169 -0
- package/dist/runtime/chrome/Sidebar.astro +21 -0
- package/dist/runtime/chrome/TableOfContents.astro +86 -0
- package/dist/runtime/chrome/ThemeToggle.tsx +85 -0
- package/dist/runtime/chrome/TocElbow.astro +30 -0
- package/dist/runtime/chrome/TocList.astro +43 -0
- package/dist/runtime/components/AlertBridge.astro +16 -0
- package/dist/runtime/components/CodeFence.astro +38 -0
- package/dist/runtime/components/CodeFenceBridge.astro +20 -0
- package/dist/runtime/components/Link.astro +21 -0
- package/dist/runtime/components/TableBridge.astro +18 -0
- package/dist/runtime/components/index.ts +2 -0
- package/dist/runtime/layouts/DocsPage.astro +50 -0
- package/dist/runtime/layouts/DocsShell.astro +92 -0
- package/dist/runtime/lib/mdx-components.ts +43 -0
- package/dist/runtime/lib/nav-data.ts +74 -0
- package/dist/runtime/lib/summary.ts +57 -0
- package/dist/runtime/lib/theme.ts +84 -0
- package/dist/runtime/routes/docs-md.ts +33 -0
- package/dist/runtime/routes/docs.astro +92 -0
- package/dist/runtime/routes/llms-txt.ts +38 -0
- package/dist/runtime/routes/not-found.astro +16 -0
- package/dist/runtime/scripts/eq-copy.ts +27 -0
- package/dist/runtime/scripts/eq-highlight.ts +24 -0
- package/dist/runtime/scripts/eq-nav-drawer.ts +31 -0
- package/dist/runtime/scripts/eq-nav-group.ts +52 -0
- package/dist/runtime/scripts/eq-toc.ts +166 -0
- package/dist/runtime/styles/chrome.css +30 -0
- package/dist/runtime/styles/docs.css +21 -0
- package/dist/runtime/styles/prose.css +102 -0
- package/dist/runtime/styles/theme.css +2 -0
- package/dist/runtime/styles/utilities.css +38 -0
- package/dist/schema.d.ts +110 -0
- package/dist/schema.js +3 -0
- package/dist/schema.js.map +1 -0
- package/dist/types.d.ts +60 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +127 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Public types. Keep free of `astro:*` imports so this loads in Node. */
|
|
2
|
+
export type BadgeVariant = 'primary' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export interface DocsBadge {
|
|
4
|
+
text: string;
|
|
5
|
+
variant: BadgeVariant;
|
|
6
|
+
}
|
|
7
|
+
/** A node in the sidebar tree. */
|
|
8
|
+
export interface NavNode {
|
|
9
|
+
kind: 'page' | 'group' | 'link';
|
|
10
|
+
/** Filesystem name (basename without extension, or directory name). The `order` sort key. */
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
/** Absolute, base-prefixed href. Undefined for a group with no index page. */
|
|
14
|
+
href?: string;
|
|
15
|
+
/** Lucide icon name. */
|
|
16
|
+
icon?: string;
|
|
17
|
+
badge?: DocsBadge;
|
|
18
|
+
external?: boolean;
|
|
19
|
+
/** True when this node is the page being viewed. */
|
|
20
|
+
current?: boolean;
|
|
21
|
+
/** True when this node is the current page or an ancestor of it. */
|
|
22
|
+
inPath?: boolean;
|
|
23
|
+
/** Groups only: whether to render expanded. */
|
|
24
|
+
open?: boolean;
|
|
25
|
+
children?: NavNode[];
|
|
26
|
+
/** Extra attributes for `link` nodes. */
|
|
27
|
+
attrs?: Record<string, string | number | boolean>;
|
|
28
|
+
}
|
|
29
|
+
/** A heading in the on-this-page tree. */
|
|
30
|
+
export interface TocNode {
|
|
31
|
+
depth: number;
|
|
32
|
+
slug: string;
|
|
33
|
+
text: string;
|
|
34
|
+
children: TocNode[];
|
|
35
|
+
}
|
|
36
|
+
/** The minimum a docs entry must expose for the nav builder. */
|
|
37
|
+
export interface DocsNavEntry {
|
|
38
|
+
/** Collection id, e.g. "guides/installation" or "index". */
|
|
39
|
+
id: string;
|
|
40
|
+
/** On-disk path, relative to the project root. Needed to tell `index.mdx` from a page. */
|
|
41
|
+
filePath?: string;
|
|
42
|
+
label: string;
|
|
43
|
+
icon?: string;
|
|
44
|
+
badge?: DocsBadge;
|
|
45
|
+
hidden?: boolean;
|
|
46
|
+
draft?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Extension point for generated sections (OpenAPI reference, changelogs, ...). */
|
|
49
|
+
export interface DocsPlugin {
|
|
50
|
+
name: string;
|
|
51
|
+
setup(ctx: DocsPluginContext): void | Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
export interface DocsPluginContext {
|
|
54
|
+
/** Push a top-level group into the sidebar. Appended after folder-derived nodes. */
|
|
55
|
+
addNavGroup(group: NavNode): void;
|
|
56
|
+
/** Merge entries into the route-level MDX component map. */
|
|
57
|
+
addMdxComponents(map: Record<string, unknown>): void;
|
|
58
|
+
/** Raw `astro:config:setup` params: injectRoute, updateConfig, addWatchFile, logger. */
|
|
59
|
+
astro: unknown;
|
|
60
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eqtylab/docs",
|
|
3
|
+
"description": "Astro documentation framework built on the Equality design system",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"homepage": "https://equality.eqtylab.io/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/eqtylab/equality.git",
|
|
10
|
+
"directory": "packages/docs"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"astro-integration",
|
|
15
|
+
"astro-component",
|
|
16
|
+
"withastro",
|
|
17
|
+
"documentation",
|
|
18
|
+
"docs"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./config": {
|
|
26
|
+
"types": "./dist/config.d.ts",
|
|
27
|
+
"default": "./dist/config.js"
|
|
28
|
+
},
|
|
29
|
+
"./env": {
|
|
30
|
+
"types": "./dist/env.d.ts",
|
|
31
|
+
"default": "./dist/env.js"
|
|
32
|
+
},
|
|
33
|
+
"./schema": {
|
|
34
|
+
"types": "./dist/schema.d.ts",
|
|
35
|
+
"default": "./dist/schema.js"
|
|
36
|
+
},
|
|
37
|
+
"./loaders": {
|
|
38
|
+
"types": "./dist/loaders.d.ts",
|
|
39
|
+
"default": "./dist/loaders.js"
|
|
40
|
+
},
|
|
41
|
+
"./nav": {
|
|
42
|
+
"types": "./dist/nav.d.ts",
|
|
43
|
+
"default": "./dist/nav.js"
|
|
44
|
+
},
|
|
45
|
+
"./paths": {
|
|
46
|
+
"types": "./dist/paths.d.ts",
|
|
47
|
+
"default": "./dist/paths.js"
|
|
48
|
+
},
|
|
49
|
+
"./types": {
|
|
50
|
+
"types": "./dist/types.d.ts",
|
|
51
|
+
"default": "./dist/types.js"
|
|
52
|
+
},
|
|
53
|
+
"./dev": {
|
|
54
|
+
"types": "./dist/dev.d.ts",
|
|
55
|
+
"default": "./dist/dev.js"
|
|
56
|
+
},
|
|
57
|
+
"./internal/rehype-base-url": {
|
|
58
|
+
"types": "./dist/internal/rehype-base-url.d.ts",
|
|
59
|
+
"default": "./dist/internal/rehype-base-url.js"
|
|
60
|
+
},
|
|
61
|
+
"./components": "./dist/runtime/components/index.ts",
|
|
62
|
+
"./components/*": "./dist/runtime/components/*",
|
|
63
|
+
"./chrome/*": "./dist/runtime/chrome/*",
|
|
64
|
+
"./layouts/*": "./dist/runtime/layouts/*",
|
|
65
|
+
"./routes/*": "./dist/runtime/routes/*",
|
|
66
|
+
"./scripts/*": "./dist/runtime/scripts/*",
|
|
67
|
+
"./styles.css": "./dist/runtime/styles/docs.css",
|
|
68
|
+
"./prose.css": "./dist/runtime/styles/prose.css",
|
|
69
|
+
"./theme.css": "./dist/runtime/styles/theme.css",
|
|
70
|
+
"./package.json": "./package.json"
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"dist",
|
|
74
|
+
"README.md"
|
|
75
|
+
],
|
|
76
|
+
"sideEffects": [
|
|
77
|
+
"**/*.css",
|
|
78
|
+
"**/runtime/scripts/*"
|
|
79
|
+
],
|
|
80
|
+
"engines": {
|
|
81
|
+
"node": ">=22.12"
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"registry": "https://registry.npmjs.org",
|
|
85
|
+
"access": "public"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"build": "pnpm run check:source && pnpm run build:node && pnpm run build:runtime && pnpm run build:types",
|
|
89
|
+
"build:node": "tsup",
|
|
90
|
+
"build:dev": "pnpm run build:node && pnpm run build:runtime",
|
|
91
|
+
"build:runtime": "node scripts/copy-runtime.mjs",
|
|
92
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
93
|
+
"dev": "node scripts/dev.mjs",
|
|
94
|
+
"check:source": "node scripts/check-tailwind-source.mjs",
|
|
95
|
+
"test": "node --test tests/*.test.ts",
|
|
96
|
+
"release": "pnpm run build && pnpm publish --access public --no-git-checks"
|
|
97
|
+
},
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@tailwindcss/vite": "^4.1.16",
|
|
100
|
+
"github-slugger": "^2.0.0",
|
|
101
|
+
"pagefind": "^1.5.2",
|
|
102
|
+
"tailwindcss": "^4.1.16",
|
|
103
|
+
"tinyglobby": "^0.2.15",
|
|
104
|
+
"unist-util-visit": "^5.1.0",
|
|
105
|
+
"yaml": "^2.8.2"
|
|
106
|
+
},
|
|
107
|
+
"peerDependencies": {
|
|
108
|
+
"@astrojs/mdx": "^5.0.2",
|
|
109
|
+
"@astrojs/react": "^5.0.1",
|
|
110
|
+
"@eqtylab/equality": ">=3.2.6 <5",
|
|
111
|
+
"astro": "^6.0.0",
|
|
112
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
113
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
114
|
+
},
|
|
115
|
+
"devDependencies": {
|
|
116
|
+
"@eqtylab/equality": "workspace:*",
|
|
117
|
+
"@types/node": "^24.9.2",
|
|
118
|
+
"@types/react": "^19.2.2",
|
|
119
|
+
"@types/react-dom": "^19.2.2",
|
|
120
|
+
"astro": "^6.0.8",
|
|
121
|
+
"react": "^19.2.0",
|
|
122
|
+
"react-dom": "^19.2.0",
|
|
123
|
+
"tsup": "^8.5.0",
|
|
124
|
+
"typescript": ">=5.4.x",
|
|
125
|
+
"vite": "^7.0.0"
|
|
126
|
+
}
|
|
127
|
+
}
|