seemore 1.10.2 → 1.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seemore",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "Let AI write the Markdown. Let seemore show it better — zero config documentation framework.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -305,7 +305,7 @@ const RUNTIME = `(function () {
305
305
 
306
306
  // Wide enough for the rail: open the collapsible so it reads as a list, not a disclosure.
307
307
  var tocDetails = document.querySelector('.seemore-export-toc details');
308
- if (tocDetails && window.matchMedia('(min-width: 1440px)').matches) tocDetails.open = true;
308
+ if (tocDetails && window.matchMedia('(min-width: 1024px)').matches) tocDetails.open = true;
309
309
 
310
310
  var main = document.querySelector('main');
311
311
  var overlay = document.createElement('div');
@@ -124,7 +124,7 @@ function bindBehaviors(): void {
124
124
 
125
125
  // Wide enough for the rail: open the collapsible so it reads as a list, not a disclosure.
126
126
  const tocDetails = document.querySelector<HTMLDetailsElement>('.seemore-export-toc details');
127
- if (tocDetails && window.matchMedia('(min-width: 1440px)').matches) tocDetails.open = true;
127
+ if (tocDetails && window.matchMedia('(min-width: 1024px)').matches) tocDetails.open = true;
128
128
 
129
129
  const overlay = document.createElement('div');
130
130
  overlay.className = 'seemore-export-overlay';
@@ -622,15 +622,53 @@
622
622
  color: var(--color-fd-foreground, #111827);
623
623
  }
624
624
 
625
- /* From 1440px up there is room for both the reading column and the rail side by side;
626
- below that the rail would ride over the text, so the collapsible stays in flow.
627
-
628
- The rail's `inset-inline-end` is pinned to the article's own centring math (its
629
- 56rem/2 half-width) rather than a flat viewport offset, so the gap between the
630
- article's right edge and the rail stays a fixed 2rem at any width above the
631
- breakpoint — matching the live page's `md:px-8` column padding — instead of shrinking
632
- toward zero as the viewport narrows toward the breakpoint. */
625
+ /* From 1024px up — the live page's own `lg` breakpoint for showing its TOC rail — there is
626
+ enough room for the rail if the reading column gives up its centring and narrows to make
627
+ space; below that the rail would ride over the text at any column width, so the
628
+ collapsible stays in flow there.
629
+
630
+ Two tiers because a centred 56rem column plus the rail's 14rem + 2rem gap needs
631
+ 1152px+ to coexist without narrowing: from 1024px the column is pinned to the left
632
+ with a right-hand reservation sized exactly for the rail, gap and outer margin; once
633
+ there is enough width (1440px) for the column to sit at its full 56rem *and* stay
634
+ centred with that same 2rem gap to the rail, it switches back to centred — matching
635
+ the live page's `md:px-8` column padding either way. */
636
+ @media (min-width: 1024px) and (max-width: 1439.98px) {
637
+ .seemore-export-main {
638
+ margin-inline: 0;
639
+ max-width: none;
640
+ padding-inline-end: 18rem;
641
+ padding-inline-start: 2rem;
642
+ }
643
+
644
+ .seemore-export-toc {
645
+ inset-inline-end: 2rem;
646
+ margin-block: 0;
647
+ max-height: calc(100vh - 8rem);
648
+ overflow-y: auto;
649
+ position: fixed;
650
+ top: 5rem;
651
+ width: 14rem;
652
+ z-index: 40;
653
+ }
654
+
655
+ .seemore-export-toc summary {
656
+ cursor: default;
657
+ margin-bottom: 0.75rem;
658
+ }
659
+
660
+ .seemore-export-toc summary::after {
661
+ display: none;
662
+ }
663
+ }
664
+
633
665
  @media (min-width: 1440px) {
666
+ .seemore-export-main {
667
+ margin-inline: auto;
668
+ max-width: 56rem;
669
+ padding-inline: 1rem;
670
+ }
671
+
634
672
  .seemore-export-toc {
635
673
  inset-inline-end: calc((100vw - 56rem) / 2 - 14rem - 2rem);
636
674
  margin-block: 0;