seemore 1.3.0 → 1.3.2
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 +1 -1
- package/src/app/router.tsx +6 -1
- package/src/app/styles/globals.css +9 -0
package/package.json
CHANGED
package/src/app/router.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Component, Suspense, type ReactNode } from 'react';
|
|
1
|
+
import { Component, Suspense, useEffect, type ReactNode } from 'react';
|
|
2
2
|
import { useLocation, type RouteObject } from 'react-router';
|
|
3
|
+
import { config } from 'virtual:seemore/config';
|
|
3
4
|
import { decodePath } from '../shared/base.js';
|
|
4
5
|
import type { RouteEntry } from '../shared/types.js';
|
|
5
6
|
import { DocPage, DocsLayout, NotFound, Overview, PageError } from './layout/DocsLayout.js';
|
|
@@ -15,6 +16,10 @@ export function useRouteUrl(): string {
|
|
|
15
16
|
function Page() {
|
|
16
17
|
const url = useRouteUrl();
|
|
17
18
|
const entry = useRouteEntry(url);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
document.title =
|
|
21
|
+
entry === undefined || url === '/' ? config.title : `${entry.title} · ${config.title}`;
|
|
22
|
+
}, [url, entry?.title]);
|
|
18
23
|
// Keyed by address, so navigating away from a page that threw starts clean rather than
|
|
19
24
|
// carrying its error to every page after it. Reset by content version, so in dev an edit
|
|
20
25
|
// that fixes the file gets to render — a boundary in its error state has unmounted the
|
|
@@ -303,6 +303,15 @@
|
|
|
303
303
|
box-shadow: 0 0 0 4px var(--color-fd-muted);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
/* Written as a plain `.dark` rule rather than `dark:` on the `@apply` above: Tailwind
|
|
307
|
+
wraps a `dark:` variant reached through `@apply` in `:where(.dark, .dark *)`, which
|
|
308
|
+
carries no specificity of its own and loses the tie to the plain `box-shadow` line
|
|
309
|
+
and the `bg-fd-muted/40` utility above regardless of source order. */
|
|
310
|
+
.dark .seemore-editable [data-seemore-pos]:hover {
|
|
311
|
+
background-color: transparent;
|
|
312
|
+
box-shadow: none;
|
|
313
|
+
}
|
|
314
|
+
|
|
306
315
|
.seemore-editable .seemore-editing {
|
|
307
316
|
@apply invisible;
|
|
308
317
|
}
|