@obvi/blueprint 1.1.2 → 1.1.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.
@@ -4,7 +4,7 @@ var Ae=Object.create;var Q=Object.defineProperty;var we=Object.getOwnPropertyDes
4
4
  `,`
5
5
  `).split(`
6
6
  `);e[0]?.trim()===""&&e.shift(),e.at(-1)?.trim()===""&&e.pop();let o=c=>c.match(/^[\t ]*/)?.[0].length??0,u=e.length>1&&e[0].trim()!==""&&o(e[0])===0,a=e.filter((c,h)=>c.trim()&&!(u&&h===0)).map(o),f=a.length?Math.min(...a):0;return e.map((c,h)=>u&&h===0?c:c.slice(f)).join(`
7
- `)}function me(n){let e=n.trim().toLowerCase();return he[e]??{grammar:"plain",label:e||"Plain text"}}function fe(n,e){let o=globalThis.Prism,u=o?.languages?.[e],a=u&&e!=="plain";return n.className=`language-${a?e:"none"}`,n.parentElement.className=n.className,n.parentElement.tabIndex=0,a?(n.innerHTML=o.highlight(n.textContent,u,e),!0):!1}var $=class extends HTMLElement{static observedAttributes=["language","open"];static languages=Object.freeze(Object.keys(he));#a;#t;#e;#n;#r=!1;connectedCallback(){this.#r||(this.#n=W(this.textContent??""),this.#s(),this.#r=!0),this.#o()}attributeChangedCallback(){this.#r&&this.#o()}get language(){return this.getAttribute("language")||"text"}set language(e){this.setAttribute("language",e)}get sourceText(){return this.#n??W(this.textContent??"")}#s(){let e=document.createElement("details"),o=document.createElement("summary"),u=document.createElement("span"),a=document.createElement("div"),f=document.createElement("span"),c=document.createElement("button"),h=document.createElement("pre"),g=document.createElement("code");e.className=ge.slice(1),u.className="bp-source-name",u.textContent=this.getAttribute("summary")||"Source",a.className="bp-source-toolbar",f.className="bp-source-language",c.className="bp-source-copy",c.type="button",c.dataset.bpCopy="",c.setAttribute("aria-live","polite"),c.textContent="Copy",g.textContent=this.#n,a.append(f,c),o.append(u,a),h.append(g),e.append(o,h),this.replaceChildren(e),this.#a=e,this.#t=f,this.#e=g}#o(){let e=me(this.language);this.#a.open=this.hasAttribute("open"),this.#t.textContent=e.label,this.#e.textContent=this.#n;let o=fe(this.#e,e.grammar);this.dataset.bpHighlightState=o?"ready":"plain"}};customElements.get(X)||customElements.define(X,$);var pe="bp-cite",_e=0,Te='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="12" height="10" rx="1"/><line x1="10" y1="3" x2="10" y2="13"/><polyline points="4.5,6 6.5,8 4.5,10"/></svg>',Z=class extends HTMLElement{static observedAttributes=["language","loc","code","for"];#a=!1;#t;#e;#n;#r;#s;#o;#l="";#i=!1;#u;#d;connectedCallback(){this.#a||(this.#p(),this.#b(),this.#a=!0),this.#g()}attributeChangedCallback(){this.#a&&(this.#p(),this.#g())}#p(){let e=this.querySelector(":scope > template"),o=this.getAttribute("for")?this.ownerDocument.getElementById(this.getAttribute("for")):null,u=this.getAttribute("code");if(u==null&&o&&(u=o.sourceText??o.textContent),u==null&&e&&(u=e.content.textContent),this.#l=W(u??""),!this.#a){let a="";for(let f of this.childNodes)f.nodeName.toLowerCase()!=="template"&&(a+=f.textContent??"");this.dataset.bpLabel=a.trim()||this.getAttribute("loc")||"source"}}get sourceText(){return this.#l}#b(){let e=`bp-cite-${_e+=1}`,o=document.createElement("button");o.type="button",o.className="bp-cite-trigger",o.textContent=this.dataset.bpLabel,o.setAttribute("aria-describedby",e),o.setAttribute("aria-expanded","false");let u=document.createElement("span");u.className="bp-cite-icon",u.setAttribute("aria-hidden","true"),o.append(u);let a=document.createElement("div");a.className="bp-cite-pop",a.id=e,a.setAttribute("role","tooltip"),a.showPopover&&a.setAttribute("popover","manual");let f=document.createElement("div");f.className="bp-cite-head";let c=document.createElement("span");c.className="bp-cite-loc";let h=document.createElement("div");h.className="bp-cite-actions";let g=document.createElement("span");g.className="bp-cite-lang";let m=document.createElement("button");m.type="button",m.className="bp-cite-expand",m.title="Open in side pane",m.setAttribute("aria-label","Open source in side pane"),m.innerHTML=Te,h.append(g,m),f.append(c,h);let y=document.createElement("pre"),b=document.createElement("code");y.append(b),a.append(f,y),this.replaceChildren(o,a),this.#t=o,this.#e=a,this.#n=b,this.#r=c,this.#s=g,this.#o=m,this.#v()}#g(){let e=me(this.getAttribute("language")||"text");this.#s.textContent=e.label,this.#r.textContent=this.getAttribute("loc")||e.label,this.#t&&(this.#t.firstChild.textContent=this.dataset.bpLabel),this.#n.textContent=this.#l,fe(this.#n,e.grammar)}#v(){let e=()=>{clearTimeout(this.#u),this.#m()},o=()=>{clearTimeout(this.#u),this.#u=setTimeout(()=>this.#c(),140)};this.#t.addEventListener("pointerenter",e),this.#t.addEventListener("pointerleave",o),this.#t.addEventListener("focus",e),this.#t.addEventListener("blur",o),this.#e.addEventListener("pointerenter",()=>clearTimeout(this.#u)),this.#e.addEventListener("pointerleave",o),this.#t.addEventListener("click",()=>{if(this.#S()){this.#h();return}this.#i=!this.#i,this.#i?this.#m():this.#c(!0)}),this.#o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),this.#h()}),this.#d=()=>{this.#e.matches(".bp-cite-pop:popover-open, .bp-cite-pop.is-open")&&this.#f()},window.addEventListener("scroll",this.#d,{passive:!0}),window.addEventListener("resize",this.#d,{passive:!0}),document.addEventListener("keydown",u=>{u.key==="Escape"&&this.#y()&&(this.#i=!1,this.#c(!0),this.#t.focus())})}#y(){return this.#e.matches(".bp-cite-pop:popover-open, .bp-cite-pop.is-open")}#S(){return document.documentElement.hasAttribute("data-bp-cite-pane")}#h(){this.#A(),this.#i=!1,this.#c(!0),this.#t.setAttribute("aria-expanded","true")}#A(){let e=this.#e.querySelector("pre");this.dispatchEvent(new CustomEvent("bp-cite-open",{bubbles:!0,composed:!0,detail:{label:this.dataset.bpLabel,loc:this.getAttribute("loc")||"",language:this.#s.textContent||"",languageId:this.getAttribute("language")||"text",code:this.#l,source:e?e.cloneNode(!0):null}}))}#m(){if(this.#e.showPopover)try{this.#e.matches(":popover-open")||this.#e.showPopover()}catch{this.#e.classList.add("is-open")}else this.#e.classList.add("is-open");this.#t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>this.#f())}#c(e=!1){if(!(this.#i&&!e)){if(this.#e.hidePopover&&this.#e.matches(":popover-open"))try{this.#e.hidePopover()}catch{}this.#e.classList.remove("is-open"),this.#t.setAttribute("aria-expanded","false")}}#f(){let e=this.#t.getBoundingClientRect(),o=this.#e.getBoundingClientRect(),u=10,a=10,f="top",c=e.top-o.height-a;c<u&&(c=e.bottom+a,f="bottom");let h=e.left+e.width/2-o.width/2;h=Math.max(u,Math.min(h,window.innerWidth-o.width-u)),this.#e.style.left=`${Math.round(h)}px`,this.#e.style.top=`${Math.round(c)}px`,this.#e.dataset.placement=f;let g=Math.max(14,Math.min(o.width-14,e.left+e.width/2-h));this.#e.style.setProperty("--bp-cite-caret",`${Math.round(g)}px`)}};customElements.get(pe)||customElements.define(pe,Z);function Ce(n){let e=n.closest(X);return e instanceof $?e:n.querySelector("pre code")}async function Ie(n){if(!globalThis.isSecureContext||!navigator.clipboard?.writeText)throw new Error("The Clipboard API requires a secure context");await navigator.clipboard.writeText(n)}function q(n,e){let o=U.get(n);o&&clearTimeout(o),n.dataset.bpCopyState=e,n.textContent=e==="copied"?"Copied":"Copy failed",U.set(n,setTimeout(()=>{delete n.dataset.bpCopyState,n.textContent="Copy",U.delete(n)},1800))}document.addEventListener("click",async n=>{let e=n.target instanceof Element?n.target.closest("[data-bp-copy]"):null;if(!(e instanceof HTMLButtonElement))return;n.preventDefault();let o=e.closest(ge),u=o?Ce(o):null;if(!u)return q(e,"error");let a=u instanceof $?u.sourceText:u.textContent;try{await Ie(a??""),q(e,"copied")}catch{q(e,"error")}});z.default.highlightAll();
7
+ `)}function me(n){let e=n.trim().toLowerCase();return he[e]??{grammar:"plain",label:e||"Plain text"}}function fe(n,e){let o=globalThis.Prism,u=o?.languages?.[e],a=u&&e!=="plain";return n.className=`language-${a?e:"none"}`,n.parentElement.className=n.className,n.parentElement.tabIndex=0,a?(n.innerHTML=o.highlight(n.textContent,u,e),!0):!1}var $=class extends HTMLElement{static observedAttributes=["language","open"];static languages=Object.freeze(Object.keys(he));#a;#t;#e;#n;#r=!1;connectedCallback(){this.#r||(this.#n=W(this.textContent??""),this.#s(),this.#r=!0,this.dataset.bpRendered="1"),this.#o()}attributeChangedCallback(){this.#r&&this.#o()}get language(){return this.getAttribute("language")||"text"}set language(e){this.setAttribute("language",e)}get sourceText(){return this.#n??W(this.textContent??"")}#s(){let e=document.createElement("details"),o=document.createElement("summary"),u=document.createElement("span"),a=document.createElement("div"),f=document.createElement("span"),c=document.createElement("button"),h=document.createElement("pre"),g=document.createElement("code");e.className=ge.slice(1),u.className="bp-source-name",u.textContent=this.getAttribute("summary")||"Source",a.className="bp-source-toolbar",f.className="bp-source-language",c.className="bp-source-copy",c.type="button",c.dataset.bpCopy="",c.setAttribute("aria-live","polite"),c.textContent="Copy",g.textContent=this.#n,a.append(f,c),o.append(u,a),h.append(g),e.append(o,h),this.replaceChildren(e),this.#a=e,this.#t=f,this.#e=g}#o(){let e=me(this.language);this.#a.open=this.hasAttribute("open"),this.#t.textContent=e.label,this.#e.textContent=this.#n;let o=fe(this.#e,e.grammar);this.dataset.bpHighlightState=o?"ready":"plain"}};customElements.get(X)||customElements.define(X,$);var pe="bp-cite",_e=0,Te='<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="12" height="10" rx="1"/><line x1="10" y1="3" x2="10" y2="13"/><polyline points="4.5,6 6.5,8 4.5,10"/></svg>',Z=class extends HTMLElement{static observedAttributes=["language","loc","code","for"];#a=!1;#t;#e;#n;#r;#s;#o;#l="";#i=!1;#u;#d;connectedCallback(){this.#a||(this.#p(),this.#b(),this.#a=!0),this.#g()}attributeChangedCallback(){this.#a&&(this.#p(),this.#g())}#p(){let e=this.querySelector(":scope > template"),o=this.getAttribute("for")?this.ownerDocument.getElementById(this.getAttribute("for")):null,u=this.getAttribute("code");if(u==null&&o&&(u=o.sourceText??o.textContent),u==null&&e&&(u=e.content.textContent),this.#l=W(u??""),!this.#a){let a="";for(let f of this.childNodes)f.nodeName.toLowerCase()!=="template"&&(a+=f.textContent??"");this.dataset.bpLabel=a.trim()||this.getAttribute("loc")||"source"}}get sourceText(){return this.#l}#b(){let e=`bp-cite-${_e+=1}`,o=document.createElement("button");o.type="button",o.className="bp-cite-trigger",o.textContent=this.dataset.bpLabel,o.setAttribute("aria-describedby",e),o.setAttribute("aria-expanded","false");let u=document.createElement("span");u.className="bp-cite-icon",u.setAttribute("aria-hidden","true"),o.append(u);let a=document.createElement("div");a.className="bp-cite-pop",a.id=e,a.setAttribute("role","tooltip"),a.showPopover&&a.setAttribute("popover","manual");let f=document.createElement("div");f.className="bp-cite-head";let c=document.createElement("span");c.className="bp-cite-loc";let h=document.createElement("div");h.className="bp-cite-actions";let g=document.createElement("span");g.className="bp-cite-lang";let m=document.createElement("button");m.type="button",m.className="bp-cite-expand",m.title="Open in side pane",m.setAttribute("aria-label","Open source in side pane"),m.innerHTML=Te,h.append(g,m),f.append(c,h);let y=document.createElement("pre"),b=document.createElement("code");y.append(b),a.append(f,y),this.replaceChildren(o,a),this.#t=o,this.#e=a,this.#n=b,this.#r=c,this.#s=g,this.#o=m,this.#v()}#g(){let e=me(this.getAttribute("language")||"text");this.#s.textContent=e.label,this.#r.textContent=this.getAttribute("loc")||e.label,this.#t&&(this.#t.firstChild.textContent=this.dataset.bpLabel),this.#n.textContent=this.#l,fe(this.#n,e.grammar)}#v(){let e=()=>{clearTimeout(this.#u),this.#m()},o=()=>{clearTimeout(this.#u),this.#u=setTimeout(()=>this.#c(),140)};this.#t.addEventListener("pointerenter",e),this.#t.addEventListener("pointerleave",o),this.#t.addEventListener("focus",e),this.#t.addEventListener("blur",o),this.#e.addEventListener("pointerenter",()=>clearTimeout(this.#u)),this.#e.addEventListener("pointerleave",o),this.#t.addEventListener("click",()=>{if(this.#S()){this.#h();return}this.#i=!this.#i,this.#i?this.#m():this.#c(!0)}),this.#o.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),this.#h()}),this.#d=()=>{this.#e.matches(".bp-cite-pop:popover-open, .bp-cite-pop.is-open")&&this.#f()},window.addEventListener("scroll",this.#d,{passive:!0}),window.addEventListener("resize",this.#d,{passive:!0}),document.addEventListener("keydown",u=>{u.key==="Escape"&&this.#y()&&(this.#i=!1,this.#c(!0),this.#t.focus())})}#y(){return this.#e.matches(".bp-cite-pop:popover-open, .bp-cite-pop.is-open")}#S(){return document.documentElement.hasAttribute("data-bp-cite-pane")}#h(){this.#A(),this.#i=!1,this.#c(!0),this.#t.setAttribute("aria-expanded","true")}#A(){let e=this.#e.querySelector("pre");this.dispatchEvent(new CustomEvent("bp-cite-open",{bubbles:!0,composed:!0,detail:{label:this.dataset.bpLabel,loc:this.getAttribute("loc")||"",language:this.#s.textContent||"",languageId:this.getAttribute("language")||"text",code:this.#l,source:e?e.cloneNode(!0):null}}))}#m(){if(this.#e.showPopover)try{this.#e.matches(":popover-open")||this.#e.showPopover()}catch{this.#e.classList.add("is-open")}else this.#e.classList.add("is-open");this.#t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>this.#f())}#c(e=!1){if(!(this.#i&&!e)){if(this.#e.hidePopover&&this.#e.matches(":popover-open"))try{this.#e.hidePopover()}catch{}this.#e.classList.remove("is-open"),this.#t.setAttribute("aria-expanded","false")}}#f(){let e=this.#t.getBoundingClientRect(),o=this.#e.getBoundingClientRect(),u=10,a=10,f="top",c=e.top-o.height-a;c<u&&(c=e.bottom+a,f="bottom");let h=e.left+e.width/2-o.width/2;h=Math.max(u,Math.min(h,window.innerWidth-o.width-u)),this.#e.style.left=`${Math.round(h)}px`,this.#e.style.top=`${Math.round(c)}px`,this.#e.dataset.placement=f;let g=Math.max(14,Math.min(o.width-14,e.left+e.width/2-h));this.#e.style.setProperty("--bp-cite-caret",`${Math.round(g)}px`)}};customElements.get(pe)||customElements.define(pe,Z);function Ce(n){let e=n.closest(X);return e instanceof $?e:n.querySelector("pre code")}async function Ie(n){if(!globalThis.isSecureContext||!navigator.clipboard?.writeText)throw new Error("The Clipboard API requires a secure context");await navigator.clipboard.writeText(n)}function q(n,e){let o=U.get(n);o&&clearTimeout(o),n.dataset.bpCopyState=e,n.textContent=e==="copied"?"Copied":"Copy failed",U.set(n,setTimeout(()=>{delete n.dataset.bpCopyState,n.textContent="Copy",U.delete(n)},1800))}document.addEventListener("click",async n=>{let e=n.target instanceof Element?n.target.closest("[data-bp-copy]"):null;if(!(e instanceof HTMLButtonElement))return;n.preventDefault();let o=e.closest(ge),u=o?Ce(o):null;if(!u)return q(e,"error");let a=u instanceof $?u.sourceText:u.textContent;try{await Ie(a??""),q(e,"copied")}catch{q(e,"error")}});z.default.highlightAll();
8
8
  /*! Bundled license information:
9
9
 
10
10
  prismjs/components/prism-core.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obvi/blueprint",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A classless-first CSS design system for beautiful technical blueprint documents.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,7 +41,8 @@
41
41
  "render": "node harness/render.mjs",
42
42
  "measure": "node harness/measure.mjs && node harness/behavior.mjs && node harness/navigation-clipping.mjs",
43
43
  "verify:package": "node scripts/verify-package.mjs",
44
- "verify:release-evidence": "node --test harness/release-evidence.test.mjs",
44
+ "verify:release-evidence": "node --test harness/release-evidence.test.mjs scripts/verify-published-package.test.mjs",
45
+ "verify:published": "node scripts/verify-published-package.mjs",
45
46
  "lint:style": "node scripts/lint-style.mjs",
46
47
  "release:evidence": "node harness/release-evidence.mjs",
47
48
  "verify": "npm run build && npm run lint:style && npm run verify:release-evidence && npm run measure && npm run verify:package",