seemore 1.10.5 → 1.10.7
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 +124 -189
- package/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app/styles/globals.css +17 -2
- 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 {
|
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);
|