specra 0.1.13 → 0.2.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/LICENSE.MD +25 -4
- package/README.md +67 -58
- package/config/specra.config.schema.json +16 -0
- package/config/svelte-config.js +63 -0
- package/dist/api-parser.types.d.ts +59 -0
- package/dist/api-parser.types.js +5 -0
- package/dist/api.types.d.ts +137 -0
- package/dist/api.types.js +5 -0
- package/dist/category.d.ts +21 -0
- package/dist/category.js +48 -0
- package/dist/components/ConfigProvider.svelte +13 -0
- package/dist/components/ConfigProvider.svelte.d.ts +31 -0
- package/dist/components/docs/Accordion.svelte +18 -0
- package/dist/components/docs/Accordion.svelte.d.ts +10 -0
- package/dist/components/docs/AccordionItem.svelte +41 -0
- package/dist/components/docs/AccordionItem.svelte.d.ts +10 -0
- package/dist/components/docs/Badge.svelte +28 -0
- package/dist/components/docs/Badge.svelte.d.ts +9 -0
- package/dist/components/docs/Breadcrumb.svelte +80 -0
- package/dist/components/docs/Breadcrumb.svelte.d.ts +8 -0
- package/dist/components/docs/Callout.svelte +96 -0
- package/dist/components/docs/Callout.svelte.d.ts +10 -0
- package/dist/components/docs/Card.svelte +63 -0
- package/dist/components/docs/Card.svelte.d.ts +12 -0
- package/dist/components/docs/CardGrid.svelte +24 -0
- package/dist/components/docs/CardGrid.svelte.d.ts +8 -0
- package/dist/components/docs/CategoryIndex.svelte +110 -0
- package/dist/components/docs/CategoryIndex.svelte.d.ts +29 -0
- package/dist/components/docs/CodeBlock.svelte +172 -0
- package/dist/components/docs/CodeBlock.svelte.d.ts +8 -0
- package/dist/components/docs/Column.svelte +25 -0
- package/dist/components/docs/Column.svelte.d.ts +8 -0
- package/dist/components/docs/Columns.svelte +38 -0
- package/dist/components/docs/Columns.svelte.d.ts +13 -0
- package/dist/components/docs/DevModeBadge.svelte +15 -0
- package/dist/components/docs/DevModeBadge.svelte.d.ts +18 -0
- package/dist/components/docs/DocBadge.svelte +28 -0
- package/dist/components/docs/DocBadge.svelte.d.ts +9 -0
- package/dist/components/docs/DocLayout.svelte +107 -0
- package/dist/components/docs/DocLayout.svelte.d.ts +32 -0
- package/dist/components/docs/DocLoading.svelte +53 -0
- package/dist/components/docs/DocLoading.svelte.d.ts +18 -0
- package/dist/components/docs/DocMetadata.svelte +106 -0
- package/dist/components/docs/DocMetadata.svelte.d.ts +18 -0
- package/dist/components/docs/DocNavigation.svelte +56 -0
- package/dist/components/docs/DocNavigation.svelte.d.ts +12 -0
- package/dist/components/docs/DocTags.svelte +22 -0
- package/dist/components/docs/DocTags.svelte.d.ts +6 -0
- package/dist/components/docs/DraftBadge.svelte +10 -0
- package/dist/components/docs/DraftBadge.svelte.d.ts +18 -0
- package/dist/components/docs/Footer.svelte +72 -0
- package/dist/components/docs/Footer.svelte.d.ts +7 -0
- package/dist/components/docs/Frame.svelte +27 -0
- package/dist/components/docs/Frame.svelte.d.ts +9 -0
- package/dist/components/docs/Header.svelte +123 -0
- package/dist/components/docs/Header.svelte.d.ts +9 -0
- package/dist/components/docs/HeaderWithMenu.svelte +34 -0
- package/dist/components/docs/HeaderWithMenu.svelte.d.ts +17 -0
- package/dist/components/docs/HotReloadIndicator.svelte +44 -0
- package/dist/components/docs/HotReloadIndicator.svelte.d.ts +3 -0
- package/dist/components/docs/Icon.svelte +103 -0
- package/dist/components/docs/Icon.svelte.d.ts +11 -0
- package/dist/components/docs/Image.svelte +88 -0
- package/dist/components/docs/Image.svelte.d.ts +11 -0
- package/dist/components/docs/ImageCard.svelte +91 -0
- package/dist/components/docs/ImageCard.svelte.d.ts +12 -0
- package/dist/components/docs/ImageCardGrid.svelte +25 -0
- package/dist/components/docs/ImageCardGrid.svelte.d.ts +8 -0
- package/dist/components/docs/LayoutProviders.svelte +57 -0
- package/dist/components/docs/LayoutProviders.svelte.d.ts +9 -0
- package/dist/components/docs/Logo.svelte +25 -0
- package/dist/components/docs/Logo.svelte.d.ts +11 -0
- package/dist/components/docs/Math.svelte +54 -0
- package/dist/components/docs/Math.svelte.d.ts +7 -0
- package/dist/components/docs/MdxContent.svelte +41 -0
- package/dist/components/docs/MdxHotReload.svelte +78 -0
- package/dist/components/docs/MdxHotReload.svelte.d.ts +9 -0
- package/dist/components/docs/MdxLayout.svelte +16 -0
- package/dist/components/docs/MdxLayout.svelte.d.ts +6 -0
- package/dist/components/docs/Mermaid.svelte +88 -0
- package/dist/components/docs/Mermaid.svelte.d.ts +7 -0
- package/dist/components/docs/MobileDocLayout.svelte +211 -0
- package/dist/components/docs/MobileDocLayout.svelte.d.ts +35 -0
- package/dist/components/docs/MobileSidebar.svelte +122 -0
- package/dist/components/docs/MobileSidebar.svelte.d.ts +31 -0
- package/dist/components/docs/MobileSidebarWrapper.svelte +122 -0
- package/dist/components/docs/MobileSidebarWrapper.svelte.d.ts +32 -0
- package/dist/components/docs/NotFoundContent.svelte +40 -0
- package/dist/components/docs/NotFoundContent.svelte.d.ts +6 -0
- package/dist/components/docs/SearchHighlight.svelte +116 -0
- package/dist/components/docs/SearchHighlight.svelte.d.ts +3 -0
- package/dist/components/docs/SearchModal.svelte +239 -0
- package/dist/components/docs/SearchModal.svelte.d.ts +9 -0
- package/dist/components/docs/Sidebar.svelte +69 -0
- package/dist/components/docs/Sidebar.svelte.d.ts +31 -0
- package/dist/components/docs/SidebarMenuItems.svelte +344 -0
- package/dist/components/docs/SidebarMenuItems.svelte.d.ts +33 -0
- package/dist/components/docs/SidebarSkeleton.svelte +50 -0
- package/dist/components/docs/SidebarSkeleton.svelte.d.ts +18 -0
- package/dist/components/docs/SiteBanner.svelte +92 -0
- package/dist/components/docs/SiteBanner.svelte.d.ts +7 -0
- package/dist/components/docs/Step.svelte +44 -0
- package/dist/components/docs/Step.svelte.d.ts +8 -0
- package/dist/components/docs/Steps.svelte +15 -0
- package/dist/components/docs/Steps.svelte.d.ts +7 -0
- package/dist/components/docs/Tab.svelte +40 -0
- package/dist/components/docs/Tab.svelte.d.ts +8 -0
- package/dist/components/docs/TabGroups.svelte +183 -0
- package/dist/components/docs/TabGroups.svelte.d.ts +25 -0
- package/dist/components/docs/TableOfContents.svelte +100 -0
- package/dist/components/docs/TableOfContents.svelte.d.ts +9 -0
- package/dist/components/docs/Tabs.svelte +69 -0
- package/dist/components/docs/Tabs.svelte.d.ts +8 -0
- package/dist/components/docs/ThemeToggle.svelte +16 -0
- package/dist/components/docs/ThemeToggle.svelte.d.ts +18 -0
- package/dist/components/docs/Tooltip.svelte +44 -0
- package/dist/components/docs/Tooltip.svelte.d.ts +10 -0
- package/dist/components/docs/VersionSwitcher.svelte +95 -0
- package/dist/components/docs/VersionSwitcher.svelte.d.ts +7 -0
- package/dist/components/docs/Video.svelte +84 -0
- package/dist/components/docs/Video.svelte.d.ts +12 -0
- package/dist/components/docs/api/ApiEndpoint.svelte +61 -0
- package/dist/components/docs/api/ApiEndpoint.svelte.d.ts +11 -0
- package/dist/components/docs/api/ApiParams.svelte +80 -0
- package/dist/components/docs/api/ApiParams.svelte.d.ts +14 -0
- package/dist/components/docs/api/ApiPlayground.svelte +259 -0
- package/dist/components/docs/api/ApiPlayground.svelte.d.ts +16 -0
- package/dist/components/docs/api/ApiReference.svelte +278 -0
- package/dist/components/docs/api/ApiReference.svelte.d.ts +23 -0
- package/dist/components/docs/api/ApiResponse.svelte +66 -0
- package/dist/components/docs/api/ApiResponse.svelte.d.ts +9 -0
- package/dist/components/docs/api/index.d.ts +5 -0
- package/dist/components/docs/api/index.js +5 -0
- package/dist/components/docs/componentTextProps.d.ts +3 -0
- package/dist/components/docs/componentTextProps.js +61 -0
- package/dist/components/docs/index.d.ts +54 -0
- package/dist/components/docs/index.js +56 -0
- package/dist/components/global/VersionNotFound.svelte +48 -0
- package/dist/components/global/VersionNotFound.svelte.d.ts +7 -0
- package/dist/components/global/index.d.ts +1 -0
- package/dist/components/global/index.js +1 -0
- package/dist/components/index.d.ts +6 -822
- package/dist/components/index.js +11 -3854
- package/dist/components/ui/Badge.svelte +48 -0
- package/dist/components/ui/Badge.svelte.d.ts +15 -0
- package/dist/components/ui/Button.svelte +58 -0
- package/dist/components/ui/Button.svelte.d.ts +17 -0
- package/dist/components/ui/Dialog.svelte +16 -0
- package/dist/components/ui/Dialog.svelte.d.ts +9 -0
- package/dist/components/ui/DialogClose.svelte +16 -0
- package/dist/components/ui/DialogClose.svelte.d.ts +9 -0
- package/dist/components/ui/DialogContent.svelte +43 -0
- package/dist/components/ui/DialogContent.svelte.d.ts +10 -0
- package/dist/components/ui/DialogDescription.svelte +21 -0
- package/dist/components/ui/DialogDescription.svelte.d.ts +9 -0
- package/dist/components/ui/DialogFooter.svelte +20 -0
- package/dist/components/ui/DialogFooter.svelte.d.ts +9 -0
- package/dist/components/ui/DialogHeader.svelte +20 -0
- package/dist/components/ui/DialogHeader.svelte.d.ts +9 -0
- package/dist/components/ui/DialogTitle.svelte +21 -0
- package/dist/components/ui/DialogTitle.svelte.d.ts +9 -0
- package/dist/components/ui/Input.svelte +23 -0
- package/dist/components/ui/Input.svelte.d.ts +8 -0
- package/dist/components/ui/Textarea.svelte +19 -0
- package/dist/components/ui/Textarea.svelte.d.ts +7 -0
- package/dist/components/ui/index.d.ts +11 -0
- package/dist/components/ui/index.js +11 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.js +9 -0
- package/dist/config.schema.json +471 -0
- package/dist/config.server.d.ts +46 -0
- package/dist/config.server.js +149 -0
- package/dist/{mdx-ColN3Cyg.d.mts → config.types.d.ts} +22 -75
- package/dist/config.types.js +39 -0
- package/dist/dev-utils.d.ts +29 -0
- package/dist/dev-utils.js +63 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.js +25 -4861
- package/dist/mdx-cache.d.ts +41 -0
- package/dist/mdx-cache.js +160 -0
- package/dist/mdx-components.js +50 -1931
- package/dist/mdx-security.d.ts +76 -0
- package/dist/mdx-security.js +217 -0
- package/dist/mdx.d.ts +73 -0
- package/dist/mdx.js +1099 -0
- package/dist/middleware/index.d.ts +1 -0
- package/dist/middleware/index.js +2 -0
- package/dist/middleware/security.d.ts +22 -47
- package/dist/middleware/security.js +111 -137
- package/dist/parsers/base-parser.d.ts +14 -0
- package/dist/parsers/base-parser.js +1 -0
- package/dist/parsers/index.d.ts +16 -0
- package/dist/parsers/index.js +51 -0
- package/dist/parsers/openapi-parser.d.ts +18 -0
- package/dist/parsers/openapi-parser.js +209 -0
- package/dist/parsers/postman-parser.d.ts +20 -0
- package/dist/parsers/postman-parser.js +260 -0
- package/dist/parsers/specra-parser.d.ts +10 -0
- package/dist/parsers/specra-parser.js +18 -0
- package/dist/redirects.d.ts +12 -0
- package/dist/redirects.js +30 -0
- package/dist/remark-code-meta.d.ts +6 -0
- package/dist/remark-code-meta.js +21 -0
- package/dist/sidebar-utils.d.ts +59 -0
- package/dist/sidebar-utils.js +144 -0
- package/dist/stores/config.d.ts +20 -0
- package/dist/stores/config.js +45 -0
- package/dist/stores/index.d.ts +4 -0
- package/dist/stores/index.js +4 -0
- package/dist/stores/sidebar.d.ts +7 -0
- package/dist/stores/sidebar.js +12 -0
- package/dist/stores/tabs.d.ts +6 -0
- package/dist/stores/tabs.js +41 -0
- package/dist/stores/theme.d.ts +7 -0
- package/dist/stores/theme.js +75 -0
- package/dist/{styles.css → styles/globals.css} +136 -6
- package/dist/toc.d.ts +9 -0
- package/dist/toc.js +15 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +30 -0
- package/package.json +47 -90
- package/dist/app/api/mdx-watch/route.d.mts +0 -10
- package/dist/app/api/mdx-watch/route.d.ts +0 -10
- package/dist/app/api/mdx-watch/route.js +0 -118
- package/dist/app/api/mdx-watch/route.js.map +0 -1
- package/dist/app/api/mdx-watch/route.mjs +0 -91
- package/dist/app/api/mdx-watch/route.mjs.map +0 -1
- package/dist/chunk-6S3EJVEO.mjs +0 -259
- package/dist/chunk-6S3EJVEO.mjs.map +0 -1
- package/dist/chunk-BE7EROIW.mjs +0 -212
- package/dist/chunk-BE7EROIW.mjs.map +0 -1
- package/dist/chunk-CWHRZHZO.mjs +0 -168
- package/dist/chunk-CWHRZHZO.mjs.map +0 -1
- package/dist/chunk-D5VDVYFY.mjs +0 -1325
- package/dist/chunk-D5VDVYFY.mjs.map +0 -1
- package/dist/chunk-WMCO2UX5.mjs +0 -585
- package/dist/chunk-WMCO2UX5.mjs.map +0 -1
- package/dist/chunk-XEMGCPZZ.mjs +0 -475
- package/dist/chunk-XEMGCPZZ.mjs.map +0 -1
- package/dist/components/index.d.mts +0 -822
- package/dist/components/index.js.map +0 -1
- package/dist/components/index.mjs +0 -3741
- package/dist/components/index.mjs.map +0 -1
- package/dist/index.d.mts +0 -4
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1897
- package/dist/index.mjs.map +0 -1
- package/dist/layouts/index.d.mts +0 -34
- package/dist/layouts/index.d.ts +0 -34
- package/dist/layouts/index.js +0 -453
- package/dist/layouts/index.js.map +0 -1
- package/dist/layouts/index.mjs +0 -173
- package/dist/layouts/index.mjs.map +0 -1
- package/dist/lib/index.d.mts +0 -583
- package/dist/lib/index.d.ts +0 -583
- package/dist/lib/index.js +0 -1595
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/index.mjs +0 -111
- package/dist/lib/index.mjs.map +0 -1
- package/dist/mdx-ColN3Cyg.d.ts +0 -352
- package/dist/mdx-components.d.mts +0 -86
- package/dist/mdx-components.d.ts +0 -86
- package/dist/mdx-components.js.map +0 -1
- package/dist/mdx-components.mjs +0 -206
- package/dist/mdx-components.mjs.map +0 -1
- package/dist/middleware/security.d.mts +0 -82
- package/dist/middleware/security.js.map +0 -1
- package/dist/middleware/security.mjs +0 -84
- package/dist/middleware/security.mjs.map +0 -1
- package/dist/styles.css.map +0 -1
- package/dist/styles.d.mts +0 -2
- package/dist/styles.d.ts +0 -2
- package/dist/styles.js +0 -2
- package/dist/styles.js.map +0 -1
- package/dist/styles.mjs +0 -1
- package/dist/styles.mjs.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Site metadata and branding
|
|
6
6
|
*/
|
|
7
|
-
interface SiteConfig {
|
|
7
|
+
export interface SiteConfig {
|
|
8
8
|
/** The title of the documentation site */
|
|
9
9
|
title: string;
|
|
10
10
|
/** Short description of the documentation */
|
|
@@ -32,11 +32,13 @@ interface SiteConfig {
|
|
|
32
32
|
hideTitle?: boolean;
|
|
33
33
|
/** Whether to hide the site logo in the header */
|
|
34
34
|
hideLogo?: boolean;
|
|
35
|
+
/** Project ID to tie this doc site to a Specra project for visitor tracking */
|
|
36
|
+
projectId?: string;
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* Theme and appearance settings
|
|
38
40
|
*/
|
|
39
|
-
interface ThemeConfig {
|
|
41
|
+
export interface ThemeConfig {
|
|
40
42
|
/** Primary color for the theme */
|
|
41
43
|
primaryColor?: string;
|
|
42
44
|
/** Default theme mode */
|
|
@@ -49,7 +51,7 @@ interface ThemeConfig {
|
|
|
49
51
|
/**
|
|
50
52
|
* Tab group for organizing documentation
|
|
51
53
|
*/
|
|
52
|
-
interface TabGroup {
|
|
54
|
+
export interface TabGroup {
|
|
53
55
|
/** Unique identifier for the tab group */
|
|
54
56
|
id: string;
|
|
55
57
|
/** Display label for the tab */
|
|
@@ -60,7 +62,7 @@ interface TabGroup {
|
|
|
60
62
|
/**
|
|
61
63
|
* Navigation and sidebar configuration
|
|
62
64
|
*/
|
|
63
|
-
interface NavigationConfig {
|
|
65
|
+
export interface NavigationConfig {
|
|
64
66
|
/** Whether to show the sidebar by default */
|
|
65
67
|
showSidebar?: boolean;
|
|
66
68
|
/** Whether the sidebar is collapsible */
|
|
@@ -75,11 +77,13 @@ interface NavigationConfig {
|
|
|
75
77
|
tocMaxDepth?: number;
|
|
76
78
|
/** Tab groups for organizing documentation sections */
|
|
77
79
|
tabGroups?: TabGroup[];
|
|
80
|
+
/** Sidebar visual style: "card" (rounded container) or "flush" (attached to screen edge) */
|
|
81
|
+
sidebarStyle?: "card" | "flush";
|
|
78
82
|
}
|
|
79
83
|
/**
|
|
80
84
|
* Social and external links
|
|
81
85
|
*/
|
|
82
|
-
interface SocialLinks {
|
|
86
|
+
export interface SocialLinks {
|
|
83
87
|
/** GitHub repository URL */
|
|
84
88
|
github?: string;
|
|
85
89
|
/** Twitter/X handle or URL */
|
|
@@ -100,7 +104,7 @@ interface SocialLinks {
|
|
|
100
104
|
/**
|
|
101
105
|
* Search configuration
|
|
102
106
|
*/
|
|
103
|
-
interface SearchConfig {
|
|
107
|
+
export interface SearchConfig {
|
|
104
108
|
/** Enable/disable search functionality */
|
|
105
109
|
enabled?: boolean;
|
|
106
110
|
/** Placeholder text for search input */
|
|
@@ -120,7 +124,7 @@ interface SearchConfig {
|
|
|
120
124
|
/**
|
|
121
125
|
* Analytics configuration
|
|
122
126
|
*/
|
|
123
|
-
interface AnalyticsConfig {
|
|
127
|
+
export interface AnalyticsConfig {
|
|
124
128
|
/** Google Analytics tracking ID */
|
|
125
129
|
googleAnalytics?: string;
|
|
126
130
|
/** Google Tag Manager ID */
|
|
@@ -137,7 +141,7 @@ interface AnalyticsConfig {
|
|
|
137
141
|
/**
|
|
138
142
|
* Footer branding configuration
|
|
139
143
|
*/
|
|
140
|
-
interface FooterBranding {
|
|
144
|
+
export interface FooterBranding {
|
|
141
145
|
/** Whether to show the branding */
|
|
142
146
|
showBranding?: boolean;
|
|
143
147
|
/** Logo for the branding - can be a string or an object with light/dark variants */
|
|
@@ -153,7 +157,7 @@ interface FooterBranding {
|
|
|
153
157
|
/**
|
|
154
158
|
* Footer configuration
|
|
155
159
|
*/
|
|
156
|
-
interface FooterConfig {
|
|
160
|
+
export interface FooterConfig {
|
|
157
161
|
/** Copyright text */
|
|
158
162
|
copyright?: string;
|
|
159
163
|
/** Footer links organized by columns */
|
|
@@ -172,7 +176,7 @@ interface FooterConfig {
|
|
|
172
176
|
/**
|
|
173
177
|
* Documentation features
|
|
174
178
|
*/
|
|
175
|
-
interface FeaturesConfig {
|
|
179
|
+
export interface FeaturesConfig {
|
|
176
180
|
/**
|
|
177
181
|
* Enable/disable edit this page links.
|
|
178
182
|
* Provide a URL template (e.g., "https://github.com/user/repo/edit/main/docs") or false to disable
|
|
@@ -188,6 +192,8 @@ interface FeaturesConfig {
|
|
|
188
192
|
showTags?: boolean;
|
|
189
193
|
/** Enable version dropdown */
|
|
190
194
|
versioning?: boolean;
|
|
195
|
+
/** Show version badge in the sidebar */
|
|
196
|
+
showVersionBadge?: boolean;
|
|
191
197
|
/**
|
|
192
198
|
* Internationalization (i18n) configuration
|
|
193
199
|
* Set to true to enable with defaults, or provide configuration object
|
|
@@ -197,7 +203,7 @@ interface FeaturesConfig {
|
|
|
197
203
|
/**
|
|
198
204
|
* Internationalization configuration
|
|
199
205
|
*/
|
|
200
|
-
interface I18nConfig {
|
|
206
|
+
export interface I18nConfig {
|
|
201
207
|
/** The default locale (e.g. 'en') - used when no locale is present in URL */
|
|
202
208
|
defaultLocale: string;
|
|
203
209
|
/** List of supported locales (e.g. ['en', 'fr', 'es']) */
|
|
@@ -210,7 +216,7 @@ interface I18nConfig {
|
|
|
210
216
|
/**
|
|
211
217
|
* Site-wide banner configuration
|
|
212
218
|
*/
|
|
213
|
-
interface BannerConfig {
|
|
219
|
+
export interface BannerConfig {
|
|
214
220
|
/** Whether the banner is enabled */
|
|
215
221
|
enabled?: boolean;
|
|
216
222
|
/** Banner message */
|
|
@@ -224,7 +230,7 @@ interface BannerConfig {
|
|
|
224
230
|
* Environment variables that can be used in documentation
|
|
225
231
|
* These will be replaced at build time or runtime
|
|
226
232
|
*/
|
|
227
|
-
interface EnvironmentVariables {
|
|
233
|
+
export interface EnvironmentVariables {
|
|
228
234
|
/** API base URL */
|
|
229
235
|
API_BASE_URL?: string;
|
|
230
236
|
/** API version */
|
|
@@ -237,7 +243,7 @@ interface EnvironmentVariables {
|
|
|
237
243
|
/**
|
|
238
244
|
* Deployment configuration for different hosting scenarios
|
|
239
245
|
*/
|
|
240
|
-
interface DeploymentConfig {
|
|
246
|
+
export interface DeploymentConfig {
|
|
241
247
|
/**
|
|
242
248
|
* Deployment target
|
|
243
249
|
* - 'vercel': For Vercel or similar Node.js hosting (uses 'standalone' output)
|
|
@@ -261,7 +267,7 @@ interface DeploymentConfig {
|
|
|
261
267
|
/**
|
|
262
268
|
* Main configuration interface
|
|
263
269
|
*/
|
|
264
|
-
interface SpecraConfig {
|
|
270
|
+
export interface SpecraConfig {
|
|
265
271
|
/** JSON Schema reference (for IDE support) */
|
|
266
272
|
$schema?: string;
|
|
267
273
|
/** Site metadata and branding */
|
|
@@ -290,63 +296,4 @@ interface SpecraConfig {
|
|
|
290
296
|
/**
|
|
291
297
|
* Default configuration values
|
|
292
298
|
*/
|
|
293
|
-
declare const defaultConfig: SpecraConfig;
|
|
294
|
-
|
|
295
|
-
interface DocMeta {
|
|
296
|
-
title: string;
|
|
297
|
-
description?: string;
|
|
298
|
-
slug?: string;
|
|
299
|
-
section?: string;
|
|
300
|
-
group?: string;
|
|
301
|
-
sidebar?: string;
|
|
302
|
-
order?: number;
|
|
303
|
-
sidebar_position?: number;
|
|
304
|
-
content?: string;
|
|
305
|
-
last_updated?: string;
|
|
306
|
-
draft?: boolean;
|
|
307
|
-
authors?: Array<{
|
|
308
|
-
id: string;
|
|
309
|
-
name?: string;
|
|
310
|
-
}>;
|
|
311
|
-
tags?: string[];
|
|
312
|
-
redirect_from?: string[];
|
|
313
|
-
reading_time?: number;
|
|
314
|
-
word_count?: number;
|
|
315
|
-
icon?: string;
|
|
316
|
-
tab_group?: string;
|
|
317
|
-
locale?: string;
|
|
318
|
-
}
|
|
319
|
-
interface Doc {
|
|
320
|
-
slug: string;
|
|
321
|
-
filePath: string;
|
|
322
|
-
title: string;
|
|
323
|
-
meta: DocMeta;
|
|
324
|
-
content: string;
|
|
325
|
-
categoryLabel?: string;
|
|
326
|
-
categoryPosition?: number;
|
|
327
|
-
categoryCollapsible?: boolean;
|
|
328
|
-
categoryCollapsed?: boolean;
|
|
329
|
-
categoryIcon?: string;
|
|
330
|
-
categoryTabGroup?: string;
|
|
331
|
-
locale?: string;
|
|
332
|
-
}
|
|
333
|
-
interface TocItem {
|
|
334
|
-
id: string;
|
|
335
|
-
title: string;
|
|
336
|
-
level: number;
|
|
337
|
-
}
|
|
338
|
-
declare function getVersions(): string[];
|
|
339
|
-
declare function getI18nConfig(): I18nConfig | null;
|
|
340
|
-
declare function getDocBySlug(slug: string, version?: string, locale?: string): Promise<Doc | null>;
|
|
341
|
-
declare function getAllDocs(version?: string, locale?: string): Promise<Doc[]>;
|
|
342
|
-
declare function getAdjacentDocs(currentSlug: string, allDocs: Doc[]): {
|
|
343
|
-
previous?: Doc;
|
|
344
|
-
next?: Doc;
|
|
345
|
-
};
|
|
346
|
-
declare function extractTableOfContents(content: string): TocItem[];
|
|
347
|
-
/**
|
|
348
|
-
* Check if a slug represents a category (has child documents)
|
|
349
|
-
*/
|
|
350
|
-
declare function isCategoryPage(slug: string, allDocs: Doc[]): boolean;
|
|
351
|
-
|
|
352
|
-
export { type AnalyticsConfig as A, type BannerConfig as B, type DocMeta as D, type EnvironmentVariables as E, type FooterBranding as F, type I18nConfig as I, type NavigationConfig as N, type SpecraConfig as S, type TocItem as T, type Doc as a, getI18nConfig as b, getDocBySlug as c, getAllDocs as d, getAdjacentDocs as e, extractTableOfContents as f, getVersions as g, defaultConfig as h, isCategoryPage as i, type SiteConfig as j, type ThemeConfig as k, type TabGroup as l, type SocialLinks as m, type SearchConfig as n, type FooterConfig as o, type FeaturesConfig as p, type DeploymentConfig as q };
|
|
299
|
+
export declare const defaultConfig: SpecraConfig;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration schema for Specra documentation system
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Default configuration values
|
|
6
|
+
*/
|
|
7
|
+
export const defaultConfig = {
|
|
8
|
+
site: {
|
|
9
|
+
title: "Documentation",
|
|
10
|
+
description: "Project documentation",
|
|
11
|
+
baseUrl: "/",
|
|
12
|
+
language: "en",
|
|
13
|
+
},
|
|
14
|
+
theme: {
|
|
15
|
+
defaultMode: "system",
|
|
16
|
+
respectPrefersColorScheme: true,
|
|
17
|
+
},
|
|
18
|
+
navigation: {
|
|
19
|
+
showSidebar: true,
|
|
20
|
+
collapsibleSidebar: true,
|
|
21
|
+
showBreadcrumbs: true,
|
|
22
|
+
showTableOfContents: true,
|
|
23
|
+
tocPosition: "right",
|
|
24
|
+
tocMaxDepth: 3,
|
|
25
|
+
},
|
|
26
|
+
search: {
|
|
27
|
+
enabled: true,
|
|
28
|
+
provider: "local",
|
|
29
|
+
placeholder: "Search documentation...",
|
|
30
|
+
},
|
|
31
|
+
features: {
|
|
32
|
+
showLastUpdated: true,
|
|
33
|
+
showReadingTime: true,
|
|
34
|
+
showAuthors: false,
|
|
35
|
+
showTags: true,
|
|
36
|
+
versioning: true,
|
|
37
|
+
i18n: false,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development utilities for debugging and performance monitoring
|
|
3
|
+
* Only active in development mode
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Performance timer for measuring operation duration
|
|
7
|
+
*/
|
|
8
|
+
export declare class PerfTimer {
|
|
9
|
+
private startTime;
|
|
10
|
+
private label;
|
|
11
|
+
constructor(label: string);
|
|
12
|
+
end(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Log file system operations
|
|
16
|
+
*/
|
|
17
|
+
export declare function logFsOperation(operation: string, path: string, details?: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Log cache operations
|
|
20
|
+
*/
|
|
21
|
+
export declare function logCacheOperation(operation: 'hit' | 'miss' | 'invalidate', key: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Memory usage reporter
|
|
24
|
+
*/
|
|
25
|
+
export declare function logMemoryUsage(label?: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Pretty print object for debugging
|
|
28
|
+
*/
|
|
29
|
+
export declare function debugLog(label: string, data: any): void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Development utilities for debugging and performance monitoring
|
|
3
|
+
* Only active in development mode
|
|
4
|
+
*/
|
|
5
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
6
|
+
/**
|
|
7
|
+
* Performance timer for measuring operation duration
|
|
8
|
+
*/
|
|
9
|
+
export class PerfTimer {
|
|
10
|
+
constructor(label) {
|
|
11
|
+
this.label = label;
|
|
12
|
+
this.startTime = isDevelopment ? performance.now() : 0;
|
|
13
|
+
}
|
|
14
|
+
end() {
|
|
15
|
+
if (!isDevelopment)
|
|
16
|
+
return;
|
|
17
|
+
const duration = performance.now() - this.startTime;
|
|
18
|
+
const color = duration > 1000 ? '\x1b[31m' : duration > 500 ? '\x1b[33m' : '\x1b[32m';
|
|
19
|
+
const reset = '\x1b[0m';
|
|
20
|
+
console.log(`${color}⏱️ ${this.label}: ${duration.toFixed(2)}ms${reset}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Log file system operations
|
|
25
|
+
*/
|
|
26
|
+
export function logFsOperation(operation, path, details) {
|
|
27
|
+
if (!isDevelopment)
|
|
28
|
+
return;
|
|
29
|
+
console.log(`📁 [FS] ${operation}: ${path}`, details || '');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Log cache operations
|
|
33
|
+
*/
|
|
34
|
+
export function logCacheOperation(operation, key) {
|
|
35
|
+
if (!isDevelopment)
|
|
36
|
+
return;
|
|
37
|
+
const emoji = operation === 'hit' ? '✅' : operation === 'miss' ? '❌' : '🔄';
|
|
38
|
+
console.log(`${emoji} [Cache] ${operation}: ${key}`);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Memory usage reporter
|
|
42
|
+
*/
|
|
43
|
+
export function logMemoryUsage(label) {
|
|
44
|
+
if (!isDevelopment)
|
|
45
|
+
return;
|
|
46
|
+
const used = process.memoryUsage();
|
|
47
|
+
const prefix = label ? `[${label}] ` : '';
|
|
48
|
+
console.log(`💾 ${prefix}Memory Usage:`, {
|
|
49
|
+
rss: `${Math.round(used.rss / 1024 / 1024)}MB`,
|
|
50
|
+
heapTotal: `${Math.round(used.heapTotal / 1024 / 1024)}MB`,
|
|
51
|
+
heapUsed: `${Math.round(used.heapUsed / 1024 / 1024)}MB`,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Pretty print object for debugging
|
|
56
|
+
*/
|
|
57
|
+
export function debugLog(label, data) {
|
|
58
|
+
if (!isDevelopment)
|
|
59
|
+
return;
|
|
60
|
+
console.log(`\n🔍 ${label}:`);
|
|
61
|
+
console.dir(data, { depth: null, colors: true });
|
|
62
|
+
console.log('');
|
|
63
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from './components
|
|
4
|
-
|
|
1
|
+
export * from './components/index.js';
|
|
2
|
+
export * from './stores/index.js';
|
|
3
|
+
export * from './mdx-components.js';
|
|
4
|
+
export * from './mdx.js';
|
|
5
|
+
export * from './mdx-cache.js';
|
|
6
|
+
export * from './toc.js';
|
|
7
|
+
export * from './config.server.js';
|
|
8
|
+
export * from './config.js';
|
|
9
|
+
export type * from './config.types.js';
|
|
10
|
+
export * from './parsers/index.js';
|
|
11
|
+
export type * from './api.types.js';
|
|
12
|
+
export type { ApiParam, ApiHeader, ApiResponse as SpecraApiResponse, ApiEndpointSpec, SpecraApiSpec } from './api-parser.types.js';
|
|
13
|
+
export * from './utils.js';
|
|
14
|
+
export * from './sidebar-utils.js';
|
|
15
|
+
export * from './category.js';
|
|
16
|
+
export * from './redirects.js';
|
|
17
|
+
export * from './dev-utils.js';
|
|
18
|
+
export * from './mdx-security.js';
|
|
19
|
+
export * from './middleware/index.js';
|