seemore 1.0.3 → 1.0.4
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/package.json
CHANGED
|
@@ -81,9 +81,14 @@ export function Sidebar({ children }: { children?: ReactNode }) {
|
|
|
81
81
|
|
|
82
82
|
<div className="seemore-sidebar-column" data-open={open}>
|
|
83
83
|
<aside className="seemore-sidebar" aria-label="Documentation navigation">
|
|
84
|
-
|
|
84
|
+
{/* `toc.integrate` passes the table of contents as children: it belongs inside the
|
|
85
|
+
viewport, so nav and TOC scroll together rather than the TOC sitting below a
|
|
86
|
+
scroll container that has already claimed the column's whole height. */}
|
|
87
|
+
<SidebarViewport>
|
|
88
|
+
{rendered}
|
|
89
|
+
{children}
|
|
90
|
+
</SidebarViewport>
|
|
85
91
|
</aside>
|
|
86
|
-
{children}
|
|
87
92
|
</div>
|
|
88
93
|
</>
|
|
89
94
|
);
|
|
@@ -83,8 +83,10 @@
|
|
|
83
83
|
@apply mx-auto flex w-full max-w-[1400px] flex-1;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/* The scroll container is the viewport `SidebarViewport` renders, which sizes itself with
|
|
87
|
+
`flex-1 min-h-0` — so this has to be the flex column that gives it a bounded height. */
|
|
86
88
|
.seemore-sidebar {
|
|
87
|
-
@apply h-
|
|
89
|
+
@apply flex min-h-0 flex-1 flex-col;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
.seemore-sidebar-link {
|
|
@@ -117,8 +119,10 @@
|
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
.seemore-sidebar-column {
|
|
120
|
-
/* `pt-20` clears the sticky header, which sits above the drawer.
|
|
121
|
-
|
|
122
|
+
/* `pt-20` clears the sticky header, which sits above the drawer. Height is definite in both
|
|
123
|
+
modes — the drawer via `inset-y-0`, the rail via `md:h-[calc(100vh-4rem)]` — so the nav
|
|
124
|
+
scrolls inside itself rather than overflowing a column that cannot scroll. */
|
|
125
|
+
@apply fixed inset-y-0 start-0 z-40 flex w-72 -translate-x-full flex-col border-e border-fd-border bg-fd-background px-4 pt-20 pb-4 transition-transform rtl:translate-x-full;
|
|
122
126
|
@apply md:sticky md:top-16 md:z-auto md:h-[calc(100vh-4rem)] md:w-64 md:translate-x-0 md:px-2 md:py-6 rtl:md:translate-x-0;
|
|
123
127
|
}
|
|
124
128
|
|
|
@@ -134,6 +138,24 @@
|
|
|
134
138
|
@apply mx-auto min-w-0 max-w-3xl flex-1 px-4 py-8 md:px-8;
|
|
135
139
|
}
|
|
136
140
|
|
|
141
|
+
/* Docs are full of long identifiers — `EmbeddedPaymentsController`,
|
|
142
|
+
`Service::createIntent()` — and each is one unbreakable word. On a phone a single such
|
|
143
|
+
word is wider than the column, and an overflowing heading or inline code drags a
|
|
144
|
+
horizontal scrollbar onto the whole page. Fenced blocks are exempt: they get their own
|
|
145
|
+
scroller from fumadocs, and breaking code mid-line there would be a lie. */
|
|
146
|
+
.seemore-article :is(h1, h2, h3, h4, h5, h6),
|
|
147
|
+
.seemore-article :not(pre) > code {
|
|
148
|
+
@apply break-words;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* fumadocs renders a heading as a flex row — the link, then the copy-anchor button — and a
|
|
152
|
+
flex item defaults to `min-width: auto`, so the link floors at the width of its longest
|
|
153
|
+
word and `break-words` above never gets to act. `min-w-0` lets it shrink so the break
|
|
154
|
+
can happen. */
|
|
155
|
+
.seemore-article :is(h1, h2, h3, h4, h5, h6) > * {
|
|
156
|
+
@apply min-w-0;
|
|
157
|
+
}
|
|
158
|
+
|
|
137
159
|
.seemore-toc {
|
|
138
160
|
@apply sticky top-16 hidden h-[calc(100vh-4rem)] flex-col w-56 shrink-0 py-8 pe-4 text-sm lg:flex xl:pe-8;
|
|
139
161
|
}
|