@pure-ds/core 0.7.51 → 0.7.52

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.
@@ -1 +1 @@
1
- {"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"AAm+LA;;;;;;;;;;;GAWG;AACH,8CAPW,MAAM,YAEd;IAAyB,WAAW,GAA5B,MAAM;IACY,cAAc,GAAhC,OAAO;IACU,WAAW,GAA5B,MAAM;CACd,GAAU;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,CA0VrL;AAED;;;;;;;GAOG;AACH,0CAJW,KAAK,CAAC,MAAM,CAAC,YACb,MAAM,GACJ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,OAAO,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,GAAG,EAAC,MAAM,CAAC;YAAC,OAAO,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,OAAO,EAAC,MAAM,CAAC;YAAC,OAAO,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC,CAAA;KAAE,CAAC,CAAA;CAAE,CAkGtO;AA/6MD;;;GAGG;AACH;IAEE,mCAAiB;IAEjB,2BAEC;IAOD,0BA6CC;IA5CC;;MAIC;IAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAmC;IA6BrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCC;IAiiBD;;;;OAIG;IACH,kDAyBC;IAiFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6DC;IAuoID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEC;IAGD,oBAEC;IAgyBD,qBAEC;IACD,yBAEC;IACD,yBAEC;IACD,wBAEC;IACD,yBAMC;IAED;;;;;;OAMG;IACH,oBA6JC;IAGD,4BAEC;IACD,gCAEC;IACD,gCAEC;IACD,+BAEC;IAmBD;;;OAGG;IACH;;;;;;MAoBC;;CAkBF"}
1
+ {"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"AAugMA;;;;;;;;;;;GAWG;AACH,8CAPW,MAAM,YAEd;IAAyB,WAAW,GAA5B,MAAM;IACY,cAAc,GAAhC,OAAO;IACU,WAAW,GAA5B,MAAM;CACd,GAAU;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,CA0VrL;AAED;;;;;;;GAOG;AACH,0CAJW,KAAK,CAAC,MAAM,CAAC,YACb,MAAM,GACJ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,OAAO,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,GAAG,EAAC,MAAM,CAAC;YAAC,OAAO,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,OAAO,EAAC,MAAM,CAAC;YAAC,OAAO,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC,CAAA;KAAE,CAAC,CAAA;CAAE,CAkGtO;AAn9MD;;;GAGG;AACH;IAEE,mCAAiB;IAEjB,2BAEC;IAOD,0BA6CC;IA5CC;;MAIC;IAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAmC;IA6BrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCC;IAiiBD;;;;OAIG;IACH,kDAyBC;IAiFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6DC;IA2qID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEC;IAGD,oBAEC;IAgyBD,qBAEC;IACD,yBAEC;IACD,yBAEC;IACD,wBAEC;IACD,yBAMC;IAED;;;;;;OAMG;IACH,oBA6JC;IAGD,4BAEC;IACD,gCAEC;IACD,gCAEC;IACD,+BAEC;IAmBD;;;OAGG;IACH;;;;;;MAoBC;;CAkBF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.7.51",
4
+ "version": "0.7.52",
5
5
  "description": "Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  var it=Object.defineProperty;var at=(e,t)=>{for(var n in t)it(e,n,{get:t[n],enumerable:!0})};var ae=class extends EventTarget{constructor(){super(),this.mode=null,this.compiled=null,this.log=()=>{},this.logHandler=null}},je="__PURE_DS_PDS_SINGLETON__",ce=typeof globalThis<"u"?globalThis:window,ie=ce?.[je],o=ie&&typeof ie.addEventListener=="function"?ie:new ae;ce&&(ce[je]=o);typeof o.log!="function"&&(o.log=(e="log",t,...n)=>{if(typeof console>"u")return;let s=typeof console[e]=="function"?console[e].bind(console):typeof console.log=="function"?console.log.bind(console):null;s&&(n.length>0?s(t,...n):s(t))});typeof o.logHandler!="function"&&(o.logHandler=null);var le=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(n){o.log("error",`Registry: failed to load static ${t}:`,n),o.log("error",`Registry: looking for ${this._staticPaths[t]}`),o.log("error","Registry: make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let s=new CSSStyleSheet;return s.replaceSync("/* Failed to load "+t+" */"),s}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},C=new le;async function Pe(e,t=[],n=null){try{let s=n?.primitivesStylesheet?n.primitivesStylesheet:await C.getStylesheet("primitives");e.adoptedStyleSheets=[s,...t]}catch(s){let a=e.host?.tagName?.toLowerCase()||"unknown";o.log("error",`Adopter: <${a}> failed to adopt primitives:`,s),e.adoptedStyleSheets=t}}async function ke(e,t=["primitives"],n=[],s=null){let a=Array.isArray(n)?n.filter(Boolean):[];if(a.length){let l=(Array.isArray(e.adoptedStyleSheets)?e.adoptedStyleSheets:[]).filter(S=>!a.includes(S));e.adoptedStyleSheets=[...l,...a]}try{let l=(await Promise.all(t.map(async S=>{if(s)switch(S){case"tokens":return s.tokensStylesheet;case"primitives":return s.primitivesStylesheet;case"components":return s.componentsStylesheet;case"utilities":return s.utilitiesStylesheet;default:break}return C.getStylesheet(S)}))).filter(S=>S!==null);e.adoptedStyleSheets=[...l,...a]}catch(r){let l=e.host?.tagName?.toLowerCase()||"unknown";o.log("error",`Adopter: <${l}> failed to adopt layers:`,r),e.adoptedStyleSheets=a}}function xe(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var Re={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var pe={};at(pe,{deepMerge:()=>De,fragmentFromTemplateLike:()=>de,isObject:()=>H,parseHTML:()=>ue});function H(e){return e&&typeof e=="object"&&!Array.isArray(e)}function De(e,t){let n={...e};return H(e)&&H(t)&&Object.keys(t).forEach(s=>{H(t[s])?s in e?n[s]=De(e[s],t[s]):Object.assign(n,{[s]:t[s]}):Object.assign(n,{[s]:t[s]})}),n}function de(e){let t=Array.isArray(e?.strings)?e.strings:[],n=Array.isArray(e?.values)?e.values:[],s=new Set,a=[],r=/(\s)(\.[\w-]+)=\s*$/,l=/(\s)(@[\w-]+)=\s*$/,S=/(\s)(\?[\w-]+)=\s*$/,g=/(\s)([\w:-]+)=\s*$/;for(let c=0;c<t.length;c+=1){let y=t[c]??"";if(c<n.length){let L=`pds-val-${c}`,v=y.match(r),b=y.match(l),d=y.match(S),w=y.match(g);if(v){let E=v[2].slice(1);y=y.replace(r,`$1data-pds-bind-${c}="prop:${E}:${L}"`),s.add(c)}else if(b){let E=b[2].slice(1);y=y.replace(l,`$1data-pds-bind-${c}="event:${E}:${L}"`),s.add(c)}else if(d){let E=d[2].slice(1);y=y.replace(S,`$1data-pds-bind-${c}="boolean:${E}:${L}"`),s.add(c)}else if(w){let E=w[2];y=y.replace(g,`$1data-pds-bind-${c}="attr:${E}:${L}"`),s.add(c)}}a.push(y),c<n.length&&!s.has(c)&&a.push(`<!--pds-val-${c}-->`)}let u=document.createElement("template");u.innerHTML=a.join("");let i=(c,y)=>{let L=c.parentNode;if(!L)return;if(y==null){L.removeChild(c);return}let v=b=>{if(b!=null){if(b instanceof Node){L.insertBefore(b,c);return}if(Array.isArray(b)){b.forEach(d=>v(d));return}L.insertBefore(document.createTextNode(String(b)),c)}};v(y),L.removeChild(c)},m=document.createTreeWalker(u.content,NodeFilter.SHOW_COMMENT),j=[];for(;m.nextNode();){let c=m.currentNode;c?.nodeValue?.startsWith("pds-val-")&&j.push(c)}return j.forEach(c=>{let y=Number(c.nodeValue.replace("pds-val-",""));i(c,n[y])}),u.content.querySelectorAll("*").forEach(c=>{[...c.attributes].forEach(y=>{if(!y.name.startsWith("data-pds-bind-"))return;let L=y.value.indexOf(":"),v=y.value.lastIndexOf(":");if(L<=0||v<=L){c.removeAttribute(y.name);return}let b=y.value.slice(0,L),d=y.value.slice(L+1,v),w=y.value.slice(v+1),E=Number(String(w).replace("pds-val-","")),P=n[E];if(!d||!Number.isInteger(E)){c.removeAttribute(y.name);return}b==="prop"?c[d]=P:b==="event"?(typeof P=="function"||P&&typeof P.handleEvent=="function")&&c.addEventListener(d,P):b==="boolean"?P?c.setAttribute(d,""):c.removeAttribute(d):b==="attr"&&(P==null||P===!1?c.removeAttribute(d):c.setAttribute(d,String(P))),c.removeAttribute(y.name)})}),u.content}function ue(e,...t){return Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,"raw")?de({strings:Array.from(e),values:t}).childNodes:Array.isArray(e?.strings)&&Array.isArray(e?.values)?de({strings:e.strings,values:e.values}).childNodes:new DOMParser().parseFromString(String(e??""),"text/html").body.childNodes}var Ce="pds",ct=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ze=/^[a-z]:/i;function N(e=""){return e.endsWith("/")?e:`${e}/`}function lt(e="",t=Ce){let n=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(n)?n:`${n}/${t}`}function dt(e){return e.replace(/^\.\/+/,"")}function ut(e){return ze.test(e)?e.replace(ze,"").replace(/^\/+/,""):e}function pt(e){return e.startsWith("public/")?e.substring(7):e}function K(e,t={}){let n=t.segment||Ce,s=t.defaultRoot||`/assets/${n}/`,a=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!a||typeof a!="string")return N(s);let r=a.trim();return r?(r=r.replace(/\\/g,"/"),r=lt(r,n),r=N(r),ct.test(r)?r:(r=dt(r),r=ut(r),r.startsWith("/")||(r=pt(r),r.startsWith("/")||(r=`/${r}`),r=r.replace(/\/+/g,(l,S)=>S===0?l:"/")),N(r))):N(s)}async function ft(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let n=e,{baseURL:s,mapper:a=u=>`${u}.js`,onError:r=(u,i)=>console.error(`[defineWebComponents] ${u}:`,i)}=t,l=s?new URL(s,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),S=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(i,m,j)=>j.toUpperCase()),g=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let i=a(u),j=await import(i instanceof URL?i.href:new URL(i,l).href),_=j?.default??j?.[S(u)];if(!_){if(customElements.get(u))return{tag:u,status:"self-defined"};throw new Error(`No export found for ${u}. Expected default export or named export "${S(u)}".`)}return customElements.get(u)?{tag:u,status:"race-already-defined"}:(customElements.define(u,_),{tag:u,status:"defined"})}catch(i){throw r(u,i),i}};return Promise.all(n.map(g))}var G=class{constructor(t={}){let{baseURL:n,mapper:s,onError:a,predicate:r=()=>!0,attributeModule:l="data-module",root:S=document,scanExisting:g=!0,debounceMs:u=16,observeShadows:i=!0,enhancers:m=[],patchAttachShadow:j=!0}=t,_=new Set,c=new Set,y=new Set,L=new Map,v=new WeakMap,b=new WeakMap,d=0,w=!1,E=null,P=p=>{if(!p||!m.length)return;let h=b.get(p);h||(h=new Set,b.set(p,h));for(let f of m)if(!(!f.selector||!f.run)&&!h.has(f.selector))try{p.matches&&p.matches(f.selector)&&(f.run(p),h.add(f.selector))}catch(k){console.warn(`[AutoDefiner] Error applying enhancer for selector "${f.selector}":`,k)}},$=(p,h)=>{if(!w&&!(!p||!p.includes("-"))&&!customElements.get(p)&&!c.has(p)&&!y.has(p)){if(h&&h.getAttribute){let f=h.getAttribute(l);f&&!L.has(p)&&L.set(p,f)}_.add(p),rt()}},rt=()=>{d||(d=setTimeout(Ee,u))},D=p=>{if(p){if(p.nodeType===1){let h=p,f=h.tagName?.toLowerCase();f&&f.includes("-")&&!customElements.get(f)&&r(f,h)&&$(f,h),P(h),i&&h.shadowRoot&&re(h.shadowRoot)}p.querySelectorAll&&p.querySelectorAll("*").forEach(h=>{let f=h.tagName?.toLowerCase();f&&f.includes("-")&&!customElements.get(f)&&r(f,h)&&$(f,h),P(h),i&&h.shadowRoot&&re(h.shadowRoot)})}},re=p=>{if(!p||v.has(p))return;D(p);let h=new MutationObserver(f=>{for(let k of f)k.addedNodes?.forEach(z=>{D(z)}),k.type==="attributes"&&k.target&&D(k.target)});h.observe(p,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[l,...m.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),v.set(p,h)};async function Ee(){if(clearTimeout(d),d=0,!_.size)return;let p=Array.from(_);_.clear(),p.forEach(h=>c.add(h));try{let h=f=>L.get(f)??(s?s(f):`${f}.js`);await ft(...p,{baseURL:n,mapper:h,onError:(f,k)=>{y.add(f),a?.(f,k)}})}catch{}finally{p.forEach(h=>c.delete(h))}}let ve=S===document?document.documentElement:S,Ae=new MutationObserver(p=>{for(let h of p)h.addedNodes?.forEach(f=>{D(f)}),h.type==="attributes"&&h.target&&D(h.target)});if(Ae.observe(ve,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[l,...m.map(p=>p.selector).filter(p=>p.startsWith("data-"))]}),i&&j&&Element.prototype.attachShadow){let p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(f){let k=p.call(this,f);if(f&&f.mode==="open"){re(k);let z=this.tagName?.toLowerCase();z&&z.includes("-")&&!customElements.get(z)&&$(z,this)}return k},E=()=>Element.prototype.attachShadow=p}return g&&D(ve),{stop(){w=!0,Ae.disconnect(),E&&E(),d&&(clearTimeout(d),d=0),v.forEach(p=>p.disconnect())},flush:Ee}}static async define(...t){let n={};t.length&&typeof t[t.length-1]=="object"&&(n=t.pop()||{});let s=t,{baseURL:a,mapper:r=i=>`${i}.js`,onError:l=(i,m)=>console.error(`[defineWebComponents] ${i}:`,m)}=n,S=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),g=i=>i.toLowerCase().replace(/(^|-)([a-z])/g,(m,j,_)=>_.toUpperCase()),u=async i=>{try{if(customElements.get(i))return{tag:i,status:"already-defined"};let m=r(i),_=await import(m instanceof URL?m.href:new URL(m,S).href),c=_?.default??_?.[g(i)];if(!c){if(customElements.get(i))return{tag:i,status:"self-defined"};throw new Error(`No export found for ${i}. Expected default export or named export "${g(i)}".`)}return customElements.get(i)?{tag:i,status:"race-already-defined"}:(customElements.define(i,c),{tag:i,status:"defined"})}catch(m){throw l(i,m),m}};return Promise.all(s.map(u))}};var mt=/^[a-z][a-z0-9+\-.]*:\/\//i,O=(()=>{try{return import.meta.url}catch{return}})(),J=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function q(e,t={}){if(!e||mt.test(e))return e;let{preferModule:n=!0}=t,s=()=>{if(!O)return null;try{return new URL(e,O).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(n?s()||a():a()||s())||e}var Te=(()=>{if(O)try{let e=new URL(O);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",O).href}catch{return}})(),Me=!1;function Ue(e){Me||typeof document>"u"||(Me=!0,e.addEventListener("pds:ready",t=>{let n=t.detail?.mode;n&&document.documentElement.classList.add(`pds-${n}`,"pds-ready")}))}function $e({manageTheme:e,themeStorageKey:t,applyResolvedTheme:n,setupSystemListenerIfNeeded:s}){let a="light",r=null;if(e&&typeof window<"u"){try{r=localStorage.getItem(t)||null}catch{r=null}try{n?.(r),s?.(r)}catch{}r?r==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=r:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:r}}function V(e,{resolvePublicAssetURL:t}){let n=!!(e?.public?.root||e?.static?.root),s=t(e);return!n&&Te&&(s=Te),J(q(s))}async function Ne(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:n="/auto-define/",autoDefinePreload:s=[],autoDefineMapper:a=null,enhancers:r=[],autoDefineOverrides:l=null,autoDefinePreferModule:S=!0}=e,g=(()=>{let i=new Map;return(t||[]).forEach(m=>i.set(m.selector,m)),(r||[]).forEach(m=>i.set(m.selector,m)),Array.from(i.values())})(),u=null;if(typeof window<"u"&&typeof document<"u"){let i=G,m=d=>{switch(d){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${d}.js`}},{mapper:j,enhancers:_,...c}=l&&typeof l=="object"?l:{},y=_?Array.isArray(_)?_:typeof _=="object"?Object.values(_):[]:[],L=(()=>{let d=new Map;return(g||[]).forEach(w=>{w?.selector&&d.set(w.selector,w)}),(y||[]).forEach(w=>{if(!w?.selector)return;let E=d.get(w.selector)||null;d.set(w.selector,{...E||{},...w,run:typeof w?.run=="function"?w.run:E?.run})}),Array.from(d.values())})(),b={baseURL:n&&J(q(n,{preferModule:S})),predefine:s,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:L,onError:(d,w)=>{if(typeof d=="string"&&d.startsWith("pds-")){let P=["pds-form","pds-drawer"].includes(d),$=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");P&&$?o.log("error",`\u274C PDS component <${d}> requires Lit but #pds/lit is not in import map.
2
- See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):o.log("warn",`\u26A0\uFE0F PDS component <${d}> not found. Assets may not be installed.`)}else o.log("error",`\u274C Auto-define error for <${d}>:`,w)},...c,mapper:d=>{if(customElements.get(d))return null;if(typeof a=="function")try{let w=a(d);return w===void 0?m(d):w}catch(w){return o.log("warn","Custom autoDefine.mapper error; falling back to default:",w?.message||w),m(d)}return m(d)}};u=new i(b),s.length>0&&typeof i.define=="function"&&await i.define(...s,{baseURL:n,mapper:b.mapper,onError:b.onError})}return{autoDefiner:u,mergedEnhancers:g}}var fe=["light","dark"],me=new Set(fe);function ht(e){let n=(Array.isArray(e?.themes)?e.themes.map(s=>String(s).toLowerCase()):fe).filter(s=>me.has(s));return n.length?n:fe}function he(e,{preferDocument:t=!0}={}){let n=String(e||"").toLowerCase();if(me.has(n))return n;if(t&&typeof document<"u"){let s=document.documentElement?.getAttribute("data-theme");if(me.has(s))return s}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Oe(e,t){let n=he(t);return ht(e).includes(n)}var yt=new Set(["log","warn","error","debug","info"]),gt="__PURE_DS_PDS_SINGLETON__",ye=null,ge=null;function Fe(){try{let t=(typeof globalThis<"u"?globalThis:window)?.[gt];if(t&&typeof t=="object")return t}catch{return null}return null}function bt(e){return!e||typeof e!="object"?null:{mode:e.mode==="live"||e.mode==="static"?e.mode:null,debug:e.debug===!0,thisArg:e.thisArg}}function wt(e){if(typeof e!="string")return"log";let t=e.toLowerCase();return yt.has(t)?t:"log"}function St(){if(typeof ge=="function")try{let t=bt(ge());if(t)return t}catch{}let e=Fe();if(e){let t=e?.mode||e?.compiled?.mode||(e?.registry?.isLive?"live":"static"),n=(e?.debug||e?.currentConfig?.debug||e?.currentConfig?.design?.debug||e?.compiled?.debug||e?.compiled?.design?.debug||!1)===!0;return{mode:t,debug:n,thisArg:e}}return{mode:null,debug:!1}}function Lt(){if(typeof ye=="function")try{let t=ye();if(typeof t=="function")return t}catch{}let e=Fe();return typeof e?.logHandler=="function"?e.logHandler:null}function Ie(e,t,...n){if(typeof console>"u")return;let s=typeof console[e]=="function"?console[e].bind(console):typeof console.log=="function"?console.log.bind(console):null;s&&(n.length>0?s(t,...n):s(t))}function _t(e,t){let n=t?.debug===!0;return!(t?.mode==="static"&&!n||!n&&e!=="error"&&e!=="warn")}function We({getLogger:e,getContext:t}={}){ye=typeof e=="function"?e:null,ge=typeof t=="function"?t:null}function Be(e="log",t,...n){let s=wt(e),a=St(),r=Lt();if(r)try{r.call(a?.thisArg,s,t,...n);return}catch(l){Ie("error","Custom log handler failed:",l)}_t(s,a)&&Ie(s,t,...n)}typeof o.initializing!="boolean"&&(o.initializing=!1);"currentPreset"in o||(o.currentPreset=null);typeof o.debug!="boolean"&&(o.debug=!1);"currentConfig"in o||(o.currentConfig=null);"compiled"in o||(o.compiled=null);typeof o.logHandler!="function"&&(o.logHandler=null);"mode"in o||(o.mode=null);var Q=null,Y=null,Z=null,X=null,ee=null,te=null,Ke="__pdsLocalizationRuntime";function T(){if(te)return te;let e=o?.[Ke];return e&&typeof e=="object"?(te=e,e):null}function Et(e){let t=e&&typeof e=="object"?e:null;te=t,o[Ke]=t}We({getLogger:()=>typeof o.logHandler=="function"?o.logHandler:null,getContext:()=>{let e=o?.mode||o?.compiled?.mode||(o?.registry?.isLive?"live":"static"),t=(o?.debug||o?.currentConfig?.debug||o?.currentConfig?.design?.debug||o?.compiled?.debug||o?.compiled?.design?.debug||!1)===!0;return{mode:e,debug:t,thisArg:o}}});o.log=(e="log",t,...n)=>{Be(e,t,...n)};var A={locale:"en",messages:{},hasProvider:!1},ne=new Set;function Ge(e){return!!e&&typeof e!="string"&&typeof e=="object"&&"strTag"in e}function Je(e=[]){let t="";for(let n=0;n<=e.length-1;n+=1)t+=e[n],n<e.length-1&&(t+=`{${n}}`);return t}function vt(e,t){return String(e).replace(/\{(\d+)\}/g,(n,s)=>t(Number(s)))}function At(e){if(!e||typeof e!="object")return{};let t={};for(let[n,s]of Object.entries(e)){if(typeof s=="string"){t[n]=s;continue}s&&typeof s=="object"&&typeof s.content=="string"&&(t[n]=s.content)}return t}function jt(e,...t){return{strTag:!0,strings:Array.from(e||[]),values:t,raw:Array.from(e?.raw||[])}}function Pt(e){if(!e)return"";if(Ge(e)){let n=Je(e.strings||[]),s=A.messages[n]||n;return vt(s,a=>e.values?.[a])}let t=String(e);return A.messages[t]||t}function kt(e){if(!e)return;let t=Ge(e)?Je(e.strings||[]):String(e);typeof t=="string"&&t.length>0&&ne.add(t)}function qe(e){if(!e||typeof e.msg!="function"||ne.size===0)return;let t=Array.from(ne);ne.clear();for(let n of t)try{e.msg(n)}catch{}}async function F(){let e=T();return e||(ee||(ee=import(W("pds-localization.js")).then(n=>{if(typeof n?.msg!="function"||typeof n?.str!="function"||typeof n?.configureLocalization!="function"||typeof n?.loadLocale!="function"||typeof n?.setLocale!="function"||typeof n?.getLocalizationState!="function")throw new Error("Failed to load localization runtime exports");return Et(n),qe(n),n}).catch(n=>{throw ee=null,n})),ee)}var M=(e,t={})=>{let n=T();return typeof n?.msg=="function"?n.msg(e,t):(kt(e),Pt(e,t))},oe=(e,...t)=>{let n=T();return typeof n?.str=="function"?n.str(e,...t):jt(e,...t)},se=(e=null)=>{let t=T();if(typeof t?.configureLocalization=="function")return t.configureLocalization(e);if(!e||typeof e!="object")return A.locale="en",A.messages={},A.hasProvider=!1,{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider};typeof e.locale=="string"&&e.locale.trim()&&(A.locale=e.locale.trim()),Object.prototype.hasOwnProperty.call(e,"messages")&&(A.messages=At(e.messages));let n=!!(e.provider||e.translate||e.loadLocale||e.setLocale);return A.hasProvider=n,n&&F().then(s=>{s.configureLocalization(e),qe(s)}).catch(()=>{}),{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider}},Ve=async e=>(await F()).loadLocale(e),Qe=async(e,t={})=>(await F()).setLocale(e,t),Ye=()=>{let e=T();return typeof e?.getLocalizationState=="function"?e.getLocalizationState():{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider}},Ze=(e={})=>{let t=T();if(typeof t?.createJSONLocalization=="function")return t.createJSONLocalization(e);let n=typeof e?.locale=="string"&&e.locale.trim()?e.locale.trim().toLowerCase():"en",s=Array.isArray(e?.locales)?e.locales.map(g=>String(g||"").trim().toLowerCase()).filter(Boolean):[],a=Array.from(new Set([n,...s])),r=null,l=async()=>(r||(r=F().then(g=>typeof g?.createJSONLocalization=="function"?g.createJSONLocalization(e):null).catch(()=>null)),r),S=async(g="loadLocale")=>{let u=await l();if(!u||typeof u!="object")return null;let i=u.provider;if(!i||typeof i!="object")return null;let m=i[g];return typeof m=="function"?m:g==="setLocale"&&typeof i.loadLocale=="function"?i.loadLocale:null};return{locale:n,locales:[...a],provider:{locales:[...a],async loadLocale(g={}){let u=await S("loadLocale");return typeof u!="function"?{}:u(g)},async setLocale(g={}){let u=await S("setLocale");return typeof u!="function"?{}:u(g)}}}};function W(e,t){return t&&typeof t=="string"?t:`${V(o.currentConfig||{},{resolvePublicAssetURL:K})}core/${e}`}async function xt(){return Array.isArray(o.defaultEnhancers)&&o.defaultEnhancers.length>0?o.defaultEnhancers:(X||(X=import(W("pds-enhancers.js",o.currentConfig?.enhancersURL)).then(t=>{let n=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return o.defaultEnhancers=n,n}).catch(t=>{throw X=null,t})),X)}async function Rt(){return typeof o.ask=="function"&&o.ask!==Xe?o.ask:(Y||(Y=import(W("pds-ask.js",o.currentConfig?.askURL)).then(t=>{let n=t?.ask;if(typeof n!="function")throw new Error("Failed to load ask helper");return o.ask=n,n}).catch(t=>{throw Y=null,t})),Y)}async function B(){return typeof o.toast=="function"&&o.toast!==U?o.toast:(Z||(Z=import(W("pds-toast.js",o.currentConfig?.toastURL)).then(t=>{let n=t?.toast;if(typeof n!="function")throw new Error("Failed to load toast helper");return o.toast=n,n}).catch(t=>{throw Z=null,t})),Z)}async function Xe(...e){return(await Rt())(...e)}async function U(...e){return(await B())(...e)}U.success=async(...e)=>(await B()).success(...e);U.error=async(...e)=>(await B()).error(...e);U.warning=async(...e)=>(await B()).warning(...e);U.info=async(...e)=>(await B()).info(...e);var He=function(e="log",t,...n){o.log(e,t,...n)};function we(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>we(n)).filter(n=>n!==void 0);let t={};for(let[n,s]of Object.entries(e)){let a=we(s);a!==void 0&&(t[n]=a)}return t}function et(e,t=new WeakSet){if(!e||typeof e!="object"||t.has(e))return e;t.add(e),Object.freeze(e);for(let n of Object.keys(e))et(e[n],t);return e}function Se(e){return e==null||typeof e!="object"?e:et(structuredClone(we(e)))}async function Dt(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let n=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let s=await fetch(n,{cache:"no-store"});return s.ok?await s.json():null}catch{return null}}o.registry=C;o.enums=Re;o.adoptLayers=ke;o.adoptPrimitives=Pe;o.parse=ue;o.createStylesheet=xe;o.isLiveMode=()=>C.isLive;o.ask=Xe;o.toast=U;o.common=pe;o.msg=M;o.str=oe;o.configureLocalization=se;o.loadLocale=Ve;o.setLocale=Qe;o.getLocalizationState=Ye;o.createJSONLocalization=Ze;o.i18n={msg:M,str:oe,configure:se,loadLocale:Ve,setLocale:Qe,getState:Ye,createJSONLocalization:Ze};o.AutoComplete=null;o.loadAutoComplete=async()=>{if(o.AutoComplete&&typeof o.AutoComplete.connect=="function")return o.AutoComplete;let e=W("pds-autocomplete.js",o.currentConfig?.autoCompleteURL);return Q||(Q=import(e).then(t=>{let n=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!n)throw new Error("AutoComplete export not found in module");return o.AutoComplete=n,n}).catch(t=>{throw Q=null,t})),Q};function tt(e){let t=typeof CustomEvent=="function";try{let n=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");o.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",n))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",n))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function nt(e={}){let t=typeof CustomEvent=="function",n={at:Date.now(),...e};try{let s=t?new CustomEvent("pds:config-changed",{detail:n}):new Event("pds:config-changed");o.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",s))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var be="pure-ds-theme",R=null,I=null;function Le(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function _e(e){try{if(R&&I){try{typeof R.removeEventListener=="function"?R.removeEventListener("change",I):typeof R.removeListener=="function"&&R.removeListener(I)}catch{}R=null,I=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),n=s=>{let a=s?.matches===void 0?t.matches:s.matches;try{let r=a?"dark":"light";document.documentElement.setAttribute("data-theme",r),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"system"}}))}catch{}};R=t,I=n,typeof t.addEventListener=="function"?t.addEventListener("change",n):typeof t.addListener=="function"&&t.addListener(n)}}catch{}}var zt=Object.getOwnPropertyDescriptor(o,"theme");zt||Object.defineProperty(o,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(be)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=o.currentConfig?.design||null,n=he(e);if(t&&!Oe(t,n)){let s=t?.name||o.currentPreset?.name||o.currentConfig?.preset||"current preset";o.log("warn",`PDS theme "${n}" not supported by preset "${s}".`),o.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:n,preset:s}}));return}e==null?localStorage.removeItem(be):localStorage.setItem(be,e),Le(e),_e(e),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});o.defaultEnhancers=[];async function Ct(e){o.initializing=!0;try{let t=e&&e.mode||"live",{mode:n,...s}=e||{};o.mode=t,o.logHandler=typeof s?.log=="function"?s.log:null,o.currentConfig=Se(s);let a=s&&typeof s.localization=="object"&&s.localization?s.localization:null;a?(await F(),se(a)):se(null);let r;if(t==="static")r=await Tt(s);else{let{localization:S,...g}=s||{},u=V(g,{resolvePublicAssetURL:K}),i=g?.managerURL||g?.public?.managerURL||g?.manager?.url||new URL("core/pds-manager.js",u).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:m}=await import(i);r=await m(o,g,{emitReady:tt,emitConfigChanged:nt,applyResolvedTheme:Le,setupSystemListenerIfNeeded:_e})}o.compiled=Se(r?.config||null);let l=o?.compiled?.design?.icons?.externalPath||"/assets/img/icons/";return o.log("info",`startup ready; external icon path: ${l}`),r}finally{o.initializing=!1}}o.start=Ct;async function Tt(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,n=e.manageTheme??!0,s=e.themeStorageKey??"pure-ds-theme",a=e.staticPaths??{},r=V(e,{resolvePublicAssetURL:K}),l=e&&e.autoDefine||null,S;l&&l.baseURL?S=J(q(l.baseURL,{preferModule:!1})):S=`${r}components/`;let g=l&&Array.isArray(l.predefine)&&l.predefine||[],u=l&&typeof l.mapper=="function"&&l.mapper||null;try{Ue(o);let{resolvedTheme:i}=$e({manageTheme:n,themeStorageKey:s,applyResolvedTheme:Le,setupSystemListenerIfNeeded:_e}),m=await Dt(r,e),j=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],_=m?.config?{...m.config,...e,design:e?.design||m.config.design,preset:e?.preset||m.config.preset}:{...e},c={tokens:`${r}styles/pds-tokens.css.js`,primitives:`${r}styles/pds-primitives.css.js`,components:`${r}styles/pds-components.css.js`,utilities:`${r}styles/pds-utilities.css.js`,styles:`${r}styles/pds-styles.css.js`},y=m?.paths||{};if(a={...c,...y,...a},o.registry.setStaticMode(a),t&&typeof document<"u")try{let b=await o.registry.getStylesheet("styles");if(b){b._pds=!0;let d=(document.adoptedStyleSheets||[]).filter(w=>w._pds!==!0);document.adoptedStyleSheets=[...d,b],nt({mode:"static",source:"static:styles-applied"})}}catch(b){He.call(o,"warn","Failed to apply static styles:",b)}let L=null,v=[];try{let b=await xt(),d=await Ne({autoDefineBaseURL:S,autoDefinePreload:g,autoDefineMapper:u,enhancers:j,autoDefineOverrides:l||null,autoDefinePreferModule:!(l&&l.baseURL)},{baseEnhancers:b});L=d.autoDefiner,v=d.mergedEnhancers||[]}catch(b){He.call(o,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",b)}return o.compiled=Se({mode:"static",..._,theme:i,enhancers:v}),tt({mode:"static",config:_,theme:i,autoDefiner:L}),{config:_,theme:i,autoDefiner:L}}catch(i){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:i}})),i}}var Mt=o.createJSONLocalization({locale:"en-US",locales:["en-US","nl-NL"],aliases:{en:["en-US"],nl:["nl-NL"]},basePath:"/assets/locales"}),st={mode:"live",liveEdit:!0,preset:"default",localization:Mt,autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(e,t,...n){(this?.mode||this?.compiled?.mode||"live")!=="static"&&(typeof console[e]=="function"?console[e]:console.log)(`[PDS] ${t}`,...n)}};var x={name:"@pure-ds/core",shortname:"pds",version:"0.7.51",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-setup-mcp":"packages/pds-cli/bin/pds-setup-mcp.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js","pds-mcp-server":"packages/pds-cli/bin/pds-mcp-server.js","pds-mcp-health":"packages/pds-cli/bin/pds-mcp-health.js","pds-mcp-eval":"packages/pds-cli/bin/pds-mcp-eval.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./localization":{types:"./dist/types/src/js/pds-localization.d.ts",import:"./public/assets/pds/core/pds-localization.js"},"./lit":{types:"./dist/types/src/js/lit.d.ts",import:"./public/assets/pds/external/lit.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-singleton.js","src/js/common/","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","LOCALIZATION.md","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","pds:mcp:server":"node packages/pds-cli/bin/pds-mcp-server.js","pds:mcp:health":"node packages/pds-cli/bin/pds-mcp-health.js","pds:mcp:eval":"node packages/pds-cli/bin/pds-mcp-eval.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9","@types/node":"^22.10.2",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3"},dependencies:{lit:"^3.3.2","pure-web":"1.1.32"},customElements:"custom-elements.json"};await o.start(st);document.documentElement.lang="en";var ot=typeof x.repository=="string"?x.repository:x.repository?.url,$t=ot?ot.replace(/^git\+/,"").replace(/\.git$/,""):"",hn=x.homepage||$t,yn=x.bugs?.url||"";document.body.append(...o.parse`
2
+ See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):o.log("warn",`\u26A0\uFE0F PDS component <${d}> not found. Assets may not be installed.`)}else o.log("error",`\u274C Auto-define error for <${d}>:`,w)},...c,mapper:d=>{if(customElements.get(d))return null;if(typeof a=="function")try{let w=a(d);return w===void 0?m(d):w}catch(w){return o.log("warn","Custom autoDefine.mapper error; falling back to default:",w?.message||w),m(d)}return m(d)}};u=new i(b),s.length>0&&typeof i.define=="function"&&await i.define(...s,{baseURL:n,mapper:b.mapper,onError:b.onError})}return{autoDefiner:u,mergedEnhancers:g}}var fe=["light","dark"],me=new Set(fe);function ht(e){let n=(Array.isArray(e?.themes)?e.themes.map(s=>String(s).toLowerCase()):fe).filter(s=>me.has(s));return n.length?n:fe}function he(e,{preferDocument:t=!0}={}){let n=String(e||"").toLowerCase();if(me.has(n))return n;if(t&&typeof document<"u"){let s=document.documentElement?.getAttribute("data-theme");if(me.has(s))return s}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Oe(e,t){let n=he(t);return ht(e).includes(n)}var yt=new Set(["log","warn","error","debug","info"]),gt="__PURE_DS_PDS_SINGLETON__",ye=null,ge=null;function Fe(){try{let t=(typeof globalThis<"u"?globalThis:window)?.[gt];if(t&&typeof t=="object")return t}catch{return null}return null}function bt(e){return!e||typeof e!="object"?null:{mode:e.mode==="live"||e.mode==="static"?e.mode:null,debug:e.debug===!0,thisArg:e.thisArg}}function wt(e){if(typeof e!="string")return"log";let t=e.toLowerCase();return yt.has(t)?t:"log"}function St(){if(typeof ge=="function")try{let t=bt(ge());if(t)return t}catch{}let e=Fe();if(e){let t=e?.mode||e?.compiled?.mode||(e?.registry?.isLive?"live":"static"),n=(e?.debug||e?.currentConfig?.debug||e?.currentConfig?.design?.debug||e?.compiled?.debug||e?.compiled?.design?.debug||!1)===!0;return{mode:t,debug:n,thisArg:e}}return{mode:null,debug:!1}}function Lt(){if(typeof ye=="function")try{let t=ye();if(typeof t=="function")return t}catch{}let e=Fe();return typeof e?.logHandler=="function"?e.logHandler:null}function Ie(e,t,...n){if(typeof console>"u")return;let s=typeof console[e]=="function"?console[e].bind(console):typeof console.log=="function"?console.log.bind(console):null;s&&(n.length>0?s(t,...n):s(t))}function _t(e,t){let n=t?.debug===!0;return!(t?.mode==="static"&&!n||!n&&e!=="error"&&e!=="warn")}function We({getLogger:e,getContext:t}={}){ye=typeof e=="function"?e:null,ge=typeof t=="function"?t:null}function Be(e="log",t,...n){let s=wt(e),a=St(),r=Lt();if(r)try{r.call(a?.thisArg,s,t,...n);return}catch(l){Ie("error","Custom log handler failed:",l)}_t(s,a)&&Ie(s,t,...n)}typeof o.initializing!="boolean"&&(o.initializing=!1);"currentPreset"in o||(o.currentPreset=null);typeof o.debug!="boolean"&&(o.debug=!1);"currentConfig"in o||(o.currentConfig=null);"compiled"in o||(o.compiled=null);typeof o.logHandler!="function"&&(o.logHandler=null);"mode"in o||(o.mode=null);var Q=null,Y=null,Z=null,X=null,ee=null,te=null,Ke="__pdsLocalizationRuntime";function T(){if(te)return te;let e=o?.[Ke];return e&&typeof e=="object"?(te=e,e):null}function Et(e){let t=e&&typeof e=="object"?e:null;te=t,o[Ke]=t}We({getLogger:()=>typeof o.logHandler=="function"?o.logHandler:null,getContext:()=>{let e=o?.mode||o?.compiled?.mode||(o?.registry?.isLive?"live":"static"),t=(o?.debug||o?.currentConfig?.debug||o?.currentConfig?.design?.debug||o?.compiled?.debug||o?.compiled?.design?.debug||!1)===!0;return{mode:e,debug:t,thisArg:o}}});o.log=(e="log",t,...n)=>{Be(e,t,...n)};var A={locale:"en",messages:{},hasProvider:!1},ne=new Set;function Ge(e){return!!e&&typeof e!="string"&&typeof e=="object"&&"strTag"in e}function Je(e=[]){let t="";for(let n=0;n<=e.length-1;n+=1)t+=e[n],n<e.length-1&&(t+=`{${n}}`);return t}function vt(e,t){return String(e).replace(/\{(\d+)\}/g,(n,s)=>t(Number(s)))}function At(e){if(!e||typeof e!="object")return{};let t={};for(let[n,s]of Object.entries(e)){if(typeof s=="string"){t[n]=s;continue}s&&typeof s=="object"&&typeof s.content=="string"&&(t[n]=s.content)}return t}function jt(e,...t){return{strTag:!0,strings:Array.from(e||[]),values:t,raw:Array.from(e?.raw||[])}}function Pt(e){if(!e)return"";if(Ge(e)){let n=Je(e.strings||[]),s=A.messages[n]||n;return vt(s,a=>e.values?.[a])}let t=String(e);return A.messages[t]||t}function kt(e){if(!e)return;let t=Ge(e)?Je(e.strings||[]):String(e);typeof t=="string"&&t.length>0&&ne.add(t)}function qe(e){if(!e||typeof e.msg!="function"||ne.size===0)return;let t=Array.from(ne);ne.clear();for(let n of t)try{e.msg(n)}catch{}}async function F(){let e=T();return e||(ee||(ee=import(W("pds-localization.js")).then(n=>{if(typeof n?.msg!="function"||typeof n?.str!="function"||typeof n?.configureLocalization!="function"||typeof n?.loadLocale!="function"||typeof n?.setLocale!="function"||typeof n?.getLocalizationState!="function")throw new Error("Failed to load localization runtime exports");return Et(n),qe(n),n}).catch(n=>{throw ee=null,n})),ee)}var M=(e,t={})=>{let n=T();return typeof n?.msg=="function"?n.msg(e,t):(kt(e),Pt(e,t))},oe=(e,...t)=>{let n=T();return typeof n?.str=="function"?n.str(e,...t):jt(e,...t)},se=(e=null)=>{let t=T();if(typeof t?.configureLocalization=="function")return t.configureLocalization(e);if(!e||typeof e!="object")return A.locale="en",A.messages={},A.hasProvider=!1,{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider};typeof e.locale=="string"&&e.locale.trim()&&(A.locale=e.locale.trim()),Object.prototype.hasOwnProperty.call(e,"messages")&&(A.messages=At(e.messages));let n=!!(e.provider||e.translate||e.loadLocale||e.setLocale);return A.hasProvider=n,n&&F().then(s=>{s.configureLocalization(e),qe(s)}).catch(()=>{}),{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider}},Ve=async e=>(await F()).loadLocale(e),Qe=async(e,t={})=>(await F()).setLocale(e,t),Ye=()=>{let e=T();return typeof e?.getLocalizationState=="function"?e.getLocalizationState():{locale:A.locale,messages:{...A.messages},hasProvider:A.hasProvider}},Ze=(e={})=>{let t=T();if(typeof t?.createJSONLocalization=="function")return t.createJSONLocalization(e);let n=typeof e?.locale=="string"&&e.locale.trim()?e.locale.trim().toLowerCase():"en",s=Array.isArray(e?.locales)?e.locales.map(g=>String(g||"").trim().toLowerCase()).filter(Boolean):[],a=Array.from(new Set([n,...s])),r=null,l=async()=>(r||(r=F().then(g=>typeof g?.createJSONLocalization=="function"?g.createJSONLocalization(e):null).catch(()=>null)),r),S=async(g="loadLocale")=>{let u=await l();if(!u||typeof u!="object")return null;let i=u.provider;if(!i||typeof i!="object")return null;let m=i[g];return typeof m=="function"?m:g==="setLocale"&&typeof i.loadLocale=="function"?i.loadLocale:null};return{locale:n,locales:[...a],provider:{locales:[...a],async loadLocale(g={}){let u=await S("loadLocale");return typeof u!="function"?{}:u(g)},async setLocale(g={}){let u=await S("setLocale");return typeof u!="function"?{}:u(g)}}}};function W(e,t){return t&&typeof t=="string"?t:`${V(o.currentConfig||{},{resolvePublicAssetURL:K})}core/${e}`}async function xt(){return Array.isArray(o.defaultEnhancers)&&o.defaultEnhancers.length>0?o.defaultEnhancers:(X||(X=import(W("pds-enhancers.js",o.currentConfig?.enhancersURL)).then(t=>{let n=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return o.defaultEnhancers=n,n}).catch(t=>{throw X=null,t})),X)}async function Rt(){return typeof o.ask=="function"&&o.ask!==Xe?o.ask:(Y||(Y=import(W("pds-ask.js",o.currentConfig?.askURL)).then(t=>{let n=t?.ask;if(typeof n!="function")throw new Error("Failed to load ask helper");return o.ask=n,n}).catch(t=>{throw Y=null,t})),Y)}async function B(){return typeof o.toast=="function"&&o.toast!==U?o.toast:(Z||(Z=import(W("pds-toast.js",o.currentConfig?.toastURL)).then(t=>{let n=t?.toast;if(typeof n!="function")throw new Error("Failed to load toast helper");return o.toast=n,n}).catch(t=>{throw Z=null,t})),Z)}async function Xe(...e){return(await Rt())(...e)}async function U(...e){return(await B())(...e)}U.success=async(...e)=>(await B()).success(...e);U.error=async(...e)=>(await B()).error(...e);U.warning=async(...e)=>(await B()).warning(...e);U.info=async(...e)=>(await B()).info(...e);var He=function(e="log",t,...n){o.log(e,t,...n)};function we(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>we(n)).filter(n=>n!==void 0);let t={};for(let[n,s]of Object.entries(e)){let a=we(s);a!==void 0&&(t[n]=a)}return t}function et(e,t=new WeakSet){if(!e||typeof e!="object"||t.has(e))return e;t.add(e),Object.freeze(e);for(let n of Object.keys(e))et(e[n],t);return e}function Se(e){return e==null||typeof e!="object"?e:et(structuredClone(we(e)))}async function Dt(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let n=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let s=await fetch(n,{cache:"no-store"});return s.ok?await s.json():null}catch{return null}}o.registry=C;o.enums=Re;o.adoptLayers=ke;o.adoptPrimitives=Pe;o.parse=ue;o.createStylesheet=xe;o.isLiveMode=()=>C.isLive;o.ask=Xe;o.toast=U;o.common=pe;o.msg=M;o.str=oe;o.configureLocalization=se;o.loadLocale=Ve;o.setLocale=Qe;o.getLocalizationState=Ye;o.createJSONLocalization=Ze;o.i18n={msg:M,str:oe,configure:se,loadLocale:Ve,setLocale:Qe,getState:Ye,createJSONLocalization:Ze};o.AutoComplete=null;o.loadAutoComplete=async()=>{if(o.AutoComplete&&typeof o.AutoComplete.connect=="function")return o.AutoComplete;let e=W("pds-autocomplete.js",o.currentConfig?.autoCompleteURL);return Q||(Q=import(e).then(t=>{let n=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!n)throw new Error("AutoComplete export not found in module");return o.AutoComplete=n,n}).catch(t=>{throw Q=null,t})),Q};function tt(e){let t=typeof CustomEvent=="function";try{let n=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");o.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",n))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",n))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function nt(e={}){let t=typeof CustomEvent=="function",n={at:Date.now(),...e};try{let s=t?new CustomEvent("pds:config-changed",{detail:n}):new Event("pds:config-changed");o.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",s))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var be="pure-ds-theme",R=null,I=null;function Le(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function _e(e){try{if(R&&I){try{typeof R.removeEventListener=="function"?R.removeEventListener("change",I):typeof R.removeListener=="function"&&R.removeListener(I)}catch{}R=null,I=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),n=s=>{let a=s?.matches===void 0?t.matches:s.matches;try{let r=a?"dark":"light";document.documentElement.setAttribute("data-theme",r),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"system"}}))}catch{}};R=t,I=n,typeof t.addEventListener=="function"?t.addEventListener("change",n):typeof t.addListener=="function"&&t.addListener(n)}}catch{}}var zt=Object.getOwnPropertyDescriptor(o,"theme");zt||Object.defineProperty(o,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(be)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=o.currentConfig?.design||null,n=he(e);if(t&&!Oe(t,n)){let s=t?.name||o.currentPreset?.name||o.currentConfig?.preset||"current preset";o.log("warn",`PDS theme "${n}" not supported by preset "${s}".`),o.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:n,preset:s}}));return}e==null?localStorage.removeItem(be):localStorage.setItem(be,e),Le(e),_e(e),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});o.defaultEnhancers=[];async function Ct(e){o.initializing=!0;try{let t=e&&e.mode||"live",{mode:n,...s}=e||{};o.mode=t,o.logHandler=typeof s?.log=="function"?s.log:null,o.currentConfig=Se(s);let a=s&&typeof s.localization=="object"&&s.localization?s.localization:null;a?(await F(),se(a)):se(null);let r;if(t==="static")r=await Tt(s);else{let{localization:S,...g}=s||{},u=V(g,{resolvePublicAssetURL:K}),i=g?.managerURL||g?.public?.managerURL||g?.manager?.url||new URL("core/pds-manager.js",u).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:m}=await import(i);r=await m(o,g,{emitReady:tt,emitConfigChanged:nt,applyResolvedTheme:Le,setupSystemListenerIfNeeded:_e})}o.compiled=Se(r?.config||null);let l=o?.compiled?.design?.icons?.externalPath||"/assets/img/icons/";return o.log("info",`startup ready; external icon path: ${l}`),r}finally{o.initializing=!1}}o.start=Ct;async function Tt(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,n=e.manageTheme??!0,s=e.themeStorageKey??"pure-ds-theme",a=e.staticPaths??{},r=V(e,{resolvePublicAssetURL:K}),l=e&&e.autoDefine||null,S;l&&l.baseURL?S=J(q(l.baseURL,{preferModule:!1})):S=`${r}components/`;let g=l&&Array.isArray(l.predefine)&&l.predefine||[],u=l&&typeof l.mapper=="function"&&l.mapper||null;try{Ue(o);let{resolvedTheme:i}=$e({manageTheme:n,themeStorageKey:s,applyResolvedTheme:Le,setupSystemListenerIfNeeded:_e}),m=await Dt(r,e),j=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],_=m?.config?{...m.config,...e,design:e?.design||m.config.design,preset:e?.preset||m.config.preset}:{...e},c={tokens:`${r}styles/pds-tokens.css.js`,primitives:`${r}styles/pds-primitives.css.js`,components:`${r}styles/pds-components.css.js`,utilities:`${r}styles/pds-utilities.css.js`,styles:`${r}styles/pds-styles.css.js`},y=m?.paths||{};if(a={...c,...y,...a},o.registry.setStaticMode(a),t&&typeof document<"u")try{let b=await o.registry.getStylesheet("styles");if(b){b._pds=!0;let d=(document.adoptedStyleSheets||[]).filter(w=>w._pds!==!0);document.adoptedStyleSheets=[...d,b],nt({mode:"static",source:"static:styles-applied"})}}catch(b){He.call(o,"warn","Failed to apply static styles:",b)}let L=null,v=[];try{let b=await xt(),d=await Ne({autoDefineBaseURL:S,autoDefinePreload:g,autoDefineMapper:u,enhancers:j,autoDefineOverrides:l||null,autoDefinePreferModule:!(l&&l.baseURL)},{baseEnhancers:b});L=d.autoDefiner,v=d.mergedEnhancers||[]}catch(b){He.call(o,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",b)}return o.compiled=Se({mode:"static",..._,theme:i,enhancers:v}),tt({mode:"static",config:_,theme:i,autoDefiner:L}),{config:_,theme:i,autoDefiner:L}}catch(i){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:i}})),i}}var Mt=o.createJSONLocalization({locale:"en-US",locales:["en-US","nl-NL"],aliases:{en:["en-US"],nl:["nl-NL"]},basePath:"/assets/locales"}),st={mode:"live",liveEdit:!0,preset:"default",localization:Mt,autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(e,t,...n){(this?.mode||this?.compiled?.mode||"live")!=="static"&&(typeof console[e]=="function"?console[e]:console.log)(`[PDS] ${t}`,...n)}};var x={name:"@pure-ds/core",shortname:"pds",version:"0.7.52",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-setup-mcp":"packages/pds-cli/bin/pds-setup-mcp.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js","pds-mcp-server":"packages/pds-cli/bin/pds-mcp-server.js","pds-mcp-health":"packages/pds-cli/bin/pds-mcp-health.js","pds-mcp-eval":"packages/pds-cli/bin/pds-mcp-eval.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./localization":{types:"./dist/types/src/js/pds-localization.d.ts",import:"./public/assets/pds/core/pds-localization.js"},"./lit":{types:"./dist/types/src/js/lit.d.ts",import:"./public/assets/pds/external/lit.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-singleton.js","src/js/common/","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","LOCALIZATION.md","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","pds:mcp:server":"node packages/pds-cli/bin/pds-mcp-server.js","pds:mcp:health":"node packages/pds-cli/bin/pds-mcp-health.js","pds:mcp:eval":"node packages/pds-cli/bin/pds-mcp-eval.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9","@types/node":"^22.10.2",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3"},dependencies:{lit:"^3.3.2","pure-web":"1.1.32"},customElements:"custom-elements.json"};await o.start(st);document.documentElement.lang="en";var ot=typeof x.repository=="string"?x.repository:x.repository?.url,$t=ot?ot.replace(/^git\+/,"").replace(/\.git$/,""):"",hn=x.homepage||$t,yn=x.bugs?.url||"";document.body.append(...o.parse`
3
3
  <div class="container text-center">
4
4
  <img src="/assets/img/pds-logo.svg" alt="PDS Logo" title="${M("PDS Logo")}" width="64" height="64" />
5
5
  <header class="container section">
@@ -1693,6 +1693,15 @@ a.btn-working {
1693
1693
  .skeleton {
1694
1694
  --skeleton-base: color-mix(in oklab, var(--color-text-primary) 8%, transparent);
1695
1695
  --skeleton-highlight: color-mix(in oklab, var(--color-text-primary) 16%, transparent);
1696
+ --skeleton-child-offset: 0ms;
1697
+ --skeleton-type-offset: 0ms;
1698
+ --skeleton-parent-offset: 0ms;
1699
+ --skeleton-delay: calc(
1700
+ 220ms +
1701
+ var(--skeleton-child-offset) +
1702
+ var(--skeleton-type-offset) +
1703
+ var(--skeleton-parent-offset)
1704
+ );
1696
1705
  background: linear-gradient(
1697
1706
  90deg,
1698
1707
  var(--skeleton-base) 0%,
@@ -1702,7 +1711,7 @@ a.btn-working {
1702
1711
  background-size: 200% 100%;
1703
1712
  animation:
1704
1713
  pds-skeleton-fade-in 220ms ease-out both,
1705
- pds-skeleton 1.5s ease-in-out infinite 220ms;
1714
+ pds-skeleton 1.5s ease-in-out infinite var(--skeleton-delay);
1706
1715
  border-radius: var(--radius-sm);
1707
1716
 
1708
1717
  &::before {
@@ -1710,6 +1719,33 @@ a.btn-working {
1710
1719
  }
1711
1720
  }
1712
1721
 
1722
+ /* Deterministic stagger so large skeleton groups do not animate in lockstep. */
1723
+ :where(.skeleton:nth-child(11n + 1)) { --skeleton-child-offset: 0ms; }
1724
+ :where(.skeleton:nth-child(11n + 2)) { --skeleton-child-offset: 17ms; }
1725
+ :where(.skeleton:nth-child(11n + 3)) { --skeleton-child-offset: 34ms; }
1726
+ :where(.skeleton:nth-child(11n + 4)) { --skeleton-child-offset: 51ms; }
1727
+ :where(.skeleton:nth-child(11n + 5)) { --skeleton-child-offset: 68ms; }
1728
+ :where(.skeleton:nth-child(11n + 6)) { --skeleton-child-offset: 85ms; }
1729
+ :where(.skeleton:nth-child(11n + 7)) { --skeleton-child-offset: 102ms; }
1730
+ :where(.skeleton:nth-child(11n + 8)) { --skeleton-child-offset: 119ms; }
1731
+ :where(.skeleton:nth-child(11n + 9)) { --skeleton-child-offset: 136ms; }
1732
+ :where(.skeleton:nth-child(11n + 10)) { --skeleton-child-offset: 153ms; }
1733
+ :where(.skeleton:nth-child(11n + 11)) { --skeleton-child-offset: 170ms; }
1734
+
1735
+ :where(.skeleton:nth-of-type(7n + 1)) { --skeleton-type-offset: 0ms; }
1736
+ :where(.skeleton:nth-of-type(7n + 2)) { --skeleton-type-offset: 11ms; }
1737
+ :where(.skeleton:nth-of-type(7n + 3)) { --skeleton-type-offset: 22ms; }
1738
+ :where(.skeleton:nth-of-type(7n + 4)) { --skeleton-type-offset: 33ms; }
1739
+ :where(.skeleton:nth-of-type(7n + 5)) { --skeleton-type-offset: 44ms; }
1740
+ :where(.skeleton:nth-of-type(7n + 6)) { --skeleton-type-offset: 55ms; }
1741
+ :where(.skeleton:nth-of-type(7n + 7)) { --skeleton-type-offset: 66ms; }
1742
+
1743
+ :where(*:nth-child(5n + 1) > .skeleton) { --skeleton-parent-offset: 0ms; }
1744
+ :where(*:nth-child(5n + 2) > .skeleton) { --skeleton-parent-offset: 9ms; }
1745
+ :where(*:nth-child(5n + 3) > .skeleton) { --skeleton-parent-offset: 18ms; }
1746
+ :where(*:nth-child(5n + 4) > .skeleton) { --skeleton-parent-offset: 27ms; }
1747
+ :where(*:nth-child(5n + 5) > .skeleton) { --skeleton-parent-offset: 36ms; }
1748
+
1713
1749
  @keyframes pds-skeleton-fade-in {
1714
1750
  from { opacity: 0; }
1715
1751
  to { opacity: 1; }
@@ -1693,6 +1693,15 @@ a.btn-working {
1693
1693
  .skeleton {
1694
1694
  --skeleton-base: color-mix(in oklab, var(--color-text-primary) 8%, transparent);
1695
1695
  --skeleton-highlight: color-mix(in oklab, var(--color-text-primary) 16%, transparent);
1696
+ --skeleton-child-offset: 0ms;
1697
+ --skeleton-type-offset: 0ms;
1698
+ --skeleton-parent-offset: 0ms;
1699
+ --skeleton-delay: calc(
1700
+ 220ms +
1701
+ var(--skeleton-child-offset) +
1702
+ var(--skeleton-type-offset) +
1703
+ var(--skeleton-parent-offset)
1704
+ );
1696
1705
  background: linear-gradient(
1697
1706
  90deg,
1698
1707
  var(--skeleton-base) 0%,
@@ -1702,7 +1711,7 @@ a.btn-working {
1702
1711
  background-size: 200% 100%;
1703
1712
  animation:
1704
1713
  pds-skeleton-fade-in 220ms ease-out both,
1705
- pds-skeleton 1.5s ease-in-out infinite 220ms;
1714
+ pds-skeleton 1.5s ease-in-out infinite var(--skeleton-delay);
1706
1715
  border-radius: var(--radius-sm);
1707
1716
 
1708
1717
  &::before {
@@ -1710,6 +1719,33 @@ a.btn-working {
1710
1719
  }
1711
1720
  }
1712
1721
 
1722
+ /* Deterministic stagger so large skeleton groups do not animate in lockstep. */
1723
+ :where(.skeleton:nth-child(11n + 1)) { --skeleton-child-offset: 0ms; }
1724
+ :where(.skeleton:nth-child(11n + 2)) { --skeleton-child-offset: 17ms; }
1725
+ :where(.skeleton:nth-child(11n + 3)) { --skeleton-child-offset: 34ms; }
1726
+ :where(.skeleton:nth-child(11n + 4)) { --skeleton-child-offset: 51ms; }
1727
+ :where(.skeleton:nth-child(11n + 5)) { --skeleton-child-offset: 68ms; }
1728
+ :where(.skeleton:nth-child(11n + 6)) { --skeleton-child-offset: 85ms; }
1729
+ :where(.skeleton:nth-child(11n + 7)) { --skeleton-child-offset: 102ms; }
1730
+ :where(.skeleton:nth-child(11n + 8)) { --skeleton-child-offset: 119ms; }
1731
+ :where(.skeleton:nth-child(11n + 9)) { --skeleton-child-offset: 136ms; }
1732
+ :where(.skeleton:nth-child(11n + 10)) { --skeleton-child-offset: 153ms; }
1733
+ :where(.skeleton:nth-child(11n + 11)) { --skeleton-child-offset: 170ms; }
1734
+
1735
+ :where(.skeleton:nth-of-type(7n + 1)) { --skeleton-type-offset: 0ms; }
1736
+ :where(.skeleton:nth-of-type(7n + 2)) { --skeleton-type-offset: 11ms; }
1737
+ :where(.skeleton:nth-of-type(7n + 3)) { --skeleton-type-offset: 22ms; }
1738
+ :where(.skeleton:nth-of-type(7n + 4)) { --skeleton-type-offset: 33ms; }
1739
+ :where(.skeleton:nth-of-type(7n + 5)) { --skeleton-type-offset: 44ms; }
1740
+ :where(.skeleton:nth-of-type(7n + 6)) { --skeleton-type-offset: 55ms; }
1741
+ :where(.skeleton:nth-of-type(7n + 7)) { --skeleton-type-offset: 66ms; }
1742
+
1743
+ :where(*:nth-child(5n + 1) > .skeleton) { --skeleton-parent-offset: 0ms; }
1744
+ :where(*:nth-child(5n + 2) > .skeleton) { --skeleton-parent-offset: 9ms; }
1745
+ :where(*:nth-child(5n + 3) > .skeleton) { --skeleton-parent-offset: 18ms; }
1746
+ :where(*:nth-child(5n + 4) > .skeleton) { --skeleton-parent-offset: 27ms; }
1747
+ :where(*:nth-child(5n + 5) > .skeleton) { --skeleton-parent-offset: 36ms; }
1748
+
1713
1749
  @keyframes pds-skeleton-fade-in {
1714
1750
  from { opacity: 0; }
1715
1751
  to { opacity: 1; }
@@ -3399,6 +3399,15 @@ a.btn-working {
3399
3399
  .skeleton {
3400
3400
  --skeleton-base: color-mix(in oklab, var(--color-text-primary) 8%, transparent);
3401
3401
  --skeleton-highlight: color-mix(in oklab, var(--color-text-primary) 16%, transparent);
3402
+ --skeleton-child-offset: 0ms;
3403
+ --skeleton-type-offset: 0ms;
3404
+ --skeleton-parent-offset: 0ms;
3405
+ --skeleton-delay: calc(
3406
+ 220ms +
3407
+ var(--skeleton-child-offset) +
3408
+ var(--skeleton-type-offset) +
3409
+ var(--skeleton-parent-offset)
3410
+ );
3402
3411
  background: linear-gradient(
3403
3412
  90deg,
3404
3413
  var(--skeleton-base) 0%,
@@ -3408,7 +3417,7 @@ a.btn-working {
3408
3417
  background-size: 200% 100%;
3409
3418
  animation:
3410
3419
  pds-skeleton-fade-in 220ms ease-out both,
3411
- pds-skeleton 1.5s ease-in-out infinite 220ms;
3420
+ pds-skeleton 1.5s ease-in-out infinite var(--skeleton-delay);
3412
3421
  border-radius: var(--radius-sm);
3413
3422
 
3414
3423
  &::before {
@@ -3416,6 +3425,33 @@ a.btn-working {
3416
3425
  }
3417
3426
  }
3418
3427
 
3428
+ /* Deterministic stagger so large skeleton groups do not animate in lockstep. */
3429
+ :where(.skeleton:nth-child(11n + 1)) { --skeleton-child-offset: 0ms; }
3430
+ :where(.skeleton:nth-child(11n + 2)) { --skeleton-child-offset: 17ms; }
3431
+ :where(.skeleton:nth-child(11n + 3)) { --skeleton-child-offset: 34ms; }
3432
+ :where(.skeleton:nth-child(11n + 4)) { --skeleton-child-offset: 51ms; }
3433
+ :where(.skeleton:nth-child(11n + 5)) { --skeleton-child-offset: 68ms; }
3434
+ :where(.skeleton:nth-child(11n + 6)) { --skeleton-child-offset: 85ms; }
3435
+ :where(.skeleton:nth-child(11n + 7)) { --skeleton-child-offset: 102ms; }
3436
+ :where(.skeleton:nth-child(11n + 8)) { --skeleton-child-offset: 119ms; }
3437
+ :where(.skeleton:nth-child(11n + 9)) { --skeleton-child-offset: 136ms; }
3438
+ :where(.skeleton:nth-child(11n + 10)) { --skeleton-child-offset: 153ms; }
3439
+ :where(.skeleton:nth-child(11n + 11)) { --skeleton-child-offset: 170ms; }
3440
+
3441
+ :where(.skeleton:nth-of-type(7n + 1)) { --skeleton-type-offset: 0ms; }
3442
+ :where(.skeleton:nth-of-type(7n + 2)) { --skeleton-type-offset: 11ms; }
3443
+ :where(.skeleton:nth-of-type(7n + 3)) { --skeleton-type-offset: 22ms; }
3444
+ :where(.skeleton:nth-of-type(7n + 4)) { --skeleton-type-offset: 33ms; }
3445
+ :where(.skeleton:nth-of-type(7n + 5)) { --skeleton-type-offset: 44ms; }
3446
+ :where(.skeleton:nth-of-type(7n + 6)) { --skeleton-type-offset: 55ms; }
3447
+ :where(.skeleton:nth-of-type(7n + 7)) { --skeleton-type-offset: 66ms; }
3448
+
3449
+ :where(*:nth-child(5n + 1) > .skeleton) { --skeleton-parent-offset: 0ms; }
3450
+ :where(*:nth-child(5n + 2) > .skeleton) { --skeleton-parent-offset: 9ms; }
3451
+ :where(*:nth-child(5n + 3) > .skeleton) { --skeleton-parent-offset: 18ms; }
3452
+ :where(*:nth-child(5n + 4) > .skeleton) { --skeleton-parent-offset: 27ms; }
3453
+ :where(*:nth-child(5n + 5) > .skeleton) { --skeleton-parent-offset: 36ms; }
3454
+
3419
3455
  @keyframes pds-skeleton-fade-in {
3420
3456
  from { opacity: 0; }
3421
3457
  to { opacity: 1; }