@pure-ds/core 0.7.13 → 0.7.15

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.7.13",
4
+ "version": "0.7.15",
5
5
  "description": "Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { createPdsMcpContext, getPdsMcpTools, runPdsMcpTool } from '../lib/pds-mcp-core.js';
4
4
  import { appendFileSync } from 'node:fs';
@@ -55,6 +55,65 @@ function sendError(id, code, message, data) {
55
55
  });
56
56
  }
57
57
 
58
+ function summarizeBufferPreview(buffer, limit = 220) {
59
+ return buffer
60
+ .slice(0, limit)
61
+ .toString('latin1')
62
+ .replace(/\r/g, '\\r')
63
+ .replace(/\n/g, '\\n');
64
+ }
65
+
66
+ function findHeaderBoundary(buffer) {
67
+ const raw = buffer.toString('latin1');
68
+ const match = /\r?\n\r?\n/.exec(raw);
69
+ if (!match || typeof match.index !== 'number') return null;
70
+ return {
71
+ headerEnd: match.index,
72
+ separatorLength: match[0].length,
73
+ };
74
+ }
75
+
76
+ function tryReadRawJsonFrame() {
77
+ const raw = inputBuffer.toString('utf8');
78
+ const trimmed = raw.trim();
79
+
80
+ if (!trimmed) return false;
81
+ if (!(trimmed.startsWith('{') || trimmed.startsWith('['))) return false;
82
+
83
+ try {
84
+ const parsed = JSON.parse(trimmed);
85
+ debugLog('parsed raw JSON-RPC frame (no Content-Length)');
86
+ inputBuffer = Buffer.alloc(0);
87
+ handleMessage(parsed);
88
+ return true;
89
+ } catch {
90
+ const lines = raw
91
+ .split(/\r?\n/)
92
+ .map((line) => line.trim())
93
+ .filter(Boolean);
94
+
95
+ if (lines.length <= 1) return false;
96
+
97
+ const firstLine = lines[0];
98
+ if (!(firstLine.startsWith('{') || firstLine.startsWith('['))) return false;
99
+
100
+ try {
101
+ const parsedLine = JSON.parse(firstLine);
102
+ const consumed = Buffer.byteLength(firstLine, 'utf8');
103
+ const separatorMatch = raw.match(/^\s*[^\r\n]+(\r\n|\n|\r)/);
104
+ const separatorLength = separatorMatch?.[1]?.length || 1;
105
+ const consumeBytes = consumed + separatorLength;
106
+
107
+ debugLog('parsed raw JSON-RPC line frame (no Content-Length)');
108
+ inputBuffer = inputBuffer.slice(Math.min(consumeBytes, inputBuffer.length));
109
+ handleMessage(parsedLine);
110
+ return true;
111
+ } catch {
112
+ return false;
113
+ }
114
+ }
115
+ }
116
+
58
117
  async function handleMessage(message) {
59
118
  const { id, method, params } = message || {};
60
119
  debugLog(`request id=${typeof id === 'undefined' ? 'notification' : String(id)} method=${String(method || '')}`);
@@ -135,22 +194,21 @@ async function handleMessage(message) {
135
194
  }
136
195
 
137
196
  function tryReadFrame() {
138
- const crlfSeparator = Buffer.from('\r\n\r\n', 'utf8');
139
- const lfSeparator = Buffer.from('\n\n', 'utf8');
140
-
141
- let headerEnd = inputBuffer.indexOf(crlfSeparator);
142
- let separatorLength = crlfSeparator.length;
197
+ const boundary = findHeaderBoundary(inputBuffer);
198
+ if (!boundary) {
199
+ const rawParsed = tryReadRawJsonFrame();
200
+ if (rawParsed) return true;
143
201
 
144
- if (headerEnd === -1) {
145
- headerEnd = inputBuffer.indexOf(lfSeparator);
146
- separatorLength = lfSeparator.length;
202
+ debugLog(`frame pending: no header boundary yet; buffered=${String(inputBuffer.length)} preview=${summarizeBufferPreview(inputBuffer)}`);
203
+ return false;
147
204
  }
148
205
 
149
- if (headerEnd === -1) return false;
206
+ const { headerEnd, separatorLength } = boundary;
150
207
 
151
208
  const header = inputBuffer.slice(0, headerEnd).toString('utf8');
152
209
  const contentLengthMatch = header.match(/Content-Length:\s*(\d+)/i);
153
210
  if (!contentLengthMatch) {
211
+ debugLog(`frame drop: missing Content-Length header; header=${header.replace(/\r/g, '\\r').replace(/\n/g, '\\n')}`);
154
212
  inputBuffer = Buffer.alloc(0);
155
213
  return false;
156
214
  }
@@ -158,7 +216,10 @@ function tryReadFrame() {
158
216
  const contentLength = Number(contentLengthMatch[1]);
159
217
  const bodyStart = headerEnd + separatorLength;
160
218
  const bodyEnd = bodyStart + contentLength;
161
- if (inputBuffer.length < bodyEnd) return false;
219
+ if (inputBuffer.length < bodyEnd) {
220
+ debugLog(`frame pending: incomplete body; need=${String(contentLength)} have=${String(inputBuffer.length - bodyStart)}`);
221
+ return false;
222
+ }
162
223
 
163
224
  const body = inputBuffer.slice(bodyStart, bodyEnd).toString('utf8');
164
225
  inputBuffer = inputBuffer.slice(bodyEnd);
@@ -167,6 +228,7 @@ function tryReadFrame() {
167
228
  try {
168
229
  message = JSON.parse(body);
169
230
  } catch {
231
+ debugLog(`frame drop: JSON parse failed; bodyPreview=${summarizeBufferPreview(Buffer.from(body, 'utf8'))}`);
170
232
  return true;
171
233
  }
172
234
 
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { mkdir, readFile, writeFile, access } from 'fs/promises';
4
4
  import { existsSync } from 'fs';
@@ -1,5 +1,5 @@
1
1
  var Pe=Object.defineProperty;var Me=(e,t)=>{for(var s in t)Pe(e,s,{get:t[s],enumerable:!0})};var X=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(s){console.error(`[PDS Registry] Failed to load static ${t}:`,s),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let n=new CSSStyleSheet;return n.replaceSync("/* Failed to load "+t+" */"),n}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},P=new X;async function pe(e,t=[],s=null){try{let n=s?.primitivesStylesheet?s.primitivesStylesheet:await P.getStylesheet("primitives");e.adoptedStyleSheets=[n,...t]}catch(n){let c=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${c}> failed to adopt primitives:`,n),e.adoptedStyleSheets=t}}async function ue(e,t=["primitives"],s=[],n=null){try{let r=(await Promise.all(t.map(async d=>{if(n)switch(d){case"tokens":return n.tokensStylesheet;case"primitives":return n.primitivesStylesheet;case"components":return n.componentsStylesheet;case"utilities":return n.utilitiesStylesheet;default:break}return P.getStylesheet(d)}))).filter(d=>d!==null);e.adoptedStyleSheets=[...r,...s]}catch(c){let r=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,c),e.adoptedStyleSheets=s}}function me(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var fe={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 Z={};Me(Z,{deepMerge:()=>he,fragmentFromTemplateLike:()=>Te,isObject:()=>O,parseHTML:()=>Y});function O(e){return e&&typeof e=="object"&&!Array.isArray(e)}function he(e,t){let s={...e};return O(e)&&O(t)&&Object.keys(t).forEach(n=>{O(t[n])?n in e?s[n]=he(e[n],t[n]):Object.assign(s,{[n]:t[n]}):Object.assign(s,{[n]:t[n]})}),s}function Te(e){let t=Array.isArray(e?.strings)?e.strings:[],s=Array.isArray(e?.values)?e.values:[],n=new Set,c=[],r=/(\s)(\.[\w-]+)=\s*$/;for(let i=0;i<t.length;i+=1){let b=t[i]??"",f=b.match(r);if(f&&i<s.length){let g=f[2].slice(1),v=`pds-val-${i}`;b=b.replace(r,`$1data-pds-prop="${g}:${v}"`),n.add(i)}c.push(b),i<s.length&&!n.has(i)&&c.push(`<!--pds-val-${i}-->`)}let d=document.createElement("template");d.innerHTML=c.join("");let w=(i,b)=>{let f=i.parentNode;if(!f)return;if(b==null){f.removeChild(i);return}let S=g=>{if(g!=null){if(g instanceof Node){f.insertBefore(g,i);return}if(Array.isArray(g)){g.forEach(v=>S(v));return}f.insertBefore(document.createTextNode(String(g)),i)}};S(b),f.removeChild(i)},E=document.createTreeWalker(d.content,NodeFilter.SHOW_COMMENT),h=[];for(;E.nextNode();){let i=E.currentNode;i?.nodeValue?.startsWith("pds-val-")&&h.push(i)}return h.forEach(i=>{let b=Number(i.nodeValue.replace("pds-val-",""));w(i,s[b])}),d.content.querySelectorAll("*").forEach(i=>{let b=i.getAttribute("data-pds-prop");if(!b)return;let[f,S]=b.split(":"),g=Number(String(S).replace("pds-val-",""));f&&Number.isInteger(g)&&(i[f]=s[g]),i.removeAttribute("data-pds-prop")}),d.content}function Y(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}var be="pds",Ue=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ye=/^[a-z]:/i;function U(e=""){return e.endsWith("/")?e:`${e}/`}function Ce(e="",t=be){let s=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(s)?s:`${s}/${t}`}function $e(e){return e.replace(/^\.\/+/,"")}function Ie(e){return ye.test(e)?e.replace(ye,"").replace(/^\/+/,""):e}function Ne(e){return e.startsWith("public/")?e.substring(7):e}function z(e,t={}){let s=t.segment||be,n=t.defaultRoot||`/assets/${s}/`,c=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!c||typeof c!="string")return U(n);let r=c.trim();return r?(r=r.replace(/\\/g,"/"),r=Ce(r,s),r=U(r),Ue.test(r)?r:(r=$e(r),r=Ie(r),r.startsWith("/")||(r=Ne(r),r.startsWith("/")||(r=`/${r}`),r=r.replace(/\/+/g,(d,w)=>w===0?d:"/")),U(r))):U(n)}async function Oe(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let s=e,{baseURL:n,mapper:c=h=>`${h}.js`,onError:r=(h,a)=>console.error(`[defineWebComponents] ${h}:`,a)}=t,d=n?new URL(n,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),w=h=>h.toLowerCase().replace(/(^|-)([a-z])/g,(a,i,b)=>b.toUpperCase()),E=async h=>{try{if(customElements.get(h))return{tag:h,status:"already-defined"};let a=c(h),b=await import(a instanceof URL?a.href:new URL(a,d).href),f=b?.default??b?.[w(h)];if(!f){if(customElements.get(h))return{tag:h,status:"self-defined"};throw new Error(`No export found for ${h}. Expected default export or named export "${w(h)}".`)}return customElements.get(h)?{tag:h,status:"race-already-defined"}:(customElements.define(h,f),{tag:h,status:"defined"})}catch(a){throw r(h,a),a}};return Promise.all(s.map(E))}var F=class{constructor(t={}){let{baseURL:s,mapper:n,onError:c,predicate:r=()=>!0,attributeModule:d="data-module",root:w=document,scanExisting:E=!0,debounceMs:h=16,observeShadows:a=!0,enhancers:i=[],patchAttachShadow:b=!0}=t,f=new Set,S=new Set,g=new Set,v=new Map,j=new WeakMap,_=new WeakMap,u=0,y=!1,k=null,N=l=>{if(!l||!i.length)return;let m=_.get(l);m||(m=new Set,_.set(l,m));for(let p of i)if(!(!p.selector||!p.run)&&!m.has(p.selector))try{l.matches&&l.matches(p.selector)&&(p.run(l),m.add(p.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${p.selector}":`,L)}},T=(l,m)=>{if(!y&&!(!l||!l.includes("-"))&&!customElements.get(l)&&!S.has(l)&&!g.has(l)){if(m&&m.getAttribute){let p=m.getAttribute(d);p&&!v.has(l)&&v.set(l,p)}f.add(l),De()}},De=()=>{u||(u=setTimeout(ce,h))},R=l=>{if(l){if(l.nodeType===1){let m=l,p=m.tagName?.toLowerCase();p&&p.includes("-")&&!customElements.get(p)&&r(p,m)&&T(p,m),N(m),a&&m.shadowRoot&&J(m.shadowRoot)}l.querySelectorAll&&l.querySelectorAll("*").forEach(m=>{let p=m.tagName?.toLowerCase();p&&p.includes("-")&&!customElements.get(p)&&r(p,m)&&T(p,m),N(m),a&&m.shadowRoot&&J(m.shadowRoot)})}},J=l=>{if(!l||j.has(l))return;R(l);let m=new MutationObserver(p=>{for(let L of p)L.addedNodes?.forEach(D=>{R(D)}),L.type==="attributes"&&L.target&&R(L.target)});m.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[d,...i.map(p=>p.selector).filter(p=>p.startsWith("data-"))]}),j.set(l,m)};async function ce(){if(clearTimeout(u),u=0,!f.size)return;let l=Array.from(f);f.clear(),l.forEach(m=>S.add(m));try{let m=p=>v.get(p)??(n?n(p):`${p}.js`);await Oe(...l,{baseURL:s,mapper:m,onError:(p,L)=>{g.add(p),c?.(p,L)}})}catch{}finally{l.forEach(m=>S.delete(m))}}let de=w===document?document.documentElement:w,le=new MutationObserver(l=>{for(let m of l)m.addedNodes?.forEach(p=>{R(p)}),m.type==="attributes"&&m.target&&R(m.target)});if(le.observe(de,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[d,...i.map(l=>l.selector).filter(l=>l.startsWith("data-"))]}),a&&b&&Element.prototype.attachShadow){let l=Element.prototype.attachShadow;Element.prototype.attachShadow=function(p){let L=l.call(this,p);if(p&&p.mode==="open"){J(L);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&T(D,this)}return L},k=()=>Element.prototype.attachShadow=l}return E&&R(de),{stop(){y=!0,le.disconnect(),k&&k(),u&&(clearTimeout(u),u=0),j.forEach(l=>l.disconnect())},flush:ce}}static async define(...t){let s={};t.length&&typeof t[t.length-1]=="object"&&(s=t.pop()||{});let n=t,{baseURL:c,mapper:r=a=>`${a}.js`,onError:d=(a,i)=>console.error(`[defineWebComponents] ${a}:`,i)}=s,w=c?new URL(c,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),E=a=>a.toLowerCase().replace(/(^|-)([a-z])/g,(i,b,f)=>f.toUpperCase()),h=async a=>{try{if(customElements.get(a))return{tag:a,status:"already-defined"};let i=r(a),f=await import(i instanceof URL?i.href:new URL(i,w).href),S=f?.default??f?.[E(a)];if(!S){if(customElements.get(a))return{tag:a,status:"self-defined"};throw new Error(`No export found for ${a}. Expected default export or named export "${E(a)}".`)}return customElements.get(a)?{tag:a,status:"race-already-defined"}:(customElements.define(a,S),{tag:a,status:"defined"})}catch(i){throw d(a,i),i}};return Promise.all(n.map(h))}};var ze=/^[a-z][a-z0-9+\-.]*:\/\//i,C=(()=>{try{return import.meta.url}catch{return}})(),W=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function B(e,t={}){if(!e||ze.test(e))return e;let{preferModule:s=!0}=t,n=()=>{if(!C)return null;try{return new URL(e,C).href}catch{return null}},c=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(s?n()||c():c()||n())||e}var ge=(()=>{if(C)try{let e=new URL(C);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",C).href}catch{return}})(),we=!1;function Se(e){we||typeof document>"u"||(we=!0,e.addEventListener("pds:ready",t=>{let s=t.detail?.mode;s&&document.documentElement.classList.add(`pds-${s}`,"pds-ready")}))}function Ee({manageTheme:e,themeStorageKey:t,applyResolvedTheme:s,setupSystemListenerIfNeeded:n}){let c="light",r=null;if(e&&typeof window<"u"){try{r=localStorage.getItem(t)||null}catch{r=null}try{s?.(r),n?.(r)}catch{}r?r==="system"?c=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":c=r:c=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:c,storedTheme:r}}function q(e,{resolvePublicAssetURL:t}){let s=!!(e?.public?.root||e?.static?.root),n=t(e);return!s&&ge&&(n=ge),W(B(n))}async function ve(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:s="/auto-define/",autoDefinePreload:n=[],autoDefineMapper:c=null,enhancers:r=[],autoDefineOverrides:d=null,autoDefinePreferModule:w=!0}=e,E=(()=>{let a=new Map;return(t||[]).forEach(i=>a.set(i.selector,i)),(r||[]).forEach(i=>a.set(i.selector,i)),Array.from(a.values())})(),h=null;if(typeof window<"u"&&typeof document<"u"){let a=F,i=u=>{switch(u){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${u}.js`}},{mapper:b,enhancers:f,...S}=d&&typeof d=="object"?d:{},g=f?Array.isArray(f)?f:typeof f=="object"?Object.values(f):[]:[],v=(()=>{let u=new Map;return(E||[]).forEach(y=>{y?.selector&&u.set(y.selector,y)}),(g||[]).forEach(y=>{if(!y?.selector)return;let k=u.get(y.selector)||null;u.set(y.selector,{...k||{},...y,run:typeof y?.run=="function"?y.run:k?.run})}),Array.from(u.values())})(),_={baseURL:s&&W(B(s,{preferModule:w})),predefine:n,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:v,onError:(u,y)=>{if(typeof u=="string"&&u.startsWith("pds-")){let N=["pds-form","pds-drawer"].includes(u),T=y?.message?.includes("#pds/lit")||y?.message?.includes("Failed to resolve module specifier");N&&T?console.error(`\u274C PDS component <${u}> 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`):console.warn(`\u26A0\uFE0F PDS component <${u}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${u}>:`,y)},...S,mapper:u=>{if(customElements.get(u))return null;if(typeof c=="function")try{let y=c(u);return y===void 0?i(u):y}catch(y){return console.warn("Custom autoDefine.mapper error; falling back to default:",y?.message||y),i(u)}return i(u)}};h=new a(_),n.length>0&&typeof a.define=="function"&&await a.define(...n,{baseURL:s,mapper:_.mapper,onError:_.onError})}return{autoDefiner:h,mergedEnhancers:E}}var ee=["light","dark"],te=new Set(ee);function Fe(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):ee).filter(n=>te.has(n));return s.length?s:ee}function se(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(te.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(te.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Le(e,t){let s=se(t);return Fe(e).includes(s)}var re=class extends EventTarget{},o=new re;o.initializing=!1;o.currentPreset=null;o.debug=!1;var H=null,V=null,K=null,G=null;function Q(e,t){return t&&typeof t=="string"?t:`${q(o.currentConfig||{},{resolvePublicAssetURL:z})}core/${e}`}async function We(){return Array.isArray(o.defaultEnhancers)&&o.defaultEnhancers.length>0?o.defaultEnhancers:(G||(G=import(Q("pds-enhancers.js",o.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return o.defaultEnhancers=s,s}).catch(t=>{throw G=null,t})),G)}async function Be(){return typeof o.ask=="function"&&o.ask!==Ae?o.ask:(V||(V=import(Q("pds-ask.js",o.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return o.ask=s,s}).catch(t=>{throw V=null,t})),V)}async function I(){return typeof o.toast=="function"&&o.toast!==M?o.toast:(K||(K=import(Q("pds-toast.js",o.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return o.toast=s,s}).catch(t=>{throw K=null,t})),K)}async function Ae(...e){return(await Be())(...e)}async function M(...e){return(await I())(...e)}M.success=async(...e)=>(await I()).success(...e);M.error=async(...e)=>(await I()).error(...e);M.warning=async(...e)=>(await I()).warning(...e);M.info=async(...e)=>(await I()).info(...e);var ke=function(e="log",t,...s){let n=!!(o.registry&&!o.registry.isLive),c=(this?.debug||this?.design?.debug||o.debug||!1)===!0;if(n){if(!o.debug)return}else if(!c&&e!=="error"&&e!=="warn")return;let r=console[e]||console.log;s.length>0?r(t,...s):r(t)};function oe(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>oe(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let c=oe(n);c!==void 0&&(t[s]=c)}return t}async function qe(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}o.registry=P;o.enums=fe;o.adoptLayers=ue;o.adoptPrimitives=pe;o.parse=Y;o.createStylesheet=me;o.isLiveMode=()=>P.isLive;o.ask=Ae;o.toast=M;o.common=Z;o.AutoComplete=null;o.loadAutoComplete=async()=>{if(o.AutoComplete&&typeof o.AutoComplete.connect=="function")return o.AutoComplete;let e=Q("pds-autocomplete.js",o.currentConfig?.autoCompleteURL);return H||(H=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return o.AutoComplete=s,s}).catch(t=>{throw H=null,t})),H};function _e(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");o.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function je(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");o.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var ne="pure-ds-theme",x=null,$=null;function ie(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 ae(e){try{if(x&&$){try{typeof x.removeEventListener=="function"?x.removeEventListener("change",$):typeof x.removeListener=="function"&&x.removeListener($)}catch{}x=null,$=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let c=n?.matches===void 0?t.matches:n.matches;try{let r=c?"dark":"light";document.documentElement.setAttribute("data-theme",r),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"system"}}))}catch{}};x=t,$=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}Object.defineProperty(o,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(ne)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=o.currentConfig?.design||null,s=se(e);if(t&&!Le(t,s)){let n=t?.name||o.currentPreset?.name||o.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),o.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(ne):localStorage.setItem(ne,e),ie(e),ae(e),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});o.defaultEnhancers=[];async function He(e){let t=e&&e.mode||"live",{mode:s,...n}=e||{};if(t==="static")return Ve(n);let c=q(n,{resolvePublicAssetURL:z}),r=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",c).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:d}=await import(r);return d(o,n,{emitReady:_e,emitConfigChanged:je,applyResolvedTheme:ie,setupSystemListenerIfNeeded:ae})}o.start=He;async function Ve(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",c=e.staticPaths??{},r=q(e,{resolvePublicAssetURL:z}),d=e&&e.autoDefine||null,w;d&&d.baseURL?w=W(B(d.baseURL,{preferModule:!1})):w=`${r}components/`;let E=d&&Array.isArray(d.predefine)&&d.predefine||[],h=d&&typeof d.mapper=="function"&&d.mapper||null;try{Se(o);let{resolvedTheme:a}=Ee({manageTheme:s,themeStorageKey:n,applyResolvedTheme:ie,setupSystemListenerIfNeeded:ae}),i=await qe(r,e),b=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],f=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},S={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`},g=i?.paths||{};if(c={...S,...g,...c},o.registry.setStaticMode(c),t&&typeof document<"u")try{let u=await o.registry.getStylesheet("styles");if(u){u._pds=!0;let y=(document.adoptedStyleSheets||[]).filter(k=>k._pds!==!0);document.adoptedStyleSheets=[...y,u],je({mode:"static",source:"static:styles-applied"})}}catch(u){ke.call(o,"warn","Failed to apply static styles:",u)}let v=null,j=[];try{let u=await We(),y=await ve({autoDefineBaseURL:w,autoDefinePreload:E,autoDefineMapper:h,enhancers:b,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:u});v=y.autoDefiner,j=y.mergedEnhancers||[]}catch(u){ke.call(o,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",u)}let _=oe(e);return o.currentConfig=Object.freeze({mode:"static",...structuredClone(_),design:structuredClone(f.design||{}),preset:f.preset,theme:a,enhancers:j}),_e({mode:"static",config:f,theme:a,autoDefiner:v}),{config:f,theme:a,autoDefiner:v}}catch(a){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:a}})),a}}var xe={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster","pds-form"]},log(e,t,...s){console[e](t,...s)}};var A={name:"@pure-ds/core",shortname:"pds",version:"0.7.13",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"},"./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-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","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",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.32"},customElements:"custom-elements.json"};await o.start(xe);var Re=typeof A.repository=="string"?A.repository:A.repository?.url,Ge=Re?Re.replace(/^git\+/,"").replace(/\.git$/,""):"",bt=A.homepage||Ge,gt=A.bugs?.url||"";document.body.innerHTML=`
2
+ See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${u}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${u}>:`,y)},...S,mapper:u=>{if(customElements.get(u))return null;if(typeof c=="function")try{let y=c(u);return y===void 0?i(u):y}catch(y){return console.warn("Custom autoDefine.mapper error; falling back to default:",y?.message||y),i(u)}return i(u)}};h=new a(_),n.length>0&&typeof a.define=="function"&&await a.define(...n,{baseURL:s,mapper:_.mapper,onError:_.onError})}return{autoDefiner:h,mergedEnhancers:E}}var ee=["light","dark"],te=new Set(ee);function Fe(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):ee).filter(n=>te.has(n));return s.length?s:ee}function se(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(te.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(te.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Le(e,t){let s=se(t);return Fe(e).includes(s)}var re=class extends EventTarget{},o=new re;o.initializing=!1;o.currentPreset=null;o.debug=!1;var H=null,V=null,K=null,G=null;function Q(e,t){return t&&typeof t=="string"?t:`${q(o.currentConfig||{},{resolvePublicAssetURL:z})}core/${e}`}async function We(){return Array.isArray(o.defaultEnhancers)&&o.defaultEnhancers.length>0?o.defaultEnhancers:(G||(G=import(Q("pds-enhancers.js",o.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return o.defaultEnhancers=s,s}).catch(t=>{throw G=null,t})),G)}async function Be(){return typeof o.ask=="function"&&o.ask!==Ae?o.ask:(V||(V=import(Q("pds-ask.js",o.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return o.ask=s,s}).catch(t=>{throw V=null,t})),V)}async function I(){return typeof o.toast=="function"&&o.toast!==M?o.toast:(K||(K=import(Q("pds-toast.js",o.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return o.toast=s,s}).catch(t=>{throw K=null,t})),K)}async function Ae(...e){return(await Be())(...e)}async function M(...e){return(await I())(...e)}M.success=async(...e)=>(await I()).success(...e);M.error=async(...e)=>(await I()).error(...e);M.warning=async(...e)=>(await I()).warning(...e);M.info=async(...e)=>(await I()).info(...e);var ke=function(e="log",t,...s){let n=!!(o.registry&&!o.registry.isLive),c=(this?.debug||this?.design?.debug||o.debug||!1)===!0;if(n){if(!o.debug)return}else if(!c&&e!=="error"&&e!=="warn")return;let r=console[e]||console.log;s.length>0?r(t,...s):r(t)};function oe(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>oe(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let c=oe(n);c!==void 0&&(t[s]=c)}return t}async function qe(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}o.registry=P;o.enums=fe;o.adoptLayers=ue;o.adoptPrimitives=pe;o.parse=Y;o.createStylesheet=me;o.isLiveMode=()=>P.isLive;o.ask=Ae;o.toast=M;o.common=Z;o.AutoComplete=null;o.loadAutoComplete=async()=>{if(o.AutoComplete&&typeof o.AutoComplete.connect=="function")return o.AutoComplete;let e=Q("pds-autocomplete.js",o.currentConfig?.autoCompleteURL);return H||(H=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return o.AutoComplete=s,s}).catch(t=>{throw H=null,t})),H};function _e(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");o.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function je(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");o.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var ne="pure-ds-theme",x=null,$=null;function ie(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 ae(e){try{if(x&&$){try{typeof x.removeEventListener=="function"?x.removeEventListener("change",$):typeof x.removeListener=="function"&&x.removeListener($)}catch{}x=null,$=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let c=n?.matches===void 0?t.matches:n.matches;try{let r=c?"dark":"light";document.documentElement.setAttribute("data-theme",r),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"system"}}))}catch{}};x=t,$=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}Object.defineProperty(o,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(ne)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=o.currentConfig?.design||null,s=se(e);if(t&&!Le(t,s)){let n=t?.name||o.currentPreset?.name||o.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),o.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(ne):localStorage.setItem(ne,e),ie(e),ae(e),o.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});o.defaultEnhancers=[];async function He(e){let t=e&&e.mode||"live",{mode:s,...n}=e||{};if(t==="static")return Ve(n);let c=q(n,{resolvePublicAssetURL:z}),r=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",c).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:d}=await import(r);return d(o,n,{emitReady:_e,emitConfigChanged:je,applyResolvedTheme:ie,setupSystemListenerIfNeeded:ae})}o.start=He;async function Ve(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",c=e.staticPaths??{},r=q(e,{resolvePublicAssetURL:z}),d=e&&e.autoDefine||null,w;d&&d.baseURL?w=W(B(d.baseURL,{preferModule:!1})):w=`${r}components/`;let E=d&&Array.isArray(d.predefine)&&d.predefine||[],h=d&&typeof d.mapper=="function"&&d.mapper||null;try{Se(o);let{resolvedTheme:a}=Ee({manageTheme:s,themeStorageKey:n,applyResolvedTheme:ie,setupSystemListenerIfNeeded:ae}),i=await qe(r,e),b=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],f=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},S={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`},g=i?.paths||{};if(c={...S,...g,...c},o.registry.setStaticMode(c),t&&typeof document<"u")try{let u=await o.registry.getStylesheet("styles");if(u){u._pds=!0;let y=(document.adoptedStyleSheets||[]).filter(k=>k._pds!==!0);document.adoptedStyleSheets=[...y,u],je({mode:"static",source:"static:styles-applied"})}}catch(u){ke.call(o,"warn","Failed to apply static styles:",u)}let v=null,j=[];try{let u=await We(),y=await ve({autoDefineBaseURL:w,autoDefinePreload:E,autoDefineMapper:h,enhancers:b,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:u});v=y.autoDefiner,j=y.mergedEnhancers||[]}catch(u){ke.call(o,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",u)}let _=oe(e);return o.currentConfig=Object.freeze({mode:"static",...structuredClone(_),design:structuredClone(f.design||{}),preset:f.preset,theme:a,enhancers:j}),_e({mode:"static",config:f,theme:a,autoDefiner:v}),{config:f,theme:a,autoDefiner:v}}catch(a){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:a}})),a}}var xe={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster","pds-form"]},log(e,t,...s){console[e](t,...s)}};var A={name:"@pure-ds/core",shortname:"pds",version:"0.7.15",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"},"./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-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","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",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.32"},customElements:"custom-elements.json"};await o.start(xe);var Re=typeof A.repository=="string"?A.repository:A.repository?.url,Ge=Re?Re.replace(/^git\+/,"").replace(/\.git$/,""):"",bt=A.homepage||Ge,gt=A.bugs?.url||"";document.body.innerHTML=`
3
3
  <pds-toaster id="global-toaster"></pds-toaster>
4
4
 
5
5
  <div class="container text-center">