spec-up-t 1.1.10 → 1.1.12

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.
@@ -124,16 +124,17 @@ function backToTop(){const n=document.createElement("a");n.id="back-to-top-a1znc
124
124
  * @license MIT
125
125
  * @since 2024-06-09
126
126
  */
127
- var md=window.markdownit();function fetchCommitHashes(){async function e(e,r){const i=document.createElement("div");i.classList.add("fetched-xref-term"),i.classList.add("transcluded-xref-term"),i.innerHTML="<p class='loadertext'>Loading external reference</p><div class='loader'></div>",r.parentNode.insertBefore(i,r.nextSibling);const s=async function(e,t){const r={};e&&e.length>0&&(r.Authorization="token "+e);try{const e=await fetch("https://api.github.com/repos/"+t.owner+"/"+t.repo+"/contents/"+t.terms_dir+"/"+t.term.replace(/ /g,"-").toLowerCase()+".md",{headers:r});if(403===e.status&&"0"===e.headers.get("X-RateLimit-Remaining")){const t=new Date(1e3*e.headers.get("X-RateLimit-Reset"));return console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${t}. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`),o(),!0}console.log(`\n SPEC-UP-T: Github API rate limit: ${e.headers.get("X-RateLimit-Remaining")} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`);const s=await e.json(),a=atob(s.content);return i=(i=a).replace(/\[\[def: ([^\]]+)\]\]/g,""),n.render(i)}catch(e){console.error("Error fetching content:",e)}var i}(t,e),a=new Promise(e=>setTimeout(e,2e3)),[c]=await Promise.all([s,a]),d=Date.now(),l=new Date(d).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"});i.innerHTML="<p class='transclusion-heading'>Current definition</p><small>"+l+"</small>"+c}if("undefined"==typeof allXTrefs||null===allXTrefs)return void console.log("allXTrefs is not defined or does not exist. We will continue without it.");const t=localStorage.getItem("githubToken"),n=window.markdownit().use(window.markdownitDeflist);const o=function(e,t){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e.apply(this,o),t)}}(()=>{notyf.error('GitHub API rate limit exceeded. See <a target="_blank" rel="noopener" href="https://trustoverip.github.io/spec-up-t-website/docs/github-token/">documentation</a> for more info.')},3e3);document.querySelectorAll(".x-term-reference").forEach(r=>{const i=r.getAttribute("data-local-href").split(":");allXTrefs.xtrefs.forEach(s=>{if(s.externalSpec===i[1]&&s.term.toLowerCase()===i[2].toLowerCase()){if(!s.commitHash){const e=document.createElement("span");return e.classList.add("no-xref-found-message"),e.innerHTML="No xref found.",void r.parentNode.insertBefore(e,r.nextSibling)}s.commitHash&&s.commitHash&&s.commitHash.substring(0,7);const i=document.createElement("a");i.href="https://github.com/"+s.owner+"/"+s.repo+"/compare/"+s.commitHash+"../main",i.target="_blank",i.rel="noopener noreferrer",i.classList.add("diff","xref-info-links","btn"),i.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Xref &lt; &gt; <svg icon><use xlink:href="#svg-github"></use></svg> Now',i.title="A Diff between the current commit hash of the definition and the commit hash referenced when the link was created.",r.parentNode.insertBefore(i,r.nextSibling);const a=document.createElement("a");a.href="https://github.com/"+s.owner+"/"+s.repo+"/blob/main/"+s.terms_dir+"/"+s.term.replace(/ /g,"-").toLowerCase()+".md",a.target="_blank",a.rel="noopener noreferrer",a.classList.add("latest-version","xref-info-links","btn"),a.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Now',a.title="Go to the repo page of the definition‘s latest version.",i.parentNode.insertBefore(a,r.nextSibling);const c=document.createElement("a");c.href="https://github.com/"+s.owner+"/"+s.repo+"/blob/"+s.commitHash+"/"+s.terms_dir+"/"+s.term.replace(/ /g,"-").toLowerCase()+".md",c.target="_blank",c.rel="noopener noreferrer",c.classList.add("exact-commit-hash","xref-info-links","btn"),c.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Xref',c.title="Go to the repo page of the definition‘s version referenced when the link was created.",a.parentNode.insertBefore(c,r.nextSibling);const d=document.createElement("button");d.classList.add("show-diff-modal","xref-info-links","btn"),d.innerHTML='Xref &lt; &gt; <svg icon><use xlink:href="#svg-github"></use></svg> Now',d.title="Show diff between the latest version and the referenced version",a.parentNode.insertBefore(d,r.nextSibling),d.addEventListener("click",(function(e){e.preventDefault(),function(e,t){const n={};e&&e.length>0&&(n.Authorization="token "+e),fetch("https://api.github.com/repos/"+t.owner+"/"+t.repo+"/contents/"+t.terms_dir+"/"+t.term.replace(/ /g,"-").toLowerCase()+".md",{headers:n}).then(e=>{if(403===e.status&&"0"===e.headers.get("X-RateLimit-Remaining")){const t=new Date(1e3*e.headers.get("X-RateLimit-Reset"));return console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${t}. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`),o(),!0}return console.log(`\n SPEC-UP-T: Github API rate limit: ${e.headers.get("X-RateLimit-Remaining")} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`),e.json()}).then(e=>{const n=atob(e.content),o=Diff.diffChars(t.content,n),r=document.createDocumentFragment();o.forEach(e=>{const t=e.added?"green":e.removed?"red":"grey",n=e.added||e.removed?"#ddd":"white";span=document.createElement("span"),span.style.color=t,span.style.backgroundColor=n,span.appendChild(document.createTextNode(e.value)),r.appendChild(span)});const i=document.createElement("div");i.innerHTML="<h1>Diff xref (local snapshot) and latest version</h1>",i.appendChild(r),i.innerHTML=i.innerHTML.replace(/\n/g,"<br>"),showModal(i.innerHTML)}).catch(e=>{console.error("Error fetching content:",e)})}(t,s)}));const l=document.createElement("button");l.classList.add("show-diff-modal","xref-info-links","btn"),l.innerHTML="Xref",l.title="Show the stored version of the term-file",d.parentNode.insertBefore(l,r.nextSibling);const h=/\[\[def: ([^\]]+)\]\]/g;s.content=s.content.replace(h,"");const m=n.render(s.content);l.addEventListener("click",(function(e){e.preventDefault(),showModal(`\n <h1>Term definition (local snapshot)</h1>\n <table>\n <tr>\n <th>Commit hash</th>\n <td>${s.commitHash}</td>\n </tr>\n <tr>\n <th>Content</th>\n <td>${m}</td>\n </tr>\n </table>\n `)}));const f=document.createElement("div");f.classList.add("local-snapshot-xref-term"),f.classList.add("transcluded-xref-term"),f.innerHTML=`<p class='transclusion-heading'>Snapshot</p><p>Commit Hash: ${s.commitHash}</p> ${m}`,r.parentNode.insertBefore(f,r.nextSibling),e(s,r)}})})}document.addEventListener("DOMContentLoaded",(function(){fetchCommitHashes()}));
127
+ var md=window.markdownit();function fetchCommitHashes(){if("undefined"==typeof allXTrefs||null===allXTrefs)return void console.log("allXTrefs is not defined or does not exist. We will continue without it.");const e=localStorage.getItem("githubToken"),t=window.markdownit().use(window.markdownitDeflist);const n=function(e,t){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e.apply(this,o),t)}}(()=>{notyf.error('GitHub API rate limit exceeded. See <a target="_blank" rel="noopener" href="https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token">documentation</a> for more info.')},3e3);document.querySelectorAll(".x-term-reference").forEach(o=>{const r=o.getAttribute("data-local-href").split(":");allXTrefs.xtrefs.forEach(i=>{if(i.externalSpec===r[1]&&i.term.toLowerCase()===r[2].toLowerCase()){if(!i.commitHash){const e=document.createElement("span");return e.classList.add("no-xref-found-message"),e.innerHTML="No xref found.",void o.parentNode.insertBefore(e,o.nextSibling)}i.commitHash&&i.commitHash&&i.commitHash.substring(0,7);const r=document.createElement("a");r.href="https://github.com/"+i.owner+"/"+i.repo+"/compare/"+i.commitHash+"../main",r.target="_blank",r.rel="noopener noreferrer",r.classList.add("diff","xref-info-links","btn"),r.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Xref &lt; &gt; <svg icon><use xlink:href="#svg-github"></use></svg> Now',r.title="A Diff between the current commit hash of the definition and the commit hash referenced when the link was created.",o.parentNode.insertBefore(r,o.nextSibling);const s=document.createElement("a");s.href="https://github.com/"+i.owner+"/"+i.repo+"/blob/main/"+i.terms_dir+"/"+i.term.replace(/ /g,"-").toLowerCase()+".md",s.target="_blank",s.rel="noopener noreferrer",s.classList.add("latest-version","xref-info-links","btn"),s.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Now',s.title="Go to the repo page of the definition‘s latest version.",r.parentNode.insertBefore(s,o.nextSibling);const a=document.createElement("a");a.href="https://github.com/"+i.owner+"/"+i.repo+"/blob/"+i.commitHash+"/"+i.terms_dir+"/"+i.term.replace(/ /g,"-").toLowerCase()+".md",a.target="_blank",a.rel="noopener noreferrer",a.classList.add("exact-commit-hash","xref-info-links","btn"),a.innerHTML='<svg icon><use xlink:href="#svg-github"></use></svg> Xref',a.title="Go to the repo page of the definition‘s version referenced when the link was created.",s.parentNode.insertBefore(a,o.nextSibling);const c=document.createElement("button");c.classList.add("show-diff-modal","xref-info-links","btn"),c.innerHTML='Xref &lt; &gt; <svg icon><use xlink:href="#svg-github"></use></svg> Now',c.title="Show diff between the latest version and the referenced version",s.parentNode.insertBefore(c,o.nextSibling),c.addEventListener("click",(function(t){t.preventDefault(),function(e,t){const o={};e&&e.length>0&&(o.Authorization="token "+e),fetch("https://api.github.com/repos/"+t.owner+"/"+t.repo+"/contents/"+t.terms_dir+"/"+t.term.replace(/ /g,"-").toLowerCase()+".md",{headers:o}).then(e=>{if(403===e.status&&"0"===e.headers.get("X-RateLimit-Remaining")){const t=new Date(1e3*e.headers.get("X-RateLimit-Reset"));return console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${t}. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.\n`),n(),!0}return console.log(`\n SPEC-UP-T: Github API rate limit: ${e.headers.get("X-RateLimit-Remaining")} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.\n`),e.json()}).then(e=>{const n=atob(e.content),o=Diff.diffChars(t.content,n),r=document.createDocumentFragment();o.forEach(e=>{const t=e.added?"green":e.removed?"red":"grey",n=e.added||e.removed?"#ddd":"white";span=document.createElement("span"),span.style.color=t,span.style.backgroundColor=n,span.appendChild(document.createTextNode(e.value)),r.appendChild(span)});const i=document.createElement("div");i.innerHTML="<h1>Diff xref (local snapshot) and latest version</h1>",i.appendChild(r),i.innerHTML=i.innerHTML.replace(/\n/g,"<br>"),showModal(i.innerHTML)}).catch(e=>{console.error("Error fetching content:",e)})}(e,i)}));const d=document.createElement("button");d.classList.add("show-diff-modal","xref-info-links","btn"),d.innerHTML="Xref",d.title="Show the stored version of the term-file",c.parentNode.insertBefore(d,o.nextSibling);const l=/\[\[def: ([^\]]+)\]\]/g;i.content=i.content.replace(l,"");const h=t.render(i.content);d.addEventListener("click",(function(e){e.preventDefault(),showModal(`\n <h1>Term definition (local snapshot)</h1>\n <table>\n <tr>\n <th>Commit hash</th>\n <td>${i.commitHash}</td>\n </tr>\n <tr>\n <th>Content</th>\n <td>${h}</td>\n </tr>\n </table>\n `)}));const f=document.createElement("div");f.classList.add("local-snapshot-xref-term"),f.classList.add("transcluded-xref-term"),f.innerHTML=`<p class='transclusion-heading'>Snapshot</p><p>Commit Hash: ${i.commitHash}</p> ${h}`,o.parentNode.insertBefore(f,o.nextSibling)}})})}document.addEventListener("DOMContentLoaded",(function(){fetchCommitHashes()}));
128
128
  function addAnchorsToTerms(){document.querySelectorAll('dt:has(> span[id^="term:"])').forEach(e=>{const t=function(e){let t=e;for(;t.querySelector('span[id^="term:"]');)t=t.querySelector('span[id^="term:"]');return t}(e),r=t.getAttribute("id"),n=document.createElement("a");n.setAttribute("href","#"+r),n.setAttribute("class","toc-anchor"),n.innerHTML="# ",t.parentNode.insertBefore(n,t)})}document.addEventListener("DOMContentLoaded",(function(){addAnchorsToTerms()}));
129
129
  function copyAnchorToCliboard(){document.addEventListener("click",(function(o){if(o.target.classList.contains("toc-anchor")){const c=o.target.href;navigator.clipboard.writeText(c).then(()=>{console.log("Anchor copied to clipboard"),notyf.success("Anchor copied to clipboard: "+c)}).catch(o=>{console.error("Failed to copy anchor to clipboard",o)})}}))}document.addEventListener("DOMContentLoaded",(function(){copyAnchorToCliboard()}));
130
130
  var Notyf=function(){"use strict";var t,i=function(){return(i=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var o in i=arguments[e])Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o]);return t}).apply(this,arguments)},e=(n.prototype.on=function(t,i){var e=this.listeners[t]||[];this.listeners[t]=e.concat([i])},n.prototype.triggerEvent=function(t,i){var e=this;(this.listeners[t]||[]).forEach((function(t){return t({target:e,event:i})}))},n);function n(t){this.options=t,this.listeners={}}(s=t=t||{})[s.Add=0]="Add",s[s.Remove=1]="Remove";var o,s,a=(r.prototype.push=function(i){this.notifications.push(i),this.updateFn(i,t.Add,this.notifications)},r.prototype.splice=function(i,e){return e=this.notifications.splice(i,e)[0],this.updateFn(e,t.Remove,this.notifications),e},r.prototype.indexOf=function(t){return this.notifications.indexOf(t)},r.prototype.onUpdate=function(t){this.updateFn=t},r);function r(){this.notifications=[]}(s=o=o||{}).Dismiss="dismiss";var c={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!(s.Click="click")},p=(d.prototype.on=function(t,e){var n;this.events=i(i({},this.events),((n={})[t]=e,n))},d.prototype.update=function(i,e){e===t.Add?this.addNotification(i):e===t.Remove&&this.removeNotification(i)},d.prototype.removeNotification=function(t){var i,e,n=this;(t=this._popRenderedNotification(t))&&((e=t.node).classList.add("notyf__toast--disappear"),e.addEventListener(this.animationEndEventName,i=function(t){t.target===e&&(e.removeEventListener(n.animationEndEventName,i),n.container.removeChild(e))}))},d.prototype.addNotification=function(t){var i=this._renderNotification(t);this.notifications.push({notification:t,node:i}),this._announce(t.options.message||"Notification")},d.prototype._renderNotification=function(t){var i=this._buildNotificationCard(t),e=t.options.className;return e&&(t=i.classList).add.apply(t,e.split(" ")),this.container.appendChild(i),i},d.prototype._popRenderedNotification=function(t){for(var i=-1,e=0;e<this.notifications.length&&i<0;e++)this.notifications[e].notification===t&&(i=e);if(-1!==i)return this.notifications.splice(i,1)[0]},d.prototype.getXPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.x)||"right"},d.prototype.getYPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.y)||"bottom"},d.prototype.adjustContainerAlignment=function(t){var i=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],e=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)];(t=this.container.style).setProperty("justify-content",e),t.setProperty("align-items",i)},d.prototype._buildNotificationCard=function(t){var i=this,e=t.options,n=e.icon;this.adjustContainerAlignment(e);var s=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),a=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),r=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),c=this._createHTMLElement({tagName:"div",className:"notyf__message"});c.innerHTML=e.message||"";var p,d,l,u,f=e.background||e.backgroundColor;return n&&(p=this._createHTMLElement({tagName:"div",className:"notyf__icon"}),("string"==typeof n||n instanceof String)&&(p.innerHTML=new String(n).valueOf()),"object"==typeof n&&(d=n.tagName,l=n.className,u=n.text,n=void 0===(n=n.color)?f:n,u=this._createHTMLElement({tagName:void 0===d?"i":d,className:l,text:u}),n&&(u.style.color=n),p.appendChild(u)),r.appendChild(p)),r.appendChild(c),s.appendChild(r),f&&(e.ripple?(a.style.background=f,s.appendChild(a)):s.style.background=f),e.dismissible&&(a=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),f=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"}),a.appendChild(f),r.appendChild(a),s.classList.add("notyf__toast--dismissible"),f.addEventListener("click",(function(e){var n,s;null!==(s=(n=i.events)[o.Dismiss])&&void 0!==s&&s.call(n,{target:t,event:e}),e.stopPropagation()}))),s.addEventListener("click",(function(e){var n,s;return null===(s=(n=i.events)[o.Click])||void 0===s?void 0:s.call(n,{target:t,event:e})})),e="top"===this.getYPosition(e)?"upper":"lower",s.classList.add("notyf__toast--"+e),s},d.prototype._createHTMLElement=function(t){var i=t.tagName,e=t.className;t=t.text,i=document.createElement(i);return e&&(i.className=e),i.textContent=t||null,i},d.prototype._createA11yContainer=function(){var t=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.border="0",t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t.style.outline="0",document.body.appendChild(t),this.a11yContainer=t},d.prototype._announce=function(t){var i=this;this.a11yContainer.textContent="",setTimeout((function(){i.a11yContainer.textContent=t}),100)},d.prototype._getAnimationEndEventName=function(){var t,i=document.createElement("_fake"),e={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"};for(t in e)if(void 0!==i.style[t])return e[t];return"animationend"},d);function d(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),i=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(i),document.body.appendChild(t),this.container=i,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}function l(t){var e=this;this.dismiss=this._removeNotification,this.notifications=new a,this.view=new p;var n=this.registerTypes(t);this.options=i(i({},c),t),this.options.types=n,this.notifications.onUpdate((function(t,i){return e.view.update(t,i)})),this.view.on(o.Dismiss,(function(t){var i=t.target;t=t.event;e._removeNotification(i),i.triggerEvent(o.Dismiss,t)})),this.view.on(o.Click,(function(t){var i=t.target;t=t.event;return i.triggerEvent(o.Click,t)}))}return l.prototype.error=function(t){return t=this.normalizeOptions("error",t),this.open(t)},l.prototype.success=function(t){return t=this.normalizeOptions("success",t),this.open(t)},l.prototype.open=function(t){var n=this.options.types.find((function(i){return i.type===t.type}))||{};n=i(i({},n),t);return this.assignProps(["ripple","position","dismissible"],n),n=new e(n),this._pushNotification(n),n},l.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},l.prototype.assignProps=function(t,i){var e=this;t.forEach((function(t){i[t]=(null==i[t]?e.options:i)[t]}))},l.prototype._pushNotification=function(t){var i=this;this.notifications.push(t);var e=(void 0!==t.options.duration?t:this).options.duration;e&&setTimeout((function(){return i._removeNotification(t)}),e)},l.prototype._removeNotification=function(t){-1!==(t=this.notifications.indexOf(t))&&this.notifications.splice(t,1)},l.prototype.normalizeOptions=function(t,e){return t={type:t},"string"==typeof e?t.message=e:"object"==typeof e&&(t=i(i({},t),e)),t},l.prototype.registerTypes=function(t){var e=(t&&t.types||[]).slice();return c.types.map((function(t){var n=-1;e.forEach((function(i,e){i.type===t.type&&(n=e)}));var o=-1!==n?e.splice(n,1)[0]:{};return i(i({},t),o)})).concat(e)},l}(),notyf=new Notyf({types:[{type:"success",background:"#1D6DAE",duration:3e3},{type:"error",background:"orange",duration:1e7,dismissible:!0}]});
131
131
  function showModal(e){const n=document.createElement("div");n.className="modal-overlay";const o=document.createElement("div");o.className="modal";const c=document.createElement("button");function t(){document.body.removeChild(n)}c.className="modal-close",c.innerHTML="&times;",c.onclick=t,o.innerHTML=e,o.appendChild(c),n.appendChild(o),document.body.appendChild(n),n.onclick=function(e){e.target===n&&t()},document.addEventListener("keydown",(function(e){"Escape"===e.key&&t()}),{once:!0})}
132
132
  function tokenInput(){let t=document.createElement("button");t.classList.add("button-token-input"),t.classList.add("btn"),t.innerHTML="&#128273;",document.querySelector("#container-search-h7vc6omi2hr2880").appendChild(t),t.addEventListener("click",()=>{const t=prompt("Please enter your GitHub token:");t?(localStorage.setItem("githubToken",t),console.log("GitHub token is set.")):alert("GitHub token is not set.")})}document.addEventListener("DOMContentLoaded",(function(){tokenInput()}));
133
133
  function pdfDownload(){fetch("index.pdf",{method:"HEAD"}).then(e=>{if(e.ok){let e=document.createElement("a");e.classList.add("button-pdf-download"),e.classList.add("btn"),e.target="_blank",e.rel="noopener noreferrer",e.href="index.pdf",e.title="Download this page as a PDF",e.innerHTML="PDF",document.querySelector("#container-search-h7vc6omi2hr2880").appendChild(e)}else console.log("PDF file does not exist. No PDF download button will be added.")}).catch(e=>{console.error("Error checking PDF file:",e)})}document.addEventListener("DOMContentLoaded",(function(){pdfDownload()}));
134
- function helpButtons(){const t=document.createElement("a");t.textContent="?",t.classList.add("help-button","btn"),t.title="Click to see the explanation of the buttons at the documentation website, in a new tab.",t.target="_blank",t.rel="noopener noreferrer",t.href="https://trustoverip.github.io/spec-up-t-website/docs/general/specification#explanation-buttons",function(t){document.querySelectorAll("#content dl dt").forEach(e=>{e.appendChild(t.cloneNode(!0))})}(t)}document.addEventListener("DOMContentLoaded",helpButtons);
134
+ function helpButtons(){const t=document.createElement("a");t.textContent="?",t.classList.add("help-button","btn"),t.title="Click to see the explanation of the buttons at the documentation website, in a new tab.",t.target="_blank",t.rel="noopener noreferrer",t.href="https://trustoverip.github.io/spec-up-t-website/docs/user-interface-overview/specification#explanation-of-the-buttons-in-the-specification",function(t){document.querySelectorAll("#content dl dt").forEach(e=>{e.appendChild(t.cloneNode(!0))})}(t)}document.addEventListener("DOMContentLoaded",helpButtons);
135
135
  function createAlphabetIndex(){const e=document.getElementById("alphabet-index-h7vc6omi2hr2880"),t=document.querySelector(".terms-and-definitions-list").querySelectorAll("dt"),n={};t.forEach(e=>{const t=e.querySelector("span");if(t&&t.id){const e=t.id,o=e.charAt(e.indexOf("term:")+5).toUpperCase();n[o]||(n[o]=t.id)}});const o=document.createElement("div");o.className="alphabet-index";const r=document.createElement("p");r.className="number-of-terms",r.textContent=`– There are ${t.length} terms –`;const c=e.parentNode;c.insertBefore(r,e.nextSibling),c.insertBefore(o,r.nextSibling),Object.keys(n).sort().forEach(e=>{const t=document.createElement("a");t.href="#"+n[e],t.textContent=e,o.appendChild(t)})}document.addEventListener("DOMContentLoaded",(function(){createAlphabetIndex()}));
136
136
  function collapseDefinitions(){const t=document.querySelectorAll("#content dl.terms-and-definitions-list > dd"),e=document.querySelectorAll("#content dl.terms-and-definitions-list > dt"),n=document.querySelectorAll(".collapse-all-defs-button");e.forEach(t=>{const e=document.createElement("button");e.classList.add("collapse-all-defs-button","btn"),e.innerHTML="▲",e.setAttribute("id","toggleButton"),t.appendChild(e)}),document.addEventListener("click",e=>{e.target.classList.contains("collapse-all-defs-button")&&(!function(){const e=t[0].classList.contains("hidden");t.forEach(t=>{t.classList.toggle("hidden",!e),t.classList.toggle("visible",e)}),n.forEach(t=>{t.innerHTML=e?"▲":"▼",t.title=e?"Collapse all definitions":"Expand all definitions"})}(),e.target.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),setTimeout(()=>{window.scrollBy({top:-100,behavior:"smooth"})},500))})}document.addEventListener("DOMContentLoaded",(function(){collapseDefinitions()}));
137
+ function createToggleButton(t){const e=document.createElement("button");e.classList.add("meta-info-toggle-button","btn"),e.textContent="🔍",e.title="Meta info",e.addEventListener("click",(function(){t.classList.toggle("collapsed"),t.classList.contains("collapsed"),this.textContent="🔍"}));let n=t.previousElementSibling;for(;n&&"DT"!==n.tagName;)n=n.previousElementSibling;console.log("element: ",t),console.log("dtElement: ",n),n?n.appendChild(e):t.insertBefore(e,t.firstChild)}document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelectorAll(".contains-table");console.log("collapsibles: ",t),t.forEach((function(t){const e=document.createElement("div");for(e.classList.add("meta-info-content-wrapper");t.firstChild&&t.firstChild!==t.querySelector(".meta-info-toggle-button");)e.appendChild(t.firstChild);t.querySelector(".meta-info-toggle-button")||createToggleButton(t),t.appendChild(e),t.classList.add("collapsed")}))}));
137
138
  /**
138
139
  * @file This file adds an href attribute to the snapshot link on the page via client side JS DOM manipulation.
139
140
  * @author Kor Dwarshuis
@@ -8,7 +8,8 @@ code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-fami
8
8
  #back-to-top-a1zncgtqfpzsig8{position:fixed;bottom:20px;text-decoration:none;left:calc(100% - 1.8em);width:1.5em;height:1.5em;margin:0;padding:0;background-color:#1e6eae;color:#222;border-radius:50px;text-align:center;font-size:30px;color:#fff;box-shadow:0 0 1.3px rgba(0,0,0,.07),0 0 3.6px rgba(0,0,0,.1),0 0 8.7px rgba(0,0,0,.13),0 0 29px rgba(0,0,0,.2);cursor:pointer;border:none;display:none;align-items:center;justify-content:center}
9
9
  @-webkit-keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@keyframes notyf-fadeinleft{0%{opacity:0;transform:translateX(25%)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@keyframes notyf-fadeoutright{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(25%)}}@-webkit-keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@-webkit-keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}@keyframes ripple{0%{transform:scale(0) translateY(-45%) translateX(13%)}to{transform:scale(1) translateY(-45%) translateX(13%)}}.notyf{position:fixed;top:0;left:0;height:100%;width:100%;color:#fff;z-index:9999;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;pointer-events:none;box-sizing:border-box;padding:20px}.notyf__icon--error,.notyf__icon--success{height:21px;width:21px;background:#fff;border-radius:50%;display:block;margin:0 auto;position:relative}.notyf__icon--error:after,.notyf__icon--error:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px;left:9px;height:12px;top:5px}.notyf__icon--error:after{transform:rotate(-45deg)}.notyf__icon--error:before{transform:rotate(45deg)}.notyf__icon--success:after,.notyf__icon--success:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px}.notyf__icon--success:after{height:6px;transform:rotate(-45deg);top:9px;left:6px}.notyf__icon--success:before{height:11px;transform:rotate(45deg);top:5px;left:10px}.notyf__toast{display:block;overflow:hidden;pointer-events:auto;-webkit-animation:notyf-fadeinup .3s ease-in forwards;animation:notyf-fadeinup .3s ease-in forwards;box-shadow:0 3px 7px 0 rgba(0,0,0,.25);position:relative;padding:0 15px;border-radius:2px;max-width:300px;transform:translateY(25%);box-sizing:border-box;flex-shrink:0}.notyf__toast--disappear{transform:translateY(0);-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s}.notyf__toast--disappear .notyf__icon,.notyf__toast--disappear .notyf__message{-webkit-animation:notyf-fadeoutdown .3s forwards;animation:notyf-fadeoutdown .3s forwards;opacity:1;transform:translateY(0)}.notyf__toast--disappear .notyf__dismiss{-webkit-animation:notyf-fadeoutright .3s forwards;animation:notyf-fadeoutright .3s forwards;opacity:1;transform:translateX(0)}.notyf__toast--disappear .notyf__message{-webkit-animation-delay:.05s;animation-delay:.05s}.notyf__toast--upper{margin-bottom:20px}.notyf__toast--lower{margin-top:20px}.notyf__toast--dismissible .notyf__wrapper{padding-right:30px}.notyf__ripple{height:400px;width:400px;position:absolute;transform-origin:bottom right;right:0;top:0;border-radius:50%;transform:scale(0) translateY(-51%) translateX(13%);z-index:5;-webkit-animation:ripple .4s ease-out forwards;animation:ripple .4s ease-out forwards}.notyf__wrapper{display:flex;align-items:center;padding-top:17px;padding-bottom:17px;padding-right:15px;border-radius:3px;position:relative;z-index:10}.notyf__icon{width:22px;text-align:center;font-size:1.3em;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.3s;animation-delay:.3s;margin-right:13px}.notyf__dismiss{position:absolute;top:0;right:0;height:100%;width:26px;margin-right:-15px;-webkit-animation:notyf-fadeinleft .3s forwards;animation:notyf-fadeinleft .3s forwards;-webkit-animation-delay:.35s;animation-delay:.35s;opacity:0}.notyf__dismiss-btn{background-color:rgba(0,0,0,.25);border:none;cursor:pointer;transition:opacity .2s ease,background-color .2s ease;outline:0;opacity:.35;height:100%;width:100%}.notyf__dismiss-btn:after,.notyf__dismiss-btn:before{content:"";background:#fff;height:12px;width:2px;border-radius:3px;position:absolute;left:calc(50% - 1px);top:calc(50% - 5px)}.notyf__dismiss-btn:after{transform:rotate(-45deg)}.notyf__dismiss-btn:before{transform:rotate(45deg)}.notyf__dismiss-btn:hover{opacity:.7;background-color:rgba(0,0,0,.15)}.notyf__dismiss-btn:active{opacity:.8}.notyf__message{vertical-align:middle;position:relative;opacity:0;-webkit-animation:notyf-fadeinup .3s forwards;animation:notyf-fadeinup .3s forwards;-webkit-animation-delay:.25s;animation-delay:.25s;line-height:1.5em}@media only screen and (max-width:480px){.notyf{padding:0}.notyf__ripple{height:600px;width:600px;-webkit-animation-duration:.5s;animation-duration:.5s}.notyf__toast{max-width:none;border-radius:0;box-shadow:0 -2px 7px 0 rgba(0,0,0,.13);width:100%}.notyf__dismiss{width:56px}}
10
10
  #content dl dd.hidden{display:none}#content dl dd.visible{display:block}.collapse-all-defs-button{float:right}
11
+ .contains-table>.meta-info-content-wrapper{max-height:100px;transition:max-height .3s ease-out}.contains-table.collapsed>.meta-info-content-wrapper{padding-top:0;padding-bottom:0;overflow:hidden;transition:max-height .3s ease-out;max-height:0}
11
12
  .modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:1000}.modal{background-color:#fff;padding:2rem 20px 20px;border-radius:8px;max-width:80%;max-height:80%;overflow-y:auto;position:relative;box-shadow:0 2px 10px rgba(0,0,0,.1)}.modal-close{position:absolute;top:0;right:5px;background-color:transparent;border:none;font-size:2rem;line-height:1;cursor:pointer}
12
13
  .alphabet-index{display:flex;flex-wrap:wrap;justify-content:center;margin:1em auto;padding:0;width:100%}@media (min-width:576px){.alphabet-index{position:sticky;top:3em}}.alphabet-index a{background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:50%;color:#333;display:block;font-size:1rem;height:33.33px;line-height:33.33px;margin:3.33px;text-align:center;text-decoration:none;width:33.33px}.number-of-terms{text-align:center}
13
14
  .button-pdf-download{padding-left:.1em;padding-right:.1em;border:none;background:red;color:#fff;box-shadow:2.8px 2.8px 2.2px rgba(0,0,0,.02),6.7px 6.7px 5.3px rgba(0,0,0,.028),12.5px 12.5px 10px rgba(0,0,0,.035),22.3px 22.3px 17.9px rgba(0,0,0,.042),41.8px 41.8px 33.4px rgba(0,0,0,.05),100px 100px 80px rgba(0,0,0,.07)}
14
- :root{--base-theme-color:207,71%;--themed-element-bk:hsl(var(--base-theme-color), 40%);--themed-element-text:#fff;--themed-element-border:1px solid hsl(var(--base-theme-color), 26%);--themed-heading-text:hsl(var(--base-theme-color), 30%);--no-color:255,255,255;--faint-color:245,245,245;--dim-color:225,225,225;--low-color:200,200,200;--mid-color:100,100,100;--high-color:50,50,50;--full-color:0,0,0;--active-color:#3aaaff;--visited-color:rgb(188, 129, 255);--green-status:rgb(0, 123, 9);--light-green-status:rgb(0, 194, 13);--page-bk:rgb(var(--no-color));--page-text:rgb(var(--full-color));--page-text-hover:rgb(var(--full-color));--element-bk:rgb(var(--no-color));--element-bk-hover:rgba(var(--low-color), 0.5);--element-bk-transparent:rgba(var(--dim-color), 0.92);--element-border:rgba(var(--high-color), 0.4);--element-border-focus:rgb(var(--full-color), 0.75);--element-border-radius:3px;--element-shadow-low:0 1px 3px 0px rgba(0, 0, 0, 0.25);--element-shadow-mid:0 1px 3px 0px rgba(0, 0, 0, 0.35);--element-shadow-high:0 1px 5px 0px rgba(0, 0, 0, 0.45);--code-bk:#1a1e23;--input-bk:rgba(var(--dim-color), 0.6);--input-border:rgba(var(--high-color), 0.4);--header-height:48px;--header-bk:rgba(var(--low-color), 0.985);--header-text:rgb(var(--full-color));--header-border:rgba(var(--full-color), 0.1);--header-border-inverse:rgba(var(--no-color), 0.3);--text-shadow:0 1px 2px rgba(0, 0, 0, 0.8);--svg-size:2vw;--font-size:14px}:target{scroll-margin:calc(var(--header-height)/ .3) 0 0}body:not([hashscroll]) :target{animation:highlight 1.5s .25s ease}body{margin:0;padding:0;font-family:Heebo,san-serif;line-height:1.5em;widows:2;orphans:2;word-wrap:break-word;overflow-wrap:break-word;color:#000;word-spacing:1px;counter-reset:h2 toc1}h1{font-size:2em;font-weight:700;line-height:1.2em}h2{margin:1.5em 0 1em}blockquote{position:relative;padding:0;margin:1.75em .75em;color:rgb(var(--mid-color));background:rgb(var(--faint-color))}blockquote:after,blockquote:before{content:"“";position:absolute;top:.065em;left:.065em;font-size:3em;height:.34em;line-height:100%;color:rgb(var(--low-color))}blockquote:after{content:"”";top:auto;left:auto;bottom:.065em;right:.065em;text-align:center}blockquote>p{padding:.6em 1.8em .5em 1.8em}strong strong{font-size:.9em;color:#b30032;font-weight:400;text-transform:uppercase}main article>ol,main article>ul{padding:0 0 0 2em}main article h1,main article h2,main article h3,main article h4,main article h5,main article h6{color:var(--themed-heading-text)}main article h2,main article h3,main article h4{display:flex;font-weight:500}main article h2{counter-reset:h3 h4}main article h3{counter-reset:h4}main article h2:after{counter-increment:h2;content:counter(h2) ".";padding:0 .4em 0 .2em;order:-1}main article h3:after{counter-increment:h3;content:counter(h2) "." counter(h3);padding:0 .45em 0 .2em;order:-1}main article h4:after{counter-increment:h4;content:counter(h2) "." counter(h3) "." counter(h4);padding:0 .5em 0 .2em;order:-1}h1 .toc-anchor{display:none}.toc-anchor{margin:-.1em 0 0;font-size:.875em;color:inherit;text-decoration:none;opacity:.35;order:-1;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}pre{overflow:auto}code{padding:.085em .3em .1em;font-size:1.075em;color:#c7001c;vertical-align:middle;background:#f0f0f0;border-radius:4px}pre code{background:unset;padding:unset;border-radius:unset}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:1.25em;margin:-.11em .3em 0 0;border-radius:3px}ol,ul{margin:0;padding:0 0 0 1.2em}dl.terms-and-definitions-list{margin:0;padding:0}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:#f0f0f0;border:1px solid #ccc;padding:10px;border-radius:5px 5px 0 0}dl.terms-and-definitions-list>dd{margin:0;background-color:#f9f9f9;border:1px solid #ccc;border-top:none;padding:.5em 2em;border-bottom:none}dl.terms-and-definitions-list dd p{margin:0}dl.terms-and-definitions-list dd+dd{border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:2em}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 5px 5px;border-bottom:1px solid #ccc}main{box-sizing:border-box;float:right;width:75%;min-width:calc(100% - 325px);max-width:calc(100% - 275px);padding:.5em 2em 1.5em 2em;background:#fff;box-shadow:0 0 5px -1px rgba(0,0,0,.3)}table{display:block;width:-webkit-fill-available;width:fit-content;max-width:100%;margin:1.5em 0 1.75em;border-spacing:0;border-collapse:collapse;overflow-x:auto;word-wrap:normal;overflow-wrap:normal;hyphens:manual}thead tr th{color:var(--themed-element-text);background:var(--themed-element-bk);border:var(--themed-element-border);text-shadow:0 1px 1px rgba(0,0,0,.5)}tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}tr:nth-child(2n){background-color:#f0f0f0}tr th{font-weight:400;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}td,th{padding:9px 13px;border:1px solid #d8d8d8}tr td{border:1px solid #ccc;text-align:left;margin:0;padding:.55em .75em .55em}tr td :first-child,tr th :first-child{margin-top:0}tr td :last-child,tr th :last-child{margin-bottom:0}table pre[class*=language-]{border:none;border-radius:0}table pre[class*=language-]:before{display:none}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top;pointer-events:none}article p>img{max-width:100%;margin:0 auto}article li{margin-top:.4em}slide-panel>:not(header):not(footer){flex:1}:not(pre)>code[class*=language-],pre[class*=language-]{padding:.65em .8em .8em;background:var(--code-bk)}.tippy-box{box-shadow:var(--element-shadow-mid)}.tippy-box a{color:var(--active-color)}.tippy-box a:visited{color:var(--visited-color)}.tippy-content{padding:.55em .55em .5em}.tippy-content header{margin:0 0 .4em;padding:.15em .3em .1em;border-radius:2px;background:rgba(255,255,255,.1);text-shadow:0 1px rgba(0,0,0,.9)}.tippy-content table,.tippy-content tbody,.tippy-content td,.tippy-content tr{margin:0;padding:0;border:none;border-spacing:0;border-collapse:collapse;background:0 0!important;background-color:transparent!important}.tippy-content table{margin:0 .3em}.tippy-content td{font-size:.9em;padding:.2em 0 0}.tippy-content td:first-child{padding-right:.5em}a[path-0$="github.com"]:before{content:"\f09b";color:var(--page-text);margin:0 .25em 0 0;font-family:FontAwesome;text-decoration:none;display:inline-block;vertical-align:bottom}a[path-0$="github.com"][path-3=issues][path-4],a[path-0$="github.com"][path-3=projects],a[path-0$="github.com"][path-3=pull],a[path-0$="github.com"][path-3=releases]{text-decoration:none}a[path-0$="github.com"][path-3=issues][path-4] span,a[path-0$="github.com"][path-3=projects] span,a[path-0$="github.com"][path-3=pull] span,a[path-0$="github.com"][path-3=releases] span{display:none}a[path-0$="github.com"][path-3=issues][path-4]:after{content:"Issue #" attr(path-4)}a[path-0$="github.com"][path-3=pull]:after{content:"Pull Request #" attr(path-4)}a[path-0$="github.com"][path-3=releases][path-5]:after{content:"Release " attr(path-5)}a[path-0$="github.com"][path-3=projects]:after{content:"Project #" attr(path-4)}[issue-count]:after{content:"Issues (" 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}[panel-toggle]{cursor:pointer}.panel-header{display:flex;align-items:center;height:var(--header-height)}.panel-header>*{display:flex;height:100%;padding:.1em .8em 0;align-items:center}.slide-panel{width:calc(100% - 1em);max-width:475px;transition:transform .35s ease}.slide-panel[panel-open]{transform:translateX(0)}.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,san-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.mermaid{display:flex;align-items:center;justify-content:center;margin:1.5em 0 1.75em}.reference-list{margin:0;padding:0;list-style:none}.reference-list dd a,.reference-status{font-style:italic}.reference-status{color:var(--green-status)}.tippy-box .reference-status{color:var(--light-green-status)}code[class*=language-],pre,pre[class*=language-]{font-size:.9em;margin:1em 0 1.5em;border-radius:3px}.example code[class*=language-],.example pre,.example pre[class*=language-]{margin:0}#svg{display:none}#header{position:sticky;position:-webkit-sticky;padding:0;top:0;margin:-.5em -2em 0 -2em;background:rgba(255,255,255,.9);border-bottom:1px solid rgba(0,0,0,.175);box-shadow:0 1px 3px 1px rgba(0,0,0,.1);z-index:2}#logo{box-sizing:border-box;display:flex;align-items:center;height:100%;padding:.5em}#logo img{height:100%}#logo+span{margin-left:auto}#header #toc_toggle{display:none;padding:0 1em;border-right:1px solid rgba(0,0,0,.15)}#content{max-width:800px}#content h1:first-of-type{margin:1em 0 .5em}#content h1:first-of-type .markdownIt-Anchor{display:none}#repo_issues{width:calc(100% - 1.5em);max-width:450px;border-left:1px solid rgba(0,0,0,.15)}#repo_issues>header{background:#eee;border-bottom:1px solid #ddd}#repo_issues>header span:first-of-type{font-weight:700;padding-top:.1em}#repo_issues>header .repo-issue-toggle{margin-left:auto;color:inherit;font-weight:700;text-decoration:none}#repo_issue_list{list-style:none;margin:0;padding:0 1.25em 1.25em;font-size:.85em;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}#repo_issue_list::-webkit-scrollbar{display:none}#repo_issue_list:empty:before{content:"No issues found";display:block;text-align:center;font-size:1.1em;color:#aaa;margin:1em 0 0}.repo-issue detail-box{display:flex;flex-direction:column;padding:1em 0;border-bottom:1px solid #ddd}.repo-issue detail-box>section{order:1}.repo-issue detail-box>section:empty+.repo-issue-title [detail-box-toggle]{display:none}.repo-issue-title{display:flex;align-items:center}.repo-issue-link{flex:1;margin:0 0 0 .5em}.repo-issue-number{height:1em;margin:0 .4em 0 0;padding:.3em .25em 0;border-radius:3px;font-weight:700;background:#eee;border:1px solid #ddd;text-align:center;line-height:1em}.repo-issue-number:before{content:"#";font-weight:400;margin:0 .1em 0 0}.repo-issue [detail-box-toggle]{margin:0 0 0 1em;opacity:.35;transition:opacity .4s}.repo-issue [detail-box-toggle]:hover,.repo-issue detail-box[open] [detail-box-toggle]{opacity:1}#toc{display:flex;flex-direction:column;width:25%;max-width:325px;min-width:275px;background:#eceff1}#toc header{color:var(--themed-element-text);background:var(--themed-element-bk);box-shadow:0 1px 3px 0 rgba(0,0,0,.3);border:var(--themed-element-border);border-top:none;border-left:none}#toc header [panel-toggle]{display:none;height:var(--header-height);line-height:var(--header-height);margin-left:auto;padding:0 1em;color:inherit;font-weight:700;text-decoration:none}#toc_list{flex:1;padding:1em .8em;overflow:auto}.toc{padding:0 0 1.75em;font-size:.85em}.toc,.toc ul{margin:0;list-style:none}.toc ul{padding:0 0 0 1em}.toc a{display:block;padding:.4em .3em .225em;text-decoration:none;border-radius:3px;color:#333}.toc a:before{color:#000;font-weight:700}.toc a:hover{text-shadow:0 1px 1px #fff;background:rgba(0,0,0,.1)}.toc>li a:before{counter-increment:toc1;content:counter(toc1) ".";padding:0 .4em 0 .2em}.toc>li>ul{counter-reset:toc2}.toc>li>ul>li a:before{counter-increment:toc2;content:counter(toc1) "." counter(toc2);padding:0 .45em 0 .2em}.toc>li>ul ul{counter-reset:toc3}.toc>li>ul ul li a:before{counter-increment:toc3;content:counter(toc1) "." counter(toc2) "." counter(toc3);padding:0 .5em 0 .2em}@media (min-width:900px){slide-panel{z-index:2}#slidepanels[open=sidebar]:before{opacity:0;transition:none;pointer-events:none}#slidepanels:before{z-index:1}#toc{transition:none;transform:translate3d(0,0,0);box-shadow:0 0 5px 1px rgba(0,0,0,.15) inset;z-index:0}}@media (max-width:900px){main{width:100%;min-width:auto;max-width:none;padding:.5em 1.25em 1.5em 1.25em}#header{margin:-.5em -1.25em 0 -1.25em}#toc header [panel-toggle]{display:block}#header #toc_toggle{display:flex}}@media (max-width:550px){td{font-size:.8em}}@keyframes display-show{0%{display:none;opacity:0}1%{display:block}100%{opacity:1}}@keyframes highlight{50%{background-color:#ff0}}article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::after{content:'';width:12px;height:12px;margin-left:4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:contain;display:inline-block}.btn,.no-xref-found-message{font-variant:small-caps;text-transform:uppercase}.no-xref-found-message{background:#f8c481!important;color:#03365f!important;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem}.powered-by,.snapshots{margin:0;padding:0;flex:none}.powered-by{text-align:center;font-size:.7em}.snapshots a{display:block;margin:.5em;padding:.5em .8em;border-radius:.25rem;background:#a9dde0;color:#03365f;text-decoration:none;font-size:1rem}.transcluded-xref-term{background:#a9dde03b!important;padding:.5em;margin:1em 0}.transclusion-heading{font-size:1.3em;font-weight:700;margin:1em 0 .5em}dl img{max-width:15px;vertical-align:middle}.meta-info{font-size:.8em}.meta-info span{background:#a9dde03b;display:inline-block;border:1px solid #ccc;border-radius:10px;padding:.3em;margin:0;height:1em;line-height:1em;vertical-align:middle}.meta-info span.commit-hash{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.loader{width:20px;height:20px;margin:auto;display:block;text-align:center;border:8px solid #ccc;border-top-color:#3498db;border-radius:50%;animation:spin 1s linear infinite}.loadertext{text-align:center;margin:.5em 0}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
15
+ :root{--base-theme-color:207,71%;--themed-element-bk:hsl(var(--base-theme-color), 40%);--themed-element-text:#fff;--themed-element-border:1px solid hsl(var(--base-theme-color), 26%);--themed-heading-text:hsl(var(--base-theme-color), 30%);--no-color:255,255,255;--faint-color:245,245,245;--dim-color:225,225,225;--low-color:200,200,200;--mid-color:100,100,100;--high-color:50,50,50;--full-color:0,0,0;--active-color:#3aaaff;--visited-color:rgb(188, 129, 255);--green-status:rgb(0, 123, 9);--light-green-status:rgb(0, 194, 13);--page-bk:rgb(var(--no-color));--page-text:rgb(var(--full-color));--page-text-hover:rgb(var(--full-color));--element-bk:rgb(var(--no-color));--element-bk-hover:rgba(var(--low-color), 0.5);--element-bk-transparent:rgba(var(--dim-color), 0.92);--element-border:rgba(var(--high-color), 0.4);--element-border-focus:rgb(var(--full-color), 0.75);--element-border-radius:3px;--element-shadow-low:0 1px 3px 0px rgba(0, 0, 0, 0.25);--element-shadow-mid:0 1px 3px 0px rgba(0, 0, 0, 0.35);--element-shadow-high:0 1px 5px 0px rgba(0, 0, 0, 0.45);--code-bk:#1a1e23;--input-bk:rgba(var(--dim-color), 0.6);--input-border:rgba(var(--high-color), 0.4);--header-height:48px;--header-bk:rgba(var(--low-color), 0.985);--header-text:rgb(var(--full-color));--header-border:rgba(var(--full-color), 0.1);--header-border-inverse:rgba(var(--no-color), 0.3);--text-shadow:0 1px 2px rgba(0, 0, 0, 0.8);--svg-size:2vw;--font-size:14px}:target{scroll-margin:calc(var(--header-height)/ .3) 0 0}body:not([hashscroll]) :target{animation:highlight 1.5s .25s ease}body{margin:0;padding:0;font-family:Heebo,san-serif;line-height:1.5em;widows:2;orphans:2;word-wrap:break-word;overflow-wrap:break-word;color:#000;word-spacing:1px;counter-reset:h2 toc1}h1{font-size:2em;font-weight:700;line-height:1.2em}h2{margin:1.5em 0 1em}blockquote{position:relative;padding:0;margin:1.75em .75em;color:rgb(var(--mid-color));background:rgb(var(--faint-color))}blockquote:after,blockquote:before{content:"“";position:absolute;top:.065em;left:.065em;font-size:3em;height:.34em;line-height:100%;color:rgb(var(--low-color))}blockquote:after{content:"”";top:auto;left:auto;bottom:.065em;right:.065em;text-align:center}blockquote>p{padding:.6em 1.8em .5em 1.8em}strong strong{font-size:.9em;color:#b30032;font-weight:400;text-transform:uppercase}main article>ol,main article>ul{padding:0 0 0 2em}main article h1,main article h2,main article h3,main article h4,main article h5,main article h6{color:var(--themed-heading-text)}main article h2,main article h3,main article h4{display:flex;font-weight:500}main article h2{counter-reset:h3 h4}main article h3{counter-reset:h4}main article h2:after{counter-increment:h2;content:counter(h2) ".";padding:0 .4em 0 .2em;order:-1}main article h3:after{counter-increment:h3;content:counter(h2) "." counter(h3);padding:0 .45em 0 .2em;order:-1}main article h4:after{counter-increment:h4;content:counter(h2) "." counter(h3) "." counter(h4);padding:0 .5em 0 .2em;order:-1}h1 .toc-anchor{display:none}.toc-anchor{margin:-.1em 0 0;font-size:.875em;color:inherit;text-decoration:none;opacity:.35;order:-1;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}pre{overflow:auto}code{padding:.085em .3em .1em;font-size:1.075em;color:#c7001c;vertical-align:middle;background:#f0f0f0;border-radius:4px}pre code{background:unset;padding:unset;border-radius:unset}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:1.25em;margin:-.11em .3em 0 0;border-radius:3px}ol,ul{margin:0;padding:0 0 0 1.2em}dl.terms-and-definitions-list{margin:0;padding:0}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:#f0f0f0;border:1px solid #ccc;padding:10px;border-radius:5px 5px 0 0}dl.terms-and-definitions-list>dd{margin:0;background-color:#f9f9f9;border:1px solid #ccc;border-top:none;padding:.5em 2em;border-bottom:none}dl.terms-and-definitions-list dd p{margin:0}dl.terms-and-definitions-list dd+dd{border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:2em}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 5px 5px;border-bottom:1px solid #ccc}main{box-sizing:border-box;float:right;width:75%;min-width:calc(100% - 325px);max-width:calc(100% - 275px);padding:.5em 2em 1.5em 2em;background:#fff;box-shadow:0 0 5px -1px rgba(0,0,0,.3)}table{display:block;width:-webkit-fill-available;width:fit-content;max-width:100%;margin:1.5em 0 1.75em;border-spacing:0;border-collapse:collapse;overflow-x:auto;word-wrap:normal;overflow-wrap:normal;hyphens:manual}thead tr th{color:var(--themed-element-text);background:var(--themed-element-bk);border:var(--themed-element-border);text-shadow:0 1px 1px rgba(0,0,0,.5)}tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}tr:nth-child(2n){background-color:#f0f0f0}tr th{font-weight:400;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}td,th{padding:9px 13px;border:1px solid #d8d8d8}tr td{border:1px solid #ccc;text-align:left;margin:0;padding:.55em .75em .55em}tr td :first-child,tr th :first-child{margin-top:0}tr td :last-child,tr th :last-child{margin-bottom:0}table pre[class*=language-]{border:none;border-radius:0}table pre[class*=language-]:before{display:none}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top;pointer-events:none}article p>img{max-width:100%;margin:0 auto}article li{margin-top:.4em}slide-panel>:not(header):not(footer){flex:1}:not(pre)>code[class*=language-],pre[class*=language-]{padding:.65em .8em .8em;background:var(--code-bk)}.tippy-box{box-shadow:var(--element-shadow-mid)}.tippy-box a{color:var(--active-color)}.tippy-box a:visited{color:var(--visited-color)}.tippy-content{padding:.55em .55em .5em}.tippy-content header{margin:0 0 .4em;padding:.15em .3em .1em;border-radius:2px;background:rgba(255,255,255,.1);text-shadow:0 1px rgba(0,0,0,.9)}.tippy-content table,.tippy-content tbody,.tippy-content td,.tippy-content tr{margin:0;padding:0;border:none;border-spacing:0;border-collapse:collapse;background:0 0!important;background-color:transparent!important}.tippy-content table{margin:0 .3em}.tippy-content td{font-size:.9em;padding:.2em 0 0}.tippy-content td:first-child{padding-right:.5em}a[path-0$="github.com"]:before{content:"\f09b";color:var(--page-text);margin:0 .25em 0 0;font-family:FontAwesome;text-decoration:none;display:inline-block;vertical-align:bottom}a[path-0$="github.com"][path-3=issues][path-4],a[path-0$="github.com"][path-3=projects],a[path-0$="github.com"][path-3=pull],a[path-0$="github.com"][path-3=releases]{text-decoration:none}a[path-0$="github.com"][path-3=issues][path-4] span,a[path-0$="github.com"][path-3=projects] span,a[path-0$="github.com"][path-3=pull] span,a[path-0$="github.com"][path-3=releases] span{display:none}a[path-0$="github.com"][path-3=issues][path-4]:after{content:"Issue #" attr(path-4)}a[path-0$="github.com"][path-3=pull]:after{content:"Pull Request #" attr(path-4)}a[path-0$="github.com"][path-3=releases][path-5]:after{content:"Release " attr(path-5)}a[path-0$="github.com"][path-3=projects]:after{content:"Project #" attr(path-4)}[issue-count]:after{content:"Issues (" 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}[panel-toggle]{cursor:pointer}.panel-header{display:flex;align-items:center;height:var(--header-height)}.panel-header>*{display:flex;height:100%;padding:.1em .8em 0;align-items:center}.slide-panel{width:calc(100% - 1em);max-width:475px;transition:transform .35s ease}.slide-panel[panel-open]{transform:translateX(0)}.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,san-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.mermaid{display:flex;align-items:center;justify-content:center;margin:1.5em 0 1.75em}.reference-list{margin:0;padding:0;list-style:none}.reference-list dd a,.reference-status{font-style:italic}.reference-status{color:var(--green-status)}.tippy-box .reference-status{color:var(--light-green-status)}code[class*=language-],pre,pre[class*=language-]{font-size:.9em;margin:1em 0 1.5em;border-radius:3px}.example code[class*=language-],.example pre,.example pre[class*=language-]{margin:0}#svg{display:none}#header{position:sticky;position:-webkit-sticky;padding:0;top:0;margin:-.5em -2em 0 -2em;background:rgba(255,255,255,.9);border-bottom:1px solid rgba(0,0,0,.175);box-shadow:0 1px 3px 1px rgba(0,0,0,.1);z-index:2}#logo{box-sizing:border-box;display:flex;align-items:center;height:100%;padding:.5em}#logo img{height:100%}#logo+span{margin-left:auto}#header #toc_toggle{display:none;padding:0 1em;border-right:1px solid rgba(0,0,0,.15)}#content{max-width:800px}#content h1:first-of-type{margin:1em 0 .5em}#content h1:first-of-type .markdownIt-Anchor{display:none}#repo_issues{width:calc(100% - 1.5em);max-width:450px;border-left:1px solid rgba(0,0,0,.15)}#repo_issues>header{background:#eee;border-bottom:1px solid #ddd}#repo_issues>header span:first-of-type{font-weight:700;padding-top:.1em}#repo_issues>header .repo-issue-toggle{margin-left:auto;color:inherit;font-weight:700;text-decoration:none}#repo_issue_list{list-style:none;margin:0;padding:0 1.25em 1.25em;font-size:.85em;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}#repo_issue_list::-webkit-scrollbar{display:none}#repo_issue_list:empty:before{content:"No issues found";display:block;text-align:center;font-size:1.1em;color:#aaa;margin:1em 0 0}.repo-issue detail-box{display:flex;flex-direction:column;padding:1em 0;border-bottom:1px solid #ddd}.repo-issue detail-box>section{order:1}.repo-issue detail-box>section:empty+.repo-issue-title [detail-box-toggle]{display:none}.repo-issue-title{display:flex;align-items:center}.repo-issue-link{flex:1;margin:0 0 0 .5em}.repo-issue-number{height:1em;margin:0 .4em 0 0;padding:.3em .25em 0;border-radius:3px;font-weight:700;background:#eee;border:1px solid #ddd;text-align:center;line-height:1em}.repo-issue-number:before{content:"#";font-weight:400;margin:0 .1em 0 0}.repo-issue [detail-box-toggle]{margin:0 0 0 1em;opacity:.35;transition:opacity .4s}.repo-issue [detail-box-toggle]:hover,.repo-issue detail-box[open] [detail-box-toggle]{opacity:1}#toc{display:flex;flex-direction:column;width:25%;max-width:325px;min-width:275px;background:#eceff1}#toc header{color:var(--themed-element-text);background:var(--themed-element-bk);box-shadow:0 1px 3px 0 rgba(0,0,0,.3);border:var(--themed-element-border);border-top:none;border-left:none}#toc header [panel-toggle]{display:none;height:var(--header-height);line-height:var(--header-height);margin-left:auto;padding:0 1em;color:inherit;font-weight:700;text-decoration:none}#toc_list{flex:1;padding:1em .8em;overflow:auto}.toc{padding:0 0 1.75em;font-size:.85em}.toc,.toc ul{margin:0;list-style:none}.toc ul{padding:0 0 0 1em}.toc a{display:block;padding:.4em .3em .225em;text-decoration:none;border-radius:3px;color:#333}.toc a:before{color:#000;font-weight:700}.toc a:hover{text-shadow:0 1px 1px #fff;background:rgba(0,0,0,.1)}.toc>li a:before{counter-increment:toc1;content:counter(toc1) ".";padding:0 .4em 0 .2em}.toc>li>ul{counter-reset:toc2}.toc>li>ul>li a:before{counter-increment:toc2;content:counter(toc1) "." counter(toc2);padding:0 .45em 0 .2em}.toc>li>ul ul{counter-reset:toc3}.toc>li>ul ul li a:before{counter-increment:toc3;content:counter(toc1) "." counter(toc2) "." counter(toc3);padding:0 .5em 0 .2em}@media (min-width:900px){slide-panel{z-index:2}#slidepanels[open=sidebar]:before{opacity:0;transition:none;pointer-events:none}#slidepanels:before{z-index:1}#toc{transition:none;transform:translate3d(0,0,0);box-shadow:0 0 5px 1px rgba(0,0,0,.15) inset;z-index:0}}@media (max-width:900px){main{width:100%;min-width:auto;max-width:none;padding:.5em 1.25em 1.5em 1.25em}#header{margin:-.5em -1.25em 0 -1.25em}#toc header [panel-toggle]{display:block}#header #toc_toggle{display:flex}}@media (max-width:550px){td{font-size:.8em}}@keyframes display-show{0%{display:none;opacity:0}1%{display:block}100%{opacity:1}}@keyframes highlight{50%{background-color:#ff0}}article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::after{content:'';width:12px;height:12px;margin-left:4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:contain;display:inline-block}.btn,.no-xref-found-message{font-variant:small-caps;text-transform:uppercase}.no-xref-found-message{background:#f8c481!important;color:#03365f!important;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem}.powered-by,.snapshots{margin:0;padding:0;flex:none}.powered-by{text-align:center;font-size:.7em}.snapshots a{display:block;margin:.5em;padding:.5em .8em;border-radius:.25rem;background:#a9dde0;color:#03365f;text-decoration:none;font-size:1rem}.transcluded-xref-term{background:#a9dde03b!important;padding:.5em;margin:1em 0}.transclusion-heading{font-size:1.3em;font-weight:700;margin:1em 0 .5em}dl img{max-width:15px;vertical-align:middle}dd table{margin:0;font-size:.9em}dd table th{display:none}dd table td,dd table th{padding:.2em}.loader{width:20px;height:20px;margin:auto;display:block;text-align:center;border:8px solid #ccc;border-top-color:#3498db;border-radius:50%;animation:spin 1s linear infinite}.loadertext{text-align:center;margin:.5em 0}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
@@ -0,0 +1,20 @@
1
+ /*
2
+ Author: Kor Dwarshuis, kor@dwarshuis.com
3
+ Created: 2025-02-16
4
+ Description: Make the meta-info tables collapsible
5
+ */
6
+
7
+ .contains-table>.meta-info-content-wrapper {
8
+ max-height: 100px;
9
+ transition: max-height 0.3s ease-out;
10
+ /* This should be higher than the tallest content */
11
+ }
12
+
13
+ .contains-table.collapsed>.meta-info-content-wrapper {
14
+ padding-top: 0;
15
+ padding-bottom: 0;
16
+
17
+ overflow: hidden;
18
+ transition: max-height 0.3s ease-out;
19
+ max-height: 0;
20
+ }
@@ -1046,29 +1046,21 @@ dl img {
1046
1046
  vertical-align: middle;
1047
1047
  }
1048
1048
 
1049
- .meta-info {
1050
- font-size: 0.8em;
1051
- }
1052
1049
 
1053
- .meta-info span {
1054
- background: #a9dde03b;
1055
- display: inline-block;
1056
- border: 1px solid #ccc;
1057
- border-radius: 10px;
1058
- padding: 0.3em;
1050
+ dd table {
1059
1051
  margin: 0;
1060
- height: 1em;
1061
- line-height: 1em;
1062
- vertical-align: middle;
1052
+ font-size: 0.9em;
1063
1053
  }
1064
1054
 
1065
- .meta-info span.commit-hash {
1066
- white-space: nowrap;
1067
- overflow: hidden;
1068
- text-overflow: ellipsis;
1069
- max-width: 150px;
1055
+ dd table th {
1056
+ display: none;
1070
1057
  }
1071
1058
 
1059
+ dd table td, dd table th {
1060
+ padding: 0.2em;
1061
+ }
1062
+
1063
+
1072
1064
  /* End Transclusions */
1073
1065
 
1074
1066
 
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @file This file creates a collapsible meta info section for each term definition on the page. It is used to hide meta information about a term definition by default and show it when the user clicks the button.
3
+ * @author Kor Dwarshuis
4
+ * @version 0.0.1
5
+ * @since 2025-02-16
6
+ */
7
+
8
+ // Function to create the toggle button
9
+ function createToggleButton(element) {
10
+ const toggleButton = document.createElement('button');
11
+ toggleButton.classList.add('meta-info-toggle-button', 'btn');
12
+ toggleButton.textContent = '🔍';
13
+ toggleButton.title = 'Meta info';
14
+
15
+ // Add event listener to the button
16
+ toggleButton.addEventListener('click', function () {
17
+ element.classList.toggle('collapsed');
18
+ if (element.classList.contains('collapsed')) {
19
+ this.textContent = '🔍';
20
+ } else {
21
+ this.textContent = '🔍';
22
+ }
23
+ });
24
+
25
+ // Find the closest <dt> sibling and insert the button inside it
26
+ let dtElement = element.previousElementSibling;
27
+ while (dtElement && dtElement.tagName !== 'DT') {
28
+ dtElement = dtElement.previousElementSibling;
29
+ }
30
+ if (dtElement) {
31
+ dtElement.appendChild(toggleButton);
32
+ } else {
33
+ // Fallback to inserting at the top right of the element if no <dt> is found
34
+ element.insertBefore(toggleButton, element.firstChild);
35
+ }
36
+ }
37
+
38
+ // Find all elements with class 'collapsible' and make them collapsible
39
+ document.addEventListener('DOMContentLoaded', function () {
40
+ const collapsibles = document.querySelectorAll('.contains-table');
41
+
42
+ collapsibles.forEach(function (element) {
43
+ // Wrap content (excluding button) in a div for easy toggling
44
+ const wrapper = document.createElement('div');
45
+ wrapper.classList.add('meta-info-content-wrapper');
46
+
47
+ // Move all children except potential existing buttons into wrapper
48
+ while (element.firstChild && element.firstChild !== element.querySelector('.meta-info-toggle-button')) {
49
+ wrapper.appendChild(element.firstChild);
50
+ }
51
+
52
+ if (!element.querySelector('.meta-info-toggle-button')) { // Check if already has a button from previous runs or other scripts
53
+ createToggleButton(element);
54
+ }
55
+
56
+ element.appendChild(wrapper);
57
+
58
+ // Optionally collapse by default on load (remove this line or modify as needed)
59
+ element.classList.add('collapsed');
60
+ });
61
+ });
@@ -21,7 +21,7 @@ function helpButtons() {
21
21
  newElement.title = 'Click to see the explanation of the buttons at the documentation website, in a new tab.';
22
22
  newElement.target = '_blank';
23
23
  newElement.rel = 'noopener noreferrer';
24
- newElement.href = 'https://trustoverip.github.io/spec-up-t-website/docs/general/specification#explanation-buttons';
24
+ newElement.href = 'https://trustoverip.github.io/spec-up-t-website/docs/user-interface-overview/specification#explanation-of-the-buttons-in-the-specification';
25
25
 
26
26
  function addElementAfterLastChild(newElement) {
27
27
  const elements = document.querySelectorAll('#content dl dt');
@@ -85,7 +85,7 @@ function fetchCommitHashes() {
85
85
 
86
86
  // B: Debounced “GitHub API rate limit exceeded” error message
87
87
  const debouncedError = debounce(() => {
88
- notyf.error('GitHub API rate limit exceeded. See <a target="_blank" rel="noopener" href="https://trustoverip.github.io/spec-up-t-website/docs/github-token/">documentation</a> for more info.');
88
+ notyf.error('GitHub API rate limit exceeded. See <a target="_blank" rel="noopener" href="https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token">documentation</a> for more info.');
89
89
  }, 3000); // Delay in milliseconds
90
90
 
91
91
  // Fetch the content of a term-file from GitHub
@@ -100,13 +100,13 @@ function fetchCommitHashes() {
100
100
  .then(response => {
101
101
  if (response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0') {
102
102
  const resetTime = new Date(response.headers.get('X-RateLimit-Reset') * 1000);
103
- console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.` + "\n");
103
+ console.error(`\n Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.` + "\n");
104
104
 
105
105
  // Call the debounced error function
106
106
  debouncedError();
107
107
  return true;
108
108
  } else {
109
- console.log(`\n SPEC-UP-T: Github API rate limit: ${response.headers.get('X-RateLimit-Remaining')} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.` + "\n");
109
+ console.log(`\nℹ️ Github API rate limit: ${response.headers.get('X-RateLimit-Remaining')} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.` + "\n");
110
110
  }
111
111
 
112
112
  return response.json();
@@ -174,12 +174,12 @@ function fetchCommitHashes() {
174
174
 
175
175
  if (response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0') {
176
176
  const resetTime = new Date(response.headers.get('X-RateLimit-Reset') * 1000);
177
- console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.` + "\n");
177
+ console.error(`❌ Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.` + "\n");
178
178
 
179
179
  debouncedError();
180
180
  return true;
181
181
  } else {
182
- console.log(`\n SPEC-UP-T: Github API rate limit: ${response.headers.get('X-RateLimit-Remaining')} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.` + "\n");
182
+ console.log(`ℹ️ Github API rate limit: ${response.headers.get('X-RateLimit-Remaining')} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.` + "\n");
183
183
  }
184
184
 
185
185
  const data = await response.json();
package/index.js CHANGED
@@ -17,8 +17,8 @@ module.exports = async function (options = {}) {
17
17
  const { runJsonKeyValidatorSync } = require('./src/json-key-validator.js');
18
18
  runJsonKeyValidatorSync();
19
19
 
20
- // const { createTermRelations } = require('./src/create-term-relations.js');
21
- // createTermRelations();
20
+ // const { createTermRelations } = require('./src/create-term-relations.js');
21
+ // createTermRelations();
22
22
 
23
23
  const { createTermIndex } = require('./src/create-term-index.js');
24
24
  createTermIndex();
@@ -43,20 +43,20 @@ module.exports = async function (options = {}) {
43
43
  let references = [];
44
44
  let definitions = [];
45
45
 
46
- const katexRules = ['math_block', 'math_inline'];
47
- const replacerRegex = /\[\[\s*([^\s\[\]:]+):?\s*([^\]\n]+)?\]\]/img;
48
- const replacerArgsRegex = /\s*,+\s*/;
49
- const replacers = [
50
- {
51
- test: 'insert',
52
- transform: function (path) {
53
- if (!path) return '';
54
- return fs.readFileSync(path, 'utf8');
46
+ const katexRules = ['math_block', 'math_inline'];
47
+ const replacerRegex = /\[\[\s*([^\s\[\]:]+):?\s*([^\]\n]+)?\]\]/img;
48
+ const replacerArgsRegex = /\s*,+\s*/;
49
+ const replacers = [
50
+ {
51
+ test: 'insert',
52
+ transform: function (path) {
53
+ if (!path) return '';
54
+ return fs.readFileSync(path, 'utf8');
55
+ }
55
56
  }
56
- }
57
- ];
58
-
59
- prepareTref(path.join(config.specs[0].spec_directory, config.specs[0].spec_terms_directory));
57
+ ];
58
+
59
+ prepareTref(path.join(config.specs[0].spec_directory, config.specs[0].spec_terms_directory));
60
60
 
61
61
  // Synchronously process markdown files
62
62
  fixMarkdownFiles(path.join(config.specs[0].spec_directory, config.specs[0].spec_terms_directory));
@@ -65,10 +65,10 @@ module.exports = async function (options = {}) {
65
65
  // Test if xtrefs-data.js exists, else make it an empty string
66
66
  const inputPath = path.join('output', 'xtrefs-data.js');
67
67
 
68
- let xtrefsData = '';
69
- if (fs.existsSync(inputPath)) {
70
- xtrefsData = '<script>' + fs.readFileSync(inputPath, 'utf8') + '</script>';
71
- }
68
+ let xtrefsData = '';
69
+ if (fs.existsSync(inputPath)) {
70
+ xtrefsData = '<script>' + fs.readFileSync(inputPath, 'utf8') + '</script>';
71
+ }
72
72
 
73
73
  return xtrefsData;
74
74
  }
@@ -86,21 +86,21 @@ module.exports = async function (options = {}) {
86
86
  return path.trim().replace(/\/$/g, '') + '/';
87
87
  }
88
88
 
89
- function renderRefGroup(type) {
90
- let group = specGroups[type];
91
- if (!group) return '';
92
- let html = Object.keys(group).sort().reduce((html, name) => {
93
- let ref = group[name];
94
- return html += `
89
+ function renderRefGroup(type) {
90
+ let group = specGroups[type];
91
+ if (!group) return '';
92
+ let html = Object.keys(group).sort().reduce((html, name) => {
93
+ let ref = group[name];
94
+ return html += `
95
95
  <dt id="ref:${name}">${name}</dt>
96
96
  <dd>
97
97
  <cite><a href="${ref.href}">${ref.title}</a></cite>.
98
98
  ${ref.authors.join('; ')}; ${ref.rawDate}. <span class="reference-status">Status: ${ref.status}</span>.
99
99
  </dd>
100
100
  `;
101
- }, '<dl class="reference-list">');
102
- return `\n${html}\n</dl>\n`;
103
- }
101
+ }, '<dl class="reference-list">');
102
+ return `\n${html}\n</dl>\n`;
103
+ }
104
104
 
105
105
  function findKatexDist() {
106
106
  const relpath = "node_modules/katex/dist";
@@ -116,74 +116,6 @@ module.exports = async function (options = {}) {
116
116
  throw Error("katex distribution could not be located");
117
117
  }
118
118
 
119
- // Custom plugin to add class to <dl> and the last <dd> in each series after a <dt>
120
- function addClassToDefinitionList(md) {
121
- const originalRender = md.renderer.rules.dl_open || function (tokens, idx, options, env, self) {
122
- return self.renderToken(tokens, idx, options);
123
- };
124
-
125
- // Variable to keep track of whether the class has been added to the first <dl> after the target HTML
126
- let classAdded = false;
127
-
128
- md.renderer.rules.dl_open = function (tokens, idx, options, env, self) {
129
-
130
- const targetHtml = 'terminology-section-start-h7vc6omi2hr2880';
131
- let targetIndex = -1;
132
-
133
- // Find the index of the target HTML
134
- for (let i = 0; i < tokens.length; i++) {
135
- if (tokens[i].content && tokens[i].content.includes(targetHtml)) {
136
- targetIndex = i;
137
- break;
138
- }
139
- }
140
-
141
- // Add class to the first <dl> only if it comes after the target HTML
142
- if (targetIndex !== -1 && idx > targetIndex && !classAdded) {
143
- tokens[idx].attrPush(['class', 'terms-and-definitions-list']);
144
- classAdded = true;
145
- }
146
-
147
- let lastDdIndex = -1;
148
-
149
- for (let i = idx + 1; i < tokens.length; i++) {
150
- if (tokens[i].type === 'dl_close') {
151
- // Add class to the last <dd> before closing <dl>
152
- if (lastDdIndex !== -1) {
153
- const ddToken = tokens[lastDdIndex];
154
- const classIndex = ddToken.attrIndex('class');
155
- if (classIndex < 0) {
156
- ddToken.attrPush(['class', 'last-dd']);
157
- } else {
158
- ddToken.attrs[classIndex][1] += ' last-dd';
159
- }
160
- }
161
- break;
162
- }
163
-
164
- if (tokens[i].type === 'dt_open') {
165
- // Add class to the last <dd> before a new <dt>
166
- if (lastDdIndex !== -1) {
167
- const ddToken = tokens[lastDdIndex];
168
- const classIndex = ddToken.attrIndex('class');
169
- if (classIndex < 0) {
170
- ddToken.attrPush(['class', 'last-dd']);
171
- } else {
172
- ddToken.attrs[classIndex][1] += ' last-dd';
173
- }
174
- lastDdIndex = -1; // Reset for the next series
175
- }
176
- }
177
-
178
- if (tokens[i].type === 'dd_open') {
179
- lastDdIndex = i;
180
- }
181
- }
182
-
183
- return originalRender(tokens, idx, options, env, self);
184
- };
185
- }
186
-
187
119
  try {
188
120
 
189
121
  var toc;
@@ -201,11 +133,11 @@ module.exports = async function (options = {}) {
201
133
  const specCorpus = fs.readJsonSync(modulePath + '/assets/compiled/refs.json');
202
134
  const containers = require('markdown-it-container');
203
135
 
204
- /*
205
- `const md` is assigned an instance of the markdown-it parser configured with various plugins and extensions. This instance (md) is intended to be used later to parse and render Markdown strings.
206
-
207
- The md function (which is an instance of the markdown-it parser) takes a Markdown string as its primary argument. It is called elsewhere as follows: `md.render(doc)`
208
- */
136
+ /*
137
+ `const md` is assigned an instance of the markdown-it parser configured with various plugins and extensions. This instance (md) is intended to be used later to parse and render Markdown strings.
138
+
139
+ The md function (which is an instance of the markdown-it parser) takes a Markdown string as its primary argument. It is called elsewhere as follows: `md.render(doc)`
140
+ */
209
141
  const md = require('markdown-it')({
210
142
  html: true,
211
143
  linkify: true,
@@ -310,15 +242,11 @@ module.exports = async function (options = {}) {
310
242
  })
311
243
  .use(require('@traptitech/markdown-it-katex'))
312
244
 
313
-
314
-
315
- md.use(addClassToDefinitionList);
316
-
317
245
  async function render(spec, assets) {
318
246
  try {
319
247
  noticeTitles = {};
320
248
  specGroups = {};
321
- console.log('\n SPEC-UP-T: Rendering: ' + spec.title + "\n");
249
+ console.log('\nℹ️ Rendering: ' + spec.title + "\n");
322
250
 
323
251
  function interpolate(template, variables) {
324
252
  return template.replace(/\${(.*?)}/g, (match, p1) => variables[p1.trim()]);
@@ -341,14 +269,14 @@ module.exports = async function (options = {}) {
341
269
  }
342
270
 
343
271
  let doc = docs.join("\n");
344
-
345
- // `doc` is markdown
346
- doc = applyReplacers(doc);
347
-
348
- md[spec.katex ? "enable" : "disable"](katexRules);
349
-
350
- // `render` is the rendered HTML
351
- const render = md.render(doc);
272
+
273
+ // `doc` is markdown
274
+ doc = applyReplacers(doc);
275
+
276
+ md[spec.katex ? "enable" : "disable"](katexRules);
277
+
278
+ // `render` is the rendered HTML
279
+ const render = md.render(doc);
352
280
 
353
281
  const templateInterpolated = interpolate(template, {
354
282
  title: spec.title,
@@ -386,7 +314,7 @@ module.exports = async function (options = {}) {
386
314
  });
387
315
  }
388
316
  catch (e) {
389
- console.error("\n SPEC-UP-T: " + e + "\n");
317
+ console.error("\n " + e + "\n");
390
318
  }
391
319
  }
392
320
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-up-t",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
5
5
  "main": "./index",
6
6
  "repository": {
@@ -11,6 +11,7 @@
11
11
  "assets/css/backToTop.css",
12
12
  "assets/css/notyf.css",
13
13
  "assets/css/collapse-definitions.css",
14
+ "assets/css/collapse-meta-info.css",
14
15
  "assets/css/modal.css",
15
16
  "assets/css/create-alphabet-index.css",
16
17
  "assets/css/pdf-download.css",
@@ -46,6 +47,7 @@
46
47
  "assets/js/help-buttons.js",
47
48
  "assets/js/create-alphabet-index.js",
48
49
  "assets/js/collapse-definitions.js",
50
+ "assets/js/collapse-meta-info.js",
49
51
  "assets/js/add-href-to-snapshot-link.js",
50
52
  "assets/js/index.js",
51
53
  "assets/js/css-helper.js"
@@ -20,22 +20,22 @@ function collectExternalReferences(options = {}) {
20
20
  const GITHUB_API_TOKEN = process.env.GITHUB_API_TOKEN;
21
21
 
22
22
  const explanationPAT =
23
- `\n SPEC-UP-T: No GitHub Personal Access Token (PAT) was found.
23
+ `❌ No GitHub Personal Access Token (PAT) was found.
24
24
 
25
- GitHub requires you to set up a PAT to retrieve external references.
25
+ GitHub requires you to set up a PAT to retrieve external references.
26
26
 
27
- There is no point in continuing without a PAT, so we stop here.
27
+ There is no point in continuing without a PAT, so we stop here.
28
28
 
29
- Find instructions on how to get a PAT at https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token
29
+ Find instructions on how to get a PAT at https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token
30
30
 
31
31
  `;
32
32
 
33
33
  const explanationNoExternalReferences =
34
- `\n SPEC-UP-T: No external references were found in the specs.json file.
34
+ `\n No external references were found in the specs.json file.
35
35
 
36
- There is no point in continuing without external references, so we stop here.
36
+ There is no point in continuing without external references, so we stop here.
37
37
 
38
- Please add external references to the specs.json file that you will find at the root of your project.
38
+ Please add external references to the specs.json file that you will find at the root of your project.
39
39
 
40
40
  `;
41
41
 
@@ -45,11 +45,11 @@ Please add external references to the specs.json file that you will find at the
45
45
  // Do not run the script if the GitHub API token is not set
46
46
  if (!GITHUB_API_TOKEN) {
47
47
  console.log(explanationPAT);
48
- const userInput = readlineSync.question('Press any key');
48
+ const userInput = readlineSync.question('ℹ️ Press any key');
49
49
 
50
50
  // React to user pressing any key
51
51
  if (userInput.trim() !== '') {
52
- console.log('Stopping...');
52
+ console.log('ℹ️ Stopping...');
53
53
  return;
54
54
  }
55
55
  }
@@ -61,7 +61,7 @@ Please add external references to the specs.json file that you will find at the
61
61
 
62
62
  // React to user pressing any key
63
63
  if (userInput.trim() !== '') {
64
- console.log('Stopping...');
64
+ console.log('ℹ️ Stopping...');
65
65
  return;
66
66
  }
67
67
  } else {
@@ -74,10 +74,11 @@ Please add external references to the specs.json file that you will find at the
74
74
 
75
75
  // Check if the URLs for the external specs repositories are valid, and prompt the user to abort if they are not.
76
76
  externalSpecsRepos.forEach(repo => {
77
- doesUrlExist(repo.url, repo.terms_dir).then(exists => {
77
+ doesUrlExist(repo.url).then(exists => {
78
78
  if (!exists) {
79
79
  const userInput = readlineSync.question(
80
- ` SPEC-UP-T: This external reference is not a valid URL:
80
+ `❌ This external reference is not a valid URL:
81
+
81
82
  Repository: ${repo.url},
82
83
 
83
84
  Terms directory: ${repo.terms_dir}
@@ -86,12 +87,12 @@ Please add external references to the specs.json file that you will find at the
86
87
 
87
88
  Do you want to stop? (yes/no): `);
88
89
  if (userInput.toLowerCase() === 'yes' || userInput.toLowerCase() === 'y') {
89
- console.log('Stopping...');
90
+ console.log('ℹ️ Stopping...');
90
91
  process.exit(1);
91
92
  }
92
93
  }
93
94
  }).catch(error => {
94
- console.error('\n SPEC-UP-T:Error checking URL existence:', error);
95
+ console.error('Error checking URL existence:', error);
95
96
  });
96
97
  });
97
98
 
@@ -118,7 +119,7 @@ Please add external references to the specs.json file that you will find at the
118
119
  // Function to extend xtref objects with additional information, such as repository URL and directory information.
119
120
  function extendXTrefs(config, xtrefs) {
120
121
  if (config.specs[0].external_specs_repos) {
121
- console.log("\n SPEC-UP-T: PLEASE NOTE: Your specs.json file is outdated (not your fault, we changed something). Use this one: https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/specs.json or e-mail kor@dwarshuis.com for help. \n");
122
+ console.log("ℹ️ PLEASE NOTE: Your specs.json file is outdated (not your fault, we changed something). Use this one: https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/specs.json or e-mail kor@dwarshuis.com for help. \n");
122
123
  return;
123
124
  }
124
125
 
@@ -5,12 +5,12 @@ function checkRateLimit(response) {
5
5
 
6
6
  if (response.status === 403 && remaining === '0') {
7
7
  const resetTime = new Date(reset * 1000);
8
- console.error(`\n SPEC-UP-T: Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`);
8
+ console.error(`❌ Github API rate limit exceeded. Try again after ${resetTime}. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.\n`);
9
9
  return true;
10
10
  } else if (remaining !== null) {
11
- console.log(`\n SPEC-UP-T: Github API rate limit: ${remaining} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/github-token/ for more info.\n`);
11
+ console.log(`ℹ️ Github API rate limit: ${remaining} requests remaining. See https://trustoverip.github.io/spec-up-t-website/docs/getting-started/github-token for more info.\n`);
12
12
  } else {
13
- console.warn(`\n SPEC-UP-T: Unable to determine rate limit status. Check your GitHub API token and network connection.\n`);
13
+ console.warn(`ℹ️ Unable to determine rate limit status. Check your GitHub API token and network connection.\n`);
14
14
  }
15
15
  return false;
16
16
  }
@@ -30,11 +30,11 @@ async function processXTrefsData(allXTrefs, GITHUB_API_TOKEN, outputPathJSON, ou
30
30
  xtref.commitHash = item.sha;
31
31
  xtref.content = item.content;
32
32
  xtref.avatarUrl = item.repository.owner.avatar_url;
33
- console.log(`\n SPEC-UP-T: Match found for term: ${xtref.term} in ${xtref.externalSpec};`);
33
+ console.log(`✅ Match found for term: ${xtref.term} in ${xtref.externalSpec};`);
34
34
  } else {
35
35
  xtref.commitHash = "not found";
36
36
  xtref.content = "This term was not found in the external repository.";
37
- console.log(`\n SPEC-UP-T: No match found for term: ${xtref.term} in ${xtref.externalSpec};`);
37
+ console.log(`ℹ️ No match found for term: ${xtref.term} in ${xtref.externalSpec};`);
38
38
  }
39
39
  }
40
40
 
@@ -6,7 +6,7 @@ function setupFetchHeaders(GITHUB_API_TOKEN) {
6
6
  if (GITHUB_API_TOKEN) {
7
7
  fetchHeaders['Authorization'] = `token ${GITHUB_API_TOKEN}`;
8
8
  } else {
9
- console.log('\n SPEC-UP-T: There is no GitHub token set up. Therefore, you are more likely to be at your limit of GitHub API requests. If you run into the limit, create a token and search the documentation on this topic.\n');
9
+ console.log('ℹ️ There is no GitHub token set up. Therefore, you are more likely to be at your limit of GitHub API requests. If you run into the limit, create a token and search the documentation on this topic.\n');
10
10
  }
11
11
 
12
12
  return fetchHeaders;
package/src/create-pdf.js CHANGED
@@ -197,8 +197,8 @@ const pdfLib = require('pdf-lib');
197
197
  const optimizedPdfBytes = await pdfDoc.save();
198
198
  fs.writeFileSync('docs/index.pdf', optimizedPdfBytes);
199
199
 
200
- console.log('\n SPEC-UP-T: PDF generated successfully! Find the PDF in the same directory as the index.html file.' + "\n");
200
+ console.log(' PDF generated successfully! Find the PDF in the same directory as the index.html file.' + "\n");
201
201
  } catch (error) {
202
- console.error('SPEC-UP-T: Error generating PDF:', error + "\n");
202
+ console.error(' Error generating PDF:', error + "\n");
203
203
  }
204
204
  })();
@@ -33,7 +33,7 @@ function createTermIndex() {
33
33
 
34
34
  fs.writeJsonSync(outputPathJSON, filePaths, { spaces: 2 });
35
35
 
36
- console.log(`\n SPEC-UP-T: The new terms were added. All done.` + "\n");
36
+ console.log(`✅ The new terms were added. All done.` + "\n");
37
37
  }
38
38
 
39
39
  module.exports = {
@@ -71,9 +71,9 @@ function createVersionsIndex(outputPath) {
71
71
  const indexPath = path.join(versionsDir, 'index.html');
72
72
  fs.writeFile(indexPath, htmlContent, (err) => {
73
73
  if (err) {
74
- console.error(`\n SPEC-UP-T: Error writing index file: ${err}\n`);
74
+ console.error(`❌ Error writing index file: ${err}\n`);
75
75
  } else {
76
- console.log(`\n SPEC-UP-T: Index file created at ${indexPath}\n`);
76
+ console.log(`✅ Index file created at ${indexPath}\n`);
77
77
  }
78
78
  });
79
79
  }
@@ -77,12 +77,12 @@ function fixMarkdownFiles(directory) {
77
77
  fs.writeFileSync(itemPath, data, 'utf8');
78
78
  }
79
79
  } catch (err) {
80
- console.error(`\n SPEC-UP-T: Error while trying to fix the markdown in file ${item.name}: ${err}` + "\n");
80
+ console.error(`❌ Error while trying to fix the markdown in file ${item.name}: ${err}` + "\n");
81
81
  }
82
82
  }
83
83
  });
84
84
  } catch (err) {
85
- console.error(`\n SPEC-UP-T: Error reading directory: ${err}` + "\n");
85
+ console.error(`❌ Error reading directory: ${err}` + "\n");
86
86
  }
87
87
  }
88
88
 
package/src/freeze.js CHANGED
@@ -87,4 +87,4 @@ const destFile = path.join(newVersionDir, 'index.html');
87
87
  fs.copyFileSync(sourceFile, destFile);
88
88
 
89
89
  // Log a message indicating the file has been copied
90
- console.log(`\n SPEC-UP-T: Created a freezed specification version in ${destFile}\n`);
90
+ console.log(`✅ Created a freezed specification version in ${destFile}\n`);
@@ -27,7 +27,7 @@ function handle_choice() {
27
27
  echo " Goodbye! You chose to exit."
28
28
  echo -e " ************************************\n\n"
29
29
  fi
30
- echo -e "\n\n\n SPEC-UP-T: Type 'npm run menu' to return to the main menu.\n"
30
+ echo -e "\n\n\nℹ️ Type 'npm run menu' to return to the main menu.\n"
31
31
  }
32
32
 
33
33
  # Function to display the introduction text
@@ -34,7 +34,7 @@ function checkKeysSync(object, expectedKeys, parentKey = '') {
34
34
  } else if (typeof object === 'object') {
35
35
  // If the key is missing from the object, log an error
36
36
  if (!(key in object)) {
37
- console.error(`\n SPEC-UP-T: Error: Missing key '${key}' in ${parentKey}\n We cannot guarantee that Spec-Up-T will work properly.\n Here is an example specs.json file:\n https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/specs.json` + "\n");
37
+ console.error(`❌ Error: Missing key '${key}' in ${parentKey}\n We cannot guarantee that Spec-Up-T will work properly.\n Here is an example specs.json file:\n https://github.com/trustoverip/spec-up-t-starter-pack/blob/main/spec-up-t-boilerplate/specs.json` + "\n");
38
38
  errorFound = true;
39
39
  pauseForEnterSync(); // Pause synchronously to allow user to acknowledge the error
40
40
  }
@@ -85,7 +85,7 @@ function runJsonKeyValidatorSync() {
85
85
 
86
86
  // Iterate over each spec entry in the specs array from the JSON file
87
87
  for (let [index, spec] of data.specs.entries()) {
88
- console.log(`\n SPEC-UP-T: Checking spec #${index + 1}` + "\n");
88
+ console.log(`ℹ️ Checking spec #${index + 1}` + "\n");
89
89
 
90
90
  // Check for keys defined in expectedKeys.specs
91
91
  checkKeysSync(spec, expectedKeys.specs, `specs[${index}]`);
@@ -108,7 +108,7 @@ function runJsonKeyValidatorSync() {
108
108
 
109
109
  // If no errors were found, print a success message
110
110
  if (!errorFound) {
111
- console.log('\n SPEC-UP-T: All keys are present. No errors found. Continuing…' + "\n");
111
+ console.log(' All keys are present. No errors found. Continuing…' + "\n");
112
112
  }
113
113
  }
114
114
 
@@ -5,9 +5,9 @@ const openString = '['.repeat(levels);
5
5
  const closeString = ']'.repeat(levels);
6
6
  const contentRegex = /\s*([^\s\[\]:]+):?\s*([^\]\n]+)?/i;
7
7
 
8
- module.exports = function(md, templates = {}) {
8
+ module.exports = function (md, templates = {}) {
9
9
 
10
- md.inline.ruler.after('emphasis', 'templates', function templates_ruler(state, silent) {
10
+ md.inline.ruler.after('emphasis', 'templates', function templates_ruler(state, silent) {
11
11
 
12
12
  var start = state.pos;
13
13
  let prefix = state.src.slice(start, start + levels);
@@ -38,7 +38,7 @@ module.exports = function(md, templates = {}) {
38
38
  return false;
39
39
  });
40
40
 
41
- md.renderer.rules.template = function(tokens, idx, options, env, renderer) {
41
+ md.renderer.rules.template = function (tokens, idx, options, env, renderer) {
42
42
  let token = tokens[idx];
43
43
  let template = token.info.template;
44
44
  if (template.render) {
@@ -48,7 +48,7 @@ module.exports = function(md, templates = {}) {
48
48
  }
49
49
 
50
50
  let pathSegmentRegex = /(?:http[s]*:\/\/([^\/]*)|(?:\/([^\/?]*)))/g;
51
- md.renderer.rules.link_open = function(tokens, idx, options, env, renderer) {
51
+ md.renderer.rules.link_open = function (tokens, idx, options, env, renderer) {
52
52
  let token = tokens[idx];
53
53
  let attrs = token.attrs.reduce((str, attr) => {
54
54
  let name = attr[0];
@@ -65,8 +65,103 @@ module.exports = function(md, templates = {}) {
65
65
  return token.markup === 'linkify' ? anchor + '<span>' : anchor;
66
66
  }
67
67
 
68
- md.renderer.rules.link_close = function(tokens, idx, options, env, renderer) {
68
+ md.renderer.rules.link_close = function (tokens, idx, options, env, renderer) {
69
69
  return tokens[idx].markup === 'linkify' ? '</span></a>' : '</a>';
70
70
  }
71
71
 
72
+ // Add class to <dl> and the last <dd> in each series after a <dt>
73
+ const originalRender = md.renderer.rules.dl_open || function (tokens, idx, options, env, self) {
74
+ return self.renderToken(tokens, idx, options);
75
+ };
76
+
77
+ // Variable to keep track of whether the class has been added to the first <dl> after the target HTML
78
+ let classAdded = false;
79
+
80
+ md.renderer.rules.dl_open = function (tokens, idx, options, env, self) {
81
+
82
+ const targetHtml = 'terminology-section-start-h7vc6omi2hr2880';
83
+ let targetIndex = -1;
84
+
85
+ // Find the index of the target HTML
86
+ for (let i = 0; i < tokens.length; i++) {
87
+ if (tokens[i].content && tokens[i].content.includes(targetHtml)) {
88
+ targetIndex = i;
89
+ break;
90
+ }
91
+ }
92
+
93
+ // Add class to the first <dl> only if it comes after the target HTML
94
+ if (targetIndex !== -1 && idx > targetIndex && !classAdded) {
95
+ tokens[idx].attrPush(['class', 'terms-and-definitions-list']);
96
+ classAdded = true;
97
+ }
98
+
99
+ let lastDdIndex = -1;
100
+
101
+ for (let i = idx + 1; i < tokens.length; i++) {
102
+ if (tokens[i].type === 'dl_close') {
103
+ // Add class to the last <dd> before closing <dl>
104
+ if (lastDdIndex !== -1) {
105
+ const ddToken = tokens[lastDdIndex];
106
+ const classIndex = ddToken.attrIndex('class');
107
+ if (classIndex < 0) {
108
+ ddToken.attrPush(['class', 'last-dd']);
109
+ } else {
110
+ ddToken.attrs[classIndex][1] += ' last-dd';
111
+ }
112
+ }
113
+ break;
114
+ }
115
+
116
+ if (tokens[i].type === 'dt_open') {
117
+ // Add class to the last <dd> before a new <dt>
118
+ if (lastDdIndex !== -1) {
119
+ const ddToken = tokens[lastDdIndex];
120
+ const classIndex = ddToken.attrIndex('class');
121
+ if (classIndex < 0) {
122
+ ddToken.attrPush(['class', 'last-dd']);
123
+ } else {
124
+ ddToken.attrs[classIndex][1] += ' last-dd';
125
+ }
126
+ lastDdIndex = -1; // Reset for the next series
127
+ }
128
+ }
129
+
130
+ if (tokens[i].type === 'dd_open') {
131
+ lastDdIndex = i;
132
+ }
133
+ }
134
+
135
+ return originalRender(tokens, idx, options, env, self);
136
+ };
137
+
138
+ // Override the default `dd_open` renderer
139
+ md.renderer.rules.dd_open = (tokens, idx, options, env, self) => {
140
+ // Get the next token (the content inside the <dd>)
141
+ const contentToken = tokens[idx + 1];
142
+
143
+ if (contentToken.tag === 'p') {
144
+ return '<dd>';
145
+ }
146
+
147
+ if (contentToken.tag === 'table') {
148
+ return '<dd class="contains-table">';
149
+ }
150
+
151
+ // Default behavior
152
+ return '';
153
+ };
154
+
155
+ // Override the default `dd_close` renderer
156
+ md.renderer.rules.dd_close = (tokens, idx, options, env, self) => {
157
+ // Get the previous token (the content inside the <dd>)
158
+ const contentToken = tokens[idx - 1];
159
+
160
+ if (contentToken.tag === 'p') {
161
+ return '</dd>';
162
+ }
163
+
164
+ // Default behavior
165
+ return '';
166
+ };
72
167
  };
@@ -93,14 +93,17 @@ function prepareTref(directory) {
93
93
  localXTrefContent.content = localXTrefContent.content.replace(defPart, '');
94
94
 
95
95
  const readyForWrite = dedent`
96
- ${match[0]}
97
-
98
- <!-- This is a copy of the saved remote text. Remove it if you like. It is automatically (re)generated -->
99
-
100
- ~ <span class="meta-info"><span>![avatar](${localXTrefContent.avatarUrl}) ${localXTrefContent.owner}</span> <span>[${localXTrefContent.repo}](${localXTrefContent.repoUrl})</span> <span class="commit-hash">Commit Hash: ${localXTrefContent.commitHash}</span></span>
101
-
102
- ${localXTrefContent.content}
103
- `;
96
+ ${match[0]}
97
+ <!-- This is a copy of the saved remote text. Remove it if you like. It is automatically (re)generated -->
98
+ <dd>
99
+ | Property | Value |
100
+ | -------- | ----- |
101
+ | Owner | ![avatar](${localXTrefContent.avatarUrl}) ${localXTrefContent.owner} |
102
+ | Repo | [${localXTrefContent.repo}](${localXTrefContent.repoUrl}) |
103
+ | Commit hash | ${localXTrefContent.commitHash} |
104
+ </dd>
105
+ ${localXTrefContent.content}
106
+ `;
104
107
 
105
108
  fs.writeFileSync(itemPath, readyForWrite, 'utf8');
106
109
  }
@@ -108,12 +111,12 @@ function prepareTref(directory) {
108
111
  }
109
112
  } catch (err) {
110
113
  fs.writeFileSync(itemPath, match[0] + '\n\n' + '<!-- This is a copy of the saved remote text. Remove it if you like. It is automatically (re)generated -->\n\nNothing found, so nothing to show.', 'utf8');
111
- // console.error(`\n SPEC-UP-T: Error reading or writing file ${item.name}: ${err}` + "\n");
114
+ // console.error(`❌ Error reading or writing file ${item.name}: ${err}` + "\n");
112
115
  }
113
116
  }
114
117
  });
115
118
  } catch (err) {
116
- console.error(`\n SPEC-UP-T: Error reading directory: ${err}` + "\n");
119
+ console.error(`❌ Error reading directory: ${err}` + "\n");
117
120
  }
118
121
  }
119
122
 
package/src/references.js CHANGED
@@ -16,7 +16,7 @@ function validateReferences(references, definitions, render) {
16
16
  }
17
17
  );
18
18
  if (unresolvedRefs.length > 0 ) {
19
- console.log('\n SPEC-UP-T: Unresolved References: ', unresolvedRefs + "\n")
19
+ console.log('ℹ️ Unresolved References: ', unresolvedRefs + "\n")
20
20
  }
21
21
 
22
22
  const danglingDefs = [];
@@ -27,7 +27,7 @@ function validateReferences(references, definitions, render) {
27
27
  }
28
28
  })
29
29
  if(danglingDefs.length > 0) {
30
- console.log('\n SPEC-UP-T: Dangling Definitions: ', danglingDefs + "\n")
30
+ console.log('ℹ️ Dangling Definitions: ', danglingDefs + "\n")
31
31
  }
32
32
  }
33
33
 
@@ -65,7 +65,7 @@ async function fetchExternalSpecs(spec) {
65
65
  createNewDLWithTerms(Object.keys(r)[0], Object.values(r)[0])
66
66
  );
67
67
  } catch (e) {
68
- console.log("\n SPEC-UP-T: " + e + "\n");
68
+ console.log(" " + e + "\n");
69
69
  return []; // Return an empty array in case of errors
70
70
  }
71
71
  }