spec-up-t 1.4.1 ā 1.6.0-beta.1
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/assets/compiled/body.js +3 -2
- package/assets/compiled/head.css +5 -5
- package/assets/css/embedded-libraries/bootstrap.min.css +1 -1
- package/assets/css/header-navbar.css +4 -4
- package/assets/css/index.css +5 -4
- package/assets/css/refs.css +30 -0
- package/assets/css/terms-and-definitions.css +89 -1
- package/assets/js/github-issues.js +3 -3
- package/assets/js/insert-irefs.js +214 -0
- package/config/asset-map.json +2 -1
- package/examples/read-console-messages.js +102 -0
- package/gulpfile.js +42 -1
- package/index.js +49 -1
- package/package.json +2 -1
- package/src/create-docx.js +13 -6
- package/src/create-pdf.js +22 -18
- package/src/health-check.js +47 -629
- package/src/init.js +7 -3
- package/src/install-from-boilerplate/config-scripts-keys.js +1 -1
- package/src/markdown-it/README.md +2 -14
- package/src/markdown-it/index.js +1 -7
- package/src/parsers/template-tag-parser.js +42 -4
- package/src/pipeline/postprocessing/definition-list-postprocessor.js +4 -2
- package/src/pipeline/references/collect-external-references.js +101 -17
- package/src/pipeline/references/external-references-service.js +102 -21
- package/src/pipeline/references/fetch-terms-from-index.js +62 -1
- package/src/pipeline/references/process-xtrefs-data.js +67 -9
- package/src/pipeline/references/xtref-utils.js +22 -3
- package/src/pipeline/rendering/render-spec-document.js +0 -1
- package/src/run-healthcheck.js +177 -0
- package/src/utils/logger.js +129 -8
- package/src/utils/message-collector.js +144 -0
- package/src/utils/regex-patterns.js +3 -1
- package/templates/template.html +6 -6
- package/test/logger.test.js +290 -0
- package/test/message-collector.test.js +286 -0
- package/assets/css/insert-trefs.css +0 -1
- package/src/markdown-it/link-enhancement.js +0 -98
- package/src/utils/LOGGER.md +0 -81
package/assets/compiled/head.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root{--card-bg:#fff;--card-bg-dt:#fcfcfc;--toc-bg:#fff;--toc-text:#212529;--header-navbar-bg:#f8f9fa;--header-navbar-text:#212529;--card-text:#212529;--card-border:rgba(0, 0, 0, 0.125);--card-shadow:rgba(0, 0, 0, 0.075);--card-hover-bg:#f8f9fa}[data-bs-theme=dark]{--card-bg:#212529;--card-bg-dt:#24282d;--toc-bg:#212529;--toc-text:#f8f9fa;--header-navbar-bg:#343a40;--header-navbar-text:#f8f9fa;--card-text:#f8f9fa;--card-border:rgba(255, 255, 255, 0.125);--card-shadow:rgba(0, 0, 0, 0.2);--card-hover-bg:#343a40}
|
|
2
|
-
|
|
2
|
+
/*!
|
|
3
3
|
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
|
4
4
|
* Copyright 2011-2024 The Bootstrap Authors
|
|
5
5
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
slide-panels{position:fixed;top:0;left:0;height:100%;width:100%;pointer-events:none;z-index:100;contain:paint}slide-panels:before{content:" ";display:block;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.3);transition:opacity .35s ease;opacity:0;cursor:pointer;pointer-events:none}slide-panels[open]:before{opacity:1;pointer-events:all}slide-panel{display:flex;flex-direction:column;box-sizing:border-box;position:absolute;top:0;left:0;bottom:0;background:#fff;box-shadow:0 0 5px 1px rgba(0,0,0,.15);transform:translate3d(-100%,0,0);transition:transform .35s ease;z-index:1;pointer-events:all}slide-panel[options~=right]{left:auto;right:0;transform:translate3d(100%,0,0)}slide-panel[open]{transform:translate3d(0,0,0)}detail-box{display:block}detail-box>header [detail-box-toggle]{width:2em;height:2em;text-align:center;cursor:pointer}detail-box>header [detail-box-toggle]:before{content:" ";display:inline-block;width:0;height:0;border-left:.55em solid transparent;border-right:.55em solid transparent;border-top:.8em solid;vertical-align:sub;cursor:pointer}detail-box[open] header [detail-box-toggle]:before{border-top:none;border-bottom:.8em solid}detail-box>section{height:0;opacity:0;min-width:100%;transition:height .3s ease,opacity .3s;overflow:hidden}detail-box[open]>section{opacity:1}tab-panels>nav{display:flex}tab-panels>nav>*{margin-left:-2px;padding:.5em 1em;background:#e0e0e0;border:1px solid #aaa;border-radius:0;cursor:pointer}tab-panels>nav>:focus{outline:0;background:#ccc}tab-panels>nav>:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}tab-panels>nav>:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}tab-panels>nav>[selected]{color:var(--themed-element-text);background:var(--themed-element-bk);border:var(--themed-element-border);opacity:.9999}tab-panels>section{display:none}tab-panels>section[selected]{display:block}
|
|
8
8
|
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
|
|
9
9
|
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
|
10
|
-
#logo img{width:100px}.bi{display:inline-block;width:1.2rem;height:1.2rem}#header,#header *{background-color:var(--header-navbar-bg);color:var(--header-navbar-text)}[issue-count]:after{content:"(" attr(issue-count) ")";margin:0 0 0 .3em;padding:.1em 0 0}[issue-count=""][animate]{display:none;opacity:0}[issue-count][animate]:not([issue-count=""]){animation:display-show 1s}#header a:not(#logo),#header a:not(#logo) *,#header button,#header button *{background:#a9dde0}
|
|
10
|
+
#logo img{width:100px}.bi{display:inline-block;width:1.2rem;height:1.2rem}#header,#header *{background-color:var(--header-navbar-bg);color:var(--header-navbar-text)}[data-issue-count]:after{content:"(" attr(data-issue-count) ")";margin:0 0 0 .3em;padding:.1em 0 0}[data-issue-count=""][data-animate]{display:none;opacity:0}[data-issue-count][data-animate]:not([data-issue-count=""]){animation:display-show 1s}#header a:not(#logo),#header a:not(#logo) *,#header button,#header button *{background:#a9dde0}
|
|
11
11
|
.container{min-height:100vh}@media (min-width:768px){.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;z-index:100}}ul.toc{padding:1em 0 1.75em;font-size:.85em}ul.toc,ul.toc ul{margin:0;padding:0;list-style:none}ul.toc li a{display:block;padding:.4em .8em;text-decoration:none;color:var(--toc-text);transition:background .2s ease,padding-left .2s ease,border-left .2s ease;padding-left:.8em;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.03)}ul.toc ul{margin-left:1.2em!important;margin-top:.3em}ul.toc a:hover{background:#f9f9f9;padding-left:1em;border-left:3px solid #007bff}ul.toc>li>ul>li>a{padding-left:1.5em}ul.toc>li>ul>li>ul>li>a{padding-left:2em}ul.toc a:focus{outline:2px solid #007bff;outline-offset:-2px;box-shadow:0 0 0 3px rgba(0,123,255,.25);position:relative;z-index:1}.spec-footer{font-size:.7em;text-align:center}ul.toc li a.active,ul.toc li a[aria-current=page]{border-left:3px solid #007bff;font-weight:500;background:#f0f0f0}ul.toc li:last-child a{border-bottom:none}#toc ul li{position:relative}#toc ul li.has-children{position:relative}.collapse-toggle{position:absolute;top:.35em;right:0;width:28px;height:28px;background:0 0;border:1px solid transparent;border-radius:3px;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s,border-color .2s;z-index:2}.collapse-toggle:hover{background-color:rgba(0,0,0,.05)}.collapse-toggle:focus{outline:2px solid #007bff;outline-offset:1px;border-color:#007bff;box-shadow:0 0 0 3px rgba(0,123,255,.25)}.collapse-toggle::after{content:"";border-style:solid;border-width:.15em .15em 0 0;display:inline-block;height:.5em;width:.5em;position:relative;transform:rotate(135deg);transition:transform .2s ease}.collapse-toggle.collapsed::after{transform:rotate(45deg)}#toc ul li.has-children>ul{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out,opacity .3s ease-in-out;opacity:1}#toc ul li.has-children.collapsed>ul{max-height:0;overflow:hidden;opacity:.6}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.screen-reader-text:focus{width:auto;height:auto;clip:auto;display:block;padding:15px 23px 14px;background-color:#fff;color:#007bff;z-index:100000;font-size:1em;font-weight:700;text-decoration:none;line-height:normal;box-shadow:0 0 2px 2px rgba(0,0,0,.2)}
|
|
12
|
-
h2,h3,h4,h5,h6{margin-top:1.5em!important}#terminology-section-utility-container{margin:1em auto;width:100%}@media (min-width:576px){#terminology-section-utility-container{position:sticky;top:3.5em;z-index:10}}.toc-anchor{font-size:.875em;color:#73c2df;text-decoration:none;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}dl.terms-and-definitions-list{margin:0;padding:0;position:relative;z-index:1}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:var(--card-bg-dt);border:1px solid var(--card-border);padding:.5rem 1.25rem;border-radius:.375rem .375rem 0 0;color:var(--card-text);position:relative;line-height:1.5;font-size:1.05em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-height:2.5rem}dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .2s ease-in-out}dl.terms-and-definitions-list>dt:focus>span,dl.terms-and-definitions-list>dt:hover>span,dl.terms-and-definitions-list>dt>span:focus,dl.terms-and-definitions-list>dt>span:hover{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt:active>span,dl.terms-and-definitions-list>dt>span:active{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt .btn{font-size:1.2em!important}dl.terms-and-definitions-list>dt:hover{background-color:var(--card-hover-bg);transition:background-color .2s ease-in-out}dl.terms-and-definitions-list>dd{margin:0;background-color:var(--card-bg);border:1px solid var(--card-border);border-top:none;padding:.5rem 2rem;color:var(--card-text);width:100%;position:relative}dl.terms-and-definitions-list dd p{margin:0;color:var(--card-text);padding-left:.5rem}dl.terms-and-definitions-list>dd::before{display:none}dl.terms-and-definitions-list dd table{margin:.5em 0;width:100%;border-collapse:collapse}dl.terms-and-definitions-list dd table td,dl.terms-and-definitions-list dd table th{padding:.5em;border:1px solid #ddd}dl.terms-and-definitions-list dd table th{background-color:#f5f5f5}dl>dd:has(table).meta-info-content-wrapper{display:block;font-size:.7em;position:relative;max-height:none;height:auto;overflow:visible;transition:all .3s ease-out}dl>dd:has(table).meta-info-content-wrapper td,dl>dd:has(table).meta-info-content-wrapper th{padding:.3em}dl>dd:has(table).collapsed.meta-info-content-wrapper{max-height:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;transition:all .3s ease-out;line-height:0}dl>dd:has(table).meta-info-content-wrapper>div{display:block;padding:inherit}.meta-info-toggle-button{position:relative;cursor:pointer}dl.terms-and-definitions-list dt+dd{border-bottom:none}dl.terms-and-definitions-list dd+dd{border-top:none;border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:1rem}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 .375rem .375rem;border-bottom:1px solid var(--card-border)}html.dense-info dl.terms-and-definitions-list>dt{padding:.1rem 1.25rem;line-height:inherit;font-size:inherit;min-height:auto}html.dense-info dl.terms-and-definitions-list dd+dt{margin-top:.3rem}html.dense-info dl.terms-and-definitions-list>dt::before{display:none}html.dense-info dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0}.term-external{position:relative}dl.terms-and-definitions-list>dd.term-external,dl.terms-and-definitions-list>dt.term-external{background:#a9dde03b}.term-local{position:relative}dl.terms-and-definitions-list>dd.term-local,dl.terms-and-definitions-list>dt.term-local{background:#f0f8ff}dl.terms-and-definitions-list .term-original-term{font-style:italic}dl.terms-and-definitions-list .term-external-parenthetical-terms{font-weight:400}dl.terms-and-definitions-list .term-local-original-term{font-style:italic}dl.terms-and-definitions-list .term-local-parenthetical-terms{font-weight:400}.btn{font-variant:small-caps;text-transform:uppercase;position:relative;z-index:5}.transclusion-heading{font-size:1.3em;font-weight:700;margin:.2em 0 .2em}dl.terms-and-definitions-list>dd.term-external-embedded{position:relative;padding-left:2.5rem;padding-top:.3rem;padding-bottom:.3rem}dl.terms-and-definitions-list span.term-external::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}dl.terms-and-definitions-list span.term-external{padding-left:1.5rem;display:inline-block}.placeholder-tref{display:none}.no-xref-found-message{background:#f8c481;color:#03365f;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem;font-variant:small-caps;text-transform:uppercase}
|
|
12
|
+
h2,h3,h4,h5,h6{margin-top:1.5em!important}#terminology-section-utility-container{margin:1em auto;width:100%}@media (min-width:576px){#terminology-section-utility-container{position:sticky;top:3.5em;z-index:10}}.toc-anchor{font-size:.875em;color:#73c2df;text-decoration:none;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}dl.terms-and-definitions-list{margin:0;padding:0;position:relative;z-index:1}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:var(--card-bg-dt);border:1px solid var(--card-border);padding:.5rem 1.25rem;border-radius:.375rem .375rem 0 0;color:var(--card-text);position:relative;line-height:1.5;font-size:1.05em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-height:2.5rem}dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .2s ease-in-out}dl.terms-and-definitions-list>dt:focus>span,dl.terms-and-definitions-list>dt:hover>span,dl.terms-and-definitions-list>dt>span:focus,dl.terms-and-definitions-list>dt>span:hover{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt:active>span,dl.terms-and-definitions-list>dt>span:active{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt .btn{font-size:1.2em!important}dl.terms-and-definitions-list>dt:hover{background-color:var(--card-hover-bg);transition:background-color .2s ease-in-out}dl.terms-and-definitions-list>dd{margin:0;background-color:var(--card-bg);border:1px solid var(--card-border);border-top:none;padding:.5rem 2rem;color:var(--card-text);width:100%;position:relative}dl.terms-and-definitions-list dd p{margin:0;color:var(--card-text);padding-left:.5rem}dl.terms-and-definitions-list>dd::before{display:none}dl.terms-and-definitions-list dd table{margin:.5em 0;width:100%;border-collapse:collapse}dl.terms-and-definitions-list dd table td,dl.terms-and-definitions-list dd table th{padding:.5em;border:1px solid #ddd}dl.terms-and-definitions-list dd table th{background-color:#f5f5f5}dl>dd:has(table).meta-info-content-wrapper{display:block;font-size:.7em;position:relative;max-height:none;height:auto;overflow:visible;transition:all .3s ease-out}dl>dd:has(table).meta-info-content-wrapper td,dl>dd:has(table).meta-info-content-wrapper th{padding:.3em}dl>dd:has(table).collapsed.meta-info-content-wrapper{max-height:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;transition:all .3s ease-out;line-height:0}dl>dd:has(table).meta-info-content-wrapper>div{display:block;padding:inherit}.meta-info-toggle-button{position:relative;cursor:pointer}dl.terms-and-definitions-list dt+dd{border-bottom:none}dl.terms-and-definitions-list dd+dd{border-top:none;border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:1rem}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 .375rem .375rem;border-bottom:1px solid var(--card-border)}html.dense-info dl.terms-and-definitions-list>dt{padding:.1rem 1.25rem;line-height:inherit;font-size:inherit;min-height:auto}html.dense-info dl.terms-and-definitions-list dd+dt{margin-top:.3rem}html.dense-info dl.terms-and-definitions-list>dt::before{display:none}html.dense-info dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0}.term-external{position:relative}dl.terms-and-definitions-list>dd.term-external,dl.terms-and-definitions-list>dt.term-external{background:#a9dde03b}.term-local{position:relative}dl.terms-and-definitions-list>dd.term-local,dl.terms-and-definitions-list>dt.term-local{background:#f0f8ff}dl.terms-and-definitions-list .term-original-term{font-style:italic}dl.terms-and-definitions-list .term-external-parenthetical-terms{font-weight:400}dl.terms-and-definitions-list .term-local-original-term{font-style:italic}dl.terms-and-definitions-list .term-local-parenthetical-terms{font-weight:400}.btn{font-variant:small-caps;text-transform:uppercase;position:relative;z-index:5}.transclusion-heading{font-size:1.3em;font-weight:700;margin:.2em 0 .2em}dl.terms-and-definitions-list>dd.term-external-embedded{position:relative;padding-left:2.5rem;padding-top:.3rem;padding-bottom:.3rem}dl.terms-and-definitions-list span.term-external::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}dl.terms-and-definitions-list span.term-external{padding-left:1.5rem;display:inline-block}.placeholder-tref{display:none}.no-xref-found-message{background:#f8c481;color:#03365f;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem;font-variant:small-caps;text-transform:uppercase}.iref-content{margin:1rem 0}dl.iref-definition-list{margin:0;padding:0}dl.iref-definition-list>dt.iref-term{font-weight:700;margin:0;background-color:var(--card-bg-dt);border:1px solid var(--card-border);padding:.5rem 1.25rem;border-radius:.375rem .375rem 0 0;color:var(--card-text);position:relative;line-height:1.5;font-size:1.05em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-height:2.5rem;opacity:.95}dl.iref-definition-list>dd.iref-definition{margin:0;background-color:var(--card-bg);border:1px solid var(--card-border);border-top:none;padding:.5rem 2rem;color:var(--card-text);width:100%;position:relative;opacity:.95}dl.iref-definition-list>dd.iref-definition+dd.iref-definition{border-top:1px dashed var(--card-border)}dl.iref-definition-list>dd.iref-definition:last-child{border-radius:0 0 .375rem .375rem}dl.iref-definition-list dd.iref-definition p{margin:0;color:var(--card-text);padding-left:.5rem}a.iref-link-to-original{color:inherit;text-decoration:none;display:block;width:100%;transition:opacity .2s ease-in-out}a.iref-link-to-original:hover{opacity:.8;text-decoration:underline}.iref-not-found{margin:.5rem 0;padding:.5rem 1rem;background-color:#fff3cd;border:1px solid #ffc107;border-radius:.375rem;color:#856404}
|
|
13
13
|
.btn{font-size:.7em!important;margin:0 0 0 .5em!important}
|
|
14
14
|
.highlight-matches-search{font-size:1em;outline:3px solid #1d6dae39;outline-offset:5px;transition:outline .3s ease-in-out}.highlight-matches-search.active{outline:3px solid #1d6dae;transition:outline .3s ease-in-out}.highlight-matches-DIF-search{background-color:#1d6dae11}.highlight-matches-ToIP-search{background-color:#a9dde0b0}.highlight-matches-BTC-search{background-color:#f19019a1}.highlight-matches-KERI-search{background-color:#b5d070d5}.highlight-matches-SSI-search{background-color:#ff0}.highlight-matches-GLEIF-search{background-color:#52dac6a6}
|
|
15
15
|
.highlight-cfib41dyhcd99sm{background-color:#1d6dae11}
|
|
@@ -30,5 +30,5 @@ article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::af
|
|
|
30
30
|
#content .figure:has(.scrollHintImage){padding:0;margin:0;width:auto;height:auto}
|
|
31
31
|
.highlight2{padding-left:1em;padding-right:1em;border:1px dashed #71bbe6;background:#a9dde03b}
|
|
32
32
|
#toc ul.toc{counter-reset:toc-section}#toc ul.toc>li{counter-reset:toc-subsection}#toc ul.toc>li>ul>li{counter-reset:toc-subsubsection}#toc ul.toc>li>a::before{counter-increment:toc-section;content:counter(toc-section) ". ";font-weight:700;margin-right:.5em}#toc ul.toc>li>ul>li>a::before{counter-increment:toc-subsection;content:counter(toc-section) "." counter(toc-subsection) " ";font-weight:700;margin-right:.5em}#toc ul.toc>li>ul>li>ul>li>a::before{counter-increment:toc-subsubsection;content:counter(toc-section) "." counter(toc-subsection) "." counter(toc-subsubsection) " ";font-weight:700;margin-right:.5em}main article{counter-reset:main-section}main article h2{counter-reset:main-subsection}main article h3{counter-reset:main-subsubsection}main article h2 .toc-anchor::after{counter-increment:main-section;content:" " counter(main-section) ".";font-weight:700}main article h3 .toc-anchor::after{counter-increment:main-subsection;content:" " counter(main-section) "." counter(main-subsection);font-weight:700}main article h4 .toc-anchor::after{counter-increment:main-subsubsection;content:" " counter(main-section) "." counter(main-subsection) "." counter(main-subsubsection);font-weight:700}main article h5::before,main article h6::before{font-weight:700;margin-right:.5em}@media print{#toc ul.toc>li>a::before,#toc ul.toc>li>ul>li>a::before,#toc ul.toc>li>ul>li>ul>li>a::before,main article h2 .toc-anchor::after,main article h3 .toc-anchor::after,main article h4 .toc-anchor::after{color:#000!important}}
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
.term-reference{padding:3px;background-color:#eaf5fb;border-radius:7px;position:relative;padding-left:1.5em;text-decoration:none;box-shadow:inset 0 0 0 1px #a9d9f5;transition:box-shadow .3s ease-in-out}.term-reference:hover{box-shadow:inset 0 0 0 3px #a9d9f5}.term-reference::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}
|
|
34
|
+
html{scroll-behavior:smooth;scroll-padding-top:50vh}body:not([hashscroll]) :target{animation:highlight-target 3.5s .25s ease}body:not([hashscroll]) dt:has(:target){animation:highlight-target-parent-dt 3.5s .25s ease}dl.terms-and-definitions-list>.highlight{background-color:#ff0!important;transition:background-color .3s ease-in-out}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top}@keyframes highlight-target{50%{background-color:#ff0}}@keyframes highlight-target-parent-dt{50%{background-color:#ff0;border:1px solid #00c8ff}}#svg{display:none}main *{overflow-wrap:anywhere;word-break:normal}.table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch;width:100%;max-width:100%}.table-responsive *{overflow-wrap:normal!important;word-break:normal!important;white-space:nowrap!important}dd td img{max-width:30px}.notice{margin:1em 0;padding:.5em .9em .55em .65em;border-left:.5em solid}.notice p{margin:.4em 0 0}.note{background:#e9fbe9;border-color:#52e052}.note .notice-link{display:block;color:#178217}.issue{background:#e9f0fb;border-color:#527fe0}.issue .notice-link:before{display:block;color:#1e4cae}.warning{background:#fbe9e9;border-color:#e05252}.warning .notice-link{display:block;color:#ae1e1e}.example{color:#cebe00;background:#1a1e23;border-left:.5em solid}.example .notice-link{display:block;color:inherit;font-size:1.1em;font-family:Heebo,sans-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.alert-primary{background-color:#f9fcff;border-color:#b2ebf2;color:#00838f}.alert-secondary{background-color:#f5f5f5;border-color:#e0e0e0;color:#616161}.alert-success{background-color:#e8f5e9;border-color:#c8e6c9;color:#388e3c}.alert-danger{background-color:#ffebee;border-color:#ef9a9a;color:#d32f2f}.alert-warning{background-color:#fffde7;border-color:#fff9c4;color:#f9a825}.alert-info{background-color:#e1f5fe;border-color:#b3e5fc;color:#0288d1}.alert-light{background-color:#f9f9f9;border-color:#eee;color:#424242}.alert-dark{background-color:#e0e0e0;border-color:#bdbdbd;color:#212121}.alert a{color:inherit;font-weight:700}.alert-primary a{color:#006064}.alert-success a{color:#2e7d32}.alert-danger a{color:#b71c1c}.alert-warning a{color:#f57f17}.alert-info a{color:#01579b}.alert-dark a{color:#000}[data-bs-theme=dark] .alert-primary{background-color:#004d40;border-color:#00695c;color:#b2dfdb}[data-bs-theme=dark] .alert-secondary{background-color:#424242;border-color:#616161;color:#e0e0e0}[data-bs-theme=dark] .alert-success{background-color:#1b5e20;border-color:#2e7d32;color:#a5d6a7}[data-bs-theme=dark] .alert-danger{background-color:#b71c1c;border-color:#c62828;color:#ef9a9a}[data-bs-theme=dark] .alert-warning{background-color:#f57f17;border-color:#ffb300;color:#ffe082}[data-bs-theme=dark] .alert-info{background-color:#01579b;border-color:#0277bd;color:#81d4fa}[data-bs-theme=dark] .alert-light{background-color:#303030;border-color:#424242;color:#e0e0e0}[data-bs-theme=dark] .alert-dark{background-color:#212121;border-color:#424242;color:#bdbdbd}[data-bs-theme=dark] .alert a{color:inherit;font-weight:700}[data-bs-theme=dark] .alert-primary a{color:#80cbc4}[data-bs-theme=dark] .alert-success a{color:#81c784}[data-bs-theme=dark] .alert-danger a{color:#ef5350}[data-bs-theme=dark] .alert-warning a{color:#ffca28}[data-bs-theme=dark] .alert-info a{color:#4fc3f7}[data-bs-theme=dark] .alert-dark a{color:#9e9e9e}#offcanvasSettings .btn-menu-item{border-radius:unset;width:100%;text-align:left;border:1px solid #dee2e6;background-color:var(--card-bg);color:var(--card-text);padding:10px 15px;margin-bottom:5px;transition:background-color .2s ease}#offcanvasSettings .btn-menu-item:hover{background-color:#e9ecef}
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
color: var(--header-navbar-text);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
[issue-count]:after {
|
|
17
|
-
content: "(" attr(issue-count) ")";
|
|
16
|
+
[data-issue-count]:after {
|
|
17
|
+
content: "(" attr(data-issue-count) ")";
|
|
18
18
|
margin: 0 0 0 0.3em;
|
|
19
19
|
padding: 0.1em 0 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
[issue-count=""][animate] {
|
|
22
|
+
[data-issue-count=""][data-animate] {
|
|
23
23
|
display: none;
|
|
24
24
|
opacity: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
[issue-count][animate]:not([issue-count=""]) {
|
|
27
|
+
[data-issue-count][data-animate]:not([data-issue-count=""]) {
|
|
28
28
|
animation: display-show 1s;
|
|
29
29
|
}
|
|
30
30
|
|
package/assets/css/index.css
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
scroll-
|
|
3
|
-
/*
|
|
1
|
+
html {
|
|
2
|
+
scroll-behavior: smooth;
|
|
3
|
+
/* This creates a padding zone at the top for anchor scroll calculations *
|
|
4
|
+
* Elements will be scrolled so they appear 50vh from the top of viewport */
|
|
5
|
+
scroll-padding-top: 50vh;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
|
-
|
|
7
8
|
/*
|
|
8
9
|
- When a URL fragment targets an element,
|
|
9
10
|
the `:target` pseudo-class triggers the corresponding CSS rules.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.term-reference {
|
|
2
|
+
padding: 3px;
|
|
3
|
+
background-color: #eaf5fb;
|
|
4
|
+
border-radius: 7px;
|
|
5
|
+
position: relative;
|
|
6
|
+
padding-left: 1.5em;
|
|
7
|
+
text-decoration: none;
|
|
8
|
+
box-shadow: inset 0 0 0 1px #a9d9f5;
|
|
9
|
+
transition: box-shadow 0.3s ease-in-out;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.term-reference:hover {
|
|
13
|
+
box-shadow: inset 0 0 0 3px #a9d9f5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Arrow styling for term references */
|
|
17
|
+
.term-reference::after {
|
|
18
|
+
content: "";
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 50%;
|
|
21
|
+
transform: translateY(-50%);
|
|
22
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
|
|
23
|
+
background-size: contain;
|
|
24
|
+
background-repeat: no-repeat;
|
|
25
|
+
background-position: center;
|
|
26
|
+
width: 0.8rem;
|
|
27
|
+
height: 0.8rem;
|
|
28
|
+
left: 0.2rem;
|
|
29
|
+
|
|
30
|
+
}
|
|
@@ -359,4 +359,92 @@ dl.terms-and-definitions-list span.term-external {
|
|
|
359
359
|
font-size: 0.8rem;
|
|
360
360
|
font-variant: small-caps;
|
|
361
361
|
text-transform: uppercase;
|
|
362
|
-
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* ====== INLINE REFERENCE (IREF) STYLING ====== */
|
|
365
|
+
/* Wrapper for iref content */
|
|
366
|
+
.iref-content {
|
|
367
|
+
margin: 1rem 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* Definition list within iref - use similar styling to main terms list */
|
|
371
|
+
dl.iref-definition-list {
|
|
372
|
+
margin: 0;
|
|
373
|
+
padding: 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/* Term styling for iref */
|
|
377
|
+
dl.iref-definition-list > dt.iref-term {
|
|
378
|
+
font-weight: 700;
|
|
379
|
+
margin: 0;
|
|
380
|
+
background-color: var(--card-bg-dt);
|
|
381
|
+
border: 1px solid var(--card-border);
|
|
382
|
+
padding: 0.5rem 1.25rem;
|
|
383
|
+
border-radius: 0.375rem 0.375rem 0 0;
|
|
384
|
+
color: var(--card-text);
|
|
385
|
+
position: relative;
|
|
386
|
+
line-height: 1.5;
|
|
387
|
+
font-size: 1.05em;
|
|
388
|
+
display: flex;
|
|
389
|
+
flex-wrap: wrap;
|
|
390
|
+
align-items: center;
|
|
391
|
+
gap: 0.5rem;
|
|
392
|
+
min-height: 2.5rem;
|
|
393
|
+
opacity: 0.95;
|
|
394
|
+
/* Slightly transparent to show it's a copy */
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Definition styling for iref */
|
|
398
|
+
dl.iref-definition-list > dd.iref-definition {
|
|
399
|
+
margin: 0;
|
|
400
|
+
background-color: var(--card-bg);
|
|
401
|
+
border: 1px solid var(--card-border);
|
|
402
|
+
border-top: none;
|
|
403
|
+
padding: 0.5rem 2rem;
|
|
404
|
+
color: var(--card-text);
|
|
405
|
+
width: 100%;
|
|
406
|
+
position: relative;
|
|
407
|
+
opacity: 0.95;
|
|
408
|
+
/* Slightly transparent to show it's a copy */
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/* Add spacing between consecutive iref dd elements */
|
|
412
|
+
dl.iref-definition-list > dd.iref-definition + dd.iref-definition {
|
|
413
|
+
border-top: 1px dashed var(--card-border);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/* Last dd in iref gets rounded bottom corners */
|
|
417
|
+
dl.iref-definition-list > dd.iref-definition:last-child {
|
|
418
|
+
border-radius: 0 0 0.375rem 0.375rem;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/* Style paragraphs inside iref dd */
|
|
422
|
+
dl.iref-definition-list dd.iref-definition p {
|
|
423
|
+
margin: 0;
|
|
424
|
+
color: var(--card-text);
|
|
425
|
+
padding-left: 0.5rem;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* Link to original term in iref dt */
|
|
429
|
+
a.iref-link-to-original {
|
|
430
|
+
color: inherit;
|
|
431
|
+
text-decoration: none;
|
|
432
|
+
display: block;
|
|
433
|
+
width: 100%;
|
|
434
|
+
transition: opacity 0.2s ease-in-out;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
a.iref-link-to-original:hover {
|
|
438
|
+
opacity: 0.8;
|
|
439
|
+
text-decoration: underline;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/* iref not found message */
|
|
443
|
+
.iref-not-found {
|
|
444
|
+
margin: 0.5rem 0;
|
|
445
|
+
padding: 0.5rem 1rem;
|
|
446
|
+
background-color: #fff3cd;
|
|
447
|
+
border: 1px solid #ffc107;
|
|
448
|
+
border-radius: 0.375rem;
|
|
449
|
+
color: #856404;
|
|
450
|
+
}
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
.then(response => response.json())
|
|
11
11
|
.then(issues => {
|
|
12
12
|
let count = issues.length;
|
|
13
|
-
document.querySelectorAll('[issue-count]').forEach(node => {
|
|
14
|
-
node.setAttribute('issue-count', count)
|
|
13
|
+
document.querySelectorAll('[data-issue-count]').forEach(node => {
|
|
14
|
+
node.setAttribute('data-issue-count', count)
|
|
15
15
|
});
|
|
16
16
|
repo_issue_list.innerHTML = issues.map(issue => {
|
|
17
17
|
return `<li class="repo-issue">
|
|
18
18
|
<detail-box>
|
|
19
|
-
<
|
|
19
|
+
<div>${md.render(issue.body || '')}</div>
|
|
20
20
|
<header class="repo-issue-title">
|
|
21
21
|
<span class="repo-issue-number">${issue.number}</span>
|
|
22
22
|
<span class="repo-issue-link">
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Handles the insertion of inline reference copies (irefs) into HTML documentation.
|
|
3
|
+
* This script processes [[iref: term]] placeholders and replaces them with copies of existing
|
|
4
|
+
* term definitions from the terms-and-definitions-list. The copied terms maintain their
|
|
5
|
+
* original structure including all <dd> elements.
|
|
6
|
+
*
|
|
7
|
+
* The iref functionality allows you to display a term definition inline wherever you need it,
|
|
8
|
+
* without creating a link. It creates a DOM copy of the term's <dt> and <dd> elements.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Inserts inline reference copies (irefs) into the document.
|
|
13
|
+
* This function finds all iref placeholders and replaces them with copies of the
|
|
14
|
+
* corresponding term definitions from the terms-and-definitions-list.
|
|
15
|
+
*
|
|
16
|
+
* @returns {void}
|
|
17
|
+
*/
|
|
18
|
+
function insertIrefs() {
|
|
19
|
+
/**
|
|
20
|
+
* Processes all iref placeholders found in the document.
|
|
21
|
+
* Collects DOM changes before applying them in batch to improve performance.
|
|
22
|
+
*
|
|
23
|
+
* @returns {void} - Dispatches an 'irefs-inserted' event when complete
|
|
24
|
+
*/
|
|
25
|
+
function processIrefPlaceholders() {
|
|
26
|
+
/**
|
|
27
|
+
* Find all iref placeholder elements in the document
|
|
28
|
+
* @type {NodeListOf<Element>}
|
|
29
|
+
*/
|
|
30
|
+
const placeholders = document.querySelectorAll('span.iref-placeholder');
|
|
31
|
+
|
|
32
|
+
if (placeholders.length === 0) {
|
|
33
|
+
// No placeholders found, dispatch event and return
|
|
34
|
+
document.dispatchEvent(new CustomEvent('irefs-inserted', {
|
|
35
|
+
detail: { count: 0 }
|
|
36
|
+
}));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Prepare all DOM changes before applying them
|
|
42
|
+
* Each item contains the placeholder and the fragment to replace it with
|
|
43
|
+
* @type {Array<{placeholder: Element, fragment: DocumentFragment}>}
|
|
44
|
+
*/
|
|
45
|
+
const domChanges = [];
|
|
46
|
+
|
|
47
|
+
placeholders.forEach((placeholder) => {
|
|
48
|
+
// Extract the term ID from the placeholder's data attribute
|
|
49
|
+
const termId = placeholder.dataset.irefTerm;
|
|
50
|
+
const originalTerm = placeholder.dataset.irefOriginal;
|
|
51
|
+
|
|
52
|
+
if (!termId) {
|
|
53
|
+
console.warn('iref placeholder missing data-iref-term attribute', placeholder);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Find the term in the terms-and-definitions-list by its ID
|
|
58
|
+
// The term ID is in the format "term:term-name"
|
|
59
|
+
const termElement = document.querySelector(
|
|
60
|
+
`dl.terms-and-definitions-list dt span#term\\:${termId.replace(/:/g, '\\:')}`
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
if (!termElement) {
|
|
64
|
+
console.warn(`iref: term "${originalTerm}" (id: ${termId}) not found in terms-and-definitions-list`);
|
|
65
|
+
|
|
66
|
+
// Create a "not found" message element
|
|
67
|
+
const notFoundEl = document.createElement('div');
|
|
68
|
+
notFoundEl.className = 'iref-not-found';
|
|
69
|
+
notFoundEl.innerHTML = `<p class="text-warning"><em>[[iref: ${originalTerm}]] - Term not found in definitions list</em></p>`;
|
|
70
|
+
|
|
71
|
+
const fragment = document.createDocumentFragment();
|
|
72
|
+
fragment.appendChild(notFoundEl);
|
|
73
|
+
|
|
74
|
+
domChanges.push({
|
|
75
|
+
placeholder: placeholder,
|
|
76
|
+
fragment: fragment
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Find the <dt> element containing this term
|
|
82
|
+
const dtElement = termElement.closest('dt');
|
|
83
|
+
if (!dtElement) {
|
|
84
|
+
console.warn(`iref: could not find <dt> element for term "${originalTerm}"`);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Create a DocumentFragment to hold the copied elements
|
|
89
|
+
const fragment = document.createDocumentFragment();
|
|
90
|
+
|
|
91
|
+
// Create a wrapper div for the iref content
|
|
92
|
+
const wrapperDiv = document.createElement('div');
|
|
93
|
+
wrapperDiv.className = 'iref-content';
|
|
94
|
+
|
|
95
|
+
// Create a definition list to hold the copied term
|
|
96
|
+
const dl = document.createElement('dl');
|
|
97
|
+
dl.className = 'iref-definition-list';
|
|
98
|
+
|
|
99
|
+
// Clone the <dt> element
|
|
100
|
+
const clonedDt = dtElement.cloneNode(true);
|
|
101
|
+
clonedDt.classList.add('iref-term');
|
|
102
|
+
clonedDt.classList.add('term-reference');
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
// Remove the § anchor element from the cloned dt
|
|
106
|
+
const tocAnchor = clonedDt.querySelector('a.toc-anchor');
|
|
107
|
+
if (tocAnchor) {
|
|
108
|
+
tocAnchor.remove();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Remove all id attributes from the cloned dt to prevent duplicate IDs
|
|
112
|
+
// This is crucial so the link points to the ORIGINAL, not the clone
|
|
113
|
+
const elementsWithIds = clonedDt.querySelectorAll('[id]');
|
|
114
|
+
elementsWithIds.forEach(element => {
|
|
115
|
+
element.removeAttribute('id');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// Make the entire dt a link to the original term
|
|
119
|
+
// Find the term ID from the original dt element (not the clone)
|
|
120
|
+
const termIdSpan = dtElement.querySelector('[id^="term:"]');
|
|
121
|
+
if (termIdSpan) {
|
|
122
|
+
const termIdAttr = termIdSpan.getAttribute('id');
|
|
123
|
+
|
|
124
|
+
// Wrap the cloned dt content in a link
|
|
125
|
+
const link = document.createElement('a');
|
|
126
|
+
link.href = `#${termIdAttr}`;
|
|
127
|
+
link.className = 'iref-link-to-original';
|
|
128
|
+
link.title = `Go to original definition of ${originalTerm}`;
|
|
129
|
+
|
|
130
|
+
// Move all child nodes of clonedDt into the link
|
|
131
|
+
while (clonedDt.firstChild) {
|
|
132
|
+
link.appendChild(clonedDt.firstChild);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Add the link back to the clonedDt
|
|
136
|
+
clonedDt.appendChild(link);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
dl.appendChild(clonedDt);
|
|
140
|
+
|
|
141
|
+
// Find and clone all associated <dd> elements
|
|
142
|
+
// Walk through siblings until we hit another <dt> or run out of elements
|
|
143
|
+
let nextElement = dtElement.nextElementSibling;
|
|
144
|
+
|
|
145
|
+
while (nextElement && nextElement.tagName.toLowerCase() === 'dd') {
|
|
146
|
+
const clonedDd = nextElement.cloneNode(true);
|
|
147
|
+
clonedDd.classList.add('iref-definition');
|
|
148
|
+
dl.appendChild(clonedDd);
|
|
149
|
+
nextElement = nextElement.nextElementSibling;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Add the definition list to the wrapper
|
|
153
|
+
wrapperDiv.appendChild(dl);
|
|
154
|
+
|
|
155
|
+
// Add the wrapper to the fragment
|
|
156
|
+
fragment.appendChild(wrapperDiv);
|
|
157
|
+
|
|
158
|
+
// Store this change for batch processing
|
|
159
|
+
domChanges.push({
|
|
160
|
+
placeholder: placeholder,
|
|
161
|
+
fragment: fragment
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Perform all DOM replacements in a single batch using requestAnimationFrame
|
|
167
|
+
* to optimize browser rendering and prevent layout thrashing
|
|
168
|
+
*/
|
|
169
|
+
requestAnimationFrame(() => {
|
|
170
|
+
domChanges.forEach(change => {
|
|
171
|
+
const { placeholder, fragment } = change;
|
|
172
|
+
|
|
173
|
+
// Replace the placeholder with the fragment
|
|
174
|
+
placeholder.parentNode.replaceChild(fragment, placeholder);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Dispatch a custom event when all DOM modifications are complete
|
|
179
|
+
* This allows other scripts to know when iref processing is done
|
|
180
|
+
* @fires irefs-inserted
|
|
181
|
+
*/
|
|
182
|
+
document.dispatchEvent(new CustomEvent('irefs-inserted', {
|
|
183
|
+
detail: { count: domChanges.length }
|
|
184
|
+
}));
|
|
185
|
+
|
|
186
|
+
console.log(`Inserted ${domChanges.length} inline reference(s)`);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
processIrefPlaceholders();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Initialize the inline references when the DOM is fully loaded.
|
|
195
|
+
* For external terms (trefs), we need to wait until insert-trefs.js has populated them.
|
|
196
|
+
* This event listener ensures that the DOM is ready before attempting to process irefs.
|
|
197
|
+
* @listens DOMContentLoaded
|
|
198
|
+
* @listens trefs-inserted
|
|
199
|
+
*/
|
|
200
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
201
|
+
// Check if there are any external terms that need to be populated first
|
|
202
|
+
const hasExternalTerms = document.querySelectorAll('span.iref-placeholder').length > 0 &&
|
|
203
|
+
document.querySelectorAll('dl.terms-and-definitions-list dt.term-external').length > 0;
|
|
204
|
+
|
|
205
|
+
if (hasExternalTerms) {
|
|
206
|
+
// Wait for trefs to be inserted first (they populate external term definitions)
|
|
207
|
+
document.addEventListener('trefs-inserted', () => {
|
|
208
|
+
insertIrefs();
|
|
209
|
+
}, { once: true }); // Use once: true to automatically remove listener after firing
|
|
210
|
+
} else {
|
|
211
|
+
// No external terms, can insert irefs immediately
|
|
212
|
+
insertIrefs();
|
|
213
|
+
}
|
|
214
|
+
});
|
package/config/asset-map.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"assets/css/horizontal-scroll-hint.css",
|
|
30
30
|
"assets/css/highlight-heading-plus-sibling-nodes.css",
|
|
31
31
|
"assets/css/counter.css",
|
|
32
|
-
"assets/css/
|
|
32
|
+
"assets/css/refs.css",
|
|
33
33
|
"assets/css/index.css"
|
|
34
34
|
],
|
|
35
35
|
"js": [
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"assets/js/token-input.js",
|
|
67
67
|
"assets/js/download-pdf-docx.js",
|
|
68
68
|
"assets/js/insert-trefs.js",
|
|
69
|
+
"assets/js/insert-irefs.js",
|
|
69
70
|
"assets/js/definition-button-container-utils.js",
|
|
70
71
|
"assets/js/collapse-definitions.js",
|
|
71
72
|
"assets/js/collapse-meta-info.js",
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Example demonstrating message collector usage
|
|
3
|
+
*
|
|
4
|
+
* This example shows how to read and analyze the console messages
|
|
5
|
+
* captured during menu operations [1] and [4].
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* node examples/read-console-messages.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs-extra');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
async function analyzeConsoleMessages() {
|
|
15
|
+
const messagePath = path.join(process.cwd(), '.cache', 'console-messages.json');
|
|
16
|
+
|
|
17
|
+
// Check if the file exists
|
|
18
|
+
if (!await fs.pathExists(messagePath)) {
|
|
19
|
+
console.log('ā No console messages found.');
|
|
20
|
+
console.log(' Run "npm run render" or "npm run collectExternalReferences" first.');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Read the messages
|
|
25
|
+
const output = await fs.readJson(messagePath);
|
|
26
|
+
|
|
27
|
+
// Display metadata
|
|
28
|
+
console.log('\nš Console Message Analysis');
|
|
29
|
+
console.log('ā'.repeat(60));
|
|
30
|
+
console.log(`Generated at: ${output.metadata.generatedAt}`);
|
|
31
|
+
console.log(`Total messages: ${output.metadata.totalMessages}`);
|
|
32
|
+
console.log(`Operations: ${output.metadata.operations.join(', ')}`);
|
|
33
|
+
console.log('\nMessages by type:');
|
|
34
|
+
Object.entries(output.metadata.messagesByType).forEach(([type, count]) => {
|
|
35
|
+
console.log(` ${type}: ${count}`);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Analyze errors
|
|
39
|
+
const errors = output.messages.filter(m => m.type === 'error');
|
|
40
|
+
if (errors.length > 0) {
|
|
41
|
+
console.log('\nā Errors detected:');
|
|
42
|
+
errors.forEach(error => {
|
|
43
|
+
console.log(` [${error.timestamp}] ${error.message}`);
|
|
44
|
+
if (error.additionalData && error.additionalData.length > 0) {
|
|
45
|
+
console.log(` Details: ${error.additionalData.join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
console.log('\nā
No errors detected');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Analyze warnings
|
|
53
|
+
const warnings = output.messages.filter(m => m.type === 'warn');
|
|
54
|
+
if (warnings.length > 0) {
|
|
55
|
+
console.log('\nš” Warnings detected:');
|
|
56
|
+
warnings.forEach(warning => {
|
|
57
|
+
console.log(` [${warning.timestamp}] ${warning.message}`);
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
console.log('ā
No warnings detected');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Show successful operations
|
|
64
|
+
const successes = output.messages.filter(m => m.type === 'success');
|
|
65
|
+
console.log(`\nā
Successful operations: ${successes.length}`);
|
|
66
|
+
if (successes.length > 0 && successes.length <= 5) {
|
|
67
|
+
successes.forEach(success => {
|
|
68
|
+
console.log(` - ${success.message}`);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Operation breakdown
|
|
73
|
+
const messagesByOp = output.messages.reduce((acc, msg) => {
|
|
74
|
+
if (msg.operation) {
|
|
75
|
+
acc[msg.operation] = (acc[msg.operation] || 0) + 1;
|
|
76
|
+
}
|
|
77
|
+
return acc;
|
|
78
|
+
}, {});
|
|
79
|
+
|
|
80
|
+
console.log('\nš Messages by operation:');
|
|
81
|
+
Object.entries(messagesByOp).forEach(([op, count]) => {
|
|
82
|
+
console.log(` ${op}: ${count} messages`);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Health summary
|
|
86
|
+
console.log('\nš„ Health Summary:');
|
|
87
|
+
if (errors.length > 0) {
|
|
88
|
+
console.log(' Status: ā ERROR - Issues detected during operation');
|
|
89
|
+
} else if (warnings.length > 0) {
|
|
90
|
+
console.log(' Status: š” WARNING - Operation completed with warnings');
|
|
91
|
+
} else {
|
|
92
|
+
console.log(' Status: ā
SUCCESS - Operation completed successfully');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
console.log('ā'.repeat(60) + '\n');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Run the analysis
|
|
99
|
+
analyzeConsoleMessages().catch(error => {
|
|
100
|
+
console.error('ā Failed to analyze messages:', error.message);
|
|
101
|
+
process.exit(1);
|
|
102
|
+
});
|