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.
Files changed (276) hide show
  1. package/LICENSE.MD +25 -4
  2. package/README.md +67 -58
  3. package/config/specra.config.schema.json +16 -0
  4. package/config/svelte-config.js +63 -0
  5. package/dist/api-parser.types.d.ts +59 -0
  6. package/dist/api-parser.types.js +5 -0
  7. package/dist/api.types.d.ts +137 -0
  8. package/dist/api.types.js +5 -0
  9. package/dist/category.d.ts +21 -0
  10. package/dist/category.js +48 -0
  11. package/dist/components/ConfigProvider.svelte +13 -0
  12. package/dist/components/ConfigProvider.svelte.d.ts +31 -0
  13. package/dist/components/docs/Accordion.svelte +18 -0
  14. package/dist/components/docs/Accordion.svelte.d.ts +10 -0
  15. package/dist/components/docs/AccordionItem.svelte +41 -0
  16. package/dist/components/docs/AccordionItem.svelte.d.ts +10 -0
  17. package/dist/components/docs/Badge.svelte +28 -0
  18. package/dist/components/docs/Badge.svelte.d.ts +9 -0
  19. package/dist/components/docs/Breadcrumb.svelte +80 -0
  20. package/dist/components/docs/Breadcrumb.svelte.d.ts +8 -0
  21. package/dist/components/docs/Callout.svelte +96 -0
  22. package/dist/components/docs/Callout.svelte.d.ts +10 -0
  23. package/dist/components/docs/Card.svelte +63 -0
  24. package/dist/components/docs/Card.svelte.d.ts +12 -0
  25. package/dist/components/docs/CardGrid.svelte +24 -0
  26. package/dist/components/docs/CardGrid.svelte.d.ts +8 -0
  27. package/dist/components/docs/CategoryIndex.svelte +110 -0
  28. package/dist/components/docs/CategoryIndex.svelte.d.ts +29 -0
  29. package/dist/components/docs/CodeBlock.svelte +172 -0
  30. package/dist/components/docs/CodeBlock.svelte.d.ts +8 -0
  31. package/dist/components/docs/Column.svelte +25 -0
  32. package/dist/components/docs/Column.svelte.d.ts +8 -0
  33. package/dist/components/docs/Columns.svelte +38 -0
  34. package/dist/components/docs/Columns.svelte.d.ts +13 -0
  35. package/dist/components/docs/DevModeBadge.svelte +15 -0
  36. package/dist/components/docs/DevModeBadge.svelte.d.ts +18 -0
  37. package/dist/components/docs/DocBadge.svelte +28 -0
  38. package/dist/components/docs/DocBadge.svelte.d.ts +9 -0
  39. package/dist/components/docs/DocLayout.svelte +107 -0
  40. package/dist/components/docs/DocLayout.svelte.d.ts +32 -0
  41. package/dist/components/docs/DocLoading.svelte +53 -0
  42. package/dist/components/docs/DocLoading.svelte.d.ts +18 -0
  43. package/dist/components/docs/DocMetadata.svelte +106 -0
  44. package/dist/components/docs/DocMetadata.svelte.d.ts +18 -0
  45. package/dist/components/docs/DocNavigation.svelte +56 -0
  46. package/dist/components/docs/DocNavigation.svelte.d.ts +12 -0
  47. package/dist/components/docs/DocTags.svelte +22 -0
  48. package/dist/components/docs/DocTags.svelte.d.ts +6 -0
  49. package/dist/components/docs/DraftBadge.svelte +10 -0
  50. package/dist/components/docs/DraftBadge.svelte.d.ts +18 -0
  51. package/dist/components/docs/Footer.svelte +72 -0
  52. package/dist/components/docs/Footer.svelte.d.ts +7 -0
  53. package/dist/components/docs/Frame.svelte +27 -0
  54. package/dist/components/docs/Frame.svelte.d.ts +9 -0
  55. package/dist/components/docs/Header.svelte +123 -0
  56. package/dist/components/docs/Header.svelte.d.ts +9 -0
  57. package/dist/components/docs/HeaderWithMenu.svelte +34 -0
  58. package/dist/components/docs/HeaderWithMenu.svelte.d.ts +17 -0
  59. package/dist/components/docs/HotReloadIndicator.svelte +44 -0
  60. package/dist/components/docs/HotReloadIndicator.svelte.d.ts +3 -0
  61. package/dist/components/docs/Icon.svelte +103 -0
  62. package/dist/components/docs/Icon.svelte.d.ts +11 -0
  63. package/dist/components/docs/Image.svelte +88 -0
  64. package/dist/components/docs/Image.svelte.d.ts +11 -0
  65. package/dist/components/docs/ImageCard.svelte +91 -0
  66. package/dist/components/docs/ImageCard.svelte.d.ts +12 -0
  67. package/dist/components/docs/ImageCardGrid.svelte +25 -0
  68. package/dist/components/docs/ImageCardGrid.svelte.d.ts +8 -0
  69. package/dist/components/docs/LayoutProviders.svelte +57 -0
  70. package/dist/components/docs/LayoutProviders.svelte.d.ts +9 -0
  71. package/dist/components/docs/Logo.svelte +25 -0
  72. package/dist/components/docs/Logo.svelte.d.ts +11 -0
  73. package/dist/components/docs/Math.svelte +54 -0
  74. package/dist/components/docs/Math.svelte.d.ts +7 -0
  75. package/dist/components/docs/MdxContent.svelte +41 -0
  76. package/dist/components/docs/MdxHotReload.svelte +78 -0
  77. package/dist/components/docs/MdxHotReload.svelte.d.ts +9 -0
  78. package/dist/components/docs/MdxLayout.svelte +16 -0
  79. package/dist/components/docs/MdxLayout.svelte.d.ts +6 -0
  80. package/dist/components/docs/Mermaid.svelte +88 -0
  81. package/dist/components/docs/Mermaid.svelte.d.ts +7 -0
  82. package/dist/components/docs/MobileDocLayout.svelte +211 -0
  83. package/dist/components/docs/MobileDocLayout.svelte.d.ts +35 -0
  84. package/dist/components/docs/MobileSidebar.svelte +122 -0
  85. package/dist/components/docs/MobileSidebar.svelte.d.ts +31 -0
  86. package/dist/components/docs/MobileSidebarWrapper.svelte +122 -0
  87. package/dist/components/docs/MobileSidebarWrapper.svelte.d.ts +32 -0
  88. package/dist/components/docs/NotFoundContent.svelte +40 -0
  89. package/dist/components/docs/NotFoundContent.svelte.d.ts +6 -0
  90. package/dist/components/docs/SearchHighlight.svelte +116 -0
  91. package/dist/components/docs/SearchHighlight.svelte.d.ts +3 -0
  92. package/dist/components/docs/SearchModal.svelte +239 -0
  93. package/dist/components/docs/SearchModal.svelte.d.ts +9 -0
  94. package/dist/components/docs/Sidebar.svelte +69 -0
  95. package/dist/components/docs/Sidebar.svelte.d.ts +31 -0
  96. package/dist/components/docs/SidebarMenuItems.svelte +344 -0
  97. package/dist/components/docs/SidebarMenuItems.svelte.d.ts +33 -0
  98. package/dist/components/docs/SidebarSkeleton.svelte +50 -0
  99. package/dist/components/docs/SidebarSkeleton.svelte.d.ts +18 -0
  100. package/dist/components/docs/SiteBanner.svelte +92 -0
  101. package/dist/components/docs/SiteBanner.svelte.d.ts +7 -0
  102. package/dist/components/docs/Step.svelte +44 -0
  103. package/dist/components/docs/Step.svelte.d.ts +8 -0
  104. package/dist/components/docs/Steps.svelte +15 -0
  105. package/dist/components/docs/Steps.svelte.d.ts +7 -0
  106. package/dist/components/docs/Tab.svelte +40 -0
  107. package/dist/components/docs/Tab.svelte.d.ts +8 -0
  108. package/dist/components/docs/TabGroups.svelte +183 -0
  109. package/dist/components/docs/TabGroups.svelte.d.ts +25 -0
  110. package/dist/components/docs/TableOfContents.svelte +100 -0
  111. package/dist/components/docs/TableOfContents.svelte.d.ts +9 -0
  112. package/dist/components/docs/Tabs.svelte +69 -0
  113. package/dist/components/docs/Tabs.svelte.d.ts +8 -0
  114. package/dist/components/docs/ThemeToggle.svelte +16 -0
  115. package/dist/components/docs/ThemeToggle.svelte.d.ts +18 -0
  116. package/dist/components/docs/Tooltip.svelte +44 -0
  117. package/dist/components/docs/Tooltip.svelte.d.ts +10 -0
  118. package/dist/components/docs/VersionSwitcher.svelte +95 -0
  119. package/dist/components/docs/VersionSwitcher.svelte.d.ts +7 -0
  120. package/dist/components/docs/Video.svelte +84 -0
  121. package/dist/components/docs/Video.svelte.d.ts +12 -0
  122. package/dist/components/docs/api/ApiEndpoint.svelte +61 -0
  123. package/dist/components/docs/api/ApiEndpoint.svelte.d.ts +11 -0
  124. package/dist/components/docs/api/ApiParams.svelte +80 -0
  125. package/dist/components/docs/api/ApiParams.svelte.d.ts +14 -0
  126. package/dist/components/docs/api/ApiPlayground.svelte +259 -0
  127. package/dist/components/docs/api/ApiPlayground.svelte.d.ts +16 -0
  128. package/dist/components/docs/api/ApiReference.svelte +278 -0
  129. package/dist/components/docs/api/ApiReference.svelte.d.ts +23 -0
  130. package/dist/components/docs/api/ApiResponse.svelte +66 -0
  131. package/dist/components/docs/api/ApiResponse.svelte.d.ts +9 -0
  132. package/dist/components/docs/api/index.d.ts +5 -0
  133. package/dist/components/docs/api/index.js +5 -0
  134. package/dist/components/docs/componentTextProps.d.ts +3 -0
  135. package/dist/components/docs/componentTextProps.js +61 -0
  136. package/dist/components/docs/index.d.ts +54 -0
  137. package/dist/components/docs/index.js +56 -0
  138. package/dist/components/global/VersionNotFound.svelte +48 -0
  139. package/dist/components/global/VersionNotFound.svelte.d.ts +7 -0
  140. package/dist/components/global/index.d.ts +1 -0
  141. package/dist/components/global/index.js +1 -0
  142. package/dist/components/index.d.ts +6 -822
  143. package/dist/components/index.js +11 -3854
  144. package/dist/components/ui/Badge.svelte +48 -0
  145. package/dist/components/ui/Badge.svelte.d.ts +15 -0
  146. package/dist/components/ui/Button.svelte +58 -0
  147. package/dist/components/ui/Button.svelte.d.ts +17 -0
  148. package/dist/components/ui/Dialog.svelte +16 -0
  149. package/dist/components/ui/Dialog.svelte.d.ts +9 -0
  150. package/dist/components/ui/DialogClose.svelte +16 -0
  151. package/dist/components/ui/DialogClose.svelte.d.ts +9 -0
  152. package/dist/components/ui/DialogContent.svelte +43 -0
  153. package/dist/components/ui/DialogContent.svelte.d.ts +10 -0
  154. package/dist/components/ui/DialogDescription.svelte +21 -0
  155. package/dist/components/ui/DialogDescription.svelte.d.ts +9 -0
  156. package/dist/components/ui/DialogFooter.svelte +20 -0
  157. package/dist/components/ui/DialogFooter.svelte.d.ts +9 -0
  158. package/dist/components/ui/DialogHeader.svelte +20 -0
  159. package/dist/components/ui/DialogHeader.svelte.d.ts +9 -0
  160. package/dist/components/ui/DialogTitle.svelte +21 -0
  161. package/dist/components/ui/DialogTitle.svelte.d.ts +9 -0
  162. package/dist/components/ui/Input.svelte +23 -0
  163. package/dist/components/ui/Input.svelte.d.ts +8 -0
  164. package/dist/components/ui/Textarea.svelte +19 -0
  165. package/dist/components/ui/Textarea.svelte.d.ts +7 -0
  166. package/dist/components/ui/index.d.ts +11 -0
  167. package/dist/components/ui/index.js +11 -0
  168. package/dist/config.d.ts +8 -0
  169. package/dist/config.js +9 -0
  170. package/dist/config.schema.json +471 -0
  171. package/dist/config.server.d.ts +46 -0
  172. package/dist/config.server.js +149 -0
  173. package/dist/{mdx-ColN3Cyg.d.mts → config.types.d.ts} +22 -75
  174. package/dist/config.types.js +39 -0
  175. package/dist/dev-utils.d.ts +29 -0
  176. package/dist/dev-utils.js +63 -0
  177. package/dist/index.d.ts +19 -4
  178. package/dist/index.js +25 -4861
  179. package/dist/mdx-cache.d.ts +41 -0
  180. package/dist/mdx-cache.js +160 -0
  181. package/dist/mdx-components.js +50 -1931
  182. package/dist/mdx-security.d.ts +76 -0
  183. package/dist/mdx-security.js +217 -0
  184. package/dist/mdx.d.ts +73 -0
  185. package/dist/mdx.js +1099 -0
  186. package/dist/middleware/index.d.ts +1 -0
  187. package/dist/middleware/index.js +2 -0
  188. package/dist/middleware/security.d.ts +22 -47
  189. package/dist/middleware/security.js +111 -137
  190. package/dist/parsers/base-parser.d.ts +14 -0
  191. package/dist/parsers/base-parser.js +1 -0
  192. package/dist/parsers/index.d.ts +16 -0
  193. package/dist/parsers/index.js +51 -0
  194. package/dist/parsers/openapi-parser.d.ts +18 -0
  195. package/dist/parsers/openapi-parser.js +209 -0
  196. package/dist/parsers/postman-parser.d.ts +20 -0
  197. package/dist/parsers/postman-parser.js +260 -0
  198. package/dist/parsers/specra-parser.d.ts +10 -0
  199. package/dist/parsers/specra-parser.js +18 -0
  200. package/dist/redirects.d.ts +12 -0
  201. package/dist/redirects.js +30 -0
  202. package/dist/remark-code-meta.d.ts +6 -0
  203. package/dist/remark-code-meta.js +21 -0
  204. package/dist/sidebar-utils.d.ts +59 -0
  205. package/dist/sidebar-utils.js +144 -0
  206. package/dist/stores/config.d.ts +20 -0
  207. package/dist/stores/config.js +45 -0
  208. package/dist/stores/index.d.ts +4 -0
  209. package/dist/stores/index.js +4 -0
  210. package/dist/stores/sidebar.d.ts +7 -0
  211. package/dist/stores/sidebar.js +12 -0
  212. package/dist/stores/tabs.d.ts +6 -0
  213. package/dist/stores/tabs.js +41 -0
  214. package/dist/stores/theme.d.ts +7 -0
  215. package/dist/stores/theme.js +75 -0
  216. package/dist/{styles.css → styles/globals.css} +136 -6
  217. package/dist/toc.d.ts +9 -0
  218. package/dist/toc.js +15 -0
  219. package/dist/utils.d.ts +13 -0
  220. package/dist/utils.js +30 -0
  221. package/package.json +47 -90
  222. package/dist/app/api/mdx-watch/route.d.mts +0 -10
  223. package/dist/app/api/mdx-watch/route.d.ts +0 -10
  224. package/dist/app/api/mdx-watch/route.js +0 -118
  225. package/dist/app/api/mdx-watch/route.js.map +0 -1
  226. package/dist/app/api/mdx-watch/route.mjs +0 -91
  227. package/dist/app/api/mdx-watch/route.mjs.map +0 -1
  228. package/dist/chunk-6S3EJVEO.mjs +0 -259
  229. package/dist/chunk-6S3EJVEO.mjs.map +0 -1
  230. package/dist/chunk-BE7EROIW.mjs +0 -212
  231. package/dist/chunk-BE7EROIW.mjs.map +0 -1
  232. package/dist/chunk-CWHRZHZO.mjs +0 -168
  233. package/dist/chunk-CWHRZHZO.mjs.map +0 -1
  234. package/dist/chunk-D5VDVYFY.mjs +0 -1325
  235. package/dist/chunk-D5VDVYFY.mjs.map +0 -1
  236. package/dist/chunk-WMCO2UX5.mjs +0 -585
  237. package/dist/chunk-WMCO2UX5.mjs.map +0 -1
  238. package/dist/chunk-XEMGCPZZ.mjs +0 -475
  239. package/dist/chunk-XEMGCPZZ.mjs.map +0 -1
  240. package/dist/components/index.d.mts +0 -822
  241. package/dist/components/index.js.map +0 -1
  242. package/dist/components/index.mjs +0 -3741
  243. package/dist/components/index.mjs.map +0 -1
  244. package/dist/index.d.mts +0 -4
  245. package/dist/index.js.map +0 -1
  246. package/dist/index.mjs +0 -1897
  247. package/dist/index.mjs.map +0 -1
  248. package/dist/layouts/index.d.mts +0 -34
  249. package/dist/layouts/index.d.ts +0 -34
  250. package/dist/layouts/index.js +0 -453
  251. package/dist/layouts/index.js.map +0 -1
  252. package/dist/layouts/index.mjs +0 -173
  253. package/dist/layouts/index.mjs.map +0 -1
  254. package/dist/lib/index.d.mts +0 -583
  255. package/dist/lib/index.d.ts +0 -583
  256. package/dist/lib/index.js +0 -1595
  257. package/dist/lib/index.js.map +0 -1
  258. package/dist/lib/index.mjs +0 -111
  259. package/dist/lib/index.mjs.map +0 -1
  260. package/dist/mdx-ColN3Cyg.d.ts +0 -352
  261. package/dist/mdx-components.d.mts +0 -86
  262. package/dist/mdx-components.d.ts +0 -86
  263. package/dist/mdx-components.js.map +0 -1
  264. package/dist/mdx-components.mjs +0 -206
  265. package/dist/mdx-components.mjs.map +0 -1
  266. package/dist/middleware/security.d.mts +0 -82
  267. package/dist/middleware/security.js.map +0 -1
  268. package/dist/middleware/security.mjs +0 -84
  269. package/dist/middleware/security.mjs.map +0 -1
  270. package/dist/styles.css.map +0 -1
  271. package/dist/styles.d.mts +0 -2
  272. package/dist/styles.d.ts +0 -2
  273. package/dist/styles.js +0 -2
  274. package/dist/styles.js.map +0 -1
  275. package/dist/styles.mjs +0 -1
  276. package/dist/styles.mjs.map +0 -1
@@ -1,11 +1,20 @@
1
1
  @import "tailwindcss";
2
2
  @import "tw-animate-css";
3
-
4
- /* src/styles/globals.css */
5
- @plugin "@tailwindcss/typography";
6
3
  @import "katex/dist/katex.min.css";
7
- @source "../**/*.{js,ts,jsx,tsx}";
4
+ @plugin "@tailwindcss/typography";
5
+
6
+ /* Scan SDK source files for Tailwind utilities */
7
+ @source "../**/*.{js,ts,svelte}";
8
+
8
9
  @custom-variant dark (&:is(.dark *));
10
+
11
+ /* Inter font for consistent typography matching the original design */
12
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
13
+
14
+ @theme {
15
+ --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
16
+ }
17
+
9
18
  :root {
10
19
  --background: oklch(0.99 0 0);
11
20
  --foreground: oklch(0.12 0 0);
@@ -13,6 +22,7 @@
13
22
  --card-foreground: oklch(0.12 0 0);
14
23
  --popover: oklch(1 0 0);
15
24
  --popover-foreground: oklch(0.12 0 0);
25
+ /* --primary: oklch(0.50 0.24 264.376); */
16
26
  --primary: oklch(27.025% 0.14091 290.376);
17
27
  --primary-foreground: oklch(0.99 0 0);
18
28
  --secondary: oklch(0.96 0 0);
@@ -41,7 +51,9 @@
41
51
  --sidebar-border: oklch(0.90 0 0);
42
52
  --sidebar-ring: oklch(0.50 0.24 264.376);
43
53
  }
54
+
44
55
  .dark {
56
+ /* Updated dark theme to match Vercel/Mintlify documentation aesthetic */
45
57
  --background: oklch(0.09 0 0);
46
58
  --foreground: oklch(0.98 0 0);
47
59
  --card: oklch(0.12 0 0);
@@ -74,224 +86,342 @@
74
86
  --sidebar-accent-foreground: oklch(0.98 0 0);
75
87
  --sidebar-border: oklch(0.22 0 0);
76
88
  --sidebar-ring: oklch(0.65 0.25 264.376);
89
+
90
+ /* Added custom tokens for code blocks */
77
91
  --code: oklch(0.75 0.15 264.376);
78
92
  --code-bg: oklch(0.12 0 0);
79
93
  --code-fg: oklch(0.92 0 0);
80
94
  }
81
- @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --color-chart-1: var(--chart-1); --color-chart-2: var(--chart-2); --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); --color-code: var(--code); --color-code-bg: var(--code-bg); --color-code-fg: var(--code-fg); }
95
+
96
+ @theme inline {
97
+
98
+ --color-background: var(--background);
99
+ --color-foreground: var(--foreground);
100
+ --color-card: var(--card);
101
+ --color-card-foreground: var(--card-foreground);
102
+ --color-popover: var(--popover);
103
+ --color-popover-foreground: var(--popover-foreground);
104
+ --color-primary: var(--primary);
105
+ --color-primary-foreground: var(--primary-foreground);
106
+ --color-secondary: var(--secondary);
107
+ --color-secondary-foreground: var(--secondary-foreground);
108
+ --color-muted: var(--muted);
109
+ --color-muted-foreground: var(--muted-foreground);
110
+ --color-accent: var(--accent);
111
+ --color-accent-foreground: var(--accent-foreground);
112
+ --color-destructive: var(--destructive);
113
+ --color-destructive-foreground: var(--destructive-foreground);
114
+ --color-border: var(--border);
115
+ --color-input: var(--input);
116
+ --color-ring: var(--ring);
117
+ --color-chart-1: var(--chart-1);
118
+ --color-chart-2: var(--chart-2);
119
+ --color-chart-3: var(--chart-3);
120
+ --color-chart-4: var(--chart-4);
121
+ --color-chart-5: var(--chart-5);
122
+ --radius-sm: calc(var(--radius) - 4px);
123
+ --radius-md: calc(var(--radius) - 2px);
124
+ --radius-lg: var(--radius);
125
+ --radius-xl: calc(var(--radius) + 4px);
126
+ --color-sidebar: var(--sidebar);
127
+ --color-sidebar-foreground: var(--sidebar-foreground);
128
+ --color-sidebar-primary: var(--sidebar-primary);
129
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
130
+ --color-sidebar-accent: var(--sidebar-accent);
131
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
132
+ --color-sidebar-border: var(--sidebar-border);
133
+ --color-sidebar-ring: var(--sidebar-ring);
134
+
135
+ /* Added code color tokens */
136
+ --color-code: var(--code);
137
+ --color-code-bg: var(--code-bg);
138
+ --color-code-fg: var(--code-fg);
139
+ }
140
+
82
141
  @layer base {
83
142
  * {
84
143
  @apply border-border outline-ring/50;
85
144
  }
145
+
86
146
  html {
87
147
  scroll-behavior: smooth;
148
+ /* Always reserve space for scrollbar to prevent layout shift */
88
149
  scrollbar-gutter: stable;
89
150
  }
151
+
90
152
  body {
91
153
  @apply bg-background text-foreground;
92
154
  }
155
+
93
156
  a {
94
157
  text-decoration: none;
95
158
  }
159
+
160
+ /* Link styling - primary color, no underline until hover */
96
161
  main .prose a {
97
162
  color: var(--color-primary);
98
163
  text-decoration: none;
99
164
  transition: color 0.2s ease, text-decoration 0.2s ease;
100
165
  }
166
+
101
167
  main .prose a:hover {
102
168
  text-decoration: none !important;
103
169
  color: var(--color-primary);
104
170
  }
171
+
172
+ /* Prose links in documentation */
105
173
  .prose a {
106
174
  color: var(--color-primary);
107
175
  text-decoration: none !important;
108
176
  font-weight: 500;
109
177
  }
178
+
110
179
  .prose a:hover {
111
180
  text-decoration: none !important;
112
181
  color: var(--color-primary);
113
182
  }
183
+
184
+ /* Sidebar links - no underline on hover */
114
185
  aside a {
115
186
  text-decoration: none;
116
187
  }
188
+
117
189
  aside a:hover {
118
190
  text-decoration: none;
119
191
  }
192
+
193
+ /* Card and ImageCard links - never underline */
120
194
  .image-card-link,
121
195
  .card-link {
122
196
  text-decoration: none !important;
123
197
  }
198
+
124
199
  .image-card-link:hover,
125
200
  .card-link:hover {
126
201
  text-decoration: none !important;
127
202
  }
203
+
128
204
  .image-card-link *,
129
205
  .card-link * {
130
206
  text-decoration: none !important;
131
207
  }
208
+
209
+ /* Custom scrollbar styling for body only */
132
210
  body::-webkit-scrollbar {
133
211
  width: 6px;
134
212
  }
213
+
135
214
  body::-webkit-scrollbar-track {
136
215
  background: oklch(0.95 0 0);
137
216
  }
217
+
138
218
  body::-webkit-scrollbar-thumb {
139
219
  background: oklch(0.75 0 0);
140
220
  border-radius: 6px;
141
221
  border: 2px solid oklch(0.95 0 0);
142
222
  }
223
+
143
224
  body::-webkit-scrollbar-thumb:hover {
144
225
  background: oklch(0.65 0 0);
145
226
  }
227
+
228
+ /* Dark mode body scrollbar */
146
229
  .dark body::-webkit-scrollbar-track {
147
230
  background: oklch(0.12 0 0);
148
231
  }
232
+
149
233
  .dark body::-webkit-scrollbar-thumb {
150
234
  background: oklch(0.25 0 0);
151
235
  border: 2px solid oklch(0.12 0 0);
152
236
  }
237
+
153
238
  .dark body::-webkit-scrollbar-thumb:hover {
154
239
  background: oklch(0.35 0 0);
155
240
  }
241
+
242
+ /* Firefox scrollbar for body only */
156
243
  body {
157
244
  scrollbar-width: thin;
158
245
  scrollbar-color: oklch(0.75 0 0) oklch(0.95 0 0);
159
246
  }
247
+
160
248
  .dark body {
161
249
  scrollbar-color: oklch(0.25 0 0) oklch(0.12 0 0);
162
250
  }
251
+
252
+ /* Sidebar scrollbar styling - thin and subtle */
163
253
  aside::-webkit-scrollbar,
164
254
  aside *::-webkit-scrollbar {
165
255
  width: 4px;
166
256
  }
257
+
167
258
  aside::-webkit-scrollbar-track,
168
259
  aside *::-webkit-scrollbar-track {
169
260
  background: transparent;
170
261
  }
262
+
171
263
  aside::-webkit-scrollbar-thumb,
172
264
  aside *::-webkit-scrollbar-thumb {
173
265
  background: oklch(0.7 0 0 / 0.3);
174
266
  border-radius: 4px;
175
267
  }
268
+
176
269
  aside::-webkit-scrollbar-thumb:hover,
177
270
  aside *::-webkit-scrollbar-thumb:hover {
178
271
  background: oklch(0.6 0 0 / 0.5);
179
272
  }
273
+
274
+ /* Dark mode sidebar scrollbar */
180
275
  .dark aside::-webkit-scrollbar-thumb,
181
276
  .dark aside *::-webkit-scrollbar-thumb {
182
277
  background: oklch(0.5 0 0 / 0.3);
183
278
  }
279
+
184
280
  .dark aside::-webkit-scrollbar-thumb:hover,
185
281
  .dark aside *::-webkit-scrollbar-thumb:hover {
186
282
  background: oklch(0.6 0 0 / 0.5);
187
283
  }
284
+
285
+ /* Firefox sidebar scrollbar */
188
286
  aside,
189
287
  aside * {
190
288
  scrollbar-width: thin;
191
289
  scrollbar-color: oklch(0.7 0 0 / 0.3) transparent;
192
290
  }
291
+
193
292
  .dark aside,
194
293
  .dark aside * {
195
294
  scrollbar-color: oklch(0.5 0 0 / 0.3) transparent;
196
295
  }
296
+
297
+ /* Light mode syntax highlighting - VS Code Light+ theme */
197
298
  .token-comment {
198
299
  color: #008000;
199
300
  font-style: italic;
200
301
  }
302
+
201
303
  .token-string {
202
304
  color: #a31515;
203
305
  }
306
+
204
307
  .token-keyword {
205
308
  color: #0000ff;
206
309
  font-weight: 600;
207
310
  }
311
+
208
312
  .token-number {
209
313
  color: #098658;
210
314
  }
315
+
211
316
  .token-function {
212
317
  color: #795e26;
213
318
  }
319
+
214
320
  .token-operator {
215
321
  color: #000000;
216
322
  }
323
+
217
324
  .token-property {
218
325
  color: #001080;
219
326
  }
327
+
220
328
  .token-punctuation {
221
329
  color: #000000;
222
330
  }
331
+
223
332
  .token-text {
224
333
  color: #000000;
225
334
  }
335
+
336
+ /* Dark mode syntax highlighting - VS Code Dark+ theme */
226
337
  .dark .token-comment {
227
338
  color: #6a9955;
228
339
  }
340
+
229
341
  .dark .token-string {
230
342
  color: #ce9178;
231
343
  }
344
+
232
345
  .dark .token-keyword {
233
346
  color: #569cd6;
234
347
  }
348
+
235
349
  .dark .token-number {
236
350
  color: #b5cea8;
237
351
  }
352
+
238
353
  .dark .token-function {
239
354
  color: #dcdcaa;
240
355
  }
356
+
241
357
  .dark .token-operator {
242
358
  color: #d4d4d4;
243
359
  }
360
+
244
361
  .dark .token-property {
245
362
  color: #9cdcfe;
246
363
  }
364
+
247
365
  .dark .token-punctuation {
248
366
  color: #d4d4d4;
249
367
  }
368
+
250
369
  .dark .token-text {
251
370
  color: #d4d4d4;
252
371
  }
253
372
  }
373
+
374
+
254
375
  pre code {
255
376
  background: none;
256
377
  border: none;
257
378
  }
379
+
380
+ /* Heading styles - lighter weight and reduced margins */
258
381
  .prose h1 {
259
382
  font-weight: 700;
260
383
  margin-top: 1.5rem;
261
384
  margin-bottom: 0.75rem;
262
385
  }
386
+
263
387
  .prose h2 {
264
388
  font-weight: 600;
265
389
  margin-top: 2rem;
266
390
  margin-bottom: 0.75rem;
267
391
  }
392
+
268
393
  .prose h3 {
269
394
  font-weight: 600;
270
395
  margin-top: 1.5rem;
271
396
  margin-bottom: 0.5rem;
272
397
  }
398
+
273
399
  .prose h4 {
274
400
  font-weight: 600;
275
401
  margin-top: 1.25rem;
276
402
  margin-bottom: 0.5rem;
277
403
  }
404
+
278
405
  .prose h5 {
279
406
  font-weight: 500;
280
407
  margin-top: 1rem;
281
408
  margin-bottom: 0.5rem;
282
409
  }
410
+
283
411
  .prose h6 {
284
412
  font-weight: 500;
285
413
  margin-top: 1rem;
286
414
  margin-bottom: 0.5rem;
287
415
  }
416
+
417
+ /* Paragraph styles - reduced margins */
288
418
  .prose p {
289
419
  margin-top: 0.5rem;
290
420
  margin-bottom: 0.75rem;
291
421
  }
422
+
292
423
  html body[data-scroll-locked] {
293
424
  overflow: visible !important;
294
425
  margin-right: 0 !important;
295
426
  padding-right: 0 !important;
296
427
  }
297
- /*# sourceMappingURL=styles.css.map */
package/dist/toc.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export interface TOCItem {
2
+ id: string;
3
+ title: string;
4
+ level: number;
5
+ }
6
+ /**
7
+ * Extract headings from HTML string for table of contents
8
+ */
9
+ export declare function extractHeadings(html: string): TOCItem[];
package/dist/toc.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Extract headings from HTML string for table of contents
3
+ */
4
+ export function extractHeadings(html) {
5
+ const headingRegex = /<h([2-3])[^>]*id="([^"]*)"[^>]*>(.*?)<\/h\1>/g;
6
+ const toc = [];
7
+ let match;
8
+ while ((match = headingRegex.exec(html)) !== null) {
9
+ const level = Number.parseInt(match[1]);
10
+ const id = match[2];
11
+ const title = match[3].replace(/<[^>]*>/g, ""); // Strip HTML tags
12
+ toc.push({ id, title, level });
13
+ }
14
+ return toc;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ /**
4
+ * Get the correct asset path based on deployment configuration
5
+ * Handles different deployment scenarios:
6
+ * - Vercel/Node.js hosting (standalone build): No basePath needed
7
+ * - GitHub Pages without custom domain: Uses basePath from config
8
+ * - Static hosting with custom domain: No basePath needed
9
+ *
10
+ * @param path - The asset path (can start with or without '/')
11
+ * @returns The properly formatted asset path
12
+ */
13
+ export declare function getAssetPath(path: string): string;
package/dist/utils.js ADDED
@@ -0,0 +1,30 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ /**
7
+ * Get the correct asset path based on deployment configuration
8
+ * Handles different deployment scenarios:
9
+ * - Vercel/Node.js hosting (standalone build): No basePath needed
10
+ * - GitHub Pages without custom domain: Uses basePath from config
11
+ * - Static hosting with custom domain: No basePath needed
12
+ *
13
+ * @param path - The asset path (can start with or without '/')
14
+ * @returns The properly formatted asset path
15
+ */
16
+ export function getAssetPath(path) {
17
+ // Get basePath from Next.js config (set during build for static exports)
18
+ const basePath = process.env.NEXT_PUBLIC_BASE_PATH || process.env.__NEXT_ROUTER_BASEPATH || '';
19
+ // Normalize the input path: ensure it starts with '/'
20
+ const normalizedPath = path.startsWith('/') ? path : `/${path}`;
21
+ // If we have a basePath (GitHub Pages without custom domain), prepend it
22
+ if (basePath) {
23
+ // Normalize basePath: remove trailing slash, ensure leading slash
24
+ const normalizedBase = basePath.startsWith('/') ? basePath : `/${basePath}`;
25
+ const cleanBase = normalizedBase.replace(/\/$/, '');
26
+ return `${cleanBase}${normalizedPath}`;
27
+ }
28
+ // Default: return the normalized path (works for Vercel, custom domains, and dev)
29
+ return normalizedPath;
30
+ }
package/package.json CHANGED
@@ -1,152 +1,109 @@
1
1
  {
2
2
  "name": "specra",
3
- "version": "0.1.13",
4
- "description": "A modern documentation library for Next.js with built-in versioning, API reference generation, full-text search, and MDX support",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
3
+ "version": "0.2.0",
4
+ "description": "A modern documentation library for SvelteKit with built-in versioning, API reference generation, full-text search, and MDX support",
5
+ "svelte": "./dist/index.js",
7
6
  "types": "./dist/index.d.ts",
7
+ "type": "module",
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- },
14
- "./app/layout": {
15
- "types": "./dist/app/layout.d.ts",
16
- "import": "./dist/app/layout.mjs",
17
- "require": "./dist/app/layout.js"
18
- },
19
- "./app/docs-page": {
20
- "types": "./dist/app/docs-page.d.ts",
21
- "import": "./dist/app/docs-page.mjs",
22
- "require": "./dist/app/docs-page.js"
23
- },
24
- "./app/api/mdx-watch": {
25
- "types": "./dist/app/api/mdx-watch/route.d.ts",
26
- "import": "./dist/app/api/mdx-watch/route.mjs",
27
- "require": "./dist/app/api/mdx-watch/route.js"
11
+ "svelte": "./dist/index.js",
12
+ "import": "./dist/index.js"
28
13
  },
29
14
  "./components": {
30
15
  "types": "./dist/components/index.d.ts",
31
- "import": "./dist/components/index.mjs",
32
- "require": "./dist/components/index.js"
33
- },
34
- "./layouts": {
35
- "types": "./dist/layouts/index.d.ts",
36
- "import": "./dist/layouts/index.mjs",
37
- "require": "./dist/layouts/index.js"
16
+ "svelte": "./dist/components/index.js",
17
+ "import": "./dist/components/index.js"
38
18
  },
39
- "./mdx-components": {
40
- "types": "./dist/mdx-components.d.ts",
41
- "import": "./dist/mdx-components.mjs",
42
- "require": "./dist/mdx-components.js"
19
+ "./stores": {
20
+ "types": "./dist/stores/index.d.ts",
21
+ "svelte": "./dist/stores/index.js",
22
+ "import": "./dist/stores/index.js"
43
23
  },
44
24
  "./lib": {
45
25
  "types": "./dist/lib/index.d.ts",
46
- "import": "./dist/lib/index.mjs",
47
- "require": "./dist/lib/index.js"
26
+ "import": "./dist/lib/index.js"
27
+ },
28
+ "./svelte-config": {
29
+ "import": "./config/svelte-config.js"
48
30
  },
49
31
  "./middleware/security": {
50
32
  "types": "./dist/middleware/security.d.ts",
51
- "import": "./dist/middleware/security.mjs",
52
- "require": "./dist/middleware/security.js"
53
- },
54
- "./next-config": {
55
- "import": "./config/next-config.mjs"
56
- },
57
- "./next-config/default": {
58
- "import": "./config/next.config.default.mjs"
59
- },
60
- "./next-config/export": {
61
- "import": "./config/next.config.export.mjs"
33
+ "import": "./dist/middleware/security.js"
62
34
  },
63
- "./styles": "./dist/styles.css",
64
- "./styles.css": "./dist/styles.css",
35
+ "./styles": "./dist/styles/globals.css",
36
+ "./styles.css": "./dist/styles/globals.css",
65
37
  "./config.schema.json": "./config/specra.config.schema.json"
66
38
  },
67
39
  "files": [
68
40
  "dist",
69
- "config",
70
- "README.md"
41
+ "config"
71
42
  ],
72
43
  "scripts": {
73
- "build": "rm -rf dist && npm run generate:schema && tsup",
74
- "dev": "tsup --watch",
75
- "typecheck": "tsc --noEmit",
44
+ "build": "rm -rf dist && npm run generate:schema && svelte-kit sync && svelte-package",
45
+ "dev": "svelte-package --watch",
46
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
47
+ "typecheck": "svelte-check --tsconfig ./tsconfig.json",
76
48
  "generate:schema": "ts-json-schema-generator --path src/lib/config.types.ts --type SpecraConfig --out config/specra.config.schema.json"
77
49
  },
78
50
  "keywords": [
79
51
  "documentation",
80
52
  "docs",
81
- "nextjs",
53
+ "sveltekit",
54
+ "svelte",
82
55
  "mdx",
83
56
  "api-reference",
84
57
  "versioning",
85
58
  "search"
86
59
  ],
87
60
  "author": "dalmasonto, arthur-kamau",
88
- "license": "MIT",
61
+ "license": "SEE LICENSE IN LICENSE.MD",
89
62
  "repository": {
90
63
  "type": "git",
91
64
  "url": "https://github.com/dalmasonto/specra"
92
65
  },
93
66
  "peerDependencies": {
94
- "next": "^14.0.0 || ^15.0.0 || ^16.0.0",
95
- "react": "^18.0.0 || ^19.0.0",
96
- "react-dom": "^18.0.0 || ^19.0.0"
67
+ "@sveltejs/kit": "^2.0.0",
68
+ "svelte": "^5.0.0"
97
69
  },
98
70
  "dependencies": {
99
- "@hookform/resolvers": "^3.10.0",
100
- "@radix-ui/react-accordion": "^1.2.2",
101
- "@radix-ui/react-alert-dialog": "^1.1.15",
102
- "@radix-ui/react-collapsible": "^1.1.2",
103
- "@radix-ui/react-dialog": "^1.1.15",
104
- "@radix-ui/react-dropdown-menu": "^2.1.16",
105
- "@radix-ui/react-popover": "^1.1.15",
106
- "@radix-ui/react-scroll-area": "^1.2.2",
107
- "@radix-ui/react-select": "^2.1.4",
108
- "@radix-ui/react-separator": "^1.1.1",
109
- "@radix-ui/react-slot": "^1.1.1",
110
- "@radix-ui/react-tabs": "^1.1.13",
111
- "@radix-ui/react-toast": "^1.2.4",
112
- "@radix-ui/react-toggle": "^1.1.10",
113
- "@radix-ui/react-tooltip": "^1.2.1",
71
+ "bits-ui": "^1.0.0",
114
72
  "class-variance-authority": "^0.7.1",
115
73
  "clsx": "^2.1.1",
116
- "cmdk": "^1.0.4",
117
74
  "date-fns": "^4.1.0",
118
- "embla-carousel-react": "^8.5.1",
75
+ "embla-carousel-svelte": "^8.5.1",
119
76
  "gray-matter": "^4.0.3",
120
77
  "katex": "^0.16.27",
121
- "lucide-react": "^0.454.0",
78
+ "lucide-svelte": "^0.454.0",
79
+ "mdsvex": "^0.12.0",
122
80
  "meilisearch": "^0.54.0",
123
- "mermaid": "^10.9.5",
124
- "next-mdx-remote": "^5.0.0",
125
- "next-themes": "^0.4.6",
126
- "react-hook-form": "^7.60.0",
127
- "react-markdown": "^9.0.1",
128
- "recharts": "^2.15.4",
81
+ "mermaid": "^11.12.2",
82
+ "mode-watcher": "^0.5.0",
83
+ "hast-util-to-html": "^9.0.0",
129
84
  "rehype-katex": "^7.0.1",
130
85
  "rehype-raw": "^7.0.0",
131
86
  "rehype-slug": "^6.0.0",
87
+ "rehype-stringify": "^10.0.1",
132
88
  "remark-gfm": "^4.0.0",
133
89
  "remark-math": "^6.0.0",
134
- "sonner": "^1.7.4",
90
+ "remark-rehype": "^11.1.2",
91
+ "svelte-sonner": "^0.3.28",
135
92
  "tailwind-merge": "^2.6.0",
136
93
  "tailwindcss": "^4.1.18",
137
- "tailwindcss-animate": "^1.0.7",
138
94
  "tw-animate-css": "^1.4.0",
139
95
  "zod": "^3.25.76"
140
96
  },
141
97
  "devDependencies": {
98
+ "@sveltejs/adapter-auto": "^3.0.0",
99
+ "@sveltejs/kit": "^2.0.0",
100
+ "@sveltejs/package": "^2.0.0",
101
+ "@sveltejs/vite-plugin-svelte": "^6.0.0",
142
102
  "@types/node": "^22",
143
- "@types/react": "^19",
144
- "@types/react-dom": "^19",
145
- "next": "^16.1.0",
146
- "react": "^19.2.3",
147
- "react-dom": "^19.2.3",
103
+ "svelte": "^5.0.0",
104
+ "svelte-check": "^4.0.0",
148
105
  "ts-json-schema-generator": "^2.4.0",
149
- "tsup": "^8.3.5",
150
- "typescript": "^5"
106
+ "typescript": "^5",
107
+ "vite": "^6.3.0"
151
108
  }
152
109
  }
@@ -1,10 +0,0 @@
1
- declare const dynamic = "error";
2
- declare const runtime = "nodejs";
3
- /**
4
- * API route for watching MDX file changes in development
5
- * Provides Server-Sent Events (SSE) stream for hot reloading
6
- * Only available in development mode
7
- */
8
- declare function GET(): Promise<Response>;
9
-
10
- export { GET, dynamic, runtime };
@@ -1,10 +0,0 @@
1
- declare const dynamic = "error";
2
- declare const runtime = "nodejs";
3
- /**
4
- * API route for watching MDX file changes in development
5
- * Provides Server-Sent Events (SSE) stream for hot reloading
6
- * Only available in development mode
7
- */
8
- declare function GET(): Promise<Response>;
9
-
10
- export { GET, dynamic, runtime };