boltdocs 1.4.1 → 1.6.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/{PackageManagerTabs-XW3AVXVX.mjs → PackageManagerTabs-NVT7G625.mjs} +1 -1
- package/dist/{SearchDialog-O3V36MXA.css → SearchDialog-3QICRMWF.css} +145 -5
- package/dist/{SearchDialog-FBNGKRPK.mjs → SearchDialog-J3KNRGNO.mjs} +1 -1
- package/dist/{chunk-S5G55FBI.mjs → chunk-7SFUJWTB.mjs} +4 -4
- package/dist/{chunk-D7YBQG6H.mjs → chunk-HSPDIRTW.mjs} +312 -134
- package/dist/client/index.css +145 -5
- package/dist/client/index.d.mts +22 -5
- package/dist/client/index.d.ts +22 -5
- package/dist/client/index.js +725 -459
- package/dist/client/index.mjs +182 -61
- package/dist/client/ssr.css +145 -5
- package/dist/client/ssr.d.mts +1 -1
- package/dist/client/ssr.d.ts +1 -1
- package/dist/client/ssr.js +544 -395
- package/dist/client/ssr.mjs +1 -1
- package/dist/{config-BD5ZHz15.d.mts → config-DkZg5aCf.d.mts} +2 -0
- package/dist/{config-BD5ZHz15.d.ts → config-DkZg5aCf.d.ts} +2 -0
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +5 -1
- package/dist/node/index.mjs +5 -1
- package/dist/{types-CvrzTbEX.d.mts → types-DGIo1VKD.d.mts} +2 -0
- package/dist/{types-CvrzTbEX.d.ts → types-DGIo1VKD.d.ts} +2 -0
- package/package.json +1 -1
- package/src/client/app/index.tsx +2 -12
- package/src/client/app/preload.tsx +3 -1
- package/src/client/index.ts +2 -0
- package/src/client/theme/components/CodeBlock/CodeBlock.tsx +0 -11
- package/src/client/theme/components/mdx/FileTree.tsx +229 -0
- package/src/client/theme/components/mdx/Tabs.tsx +1 -4
- package/src/client/theme/components/mdx/index.ts +3 -0
- package/src/client/theme/components/mdx/mdx-components.css +109 -0
- package/src/client/theme/icons/pnpm.tsx +5 -5
- package/src/client/theme/styles/markdown.css +1 -5
- package/src/client/theme/ui/Link/Link.tsx +156 -18
- package/src/client/theme/ui/Link/LinkPreview.tsx +64 -0
- package/src/client/theme/ui/Link/link-preview.css +64 -0
- package/src/client/types.ts +2 -0
- package/src/node/config.ts +2 -0
- package/src/node/routes/parser.ts +14 -1
- package/dist/CodeBlock-QYIKJMEB.mjs +0 -7
- package/dist/chunk-KS5B3O6W.mjs +0 -43
- package/src/client/theme/icons/yarn.tsx +0 -16
package/dist/client/index.css
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";
|
|
2
2
|
|
|
3
|
+
/* src/client/theme/ui/Link/link-preview.css */
|
|
4
|
+
.boltdocs-link-preview {
|
|
5
|
+
position: fixed;
|
|
6
|
+
z-index: 1000;
|
|
7
|
+
width: 320px;
|
|
8
|
+
padding: 1rem;
|
|
9
|
+
background-color: var(--ld-navbar-bg);
|
|
10
|
+
backdrop-filter: blur(var(--ld-navbar-blur));
|
|
11
|
+
-webkit-backdrop-filter: blur(var(--ld-navbar-blur));
|
|
12
|
+
border: 1px solid var(--ld-border-subtle);
|
|
13
|
+
border-radius: var(--ld-radius-md);
|
|
14
|
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transform: translateY(10px) scale(0.95);
|
|
18
|
+
transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
19
|
+
font-family: var(--ld-font-sans);
|
|
20
|
+
}
|
|
21
|
+
.boltdocs-link-preview.is-visible {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
transform: translateY(0) scale(1);
|
|
24
|
+
}
|
|
25
|
+
.boltdocs-link-preview-title {
|
|
26
|
+
display: block;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
font-size: 0.95rem;
|
|
29
|
+
color: var(--ld-text-main);
|
|
30
|
+
margin-bottom: 0.5rem;
|
|
31
|
+
line-height: 1.4;
|
|
32
|
+
}
|
|
33
|
+
.boltdocs-link-preview-summary {
|
|
34
|
+
display: block;
|
|
35
|
+
font-size: 0.85rem;
|
|
36
|
+
color: var(--ld-text-muted);
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
display: -webkit-box;
|
|
39
|
+
-webkit-line-clamp: 4;
|
|
40
|
+
line-clamp: 4;
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
[data-theme=dark] .boltdocs-link-preview {
|
|
45
|
+
background-color: var(--ld-navbar-bg);
|
|
46
|
+
border-color: var(--ld-border-subtle);
|
|
47
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
|
|
48
|
+
}
|
|
49
|
+
[data-theme=dark] .boltdocs-link-preview-title {
|
|
50
|
+
color: #f8fafc;
|
|
51
|
+
}
|
|
52
|
+
[data-theme=dark] .boltdocs-link-preview-summary {
|
|
53
|
+
color: #94a3b8;
|
|
54
|
+
}
|
|
55
|
+
|
|
3
56
|
/* src/client/theme/styles/variables.css */
|
|
4
57
|
:root[data-theme=light],
|
|
5
58
|
:root.theme-light {
|
|
@@ -1072,7 +1125,7 @@ a {
|
|
|
1072
1125
|
right: 0.75rem;
|
|
1073
1126
|
z-index: 50;
|
|
1074
1127
|
padding: 0.4rem;
|
|
1075
|
-
background-color:
|
|
1128
|
+
background-color: var(--ld-surface);
|
|
1076
1129
|
backdrop-filter: blur(8px);
|
|
1077
1130
|
-webkit-backdrop-filter: blur(8px);
|
|
1078
1131
|
border: 1px solid var(--ld-border-subtle);
|
|
@@ -1081,13 +1134,9 @@ a {
|
|
|
1081
1134
|
cursor: pointer;
|
|
1082
1135
|
transition: all 0.2s ease;
|
|
1083
1136
|
opacity: 0;
|
|
1084
|
-
visibility: hidden;
|
|
1085
|
-
pointer-events: none;
|
|
1086
1137
|
}
|
|
1087
1138
|
.code-block-wrapper:hover .code-block-copy {
|
|
1088
1139
|
opacity: 1;
|
|
1089
|
-
visibility: visible;
|
|
1090
|
-
pointer-events: auto;
|
|
1091
1140
|
}
|
|
1092
1141
|
.code-block-copy:hover {
|
|
1093
1142
|
color: var(--ld-text-main);
|
|
@@ -1575,6 +1624,97 @@ a {
|
|
|
1575
1624
|
.ld-list--arrow .ld-list__icon {
|
|
1576
1625
|
color: var(--ld-color-primary);
|
|
1577
1626
|
}
|
|
1627
|
+
.ld-file-tree {
|
|
1628
|
+
margin: 1.5rem 0;
|
|
1629
|
+
padding: 1rem;
|
|
1630
|
+
border-radius: var(--ld-radius-lg);
|
|
1631
|
+
border: 1px solid var(--ld-border-subtle);
|
|
1632
|
+
background: var(--ld-bg-soft);
|
|
1633
|
+
font-family: var(--ld-font-mono);
|
|
1634
|
+
font-size: 0.875rem;
|
|
1635
|
+
overflow-x: auto;
|
|
1636
|
+
}
|
|
1637
|
+
.ld-file-tree__list {
|
|
1638
|
+
list-style: none !important;
|
|
1639
|
+
margin: 0 !important;
|
|
1640
|
+
padding: 0;
|
|
1641
|
+
position: relative;
|
|
1642
|
+
}
|
|
1643
|
+
.ld-file-tree__list:not(.ld-file-tree__list--root) {
|
|
1644
|
+
padding-left: 1.25rem;
|
|
1645
|
+
margin-top: 0.25rem !important;
|
|
1646
|
+
position: relative;
|
|
1647
|
+
}
|
|
1648
|
+
.ld-file-tree__list:not(.ld-file-tree__list--root)::before {
|
|
1649
|
+
content: "";
|
|
1650
|
+
position: absolute;
|
|
1651
|
+
top: 0;
|
|
1652
|
+
bottom: 0;
|
|
1653
|
+
left: 0.45rem;
|
|
1654
|
+
width: 1px;
|
|
1655
|
+
background-color: var(--ld-border-subtle);
|
|
1656
|
+
z-index: 0;
|
|
1657
|
+
}
|
|
1658
|
+
.ld-file-tree__item {
|
|
1659
|
+
position: relative;
|
|
1660
|
+
margin: 0.2rem 0 !important;
|
|
1661
|
+
padding: 0 !important;
|
|
1662
|
+
display: block !important;
|
|
1663
|
+
}
|
|
1664
|
+
.ld-file-tree__label {
|
|
1665
|
+
display: inline-flex;
|
|
1666
|
+
align-items: center;
|
|
1667
|
+
gap: 0.5rem;
|
|
1668
|
+
color: var(--ld-text-muted);
|
|
1669
|
+
user-select: none;
|
|
1670
|
+
border-radius: var(--ld-radius-sm);
|
|
1671
|
+
padding: 0.25rem 0.6rem 0.25rem 0.4rem;
|
|
1672
|
+
transition: all 0.2s ease;
|
|
1673
|
+
position: relative;
|
|
1674
|
+
z-index: 1;
|
|
1675
|
+
}
|
|
1676
|
+
.ld-file-tree__label:hover {
|
|
1677
|
+
background: var(--ld-bg-mute);
|
|
1678
|
+
color: var(--ld-text-main);
|
|
1679
|
+
}
|
|
1680
|
+
.ld-file-tree__label--folder {
|
|
1681
|
+
color: var(--ld-text-main);
|
|
1682
|
+
font-weight: 500;
|
|
1683
|
+
}
|
|
1684
|
+
.ld-file-tree__icon {
|
|
1685
|
+
display: inline-flex;
|
|
1686
|
+
align-items: center;
|
|
1687
|
+
justify-content: center;
|
|
1688
|
+
opacity: 0.8;
|
|
1689
|
+
flex-shrink: 0;
|
|
1690
|
+
}
|
|
1691
|
+
.ld-file-tree__icon-folder {
|
|
1692
|
+
color: var(--ld-color-primary);
|
|
1693
|
+
}
|
|
1694
|
+
.ld-file-tree__name {
|
|
1695
|
+
white-space: nowrap;
|
|
1696
|
+
}
|
|
1697
|
+
.ld-file-tree__icon--chevron {
|
|
1698
|
+
width: 14px;
|
|
1699
|
+
height: 14px;
|
|
1700
|
+
opacity: 0.5;
|
|
1701
|
+
transition: opacity 0.2s ease;
|
|
1702
|
+
display: flex !important;
|
|
1703
|
+
align-items: center;
|
|
1704
|
+
justify-content: center;
|
|
1705
|
+
}
|
|
1706
|
+
.ld-file-tree__label:hover .ld-file-tree__icon--chevron {
|
|
1707
|
+
opacity: 1;
|
|
1708
|
+
}
|
|
1709
|
+
.ld-file-tree__chevron {
|
|
1710
|
+
transition: transform 0.2s ease;
|
|
1711
|
+
}
|
|
1712
|
+
.ld-file-tree__chevron--open {
|
|
1713
|
+
transform: rotate(90deg);
|
|
1714
|
+
}
|
|
1715
|
+
.ld-file-tree__icon--spacer {
|
|
1716
|
+
width: 14px;
|
|
1717
|
+
}
|
|
1578
1718
|
|
|
1579
1719
|
/* src/client/theme/components/PackageManagerTabs/pkg-tabs.css */
|
|
1580
1720
|
.pkg-tabs-wrapper {
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as BoltdocsConfig } from '../config-
|
|
2
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
3
|
-
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-DkZg5aCf.mjs';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-DkZg5aCf.mjs';
|
|
3
|
+
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-DGIo1VKD.mjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import 'vite';
|
|
@@ -279,7 +279,6 @@ interface TabsProps {
|
|
|
279
279
|
* <Tabs>
|
|
280
280
|
* <Tab label="npm">npm install boltdocs</Tab>
|
|
281
281
|
* <Tab label="pnpm">pnpm add boltdocs</Tab>
|
|
282
|
-
* <Tab label="yarn">yarn add boltdocs</Tab>
|
|
283
282
|
* </Tabs>
|
|
284
283
|
* ```
|
|
285
284
|
*/
|
|
@@ -326,4 +325,22 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
326
325
|
*/
|
|
327
326
|
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
328
327
|
|
|
329
|
-
|
|
328
|
+
interface FileTreeProps {
|
|
329
|
+
children: React.ReactNode;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* FileTree component displays a customized, styled tree structure for markdown lists.
|
|
333
|
+
*
|
|
334
|
+
* ```mdx
|
|
335
|
+
* <FileTree>
|
|
336
|
+
* - src/
|
|
337
|
+
* - index.ts
|
|
338
|
+
* - components/
|
|
339
|
+
* - Button.tsx
|
|
340
|
+
* - package.json
|
|
341
|
+
* </FileTree>
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
345
|
+
|
|
346
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, FileTree, type FileTreeProps, 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,6 +1,6 @@
|
|
|
1
|
-
import { B as BoltdocsConfig } from '../config-
|
|
2
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
3
|
-
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-
|
|
1
|
+
import { B as BoltdocsConfig } from '../config-DkZg5aCf.js';
|
|
2
|
+
export { a as BoltdocsThemeConfig } from '../config-DkZg5aCf.js';
|
|
3
|
+
import { C as CreateBoltdocsAppOptions, a as ComponentRoute } from '../types-DGIo1VKD.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import 'vite';
|
|
@@ -279,7 +279,6 @@ interface TabsProps {
|
|
|
279
279
|
* <Tabs>
|
|
280
280
|
* <Tab label="npm">npm install boltdocs</Tab>
|
|
281
281
|
* <Tab label="pnpm">pnpm add boltdocs</Tab>
|
|
282
|
-
* <Tab label="yarn">yarn add boltdocs</Tab>
|
|
283
282
|
* </Tabs>
|
|
284
283
|
* ```
|
|
285
284
|
*/
|
|
@@ -326,4 +325,22 @@ interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
326
325
|
*/
|
|
327
326
|
declare function List({ variant, children, className, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
|
|
328
327
|
|
|
329
|
-
|
|
328
|
+
interface FileTreeProps {
|
|
329
|
+
children: React.ReactNode;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* FileTree component displays a customized, styled tree structure for markdown lists.
|
|
333
|
+
*
|
|
334
|
+
* ```mdx
|
|
335
|
+
* <FileTree>
|
|
336
|
+
* - src/
|
|
337
|
+
* - index.ts
|
|
338
|
+
* - components/
|
|
339
|
+
* - Button.tsx
|
|
340
|
+
* - package.json
|
|
341
|
+
* </FileTree>
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
345
|
+
|
|
346
|
+
export { Admonition, type AdmonitionProps, BackgroundGradient, Badge, type BadgeProps, BoltdocsConfig, Breadcrumbs, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, CodeBlock, ComponentRoute, CreateBoltdocsAppOptions, Danger, FileTree, type FileTreeProps, Head, InfoBox, List, type ListProps, Loading, Navbar, NotFound, Note, OnThisPage, Playground, Sidebar, Tab, type TabProps, Tabs, type TabsProps, ThemeLayout, Tip, Video, Warning, createBoltdocsApp };
|