@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 React$1 from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @module reactBreadcrumbs
|
|
7
|
-
* @package @geenius/docs
|
|
7
|
+
* @package @geenius/docs/react
|
|
8
8
|
* @description Renders breadcrumb navigation for the React docs variant using
|
|
9
9
|
* the shared docs route metadata and Tailwind styling contract.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
interface BreadcrumbsProps {
|
|
13
13
|
items: BreadcrumbItem[];
|
|
14
|
+
className?: string;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Renders the current docs breadcrumb trail.
|
|
@@ -18,11 +19,11 @@ interface BreadcrumbsProps {
|
|
|
18
19
|
* @param props - Breadcrumb items describing the current page ancestry.
|
|
19
20
|
* @returns Breadcrumb navigation or `null` when there are no items to show.
|
|
20
21
|
*/
|
|
21
|
-
declare function Breadcrumbs({ items, }: BreadcrumbsProps): React$1.JSX.Element | null;
|
|
22
|
+
declare function Breadcrumbs({ items, className, }: BreadcrumbsProps): React$1.JSX.Element | null;
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* @module reactDocPage
|
|
25
|
-
* @package @geenius/docs
|
|
26
|
+
* @package @geenius/docs/react
|
|
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({ items, }: BreadcrumbsProps): React$1.JSX.Element
|
|
|
30
31
|
|
|
31
32
|
interface DocPageProps {
|
|
32
33
|
page: DocPage$1;
|
|
34
|
+
className?: 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): React$1.JSX.Element;
|
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* @module reactDocSearch
|
|
44
|
-
* @package @geenius/docs
|
|
46
|
+
* @package @geenius/docs/react
|
|
45
47
|
* @description Provides the React command-palette style docs search modal with
|
|
46
48
|
* animated presentation, keyboard navigation, and result highlighting.
|
|
47
49
|
*/
|
|
@@ -53,6 +55,7 @@ interface DocSearchProps {
|
|
|
53
55
|
onSelect: (result: SearchResult) => void;
|
|
54
56
|
isOpen: boolean;
|
|
55
57
|
onClose: () => void;
|
|
58
|
+
className?: string;
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* Renders the modal search surface for the React docs variant.
|
|
@@ -60,22 +63,42 @@ interface DocSearchProps {
|
|
|
60
63
|
* @param props - Search results, query state, and modal interaction handlers.
|
|
61
64
|
* @returns Search dialog markup when open, otherwise `null`.
|
|
62
65
|
*/
|
|
63
|
-
declare function DocSearch({ results, query, onQuery, onSelect, isOpen, onClose, }: DocSearchProps): React$1.JSX.Element | null;
|
|
66
|
+
declare function DocSearch({ results, query, onQuery, onSelect, isOpen, onClose, className, }: DocSearchProps): React$1.JSX.Element | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @module docsReactTypes
|
|
70
|
+
* @package @geenius/docs/react
|
|
71
|
+
* @description Declares the React-specific supporting types that keep the
|
|
72
|
+
* exported docs components aligned on shared section/page shapes and a common
|
|
73
|
+
* optional `className` extension point.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Optional `className` contract shared by React docs exports.
|
|
78
|
+
*/
|
|
79
|
+
interface WithClassName {
|
|
80
|
+
className?: 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
|
+
};
|
|
64
89
|
|
|
65
90
|
/**
|
|
66
91
|
* @module reactDocSidebar
|
|
67
|
-
* @package @geenius/docs
|
|
92
|
+
* @package @geenius/docs/react
|
|
68
93
|
* @description Renders the hierarchical sidebar navigation used by the React
|
|
69
94
|
* docs variant, including animated section expansion and active page states.
|
|
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
|
+
className?: string;
|
|
79
102
|
}
|
|
80
103
|
/**
|
|
81
104
|
* Sidebar navigation for docs sections and pages.
|
|
@@ -83,19 +106,17 @@ interface DocSidebarProps {
|
|
|
83
106
|
* @param props - Section tree, active page id, and page navigation callback.
|
|
84
107
|
* @returns Sidebar markup for the React docs experience.
|
|
85
108
|
*/
|
|
86
|
-
declare function DocSidebar({ sections, currentPageId, onNavigate, }: DocSidebarProps): React.JSX.Element;
|
|
109
|
+
declare function DocSidebar({ sections, currentPageId, onNavigate, className, }: DocSidebarProps): React.JSX.Element;
|
|
87
110
|
|
|
88
111
|
/**
|
|
89
112
|
* @module reactDocsLayout
|
|
90
|
-
* @package @geenius/docs
|
|
113
|
+
* @package @geenius/docs/react
|
|
91
114
|
* @description Composes the React docs page shell with sidebar navigation,
|
|
92
115
|
* breadcrumb chrome, animated content transitions, and the right-rail TOC.
|
|
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: React$1.ReactNode;
|
|
127
|
+
className?: string;
|
|
106
128
|
}
|
|
107
129
|
/**
|
|
108
130
|
* Layout shell shared by React docs pages.
|
|
@@ -110,17 +132,12 @@ interface DocsLayoutProps {
|
|
|
110
132
|
* @param props - Navigation state, table-of-contents state, and page content.
|
|
111
133
|
* @returns Full page layout for React docs screens.
|
|
112
134
|
*/
|
|
113
|
-
declare function DocsLayout({ sections, toc, activeHeadingId, breadcrumbs, currentPageId, onNavigate, children, }: DocsLayoutProps): React$1.JSX.Element;
|
|
135
|
+
declare function DocsLayout({ sections, toc, activeHeadingId, breadcrumbs, currentPageId, onNavigate, children, className, }: DocsLayoutProps): React$1.JSX.Element;
|
|
114
136
|
|
|
115
|
-
/**
|
|
116
|
-
* @module reactEditButton
|
|
117
|
-
* @package @geenius/docs-react
|
|
118
|
-
* @description Exposes the React docs "Edit this page" affordance so hosts can
|
|
119
|
-
* route readers to the source repository for the active document.
|
|
120
|
-
*/
|
|
121
137
|
interface EditButtonProps {
|
|
122
138
|
pageSlug: string;
|
|
123
139
|
editUrl?: string;
|
|
140
|
+
className?: string;
|
|
124
141
|
}
|
|
125
142
|
/**
|
|
126
143
|
* Renders the source-edit link for the current docs page.
|
|
@@ -128,14 +145,8 @@ interface EditButtonProps {
|
|
|
128
145
|
* @param props - Page slug and optional edit URL base.
|
|
129
146
|
* @returns Edit link markup or `null` when editing is disabled.
|
|
130
147
|
*/
|
|
131
|
-
declare function EditButton({ pageSlug, editUrl, }: EditButtonProps): React.JSX.Element | null;
|
|
148
|
+
declare function EditButton({ pageSlug, editUrl, className, }: EditButtonProps): React.JSX.Element | null;
|
|
132
149
|
|
|
133
|
-
/**
|
|
134
|
-
* @module reactPageNavigation
|
|
135
|
-
* @package @geenius/docs-react
|
|
136
|
-
* @description Renders previous and next article affordances for the React
|
|
137
|
-
* docs variant using the shared page navigation contract.
|
|
138
|
-
*/
|
|
139
150
|
interface PageNavigationProps {
|
|
140
151
|
prev?: {
|
|
141
152
|
title: string;
|
|
@@ -145,6 +156,7 @@ interface PageNavigationProps {
|
|
|
145
156
|
title: string;
|
|
146
157
|
href: string;
|
|
147
158
|
};
|
|
159
|
+
className?: string;
|
|
148
160
|
}
|
|
149
161
|
/**
|
|
150
162
|
* Renders previous and next page links for the active article.
|
|
@@ -152,11 +164,11 @@ interface PageNavigationProps {
|
|
|
152
164
|
* @param props - Optional previous and next navigation links.
|
|
153
165
|
* @returns Navigation markup or `null` when no links are available.
|
|
154
166
|
*/
|
|
155
|
-
declare function PageNavigation({ prev, next, }: PageNavigationProps): React.JSX.Element | null;
|
|
167
|
+
declare function PageNavigation({ prev, next, className, }: PageNavigationProps): React.JSX.Element | null;
|
|
156
168
|
|
|
157
169
|
/**
|
|
158
170
|
* @module reactTableOfContents
|
|
159
|
-
* @package @geenius/docs
|
|
171
|
+
* @package @geenius/docs/react
|
|
160
172
|
* @description Renders the React docs table of contents with animated active
|
|
161
173
|
* heading states and nested anchor links derived from the shared TOC model.
|
|
162
174
|
*/
|
|
@@ -164,6 +176,7 @@ declare function PageNavigation({ prev, next, }: PageNavigationProps): React.JSX
|
|
|
164
176
|
interface TableOfContentsProps {
|
|
165
177
|
toc: TocItem[];
|
|
166
178
|
activeId?: string;
|
|
179
|
+
className?: string;
|
|
167
180
|
}
|
|
168
181
|
/**
|
|
169
182
|
* Renders the page table of contents.
|
|
@@ -171,11 +184,11 @@ interface TableOfContentsProps {
|
|
|
171
184
|
* @param props - TOC entries and the currently active heading id.
|
|
172
185
|
* @returns TOC navigation or `null` when the page has no headings.
|
|
173
186
|
*/
|
|
174
|
-
declare function TableOfContents({ toc, activeId, }: TableOfContentsProps): React.JSX.Element | null;
|
|
187
|
+
declare function TableOfContents({ toc, activeId, className, }: TableOfContentsProps): React.JSX.Element | null;
|
|
175
188
|
|
|
176
189
|
/**
|
|
177
190
|
* @module reactVersionSelector
|
|
178
|
-
* @package @geenius/docs
|
|
191
|
+
* @package @geenius/docs/react
|
|
179
192
|
* @description Provides the React docs version switcher with a disclosure menu
|
|
180
193
|
* for choosing among published documentation versions.
|
|
181
194
|
*/
|
|
@@ -183,6 +196,7 @@ interface VersionSelectorProps {
|
|
|
183
196
|
versions: string[];
|
|
184
197
|
current: string;
|
|
185
198
|
onSelect: (version: string) => void;
|
|
199
|
+
className?: string;
|
|
186
200
|
}
|
|
187
201
|
/**
|
|
188
202
|
* Renders a version switcher when multiple docs versions exist.
|
|
@@ -190,11 +204,11 @@ interface VersionSelectorProps {
|
|
|
190
204
|
* @param props - Supported versions, the current version, and selection callback.
|
|
191
205
|
* @returns Version selector markup or `null` when only one version exists.
|
|
192
206
|
*/
|
|
193
|
-
declare function VersionSelector({ versions, current, onSelect, }: VersionSelectorProps): React.JSX.Element | null;
|
|
207
|
+
declare function VersionSelector({ versions, current, onSelect, className, }: VersionSelectorProps): React.JSX.Element | null;
|
|
194
208
|
|
|
195
209
|
/**
|
|
196
210
|
* @module reactUseDocSearch
|
|
197
|
-
* @package @geenius/docs
|
|
211
|
+
* @package @geenius/docs/react
|
|
198
212
|
* @description Implements debounced search state for the React docs variant so
|
|
199
213
|
* modal and page-level search flows share a common query lifecycle.
|
|
200
214
|
*/
|
|
@@ -220,7 +234,7 @@ declare function useDocSearch(searchFn: (query: string) => SearchResult[] | Prom
|
|
|
220
234
|
|
|
221
235
|
/**
|
|
222
236
|
* @module reactUseDocs
|
|
223
|
-
* @package @geenius/docs
|
|
237
|
+
* @package @geenius/docs/react
|
|
224
238
|
* @description Provides the core React docs state container that normalizes
|
|
225
239
|
* section trees, current page selection, search state, and merged config.
|
|
226
240
|
*/
|
|
@@ -257,7 +271,7 @@ declare function useDocs(tree: (DocSection & {
|
|
|
257
271
|
|
|
258
272
|
/**
|
|
259
273
|
* @module reactUseDocsAdmin
|
|
260
|
-
* @package @geenius/docs
|
|
274
|
+
* @package @geenius/docs/react
|
|
261
275
|
* @description Wraps docs admin mutations in stable React callbacks so the
|
|
262
276
|
* admin pages can manage sections and pages without coupling to one backend.
|
|
263
277
|
*/
|
|
@@ -323,7 +337,7 @@ declare function useDocsAdmin(mutations: {
|
|
|
323
337
|
|
|
324
338
|
/**
|
|
325
339
|
* @module reactUseTableOfContents
|
|
326
|
-
* @package @geenius/docs
|
|
340
|
+
* @package @geenius/docs/react
|
|
327
341
|
* @description Tracks the extracted table of contents and active heading state
|
|
328
342
|
* for rendered React docs pages.
|
|
329
343
|
*/
|
|
@@ -346,7 +360,7 @@ declare function useTableOfContents(mdxContent: string | undefined): TableOfCont
|
|
|
346
360
|
|
|
347
361
|
/**
|
|
348
362
|
* @module reactDocSearchPage
|
|
349
|
-
* @package @geenius/docs
|
|
363
|
+
* @package @geenius/docs/react
|
|
350
364
|
* @description Renders the dedicated React docs search page with a full-page
|
|
351
365
|
* query input, ranked search results, and empty-state messaging.
|
|
352
366
|
*/
|
|
@@ -357,6 +371,7 @@ interface DocSearchPageProps {
|
|
|
357
371
|
pageCount: number;
|
|
358
372
|
})[] | undefined;
|
|
359
373
|
onSelectPage?: (page: DocPage$1, section: DocSection) => void;
|
|
374
|
+
className?: string;
|
|
360
375
|
}
|
|
361
376
|
/**
|
|
362
377
|
* Dedicated search page for the React docs variant.
|
|
@@ -364,11 +379,11 @@ interface DocSearchPageProps {
|
|
|
364
379
|
* @param props - Docs tree and optional page selection handler.
|
|
365
380
|
* @returns Search page UI or a loading state when the tree is unresolved.
|
|
366
381
|
*/
|
|
367
|
-
declare function DocSearchPage({ tree, onSelectPage, }: DocSearchPageProps): React.JSX.Element;
|
|
382
|
+
declare function DocSearchPage({ tree, onSelectPage, className, }: DocSearchPageProps): React.JSX.Element;
|
|
368
383
|
|
|
369
384
|
/**
|
|
370
385
|
* @module reactDocsAdminPage
|
|
371
|
-
* @package @geenius/docs
|
|
386
|
+
* @package @geenius/docs/react
|
|
372
387
|
* @description Renders the React docs admin surface for creating, updating,
|
|
373
388
|
* publishing, and deleting docs sections and pages.
|
|
374
389
|
*/
|
|
@@ -380,6 +395,7 @@ interface DocsAdminPageProps {
|
|
|
380
395
|
})[] | undefined;
|
|
381
396
|
allPages?: DocPage$1[];
|
|
382
397
|
admin: DocsAdminActions;
|
|
398
|
+
className?: string;
|
|
383
399
|
}
|
|
384
400
|
/**
|
|
385
401
|
* Admin page for section and page management in the React docs variant.
|
|
@@ -387,11 +403,11 @@ interface DocsAdminPageProps {
|
|
|
387
403
|
* @param props - Tree data, optional page list, and admin actions.
|
|
388
404
|
* @returns Admin UI for managing docs content.
|
|
389
405
|
*/
|
|
390
|
-
declare function DocsAdminPage({ tree, allPages, admin, }: DocsAdminPageProps): React.JSX.Element;
|
|
406
|
+
declare function DocsAdminPage({ tree, allPages, admin, className, }: DocsAdminPageProps): React.JSX.Element;
|
|
391
407
|
|
|
392
408
|
/**
|
|
393
409
|
* @module reactDocsIndexPage
|
|
394
|
-
* @package @geenius/docs
|
|
410
|
+
* @package @geenius/docs/react
|
|
395
411
|
* @description Renders the React docs landing page with section discovery,
|
|
396
412
|
* recent updates, and command-palette search entry points.
|
|
397
413
|
*/
|
|
@@ -402,6 +418,7 @@ interface DocsIndexPageProps {
|
|
|
402
418
|
pageCount: number;
|
|
403
419
|
})[] | undefined;
|
|
404
420
|
onSelectPage?: (page: DocPage$1, section: DocSection) => void;
|
|
421
|
+
className?: string;
|
|
405
422
|
}
|
|
406
423
|
/**
|
|
407
424
|
* Landing page for the React docs experience.
|
|
@@ -409,11 +426,11 @@ interface DocsIndexPageProps {
|
|
|
409
426
|
* @param props - Docs tree plus optional page selection handler.
|
|
410
427
|
* @returns Landing page UI for the React docs variant.
|
|
411
428
|
*/
|
|
412
|
-
declare function DocsIndexPage({ tree, onSelectPage, }: DocsIndexPageProps): React.JSX.Element;
|
|
429
|
+
declare function DocsIndexPage({ tree, onSelectPage, className, }: DocsIndexPageProps): React.JSX.Element;
|
|
413
430
|
|
|
414
431
|
/**
|
|
415
432
|
* @module reactDocViewPage
|
|
416
|
-
* @package @geenius/docs
|
|
433
|
+
* @package @geenius/docs/react
|
|
417
434
|
* @description Renders the primary React docs article page with layout chrome,
|
|
418
435
|
* metadata, TOC tracking, edit actions, and previous or next navigation.
|
|
419
436
|
*/
|
|
@@ -427,6 +444,7 @@ interface DocViewPageProps {
|
|
|
427
444
|
editPageUrl?: string;
|
|
428
445
|
onNavigate: (page: DocPage$1, section: DocSection) => void;
|
|
429
446
|
onIncrementView?: (pageId: string) => void;
|
|
447
|
+
className?: string;
|
|
430
448
|
}
|
|
431
449
|
/**
|
|
432
450
|
* Detailed article page for the React docs variant.
|
|
@@ -434,6 +452,6 @@ interface DocViewPageProps {
|
|
|
434
452
|
* @param props - Docs tree, active page, and page-level interaction handlers.
|
|
435
453
|
* @returns Detailed page view or an appropriate loading or empty state.
|
|
436
454
|
*/
|
|
437
|
-
declare function DocViewPage({ tree, page, editPageUrl, onNavigate, onIncrementView, }: DocViewPageProps): React.JSX.Element;
|
|
455
|
+
declare function DocViewPage({ tree, page, editPageUrl, onNavigate, onIncrementView, className, }: DocViewPageProps): React.JSX.Element;
|
|
438
456
|
|
|
439
|
-
export { Breadcrumbs, DocPage, DocSearch, DocSearchPage, type DocSearchState, DocSidebar, DocViewPage, type DocsAdminActions, DocsAdminPage, DocsIndexPage, DocsLayout, type DocsState, EditButton, PageNavigation, TableOfContents, type TableOfContentsState, VersionSelector, useDocSearch, useDocs, useDocsAdmin, useTableOfContents };
|
|
457
|
+
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, useDocSearch, useDocs, useDocsAdmin, useTableOfContents };
|