@assistant-ui/docs-theme 0.0.2 → 0.0.3
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 +89 -5
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/site/constants.d.ts +2 -0
- package/dist/site/constants.d.ts.map +1 -0
- package/dist/site/constants.js +5 -0
- package/dist/site/constants.js.map +1 -0
- package/dist/site/footer.d.ts +13 -0
- package/dist/site/footer.d.ts.map +1 -0
- package/dist/site/footer.js +35 -0
- package/dist/site/footer.js.map +1 -0
- package/dist/site/header.d.ts +13 -0
- package/dist/site/header.d.ts.map +1 -0
- package/dist/site/header.js +81 -0
- package/dist/site/header.js.map +1 -0
- package/dist/site/layout.d.ts +8 -0
- package/dist/site/layout.d.ts.map +1 -0
- package/dist/site/layout.js +21 -0
- package/dist/site/layout.js.map +1 -0
- package/dist/site/page.d.ts +9 -0
- package/dist/site/page.d.ts.map +1 -0
- package/dist/site/page.js +32 -0
- package/dist/site/page.js.map +1 -0
- package/dist/site/pager.d.ts +13 -0
- package/dist/site/pager.d.ts.map +1 -0
- package/dist/site/pager.js +36 -0
- package/dist/site/pager.js.map +1 -0
- package/dist/site/sidebar-navigation.d.ts +13 -0
- package/dist/site/sidebar-navigation.d.ts.map +1 -0
- package/dist/site/sidebar-navigation.js +185 -0
- package/dist/site/sidebar-navigation.js.map +1 -0
- package/dist/site/sidebar.d.ts +16 -0
- package/dist/site/sidebar.d.ts.map +1 -0
- package/dist/site/sidebar.js +46 -0
- package/dist/site/sidebar.js.map +1 -0
- package/dist/site/toc.d.ts +12 -0
- package/dist/site/toc.d.ts.map +1 -0
- package/dist/site/toc.js +92 -0
- package/dist/site/toc.js.map +1 -0
- package/dist/site/tree.d.ts +24 -0
- package/dist/site/tree.d.ts.map +1 -0
- package/dist/site/tree.js +14 -0
- package/dist/site/tree.js.map +1 -0
- package/dist/site/utils.d.ts +2 -0
- package/dist/site/utils.d.ts.map +1 -0
- package/dist/site/utils.js +5 -0
- package/dist/site/utils.js.map +1 -0
- package/dist/ui.d.ts +10 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +9 -0
- package/package.json +21 -11
- package/src/config.ts +1 -1
- package/src/index.ts +1 -1
- package/src/site/constants.ts +1 -0
- package/src/site/footer.tsx +59 -0
- package/src/site/header.test.tsx +89 -0
- package/src/site/header.tsx +117 -0
- package/src/site/layout.tsx +33 -0
- package/src/site/page.tsx +38 -0
- package/src/site/pager.tsx +54 -0
- package/src/site/sidebar-navigation.test.tsx +92 -0
- package/src/site/sidebar-navigation.tsx +267 -0
- package/src/site/sidebar.tsx +77 -0
- package/src/site/toc.test.tsx +187 -0
- package/src/site/toc.tsx +118 -0
- package/src/site/tree.ts +36 -0
- package/src/site/utils.ts +2 -0
- package/src/ui.ts +19 -0
- package/styles/site.css +223 -0
package/styles/site.css
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
@source "../dist/site";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--docs-header-height: 48px;
|
|
5
|
+
--docs-article-width: 56rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.docs-layout {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: minmax(0, 1fr);
|
|
11
|
+
|
|
12
|
+
@media (min-width: 1280px) {
|
|
13
|
+
&:has(.docs-toc) {
|
|
14
|
+
grid-template-columns: minmax(0, 1fr) 14rem;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
html:has(.docs-layout) {
|
|
20
|
+
scroll-padding-top: calc(var(--docs-header-height) + 6rem);
|
|
21
|
+
|
|
22
|
+
@media (min-width: 768px) {
|
|
23
|
+
scroll-padding-top: calc(var(--docs-header-height) + 2.5rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (min-width: 1280px) {
|
|
27
|
+
scroll-padding-top: calc(var(--docs-header-height) + 2rem);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.docs-prose {
|
|
32
|
+
font-size: 0.875rem;
|
|
33
|
+
line-height: 1.7;
|
|
34
|
+
|
|
35
|
+
& :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
36
|
+
margin-top: 1.25rem;
|
|
37
|
+
margin-bottom: 1.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
41
|
+
font-size: 1.25rem;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
letter-spacing: -0.02em;
|
|
44
|
+
margin-top: 2.5rem;
|
|
45
|
+
margin-bottom: 1rem;
|
|
46
|
+
line-height: 1.4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
& :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
50
|
+
font-size: 1rem;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
letter-spacing: -0.01em;
|
|
53
|
+
margin-top: 2rem;
|
|
54
|
+
margin-bottom: 0.75rem;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
& :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
margin-top: 1.5rem;
|
|
62
|
+
margin-bottom: 0.5rem;
|
|
63
|
+
line-height: 1.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
& :where(ul, ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
67
|
+
margin-top: 1rem;
|
|
68
|
+
margin-bottom: 1rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
72
|
+
margin-top: 0.25rem;
|
|
73
|
+
margin-bottom: 0.25rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&
|
|
77
|
+
:where(code):not(:where(pre code)):not(
|
|
78
|
+
:where([class~="not-prose"], [class~="not-prose"] *)
|
|
79
|
+
) {
|
|
80
|
+
font-size: 0.8125rem;
|
|
81
|
+
padding: 0.15rem 0.4rem;
|
|
82
|
+
border-radius: 0.5rem;
|
|
83
|
+
border: none;
|
|
84
|
+
background: var(--muted);
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
& [class~="not-prose"] :where(code):not(:where(pre code)) {
|
|
89
|
+
font-size: 0.75rem;
|
|
90
|
+
padding: 0.0625rem 0.3rem;
|
|
91
|
+
border-radius: 0.5rem;
|
|
92
|
+
border: none;
|
|
93
|
+
background: var(--muted);
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
& :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
98
|
+
margin-top: 1.25rem;
|
|
99
|
+
margin-bottom: 1.25rem;
|
|
100
|
+
border-radius: 0.75rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&
|
|
104
|
+
:where(blockquote):not(
|
|
105
|
+
:where([class~="not-prose"], [class~="not-prose"] *)
|
|
106
|
+
) {
|
|
107
|
+
font-style: normal;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
color: var(--muted-foreground);
|
|
110
|
+
margin-top: 1.25rem;
|
|
111
|
+
margin-bottom: 1.25rem;
|
|
112
|
+
padding-left: 1rem;
|
|
113
|
+
border-left-width: 2px;
|
|
114
|
+
border-left-color: var(--border);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&
|
|
118
|
+
:where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)):not(
|
|
119
|
+
[data-card]
|
|
120
|
+
) {
|
|
121
|
+
text-decoration: underline;
|
|
122
|
+
text-underline-offset: 2px;
|
|
123
|
+
text-decoration-color: var(--muted-foreground);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& :where(.prose-no-margin):has(table) {
|
|
127
|
+
margin-top: 0rem;
|
|
128
|
+
margin-bottom: 0rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
& :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
132
|
+
margin-top: 0rem;
|
|
133
|
+
margin-bottom: 0rem;
|
|
134
|
+
width: 100%;
|
|
135
|
+
border-collapse: separate;
|
|
136
|
+
border-spacing: 0;
|
|
137
|
+
background: var(--muted);
|
|
138
|
+
border-radius: 0.75rem;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
|
|
141
|
+
& thead {
|
|
142
|
+
background: transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
& th {
|
|
146
|
+
padding: 0.5rem 0.75rem;
|
|
147
|
+
text-align: left;
|
|
148
|
+
font-weight: 500;
|
|
149
|
+
color: var(--muted-foreground);
|
|
150
|
+
border: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
& td {
|
|
154
|
+
padding: 0.5rem 0.75rem;
|
|
155
|
+
border: none;
|
|
156
|
+
vertical-align: top;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
& tr {
|
|
160
|
+
border: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
& tbody tr {
|
|
164
|
+
background: var(--background);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
& tbody tr:first-child td:first-child {
|
|
168
|
+
border-top-left-radius: 0.5rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
& tbody tr:first-child td:last-child {
|
|
172
|
+
border-top-right-radius: 0.5rem;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
& tbody tr:last-child td:first-child {
|
|
176
|
+
border-bottom-left-radius: 0.5rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
& tbody tr:last-child td:last-child {
|
|
180
|
+
border-bottom-right-radius: 0.5rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
& code {
|
|
184
|
+
font-size: 0.75rem;
|
|
185
|
+
padding: 0.0625rem 0.25rem;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
& :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
190
|
+
margin-top: 2rem;
|
|
191
|
+
margin-bottom: 2rem;
|
|
192
|
+
border-color: var(--border);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&
|
|
196
|
+
:where(h2 + p, h3 + p, h4 + p):not(
|
|
197
|
+
:where([class~="not-prose"], [class~="not-prose"] *)
|
|
198
|
+
) {
|
|
199
|
+
margin-top: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&
|
|
203
|
+
:where(h2 + ul, h3 + ul, h4 + ul, h2 + ol, h3 + ol, h4 + ol):not(
|
|
204
|
+
:where([class~="not-prose"], [class~="not-prose"] *)
|
|
205
|
+
) {
|
|
206
|
+
margin-top: 0.5rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
& :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
210
|
+
margin-left: auto;
|
|
211
|
+
margin-right: auto;
|
|
212
|
+
border-radius: 0.75rem;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.sidebar-tree-content {
|
|
217
|
+
scrollbar-width: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.sidebar-tree-content::-webkit-scrollbar {
|
|
221
|
+
width: 0;
|
|
222
|
+
height: 0;
|
|
223
|
+
}
|