seemore 1.10.4 → 1.10.6
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 +120 -189
- package/dist/cli/index.js +4 -3
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app/styles/globals.css +26 -3
- package/src/shared/base.ts +10 -0
package/package.json
CHANGED
|
@@ -476,9 +476,11 @@
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
/* Page actions: the row above the article holding the export dropdown. Right-aligned so
|
|
479
|
-
it reads as chrome, not content, and stays clear of the heading it hangs over.
|
|
479
|
+
it reads as chrome, not content, and stays clear of the heading it hangs over. No
|
|
480
|
+
bottom margin: the main column's own `gap-10` already separates it from the article,
|
|
481
|
+
and a margin here would stack on top of that gap. */
|
|
480
482
|
.seemore-page-actions {
|
|
481
|
-
@apply relative
|
|
483
|
+
@apply relative flex justify-end;
|
|
482
484
|
}
|
|
483
485
|
|
|
484
486
|
.seemore-page-actions-trigger {
|
|
@@ -494,6 +496,19 @@
|
|
|
494
496
|
@apply size-4;
|
|
495
497
|
}
|
|
496
498
|
|
|
499
|
+
/* Mobile: the row's trigger padding reads as wasted space on a phone, and the column's
|
|
500
|
+
`gap-10` is generous for a viewport this small — tighten both below the `md`
|
|
501
|
+
breakpoint, where the TOC rail is hidden and this row is pure chrome. */
|
|
502
|
+
@media (max-width: 767.98px) {
|
|
503
|
+
.seemore-page-actions-trigger {
|
|
504
|
+
@apply px-2.5 py-1;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.seemore-main {
|
|
508
|
+
@apply gap-6;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
497
512
|
/* `top-full` is load-bearing: without it the menu keeps its static position, which in this
|
|
498
513
|
flex row is beside the trigger rather than under it, so it opens over its own button. */
|
|
499
514
|
.seemore-page-actions-menu {
|
|
@@ -629,6 +644,14 @@
|
|
|
629
644
|
color: var(--color-fd-foreground, #111827);
|
|
630
645
|
}
|
|
631
646
|
|
|
647
|
+
/* Tablet width, below the rail breakpoint: the collapsible TOC still sits in flow, but the
|
|
648
|
+
base 1rem side padding reads as too tight once the column is this wide. */
|
|
649
|
+
@media (min-width: 768px) and (max-width: 1023.98px) {
|
|
650
|
+
.seemore-export-main {
|
|
651
|
+
padding: 4rem 3rem 4rem;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
632
655
|
/* From 1024px up — the live page's own `lg` breakpoint for showing its TOC rail — there is
|
|
633
656
|
enough room for the rail if the reading column gives up its centring and narrows to make
|
|
634
657
|
space; below that the rail would ride over the text at any column width, so the
|
|
@@ -645,7 +668,7 @@
|
|
|
645
668
|
margin-inline: 0;
|
|
646
669
|
max-width: none;
|
|
647
670
|
padding-inline-end: 18rem;
|
|
648
|
-
padding-inline-start:
|
|
671
|
+
padding-inline-start: 6rem;
|
|
649
672
|
}
|
|
650
673
|
|
|
651
674
|
.seemore-export-toc {
|
package/src/shared/base.ts
CHANGED
|
@@ -25,6 +25,16 @@ export function isExternalHref(href: string): boolean {
|
|
|
25
25
|
return EXTERNAL.test(href) || href.startsWith('#') || !href.startsWith('/');
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* True only for an href that points off this site: one with a scheme (`https:`, `mailto:`)
|
|
30
|
+
* or protocol-relative (`//host/path`). Narrower than {@link isExternalHref}, which also
|
|
31
|
+
* covers relative and hash hrefs because a base must not touch those either — a distinction
|
|
32
|
+
* that matters wherever a relative path and a remote URL have to be told apart.
|
|
33
|
+
*/
|
|
34
|
+
export function isRemoteHref(href: string): boolean {
|
|
35
|
+
return EXTERNAL.test(href);
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
/** Prefix a root-relative path with the base. Idempotent; leaves external hrefs alone. */
|
|
29
39
|
export function withBase(base: string, href: string): string {
|
|
30
40
|
const b = normaliseBase(base);
|