rspress-plugin-api-extractor 0.8.8 → 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/README.md +11 -11
- package/api-extracted-package.js +1 -1
- package/build-program.js +3 -3
- package/build-stages.js +30 -31
- package/config-helpers.js +61 -21
- package/errors.js +1 -7
- package/frontmatter.js +149 -0
- package/index.d.ts +11 -2
- package/layers/ConfigServiceLive.js +53 -39
- package/layers/TypeRegistryServiceLive.js +11 -6
- package/markdown/helpers.js +40 -69
- package/markdown/index.js +2 -2
- package/markdown/page-generators/class-page.js +40 -42
- package/markdown/page-generators/enum-page.js +15 -15
- package/markdown/page-generators/function-page.js +18 -20
- package/markdown/page-generators/interface-page.js +41 -43
- package/markdown/page-generators/namespace-page.js +22 -24
- package/markdown/page-generators/type-alias-page.js +14 -16
- package/markdown/page-generators/variable-page.js +14 -16
- package/markdown/prose-linker.js +22 -0
- package/model-loader.js +59 -113
- package/package.json +14 -8
- package/plugin.js +1 -5
- package/runtime/components/EnumMembersTable/index.css +18 -18
- package/runtime/components/EnumMembersTable/index.module.js +3 -3
- package/runtime/components/ExampleBlock/index.css +2 -2
- package/runtime/components/ExampleBlock/index.module.js +2 -2
- package/runtime/components/MemberSignature/index.css +6 -6
- package/runtime/components/MemberSignature/index.module.js +4 -4
- package/runtime/components/ParametersTable/index.css +19 -19
- package/runtime/components/ParametersTable/index.module.js +3 -3
- package/runtime/components/SignatureBlock/index.css +6 -6
- package/runtime/components/SignatureBlock/index.module.js +4 -4
- package/runtime/components/SignatureCode/index.css +9 -9
- package/runtime/components/SignatureCode/index.module.js +3 -3
- package/runtime/components/SignatureToolbar/index.css +18 -18
- package/runtime/components/SignatureToolbar/index.module.js +7 -7
- package/runtime/components/buttons/index.css +5 -5
- package/runtime/components/buttons/index.module.js +2 -2
- package/shiki-transformer.js +3 -3
- package/sync-node-fs.js +80 -0
- package/tsdoc-metadata.json +1 -1
- package/twoslash-transformer.js +1 -1
- package/content-hash.js +0 -79
- package/formatter.js +0 -69
- package/layers/SnapshotServiceLive.js +0 -92
- package/loader.js +0 -200
- package/markdown/cross-linker.js +0 -157
- package/migrations/001_create_snapshots.js +0 -25
- package/multi-entry-resolver.js +0 -70
- package/route-collisions.js +0 -44
- package/services/SnapshotService.js +0 -7
- package/synthetic-bases.js +0 -74
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
.
|
|
1
|
+
.qoTVvq_blockWrapper {
|
|
2
2
|
padding: var(--api-spacing-xl) 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.qoTVvq_block {
|
|
6
6
|
border-radius: var(--api-border-radius);
|
|
7
7
|
border: 1px solid var(--api-color-border);
|
|
8
8
|
position: relative;
|
|
9
9
|
overflow: visible;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
html.
|
|
12
|
+
html.qoTVvq_rp-dark .qoTVvq_block {
|
|
13
13
|
border-color: var(--api-color-border);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.qoTVvq_hasParameters {
|
|
17
17
|
border-bottom-right-radius: 0;
|
|
18
18
|
border-bottom-left-radius: 0;
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.qoTVvq_hasParameters .api-signature-code {
|
|
23
23
|
border-bottom-right-radius: 0;
|
|
24
24
|
border-bottom-left-radius: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.qoTVvq_hasParameters .api-signature-code pre {
|
|
28
28
|
border-radius: 0;
|
|
29
29
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/MemberSignature/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"block": "
|
|
5
|
-
"blockWrapper": "
|
|
6
|
-
"hasParameters": "
|
|
7
|
-
"rpDark": "
|
|
4
|
+
"block": "qoTVvq_block",
|
|
5
|
+
"blockWrapper": "qoTVvq_blockWrapper",
|
|
6
|
+
"hasParameters": "qoTVvq_hasParameters",
|
|
7
|
+
"rpDark": "qoTVvq_rp-dark"
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
._1CxlAG_table {
|
|
2
2
|
border: 1px solid var(--api-color-border);
|
|
3
3
|
border-radius: 0 0 var(--api-border-radius) var(--api-border-radius);
|
|
4
4
|
border-top: none;
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
html.
|
|
10
|
+
html._1CxlAG_rp-dark ._1CxlAG_table {
|
|
11
11
|
border-color: var(--api-color-border);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
._1CxlAG_scroll {
|
|
15
15
|
-webkit-overflow-scrolling: touch;
|
|
16
16
|
overflow-x: auto;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
._1CxlAG_table table {
|
|
20
20
|
border-collapse: collapse;
|
|
21
21
|
width: 100%;
|
|
22
22
|
font-size: var(--api-font-size-base);
|
|
@@ -25,12 +25,12 @@ html.qRA0fW_rp-dark .qRA0fW_table {
|
|
|
25
25
|
margin: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
28
|
+
._1CxlAG_table thead {
|
|
29
29
|
background-color: var(--api-color-bg);
|
|
30
30
|
border-bottom: 1px solid var(--api-color-border);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
._1CxlAG_table th {
|
|
34
34
|
padding: var(--api-spacing-md) var(--api-spacing-lg);
|
|
35
35
|
text-align: left;
|
|
36
36
|
color: var(--api-color-text);
|
|
@@ -38,66 +38,66 @@ html.qRA0fW_rp-dark .qRA0fW_table {
|
|
|
38
38
|
font-weight: 600;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
41
|
+
._1CxlAG_table th:first-child {
|
|
42
42
|
width: 20%;
|
|
43
43
|
min-width: 120px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
._1CxlAG_table th:nth-child(2) {
|
|
47
47
|
width: 30%;
|
|
48
48
|
min-width: 150px;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.
|
|
51
|
+
._1CxlAG_table th:last-child {
|
|
52
52
|
width: 50%;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
55
|
+
._1CxlAG_table td {
|
|
56
56
|
padding: var(--api-spacing-md) var(--api-spacing-lg);
|
|
57
57
|
border-top: 1px solid var(--api-color-border);
|
|
58
58
|
vertical-align: top;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.
|
|
61
|
+
._1CxlAG_table td:first-child {
|
|
62
62
|
width: 20%;
|
|
63
63
|
min-width: 120px;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
._1CxlAG_table td:nth-child(2) {
|
|
67
67
|
width: 30%;
|
|
68
68
|
min-width: 150px;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
._1CxlAG_table td:last-child {
|
|
72
72
|
width: 50%;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
._1CxlAG_table td code, ._1CxlAG_table th code {
|
|
76
76
|
font-size: var(--api-font-size-sm);
|
|
77
77
|
background-color: var(--api-color-code-bg);
|
|
78
78
|
border-radius: var(--api-border-radius-sm);
|
|
79
79
|
padding: .125rem .375rem;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
._1CxlAG_table td:last-child p:first-child {
|
|
83
83
|
margin-top: 0;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
86
|
+
._1CxlAG_table td:last-child p:last-child, ._1CxlAG_table td:last-child ul:last-child, ._1CxlAG_table td:last-child ol:last-child {
|
|
87
87
|
margin-bottom: 0;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
@media (width <= 768px) {
|
|
91
|
-
.
|
|
91
|
+
._1CxlAG_table td, ._1CxlAG_table th {
|
|
92
92
|
padding: var(--api-spacing-sm) var(--api-spacing-md);
|
|
93
93
|
font-size: var(--api-font-size-sm);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.
|
|
96
|
+
._1CxlAG_table td:first-child, ._1CxlAG_table th:first-child {
|
|
97
97
|
min-width: 100px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
._1CxlAG_table td:nth-child(2), ._1CxlAG_table th:nth-child(2) {
|
|
101
101
|
min-width: 120px;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/ParametersTable/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"rpDark": "
|
|
5
|
-
"scroll": "
|
|
6
|
-
"table": "
|
|
4
|
+
"rpDark": "_1CxlAG_rp-dark",
|
|
5
|
+
"scroll": "_1CxlAG_scroll",
|
|
6
|
+
"table": "_1CxlAG_table"
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
.
|
|
1
|
+
._9NmvCa_blockWrapper {
|
|
2
2
|
padding: var(--api-spacing-xl) 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
._9NmvCa_block {
|
|
6
6
|
border-radius: var(--api-border-radius);
|
|
7
7
|
border: 1px solid var(--api-color-border);
|
|
8
8
|
position: relative;
|
|
9
9
|
overflow: visible;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
html.
|
|
12
|
+
html._9NmvCa_rp-dark ._9NmvCa_block {
|
|
13
13
|
border-color: var(--api-color-border);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
._9NmvCa_hasParameters {
|
|
17
17
|
border-bottom-width: 0;
|
|
18
18
|
border-bottom-right-radius: 0;
|
|
19
19
|
border-bottom-left-radius: 0;
|
|
20
20
|
padding-bottom: 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
._9NmvCa_hasParameters .api-signature-code {
|
|
24
24
|
border-bottom-right-radius: 0;
|
|
25
25
|
border-bottom-left-radius: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
28
|
+
._9NmvCa_hasParameters .api-signature-code pre {
|
|
29
29
|
border-radius: 0;
|
|
30
30
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/SignatureBlock/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"block": "
|
|
5
|
-
"blockWrapper": "
|
|
6
|
-
"hasParameters": "
|
|
7
|
-
"rpDark": "
|
|
4
|
+
"block": "_9NmvCa_block",
|
|
5
|
+
"blockWrapper": "_9NmvCa_blockWrapper",
|
|
6
|
+
"hasParameters": "_9NmvCa_hasParameters",
|
|
7
|
+
"rpDark": "_9NmvCa_rp-dark"
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
.xutj2q_code {
|
|
2
2
|
border-bottom-left-radius: var(--api-border-radius);
|
|
3
3
|
border-bottom-right-radius: var(--api-border-radius);
|
|
4
4
|
position: relative;
|
|
5
5
|
container-type: inline-size;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.
|
|
8
|
+
.xutj2q_code pre {
|
|
9
9
|
height: auto;
|
|
10
10
|
max-height: none;
|
|
11
11
|
padding: var(--api-spacing-lg);
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
overflow-x: auto;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
html.
|
|
18
|
+
html.xutj2q_rp-dark .xutj2q_code pre {
|
|
19
19
|
background-color: var(--shiki-dark-bg);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.xutj2q_code code {
|
|
23
23
|
background-color: unset;
|
|
24
24
|
min-height: var(--api-font-size-md);
|
|
25
25
|
line-height: var(--api-line-height-base);
|
|
@@ -28,25 +28,25 @@ html._5P8n3G_rp-dark ._5P8n3G_code pre {
|
|
|
28
28
|
display: flex;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.xutj2q_code code span {
|
|
32
32
|
color: var(--shiki-light);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
html.
|
|
35
|
+
html.xutj2q_rp-dark .xutj2q_code code span {
|
|
36
36
|
color: var(--shiki-dark);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.xutj2q_code .line {
|
|
40
40
|
background: none;
|
|
41
41
|
min-height: 1lh;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.
|
|
44
|
+
.xutj2q_wrapped pre {
|
|
45
45
|
white-space: pre-wrap;
|
|
46
46
|
overflow-wrap: break-word;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.xutj2q_wrapped code {
|
|
50
50
|
white-space: pre-wrap;
|
|
51
51
|
overflow-wrap: break-word;
|
|
52
52
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/SignatureCode/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"code": "
|
|
5
|
-
"rpDark": "
|
|
6
|
-
"wrapped": "
|
|
4
|
+
"code": "xutj2q_code",
|
|
5
|
+
"rpDark": "xutj2q_rp-dark",
|
|
6
|
+
"wrapped": "xutj2q_wrapped"
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.GSquYa_toolbar {
|
|
2
2
|
justify-content: flex-end;
|
|
3
3
|
align-items: flex-end;
|
|
4
4
|
gap: var(--api-spacing-sm);
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
display: flex;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
html.
|
|
12
|
+
html.GSquYa_rp-dark .GSquYa_toolbar {
|
|
13
13
|
background-color: var(--api-color-bg);
|
|
14
14
|
border-bottom-color: var(--api-color-border);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
.GSquYa_toolbar:has(.GSquYa_memberHeading) {
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.GSquYa_toolbar h2, .GSquYa_toolbar h3 {
|
|
22
22
|
font-size: var(--api-font-size-lg);
|
|
23
23
|
padding-left: var(--api-spacing-sm);
|
|
24
24
|
font-family: var(--rp-font-family-mono);
|
|
@@ -26,14 +26,14 @@ html.pmgBdW_rp-dark .pmgBdW_toolbar {
|
|
|
26
26
|
margin-bottom: 0;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.GSquYa_toolbarLeft {
|
|
30
30
|
gap: var(--api-spacing-sm);
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
flex: 1;
|
|
33
33
|
display: flex;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.
|
|
36
|
+
.GSquYa_memberHeading {
|
|
37
37
|
font-size: var(--api-font-size-md);
|
|
38
38
|
color: var(--api-color-text);
|
|
39
39
|
height: auto;
|
|
@@ -46,11 +46,11 @@ html.pmgBdW_rp-dark .pmgBdW_toolbar {
|
|
|
46
46
|
overflow: visible;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
html.
|
|
49
|
+
html.GSquYa_rp-dark .GSquYa_memberHeading {
|
|
50
50
|
color: var(--api-color-text);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
.GSquYa_memberHeading .rp-header-anchor {
|
|
54
54
|
opacity: 0;
|
|
55
55
|
color: var(--rp-c-brand);
|
|
56
56
|
font-size: 1.5rem;
|
|
@@ -62,16 +62,16 @@ html.pmgBdW_rp-dark .pmgBdW_memberHeading {
|
|
|
62
62
|
left: -.6rem;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.GSquYa_memberHeading:hover .rp-header-anchor {
|
|
66
66
|
opacity: .85;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
.GSquYa_memberHeading .rp-header-anchor:hover {
|
|
70
70
|
border-bottom: 0px solid var(--rp-c-brand);
|
|
71
71
|
opacity: .85;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.GSquYa_memberHeadingH2 {
|
|
75
75
|
font-size: var(--api-font-size-lg);
|
|
76
76
|
text-transform: lowercase;
|
|
77
77
|
border-top: none;
|
|
@@ -83,19 +83,19 @@ html.pmgBdW_rp-dark .pmgBdW_memberHeading {
|
|
|
83
83
|
line-height: 2rem;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
86
|
+
.GSquYa_memberHeadingH2:before, .GSquYa_memberHeadingH2:after {
|
|
87
87
|
content: none;
|
|
88
88
|
margin: 0;
|
|
89
89
|
padding: 0;
|
|
90
90
|
display: none;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.
|
|
93
|
+
.GSquYa_memberHeadingH2 .rp-header-anchor {
|
|
94
94
|
font-size: var(--api-font-size-lg);
|
|
95
95
|
left: -1.5rem;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
98
|
+
.GSquYa_summary {
|
|
99
99
|
padding: 0;
|
|
100
100
|
padding-left: var(--api-spacing-sm);
|
|
101
101
|
font-size: var(--api-font-size-md);
|
|
@@ -105,21 +105,21 @@ html.pmgBdW_rp-dark .pmgBdW_memberHeading {
|
|
|
105
105
|
border: none;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
html.
|
|
108
|
+
html.GSquYa_rp-dark .GSquYa_summary {
|
|
109
109
|
color: var(--api-color-text-secondary);
|
|
110
110
|
background-color: #0000;
|
|
111
111
|
border: none;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.
|
|
114
|
+
.GSquYa_summary p:first-child {
|
|
115
115
|
margin-top: 0;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
.GSquYa_summary p:last-child, .GSquYa_summary ul:last-child, .GSquYa_summary ol:last-child {
|
|
119
119
|
margin-bottom: 0;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
.
|
|
122
|
+
.GSquYa_buttons {
|
|
123
123
|
gap: var(--api-spacing-sm);
|
|
124
124
|
display: flex;
|
|
125
125
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/SignatureToolbar/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"buttons": "
|
|
5
|
-
"memberHeading": "
|
|
6
|
-
"memberHeadingH2": "
|
|
7
|
-
"rpDark": "
|
|
8
|
-
"summary": "
|
|
9
|
-
"toolbar": "
|
|
10
|
-
"toolbarLeft": "
|
|
4
|
+
"buttons": "GSquYa_buttons",
|
|
5
|
+
"memberHeading": "GSquYa_memberHeading",
|
|
6
|
+
"memberHeadingH2": "GSquYa_memberHeadingH2",
|
|
7
|
+
"rpDark": "GSquYa_rp-dark",
|
|
8
|
+
"summary": "GSquYa_summary",
|
|
9
|
+
"toolbar": "GSquYa_toolbar",
|
|
10
|
+
"toolbarLeft": "GSquYa_toolbarLeft"
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.
|
|
1
|
+
.qANVAa_buttonGroup {
|
|
2
2
|
gap: var(--api-spacing-sm);
|
|
3
3
|
display: flex;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.qANVAa_button {
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: var(--api-spacing-xs);
|
|
9
9
|
padding: var(--api-spacing-xs) var(--api-spacing-md);
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
display: inline-flex;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.qANVAa_button:hover {
|
|
23
23
|
background-color: var(--api-color-hover-bg);
|
|
24
24
|
border-color: var(--api-color-border-hover);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.qANVAa_button:active {
|
|
28
28
|
background-color: var(--api-color-active-bg);
|
|
29
29
|
transform: scale(.98);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.
|
|
32
|
+
.qANVAa_button svg {
|
|
33
33
|
flex-shrink: 0;
|
|
34
34
|
width: 16px;
|
|
35
35
|
height: 16px;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
//#region src/runtime/components/buttons/index.module.css
|
|
3
3
|
var index_module_default = {
|
|
4
|
-
"button": "
|
|
5
|
-
"buttonGroup": "
|
|
4
|
+
"button": "qANVAa_button",
|
|
5
|
+
"buttonGroup": "qANVAa_buttonGroup"
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
//#endregion
|
package/shiki-transformer.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* class member references (e.g., `ClassName.methodName`).
|
|
9
9
|
*
|
|
10
10
|
* **How it works:**
|
|
11
|
-
* 1. The transformer is initialized with route and kind maps from
|
|
11
|
+
* 1. The transformer is initialized with route and kind maps from `prepareWorkItems`
|
|
12
12
|
* 2. During Shiki rendering, it walks the HAST tree looking for type names
|
|
13
13
|
* 3. When a match is found, it wraps the text node in an anchor tag with the route
|
|
14
14
|
* 4. Semantic CSS classes are added based on the API item kind (class, interface, etc.)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* **Relationships:**
|
|
22
22
|
* - Initialized by {@link ApiExtractorPlugin} during the beforeBuild hook
|
|
23
|
-
* - Receives route data from
|
|
23
|
+
* - Receives route data from the cross-link maps built in `prepareWorkItems`
|
|
24
24
|
* - Used alongside {@link TwoslashManager} for type-aware code blocks
|
|
25
25
|
* - Works with the hide-cut transformer for member signatures
|
|
26
26
|
*
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* });
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
-
* @see
|
|
47
|
+
* @see the `@tsdoctor/model` CrossLinker for the markdown equivalent
|
|
48
48
|
* @see {@link TwoslashManager} for type-aware documentation features
|
|
49
49
|
*/
|
|
50
50
|
var ShikiCrossLinker = class {
|
package/sync-node-fs.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { Effect, FileSystem, Layer, Option, Path, PlatformError } from "effect";
|
|
3
|
+
|
|
4
|
+
//#region src/sync-node-fs.ts
|
|
5
|
+
/**
|
|
6
|
+
* A synchronous, read-only `FileSystem` implementation over `node:fs`'s sync
|
|
7
|
+
* API, covering exactly the members `@tsdoctor/bundle`'s discovery walks:
|
|
8
|
+
* `exists`, `stat`, `readFileString`, `readDirectory` and `readLink`.
|
|
9
|
+
*
|
|
10
|
+
* The config helpers (`fromDir`/`fromParentDir`) are a SYNC public API called
|
|
11
|
+
* at rspress.config evaluation time, while bundle discovery is an Effect
|
|
12
|
+
* program over the `FileSystem` service. `@effect/platform-node`'s
|
|
13
|
+
* `NodeFileSystem` is promise-backed, so running discovery under
|
|
14
|
+
* `Effect.runSync` needs this bridge; every other member stays
|
|
15
|
+
* `layerNoop`-denied, which is deliberate — a new discovery dependency on an
|
|
16
|
+
* unimplemented member should fail loudly here, not silently misbehave.
|
|
17
|
+
*/
|
|
18
|
+
const tagOf = (cause) => {
|
|
19
|
+
const code = cause?.code;
|
|
20
|
+
if (code === "ENOENT") return "NotFound";
|
|
21
|
+
if (code === "EACCES" || code === "EPERM") return "PermissionDenied";
|
|
22
|
+
return "Unknown";
|
|
23
|
+
};
|
|
24
|
+
const fail = (method, pathOrDescriptor, cause) => PlatformError.systemError({
|
|
25
|
+
_tag: tagOf(cause),
|
|
26
|
+
module: "FileSystem",
|
|
27
|
+
method,
|
|
28
|
+
pathOrDescriptor,
|
|
29
|
+
cause
|
|
30
|
+
});
|
|
31
|
+
const typeOf = (stats) => {
|
|
32
|
+
if (stats.isDirectory()) return "Directory";
|
|
33
|
+
if (stats.isSymbolicLink()) return "SymbolicLink";
|
|
34
|
+
if (stats.isFile()) return "File";
|
|
35
|
+
return "Unknown";
|
|
36
|
+
};
|
|
37
|
+
const infoFromStats = (stats) => ({
|
|
38
|
+
type: typeOf(stats),
|
|
39
|
+
mtime: Option.some(stats.mtime),
|
|
40
|
+
atime: Option.some(stats.atime),
|
|
41
|
+
birthtime: Option.some(stats.birthtime),
|
|
42
|
+
dev: stats.dev,
|
|
43
|
+
ino: Option.some(stats.ino),
|
|
44
|
+
mode: stats.mode,
|
|
45
|
+
nlink: Option.some(stats.nlink),
|
|
46
|
+
uid: Option.some(stats.uid),
|
|
47
|
+
gid: Option.some(stats.gid),
|
|
48
|
+
rdev: Option.some(stats.rdev),
|
|
49
|
+
size: FileSystem.Size(stats.size),
|
|
50
|
+
blksize: Option.some(FileSystem.Size(stats.blksize)),
|
|
51
|
+
blocks: Option.some(stats.blocks)
|
|
52
|
+
});
|
|
53
|
+
const syncFileSystem = FileSystem.layerNoop({
|
|
54
|
+
exists: (path) => Effect.sync(() => fs.existsSync(path)),
|
|
55
|
+
stat: (path) => Effect.try({
|
|
56
|
+
try: () => infoFromStats(fs.statSync(path)),
|
|
57
|
+
catch: (cause) => fail("stat", path, cause)
|
|
58
|
+
}),
|
|
59
|
+
readFileString: (path) => Effect.try({
|
|
60
|
+
try: () => fs.readFileSync(path, "utf8"),
|
|
61
|
+
catch: (cause) => fail("readFileString", path, cause)
|
|
62
|
+
}),
|
|
63
|
+
readDirectory: (path) => Effect.try({
|
|
64
|
+
try: () => fs.readdirSync(path),
|
|
65
|
+
catch: (cause) => fail("readDirectory", path, cause)
|
|
66
|
+
}),
|
|
67
|
+
readLink: (path) => Effect.try({
|
|
68
|
+
try: () => fs.readlinkSync(path),
|
|
69
|
+
catch: (cause) => fail("readLink", path, cause)
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* The full sync environment bundle discovery runs under from the config
|
|
74
|
+
* helpers: the sync `FileSystem` bridge plus the (already sync) `Path`
|
|
75
|
+
* service.
|
|
76
|
+
*/
|
|
77
|
+
const SyncDiscoveryLayer = Layer.mergeAll(syncFileSystem, Path.layer);
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
export { SyncDiscoveryLayer };
|
package/tsdoc-metadata.json
CHANGED
package/twoslash-transformer.js
CHANGED
|
@@ -204,7 +204,7 @@ function renderMarkdownInline(markdown, context) {
|
|
|
204
204
|
* **VFS Integration:**
|
|
205
205
|
* The VFS is populated by {@link TypeRegistryService} with:
|
|
206
206
|
* - The documented package's own type definitions (from API Extractor)
|
|
207
|
-
* - External package types (fetched via
|
|
207
|
+
* - External package types (fetched via @tsdoctor/registry)
|
|
208
208
|
*
|
|
209
209
|
* **Error Handling:**
|
|
210
210
|
* TypeScript errors in code blocks are captured (not thrown) and:
|