spec-up-t 1.6.0-beta.1 → 1.6.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/compiled/body.js +1 -1
- package/assets/compiled/head.css +2 -3
- package/assets/css/highlight-heading-plus-sibling-nodes.css +1 -1
- package/assets/css/terms-and-definitions.css +95 -43
- package/assets/js/insert-irefs.js +18 -16
- package/config/asset-map.json +1 -1
- package/package.json +1 -1
- package/src/install-from-boilerplate/boilerplate/spec/terms-and-definitions-intro.md +1 -1
- package/src/parsers/template-tag-parser.js +9 -3
- package/src/pipeline/rendering/render-utils.js +18 -1
- package/src/utils/regex-patterns.js +22 -0
- package/assets/css/refs.css +0 -30
package/assets/compiled/body.js
CHANGED
|
@@ -111,7 +111,7 @@ function showModal(e){const n=document.createElement("div");n.className="spec-up
|
|
|
111
111
|
function tokenInput(){document.querySelector(".button-token-input").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()}));
|
|
112
112
|
!function(){"use strict";const e=e=>document.querySelector(e);async function t(){const t=e(".service-menu");if(!t)return;const n=[{href:"./index.pdf",title:"Download this page as a PDF",cls:"button-pdf-download"},{href:"./index.docx",title:"Download this page as a DOCX",cls:"button-docx-download"}],o=await Promise.all(n.map((e=>{return t=e.href,fetch(t,{method:"HEAD"}).then((e=>e.ok)).catch((()=>!1));var t})));let r=t.firstElementChild;n.forEach(((n,a)=>{if(!o[a])return;if(s=n.cls,e(`.service-menu .${s}`))return;var s;const c=function(e,t,n){const o=document.createElement("a");return o.classList.add(n,"btn","d-block","btn-sm","btn-outline-secondary"),o.target="_blank",o.rel="noopener noreferrer",o.href=e,o.title=t,o.setAttribute("aria-label",t),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" class="me-1" viewBox="0 0 16 16"> <path d="M4 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0H4zm0 1h5v4h4v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm7 4h-1V2l3 3h-2z"/> </svg>',o}(n.href,n.title,n.cls);t.insertBefore(c,r),r=c}))}window.SpecUpDownloads={addButtons:t},document.addEventListener("DOMContentLoaded",t,{once:!1});try{document.dispatchEvent(new CustomEvent("specup-downloads-ready"))}catch(e){}}();
|
|
113
113
|
function insertTrefs(e){!function(e){const n=[];document.querySelectorAll("dl.terms-and-definitions-list dt span.term-external").forEach((e=>{const t=e.dataset.originalTerm,r=e.closest("dt");if(r){const e=r.nextElementSibling;if(e?.classList.contains("term-external")&&e.classList.contains("meta-info-content-wrapper"))return}n.push({element:e,textContent:t,dt:r,parent:r?.parentNode})}));const t=n.map((n=>{const{textContent:t,dt:r,parent:o}=n;if(!r||!o)return null;const i=e.xtrefs.find((e=>e.term===t)),a=document.createDocumentFragment(),s=document.createElement("dd");if(s.classList.add("term-external","meta-info-content-wrapper","collapsed"),i){const e=i.avatarUrl?``:"",n=i.owner||"Unknown",r=i.repo&&i.repoUrl?`[${i.repo}](${i.repoUrl})`:"Unknown",o=i.commitHash||"Unknown",d=i.ghPageUrl?new URL(`#term:${i.term}`,i.ghPageUrl).href:"Unknown",l=`\n| Property | Value |\n| -------- | ----- |\n| Original Term | ${t} |\n| Link | ${d} |\n| Owner | ${e} ${n} |\n| Repo | ${r} |\n| Commit hash | ${o} |\n `;s.innerHTML=md.render(l),a.appendChild(s);let c=i.content.split("\n").map((e=>e.replace(/^\s*~\s*/,""))).join("\n").replace(/\]\]/g,"");const m=document.createElement("div");m.innerHTML=md.render(c),m.querySelectorAll("a").forEach((e=>{const n=e=>{try{return null!==document.getElementById(e)}catch{return!1}};try{const t=new URL(e.href);if(t.hostname!==window.location.hostname)return;if(t.hash&&n(t.hash.slice(1)))return;e.replaceWith(...e.childNodes)}catch{if(e.href.startsWith("#")&&n(e.href.slice(1)))return;e.replaceWith(...e.childNodes)}})),c=m.innerHTML;const f=document.createElement("div");f.innerHTML=md.render(c);const p=f.querySelectorAll("dd");if(p.length>0)Array.from(p).forEach((e=>{const n=e.cloneNode(!0);n.classList.add("term-external","term-external-embedded"),a.appendChild(n)}));else{const e=document.createElement("dd");e.classList.add("term-external","term-external-embedded"),e.innerHTML=f.innerHTML,a.appendChild(e)}}else{s.innerHTML=md.render("\n| Property | Value |\n| -------- | ----- |\n| Owner | Unknown |\n| Repo | Unknown |\n| Commit hash | not found |\n "),a.appendChild(s);const e=document.createElement("dd");e.innerHTML="<p>This term was not found in the external repository.</p>",a.appendChild(e)}return{dt:r,parent:o,fragment:a}})).filter(Boolean);requestAnimationFrame((()=>{t.forEach((e=>{const{dt:n,parent:t,fragment:r}=e;t.insertBefore(r,n.nextSibling)})),document.dispatchEvent(new CustomEvent("trefs-inserted",{detail:{count:t.length}}))}))}(e)}function initializeOnTrefsInserted(e){let n=!1;document.addEventListener("trefs-inserted",(function(t){n||(n=!0,e(),t.detail&&console.log(`Collapsible definitions initialized after ${t.detail.count} xrefs were inserted`))})),setTimeout((()=>{n||(console.warn("trefs-inserted event was not received, initializing collapsible definitions anyway"),e(),n=!0)}),1e3)}document.addEventListener("DOMContentLoaded",(()=>{"undefined"!=typeof allXTrefs&&allXTrefs?.xtrefs?insertTrefs(allXTrefs):(console.error("allXTrefs is undefined or missing xtrefs property"),document.dispatchEvent(new CustomEvent("trefs-inserted",{detail:{count:0,error:"Missing xtrefs data"}})))}));
|
|
114
|
-
function insertIrefs(){!function(){const e=document.querySelectorAll("span.iref-placeholder");if(0===e.length)return void document.dispatchEvent(new CustomEvent("irefs-inserted",{detail:{count:0}}));const t=[];e.forEach((e=>{const n=e.dataset.irefTerm,r=e.dataset.irefOriginal;if(!n)return void console.warn("iref placeholder missing data-iref-term attribute",e);const i=document.
|
|
114
|
+
function insertIrefs(){!function(){const e=document.querySelectorAll("span.iref-placeholder");if(0===e.length)return void document.dispatchEvent(new CustomEvent("irefs-inserted",{detail:{count:0}}));const t=[];e.forEach((e=>{const n=e.dataset.irefTerm,r=e.dataset.irefOriginal;if(!n)return void console.warn("iref placeholder missing data-iref-term attribute",e);const o=`term:${n}`,i=document.getElementById(o);if(!i){console.warn(`iref: term "${r}" (id: ${n}) not found in terms-and-definitions-list`);const o=document.createElement("div");o.className="iref-not-found",o.innerHTML=`<p class="text-warning"><em>[[iref: ${r}]] - Term not found in definitions list</em></p>`;const i=document.createDocumentFragment();return i.appendChild(o),void t.push({placeholder:e,fragment:i})}const d=i.closest("dt");if(!d)return void console.warn(`iref: could not find <dt> element for term "${r}"`);const s=document.createDocumentFragment(),l=document.createElement("div");l.className="iref-content";const c=document.createElement("dl");c.className="iref-definition-list";const a=d.cloneNode(!0);a.classList.add("iref-term"),a.classList.add("term-reference");const m=a.querySelector("a.toc-anchor");m&&m.remove();a.querySelectorAll("[id]").forEach((e=>{e.removeAttribute("id")}));a.querySelectorAll(".edit-term-buttons").forEach((e=>{e.remove()}));const f=d.querySelector('[id^="term:"]');if(f){const e=f.getAttribute("id"),t=document.createElement("a");t.href=`#${e}`,t.className="iref-go-to-glossary-button btn btn-sm btn-outline-primary py-1",t.innerHTML='<span class="iref-button-icon"></span>Go to glossary',t.title=`Go to original definition of ${r}`,a.appendChild(t)}c.appendChild(a);let u=d.nextElementSibling;for(;u&&"dd"===u.tagName.toLowerCase();){const e=u.cloneNode(!0);e.classList.add("iref-definition"),c.appendChild(e),u=u.nextElementSibling}l.appendChild(c),s.appendChild(l),t.push({placeholder:e,fragment:s})})),requestAnimationFrame((()=>{t.forEach((e=>{const{placeholder:t,fragment:n}=e;t.parentNode.replaceChild(n,t)})),document.dispatchEvent(new CustomEvent("irefs-inserted",{detail:{count:t.length}})),console.log(`Inserted ${t.length} inline reference(s)`)}))}()}document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll("span.iref-placeholder").length>0&&document.querySelectorAll("dl.terms-and-definitions-list dt.term-external").length>0?document.addEventListener("trefs-inserted",(()=>{insertIrefs()}),{once:!0}):insertIrefs()}));
|
|
115
115
|
function getOrCreateButtonContainer(t){let n=t.querySelector(".definition-buttons-container");return n||(n=document.createElement("div"),n.classList.add("definition-buttons-container"),t.appendChild(n)),n}function addButtonToContainer(t,n,e=!1){const i=getOrCreateButtonContainer(t);return e?i.insertBefore(n,i.firstChild):i.appendChild(n),i}
|
|
116
116
|
function collapseDefinitions(){let{dds:t,dts:e,regularDds:s,specialDds:a}=function(){const t=document.querySelectorAll("#content dl.terms-and-definitions-list > dd");return{dds:t,dts:document.querySelectorAll("#content dl.terms-and-definitions-list > dt"),regularDds:Array.from(t).filter((t=>!i(t.textContent.trim()))),specialDds:Array.from(t).filter((t=>i(t.textContent.trim())))}}();function i(t){return["Source","See also","More in","Also see","See:","See also","See more","See more in","See more about","See more on","See more at","More:","Note:","Paraphrased by","Beware:","eSSIF-Lab: ","W3C VC:","NIST:","Supporting definitions:"].some((e=>t.startsWith(e)))}a.forEach((t=>{t.classList.add("terms-def-extra-info")})),e.forEach((t=>{if(t.querySelector(".collapse-all-defs-button"))return;const e=document.createElement("button");e.classList.add("collapse-all-defs-button","btn-outline-secondary","d-print-none","btn","p-0","fs-5","d-flex","align-items-center","justify-content-center"),e.innerHTML='<span class="state-indicator" data-state="0">①</span><span class="state-indicator" data-state="1">②</span><span class="state-indicator" data-state="2">③</span>',e.setAttribute("id","toggleButton"),e.setAttribute("title","Change how much info is shown"),e.setAttribute("data-state","2"),e.querySelector('.state-indicator[data-state="2"]').classList.add("active"),addButtonToContainer(t,e)})),document.addEventListener("click",(e=>{if(e.target.classList.contains("collapse-all-defs-button")||e.target.classList.contains("state-indicator")){const i=e.target.classList.contains("collapse-all-defs-button")?e.target:e.target.closest(".collapse-all-defs-button"),n=i.getBoundingClientRect();document.documentElement.classList.add("definitions-transitioning"),i.style.position="fixed",i.style.top=`${n.top}px`,i.style.right=window.innerWidth-n.right+"px",i.style.zIndex="1000",function(){const e=document.querySelectorAll(".collapse-all-defs-button");switch((parseInt(e[0].dataset.state||0)+1)%3){case 0:t.forEach((t=>{t.classList.add("hidden"),t.classList.remove("visible")})),e.forEach((t=>{t.dataset.state=0,t.title="Show basic definitions",t.querySelectorAll(".state-indicator").forEach((t=>{0===parseInt(t.dataset.state)?t.classList.add("active"):t.classList.remove("active")}))})),document.querySelector("html").classList.add("defs-hidden");break;case 1:s.forEach((t=>{t.classList.remove("hidden"),t.classList.add("visible")})),a.forEach((t=>{t.classList.add("hidden"),t.classList.remove("visible")})),e.forEach((t=>{t.dataset.state=1,t.title="Show all definitions",t.querySelectorAll(".state-indicator").forEach((t=>{1===parseInt(t.dataset.state)?t.classList.add("active"):t.classList.remove("active")}))})),document.querySelector("html").classList.remove("defs-hidden");break;case 2:t.forEach((t=>{t.classList.remove("hidden"),t.classList.add("visible")})),a.forEach((t=>{t.classList.add("terms-def-extra-info")})),e.forEach((t=>{t.dataset.state=2,t.title="Hide all definitions",t.querySelectorAll(".state-indicator").forEach((t=>{2===parseInt(t.dataset.state)?t.classList.add("active"):t.classList.remove("active")}))})),document.querySelector("html").classList.remove("defs-hidden")}}(),requestAnimationFrame((()=>{i.style.position="",i.style.top="",i.style.right="",i.style.zIndex="",document.documentElement.classList.remove("definitions-transitioning");const t=i.getBoundingClientRect();window.scrollTo({top:window.scrollY+(t.top-n.top),behavior:"instant"})}))}}))}document.addEventListener("DOMContentLoaded",(function(){initializeOnTrefsInserted(collapseDefinitions)}));
|
|
117
117
|
function createToggleButton(e){const t=document.createElement("button");t.classList.add("meta-info-toggle-button","btn","fs-1","d-flex","align-items-center","justify-content-center"),t.innerHTML='<i class="bi bi-info-circle" style="margin-top: -0.5em;"></i>',t.title="Meta info",t.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();e.classList.contains("collapsed")?(e.classList.remove("collapsed"),e.getBoundingClientRect()):e.classList.add("collapsed")}));let n=e.previousElementSibling;for(;n&&"DT"!==n.tagName;)n=n.previousElementSibling;n?addButtonToContainer(n,t,!0):e.insertBefore(t,e.firstChild)}function collapseMetaInfo(){document.querySelectorAll("dl > dd:has(table)").forEach((function(e){e.classList.add("meta-info-content-wrapper");const t=document.createElement("div");for(t.classList.add("meta-info-inner-wrapper");e.firstChild&&e.firstChild!==e.querySelector(".meta-info-toggle-button");)t.appendChild(e.firstChild);e.querySelector(".meta-info-toggle-button")||createToggleButton(e),e.appendChild(t),e.classList.add("collapsed")}))}document.addEventListener("DOMContentLoaded",(function(){initializeOnTrefsInserted(collapseMetaInfo)}));
|
package/assets/compiled/head.css
CHANGED
|
@@ -9,7 +9,7 @@ code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shad
|
|
|
9
9
|
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
|
10
10
|
#logo img{width:100px}.bi{display:inline-block;width:1.2rem;height:1.2rem}#header,#header *{background-color:var(--header-navbar-bg);color:var(--header-navbar-text)}[data-issue-count]:after{content:"(" attr(data-issue-count) ")";margin:0 0 0 .3em;padding:.1em 0 0}[data-issue-count=""][data-animate]{display:none;opacity:0}[data-issue-count][data-animate]:not([data-issue-count=""]){animation:display-show 1s}#header a:not(#logo),#header a:not(#logo) *,#header button,#header button *{background:#a9dde0}
|
|
11
11
|
.container{min-height:100vh}@media (min-width:768px){.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;z-index:100}}ul.toc{padding:1em 0 1.75em;font-size:.85em}ul.toc,ul.toc ul{margin:0;padding:0;list-style:none}ul.toc li a{display:block;padding:.4em .8em;text-decoration:none;color:var(--toc-text);transition:background .2s ease,padding-left .2s ease,border-left .2s ease;padding-left:.8em;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.03)}ul.toc ul{margin-left:1.2em!important;margin-top:.3em}ul.toc a:hover{background:#f9f9f9;padding-left:1em;border-left:3px solid #007bff}ul.toc>li>ul>li>a{padding-left:1.5em}ul.toc>li>ul>li>ul>li>a{padding-left:2em}ul.toc a:focus{outline:2px solid #007bff;outline-offset:-2px;box-shadow:0 0 0 3px rgba(0,123,255,.25);position:relative;z-index:1}.spec-footer{font-size:.7em;text-align:center}ul.toc li a.active,ul.toc li a[aria-current=page]{border-left:3px solid #007bff;font-weight:500;background:#f0f0f0}ul.toc li:last-child a{border-bottom:none}#toc ul li{position:relative}#toc ul li.has-children{position:relative}.collapse-toggle{position:absolute;top:.35em;right:0;width:28px;height:28px;background:0 0;border:1px solid transparent;border-radius:3px;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color .2s,border-color .2s;z-index:2}.collapse-toggle:hover{background-color:rgba(0,0,0,.05)}.collapse-toggle:focus{outline:2px solid #007bff;outline-offset:1px;border-color:#007bff;box-shadow:0 0 0 3px rgba(0,123,255,.25)}.collapse-toggle::after{content:"";border-style:solid;border-width:.15em .15em 0 0;display:inline-block;height:.5em;width:.5em;position:relative;transform:rotate(135deg);transition:transform .2s ease}.collapse-toggle.collapsed::after{transform:rotate(45deg)}#toc ul li.has-children>ul{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out,opacity .3s ease-in-out;opacity:1}#toc ul li.has-children.collapsed>ul{max-height:0;overflow:hidden;opacity:.6}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.screen-reader-text:focus{width:auto;height:auto;clip:auto;display:block;padding:15px 23px 14px;background-color:#fff;color:#007bff;z-index:100000;font-size:1em;font-weight:700;text-decoration:none;line-height:normal;box-shadow:0 0 2px 2px rgba(0,0,0,.2)}
|
|
12
|
-
h2,h3,h4,h5,h6{margin-top:1.5em!important}#terminology-section-utility-container{margin:1em auto;width:100%}@media (min-width:576px){#terminology-section-utility-container{position:sticky;top:3.5em;z-index:10}}.toc-anchor{font-size:.875em;color:#73c2df;text-decoration:none;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}dl.terms-and-definitions-list{margin:0;padding:0;position:relative;z-index:1}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:var(--card-bg-dt);border:1px solid var(--card-border);padding:.5rem 1.25rem;border-radius:.375rem .375rem 0 0;color:var(--card-text);position:relative;line-height:1.5;font-size:1.05em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-height:2.5rem}dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .2s ease-in-out}dl.terms-and-definitions-list>dt:focus>span,dl.terms-and-definitions-list>dt:hover>span,dl.terms-and-definitions-list>dt>span:focus,dl.terms-and-definitions-list>dt>span:hover{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt:active>span,dl.terms-and-definitions-list>dt>span:active{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt .btn{font-size:1.2em!important}dl.terms-and-definitions-list>dt:hover{background-color:var(--card-hover-bg);transition:background-color .2s ease-in-out}dl.terms-and-definitions-list>dd{margin:0;background-color:var(--card-bg);border:1px solid var(--card-border);border-top:none;padding:.5rem 2rem;color:var(--card-text);width:100%;position:relative}dl.terms-and-definitions-list dd p{margin:0;color:var(--card-text);padding-left:.5rem}dl.terms-and-definitions-list>dd::before{display:none}dl.terms-and-definitions-list dd table{margin:.5em 0;width:100%;border-collapse:collapse}dl.terms-and-definitions-list dd table td,dl.terms-and-definitions-list dd table th{padding:.5em;border:1px solid #ddd}dl.terms-and-definitions-list dd table th{background-color:#f5f5f5}dl>dd:has(table).meta-info-content-wrapper{display:block;font-size:.7em;position:relative;max-height:none;height:auto;overflow:visible;transition:all .3s ease-out}dl>dd:has(table).meta-info-content-wrapper td,dl>dd:has(table).meta-info-content-wrapper th{padding:.3em}dl>dd:has(table).collapsed.meta-info-content-wrapper{max-height:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;transition:all .3s ease-out;line-height:0}dl>dd:has(table).meta-info-content-wrapper>div{display:block;padding:inherit}.meta-info-toggle-button{position:relative;cursor:pointer}dl.terms-and-definitions-list dt+dd{border-bottom:none}dl.terms-and-definitions-list dd+dd{border-top:none;border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:1rem}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 .375rem .375rem;border-bottom:1px solid var(--card-border)}html.dense-info dl.terms-and-definitions-list>dt{padding:.1rem 1.25rem;line-height:inherit;font-size:inherit;min-height:auto}html.dense-info dl.terms-and-definitions-list dd+dt{margin-top:.3rem}html.dense-info dl.terms-and-definitions-list>dt::before{display:none}html.dense-info dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0}.term-external{position:relative}dl.terms-and-definitions-list>dd.term-external,dl.terms-and-definitions-list>dt.term-external{background:#a9dde03b}.term-local{position:relative}dl.terms-and-definitions-list>dd.term-local,dl.terms-and-definitions-list>dt.term-local{background:#f0f8ff}dl.terms-and-definitions-list .term-original-term{font-style:italic}dl.terms-and-definitions-list .term-external-parenthetical-terms{font-weight:400}dl.terms-and-definitions-list .term-local-original-term{font-style:italic}dl.terms-and-definitions-list .term-local-parenthetical-terms{font-weight:400}.btn{font-variant:small-caps;text-transform:uppercase;position:relative;z-index:5}.transclusion-heading{font-size:1.3em;font-weight:700;margin:.2em 0 .2em}dl.terms-and-definitions-list>dd.term-external-embedded{position:relative;padding-left:2.5rem;padding-top:.3rem;padding-bottom:.3rem}dl.terms-and-definitions-list span.term-external::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}dl.terms-and-definitions-list span.term-external{padding-left:1.5rem;display:inline-block}.placeholder-tref{display:none}.no-xref-found-message{background:#f8c481;color:#03365f;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem;font-variant:small-caps;text-transform:uppercase}.iref-content{margin:1rem 0}dl.iref-definition-list{margin:0;padding:0}dl.iref-definition-list>dt.iref-term{
|
|
12
|
+
h2,h3,h4,h5,h6{margin-top:1.5em!important}#terminology-section-utility-container{margin:1em auto;width:100%}@media (min-width:576px){#terminology-section-utility-container{position:sticky;top:3.5em;z-index:10}}.toc-anchor{font-size:.875em;color:#73c2df;text-decoration:none;transition:opacity .3s ease}.toc-anchor:hover{opacity:1}dl.terms-and-definitions-list{margin:0;padding:0;position:relative;z-index:1}dl.terms-and-definitions-list>dt{font-weight:700;margin:0;background-color:var(--card-bg-dt);border:1px solid var(--card-border);padding:.5rem 1.25rem;border-radius:.375rem .375rem 0 0;color:var(--card-text);position:relative;line-height:1.5;font-size:1.05em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;min-height:2.5rem}dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .2s ease-in-out}dl.terms-and-definitions-list>dt:focus>span,dl.terms-and-definitions-list>dt:hover>span,dl.terms-and-definitions-list>dt>span:focus,dl.terms-and-definitions-list>dt>span:hover{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt:active>span,dl.terms-and-definitions-list>dt>span:active{white-space:normal;overflow:visible;text-overflow:initial;word-wrap:break-word;line-height:1.4}dl.terms-and-definitions-list>dt .btn{font-size:1.2em!important}dl.terms-and-definitions-list>dt:hover{background-color:var(--card-hover-bg);transition:background-color .2s ease-in-out}dl.terms-and-definitions-list>dd{margin:0;background-color:var(--card-bg);border:1px solid var(--card-border);border-top:none;padding:.5rem 2rem;color:var(--card-text);width:100%;position:relative}dl.terms-and-definitions-list dd p{margin:0;color:var(--card-text);padding-left:.5rem}dl.terms-and-definitions-list>dd::before{display:none}dl.terms-and-definitions-list dd table{margin:.5em 0;width:100%;border-collapse:collapse}dl.terms-and-definitions-list dd table td,dl.terms-and-definitions-list dd table th{padding:.5em;border:1px solid #ddd}dl.terms-and-definitions-list dd table th{background-color:#f5f5f5}dl>dd:has(table).meta-info-content-wrapper{display:block;font-size:.7em;position:relative;max-height:none;height:auto;overflow:visible;transition:all .3s ease-out}dl>dd:has(table).meta-info-content-wrapper td,dl>dd:has(table).meta-info-content-wrapper th{padding:.3em}dl>dd:has(table).collapsed.meta-info-content-wrapper{max-height:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;overflow:hidden;transition:all .3s ease-out;line-height:0}dl>dd:has(table).meta-info-content-wrapper>div{display:block;padding:inherit}.meta-info-toggle-button{position:relative;cursor:pointer}dl.terms-and-definitions-list dt+dd{border-bottom:none}dl.terms-and-definitions-list dd+dd{border-top:none;border-bottom:none}dl.terms-and-definitions-list dd+dt{margin-top:1rem}dl.terms-and-definitions-list dd.last-dd{border-radius:0 0 .375rem .375rem;border-bottom:1px solid var(--card-border)}html.dense-info dl.terms-and-definitions-list>dt{padding:.1rem 1.25rem;line-height:inherit;font-size:inherit;min-height:auto}html.dense-info dl.terms-and-definitions-list dd+dt{margin-top:.3rem}html.dense-info dl.terms-and-definitions-list>dt::before{display:none}html.dense-info dl.terms-and-definitions-list>dt>span{flex:1 1 auto;min-width:0}.term-external{position:relative}dl.terms-and-definitions-list>dd.term-external,dl.terms-and-definitions-list>dt.term-external{background:#a9dde03b}.term-local{position:relative}dl.terms-and-definitions-list>dd.term-local,dl.terms-and-definitions-list>dt.term-local{background:#f0f8ff}dl.terms-and-definitions-list .term-original-term{font-style:italic}dl.terms-and-definitions-list .term-external-parenthetical-terms{font-weight:400}dl.terms-and-definitions-list .term-local-original-term{font-style:italic}dl.terms-and-definitions-list .term-local-parenthetical-terms{font-weight:400}.btn{font-variant:small-caps;text-transform:uppercase;position:relative;z-index:5}.transclusion-heading{font-size:1.3em;font-weight:700;margin:.2em 0 .2em}dl.terms-and-definitions-list>dd.term-external-embedded{position:relative;padding-left:2.5rem;padding-top:.3rem;padding-bottom:.3rem}dl.terms-and-definitions-list span.term-external::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}dl.terms-and-definitions-list span.term-external{padding-left:1.5rem;display:inline-block}.placeholder-tref{display:none}.no-xref-found-message{background:#f8c481;color:#03365f;margin:0 .5em;padding:0 .8em;border-radius:.25rem;font-size:.8rem;font-variant:small-caps;text-transform:uppercase}.term-reference{padding:3px 3px 3px 1.5em;background-color:#eaf5fb;border-radius:.25rem;position:relative;text-decoration:none;box-shadow:inset 0 0 0 1px #a9d9f5;transition:box-shadow .3s ease-in-out}.term-reference:hover{box-shadow:inset 0 0 0 3px #a9d9f5}dd .term-reference::after{content:"";position:absolute;top:50%;left:.2rem;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem}dt.term-reference::after{left:1rem}.iref-content{margin:1rem 0}dl.iref-definition-list{margin:0;padding:0}dl.iref-definition-list>dt.iref-term{background-color:rgba(var(--card-bg-dt-rgb,248,249,250),.5);border:none;box-shadow:none;padding:1rem 2.25rem .5rem 0;border-radius:.375rem .375rem 0 0;transition:background-color .3s ease-in-out,transform .2s ease-in-out}dl.iref-definition-list>dt.iref-term:hover{background-color:rgba(var(--card-bg-dt-rgb,248,249,250),.5);transform:translateX(2px)}dl.iref-definition-list>dd.iref-definition{margin:0;background-color:rgba(var(--card-bg-rgb,255,255,255),.5);padding:0 2rem;transition:background-color .3s ease-in-out,transform .2s ease-in-out}dl.iref-definition-list>dd.iref-definition,dl.iref-definition-list>dt.iref-term{font-size:.8em}dl.iref-definition-list>dd.iref-definition:hover{background-color:rgba(var(--card-bg-rgb,255,255,255),.5);transform:translateX(2px)}dl.iref-definition-list>dd.iref-definition+dd.iref-definition{border-top:1px dashed rgba(0,0,0,.1)}dl.iref-definition-list>dd.iref-definition:last-child{border-radius:0 0 .375rem .375rem}dl.iref-definition-list dd.iref-definition p{margin:0;color:var(--card-text);padding-left:.5rem}a.iref-go-to-glossary-button{margin-left:.5rem;white-space:nowrap;text-decoration:none;position:relative;padding-left:1.5rem}a.iref-go-to-glossary-button:hover{text-decoration:none}a.iref-go-to-glossary-button .iref-button-icon{position:absolute;top:50%;left:.3rem;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;display:inline-block;content:""}.iref-not-found{margin:.5rem 0;padding:.5rem 1rem;background-color:#fff3cd;border:1px solid #ffc107;border-radius:.375rem;color:#856404}
|
|
13
13
|
.btn{font-size:.7em!important;margin:0 0 0 .5em!important}
|
|
14
14
|
.highlight-matches-search{font-size:1em;outline:3px solid #1d6dae39;outline-offset:5px;transition:outline .3s ease-in-out}.highlight-matches-search.active{outline:3px solid #1d6dae;transition:outline .3s ease-in-out}.highlight-matches-DIF-search{background-color:#1d6dae11}.highlight-matches-ToIP-search{background-color:#a9dde0b0}.highlight-matches-BTC-search{background-color:#f19019a1}.highlight-matches-KERI-search{background-color:#b5d070d5}.highlight-matches-SSI-search{background-color:#ff0}.highlight-matches-GLEIF-search{background-color:#52dac6a6}
|
|
15
15
|
.highlight-cfib41dyhcd99sm{background-color:#1d6dae11}
|
|
@@ -28,7 +28,6 @@ article a[href^="https://"]:not(.btn)::after,article a[href^=http]:not(.btn)::af
|
|
|
28
28
|
.image-container-full-page{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.9);display:flex;justify-content:center;align-items:center;z-index:10000;padding:20px;box-sizing:border-box;cursor:zoom-out;animation:fadeIn .3s ease-in-out}.image-container-full-page img{max-width:90%;max-height:90%;object-fit:contain;box-shadow:0 0 20px rgba(0,0,0,.5)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}
|
|
29
29
|
#content .figure{width:100%;margin-bottom:1.5rem}#content .figure img{transition:all .3s ease}#content .figure img:hover{transform:scale(1.01);cursor:pointer}#content img.img-fluid{max-width:100%;height:auto}#content .figure-caption{margin-top:.5rem;font-style:italic;color:#6c757d}
|
|
30
30
|
#content .figure:has(.scrollHintImage){padding:0;margin:0;width:auto;height:auto}
|
|
31
|
-
.highlight2{padding-left:1em;padding-right:1em;border:1px dashed #71bbe6;background:#
|
|
31
|
+
.highlight2{padding-left:1em;padding-right:1em;border:1px dashed #71bbe6;background:#f3f5f53b}
|
|
32
32
|
#toc ul.toc{counter-reset:toc-section}#toc ul.toc>li{counter-reset:toc-subsection}#toc ul.toc>li>ul>li{counter-reset:toc-subsubsection}#toc ul.toc>li>a::before{counter-increment:toc-section;content:counter(toc-section) ". ";font-weight:700;margin-right:.5em}#toc ul.toc>li>ul>li>a::before{counter-increment:toc-subsection;content:counter(toc-section) "." counter(toc-subsection) " ";font-weight:700;margin-right:.5em}#toc ul.toc>li>ul>li>ul>li>a::before{counter-increment:toc-subsubsection;content:counter(toc-section) "." counter(toc-subsection) "." counter(toc-subsubsection) " ";font-weight:700;margin-right:.5em}main article{counter-reset:main-section}main article h2{counter-reset:main-subsection}main article h3{counter-reset:main-subsubsection}main article h2 .toc-anchor::after{counter-increment:main-section;content:" " counter(main-section) ".";font-weight:700}main article h3 .toc-anchor::after{counter-increment:main-subsection;content:" " counter(main-section) "." counter(main-subsection);font-weight:700}main article h4 .toc-anchor::after{counter-increment:main-subsubsection;content:" " counter(main-section) "." counter(main-subsection) "." counter(main-subsubsection);font-weight:700}main article h5::before,main article h6::before{font-weight:700;margin-right:.5em}@media print{#toc ul.toc>li>a::before,#toc ul.toc>li>ul>li>a::before,#toc ul.toc>li>ul>li>ul>li>a::before,main article h2 .toc-anchor::after,main article h3 .toc-anchor::after,main article h4 .toc-anchor::after{color:#000!important}}
|
|
33
|
-
.term-reference{padding:3px;background-color:#eaf5fb;border-radius:7px;position:relative;padding-left:1.5em;text-decoration:none;box-shadow:inset 0 0 0 1px #a9d9f5;transition:box-shadow .3s ease-in-out}.term-reference:hover{box-shadow:inset 0 0 0 3px #a9d9f5}.term-reference::after{content:"";position:absolute;top:50%;transform:translateY(-50%);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;width:.8rem;height:.8rem;left:.2rem}
|
|
34
33
|
html{scroll-behavior:smooth;scroll-padding-top:50vh}body:not([hashscroll]) :target{animation:highlight-target 3.5s .25s ease}body:not([hashscroll]) dt:has(:target){animation:highlight-target-parent-dt 3.5s .25s ease}dl.terms-and-definitions-list>.highlight{background-color:#ff0!important;transition:background-color .3s ease-in-out}svg[icon]{width:1.25em;height:1.25em;vertical-align:text-top}@keyframes highlight-target{50%{background-color:#ff0}}@keyframes highlight-target-parent-dt{50%{background-color:#ff0;border:1px solid #00c8ff}}#svg{display:none}main *{overflow-wrap:anywhere;word-break:normal}.table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch;width:100%;max-width:100%}.table-responsive *{overflow-wrap:normal!important;word-break:normal!important;white-space:nowrap!important}dd td img{max-width:30px}.notice{margin:1em 0;padding:.5em .9em .55em .65em;border-left:.5em solid}.notice p{margin:.4em 0 0}.note{background:#e9fbe9;border-color:#52e052}.note .notice-link{display:block;color:#178217}.issue{background:#e9f0fb;border-color:#527fe0}.issue .notice-link:before{display:block;color:#1e4cae}.warning{background:#fbe9e9;border-color:#e05252}.warning .notice-link{display:block;color:#ae1e1e}.example{color:#cebe00;background:#1a1e23;border-left:.5em solid}.example .notice-link{display:block;color:inherit;font-size:1.1em;font-family:Heebo,sans-serif}.example pre[class*=language-]{padding:0;border-radius:0}.todo{background:#fbe4ff;border-color:#9700e2}.todo .notice-link{display:block;color:#6d00a2}.alert-primary{background-color:#f9fcff;border-color:#b2ebf2;color:#00838f}.alert-secondary{background-color:#f5f5f5;border-color:#e0e0e0;color:#616161}.alert-success{background-color:#e8f5e9;border-color:#c8e6c9;color:#388e3c}.alert-danger{background-color:#ffebee;border-color:#ef9a9a;color:#d32f2f}.alert-warning{background-color:#fffde7;border-color:#fff9c4;color:#f9a825}.alert-info{background-color:#e1f5fe;border-color:#b3e5fc;color:#0288d1}.alert-light{background-color:#f9f9f9;border-color:#eee;color:#424242}.alert-dark{background-color:#e0e0e0;border-color:#bdbdbd;color:#212121}.alert a{color:inherit;font-weight:700}.alert-primary a{color:#006064}.alert-success a{color:#2e7d32}.alert-danger a{color:#b71c1c}.alert-warning a{color:#f57f17}.alert-info a{color:#01579b}.alert-dark a{color:#000}[data-bs-theme=dark] .alert-primary{background-color:#004d40;border-color:#00695c;color:#b2dfdb}[data-bs-theme=dark] .alert-secondary{background-color:#424242;border-color:#616161;color:#e0e0e0}[data-bs-theme=dark] .alert-success{background-color:#1b5e20;border-color:#2e7d32;color:#a5d6a7}[data-bs-theme=dark] .alert-danger{background-color:#b71c1c;border-color:#c62828;color:#ef9a9a}[data-bs-theme=dark] .alert-warning{background-color:#f57f17;border-color:#ffb300;color:#ffe082}[data-bs-theme=dark] .alert-info{background-color:#01579b;border-color:#0277bd;color:#81d4fa}[data-bs-theme=dark] .alert-light{background-color:#303030;border-color:#424242;color:#e0e0e0}[data-bs-theme=dark] .alert-dark{background-color:#212121;border-color:#424242;color:#bdbdbd}[data-bs-theme=dark] .alert a{color:inherit;font-weight:700}[data-bs-theme=dark] .alert-primary a{color:#80cbc4}[data-bs-theme=dark] .alert-success a{color:#81c784}[data-bs-theme=dark] .alert-danger a{color:#ef5350}[data-bs-theme=dark] .alert-warning a{color:#ffca28}[data-bs-theme=dark] .alert-info a{color:#4fc3f7}[data-bs-theme=dark] .alert-dark a{color:#9e9e9e}#offcanvasSettings .btn-menu-item{border-radius:unset;width:100%;text-align:left;border:1px solid #dee2e6;background-color:var(--card-bg);color:var(--card-text);padding:10px 15px;margin-bottom:5px;transition:background-color .2s ease}#offcanvasSettings .btn-menu-item:hover{background-color:#e9ecef}
|
|
@@ -361,6 +361,42 @@ dl.terms-and-definitions-list span.term-external {
|
|
|
361
361
|
text-transform: uppercase;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
+
/* ====== TERM REFERENCE STYLING ====== */
|
|
365
|
+
/* Inline term references (clickable links to definitions) */
|
|
366
|
+
.term-reference {
|
|
367
|
+
padding: 3px 3px 3px 1.5em;
|
|
368
|
+
background-color: #eaf5fb;
|
|
369
|
+
border-radius: 0.25rem;
|
|
370
|
+
position: relative;
|
|
371
|
+
text-decoration: none;
|
|
372
|
+
box-shadow: inset 0 0 0 1px #a9d9f5;
|
|
373
|
+
transition: box-shadow 0.3s ease-in-out;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.term-reference:hover {
|
|
377
|
+
box-shadow: inset 0 0 0 3px #a9d9f5;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* Arrow icon for term references inside dd elements using SVG data URI */
|
|
381
|
+
dd .term-reference::after {
|
|
382
|
+
content: "";
|
|
383
|
+
position: absolute;
|
|
384
|
+
top: 50%;
|
|
385
|
+
left: 0.2rem;
|
|
386
|
+
transform: translateY(-50%);
|
|
387
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
|
|
388
|
+
background-size: contain;
|
|
389
|
+
background-repeat: no-repeat;
|
|
390
|
+
background-position: center;
|
|
391
|
+
width: 0.8rem;
|
|
392
|
+
height: 0.8rem;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* Adjust arrow position for term references in definition terms */
|
|
396
|
+
dt.term-reference::after {
|
|
397
|
+
left: 1rem;
|
|
398
|
+
}
|
|
399
|
+
|
|
364
400
|
/* ====== INLINE REFERENCE (IREF) STYLING ====== */
|
|
365
401
|
/* Wrapper for iref content */
|
|
366
402
|
.iref-content {
|
|
@@ -373,48 +409,49 @@ dl.iref-definition-list {
|
|
|
373
409
|
padding: 0;
|
|
374
410
|
}
|
|
375
411
|
|
|
376
|
-
/* Term styling for iref */
|
|
377
|
-
dl.iref-definition-list
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
padding: 0.5rem 1.25rem;
|
|
412
|
+
/* Term styling for iref - lighter appearance to indicate it's a copy */
|
|
413
|
+
dl.iref-definition-list>dt.iref-term {
|
|
414
|
+
background-color: rgba(var(--card-bg-dt-rgb, 248, 249, 250), 0.5);
|
|
415
|
+
border: none;
|
|
416
|
+
box-shadow: none;
|
|
417
|
+
padding: 1rem 2.25rem 0.5rem 0rem;
|
|
383
418
|
border-radius: 0.375rem 0.375rem 0 0;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
gap: 0.5rem;
|
|
392
|
-
min-height: 2.5rem;
|
|
393
|
-
opacity: 0.95;
|
|
394
|
-
/* Slightly transparent to show it's a copy */
|
|
419
|
+
transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* Subtle hover effect for iref terms */
|
|
423
|
+
dl.iref-definition-list>dt.iref-term:hover {
|
|
424
|
+
background-color: rgba(var(--card-bg-dt-rgb, 248, 249, 250), 0.5);
|
|
425
|
+
transform: translateX(2px);
|
|
395
426
|
}
|
|
396
427
|
|
|
397
|
-
/* Definition styling for iref */
|
|
398
|
-
dl.iref-definition-list
|
|
428
|
+
/* Definition styling for iref - very light background, no border */
|
|
429
|
+
dl.iref-definition-list>dd.iref-definition {
|
|
399
430
|
margin: 0;
|
|
400
|
-
background-color: var(--card-bg);
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
431
|
+
background-color: rgba(var(--card-bg-rgb, 255, 255, 255), 0.5);
|
|
432
|
+
padding: 0rem 2rem;
|
|
433
|
+
transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
dl.iref-definition-list>dt.iref-term,
|
|
437
|
+
dl.iref-definition-list>dd.iref-definition {
|
|
438
|
+
font-size: 0.8em;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/* Subtle hover effect for iref definitions */
|
|
442
|
+
dl.iref-definition-list>dd.iref-definition:hover {
|
|
443
|
+
background-color: rgba(var(--card-bg-rgb, 255, 255, 255), 0.5);
|
|
444
|
+
transform: translateX(2px);
|
|
409
445
|
}
|
|
410
446
|
|
|
411
|
-
/*
|
|
412
|
-
dl.iref-definition-list
|
|
413
|
-
border-top: 1px dashed
|
|
447
|
+
/* Subtle separator between consecutive iref dd elements */
|
|
448
|
+
dl.iref-definition-list>dd.iref-definition+dd.iref-definition {
|
|
449
|
+
border-top: 1px dashed rgba(0, 0, 0, 0.1);
|
|
414
450
|
}
|
|
415
451
|
|
|
452
|
+
|
|
416
453
|
/* Last dd in iref gets rounded bottom corners */
|
|
417
|
-
dl.iref-definition-list
|
|
454
|
+
dl.iref-definition-list>dd.iref-definition:last-child {
|
|
418
455
|
border-radius: 0 0 0.375rem 0.375rem;
|
|
419
456
|
}
|
|
420
457
|
|
|
@@ -425,18 +462,33 @@ dl.iref-definition-list dd.iref-definition p {
|
|
|
425
462
|
padding-left: 0.5rem;
|
|
426
463
|
}
|
|
427
464
|
|
|
428
|
-
/*
|
|
429
|
-
a.iref-
|
|
430
|
-
|
|
465
|
+
/* Button link to original term in iref dt */
|
|
466
|
+
a.iref-go-to-glossary-button {
|
|
467
|
+
margin-left: 0.5rem;
|
|
468
|
+
white-space: nowrap;
|
|
431
469
|
text-decoration: none;
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
transition: opacity 0.2s ease-in-out;
|
|
470
|
+
position: relative;
|
|
471
|
+
padding-left: 1.5rem;
|
|
435
472
|
}
|
|
436
473
|
|
|
437
|
-
a.iref-
|
|
438
|
-
|
|
439
|
-
|
|
474
|
+
a.iref-go-to-glossary-button:hover {
|
|
475
|
+
text-decoration: none;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* Arrow icon for the button */
|
|
479
|
+
a.iref-go-to-glossary-button .iref-button-icon {
|
|
480
|
+
position: absolute;
|
|
481
|
+
top: 50%;
|
|
482
|
+
left: 0.3rem;
|
|
483
|
+
transform: translateY(-50%);
|
|
484
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
|
|
485
|
+
background-size: contain;
|
|
486
|
+
background-repeat: no-repeat;
|
|
487
|
+
background-position: center;
|
|
488
|
+
width: 0.8rem;
|
|
489
|
+
height: 0.8rem;
|
|
490
|
+
display: inline-block;
|
|
491
|
+
content: "";
|
|
440
492
|
}
|
|
441
493
|
|
|
442
494
|
/* iref not found message */
|
|
@@ -447,4 +499,4 @@ a.iref-link-to-original:hover {
|
|
|
447
499
|
border: 1px solid #ffc107;
|
|
448
500
|
border-radius: 0.375rem;
|
|
449
501
|
color: #856404;
|
|
450
|
-
}
|
|
502
|
+
}
|
|
@@ -55,10 +55,10 @@ function insertIrefs() {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// Find the term in the terms-and-definitions-list by its ID
|
|
58
|
+
// Use getElementById instead of querySelector to avoid issues with special characters
|
|
58
59
|
// The term ID is in the format "term:term-name"
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
);
|
|
60
|
+
const fullTermId = `term:${termId}`;
|
|
61
|
+
const termElement = document.getElementById(fullTermId);
|
|
62
62
|
|
|
63
63
|
if (!termElement) {
|
|
64
64
|
console.warn(`iref: term "${originalTerm}" (id: ${termId}) not found in terms-and-definitions-list`);
|
|
@@ -115,25 +115,27 @@ function insertIrefs() {
|
|
|
115
115
|
element.removeAttribute('id');
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
//
|
|
118
|
+
// Remove any edit-term-buttons from the cloned dt
|
|
119
|
+
const editTermButtons = clonedDt.querySelectorAll('.edit-term-buttons');
|
|
120
|
+
editTermButtons.forEach(button => {
|
|
121
|
+
button.remove();
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Add a "Go to glossary" button link after the term definition
|
|
119
125
|
// Find the term ID from the original dt element (not the clone)
|
|
120
126
|
const termIdSpan = dtElement.querySelector('[id^="term:"]');
|
|
121
127
|
if (termIdSpan) {
|
|
122
128
|
const termIdAttr = termIdSpan.getAttribute('id');
|
|
123
129
|
|
|
124
|
-
//
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// Move all child nodes of clonedDt into the link
|
|
131
|
-
while (clonedDt.firstChild) {
|
|
132
|
-
link.appendChild(clonedDt.firstChild);
|
|
133
|
-
}
|
|
130
|
+
// Create a button-styled link with arrow icon
|
|
131
|
+
const glossaryLink = document.createElement('a');
|
|
132
|
+
glossaryLink.href = `#${termIdAttr}`;
|
|
133
|
+
glossaryLink.className = 'iref-go-to-glossary-button btn btn-sm btn-outline-primary py-1';
|
|
134
|
+
glossaryLink.innerHTML = '<span class="iref-button-icon"></span>Go to glossary';
|
|
135
|
+
glossaryLink.title = `Go to original definition of ${originalTerm}`;
|
|
134
136
|
|
|
135
|
-
//
|
|
136
|
-
clonedDt.appendChild(
|
|
137
|
+
// Append the button to the cloned dt
|
|
138
|
+
clonedDt.appendChild(glossaryLink);
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
dl.appendChild(clonedDt);
|
package/config/asset-map.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.3",
|
|
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": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[//]: # (This file, named “terms-and-definitions-intro.md” is mandatory and should not be deleted.)
|
|
1
|
+
[//]: # (This file, named “terms-and-definitions-intro.md” is mandatory and should not be deleted. However, you can safely delete this comment and replace it with text of your choice.)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
const { findExternalSpecByKey } = require('../pipeline/references/external-references-service.js');
|
|
15
15
|
const { lookupXrefTerm } = require('../pipeline/rendering/render-utils.js');
|
|
16
|
-
const { whitespace, htmlComments, contentCleaning, externalReferences } = require('../utils/regex-patterns');
|
|
16
|
+
const { whitespace, htmlComments, contentCleaning, externalReferences, utils } = require('../utils/regex-patterns');
|
|
17
17
|
const Logger = require('../utils/logger.js');
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -111,7 +111,10 @@ function parseDef(globalState, token, primary, currentFile) {
|
|
|
111
111
|
// IDs stay intact - we create an ID for the original term and each alias
|
|
112
112
|
return token.info.args.reduce((acc, syn) => {
|
|
113
113
|
// Generate a unique term ID by normalizing the synonym: replace whitespace with hyphens and convert to lowercase. The ID is used for fragment identifier (hash) in the URL, which in turn can be used for an anchor in a web page.
|
|
114
|
-
|
|
114
|
+
// Apply sanitization to remove special characters that would break CSS selectors
|
|
115
|
+
const normalizedSyn = syn.replace(whitespace.oneOrMore, '-').toLowerCase();
|
|
116
|
+
const sanitizedSyn = utils.sanitizeTermId(normalizedSyn);
|
|
117
|
+
const termId = `term:${sanitizedSyn}`;
|
|
115
118
|
return `<span id="${termId}">${acc}</span>`;
|
|
116
119
|
}, displayText);
|
|
117
120
|
}
|
|
@@ -238,7 +241,10 @@ function parseTref(token) {
|
|
|
238
241
|
|
|
239
242
|
return termsAndAliases.reduce((acc, syn, index) => {
|
|
240
243
|
// Generate a unique term ID by normalizing the synonym: replace whitespace with hyphens and convert to lowercase
|
|
241
|
-
|
|
244
|
+
// Apply sanitization to remove special characters that would break CSS selectors
|
|
245
|
+
const normalizedSyn = syn.replace(whitespace.oneOrMore, '-').toLowerCase();
|
|
246
|
+
const sanitizedSyn = utils.sanitizeTermId(normalizedSyn);
|
|
247
|
+
const termId = `term:${sanitizedSyn}`;
|
|
242
248
|
// Add title attribute to the innermost span (first in the array, which wraps the display text directly)
|
|
243
249
|
// This provides a tooltip showing which external term this alias refers to
|
|
244
250
|
const titleAttr = index === 0 && aliases.length > 0 ? ` title="Externally defined as ${termName}"` : '';
|
|
@@ -122,11 +122,27 @@ function renderRefGroup(type, specGroups) {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Finds the KaTeX distribution path.
|
|
125
|
-
*
|
|
125
|
+
* Uses Node's require.resolve to reliably locate the package across different installation scenarios.
|
|
126
126
|
* @returns {string} The path to the KaTeX distribution.
|
|
127
127
|
* @throws {Error} If KaTeX distribution cannot be located.
|
|
128
128
|
*/
|
|
129
129
|
function findKatexDist() {
|
|
130
|
+
try {
|
|
131
|
+
// Use require.resolve to find the katex package.json, then get the dist folder
|
|
132
|
+
// This works with npm link, normal installs, and hoisted dependencies
|
|
133
|
+
const katexPackageJsonPath = require.resolve('katex/package.json', {
|
|
134
|
+
paths: [__dirname, process.cwd()]
|
|
135
|
+
});
|
|
136
|
+
const katexDistPath = path.join(path.dirname(katexPackageJsonPath), 'dist');
|
|
137
|
+
|
|
138
|
+
if (fs.existsSync(katexDistPath)) {
|
|
139
|
+
return katexDistPath;
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
// Fallback to old behavior if require.resolve fails
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Fallback: check common locations
|
|
130
146
|
const relpath = "node_modules/katex/dist";
|
|
131
147
|
const paths = [
|
|
132
148
|
path.join(process.cwd(), relpath),
|
|
@@ -137,6 +153,7 @@ function findKatexDist() {
|
|
|
137
153
|
return abspath;
|
|
138
154
|
}
|
|
139
155
|
}
|
|
156
|
+
|
|
140
157
|
throw new Error("katex distribution could not be located");
|
|
141
158
|
}
|
|
142
159
|
|
|
@@ -466,6 +466,28 @@ const utils = {
|
|
|
466
466
|
createGitignoreRegex: function(globPattern) {
|
|
467
467
|
const pattern = '^' + globPattern.replace(/\*/g, '.*').replace(/\//g, '\\/') + '$';
|
|
468
468
|
return new RegExp(pattern);
|
|
469
|
+
},
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Sanitizes a string for use as a valid CSS selector ID
|
|
473
|
+
* Removes special characters that would break querySelector while preserving readability
|
|
474
|
+
*
|
|
475
|
+
* Keeps: letters, numbers, hyphens, underscores, colons
|
|
476
|
+
* Removes: parentheses, brackets, slashes, and other special characters
|
|
477
|
+
*
|
|
478
|
+
* @param {string} str - String to sanitize
|
|
479
|
+
* @returns {string} Sanitized string safe for use in CSS selectors
|
|
480
|
+
*
|
|
481
|
+
* Example:
|
|
482
|
+
* sanitizeTermId("authentic chained data container (ACDC)")
|
|
483
|
+
* → "authentic-chained-data-container-acdc"
|
|
484
|
+
* sanitizeTermId("term/with/slashes") → "term-with-slashes"
|
|
485
|
+
*/
|
|
486
|
+
sanitizeTermId: function(str) {
|
|
487
|
+
return str
|
|
488
|
+
.replace(/[()[\]{}\/\\]/g, '-') // Replace special chars with hyphens
|
|
489
|
+
.replace(/-+/g, '-') // Collapse multiple hyphens into one
|
|
490
|
+
.replace(/^-|-$/g, ''); // Remove leading/trailing hyphens
|
|
469
491
|
}
|
|
470
492
|
};
|
|
471
493
|
|
package/assets/css/refs.css
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.term-reference {
|
|
2
|
-
padding: 3px;
|
|
3
|
-
background-color: #eaf5fb;
|
|
4
|
-
border-radius: 7px;
|
|
5
|
-
position: relative;
|
|
6
|
-
padding-left: 1.5em;
|
|
7
|
-
text-decoration: none;
|
|
8
|
-
box-shadow: inset 0 0 0 1px #a9d9f5;
|
|
9
|
-
transition: box-shadow 0.3s ease-in-out;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.term-reference:hover {
|
|
13
|
-
box-shadow: inset 0 0 0 3px #a9d9f5;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Arrow styling for term references */
|
|
17
|
-
.term-reference::after {
|
|
18
|
-
content: "";
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: 50%;
|
|
21
|
-
transform: translateY(-50%);
|
|
22
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' class='bi bi-box-arrow-right' viewBox='0 0 16 16' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M10 12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 .5.5v2a.5.5 0 0 0 1 0v-2A1.5 1.5 0 0 0 9.5 2h-8A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h8a1.5 1.5 0 0 0 1.5-1.5v-2a.5.5 0 0 0-1 0v2z'/%3E%3Cpath fill-rule='evenodd' d='M15.854 8.354a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L14.293 7.5H5.5a.5.5 0 0 0 0 1h8.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3z'/%3E%3C/svg%3E");
|
|
23
|
-
background-size: contain;
|
|
24
|
-
background-repeat: no-repeat;
|
|
25
|
-
background-position: center;
|
|
26
|
-
width: 0.8rem;
|
|
27
|
-
height: 0.8rem;
|
|
28
|
-
left: 0.2rem;
|
|
29
|
-
|
|
30
|
-
}
|