@pure-ds/core 0.5.28 → 0.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/public/assets/js/pds-manager.d.ts +186 -443
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +3 -4
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-generator.d.ts +30 -18
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/assets/js/app.js +138 -143
- package/public/assets/js/pds-manager.js +153 -158
- package/public/assets/pds/pds-css-complete.json +28 -0
- package/public/assets/pds/pds.css-data.json +44 -0
- package/src/js/pds-core/pds-generator.js +146 -69
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Re=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{for(var e in t)Re(n,e,{get:t[e],enumerable:!0})};var ne={};N(ne,{enums:()=>p});var p,_=P(()=>{p={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 ce={};N(ce,{default:()=>Pe,findComponentForElement:()=>Ae,getAllSelectors:()=>We,getAllTags:()=>De,getByCategory:()=>je,ontology:()=>z,searchOntology:()=>Be});function W(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function se(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function Ae(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,a=0;for(;e&&a<t;){if(a++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let o of PDS.ontology.enhancements){let i=o.selector||o;if(W(e,i))return{element:e,componentType:"enhanced-component",displayName:o.description||i,id:o.id}}if(e.tagName==="FIELDSET"){let o=e.getAttribute("role");if(o==="group"||o==="radiogroup")return{element:e,componentType:"form-group",displayName:o==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let r=e.closest?e.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,u=0;for(;c&&u<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(d))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,u++}continue}continue}if(W(e,s))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.classList){let i=Array.from(e.classList);for(let s of o.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(l)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}}}for(let o of PDS.ontology.layoutPatterns||[])for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(W(e,s))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.tagName&&e.tagName.includes("-")){let o=e.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(o));return{element:e,componentType:"web-component",displayName:i?.name||o,id:i?.id||o,tags:i?.tags}}if(e.tagName==="BUTTON"){let o=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:o?"button with icon":"button",id:"button"}}if(W(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let o=W(e,"pds-icon")?e:e.closest("pds-icon");return{element:o,componentType:"icon",displayName:`pds-icon (${o.getAttribute&&o.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(W(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:W(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function We(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function Be(n,t={}){let e=n.toLowerCase(),a=[],r=(o,i)=>{for(let s of o)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(d=>d.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(d=>d.toLowerCase().includes(e)))&&a.push({...s,type:i})};return(!t.type||t.type==="primitive")&&r(z.primitives,"primitive"),(!t.type||t.type==="component")&&r(z.components,"component"),(!t.type||t.type==="layout")&&r(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&r(z.enhancements,"enhancement"),a}function je(n){let t=n.toLowerCase();return{primitives:z.primitives.filter(e=>e.category===t),components:z.components.filter(e=>e.category===t),layouts:z.layoutPatterns.filter(e=>e.category===t)}}function De(){let n=new Set;return z.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var z,Pe,J=P(()=>{z={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"]}};Pe=z});var ye={};N(ye,{AutoDefiner:()=>ee});async function rt(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:a,mapper:r=d=>`${d}.js`,onError:o=(d,c)=>console.error(`[defineWebComponents] ${d}:`,c)}=t,i=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(c,u,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let c=r(d),g=await import(c instanceof URL?c.href:new URL(c,i).href),h=g?.default??g?.[s(d)];if(!h){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,h),{tag:d,status:"defined"})}catch(c){throw o(d,c),c}};return Promise.all(e.map(l))}var ee,ve=P(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:a,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:l=!0,debounceMs:d=16,observeShadows:c=!0,enhancers:u=[],patchAttachShadow:g=!0}=t,h=new Set,v=new Set,x=new Set,m=new Map,w=new WeakMap,M=new WeakMap,k=0,T=!1,R=null,B=f=>{if(!f||!u.length)return;let y=M.get(f);y||(y=new Set,M.set(f,y));for(let b of u)if(!(!b.selector||!b.run)&&!y.has(b.selector))try{f.matches&&f.matches(b.selector)&&(b.run(f),y.add(b.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,C)}},j=(f,y)=>{if(!T&&!(!f||!f.includes("-"))&&!customElements.get(f)&&!v.has(f)&&!x.has(f)){if(y&&y.getAttribute){let b=y.getAttribute(i);b&&!m.has(f)&&m.set(f,b)}h.add(f),$()}},$=()=>{k||(k=setTimeout(L,d))},S=f=>{if(f){if(f.nodeType===1){let y=f,b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)}f.querySelectorAll&&f.querySelectorAll("*").forEach(y=>{let b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)})}},F=f=>{if(!f||w.has(f))return;S(f);let y=new MutationObserver(b=>{for(let C of b)C.addedNodes?.forEach(D=>{S(D)}),C.type==="attributes"&&C.target&&S(C.target)});y.observe(f,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...u.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,y)};async function L(){if(clearTimeout(k),k=0,!h.size)return;let f=Array.from(h);h.clear(),f.forEach(y=>v.add(y));try{let y=b=>m.get(b)??(a?a(b):`${b}.js`);await rt(...f,{baseURL:e,mapper:y,onError:(b,C)=>{x.add(b),r?.(b,C)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let G=s===document?document.documentElement:s,A=new MutationObserver(f=>{for(let y of f)y.addedNodes?.forEach(b=>{S(b)}),y.type==="attributes"&&y.target&&S(y.target)});if(A.observe(G,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...u.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),c&&g&&Element.prototype.attachShadow){let f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let C=f.call(this,b);if(b&&b.mode==="open"){F(C);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&j(D,this)}return C},R=()=>Element.prototype.attachShadow=f}return l&&S(G),{stop(){T=!0,A.disconnect(),R&&R(),k&&(clearTimeout(k),k=0),w.forEach(f=>f.disconnect())},flush:L}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let a=t,{baseURL:r,mapper:o=c=>`${c}.js`,onError:i=(c,u)=>console.error(`[defineWebComponents] ${c}:`,u)}=e,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(u,g,h)=>h.toUpperCase()),d=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let u=o(c),h=await import(u instanceof URL?u.href:new URL(u,s).href),v=h?.default??h?.[l(c)];if(!v){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${l(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,v),{tag:c,status:"defined"})}catch(u){throw i(c,u),u}};return Promise.all(a.map(d))}}});var ae={};N(ae,{PDSQuery:()=>re});var re,oe=P(()=>{re=class{constructor(t){this.pds=t,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(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),a=this.tokenize(e),r=this.analyzeQuery(a,e),o=[];r.intents.has("color")&&o.push(...this.queryColors(r,e)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(r,e)),(r.intents.has("component")||r.entities.size>0)&&o.push(...this.queryComponents(r,e)),(r.intents.has("layout")||r.intents.has("pattern"))&&o.push(...this.queryPatterns(r,e)),r.intents.has("typography")&&o.push(...this.queryTypography(r,e)),r.intents.has("spacing")&&o.push(...this.querySpacing(r,e));let i=new Map;for(let s of o){let l=s.value;(!i.has(l)||i.get(l).score<s.score)&&i.set(l,s)}return Array.from(i.values()).sort((s,l)=>l.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let a={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};a.isQuestion=this.questionWords.some(r=>t.includes(r));for(let[r,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&a.intents.add(r);for(let[r,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&a.entities.add(r);return(t.includes("hover")||e.includes("hover"))&&a.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&a.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&a.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&a.modifiers.add("disabled"),a}queryColors(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.colors)return a;let o=r.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&a.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"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(a.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"}),a.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"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let l=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let c=`--color-${l}-${d}`;a.push({text:`${l.charAt(0).toUpperCase()+l.slice(1)} ${d}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${c})`,description:`${l} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let l=s[0];l?a.push({text:`Button ${l} fill: var(--primary-fill-${l})`,value:`--primary-fill-${l}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${l} state`}):a.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return a}queryUtilities(t,e){let a=[],r=this.pds.ontology;if(!r?.utilities)return a;let o=r.utilities,i=[];for(let s of Object.values(o))if(typeof s=="object")for(let l of Object.values(s))Array.isArray(l)&&i.push(...l);return t.intents.has("border")&&i.filter(l=>l.includes("border")||l.includes("outline")).forEach(l=>{let d=80;e.includes("gradient")&&l.includes("gradient")&&(d=95),e.includes("glow")&&l.includes("glow")&&(d=95),a.push({text:`${l} - Border utility class`,value:l,icon:"code",category:"Utility Class",score:d,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),t.intents.has("layout")&&i.filter(l=>l.includes("flex")||l.includes("grid")||l.includes("items-")||l.includes("justify-")||l.includes("gap-")).forEach(l=>{a.push({text:`${l} - Layout utility`,value:l,icon:"layout",category:"Utility Class",score:85,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),e.includes("group")&&t.entities.has("button")&&a.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
1
|
+
var Re=Object.defineProperty;var N=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Re(n,e,{get:t[e],enumerable:!0})};var ne={};P(ne,{enums:()=>u});var u,_=N(()=>{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 ce={};P(ce,{default:()=>Ne,findComponentForElement:()=>Ae,getAllSelectors:()=>We,getAllTags:()=>De,getByCategory:()=>je,ontology:()=>z,searchOntology:()=>Be});function W(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function se(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function Ae(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,a=0;for(;e&&a<t;){if(a++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let o of PDS.ontology.enhancements){let i=o.selector||o;if(W(e,i))return{element:e,componentType:"enhanced-component",displayName:o.description||i,id:o.id}}if(e.tagName==="FIELDSET"){let o=e.getAttribute("role");if(o==="group"||o==="radiogroup")return{element:e,componentType:"form-group",displayName:o==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let r=e.closest?e.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,p=0;for(;c&&p<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(d))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,p++}continue}continue}if(W(e,s))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.classList){let i=Array.from(e.classList);for(let s of o.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(l)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}}}for(let o of PDS.ontology.layoutPatterns||[])for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(W(e,s))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.tagName&&e.tagName.includes("-")){let o=e.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(o));return{element:e,componentType:"web-component",displayName:i?.name||o,id:i?.id||o,tags:i?.tags}}if(e.tagName==="BUTTON"){let o=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:o?"button with icon":"button",id:"button"}}if(W(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let o=W(e,"pds-icon")?e:e.closest("pds-icon");return{element:o,componentType:"icon",displayName:`pds-icon (${o.getAttribute&&o.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(W(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:W(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function We(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function Be(n,t={}){let e=n.toLowerCase(),a=[],r=(o,i)=>{for(let s of o)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(d=>d.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(d=>d.toLowerCase().includes(e)))&&a.push({...s,type:i})};return(!t.type||t.type==="primitive")&&r(z.primitives,"primitive"),(!t.type||t.type==="component")&&r(z.components,"component"),(!t.type||t.type==="layout")&&r(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&r(z.enhancements,"enhancement"),a}function je(n){let t=n.toLowerCase();return{primitives:z.primitives.filter(e=>e.category===t),components:z.components.filter(e=>e.category===t),layouts:z.layoutPatterns.filter(e=>e.category===t)}}function De(){let n=new Set;return z.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var z,Ne,J=N(()=>{z={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"]}};Ne=z});var ye={};P(ye,{AutoDefiner:()=>ee});async function rt(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:a,mapper:r=d=>`${d}.js`,onError:o=(d,c)=>console.error(`[defineWebComponents] ${d}:`,c)}=t,i=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(c,p,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let c=r(d),g=await import(c instanceof URL?c.href:new URL(c,i).href),h=g?.default??g?.[s(d)];if(!h){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,h),{tag:d,status:"defined"})}catch(c){throw o(d,c),c}};return Promise.all(e.map(l))}var ee,ve=N(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:a,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:l=!0,debounceMs:d=16,observeShadows:c=!0,enhancers:p=[],patchAttachShadow:g=!0}=t,h=new Set,v=new Set,x=new Set,m=new Map,w=new WeakMap,M=new WeakMap,k=0,L=!1,R=null,B=f=>{if(!f||!p.length)return;let y=M.get(f);y||(y=new Set,M.set(f,y));for(let b of p)if(!(!b.selector||!b.run)&&!y.has(b.selector))try{f.matches&&f.matches(b.selector)&&(b.run(f),y.add(b.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,C)}},j=(f,y)=>{if(!L&&!(!f||!f.includes("-"))&&!customElements.get(f)&&!v.has(f)&&!x.has(f)){if(y&&y.getAttribute){let b=y.getAttribute(i);b&&!m.has(f)&&m.set(f,b)}h.add(f),$()}},$=()=>{k||(k=setTimeout(T,d))},S=f=>{if(f){if(f.nodeType===1){let y=f,b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)}f.querySelectorAll&&f.querySelectorAll("*").forEach(y=>{let b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)})}},F=f=>{if(!f||w.has(f))return;S(f);let y=new MutationObserver(b=>{for(let C of b)C.addedNodes?.forEach(D=>{S(D)}),C.type==="attributes"&&C.target&&S(C.target)});y.observe(f,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,y)};async function T(){if(clearTimeout(k),k=0,!h.size)return;let f=Array.from(h);h.clear(),f.forEach(y=>v.add(y));try{let y=b=>m.get(b)??(a?a(b):`${b}.js`);await rt(...f,{baseURL:e,mapper:y,onError:(b,C)=>{x.add(b),r?.(b,C)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let G=s===document?document.documentElement:s,A=new MutationObserver(f=>{for(let y of f)y.addedNodes?.forEach(b=>{S(b)}),y.type==="attributes"&&y.target&&S(y.target)});if(A.observe(G,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),c&&g&&Element.prototype.attachShadow){let f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let C=f.call(this,b);if(b&&b.mode==="open"){F(C);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&j(D,this)}return C},R=()=>Element.prototype.attachShadow=f}return l&&S(G),{stop(){L=!0,A.disconnect(),R&&R(),k&&(clearTimeout(k),k=0),w.forEach(f=>f.disconnect())},flush:T}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let a=t,{baseURL:r,mapper:o=c=>`${c}.js`,onError:i=(c,p)=>console.error(`[defineWebComponents] ${c}:`,p)}=e,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(p,g,h)=>h.toUpperCase()),d=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let p=o(c),h=await import(p instanceof URL?p.href:new URL(p,s).href),v=h?.default??h?.[l(c)];if(!v){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${l(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,v),{tag:c,status:"defined"})}catch(p){throw i(c,p),p}};return Promise.all(a.map(d))}}});var ae={};P(ae,{PDSQuery:()=>re});var re,oe=N(()=>{re=class{constructor(t){this.pds=t,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(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),a=this.tokenize(e),r=this.analyzeQuery(a,e),o=[];r.intents.has("color")&&o.push(...this.queryColors(r,e)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(r,e)),(r.intents.has("component")||r.entities.size>0)&&o.push(...this.queryComponents(r,e)),(r.intents.has("layout")||r.intents.has("pattern"))&&o.push(...this.queryPatterns(r,e)),r.intents.has("typography")&&o.push(...this.queryTypography(r,e)),r.intents.has("spacing")&&o.push(...this.querySpacing(r,e));let i=new Map;for(let s of o){let l=s.value;(!i.has(l)||i.get(l).score<s.score)&&i.set(l,s)}return Array.from(i.values()).sort((s,l)=>l.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let a={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};a.isQuestion=this.questionWords.some(r=>t.includes(r));for(let[r,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&a.intents.add(r);for(let[r,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&a.entities.add(r);return(t.includes("hover")||e.includes("hover"))&&a.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&a.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&a.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&a.modifiers.add("disabled"),a}queryColors(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.colors)return a;let o=r.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&a.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"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(a.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"}),a.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"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let l=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let c=`--color-${l}-${d}`;a.push({text:`${l.charAt(0).toUpperCase()+l.slice(1)} ${d}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${c})`,description:`${l} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let l=s[0];l?a.push({text:`Button ${l} fill: var(--primary-fill-${l})`,value:`--primary-fill-${l}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${l} state`}):a.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return a}queryUtilities(t,e){let a=[],r=this.pds.ontology;if(!r?.utilities)return a;let o=r.utilities,i=[];for(let s of Object.values(o))if(typeof s=="object")for(let l of Object.values(s))Array.isArray(l)&&i.push(...l);return t.intents.has("border")&&i.filter(l=>l.includes("border")||l.includes("outline")).forEach(l=>{let d=80;e.includes("gradient")&&l.includes("gradient")&&(d=95),e.includes("glow")&&l.includes("glow")&&(d=95),a.push({text:`${l} - Border utility class`,value:l,icon:"code",category:"Utility Class",score:d,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),t.intents.has("layout")&&i.filter(l=>l.includes("flex")||l.includes("grid")||l.includes("items-")||l.includes("justify-")||l.includes("gap-")).forEach(l=>{a.push({text:`${l} - Layout utility`,value:l,icon:"layout",category:"Utility Class",score:85,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),e.includes("group")&&t.entities.has("button")&&a.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
2
2
|
<button class="btn-primary">One</button>
|
|
3
3
|
<button class="btn-primary">Two</button>
|
|
4
4
|
</div>`,description:"Container for grouped buttons with connected styling"}),a}queryComponents(t,e){let a=[],r=this.pds.ontology;return!r?.components&&!r?.primitives||(r.components&&r.components.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);i>50&&a.push({text:`<${o.id}> - ${o.name}`,value:o.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${o.id}></${o.id}>`,description:o.description||`${o.name} web component`})}),r.primitives&&r.primitives.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);if(i>50){let s=o.selectors?.[0]||o.id;a.push({text:`${s} - ${o.name}`,value:o.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(o),description:o.description||`${o.name} primitive element`})}}),e.includes("icon")&&(e.includes("only")||e.includes("button"))&&a.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">
|
|
@@ -16,7 +16,7 @@ var Re=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
16
16
|
</section>`,description:"Semantic section element for content grouping"}))),a}queryTypography(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.typography)return a;let o=r.tokens.typography;return(e.includes("heading")||e.includes("title"))&&a.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"}),(e.includes("body")||e.includes("text"))&&a.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"}),a}querySpacing(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.spacing)return a;let o=r.tokens.spacing;for(let[i,s]of Object.entries(o))["2","4","6","8"].includes(i)&&a.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${s}`});return a}scoreMatch(t,e){let a=t.toLowerCase(),r=e.toLowerCase(),o=0;if(a===r)return 100;r.includes(a)&&(o+=80);let i=this.tokenize(a),s=this.tokenize(r),l=i.filter(d=>s.includes(d)).length;return o+=l/i.length*40,r.startsWith(a)&&(o+=20),Math.min(100,o)}generatePrimitiveExample(t){let e=t.selectors?.[0]||t.id;return e.includes("button")||t.id==="button"?'<button class="btn-primary">Click me</button>':e.includes("card")||t.id==="card"?`<article class="card">
|
|
17
17
|
<h3>Title</h3>
|
|
18
18
|
<p>Content</p>
|
|
19
|
-
</article>`:e.includes("badge")||t.id==="badge"?'<span class="badge">New</span>':`<${e}>Content</${e}>`}describeUtility(t){return t.includes("border-gradient")?"Apply animated gradient border effect":t.includes("border-glow")?"Apply glowing border effect":t.includes("flex")?"Flexbox container utility":t.includes("grid")?"Grid container utility":t.includes("gap-")?"Set gap between flex/grid children":t.includes("items-")?"Align items in flex container":t.includes("justify-")?"Justify content in flex container":t===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}}});var Ce={};N(Ce,{deepMerge:()=>Ee,isObject:()=>Z});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ee(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(a=>{Z(t[a])?a in n?e[a]=Ee(n[a],t[a]):Object.assign(e,{[a]:t[a]}):Object.assign(e,{[a]:t[a]})}),e}var Te=P(()=>{});_();var U={"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:p.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:p.RadiusSizes.small,borderWidth:p.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:p.RadiusSizes.xlarge,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.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:p.RadiusSizes.none,borderWidth:p.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:p.RadiusSizes.xxlarge,borderWidth:p.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:p.RadiusSizes.none,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.RadiusSizes.medium,borderWidth:p.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:p.RadiusSizes.small,borderWidth:p.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:p.RadiusSizes.medium,borderWidth:p.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:p.RadiusSizes.small,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:p.RadiusSizes.xxlarge,borderWidth:p.BorderWidths.thin},behavior:{transitionSpeed:p.TransitionSpeeds.slow,animationEasing:p.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:p.RadiusSizes.none,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.RadiusSizes.large,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:p.RadiusSizes.large,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.RadiusSizes.small,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:p.TouchTargetSizes.comfortable,focusStyle:p.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:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:p.TouchTargetSizes.standard,focusStyle:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.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},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:p.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:p.RadiusSizes.small,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};U.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:p.FontWeights.light,fontWeightNormal:p.FontWeights.normal,fontWeightMedium:p.FontWeights.medium,fontWeightSemibold:p.FontWeights.semibold,fontWeightBold:p.FontWeights.bold,lineHeightTight:p.LineHeights.tight,lineHeightNormal:p.LineHeights.normal,lineHeightRelaxed:p.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:p.RadiusSizes.large,borderWidth:p.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.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:p.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:p.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:p.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",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;e.length>0?r(t,...e):r(t)}}_();J();var E=class n{static#d;static get instance(){return this.#d}#e;#a;constructor(t={}){this.options={debug:!1,...t},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 t=this.options.design||{};return{colors:this.#v(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#T(t.shape||{}),borderWidths:this.#L(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#R(t.layers||{}),layout:this.#A(t.layout||{}),transitions:this.#W(t.behavior||{}),zIndex:this.#B(t.layers||{}),icons:this.#j(t.icons||{})}}#v(t){let{primary:e="#3b82f6",secondary:a="#64748b",accent:r="#ec4899",background:o="#ffffff",success:i=null,warning:s="#FFBF00",danger:l=null,info:d=null,darkMode:c={}}=t,u={primary:this.#r(e),secondary:this.#r(a),accent:this.#r(r),success:this.#r(i||this.#x(e)),warning:this.#r(s||r),danger:this.#r(l||this.#w(e)),info:this.#r(d||e),gray:this.#p(a),surface:this.#u(o)};return u.surface.fieldset=this.#k(u.surface),u.surfaceSmart=this.#b(u.surface),u.dark=this.#$(u,o,c),u.dark&&u.dark.surface&&(u.dark.surfaceSmart=this.#b(u.dark.surface)),u.interactive={light:{fill:this.#f(u.primary,4.5),text:u.primary[600]},dark:{fill:this.#f(u.dark.primary,4.5),text:this.#E(u.dark.primary,u.dark.surface.base,4.5)}},u}#r(t){let e=this.#o(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#x(t){let e=this.#o(t);return this.#t(120,Math.max(e.s,60),45)}#w(t){let e=this.#o(t);return this.#t(0,Math.max(e.s,70),50)}#p(t){let e=this.#o(t),a=e.h,r=Math.min(e.s,10);return{50:this.#t(a,r,98),100:this.#t(a,r,95),200:this.#t(a,r,88),300:this.#t(a,r,78),400:this.#t(a,r,60),500:t,600:this.#t(a,Math.min(r+5,15),45),700:this.#t(a,Math.min(r+8,18),35),800:this.#t(a,Math.min(r+10,20),20),900:this.#t(a,Math.min(r+12,22),10)}}#u(t){let e=this.#o(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#g(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#S(t.sunken,.05),overlay:t.elevated}}#S(t,e=.05){let a=this.#o(t),r=Math.max(a.l-a.l*e,5);return this.#t(a.h,a.s,r)}#g(t){let e=this.#o(t);if(e.l>50){let a=Math.min(e.s+5,25),r=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,a,r)}else{let a=Math.max(e.s-10,5),r=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,a,r)}}#$(t,e="#ffffff",a={}){let r=a.background?a.background:this.#g(e),o=this.#u(r),i=a.primary?this.#r(a.primary):this.#n(t.primary);return{surface:{...o,fieldset:this.#F(o)},primary:i,secondary:a.secondary?this.#r(a.secondary):this.#n(t.secondary),accent:a.accent?this.#r(a.accent):this.#n(t.accent),gray:a.secondary?this.#p(a.secondary):t.gray,success:this.#n(t.success),info:this.#n(t.info),warning:this.#n(t.warning),danger:this.#n(t.danger)}}#s(t){let e=String(t||"").replace("#",""),a=e.length===3?e.split("").map(o=>o+o).join(""):e,r=parseInt(a,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(t){let{r:e,g:a,b:r}=this.#s(t),o=[e/255,a/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}#c(t,e){let a=this.#l(t),r=this.#l(e),o=Math.max(a,r),i=Math.min(a,r);return(o+.05)/(i+.05)}#m(t,e=4.5){if(!t)return"#000000";let a="#ffffff",r="#000000",o=this.#c(t,a);if(o>=e)return a;let i=this.#c(t,r);return i>=e||i>o?r:a}#h(t,e=1){let{r:a,g:r,b:o}=this.#s(t);return`rgba(${a}, ${r}, ${o}, ${e})`}#z(t,e,a=.5){let r=this.#s(t),o=this.#s(e),i=Math.round(r.r+(o.r-r.r)*a),s=Math.round(r.g+(o.g-r.g)*a),l=Math.round(r.b+(o.b-r.b)*a);return this.#M(i,s,l)}#M(t,e,a){let r=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${r(t)}${r(e)}${r(a)}`}#F(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#y(t.elevated,.08),sunken:t.elevated,overlay:this.#y(t.overlay,.05)}}#E(t={},e="#000000",a=4.5){let r=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of r){let s=t?.[i];if(!s||typeof s!="string")continue;let l=this.#c(s,e);if(l>o.ratio&&(o={shade:i,color:s,ratio:l}),l>=a)return s}return o.color||t?.["600"]||t?.["500"]}#f(t={},e=4.5){let a=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let o of a){let i=t?.[o];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:o,color:i,ratio:s}),s>=e)return i}return r.color||t?.["600"]||t?.["500"]}#b(t){let e={};return Object.entries(t).forEach(([a,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let o=this.#l(r)<.5,i=this.#m(r,4.5),s=this.#m(r,3),l=this.#z(i,r,.4),d=i,c=l,u=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#h(u,g),v=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#h(v,x);e[a]={bg:r,text:i,textSecondary:s,textMuted:l,icon:d,iconSubtle:c,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#y(t,e=.05){let a=this.#o(t),r=Math.min(a.l+(100-a.l)*e,95);return this.#t(a.h,a.s,r)}#n(t){let e={};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,o])=>{let i=t[o.source];e[r]=this.#C(i,o.dimFactor)}),e}#C(t,e=.8){let a=this.#o(t),r=Math.max(a.s*e,5),o=Math.max(a.l*e,5);return this.#t(a.h,r,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:a=1.25,maxSpacingSteps:r=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let l=1;l<=i;l++)s[l]=`${o*l}px`;return s}#T(t){let{radiusSize:e="medium",customRadius:a=null}=t,r;a!=null?r=a:typeof e=="number"?r=e:typeof e=="string"?r=p.RadiusSizes[e]??p.RadiusSizes.medium:r=p.RadiusSizes.medium;let o=Number.isFinite(Number(r))?Number(r):p.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(o*.25)?Math.round(o*.25):0}px`,sm:`${Number.isFinite(o*.5)?Math.round(o*.5):0}px`,md:`${o}px`,lg:`${Number.isFinite(o*1.5)?Math.round(o*1.5):0}px`,xl:`${Number.isFinite(o*2)?Math.round(o*2):0}px`,full:"9999px"}}#L(t){let{borderWidth:e="medium"}=t,a;return typeof e=="number"?a=e:typeof e=="string"?a=p.BorderWidths[e]??p.BorderWidths.medium:a=p.BorderWidths.medium,{hairline:`${p.BorderWidths.hairline}px`,thin:`${p.BorderWidths.thin}px`,medium:`${p.BorderWidths.medium}px`,thick:`${p.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:s=p.FontWeights.light,fontWeightNormal:l=p.FontWeights.normal,fontWeightMedium:d=p.FontWeights.medium,fontWeightSemibold:c=p.FontWeights.semibold,fontWeightBold:u=p.FontWeights.bold,lineHeightTight:g=p.LineHeights.tight,lineHeightNormal:h=p.LineHeights.normal,lineHeightRelaxed:v=p.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:a,mono:r},fontSize:{xs:`${Math.round(x/Math.pow(m,2))}px`,sm:`${Math.round(x/m)}px`,base:`${x}px`,lg:`${Math.round(x*m)}px`,xl:`${Math.round(x*Math.pow(m,2))}px`,"2xl":`${Math.round(x*Math.pow(m,3))}px`,"3xl":`${Math.round(x*Math.pow(m,4))}px`,"4xl":`${Math.round(x*Math.pow(m,5))}px`},fontWeight:{light:s?.toString()||"300",normal:l?.toString()||"400",medium:d?.toString()||"500",semibold:c?.toString()||"600",bold:u?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#R(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:r=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*r}px ${2*a}px 0 ${i}`,base:`0 ${1*r}px ${3*a}px 0 ${o}, 0 ${1*r}px ${2*a}px 0 ${i}`,md:`0 ${4*r}px ${6*a}px ${-1*r}px ${o}, 0 ${2*r}px ${4*a}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*a}px ${-3*r}px ${o}, 0 ${4*r}px ${6*a}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*a}px ${-5*r}px ${o}, 0 ${10*r}px ${10*a}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*a}px 0 ${i}`}}#A(t){let{maxWidth:e=1200,containerPadding:a=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t;return{maxWidth:`${e}px`,minHeight:"100vh",containerPadding:`${a}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"}}#W(t){let{transitionSpeed:e=p.TransitionSpeeds.normal,animationEasing:a=p.AnimationEasings["ease-out"]}=t,r;return typeof e=="number"?r=e:typeof e=="string"&&p.TransitionSpeeds[e]?r=p.TransitionSpeeds[e]:r=p.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#B(t){let{baseZIndex:e=1e3,zIndexStep:a=10}=t;return{dropdown:e.toString(),sticky:(e+a*2).toString(),fixed:(e+a*3).toString(),modal:(e+a*4).toString(),drawer:(e+a*5).toString(),popover:(e+a*6).toString(),tooltip:(e+a*7).toString(),notification:(e+a*8).toString()}}#j(t){let{set:e="phosphor",weight:a="regular",defaultSize:r=24,sizes:o={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/"}=t;return{set:e,weight:a,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(o).map(([l,d])=>[l,`${d}px`])),spritePath:i,externalPath:s}}#D(t){let e=[];e.push(` /* Colors */
|
|
19
|
+
</article>`:e.includes("badge")||t.id==="badge"?'<span class="badge">New</span>':`<${e}>Content</${e}>`}describeUtility(t){return t.includes("border-gradient")?"Apply animated gradient border effect":t.includes("border-glow")?"Apply glowing border effect":t.includes("flex")?"Flexbox container utility":t.includes("grid")?"Grid container utility":t.includes("gap-")?"Set gap between flex/grid children":t.includes("items-")?"Align items in flex container":t.includes("justify-")?"Justify content in flex container":t===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}}});var Ce={};P(Ce,{deepMerge:()=>Ee,isObject:()=>Z});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ee(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(a=>{Z(t[a])?a in n?e[a]=Ee(n[a],t[a]):Object.assign(e,{[a]:t[a]}):Object.assign(e,{[a]:t[a]})}),e}var Le=N(()=>{});_();var U={"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},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}}};U.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",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;e.length>0?r(t,...e):r(t)}}_();J();var E=class n{static#u;static get instance(){return this.#u}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#u=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ve(),typeof CSSStyleSheet<"u"?this.#$e():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#k(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#A(t.shape||{}),borderWidths:this.#W(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#B(t.layers||{}),layout:this.#j(t.layout||{}),transitions:this.#D(t.behavior||{}),zIndex:this.#N(t.layers||{}),icons:this.#P(t.icons||{})}}#k(t){let{primary:e="#3b82f6",secondary:a="#64748b",accent:r="#ec4899",background:o="#ffffff",success:i=null,warning:s="#FFBF00",danger:l=null,info:d=null,darkMode:c={}}=t,p={primary:this.#r(e),secondary:this.#r(a),accent:this.#r(r),success:this.#r(i||this.#S(e)),warning:this.#r(s||r),danger:this.#r(l||this.#$(e)),info:this.#r(d||e),gray:this.#g(a),surface:this.#m(o)};return p.surface.fieldset=this.#z(p.surface),p.surfaceSmart=this.#v(p.surface),p.dark=this.#F(p,o,c),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#v(p.dark.surface)),p.interactive={light:{fill:this.#y(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#y(p.dark.primary,4.5),text:this.#T(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(t){let e=this.#n(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#S(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#$(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#g(t){let e=this.#n(t),a=e.h,r=Math.min(e.s,10);return{50:this.#t(a,r,98),100:this.#t(a,r,95),200:this.#t(a,r,88),300:this.#t(a,r,78),400:this.#t(a,r,60),500:t,600:this.#t(a,Math.min(r+5,15),45),700:this.#t(a,Math.min(r+8,18),35),800:this.#t(a,Math.min(r+10,20),20),900:this.#t(a,Math.min(r+12,22),10)}}#m(t){let e=this.#n(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#h(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#z(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#M(t.sunken,.05),overlay:t.elevated}}#M(t,e=.05){let a=this.#n(t),r=Math.max(a.l-a.l*e,5);return this.#t(a.h,a.s,r)}#h(t){let e=this.#n(t);if(e.l>50){let a=Math.min(e.s+5,25),r=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,a,r)}else{let a=Math.max(e.s-10,5),r=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,a,r)}}#F(t,e="#ffffff",a={}){let r=a.background?a.background:this.#h(e),o=this.#m(r),i=a.primary?this.#r(a.primary):this.#i(t.primary);return{surface:{...o,fieldset:this.#L(o)},primary:i,secondary:a.secondary?this.#r(a.secondary):this.#i(t.secondary),accent:a.accent?this.#r(a.accent):this.#i(t.accent),gray:a.secondary?this.#g(a.secondary):t.gray,success:this.#i(t.success),info:this.#i(t.info),warning:this.#i(t.warning),danger:this.#i(t.danger)}}#l(t){let e=String(t||"").replace("#",""),a=e.length===3?e.split("").map(o=>o+o).join(""):e,r=parseInt(a,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#p(t){let{r:e,g:a,b:r}=this.#l(t),o=[e/255,a/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}#d(t,e){let a=this.#p(t),r=this.#p(e),o=Math.max(a,r),i=Math.min(a,r);return(o+.05)/(i+.05)}#f(t,e=4.5){if(!t)return"#000000";let a="#ffffff",r="#000000",o=this.#d(t,a);if(o>=e)return a;let i=this.#d(t,r);return i>=e||i>o?r:a}#b(t,e=1){let{r:a,g:r,b:o}=this.#l(t);return`rgba(${a}, ${r}, ${o}, ${e})`}#E(t,e,a=.5){let r=this.#l(t),o=this.#l(e),i=Math.round(r.r+(o.r-r.r)*a),s=Math.round(r.g+(o.g-r.g)*a),l=Math.round(r.b+(o.b-r.b)*a);return this.#C(i,s,l)}#C(t,e,a){let r=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${r(t)}${r(e)}${r(a)}`}#L(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#x(t.elevated,.08),sunken:t.elevated,overlay:this.#x(t.overlay,.05)}}#T(t={},e="#000000",a=4.5){let r=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of r){let s=t?.[i];if(!s||typeof s!="string")continue;let l=this.#d(s,e);if(l>o.ratio&&(o={shade:i,color:s,ratio:l}),l>=a)return s}return o.color||t?.["600"]||t?.["500"]}#y(t={},e=4.5){let a=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let o of a){let i=t?.[o];if(!i||typeof i!="string")continue;let s=this.#d(i,"#ffffff");if(s>r.ratio&&(r={shade:o,color:i,ratio:s}),s>=e)return i}return r.color||t?.["600"]||t?.["500"]}#v(t){let e={};return Object.entries(t).forEach(([a,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let o=this.#p(r)<.5,i=this.#f(r,4.5),s=this.#f(r,3),l=this.#E(i,r,.4),d=i,c=l,p=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#b(p,g),v=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#b(v,x);e[a]={bg:r,text:i,textSecondary:s,textMuted:l,icon:d,iconSubtle:c,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#x(t,e=.05){let a=this.#n(t),r=Math.min(a.l+(100-a.l)*e,95);return this.#t(a.h,a.s,r)}#i(t){let e={};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,o])=>{let i=t[o.source];e[r]=this.#R(i,o.dimFactor)}),e}#R(t,e=.8){let a=this.#n(t),r=Math.max(a.s*e,5),o=Math.max(a.l*e,5);return this.#t(a.h,r,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:a=1.25,maxSpacingSteps:r=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let l=1;l<=i;l++)s[l]=`${o*l}px`;return s}#A(t){let{radiusSize:e="medium",customRadius:a=null}=t,r;a!=null?r=a:typeof e=="number"?r=e:typeof e=="string"?r=u.RadiusSizes[e]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let o=Number.isFinite(Number(r))?Number(r):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(o*.25)?Math.round(o*.25):0}px`,sm:`${Number.isFinite(o*.5)?Math.round(o*.5):0}px`,md:`${o}px`,lg:`${Number.isFinite(o*1.5)?Math.round(o*1.5):0}px`,xl:`${Number.isFinite(o*2)?Math.round(o*2):0}px`,full:"9999px"}}#W(t){let{borderWidth:e="medium"}=t,a;return typeof e=="number"?a=e:typeof e=="string"?a=u.BorderWidths[e]??u.BorderWidths.medium:a=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:s=u.FontWeights.light,fontWeightNormal:l=u.FontWeights.normal,fontWeightMedium:d=u.FontWeights.medium,fontWeightSemibold:c=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:v=u.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:a,mono:r},fontSize:{xs:`${Math.round(x/Math.pow(m,2))}px`,sm:`${Math.round(x/m)}px`,base:`${x}px`,lg:`${Math.round(x*m)}px`,xl:`${Math.round(x*Math.pow(m,2))}px`,"2xl":`${Math.round(x*Math.pow(m,3))}px`,"3xl":`${Math.round(x*Math.pow(m,4))}px`,"4xl":`${Math.round(x*Math.pow(m,5))}px`},fontWeight:{light:s?.toString()||"300",normal:l?.toString()||"400",medium:d?.toString()||"500",semibold:c?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#B(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:r=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*r}px ${2*a}px 0 ${i}`,base:`0 ${1*r}px ${3*a}px 0 ${o}, 0 ${1*r}px ${2*a}px 0 ${i}`,md:`0 ${4*r}px ${6*a}px ${-1*r}px ${o}, 0 ${2*r}px ${4*a}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*a}px ${-3*r}px ${o}, 0 ${4*r}px ${6*a}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*a}px ${-5*r}px ${o}, 0 ${10*r}px ${10*a}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*a}px 0 ${i}`}}#j(t){let{maxWidth:e=1200,containerPadding:a=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t,o=this.#w(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:o.sm,maxWidthMd:o.md,maxWidthLg:o.lg,maxWidthXl:o.xl,minHeight:"100vh",containerPadding:this.#a(a,"16px"),breakpoints:{sm:this.#a(r.sm,"640px"),md:this.#a(r.md,"768px"),lg:this.#a(r.lg,"1024px"),xl:this.#a(r.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#w(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:a={},maxWidth:r=1200,containerPadding:o=16,breakpoints:i=e}=t||{},s=this.#s(o,16),l=this.#s(r,e.xl),d={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},c=g=>g?Math.max(320,g-s*2):l,p={sm:Math.min(l,c(d.sm)),md:Math.min(l,c(d.md)),lg:Math.min(l,c(d.lg)),xl:Math.max(320,l)};return{sm:this.#a(a.sm,`${p.sm}px`),md:this.#a(a.md,`${p.md}px`),lg:this.#a(a.lg,`${p.lg}px`),xl:this.#a(a.xl,`${p.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let a=parseFloat(t);if(Number.isFinite(a))return a}return e}#D(t){let{transitionSpeed:e=u.TransitionSpeeds.normal,animationEasing:a=u.AnimationEasings["ease-out"]}=t,r;return typeof e=="number"?r=e:typeof e=="string"&&u.TransitionSpeeds[e]?r=u.TransitionSpeeds[e]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#N(t){let{baseZIndex:e=1e3,zIndexStep:a=10}=t;return{dropdown:e.toString(),sticky:(e+a*2).toString(),fixed:(e+a*3).toString(),modal:(e+a*4).toString(),drawer:(e+a*5).toString(),popover:(e+a*6).toString(),tooltip:(e+a*7).toString(),notification:(e+a*8).toString()}}#P(t){let{set:e="phosphor",weight:a="regular",defaultSize:r=24,sizes:o={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/"}=t;return{set:e,weight:a,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(o).map(([l,d])=>[l,`${d}px`])),spritePath:i,externalPath:s}}#U(t){let e=[];e.push(` /* Colors */
|
|
20
20
|
`);let a=(r,o="")=>{Object.entries(r).forEach(([i,s])=>{typeof s=="object"&&s!==null?a(s,`${o}${i}-`):typeof s=="string"&&e.push(` --color-${o}${i}: ${s};
|
|
21
21
|
`)})};return Object.entries(t).forEach(([r,o])=>{r!=="dark"&&r!=="surfaceSmart"&&r!=="interactive"&&typeof o=="object"&&o!==null&&a(o,`${r}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
22
|
`),Object.entries(t.surfaceSmart).forEach(([r,o])=>{e.push(` --surface-${r}-bg: ${o.bg};
|
|
@@ -59,8 +59,8 @@ var Re=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
59
59
|
|
|
60
60
|
/* Legacy alias for backwards compatibility */
|
|
61
61
|
--backdrop-background: var(--backdrop-bg);
|
|
62
|
-
`),e.push(this.#
|
|
63
|
-
`}#
|
|
62
|
+
`),e.push(this.#I(t)),`${e.join("")}
|
|
63
|
+
`}#I(t){let e=t.primary?.[500]||"#3b82f6",a=t.secondary?.[500]||"#8b5cf6",r=t.accent?.[500]||"#f59e0b";return`
|
|
64
64
|
/* Mesh Gradient Backgrounds */
|
|
65
65
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${e} 25%, transparent) 0px, transparent 50%),
|
|
66
66
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 22%, transparent) 0px, transparent 50%),
|
|
@@ -86,37 +86,37 @@ var Re=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
86
86
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
87
87
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
88
88
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
89
|
-
`}#
|
|
89
|
+
`}#O(t){let e=[` /* Spacing */
|
|
90
90
|
`];return Object.entries(t).forEach(([a,r])=>{a!=null&&a!=="NaN"&&r!==void 0&&!r.includes("NaN")&&e.push(` --spacing-${a}: ${r};
|
|
91
91
|
`)}),`${e.join("")}
|
|
92
|
-
`}#
|
|
92
|
+
`}#H(t){let e=[` /* Border Radius */
|
|
93
93
|
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --radius-${a}: ${r};
|
|
94
94
|
`)}),`${e.join("")}
|
|
95
|
-
`}#
|
|
95
|
+
`}#q(t){let e=[` /* Border Widths */
|
|
96
96
|
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --border-width-${a}: ${r};
|
|
97
97
|
`)}),`${e.join("")}
|
|
98
|
-
`}#
|
|
98
|
+
`}#G(t){let e=[` /* Typography */
|
|
99
99
|
`];return Object.entries(t).forEach(([a,r])=>{let o=a.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(r).forEach(([i,s])=>{let l=i.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(` --font-${o}-${l}: ${s};
|
|
100
100
|
`)})}),`${e.join("")}
|
|
101
|
-
`}#
|
|
101
|
+
`}#_(t){let e=[` /* Shadows */
|
|
102
102
|
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --shadow-${a}: ${r};
|
|
103
103
|
`)}),`${e.join("")}
|
|
104
|
-
`}#
|
|
104
|
+
`}#V(t){let e=[` /* Layout */
|
|
105
105
|
`];return Object.entries(t).forEach(([a,r])=>{let o=a.replace(/([A-Z])/g,"-$1").toLowerCase();a!=="breakpoints"&&e.push(` --layout-${o}: ${r};
|
|
106
106
|
`)}),`${e.join("")}
|
|
107
|
-
`}#
|
|
107
|
+
`}#Q(t){let e=[` /* Transitions */
|
|
108
108
|
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --transition-${a}: ${r};
|
|
109
109
|
`)}),`${e.join("")}
|
|
110
|
-
`}#
|
|
110
|
+
`}#Z(t){let e=[` /* Z-Index */
|
|
111
111
|
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --z-${a}: ${r};
|
|
112
112
|
`)}),`${e.join("")}
|
|
113
|
-
`}#
|
|
113
|
+
`}#J(t){let e=[` /* Icon System */
|
|
114
114
|
`];return e.push(` --icon-set: ${t.set};
|
|
115
115
|
`),e.push(` --icon-weight: ${t.weight};
|
|
116
116
|
`),e.push(` --icon-size: ${t.defaultSize};
|
|
117
117
|
`),Object.entries(t.sizes).forEach(([a,r])=>{e.push(` --icon-size-${a}: ${r};
|
|
118
118
|
`)}),`${e.join("")}
|
|
119
|
-
`}#
|
|
119
|
+
`}#Y(t){if(!t?.dark)return"";let e=[],a=(d,c="")=>{Object.entries(d).forEach(([p,g])=>{typeof g=="object"&&g!==null?a(g,`${c}${p}-`):typeof g=="string"&&e.push(` --color-${c}${p}: ${g};
|
|
120
120
|
`)})};Object.entries(t.dark).forEach(([d,c])=>{d!=="surfaceSmart"&&typeof c=="object"&&c!==null&&a(c,`${d}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
121
121
|
`),Object.entries(t.dark.surfaceSmart).forEach(([d,c])=>{r.push(` --surface-${d}-bg: ${c.bg};
|
|
122
122
|
`),r.push(` --surface-${d}-text: ${c.text};
|
|
@@ -149,18 +149,18 @@ var Re=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
149
149
|
|
|
150
150
|
/* Legacy alias for backwards compatibility */
|
|
151
151
|
--backdrop-background: var(--backdrop-bg);
|
|
152
|
-
`,s=this.#
|
|
152
|
+
`,s=this.#ee(t);return`html[data-theme="dark"] {
|
|
153
153
|
${[...e,...r,o,i,s].join("")}}
|
|
154
|
-
`}#
|
|
155
|
-
`)})};Object.entries(t.dark).forEach(([c,
|
|
156
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([c,
|
|
157
|
-
`),r.push(` --surface-${c}-text: ${
|
|
158
|
-
`),r.push(` --surface-${c}-text-secondary: ${
|
|
159
|
-
`),r.push(` --surface-${c}-text-muted: ${
|
|
160
|
-
`),r.push(` --surface-${c}-icon: ${
|
|
161
|
-
`),r.push(` --surface-${c}-icon-subtle: ${
|
|
162
|
-
`),r.push(` --surface-${c}-shadow: ${
|
|
163
|
-
`),r.push(` --surface-${c}-border: ${
|
|
154
|
+
`}#X(t){if(!t?.dark)return"";let e=[],a=(c,p="")=>{Object.entries(c).forEach(([g,h])=>{typeof h=="object"&&h!==null?a(h,`${p}${g}-`):typeof h=="string"&&e.push(` --color-${p}${g}: ${h};
|
|
155
|
+
`)})};Object.entries(t.dark).forEach(([c,p])=>{c!=="surfaceSmart"&&typeof p=="object"&&p!==null&&a(p,`${c}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
156
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([c,p])=>{r.push(` --surface-${c}-bg: ${p.bg};
|
|
157
|
+
`),r.push(` --surface-${c}-text: ${p.text};
|
|
158
|
+
`),r.push(` --surface-${c}-text-secondary: ${p.textSecondary};
|
|
159
|
+
`),r.push(` --surface-${c}-text-muted: ${p.textMuted};
|
|
160
|
+
`),r.push(` --surface-${c}-icon: ${p.icon};
|
|
161
|
+
`),r.push(` --surface-${c}-icon-subtle: ${p.iconSubtle};
|
|
162
|
+
`),r.push(` --surface-${c}-shadow: ${p.shadow};
|
|
163
|
+
`),r.push(` --surface-${c}-border: ${p.border};
|
|
164
164
|
`)}),r.push(`
|
|
165
165
|
`));let o=[];t.interactive&&t.interactive.dark&&(o.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
166
166
|
`),o.push(` --color-primary-fill: ${t.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
@@ -187,10 +187,10 @@ ${[...e,...r,o,i,s].join("")}}
|
|
|
187
187
|
|
|
188
188
|
/* Legacy alias for backwards compatibility */
|
|
189
189
|
--backdrop-background: var(--backdrop-bg);
|
|
190
|
-
`,l=this.#
|
|
190
|
+
`,l=this.#K(t);return`
|
|
191
191
|
html[data-theme="dark"] {
|
|
192
192
|
${[...e,...r,i,s,l].join("")} }
|
|
193
|
-
`}#
|
|
193
|
+
`}#K(t){let e=t.dark||t,a=e.primary?.[400]||"#60a5fa",r=e.secondary?.[400]||"#a78bfa",o=e.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
194
194
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
195
195
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
196
196
|
radial-gradient(at 52% 99%, color-mix(in oklab, ${o} 13%, transparent) 0px, transparent 50%),
|
|
@@ -215,7 +215,7 @@ ${[...e,...r,i,s,l].join("")} }
|
|
|
215
215
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
216
216
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
217
217
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
218
|
-
`}#
|
|
218
|
+
`}#ee(t){let e=t.dark||t,a=e.primary?.[400]||"#60a5fa",r=e.secondary?.[400]||"#a78bfa",o=e.accent?.[400]||"#fbbf24";return`
|
|
219
219
|
/* Mesh Gradient Backgrounds (Dark Mode) */
|
|
220
220
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
221
221
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
@@ -241,7 +241,7 @@ ${[...e,...r,i,s,l].join("")} }
|
|
|
241
241
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
242
242
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
243
243
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
244
|
-
`}#
|
|
244
|
+
`}#te(){return`/* Alert dark mode adjustments */
|
|
245
245
|
html[data-theme="dark"] {
|
|
246
246
|
.alert-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
|
|
247
247
|
.alert-info { background-color: var(--color-info-50); border-color: var(--color-info-500); color: var(--color-info-900); }
|
|
@@ -249,11 +249,11 @@ html[data-theme="dark"] {
|
|
|
249
249
|
.alert-danger, .alert-error { background-color: var(--color-danger-50); border-color: var(--color-danger-500); color: var(--color-danger-900); }
|
|
250
250
|
img, video { opacity: 0.8; transition: opacity var(--transition-normal); }
|
|
251
251
|
img:hover, video:hover { opacity: 1; }
|
|
252
|
-
}`}#
|
|
252
|
+
}`}#re(){try{let t=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",t);let e=Number(t);return!Number.isFinite(e)||e===0?"":`/* Optional background mesh applied from config */
|
|
253
253
|
body {
|
|
254
254
|
background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(e)))});
|
|
255
255
|
background-attachment: fixed;
|
|
256
|
-
}`}catch(t){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",t),""}}#
|
|
256
|
+
}`}catch(t){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",t),""}}#ae(){try{return this.options?.design?.options?.liquidGlassEffects?`/* Liquid glass utility (opt-in via options.liquidGlassEffects) */
|
|
257
257
|
.liquid-glass {
|
|
258
258
|
border-radius: var(--radius-lg);
|
|
259
259
|
/* Subtle translucent fill blended with surface */
|
|
@@ -310,7 +310,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
310
310
|
0 18px 32px rgba(0,0,0,0.58);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
`:""}catch{return""}}#
|
|
313
|
+
`:""}catch{return""}}#oe(){return`/* ============================================================================
|
|
314
314
|
Border Gradient Utilities
|
|
315
315
|
Card outlines with gradient borders and glow effects
|
|
316
316
|
============================================================================ */
|
|
@@ -435,7 +435,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
435
435
|
box-shadow: 0 0 12px var(--color-danger-500);
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
`}#
|
|
438
|
+
`}#ne(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Semantic HTML Elements (low-specificity via :where()) */
|
|
439
439
|
|
|
440
440
|
:where(blockquote) {
|
|
441
441
|
margin: 0 0 var(--spacing-4) 0;
|
|
@@ -626,7 +626,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
626
626
|
|
|
627
627
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
628
628
|
|
|
629
|
-
`}#
|
|
629
|
+
`}#ie(){let{gap:t,inputPadding:e,buttonPadding:a,focusRingWidth:r,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:l,inputMinHeight:d}=this.options.design,c=e||.75,p=a||1,g=r||3,h=i||1,v=t||1,x=s||2,m=l||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
630
|
form {
|
|
631
631
|
margin: 0;
|
|
632
632
|
width: 100%;
|
|
@@ -926,7 +926,7 @@ input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
|
926
926
|
align-items: center;
|
|
927
927
|
justify-content: center;
|
|
928
928
|
min-height: calc(${m}px * 0.75);
|
|
929
|
-
padding: calc(var(--spacing-1) * ${
|
|
929
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
930
930
|
border: ${h}px solid var(--color-border);
|
|
931
931
|
border-radius: var(--radius-md);
|
|
932
932
|
font-family: var(--font-family-body);
|
|
@@ -1030,7 +1030,7 @@ fieldset[role="group"].buttons {
|
|
|
1030
1030
|
align-items: center;
|
|
1031
1031
|
justify-content: center;
|
|
1032
1032
|
min-height: calc(${m}px * 0.75);
|
|
1033
|
-
padding: calc(var(--spacing-1) * ${
|
|
1033
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
1034
1034
|
border: 2px solid var(--color-border);
|
|
1035
1035
|
border-radius: var(--radius-md);
|
|
1036
1036
|
font-family: var(--font-family-body);
|
|
@@ -1228,7 +1228,7 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1228
1228
|
align-items: center;
|
|
1229
1229
|
justify-content: center;
|
|
1230
1230
|
min-height: ${m}px;
|
|
1231
|
-
padding: calc(var(--spacing-1) * ${
|
|
1231
|
+
padding: calc(var(--spacing-1) * ${p}) var(--spacing-6);
|
|
1232
1232
|
border: ${h}px solid transparent;
|
|
1233
1233
|
border-radius: var(--radius-md);
|
|
1234
1234
|
font-family: var(--font-family-body);
|
|
@@ -1488,7 +1488,7 @@ a.btn-working {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
|
|
1491
|
-
`}#
|
|
1491
|
+
`}#se(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Table Styles - Mobile First */
|
|
1492
1492
|
|
|
1493
1493
|
table {
|
|
1494
1494
|
width: 100%;
|
|
@@ -1569,7 +1569,7 @@ tbody {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
`}#
|
|
1572
|
+
`}#ce(){return`/* Alert/Notification Styles */
|
|
1573
1573
|
|
|
1574
1574
|
/* Alias: .semantic-message shares alert base styles */
|
|
1575
1575
|
.alert, .semantic-message {
|
|
@@ -1655,87 +1655,82 @@ tbody {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
|
|
1658
|
-
`}#
|
|
1658
|
+
`}#le(){return`/* Accordion (details/summary) */
|
|
1659
1659
|
|
|
1660
|
-
.accordion {
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
border: var(--_acc-border);
|
|
1667
|
-
border-radius: var(--_acc-radius);
|
|
1668
|
-
background: var(--_acc-bg);
|
|
1669
|
-
margin: 0 0 var(--spacing-3) 0;
|
|
1670
|
-
|
|
1671
|
-
&[open] {
|
|
1672
|
-
& > summary::after {
|
|
1673
|
-
transform: rotate(45deg);
|
|
1674
|
-
}
|
|
1660
|
+
:where(.accordion details) {
|
|
1661
|
+
border: 1px solid var(--color-border);
|
|
1662
|
+
border-radius: var(--radius-md);
|
|
1663
|
+
background: var(--color-surface-base);
|
|
1664
|
+
margin: 0 0 var(--spacing-3) 0;
|
|
1665
|
+
overflow: hidden;
|
|
1675
1666
|
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1667
|
+
&[open] {
|
|
1668
|
+
& > summary::after {
|
|
1669
|
+
transform: rotate(45deg);
|
|
1679
1670
|
}
|
|
1680
1671
|
|
|
1681
|
-
/* Modern approach: animate block-size with ::details-content */
|
|
1682
1672
|
&::details-content {
|
|
1683
|
-
block-size:
|
|
1684
|
-
overflow: hidden;
|
|
1685
|
-
transition: block-size var(--transition-normal) ease, content-visibility var(--transition-normal);
|
|
1686
|
-
transition-behavior: allow-discrete;
|
|
1673
|
+
block-size: auto;
|
|
1687
1674
|
}
|
|
1675
|
+
}
|
|
1688
1676
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1677
|
+
/* Modern approach: animate block-size with ::details-content */
|
|
1678
|
+
&::details-content {
|
|
1679
|
+
block-size: 0;
|
|
1680
|
+
overflow: hidden;
|
|
1681
|
+
transition: block-size var(--transition-normal) ease, content-visibility var(--transition-normal);
|
|
1682
|
+
transition-behavior: allow-discrete;
|
|
1694
1683
|
}
|
|
1695
1684
|
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
padding: var(--spacing-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
gap: var(--spacing-2);
|
|
1703
|
-
border-radius: var(--radius-sm);
|
|
1704
|
-
transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
1685
|
+
/* Content padding (works for both approaches) */
|
|
1686
|
+
& > :not(summary) > * {
|
|
1687
|
+
padding-inline: var(--spacing-4);
|
|
1688
|
+
padding-block: var(--spacing-3);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1705
1691
|
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1692
|
+
:where(.accordion summary) {
|
|
1693
|
+
cursor: pointer;
|
|
1694
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1695
|
+
list-style: none;
|
|
1696
|
+
display: flex;
|
|
1697
|
+
align-items: center;
|
|
1698
|
+
gap: var(--spacing-2);
|
|
1699
|
+
border-radius: inherit;
|
|
1700
|
+
transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
1709
1701
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1702
|
+
&::-webkit-details-marker {
|
|
1703
|
+
display: none;
|
|
1704
|
+
}
|
|
1713
1705
|
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1706
|
+
&:hover {
|
|
1707
|
+
background-color: var(--color-surface-subtle);
|
|
1708
|
+
}
|
|
1717
1709
|
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1710
|
+
&:focus {
|
|
1711
|
+
outline: none;
|
|
1712
|
+
}
|
|
1721
1713
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1714
|
+
&:focus-visible {
|
|
1715
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary-500) 30%, transparent);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
/* Chevron indicator */
|
|
1719
|
+
&::after {
|
|
1720
|
+
content: "";
|
|
1721
|
+
margin-inline-start: auto;
|
|
1722
|
+
inline-size: 0.7em;
|
|
1723
|
+
block-size: 0.7em;
|
|
1724
|
+
border-inline-end: 2px solid currentColor;
|
|
1725
|
+
border-block-end: 2px solid currentColor;
|
|
1726
|
+
transform: rotate(-45deg);
|
|
1727
|
+
transition: transform var(--transition-normal);
|
|
1733
1728
|
}
|
|
1734
1729
|
}
|
|
1735
1730
|
|
|
1736
1731
|
/* Fallback: grid trick for browsers without ::details-content support */
|
|
1737
1732
|
@supports not selector(::details-content) {
|
|
1738
|
-
.accordion details {
|
|
1733
|
+
:where(.accordion details) {
|
|
1739
1734
|
& > :not(summary) {
|
|
1740
1735
|
display: grid;
|
|
1741
1736
|
grid-template-rows: 0fr;
|
|
@@ -1752,7 +1747,7 @@ tbody {
|
|
|
1752
1747
|
}
|
|
1753
1748
|
}
|
|
1754
1749
|
}
|
|
1755
|
-
`}#
|
|
1750
|
+
`}#de(){return`/* Badge/Pill Styles */
|
|
1756
1751
|
|
|
1757
1752
|
.badge {
|
|
1758
1753
|
display: inline-flex;
|
|
@@ -1792,7 +1787,7 @@ tbody {
|
|
|
1792
1787
|
.badge-lg { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
|
|
1793
1788
|
.pill { padding: var(--spacing-1) var(--spacing-3); border-radius: var(--radius-full); }
|
|
1794
1789
|
|
|
1795
|
-
`}#
|
|
1790
|
+
`}#pe(){let{layout:t={},behavior:e={}}=this.options.design;return`/* ============================================================================
|
|
1796
1791
|
Dialog Primitive
|
|
1797
1792
|
Native <dialog> element with PDS integration
|
|
1798
1793
|
============================================================================ */
|
|
@@ -1978,7 +1973,7 @@ dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc
|
|
|
1978
1973
|
dialog, dialog::backdrop { transition-duration: 0.01s !important; }
|
|
1979
1974
|
}
|
|
1980
1975
|
|
|
1981
|
-
`}#
|
|
1976
|
+
`}#ue(){let{layout:t={}}=this.options.design;return`/* Tab Strip Component */
|
|
1982
1977
|
|
|
1983
1978
|
/* Tab navigation */
|
|
1984
1979
|
|
|
@@ -2075,7 +2070,7 @@ pds-tabstrip {
|
|
|
2075
2070
|
pds-tabstrip > pds-tabpanel[data-tabpanel] { padding: var(--spacing-3) 0; }
|
|
2076
2071
|
}
|
|
2077
2072
|
|
|
2078
|
-
`}#
|
|
2073
|
+
`}#ge(){return`/* Custom Scrollbars */
|
|
2079
2074
|
::-webkit-scrollbar { width: 12px; height: 12px; }
|
|
2080
2075
|
::-webkit-scrollbar-track { background: transparent; }
|
|
2081
2076
|
::-webkit-scrollbar-thumb {
|
|
@@ -2101,7 +2096,7 @@ pds-tabstrip {
|
|
|
2101
2096
|
*:hover { scrollbar-color: var(--color-secondary-400) transparent; }
|
|
2102
2097
|
@media (prefers-color-scheme: dark) { *:hover { scrollbar-color: var(--color-secondary-500) transparent; } }
|
|
2103
2098
|
|
|
2104
|
-
`}#
|
|
2099
|
+
`}#me(){let{a11y:t={}}=this.options.design,e=t.minTouchTarget||u.TouchTargetSizes.standard;return`/* Icon System */
|
|
2105
2100
|
|
|
2106
2101
|
pds-icon {
|
|
2107
2102
|
display: inline-flex;
|
|
@@ -2169,7 +2164,7 @@ button, a {
|
|
|
2169
2164
|
input { padding-left: var(--spacing-4); padding-right: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
|
|
2170
2165
|
}
|
|
2171
2166
|
|
|
2172
|
-
`}#
|
|
2167
|
+
`}#he(){return`/* Dropdown Component */
|
|
2173
2168
|
|
|
2174
2169
|
/* Basic dropdown host */
|
|
2175
2170
|
nav[data-dropdown] {
|
|
@@ -2313,7 +2308,7 @@ nav[data-dropdown] {
|
|
|
2313
2308
|
scale: 0.95;
|
|
2314
2309
|
}
|
|
2315
2310
|
}
|
|
2316
|
-
`}#
|
|
2311
|
+
`}#fe(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},a=t.gridSystem||{},r=a.columns||[1,2,3,4,6],o=a.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=this.#w(t),s=[`
|
|
2317
2312
|
/* ============================================================================
|
|
2318
2313
|
Layout Utilities
|
|
2319
2314
|
Modern grid and flex system for building responsive layouts
|
|
@@ -2334,15 +2329,15 @@ nav[data-dropdown] {
|
|
|
2334
2329
|
gap: var(--spacing-4);
|
|
2335
2330
|
}
|
|
2336
2331
|
|
|
2337
|
-
`];for(let
|
|
2338
|
-
`);
|
|
2332
|
+
`];for(let l of r)s.push(`.grid-cols-${l} { grid-template-columns: repeat(${l}, 1fr); }
|
|
2333
|
+
`);s.push(`
|
|
2339
2334
|
/* Auto-fit grids (responsive) */
|
|
2340
|
-
`);for(let[
|
|
2341
|
-
`);return
|
|
2335
|
+
`);for(let[l,d]of Object.entries(o))s.push(`.grid-auto-${l} { grid-template-columns: repeat(auto-fit, minmax(${d}, 1fr)); }
|
|
2336
|
+
`);return s.push(`
|
|
2342
2337
|
/* Gap utilities */
|
|
2343
2338
|
.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); }
|
|
2344
2339
|
|
|
2345
|
-
`),
|
|
2340
|
+
`),s.push(`
|
|
2346
2341
|
/* Flexbox System */
|
|
2347
2342
|
.flex { display: flex; }
|
|
2348
2343
|
.flex-wrap { flex-wrap: wrap; }
|
|
@@ -2370,7 +2365,7 @@ nav[data-dropdown] {
|
|
|
2370
2365
|
}
|
|
2371
2366
|
|
|
2372
2367
|
/* Max-width utilities */
|
|
2373
|
-
.max-w-sm { max-width:
|
|
2368
|
+
.max-w-sm { max-width: var(--layout-max-width-sm, ${i.sm}); } .max-w-md { max-width: var(--layout-max-width-md, ${i.md}); } .max-w-lg { max-width: var(--layout-max-width-lg, ${i.lg}); } .max-w-xl { max-width: var(--layout-max-width-xl, ${i.xl}); }
|
|
2374
2369
|
|
|
2375
2370
|
/* Stack utilities - vertical rhythm for stacked elements */
|
|
2376
2371
|
[class^="stack-"], [class*=" stack-"] {
|
|
@@ -2419,7 +2414,7 @@ nav[data-dropdown] {
|
|
|
2419
2414
|
.backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
|
|
2420
2415
|
.backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
|
|
2421
2416
|
.backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
|
|
2422
|
-
`),
|
|
2417
|
+
`),s.join("")}#be(){return`/* Media Element Utilities */
|
|
2423
2418
|
|
|
2424
2419
|
/* Gallery images */
|
|
2425
2420
|
.img-gallery {
|
|
@@ -2457,7 +2452,7 @@ nav[data-dropdown] {
|
|
|
2457
2452
|
height: auto;
|
|
2458
2453
|
}
|
|
2459
2454
|
|
|
2460
|
-
`}#
|
|
2455
|
+
`}#ye(){let{layout:t={},a11y:e={}}=this.options.design,a=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=e.minTouchTarget||u.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2461
2456
|
|
|
2462
2457
|
/* Small devices (${a.sm}px and up) */
|
|
2463
2458
|
@media (min-width: ${a.sm}px) {
|
|
@@ -2561,23 +2556,23 @@ nav[data-dropdown] {
|
|
|
2561
2556
|
}
|
|
2562
2557
|
}
|
|
2563
2558
|
|
|
2564
|
-
`}#
|
|
2559
|
+
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,o=Math.max(e,a,r),i=Math.min(e,a,r),s,l,d=(o+i)/2;if(o===i)s=l=0;else{let c=o-i;switch(l=d>.5?c/(2-o-i):c/(o+i),o){case e:s=(a-r)/c+(a<r?6:0);break;case a:s=(r-e)/c+2;break;case r:s=(e-a)/c+4;break}s/=6}return{h:s*360,s:l*100,l:d*100}}#t(t,e,a){t=t/360,e=e/100,a=a/100;let r=(d,c,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(c-d)*6*p:p<1/2?c:p<2/3?d+(c-d)*(2/3-p)*6:d),o,i,s;if(e===0)o=i=s=a;else{let d=a<.5?a*(1+e):a+e-a*e,c=2*a-d;o=r(c,d,t+1/3),i=r(c,d,t),s=r(c,d,t-1/3)}let l=d=>{let c=Math.round(d*255).toString(16);return c.length===1?"0"+c:c};return`#${l(o)}${l(i)}${l(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#ve(){this.#e={tokens:this.#xe(),primitives:this.#we(),components:this.#ke(),utilities:this.#Se()},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`})}#xe(){let{colors:t,spacing:e,radius:a,borderWidths:r,typography:o,shadows:i,layout:s,transitions:l,zIndex:d,icons:c}=this.tokens,p=[`@layer tokens {
|
|
2565
2560
|
:root {
|
|
2566
|
-
${this.#
|
|
2567
|
-
${this.#
|
|
2568
|
-
${this.#
|
|
2569
|
-
${this.#
|
|
2570
|
-
${this.#
|
|
2571
|
-
${this.#
|
|
2572
|
-
${this.#
|
|
2573
|
-
${this.#
|
|
2574
|
-
${this.#
|
|
2575
|
-
${this.#
|
|
2561
|
+
${this.#U(t)}
|
|
2562
|
+
${this.#O(e)}
|
|
2563
|
+
${this.#H(a)}
|
|
2564
|
+
${this.#q(r)}
|
|
2565
|
+
${this.#G(o)}
|
|
2566
|
+
${this.#_(i)}
|
|
2567
|
+
${this.#V(s)}
|
|
2568
|
+
${this.#Q(l)}
|
|
2569
|
+
${this.#Z(d)}
|
|
2570
|
+
${this.#J(c)}
|
|
2576
2571
|
}
|
|
2577
|
-
${this.#
|
|
2578
|
-
}`];return
|
|
2572
|
+
${this.#X(t)}
|
|
2573
|
+
}`];return p.push(`
|
|
2579
2574
|
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2580
|
-
`),
|
|
2575
|
+
`),p.push(this.#Y(t)),p.join("")}#we(){let{advanced:t={},a11y:e={},layout:a={}}=this.options.design,r=t.tabSize||u.TabSizes.standard,o=e.minTouchTarget||u.TouchTargetSizes.standard,i=a.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2581
2576
|
/* Base HTML reset */
|
|
2582
2577
|
*, *::before, *::after {
|
|
2583
2578
|
box-sizing: border-box;
|
|
@@ -2708,7 +2703,7 @@ nav[data-dropdown] {
|
|
|
2708
2703
|
|
|
2709
2704
|
/* Link primitives */
|
|
2710
2705
|
:where(a) {
|
|
2711
|
-
color: var(--color-primary-600);
|
|
2706
|
+
color: var(--color-primary-text, var(--color-primary-600));
|
|
2712
2707
|
text-decoration: underline;
|
|
2713
2708
|
text-underline-offset: 0.2em;
|
|
2714
2709
|
transition: opacity var(--transition-fast);
|
|
@@ -2926,25 +2921,25 @@ nav[data-dropdown] {
|
|
|
2926
2921
|
}
|
|
2927
2922
|
}
|
|
2928
2923
|
|
|
2929
|
-
`}#
|
|
2930
|
-
|
|
2931
|
-
${this.#re()}
|
|
2932
|
-
|
|
2933
|
-
${this.#ae()}
|
|
2924
|
+
`}#ke(){return`@layer components {
|
|
2934
2925
|
|
|
2935
2926
|
${this.#ne()}
|
|
2936
2927
|
|
|
2937
|
-
${this.#
|
|
2928
|
+
${this.#ie()}
|
|
2938
2929
|
|
|
2939
2930
|
${this.#ce()}
|
|
2940
2931
|
|
|
2941
|
-
${this.#
|
|
2932
|
+
${this.#de()}
|
|
2942
2933
|
|
|
2943
|
-
${this.#
|
|
2934
|
+
${this.#pe()}
|
|
2944
2935
|
|
|
2945
2936
|
${this.#le()}
|
|
2946
2937
|
|
|
2947
|
-
${this.#
|
|
2938
|
+
${this.#he()}
|
|
2939
|
+
|
|
2940
|
+
${this.#ue()}
|
|
2941
|
+
|
|
2942
|
+
${this.#se()}
|
|
2948
2943
|
|
|
2949
2944
|
/* Card component */
|
|
2950
2945
|
|
|
@@ -2971,24 +2966,24 @@ ${this.#oe()}
|
|
|
2971
2966
|
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
2972
2967
|
}
|
|
2973
2968
|
|
|
2974
|
-
${this.#
|
|
2969
|
+
${this.#ge()}
|
|
2975
2970
|
|
|
2976
|
-
${this.#
|
|
2971
|
+
${this.#te()}
|
|
2977
2972
|
|
|
2978
2973
|
}
|
|
2979
|
-
`}#
|
|
2974
|
+
`}#Se(){return`@layer utilities {
|
|
2980
2975
|
|
|
2981
|
-
${this.#
|
|
2976
|
+
${this.#me()}
|
|
2982
2977
|
|
|
2983
|
-
${this.#
|
|
2978
|
+
${this.#fe()}
|
|
2984
2979
|
|
|
2985
2980
|
/* Optional utilities/features controlled by config options */
|
|
2986
2981
|
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
2987
2982
|
/* - Liquid glass utility class */
|
|
2988
|
-
${this.#
|
|
2989
|
-
${this.#
|
|
2983
|
+
${this.#re()}
|
|
2984
|
+
${this.#ae()}
|
|
2990
2985
|
|
|
2991
|
-
${this.#
|
|
2986
|
+
${this.#oe()}
|
|
2992
2987
|
|
|
2993
2988
|
/* Surface utilities */
|
|
2994
2989
|
|
|
@@ -3169,22 +3164,22 @@ html[data-theme="dark"] .surface-inverse {
|
|
|
3169
3164
|
}
|
|
3170
3165
|
|
|
3171
3166
|
|
|
3172
|
-
${this.#
|
|
3167
|
+
${this.#be()}
|
|
3173
3168
|
|
|
3174
|
-
${this.#
|
|
3169
|
+
${this.#ye()}
|
|
3175
3170
|
|
|
3176
3171
|
}
|
|
3177
|
-
`}
|
|
3172
|
+
`}#$e(){this.#o={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#ze()}#ze(){this.#o.tokens.replaceSync(this.#e.tokens),this.#o.primitives.replaceSync(this.#e.primitives),this.#o.components.replaceSync(this.#e.components),this.#o.utilities.replaceSync(this.#e.utilities)}get tokensCSS(){return this.#e?.tokens||""}get primitivesCSS(){return this.#e?.primitives||""}get componentsCSS(){return this.#e?.components||""}get utilitiesCSS(){return this.#e?.utilities||""}get layeredCSS(){return this.#e?`${this.#e.tokens}
|
|
3178
3173
|
${this.#e.primitives}
|
|
3179
3174
|
${this.#e.components}
|
|
3180
|
-
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof z<"u"?z:null,enums:typeof
|
|
3175
|
+
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof z<"u"?z:null,enums:typeof u<"u"?u:null},meta:{generatedAt:new Date().toISOString(),totalSize:(this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0),totalSizeKB:(((this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0))/1024).toFixed(2),layerCount:4,tokenGroups:Object.keys(this.tokens).length},helpers:{getColorScales:()=>{let t=[],e=this.tokens.colors;for(let[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&t.push({name:a,scale:r});return t},getColorScale:t=>this.tokens.colors[t]||null,getSpacingValues:()=>Object.entries(this.tokens.spacing).map(([t,e])=>({key:t,value:e})),getTypography:()=>this.tokens.typography,getLayerCSS:t=>{let e=["tokens","primitives","components","utilities"];if(!e.includes(t))throw new Error(`Invalid layer: ${t}. Must be one of ${e.join(", ")}`);return this.#e?.[t]||""},usesEnumValue:(t,e)=>{let a=this.options.design||{};return JSON.stringify(a).includes(e)}}}}get tokensStylesheet(){return this.#o?.tokens}get primitivesStylesheet(){return this.#o?.primitives}get componentsStylesheet(){return this.#o?.components}get utilitiesStylesheet(){return this.#o?.utilities}getCSSModules(){return{"pds-tokens.css.js":this.#c("tokens",this.#e.tokens),"pds-primitives.css.js":this.#c("primitives",this.#e.primitives),"pds-components.css.js":this.#c("components",this.#e.components),"pds-utilities.css.js":this.#c("utilities",this.#e.utilities),"pds-styles.css.js":this.#c("styles",this.layeredCSS)}}#c(t,e){let a=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${t}
|
|
3181
3176
|
// Auto-generated - do not edit directly
|
|
3182
3177
|
|
|
3183
3178
|
export const ${t} = new CSSStyleSheet();
|
|
3184
3179
|
${t}.replaceSync(\`${a}\`);
|
|
3185
3180
|
|
|
3186
3181
|
export const ${t}CSS = \`${a}\`;
|
|
3187
|
-
`}};var Y=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+t+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},X=new Y;function
|
|
3182
|
+
`}};var Y=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+t+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},X=new Y;function Pe(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let a=new CSSStyleSheet;a.replaceSync(n),a._pds=!0;let r=(document.adoptedStyleSheets||[]).filter(o=>o._pds!==!0);document.adoptedStyleSheets=[...r,a];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let a=document.head||document.getElementsByTagName("head")[0];a?a.appendChild(e):document.documentElement.appendChild(e)}e.textContent=n}catch(t){console.warn("installRuntimeStyles failed:",t)}}function K(n){let t=n;if(!t||typeof t!="object"){console.error("[Runtime] applyStyles requires an explicit generator instance in live mode");return}let e=t.layeredCSS||t.css||"";if(!e){t.options?.log?.("warn","[Runtime] No CSS available on generator to apply");return}Pe(e)}async function le(n,t=[],e=null){try{let a=e?.primitivesStylesheet?e.primitivesStylesheet:await X.getStylesheet("primitives");n.adoptedStyleSheets=[a,...t]}catch(a){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt primitives:`,a),n.adoptedStyleSheets=t}}async function de(n,t=["primitives"],e=[],a=null){try{let o=(await Promise.all(t.map(async i=>{if(a)switch(i){case"tokens":return a.tokensStylesheet;case"primitives":return a.primitivesStylesheet;case"components":return a.componentsStylesheet;case"utilities":return a.utilitiesStylesheet;default:break}return X.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...o,...e]}catch(r){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,r),n.adoptedStyleSheets=e}}var Ue=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"button, a[class*='btn-']"}];function Ie(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function Oe(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.querySelector("menu");if(!t)return;let e=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.setAttribute("role",t.getAttribute("role")||"menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let a=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let l=n.getBoundingClientRect(),d=Math.max(0,window.innerHeight-l.bottom);return Math.max(0,l.top)>d?"up":"down"},r=()=>{n.dataset.dropdownDirection=a(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},o=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},i=()=>{t.getAttribute("aria-hidden")==="false"?o():r()};e?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||o()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(o(),e?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&o()})}function He(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let t=n.querySelector('input[type="checkbox"]');if(!t)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let a=document.createElement("span");a.className="toggle-knob",e.appendChild(a),n.insertBefore(e,t.nextSibling);let r=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},o=()=>{t.disabled||(t.checked=!t.checked,r(),t.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),o()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),o())}),t.addEventListener("change",r)}function qe(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),a=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${a}-output`;if(n.id=a,e){let o=t.querySelector("span");if(o&&!o.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=o.textContent,i.appendChild(s);let l=document.createElement("output");l.id=r,l.setAttribute("for",a),l.style.color="var(--surface-text-secondary, var(--color-text-secondary))",l.style.fontSize="0.875rem",l.textContent=n.value,i.appendChild(l),o.textContent="",o.appendChild(i);let d=()=>{l.textContent=n.value};n.addEventListener("input",d)}}else{let o=n.closest(".range-container");o||(o=document.createElement("div"),o.className="range-container",n.parentNode?.insertBefore(o,n),o.appendChild(n)),o.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",a),i.className="range-bubble",i.setAttribute("aria-live","polite"),o.appendChild(i);let s=()=>{let c=parseFloat(n.min)||0,p=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-c)/(p-c);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},l=()=>i.classList.add("visible"),d=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",l),n.addEventListener("pointerup",d),n.addEventListener("pointerleave",d),n.addEventListener("focus",l),n.addEventListener("blur",d),s()}n.dataset.enhancedRange="1"}function Ge(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let a=e.closest("label");if(!a||a.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",a.querySelector("span").appendChild(r);let o=e.closest("form");if(o&&!o.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",o.insertBefore(i,o.querySelector(".form-actions")||o.lastElementChild)}};n.querySelectorAll("[required]").forEach(e=>{t(e)})}function _e(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let e=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(t),t.addEventListener("keydown",a=>{if(a.key==="Enter"||a.key==="Tab"){let r=t.value.trim();if(r){a.preventDefault();let o=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),l=document.createElement("span");l.setAttribute("data-label",""),l.textContent=r;let d=document.createElement("input");d.type=o,d.name=e.name||n.getAttribute("data-name")||"open-group",d.value=r,d.id=i,s.appendChild(l),s.appendChild(d),n.insertBefore(s,t),t.value=""}}else if(a.key==="Backspace"&&t.value===""){a.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Ve(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(r=>{r.forEach(o=>{if(o.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)t||(t=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let l=document.createElement("pds-icon");l.setAttribute("icon","circle-notch"),l.setAttribute("size","sm"),n.insertBefore(l,n.firstChild),e=!0}else o.oldValue?.includes("btn-working")&&s&&(e?(s.remove(),e=!1):t&&(s.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Qe=new Map([[".accordion",Ie],["nav[data-dropdown]",Oe],["label[data-toggle]",He],['input[type="range"]',qe],["form[data-required]",Ge],["fieldset[role=group][data-open]",_e],["button, a[class*='btn-']",Ve]]),pe=Ue.map(n=>({...n,run:Qe.get(n.selector)||(()=>{})}));var ue=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3188
3183
|
<div class="accordion">
|
|
3189
3184
|
<details>
|
|
3190
3185
|
<summary>Section 1</summary>
|
|
@@ -3238,14 +3233,14 @@ export const ${t}CSS = \`${a}\`;
|
|
|
3238
3233
|
<button class="btn-primary btn-working">
|
|
3239
3234
|
<span>Saving</span>
|
|
3240
3235
|
</button>
|
|
3241
|
-
`.trim()}];var me="pds",Ze=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ge=/^[a-z]:/i;function I(n=""){return n.endsWith("/")?n:`${n}/`}function Je(n="",t=me){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function Ye(n){return n.replace(/^\.\/+/,"")}function Xe(n){return ge.test(n)?n.replace(ge,"").replace(/^\/+/,""):n}function Ke(n){return n.startsWith("public/")?n.substring(7):n}function he(n,t={}){let e=t.segment||me,a=t.defaultRoot||`/assets/${e}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return I(a);let o=r.trim();return o?(o=o.replace(/\\/g,"/"),o=Je(o,e),o=I(o),Ze.test(o)?o:(o=Ye(o),o=Xe(o),o.startsWith("/")||(o=Ke(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,s)=>s===0?i:"/")),I(o))):I(a)}function fe(n){let t=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(t.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let o="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let l=r.measureText(o).width;r.font=`${i} "${t}", ${s}`;let d=r.measureText(o).width;return l!==d}function et(n){return n?n.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function tt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:a=!1}=t,r=et(n);if(!r||fe(r))return Promise.resolve();let o=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${o}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,l)=>{let d=document.createElement("link");d.rel="stylesheet";let c=a?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${o}:${c}&display=swap`,d.setAttribute("data-font-loader",r),d.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},d.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),l(new Error(`Failed to load font: ${r}`))},document.head.appendChild(d),setTimeout(()=>{fe(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function be(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(a=>tt(a).catch(r=>{console.warn(`Could not load font: ${a}`,r)}));await Promise.all(e)}var at=/^[a-z][a-z0-9+\-.]*:\/\//i,O=(()=>{try{return import.meta.url}catch{return}})(),V=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Q(n,t={}){if(!n||at.test(n))return n;let{preferModule:e=!0}=t,a=()=>{if(!O)return null;try{return new URL(n,O).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(e?a()||r():r()||a())||n}var xe=(()=>{if(O)try{let n=new URL(O);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",O).href}catch{return}})(),we=!1;function ke(n){we||typeof document>"u"||(we=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function Se(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[a,r]of Object.entries(t))r&&typeof r=="object"&&!Array.isArray(r)?e[a]=Se(e[a]&&typeof e[a]=="object"?e[a]:{},r):e[a]=r;return e}function te(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function H(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(e=>H(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let a=n[e];if(typeof a!="function"){let r=H(a);r!==void 0&&(t[e]=r)}}return t}function $e(n={},t={},{presets:e,defaultLog:a}){let r=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 i=o??t.enhancers??[],s=n&&n.preset,l=n&&n.design,d="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,
|
|
3236
|
+
`.trim()}];var me="pds",Ze=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ge=/^[a-z]:/i;function I(n=""){return n.endsWith("/")?n:`${n}/`}function Je(n="",t=me){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function Ye(n){return n.replace(/^\.\/+/,"")}function Xe(n){return ge.test(n)?n.replace(ge,"").replace(/^\/+/,""):n}function Ke(n){return n.startsWith("public/")?n.substring(7):n}function he(n,t={}){let e=t.segment||me,a=t.defaultRoot||`/assets/${e}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return I(a);let o=r.trim();return o?(o=o.replace(/\\/g,"/"),o=Je(o,e),o=I(o),Ze.test(o)?o:(o=Ye(o),o=Xe(o),o.startsWith("/")||(o=Ke(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,s)=>s===0?i:"/")),I(o))):I(a)}function fe(n){let t=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(t.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let o="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let l=r.measureText(o).width;r.font=`${i} "${t}", ${s}`;let d=r.measureText(o).width;return l!==d}function et(n){return n?n.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function tt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:a=!1}=t,r=et(n);if(!r||fe(r))return Promise.resolve();let o=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${o}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,l)=>{let d=document.createElement("link");d.rel="stylesheet";let c=a?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${o}:${c}&display=swap`,d.setAttribute("data-font-loader",r),d.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},d.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),l(new Error(`Failed to load font: ${r}`))},document.head.appendChild(d),setTimeout(()=>{fe(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function be(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(a=>tt(a).catch(r=>{console.warn(`Could not load font: ${a}`,r)}));await Promise.all(e)}var at=/^[a-z][a-z0-9+\-.]*:\/\//i,O=(()=>{try{return import.meta.url}catch{return}})(),V=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Q(n,t={}){if(!n||at.test(n))return n;let{preferModule:e=!0}=t,a=()=>{if(!O)return null;try{return new URL(n,O).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(e?a()||r():r()||a())||n}var xe=(()=>{if(O)try{let n=new URL(O);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",O).href}catch{return}})(),we=!1;function ke(n){we||typeof document>"u"||(we=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function Se(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[a,r]of Object.entries(t))r&&typeof r=="object"&&!Array.isArray(r)?e[a]=Se(e[a]&&typeof e[a]=="object"?e[a]:{},r):e[a]=r;return e}function te(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function H(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(e=>H(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let a=n[e];if(typeof a!="function"){let r=H(a);r!==void 0&&(t[e]=r)}}return t}function $e(n={},t={},{presets:e,defaultLog:a}){let r=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 i=o??t.enhancers??[],s=n&&n.preset,l=n&&n.design,d="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,p=null;if(d){let g=String(s||"default").toLowerCase(),h=e?.[g]||Object.values(e||{}).find(A=>te(A.name)===g||String(A.name||"").toLowerCase()===g);if(!h)throw new Error(`PDS preset not found: "${s||"default"}"`);p={id:h.id||te(h.name),name:h.name||h.id||String(g)};let v=structuredClone(h);if(l&&typeof l=="object"){let A=H(l);v=Se(v,structuredClone(A))}let{mode:x,autoDefine:m,applyGlobalStyles:w,manageTheme:M,themeStorageKey:k,preloadStyles:L,criticalLayers:R,managerURL:B,manager:j,preset:$,design:S,enhancers:F,log:T,...G}=n;c={...G,design:v,preset:p.name,log:T||a}}else if(r){let{log:g,...h}=n;c={design:structuredClone(h),log:g||a}}else{let g=e?.default||Object.values(e||{}).find(h=>te(h.name)==="default");if(!g)throw new Error("PDS default preset not available");p={id:g.id||"default",name:g.name||"Default"},c={design:structuredClone(g),preset:p.name,log:a}}return{generatorConfig:c,enhancers:i,presetInfo:p}}function ze({manageTheme:n,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:a}){let r="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{e?.(o),a?.(o)}catch{}o?o==="system"?r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r=o:r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:r,storedTheme:o}}function Me(n,{resolvePublicAssetURL:t}){let e=!!(n?.public?.root||n?.static?.root),a=t(n);return!e&&xe&&(a=xe),V(Q(a))}async function Fe(n,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:a=[],autoDefineMapper:r=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=n,l=(()=>{let c=new Map;return(t||[]).forEach(p=>c.set(p.selector,p)),(o||[]).forEach(p=>c.set(p.selector,p)),Array.from(c.values())})(),d=null;if(typeof window<"u"&&typeof document<"u"){let c=null;try{let m=await Promise.resolve().then(()=>(ve(),ye));c=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let p=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:g,...h}=i&&typeof i=="object"?i:{},x={baseURL:e&&V(Q(e,{preferModule:s})),predefine:a,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:l,onError:(m,w)=>{if(typeof m=="string"&&m.startsWith("pds-")){let k=["pds-form","pds-drawer"].includes(m),L=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");k&&L?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
|
|
3242
3237
|
Add this to your HTML <head>:
|
|
3243
3238
|
<script type="importmap">
|
|
3244
3239
|
{ "imports": { "#pds/lit": "./path/to/lit.js" } }
|
|
3245
3240
|
<\/script>
|
|
3246
|
-
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,w)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof r=="function")try{let w=r(m);return w===void 0?
|
|
3247
|
-
`);if(w){let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let k=document.createElement("style");k.setAttribute("data-pds-preload",""),k.textContent=w,document.head.insertBefore(k,document.head.firstChild)}}catch(v){console.warn("PDS preload failed:",v)}},
|
|
3241
|
+
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,w)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof r=="function")try{let w=r(m);return w===void 0?p(m):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),p(m)}return p(m)}};c&&(d=new c(x),a.length>0&&typeof c.define=="function"&&await c.define(...a,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:d,mergedEnhancers:l}}var Te=!1,q=null;async function ot(n,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(Te)return;let[a,r,o,i]=await Promise.all([Promise.resolve().then(()=>(J(),ce)),Promise.resolve().then(()=>(_(),ne)),Promise.resolve().then(()=>(oe(),ae)),Promise.resolve().then(()=>(Le(),Ce))]),s=a?.default||a?.ontology,l=a?.findComponentForElement,d=r?.enums;q=o?.PDSQuery||o?.default||null,n.ontology=s,n.findComponentForElement=l,n.enums=d,n.common=i||{},n.presets=U,n.enhancerMetadata=ue,n.applyStyles=function(c){return K(c||E.instance)},n.adoptLayers=function(c,p,g){return de(c,p,g,E.instance)},n.adoptPrimitives=function(c,p){return le(c,p,E.instance)},n.getGenerator=async function(){return E},n.query=async function(c){if(!q){let g=await Promise.resolve().then(()=>(oe(),ae));q=g?.PDSQuery||g?.default||null}return q?await new q(n).search(c):[]},Object.getOwnPropertyDescriptor(n,"compiled")||Object.defineProperty(n,"compiled",{get(){return n.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1}),n.preloadCritical=function(c,p={}){if(typeof window>"u"||!document.head||!c)return;let{theme:g,layers:h=["tokens"]}=p;try{let v=g||"light";(g==="system"||!g)&&(v=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",v);let x=c.design?{...c,theme:v}:{design:c,theme:v},m=new E(x),w=h.map(M=>{try{return m.css?.[M]||""}catch{return""}}).filter(M=>M.trim()).join(`
|
|
3242
|
+
`);if(w){let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let k=document.createElement("style");k.setAttribute("data-pds-preload",""),k.textContent=w,document.head.insertBefore(k,document.head.firstChild)}}catch(v){console.warn("PDS preload failed:",v)}},Te=!0}async function nt(n,t,{emitReady:e,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(await ot(n,{applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),ke(n),typeof document<"u"&&document.adoptedStyleSheets){let p=`
|
|
3248
3243
|
html { opacity: 0; }
|
|
3249
3244
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3250
|
-
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(
|
|
3251
|
-
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let F=document.createElement("style");F.setAttribute("data-pds-critical",""),F.textContent=$;let
|
|
3245
|
+
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(p),h._pdsFouc=!0,document.adoptedStyleSheets=[h,...document.adoptedStyleSheets]}}catch(g){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",g),!document.head.querySelector("style[data-pds-fouc]")){let v=document.createElement("style");v.setAttribute("data-pds-fouc",""),v.textContent=p,document.head.insertBefore(v,document.head.firstChild)}}}let o=t.applyGlobalStyles??!0,i=t.manageTheme??!0,s=t.themeStorageKey??"pure-ds-theme",l=t.preloadStyles??!1,d=t.criticalLayers??["tokens","primitives"],c=t&&t.autoDefine||null;try{let{resolvedTheme:p}=ze({manageTheme:i,themeStorageKey:s,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),g=$e(t,{},{presets:U,defaultLog:ie}),h=g.enhancers,{log:v,...x}=g.generatorConfig,m=structuredClone(x);m.log=v,i&&(m.theme=p);let w=new E(m);if(m.design?.typography)try{await be(m.design.typography)}catch($){m?.log?.("warn","Failed to load some fonts from Google Fonts:",$)}if(l&&typeof window<"u"&&document.head)try{let $=d.map(S=>{try{return w.css?.[S]||""}catch(F){return m?.log?.("warn",`Failed to generate critical CSS for layer "${S}":`,F),""}}).filter(S=>S.trim()).join(`
|
|
3246
|
+
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let F=document.createElement("style");F.setAttribute("data-pds-critical",""),F.textContent=$;let T=document.head.querySelector('meta[charset], meta[name="viewport"]');T?T.parentNode.insertBefore(F,T.nextSibling):document.head.insertBefore(F,document.head.firstChild)}}catch($){m?.log?.("warn","Failed to preload critical styles:",$)}n.registry.setLiveMode(),g.presetInfo?.name?m?.log?.("log",`PDS live with preset "${g.presetInfo.name}"`):m?.log?.("log","PDS live with custom config"),o&&(await K(E.instance),typeof window<"u"&&setTimeout(()=>{let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let S=document.head.querySelector("style[data-pds-preload]");S&&S.remove();let F=document.getElementById("pds-runtime-stylesheet");F&&F.remove()},100));let M=Me(t,{resolvePublicAssetURL:he}),k;c&&c.baseURL?k=V(Q(c.baseURL,{preferModule:!1})):k=`${M}components/`;let L=null,R=[];try{let $=await Fe({autoDefineBaseURL:k,autoDefinePreload:c&&Array.isArray(c.predefine)&&c.predefine||[],autoDefineMapper:c&&typeof c.mapper=="function"&&c.mapper||null,enhancers:h,autoDefineOverrides:c||null,autoDefinePreferModule:!(c&&c.baseURL)},{baseEnhancers:pe});L=$.autoDefiner,R=$.mergedEnhancers||[]}catch($){m?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",$)}let B=w?.options||m,j=H(t);return n.currentConfig=Object.freeze({mode:"live",...structuredClone(j),design:structuredClone(g.generatorConfig.design),preset:g.generatorConfig.preset,theme:p,enhancers:R}),e({mode:"live",generator:w,config:B,theme:p,autoDefiner:L}),{generator:w,config:B,theme:p,autoDefiner:L}}catch(p){throw n.dispatchEvent(new CustomEvent("pds:error",{detail:{error:p}})),p}}export{nt as startLive};
|