boltdocs 1.0.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CodeBlock-37XMKCYY.mjs → CodeBlock-V3Z5EKGR.mjs} +0 -1
- package/dist/{PackageManagerTabs-4NWXLXQO.mjs → PackageManagerTabs-XEKI3L7P.mjs} +0 -2
- package/dist/{SearchDialog-FTOQZ763.mjs → SearchDialog-5EDRACEG.mjs} +1 -2
- package/dist/{SearchDialog-ZAZXYIFX.css → SearchDialog-X57WPTNN.css} +57 -129
- package/dist/{Video-I6QY4X7J.mjs → Video-KNTY5BNO.mjs} +0 -1
- package/dist/cache-EHR7SXRU.mjs +12 -0
- package/dist/chunk-GSYECEZY.mjs +381 -0
- package/dist/{chunk-ZFCOLEXN.mjs → chunk-NS7WHDYA.mjs} +234 -426
- package/dist/client/index.css +57 -129
- package/dist/client/index.d.mts +39 -8
- package/dist/client/index.d.ts +39 -8
- package/dist/client/index.js +557 -564
- package/dist/client/index.mjs +305 -18
- package/dist/client/ssr.css +57 -129
- package/dist/client/ssr.d.mts +1 -1
- package/dist/client/ssr.d.ts +1 -1
- package/dist/client/ssr.js +257 -558
- package/dist/client/ssr.mjs +1 -2
- package/dist/{config-D2XmHJYe.d.mts → config-BD5ZHz15.d.mts} +7 -0
- package/dist/{config-D2XmHJYe.d.ts → config-BD5ZHz15.d.ts} +7 -0
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +457 -118
- package/dist/node/index.mjs +144 -147
- package/dist/{index-CRQKWAeo.d.mts → types-CvrzTbEX.d.mts} +1 -28
- package/dist/{index-CRQKWAeo.d.ts → types-CvrzTbEX.d.ts} +1 -28
- package/package.json +2 -2
- package/src/client/app/index.tsx +32 -110
- package/src/client/app/preload.tsx +1 -1
- package/src/client/index.ts +1 -1
- package/src/client/ssr.tsx +2 -1
- package/src/client/theme/components/Playground/Playground.tsx +40 -2
- package/src/client/theme/components/mdx/mdx-components.css +39 -20
- package/src/client/theme/styles/markdown.css +4 -4
- package/src/client/theme/styles.css +0 -1
- package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +1 -1
- package/src/client/theme/ui/Layout/Layout.tsx +3 -14
- package/src/client/theme/ui/Layout/responsive.css +0 -4
- package/src/client/theme/ui/Link/Link.tsx +52 -0
- package/src/client/theme/ui/Navbar/Navbar.tsx +1 -1
- package/src/client/theme/ui/NotFound/NotFound.tsx +0 -1
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +45 -2
- package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +1 -1
- package/src/client/theme/ui/Sidebar/Sidebar.tsx +44 -40
- package/src/client/theme/ui/Sidebar/sidebar.css +25 -58
- package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +1 -1
- package/src/client/types.ts +50 -0
- package/src/node/cache.ts +360 -46
- package/src/node/config.ts +7 -0
- package/src/node/mdx.ts +83 -4
- package/src/node/plugin/index.ts +3 -0
- package/src/node/routes/cache.ts +5 -1
- package/src/node/routes/index.ts +17 -2
- package/src/node/ssg/index.ts +4 -0
- package/dist/Playground-OE2OE6B6.mjs +0 -7
- package/dist/chunk-PN4GCTYG.mjs +0 -67
- package/dist/chunk-X2TDGMTR.mjs +0 -64
- package/dist/chunk-X6BYQHVC.mjs +0 -12
- package/dist/node/cli/index.d.mts +0 -1
- package/dist/node/cli/index.d.ts +0 -1
- package/dist/node/cli/index.js +0 -199
- package/dist/node/cli/index.mjs +0 -154
- package/src/client/theme/styles/home.css +0 -60
package/dist/client/index.css
CHANGED
|
@@ -422,73 +422,43 @@ a {
|
|
|
422
422
|
flex: 1;
|
|
423
423
|
}
|
|
424
424
|
.boltdocs-main-container.sidebar-collapsed .boltdocs-sidebar {
|
|
425
|
-
width:
|
|
426
|
-
padding
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
pointer-events: none;
|
|
425
|
+
width: 54px;
|
|
426
|
+
padding: 1rem 0;
|
|
427
|
+
border-right: 1px solid var(--ld-border-subtle);
|
|
428
|
+
opacity: 1;
|
|
429
|
+
pointer-events: auto;
|
|
431
430
|
overflow: hidden;
|
|
432
431
|
}
|
|
433
|
-
.sidebar-
|
|
434
|
-
|
|
435
|
-
bottom: 2rem;
|
|
436
|
-
left: 2rem;
|
|
437
|
-
width: 2.75rem;
|
|
438
|
-
height: 2.75rem;
|
|
439
|
-
border-radius: 50%;
|
|
440
|
-
background-color: var(--ld-surface);
|
|
441
|
-
border: 1px solid var(--ld-border-strong);
|
|
442
|
-
color: var(--ld-text-muted);
|
|
432
|
+
.sidebar-collapse {
|
|
433
|
+
width: 100%;
|
|
443
434
|
display: flex;
|
|
444
435
|
align-items: center;
|
|
445
|
-
justify-content:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
449
|
-
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
450
|
-
opacity: 0;
|
|
451
|
-
pointer-events: none;
|
|
452
|
-
transform: translateY(20px) scale(0.9);
|
|
453
|
-
}
|
|
454
|
-
.sidebar-toggle-floating:hover {
|
|
455
|
-
background-color: var(--ld-bg-soft);
|
|
456
|
-
color: var(--ld-text-main);
|
|
457
|
-
transform: translateY(0px) scale(1.05);
|
|
458
|
-
border-color: var(--ld-color-primary);
|
|
436
|
+
justify-content: flex-end;
|
|
437
|
+
padding: 0 0.75rem 1rem;
|
|
438
|
+
transition: justify-content 0.3s ease;
|
|
459
439
|
}
|
|
460
|
-
.sidebar-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
.boltdocs-main-container.sidebar-collapsed .sidebar-toggle-floating {
|
|
464
|
-
opacity: 1;
|
|
465
|
-
pointer-events: auto;
|
|
466
|
-
transform: translateY(0) scale(1);
|
|
467
|
-
}
|
|
468
|
-
.sidebar-footer {
|
|
469
|
-
margin-top: 2rem;
|
|
470
|
-
padding-top: 1rem;
|
|
471
|
-
border-top: 1px solid var(--ld-border-subtle);
|
|
440
|
+
.boltdocs-main-container.sidebar-collapsed .sidebar-collapse {
|
|
441
|
+
justify-content: center;
|
|
442
|
+
padding: 0 0 1rem;
|
|
472
443
|
}
|
|
473
444
|
.sidebar-collapse-btn {
|
|
445
|
+
color: var(--ld-text-muted);
|
|
446
|
+
border: none;
|
|
447
|
+
box-shadow: none;
|
|
448
|
+
background-color: transparent;
|
|
449
|
+
cursor: pointer;
|
|
474
450
|
display: flex;
|
|
475
451
|
align-items: center;
|
|
476
|
-
|
|
477
|
-
width:
|
|
478
|
-
|
|
479
|
-
background: none;
|
|
480
|
-
border: none;
|
|
452
|
+
justify-content: center;
|
|
453
|
+
width: 32px;
|
|
454
|
+
height: 32px;
|
|
481
455
|
border-radius: var(--ld-radius-md);
|
|
482
|
-
|
|
483
|
-
font-family: var(--ld-font-sans);
|
|
484
|
-
font-size: 0.8125rem;
|
|
485
|
-
font-weight: 500;
|
|
486
|
-
cursor: pointer;
|
|
487
|
-
transition: all 0.2s ease;
|
|
456
|
+
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
488
457
|
}
|
|
489
458
|
.sidebar-collapse-btn:hover {
|
|
490
|
-
background-color: var(--ld-bg-
|
|
491
|
-
color: var(--ld-
|
|
459
|
+
background-color: var(--ld-bg-mute);
|
|
460
|
+
color: var(--ld-text-main);
|
|
461
|
+
transform: scale(1.05);
|
|
492
462
|
}
|
|
493
463
|
.boltdocs-sidebar::-webkit-scrollbar {
|
|
494
464
|
width: 4px;
|
|
@@ -1142,11 +1112,11 @@ a {
|
|
|
1142
1112
|
background-color: transparent !important;
|
|
1143
1113
|
}
|
|
1144
1114
|
.code-block-wrapper pre > code {
|
|
1145
|
-
|
|
1146
|
-
|
|
1115
|
+
display: grid !important;
|
|
1116
|
+
padding: 1.25rem 1rem !important;
|
|
1147
1117
|
}
|
|
1148
1118
|
.code-block-wrapper pre > code .line {
|
|
1149
|
-
padding: 0;
|
|
1119
|
+
padding: 0 1.25rem;
|
|
1150
1120
|
}
|
|
1151
1121
|
.boltdocs-page pre {
|
|
1152
1122
|
margin: 1.5rem 0;
|
|
@@ -1161,7 +1131,7 @@ a {
|
|
|
1161
1131
|
}
|
|
1162
1132
|
.boltdocs-page pre > code {
|
|
1163
1133
|
display: grid;
|
|
1164
|
-
padding: 1rem
|
|
1134
|
+
padding: 1rem 1rem;
|
|
1165
1135
|
background-color: transparent;
|
|
1166
1136
|
border: none;
|
|
1167
1137
|
color: inherit;
|
|
@@ -1245,57 +1215,68 @@ a {
|
|
|
1245
1215
|
|
|
1246
1216
|
/* src/client/theme/components/mdx/mdx-components.css */
|
|
1247
1217
|
.ld-btn {
|
|
1218
|
+
all: unset;
|
|
1219
|
+
box-sizing: border-box !important;
|
|
1248
1220
|
display: inline-flex;
|
|
1249
1221
|
align-items: center;
|
|
1250
|
-
|
|
1222
|
+
justify-content: center;
|
|
1223
|
+
gap: 0.5rem;
|
|
1224
|
+
font-family: var(--ld-font-sans);
|
|
1251
1225
|
font-weight: 600;
|
|
1226
|
+
font-size: 0.9375rem;
|
|
1227
|
+
line-height: normal;
|
|
1228
|
+
letter-spacing: -0.01em;
|
|
1229
|
+
text-align: center;
|
|
1230
|
+
text-decoration: none !important;
|
|
1231
|
+
white-space: nowrap;
|
|
1252
1232
|
border-radius: var(--ld-radius-md);
|
|
1253
1233
|
cursor: pointer;
|
|
1254
|
-
transition: all
|
|
1255
|
-
font-family: var(--ld-font-sans);
|
|
1234
|
+
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
1256
1235
|
border: 1px solid transparent;
|
|
1257
|
-
|
|
1258
|
-
|
|
1236
|
+
user-select: none;
|
|
1237
|
+
position: relative;
|
|
1259
1238
|
}
|
|
1260
1239
|
.ld-btn:hover {
|
|
1261
|
-
transform:
|
|
1240
|
+
transform: translateY(-1px);
|
|
1262
1241
|
}
|
|
1263
1242
|
.ld-btn:active {
|
|
1264
|
-
transform: scale(0.
|
|
1243
|
+
transform: translateY(0) scale(0.98);
|
|
1265
1244
|
}
|
|
1266
1245
|
.ld-btn--sm {
|
|
1267
|
-
|
|
1246
|
+
min-height: 2rem;
|
|
1247
|
+
padding: 0 1rem;
|
|
1268
1248
|
font-size: 0.8125rem;
|
|
1269
1249
|
border-radius: var(--ld-radius-md);
|
|
1270
1250
|
}
|
|
1271
1251
|
.ld-btn--md {
|
|
1272
|
-
|
|
1252
|
+
min-height: 2.625rem;
|
|
1253
|
+
padding: 0 1.6rem;
|
|
1273
1254
|
font-size: 0.9375rem;
|
|
1274
1255
|
}
|
|
1275
1256
|
.ld-btn--lg {
|
|
1276
|
-
|
|
1257
|
+
min-height: 3.25rem;
|
|
1258
|
+
padding: 0 2.2rem;
|
|
1277
1259
|
font-size: 1.05rem;
|
|
1278
1260
|
}
|
|
1279
1261
|
.ld-btn--primary {
|
|
1280
|
-
background-color: var(--ld-ui-btn-primary-bg, var(--ld-btn-primary-bg));
|
|
1262
|
+
background-color: var( --ld-ui-btn-primary-bg, var(--ld-btn-primary-bg) ) !important;
|
|
1281
1263
|
color: var(--ld-ui-btn-primary-text, var(--ld-btn-primary-text)) !important;
|
|
1264
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
1282
1265
|
}
|
|
1283
1266
|
.ld-btn--primary:hover {
|
|
1284
|
-
|
|
1285
|
-
color: var(--ld-ui-btn-primary-text, var(--ld-btn-primary-text)) !important;
|
|
1267
|
+
filter: brightness(1.1);
|
|
1286
1268
|
}
|
|
1287
1269
|
.ld-btn--secondary {
|
|
1288
|
-
background-color: var(--ld-ui-btn-secondary-bg, var(--ld-btn-secondary-bg));
|
|
1270
|
+
background-color: var( --ld-ui-btn-secondary-bg, var(--ld-btn-secondary-bg) ) !important;
|
|
1289
1271
|
color: var( --ld-ui-btn-secondary-text, var(--ld-btn-secondary-text) ) !important;
|
|
1290
1272
|
border-color: var(--ld-border-subtle);
|
|
1291
1273
|
}
|
|
1292
1274
|
.ld-btn--secondary:hover {
|
|
1293
1275
|
background-color: var(--ld-bg-mute);
|
|
1294
1276
|
border-color: var(--ld-border-strong);
|
|
1295
|
-
color: var( --ld-ui-btn-secondary-text, var(--ld-btn-secondary-text) ) !important;
|
|
1296
1277
|
}
|
|
1297
1278
|
.ld-btn--outline {
|
|
1298
|
-
background: transparent;
|
|
1279
|
+
background: transparent !important;
|
|
1299
1280
|
color: var(--ld-text-main) !important;
|
|
1300
1281
|
border-color: var(--ld-border-strong);
|
|
1301
1282
|
}
|
|
@@ -1304,7 +1285,7 @@ a {
|
|
|
1304
1285
|
border-color: var(--ld-color-primary);
|
|
1305
1286
|
}
|
|
1306
1287
|
.ld-btn--ghost {
|
|
1307
|
-
background: transparent;
|
|
1288
|
+
background: transparent !important;
|
|
1308
1289
|
color: var(--ld-text-muted) !important;
|
|
1309
1290
|
}
|
|
1310
1291
|
.ld-btn--ghost:hover {
|
|
@@ -1840,56 +1821,6 @@ a {
|
|
|
1840
1821
|
color: var(--ld-color-primary);
|
|
1841
1822
|
}
|
|
1842
1823
|
|
|
1843
|
-
/* src/client/theme/styles/home.css */
|
|
1844
|
-
.boltdocs-home {
|
|
1845
|
-
min-height: calc(100vh - var(--ld-navbar-height));
|
|
1846
|
-
}
|
|
1847
|
-
.home-hero {
|
|
1848
|
-
display: flex;
|
|
1849
|
-
align-items: center;
|
|
1850
|
-
justify-content: center;
|
|
1851
|
-
padding: 6rem 2rem 4rem;
|
|
1852
|
-
text-align: center;
|
|
1853
|
-
}
|
|
1854
|
-
.hero-content {
|
|
1855
|
-
max-width: 680px;
|
|
1856
|
-
}
|
|
1857
|
-
.hero-title {
|
|
1858
|
-
font-size: 3.5rem;
|
|
1859
|
-
font-weight: 900;
|
|
1860
|
-
line-height: 1.1;
|
|
1861
|
-
margin: 0 0 1.25rem;
|
|
1862
|
-
letter-spacing: -0.03em;
|
|
1863
|
-
color: var(--ld-text-main);
|
|
1864
|
-
}
|
|
1865
|
-
.hero-highlight {
|
|
1866
|
-
background:
|
|
1867
|
-
linear-gradient(
|
|
1868
|
-
135deg,
|
|
1869
|
-
var(--ld-gradient-from),
|
|
1870
|
-
var(--ld-gradient-to));
|
|
1871
|
-
-webkit-background-clip: text;
|
|
1872
|
-
-webkit-text-fill-color: transparent;
|
|
1873
|
-
background-clip: text;
|
|
1874
|
-
}
|
|
1875
|
-
.hero-description {
|
|
1876
|
-
font-size: 1.125rem;
|
|
1877
|
-
color: var(--ld-text-muted);
|
|
1878
|
-
line-height: 1.7;
|
|
1879
|
-
margin-bottom: 2rem;
|
|
1880
|
-
}
|
|
1881
|
-
.hero-actions {
|
|
1882
|
-
display: flex;
|
|
1883
|
-
gap: 0.75rem;
|
|
1884
|
-
justify-content: center;
|
|
1885
|
-
flex-wrap: wrap;
|
|
1886
|
-
}
|
|
1887
|
-
.home-features {
|
|
1888
|
-
padding: 2rem 2rem 6rem;
|
|
1889
|
-
max-width: 1000px;
|
|
1890
|
-
margin: 0 auto;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
1824
|
/* src/client/theme/ui/NotFound/not-found.css */
|
|
1894
1825
|
.boltdocs-not-found {
|
|
1895
1826
|
display: flex;
|
|
@@ -2122,9 +2053,6 @@ a.not-found-link:hover {
|
|
|
2122
2053
|
.boltdocs-sidebar {
|
|
2123
2054
|
display: none;
|
|
2124
2055
|
}
|
|
2125
|
-
.sidebar-toggle-floating {
|
|
2126
|
-
display: none !important;
|
|
2127
|
-
}
|
|
2128
2056
|
.boltdocs-content {
|
|
2129
2057
|
padding: 1.5rem 1rem 3rem;
|
|
2130
2058
|
}
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import { B as BoltdocsConfig } from '../config-
|
|
2
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
3
|
-
import { C as ComponentRoute } from '../
|
|
4
|
-
export { a as CreateBoltdocsAppOptions, c as createBoltdocsApp } from '../index-CRQKWAeo.mjs';
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-BD5ZHz15.mjs';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-BD5ZHz15.mjs';
|
|
3
|
+
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-CvrzTbEX.mjs';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import 'vite';
|
|
8
7
|
|
|
8
|
+
declare global {
|
|
9
|
+
interface ImportMeta {
|
|
10
|
+
env: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates and mounts the Boltdocs documentation app.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { createBoltdocsApp } from 'boltdocs/client'
|
|
19
|
+
* import routes from 'virtual:boltdocs-routes'
|
|
20
|
+
* import config from 'virtual:boltdocs-config'
|
|
21
|
+
* import 'boltdocs/style.css'
|
|
22
|
+
* import HomePage from './HomePage'
|
|
23
|
+
*
|
|
24
|
+
* createBoltdocsApp({
|
|
25
|
+
* target: '#root',
|
|
26
|
+
* routes,
|
|
27
|
+
* config,
|
|
28
|
+
* modules: import.meta.glob('/docs/**\/*.{md,mdx}'),
|
|
29
|
+
* hot: import.meta.hot,
|
|
30
|
+
* homePage: HomePage,
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare function createBoltdocsApp(options: CreateBoltdocsAppOptions): void;
|
|
35
|
+
|
|
9
36
|
/**
|
|
10
37
|
* The top navigation bar of the documentation site.
|
|
11
38
|
*/
|
|
@@ -36,10 +63,11 @@ interface RouteItem {
|
|
|
36
63
|
* @param routes - Array of all generated routes to be displayed
|
|
37
64
|
* @param config - Global configuration (which can contain sidebar overrides)
|
|
38
65
|
*/
|
|
39
|
-
declare function Sidebar({ routes, config,
|
|
66
|
+
declare function Sidebar({ routes, config, isCollapsed, onToggle, }: {
|
|
40
67
|
routes: RouteItem[];
|
|
41
68
|
config: BoltdocsConfig;
|
|
42
|
-
|
|
69
|
+
isCollapsed?: boolean;
|
|
70
|
+
onToggle?: () => void;
|
|
43
71
|
}): react_jsx_runtime.JSX.Element;
|
|
44
72
|
|
|
45
73
|
interface TocHeading {
|
|
@@ -109,12 +137,15 @@ interface PlaygroundProps {
|
|
|
109
137
|
children?: string | React.ReactNode;
|
|
110
138
|
scope?: Record<string, any>;
|
|
111
139
|
readonly?: boolean;
|
|
140
|
+
noInline?: boolean;
|
|
112
141
|
}
|
|
113
142
|
/**
|
|
114
143
|
* A live React playground component.
|
|
115
144
|
* Features a split layout with a live editor and a preview section.
|
|
145
|
+
*
|
|
146
|
+
* Supports `export default function App()` style code out of the box.
|
|
116
147
|
*/
|
|
117
|
-
declare function Playground({ code, children, scope, readonly, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
declare function Playground({ code, children, scope, readonly, noInline: forceNoInline, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
118
149
|
|
|
119
150
|
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
120
151
|
|
|
@@ -295,4 +326,4 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
295
326
|
*/
|
|
296
327
|
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
297
328
|
|
|
298
|
-
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning };
|
|
329
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import { B as BoltdocsConfig } from '../config-
|
|
2
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
3
|
-
import { C as ComponentRoute } from '../
|
|
4
|
-
export { a as CreateBoltdocsAppOptions, c as createBoltdocsApp } from '../index-CRQKWAeo.js';
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-BD5ZHz15.js';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-BD5ZHz15.js';
|
|
3
|
+
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-CvrzTbEX.js';
|
|
5
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import 'vite';
|
|
8
7
|
|
|
8
|
+
declare global {
|
|
9
|
+
interface ImportMeta {
|
|
10
|
+
env: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates and mounts the Boltdocs documentation app.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { createBoltdocsApp } from 'boltdocs/client'
|
|
19
|
+
* import routes from 'virtual:boltdocs-routes'
|
|
20
|
+
* import config from 'virtual:boltdocs-config'
|
|
21
|
+
* import 'boltdocs/style.css'
|
|
22
|
+
* import HomePage from './HomePage'
|
|
23
|
+
*
|
|
24
|
+
* createBoltdocsApp({
|
|
25
|
+
* target: '#root',
|
|
26
|
+
* routes,
|
|
27
|
+
* config,
|
|
28
|
+
* modules: import.meta.glob('/docs/**\/*.{md,mdx}'),
|
|
29
|
+
* hot: import.meta.hot,
|
|
30
|
+
* homePage: HomePage,
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare function createBoltdocsApp(options: CreateBoltdocsAppOptions): void;
|
|
35
|
+
|
|
9
36
|
/**
|
|
10
37
|
* The top navigation bar of the documentation site.
|
|
11
38
|
*/
|
|
@@ -36,10 +63,11 @@ interface RouteItem {
|
|
|
36
63
|
* @param routes - Array of all generated routes to be displayed
|
|
37
64
|
* @param config - Global configuration (which can contain sidebar overrides)
|
|
38
65
|
*/
|
|
39
|
-
declare function Sidebar({ routes, config,
|
|
66
|
+
declare function Sidebar({ routes, config, isCollapsed, onToggle, }: {
|
|
40
67
|
routes: RouteItem[];
|
|
41
68
|
config: BoltdocsConfig;
|
|
42
|
-
|
|
69
|
+
isCollapsed?: boolean;
|
|
70
|
+
onToggle?: () => void;
|
|
43
71
|
}): react_jsx_runtime.JSX.Element;
|
|
44
72
|
|
|
45
73
|
interface TocHeading {
|
|
@@ -109,12 +137,15 @@ interface PlaygroundProps {
|
|
|
109
137
|
children?: string | React.ReactNode;
|
|
110
138
|
scope?: Record<string, any>;
|
|
111
139
|
readonly?: boolean;
|
|
140
|
+
noInline?: boolean;
|
|
112
141
|
}
|
|
113
142
|
/**
|
|
114
143
|
* A live React playground component.
|
|
115
144
|
* Features a split layout with a live editor and a preview section.
|
|
145
|
+
*
|
|
146
|
+
* Supports `export default function App()` style code out of the box.
|
|
116
147
|
*/
|
|
117
|
-
declare function Playground({ code, children, scope, readonly, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
declare function Playground({ code, children, scope, readonly, noInline: forceNoInline, }: PlaygroundProps): react_jsx_runtime.JSX.Element;
|
|
118
149
|
|
|
119
150
|
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
120
151
|
|
|
@@ -295,4 +326,4 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
295
326
|
*/
|
|
296
327
|
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
297
328
|
|
|
298
|
-
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning };
|
|
329
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
|