@geenius/docs 0.5.0 → 0.9.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/CHANGELOG.md +6 -0
- package/package.json +19 -6
- package/packages/convex/dist/index.d.ts +4 -4
- package/packages/convex/dist/index.js.map +1 -1
- package/packages/react/dist/index.css +2 -0
- package/packages/react/dist/index.css.map +1 -0
- package/packages/react/dist/index.d.ts +67 -49
- package/packages/react/dist/index.js +83 -41
- package/packages/react/dist/index.js.map +1 -1
- package/packages/react-css/dist/index.d.ts +68 -33
- package/packages/react-css/dist/index.js +61 -38
- package/packages/react-css/dist/index.js.map +1 -1
- package/packages/shared/dist/{chunk-BR2XBF64.js → chunk-QKKVTCRJ.js} +2 -2
- package/packages/shared/dist/{chunk-BR2XBF64.js.map → chunk-QKKVTCRJ.js.map} +1 -1
- package/packages/shared/dist/index.d.ts +6 -6
- package/packages/shared/dist/index.js +1 -1
- package/packages/shared/dist/index.js.map +1 -1
- package/packages/shared/dist/providers.d.ts +4 -4
- package/packages/shared/dist/providers.js +1 -1
- package/packages/shared/dist/providers.js.map +1 -1
- package/packages/shared/dist/{types-n-Ryn258.d.ts → types-D8ITXVwj.d.ts} +1 -1
- package/packages/solidjs/dist/index.css +2 -0
- package/packages/solidjs/dist/index.css.map +1 -0
- package/packages/solidjs/dist/index.d.ts +57 -27
- package/packages/solidjs/dist/index.js +58 -28
- package/packages/solidjs/dist/index.js.map +1 -1
- package/packages/solidjs-css/dist/index.d.ts +55 -20
- package/packages/solidjs-css/dist/index.js +34 -25
- package/packages/solidjs-css/dist/index.js.map +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { BreadcrumbItem, DocPage as DocPage$1, SearchResult, DocSection, TocItem, DocsConfig } from '@geenius/docs
|
|
2
|
-
export { BreadcrumbItem, DocAccess, DocPage as DocPageType, DocSection, DocStatus, DocsConfig, SearchResult, TocItem } from '@geenius/docs
|
|
1
|
+
import { BreadcrumbItem, DocPage as DocPage$1, SearchResult, DocSection, TocItem, DocsConfig } from '@geenius/docs/shared';
|
|
2
|
+
export { BreadcrumbItem, DocAccess, DocPage as DocPageType, DocSection, DocStatus, DocsConfig, SearchResult, TocItem } from '@geenius/docs/shared';
|
|
3
3
|
import { JSX, Accessor } from 'solid-js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @module solidjsBreadcrumbs
|
|
7
|
-
* @package @geenius/docs
|
|
7
|
+
* @package @geenius/docs/solidjs
|
|
8
8
|
* @description Renders the SolidJS docs breadcrumb trail using shared route
|
|
9
9
|
* metadata and the Tailwind-styled docs presentation contract.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
interface BreadcrumbsProps {
|
|
13
13
|
items: BreadcrumbItem[];
|
|
14
|
+
class?: string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Renders the current docs breadcrumb hierarchy.
|
|
@@ -22,7 +23,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): JSX.Element | null;
|
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* @module solidDocPage
|
|
25
|
-
* @package @geenius/docs
|
|
26
|
+
* @package @geenius/docs/solidjs
|
|
26
27
|
* @description Renders a docs page body with safe Markdown semantics, heading
|
|
27
28
|
* anchors, and package-consistent typography. The component deliberately avoids
|
|
28
29
|
* raw HTML injection so authored docs content stays within the Markdown runtime.
|
|
@@ -30,6 +31,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): JSX.Element | null;
|
|
|
30
31
|
|
|
31
32
|
interface DocPageProps {
|
|
32
33
|
page: DocPage$1;
|
|
34
|
+
class?: string;
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Renders a docs page body using safe Markdown rendering.
|
|
@@ -41,7 +43,7 @@ declare function DocPage(props: DocPageProps): JSX.Element;
|
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* @module solidjsDocSearch
|
|
44
|
-
* @package @geenius/docs
|
|
46
|
+
* @package @geenius/docs/solidjs
|
|
45
47
|
* @description Provides the SolidJS command-palette style docs search modal
|
|
46
48
|
* with keyboard navigation, animated presentation, and highlighted matches.
|
|
47
49
|
*/
|
|
@@ -53,6 +55,7 @@ interface DocSearchProps {
|
|
|
53
55
|
onSelect: (result: SearchResult) => void;
|
|
54
56
|
isOpen: boolean;
|
|
55
57
|
onClose: () => void;
|
|
58
|
+
class?: string;
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* Renders the SolidJS docs search modal and result list.
|
|
@@ -62,20 +65,40 @@ interface DocSearchProps {
|
|
|
62
65
|
*/
|
|
63
66
|
declare function DocSearch(props: DocSearchProps): JSX.Element | null;
|
|
64
67
|
|
|
68
|
+
/**
|
|
69
|
+
* @module docsSolidTypes
|
|
70
|
+
* @package @geenius/docs/solidjs
|
|
71
|
+
* @description Declares the SolidJS-specific supporting types that keep the
|
|
72
|
+
* exported docs components aligned on shared section/page shapes and a common
|
|
73
|
+
* optional `class` extension point.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Optional `class` contract shared by SolidJS docs exports.
|
|
78
|
+
*/
|
|
79
|
+
interface WithClassName {
|
|
80
|
+
class?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Shared docs section shape used by layout, navigation, and page components.
|
|
84
|
+
*/
|
|
85
|
+
type DocsSectionWithPages = DocSection & {
|
|
86
|
+
pages?: DocPage$1[];
|
|
87
|
+
pageCount?: number;
|
|
88
|
+
};
|
|
89
|
+
|
|
65
90
|
/**
|
|
66
91
|
* @module solidjsDocSidebar
|
|
67
|
-
* @package @geenius/docs
|
|
92
|
+
* @package @geenius/docs/solidjs
|
|
68
93
|
* @description Renders the hierarchical SolidJS docs sidebar with expandable
|
|
69
94
|
* sections, nested pages, and the active-page highlight state.
|
|
70
95
|
*/
|
|
71
96
|
|
|
72
97
|
interface DocSidebarProps {
|
|
73
|
-
sections:
|
|
74
|
-
pages?: DocPage$1[];
|
|
75
|
-
pageCount?: number;
|
|
76
|
-
})[];
|
|
98
|
+
sections: DocsSectionWithPages[];
|
|
77
99
|
currentPageId?: string;
|
|
78
100
|
onNavigate: (page: DocPage$1, section: DocSection) => void;
|
|
101
|
+
class?: string;
|
|
79
102
|
}
|
|
80
103
|
/**
|
|
81
104
|
* Renders the docs section tree for sidebar navigation.
|
|
@@ -87,15 +110,13 @@ declare function DocSidebar(props: DocSidebarProps): JSX.Element;
|
|
|
87
110
|
|
|
88
111
|
/**
|
|
89
112
|
* @module solidjsDocsLayout
|
|
90
|
-
* @package @geenius/docs
|
|
113
|
+
* @package @geenius/docs/solidjs
|
|
91
114
|
* @description Composes the SolidJS docs chrome, including sidebar,
|
|
92
115
|
* breadcrumbs, main content region, and table of contents rail.
|
|
93
116
|
*/
|
|
94
117
|
|
|
95
118
|
interface DocsLayoutProps {
|
|
96
|
-
sections:
|
|
97
|
-
pages?: DocPage$1[];
|
|
98
|
-
})[];
|
|
119
|
+
sections: DocsSectionWithPages[];
|
|
99
120
|
currentPage?: DocPage$1;
|
|
100
121
|
toc?: TocItem[];
|
|
101
122
|
activeHeadingId?: string;
|
|
@@ -103,6 +124,7 @@ interface DocsLayoutProps {
|
|
|
103
124
|
currentPageId?: string;
|
|
104
125
|
onNavigate: (page: DocPage$1, section: DocSection) => void;
|
|
105
126
|
children: JSX.Element;
|
|
127
|
+
class?: string;
|
|
106
128
|
}
|
|
107
129
|
/**
|
|
108
130
|
* Renders the shared SolidJS docs page shell.
|
|
@@ -114,7 +136,7 @@ declare function DocsLayout(props: DocsLayoutProps): JSX.Element;
|
|
|
114
136
|
|
|
115
137
|
/**
|
|
116
138
|
* @module solidjsEditButton
|
|
117
|
-
* @package @geenius/docs
|
|
139
|
+
* @package @geenius/docs/solidjs
|
|
118
140
|
* @description Renders the external edit-source affordance for the SolidJS
|
|
119
141
|
* docs variant when an upstream repository edit URL is configured.
|
|
120
142
|
*/
|
|
@@ -122,6 +144,7 @@ declare function DocsLayout(props: DocsLayoutProps): JSX.Element;
|
|
|
122
144
|
interface EditButtonProps {
|
|
123
145
|
pageSlug: string;
|
|
124
146
|
editUrl?: string;
|
|
147
|
+
class?: string;
|
|
125
148
|
}
|
|
126
149
|
/**
|
|
127
150
|
* Renders an external link for editing the current docs page source.
|
|
@@ -133,7 +156,7 @@ declare function EditButton(props: EditButtonProps): JSX.Element | null;
|
|
|
133
156
|
|
|
134
157
|
/**
|
|
135
158
|
* @module solidjsPageNavigation
|
|
136
|
-
* @package @geenius/docs
|
|
159
|
+
* @package @geenius/docs/solidjs
|
|
137
160
|
* @description Renders previous and next page affordances for the SolidJS
|
|
138
161
|
* docs variant so readers can move linearly through the content graph.
|
|
139
162
|
*/
|
|
@@ -147,6 +170,7 @@ interface PageNavigationProps {
|
|
|
147
170
|
title: string;
|
|
148
171
|
href: string;
|
|
149
172
|
};
|
|
173
|
+
class?: string;
|
|
150
174
|
}
|
|
151
175
|
/**
|
|
152
176
|
* Renders previous and next page links for the current docs page.
|
|
@@ -158,7 +182,7 @@ declare function PageNavigation(props: PageNavigationProps): JSX.Element | null;
|
|
|
158
182
|
|
|
159
183
|
/**
|
|
160
184
|
* @module solidjsTableOfContents
|
|
161
|
-
* @package @geenius/docs
|
|
185
|
+
* @package @geenius/docs/solidjs
|
|
162
186
|
* @description Renders the SolidJS docs table of contents with nested anchor
|
|
163
187
|
* links and animated active-heading highlighting.
|
|
164
188
|
*/
|
|
@@ -166,6 +190,7 @@ declare function PageNavigation(props: PageNavigationProps): JSX.Element | null;
|
|
|
166
190
|
interface TableOfContentsProps {
|
|
167
191
|
toc: TocItem[];
|
|
168
192
|
activeId?: string;
|
|
193
|
+
class?: string;
|
|
169
194
|
}
|
|
170
195
|
/**
|
|
171
196
|
* Renders the page-local table of contents rail.
|
|
@@ -177,7 +202,7 @@ declare function TableOfContents(props: TableOfContentsProps): JSX.Element | nul
|
|
|
177
202
|
|
|
178
203
|
/**
|
|
179
204
|
* @module solidjsVersionSelector
|
|
180
|
-
* @package @geenius/docs
|
|
205
|
+
* @package @geenius/docs/solidjs
|
|
181
206
|
* @description Presents the SolidJS docs version switcher for packages that
|
|
182
207
|
* expose multiple documentation versions in the same surface.
|
|
183
208
|
*/
|
|
@@ -186,6 +211,7 @@ interface VersionSelectorProps {
|
|
|
186
211
|
versions: string[];
|
|
187
212
|
current: string;
|
|
188
213
|
onSelect: (version: string) => void;
|
|
214
|
+
class?: string;
|
|
189
215
|
}
|
|
190
216
|
/**
|
|
191
217
|
* Renders a version picker when more than one docs version is available.
|
|
@@ -197,7 +223,7 @@ declare function VersionSelector(props: VersionSelectorProps): JSX.Element | nul
|
|
|
197
223
|
|
|
198
224
|
/**
|
|
199
225
|
* @module solidjsDocSearchPage
|
|
200
|
-
* @package @geenius/docs
|
|
226
|
+
* @package @geenius/docs/solidjs
|
|
201
227
|
* @description Renders the dedicated SolidJS docs search page, including
|
|
202
228
|
* query input, derived search results, and empty or loading states.
|
|
203
229
|
*/
|
|
@@ -208,6 +234,7 @@ interface DocSearchPageProps {
|
|
|
208
234
|
pageCount: number;
|
|
209
235
|
})[] | undefined>;
|
|
210
236
|
onSelectPage?: (page: DocPage$1, section: DocSection) => void;
|
|
237
|
+
class?: string;
|
|
211
238
|
}
|
|
212
239
|
/**
|
|
213
240
|
* Renders a full-page docs search experience for SolidJS consumers.
|
|
@@ -219,7 +246,7 @@ declare function DocSearchPage(props: DocSearchPageProps): JSX.Element;
|
|
|
219
246
|
|
|
220
247
|
/**
|
|
221
248
|
* @module solidjsCreateDocsAdmin
|
|
222
|
-
* @package @geenius/docs
|
|
249
|
+
* @package @geenius/docs/solidjs
|
|
223
250
|
* @description Adapts caller-provided section and page mutations into a
|
|
224
251
|
* stable SolidJS admin controller with normalized method signatures.
|
|
225
252
|
*/
|
|
@@ -281,7 +308,7 @@ declare function createDocsAdmin(mutations: {
|
|
|
281
308
|
|
|
282
309
|
/**
|
|
283
310
|
* @module solidjsDocsAdminPage
|
|
284
|
-
* @package @geenius/docs
|
|
311
|
+
* @package @geenius/docs/solidjs
|
|
285
312
|
* @description Renders the SolidJS docs administration surface for creating,
|
|
286
313
|
* selecting, publishing, archiving, and deleting sections and pages.
|
|
287
314
|
*/
|
|
@@ -293,6 +320,7 @@ interface DocsAdminPageProps {
|
|
|
293
320
|
})[] | undefined>;
|
|
294
321
|
allPages?: DocPage$1[];
|
|
295
322
|
admin: DocsAdminActions;
|
|
323
|
+
class?: string;
|
|
296
324
|
}
|
|
297
325
|
/**
|
|
298
326
|
* Renders the docs administration dashboard for SolidJS consumers.
|
|
@@ -304,7 +332,7 @@ declare function DocsAdminPage(props: DocsAdminPageProps): JSX.Element;
|
|
|
304
332
|
|
|
305
333
|
/**
|
|
306
334
|
* @module solidjsDocsIndexPage
|
|
307
|
-
* @package @geenius/docs
|
|
335
|
+
* @package @geenius/docs/solidjs
|
|
308
336
|
* @description Renders the SolidJS docs landing page with section cards,
|
|
309
337
|
* keyboard-accessible search launch, and empty or loading states.
|
|
310
338
|
*/
|
|
@@ -315,6 +343,7 @@ interface DocsIndexPageProps {
|
|
|
315
343
|
pageCount: number;
|
|
316
344
|
})[] | undefined>;
|
|
317
345
|
onSelectPage?: (page: DocPage$1, section: DocSection) => void;
|
|
346
|
+
class?: string;
|
|
318
347
|
}
|
|
319
348
|
/**
|
|
320
349
|
* Renders the root docs landing page for the SolidJS variant.
|
|
@@ -326,7 +355,7 @@ declare function DocsIndexPage(props: DocsIndexPageProps): JSX.Element;
|
|
|
326
355
|
|
|
327
356
|
/**
|
|
328
357
|
* @module solidjsDocViewPage
|
|
329
|
-
* @package @geenius/docs
|
|
358
|
+
* @package @geenius/docs/solidjs
|
|
330
359
|
* @description Renders the main SolidJS docs reading experience, including
|
|
331
360
|
* layout chrome, MDX content, table of contents, and sibling navigation.
|
|
332
361
|
*/
|
|
@@ -340,6 +369,7 @@ interface DocViewPageProps {
|
|
|
340
369
|
editPageUrl?: string;
|
|
341
370
|
onNavigate: (page: DocPage$1, section: DocSection) => void;
|
|
342
371
|
onIncrementView?: (pageId: string) => void;
|
|
372
|
+
class?: string;
|
|
343
373
|
}
|
|
344
374
|
/**
|
|
345
375
|
* Renders the docs reader view for a selected SolidJS page.
|
|
@@ -351,7 +381,7 @@ declare function DocViewPage(props: DocViewPageProps): JSX.Element;
|
|
|
351
381
|
|
|
352
382
|
/**
|
|
353
383
|
* @module solidjsCreateDocSearch
|
|
354
|
-
* @package @geenius/docs
|
|
384
|
+
* @package @geenius/docs/solidjs
|
|
355
385
|
* @description Creates the SolidJS docs search state machine, including the
|
|
356
386
|
* query signal, debounced execution, and normalized result lifecycle.
|
|
357
387
|
*/
|
|
@@ -383,7 +413,7 @@ declare function createDocSearch(searchFn: (query: string) => SearchResult[] | P
|
|
|
383
413
|
|
|
384
414
|
/**
|
|
385
415
|
* @module solidjsCreateDocs
|
|
386
|
-
* @package @geenius/docs
|
|
416
|
+
* @package @geenius/docs/solidjs
|
|
387
417
|
* @description Creates the canonical SolidJS docs state container that merges
|
|
388
418
|
* config, flattens pages, and tracks section, page, and search selection state.
|
|
389
419
|
*/
|
|
@@ -431,7 +461,7 @@ declare function createDocs(tree: Accessor<(DocSection & {
|
|
|
431
461
|
|
|
432
462
|
/**
|
|
433
463
|
* @module solidjsCreateTableOfContents
|
|
434
|
-
* @package @geenius/docs
|
|
464
|
+
* @package @geenius/docs/solidjs
|
|
435
465
|
* @description Derives the SolidJS docs table of contents from MDX content
|
|
436
466
|
* and tracks the active heading via intersection observer updates.
|
|
437
467
|
*/
|
|
@@ -456,4 +486,4 @@ interface TableOfContentsState {
|
|
|
456
486
|
*/
|
|
457
487
|
declare function createTableOfContents(mdxContent: Accessor<string | undefined>): TableOfContentsState;
|
|
458
488
|
|
|
459
|
-
export { Breadcrumbs, DocPage, DocSearch, DocSearchPage, DocSidebar, DocViewPage, DocsAdminPage, DocsIndexPage, DocsLayout, EditButton, PageNavigation, TableOfContents, VersionSelector, createDocSearch, createDocs, createDocsAdmin, createTableOfContents };
|
|
489
|
+
export { Breadcrumbs, DocPage, DocSearch, DocSearchPage, type DocSearchState, DocSidebar, DocViewPage, type DocsAdminActions, DocsAdminPage, DocsIndexPage, DocsLayout, type DocsSectionWithPages, type DocsState, EditButton, PageNavigation, TableOfContents, type TableOfContentsState, VersionSelector, type WithClassName, createDocSearch, createDocs, createDocsAdmin, createTableOfContents };
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { For, Show, createSignal, createUniqueId, createMemo, createEffect, children, onCleanup } from 'solid-js';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
2
4
|
import { jsx, jsxs, Fragment } from 'solid-js/h/jsx-runtime';
|
|
3
5
|
import remarkGfm from 'remark-gfm';
|
|
4
6
|
import { SolidMarkdown } from 'solid-markdown';
|
|
5
7
|
import { AnimatePresence, motion } from '@geenius/motion/solidjs';
|
|
6
8
|
|
|
7
9
|
// src/components/Breadcrumbs.tsx
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
8
13
|
function Breadcrumbs(props) {
|
|
9
14
|
if (props.items.length === 0) {
|
|
10
15
|
return null;
|
|
11
16
|
}
|
|
12
|
-
return /* @__PURE__ */ jsx("nav", { class: "flex items-center gap-1.5 text-sm", "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx(For, { each: props.items, children: (item, idx) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
+
return /* @__PURE__ */ jsx("nav", { class: cn("flex items-center gap-1.5 text-sm", props.class), "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx(For, { each: props.items, children: (item, idx) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
18
|
/* @__PURE__ */ jsx(Show, { when: idx() > 0, children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", class: "h-3.5 w-3.5 shrink-0 text-white/20", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6 4l4 4-4 4", stroke: "currentColor", "stroke-width": "1.5" }) }) }),
|
|
14
19
|
/* @__PURE__ */ jsx(Show, { when: idx() === props.items.length - 1, fallback: /* @__PURE__ */ jsx("a", { href: item.href, class: "truncate text-white/40 transition-colors hover:text-white/70", children: item.title }), children: /* @__PURE__ */ jsx("span", { class: "truncate text-white/60", children: item.title }) })
|
|
15
20
|
] }) }) });
|
|
16
21
|
}
|
|
17
22
|
|
|
18
|
-
// ../shared/dist/chunk-
|
|
23
|
+
// ../shared/dist/chunk-QKKVTCRJ.js
|
|
19
24
|
function toTocLevel(level) {
|
|
20
25
|
if (level === 2 || level === 3 || level === 4) {
|
|
21
26
|
return level;
|
|
@@ -173,11 +178,11 @@ function createHeading(Tag, className) {
|
|
|
173
178
|
return (props) => {
|
|
174
179
|
const text = getNodeText(props.children);
|
|
175
180
|
const id = slugify(text);
|
|
176
|
-
return /* @__PURE__ */ jsx(Tag, { id, class: className, children: /* @__PURE__ */ jsx("a", { href: `#${id}`, class: "transition-colors hover:text-indigo-300", children: props.children }) });
|
|
181
|
+
return /* @__PURE__ */ jsx(Tag, { id, class: cn(className), children: /* @__PURE__ */ jsx("a", { href: `#${id}`, class: "transition-colors hover:text-indigo-300", children: props.children }) });
|
|
177
182
|
};
|
|
178
183
|
}
|
|
179
184
|
function DocPage(props) {
|
|
180
|
-
return /* @__PURE__ */ jsx("article", { class: "prose-custom max-w-none", children: /* @__PURE__ */ jsx(
|
|
185
|
+
return /* @__PURE__ */ jsx("article", { class: cn("prose-custom max-w-none", props.class), children: /* @__PURE__ */ jsx(
|
|
181
186
|
SolidMarkdown,
|
|
182
187
|
{
|
|
183
188
|
remarkPlugins: [remarkGfm],
|
|
@@ -259,7 +264,7 @@ function DocSearch(props) {
|
|
|
259
264
|
if (!props.isOpen) {
|
|
260
265
|
return null;
|
|
261
266
|
}
|
|
262
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs("div", { class: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]", children: [
|
|
267
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs("div", { class: cn("fixed inset-0 z-50 flex items-start justify-center pt-[15vh]", props.class), children: [
|
|
263
268
|
/* @__PURE__ */ jsx(
|
|
264
269
|
motion.button,
|
|
265
270
|
{
|
|
@@ -473,7 +478,7 @@ function DocSidebar(props) {
|
|
|
473
478
|
) }) })
|
|
474
479
|
] });
|
|
475
480
|
};
|
|
476
|
-
return /* @__PURE__ */ jsxs("nav", { class: "flex flex-col gap-1 py-4", children: [
|
|
481
|
+
return /* @__PURE__ */ jsxs("nav", { class: cn("flex flex-col gap-1 py-4", props.class), children: [
|
|
477
482
|
/* @__PURE__ */ jsx("div", { class: "px-4 pb-3 text-xs font-bold uppercase tracking-widest text-zinc-400 dark:text-zinc-500", children: "Documentation" }),
|
|
478
483
|
/* @__PURE__ */ jsx(For, { each: topLevel(), children: (s) => renderSection(s, 0) })
|
|
479
484
|
] });
|
|
@@ -486,7 +491,10 @@ function TocLink(props) {
|
|
|
486
491
|
motion.a,
|
|
487
492
|
{
|
|
488
493
|
href: `#${props.item.id}`,
|
|
489
|
-
class:
|
|
494
|
+
class: cn(
|
|
495
|
+
"block truncate border-l-2 py-1 text-[13px] transition-all relative",
|
|
496
|
+
isActive() ? "border-indigo-500 text-indigo-400 font-medium" : "border-transparent text-white/40 hover:text-white/80 hover:border-white/20"
|
|
497
|
+
),
|
|
490
498
|
style: { "padding-left": `${12 + depth() * 12}px` },
|
|
491
499
|
whileHover: { x: 2 },
|
|
492
500
|
whileTap: { scale: 0.98 },
|
|
@@ -501,7 +509,7 @@ function TableOfContents(props) {
|
|
|
501
509
|
if (props.toc.length === 0) {
|
|
502
510
|
return null;
|
|
503
511
|
}
|
|
504
|
-
return /* @__PURE__ */ jsxs("nav", { class: "sticky top-24", children: [
|
|
512
|
+
return /* @__PURE__ */ jsxs("nav", { class: cn("sticky top-24", props.class), children: [
|
|
505
513
|
/* @__PURE__ */ jsx("h4", { class: "mb-3 text-xs font-semibold uppercase tracking-widest text-white/40", children: "On this page" }),
|
|
506
514
|
/* @__PURE__ */ jsx(motion.div, { class: "flex flex-col relative", layoutRoot: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(For, { each: props.toc, children: (item) => /* @__PURE__ */ jsx(motion.div, { initial: { opacity: 0, x: -10 }, animate: { opacity: 1, x: 0 }, children: /* @__PURE__ */ jsx(TocLink, { item, activeId: props.activeId }) }) }) }) })
|
|
507
515
|
] });
|
|
@@ -510,7 +518,7 @@ function DocsLayout(props) {
|
|
|
510
518
|
const resolvedChildren = children(() => props.children);
|
|
511
519
|
const breadcrumbs = () => props.breadcrumbs ?? [];
|
|
512
520
|
const toc = () => props.toc ?? [];
|
|
513
|
-
return /* @__PURE__ */ jsxs("div", { class: "flex min-h-screen bg-[#090a0f] text-white", children: [
|
|
521
|
+
return /* @__PURE__ */ jsxs("div", { class: cn("flex min-h-screen bg-[#090a0f] text-white", props.class), children: [
|
|
514
522
|
/* @__PURE__ */ jsx("aside", { class: "sticky top-0 hidden h-screen w-[260px] shrink-0 overflow-y-auto border-r border-white/5 bg-[#0b0c12] lg:block", children: /* @__PURE__ */ jsx(
|
|
515
523
|
DocSidebar,
|
|
516
524
|
{
|
|
@@ -565,7 +573,10 @@ function EditButton(props) {
|
|
|
565
573
|
href: `${props.editUrl.replace(/\/$/, "")}/${props.pageSlug}.mdx`,
|
|
566
574
|
target: "_blank",
|
|
567
575
|
rel: "noopener noreferrer",
|
|
568
|
-
class:
|
|
576
|
+
class: cn(
|
|
577
|
+
"inline-flex items-center gap-1.5 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-white/40 transition-colors hover:border-white/20 hover:text-white/60",
|
|
578
|
+
props.class
|
|
579
|
+
),
|
|
569
580
|
children: [
|
|
570
581
|
/* @__PURE__ */ jsx("svg", { "aria-hidden": "true", class: "h-3.5 w-3.5", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M11.5 1.5l3 3-9 9H2.5v-3l9-9z", "stroke-width": "1.5", "stroke-linejoin": "round" }) }),
|
|
571
582
|
"Edit this page"
|
|
@@ -577,7 +588,7 @@ function PageNavigation(props) {
|
|
|
577
588
|
if (!props.prev && !props.next) {
|
|
578
589
|
return null;
|
|
579
590
|
}
|
|
580
|
-
return /* @__PURE__ */ jsxs("div", { class: "mt-12 flex items-stretch gap-4 border-t border-white/10 pt-8", children: [
|
|
591
|
+
return /* @__PURE__ */ jsxs("div", { class: cn("mt-12 flex items-stretch gap-4 border-t border-white/10 pt-8", props.class), children: [
|
|
581
592
|
/* @__PURE__ */ jsx(Show, { when: props.prev, fallback: /* @__PURE__ */ jsx("div", { class: "flex-1" }), children: (prev) => /* @__PURE__ */ jsxs("a", { href: prev().href, class: "group flex flex-1 flex-col rounded-xl border border-white/10 p-4 transition-all hover:border-indigo-500/40 hover:bg-white/5", children: [
|
|
582
593
|
/* @__PURE__ */ jsx("span", { class: "text-xs text-white/40 group-hover:text-indigo-400 transition-colors", children: "\u2190 Previous" }),
|
|
583
594
|
/* @__PURE__ */ jsx("span", { class: "mt-1 text-sm font-medium text-white/80 group-hover:text-white transition-colors truncate", children: prev().title })
|
|
@@ -593,7 +604,7 @@ function VersionSelector(props) {
|
|
|
593
604
|
return null;
|
|
594
605
|
}
|
|
595
606
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
596
|
-
return /* @__PURE__ */ jsxs("div", { class: "relative", children: [
|
|
607
|
+
return /* @__PURE__ */ jsxs("div", { class: cn("relative", props.class), children: [
|
|
597
608
|
/* @__PURE__ */ jsxs(
|
|
598
609
|
"button",
|
|
599
610
|
{
|
|
@@ -681,8 +692,8 @@ function DocSearchPage(props) {
|
|
|
681
692
|
Show,
|
|
682
693
|
{
|
|
683
694
|
when: props.tree() !== void 0,
|
|
684
|
-
fallback: /* @__PURE__ */ jsx("div", { class: "min-h-screen bg-[#090a0f] px-6 py-16", children: /* @__PURE__ */ jsx("div", { class: "mx-auto max-w-2xl", children: /* @__PURE__ */ jsx("div", { class: "mb-8 h-12 animate-pulse rounded-xl bg-white/5" }) }) }),
|
|
685
|
-
children: /* @__PURE__ */ jsx("div", { class: "min-h-screen bg-[#090a0f] text-white", children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-2xl px-6 py-16", children: [
|
|
695
|
+
fallback: /* @__PURE__ */ jsx("div", { class: cn("min-h-screen bg-[#090a0f] px-6 py-16", props.class), children: /* @__PURE__ */ jsx("div", { class: "mx-auto max-w-2xl", children: /* @__PURE__ */ jsx("div", { class: "mb-8 h-12 animate-pulse rounded-xl bg-white/5" }) }) }),
|
|
696
|
+
children: /* @__PURE__ */ jsx("div", { class: cn("min-h-screen bg-[#090a0f] text-white", props.class), children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-2xl px-6 py-16", children: [
|
|
686
697
|
/* @__PURE__ */ jsx("h1", { class: "mb-8 text-2xl font-bold", children: "Search Documentation" }),
|
|
687
698
|
/* @__PURE__ */ jsxs("div", { class: "relative mb-8", children: [
|
|
688
699
|
/* @__PURE__ */ jsx(
|
|
@@ -781,8 +792,8 @@ function DocsAdminPage(props) {
|
|
|
781
792
|
Show,
|
|
782
793
|
{
|
|
783
794
|
when: props.tree?.() !== void 0,
|
|
784
|
-
fallback: /* @__PURE__ */ jsx("div", { class: "min-h-screen bg-[#090a0f] px-6 py-12", children: /* @__PURE__ */ jsx("div", { class: "mx-auto max-w-6xl", children: /* @__PURE__ */ jsx("div", { class: "mb-8 h-10 w-48 animate-pulse rounded bg-white/5" }) }) }),
|
|
785
|
-
children: /* @__PURE__ */ jsx("div", { class: "min-h-screen bg-[#090a0f] text-white", children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-6xl px-6 py-12", children: [
|
|
795
|
+
fallback: /* @__PURE__ */ jsx("div", { class: cn("min-h-screen bg-[#090a0f] px-6 py-12", props.class), children: /* @__PURE__ */ jsx("div", { class: "mx-auto max-w-6xl", children: /* @__PURE__ */ jsx("div", { class: "mb-8 h-10 w-48 animate-pulse rounded bg-white/5" }) }) }),
|
|
796
|
+
children: /* @__PURE__ */ jsx("div", { class: cn("min-h-screen bg-[#090a0f] text-white", props.class), children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-6xl px-6 py-12", children: [
|
|
786
797
|
/* @__PURE__ */ jsx("h1", { class: "mb-8 text-2xl font-bold", children: "Docs Admin" }),
|
|
787
798
|
/* @__PURE__ */ jsxs("div", { class: "grid gap-6 md:grid-cols-2", children: [
|
|
788
799
|
/* @__PURE__ */ jsxs("div", { class: "rounded-xl border border-white/8 bg-white/[0.02] p-5", children: [
|
|
@@ -1100,7 +1111,7 @@ function DocsIndexPage(props) {
|
|
|
1100
1111
|
Show,
|
|
1101
1112
|
{
|
|
1102
1113
|
when: !docs.isLoading(),
|
|
1103
|
-
fallback: /* @__PURE__ */ jsx("div", { class: "min-h-screen bg-[#090a0f] px-6 py-16", children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-5xl", children: [
|
|
1114
|
+
fallback: /* @__PURE__ */ jsx("div", { class: cn("min-h-screen bg-[#090a0f] px-6 py-16", props.class), children: /* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-5xl", children: [
|
|
1104
1115
|
/* @__PURE__ */ jsx("div", { class: "mb-10 h-10 w-64 animate-pulse rounded-lg bg-white/5" }),
|
|
1105
1116
|
/* @__PURE__ */ jsx("div", { class: "mb-8 h-12 w-full max-w-xl animate-pulse rounded-xl bg-white/5" }),
|
|
1106
1117
|
/* @__PURE__ */ jsx("div", { class: "grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: /* @__PURE__ */ jsx(For, { each: Array(6), children: () => /* @__PURE__ */ jsx("div", { class: "h-36 animate-pulse rounded-xl bg-white/5" }) }) })
|
|
@@ -1109,12 +1120,21 @@ function DocsIndexPage(props) {
|
|
|
1109
1120
|
Show,
|
|
1110
1121
|
{
|
|
1111
1122
|
when: docs.sections().length > 0,
|
|
1112
|
-
fallback: /* @__PURE__ */ jsxs(
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1123
|
+
fallback: /* @__PURE__ */ jsxs(
|
|
1124
|
+
"div",
|
|
1125
|
+
{
|
|
1126
|
+
class: cn(
|
|
1127
|
+
"flex min-h-screen flex-col items-center justify-center bg-[#090a0f] text-center",
|
|
1128
|
+
props.class
|
|
1129
|
+
),
|
|
1130
|
+
children: [
|
|
1131
|
+
/* @__PURE__ */ jsx("div", { class: "mb-4 text-6xl opacity-30", children: "\u{1F4DA}" }),
|
|
1132
|
+
/* @__PURE__ */ jsx("h2", { class: "mb-2 text-xl font-semibold text-white/80", children: "No documentation yet" }),
|
|
1133
|
+
/* @__PURE__ */ jsx("p", { class: "max-w-sm text-sm text-white/40", children: "Create your first section and pages to get started." })
|
|
1134
|
+
]
|
|
1135
|
+
}
|
|
1136
|
+
),
|
|
1137
|
+
children: /* @__PURE__ */ jsxs("div", { class: cn("min-h-screen bg-[#090a0f] text-white", props.class), children: [
|
|
1118
1138
|
/* @__PURE__ */ jsxs("div", { class: "mx-auto max-w-5xl px-6 py-16", children: [
|
|
1119
1139
|
/* @__PURE__ */ jsx("h1", { class: "mb-2 text-4xl font-bold tracking-tight", children: "Documentation" }),
|
|
1120
1140
|
/* @__PURE__ */ jsx("p", { class: "mb-10 text-lg text-white/50", children: "Browse guides, API references, and tutorials." }),
|
|
@@ -1251,7 +1271,7 @@ function DocViewPage(props) {
|
|
|
1251
1271
|
Show,
|
|
1252
1272
|
{
|
|
1253
1273
|
when: !docs.isLoading() && props.page() !== void 0,
|
|
1254
|
-
fallback: /* @__PURE__ */ jsxs("div", { class: "flex min-h-screen bg-[#090a0f]", children: [
|
|
1274
|
+
fallback: /* @__PURE__ */ jsxs("div", { class: cn("flex min-h-screen bg-[#090a0f]", props.class), children: [
|
|
1255
1275
|
/* @__PURE__ */ jsx("div", { class: "hidden w-[260px] shrink-0 border-r border-white/5 bg-[#0b0c12] lg:block", children: /* @__PURE__ */ jsx("div", { class: "space-y-3 p-4", children: Array.from({ length: 8 }).map(() => /* @__PURE__ */ jsx("div", { class: "h-8 animate-pulse rounded-lg bg-white/5" })) }) }),
|
|
1256
1276
|
/* @__PURE__ */ jsx("div", { class: "flex-1 px-10 py-8", children: /* @__PURE__ */ jsx("div", { class: "mx-auto max-w-3xl space-y-4", children: /* @__PURE__ */ jsx("div", { class: "h-10 w-96 animate-pulse rounded bg-white/5" }) }) })
|
|
1257
1277
|
] }),
|
|
@@ -1259,10 +1279,19 @@ function DocViewPage(props) {
|
|
|
1259
1279
|
Show,
|
|
1260
1280
|
{
|
|
1261
1281
|
when: props.page(),
|
|
1262
|
-
fallback: /* @__PURE__ */ jsxs(
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1282
|
+
fallback: /* @__PURE__ */ jsxs(
|
|
1283
|
+
"div",
|
|
1284
|
+
{
|
|
1285
|
+
class: cn(
|
|
1286
|
+
"flex min-h-screen flex-col items-center justify-center bg-[#090a0f] text-center",
|
|
1287
|
+
props.class
|
|
1288
|
+
),
|
|
1289
|
+
children: [
|
|
1290
|
+
/* @__PURE__ */ jsx("div", { class: "mb-4 text-6xl opacity-30", children: "\u{1F50D}" }),
|
|
1291
|
+
/* @__PURE__ */ jsx("h2", { class: "mb-2 text-xl font-semibold text-white/80", children: "Page not found" })
|
|
1292
|
+
]
|
|
1293
|
+
}
|
|
1294
|
+
),
|
|
1266
1295
|
children: (page) => /* @__PURE__ */ jsxs(
|
|
1267
1296
|
DocsLayout,
|
|
1268
1297
|
{
|
|
@@ -1272,6 +1301,7 @@ function DocViewPage(props) {
|
|
|
1272
1301
|
breadcrumbs: breadcrumbs(),
|
|
1273
1302
|
currentPageId: page().id,
|
|
1274
1303
|
onNavigate: props.onNavigate,
|
|
1304
|
+
class: props.class,
|
|
1275
1305
|
children: [
|
|
1276
1306
|
/* @__PURE__ */ jsxs("div", { class: "mb-8", children: [
|
|
1277
1307
|
/* @__PURE__ */ jsx("h1", { class: "mb-3 text-3xl font-bold tracking-tight", children: page().title }),
|