@pure-ds/core 0.4.17 → 0.4.19
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/CSS-INTELLISENSE-QUICK-REF.md +2 -2
- package/custom-elements.json +174 -170
- package/dist/types/pds.d.ts +2 -2
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/{pds-jsonform.d.ts → pds-form.d.ts} +10 -9
- package/dist/types/public/assets/pds/components/pds-form.d.ts.map +1 -0
- package/dist/types/src/js/common/ask.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/node-api/pds-api.d.ts +31 -0
- package/dist/types/src/node-api/pds-api.d.ts.map +1 -0
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds.js +1 -1
- package/public/assets/js/app.js +41 -22
- package/public/assets/js/pds.js +60 -41
- package/public/assets/pds/components/{pds-jsonform.js → pds-form.js} +536 -45
- package/public/assets/pds/custom-elements.json +8 -8
- package/public/assets/pds/vscode-custom-data.json +63 -63
- package/readme.md +4 -4
- package/src/js/pds-core/pds-config.js +14 -14
- package/src/js/pds-core/pds-generator.js +25 -12
- package/src/js/pds-core/pds-ontology.js +5 -5
- package/src/js/pds.d.ts +2 -2
- package/dist/types/public/assets/pds/components/pds-jsonform.d.ts.map +0 -1
package/public/assets/js/pds.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Tt=Object.defineProperty;var _t=(n,e)=>()=>(n&&(e=n(n=0)),e);var je=(n,e)=>{for(var t in e)Tt(n,t,{get:e[t],enumerable:!0})};var vt={};je(vt,{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,g)=>g.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=r(l),g=await import(d instanceof URL?d.href:new URL(d,i).href),h=g?.default??g?.[s(l)];if(!h){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,h),{tag:l,status:"defined"})}catch(d){throw a(l,d),d}};return Promise.all(t.map(c))}var Le,xt=_t(()=>{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:g=!0}=e,h=new Set,w=new Set,b=new Set,m=new Map,A=new WeakMap,R=new WeakMap,_=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)&&!b.has(y)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!m.has(y)&&m.set(y,v)}h.add(y),fe()}},fe=()=>{_||(_=setTimeout(De,l))},M=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||A.has(y))return;M(y);let x=new MutationObserver(v=>{for(let C of v)C.addedNodes?.forEach(I=>{M(I)}),C.type==="attributes"&&C.target&&M(C.target)});x.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),A.set(y,x)};async function De(){if(clearTimeout(_),_=0,!h.size)return;let y=Array.from(h);h.clear(),y.forEach(x=>w.add(x));try{let x=v=>m.get(v)??(o?o(v):`${v}.js`);await ir(...y,{baseURL:t,mapper:x,onError:(v,C)=>{b.add(v),r?.(v,C)}})}catch{}finally{y.forEach(x=>w.delete(x))}}let We=s===document?document.documentElement:s,Be=new MutationObserver(y=>{for(let x of y)x.addedNodes?.forEach(v=>{M(v)}),x.type==="attributes"&&x.target&&M(x.target)});if(Be.observe(We,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&g&&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&&M(We),{stop(){S=!0,Be.disconnect(),$&&$(),_&&(clearTimeout(_),_=0),A.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,g,h)=>h.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=a(d),h=await import(p instanceof URL?p.href:new URL(p,s).href),w=h?.default??h?.[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:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-jsonform",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-jsonform"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["alert","badge"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-jsonform","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],form:["input","field","label","button","fieldset","pds-jsonform","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working"],btn:["button","interactive","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};function D(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 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){let i=a.selector||a;if(D(t,i))return{element:t,componentType:"enhanced-component",displayName:a.description||i,id:a.id}}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(g=>g.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(g=>g.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};d=d.parentElement,p++}continue}continue}if(D(t,s))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}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,id:a.id,tags:a.tags}}}}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,id:a.id,tags:a.tags}}continue}if(D(t,s))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(t.tagName&&t.tagName.includes("-")){let a=t.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(a));return{element:t,componentType:"web-component",displayName:i?.name||a,id:i?.id||a,tags:i?.tags}}if(t.tagName==="BUTTON"){let a=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:a?"button with icon":"button",id:"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"})`,id:"pds-icon"}}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",id:"dropdown"};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.#T(e.shape||{}),borderWidths:this.#_(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.#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))}}#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.#g(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)}#g(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.#g(t),a=this.#u(r),i=o.primary?this.#r(o.primary):this.#n(e.primary);return{surface:{...a,fieldset:this.#A(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)}#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}#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)}`}#A(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#y(e.elevated,.08),sunken:e.elevated,overlay:this.#y(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"]}#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.#h(r,4.5),s=this.#h(r,3),c=this.#z(i,r,.4),l=i,d=c,p=a?"#ffffff":"#000000",g=a?.25:.1,h=this.#m(p,g),w=a?"#ffffff":"#000000",b=a?.15:.1,m=this.#m(w,b);t[o]={bg:r,text:i,textSecondary:s,textMuted:c,icon:l,iconSubtle:d,shadow:h,border:m,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}#T(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:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:w=u.LineHeights.relaxed}=e,b=Number.isFinite(Number(a))?Number(a):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:t,body:o,mono:r},fontSize:{xs:`${Math.round(b/Math.pow(m,2))}px`,sm:`${Math.round(b/m)}px`,base:`${b}px`,lg:`${Math.round(b*m)}px`,xl:`${Math.round(b*Math.pow(m,2))}px`,"2xl":`${Math.round(b*Math.pow(m,3))}px`,"3xl":`${Math.round(b*Math.pow(m,4))}px`,"4xl":`${Math.round(b*Math.pow(m,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:g?.toString()||"1.25",normal:h?.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",externalPath:s="/assets/img/icons/"}=e;return{set:t,weight:o,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(a).map(([c,l])=>[c,`${l}px`])),spritePath:i,externalPath:s}}#W(e){let t=[];t.push(` /* Colors */
|
|
2
|
-
`);let o=(r,a="")=>{Object.entries(r).forEach(([i,
|
|
1
|
+
var Tt=Object.defineProperty;var _t=(n,e)=>()=>(n&&(e=n(n=0)),e);var je=(n,e)=>{for(var t in e)Tt(n,t,{get:e[t],enumerable:!0})};var vt={};je(vt,{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),c=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,p,g)=>g.toUpperCase()),s=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=r(l),g=await import(d instanceof URL?d.href:new URL(d,i).href),h=g?.default??g?.[c(l)];if(!h){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${c(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,h),{tag:l,status:"defined"})}catch(d){throw a(l,d),d}};return Promise.all(t.map(s))}var Le,xt=_t(()=>{Le=class{constructor(e={}){let{baseURL:t,mapper:o,onError:r,predicate:a=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:s=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:p=[],patchAttachShadow:g=!0}=e,h=new Set,w=new Set,b=new Set,m=new Map,A=new WeakMap,R=new WeakMap,_=0,S=!1,$=null,E=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(M){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,M)}},L=(y,x)=>{if(!S&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!w.has(y)&&!b.has(y)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!m.has(y)&&m.set(y,v)}h.add(y),fe()}},fe=()=>{_||(_=setTimeout(De,l))},C=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),E(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),E(x),d&&x.shadowRoot&&be(x.shadowRoot)})}},be=y=>{if(!y||A.has(y))return;C(y);let x=new MutationObserver(v=>{for(let M of v)M.addedNodes?.forEach(I=>{C(I)}),M.type==="attributes"&&M.target&&C(M.target)});x.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),A.set(y,x)};async function De(){if(clearTimeout(_),_=0,!h.size)return;let y=Array.from(h);h.clear(),y.forEach(x=>w.add(x));try{let x=v=>m.get(v)??(o?o(v):`${v}.js`);await ir(...y,{baseURL:t,mapper:x,onError:(v,M)=>{b.add(v),r?.(v,M)}})}catch{}finally{y.forEach(x=>w.delete(x))}}let We=c===document?document.documentElement:c,Be=new MutationObserver(y=>{for(let x of y)x.addedNodes?.forEach(v=>{C(v)}),x.type==="attributes"&&x.target&&C(x.target)});if(Be.observe(We,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&g&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let M=y.call(this,v);if(v&&v.mode==="open"){be(M);let I=this.tagName?.toLowerCase();I&&I.includes("-")&&!customElements.get(I)&&L(I,this)}return M},$=()=>Element.prototype.attachShadow=y}return s&&C(We),{stop(){S=!0,Be.disconnect(),$&&$(),_&&(clearTimeout(_),_=0),A.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,c=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(p,g,h)=>h.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=a(d),h=await import(p instanceof URL?p.href:new URL(p,c).href),w=h?.default??h?.[s(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 "${s(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:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["alert","badge"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working"],btn:["button","interactive","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};function D(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 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){let i=a.selector||a;if(D(t,i))return{element:t,componentType:"enhanced-component",displayName:a.description||i,id:a.id}}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 c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let l=c.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(g=>g.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(g=>g.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};d=d.parentElement,p++}continue}continue}if(D(t,c))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=Ue(t,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(t.classList){let i=Array.from(t.classList);for(let c of a.selectors||[])if(typeof c=="string"&&c.includes("*")&&c.startsWith(".")){let s=c.slice(1).replace(/\*/g,"");if(i.some(l=>l.startsWith(s)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let l=c.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,id:a.id,tags:a.tags}}continue}if(D(t,c))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=Ue(t,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(t.tagName&&t.tagName.includes("-")){let a=t.tagName.toLowerCase(),i=PDS.ontology.components.find(c=>c.selectors.includes(a));return{element:t,componentType:"web-component",displayName:i?.name||a,id:i?.id||a,tags:i?.tags}}if(t.tagName==="BUTTON"){let a=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:a?"button with icon":"button",id:"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"})`,id:"pds-icon"}}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",id:"dropdown"};t=t.parentElement}return null}var Oe=ne;var z=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.#T(e.shape||{}),borderWidths:this.#_(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:c="#FFBF00",danger:s=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(c||r),danger:this.#r(s||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.#C(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.#g(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)}#g(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.#g(t),a=this.#u(r),i=o.primary?this.#r(o.primary):this.#n(e.primary);return{surface:{...a,fieldset:this.#A(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)}#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}#m(e,t=1){let{r:o,g:r,b:a}=this.#s(e);return`rgba(${o}, ${r}, ${a}, ${t})`}#E(e,t,o=.5){let r=this.#s(e),a=this.#s(t),i=Math.round(r.r+(a.r-r.r)*o),c=Math.round(r.g+(a.g-r.g)*o),s=Math.round(r.b+(a.b-r.b)*o);return this.#z(i,c,s)}#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)}`}#A(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#y(e.elevated,.08),sunken:e.elevated,overlay:this.#y(e.overlay,.05)}}#C(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 c=e?.[i];if(!c||typeof c!="string")continue;let s=this.#c(c,t);if(s>a.ratio&&(a={shade:i,color:c,ratio:s}),s>=o)return c}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 c=this.#c(i,"#ffffff");if(c>r.ratio&&(r={shade:a,color:i,ratio:c}),c>=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.#h(r,4.5),c=this.#h(r,3),s=this.#E(i,r,.4),l=i,d=s,p=a?"#ffffff":"#000000",g=a?.25:.1,h=this.#m(p,g),w=a?"#ffffff":"#000000",b=a?.15:.1,m=this.#m(w,b);t[o]={bg:r,text:i,textSecondary:c,textMuted:s,icon:l,iconSubtle:d,shadow:h,border:m,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.#M(i,a.dimFactor)}),t}#M(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),c={0:"0"};for(let s=1;s<=i;s++)c[s]=`${a*s}px`;return c}#T(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:c=u.FontWeights.light,fontWeightNormal:s=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:w=u.LineHeights.relaxed}=e,b=Number.isFinite(Number(a))?Number(a):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:t,body:o,mono:r},fontSize:{xs:`${Math.round(b/Math.pow(m,2))}px`,sm:`${Math.round(b/m)}px`,base:`${b}px`,lg:`${Math.round(b*m)}px`,xl:`${Math.round(b*Math.pow(m,2))}px`,"2xl":`${Math.round(b*Math.pow(m,3))}px`,"3xl":`${Math.round(b*Math.pow(m,4))}px`,"4xl":`${Math.round(b*Math.pow(m,5))}px`},fontWeight:{light:c?.toString()||"300",normal:s?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.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",externalPath:c="/assets/img/icons/"}=e;return{set:t,weight:o,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,l])=>[s,`${l}px`])),spritePath:i,externalPath:c}}#W(e){let t=[];t.push(` /* Colors */
|
|
2
|
+
`);let o=(r,a="")=>{Object.entries(r).forEach(([i,c])=>{typeof c=="object"&&c!==null?o(c,`${a}${i}-`):typeof c=="string"&&t.push(` --color-${a}${i}: ${c};
|
|
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};
|
|
5
5
|
`),t.push(` --surface-${r}-text: ${a.text};
|
|
@@ -78,7 +78,7 @@ var Tt=Object.defineProperty;var _t=(n,e)=>()=>(n&&(e=n(n=0)),e);var je=(n,e)=>{
|
|
|
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
|
-
`];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,
|
|
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,c])=>{let s=i.replace(/([A-Z])/g,"-$1").toLowerCase();t.push(` --font-${a}-${s}: ${c};
|
|
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};
|
|
@@ -131,8 +131,8 @@ var Tt=Object.defineProperty;var _t=(n,e)=>()=>(n&&(e=n(n=0)),e);var je=(n,e)=>{
|
|
|
131
131
|
|
|
132
132
|
/* Legacy alias for backwards compatibility */
|
|
133
133
|
--backdrop-background: var(--backdrop-bg);
|
|
134
|
-
`,
|
|
135
|
-
${[...t,...r,a,i,
|
|
134
|
+
`,c=this.#Q(e);return`html[data-theme="dark"] {
|
|
135
|
+
${[...t,...r,a,i,c].join("")}}
|
|
136
136
|
`}#Z(e){if(!e?.dark)return"";let t=[],o=(d,p="")=>{Object.entries(d).forEach(([g,h])=>{typeof h=="object"&&h!==null?o(h,`${p}${g}-`):typeof h=="string"&&t.push(` --color-${p}${g}: ${h};
|
|
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};
|
|
@@ -155,7 +155,7 @@ ${[...t,...r,a,i,s].join("")}}
|
|
|
155
155
|
`,` --color-input-disabled-bg: var(--color-gray-900);
|
|
156
156
|
`,` --color-input-disabled-text: var(--color-gray-600);
|
|
157
157
|
`,` --color-code-bg: var(--color-gray-800);
|
|
158
|
-
`,...a].join(""),
|
|
158
|
+
`,...a].join(""),c=` /* Backdrop tokens - dark mode */
|
|
159
159
|
--backdrop-bg: linear-gradient(
|
|
160
160
|
135deg,
|
|
161
161
|
rgba(0, 0, 0, 0.6),
|
|
@@ -169,9 +169,9 @@ ${[...t,...r,a,i,s].join("")}}
|
|
|
169
169
|
|
|
170
170
|
/* Legacy alias for backwards compatibility */
|
|
171
171
|
--backdrop-background: var(--backdrop-bg);
|
|
172
|
-
`,
|
|
172
|
+
`,s=this.#J(e);return`
|
|
173
173
|
html[data-theme="dark"] {
|
|
174
|
-
${[...t,...r,i,s
|
|
174
|
+
${[...t,...r,i,c,s].join("")} }
|
|
175
175
|
`}#J(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%),
|
|
@@ -608,17 +608,15 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
608
608
|
|
|
609
609
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
610
610
|
|
|
611
|
-
`}#oe(){let{gap:e,inputPadding:t,buttonPadding:o,focusRingWidth:r,focusRingOpacity:a,borderWidthThin:i,sectionSpacing:
|
|
611
|
+
`}#oe(){let{gap:e,inputPadding:t,buttonPadding:o,focusRingWidth:r,focusRingOpacity:a,borderWidthThin:i,sectionSpacing:c,buttonMinHeight:s,inputMinHeight:l}=this.options.design,d=t||.75,p=o||1,g=r||3,h=i||1,w=e||1,b=c||2,m=s||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
612
612
|
form {
|
|
613
613
|
margin: 0;
|
|
614
614
|
width: 100%;
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
fieldset {
|
|
618
|
-
margin: 0;
|
|
619
|
-
padding: var(--spacing-5);
|
|
618
|
+
margin: 0;
|
|
620
619
|
width: 100%;
|
|
621
|
-
background-color: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
622
620
|
|
|
623
621
|
/* Unified styling for radio groups and checkbox groups */
|
|
624
622
|
&[role="radiogroup"],
|
|
@@ -1795,15 +1793,24 @@ dialog[open]::backdrop {
|
|
|
1795
1793
|
}
|
|
1796
1794
|
}
|
|
1797
1795
|
|
|
1796
|
+
/* Dialog - constrain max height to 90vh, support custom maxHeight via CSS variable */
|
|
1797
|
+
dialog {
|
|
1798
|
+
max-height: var(--dialog-max-height, 90vh);
|
|
1799
|
+
display: flex;
|
|
1800
|
+
flex-direction: column;
|
|
1801
|
+
overflow: hidden; /* Prevent dialog itself from scrolling - let .dialog-body handle it */
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1798
1804
|
/* Form structure - use flexbox instead of contents */
|
|
1799
1805
|
dialog form {
|
|
1800
1806
|
display: flex;
|
|
1801
1807
|
flex-direction: column;
|
|
1802
|
-
|
|
1808
|
+
flex: 1;
|
|
1809
|
+
min-height: 0; /* Allow flex child to shrink */
|
|
1803
1810
|
margin: 0;
|
|
1804
1811
|
}
|
|
1805
1812
|
|
|
1806
|
-
/* Dialog fields - to open pds-
|
|
1813
|
+
/* Dialog fields - to open pds-form subforms */
|
|
1807
1814
|
.dialog-field {
|
|
1808
1815
|
margin-top: var(--spacing-3);
|
|
1809
1816
|
}
|
|
@@ -1858,7 +1865,8 @@ dialog {
|
|
|
1858
1865
|
article,
|
|
1859
1866
|
form > article,
|
|
1860
1867
|
.dialog-body {
|
|
1861
|
-
flex: 1;
|
|
1868
|
+
flex: 1 1 auto;
|
|
1869
|
+
min-height: 0; /* Critical: allow flex child to shrink and scroll */
|
|
1862
1870
|
padding: var(--spacing-3) var(--spacing-6);
|
|
1863
1871
|
overflow-y: auto;
|
|
1864
1872
|
overflow-x: hidden;
|
|
@@ -1884,9 +1892,17 @@ dialog.dialog-lg { max-width: min(800px, calc(100vw - var(--spacing-8))); }
|
|
|
1884
1892
|
dialog.dialog-xl { max-width: min(1200px, calc(100vw - var(--spacing-8))); }
|
|
1885
1893
|
dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc(100vh - var(--spacing-8)); }
|
|
1886
1894
|
|
|
1887
|
-
/* Mobile responsiveness */
|
|
1895
|
+
/* Mobile responsiveness - maximize on mobile */
|
|
1888
1896
|
@media (max-width: ${(e.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
|
|
1889
|
-
dialog {
|
|
1897
|
+
dialog {
|
|
1898
|
+
max-width: 100vw;
|
|
1899
|
+
max-height: 100vh;
|
|
1900
|
+
--dialog-max-height: 100vh; /* Override custom maxHeight on mobile */
|
|
1901
|
+
border-radius: 0;
|
|
1902
|
+
top: 50%;
|
|
1903
|
+
transform: translateY(-50%);
|
|
1904
|
+
margin: 0;
|
|
1905
|
+
}
|
|
1890
1906
|
dialog header, dialog form > header, dialog article, dialog form > article, dialog footer, dialog form > footer { padding: var(--spacing-4); }
|
|
1891
1907
|
}
|
|
1892
1908
|
|
|
@@ -2251,10 +2267,10 @@ nav[data-dropdown] {
|
|
|
2251
2267
|
gap: var(--spacing-4);
|
|
2252
2268
|
}
|
|
2253
2269
|
|
|
2254
|
-
`];for(let
|
|
2270
|
+
`];for(let c of r)i.push(`.grid-cols-${c} { grid-template-columns: repeat(${c}, 1fr); }
|
|
2255
2271
|
`);i.push(`
|
|
2256
2272
|
/* Auto-fit grids (responsive) */
|
|
2257
|
-
`);for(let[s
|
|
2273
|
+
`);for(let[c,s]of Object.entries(a))i.push(`.grid-auto-${c} { grid-template-columns: repeat(auto-fit, minmax(${s}, 1fr)); }
|
|
2258
2274
|
`);return i.push(`
|
|
2259
2275
|
/* Gap utilities */
|
|
2260
2276
|
.gap-0 { gap: 0; } .gap-xs { gap: var(--spacing-1); } .gap-sm { gap: var(--spacing-2); } .gap-md { gap: var(--spacing-4); } .gap-lg { gap: var(--spacing-6); } .gap-xl { gap: var(--spacing-8); }
|
|
@@ -2471,7 +2487,7 @@ nav[data-dropdown] {
|
|
|
2471
2487
|
}
|
|
2472
2488
|
}
|
|
2473
2489
|
|
|
2474
|
-
`}#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,
|
|
2490
|
+
`}#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),c,s,l=(a+i)/2;if(a===i)c=s=0;else{let d=a-i;switch(s=l>.5?d/(2-a-i):d/(a+i),a){case t:c=(o-r)/d+(o<r?6:0);break;case o:c=(r-t)/d+2;break;case r:c=(t-o)/d+4;break}c/=6}return{h:c*360,s:s*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,c;if(t===0)a=i=c=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),c=r(d,l,e-1/3)}let s=l=>{let d=Math.round(l*255).toString(16);return d.length===1?"0"+d:d};return`#${s(a)}${s(i)}${s(c)}`}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:c,transitions:s,zIndex:l,icons:d}=this.tokens,p=[`@layer tokens {
|
|
2475
2491
|
:root {
|
|
2476
2492
|
${this.#W(e)}
|
|
2477
2493
|
${this.#j(t)}
|
|
@@ -2479,8 +2495,8 @@ nav[data-dropdown] {
|
|
|
2479
2495
|
${this.#N(r)}
|
|
2480
2496
|
${this.#O(a)}
|
|
2481
2497
|
${this.#I(i)}
|
|
2482
|
-
${this.#H(
|
|
2483
|
-
${this.#q(
|
|
2498
|
+
${this.#H(c)}
|
|
2499
|
+
${this.#q(s)}
|
|
2484
2500
|
${this.#G(l)}
|
|
2485
2501
|
${this.#V(d)}
|
|
2486
2502
|
}
|
|
@@ -2723,9 +2739,6 @@ nav[data-dropdown] {
|
|
|
2723
2739
|
|
|
2724
2740
|
:where(fieldset) {
|
|
2725
2741
|
border: none;
|
|
2726
|
-
padding: var(--spacing-4);
|
|
2727
|
-
margin: 0 0 var(--spacing-4) 0;
|
|
2728
|
-
background-color: var(--color-surface-subtle);
|
|
2729
2742
|
}
|
|
2730
2743
|
|
|
2731
2744
|
:where(legend) {
|
|
@@ -3097,15 +3110,21 @@ export const ${e} = new CSSStyleSheet();
|
|
|
3097
3110
|
${e}.replaceSync(\`${o}\`);
|
|
3098
3111
|
|
|
3099
3112
|
export const ${e}CSS = \`${o}\`;
|
|
3100
|
-
`}static applyStyles(e){let t=e||n.instance;if(!t||typeof t!="object"){console.error("[Generator] applyStyles requires a generator object or active singleton");return}let o=t.layeredCSS||t.css||"";if(!o){t.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(o)}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 qe(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}var T={"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}}};T.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,externalPath:"/assets/img/icons/",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,Ve=Symbol(),Ge=new WeakMap,ce=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ve)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=Ge.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ge.set(t,e))}return e}toString(){return this.cssText}},Ke=n=>new ce(typeof n=="string"?n:n+"",void 0,Ve);var Ze=(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 Ke(t)})(n):n;var{is:Lt,defineProperty:Ft,getOwnPropertyDescriptor:Rt,getOwnPropertyNames:Pt,getOwnPropertySymbols:Dt,getPrototypeOf:Wt}=Object,de=globalThis,Je=de.trustedTypes,Bt=Je?Je.emptyScript:"",jt=de.reactiveElementPolyfillSupport,K=(n,e)=>n,xe={toAttribute(n,e){switch(e){case Boolean:n=n?Bt: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}},Ye=(n,e)=>!Lt(n,e),Qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Ye};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=Qe){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&&Ft(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Rt(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)??Qe}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=[...Pt(t),...Dt(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 Ze(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??Ye)(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 Ae=globalThis,pe=Ae.trustedTypes,Xe=pe?pe.createPolicy("lit-html",{createHTML:n=>n}):void 0,nt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+P,Ut=`<${it}>`,j=document,J=()=>j.createComment(""),Q=n=>n===null||typeof n!="object"&&typeof n!="function",Me=Array.isArray,Nt=n=>Me(n)||typeof n?.[Symbol.iterator]=="function",we=`[
|
|
3113
|
+
`}static applyStyles(e){let t=e||n.instance;if(!t||typeof t!="object"){console.error("[Generator] applyStyles requires a generator object or active singleton");return}let o=t.layeredCSS||t.css||"";if(!o){t.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(o)}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(z.instance)switch(a){case"tokens":return z.instance.tokensStylesheet;case"primitives":return z.instance.primitivesStylesheet;case"components":return z.instance.componentsStylesheet;case"utilities":return z.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 qe(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}var T={"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}}};T.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,externalPath:"/assets/img/icons/",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,Ve=Symbol(),Ge=new WeakMap,ce=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ve)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=Ge.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ge.set(t,e))}return e}toString(){return this.cssText}},Ke=n=>new ce(typeof n=="string"?n:n+"",void 0,Ve);var Ze=(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 Ke(t)})(n):n;var{is:Lt,defineProperty:Ft,getOwnPropertyDescriptor:Rt,getOwnPropertyNames:Pt,getOwnPropertySymbols:Dt,getPrototypeOf:Wt}=Object,de=globalThis,Je=de.trustedTypes,Bt=Je?Je.emptyScript:"",jt=de.reactiveElementPolyfillSupport,K=(n,e)=>n,xe={toAttribute(n,e){switch(e){case Boolean:n=n?Bt: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}},Ye=(n,e)=>!Lt(n,e),Qe={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Ye};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=Qe){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&&Ft(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Rt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let c=r?.call(this);a?.call(this,i),this.requestUpdate(e,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qe}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=[...Pt(t),...Dt(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 Ze(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 c=i.fromAttribute(t,a.type);this[r]=c??this._$Ej?.get(r)??c,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??Ye)(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,c=this[r];i!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,a,c)}}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 Ae=globalThis,pe=Ae.trustedTypes,Xe=pe?pe.createPolicy("lit-html",{createHTML:n=>n}):void 0,nt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+P,Ut=`<${it}>`,j=document,J=()=>j.createComment(""),Q=n=>n===null||typeof n!="object"&&typeof n!="function",Ce=Array.isArray,Nt=n=>Ce(n)||typeof n?.[Symbol.iterator]=="function",we=`[
|
|
3101
3114
|
\f\r]`,Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,tt=/>/g,W=RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
|
|
3102
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ot=/"/g,st=/^(?:script|style|textarea|title)$/i,
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3115
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ot=/"/g,st=/^(?:script|style|textarea|title)$/i,Me=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Mr=Me(1),Tr=Me(2),_r=Me(3),U=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),at=new WeakMap,B=j.createTreeWalker(j,129);function ct(n,e){if(!Ce(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xe!==void 0?Xe.createHTML(e):e}var Ot=(n,e)=>{let t=n.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",i=Z;for(let c=0;c<t;c++){let s=n[c],l,d,p=-1,g=0;for(;g<s.length&&(i.lastIndex=g,d=i.exec(s),d!==null);)g=i.lastIndex,i===Z?d[1]==="!--"?i=et:d[1]!==void 0?i=tt:d[2]!==void 0?(st.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=W):d[3]!==void 0&&(i=W):i===W?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?W:d[3]==='"'?ot:rt):i===ot||i===rt?i=W:i===et||i===tt?i=Z:(i=W,r=void 0);let h=i===W&&n[c+1].startsWith("/>")?" ":"";a+=i===Z?s+Ut:p>=0?(o.push(l),s.slice(0,p)+nt+s.slice(p)+P+h):s+P+(p===-2?c:h)}return[ct(n,a+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},Y=class n{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,i=0,c=e.length-1,s=this.parts,[l,d]=Ot(e,t);if(this.el=n.createElement(l,o),B.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=B.nextNode())!==null&&s.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(nt)){let g=d[i++],h=r.getAttribute(p).split(P),w=/([.?@])?(.*)/.exec(g);s.push({type:1,index:a,name:w[2],strings:h,ctor:w[1]==="."?Se:w[1]==="?"?$e:w[1]==="@"?Ee:q}),r.removeAttribute(p)}else p.startsWith(P)&&(s.push({type:6,index:a}),r.removeAttribute(p));if(st.test(r.tagName)){let p=r.textContent.split(P),g=p.length-1;if(g>0){r.textContent=pe?pe.emptyScript:"";for(let h=0;h<g;h++)r.append(p[h],J()),B.nextNode(),s.push({type:2,index:++a});r.append(p[g],J())}}}else if(r.nodeType===8)if(r.data===it)s.push({type:2,index:a});else{let p=-1;for(;(p=r.data.indexOf(P,p+1))!==-1;)s.push({type:7,index:a}),p+=P.length-1}a++}}static createElement(e,t){let o=j.createElement("template");return o.innerHTML=e,o}};function H(n,e,t=n,o){if(e===U)return e;let r=o!==void 0?t._$Co?.[o]:t._$Cl,a=Q(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??j).importNode(t,!0);B.currentNode=r;let a=B.nextNode(),i=0,c=0,s=o[0];for(;s!==void 0;){if(i===s.index){let l;s.type===2?l=new X(a,a.nextSibling,this,e):s.type===1?l=new s.ctor(a,s.name,s.strings,this,e):s.type===6&&(l=new ze(a,this,e)),this._$AV.push(l),s=o[++c]}i!==s?.index&&(a=B.nextNode(),i++)}return B.currentNode=j,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),Q(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Nt(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&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.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=Y.createElement(ct(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=at.get(e.strings);return t===void 0&&at.set(e.strings,t=new Y(e)),t}k(e){Ce(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(J()),this.O(J()),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))}},q=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=!Q(e)||e!==this._$AH&&e!==U,i&&(this._$AH=e);else{let c=e,s,l;for(e=a[0],s=0;s<a.length-1;s++)l=H(this,c[o+s],t,s),l===U&&(l=this._$AH[s]),i||=!Q(l)||l!==this._$AH[s],l===k?e=k:e!==k&&(e+=(l??"")+a[s+1]),this._$AH[s]=l}i&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Se=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},$e=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},Ee=class extends q{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)===U)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)}},ze=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 It=Ae.litHtmlPolyfillSupport;It?.(Y,X),(Ae.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(J(),a),a,void 0,t??{})}return r._$AI(n),r};var Te=globalThis,G=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 U}};G._$litElement$=!0,G.finalized=!0,Te.litElementHydrateSupport?.({LitElement:G});var Ht=Te.litElementPolyfillSupport;Ht?.({LitElement:G});(Te.litElementVersions??=[]).push("4.2.1");var lt={mode:"live",preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(n,e,...t){console[n](e,...t)}};async function dt(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");lt.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)),e.maxHeight&&r.style.setProperty("--dialog-max-height",e.maxHeight);let a=Object.entries(e.buttons).map(([c,s])=>{let l=s.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${s.cancel?"button":"submit"}" class="${l}" value="${c}">${s.name}</button>`});if(e.useForm){let c=document.createElement("div");typeof n=="object"&&n._$litType$?N(n,c):typeof n=="string"?c.textContent=n:N(n,c);let s=c.querySelector("form");if(s){r.innerHTML=`
|
|
3116
|
+
<header>
|
|
3117
|
+
<h2>${e.title}</h2>
|
|
3118
|
+
</header>
|
|
3119
|
+
`;let l=document.createElement("article");for(l.className="dialog-body";s.firstChild;)l.appendChild(s.firstChild);s.appendChild(l);let d=document.createElement("footer");d.innerHTML=a.join(""),s.appendChild(d),r.appendChild(s)}else r.innerHTML=`
|
|
3120
|
+
<header>
|
|
3121
|
+
<h2>${e.title}</h2>
|
|
3122
|
+
</header>
|
|
3123
|
+
<article id="msg-container"></article>
|
|
3124
|
+
<footer>
|
|
3125
|
+
${a.join("")}
|
|
3126
|
+
</footer>
|
|
3127
|
+
`,r.querySelector("#msg-container").appendChild(c)}else{r.innerHTML=`
|
|
3109
3128
|
<form method="dialog">
|
|
3110
3129
|
<header>
|
|
3111
3130
|
<h2>${e.title}</h2>
|
|
@@ -3117,12 +3136,12 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3117
3136
|
${a.join("")}
|
|
3118
3137
|
</footer>
|
|
3119
3138
|
</form>
|
|
3120
|
-
`;let
|
|
3139
|
+
`;let c=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?N(n,c):typeof n=="string"?c.textContent=n:N(n,c)}r.addEventListener("click",c=>{c.target.closest('button[value="cancel"]')&&(r.close(),o(!1))});let i=()=>{let c=r.querySelector("form");c?c.addEventListener("submit",s=>{s.preventDefault();let l;e.useForm&&s.submitter.value==="ok"?(console.log("Found form:",c),console.log("Form elements:",c?Array.from(c.elements):"no form"),l=new FormData(c),console.log("FormData entries:",Array.from(l.entries()))):l=s.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 c of a){let s=c.value;(!i.has(s)||i.get(s).score<c.score)&&i.set(s,c)}return Array.from(i.values()).sort((c,s)=>s.score-c.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),c=Array.from(e.modifiers);if(c.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 s=t.includes("primary")?"primary":t.includes("accent")?"accent":"secondary";for(let l of[500,600,700]){let d=`--color-${s}-${l}`;o.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${l}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(l-500)/100,cssVar:`var(${d})`,description:`${s} color scale shade ${l}`})}}if(i.includes("button")&&e.intents.has("color")){let s=c[0];s?o.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} 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,i=[];for(let c of Object.values(a))if(typeof c=="object")for(let s of Object.values(c))Array.isArray(s)&&i.push(...s);return e.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let l=80;t.includes("gradient")&&s.includes("gradient")&&(l=95),t.includes("glow")&&s.includes("glow")&&(l=95),o.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:l,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.intents.has("layout")&&i.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">
|
|
3121
3140
|
<button class="btn-primary">One</button>
|
|
3122
3141
|
<button class="btn-primary">Two</button>
|
|
3123
|
-
</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
|
|
3142
|
+
</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 c=a.selectors?.[0]||a.id;o.push({text:`${c} - ${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">
|
|
3124
3143
|
<pds-icon icon="heart"></pds-icon>
|
|
3125
|
-
</button>`,description:"Button with only an icon, no text label"})),o}queryPatterns(e,t){let o=[],r=this.pds.ontology;return r?.layoutPatterns&&(r.layoutPatterns.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id+" "+(a.description||""));if(i>50){let
|
|
3144
|
+
</button>`,description:"Button with only an icon, no text label"})),o}queryPatterns(e,t){let o=[],r=this.pds.ontology;return r?.layoutPatterns&&(r.layoutPatterns.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id+" "+(a.description||""));if(i>50){let c=a.selectors?.[0]||`.${a.id}`;o.push({text:`${a.name} - ${a.description||"Layout pattern"}`,value:a.id,icon:"layout",category:"Layout Pattern",score:i,code:`<div class="${c.replace(".","")}">
|
|
3126
3145
|
<!-- content -->
|
|
3127
3146
|
</div>`,description:a.description||a.name})}}),(t.includes("container")||t.includes("group"))&&(o.push({text:"Card - Container for grouping content",value:"card",icon:"layout",category:"Primitive",score:88,code:`<article class="card">
|
|
3128
3147
|
<header>
|
|
@@ -3132,7 +3151,7 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3132
3151
|
</article>`,description:"Card container with optional header, body, and footer"}),o.push({text:"Section - Semantic container for grouping",value:"section",icon:"layout",category:"Pattern",score:85,code:`<section>
|
|
3133
3152
|
<h2>Section Title</h2>
|
|
3134
3153
|
<!-- content -->
|
|
3135
|
-
</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,
|
|
3154
|
+
</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,c]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: ${c}`});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),c=this.tokenize(r),s=i.filter(l=>c.includes(l)).length;return a+=s/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">
|
|
3136
3155
|
<h3>Title</h3>
|
|
3137
3156
|
<p>Content</p>
|
|
3138
3157
|
</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 _e={};je(_e,{deepMerge:()=>pt,isObject:()=>ge});function ge(n){return n&&typeof n=="object"&&!Array.isArray(n)}function pt(n,e){let t={...n};return ge(n)&&ge(e)&&Object.keys(e).forEach(o=>{ge(e[o])?o in n?t[o]=pt(n[o],e[o]):Object.assign(t,{[o]:e[o]}):Object.assign(t,{[o]:e[o]})}),t}var ut=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
@@ -3189,12 +3208,12 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3189
3208
|
<button class="btn-primary btn-working">
|
|
3190
3209
|
<span>Saving</span>
|
|
3191
3210
|
</button>
|
|
3192
|
-
`.trim()}];function qt(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Gt(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,g=parseFloat(n.value),h=(g-d)/(p-d);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},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){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let e=t=>{let o=t.closest("label");if(!o||o.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",o.querySelector("span").appendChild(r);let a=t.closest("form");if(a&&!a.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",a.insertBefore(i,a.querySelector(".form-actions")||a.lastElementChild)}};n.querySelectorAll("[required]").forEach(t=>{e(t)})}function Jt(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 Qt(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 Yt=new Map([[".accordion",qt],["nav[data-dropdown]",Gt],["label[data-toggle]",Vt],['input[type="range"]',Kt],["form[data-required]",Zt],["fieldset[role=group][data-open]",Jt],["button, a[class*='btn-']",Qt]]),gt=ut.map(n=>({...n,run:Yt.get(n.selector)||(()=>{})}));var mt="pds",Xt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ht=/^[a-z]:/i;function ee(n=""){return n.endsWith("/")?n:`${n}/`}function er(n="",e=mt){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function tr(n){return n.replace(/^\.\/+/,"")}function rr(n){return ht.test(n)?n.replace(ht,"").replace(/^\/+/,""):n}function or(n){return n.startsWith("public/")?n.substring(7):n}function ft(n,e={}){let t=e.segment||mt,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 bt(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||bt(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(()=>{bt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function yt(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{},f=new Re;f.initializing=!1;f.currentPreset=null;f.Generator=E;f.registry=V;f.ontology=Oe;f.adoptLayers=He;f.adoptPrimitives=Ie;f.createStylesheet=qe;f.isLiveMode=()=>V.isLive;f.enums=u;f.ask=dt;f.common=_e;f.presets=T;f.findComponentForElement=Ne;f.query=async function(n){return await new ue(f).search(n)};function kt(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");f.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(f,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(f,"compiled",{get(){return f.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=f);typeof document<"u"&&f.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 St(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 $t(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),f.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(f,"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),St(n),$t(n),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});f.defaultEnhancers=gt;function zt(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(g=>g<=.03928?g/12.92:Math.pow((g+.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),g=Math.min(l,d);return(p+.05)/(g+.05)},i=[];try{let c=new f.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 g=a(l.primaryText,l.surfaceBg);g<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${g.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:g,min:t,context:"light/outline"});let h=c.dark;if(h){let w={surfaceBg:h.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||h.primary?.[600],primaryText:c.interactive?.dark?.text||h.primary?.[600]},b=a(w.primaryFill,"#ffffff");b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${b.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:b,min:t,context:"dark/btn-primary"});let m=a(w.primaryText,w.surfaceBg);m<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${m.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:m,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}}f.validateDesign=zt;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=T?.[l]||Object.values(T||{}).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=T?.[l]||Object.values(T||{}).find(g=>re(g.name)===l||String(g.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}=zt(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}f.validateDesigns=sr;function Et({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{St(o),$t(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 he(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,wt=(()=>{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=ft(n);return!e&&wt&&(t=wt),me(he(t))}function Mt(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=T?.[d]||Object.values(T||{}).find(M=>re(M.name)===d||String(M.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 g=structuredClone(p);if(i&&typeof i=="object"){let M=ae(i);g=Pe(g,structuredClone(M))}let{mode:h,autoDefine:w,applyGlobalStyles:b,manageTheme:m,themeStorageKey:A,preloadStyles:R,criticalLayers:_,preset:S,design:$,enhancers:z,log:L,...fe}=n;c={...fe,design:g,preset:l.name,log:L||ie}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ie}}else{let d=T?.default||Object.values(T||{}).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 Ct(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(f.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 b=await Promise.resolve().then(()=>(xt(),vt));l=b?.AutoDefiner||b?.default?.AutoDefiner||b?.default||null}catch(b){console.warn("AutoDefiner not available:",b?.message||b)}let d=b=>{switch(b){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${b}.js`}},{mapper:p,...g}=a&&typeof a=="object"?a:{},w={baseURL:e&&me(he(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(b,m)=>{typeof b=="string"&&b.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${b}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${b}>:`,m)},...g,mapper:b=>{if(customElements.get(b))return null;if(typeof o=="function")try{let m=o(b);return m===void 0?d(b):m}catch(m){return console.warn("Custom autoDefine.mapper error; falling back to default:",m?.message||m),d(b)}return d(b)}};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=`
|
|
3211
|
+
`.trim()}];function qt(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Gt(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 c=(n.getAttribute("data-mode")||"auto").toLowerCase();if(c==="up"||c==="down")return c;let s=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-s.bottom);return Math.max(0,s.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",c=>{c.preventDefault(),c.stopPropagation(),i()}),document.addEventListener("click",c=>{n.contains(c.target)||a()}),n.addEventListener("keydown",c=>{c.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",c=>{(!c.relatedTarget||!n.contains(c.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 c=document.createElement("span");c.textContent=a.textContent,i.appendChild(c);let s=document.createElement("output");s.id=r,s.setAttribute("for",o),s.style.color="var(--surface-text-secondary, var(--color-text-secondary))",s.style.fontSize="0.875rem",s.textContent=n.value,i.appendChild(s),a.textContent="",a.appendChild(i);let l=()=>{s.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 c=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-d)/(p-d);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},s=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",c),n.addEventListener("pointerdown",s),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",s),n.addEventListener("blur",l),c()}n.dataset.enhancedRange="1"}function Zt(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let e=t=>{let o=t.closest("label");if(!o||o.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",o.querySelector("span").appendChild(r);let a=t.closest("form");if(a&&!a.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",a.insertBefore(i,a.querySelector(".form-actions")||a.lastElementChild)}};n.querySelectorAll("[required]").forEach(t=>{e(t)})}function Jt(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)}`,c=document.createElement("label"),s=document.createElement("span");s.setAttribute("data-label",""),s.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,c.appendChild(s),c.appendChild(l),n.insertBefore(c,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 Qt(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"),c=n.querySelector("pds-icon");if(i)if(c)e||(e=c.getAttribute("icon")),c.setAttribute("icon","circle-notch");else{let s=document.createElement("pds-icon");s.setAttribute("icon","circle-notch"),s.setAttribute("size","sm"),n.insertBefore(s,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&c&&(t?(c.remove(),t=!1):e&&(c.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Yt=new Map([[".accordion",qt],["nav[data-dropdown]",Gt],["label[data-toggle]",Vt],['input[type="range"]',Kt],["form[data-required]",Zt],["fieldset[role=group][data-open]",Jt],["button, a[class*='btn-']",Qt]]),gt=ut.map(n=>({...n,run:Yt.get(n.selector)||(()=>{})}));var mt="pds",Xt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ht=/^[a-z]:/i;function ee(n=""){return n.endsWith("/")?n:`${n}/`}function er(n="",e=mt){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function tr(n){return n.replace(/^\.\/+/,"")}function rr(n){return ht.test(n)?n.replace(ht,"").replace(/^\/+/,""):n}function or(n){return n.startsWith("public/")?n.substring(7):n}function ft(n,e={}){let t=e.segment||mt,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,c)=>c===0?i:"/")),ee(a))):ee(o)}function bt(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",c="monospace";r.font=`${i} ${c}`;let s=r.measureText(a).width;r.font=`${i} "${e}", ${c}`;let l=r.measureText(a).width;return s!==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||bt(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((c,s)=>{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}"`),c()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),s(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{bt(r)||console.warn(`Font "${r}" did not load within timeout`),c()},5e3)}))}async function yt(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{},f=new Re;f.initializing=!1;f.currentPreset=null;f.Generator=z;f.registry=V;f.ontology=Oe;f.adoptLayers=He;f.adoptPrimitives=Ie;f.createStylesheet=qe;f.isLiveMode=()=>V.isLive;f.enums=u;f.ask=dt;f.common=_e;f.presets=T;f.findComponentForElement=Ne;f.query=async function(n){return await new ue(f).search(n)};function kt(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");f.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(f,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(f,"compiled",{get(){return f.registry?.isLive&&z.instance?z.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=f);typeof document<"u"&&f.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 St(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 $t(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),f.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(f,"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),St(n),$t(n),f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});f.defaultEnhancers=gt;function Et(n={},e={}){let t=Number(e.minContrast||4.5),o=c=>{let s=String(c||"").replace("#",""),l=s.length===3?s.split("").map(p=>p+p).join(""):s,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=c=>{let{r:s,g:l,b:d}=o(c),p=[s/255,l/255,d/255].map(g=>g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(c,s)=>{if(!c||!s)return 0;let l=r(c),d=r(s),p=Math.max(l,d),g=Math.min(l,d);return(p+.05)/(g+.05)},i=[];try{let s=new f.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:s.surface?.base,surfaceText:s.gray?.[900]||"#000000",primaryFill:s.interactive?.light?.fill||s.primary?.[600],primaryText:s.interactive?.light?.text||s.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 g=a(l.primaryText,l.surfaceBg);g<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${g.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:g,min:t,context:"light/outline"});let h=s.dark;if(h){let w={surfaceBg:h.surface?.base||s.surface?.inverse,primaryFill:s.interactive?.dark?.fill||h.primary?.[600],primaryText:s.interactive?.dark?.text||h.primary?.[600]},b=a(w.primaryFill,"#ffffff");b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${b.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:b,min:t,context:"dark/btn-primary"});let m=a(w.primaryText,w.surfaceBg);m<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${m.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:m,min:t,context:"dark/outline"})}}catch(c){i.push({path:"/",message:`Validation failed: ${String(c?.message||c)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}f.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=T?.[l]||Object.values(T||{}).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=T?.[l]||Object.values(T||{}).find(g=>re(g.name)===l||String(g.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:c,issues:s}=Et(i,e);t.push({name:a,ok:c,issues:s})}return{ok:t.every(r=>r.ok),results:t}}f.validateDesigns=sr;function zt({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{St(o),$t(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 he(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,wt=(()=>{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=ft(n);return!e&&wt&&(t=wt),me(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,c="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),s,l=null;if(c){let d=String(a||"default").toLowerCase(),p=T?.[d]||Object.values(T||{}).find(C=>re(C.name)===d||String(C.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 g=structuredClone(p);if(i&&typeof i=="object"){let C=ae(i);g=Pe(g,structuredClone(C))}let{mode:h,autoDefine:w,applyGlobalStyles:b,manageTheme:m,themeStorageKey:A,preloadStyles:R,criticalLayers:_,preset:S,design:$,enhancers:E,log:L,...fe}=n;s={...fe,design:g,preset:l.name,log:L||ie}}else if(t){let{log:d,...p}=n;s={design:structuredClone(p),log:d||ie}}else{let d=T?.default||Object.values(T||{}).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"},s={design:structuredClone(d),preset:l.name,log:ie}}return{generatorConfig:s,enhancers:r,presetInfo:l}}async function Mt(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,c=(()=>{let l=new Map;return(f.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),s=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let b=await Promise.resolve().then(()=>(xt(),vt));l=b?.AutoDefiner||b?.default?.AutoDefiner||b?.default||null}catch(b){console.warn("AutoDefiner not available:",b?.message||b)}let d=b=>{switch(b){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${b}.js`}},{mapper:p,...g}=a&&typeof a=="object"?a:{},w={baseURL:e&&me(he(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:c,onError:(b,m)=>{typeof b=="string"&&b.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${b}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${b}>:`,m)},...g,mapper:b=>{if(customElements.get(b))return null;if(typeof o=="function")try{let m=o(b);return m===void 0?d(b):m}catch(m){return console.warn("Custom autoDefine.mapper error; falling back to default:",m?.message||m),d(b)}return d(b)}};l&&(s=new l(w),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:w.mapper,onError:w.onError}))}return{autoDefiner:s}}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 c=`
|
|
3193
3212
|
html { opacity: 0; }
|
|
3194
3213
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3195
|
-
`;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(
|
|
3196
|
-
`);if(S){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let
|
|
3197
|
-
`);if(
|
|
3214
|
+
`;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(c),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(s){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",s),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=c,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:c,storedTheme:s}=zt({manageTheme:t,themeStorageKey:o}),l=Ct(n,{}),d=l.enhancers,{log:p,...g}=l.generatorConfig,h=structuredClone(g);h.log=p,t&&(h.theme=c);let w=new f.Generator(h);if(h.design?.typography)try{await yt(h.design.typography)}catch(S){h?.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(E){return h?.log?.("warn",`Failed to generate critical CSS for layer "${$}":`,E),""}}).filter($=>$.trim()).join(`
|
|
3215
|
+
`);if(S){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let E=document.createElement("style");E.setAttribute("data-pds-critical",""),E.textContent=S;let L=document.head.querySelector('meta[charset], meta[name="viewport"]');L?L.parentNode.insertBefore(E,L.nextSibling):document.head.insertBefore(E,document.head.firstChild)}}catch(S){h?.log?.("warn","Failed to preload critical styles:",S)}f.registry.setLiveMode(),l.presetInfo?.name?h?.log?.("log",`PDS live with preset "${l.presetInfo.name}"`):h?.log?.("log","PDS live with custom config"),e&&(await f.Generator.applyStyles(),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 E=document.getElementById("pds-runtime-stylesheet");E&&E.remove()},100));let b=At(n),m;i&&i.baseURL?m=me(he(i.baseURL,{preferModule:!1})):m=`${b}components/`;let A=null;try{A=(await Mt({autoDefineBaseURL:m,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){h?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",S)}let R=w?.options||h,_=ae(n);return f.currentConfig=Object.freeze({mode:"live",...structuredClone(_),design:structuredClone(l.generatorConfig.design),preset:l.generatorConfig.preset,theme:c}),kt({mode:"live",generator:w,config:R,theme:c,autoDefiner:A}),{generator:w,config:R,theme:c,autoDefiner:A}}catch(c){throw f.dispatchEvent(new CustomEvent("pds:error",{detail:{error:c}})),c}}async function dr(n){let e=n&&n.mode||"live",{mode:t,...o}=n||{};return e==="static"?pr(o):lr(o)}f.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,c;i&&i.baseURL?c=me(he(i.baseURL,{preferModule:!1})):c=`${a}components/`;let s=i&&Array.isArray(i.predefine)&&i.predefine||[],l=i&&typeof i.mapper=="function"&&i.mapper||null;try{let{resolvedTheme:d}=zt({manageTheme:t,themeStorageKey:o}),p=Ct(n,{}),g=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},f.registry.setStaticMode(r),e&&typeof document<"u")try{let m=await f.registry.getStylesheet("styles");if(m){m._pds=!0;let A=(document.adoptedStyleSheets||[]).filter(R=>R._pds!==!0);document.adoptedStyleSheets=[...A,m]}}catch(m){console.warn("Failed to apply static styles:",m)}let w=null;try{w=(await Mt({autoDefineBaseURL:c,autoDefinePreload:s,autoDefineMapper:l,enhancers:g,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)})).autoDefiner}catch(m){console.error("\u274C Failed to initialize AutoDefiner/Enhancers (static):",m)}let b=ae(n);return f.currentConfig=Object.freeze({mode:"static",...structuredClone(b),design:structuredClone(p.generatorConfig.design),preset:p.generatorConfig.preset,theme:d}),kt({mode:"static",config:p.generatorConfig,theme:d,autoDefiner:w}),{config:p.generatorConfig,theme:d,autoDefiner:w}}catch(d){throw f.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),f.registry.isLive&&z.instance)try{let a=z.instance;if(a&&a.configure){let i={...a.config,theme:r};a.configure(i),await f.Generator.applyStyles()}}catch(a){console.warn("Failed to update styles for new theme:",a)}return f.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,requested:n,source:"programmatic"}})),r}f.setTheme=ur;function gr(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 f.Generator(a),c=o.map(s=>{try{return i.css?.[s]||""}catch{return""}}).filter(s=>s.trim()).join(`
|
|
3216
|
+
`);if(c){let s=document.head.querySelector("style[data-pds-preload]");s&&s.remove();let l=document.createElement("style");l.setAttribute("data-pds-preload",""),l.textContent=c,document.head.insertBefore(l,document.head.firstChild)}}catch(r){console.warn("PDS preload failed:",r)}}f.preloadCritical=gr;export{f as PDS,Et as validateDesign};
|
|
3198
3217
|
/*! Bundled license information:
|
|
3199
3218
|
|
|
3200
3219
|
@lit/reactive-element/css-tag.js:
|