@xiee/utils 1.14.154 → 1.14.156
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/AGENTS.md +2 -2
- package/README.md +2 -1
- package/css/pages.css +8 -5
- package/css/pages.min.css +1 -1
- package/css/pages.min.css.map +1 -1
- package/css/pkgdown-like.css +1 -1
- package/css/pkgdown-like.min.css +1 -1
- package/css/pkgdown-like.min.css.map +1 -1
- package/css/site.css +17 -6
- package/css/site.min.css +1 -1
- package/css/site.min.css.map +1 -1
- package/js/nav-highlight.js +2 -1
- package/js/nav-highlight.min.js +1 -1
- package/js/nav-highlight.min.js.map +1 -1
- package/js/pages.js +293 -319
- package/js/pages.min.js +1 -1
- package/js/pages.min.js.map +1 -1
- package/package.json +1 -1
- package/release.sh +24 -18
package/AGENTS.md
CHANGED
|
@@ -35,6 +35,6 @@ CHROMIUM_PATH=/usr/bin/chromium-browser npm test # use an installed browser
|
|
|
35
35
|
|
|
36
36
|
## Releases
|
|
37
37
|
|
|
38
|
-
Use `./release.sh [-
|
|
38
|
+
Use `./release.sh [-t] [patch|minor|major|X.Y.Z]` (default: patch). It pushes `main`, waits for the CI tests (`test.yml`; `-t` skips the wait) and, only if they pass, bumps the version in `package.json` and `package-lock.json`, commits `Bump to X.Y.Z`, tags `vX.Y.Z`, and pushes both. Pushing a `v*` tag triggers `.github/workflows/npm-publish.yml`, which builds the minified files, runs `npm publish`, and purges the CDN cache. The tests are not run locally: on a shared machine with a low thread limit (`ulimit -u`) too many parallel browsers crash.
|
|
39
39
|
|
|
40
|
-
Pushing and tagging are outward-facing: run the script
|
|
40
|
+
Pushing and tagging are outward-facing: run the script only when the user asks for a release.
|
package/README.md
CHANGED
|
@@ -141,7 +141,8 @@ expressions (by default, MathJax ignores math in `<code>`).
|
|
|
141
141
|
Highlight the links in `<nav>` that point to the current page by setting
|
|
142
142
|
`aria-current="page"` on them (style them via `nav a[aria-current]`). The
|
|
143
143
|
`.html` extension, `index.html`, trailing slashes, query strings, and hashes are
|
|
144
|
-
ignored when comparing URLs, so `foo.html` matches `foo`.
|
|
144
|
+
ignored when comparing URLs, so `foo.html` matches `foo`. Bare #hash links (e.g., `#sec`) are skipped: they
|
|
145
|
+
only jump within the current page.
|
|
145
146
|
|
|
146
147
|
## no-highlight.js
|
|
147
148
|
|
package/css/pages.css
CHANGED
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
outline-offset: 2px;
|
|
196
196
|
}
|
|
197
197
|
.pagesjs-tools {
|
|
198
|
-
position: fixed
|
|
198
|
+
position: absolute; /* (scrolls with the unpaginated page; fixed when paginated) */
|
|
199
199
|
top: 1em;
|
|
200
200
|
left: 1em;
|
|
201
201
|
z-index: 9999;
|
|
@@ -204,17 +204,19 @@
|
|
|
204
204
|
align-items: flex-start;
|
|
205
205
|
gap: .5em;
|
|
206
206
|
font: 14px sans-serif;
|
|
207
|
-
|
|
207
|
+
& > a, .pagesjs-panel {
|
|
208
208
|
background: Canvas;
|
|
209
209
|
color: CanvasText;
|
|
210
210
|
border: 1px solid;
|
|
211
211
|
border-radius: .3em;
|
|
212
212
|
}
|
|
213
|
-
|
|
213
|
+
& > a {
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
justify-content: center;
|
|
214
217
|
width: 2.2em;
|
|
215
218
|
height: 2.2em;
|
|
216
|
-
|
|
217
|
-
cursor: pointer;
|
|
219
|
+
text-decoration: none;
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
222
|
.pagesjs-panel {
|
|
@@ -287,6 +289,7 @@
|
|
|
287
289
|
}
|
|
288
290
|
}
|
|
289
291
|
}
|
|
292
|
+
.pagesjs .pagesjs-tools { position: fixed; }
|
|
290
293
|
@media print {
|
|
291
294
|
.pagesjs-tools { display: none; }
|
|
292
295
|
.pagesjs-hit { outline: none; }
|
package/css/pages.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--paper-width:210mm;--paper-height:297mm;--paper-margin-top:40px;--paper-margin-right:80px;--paper-margin-bottom:40px;--paper-margin-left:80px;--page-header-height:40px;--page-header-bottom:40px;--page-footer-height:40px;--page-footer-top:40px;--paper-w:var(--paper-width);--paper-h:var(--paper-height)}@page{size:var(--paper-width) var(--paper-height);margin:0}@page wide{size:var(--paper-height) var(--paper-width);margin:0}@page multiple{margin-top:var(--paper-margin-top);margin-bottom:var(--paper-margin-bottom)}.page-multiple{page:multiple}.page-wide{page:wide;--paper-width:var(--paper-h);--paper-height:var(--paper-w)}.pagesjs{flex-wrap:wrap;justify-content:center;gap:5mm;max-width:100%;margin:5mm;padding:0;display:flex;& .pagesjs-front,& .chapter{min-height:unset;box-shadow:none}&>*,&:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc){display:none}& .pagesjs-page{width:var(--paper-width);height:var(--paper-height);padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);break-before:page;flex-direction:column;flex:none;justify-content:space-between;display:flex;overflow:hidden;& img{max-width:100%}& .chapter-before,& .chapter-after,& .buttons:has(+.chapter-before){display:none}& #TOC{border:none;margin-left:auto;padding:0;&:not(.chapter-toc):is(.fragment-first,:not(.pagesjs-fragmented)):before{content:"Contents";margin-bottom:1em;font-size:1.5em;font-weight:700;display:block}& a{display:flex;&:after{content:attr(data-page-number);align-self:end;margin-left:1ch}& .section-number{margin-right:.3em}& .toc-text{flex:1 0;position:relative;overflow:hidden;&:after{content:"";border-bottom:1px dashed;width:100%;margin-left:1ch;position:absolute;bottom:1.5ex}}}}& .pagesjs-wrap{box-shadow:none!important;float:none!important;background:0 0!important;border:none!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:block!important;position:static!important;transform:none!important}& .pagesjs-run{display:block}& .pagesjs-fragmented{&:not(.fragment-first){border-top:none;margin-top:0;&>thead{opacity:.5}}&:not(.fragment-last){border-bottom:none;margin-bottom:0;&>tfoot{opacity:.5}}}& li.pagesjs-fragmented:not(.fragment-first)::marker{content:""}& .fullwidth{float:none;max-width:none;width:var(--paper-width);margin-left:calc(0px - var(--paper-margin-left));transform:none;& *{max-width:calc(var(--paper-width) - 4em)}}&.page-float .pagesjs-body{flex-direction:column;justify-content:safe center;display:flex}& .footnotes{margin-top:1.5em}& .footnotes:before{content:"";border-top:1px solid;max-width:20em;display:block}&:has(.side-left,.embed-left) .pagesjs-body{padding-left:calc(0px - var(--side-margin));& .fullwidth{transform:translate(var(--side-margin))}}&:has(.side-right,.embed-right) .pagesjs-body{padding-right:calc(0px - var(--side-margin))}& .side{background:0 0;font-size:.9em}}}.pagesjs>.pagesjs-progress{z-index:9999;color:#fff;background:#000000bf;border-radius:1em;padding:.3em .8em;font:14px sans-serif;display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.pagesjs-hit{outline-offset:2px;outline:3px solid #e33}.pagesjs-tools{z-index:9999;flex-direction:column;align-items:flex-start;gap:.5em;font:14px sans-serif;display:flex;position:
|
|
1
|
+
:root{--paper-width:210mm;--paper-height:297mm;--paper-margin-top:40px;--paper-margin-right:80px;--paper-margin-bottom:40px;--paper-margin-left:80px;--page-header-height:40px;--page-header-bottom:40px;--page-footer-height:40px;--page-footer-top:40px;--paper-w:var(--paper-width);--paper-h:var(--paper-height)}@page{size:var(--paper-width) var(--paper-height);margin:0}@page wide{size:var(--paper-height) var(--paper-width);margin:0}@page multiple{margin-top:var(--paper-margin-top);margin-bottom:var(--paper-margin-bottom)}.page-multiple{page:multiple}.page-wide{page:wide;--paper-width:var(--paper-h);--paper-height:var(--paper-w)}.pagesjs{flex-wrap:wrap;justify-content:center;gap:5mm;max-width:100%;margin:5mm;padding:0;display:flex;& .pagesjs-front,& .chapter{min-height:unset;box-shadow:none}&>*,&:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc){display:none}& .pagesjs-page{width:var(--paper-width);height:var(--paper-height);padding:var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);break-before:page;flex-direction:column;flex:none;justify-content:space-between;display:flex;overflow:hidden;& img{max-width:100%}& .chapter-before,& .chapter-after,& .buttons:has(+.chapter-before){display:none}& #TOC{border:none;margin-left:auto;padding:0;&:not(.chapter-toc):is(.fragment-first,:not(.pagesjs-fragmented)):before{content:"Contents";margin-bottom:1em;font-size:1.5em;font-weight:700;display:block}& a{display:flex;&:after{content:attr(data-page-number);align-self:end;margin-left:1ch}& .section-number{margin-right:.3em}& .toc-text{flex:1 0;position:relative;overflow:hidden;&:after{content:"";border-bottom:1px dashed;width:100%;margin-left:1ch;position:absolute;bottom:1.5ex}}}}& .pagesjs-wrap{box-shadow:none!important;float:none!important;background:0 0!important;border:none!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;display:block!important;position:static!important;transform:none!important}& .pagesjs-run{display:block}& .pagesjs-fragmented{&:not(.fragment-first){border-top:none;margin-top:0;&>thead{opacity:.5}}&:not(.fragment-last){border-bottom:none;margin-bottom:0;&>tfoot{opacity:.5}}}& li.pagesjs-fragmented:not(.fragment-first)::marker{content:""}& .fullwidth{float:none;max-width:none;width:var(--paper-width);margin-left:calc(0px - var(--paper-margin-left));transform:none;& *{max-width:calc(var(--paper-width) - 4em)}}&.page-float .pagesjs-body{flex-direction:column;justify-content:safe center;display:flex}& .footnotes{margin-top:1.5em}& .footnotes:before{content:"";border-top:1px solid;max-width:20em;display:block}&:has(.side-left,.embed-left) .pagesjs-body{padding-left:calc(0px - var(--side-margin));& .fullwidth{transform:translate(var(--side-margin))}}&:has(.side-right,.embed-right) .pagesjs-body{padding-right:calc(0px - var(--side-margin))}& .side{background:0 0;font-size:.9em}}}.pagesjs>.pagesjs-progress{z-index:9999;color:#fff;background:#000000bf;border-radius:1em;padding:.3em .8em;font:14px sans-serif;display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.pagesjs-hit{outline-offset:2px;outline:3px solid #e33}.pagesjs-tools{z-index:9999;flex-direction:column;align-items:flex-start;gap:.5em;font:14px sans-serif;display:flex;position:absolute;top:1em;left:1em;&>a,& .pagesjs-panel{color:canvastext;background:canvas;border:1px solid;border-radius:.3em}&>a{justify-content:center;align-items:center;width:2.2em;height:2.2em;text-decoration:none;display:flex}}.pagesjs-panel{width:min(30em,100vw - 5em);max-height:calc(100vh - 2em);padding:.5em 1em;position:absolute;top:0;left:calc(100% + .5em);overflow:auto;box-shadow:0 2px 8px #0000004d;& ul{margin:0;padding-left:1.2em;list-style:none}&>nav>ul,& .pagesjs-problems{padding-left:0}& a{color:inherit;padding:.15em 0;text-decoration:none;display:block}& a:before{content:attr(data-page-number);float:right;opacity:.6}& a:hover{text-decoration:underline}& li{cursor:pointer;padding:.15em 0}}.pagesjs-settle .pagesjs-body{padding:0!important}.pagesjs-header,.pagesjs-footer{justify-content:space-between;font-size:.9em;display:flex}.pagesjs-header{flex:0 0 var(--page-header-height);margin-bottom:var(--page-header-bottom);align-items:end;&:before{content:attr(data-main-title)}&:after{content:attr(data-page-title)}}.pagesjs-footer{flex:0 0 var(--page-footer-height);margin-top:var(--page-footer-top);align-items:start;&:before{content:attr(data-page-url)}&:after{content:attr(data-page-number)}}.pagesjs-body{flex-grow:1;min-height:0;position:relative}@media only screen{.pagesjs{background:#f7f7f7;& .pagesjs-page{background:#fff}& .page-multiple{overflow-y:auto}}.pagesjs-filling{display:block;& .pagesjs-page{opacity:0;height:auto}}}.pagesjs .pagesjs-tools{position:fixed}@media print{.pagesjs-tools{display:none}.pagesjs-hit{outline:none}.pagesjs{gap:0;margin:0;display:block;& .page-multiple{height:auto;padding-top:0;padding-bottom:0}}}@media (prefers-color-scheme:dark){.pagesjs-page{box-shadow:0 0 0 1px #bbb}}
|
|
2
2
|
/*# sourceMappingURL=pages.min.css.map */
|
package/css/pages.min.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,qTAeA,2DAKA,gEAIA,2FAIA,6BAGA,gFAKA,wGAQE,6DAIA,sFAGA,+RAUE,qBAGA,iFAGA,8CAIE,4JAOA,iBAEE,sEAKA,oCAGA,uDAIE,yGAaN,2TAeA,6BAIA,sBACE,oDAGE,oBAEF,yDAGE,qBAIJ,gEAGA,gIAOE,8CAGF,0FAKA,8BAGA,iFAMA,wFAEE,sDAIF,2FAGA,wCAMJ,8MAaA,uDAIA,
|
|
1
|
+
{"version":3,"mappings":"AAAA,qTAeA,2DAKA,gEAIA,2FAIA,6BAGA,gFAKA,wGAQE,6DAIA,sFAGA,+RAUE,qBAGA,iFAGA,8CAIE,4JAOA,iBAEE,sEAKA,oCAGA,uDAIE,yGAaN,2TAeA,6BAIA,sBACE,oDAGE,oBAEF,yDAGE,qBAIJ,gEAGA,gIAOE,8CAGF,0FAKA,8BAGA,iFAMA,wFAEE,sDAIF,2FAGA,wCAMJ,8MAaA,uDAIA,uJAUE,4FAMA,0GASF,qLASE,iDACA,4CACA,qEACA,iEACA,oCACA,qCAEF,kDAIA,0FAKA,2GAIE,uCAGA,uCAIF,uGAIE,qCAGA,wCAIF,yDAKA,mBACE,4BAEE,gCAGA,kCAIF,+BAEE,wCAMJ,uCACA,aACE,4BACA,0BACA,sCAIE,8DAOJ,mCACE","sources":["pages.css"],"sourcesContent":[":root {\n --paper-width: 210mm;\n --paper-height: 297mm;\n --paper-margin-top: 40px;\n --paper-margin-right: 80px;\n --paper-margin-bottom: 40px;\n --paper-margin-left: 80px;\n --page-header-height: 40px;\n --page-header-bottom: 40px;\n --page-footer-height: 40px;\n --page-footer-top: 40px;\n /* (copies, so that a landscape page can swap the sizes without a cycle) */\n --paper-w: var(--paper-width);\n --paper-h: var(--paper-height);\n}\n@page {\n size: var(--paper-width) var(--paper-height);\n margin: 0;\n}\n/* the page of a float that is too wide for a portrait page (pages.js): the paper turned */\n@page wide {\n size: var(--paper-height) var(--paper-width);\n margin: 0;\n}\n@page multiple {\n margin-top: var(--paper-margin-top);\n margin-bottom: var(--paper-margin-bottom);\n}\n.page-multiple {\n page: multiple;\n}\n.page-wide {\n page: wide;\n --paper-width: var(--paper-h);\n --paper-height: var(--paper-w);\n}\n.pagesjs {\n padding: 0;\n max-width: 100%;\n margin: 5mm;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n gap: 5mm;\n .pagesjs-front, .chapter {\n min-height: unset;\n box-shadow: none;\n }\n & > *, &:not(:has(.pagesjs-front)):has(.chapter-toc) #TOC:not(.chapter-toc) {\n display: none;\n }\n .pagesjs-page {\n width: var(--paper-width);\n height: var(--paper-height);\n flex: none; /* (keep the paper size in a narrow window: the content is laid out for it) */\n padding: var(--paper-margin-top) var(--paper-margin-right) var(--paper-margin-bottom) var(--paper-margin-left);\n break-before: page; /* (not break-after: a named page after a break-after gets a blank page in Chrome) */\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow: hidden;\n img {\n max-width: 100%;\n }\n .chapter-before, .chapter-after, .buttons:has(+ .chapter-before) {\n display: none;\n }\n #TOC {\n border: none;\n padding: 0;\n margin-left: auto;\n &:not(.chapter-toc):is(.fragment-first, :not(.pagesjs-fragmented))::before {\n content: \"Contents\";\n display: block;\n font-weight: bold;\n font-size: 1.5em;\n margin-bottom: 1em;\n }\n a {\n display: flex;\n &::after {\n content: attr(data-page-number);\n align-self: end;\n margin-left: 1ch;\n }\n .section-number {\n margin-right: .3em;\n }\n .toc-text {\n position: relative;\n flex: 1 0;\n overflow: hidden;\n &::after {\n content: \"\";\n width: 100%;\n position: absolute;\n bottom: 1.5ex;\n margin-left: 1ch;\n border-bottom: dashed 1px;\n }\n }\n }\n }\n /* wrappers cloned from the content root and its ancestors: keep their\n context for CSS selectors, but not their boxes */\n .pagesjs-wrap {\n display: block !important;\n margin: 0 !important;\n padding: 0 !important;\n border: none !important;\n box-shadow: none !important;\n background: none !important;\n width: auto !important;\n max-width: none !important;\n min-height: 0 !important;\n height: auto !important;\n float: none !important;\n position: static !important;\n transform: none !important;\n }\n .pagesjs-run {\n display: block;\n }\n /* pieces of a fragmented element: slice it (instead of decorating each piece) */\n .pagesjs-fragmented {\n &:not(.fragment-first) {\n border-top: none;\n margin-top: 0;\n & > thead { opacity: .5; }\n }\n &:not(.fragment-last) {\n border-bottom: none;\n margin-bottom: 0;\n & > tfoot { opacity: .5; }\n }\n }\n /* a list item continued from the previous page has no marker */\n li.pagesjs-fragmented:not(.fragment-first)::marker {\n content: \"\";\n }\n .fullwidth {\n float: none;\n max-width: none;\n width: var(--paper-width);\n margin-left: calc(0px - var(--paper-margin-left));\n transform: none;\n /* (article.css caps the content at the viewport, which differs between screen and print) */\n & * { max-width: calc(var(--paper-width) - 4em); }\n }\n /* the page of a float that takes the whole page (the class is set by pages.js): center it */\n &.page-float .pagesjs-body {\n display: flex;\n flex-direction: column;\n justify-content: safe center; /* (a float taller than the page starts at the top) */\n }\n .footnotes {\n margin-top: 1.5em;\n }\n .footnotes::before {\n content: \"\";\n display: block;\n max-width: 20em;\n border-top: solid 1px;\n }\n &:has(.side-left, .embed-left) .pagesjs-body {\n padding-left: calc(0px - var(--side-margin));\n .fullwidth {\n transform: translate(var(--side-margin));\n }\n }\n &:has(.side-right, .embed-right) .pagesjs-body {\n padding-right: calc(0px - var(--side-margin));\n }\n .side {\n font-size: .9em;\n background: none;\n }\n }\n}\n.pagesjs > .pagesjs-progress {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9999;\n padding: .3em .8em;\n border-radius: 1em;\n background: rgba(0, 0, 0, .75);\n color: white;\n font: 14px sans-serif;\n}\n.pagesjs-hit {\n outline: 3px solid #e33;\n outline-offset: 2px;\n}\n.pagesjs-tools {\n position: absolute; /* (scrolls with the unpaginated page; fixed when paginated) */\n top: 1em;\n left: 1em;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: .5em;\n font: 14px sans-serif;\n & > a, .pagesjs-panel {\n background: Canvas;\n color: CanvasText;\n border: 1px solid;\n border-radius: .3em;\n }\n & > a {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.2em;\n height: 2.2em;\n text-decoration: none;\n }\n}\n.pagesjs-panel {\n position: absolute;\n top: 0;\n left: calc(100% + .5em); /* (beside the buttons) */\n width: min(30em, calc(100vw - 5em));\n max-height: calc(100vh - 2em); /* (the panel starts at the top of the toolbar, 1em from the top) */\n overflow: auto;\n padding: .5em 1em;\n box-shadow: 0 2px 8px rgba(0, 0, 0, .3);\n ul { margin: 0; padding-left: 1.2em; list-style: none; }\n & > nav > ul, .pagesjs-problems { padding-left: 0; }\n a { display: block; padding: .15em 0; color: inherit; text-decoration: none; }\n a::before { content: attr(data-page-number); float: right; opacity: .6; }\n a:hover { text-decoration: underline; }\n li { cursor: pointer; padding: .15em 0; }\n}\n.pagesjs-settle .pagesjs-body {\n /* the probe page that holds all content has sides, but normal pages don't */\n padding: 0 !important;\n}\n.pagesjs-header, .pagesjs-footer {\n font-size: .9em;\n display: flex;\n justify-content: space-between;\n}\n.pagesjs-header {\n flex: 0 0 var(--page-header-height);\n margin-bottom: var(--page-header-bottom);\n align-items: end;\n &::before {\n content: attr(data-main-title);\n }\n &::after {\n content: attr(data-page-title);\n }\n}\n.pagesjs-footer {\n flex: 0 0 var(--page-footer-height);\n margin-top: var(--page-footer-top);\n align-items: start;\n &::before {\n content: attr(data-page-url);\n }\n &::after {\n content: attr(data-page-number);\n }\n}\n.pagesjs-body {\n flex-grow: 1;\n min-height: 0; /* don't let the body push the footer down when content overhangs by a few pixels */\n position: relative;\n}\n@media only screen {\n .pagesjs {\n background: #f7f7f7;\n .pagesjs-page {\n background: white;\n }\n .page-multiple {\n overflow-y: auto;\n }\n }\n .pagesjs-filling {\n display: block;\n .pagesjs-page {\n opacity: 0; /* don't show the page that is being filled (only the progress) */\n height: auto;\n }\n }\n}\n.pagesjs .pagesjs-tools { position: fixed; }\n@media print {\n .pagesjs-tools { display: none; }\n .pagesjs-hit { outline: none; }\n .pagesjs {\n display: block; /* (named pages, i.e., landscape ones, don't work in a flex container) */\n margin: 0;\n gap: 0;\n .page-multiple {\n padding-top: 0;\n padding-bottom: 0;\n height: auto;\n }\n }\n}\n@media (prefers-color-scheme: dark) {\n .pagesjs-page {\n box-shadow: 0 0 0 1px #bbb;\n }\n}\n"],"names":[]}
|
package/css/pkgdown-like.css
CHANGED
package/css/pkgdown-like.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--pk-primary:#0054ad;--pk-fg:#212529;--pk-muted:#212529bf;--pk-bg:#fff;--pk-border:#dee2e6;--pk-code-bg:#0000000a;--pk-soft:#2125291a;--pk-nav-bg:color-mix(in oklab, var(--pk-bg) 90%, var(--pk-primary));--accent:var(--pk-primary);--muted-bg:var(--pk-code-bg);--border-color:var(--pk-border);--rule-color:var(--pk-border);--article-bg:transparent;--side-width:16rem}@media (prefers-color-scheme:dark){:root{--pk-bg:#deddd8}}body{background:var(--pk-bg);max-width:1140px;color:var(--pk-fg);padding-top:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}a{color:var(--pk-primary)}article h2{border:0}.site-nav{background:var(--pk-nav-bg);box-shadow:0 0 0 100vmax var(--pk-nav-bg);clip-path:inset(0 -100vmax);padding:.5rem 0;&>p{align-items:center;margin:0;&,&:last-child{border:0}}& a{color:inherit;background:0 0;border-radius:.5rem;margin:0;&:hover{background:var(--pk-soft);color:inherit}&[aria-current]{box-shadow:none;background:var(--pk-soft);margin-bottom:0}&.brand{font-size:1.25rem}}& .version{color:var(--pk-muted);margin-right:1em}}article:not(.pagesjs *),.frontmatter{box-shadow:none;background:0 0;margin:0}.frontmatter{border-bottom:1px solid var(--pk-border);text-align:left;margin:1.5rem 0 .5rem;padding-bottom:.5rem}@media (width>=62em){article:not(.pagesjs *){margin-right:calc(var(--side-width) + var(--side-gap))}}.side{background:var(--pk-bg)}#TOC{position:sticky}#TOC.side{& .active{color:var(--pk-primary)}&:before{content:"On this page";margin:.5rem 0;font-size:1.25rem;font-weight:500;display:block}& a{color:inherit}}body:has(.pkg-desc) #TOC{display:none}pre>code,pre>code[class]{border:1px solid var(--pk-border);background:var(--pk-code-bg);border-radius:.5rem}:not(pre)>code{background:var(--pk-code-bg);border-radius:.5rem}footer{color:var(--pk-muted);border-top:1px solid var(--pk-border);font-size:.875em}
|
|
1
|
+
:root{--pk-primary:#0054ad;--pk-fg:#212529;--pk-muted:#212529bf;--pk-bg:#fff;--pk-border:#dee2e6;--pk-code-bg:#0000000a;--pk-soft:#2125291a;--pk-nav-bg:color-mix(in oklab, var(--pk-bg) 90%, var(--pk-primary));--accent:var(--pk-primary);--muted-bg:var(--pk-code-bg);--border-color:var(--pk-border);--rule-color:var(--pk-border);--article-bg:transparent;--side-width:16rem}@media (prefers-color-scheme:dark){:root{--pk-bg:#deddd8}}body{background:var(--pk-bg);max-width:1140px;color:var(--pk-fg);padding-top:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}a{color:var(--pk-primary)}article h2{border:0}.site-nav{background:var(--pk-nav-bg);box-shadow:0 0 0 100vmax var(--pk-nav-bg);clip-path:inset(0 -100vmax);padding:.5rem 0;&>p{align-items:center;margin:0;&,&:last-child{border:0}}& a,& button{color:inherit;background:0 0;border-radius:.5rem;margin:0;&:hover{background:var(--pk-soft);color:inherit}&[aria-current]{box-shadow:none;background:var(--pk-soft);margin-bottom:0}&.brand{font-size:1.25rem}}& .version{color:var(--pk-muted);margin-right:1em}}article:not(.pagesjs *),.frontmatter{box-shadow:none;background:0 0;margin:0}.frontmatter{border-bottom:1px solid var(--pk-border);text-align:left;margin:1.5rem 0 .5rem;padding-bottom:.5rem}@media (width>=62em){article:not(.pagesjs *){margin-right:calc(var(--side-width) + var(--side-gap))}}.side{background:var(--pk-bg)}#TOC{position:sticky}#TOC.side{& .active{color:var(--pk-primary)}&:before{content:"On this page";margin:.5rem 0;font-size:1.25rem;font-weight:500;display:block}& a{color:inherit}}body:has(.pkg-desc) #TOC{display:none}pre>code,pre>code[class]{border:1px solid var(--pk-border);background:var(--pk-code-bg);border-radius:.5rem}:not(pre)>code{background:var(--pk-code-bg);border-radius:.5rem}footer{color:var(--pk-muted);border-top:1px solid var(--pk-border);font-size:.875em}
|
|
2
2
|
/*# sourceMappingURL=pkgdown-like.min.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAIA,mXAgBA,mCACE,uBAKF,mKAOA,0BACA,oBAGA,4HAKE,gCAGE,yBAEF,
|
|
1
|
+
{"version":3,"mappings":"AAIA,mXAgBA,mCACE,uBAKF,mKAOA,0BACA,oBAGA,4HAKE,gCAGE,yBAEF,uEAKE,gDACA,0EACA,2BAEF,mDAIF,6EAKA,iHAQA,qBACE,gFAIF,8BAEA,qBACA,UACE,kCACA,+FAOA,mBAEF,sCAGA,4GAKA,gEAKA","sources":["pkgdown-like.css"],"sourcesContent":["/* Make a site look like a pkgdown site (Bootstrap 5): a tinted top navbar, a\n page header with a rule, a right sidebar (\"On this page\"), pale code blocks.\n Load it after the default site CSS. The TOC goes to the right via\n `toc: {class: \"side side-right\"}` in _litedown.yml. */\n:root {\n --pk-primary: #0054ad;\n --pk-fg: #212529;\n --pk-muted: rgba(33, 37, 41, .75);\n --pk-bg: #fff;\n --pk-border: #dee2e6;\n --pk-code-bg: rgba(0, 0, 0, .04);\n --pk-soft: rgba(33, 37, 41, .1);\n --pk-nav-bg: color-mix(in oklab, var(--pk-bg) 90%, var(--pk-primary));\n --accent: var(--pk-primary);\n --muted-bg: var(--pk-code-bg);\n --border-color: var(--pk-border);\n --rule-color: var(--pk-border);\n --article-bg: transparent;\n --side-width: 16rem;\n}\n@media (prefers-color-scheme: dark) {\n :root {\n --pk-bg: #deddd8;\n }\n}\n\nbody {\n max-width: 1140px;\n padding-top: 0;\n background: var(--pk-bg);\n color: var(--pk-fg);\n font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n}\na { color: var(--pk-primary); }\narticle h2 { border: 0; }\n\n/* tinted full-bleed navbar */\n.site-nav {\n padding: .5rem 0;\n background: var(--pk-nav-bg);\n box-shadow: 0 0 0 100vmax var(--pk-nav-bg);\n clip-path: inset(0 -100vmax);\n & > p {\n align-items: center;\n margin: 0;\n &, &:last-child { border: 0; }\n }\n a, button {\n margin: 0;\n border-radius: .5rem;\n background: none;\n color: inherit;\n &:hover { background: var(--pk-soft); color: inherit; }\n &[aria-current] { box-shadow: none; margin-bottom: 0; background: var(--pk-soft); }\n &.brand { font-size: 1.25rem; }\n }\n .version { color: var(--pk-muted); margin-right: 1em; }\n}\n\n/* page without card; header with a rule below */\narticle:not(.pagesjs *), .frontmatter {\n margin: 0;\n background: none;\n box-shadow: none;\n}\n.frontmatter {\n margin: 1.5rem 0 .5rem;\n padding-bottom: .5rem;\n border-bottom: 1px solid var(--pk-border);\n text-align: left;\n}\n\n/* make room for the sidebar, which hangs in the right margin of the article */\n@media (min-width: 62em) {\n article:not(.pagesjs *) { margin-right: calc(var(--side-width) + var(--side-gap)); }\n}\n\n/* \"On this page\" */\n.side { background: var(--pk-bg); }\n\n#TOC { position: sticky; }\n#TOC.side {\n .active { color: var(--pk-primary); }\n &::before {\n content: \"On this page\";\n display: block;\n margin: .5rem 0;\n font-size: 1.25rem;\n font-weight: 500;\n }\n a { color: inherit; }\n}\nbody:has(.pkg-desc) #TOC { display: none; }\n\n/* code */\npre > code, pre > code[class] {\n border: 1px solid var(--pk-border);\n border-radius: .5rem;\n background: var(--pk-code-bg);\n}\n:not(pre) > code {\n border-radius: .5rem;\n background: var(--pk-code-bg);\n}\n\nfooter {\n font-size: .875em;\n color: var(--pk-muted);\n border-top: 1px solid var(--pk-border);\n}\n"],"names":[]}
|
package/css/site.css
CHANGED
|
@@ -22,13 +22,24 @@ h1, h2, h3 {
|
|
|
22
22
|
box-shadow: 0 1.5px var(--accent), inset 0 -1px var(--accent);
|
|
23
23
|
margin-bottom: -1px;
|
|
24
24
|
}
|
|
25
|
-
&.right {
|
|
26
|
-
margin-left: auto;
|
|
27
|
-
margin-right: 0;
|
|
28
|
-
img { vertical-align: middle; }
|
|
29
|
-
&:hover img { filter: invert(1); }
|
|
30
|
-
}
|
|
31
25
|
}
|
|
26
|
+
/* icons (e.g., GitHub) and the print button of pages.js (<span class="pagesjs-toggle">,
|
|
27
|
+
which pushes the icons after it to the right): same size, 1.5em on hover */
|
|
28
|
+
img, svg { width: 1.1em; height: 1.1em; vertical-align: middle; transition: transform .15s; }
|
|
29
|
+
a:hover :is(img, svg) { transform: scale(1.36); }
|
|
30
|
+
a:hover img { filter: invert(1); }
|
|
31
|
+
/* square boxes around the icons (1.1em + padding), centered in the row */
|
|
32
|
+
a:has(> :is(img, svg)) {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-self: center;
|
|
37
|
+
width: 1.6em;
|
|
38
|
+
height: 1.6em;
|
|
39
|
+
padding: 0;
|
|
40
|
+
margin-right: 0;
|
|
41
|
+
}
|
|
42
|
+
.pagesjs-toggle { display: flex; align-self: center; margin-left: auto; }
|
|
32
43
|
/* package version next to the name: center it in the flex row */
|
|
33
44
|
.version { align-self: center; margin-right: .5em; }
|
|
34
45
|
}
|
package/css/site.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
h1,h2,h3{font-weight:500}.site-nav{&>p{flex-wrap:wrap;display:flex;&:last-child{border-bottom:1px dashed var(--rule-color)}}& a{background:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block;&:hover{background:var(--accent);color:#fff}&[aria-current]{box-shadow:0 1.5px var(--accent), inset 0 -1px var(--accent);margin-bottom:-1px}
|
|
1
|
+
h1,h2,h3{font-weight:500}.site-nav{&>p{flex-wrap:wrap;display:flex;&:last-child{border-bottom:1px dashed var(--rule-color)}}& a{background:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block;&:hover{background:var(--accent);color:#fff}&[aria-current]{box-shadow:0 1.5px var(--accent), inset 0 -1px var(--accent);margin-bottom:-1px}}& img,& svg{vertical-align:middle;width:1.1em;height:1.1em;transition:transform .15s}& a:hover :is(img,svg){transform:scale(1.36)}& a:hover img{filter:invert()}& a:has(>:is(img,svg)){justify-content:center;align-self:center;align-items:center;width:1.6em;height:1.6em;margin-right:0;padding:0;display:inline-flex}& .pagesjs-toggle{align-self:center;margin-left:auto;display:flex}& .version{align-self:center;margin-right:.5em}}.logo{float:right;width:120px;margin:0 0 1em 1em}.comments{margin-top:2em}footer{border-top:1px dashed var(--rule-color);margin-top:2em;& .flex-col{gap:2em}}:is(.site-nav,footer) a{text-decoration:none}article:not(.pagesjs *),.frontmatter{box-shadow:none;margin-top:auto;@media (prefers-color-scheme:dark){box-shadow:0 0 0 1px #bbb}}.frontmatter{background:linear-gradient(#f0f8ff,#fff)}
|
|
2
2
|
/*# sourceMappingURL=site.min.css.map */
|
package/css/site.min.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,yBAGA,UACE,gCAGE,yDAIF,6EAKE,4CAIA,
|
|
1
|
+
{"version":3,"mappings":"AAAA,yBAGA,UACE,gCAGE,yDAIF,6EAKE,4CAIA,iGAOF,qFACA,6CACA,8BAEA,yJAUA,kEAEA,gDAGF,iDAKA,yBAGA,8DAGE,qBAIF,6CAGA,qEAGE,mCAAqC,2BAIvC","sources":["site.css"],"sourcesContent":["h1, h2, h3 {\n font-weight: 500;\n}\n.site-nav {\n & > p {\n display: flex;\n flex-wrap: wrap;\n &:last-child {\n border-bottom: 1px dashed var(--rule-color);\n }\n }\n a {\n display: inline-block;\n background: white;\n padding: .2em .5em;\n margin-right: .5em;\n &:hover {\n background: var(--accent);\n color: white;\n }\n &[aria-current] {\n box-shadow: 0 1.5px var(--accent), inset 0 -1px var(--accent);\n margin-bottom: -1px;\n }\n }\n /* icons (e.g., GitHub) and the print button of pages.js (<span class=\"pagesjs-toggle\">,\n which pushes the icons after it to the right): same size, 1.5em on hover */\n img, svg { width: 1.1em; height: 1.1em; vertical-align: middle; transition: transform .15s; }\n a:hover :is(img, svg) { transform: scale(1.36); }\n a:hover img { filter: invert(1); }\n /* square boxes around the icons (1.1em + padding), centered in the row */\n a:has(> :is(img, svg)) {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n align-self: center;\n width: 1.6em;\n height: 1.6em;\n padding: 0;\n margin-right: 0;\n }\n .pagesjs-toggle { display: flex; align-self: center; margin-left: auto; }\n /* package version next to the name: center it in the flex row */\n .version { align-self: center; margin-right: .5em; }\n}\n/* package logo (e.g., a hex sticker) on the home page of a package site */\n.logo {\n float: right;\n width: 120px;\n margin: 0 0 1em 1em;\n}\n.comments {\n margin-top: 2em;\n}\nfooter {\n border-top: 1px dashed var(--rule-color);\n margin-top: 2em;\n .flex-col {\n gap: 2em;\n }\n}\n:is(.site-nav, footer) a {\n text-decoration: none;\n}\narticle:not(.pagesjs *), .frontmatter {\n box-shadow: none;\n margin-top: auto;\n @media (prefers-color-scheme: dark) {\n box-shadow: 0 0 0 1px #bbb;\n }\n}\n.frontmatter {\n background: linear-gradient(0, white, aliceblue);\n}\n"],"names":[]}
|
package/js/nav-highlight.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// foo.html and foo are the same page; so are dir/index.html and dir/
|
|
4
4
|
const norm = p => p.replace(/\/index(\.html)?$/, '/').replace(/\.html$/, '').replace(/(.)\/$/, '$1'),
|
|
5
5
|
l = location, p = norm(l.pathname),
|
|
6
|
-
|
|
6
|
+
// a bare #hash link only jumps within this page, so it does not say which page is current
|
|
7
|
+
links = [...d.querySelectorAll('nav a[href]')].filter(a => a.origin === l.origin && a.getAttribute('href')[0] !== '#');
|
|
7
8
|
let cur = links.filter(a => norm(a.pathname) === p);
|
|
8
9
|
// no exact match: the deepest link (foo/ or foo.html) whose section contains this page is current
|
|
9
10
|
if (!cur.length) {
|
package/js/nav-highlight.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(
|
|
1
|
+
(t=>{const e=t=>t.replace(/\/index(\.html)?$/,"/").replace(/\.html$/,"").replace(/(.)\/$/,"$1"),a=location,r=e(a.pathname),l=[...t.querySelectorAll("nav a[href]")].filter(t=>t.origin===a.origin&&"#"!==t.getAttribute("href")[0]);let i=l.filter(t=>e(t.pathname)===r);if(!i.length){const t=l.map(t=>[t,e(t.pathname)]).filter(([,t])=>"/"!==t&&r.startsWith(t+"/")),a=Math.max(0,...t.map(([,t])=>t.length));i=t.filter(([,t])=>t.length===a).map(([t])=>t)}i.forEach(t=>t.setAttribute("aria-current","page"))})(document);
|
|
2
2
|
//# sourceMappingURL=nav-highlight.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["d","norm","p","replace","l","location","pathname","links","querySelectorAll","filter","a","origin","cur","length","dirs","map","q","startsWith","n","Math","max","forEach","setAttribute","document"],"sources":["nav-highlight.js"],"mappings":"AACA,CAACA,IAEC,MAAMC,EAAOC,GAAKA,EAAEC,QAAQ,oBAAqB,KAAKA,QAAQ,UAAW,IAAIA,QAAQ,SAAU,MAC7FC,EAAIC,SAAUH,EAAID,EAAKG,EAAEE,
|
|
1
|
+
{"version":3,"names":["d","norm","p","replace","l","location","pathname","links","querySelectorAll","filter","a","origin","getAttribute","cur","length","dirs","map","q","startsWith","n","Math","max","forEach","setAttribute","document"],"sources":["nav-highlight.js"],"mappings":"AACA,CAACA,IAEC,MAAMC,EAAOC,GAAKA,EAAEC,QAAQ,oBAAqB,KAAKA,QAAQ,UAAW,IAAIA,QAAQ,SAAU,MAC7FC,EAAIC,SAAUH,EAAID,EAAKG,EAAEE,UAEzBC,EAAQ,IAAIP,EAAEQ,iBAAiB,gBAAgBC,OAAOC,GAAKA,EAAEC,SAAWP,EAAEO,QAAwC,MAA9BD,EAAEE,aAAa,QAAQ,IAC7G,IAAIC,EAAMN,EAAME,OAAOC,GAAKT,EAAKS,EAAEJ,YAAcJ,GAEjD,IAAKW,EAAIC,OAAQ,CACf,MAAMC,EAAOR,EAAMS,IAAIN,GAAK,CAACA,EAAGT,EAAKS,EAAEJ,YAAYG,OAAO,EAAE,CAAEQ,KAAa,MAANA,GAAaf,EAAEgB,WAAWD,EAAI,MAC7FE,EAAIC,KAAKC,IAAI,KAAMN,EAAKC,IAAI,EAAE,CAAEC,KAAOA,EAAEH,SAC/CD,EAAME,EAAKN,OAAO,EAAE,CAAEQ,KAAOA,EAAEH,SAAWK,GAAGH,IAAI,EAAEN,KAAOA,EAC5D,CACAG,EAAIS,QAAQZ,GAAKA,EAAEa,aAAa,eAAgB,QACjD,EAdD,CAcGC","ignoreList":[]}
|