@pure-ds/core 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/public/assets/js/pds.d.ts +3 -3
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-generator.d.ts +2 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-registry.d.ts +2 -7
- package/dist/types/src/js/pds-core/pds-registry.d.ts.map +1 -1
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/assets/js/app.js +102 -102
- package/public/assets/js/pds.js +87 -87
- package/src/js/pds-core/pds-generator.js +32 -1
- package/src/js/pds-core/pds-registry.js +7 -57
- package/src/js/pds.js +22 -13
package/public/assets/js/pds.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var We=(n,e)=>{for(var t in e)Tt(n,t,{get:e[t],enumerable:!0})};var xt={};We(xt,{AutoDefiner:()=>Te});async function ir(...n){let e={};n.length&&typeof n[n.length-1]=="object"&&(e=n.pop()||{});let t=n,{baseURL:o,mapper:r=l=>`${l}.js`,onError:a=(l,d)=>console.error(`[defineWebComponents] ${l}:`,d)}=e,i=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,p,h)=>h.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=r(l),h=await import(d instanceof URL?d.href:new URL(d,i).href),g=h?.default??h?.[s(l)];if(!g){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${s(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,g),{tag:l,status:"defined"})}catch(d){throw a(l,d),d}};return Promise.all(t.map(c))}var Te,wt=Lt(()=>{Te=class{constructor(e={}){let{baseURL:t,mapper:o,onError:r,predicate:a=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:c=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:p=[],patchAttachShadow:h=!0}=e,g=new Set,x=new Set,f=new Set,b=new Map,E=new WeakMap,F=new WeakMap,_=0,S=!1,$=null,z=y=>{if(!y||!p.length)return;let w=F.get(y);w||(w=new Set,F.set(y,w));for(let v of p)if(!(!v.selector||!v.run)&&!w.has(v.selector))try{y.matches&&y.matches(v.selector)&&(v.run(y),w.add(v.selector))}catch(A){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,A)}},T=(y,w)=>{if(!S&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!x.has(y)&&!f.has(y)){if(w&&w.getAttribute){let v=w.getAttribute(i);v&&!b.has(y)&&b.set(y,v)}g.add(y),me()}},me=()=>{_||(_=setTimeout(Pe,l))},M=y=>{if(y){if(y.nodeType===1){let w=y,v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,w)&&T(v,w),z(w),d&&w.shadowRoot&&fe(w.shadowRoot)}y.querySelectorAll&&y.querySelectorAll("*").forEach(w=>{let v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,w)&&T(v,w),z(w),d&&w.shadowRoot&&fe(w.shadowRoot)})}},fe=y=>{if(!y||E.has(y))return;M(y);let w=new MutationObserver(v=>{for(let A of v)A.addedNodes?.forEach(O=>{M(O)}),A.type==="attributes"&&A.target&&M(A.target)});w.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),E.set(y,w)};async function Pe(){if(clearTimeout(_),_=0,!g.size)return;let y=Array.from(g);g.clear(),y.forEach(w=>x.add(w));try{let w=v=>b.get(v)??(o?o(v):`${v}.js`);await ir(...y,{baseURL:t,mapper:w,onError:(v,A)=>{f.add(v),r?.(v,A)}})}catch{}finally{y.forEach(w=>x.delete(w))}}let De=s===document?document.documentElement:s,Be=new MutationObserver(y=>{for(let w of y)w.addedNodes?.forEach(v=>{M(v)}),w.type==="attributes"&&w.target&&M(w.target)});if(Be.observe(De,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let A=y.call(this,v);if(v&&v.mode==="open"){fe(A);let O=this.tagName?.toLowerCase();O&&O.includes("-")&&!customElements.get(O)&&T(O,this)}return A},$=()=>Element.prototype.attachShadow=y}return c&&M(De),{stop(){S=!0,Be.disconnect(),$&&$(),_&&(clearTimeout(_),_=0),E.forEach(y=>y.disconnect())},flush:Pe}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let o=e,{baseURL:r,mapper:a=d=>`${d}.js`,onError:i=(d,p)=>console.error(`[defineWebComponents] ${d}:`,p)}=t,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(p,h,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=a(d),g=await import(p instanceof URL?p.href:new URL(p,s).href),x=g?.default??g?.[c(d)];if(!x){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,x),{tag:d,status:"defined"})}catch(p){throw i(d,p),p}};return Promise.all(o.map(l))}}});var u={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"}};var oe={meta:{name:"Pure Design System Ontology",version:"0.1"},tokens:{colors:["primary","secondary","accent","success","warning","danger","info"],spacing:["xs","sm","md","lg","xl"],typography:["heading","body","mono"],themes:["light","dark"]},primitives:[{id:"badge",name:"Badge / Pill",selectors:[".badge",".pill",".tag",".chip"]},{id:"card",name:"Card",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"]},{id:"surface",name:"Surface",selectors:[".surface",".surface-base",".surface-raised",".surface-overlay",".surface-subtle",".surface-elevated",".surface-sunken"]},{id:"alert",name:"Alert",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger"]},{id:"dialog",name:"Dialog",selectors:["dialog",".dialog"]},{id:"table",name:"Table",selectors:["table",".table-responsive",".data-table"]},{id:"button",name:"Button",selectors:["button","[class^='btn-']",".icon-only"]},{id:"fieldset",name:"Fieldset Group",selectors:["fieldset[role='group']","fieldset[role='radiogroup']"]},{id:"label-field",name:"Label+Input",selectors:["label"]},{id:"accordion",name:"Accordion",selectors:[".accordion",".accordion-item","details"]},{id:"icon",name:"Icon",selectors:["pds-icon",".icon",".icon-*"]},{id:"figure",name:"Figure/Media",selectors:["figure","figure.media"]},{id:"gallery",name:"Gallery",selectors:[".gallery",".gallery-grid"]}],components:[{id:"pds-tabstrip",name:"Tab Strip",selectors:["pds-tabstrip"]},{id:"pds-drawer",name:"Drawer",selectors:["pds-drawer"]},{id:"pds-upload",name:"Upload",selectors:["pds-upload"]}],layoutPatterns:[{id:"grid",name:"Grid Container",selectors:[".grid",".demo-grid"],description:"CSS Grid layout container"},{id:"grid-auto",name:"Auto-fit Grid",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],description:"Responsive auto-fit grid"},{id:"grid-cols",name:"Grid Columns",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],description:"Fixed column grid"},{id:"flex",name:"Flex Container",selectors:[".flex",".flex-wrap"],description:"Flexbox layout container"},{id:"container",name:"Container",selectors:[".container"],description:"Centered max-width container"},{id:"media-grid",name:"Media Grid",selectors:[".media-grid"],description:"Grid for media elements"}],utilities:[".btn-group",".demo-grid",".color-scale",".gap-*",".items-*",".justify-*",".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong",".border-glow",".border-glow-sm",".border-glow-lg",".border-gradient-glow",".border-glow-*"],styles:{typography:["headings","body","code"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active"]}};function P(n,e){if(!n||!e)return!1;try{return n.matches(e)}catch{return!1}}function Ue(n,e){if(!n||!e||!n.closest)return null;try{return n.closest(e)}catch{return null}}function je(n,{maxDepth:e=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let t=n,o=0;for(;t&&o<e;){if(o++,t.tagName==="DS-SHOWCASE")return null;if(t.classList&&t.classList.contains("showcase-section")){t=t.parentElement;continue}for(let a of PDS.ontology.enhancements)if(P(t,a))return{element:t,componentType:"enhanced-component",displayName:a};if(t.tagName==="FIELDSET"){let a=t.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:t,componentType:"form-group",displayName:a==="radiogroup"?"radio group":"form group"}}if(t.tagName==="LABEL"&&t.querySelector&&t.querySelector("input,select,textarea"))return{element:t,componentType:"form-control",displayName:"label with input"};let r=t.closest?t.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let a of PDS.ontology.primitives){for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(h=>h.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(h=>h.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:a.name||a.id};d=d.parentElement,p++}continue}continue}if(P(t,s))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:a.name||a.id}}if(t.classList){let i=Array.from(t.classList);for(let s of a.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(i.some(l=>l.startsWith(c)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(d=>d.startsWith(l)))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id}}continue}if(P(t,s))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:a.name||a.id}}if(t.tagName&&t.tagName.includes("-"))return{element:t,componentType:"web-component",displayName:t.tagName.toLowerCase()};if(t.tagName==="BUTTON"){let a=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:a?"button with icon":"button"}}if(P(t,"pds-icon")||t.closest&&t.closest("pds-icon")){let a=P(t,"pds-icon")?t:t.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`}}if(P(t,"nav[data-dropdown]")||t.closest&&t.closest("nav[data-dropdown]"))return{element:P(t,"nav[data-dropdown]")?t:t.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu"};t=t.parentElement}return null}var Ne=oe;var ae=class n{#e;#o;constructor(e={}){this.options={debug:!1,...e},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#me(),typeof CSSStyleSheet<"u"?this.#xe():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let e=this.options.design||{};return{colors:this.#y(e.colors||{}),spacing:this.generateSpacingTokens(e.spatialRhythm||{}),radius:this.#C(e.shape||{}),borderWidths:this.#_(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#T(e.layers||{}),layout:this.#L(e.layout||{}),transitions:this.#F(e.behavior||{}),zIndex:this.#R(e.layers||{}),icons:this.#P(e.icons||{})}}#y(e){let{primary:t="#3b82f6",secondary:o="#64748b",accent:r="#ec4899",background:a="#ffffff",success:i=null,warning:s="#FFBF00",danger:c=null,info:l=null,darkMode:d={}}=e,p={primary:this.#r(t),secondary:this.#r(o),accent:this.#r(r),success:this.#r(i||this.#v(t)),warning:this.#r(s||r),danger:this.#r(c||this.#x(t)),info:this.#r(l||t),gray:this.#d(o),surface:this.#p(a)};return p.surface.fieldset=this.#w(p.surface),p.surfaceSmart=this.#f(p.surface),p.dark=this.#S(p,a,d),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#f(p.dark.surface)),p.interactive={light:{fill:this.#m(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#m(p.dark.primary,4.5),text:this.#M(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(e){let t=this.#a(e);return{50:this.#t(t.h,Math.max(t.s-10,10),Math.min(t.l+45,95)),100:this.#t(t.h,Math.max(t.s-5,15),Math.min(t.l+35,90)),200:this.#t(t.h,t.s,Math.min(t.l+25,85)),300:this.#t(t.h,t.s,Math.min(t.l+15,75)),400:this.#t(t.h,t.s,Math.min(t.l+5,65)),500:e,600:this.#t(t.h,t.s,Math.max(t.l-10,25)),700:this.#t(t.h,t.s,Math.max(t.l-20,20)),800:this.#t(t.h,t.s,Math.max(t.l-30,15)),900:this.#t(t.h,t.s,Math.max(t.l-40,10))}}#v(e){let t=this.#a(e);return this.#t(120,Math.max(t.s,60),45)}#x(e){let t=this.#a(e);return this.#t(0,Math.max(t.s,70),50)}#d(e){let t=this.#a(e),o=t.h,r=Math.min(t.s,10);return{50:this.#t(o,r,98),100:this.#t(o,r,95),200:this.#t(o,r,88),300:this.#t(o,r,78),400:this.#t(o,r,60),500:e,600:this.#t(o,Math.min(r+5,15),45),700:this.#t(o,Math.min(r+8,18),35),800:this.#t(o,Math.min(r+10,20),20),900:this.#t(o,Math.min(r+12,22),10)}}#p(e){let t=this.#a(e);return{base:e,subtle:this.#t(t.h,Math.max(t.s,2),Math.max(t.l-2,2)),elevated:this.#t(t.h,Math.max(t.s,3),Math.max(t.l-4,5)),sunken:this.#t(t.h,Math.max(t.s,4),Math.max(t.l-6,8)),overlay:this.#t(t.h,Math.max(t.s,2),Math.min(t.l+2,98)),inverse:this.#u(e),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#w(e){return{base:e.subtle,subtle:e.elevated,elevated:e.sunken,sunken:this.#k(e.sunken,.05),overlay:e.elevated}}#k(e,t=.05){let o=this.#a(e),r=Math.max(o.l-o.l*t,5);return this.#t(o.h,o.s,r)}#u(e){let t=this.#a(e);if(t.l>50){let o=Math.min(t.s+5,25),r=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,o,r)}else{let o=Math.max(t.s-10,5),r=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,o,r)}}#S(e,t="#ffffff",o={}){let r=o.background?o.background:this.#u(t),a=this.#p(r),i=o.primary?this.#r(o.primary):this.#n(e.primary);return{surface:{...a,fieldset:this.#E(a)},primary:i,secondary:o.secondary?this.#r(o.secondary):this.#n(e.secondary),accent:o.accent?this.#r(o.accent):this.#n(e.accent),gray:o.secondary?this.#d(o.secondary):e.gray,success:this.#n(e.success),info:this.#n(e.info),warning:this.#n(e.warning),danger:this.#n(e.danger)}}#s(e){let t=String(e||"").replace("#",""),o=t.length===3?t.split("").map(a=>a+a).join(""):t,r=parseInt(o,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(e){let{r:t,g:o,b:r}=this.#s(e),a=[t/255,o/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#c(e,t){let o=this.#l(e),r=this.#l(t),a=Math.max(o,r),i=Math.min(o,r);return(a+.05)/(i+.05)}#h(e,t=4.5){if(!e)return"#000000";let o="#ffffff",r="#000000",a=this.#c(e,o);if(a>=t)return o;let i=this.#c(e,r);return i>=t||i>a?r:o}#g(e,t=1){let{r:o,g:r,b:a}=this.#s(e);return`rgba(${o}, ${r}, ${a}, ${t})`}#$(e,t,o=.5){let r=this.#s(e),a=this.#s(t),i=Math.round(r.r+(a.r-r.r)*o),s=Math.round(r.g+(a.g-r.g)*o),c=Math.round(r.b+(a.b-r.b)*o);return this.#z(i,s,c)}#z(e,t,o){let r=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${r(e)}${r(t)}${r(o)}`}#E(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#b(e.elevated,.08),sunken:e.elevated,overlay:this.#b(e.overlay,.05)}}#M(e={},t="#000000",o=4.5){let r=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of r){let s=e?.[i];if(!s||typeof s!="string")continue;let c=this.#c(s,t);if(c>a.ratio&&(a={shade:i,color:s,ratio:c}),c>=o)return s}return a.color||e?.["600"]||e?.["500"]}#m(e={},t=4.5){let o=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let a of o){let i=e?.[a];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:a,color:i,ratio:s}),s>=t)return i}return r.color||e?.["600"]||e?.["500"]}#f(e){let t={};return Object.entries(e).forEach(([o,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let a=this.#l(r)<.5,i=this.#h(r,4.5),s=this.#h(r,3),c=this.#$(i,r,.4),l=i,d=c,p=a?"#ffffff":"#000000",h=a?.25:.1,g=this.#g(p,h),x=a?"#ffffff":"#000000",f=a?.15:.1,b=this.#g(x,f);t[o]={bg:r,text:i,textSecondary:s,textMuted:c,icon:l,iconSubtle:d,shadow:g,border:b,scheme:a?"dark":"light"}}),t}#b(e,t=.05){let o=this.#a(e),r=Math.min(o.l+(100-o.l)*t,95);return this.#t(o.h,o.s,r)}#n(e){let t={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([r,a])=>{let i=e[a.source];t[r]=this.#A(i,a.dimFactor)}),t}#A(e,t=.8){let o=this.#a(e),r=Math.max(o.s*t,5),a=Math.max(o.l*t,5);return this.#t(o.h,r,a)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:o=1.25,maxSpacingSteps:r=12}=e,a=Number.isFinite(Number(t))?Number(t):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let c=1;c<=i;c++)s[c]=`${a*c}px`;return s}#C(e){let{radiusSize:t="medium",customRadius:o=null}=e,r;o!=null?r=o:typeof t=="number"?r=t:typeof t=="string"?r=u.RadiusSizes[t]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let a=Number.isFinite(Number(r))?Number(r):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#_(e){let{borderWidth:t="medium"}=e,o;return typeof t=="number"?o=t:typeof t=="string"?o=u.BorderWidths[t]??u.BorderWidths.medium:o=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(e){let{fontFamilyHeadings:t="system-ui, -apple-system, sans-serif",fontFamilyBody:o="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:a=16,fontScale:i=1.25,fontWeightLight:s=u.FontWeights.light,fontWeightNormal:c=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:x=u.LineHeights.relaxed}=e,f=Number.isFinite(Number(a))?Number(a):16,b=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:t,body:o,mono:r},fontSize:{xs:`${Math.round(f/Math.pow(b,2))}px`,sm:`${Math.round(f/b)}px`,base:`${f}px`,lg:`${Math.round(f*b)}px`,xl:`${Math.round(f*Math.pow(b,2))}px`,"2xl":`${Math.round(f*Math.pow(b,3))}px`,"3xl":`${Math.round(f*Math.pow(b,4))}px`,"4xl":`${Math.round(f*Math.pow(b,5))}px`},fontWeight:{light:s?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:x?.toString()||"1.75"}}}#T(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:o=1,shadowOffsetMultiplier:r=1}=e,a=`rgba(0, 0, 0, ${t})`,i=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*r}px ${2*o}px 0 ${i}`,base:`0 ${1*r}px ${3*o}px 0 ${a}, 0 ${1*r}px ${2*o}px 0 ${i}`,md:`0 ${4*r}px ${6*o}px ${-1*r}px ${a}, 0 ${2*r}px ${4*o}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*o}px ${-3*r}px ${a}, 0 ${4*r}px ${6*o}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*o}px ${-5*r}px ${a}, 0 ${10*r}px ${10*o}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*o}px 0 ${i}`}}#L(e){let{maxWidth:t=1200,containerPadding:o=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${o}px`,breakpoints:{sm:`${r.sm}px`,md:`${r.md}px`,lg:`${r.lg}px`,xl:`${r.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#F(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:o=u.AnimationEasings["ease-out"]}=e,r;return typeof t=="number"?r=t:typeof t=="string"&&u.TransitionSpeeds[t]?r=u.TransitionSpeeds[t]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:o=10}=e;return{dropdown:t.toString(),sticky:(t+o*2).toString(),fixed:(t+o*3).toString(),modal:(t+o*4).toString(),drawer:(t+o*5).toString(),popover:(t+o*6).toString(),tooltip:(t+o*7).toString(),notification:(t+o*8).toString()}}#P(e){let{set:t="phosphor",weight:o="regular",defaultSize:r=24,sizes:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg"}=e;return{set:t,weight:o,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,c])=>[s,`${c}px`])),spritePath:i}}#D(e){let t=[];t.push(` /* Colors */
|
|
1
|
+
var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var Ue=(n,e)=>{for(var t in e)Tt(n,t,{get:e[t],enumerable:!0})};var xt={};Ue(xt,{AutoDefiner:()=>Le});async function ir(...n){let e={};n.length&&typeof n[n.length-1]=="object"&&(e=n.pop()||{});let t=n,{baseURL:o,mapper:r=l=>`${l}.js`,onError:a=(l,d)=>console.error(`[defineWebComponents] ${l}:`,d)}=e,i=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,p,h)=>h.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=r(l),h=await import(d instanceof URL?d.href:new URL(d,i).href),g=h?.default??h?.[s(l)];if(!g){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${s(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,g),{tag:l,status:"defined"})}catch(d){throw a(l,d),d}};return Promise.all(t.map(c))}var Le,wt=Lt(()=>{Le=class{constructor(e={}){let{baseURL:t,mapper:o,onError:r,predicate:a=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:c=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:p=[],patchAttachShadow:h=!0}=e,g=new Set,w=new Set,m=new Set,f=new Map,M=new WeakMap,R=new WeakMap,T=0,S=!1,$=null,z=y=>{if(!y||!p.length)return;let x=R.get(y);x||(x=new Set,R.set(y,x));for(let v of p)if(!(!v.selector||!v.run)&&!x.has(v.selector))try{y.matches&&y.matches(v.selector)&&(v.run(y),x.add(v.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,C)}},L=(y,x)=>{if(!S&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!w.has(y)&&!m.has(y)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!f.has(y)&&f.set(y,v)}g.add(y),fe()}},fe=()=>{T||(T=setTimeout(De,l))},A=y=>{if(y){if(y.nodeType===1){let x=y,v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&L(v,x),z(x),d&&x.shadowRoot&&be(x.shadowRoot)}y.querySelectorAll&&y.querySelectorAll("*").forEach(x=>{let v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&L(v,x),z(x),d&&x.shadowRoot&&be(x.shadowRoot)})}},be=y=>{if(!y||M.has(y))return;A(y);let x=new MutationObserver(v=>{for(let C of v)C.addedNodes?.forEach(I=>{A(I)}),C.type==="attributes"&&C.target&&A(C.target)});x.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),M.set(y,x)};async function De(){if(clearTimeout(T),T=0,!g.size)return;let y=Array.from(g);g.clear(),y.forEach(x=>w.add(x));try{let x=v=>f.get(v)??(o?o(v):`${v}.js`);await ir(...y,{baseURL:t,mapper:x,onError:(v,C)=>{m.add(v),r?.(v,C)}})}catch{}finally{y.forEach(x=>w.delete(x))}}let Be=s===document?document.documentElement:s,We=new MutationObserver(y=>{for(let x of y)x.addedNodes?.forEach(v=>{A(v)}),x.type==="attributes"&&x.target&&A(x.target)});if(We.observe(Be,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let C=y.call(this,v);if(v&&v.mode==="open"){be(C);let I=this.tagName?.toLowerCase();I&&I.includes("-")&&!customElements.get(I)&&L(I,this)}return C},$=()=>Element.prototype.attachShadow=y}return c&&A(Be),{stop(){S=!0,We.disconnect(),$&&$(),T&&(clearTimeout(T),T=0),M.forEach(y=>y.disconnect())},flush:De}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let o=e,{baseURL:r,mapper:a=d=>`${d}.js`,onError:i=(d,p)=>console.error(`[defineWebComponents] ${d}:`,p)}=t,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(p,h,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=a(d),g=await import(p instanceof URL?p.href:new URL(p,s).href),w=g?.default??g?.[c(d)];if(!w){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,w),{tag:d,status:"defined"})}catch(p){throw i(d,p),p}};return Promise.all(o.map(l))}}});var ye=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(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(e){if(this._mode==="live")return null;try{return(await import(this._staticPaths[e]))[e]}catch(t){console.error(`[PDS Registry] Failed to load static ${e}:`,t),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let o=new CSSStyleSheet;return o.replaceSync("/* Failed to load "+e+" */"),o}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},V=new ye;var u={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"}};var ne={meta:{name:"Pure Design System Ontology",version:"0.1"},tokens:{colors:["primary","secondary","accent","success","warning","danger","info"],spacing:["xs","sm","md","lg","xl"],typography:["heading","body","mono"],themes:["light","dark"]},primitives:[{id:"badge",name:"Badge / Pill",selectors:[".badge",".pill",".tag",".chip"]},{id:"card",name:"Card",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"]},{id:"surface",name:"Surface",selectors:[".surface",".surface-base",".surface-raised",".surface-overlay",".surface-subtle",".surface-elevated",".surface-sunken"]},{id:"alert",name:"Alert",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger"]},{id:"dialog",name:"Dialog",selectors:["dialog",".dialog"]},{id:"table",name:"Table",selectors:["table",".table-responsive",".data-table"]},{id:"button",name:"Button",selectors:["button","[class^='btn-']",".icon-only"]},{id:"fieldset",name:"Fieldset Group",selectors:["fieldset[role='group']","fieldset[role='radiogroup']"]},{id:"label-field",name:"Label+Input",selectors:["label"]},{id:"accordion",name:"Accordion",selectors:[".accordion",".accordion-item","details"]},{id:"icon",name:"Icon",selectors:["pds-icon",".icon",".icon-*"]},{id:"figure",name:"Figure/Media",selectors:["figure","figure.media"]},{id:"gallery",name:"Gallery",selectors:[".gallery",".gallery-grid"]}],components:[{id:"pds-tabstrip",name:"Tab Strip",selectors:["pds-tabstrip"]},{id:"pds-drawer",name:"Drawer",selectors:["pds-drawer"]},{id:"pds-upload",name:"Upload",selectors:["pds-upload"]}],layoutPatterns:[{id:"grid",name:"Grid Container",selectors:[".grid",".demo-grid"],description:"CSS Grid layout container"},{id:"grid-auto",name:"Auto-fit Grid",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],description:"Responsive auto-fit grid"},{id:"grid-cols",name:"Grid Columns",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],description:"Fixed column grid"},{id:"flex",name:"Flex Container",selectors:[".flex",".flex-wrap"],description:"Flexbox layout container"},{id:"container",name:"Container",selectors:[".container"],description:"Centered max-width container"},{id:"media-grid",name:"Media Grid",selectors:[".media-grid"],description:"Grid for media elements"}],utilities:[".btn-group",".demo-grid",".color-scale",".gap-*",".items-*",".justify-*",".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong",".border-glow",".border-glow-sm",".border-glow-lg",".border-gradient-glow",".border-glow-*"],styles:{typography:["headings","body","code"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active"]}};function D(n,e){if(!n||!e)return!1;try{return n.matches(e)}catch{return!1}}function je(n,e){if(!n||!e||!n.closest)return null;try{return n.closest(e)}catch{return null}}function Ne(n,{maxDepth:e=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let t=n,o=0;for(;t&&o<e;){if(o++,t.tagName==="DS-SHOWCASE")return null;if(t.classList&&t.classList.contains("showcase-section")){t=t.parentElement;continue}for(let a of PDS.ontology.enhancements)if(D(t,a))return{element:t,componentType:"enhanced-component",displayName:a};if(t.tagName==="FIELDSET"){let a=t.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:t,componentType:"form-group",displayName:a==="radiogroup"?"radio group":"form group"}}if(t.tagName==="LABEL"&&t.querySelector&&t.querySelector("input,select,textarea"))return{element:t,componentType:"form-control",displayName:"label with input"};let r=t.closest?t.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let a of PDS.ontology.primitives){for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(h=>h.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(h=>h.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:a.name||a.id};d=d.parentElement,p++}continue}continue}if(D(t,s))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let c=je(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:a.name||a.id}}if(t.classList){let i=Array.from(t.classList);for(let s of a.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(i.some(l=>l.startsWith(c)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(d=>d.startsWith(l)))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id}}continue}if(D(t,s))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id};let c=je(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:a.name||a.id}}if(t.tagName&&t.tagName.includes("-"))return{element:t,componentType:"web-component",displayName:t.tagName.toLowerCase()};if(t.tagName==="BUTTON"){let a=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:a?"button with icon":"button"}}if(D(t,"pds-icon")||t.closest&&t.closest("pds-icon")){let a=D(t,"pds-icon")?t:t.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`}}if(D(t,"nav[data-dropdown]")||t.closest&&t.closest("nav[data-dropdown]"))return{element:D(t,"nav[data-dropdown]")?t:t.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu"};t=t.parentElement}return null}var Oe=ne;var E=class n{static#d;static get instance(){return this.#d}#e;#o;constructor(e={}){this.options={debug:!1,...e},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#d=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#we():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let e=this.options.design||{};return{colors:this.#v(e.colors||{}),spacing:this.generateSpacingTokens(e.spatialRhythm||{}),radius:this.#_(e.shape||{}),borderWidths:this.#T(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#L(e.layers||{}),layout:this.#F(e.layout||{}),transitions:this.#R(e.behavior||{}),zIndex:this.#P(e.layers||{}),icons:this.#D(e.icons||{})}}#v(e){let{primary:t="#3b82f6",secondary:o="#64748b",accent:r="#ec4899",background:a="#ffffff",success:i=null,warning:s="#FFBF00",danger:c=null,info:l=null,darkMode:d={}}=e,p={primary:this.#r(t),secondary:this.#r(o),accent:this.#r(r),success:this.#r(i||this.#x(t)),warning:this.#r(s||r),danger:this.#r(c||this.#w(t)),info:this.#r(l||t),gray:this.#p(o),surface:this.#u(a)};return p.surface.fieldset=this.#k(p.surface),p.surfaceSmart=this.#b(p.surface),p.dark=this.#$(p,a,d),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#b(p.dark.surface)),p.interactive={light:{fill:this.#f(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#f(p.dark.primary,4.5),text:this.#A(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(e){let t=this.#a(e);return{50:this.#t(t.h,Math.max(t.s-10,10),Math.min(t.l+45,95)),100:this.#t(t.h,Math.max(t.s-5,15),Math.min(t.l+35,90)),200:this.#t(t.h,t.s,Math.min(t.l+25,85)),300:this.#t(t.h,t.s,Math.min(t.l+15,75)),400:this.#t(t.h,t.s,Math.min(t.l+5,65)),500:e,600:this.#t(t.h,t.s,Math.max(t.l-10,25)),700:this.#t(t.h,t.s,Math.max(t.l-20,20)),800:this.#t(t.h,t.s,Math.max(t.l-30,15)),900:this.#t(t.h,t.s,Math.max(t.l-40,10))}}#x(e){let t=this.#a(e);return this.#t(120,Math.max(t.s,60),45)}#w(e){let t=this.#a(e);return this.#t(0,Math.max(t.s,70),50)}#p(e){let t=this.#a(e),o=t.h,r=Math.min(t.s,10);return{50:this.#t(o,r,98),100:this.#t(o,r,95),200:this.#t(o,r,88),300:this.#t(o,r,78),400:this.#t(o,r,60),500:e,600:this.#t(o,Math.min(r+5,15),45),700:this.#t(o,Math.min(r+8,18),35),800:this.#t(o,Math.min(r+10,20),20),900:this.#t(o,Math.min(r+12,22),10)}}#u(e){let t=this.#a(e);return{base:e,subtle:this.#t(t.h,Math.max(t.s,2),Math.max(t.l-2,2)),elevated:this.#t(t.h,Math.max(t.s,3),Math.max(t.l-4,5)),sunken:this.#t(t.h,Math.max(t.s,4),Math.max(t.l-6,8)),overlay:this.#t(t.h,Math.max(t.s,2),Math.min(t.l+2,98)),inverse:this.#h(e),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(e){return{base:e.subtle,subtle:e.elevated,elevated:e.sunken,sunken:this.#S(e.sunken,.05),overlay:e.elevated}}#S(e,t=.05){let o=this.#a(e),r=Math.max(o.l-o.l*t,5);return this.#t(o.h,o.s,r)}#h(e){let t=this.#a(e);if(t.l>50){let o=Math.min(t.s+5,25),r=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,o,r)}else{let o=Math.max(t.s-10,5),r=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,o,r)}}#$(e,t="#ffffff",o={}){let r=o.background?o.background:this.#h(t),a=this.#u(r),i=o.primary?this.#r(o.primary):this.#n(e.primary);return{surface:{...a,fieldset:this.#M(a)},primary:i,secondary:o.secondary?this.#r(o.secondary):this.#n(e.secondary),accent:o.accent?this.#r(o.accent):this.#n(e.accent),gray:o.secondary?this.#p(o.secondary):e.gray,success:this.#n(e.success),info:this.#n(e.info),warning:this.#n(e.warning),danger:this.#n(e.danger)}}#s(e){let t=String(e||"").replace("#",""),o=t.length===3?t.split("").map(a=>a+a).join(""):t,r=parseInt(o,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(e){let{r:t,g:o,b:r}=this.#s(e),a=[t/255,o/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#c(e,t){let o=this.#l(e),r=this.#l(t),a=Math.max(o,r),i=Math.min(o,r);return(a+.05)/(i+.05)}#g(e,t=4.5){if(!e)return"#000000";let o="#ffffff",r="#000000",a=this.#c(e,o);if(a>=t)return o;let i=this.#c(e,r);return i>=t||i>a?r:o}#m(e,t=1){let{r:o,g:r,b:a}=this.#s(e);return`rgba(${o}, ${r}, ${a}, ${t})`}#z(e,t,o=.5){let r=this.#s(e),a=this.#s(t),i=Math.round(r.r+(a.r-r.r)*o),s=Math.round(r.g+(a.g-r.g)*o),c=Math.round(r.b+(a.b-r.b)*o);return this.#E(i,s,c)}#E(e,t,o){let r=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${r(e)}${r(t)}${r(o)}`}#M(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#y(e.elevated,.08),sunken:e.elevated,overlay:this.#y(e.overlay,.05)}}#A(e={},t="#000000",o=4.5){let r=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of r){let s=e?.[i];if(!s||typeof s!="string")continue;let c=this.#c(s,t);if(c>a.ratio&&(a={shade:i,color:s,ratio:c}),c>=o)return s}return a.color||e?.["600"]||e?.["500"]}#f(e={},t=4.5){let o=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let a of o){let i=e?.[a];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:a,color:i,ratio:s}),s>=t)return i}return r.color||e?.["600"]||e?.["500"]}#b(e){let t={};return Object.entries(e).forEach(([o,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let a=this.#l(r)<.5,i=this.#g(r,4.5),s=this.#g(r,3),c=this.#z(i,r,.4),l=i,d=c,p=a?"#ffffff":"#000000",h=a?.25:.1,g=this.#m(p,h),w=a?"#ffffff":"#000000",m=a?.15:.1,f=this.#m(w,m);t[o]={bg:r,text:i,textSecondary:s,textMuted:c,icon:l,iconSubtle:d,shadow:g,border:f,scheme:a?"dark":"light"}}),t}#y(e,t=.05){let o=this.#a(e),r=Math.min(o.l+(100-o.l)*t,95);return this.#t(o.h,o.s,r)}#n(e){let t={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([r,a])=>{let i=e[a.source];t[r]=this.#C(i,a.dimFactor)}),t}#C(e,t=.8){let o=this.#a(e),r=Math.max(o.s*t,5),a=Math.max(o.l*t,5);return this.#t(o.h,r,a)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:o=1.25,maxSpacingSteps:r=12}=e,a=Number.isFinite(Number(t))?Number(t):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let c=1;c<=i;c++)s[c]=`${a*c}px`;return s}#_(e){let{radiusSize:t="medium",customRadius:o=null}=e,r;o!=null?r=o:typeof t=="number"?r=t:typeof t=="string"?r=u.RadiusSizes[t]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let a=Number.isFinite(Number(r))?Number(r):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#T(e){let{borderWidth:t="medium"}=e,o;return typeof t=="number"?o=t:typeof t=="string"?o=u.BorderWidths[t]??u.BorderWidths.medium:o=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(e){let{fontFamilyHeadings:t="system-ui, -apple-system, sans-serif",fontFamilyBody:o="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:a=16,fontScale:i=1.25,fontWeightLight:s=u.FontWeights.light,fontWeightNormal:c=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:w=u.LineHeights.relaxed}=e,m=Number.isFinite(Number(a))?Number(a):16,f=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:t,body:o,mono:r},fontSize:{xs:`${Math.round(m/Math.pow(f,2))}px`,sm:`${Math.round(m/f)}px`,base:`${m}px`,lg:`${Math.round(m*f)}px`,xl:`${Math.round(m*Math.pow(f,2))}px`,"2xl":`${Math.round(m*Math.pow(f,3))}px`,"3xl":`${Math.round(m*Math.pow(f,4))}px`,"4xl":`${Math.round(m*Math.pow(f,5))}px`},fontWeight:{light:s?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:w?.toString()||"1.75"}}}#L(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:o=1,shadowOffsetMultiplier:r=1}=e,a=`rgba(0, 0, 0, ${t})`,i=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*r}px ${2*o}px 0 ${i}`,base:`0 ${1*r}px ${3*o}px 0 ${a}, 0 ${1*r}px ${2*o}px 0 ${i}`,md:`0 ${4*r}px ${6*o}px ${-1*r}px ${a}, 0 ${2*r}px ${4*o}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*o}px ${-3*r}px ${a}, 0 ${4*r}px ${6*o}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*o}px ${-5*r}px ${a}, 0 ${10*r}px ${10*o}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*o}px 0 ${i}`}}#F(e){let{maxWidth:t=1200,containerPadding:o=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${o}px`,breakpoints:{sm:`${r.sm}px`,md:`${r.md}px`,lg:`${r.lg}px`,xl:`${r.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#R(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:o=u.AnimationEasings["ease-out"]}=e,r;return typeof t=="number"?r=t:typeof t=="string"&&u.TransitionSpeeds[t]?r=u.TransitionSpeeds[t]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#P(e){let{baseZIndex:t=1e3,zIndexStep:o=10}=e;return{dropdown:t.toString(),sticky:(t+o*2).toString(),fixed:(t+o*3).toString(),modal:(t+o*4).toString(),drawer:(t+o*5).toString(),popover:(t+o*6).toString(),tooltip:(t+o*7).toString(),notification:(t+o*8).toString()}}#D(e){let{set:t="phosphor",weight:o="regular",defaultSize:r=24,sizes:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg"}=e;return{set:t,weight:o,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,c])=>[s,`${c}px`])),spritePath:i}}#B(e){let t=[];t.push(` /* Colors */
|
|
2
2
|
`);let o=(r,a="")=>{Object.entries(r).forEach(([i,s])=>{typeof s=="object"&&s!==null?o(s,`${a}${i}-`):typeof s=="string"&&t.push(` --color-${a}${i}: ${s};
|
|
3
3
|
`)})};return Object.entries(e).forEach(([r,a])=>{r!=="dark"&&r!=="surfaceSmart"&&r!=="interactive"&&typeof a=="object"&&a!==null&&o(a,`${r}-`)}),e.surfaceSmart&&(t.push(` /* Smart Surface Tokens (context-aware) */
|
|
4
4
|
`),Object.entries(e.surfaceSmart).forEach(([r,a])=>{t.push(` --surface-${r}-bg: ${a.bg};
|
|
@@ -41,8 +41,8 @@ var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var We=(n,e)=>{
|
|
|
41
41
|
|
|
42
42
|
/* Legacy alias for backwards compatibility */
|
|
43
43
|
--backdrop-background: var(--backdrop-bg);
|
|
44
|
-
`),t.push(this.#
|
|
45
|
-
`}#
|
|
44
|
+
`),t.push(this.#W(e)),`${t.join("")}
|
|
45
|
+
`}#W(e){let t=e.primary?.[500]||"#3b82f6",o=e.secondary?.[500]||"#8b5cf6",r=e.accent?.[500]||"#f59e0b";return`
|
|
46
46
|
/* Mesh Gradient Backgrounds */
|
|
47
47
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${t} 25%, transparent) 0px, transparent 50%),
|
|
48
48
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${o} 22%, transparent) 0px, transparent 50%),
|
|
@@ -68,37 +68,37 @@ var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var We=(n,e)=>{
|
|
|
68
68
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
69
69
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${o} 18%, transparent) 0px, transparent 50%),
|
|
70
70
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
71
|
-
`}#
|
|
71
|
+
`}#U(e){let t=[` /* Spacing */
|
|
72
72
|
`];return Object.entries(e).forEach(([o,r])=>{o!=null&&o!=="NaN"&&r!==void 0&&!r.includes("NaN")&&t.push(` --spacing-${o}: ${r};
|
|
73
73
|
`)}),`${t.join("")}
|
|
74
|
-
`}#
|
|
74
|
+
`}#j(e){let t=[` /* Border Radius */
|
|
75
75
|
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --radius-${o}: ${r};
|
|
76
76
|
`)}),`${t.join("")}
|
|
77
|
-
`}#
|
|
77
|
+
`}#N(e){let t=[` /* Border Widths */
|
|
78
78
|
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --border-width-${o}: ${r};
|
|
79
79
|
`)}),`${t.join("")}
|
|
80
|
-
`}#
|
|
80
|
+
`}#O(e){let t=[` /* Typography */
|
|
81
81
|
`];return Object.entries(e).forEach(([o,r])=>{let a=o.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(r).forEach(([i,s])=>{let c=i.replace(/([A-Z])/g,"-$1").toLowerCase();t.push(` --font-${a}-${c}: ${s};
|
|
82
82
|
`)})}),`${t.join("")}
|
|
83
|
-
`}#
|
|
83
|
+
`}#I(e){let t=[` /* Shadows */
|
|
84
84
|
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --shadow-${o}: ${r};
|
|
85
85
|
`)}),`${t.join("")}
|
|
86
|
-
`}#
|
|
86
|
+
`}#H(e){let t=[` /* Layout */
|
|
87
87
|
`];return Object.entries(e).forEach(([o,r])=>{let a=o.replace(/([A-Z])/g,"-$1").toLowerCase();o!=="breakpoints"&&t.push(` --layout-${a}: ${r};
|
|
88
88
|
`)}),`${t.join("")}
|
|
89
|
-
`}#
|
|
89
|
+
`}#G(e){let t=[` /* Transitions */
|
|
90
90
|
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --transition-${o}: ${r};
|
|
91
91
|
`)}),`${t.join("")}
|
|
92
|
-
`}#
|
|
92
|
+
`}#q(e){let t=[` /* Z-Index */
|
|
93
93
|
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --z-${o}: ${r};
|
|
94
94
|
`)}),`${t.join("")}
|
|
95
|
-
`}#
|
|
95
|
+
`}#V(e){let t=[` /* Icon System */
|
|
96
96
|
`];return t.push(` --icon-set: ${e.set};
|
|
97
97
|
`),t.push(` --icon-weight: ${e.weight};
|
|
98
98
|
`),t.push(` --icon-size: ${e.defaultSize};
|
|
99
99
|
`),Object.entries(e.sizes).forEach(([o,r])=>{t.push(` --icon-size-${o}: ${r};
|
|
100
100
|
`)}),`${t.join("")}
|
|
101
|
-
`}#
|
|
101
|
+
`}#K(e){if(!e?.dark)return"";let t=[],o=(l,d="")=>{Object.entries(l).forEach(([p,h])=>{typeof h=="object"&&h!==null?o(h,`${d}${p}-`):typeof h=="string"&&t.push(` --color-${d}${p}: ${h};
|
|
102
102
|
`)})};Object.entries(e.dark).forEach(([l,d])=>{l!=="surfaceSmart"&&typeof d=="object"&&d!==null&&o(d,`${l}-`)});let r=[];e.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
103
103
|
`),Object.entries(e.dark.surfaceSmart).forEach(([l,d])=>{r.push(` --surface-${l}-bg: ${d.bg};
|
|
104
104
|
`),r.push(` --surface-${l}-text: ${d.text};
|
|
@@ -131,9 +131,9 @@ var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var We=(n,e)=>{
|
|
|
131
131
|
|
|
132
132
|
/* Legacy alias for backwards compatibility */
|
|
133
133
|
--backdrop-background: var(--backdrop-bg);
|
|
134
|
-
`,s=this.#
|
|
134
|
+
`,s=this.#Y(e);return`html[data-theme="dark"] {
|
|
135
135
|
${[...t,...r,a,i,s].join("")}}
|
|
136
|
-
`}#
|
|
136
|
+
`}#Z(e){if(!e?.dark)return"";let t=[],o=(d,p="")=>{Object.entries(d).forEach(([h,g])=>{typeof g=="object"&&g!==null?o(g,`${p}${h}-`):typeof g=="string"&&t.push(` --color-${p}${h}: ${g};
|
|
137
137
|
`)})};Object.entries(e.dark).forEach(([d,p])=>{d!=="surfaceSmart"&&typeof p=="object"&&p!==null&&o(p,`${d}-`)});let r=[];e.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
138
138
|
`),Object.entries(e.dark.surfaceSmart).forEach(([d,p])=>{r.push(` --surface-${d}-bg: ${p.bg};
|
|
139
139
|
`),r.push(` --surface-${d}-text: ${p.text};
|
|
@@ -169,10 +169,10 @@ ${[...t,...r,a,i,s].join("")}}
|
|
|
169
169
|
|
|
170
170
|
/* Legacy alias for backwards compatibility */
|
|
171
171
|
--backdrop-background: var(--backdrop-bg);
|
|
172
|
-
`,c=this.#
|
|
172
|
+
`,c=this.#Q(e);return`
|
|
173
173
|
html[data-theme="dark"] {
|
|
174
174
|
${[...t,...r,i,s,c].join("")} }
|
|
175
|
-
`}#
|
|
175
|
+
`}#Q(e){let t=e.dark||e,o=t.primary?.[400]||"#60a5fa",r=t.secondary?.[400]||"#a78bfa",a=t.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
176
176
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${o} 20%, transparent) 0px, transparent 50%),
|
|
177
177
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
178
178
|
radial-gradient(at 52% 99%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
@@ -197,7 +197,7 @@ ${[...t,...r,i,s,c].join("")} }
|
|
|
197
197
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
198
198
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
199
199
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
200
|
-
`}#
|
|
200
|
+
`}#Y(e){let t=e.dark||e,o=t.primary?.[400]||"#60a5fa",r=t.secondary?.[400]||"#a78bfa",a=t.accent?.[400]||"#fbbf24";return`
|
|
201
201
|
/* Mesh Gradient Backgrounds (Dark Mode) */
|
|
202
202
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${o} 20%, transparent) 0px, transparent 50%),
|
|
203
203
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
@@ -223,7 +223,7 @@ ${[...t,...r,i,s,c].join("")} }
|
|
|
223
223
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
224
224
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
225
225
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
226
|
-
`}#
|
|
226
|
+
`}#J(){return`/* Alert dark mode adjustments */
|
|
227
227
|
html[data-theme="dark"] .alert-success {
|
|
228
228
|
background-color: var(--color-success-50);
|
|
229
229
|
border-color: var(--color-success-500);
|
|
@@ -259,11 +259,11 @@ html[data-theme="dark"] video {
|
|
|
259
259
|
html[data-theme="dark"] img:hover,
|
|
260
260
|
html[data-theme="dark"] video:hover {
|
|
261
261
|
opacity: 1;
|
|
262
|
-
}`}#
|
|
262
|
+
}`}#X(){try{let e=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",e);let t=Number(e);return!Number.isFinite(t)||t===0?"":`/* Optional background mesh applied from config */
|
|
263
263
|
body {
|
|
264
264
|
background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(t)))});
|
|
265
265
|
background-attachment: fixed;
|
|
266
|
-
}`}catch(e){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",e),""}}#
|
|
266
|
+
}`}catch(e){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",e),""}}#ee(){try{return this.options?.design?.options?.liquidGlassEffects?`/* Liquid glass utility (opt-in via options.liquidGlassEffects) */
|
|
267
267
|
.liquid-glass {
|
|
268
268
|
border-radius: var(--radius-lg);
|
|
269
269
|
/* Subtle translucent fill blended with surface */
|
|
@@ -320,7 +320,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
320
320
|
0 18px 32px rgba(0,0,0,0.58);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
`:""}catch{return""}}#
|
|
323
|
+
`:""}catch{return""}}#te(){return`/* ============================================================================
|
|
324
324
|
Border Gradient Utilities
|
|
325
325
|
Card outlines with gradient borders and glow effects
|
|
326
326
|
============================================================================ */
|
|
@@ -445,7 +445,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
445
445
|
box-shadow: 0 0 12px var(--color-danger-500);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
`}#
|
|
448
|
+
`}#re(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Semantic HTML Elements (low-specificity via :where()) */
|
|
449
449
|
|
|
450
450
|
:where(blockquote) {
|
|
451
451
|
margin: 0 0 var(--spacing-4) 0;
|
|
@@ -604,14 +604,14 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
604
604
|
|
|
605
605
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
606
606
|
|
|
607
|
-
`}#
|
|
607
|
+
`}#oe(){let{gap:e,inputPadding:t,buttonPadding:o,focusRingWidth:r,focusRingOpacity:a,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:c,inputMinHeight:l}=this.options.design,d=t||.75,p=o||1,h=r||3,g=i||1,w=e||1,m=s||2,f=c||44,M=l||40;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
608
608
|
form {
|
|
609
609
|
margin: 0;
|
|
610
610
|
width: 100%;
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
fieldset {
|
|
614
|
-
margin: 0 0 var(--spacing-${Number.isFinite(Math.round(
|
|
614
|
+
margin: 0 0 var(--spacing-${Number.isFinite(Math.round(w*m/4))?Math.round(w*m/4):1}) 0;
|
|
615
615
|
padding: var(--spacing-5);
|
|
616
616
|
width: 100%;
|
|
617
617
|
background-color: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
@@ -716,7 +716,7 @@ label {
|
|
|
716
716
|
|
|
717
717
|
input, textarea, select {
|
|
718
718
|
width: 100%;
|
|
719
|
-
min-height: ${
|
|
719
|
+
min-height: ${M}px;
|
|
720
720
|
padding: calc(var(--spacing-1) * ${d}) var(--spacing-4);
|
|
721
721
|
border: ${g}px solid var(--color-border);
|
|
722
722
|
border-radius: var(--radius-md);
|
|
@@ -889,7 +889,7 @@ input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
|
889
889
|
display: inline-flex;
|
|
890
890
|
align-items: center;
|
|
891
891
|
justify-content: center;
|
|
892
|
-
min-height: calc(${
|
|
892
|
+
min-height: calc(${f}px * 0.75);
|
|
893
893
|
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
894
894
|
border: ${g}px solid var(--color-border);
|
|
895
895
|
border-radius: var(--radius-md);
|
|
@@ -993,7 +993,7 @@ fieldset[role="group"].buttons {
|
|
|
993
993
|
display: inline-flex;
|
|
994
994
|
align-items: center;
|
|
995
995
|
justify-content: center;
|
|
996
|
-
min-height: calc(${
|
|
996
|
+
min-height: calc(${f}px * 0.75);
|
|
997
997
|
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
998
998
|
border: ${g}px solid var(--color-border);
|
|
999
999
|
border-radius: var(--radius-md);
|
|
@@ -1172,7 +1172,7 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1172
1172
|
gap: var(--spacing-1);
|
|
1173
1173
|
align-items: center;
|
|
1174
1174
|
justify-content: center;
|
|
1175
|
-
min-height: ${
|
|
1175
|
+
min-height: ${f}px;
|
|
1176
1176
|
padding: calc(var(--spacing-1) * ${p}) var(--spacing-6);
|
|
1177
1177
|
border: ${g}px solid transparent;
|
|
1178
1178
|
border-radius: var(--radius-md);
|
|
@@ -1281,20 +1281,20 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1281
1281
|
.btn-sm {
|
|
1282
1282
|
padding: var(--spacing-2) var(--spacing-4);
|
|
1283
1283
|
font-size: var(--font-size-sm);
|
|
1284
|
-
min-height: calc(${
|
|
1284
|
+
min-height: calc(${f}px * 0.8);
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
.btn-xs {
|
|
1288
1288
|
padding: var(--spacing-1) var(--spacing-2);
|
|
1289
1289
|
font-size: var(--font-size-xs);
|
|
1290
|
-
min-height: calc(${
|
|
1290
|
+
min-height: calc(${f}px * 0.6);
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
|
|
1294
1294
|
.btn-lg {
|
|
1295
1295
|
padding: var(--spacing-4) var(--spacing-8);
|
|
1296
1296
|
font-size: var(--font-size-lg);
|
|
1297
|
-
min-height: calc(${
|
|
1297
|
+
min-height: calc(${f}px * 1.2);
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
1300
|
/* Working/loading state for buttons */
|
|
@@ -1442,7 +1442,7 @@ a.btn-working {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
|
-
`}#
|
|
1445
|
+
`}#ae(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Table Styles - Mobile First */
|
|
1446
1446
|
|
|
1447
1447
|
table {
|
|
1448
1448
|
width: 100%;
|
|
@@ -1523,7 +1523,7 @@ tbody {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
|
|
1526
|
-
`}#
|
|
1526
|
+
`}#ne(){return`/* Alert/Notification Styles */
|
|
1527
1527
|
|
|
1528
1528
|
/* Alias: .semantic-message shares alert base styles */
|
|
1529
1529
|
.alert, .semantic-message {
|
|
@@ -1609,7 +1609,7 @@ tbody {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
}
|
|
1611
1611
|
|
|
1612
|
-
`}#
|
|
1612
|
+
`}#ie(){return`/* Accordion (details/summary) */
|
|
1613
1613
|
|
|
1614
1614
|
.accordion {
|
|
1615
1615
|
--_acc-radius: var(--radius-md);
|
|
@@ -1693,7 +1693,7 @@ tbody {
|
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
|
-
`}#
|
|
1696
|
+
`}#se(){return`/* Badge/Pill Styles */
|
|
1697
1697
|
|
|
1698
1698
|
.badge {
|
|
1699
1699
|
display: inline-flex;
|
|
@@ -1785,7 +1785,7 @@ tbody {
|
|
|
1785
1785
|
border-radius: var(--radius-full);
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
|
-
`}#
|
|
1788
|
+
`}#ce(){let{layout:e={},behavior:t={}}=this.options.design;return`/* ============================================================================
|
|
1789
1789
|
Dialog Primitive
|
|
1790
1790
|
Native <dialog> element with PDS integration
|
|
1791
1791
|
============================================================================ */
|
|
@@ -1984,7 +1984,7 @@ dialog.dialog-full {
|
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
1986
|
|
|
1987
|
-
`}#
|
|
1987
|
+
`}#le(){let{layout:e={}}=this.options.design;return`/* Tab Strip Component */
|
|
1988
1988
|
|
|
1989
1989
|
/* Tab navigation */
|
|
1990
1990
|
|
|
@@ -2096,7 +2096,7 @@ pds-tabstrip {
|
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
2098
|
|
|
2099
|
-
`}#
|
|
2099
|
+
`}#de(){return`/* Custom Scrollbars */
|
|
2100
2100
|
|
|
2101
2101
|
::-webkit-scrollbar {
|
|
2102
2102
|
width: 12px;
|
|
@@ -2159,7 +2159,7 @@ pds-tabstrip {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
}
|
|
2161
2161
|
|
|
2162
|
-
`}#
|
|
2162
|
+
`}#pe(){let{a11y:e={}}=this.options.design,t=e.minTouchTarget||u.TouchTargetSizes.standard;return`/* Icon System */
|
|
2163
2163
|
|
|
2164
2164
|
pds-icon {
|
|
2165
2165
|
display: inline-flex;
|
|
@@ -2328,7 +2328,7 @@ button, a {
|
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
2330
|
|
|
2331
|
-
`}#
|
|
2331
|
+
`}#ue(){return`/* Dropdown Component */
|
|
2332
2332
|
|
|
2333
2333
|
/* Basic dropdown host */
|
|
2334
2334
|
nav[data-dropdown] {
|
|
@@ -2472,7 +2472,7 @@ nav[data-dropdown] {
|
|
|
2472
2472
|
scale: 0.95;
|
|
2473
2473
|
}
|
|
2474
2474
|
}
|
|
2475
|
-
`}#
|
|
2475
|
+
`}#he(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280},o=e.gridSystem||{},r=o.columns||[1,2,3,4,6],a=o.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=[`
|
|
2476
2476
|
/* ============================================================================
|
|
2477
2477
|
Layout Utilities
|
|
2478
2478
|
Modern grid and flex system for building responsive layouts
|
|
@@ -2588,7 +2588,7 @@ nav[data-dropdown] {
|
|
|
2588
2588
|
--backdrop-blur: 20px;
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
|
-
`),i.join("")}#
|
|
2591
|
+
`),i.join("")}#ge(){return`/* Media Element Utilities */
|
|
2592
2592
|
|
|
2593
2593
|
/* Gallery images */
|
|
2594
2594
|
.img-gallery {
|
|
@@ -2630,7 +2630,7 @@ nav[data-dropdown] {
|
|
|
2630
2630
|
height: auto;
|
|
2631
2631
|
}
|
|
2632
2632
|
|
|
2633
|
-
`}#
|
|
2633
|
+
`}#me(){let{layout:e={},a11y:t={}}=this.options.design,o=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=t.minTouchTarget||u.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2634
2634
|
|
|
2635
2635
|
/* Small devices (${o.sm}px and up) */
|
|
2636
2636
|
@media (min-width: ${o.sm}px) {
|
|
@@ -2754,23 +2754,23 @@ nav[data-dropdown] {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
}
|
|
2756
2756
|
|
|
2757
|
-
`}#a(e){let t=parseInt(e.slice(1,3),16)/255,o=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,a=Math.max(t,o,r),i=Math.min(t,o,r),s,c,l=(a+i)/2;if(a===i)s=c=0;else{let d=a-i;switch(c=l>.5?d/(2-a-i):d/(a+i),a){case t:s=(o-r)/d+(o<r?6:0);break;case o:s=(r-t)/d+2;break;case r:s=(t-o)/d+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}}#t(e,t,o){e=e/360,t=t/100,o=o/100;let r=(l,d,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?l+(d-l)*6*p:p<1/2?d:p<2/3?l+(d-l)*(2/3-p)*6:l),a,i,s;if(t===0)a=i=s=o;else{let l=o<.5?o*(1+t):o+t-o*t,d=2*o-l;a=r(d,l,e+1/3),i=r(d,l,e),s=r(d,l,e-1/3)}let c=l=>{let d=Math.round(l*255).toString(16);return d.length===1?"0"+d:d};return`#${c(a)}${c(i)}${c(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#
|
|
2757
|
+
`}#a(e){let t=parseInt(e.slice(1,3),16)/255,o=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,a=Math.max(t,o,r),i=Math.min(t,o,r),s,c,l=(a+i)/2;if(a===i)s=c=0;else{let d=a-i;switch(c=l>.5?d/(2-a-i):d/(a+i),a){case t:s=(o-r)/d+(o<r?6:0);break;case o:s=(r-t)/d+2;break;case r:s=(t-o)/d+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}}#t(e,t,o){e=e/360,t=t/100,o=o/100;let r=(l,d,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?l+(d-l)*6*p:p<1/2?d:p<2/3?l+(d-l)*(2/3-p)*6:l),a,i,s;if(t===0)a=i=s=o;else{let l=o<.5?o*(1+t):o+t-o*t,d=2*o-l;a=r(d,l,e+1/3),i=r(d,l,e),s=r(d,l,e-1/3)}let c=l=>{let d=Math.round(l*255).toString(16);return d.length===1?"0"+d:d};return`#${c(a)}${c(i)}${c(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#fe(){this.#e={tokens:this.#be(),primitives:this.#ye(),components:this.#ve(),utilities:this.#xe()},this.options.debug&&this.options.log?.("debug","[Generator] Layer sizes:",{tokens:`${(this.#e.tokens.length/1024).toFixed(2)} KB`,primitives:`${(this.#e.primitives.length/1024).toFixed(2)} KB`,components:`${(this.#e.components.length/1024).toFixed(2)} KB`,utilities:`${(this.#e.utilities.length/1024).toFixed(2)} KB`})}#be(){let{colors:e,spacing:t,radius:o,borderWidths:r,typography:a,shadows:i,layout:s,transitions:c,zIndex:l,icons:d}=this.tokens,p=[`@layer tokens {
|
|
2758
2758
|
:root {
|
|
2759
|
-
${this.#
|
|
2760
|
-
${this.#
|
|
2761
|
-
${this.#
|
|
2762
|
-
${this.#
|
|
2763
|
-
${this.#
|
|
2764
|
-
${this.#
|
|
2765
|
-
${this.#
|
|
2766
|
-
${this.#
|
|
2767
|
-
${this.#
|
|
2768
|
-
${this.#
|
|
2759
|
+
${this.#B(e)}
|
|
2760
|
+
${this.#U(t)}
|
|
2761
|
+
${this.#j(o)}
|
|
2762
|
+
${this.#N(r)}
|
|
2763
|
+
${this.#O(a)}
|
|
2764
|
+
${this.#I(i)}
|
|
2765
|
+
${this.#H(s)}
|
|
2766
|
+
${this.#G(c)}
|
|
2767
|
+
${this.#q(l)}
|
|
2768
|
+
${this.#V(d)}
|
|
2769
2769
|
}
|
|
2770
|
-
${this.#
|
|
2770
|
+
${this.#Z(e)}
|
|
2771
2771
|
}`];return p.push(`
|
|
2772
2772
|
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2773
|
-
`),p.push(this.#
|
|
2773
|
+
`),p.push(this.#K(e)),p.join("")}#ye(){let{advanced:e={},a11y:t={},layout:o={}}=this.options.design,r=e.tabSize||u.TabSizes.standard,a=t.minTouchTarget||u.TouchTargetSizes.standard,i=o.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2774
2774
|
/* Base HTML reset */
|
|
2775
2775
|
*, *::before, *::after {
|
|
2776
2776
|
box-sizing: border-box;
|
|
@@ -3122,25 +3122,25 @@ nav[data-dropdown] {
|
|
|
3122
3122
|
}
|
|
3123
3123
|
}
|
|
3124
3124
|
|
|
3125
|
-
`}#
|
|
3126
|
-
|
|
3127
|
-
${this.#te()}
|
|
3125
|
+
`}#ve(){return`@layer components {
|
|
3128
3126
|
|
|
3129
3127
|
${this.#re()}
|
|
3130
3128
|
|
|
3131
|
-
${this.#
|
|
3129
|
+
${this.#oe()}
|
|
3132
3130
|
|
|
3133
|
-
${this.#
|
|
3131
|
+
${this.#ne()}
|
|
3134
3132
|
|
|
3135
3133
|
${this.#se()}
|
|
3136
3134
|
|
|
3137
|
-
${this.#
|
|
3135
|
+
${this.#ce()}
|
|
3138
3136
|
|
|
3139
|
-
${this.#
|
|
3137
|
+
${this.#ie()}
|
|
3140
3138
|
|
|
3141
|
-
${this.#
|
|
3139
|
+
${this.#ue()}
|
|
3142
3140
|
|
|
3143
|
-
${this.#
|
|
3141
|
+
${this.#le()}
|
|
3142
|
+
|
|
3143
|
+
${this.#ae()}
|
|
3144
3144
|
|
|
3145
3145
|
/* Card component */
|
|
3146
3146
|
|
|
@@ -3167,25 +3167,25 @@ ${this.#oe()}
|
|
|
3167
3167
|
}
|
|
3168
3168
|
}
|
|
3169
3169
|
|
|
3170
|
-
${this.#
|
|
3170
|
+
${this.#de()}
|
|
3171
3171
|
|
|
3172
|
-
${this.#
|
|
3172
|
+
${this.#J()}
|
|
3173
3173
|
|
|
3174
3174
|
}
|
|
3175
|
-
`}#
|
|
3175
|
+
`}#xe(){return`@layer utilities {
|
|
3176
3176
|
|
|
3177
|
-
${this.#
|
|
3177
|
+
${this.#pe()}
|
|
3178
3178
|
|
|
3179
|
-
${this.#
|
|
3179
|
+
${this.#he()}
|
|
3180
3180
|
|
|
3181
3181
|
/* Optional utilities/features controlled by config options */
|
|
3182
3182
|
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
3183
3183
|
/* - Liquid glass utility class */
|
|
3184
|
-
${this.#J()}
|
|
3185
3184
|
${this.#X()}
|
|
3186
|
-
|
|
3187
3185
|
${this.#ee()}
|
|
3188
3186
|
|
|
3187
|
+
${this.#te()}
|
|
3188
|
+
|
|
3189
3189
|
/* Surface utilities */
|
|
3190
3190
|
|
|
3191
3191
|
.surface {
|
|
@@ -3286,30 +3286,30 @@ ${this.#ee()}
|
|
|
3286
3286
|
}
|
|
3287
3287
|
|
|
3288
3288
|
|
|
3289
|
-
${this.#he()}
|
|
3290
|
-
|
|
3291
3289
|
${this.#ge()}
|
|
3292
3290
|
|
|
3291
|
+
${this.#me()}
|
|
3292
|
+
|
|
3293
3293
|
}
|
|
3294
|
-
`}#
|
|
3294
|
+
`}#we(){this.#o={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#ke()}#ke(){this.#o.tokens.replaceSync(this.#e.tokens),this.#o.primitives.replaceSync(this.#e.primitives),this.#o.components.replaceSync(this.#e.components),this.#o.utilities.replaceSync(this.#e.utilities)}get tokensCSS(){return this.#e?.tokens||""}get primitivesCSS(){return this.#e?.primitives||""}get componentsCSS(){return this.#e?.components||""}get utilitiesCSS(){return this.#e?.utilities||""}get layeredCSS(){return this.#e?`${this.#e.tokens}
|
|
3295
3295
|
${this.#e.primitives}
|
|
3296
3296
|
${this.#e.components}
|
|
3297
|
-
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof
|
|
3297
|
+
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof ne<"u"?ne:null,enums:typeof u<"u"?u:null},meta:{generatedAt:new Date().toISOString(),totalSize:(this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0),totalSizeKB:(((this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0))/1024).toFixed(2),layerCount:4,tokenGroups:Object.keys(this.tokens).length},helpers:{getColorScales:()=>{let e=[],t=this.tokens.colors;for(let[o,r]of Object.entries(t))typeof r=="object"&&r!==null&&e.push({name:o,scale:r});return e},getColorScale:e=>this.tokens.colors[e]||null,getSpacingValues:()=>Object.entries(this.tokens.spacing).map(([e,t])=>({key:e,value:t})),getTypography:()=>this.tokens.typography,getLayerCSS:e=>{let t=["tokens","primitives","components","utilities"];if(!t.includes(e))throw new Error(`Invalid layer: ${e}. Must be one of ${t.join(", ")}`);return this.#e?.[e]||""},usesEnumValue:(e,t)=>{let o=this.options.design||{};return JSON.stringify(o).includes(t)}}}}get tokensStylesheet(){return this.#o?.tokens}get primitivesStylesheet(){return this.#o?.primitives}get componentsStylesheet(){return this.#o?.components}get utilitiesStylesheet(){return this.#o?.utilities}getCSSModules(){return{"pds-tokens.css.js":this.#i("tokens",this.#e.tokens),"pds-primitives.css.js":this.#i("primitives",this.#e.primitives),"pds-components.css.js":this.#i("components",this.#e.components),"pds-utilities.css.js":this.#i("utilities",this.#e.utilities),"pds-styles.css.js":this.#i("styles",this.layeredCSS)}}#i(e,t){let o=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${e}
|
|
3298
3298
|
// Auto-generated - do not edit directly
|
|
3299
3299
|
|
|
3300
3300
|
export const ${e} = new CSSStyleSheet();
|
|
3301
3301
|
${e}.replaceSync(\`${o}\`);
|
|
3302
3302
|
|
|
3303
3303
|
export const ${e}CSS = \`${o}\`;
|
|
3304
|
-
`}static applyStyles(e){if(!e||typeof e!="object"){e?.options?.log?.("error","[Generator] applyStyles requires a generator object");return}let t=e.layeredCSS||e.css||"";if(!t){e?.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(t)}static installRuntimeStyles(e){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(e),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,r],n.__pdsRuntimeSheet=r;return}let t="pds-runtime-stylesheet",o=document.getElementById(t);if(!o){o=document.createElement("style"),o.id=t,o.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(o):document.documentElement.appendChild(o)}o.textContent=e}catch(t){console.warn("Generator.installRuntimeStyles failed:",t)}}};async function Oe(n,e=[]){try{let t=await PDS.registry.getStylesheet("primitives");if(n.adoptedStyleSheets=[t,...e],PDS.registry.isLive){let o=n.host?.tagName?.toLowerCase()||"unknown"}}catch(t){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,t),n.adoptedStyleSheets=e}}async function Ie(n,e=["primitives"],t=[]){try{let r=(await Promise.all(e.map(a=>PDS.registry.getStylesheet(a)))).filter(a=>a!==null);if(n.adoptedStyleSheets=[...r,...t],PDS.registry.isLive){let a=n.host?.tagName?.toLowerCase()||"unknown"}}catch(o){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,o),n.adoptedStyleSheets=t}}function He(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}function Ge(){return pdsRegistry.isLive}var be=class{constructor(){this._mode="static",this._designer=null,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"}}setDesigner(e,t={}){this._designer=e,this._mode="live";let o=t?.presetName;o?e?.options?.log?.("log",`PDS live with preset "${o}"`):e?.options?.log?.("log","PDS live with custom config")}setStaticMode(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(e){if(this._mode==="live"&&this._designer)switch(e){case"tokens":return this._designer.tokensStylesheet;case"primitives":return this._designer.primitivesStylesheet;case"components":return this._designer.componentsStylesheet;case"utilities":return this._designer.utilitiesStylesheet;default:return this._designer?.options?.log?.("warn",`[PDS Registry] Unknown layer: ${e}`),null}else try{return(await import(this._staticPaths[e]))[e]}catch(t){console.error(`[PDS Registry] Failed to load static ${e}:`,t),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let o=new CSSStyleSheet;return o.replaceSync("/* Failed to load "+e+" */"),o}}get mode(){return this._mode}get isLive(){return this._mode==="live"&&this._designer!==null}get hasDesigner(){return this._designer!==null}},qe=new be;var C={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1,backgroundMesh:2},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};C.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ne(n="log",e,...t){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;t.length>0?r(e,...t):r(e)}}var ie=globalThis,ce=ie.ShadowRoot&&(ie.ShadyCSS===void 0||ie.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ke=Symbol(),Ve=new WeakMap,se=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ce&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ve.set(t,e))}return e}toString(){return this.cssText}},Ze=n=>new se(typeof n=="string"?n:n+"",void 0,Ke);var Qe=(n,e)=>{if(ce)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),r=ie.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,n.appendChild(o)}},ye=ce?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ze(t)})(n):n;var{is:Ft,defineProperty:Rt,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Bt,getPrototypeOf:Wt}=Object,le=globalThis,Ye=le.trustedTypes,Ut=Ye?Ye.emptyScript:"",jt=le.reactiveElementPolyfillSupport,q=(n,e)=>n,ve={toAttribute(n,e){switch(e){case Boolean:n=n?Ut:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Xe=(n,e)=>!Ft(n,e),Je={attribute:!0,type:String,converter:ve,reflect:!1,useDefault:!1,hasChanged:Xe};Symbol.metadata??=Symbol("metadata"),le.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Je){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Rt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Pt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let s=r?.call(this);a?.call(this,i),this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Je}static _$Ei(){if(this.hasOwnProperty(q("elementProperties")))return;let e=Wt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(q("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(q("properties"))){let t=this.properties,o=[...Dt(t),...Bt(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(ye(r))}else e!==void 0&&t.push(ye(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let a=(o.converter?.toAttribute!==void 0?o.converter:ve).toAttribute(t,o.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let a=o.getPropertyOptions(r),i=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ve;this._$Em=r;let s=i.fromAttribute(t,a.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let r=this.constructor,a=this[e];if(o??=r.getPropertyOptions(e),!((o.hasChanged??Xe)(a,t)||o.useDefault&&o.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),a!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,a]of o){let{wrapped:i}=a,s=this[r];i!==!0||this._$AL.has(r)||s===void 0||this.C(r,void 0,a,s)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[q("elementProperties")]=new Map,L[q("finalized")]=new Map,jt?.({ReactiveElement:L}),(le.reactiveElementVersions??=[]).push("2.1.1");var Ee=globalThis,de=Ee.trustedTypes,et=de?de.createPolicy("lit-html",{createHTML:n=>n}):void 0,it="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+R,Nt=`<${st}>`,W=document,K=()=>W.createComment(""),Z=n=>n===null||typeof n!="object"&&typeof n!="function",Me=Array.isArray,Ot=n=>Me(n)||typeof n?.[Symbol.iterator]=="function",xe=`[
|
|
3305
|
-
\f\r]`,
|
|
3306
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,
|
|
3304
|
+
`}static applyStyles(e){if(!e||typeof e!="object"){e?.options?.log?.("error","[Generator] applyStyles requires a generator object");return}let t=e.layeredCSS||e.css||"";if(!t){e?.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(t)}static installRuntimeStyles(e){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(e),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,r],n.__pdsRuntimeSheet=r;return}let t="pds-runtime-stylesheet",o=document.getElementById(t);if(!o){o=document.createElement("style"),o.id=t,o.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(o):document.documentElement.appendChild(o)}o.textContent=e}catch(t){console.warn("Generator.installRuntimeStyles failed:",t)}}};async function Ie(n,e=[]){try{let t=await PDS.registry.getStylesheet("primitives");if(n.adoptedStyleSheets=[t,...e],PDS.registry.isLive){let o=n.host?.tagName?.toLowerCase()||"unknown"}}catch(t){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,t),n.adoptedStyleSheets=e}}async function He(n,e=["primitives"],t=[]){try{let r=(await Promise.all(e.map(async a=>{if(E.instance)switch(a){case"tokens":return E.instance.tokensStylesheet;case"primitives":return E.instance.primitivesStylesheet;case"components":return E.instance.componentsStylesheet;case"utilities":return E.instance.utilitiesStylesheet;default:break}return V.getStylesheet(a)}))).filter(a=>a!==null);if(n.adoptedStyleSheets=[...r,...t],PDS.registry.isLive){let a=n.host?.tagName?.toLowerCase()||"unknown"}}catch(o){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,o),n.adoptedStyleSheets=t}}function Ge(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}function qe(){return V.isLive}var _={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1,backgroundMesh:2},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};_.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ie(n="log",e,...t){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;t.length>0?r(e,...t):r(e)}}var se=globalThis,le=se.ShadowRoot&&(se.ShadyCSS===void 0||se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ke=Symbol(),Ve=new WeakMap,ce=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(le&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ve.set(t,e))}return e}toString(){return this.cssText}},Ze=n=>new ce(typeof n=="string"?n:n+"",void 0,Ke);var Qe=(n,e)=>{if(le)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),r=se.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,n.appendChild(o)}},ve=le?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ze(t)})(n):n;var{is:Ft,defineProperty:Rt,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Bt,getPrototypeOf:Wt}=Object,de=globalThis,Ye=de.trustedTypes,Ut=Ye?Ye.emptyScript:"",jt=de.reactiveElementPolyfillSupport,K=(n,e)=>n,xe={toAttribute(n,e){switch(e){case Boolean:n=n?Ut:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Xe=(n,e)=>!Ft(n,e),Je={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Xe};Symbol.metadata??=Symbol("metadata"),de.litPropertyMetadata??=new WeakMap;var F=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Je){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Rt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Pt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let s=r?.call(this);a?.call(this,i),this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Je}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;let e=Wt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){let t=this.properties,o=[...Dt(t),...Bt(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(ve(r))}else e!==void 0&&t.push(ve(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let a=(o.converter?.toAttribute!==void 0?o.converter:xe).toAttribute(t,o.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let a=o.getPropertyOptions(r),i=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:xe;this._$Em=r;let s=i.fromAttribute(t,a.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let r=this.constructor,a=this[e];if(o??=r.getPropertyOptions(e),!((o.hasChanged??Xe)(a,t)||o.useDefault&&o.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),a!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,a]of o){let{wrapped:i}=a,s=this[r];i!==!0||this._$AL.has(r)||s===void 0||this.C(r,void 0,a,s)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[K("elementProperties")]=new Map,F[K("finalized")]=new Map,jt?.({ReactiveElement:F}),(de.reactiveElementVersions??=[]).push("2.1.1");var Me=globalThis,pe=Me.trustedTypes,et=pe?pe.createPolicy("lit-html",{createHTML:n=>n}):void 0,it="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+P,Nt=`<${st}>`,U=document,Q=()=>U.createComment(""),Y=n=>n===null||typeof n!="object"&&typeof n!="function",Ae=Array.isArray,Ot=n=>Ae(n)||typeof n?.[Symbol.iterator]=="function",we=`[
|
|
3305
|
+
\f\r]`,Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,rt=/>/g,B=RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
|
|
3306
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,Ce=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Cr=Ce(1),_r=Ce(2),Tr=Ce(3),j=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),nt=new WeakMap,W=U.createTreeWalker(U,129);function lt(n,e){if(!Ae(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return et!==void 0?et.createHTML(e):e}var It=(n,e)=>{let t=n.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",i=Z;for(let s=0;s<t;s++){let c=n[s],l,d,p=-1,h=0;for(;h<c.length&&(i.lastIndex=h,d=i.exec(c),d!==null);)h=i.lastIndex,i===Z?d[1]==="!--"?i=tt:d[1]!==void 0?i=rt:d[2]!==void 0?(ct.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=B):d[3]!==void 0&&(i=B):i===B?d[0]===">"?(i=r??Z,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?B:d[3]==='"'?at:ot):i===at||i===ot?i=B:i===tt||i===rt?i=Z:(i=B,r=void 0);let g=i===B&&n[s+1].startsWith("/>")?" ":"";a+=i===Z?c+Nt:p>=0?(o.push(l),c.slice(0,p)+it+c.slice(p)+P+g):c+P+(p===-2?s:g)}return[lt(n,a+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},J=class n{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,i=0,s=e.length-1,c=this.parts,[l,d]=It(e,t);if(this.el=n.createElement(l,o),W.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=W.nextNode())!==null&&c.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(it)){let h=d[i++],g=r.getAttribute(p).split(P),w=/([.?@])?(.*)/.exec(h);c.push({type:1,index:a,name:w[2],strings:g,ctor:w[1]==="."?Se:w[1]==="?"?$e:w[1]==="@"?ze:G}),r.removeAttribute(p)}else p.startsWith(P)&&(c.push({type:6,index:a}),r.removeAttribute(p));if(ct.test(r.tagName)){let p=r.textContent.split(P),h=p.length-1;if(h>0){r.textContent=pe?pe.emptyScript:"";for(let g=0;g<h;g++)r.append(p[g],Q()),W.nextNode(),c.push({type:2,index:++a});r.append(p[h],Q())}}}else if(r.nodeType===8)if(r.data===st)c.push({type:2,index:a});else{let p=-1;for(;(p=r.data.indexOf(P,p+1))!==-1;)c.push({type:7,index:a}),p+=P.length-1}a++}}static createElement(e,t){let o=U.createElement("template");return o.innerHTML=e,o}};function H(n,e,t=n,o){if(e===j)return e;let r=o!==void 0?t._$Co?.[o]:t._$Cl,a=Y(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),a===void 0?r=void 0:(r=new a(n),r._$AT(n,t,o)),o!==void 0?(t._$Co??=[])[o]=r:t._$Cl=r),r!==void 0&&(e=H(n,r._$AS(n,e.values),r,o)),e}var ke=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:o}=this._$AD,r=(e?.creationScope??U).importNode(t,!0);W.currentNode=r;let a=W.nextNode(),i=0,s=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new X(a,a.nextSibling,this,e):c.type===1?l=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(l=new Ee(a,this,e)),this._$AV.push(l),c=o[++s]}i!==c?.index&&(a=W.nextNode(),i++)}return W.currentNode=U,r}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},X=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=H(this,e,t),Y(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==j&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ot(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&Y(this._$AH)?this._$AA.nextSibling.data=e:this.T(U.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=J.createElement(lt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(t);else{let a=new ke(r,this),i=a.u(this.options);a.p(t),this.T(i),this._$AH=a}}_$AC(e){let t=nt.get(e.strings);return t===void 0&&nt.set(e.strings,t=new J(e)),t}k(e){Ae(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,r=0;for(let a of e)r===t.length?t.push(o=new n(this.O(Q()),this.O(Q()),this,this.options)):o=t[r],o._$AI(a),r++;r<t.length&&(this._$AR(o&&o._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},G=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,r,a){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=k}_$AI(e,t=this,o,r){let a=this.strings,i=!1;if(a===void 0)e=H(this,e,t,0),i=!Y(e)||e!==this._$AH&&e!==j,i&&(this._$AH=e);else{let s=e,c,l;for(e=a[0],c=0;c<a.length-1;c++)l=H(this,s[o+c],t,c),l===j&&(l=this._$AH[c]),i||=!Y(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+a[c+1]),this._$AH[c]=l}i&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Se=class extends G{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},$e=class extends G{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},ze=class extends G{constructor(e,t,o,r,a){super(e,t,o,r,a),this.type=5}_$AI(e,t=this){if((e=H(this,e,t,0)??k)===j)return;let o=this._$AH,r=e===k&&o!==k||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==k&&(o===k||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ee=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){H(this,e)}};var Ht=Me.litHtmlPolyfillSupport;Ht?.(J,X),(Me.litHtmlVersions??=[]).push("3.3.1");var N=(n,e,t)=>{let o=t?.renderBefore??e,r=o._$litPart$;if(r===void 0){let a=t?.renderBefore??null;o._$litPart$=r=new X(e.insertBefore(Q(),a),a,void 0,t??{})}return r._$AI(n),r};var _e=globalThis,q=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=N(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}};q._$litElement$=!0,q.finalized=!0,_e.litElementHydrateSupport?.({LitElement:q});var Gt=_e.litElementPolyfillSupport;Gt?.({LitElement:q});(_e.litElementVersions??=[]).push("4.2.1");var dt={mode:"live",preset:"default",static:{root:"public/assets/pds/"},autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(n,e,...t){console[n](e,...t)}};async function pt(n,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(o=>{let r=document.createElement("dialog");dt.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),e.size&&r.classList.add(`dialog-${e.size}`),e.type&&r.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?r.classList.add(...e.class):r.classList.add(e.class));let a=Object.entries(e.buttons).map(([s,c])=>{let l=c.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${c.cancel?"button":"submit"}" class="${l}" value="${s}">${c.name}</button>`});if(e.useForm){r.innerHTML=`
|
|
3307
3307
|
<header>
|
|
3308
3308
|
<h2>${e.title}</h2>
|
|
3309
3309
|
</header>
|
|
3310
3310
|
|
|
3311
3311
|
<article id="msg-container"></article>
|
|
3312
|
-
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?
|
|
3312
|
+
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?N(n,s):typeof n=="string"?s.textContent=n:N(n,s),requestAnimationFrame(()=>{let c=r.querySelector("form");if(c){let l=document.createElement("footer");l.innerHTML=a.join(""),c.appendChild(l)}})}else{r.innerHTML=`
|
|
3313
3313
|
<form method="dialog">
|
|
3314
3314
|
<header>
|
|
3315
3315
|
<h2>${e.title}</h2>
|
|
@@ -3321,7 +3321,7 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3321
3321
|
${a.join("")}
|
|
3322
3322
|
</footer>
|
|
3323
3323
|
</form>
|
|
3324
|
-
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?
|
|
3324
|
+
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?N(n,s):typeof n=="string"?s.textContent=n:N(n,s)}r.addEventListener("click",s=>{s.target.closest('button[value="cancel"]')&&(r.close(),o(!1))});let i=()=>{let s=r.querySelector("form");s?s.addEventListener("submit",c=>{c.preventDefault();let l;e.useForm&&c.submitter.value==="ok"?(console.log("Found form:",s),console.log("Form elements:",s?Array.from(s.elements):"no form"),l=new FormData(s),console.log("FormData entries:",Array.from(l.entries()))):l=c.submitter.value==="ok",r.close(),o(l)}):requestAnimationFrame(i)};i(),r.addEventListener("close",()=>{setTimeout(()=>r.remove(),200)}),document.body.appendChild(r),typeof e.rendered=="function"&&e.rendered(r),r.showModal()})}var ue=class{constructor(e){this.pds=e,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","alert","message"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(e){if(!e||e.length<2)return[];let t=e.toLowerCase().trim(),o=this.tokenize(t),r=this.analyzeQuery(o,t),a=[];r.intents.has("color")&&a.push(...this.queryColors(r,t)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||t.includes("class"))&&a.push(...this.queryUtilities(r,t)),(r.intents.has("component")||r.entities.size>0)&&a.push(...this.queryComponents(r,t)),(r.intents.has("layout")||r.intents.has("pattern"))&&a.push(...this.queryPatterns(r,t)),r.intents.has("typography")&&a.push(...this.queryTypography(r,t)),r.intents.has("spacing")&&a.push(...this.querySpacing(r,t));let i=new Map;for(let s of a){let c=s.value;(!i.has(c)||i.get(c).score<s.score)&&i.set(c,s)}return Array.from(i.values()).sort((s,c)=>c.score-s.score).slice(0,10)}tokenize(e){return e.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(t=>t.length>0)}analyzeQuery(e,t){let o={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:e,fullText:t};o.isQuestion=this.questionWords.some(r=>e.includes(r));for(let[r,a]of Object.entries(this.intents))a.some(i=>e.includes(i)||t.includes(i))&&o.intents.add(r);for(let[r,a]of Object.entries(this.entities))a.some(i=>e.includes(i)||t.includes(i))&&o.entities.add(r);return(e.includes("hover")||t.includes("hover"))&&o.modifiers.add("hover"),(e.includes("focus")||t.includes("focus"))&&o.modifiers.add("focus"),(e.includes("active")||t.includes("active"))&&o.modifiers.add("active"),(e.includes("disabled")||t.includes("disabled"))&&o.modifiers.add("disabled"),o}queryColors(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.colors)return o;let a=r.tokens.colors,i=Array.from(e.entities),s=Array.from(e.modifiers);if(s.includes("focus")&&e.intents.has("border")&&i.includes("input")&&o.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(t.includes("foreground")||t.includes("text"))&&(t.includes("surface")||e.entities.has("surface"))&&(o.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),o.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),t.includes("primary")||t.includes("accent")||t.includes("secondary")){let c=t.includes("primary")?"primary":t.includes("accent")?"accent":"secondary";for(let l of[500,600,700]){let d=`--color-${c}-${l}`;o.push({text:`${c.charAt(0).toUpperCase()+c.slice(1)} ${l}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(l-500)/100,cssVar:`var(${d})`,description:`${c} color scale shade ${l}`})}}if(i.includes("button")&&e.intents.has("color")){let c=s[0];c?o.push({text:`Button ${c} fill: var(--primary-fill-${c})`,value:`--primary-fill-${c}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${c} state`}):o.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return o}queryUtilities(e,t){let o=[],r=this.pds.ontology;if(!r?.utilities)return o;let a=r.utilities;return e.intents.has("border")&&a.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let c=80;t.includes("gradient")&&s.includes("gradient")&&(c=95),t.includes("glow")&&s.includes("glow")&&(c=95),o.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:c,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.intents.has("layout")&&a.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{o.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.includes("group")&&e.entities.has("button")&&o.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
3325
3325
|
<button class="btn-primary">One</button>
|
|
3326
3326
|
<button class="btn-primary">Two</button>
|
|
3327
3327
|
</div>`,description:"Container for grouped buttons with connected styling"}),o}queryComponents(e,t){let o=[],r=this.pds.ontology;return!r?.components&&!r?.primitives||(r.components&&r.components.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id);i>50&&o.push({text:`<${a.id}> - ${a.name}`,value:a.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${a.id}></${a.id}>`,description:a.description||`${a.name} web component`})}),r.primitives&&r.primitives.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id);if(i>50){let s=a.selectors?.[0]||a.id;o.push({text:`${s} - ${a.name}`,value:a.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(a),description:a.description||`${a.name} primitive element`})}}),t.includes("icon")&&(t.includes("only")||t.includes("button"))&&o.push({text:'Icon-only button: <button class="btn-icon">',value:"btn-icon",icon:"star",category:"Pattern",score:95,code:`<button class="btn-icon btn-primary">
|
|
@@ -3339,7 +3339,7 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3339
3339
|
</section>`,description:"Semantic section element for content grouping"}))),o}queryTypography(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.typography)return o;let a=r.tokens.typography;return(t.includes("heading")||t.includes("title"))&&o.push({text:"Heading font: var(--font-family-heading)",value:"--font-family-heading",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-heading)",description:"Font family for headings"}),(t.includes("body")||t.includes("text"))&&o.push({text:"Body font: var(--font-family-body)",value:"--font-family-body",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-body)",description:"Font family for body text"}),o}querySpacing(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.spacing)return o;let a=r.tokens.spacing;for(let[i,s]of Object.entries(a))["2","4","6","8"].includes(i)&&o.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${s}`});return o}scoreMatch(e,t){let o=e.toLowerCase(),r=t.toLowerCase(),a=0;if(o===r)return 100;r.includes(o)&&(a+=80);let i=this.tokenize(o),s=this.tokenize(r),c=i.filter(l=>s.includes(l)).length;return a+=c/i.length*40,r.startsWith(o)&&(a+=20),Math.min(100,a)}generatePrimitiveExample(e){let t=e.selectors?.[0]||e.id;return t.includes("button")||e.id==="button"?'<button class="btn-primary">Click me</button>':t.includes("card")||e.id==="card"?`<article class="card">
|
|
3340
3340
|
<h3>Title</h3>
|
|
3341
3341
|
<p>Content</p>
|
|
3342
|
-
</article>`:t.includes("badge")||e.id==="badge"?'<span class="badge">New</span>':`<${t}>Content</${t}>`}describeUtility(e){return e.includes("border-gradient")?"Apply animated gradient border effect":e.includes("border-glow")?"Apply glowing border effect":e.includes("flex")?"Flexbox container utility":e.includes("grid")?"Grid container utility":e.includes("gap-")?"Set gap between flex/grid children":e.includes("items-")?"Align items in flex container":e.includes("justify-")?"Justify content in flex container":e===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}};var
|
|
3342
|
+
</article>`:t.includes("badge")||e.id==="badge"?'<span class="badge">New</span>':`<${t}>Content</${t}>`}describeUtility(e){return e.includes("border-gradient")?"Apply animated gradient border effect":e.includes("border-glow")?"Apply glowing border effect":e.includes("flex")?"Flexbox container utility":e.includes("grid")?"Grid container utility":e.includes("gap-")?"Set gap between flex/grid children":e.includes("items-")?"Align items in flex container":e.includes("justify-")?"Justify content in flex container":e===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}};var Te={};Ue(Te,{deepMerge:()=>ut,isObject:()=>he});function he(n){return n&&typeof n=="object"&&!Array.isArray(n)}function ut(n,e){let t={...n};return he(n)&&he(e)&&Object.keys(e).forEach(o=>{he(e[o])?o in n?t[o]=ut(n[o],e[o]):Object.assign(t,{[o]:e[o]}):Object.assign(t,{[o]:e[o]})}),t}var ht=[{selector:"nav[data-dropdown]",description:"Enhances a nav element with data-dropdown to function as a dropdown menu.",demoHtml:`
|
|
3343
3343
|
<nav data-dropdown>
|
|
3344
3344
|
<button class="btn-primary">Menu</button>
|
|
3345
3345
|
<menu>
|
|
@@ -3378,12 +3378,12 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3378
3378
|
<button class="btn-primary btn-working">
|
|
3379
3379
|
<span>Saving</span>
|
|
3380
3380
|
</button>
|
|
3381
|
-
`.trim()}];function qt(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let e=n.querySelector("menu");if(!e)return;let t=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let c=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},r=()=>{n.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},i=()=>{e.getAttribute("aria-hidden")==="false"?a():r()};t?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||a()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&a()})}function Vt(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let e=n.querySelector('input[type="checkbox"]');if(!e)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),n.insertBefore(t,e.nextSibling);let r=()=>{n.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),e.addEventListener("change",r)}function Kt(n){if(n.dataset.enhancedRange)return;let e=n.closest("label"),t=e?.classList.contains("range-output"),o=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${o}-output`;if(n.id=o,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let s=document.createElement("span");s.textContent=a.textContent,i.appendChild(s);let c=document.createElement("output");c.id=r,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=n.value,i.appendChild(c),a.textContent="",a.appendChild(i);let l=()=>{c.textContent=n.value};n.addEventListener("input",l)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",o),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let s=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,h=parseFloat(n.value),g=(h-d)/(p-d);i.style.left=`calc(${g*100}% )`,i.textContent=String(h)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",c),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",c),n.addEventListener("blur",l),s()}n.dataset.enhancedRange="1"}function Zt(n){let e=n.closest("label");if(!e||e.querySelector(".required-asterisk"))return;let t=document.createElement("span");t.classList.add("required-asterisk"),t.textContent="*",t.style.marginLeft="4px",e.querySelector("span").appendChild(t);let o=n.closest("form");if(o&&!o.querySelector(".required-legend")){let r=document.createElement("div");r.classList.add("required-legend","pill","pill-outline"),r.style.fontSize="0.9em",r.style.marginBottom="8px",r.textContent="* Required fields",o.insertBefore(r,o.querySelector(".form-actions")||o.lastElementChild)}}function Qt(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let r=e.value.trim();if(r){o.preventDefault();let a=t.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=r;let l=document.createElement("input");l.type=a,l.name=t.name||n.getAttribute("data-name")||"open-group",l.value=r,l.id=i,s.appendChild(c),s.appendChild(l),n.insertBefore(s,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Yt(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)e||(e=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),n.insertBefore(c,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&s&&(t?(s.remove(),t=!1):e&&(s.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Jt=new Map([["nav[data-dropdown]",qt],["label[data-toggle]",Vt],['input[type="range"]',Kt],["form [required]",Zt],["fieldset[role=group][data-open]",Qt],["button, a[class*='btn-']",Yt]]),gt=ht.map(n=>({...n,run:Jt.get(n.selector)||(()=>{})}));var ft="pds",Xt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,mt=/^[a-z]:/i;function J(n=""){return n.endsWith("/")?n:`${n}/`}function er(n="",e=ft){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function tr(n){return n.replace(/^\.\/+/,"")}function rr(n){return mt.test(n)?n.replace(mt,"").replace(/^\/+/,""):n}function or(n){return n.startsWith("public/")?n.substring(7):n}function bt(n,e={}){let t=e.segment||ft,o=e.defaultRoot||`/assets/${t}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return J(o);let a=r.trim();return a?(a=a.replace(/\\/g,"/"),a=er(a,t),a=J(a),Xt.test(a)?a:(a=tr(a),a=rr(a),a.startsWith("/")||(a=or(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,s)=>s===0?i:"/")),J(a))):J(o)}function yt(n){let e=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let a="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let c=r.measureText(a).width;r.font=`${i} "${e}", ${s}`;let l=r.measureText(a).width;return c!==l}function ar(n){return n?n.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function nr(n,e={}){if(!n)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,r=ar(n);if(!r||yt(r))return Promise.resolve();let a=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",r),l.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),c(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{yt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function vt(n){if(!n)return Promise.resolve();let e=new Set;n.fontFamilyHeadings&&e.add(n.fontFamilyHeadings),n.fontFamilyBody&&e.add(n.fontFamilyBody),n.fontFamilyMono&&e.add(n.fontFamilyMono);let t=Array.from(e).map(o=>nr(o).catch(r=>{console.warn(`Could not load font: ${o}`,r)}));await Promise.all(t)}var Fe=class extends EventTarget{},m=new Fe;m.Generator=ae;m.registry=qe;m.ontology=Ne;m.adoptLayers=Ie;m.adoptPrimitives=Oe;m.createStylesheet=He;m.isLiveMode=Ge;m.enums=u;m.ask=pt;m.common=_e;m.presets=C;m.findComponentForElement=je;m.query=async function(n){return await new pe(m).search(n)};function St(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&m.registry?._designer?m.registry._designer.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",n=>{let e=n.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var Le="pure-ds-theme",N=null,X=null;function $t(n){try{if(typeof document>"u")return;let e="light";n?n==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=n:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function zt(n){try{if(N&&X){try{typeof N.removeEventListener=="function"?N.removeEventListener("change",X):typeof N.removeListener=="function"&&N.removeListener(X)}catch{}N=null,X=null}if(n==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let r=o?.matches===void 0?e.matches:o.matches;try{let a=r?"dark":"light";document.documentElement.setAttribute("data-theme",a),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};N=e,X=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(Le)||null}catch{return null}},set(n){try{if(typeof window>"u")return;n==null?localStorage.removeItem(Le):localStorage.setItem(Le,n),$t(n),zt(n),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});m.defaultEnhancers=gt;function Et(n={},e={}){let t=Number(e.minContrast||4.5),o=s=>{let c=String(s||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=s=>{let{r:c,g:l,b:d}=o(s),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(s,c)=>{if(!s||!c)return 0;let l=r(s),d=r(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},i=[];try{let c=new m.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&i.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&i.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let x={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=a(x.primaryFill,"#ffffff");f<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=a(x.primaryText,x.surfaceBg);b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(s){i.push({path:"/",message:`Validation failed: ${String(s?.message||s)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}m.validateDesign=Et;function sr(n=[],e={}){let t=[],o=Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[];for(let r of o){let a,i=null;if(typeof r=="string"){let l=String(r).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>ee(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:r,ok:!1,issues:[{path:"/",message:`Preset not found: ${r}`,ratio:0,min:0}]});continue}a=d.name||l,i=structuredClone(d)}else if(r&&typeof r=="object")if(a=r.name||r.preset||void 0,"preset"in r||"design"in r){let l=String(r.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>ee(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${r.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);r.design&&typeof r.design=="object"&&(p=Re(p,structuredClone(r.design))),i=p}else i=r;if(!i){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:s,issues:c}=Et(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}m.validateDesigns=sr;function Mt({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{$t(o),zt(o)}catch{}o?o==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=o:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:o}}function Re(n={},e={}){if(!e||typeof e!="object")return n;let t=Array.isArray(n)?[...n]:{...n};for(let[o,r]of Object.entries(e))r&&typeof r=="object"&&!Array.isArray(r)?t[o]=Re(t[o]&&typeof t[o]=="object"?t[o]:{},r):t[o]=r;return t}function ee(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function re(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>re(t)).filter(t=>t!==void 0);let e={};for(let t in n)if(n.hasOwnProperty(t)){let o=n[t];if(typeof o!="function"){let r=re(o);r!==void 0&&(e[t]=r)}}return e}var cr=/^[a-z][a-z0-9+\-.]*:\/\//i,te=(()=>{try{return import.meta.url}catch{return}})();function he(n,e={}){if(!n||cr.test(n))return n;let{preferModule:t=!0}=e,o=()=>{if(!te)return null;try{return new URL(n,te).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(t?o()||r():r()||o())||n}var ge=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n,kt=(()=>{if(te)try{let n=new URL(te);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",te).href}catch{return}})();function At(n){let e=!!(n?.public?.root||n?.static?.root),t=bt(n);return!e&&kt&&(t=kt),ge(he(t))}function Ct(n={},e={}){let t=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let r=o??e.enhancers??[],a=n&&n.preset,i=n&&n.design,s="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,l=null;if(s){let d=String(a||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(M=>ee(M.name)===d||String(M.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||ee(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(i&&typeof i=="object"){let M=re(i);h=Re(h,structuredClone(M))}let{mode:g,autoDefine:x,applyGlobalStyles:f,manageTheme:b,themeStorageKey:E,preloadStyles:F,criticalLayers:_,preset:S,design:$,enhancers:z,log:T,...me}=n;c={...me,design:h,preset:l.name,log:T||ne}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ne}}else{let d=C?.default||Object.values(C||{}).find(p=>ee(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:ne}}return{generatorConfig:c,enhancers:r,presetInfo:l}}async function _t(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,s=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(wt(),xt));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},x={baseURL:e&&ge(he(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof o=="function")try{let b=o(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(x),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:c}}async function lr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let s=`
|
|
3381
|
+
`.trim()}];function qt(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let e=n.querySelector("menu");if(!e)return;let t=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let c=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},r=()=>{n.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},i=()=>{e.getAttribute("aria-hidden")==="false"?a():r()};t?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||a()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&a()})}function Vt(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let e=n.querySelector('input[type="checkbox"]');if(!e)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),n.insertBefore(t,e.nextSibling);let r=()=>{n.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),e.addEventListener("change",r)}function Kt(n){if(n.dataset.enhancedRange)return;let e=n.closest("label"),t=e?.classList.contains("range-output"),o=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${o}-output`;if(n.id=o,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let s=document.createElement("span");s.textContent=a.textContent,i.appendChild(s);let c=document.createElement("output");c.id=r,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=n.value,i.appendChild(c),a.textContent="",a.appendChild(i);let l=()=>{c.textContent=n.value};n.addEventListener("input",l)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",o),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let s=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,h=parseFloat(n.value),g=(h-d)/(p-d);i.style.left=`calc(${g*100}% )`,i.textContent=String(h)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",c),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",c),n.addEventListener("blur",l),s()}n.dataset.enhancedRange="1"}function Zt(n){let e=n.closest("label");if(!e||e.querySelector(".required-asterisk"))return;let t=document.createElement("span");t.classList.add("required-asterisk"),t.textContent="*",t.style.marginLeft="4px",e.querySelector("span").appendChild(t);let o=n.closest("form");if(o&&!o.querySelector(".required-legend")){let r=document.createElement("div");r.classList.add("required-legend","pill","pill-outline"),r.style.fontSize="0.9em",r.style.marginBottom="8px",r.textContent="* Required fields",o.insertBefore(r,o.querySelector(".form-actions")||o.lastElementChild)}}function Qt(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let r=e.value.trim();if(r){o.preventDefault();let a=t.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=r;let l=document.createElement("input");l.type=a,l.name=t.name||n.getAttribute("data-name")||"open-group",l.value=r,l.id=i,s.appendChild(c),s.appendChild(l),n.insertBefore(s,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Yt(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)e||(e=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),n.insertBefore(c,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&s&&(t?(s.remove(),t=!1):e&&(s.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Jt=new Map([["nav[data-dropdown]",qt],["label[data-toggle]",Vt],['input[type="range"]',Kt],["form [required]",Zt],["fieldset[role=group][data-open]",Qt],["button, a[class*='btn-']",Yt]]),gt=ht.map(n=>({...n,run:Jt.get(n.selector)||(()=>{})}));var ft="pds",Xt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,mt=/^[a-z]:/i;function ee(n=""){return n.endsWith("/")?n:`${n}/`}function er(n="",e=ft){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function tr(n){return n.replace(/^\.\/+/,"")}function rr(n){return mt.test(n)?n.replace(mt,"").replace(/^\/+/,""):n}function or(n){return n.startsWith("public/")?n.substring(7):n}function bt(n,e={}){let t=e.segment||ft,o=e.defaultRoot||`/assets/${t}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return ee(o);let a=r.trim();return a?(a=a.replace(/\\/g,"/"),a=er(a,t),a=ee(a),Xt.test(a)?a:(a=tr(a),a=rr(a),a.startsWith("/")||(a=or(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,s)=>s===0?i:"/")),ee(a))):ee(o)}function yt(n){let e=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let a="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let c=r.measureText(a).width;r.font=`${i} "${e}", ${s}`;let l=r.measureText(a).width;return c!==l}function ar(n){return n?n.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function nr(n,e={}){if(!n)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,r=ar(n);if(!r||yt(r))return Promise.resolve();let a=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",r),l.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),c(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{yt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function vt(n){if(!n)return Promise.resolve();let e=new Set;n.fontFamilyHeadings&&e.add(n.fontFamilyHeadings),n.fontFamilyBody&&e.add(n.fontFamilyBody),n.fontFamilyMono&&e.add(n.fontFamilyMono);let t=Array.from(e).map(o=>nr(o).catch(r=>{console.warn(`Could not load font: ${o}`,r)}));await Promise.all(t)}var Re=class extends EventTarget{},b=new Re;b.initializing=!1;b.currentPreset=null;b.Generator=E;b.registry=V;b.ontology=Oe;b.adoptLayers=He;b.adoptPrimitives=Ie;b.createStylesheet=Ge;b.isLiveMode=qe;b.enums=u;b.ask=pt;b.common=Te;b.presets=_;b.findComponentForElement=Ne;b.query=async function(n){return await new ue(b).search(n)};function St(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");b.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(b,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(b,"compiled",{get(){return b.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=b);typeof document<"u"&&b.addEventListener("pds:ready",n=>{let e=n.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var Fe="pure-ds-theme",O=null,te=null;function $t(n){try{if(typeof document>"u")return;let e="light";n?n==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=n:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function zt(n){try{if(O&&te){try{typeof O.removeEventListener=="function"?O.removeEventListener("change",te):typeof O.removeListener=="function"&&O.removeListener(te)}catch{}O=null,te=null}if(n==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let r=o?.matches===void 0?e.matches:o.matches;try{let a=r?"dark":"light";document.documentElement.setAttribute("data-theme",a),b.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};O=e,te=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(b,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(Fe)||null}catch{return null}},set(n){try{if(typeof window>"u")return;n==null?localStorage.removeItem(Fe):localStorage.setItem(Fe,n),$t(n),zt(n),b.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});b.defaultEnhancers=gt;function Et(n={},e={}){let t=Number(e.minContrast||4.5),o=s=>{let c=String(s||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=s=>{let{r:c,g:l,b:d}=o(s),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(s,c)=>{if(!s||!c)return 0;let l=r(s),d=r(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},i=[];try{let c=new b.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&i.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&i.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let w={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},m=a(w.primaryFill,"#ffffff");m<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${m.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:m,min:t,context:"dark/btn-primary"});let f=a(w.primaryText,w.surfaceBg);f<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${f.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:f,min:t,context:"dark/outline"})}}catch(s){i.push({path:"/",message:`Validation failed: ${String(s?.message||s)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}b.validateDesign=Et;function sr(n=[],e={}){let t=[],o=Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[];for(let r of o){let a,i=null;if(typeof r=="string"){let l=String(r).toLowerCase(),d=_?.[l]||Object.values(_||{}).find(p=>re(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:r,ok:!1,issues:[{path:"/",message:`Preset not found: ${r}`,ratio:0,min:0}]});continue}a=d.name||l,i=structuredClone(d)}else if(r&&typeof r=="object")if(a=r.name||r.preset||void 0,"preset"in r||"design"in r){let l=String(r.preset||"default").toLowerCase(),d=_?.[l]||Object.values(_||{}).find(h=>re(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${r.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);r.design&&typeof r.design=="object"&&(p=Pe(p,structuredClone(r.design))),i=p}else i=r;if(!i){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:s,issues:c}=Et(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}b.validateDesigns=sr;function Mt({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{$t(o),zt(o)}catch{}o?o==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=o:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:o}}function Pe(n={},e={}){if(!e||typeof e!="object")return n;let t=Array.isArray(n)?[...n]:{...n};for(let[o,r]of Object.entries(e))r&&typeof r=="object"&&!Array.isArray(r)?t[o]=Pe(t[o]&&typeof t[o]=="object"?t[o]:{},r):t[o]=r;return t}function re(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ae(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>ae(t)).filter(t=>t!==void 0);let e={};for(let t in n)if(n.hasOwnProperty(t)){let o=n[t];if(typeof o!="function"){let r=ae(o);r!==void 0&&(e[t]=r)}}return e}var cr=/^[a-z][a-z0-9+\-.]*:\/\//i,oe=(()=>{try{return import.meta.url}catch{return}})();function ge(n,e={}){if(!n||cr.test(n))return n;let{preferModule:t=!0}=e,o=()=>{if(!oe)return null;try{return new URL(n,oe).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(t?o()||r():r()||o())||n}var me=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n,kt=(()=>{if(oe)try{let n=new URL(oe);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",oe).href}catch{return}})();function At(n){let e=!!(n?.public?.root||n?.static?.root),t=bt(n);return!e&&kt&&(t=kt),me(ge(t))}function Ct(n={},e={}){let t=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let r=o??e.enhancers??[],a=n&&n.preset,i=n&&n.design,s="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,l=null;if(s){let d=String(a||"default").toLowerCase(),p=_?.[d]||Object.values(_||{}).find(A=>re(A.name)===d||String(A.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||re(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(i&&typeof i=="object"){let A=ae(i);h=Pe(h,structuredClone(A))}let{mode:g,autoDefine:w,applyGlobalStyles:m,manageTheme:f,themeStorageKey:M,preloadStyles:R,criticalLayers:T,preset:S,design:$,enhancers:z,log:L,...fe}=n;c={...fe,design:h,preset:l.name,log:L||ie}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ie}}else{let d=_?.default||Object.values(_||{}).find(p=>re(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:ie}}return{generatorConfig:c,enhancers:r,presetInfo:l}}async function _t(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,s=(()=>{let l=new Map;return(b.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let m=await Promise.resolve().then(()=>(wt(),xt));l=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let d=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},w={baseURL:e&&me(ge(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(m,f)=>{typeof m=="string"&&m.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${m}>:`,f)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof o=="function")try{let f=o(m);return f===void 0?d(m):f}catch(f){return console.warn("Custom autoDefine.mapper error; falling back to default:",f?.message||f),d(m)}return d(m)}};l&&(c=new l(w),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:w.mapper,onError:w.onError}))}return{autoDefiner:c}}async function lr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let s=`
|
|
3382
3382
|
html { opacity: 0; }
|
|
3383
3383
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3384
|
-
`;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(s),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=s,document.head.insertBefore(d,document.head.firstChild)}}}let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.preloadStyles??!1,a=n.criticalLayers??["tokens","primitives"],i=n&&n.autoDefine||null;try{let{resolvedTheme:s,storedTheme:c}=Mt({manageTheme:t,themeStorageKey:o}),l=Ct(n,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=s);let
|
|
3385
|
-
`);if(S){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let z=document.createElement("style");z.setAttribute("data-pds-critical",""),z.textContent=S;let
|
|
3386
|
-
`);if(s){let c=document.head.querySelector("style[data-pds-preload]");c&&c.remove();let l=document.createElement("style");l.setAttribute("data-pds-preload",""),l.textContent=s,document.head.insertBefore(l,document.head.firstChild)}}catch(r){console.warn("PDS preload failed:",r)}}
|
|
3384
|
+
`;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(s),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=s,document.head.insertBefore(d,document.head.firstChild)}}}let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.preloadStyles??!1,a=n.criticalLayers??["tokens","primitives"],i=n&&n.autoDefine||null;try{let{resolvedTheme:s,storedTheme:c}=Mt({manageTheme:t,themeStorageKey:o}),l=Ct(n,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=s);let w=new b.Generator(g);if(g.design?.typography)try{await vt(g.design.typography)}catch(S){g?.log?.("warn","Failed to load some fonts from Google Fonts:",S)}if(r&&typeof window<"u"&&document.head)try{let S=a.map($=>{try{return w.css?.[$]||""}catch(z){return g?.log?.("warn",`Failed to generate critical CSS for layer "${$}":`,z),""}}).filter($=>$.trim()).join(`
|
|
3385
|
+
`);if(S){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let z=document.createElement("style");z.setAttribute("data-pds-critical",""),z.textContent=S;let L=document.head.querySelector('meta[charset], meta[name="viewport"]');L?L.parentNode.insertBefore(z,L.nextSibling):document.head.insertBefore(z,document.head.firstChild)}}catch(S){g?.log?.("warn","Failed to preload critical styles:",S)}b.registry.setLiveMode(),l.presetInfo?.name?g?.log?.("log",`PDS live with preset "${l.presetInfo.name}"`):g?.log?.("log","PDS live with custom config"),e&&(await b.Generator.applyStyles(w),typeof window<"u"&&setTimeout(()=>{let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let $=document.head.querySelector("style[data-pds-preload]");$&&$.remove();let z=document.getElementById("pds-runtime-stylesheet");z&&z.remove()},100));let m=At(n),f;i&&i.baseURL?f=me(ge(i.baseURL,{preferModule:!1})):f=`${m}components/`;let M=null;try{M=(await _t({autoDefineBaseURL:f,autoDefinePreload:i&&Array.isArray(i.predefine)&&i.predefine||[],autoDefineMapper:i&&typeof i.mapper=="function"&&i.mapper||null,enhancers:d,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)})).autoDefiner}catch(S){g?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",S)}let R=w?.options||g,T=ae(n);return b.currentConfig=Object.freeze({mode:"live",...structuredClone(T),design:structuredClone(l.generatorConfig.design),preset:l.generatorConfig.preset,theme:s}),St({mode:"live",generator:w,config:R,theme:s,autoDefiner:M}),{generator:w,config:R,theme:s,autoDefiner:M}}catch(s){throw b.dispatchEvent(new CustomEvent("pds:error",{detail:{error:s}})),s}}async function dr(n){let e=n&&n.mode||"live",{mode:t,...o}=n||{};return e==="static"?pr(o):lr(o)}b.start=dr;async function pr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.staticPaths??{},a=At(n),i=n&&n.autoDefine||null,s;i&&i.baseURL?s=me(ge(i.baseURL,{preferModule:!1})):s=`${a}components/`;let c=i&&Array.isArray(i.predefine)&&i.predefine||[],l=i&&typeof i.mapper=="function"&&i.mapper||null;try{let{resolvedTheme:d}=Mt({manageTheme:t,themeStorageKey:o}),p=Ct(n,{}),h=p.enhancers;if(r={...{tokens:`${a}styles/pds-tokens.css.js`,primitives:`${a}styles/pds-primitives.css.js`,components:`${a}styles/pds-components.css.js`,utilities:`${a}styles/pds-utilities.css.js`,styles:`${a}styles/pds-styles.css.js`},...r},b.registry.setStaticMode(r),e&&typeof document<"u")try{let f=await b.registry.getStylesheet("styles");if(f){f._pds=!0;let M=(document.adoptedStyleSheets||[]).filter(R=>R._pds!==!0);document.adoptedStyleSheets=[...M,f]}}catch(f){console.warn("Failed to apply static styles:",f)}let w=null;try{w=(await _t({autoDefineBaseURL:s,autoDefinePreload:c,autoDefineMapper:l,enhancers:h,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)})).autoDefiner}catch(f){console.error("\u274C Failed to initialize AutoDefiner/Enhancers (static):",f)}let m=ae(n);return b.currentConfig=Object.freeze({mode:"static",...structuredClone(m),design:structuredClone(p.generatorConfig.design),preset:p.generatorConfig.preset,theme:d}),St({mode:"static",config:p.generatorConfig,theme:d,autoDefiner:w}),{config:p.generatorConfig,theme:d,autoDefiner:w}}catch(d){throw b.dispatchEvent(new CustomEvent("pds:error",{detail:{error:d}})),d}}async function ur(n,e={}){let{storageKey:t="pure-ds-theme",persist:o=!0}=e;if(!["light","dark","system"].includes(n))throw new Error(`Invalid theme "${n}". Must be "light", "dark", or "system".`);if(typeof window>"u")return n==="system"?"light":n;let r=n;if(n==="system"&&(r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",r),o&&localStorage.setItem(t,n),b.registry.isLive&&E.instance)try{let a=E.instance;if(a&&a.configure){let i={...a.config,theme:r};a.configure(i),await b.Generator.applyStyles(currentDesigner)}}catch(a){currentDesigner?.options?.log?.("warn","Failed to update styles for new theme:",a)}return b.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,requested:n,source:"programmatic"}})),r}b.setTheme=ur;function hr(n,e={}){if(typeof window>"u"||!document.head||!n)return;let{theme:t,layers:o=["tokens"]}=e;try{let r=t||"light";(t==="system"||!t)&&(r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",r);let a=n.design?{...n,theme:r}:{design:n,theme:r},i=new b.Generator(a),s=o.map(c=>{try{return i.css?.[c]||""}catch{return""}}).filter(c=>c.trim()).join(`
|
|
3386
|
+
`);if(s){let c=document.head.querySelector("style[data-pds-preload]");c&&c.remove();let l=document.createElement("style");l.setAttribute("data-pds-preload",""),l.textContent=s,document.head.insertBefore(l,document.head.firstChild)}}catch(r){console.warn("PDS preload failed:",r)}}b.preloadCritical=hr;export{b as PDS,Et as validateDesign};
|
|
3387
3387
|
/*! Bundled license information:
|
|
3388
3388
|
|
|
3389
3389
|
@lit/reactive-element/css-tag.js:
|