@xiee/utils 1.13.49 → 1.13.50

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.
@@ -8,6 +8,7 @@
8
8
  .epigraph {
9
9
  position: relative;
10
10
  padding: 5px;
11
+ margin-bottom: 4em;
11
12
  &, blockquote {
12
13
  border: 1px solid;
13
14
  }
@@ -26,6 +27,7 @@
26
27
  }
27
28
  &::after {
28
29
  content: "❀";
30
+ color: rebeccapurple;
29
31
  font-size: 3em;
30
32
  text-align: right;
31
33
  border: none;
@@ -1,2 +1,2 @@
1
- .pagesjs #TOC>ul>li>ul>li>ul>li>ul,.chapter-toc>ul>li>ul>li>ul{display:none}.epigraph{padding:5px;position:relative;&,& blockquote{border:1px solid}&:before,&:after,& blockquote:before,& blockquote:after{content:"•";text-align:center;border:1px solid;width:1em;height:1em;line-height:1;display:inline-block;position:absolute}&:before{left:5px}&:after{content:"❀";text-align:right;opacity:.2;border:none;font-size:3em;inset:5px 5px auto auto}& blockquote{padding:1em;&:before{inset:auto auto 5px 5px}&:after{inset:auto 5px 5px auto}}}.new-road{& p{justify-content:center;gap:.5em;display:flex}& button:before{font-size:200%}& .old-knit,& .new-fuse{&:hover:before{content:"❓ "}}& .old-knit{&:before{content:"🧶 "}&:focus:before{content:"😡 "}}& .new-fuse:before{content:"↯ "}& .new-preview:before{content:"⏵ "}& .new-fuse:focus:before{content:"😇 "}}.flex-col{justify-content:space-between;gap:.5em;display:flex;& *{flex:1}& pre:has(code[data-file]){&,&:before{border:groove #f5fffa}& code{border:none;border-top:1px dashed #d3d3d3}&{border-top:none}&:before{border-bottom:none;border-left:none}}}code[data-file]:before{content:attr(data-file);float:right;background-color:#ffffe0;margin:-1em -1em 1em 1em;padding:.5em;font-size:.9em;display:inline-block}pre:has(code[data-file]){&:before{content:"Output";text-transform:uppercase;border-bottom:none;padding:.5em 1em;font-weight:700;display:inline-block}&:has(code[data-file$=\.Rmd]):before{content:"♧ Example"}&.pagesjs-fragmented:first-child{&:before,& code:before{content:unset}& code{border-top:none}}& code,&:before{border:groove #f5fffa}&.pagesjs-fragmented:last-child{& code{border-bottom:none}}&:before{border-bottom:none}}.larger{font-size:1.5em}
1
+ .pagesjs #TOC>ul>li>ul>li>ul>li>ul,.chapter-toc>ul>li>ul>li>ul{display:none}.epigraph{margin-bottom:4em;padding:5px;position:relative;&,& blockquote{border:1px solid}&:before,&:after,& blockquote:before,& blockquote:after{content:"•";text-align:center;border:1px solid;width:1em;height:1em;line-height:1;display:inline-block;position:absolute}&:before{left:5px}&:after{content:"❀";color:#639;text-align:right;opacity:.2;border:none;font-size:3em;inset:5px 5px auto auto}& blockquote{padding:1em;&:before{inset:auto auto 5px 5px}&:after{inset:auto 5px 5px auto}}}.new-road{& p{justify-content:center;gap:.5em;display:flex}& button:before{font-size:200%}& .old-knit,& .new-fuse{&:hover:before{content:"❓ "}}& .old-knit{&:before{content:"🧶 "}&:focus:before{content:"😡 "}}& .new-fuse:before{content:"↯ "}& .new-preview:before{content:"⏵ "}& .new-fuse:focus:before{content:"😇 "}}.flex-col{justify-content:space-between;gap:.5em;display:flex;& *{flex:1}& pre:has(code[data-file]){&,&:before{border:groove #f5fffa}& code{border:none;border-top:1px dashed #d3d3d3}&{border-top:none}&:before{border-bottom:none;border-left:none}}}code[data-file]:before{content:attr(data-file);float:right;background-color:#ffffe0;margin:-1em -1em 1em 1em;padding:.5em;font-size:.9em;display:inline-block}pre:has(code[data-file]){&:before{content:"Output";text-transform:uppercase;border-bottom:none;padding:.5em 1em;font-weight:700;display:inline-block}&:has(code[data-file$=\.Rmd]):before{content:"♧ Example"}&.pagesjs-fragmented:first-child{&:before,& code:before{content:unset}& code{border-top:none}}& code,&:before{border:groove #f5fffa}&.pagesjs-fragmented:last-child{& code{border-bottom:none}}&:before{border-bottom:none}}.larger{font-size:1.5em}
2
2
  /*# sourceMappingURL=book-litedown.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAGA,4EAIA,wCAGE,gCAGA,mLAUA,kBAGA,oGAQA,yBAEE,iCAGA,kCAOJ,UACE,iDAKA,+BACA,wBACE,+BAEF,YACE,yBACA,gCAEF,kCACA,qCACA,0CAIF,8DAIE,WAGA,2BACE,iCAGA,iDAIA,kBAGA,+CAOJ,8JAUA,yBACE,4HAQA,2DAGA,iCACE,qCAGA,wBAIF,sCAGA,gCACE,2BAIF,6BAKF","sources":["book-litedown.css"],"sourcesContent":["/* CSS for https://yihui.org/litedown/ */\n\n/* hide 4th-level TOC items when printing to PDF and 3rd-level in chapter TOC */\n.pagesjs #TOC > ul > li > ul > li > ul > li > ul, .chapter-toc > ul > li > ul > li > ul {\n display: none;\n}\n\n.epigraph {\n position: relative;\n padding: 5px;\n &, blockquote {\n border: 1px solid;\n }\n &::before, &::after, blockquote::before, blockquote::after {\n content: \"•\";\n position: absolute;\n border: 1px solid;\n display: inline-block;\n width: 1em;\n height: 1em;\n text-align: center;\n line-height: 1;\n }\n &::before {\n left: 5px;\n }\n &::after {\n content: \"❀\";\n font-size: 3em;\n text-align: right;\n border: none;\n opacity: .2;\n inset: 5px 5px auto auto;\n }\n blockquote {\n padding: 1em;\n &::before {\n inset: auto auto 5px 5px;\n }\n &::after {\n inset: auto 5px 5px auto;\n }\n }\n}\n\n/* a tale of two buttons */\n.new-road {\n p {\n display: flex;\n justify-content: center;\n gap: .5em;\n }\n button::before { font-size: 200%; }\n .old-knit, .new-fuse {\n &:hover::before { content: \"❓ \"; }\n }\n .old-knit {\n &::before { content: \"🧶 \"; }\n &:focus::before { content: \"😡 \"; }\n }\n .new-fuse::before { content: \"↯ \"; }\n .new-preview::before { content: \"⏵ \"; }\n .new-fuse:focus::before { content: \"😇 \"; }\n}\n\n/* arrange elements in columns */\n.flex-col {\n display: flex;\n justify-content: space-between;\n gap: .5em;\n * {\n flex: 1;\n }\n pre:has(code[data-file]) {\n &, &::before {\n border: groove mintcream;\n }\n code {\n border: none;\n border-top: 1px dashed lightgray;\n }\n & {\n border-top: none;\n }\n &::before {\n border-left: none;\n border-bottom: none;\n }\n }\n}\n\ncode[data-file]::before {\n content: attr(data-file);\n font-size: .9em;\n float: right;\n background-color: lightyellow;\n display: inline-block;\n padding: .5em;\n margin: -1em -1em 1em 1em;\n}\n\npre:has(code[data-file]) {\n &::before {\n content: \"Output\";\n text-transform: uppercase;\n font-weight: bold;\n display: inline-block;\n padding: .5em 1em;\n border-bottom: none;\n }\n &:has(code[data-file$=\".Rmd\"])::before {\n content: \"♧ Example\";\n }\n &.pagesjs-fragmented:first-child {\n &::before, code::before {\n content: unset;\n }\n code {\n border-top: none;\n }\n }\n code, &::before {\n border: groove mintcream;\n }\n &.pagesjs-fragmented:last-child {\n code {\n border-bottom: none;\n }\n }\n &::before {\n border-bottom: none;\n }\n}\n\n.larger { font-size: 1.5em; }\n"],"names":[]}
1
+ {"version":3,"mappings":"AAGA,4EAIA,0DAIE,gCAGA,mLAUA,kBAGA,+GASA,yBAEE,iCAGA,kCAOJ,UACE,iDAKA,+BACA,wBACE,+BAEF,YACE,yBACA,gCAEF,kCACA,qCACA,0CAIF,8DAIE,WAGA,2BACE,iCAGA,iDAIA,kBAGA,+CAOJ,8JAUA,yBACE,4HAQA,2DAGA,iCACE,qCAGA,wBAIF,sCAGA,gCACE,2BAIF,6BAKF","sources":["book-litedown.css"],"sourcesContent":["/* CSS for https://yihui.org/litedown/ */\n\n/* hide 4th-level TOC items when printing to PDF and 3rd-level in chapter TOC */\n.pagesjs #TOC > ul > li > ul > li > ul > li > ul, .chapter-toc > ul > li > ul > li > ul {\n display: none;\n}\n\n.epigraph {\n position: relative;\n padding: 5px;\n margin-bottom: 4em;\n &, blockquote {\n border: 1px solid;\n }\n &::before, &::after, blockquote::before, blockquote::after {\n content: \"•\";\n position: absolute;\n border: 1px solid;\n display: inline-block;\n width: 1em;\n height: 1em;\n text-align: center;\n line-height: 1;\n }\n &::before {\n left: 5px;\n }\n &::after {\n content: \"❀\";\n color: rebeccapurple;\n font-size: 3em;\n text-align: right;\n border: none;\n opacity: .2;\n inset: 5px 5px auto auto;\n }\n blockquote {\n padding: 1em;\n &::before {\n inset: auto auto 5px 5px;\n }\n &::after {\n inset: auto 5px 5px auto;\n }\n }\n}\n\n/* a tale of two buttons */\n.new-road {\n p {\n display: flex;\n justify-content: center;\n gap: .5em;\n }\n button::before { font-size: 200%; }\n .old-knit, .new-fuse {\n &:hover::before { content: \"❓ \"; }\n }\n .old-knit {\n &::before { content: \"🧶 \"; }\n &:focus::before { content: \"😡 \"; }\n }\n .new-fuse::before { content: \"↯ \"; }\n .new-preview::before { content: \"⏵ \"; }\n .new-fuse:focus::before { content: \"😇 \"; }\n}\n\n/* arrange elements in columns */\n.flex-col {\n display: flex;\n justify-content: space-between;\n gap: .5em;\n * {\n flex: 1;\n }\n pre:has(code[data-file]) {\n &, &::before {\n border: groove mintcream;\n }\n code {\n border: none;\n border-top: 1px dashed lightgray;\n }\n & {\n border-top: none;\n }\n &::before {\n border-left: none;\n border-bottom: none;\n }\n }\n}\n\ncode[data-file]::before {\n content: attr(data-file);\n font-size: .9em;\n float: right;\n background-color: lightyellow;\n display: inline-block;\n padding: .5em;\n margin: -1em -1em 1em 1em;\n}\n\npre:has(code[data-file]) {\n &::before {\n content: \"Output\";\n text-transform: uppercase;\n font-weight: bold;\n display: inline-block;\n padding: .5em 1em;\n border-bottom: none;\n }\n &:has(code[data-file$=\".Rmd\"])::before {\n content: \"♧ Example\";\n }\n &.pagesjs-fragmented:first-child {\n &::before, code::before {\n content: unset;\n }\n code {\n border-top: none;\n }\n }\n code, &::before {\n border: groove mintcream;\n }\n &.pagesjs-fragmented:last-child {\n code {\n border-bottom: none;\n }\n }\n &::before {\n border-bottom: none;\n }\n}\n\n.larger { font-size: 1.5em; }\n"],"names":[]}
package/css/book.css CHANGED
@@ -54,6 +54,9 @@ body {
54
54
  .chapter h1 {
55
55
  margin: 1em auto 3em;
56
56
  border-bottom: 1px solid;
57
+ &:has(+ .epigraph) {
58
+ margin-bottom: 2em;
59
+ }
57
60
  }
58
61
  h1 .section-number {
59
62
  display: inline-block;
package/css/book.min.css CHANGED
@@ -1,2 +1,2 @@
1
- body{font-family:Palatino,Georgia,serif;font-size:1em}.footnotes,code,.side,.body .side,.chapter-toc{font-size:.85em}.frontmatter,.chapter{min-height:calc(100vh - 1em)}.frontmatter{background-color:#fff;background-image:radial-gradient(#b6cee2 1px,#fff 1px);background-size:2em 2em;padding-bottom:0;&>div{background-color:#ebf6f9;margin:0 -1em;padding:1em}& .title{margin-top:-1em;padding:20vh 1em 1em}}#TOC.side{margin-left:calc(-200px - .8em)}@media (width<=1264px){#TOC.side{margin-left:auto}}@media (width>=1264.02px){body:not(.pagesjs) .chapter-toc{display:none}}.chapter-toc{columns:2;border:1px solid #eee;border-radius:5px;margin-bottom:2em;padding:1em}.chapter:not(.appendix) .main-number{&:before{content:"Chapter "}&:after{content:none}}.chapter h1{border-bottom:1px solid;margin:1em auto 3em}h1 .section-number{border-bottom:4px solid;margin-bottom:-4px;display:inline-block}.body h2{border-bottom-style:dashed}
1
+ body{font-family:Palatino,Georgia,serif;font-size:1em}.footnotes,code,.side,.body .side,.chapter-toc{font-size:.85em}.frontmatter,.chapter{min-height:calc(100vh - 1em)}.frontmatter{background-color:#fff;background-image:radial-gradient(#b6cee2 1px,#fff 1px);background-size:2em 2em;padding-bottom:0;&>div{background-color:#ebf6f9;margin:0 -1em;padding:1em}& .title{margin-top:-1em;padding:20vh 1em 1em}}#TOC.side{margin-left:calc(-200px - .8em)}@media (width<=1264px){#TOC.side{margin-left:auto}}@media (width>=1264.02px){body:not(.pagesjs) .chapter-toc{display:none}}.chapter-toc{columns:2;border:1px solid #eee;border-radius:5px;margin-bottom:2em;padding:1em}.chapter:not(.appendix) .main-number{&:before{content:"Chapter "}&:after{content:none}}.chapter h1{border-bottom:1px solid;margin:1em auto 3em;&:has(+.epigraph){margin-bottom:2em}}h1 .section-number{border-bottom:4px solid;margin-bottom:-4px;display:inline-block}.body h2{border-bottom-style:dashed}
2
2
  /*# sourceMappingURL=book.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,sDAIA,+DAGA,mDAGA,mIAKE,yDAKA,+CAKF,0CAGA,uBACE,4BAIF,0BACE,8CAIF,6FAOA,qCACE,4BAGA,sBAIF,wDAIA,mFAKA","sources":["book.css"],"sourcesContent":["body {\n font-size: 1em;\n font-family: Palatino, Georgia, serif;\n}\n.footnotes, code, .side, .body .side, .chapter-toc {\n font-size: .85em;\n}\n.frontmatter, .chapter {\n min-height: calc(100vh - 1em);\n}\n.frontmatter {\n background-image: radial-gradient(#b6cee2 1px, #fff 1px);\n background-size: 2em 2em;\n background-color: #fff;\n padding-bottom: 0;\n & > div {\n margin: 0 -1em;\n background-color: #ebf6f9;\n padding: 1em;\n }\n & .title {\n padding: 20vh 1em 1em;\n margin-top: -1em;\n }\n}\n#TOC.side {\n margin-left: calc(-200px - .8em);\n}\n@media (max-width: 1264px) {\n #TOC.side {\n margin-left: auto;\n }\n}\n@media (min-width: 1264.02px) {\n body:not(.pagesjs) .chapter-toc {\n display: none;\n }\n}\n.chapter-toc {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n columns: 2;\n margin-bottom: 2em;\n}\n.chapter:not(.appendix) .main-number {\n &::before {\n content: \"Chapter \";\n }\n &::after {\n content: none;\n }\n}\n.chapter h1 {\n margin: 1em auto 3em;\n border-bottom: 1px solid;\n}\nh1 .section-number {\n display: inline-block;\n border-bottom: 4px solid;\n margin-bottom: -4px;\n}\n.body h2 { border-bottom-style: dashed; }\n/* TODO: style for h1.part and printing */\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,sDAIA,+DAGA,mDAGA,mIAKE,yDAKA,+CAKF,0CAGA,uBACE,4BAIF,0BACE,8CAIF,6FAOA,qCACE,4BAGA,sBAIF,wDAGE,qCAIF,mFAKA","sources":["book.css"],"sourcesContent":["body {\n font-size: 1em;\n font-family: Palatino, Georgia, serif;\n}\n.footnotes, code, .side, .body .side, .chapter-toc {\n font-size: .85em;\n}\n.frontmatter, .chapter {\n min-height: calc(100vh - 1em);\n}\n.frontmatter {\n background-image: radial-gradient(#b6cee2 1px, #fff 1px);\n background-size: 2em 2em;\n background-color: #fff;\n padding-bottom: 0;\n & > div {\n margin: 0 -1em;\n background-color: #ebf6f9;\n padding: 1em;\n }\n & .title {\n padding: 20vh 1em 1em;\n margin-top: -1em;\n }\n}\n#TOC.side {\n margin-left: calc(-200px - .8em);\n}\n@media (max-width: 1264px) {\n #TOC.side {\n margin-left: auto;\n }\n}\n@media (min-width: 1264.02px) {\n body:not(.pagesjs) .chapter-toc {\n display: none;\n }\n}\n.chapter-toc {\n border: 1px solid #eee;\n border-radius: 5px;\n padding: 1em;\n columns: 2;\n margin-bottom: 2em;\n}\n.chapter:not(.appendix) .main-number {\n &::before {\n content: \"Chapter \";\n }\n &::after {\n content: none;\n }\n}\n.chapter h1 {\n margin: 1em auto 3em;\n border-bottom: 1px solid;\n &:has(+ .epigraph) {\n margin-bottom: 2em;\n }\n}\nh1 .section-number {\n display: inline-block;\n border-bottom: 4px solid;\n margin-bottom: -4px;\n}\n.body h2 { border-bottom-style: dashed; }\n/* TODO: style for h1.part and printing */\n"],"names":[]}
package/css/default.css CHANGED
@@ -11,7 +11,7 @@ ul:has(li > input[type="checkbox"]) { list-style: none; padding-left: 1em; }
11
11
  *, :before, :after { box-sizing: border-box; }
12
12
  a { color: steelblue; }
13
13
  pre, img { max-width: 100%; }
14
- pre, pre:hover, fieldset pre { white-space: pre-wrap; word-break: break-word; }
14
+ pre { white-space: pre-wrap; word-break: break-word; }
15
15
  pre code { display: block; padding: 1em; overflow-x: auto; }
16
16
  code { font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace; }
17
17
  :not(pre) > code, code[class], .box > .caption { background-color: #f8f8f8; }
@@ -34,7 +34,7 @@ table {
34
34
  border-top: 1px solid #666;
35
35
  thead th { border-bottom: 1px solid #ddd; }
36
36
  th, td { padding: 5px; font-variant-numeric: tabular-nums; }
37
- thead, tfoot, tr:nth-child(even) { background: #eee; }
37
+ thead, tfoot, tr:nth-child(even) { background: whitesmoke; }
38
38
  }
39
39
  .table-full {
40
40
  width: 100%;
@@ -87,5 +87,5 @@ section.footnotes {
87
87
  tr, img { page-break-inside: avoid; }
88
88
  }
89
89
  @media only screen and (min-width: 992px) {
90
- pre:has(.line-numbers) { white-space: pre; }
90
+ pre:has(.line-numbers):not(:hover) { white-space: pre; }
91
91
  }
@@ -1,2 +1,2 @@
1
- body{max-width:800px;margin:auto;padding:1em;font-family:sans-serif;line-height:1.5}body,.abstract,code,.footnotes,footer,#refs,.caption{font-size:.9em}li li{font-size:.95em}ul:has(li>input[type=checkbox]){padding-left:1em;list-style:none}*,:before,:after{box-sizing:border-box}a{color:#4682b4}pre,img{max-width:100%}pre,pre:hover,fieldset pre{white-space:pre-wrap;word-break:break-word}pre code{padding:1em;display:block;overflow-x:auto}code{font-family:DejaVu Sans Mono,Droid Sans Mono,Lucida Console,Consolas,Monaco,monospace}:not(pre)>code,code[class],.box>.caption{background-color:#f8f8f8}pre>code:not([class]),pre>.language-plain,.box{background-color:inherit;border:1px solid #eee}pre>.message{border-color:#9eeaf9}pre>.warning{background:#fff3cd;border-color:#fff3cd}pre>.error{background:#f8d7da;border-color:#f8d7da}.fenced-chunk{border-left:1px solid #666}.code-fence{opacity:.4;border:1px dashed #666;border-left:2px solid;&:hover{opacity:inherit}}.box,table{margin:1em auto}.box>.caption{padding:1px 1em}.figure{& p:has(img),& pre:has(svg){text-align:center}}.flex-col{justify-content:space-between;display:flex}table{border-top:1px solid #666;& thead th{border-bottom:1px solid #ddd}& th,& td{font-variant-numeric:tabular-nums;padding:5px}& thead,& tfoot,& tr:nth-child(2n){background:#eee}}.table-full{width:100%;& td{vertical-align:baseline}}blockquote{color:#666;border-left:.5em solid #eee;margin:0;padding:1px 1em}hr,.footnotes:before{border:1px dashed #ddd}.frontmatter{text-align:center}#TOC .numbered{padding-left:0;& li{list-style:none}& ul{padding-left:1em}}table,.body h2{border-bottom:1px solid #666}.body .appendix,.appendix~h2{border-bottom-style:dashed}.main-number:after{content:"."}span[class^=ref-number-]{font-weight:700}.ref-number-fig:after,.ref-number-tab:after{content:":"}.cross-ref-chp:before{content:"Chapter "}.cross-ref-sec:before{content:"Section "}.cross-ref-fig:before,.ref-number-fig:before{content:"Figure "}.cross-ref-tab:before,.ref-number-tab:before{content:"Table "}.cross-ref-eqn:before,.MathJax_ref:has(mjx-mtext>mjx-c+mjx-c):before{content:"Equation "}.abstract,#refs{&:before{margin:1em auto;font-weight:700;display:block}}.abstract:before{content:"Abstract";text-align:center}#refs:before{content:"Bibliography";font-size:1.5em}.ref-paren-open:before{content:"("}.ref-paren-close:after{content:")"}.ref-semicolon:after{content:"; "}.ref-and:after{content:" and "}.ref-et-al:after{content:" et al.";font-style:italic}.footnote-ref a{&:before{content:"["}&:after{content:"]"}}section.footnotes{margin-top:2em;&:before{content:"";max-width:20em;display:block}}@media print{body{max-width:100%}tr,img{page-break-inside:avoid}}@media only screen and (width>=992px){pre:has(.line-numbers){white-space:pre}}
1
+ body{max-width:800px;margin:auto;padding:1em;font-family:sans-serif;line-height:1.5}body,.abstract,code,.footnotes,footer,#refs,.caption{font-size:.9em}li li{font-size:.95em}ul:has(li>input[type=checkbox]){padding-left:1em;list-style:none}*,:before,:after{box-sizing:border-box}a{color:#4682b4}pre,img{max-width:100%}pre{white-space:pre-wrap;word-break:break-word}pre code{padding:1em;display:block;overflow-x:auto}code{font-family:DejaVu Sans Mono,Droid Sans Mono,Lucida Console,Consolas,Monaco,monospace}:not(pre)>code,code[class],.box>.caption{background-color:#f8f8f8}pre>code:not([class]),pre>.language-plain,.box{background-color:inherit;border:1px solid #eee}pre>.message{border-color:#9eeaf9}pre>.warning{background:#fff3cd;border-color:#fff3cd}pre>.error{background:#f8d7da;border-color:#f8d7da}.fenced-chunk{border-left:1px solid #666}.code-fence{opacity:.4;border:1px dashed #666;border-left:2px solid;&:hover{opacity:inherit}}.box,table{margin:1em auto}.box>.caption{padding:1px 1em}.figure{& p:has(img),& pre:has(svg){text-align:center}}.flex-col{justify-content:space-between;display:flex}table{border-top:1px solid #666;& thead th{border-bottom:1px solid #ddd}& th,& td{font-variant-numeric:tabular-nums;padding:5px}& thead,& tfoot,& tr:nth-child(2n){background:#f5f5f5}}.table-full{width:100%;& td{vertical-align:baseline}}blockquote{color:#666;border-left:.5em solid #eee;margin:0;padding:1px 1em}hr,.footnotes:before{border:1px dashed #ddd}.frontmatter{text-align:center}#TOC .numbered{padding-left:0;& li{list-style:none}& ul{padding-left:1em}}table,.body h2{border-bottom:1px solid #666}.body .appendix,.appendix~h2{border-bottom-style:dashed}.main-number:after{content:"."}span[class^=ref-number-]{font-weight:700}.ref-number-fig:after,.ref-number-tab:after{content:":"}.cross-ref-chp:before{content:"Chapter "}.cross-ref-sec:before{content:"Section "}.cross-ref-fig:before,.ref-number-fig:before{content:"Figure "}.cross-ref-tab:before,.ref-number-tab:before{content:"Table "}.cross-ref-eqn:before,.MathJax_ref:has(mjx-mtext>mjx-c+mjx-c):before{content:"Equation "}.abstract,#refs{&:before{margin:1em auto;font-weight:700;display:block}}.abstract:before{content:"Abstract";text-align:center}#refs:before{content:"Bibliography";font-size:1.5em}.ref-paren-open:before{content:"("}.ref-paren-close:after{content:")"}.ref-semicolon:after{content:"; "}.ref-and:after{content:" and "}.ref-et-al:after{content:" et al.";font-style:italic}.footnote-ref a{&:before{content:"["}&:after{content:"]"}}section.footnotes{margin-top:2em;&:before{content:"";max-width:20em;display:block}}@media print{body{max-width:100%}tr,img{page-break-inside:avoid}}@media only screen and (width>=992px){pre:has(.line-numbers):not(:hover){white-space:pre}}
2
2
  /*# sourceMappingURL=default.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,oFAOA,oEACA,sBACA,iEACA,uCACA,gBACA,uBACA,sEACA,mDACA,2FACA,kEACA,8FACA,kCACA,qDACA,mDACA,yCACA,oEAIE,yBAEF,2BACA,8BACA,QAAU,+CACV,qDACA,gCAEE,wCACA,wDACA,oDAEF,uBAEE,8BAEF,2EAMA,4CACA,+BACA,8BAEE,qBACA,uBAEF,4CACA,wDACA,+BACA,yCACA,wDACA,yCACA,yCACA,+DACA,8DACA,yFACA,gBACE,wDAEF,sDACA,oDACA,mCACA,mCACA,kCACA,+BACA,qDACA,gBACE,qBACA,qBAEF,iCAEE,kDAGF,aACE,oBACA,gCAEF,sCACE","sources":["default.css"],"sourcesContent":["body {\n font-family: sans-serif;\n max-width: 800px;\n margin: auto;\n padding: 1em;\n line-height: 1.5;\n}\nbody, .abstract, code, .footnotes, footer, #refs, .caption { font-size: .9em; }\nli li { font-size: .95em; }\nul:has(li > input[type=\"checkbox\"]) { list-style: none; padding-left: 1em; }\n*, :before, :after { box-sizing: border-box; }\na { color: steelblue; }\npre, img { max-width: 100%; }\npre, pre:hover, fieldset pre { white-space: pre-wrap; word-break: break-word; }\npre code { display: block; padding: 1em; overflow-x: auto; }\ncode { font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace; }\n:not(pre) > code, code[class], .box > .caption { background-color: #f8f8f8; }\npre > code:not([class]), pre > .language-plain, .box { background-color: inherit; border: 1px solid #eee; }\npre > .message { border-color: #9eeaf9; }\npre > .warning { background: #fff3cd; border-color: #fff3cd; }\npre > .error { background: #f8d7da; border-color: #f8d7da; }\n.fenced-chunk { border-left: 1px solid #666; }\n.code-fence {\n opacity: .4;\n border: 1px dashed #666;\n border-left: 2px solid;\n &:hover { opacity: inherit; }\n}\n.box, table { margin: 1em auto; }\n.box > .caption { padding: 1px 1em; }\n.figure { p:has(img), pre:has(svg) { text-align: center; } }\n.flex-col { display: flex; justify-content: space-between; }\ntable {\n border-top: 1px solid #666;\n thead th { border-bottom: 1px solid #ddd; }\n th, td { padding: 5px; font-variant-numeric: tabular-nums; }\n thead, tfoot, tr:nth-child(even) { background: #eee; }\n}\n.table-full {\n width: 100%;\n td { vertical-align: baseline; }\n}\nblockquote {\n color: #666;\n margin: 0;\n padding: 1px 1em;\n border-left: .5em solid #eee;\n}\nhr, .footnotes::before { border: 1px dashed #ddd; }\n.frontmatter { text-align: center; }\n#TOC .numbered {\n padding-left: 0;\n li { list-style: none; }\n ul { padding-left: 1em; }\n}\ntable, .body h2 { border-bottom: 1px solid #666; }\n.body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }\n.main-number::after { content: \".\"; }\nspan[class^=\"ref-number-\"] { font-weight: bold; }\n.ref-number-fig::after, .ref-number-tab::after { content: \":\"; }\n.cross-ref-chp::before { content: \"Chapter \"; }\n.cross-ref-sec::before { content: \"Section \"; }\n.cross-ref-fig::before, .ref-number-fig::before { content: \"Figure \"; }\n.cross-ref-tab::before, .ref-number-tab::before { content: \"Table \"; }\n.cross-ref-eqn::before, .MathJax_ref:has(mjx-mtext > mjx-c + mjx-c)::before { content: \"Equation \"; }\n.abstract, #refs {\n &::before { display: block; margin: 1em auto; font-weight: bold; }\n}\n.abstract::before { content: \"Abstract\"; text-align: center; }\n#refs::before { content: \"Bibliography\"; font-size: 1.5em; }\n.ref-paren-open::before { content: \"(\"; }\n.ref-paren-close::after { content: \")\"; }\n.ref-semicolon::after { content: \"; \"; }\n.ref-and::after { content: \" and \"; }\n.ref-et-al::after { content: \" et al.\"; font-style: italic; }\n.footnote-ref a {\n &::before { content: \"[\"; }\n &::after { content: \"]\"; }\n}\nsection.footnotes {\n margin-top: 2em;\n &::before { content: \"\"; display: block; max-width: 20em; }\n}\n\n@media print {\n body { max-width: 100%; }\n tr, img { page-break-inside: avoid; }\n}\n@media only screen and (min-width: 992px) {\n pre:has(.line-numbers) { white-space: pre; }\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,oFAOA,oEACA,sBACA,iEACA,uCACA,gBACA,uBACA,+CACA,mDACA,2FACA,kEACA,8FACA,kCACA,qDACA,mDACA,yCACA,oEAIE,yBAEF,2BACA,8BACA,QAAU,+CACV,qDACA,gCAEE,wCACA,wDACA,uDAEF,uBAEE,8BAEF,2EAMA,4CACA,+BACA,8BAEE,qBACA,uBAEF,4CACA,wDACA,+BACA,yCACA,wDACA,yCACA,yCACA,+DACA,8DACA,yFACA,gBACE,wDAEF,sDACA,oDACA,mCACA,mCACA,kCACA,+BACA,qDACA,gBACE,qBACA,qBAEF,iCAEE,kDAGF,aACE,oBACA,gCAEF,sCACE","sources":["default.css"],"sourcesContent":["body {\n font-family: sans-serif;\n max-width: 800px;\n margin: auto;\n padding: 1em;\n line-height: 1.5;\n}\nbody, .abstract, code, .footnotes, footer, #refs, .caption { font-size: .9em; }\nli li { font-size: .95em; }\nul:has(li > input[type=\"checkbox\"]) { list-style: none; padding-left: 1em; }\n*, :before, :after { box-sizing: border-box; }\na { color: steelblue; }\npre, img { max-width: 100%; }\npre { white-space: pre-wrap; word-break: break-word; }\npre code { display: block; padding: 1em; overflow-x: auto; }\ncode { font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace; }\n:not(pre) > code, code[class], .box > .caption { background-color: #f8f8f8; }\npre > code:not([class]), pre > .language-plain, .box { background-color: inherit; border: 1px solid #eee; }\npre > .message { border-color: #9eeaf9; }\npre > .warning { background: #fff3cd; border-color: #fff3cd; }\npre > .error { background: #f8d7da; border-color: #f8d7da; }\n.fenced-chunk { border-left: 1px solid #666; }\n.code-fence {\n opacity: .4;\n border: 1px dashed #666;\n border-left: 2px solid;\n &:hover { opacity: inherit; }\n}\n.box, table { margin: 1em auto; }\n.box > .caption { padding: 1px 1em; }\n.figure { p:has(img), pre:has(svg) { text-align: center; } }\n.flex-col { display: flex; justify-content: space-between; }\ntable {\n border-top: 1px solid #666;\n thead th { border-bottom: 1px solid #ddd; }\n th, td { padding: 5px; font-variant-numeric: tabular-nums; }\n thead, tfoot, tr:nth-child(even) { background: whitesmoke; }\n}\n.table-full {\n width: 100%;\n td { vertical-align: baseline; }\n}\nblockquote {\n color: #666;\n margin: 0;\n padding: 1px 1em;\n border-left: .5em solid #eee;\n}\nhr, .footnotes::before { border: 1px dashed #ddd; }\n.frontmatter { text-align: center; }\n#TOC .numbered {\n padding-left: 0;\n li { list-style: none; }\n ul { padding-left: 1em; }\n}\ntable, .body h2 { border-bottom: 1px solid #666; }\n.body .appendix, .appendix ~ h2 { border-bottom-style: dashed; }\n.main-number::after { content: \".\"; }\nspan[class^=\"ref-number-\"] { font-weight: bold; }\n.ref-number-fig::after, .ref-number-tab::after { content: \":\"; }\n.cross-ref-chp::before { content: \"Chapter \"; }\n.cross-ref-sec::before { content: \"Section \"; }\n.cross-ref-fig::before, .ref-number-fig::before { content: \"Figure \"; }\n.cross-ref-tab::before, .ref-number-tab::before { content: \"Table \"; }\n.cross-ref-eqn::before, .MathJax_ref:has(mjx-mtext > mjx-c + mjx-c)::before { content: \"Equation \"; }\n.abstract, #refs {\n &::before { display: block; margin: 1em auto; font-weight: bold; }\n}\n.abstract::before { content: \"Abstract\"; text-align: center; }\n#refs::before { content: \"Bibliography\"; font-size: 1.5em; }\n.ref-paren-open::before { content: \"(\"; }\n.ref-paren-close::after { content: \")\"; }\n.ref-semicolon::after { content: \"; \"; }\n.ref-and::after { content: \" and \"; }\n.ref-et-al::after { content: \" et al.\"; font-style: italic; }\n.footnote-ref a {\n &::before { content: \"[\"; }\n &::after { content: \"]\"; }\n}\nsection.footnotes {\n margin-top: 2em;\n &::before { content: \"\"; display: block; max-width: 20em; }\n}\n\n@media print {\n body { max-width: 100%; }\n tr, img { page-break-inside: avoid; }\n}\n@media only screen and (min-width: 992px) {\n pre:has(.line-numbers):not(:hover) { white-space: pre; }\n}\n"],"names":[]}
package/css/site.css CHANGED
@@ -24,12 +24,9 @@ nav a:hover {
24
24
  box-shadow: none;
25
25
  margin-top: auto;
26
26
  }
27
- .frontmatter, .appendix {
28
- border: 1px dotted;
29
- }
30
27
  .frontmatter {
31
- border-bottom: none;
28
+ background: linear-gradient(0, white, aliceblue);
32
29
  }
33
- .appendix {
34
- border-top: none;
30
+ .body ~ .appendix {
31
+ background: linear-gradient(0, whitesmoke, white);
35
32
  }
package/css/site.min.css CHANGED
@@ -1,2 +1,2 @@
1
- nav>p:last-child{border-bottom:1px dashed #666}footer{border-top:1px dashed #666;margin-top:2em;& .flex-col{gap:2em}}nav a,footer a{text-decoration:none}nav a{background-color:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block}nav a:hover{filter:invert()}.body,.frontmatter,.body~.appendix{box-shadow:none;margin-top:auto}.frontmatter,.appendix{border:1px dotted}.frontmatter{border-bottom:none}.appendix{border-top:none}
1
+ nav>p:last-child{border-bottom:1px dashed #666}footer{border-top:1px dashed #666;margin-top:2em;& .flex-col{gap:2em}}nav a,footer a{text-decoration:none}nav a{background-color:#fff;margin-right:.5em;padding:.2em .5em;display:inline-block}nav a:hover{filter:invert()}.body,.frontmatter,.body~.appendix{box-shadow:none;margin-top:auto}.frontmatter{background:linear-gradient(#f0f8ff,#fff)}.body~.appendix{background:linear-gradient(#fff,#f5f5f5)}
2
2
  /*# sourceMappingURL=site.min.css.map */
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,+CAGA,iDAGE,qBAIF,oCAGA,qFAMA,4BAGA,mEAIA,yCAGA,gCAGA","sources":["site.css"],"sourcesContent":["nav > p:last-child {\n border-bottom: 1px dashed #666;\n}\nfooter {\n border-top: 1px dashed #666;\n margin-top: 2em;\n .flex-col {\n gap: 2em;\n }\n}\nnav a, footer a {\n text-decoration: none;\n}\nnav a {\n display: inline-block;\n background-color: white;\n padding: .2em .5em;\n margin-right: .5em;\n}\nnav a:hover {\n filter: invert(1);\n}\n.body, .frontmatter, .body ~ .appendix {\n box-shadow: none;\n margin-top: auto;\n}\n.frontmatter, .appendix {\n border: 1px dotted;\n}\n.frontmatter {\n border-bottom: none;\n}\n.appendix {\n border-top: none;\n}\n"],"names":[]}
1
+ {"version":3,"mappings":"AAAA,+CAGA,iDAGE,qBAIF,oCAGA,qFAMA,4BAGA,mEAIA,sDAGA","sources":["site.css"],"sourcesContent":["nav > p:last-child {\n border-bottom: 1px dashed #666;\n}\nfooter {\n border-top: 1px dashed #666;\n margin-top: 2em;\n .flex-col {\n gap: 2em;\n }\n}\nnav a, footer a {\n text-decoration: none;\n}\nnav a {\n display: inline-block;\n background-color: white;\n padding: .2em .5em;\n margin-right: .5em;\n}\nnav a:hover {\n filter: invert(1);\n}\n.body, .frontmatter, .body ~ .appendix {\n box-shadow: none;\n margin-top: auto;\n}\n.frontmatter {\n background: linear-gradient(0, white, aliceblue);\n}\n.body ~ .appendix {\n background: linear-gradient(0, whitesmoke, white);\n}\n"],"names":[]}
package/js/chapter-toc.js CHANGED
@@ -3,14 +3,15 @@
3
3
  d.querySelector('.chapter-toc') || d.querySelectorAll('#TOC > ul > li > a[href^="#"]').forEach(a => {
4
4
  const id = a.getAttribute('href'), h = d.getElementById(id.replace(/^#/, ''));
5
5
  if (h?.tagName !== 'H1') return;
6
- if (h.nextElementSibling?.tagName === 'H1') return;
6
+ const h2 = h.nextElementSibling;
7
+ if (h2?.tagName === 'H1') return;
7
8
  const u = a.nextElementSibling;
8
9
  if (u?.tagName === 'UL') {
9
10
  const toc = d.createElement('div');
10
11
  toc.className = 'chapter-toc'; toc.id = 'TOC';
11
12
  toc.append(u.cloneNode(true));
12
13
  toc.firstChild.className = a.parentNode.parentNode.className;
13
- h.after(toc);
14
+ (h2?.classList.contains('epigraph') ? h2 : h).after(toc);
14
15
  }
15
16
  });
16
17
  })(document);
@@ -1,2 +1,2 @@
1
- (e=>{e.querySelector(".chapter-toc")||e.querySelectorAll('#TOC > ul > li > a[href^="#"]').forEach((t=>{const a=t.getAttribute("href"),r=e.getElementById(a.replace(/^#/,""));if("H1"!==r?.tagName)return;if("H1"===r.nextElementSibling?.tagName)return;const l=t.nextElementSibling;if("UL"===l?.tagName){const a=e.createElement("div");a.className="chapter-toc",a.id="TOC",a.append(l.cloneNode(!0)),a.firstChild.className=t.parentNode.parentNode.className,r.after(a)}}))})(document);
1
+ (e=>{e.querySelector(".chapter-toc")||e.querySelectorAll('#TOC > ul > li > a[href^="#"]').forEach((t=>{const a=t.getAttribute("href"),n=e.getElementById(a.replace(/^#/,""));if("H1"!==n?.tagName)return;const r=n.nextElementSibling;if("H1"===r?.tagName)return;const c=t.nextElementSibling;if("UL"===c?.tagName){const a=e.createElement("div");a.className="chapter-toc",a.id="TOC",a.append(c.cloneNode(!0)),a.firstChild.className=t.parentNode.parentNode.className,(r?.classList.contains("epigraph")?r:n).after(a)}}))})(document);
2
2
  //# sourceMappingURL=chapter-toc.min.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["d","querySelector","querySelectorAll","forEach","a","id","getAttribute","h","getElementById","replace","tagName","nextElementSibling","u","toc","createElement","className","append","cloneNode","firstChild","parentNode","after","document"],"sources":["chapter-toc.js"],"mappings":"AACA,CAACA,IACCA,EAAEC,cAAc,iBAAmBD,EAAEE,iBAAiB,iCAAiCC,SAAQC,IAC7F,MAAMC,EAAKD,EAAEE,aAAa,QAASC,EAAIP,EAAEQ,eAAeH,EAAGI,QAAQ,KAAM,KACzE,GAAmB,OAAfF,GAAGG,QAAkB,OACzB,GAAsC,OAAlCH,EAAEI,oBAAoBD,QAAkB,OAC5C,MAAME,EAAIR,EAAEO,mBACZ,GAAmB,OAAfC,GAAGF,QAAkB,CACvB,MAAMG,EAAMb,EAAEc,cAAc,OAC5BD,EAAIE,UAAY,cAAeF,EAAIR,GAAK,MACxCQ,EAAIG,OAAOJ,EAAEK,WAAU,IACvBJ,EAAIK,WAAWH,UAAYX,EAAEe,WAAWA,WAAWJ,UACnDR,EAAEa,MAAMP,EACV,IAEH,EAdD,CAcGQ","ignoreList":[]}
1
+ {"version":3,"names":["d","querySelector","querySelectorAll","forEach","a","id","getAttribute","h","getElementById","replace","tagName","h2","nextElementSibling","u","toc","createElement","className","append","cloneNode","firstChild","parentNode","classList","contains","after","document"],"sources":["chapter-toc.js"],"mappings":"AACA,CAACA,IACCA,EAAEC,cAAc,iBAAmBD,EAAEE,iBAAiB,iCAAiCC,SAAQC,IAC7F,MAAMC,EAAKD,EAAEE,aAAa,QAASC,EAAIP,EAAEQ,eAAeH,EAAGI,QAAQ,KAAM,KACzE,GAAmB,OAAfF,GAAGG,QAAkB,OACzB,MAAMC,EAAKJ,EAAEK,mBACb,GAAoB,OAAhBD,GAAID,QAAkB,OAC1B,MAAMG,EAAIT,EAAEQ,mBACZ,GAAmB,OAAfC,GAAGH,QAAkB,CACvB,MAAMI,EAAMd,EAAEe,cAAc,OAC5BD,EAAIE,UAAY,cAAeF,EAAIT,GAAK,MACxCS,EAAIG,OAAOJ,EAAEK,WAAU,IACvBJ,EAAIK,WAAWH,UAAYZ,EAAEgB,WAAWA,WAAWJ,WAClDL,GAAIU,UAAUC,SAAS,YAAcX,EAAKJ,GAAGgB,MAAMT,EACtD,IAEH,EAfD,CAeGU","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiee/utils",
3
- "version": "1.13.49",
3
+ "version": "1.13.50",
4
4
  "description": "Miscellaneous tools and utilities to manipulate HTML pages",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"