@pure-ds/core 0.6.8 → 0.6.10
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/custom-elements.json +71 -28
- package/dist/types/pds.d.ts +30 -0
- package/dist/types/public/assets/js/pds-manager.d.ts +146 -429
- 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/public/assets/pds/components/pds-form.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts +1 -169
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts +0 -2
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-config.d.ts +1306 -13
- package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers-meta.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-ontology.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +1 -4
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds-manager.d.ts +1 -0
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +2 -2
- package/packages/pds-cli/bin/pds-static.js +16 -1
- package/public/assets/js/app.js +21 -21
- package/public/assets/js/pds-manager.js +291 -161
- package/public/assets/js/pds.js +16 -16
- package/public/assets/pds/components/pds-form.js +124 -27
- package/public/assets/pds/components/pds-live-edit.js +1214 -104
- package/public/assets/pds/components/pds-omnibox.js +10 -18
- package/public/assets/pds/custom-elements.json +71 -28
- package/public/assets/pds/pds-css-complete.json +1 -6
- package/public/assets/pds/pds.css-data.json +5 -35
- package/src/js/pds-core/pds-config.js +822 -31
- package/src/js/pds-core/pds-enhancers-meta.js +11 -0
- package/src/js/pds-core/pds-enhancers.js +113 -5
- package/src/js/pds-core/pds-generator.js +183 -23
- package/src/js/pds-core/pds-live.js +177 -2
- package/src/js/pds-core/pds-ontology.js +6 -0
- package/src/js/pds-core/pds-start-helpers.js +14 -6
- package/src/js/pds.d.ts +30 -0
- package/src/js/pds.js +36 -60
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var qe=Object.defineProperty;var D=(a,t)=>()=>(a&&(t=a(a=0)),t);var U=(a,t)=>{for(var e in t)qe(a,e,{get:t[e],enumerable:!0})};var xe={};U(xe,{enums:()=>g});var g,G=D(()=>{g={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var $e={};U($e,{default:()=>Xe,findComponentForElement:()=>Je,getAllSelectors:()=>Qe,getAllTags:()=>Ke,getByCategory:()=>Ze,ontology:()=>M,searchOntology:()=>Ye});function j(a,t){if(!a||!t)return!1;try{return a.matches(t)}catch{return!1}}function Se(a,t){if(!a||!t||!a.closest)return null;try{return a.closest(t)}catch{return null}}function Je(a,{maxDepth:t=5}={}){if(!a||a.closest&&a.closest(".showcase-toc"))return null;let e=a,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let n of PDS.ontology.enhancements){let i=n.selector||n;if(j(e,i))return{element:e,componentType:"enhanced-component",displayName:n.description||i,id:n.id}}if(e.tagName==="FIELDSET"){let n=e.getAttribute("role");if(n==="group"||n==="radiogroup")return{element:e,componentType:"form-group",displayName:n==="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 o=e.closest?e.closest("label"):null;if(o&&o.querySelector&&o.querySelector("input,select,textarea"))return{element:o,componentType:"form-control",displayName:"label with input"};for(let n of PDS.ontology.primitives){for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let u=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(p=>p.startsWith(u)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let d=e.parentElement,l=0;for(;d&&l<t;){if(d.classList&&Array.from(d.classList).some(p=>p.startsWith(u))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};d=d.parentElement,l++}continue}continue}if(j(e,s))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let c=Se(e,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.classList){let i=Array.from(e.classList);for(let s of n.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(i.some(u=>u.startsWith(c)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}}}for(let n of PDS.ontology.layoutPatterns||[])for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let u=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(d=>d.startsWith(u)))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}continue}if(j(e,s))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags};let c=Se(e,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.tagName&&e.tagName.includes("-")){let n=e.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(n));return{element:e,componentType:"web-component",displayName:i?.name||n,id:i?.id||n,tags:i?.tags}}if(e.tagName==="BUTTON"){let n=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:n?"button with icon":"button",id:"button"}}if(j(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let n=j(e,"pds-icon")?e:e.closest("pds-icon");return{element:n,componentType:"icon",displayName:`pds-icon (${n.getAttribute&&n.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(j(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:j(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function Qe(){let a=[];for(let t of PDS.ontology.primitives)a.push(...t.selectors||[]);for(let t of PDS.ontology.components)a.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])a.push(...t.selectors||[]);return Array.from(new Set(a))}function Ye(a,t={}){let e=a.toLowerCase(),r=[],o=(n,i)=>{for(let s of n)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(u=>u.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(u=>u.toLowerCase().includes(e)))&&r.push({...s,type:i})};return(!t.type||t.type==="primitive")&&o(M.primitives,"primitive"),(!t.type||t.type==="component")&&o(M.components,"component"),(!t.type||t.type==="layout")&&o(M.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&o(M.enhancements,"enhancement"),r}function Ze(a){let t=a.toLowerCase();return{primitives:M.primitives.filter(e=>e.category===t),components:M.components.filter(e=>e.category===t),layouts:M.layoutPatterns.filter(e=>e.category===t)}}function Ke(){let a=new Set;return M.primitives.forEach(t=>t.tags?.forEach(e=>a.add(e))),M.components.forEach(t=>t.tags?.forEach(e=>a.add(e))),M.layoutPatterns.forEach(t=>t.tags?.forEach(e=>a.add(e))),M.enhancements.forEach(t=>t.tags?.forEach(e=>a.add(e))),Array.from(a).sort()}var M,Xe,ae=D(()=>{M={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:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],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-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{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-live-edit",name:"Live Edit",description:"Contextual live editing for PDS design settings",selectors:["pds-live-edit"],tags:["editor","live","config","tooling"],category:"tooling"},{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:["callout","badge","empty-state"],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"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},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"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],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","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","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"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],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"]}};Xe=M});var Re={};U(Re,{AutoDefiner:()=>ce});async function yt(...a){let t={};a.length&&typeof a[a.length-1]=="object"&&(t=a.pop()||{});let e=a,{baseURL:r,mapper:o=u=>`${u}.js`,onError:n=(u,d)=>console.error(`[defineWebComponents] ${u}:`,d)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(d,l,p)=>p.toUpperCase()),c=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let d=o(u),p=await import(d instanceof URL?d.href:new URL(d,i).href),m=p?.default??p?.[s(u)];if(!m){if(customElements.get(u))return{tag:u,status:"self-defined"};throw new Error(`No export found for ${u}. Expected default export or named export "${s(u)}".`)}return customElements.get(u)?{tag:u,status:"race-already-defined"}:(customElements.define(u,m),{tag:u,status:"defined"})}catch(d){throw n(u,d),d}};return Promise.all(e.map(c))}var ce,We=D(()=>{ce=class{constructor(t={}){let{baseURL:e,mapper:r,onError:o,predicate:n=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:c=!0,debounceMs:u=16,observeShadows:d=!0,enhancers:l=[],patchAttachShadow:p=!0}=t,m=new Set,f=new Set,b=new Set,h=new Map,y=new WeakMap,S=new WeakMap,$=0,L=!1,R=null,F=v=>{if(!v||!l.length)return;let x=S.get(v);x||(x=new Set,S.set(v,x));for(let w of l)if(!(!w.selector||!w.run)&&!x.has(w.selector))try{v.matches&&v.matches(w.selector)&&(w.run(v),x.add(w.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${w.selector}":`,C)}},A=(v,x)=>{if(!L&&!(!v||!v.includes("-"))&&!customElements.get(v)&&!f.has(v)&&!b.has(v)){if(x&&x.getAttribute){let w=x.getAttribute(i);w&&!h.has(v)&&h.set(v,w)}m.add(v),k()}},k=()=>{$||($=setTimeout(W,u))},z=v=>{if(v){if(v.nodeType===1){let x=v,w=x.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&n(w,x)&&A(w,x),F(x),d&&x.shadowRoot&&E(x.shadowRoot)}v.querySelectorAll&&v.querySelectorAll("*").forEach(x=>{let w=x.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&n(w,x)&&A(w,x),F(x),d&&x.shadowRoot&&E(x.shadowRoot)})}},E=v=>{if(!v||y.has(v))return;z(v);let x=new MutationObserver(w=>{for(let C of w)C.addedNodes?.forEach(N=>{z(N)}),C.type==="attributes"&&C.target&&z(C.target)});x.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(w=>w.selector).filter(w=>w.startsWith("data-"))]}),y.set(v,x)};async function W(){if(clearTimeout($),$=0,!m.size)return;let v=Array.from(m);m.clear(),v.forEach(x=>f.add(x));try{let x=w=>h.get(w)??(r?r(w):`${w}.js`);await yt(...v,{baseURL:e,mapper:x,onError:(w,C)=>{b.add(w),o?.(w,C)}})}catch{}finally{v.forEach(x=>f.delete(x))}}let K=s===document?document.documentElement:s,q=new MutationObserver(v=>{for(let x of v)x.addedNodes?.forEach(w=>{z(w)}),x.type==="attributes"&&x.target&&z(x.target)});if(q.observe(K,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),d&&p&&Element.prototype.attachShadow){let v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(w){let C=v.call(this,w);if(w&&w.mode==="open"){E(C);let N=this.tagName?.toLowerCase();N&&N.includes("-")&&!customElements.get(N)&&A(N,this)}return C},R=()=>Element.prototype.attachShadow=v}return c&&z(K),{stop(){L=!0,q.disconnect(),R&&R(),$&&(clearTimeout($),$=0),y.forEach(v=>v.disconnect())},flush:W}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:o,mapper:n=d=>`${d}.js`,onError:i=(d,l)=>console.error(`[defineWebComponents] ${d}:`,l)}=e,s=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(l,p,m)=>m.toUpperCase()),u=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let l=n(d),m=await import(l instanceof URL?l.href:new URL(l,s).href),f=m?.default??m?.[c(d)];if(!f){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,f),{tag:d,status:"defined"})}catch(l){throw i(d,l),l}};return Promise.all(r.map(u))}}});var be={};U(be,{PDSQuery:()=>fe});var fe,ye=D(()=>{fe=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","callout","message","alert"]},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(),r=this.tokenize(e),o=this.analyzeQuery(r,e),n=[];o.intents.has("color")&&n.push(...this.queryColors(o,e)),(o.intents.has("utility")||o.intents.has("border")||o.intents.has("layout")||e.includes("class"))&&n.push(...this.queryUtilities(o,e)),(o.intents.has("component")||o.entities.size>0)&&n.push(...this.queryComponents(o,e)),(o.intents.has("layout")||o.intents.has("pattern"))&&n.push(...this.queryPatterns(o,e)),o.intents.has("typography")&&n.push(...this.queryTypography(o,e)),o.intents.has("spacing")&&n.push(...this.querySpacing(o,e));let i=new Map;for(let s of n){let c=s.value;(!i.has(c)||i.get(c).score<s.score)&&i.set(c,s)}return Array.from(i.values()).sort((s,c)=>c.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(o=>t.includes(o));for(let[o,n]of Object.entries(this.intents))n.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(o);for(let[o,n]of Object.entries(this.entities))n.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(o);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],o=this.pds.compiled;if(!o?.tokens?.colors)return r;let n=o.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.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"))&&(r.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"}),r.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 c=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let u of[500,600,700]){let d=`--color-${c}-${u}`;r.push({text:`${c.charAt(0).toUpperCase()+c.slice(1)} ${u}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(u-500)/100,cssVar:`var(${d})`,description:`${c} color scale shade ${u}`})}}if(i.includes("button")&&t.intents.has("color")){let c=s[0];c?r.push({text:`Button ${c} fill: var(--primary-fill-${c})`,value:`--primary-fill-${c}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${c} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],o=this.pds.ontology;if(!o?.utilities)return r;let n=o.utilities,i=[];for(let s of Object.values(n))if(typeof s=="object")for(let c of Object.values(s))Array.isArray(c)&&i.push(...c);return t.intents.has("border")&&i.filter(c=>c.includes("border")||c.includes("outline")).forEach(c=>{let u=80;e.includes("gradient")&&c.includes("gradient")&&(u=95),e.includes("glow")&&c.includes("glow")&&(u=95),r.push({text:`${c} - Border utility class`,value:c,icon:"code",category:"Utility Class",score:u,code:`<div class="${c}">...</div>`,description:this.describeUtility(c)})}),t.intents.has("layout")&&i.filter(c=>c.includes("flex")||c.includes("grid")||c.includes("items-")||c.includes("justify-")||c.includes("gap-")).forEach(c=>{r.push({text:`${c} - Layout utility`,value:c,icon:"layout",category:"Utility Class",score:85,code:`<div class="${c}">...</div>`,description:this.describeUtility(c)})}),e.includes("group")&&t.entities.has("button")&&r.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
1
|
+
var ct=Object.defineProperty;var _=(o,t)=>()=>(o&&(t=o(o=0)),t);var H=(o,t)=>{for(var e in t)ct(o,e,{get:t[e],enumerable:!0})};var Me={};H(Me,{enums:()=>g});var g,X=_(()=>{g={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var Ne={};H(Ne,{default:()=>xt,findComponentForElement:()=>ht,getAllSelectors:()=>ft,getAllTags:()=>vt,getByCategory:()=>yt,ontology:()=>L,searchOntology:()=>bt});function N(o,t){if(!o||!t)return!1;try{return o.matches(t)}catch{return!1}}function Ie(o,t){if(!o||!t||!o.closest)return null;try{return o.closest(t)}catch{return null}}function ht(o,{maxDepth:t=5}={}){if(!o||o.closest&&o.closest(".showcase-toc"))return null;let e=o,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let n of PDS.ontology.enhancements){let i=n.selector||n;if(N(e,i))return{element:e,componentType:"enhanced-component",displayName:n.description||i,id:n.id}}if(e.tagName==="FIELDSET"){let n=e.getAttribute("role");if(n==="group"||n==="radiogroup")return{element:e,componentType:"form-group",displayName:n==="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 a=e.closest?e.closest("label"):null;if(a&&a.querySelector&&a.querySelector("input,select,textarea"))return{element:a,componentType:"form-control",displayName:"label with input"};for(let n of PDS.ontology.primitives){for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(u=>u.startsWith(c)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let d=e.parentElement,l=0;for(;d&&l<t;){if(d.classList&&Array.from(d.classList).some(u=>u.startsWith(c))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};d=d.parentElement,l++}continue}continue}if(N(e,s))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let p=Ie(e,s);if(p&&p.tagName!=="DS-SHOWCASE")return{element:p,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.classList){let i=Array.from(e.classList);for(let s of n.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let p=s.slice(1).replace(/\*/g,"");if(i.some(c=>c.startsWith(p)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}}}for(let n of PDS.ontology.layoutPatterns||[])for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(d=>d.startsWith(c)))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}continue}if(N(e,s))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags};let p=Ie(e,s);if(p&&p.tagName!=="DS-SHOWCASE")return{element:p,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.tagName&&e.tagName.includes("-")){let n=e.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(n));return{element:e,componentType:"web-component",displayName:i?.name||n,id:i?.id||n,tags:i?.tags}}if(e.tagName==="BUTTON"){let n=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:n?"button with icon":"button",id:"button"}}if(N(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let n=N(e,"pds-icon")?e:e.closest("pds-icon");return{element:n,componentType:"icon",displayName:`pds-icon (${n.getAttribute&&n.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(N(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:N(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function ft(){let o=[];for(let t of PDS.ontology.primitives)o.push(...t.selectors||[]);for(let t of PDS.ontology.components)o.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])o.push(...t.selectors||[]);return Array.from(new Set(o))}function bt(o,t={}){let e=o.toLowerCase(),r=[],a=(n,i)=>{for(let s of n)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(c=>c.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(c=>c.toLowerCase().includes(e)))&&r.push({...s,type:i})};return(!t.type||t.type==="primitive")&&a(L.primitives,"primitive"),(!t.type||t.type==="component")&&a(L.components,"component"),(!t.type||t.type==="layout")&&a(L.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&a(L.enhancements,"enhancement"),r}function yt(o){let t=o.toLowerCase();return{primitives:L.primitives.filter(e=>e.category===t),components:L.components.filter(e=>e.category===t),layouts:L.layoutPatterns.filter(e=>e.category===t)}}function vt(){let o=new Set;return L.primitives.forEach(t=>t.tags?.forEach(e=>o.add(e))),L.components.forEach(t=>t.tags?.forEach(e=>o.add(e))),L.layoutPatterns.forEach(t=>t.tags?.forEach(e=>o.add(e))),L.enhancements.forEach(t=>t.tags?.forEach(e=>o.add(e))),Array.from(o).sort()}var L,xt,pe=_(()=>{L={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:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],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-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{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-live-edit",name:"Live Edit",description:"Contextual live editing for PDS design settings",selectors:["pds-live-edit"],tags:["editor","live","config","tooling"],category:"tooling"},{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:"color-input",selector:"label[data-color]",description:"Enhanced color input with swatch shell and hex output",tags:["color","input","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:["callout","badge","empty-state"],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"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},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"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],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","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","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"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],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"]}};xt=L});var Qe={};H(Qe,{AutoDefiner:()=>he});async function Nt(...o){let t={};o.length&&typeof o[o.length-1]=="object"&&(t=o.pop()||{});let e=o,{baseURL:r,mapper:a=c=>`${c}.js`,onError:n=(c,d)=>console.error(`[defineWebComponents] ${c}:`,d)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(d,l,u)=>u.toUpperCase()),p=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let d=a(c),u=await import(d instanceof URL?d.href:new URL(d,i).href),h=u?.default??u?.[s(c)];if(!h){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${s(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,h),{tag:c,status:"defined"})}catch(d){throw n(c,d),d}};return Promise.all(e.map(p))}var he,Ze=_(()=>{he=class{constructor(t={}){let{baseURL:e,mapper:r,onError:a,predicate:n=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:p=!0,debounceMs:c=16,observeShadows:d=!0,enhancers:l=[],patchAttachShadow:u=!0}=t,h=new Set,f=new Set,y=new Set,m=new Map,b=new WeakMap,S=new WeakMap,v=0,M=!1,C=null,$=x=>{if(!x||!l.length)return;let k=S.get(x);k||(k=new Set,S.set(x,k));for(let w of l)if(!(!w.selector||!w.run)&&!k.has(w.selector))try{x.matches&&x.matches(w.selector)&&(w.run(x),k.add(w.selector))}catch(A){console.warn(`[AutoDefiner] Error applying enhancer for selector "${w.selector}":`,A)}},T=(x,k)=>{if(!M&&!(!x||!x.includes("-"))&&!customElements.get(x)&&!f.has(x)&&!y.has(x)){if(k&&k.getAttribute){let w=k.getAttribute(i);w&&!m.has(x)&&m.set(x,w)}h.add(x),z()}},z=()=>{v||(v=setTimeout(W,c))},E=x=>{if(x){if(x.nodeType===1){let k=x,w=k.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&n(w,k)&&T(w,k),$(k),d&&k.shadowRoot&&F(k.shadowRoot)}x.querySelectorAll&&x.querySelectorAll("*").forEach(k=>{let w=k.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&n(w,k)&&T(w,k),$(k),d&&k.shadowRoot&&F(k.shadowRoot)})}},F=x=>{if(!x||b.has(x))return;E(x);let k=new MutationObserver(w=>{for(let A of w)A.addedNodes?.forEach(I=>{E(I)}),A.type==="attributes"&&A.target&&E(A.target)});k.observe(x,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(w=>w.selector).filter(w=>w.startsWith("data-"))]}),b.set(x,k)};async function W(){if(clearTimeout(v),v=0,!h.size)return;let x=Array.from(h);h.clear(),x.forEach(k=>f.add(k));try{let k=w=>m.get(w)??(r?r(w):`${w}.js`);await Nt(...x,{baseURL:e,mapper:k,onError:(w,A)=>{y.add(w),a?.(w,A)}})}catch{}finally{x.forEach(k=>f.delete(k))}}let O=s===document?document.documentElement:s,B=new MutationObserver(x=>{for(let k of x)k.addedNodes?.forEach(w=>{E(w)}),k.type==="attributes"&&k.target&&E(k.target)});if(B.observe(O,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(x=>x.selector).filter(x=>x.startsWith("data-"))]}),d&&u&&Element.prototype.attachShadow){let x=Element.prototype.attachShadow;Element.prototype.attachShadow=function(w){let A=x.call(this,w);if(w&&w.mode==="open"){F(A);let I=this.tagName?.toLowerCase();I&&I.includes("-")&&!customElements.get(I)&&T(I,this)}return A},C=()=>Element.prototype.attachShadow=x}return p&&E(O),{stop(){M=!0,B.disconnect(),C&&C(),v&&(clearTimeout(v),v=0),b.forEach(x=>x.disconnect())},flush:W}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:a,mapper:n=d=>`${d}.js`,onError:i=(d,l)=>console.error(`[defineWebComponents] ${d}:`,l)}=e,s=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),p=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(l,u,h)=>h.toUpperCase()),c=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let l=n(d),h=await import(l instanceof URL?l.href:new URL(l,s).href),f=h?.default??h?.[p(d)];if(!f){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${p(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,f),{tag:d,status:"defined"})}catch(l){throw i(d,l),l}};return Promise.all(r.map(c))}}});var Se={};H(Se,{PDSQuery:()=>ke});var ke,$e=_(()=>{ke=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","callout","message","alert"]},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(),r=this.tokenize(e),a=this.analyzeQuery(r,e),n=[];a.intents.has("color")&&n.push(...this.queryColors(a,e)),(a.intents.has("utility")||a.intents.has("border")||a.intents.has("layout")||e.includes("class"))&&n.push(...this.queryUtilities(a,e)),(a.intents.has("component")||a.entities.size>0)&&n.push(...this.queryComponents(a,e)),(a.intents.has("layout")||a.intents.has("pattern"))&&n.push(...this.queryPatterns(a,e)),a.intents.has("typography")&&n.push(...this.queryTypography(a,e)),a.intents.has("spacing")&&n.push(...this.querySpacing(a,e));let i=new Map;for(let s of n){let p=s.value;(!i.has(p)||i.get(p).score<s.score)&&i.set(p,s)}return Array.from(i.values()).sort((s,p)=>p.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(a=>t.includes(a));for(let[a,n]of Object.entries(this.intents))n.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(a);for(let[a,n]of Object.entries(this.entities))n.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(a);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.colors)return r;let n=a.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.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"))&&(r.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"}),r.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 p=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let c of[500,600,700]){let d=`--color-${p}-${c}`;r.push({text:`${p.charAt(0).toUpperCase()+p.slice(1)} ${c}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(c-500)/100,cssVar:`var(${d})`,description:`${p} color scale shade ${c}`})}}if(i.includes("button")&&t.intents.has("color")){let p=s[0];p?r.push({text:`Button ${p} fill: var(--primary-fill-${p})`,value:`--primary-fill-${p}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${p} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],a=this.pds.ontology;if(!a?.utilities)return r;let n=a.utilities,i=[];for(let s of Object.values(n))if(typeof s=="object")for(let p of Object.values(s))Array.isArray(p)&&i.push(...p);return t.intents.has("border")&&i.filter(p=>p.includes("border")||p.includes("outline")).forEach(p=>{let c=80;e.includes("gradient")&&p.includes("gradient")&&(c=95),e.includes("glow")&&p.includes("glow")&&(c=95),r.push({text:`${p} - Border utility class`,value:p,icon:"code",category:"Utility Class",score:c,code:`<div class="${p}">...</div>`,description:this.describeUtility(p)})}),t.intents.has("layout")&&i.filter(p=>p.includes("flex")||p.includes("grid")||p.includes("items-")||p.includes("justify-")||p.includes("gap-")).forEach(p=>{r.push({text:`${p} - Layout utility`,value:p,icon:"layout",category:"Utility Class",score:85,code:`<div class="${p}">...</div>`,description:this.describeUtility(p)})}),e.includes("group")&&t.entities.has("button")&&r.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
|
-
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],
|
|
4
|
+
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],a=this.pds.ontology;return!a?.components&&!a?.primitives||(a.components&&a.components.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id);i>50&&r.push({text:`<${n.id}> - ${n.name}`,value:n.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${n.id}></${n.id}>`,description:n.description||`${n.name} web component`})}),a.primitives&&a.primitives.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id);if(i>50){let s=n.selectors?.[0]||n.id;r.push({text:`${s} - ${n.name}`,value:n.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(n),description:n.description||`${n.name} primitive element`})}}),e.includes("icon")&&(e.includes("only")||e.includes("button"))&&r.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">
|
|
5
5
|
<pds-icon icon="heart"></pds-icon>
|
|
6
|
-
</button>`,description:"Button with only an icon, no text label"})),r}queryPatterns(t,e){let r=[],
|
|
6
|
+
</button>`,description:"Button with only an icon, no text label"})),r}queryPatterns(t,e){let r=[],a=this.pds.ontology;return a?.layoutPatterns&&(a.layoutPatterns.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id+" "+(n.description||""));if(i>50){let s=n.selectors?.[0]||`.${n.id}`;r.push({text:`${n.name} - ${n.description||"Layout pattern"}`,value:n.id,icon:"layout",category:"Layout Pattern",score:i,code:`<div class="${s.replace(".","")}">
|
|
7
7
|
<!-- content -->
|
|
8
8
|
</div>`,description:n.description||n.name})}}),(e.includes("container")||e.includes("group"))&&(r.push({text:"Card - Container for grouping content",value:"card",icon:"layout",category:"Primitive",score:88,code:`<article class="card">
|
|
9
9
|
<header>
|
|
@@ -13,20 +13,20 @@ var qe=Object.defineProperty;var D=(a,t)=>()=>(a&&(t=a(a=0)),t);var U=(a,t)=>{fo
|
|
|
13
13
|
</article>`,description:"Card container with optional header, body, and footer"}),r.push({text:"Section - Semantic container for grouping",value:"section",icon:"layout",category:"Pattern",score:85,code:`<section>
|
|
14
14
|
<h2>Section Title</h2>
|
|
15
15
|
<!-- content -->
|
|
16
|
-
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],
|
|
16
|
+
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.typography)return r;let n=a.tokens.typography;return(e.includes("heading")||e.includes("title"))&&r.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"))&&r.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"}),r}querySpacing(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.spacing)return r;let n=a.tokens.spacing;for(let[i,s]of Object.entries(n))["2","4","6","8"].includes(i)&&r.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 r}scoreMatch(t,e){let r=t.toLowerCase(),a=e.toLowerCase(),n=0;if(r===a)return 100;a.includes(r)&&(n+=80);let i=this.tokenize(r),s=this.tokenize(a),p=i.filter(c=>s.includes(c)).length;return n+=p/i.length*40,a.startsWith(r)&&(n+=20),Math.min(100,n)}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 Ie={};U(Ie,{deepMerge:()=>Ue,fragmentFromTemplateLike:()=>wt,isObject:()=>Z,parseHTML:()=>kt});function Z(a){return a&&typeof a=="object"&&!Array.isArray(a)}function Ue(a,t){let e={...a};return Z(a)&&Z(t)&&Object.keys(t).forEach(r=>{Z(t[r])?r in a?e[r]=Ue(a[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function wt(a){let t=Array.isArray(a?.strings)?a.strings:[],e=Array.isArray(a?.values)?a.values:[],r=new Set,o=[],n=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<t.length;l+=1){let p=t[l]??"",m=p.match(n);if(m&&l<e.length){let b=m[2].slice(1),h=`pds-val-${l}`;p=p.replace(n,`$1data-pds-prop="${b}:${h}"`),r.add(l)}o.push(p),l<e.length&&!r.has(l)&&o.push(`<!--pds-val-${l}-->`)}let i=document.createElement("template");i.innerHTML=o.join("");let s=(l,p)=>{let m=l.parentNode;if(!m)return;if(p==null){m.removeChild(l);return}let f=b=>{if(b!=null){if(b instanceof Node){m.insertBefore(b,l);return}if(Array.isArray(b)){b.forEach(h=>f(h));return}m.insertBefore(document.createTextNode(String(b)),l)}};f(p),m.removeChild(l)},c=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),u=[];for(;c.nextNode();){let l=c.currentNode;l?.nodeValue?.startsWith("pds-val-")&&u.push(l)}return u.forEach(l=>{let p=Number(l.nodeValue.replace("pds-val-",""));s(l,e[p])}),i.content.querySelectorAll("*").forEach(l=>{let p=l.getAttribute("data-pds-prop");if(!p)return;let[m,f]=p.split(":"),b=Number(String(f).replace("pds-val-",""));m&&Number.isInteger(b)&&(l[m]=e[b]),l.removeAttribute("data-pds-prop")}),i.content}function kt(a){return new DOMParser().parseFromString(a,"text/html").body.childNodes}var He=D(()=>{});G();var P="any",te={type:"object",allowUnknown:!1,properties:{id:{type:"string"},name:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},options:{type:"object",allowUnknown:!0},form:{type:"object",allowUnknown:!0},colors:{type:"object",allowUnknown:!1,properties:{primary:{type:"string",relations:{tokens:["--color-primary-*","--color-primary-fill","--color-primary-text","--background-mesh-*"]}},secondary:{type:"string",relations:{tokens:["--color-secondary-*","--color-gray-*","--background-mesh-*"]}},accent:{type:"string",relations:{tokens:["--color-accent-*","--background-mesh-*"]}},background:{type:"string",relations:{tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},success:{type:["string","null"],relations:{tokens:["--color-success-*"]}},warning:{type:["string","null"],relations:{tokens:["--color-warning-*"]}},danger:{type:["string","null"],relations:{tokens:["--color-danger-*"]}},info:{type:["string","null"],relations:{tokens:["--color-info-*"]}},gradientStops:{type:"number"},elevationOpacity:{type:"number",relations:{tokens:["--surface-*-shadow"]}},darkMode:{type:"object",allowUnknown:!0,properties:{background:{type:"string",relations:{theme:"dark",tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},primary:{type:"string",relations:{theme:"dark",tokens:["--color-primary-*","--color-primary-fill","--color-primary-text"]}},secondary:{type:"string",relations:{theme:"dark",tokens:["--color-secondary-*","--color-gray-*"]}},accent:{type:"string",relations:{theme:"dark",tokens:["--color-accent-*"]}}}}}},typography:{type:"object",allowUnknown:!1,properties:{fontFamilyHeadings:{type:"string",relations:{tokens:["--font-family-headings"]}},fontFamilyBody:{type:"string",relations:{tokens:["--font-family-body"]}},fontFamilyMono:{type:"string",relations:{tokens:["--font-family-mono"]}},baseFontSize:{type:"number",relations:{tokens:["--font-size-*"]}},fontScale:{type:"number",relations:{tokens:["--font-size-*"]}},fontWeightLight:{type:["string","number"],relations:{tokens:["--font-weight-light"]}},fontWeightNormal:{type:["string","number"],relations:{tokens:["--font-weight-normal"]}},fontWeightMedium:{type:["string","number"],relations:{tokens:["--font-weight-medium"]}},fontWeightSemibold:{type:["string","number"],relations:{tokens:["--font-weight-semibold"]}},fontWeightBold:{type:["string","number"],relations:{tokens:["--font-weight-bold"]}},lineHeightTight:{type:["string","number"],relations:{tokens:["--font-line-height-tight"]}},lineHeightNormal:{type:["string","number"],relations:{tokens:["--font-line-height-normal"]}},lineHeightRelaxed:{type:["string","number"],relations:{tokens:["--font-line-height-relaxed"]}},letterSpacingTight:{type:"number"},letterSpacingNormal:{type:"number"},letterSpacingWide:{type:"number"}}},spatialRhythm:{type:"object",allowUnknown:!1,properties:{baseUnit:{type:"number",relations:{tokens:["--spacing-*"]}},scaleRatio:{type:"number"},maxSpacingSteps:{type:"number",relations:{tokens:["--spacing-*"]}},containerMaxWidth:{type:["number","string"]},containerPadding:{type:"number"},inputPadding:{type:"number",relations:{rules:[{selectors:["input","textarea","select"],properties:["padding"]}]}},buttonPadding:{type:"number",relations:{rules:[{selectors:["button",".btn"],properties:["padding"]}]}},sectionSpacing:{type:"number",relations:{rules:[{selectors:["section"],properties:["margin","padding"]}]}}}},shape:{type:"object",allowUnknown:!1,properties:{radiusSize:{type:["string","number"],relations:{tokens:["--radius-*"]}},customRadius:{type:["string","number","null"]},borderWidth:{type:["string","number"],relations:{tokens:["--border-width-*"]}}}},behavior:{type:"object",allowUnknown:!1,properties:{transitionSpeed:{type:["string","number"],relations:{tokens:["--transition-*"]}},animationEasing:{type:"string"},customTransitionSpeed:{type:["number","null"]},customEasing:{type:["string","null"]},focusRingWidth:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["outline-width","box-shadow"]}]}},focusRingOpacity:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["box-shadow","outline-color"]}]}},hoverOpacity:{type:"number"}}},layout:{type:"object",allowUnknown:!1,properties:{maxWidth:{type:["number","string"],relations:{tokens:["--layout-max-width","--layout-max-width-*"]}},maxWidths:{type:"object",allowUnknown:!1,properties:{sm:{type:["number","string"],relations:{tokens:["--layout-max-width-sm"]}},md:{type:["number","string"],relations:{tokens:["--layout-max-width-md"]}},lg:{type:["number","string"],relations:{tokens:["--layout-max-width-lg"]}},xl:{type:["number","string"],relations:{tokens:["--layout-max-width-xl"]}}}},containerPadding:{type:["number","string"],relations:{tokens:["--layout-container-padding"]}},breakpoints:{type:"object",allowUnknown:!1,properties:{sm:{type:"number"},md:{type:"number"},lg:{type:"number"},xl:{type:"number"}}},gridColumns:{type:"number"},gridGutter:{type:"number"},densityCompact:{type:"number"},densityNormal:{type:"number"},densityComfortable:{type:"number"},buttonMinHeight:{type:"number"},inputMinHeight:{type:"number"},baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}},utilities:{type:"object",allowUnknown:!0},gridSystem:{type:"object",allowUnknown:!0},containerMaxWidth:{type:["number","string"]}}},layers:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},shadowBlurMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowOffsetMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowDepth:{type:"string"},blurLight:{type:"number"},blurMedium:{type:"number"},blurHeavy:{type:"number"},baseZIndex:{type:"number",relations:{tokens:["--z-*"]}},zIndexStep:{type:"number",relations:{tokens:["--z-*"]}},zIndexBase:{type:"number"},zIndexDropdown:{type:"number"},zIndexSticky:{type:"number"},zIndexFixed:{type:"number"},zIndexModal:{type:"number"},zIndexPopover:{type:"number"},zIndexTooltip:{type:"number"},zIndexNotification:{type:"number"},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}}}},advanced:{type:"object",allowUnknown:!0},a11y:{type:"object",allowUnknown:!0},icons:{type:"object",allowUnknown:!1,properties:{set:{type:"string"},weight:{type:"string"},defaultSize:{type:"number",relations:{tokens:["--icon-size"]}},sizes:{type:"object",allowUnknown:!0},spritePath:{type:"string"},externalPath:{type:"string"},include:{type:"object",allowUnknown:!0}}},components:{type:"object",allowUnknown:!0},gap:{type:"number"},debug:{type:"boolean"}}},Ge={type:"object",allowUnknown:!0,properties:{mode:{type:"string"},preset:{type:"string"},design:te,enhancers:{type:["object","array"]},applyGlobalStyles:{type:"boolean"},manageTheme:{type:"boolean"},themeStorageKey:{type:"string"},preloadStyles:{type:"boolean"},criticalLayers:{type:"array",items:{type:"string"}},autoDefine:{type:"object",allowUnknown:!1,properties:{predefine:{type:"array",items:{type:"string"}},mapper:{type:P},enhancers:{type:["object","array"]},scanExisting:{type:"boolean"},observeShadows:{type:"boolean"},patchAttachShadow:{type:"boolean"},debounceMs:{type:"number"},onError:{type:P},baseURL:{type:"string"}}},managerURL:{type:"string"},manager:{type:P},liveEdit:{type:"boolean"},log:{type:P}}};function X(a){return a===null?"null":Array.isArray(a)?"array":typeof a}function Ve(a,t){if(t===P)return!0;let e=X(a);return Array.isArray(t)?t.includes(e):e===t}function V(a,t,e,r){if(!t)return;let o=t.type||P;if(!Ve(a,o)){r.push({path:e,expected:o,actual:X(a),message:`Expected ${o} but got ${X(a)}`});return}if(o==="array"&&t.items&&Array.isArray(a)&&a.forEach((n,i)=>{V(n,t.items,`${e}[${i}]`,r)}),o==="object"&&a&&typeof a=="object"){let n=t.properties||{};for(let[i,s]of Object.entries(a)){if(!Object.prototype.hasOwnProperty.call(n,i)){t.allowUnknown||r.push({path:`${e}.${i}`,expected:"known property",actual:"unknown",message:`Unknown property "${i}"`});continue}V(s,n[i],`${e}.${i}`,r)}}}function ee(a,t="",e={}){if(!a||typeof a!="object")return e;if(a.relations&&t&&(e[t]=a.relations),a.type==="object"&&a.properties&&Object.entries(a.properties).forEach(([r,o])=>{let n=t?`${t}.${r}`:r;ee(o,n,e)}),a.type==="array"&&a.items){let r=`${t}[]`;ee(a.items,r,e)}return e}var we=ee(te,"");function re(a,{log:t,context:e="PDS config"}={}){if(!a||typeof a!="object")return[];let r=[];return V(a,te,"design",r),r.length&&typeof t=="function"&&r.forEach(o=>{t("warn",`[${e}] ${o.message} at ${o.path}`)}),r}function ke(a,{log:t,context:e="PDS config"}={}){if(!a||typeof a!="object")return[];let r=[];return V(a,Ge,"config",r),r.length&&typeof t=="function"&&r.forEach(o=>{t("warn",`[${e}] ${o.message} at ${o.path}`)}),r}var O={"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:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.xlarge,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],themes:["light"],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:g.RadiusSizes.none,borderWidth:g.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:g.RadiusSizes.xxlarge,borderWidth:g.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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",themes:["light"],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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:g.RadiusSizes.xxlarge,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.slow,animationEasing:g.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:"#0c0c0c",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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:g.RadiusSizes.large,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:g.TouchTargetSizes.comfortable,focusStyle:g.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:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:g.TouchTargetSizes.standard,focusStyle:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:g.RadiusSizes.small,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};O.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:g.FontWeights.light,fontWeightNormal:g.FontWeights.normal,fontWeightMedium:g.FontWeights.medium,fontWeightSemibold:g.FontWeights.semibold,fontWeightBold:g.FontWeights.bold,lineHeightTight:g.LineHeights.tight,lineHeightNormal:g.LineHeights.normal,lineHeightRelaxed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:g.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:g.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:g.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:g.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:g.IconSizes,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 oe(a="log",t,...e){if(this?.debug||this?.design?.debug||!1||a==="error"||a==="warn"){let o=console[a]||console.log;e.length>0?o(t,...e):o(t)}}G();ae();var T=class a{static#g;static get instance(){return this.#g}#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),a.#g=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ke(),typeof CSSStyleSheet<"u"?this.#Ee():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{},e=this.#M(t),r=t.layers||{},o=this.#h(r,e.light),n=this.#$(o),i=e.dark!=null?this.#$(this.#h(r,e.dark)):null;return{colors:this.#E(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#P(t.shape||{}),borderWidths:this.#O(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:n,darkShadows:i,layout:this.#D(t.layout||{}),transitions:this.#U(t.behavior||{}),zIndex:this.#I(t.layers||{}),icons:this.#H(t.icons||{})}}#M(t={}){let e=t.layout||{},r=t.layers||{};return{light:this.#m(e.baseShadowOpacity??r.baseShadowOpacity),dark:this.#m(e.darkMode?.baseShadowOpacity??r.darkMode?.baseShadowOpacity)}}#m(t){let e=Number(t);if(Number.isFinite(e))return Math.min(Math.max(e,0),1)}#h(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#E(t,e={}){let{primary:r="#3b82f6",secondary:o="#64748b",accent:n="#ec4899",background:i="#ffffff",success:s=null,warning:c="#FFBF00",danger:u=null,info:d=null,darkMode:l={}}=t,p={primary:this.#r(r),secondary:this.#r(o),accent:this.#r(n),success:this.#r(s||this.#F(r)),warning:this.#r(c||n),danger:this.#r(u||this.#C(r)),info:this.#r(d||r),gray:this.#f(o),surface:this.#b(i)};return p.surface.fieldset=this.#T(p.surface),p.surfaceSmart=this.#k(p.surface,e),p.dark=this.#A(p,i,l),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#k(p.dark.surface,e)),p.interactive={light:{fill:this.#w(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#w(p.dark.primary,4.5),text:this.#B(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))}}#F(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#C(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#f(t){let e=this.#n(t),r=e.h,o=Math.min(e.s,10);return{50:this.#t(r,o,98),100:this.#t(r,o,95),200:this.#t(r,o,88),300:this.#t(r,o,78),400:this.#t(r,o,60),500:t,600:this.#t(r,Math.min(o+5,15),45),700:this.#t(r,Math.min(o+8,18),35),800:this.#t(r,Math.min(o+10,20),20),900:this.#t(r,Math.min(o+12,22),10)}}#b(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.#y(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#T(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#L(t.sunken,.05),overlay:t.elevated}}#L(t,e=.05){let r=this.#n(t),o=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,o)}#y(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),o=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,o)}else{let r=Math.max(e.s-10,5),o=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,o)}}#A(t,e="#ffffff",r={}){let o=r.background?r.background:this.#y(e),n=this.#b(o),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...n,fieldset:this.#j(n)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#f(r.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("#",""),r=e.length===3?e.split("").map(n=>n+n).join(""):e,o=parseInt(r,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}#p(t){let{r:e,g:r,b:o}=this.#l(t),n=[e/255,r/255,o/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*n[0]+.7152*n[1]+.0722*n[2]}#d(t,e){let r=this.#p(t),o=this.#p(e),n=Math.max(r,o),i=Math.min(r,o);return(n+.05)/(i+.05)}#v(t,e=4.5){if(!t)return"#000000";let r="#ffffff",o="#000000",n=this.#d(t,r);if(n>=e)return r;let i=this.#d(t,o);return i>=e||i>n?o:r}#x(t,e=1){let{r,g:o,b:n}=this.#l(t);return`rgba(${r}, ${o}, ${n}, ${e})`}#R(t,e,r=.5){let o=this.#l(t),n=this.#l(e),i=Math.round(o.r+(n.r-o.r)*r),s=Math.round(o.g+(n.g-o.g)*r),c=Math.round(o.b+(n.b-o.b)*r);return this.#W(i,s,c)}#W(t,e,r){let o=n=>{let i=Math.max(0,Math.min(255,Math.round(n))).toString(16);return i.length===1?"0"+i:i};return`#${o(t)}${o(e)}${o(r)}`}#j(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#S(t.elevated,.08),sunken:t.elevated,overlay:this.#S(t.overlay,.05)}}#B(t={},e="#000000",r=4.5){let o=["600","700","800","500","400","900","300","200"],n={shade:null,color:null,ratio:0};for(let i of o){let s=t?.[i];if(!s||typeof s!="string")continue;let c=this.#d(s,e);if(c>n.ratio&&(n={shade:i,color:s,ratio:c}),c>=r)return s}return n.color||t?.["600"]||t?.["500"]}#w(t={},e=4.5){let r=["600","700","800","500","400","900"],o={shade:null,color:null,ratio:0};for(let n of r){let i=t?.[n];if(!i||typeof i!="string")continue;let s=this.#d(i,"#ffffff");if(s>o.ratio&&(o={shade:n,color:i,ratio:s}),s>=e)return i}return o.color||t?.["600"]||t?.["500"]}#k(t,e={}){let r={},o=e.light??.1,n=e.dark??.25;return Object.entries(t).forEach(([i,s])=>{if(!s||typeof s!="string"||!s.startsWith("#"))return;let c=this.#p(s)<.5,u=this.#v(s,4.5),d=this.#v(s,3),l=this.#R(u,s,.4),p=u,m=l,f=c?"#ffffff":"#000000",b=c?n:o,h=this.#x(f,b),y=c?"#ffffff":"#000000",S=c?.15:.1,$=this.#x(y,S);r[i]={bg:s,text:u,textSecondary:d,textMuted:l,icon:p,iconSubtle:m,shadow:h,border:$,scheme:c?"dark":"light"}}),r}#S(t,e=.05){let r=this.#n(t),o=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,o)}#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(([o,n])=>{let i=t[n.source];e[o]=this.#N(i,n.dimFactor)}),e}#N(t,e=.8){let r=this.#n(t),o=Math.max(r.s*e,5),n=Math.max(r.l*e,5);return this.#t(r.h,o,n)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:o=12}=t,n=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(o))?Number(o):12,12),s={0:"0"};for(let c=1;c<=i;c++)s[c]=`${n*c}px`;return s}#P(t){let{radiusSize:e="medium",customRadius:r=null}=t,o;r!=null?o=r:typeof e=="number"?o=e:typeof e=="string"?o=g.RadiusSizes[e]??g.RadiusSizes.medium:o=g.RadiusSizes.medium;let n=Number.isFinite(Number(o))?Number(o):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(n*.25)?Math.round(n*.25):0}px`,sm:`${Number.isFinite(n*.5)?Math.round(n*.5):0}px`,md:`${n}px`,lg:`${Number.isFinite(n*1.5)?Math.round(n*1.5):0}px`,xl:`${Number.isFinite(n*2)?Math.round(n*2):0}px`,full:"9999px"}}#O(t){let{borderWidth:e="medium"}=t,r;typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium;let o=Number.isFinite(Number(r))?Number(r):g.BorderWidths.medium,n=i=>`${Math.max(0,Math.round(i*100)/100)}px`;return{hairline:n(o*.25),thin:n(o*.5),medium:n(o),thick:n(o*1.5)}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:o='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:n=16,fontScale:i=1.25,fontWeightLight:s=g.FontWeights.light,fontWeightNormal:c=g.FontWeights.normal,fontWeightMedium:u=g.FontWeights.medium,fontWeightSemibold:d=g.FontWeights.semibold,fontWeightBold:l=g.FontWeights.bold,lineHeightTight:p=g.LineHeights.tight,lineHeightNormal:m=g.LineHeights.normal,lineHeightRelaxed:f=g.LineHeights.relaxed}=t,b=Number.isFinite(Number(n))?Number(n):16,h=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:o},fontSize:{xs:`${Math.round(b/Math.pow(h,2))}px`,sm:`${Math.round(b/h)}px`,base:`${b}px`,lg:`${Math.round(b*h)}px`,xl:`${Math.round(b*Math.pow(h,2))}px`,"2xl":`${Math.round(b*Math.pow(h,3))}px`,"3xl":`${Math.round(b*Math.pow(h,4))}px`,"4xl":`${Math.round(b*Math.pow(h,5))}px`},fontWeight:{light:s?.toString()||"300",normal:c?.toString()||"400",medium:u?.toString()||"500",semibold:d?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:p?.toString()||"1.25",normal:m?.toString()||"1.5",relaxed:f?.toString()||"1.75"}}}#$(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:o=1}=t,n=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*o}px ${2*r}px 0 ${i}`,base:`0 ${1*o}px ${3*r}px 0 ${n}, 0 ${1*o}px ${2*r}px 0 ${i}`,md:`0 ${4*o}px ${6*r}px ${-1*o}px ${n}, 0 ${2*o}px ${4*r}px ${-1*o}px ${i}`,lg:`0 ${10*o}px ${15*r}px ${-3*o}px ${n}, 0 ${4*o}px ${6*r}px ${-2*o}px ${i}`,xl:`0 ${20*o}px ${25*r}px ${-5*o}px ${n}, 0 ${10*o}px ${10*r}px ${-5*o}px ${i}`,inner:`inset 0 ${2*o}px ${4*r}px 0 ${i}`}}#D(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=t,n=this.#z(t);return{maxWidth:this.#o(e,"1200px"),maxWidthSm:n.sm,maxWidthMd:n.md,maxWidthLg:n.lg,maxWidthXl:n.xl,minHeight:"100vh",containerPadding:this.#o(r,"16px"),breakpoints:{sm:this.#o(o.sm,"640px"),md:this.#o(o.md,"768px"),lg:this.#o(o.lg,"1024px"),xl:this.#o(o.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#z(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:r={},maxWidth:o=1200,containerPadding:n=16,breakpoints:i=e}=t||{},s=this.#s(n,16),c=this.#s(o,e.xl),u={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)},d=p=>p?Math.max(320,p-s*2):c,l={sm:Math.min(c,d(u.sm)),md:Math.min(c,d(u.md)),lg:Math.min(c,d(u.lg)),xl:Math.max(320,c)};return{sm:this.#o(r.sm,`${l.sm}px`),md:this.#o(r.md,`${l.md}px`),lg:this.#o(r.lg,`${l.lg}px`),xl:this.#o(r.xl,`${l.xl}px`)}}#o(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 r=parseFloat(t);if(Number.isFinite(r))return r}return e}#U(t){let{transitionSpeed:e=g.TransitionSpeeds.normal,animationEasing:r=g.AnimationEasings["ease-out"]}=t,o;return typeof e=="number"?o=e:typeof e=="string"&&g.TransitionSpeeds[e]?o=g.TransitionSpeeds[e]:o=g.TransitionSpeeds.normal,{fast:`${Math.round(o*.6)}ms`,normal:`${o}ms`,slow:`${Math.round(o*1.4)}ms`}}#I(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#H(t){let{set:e="phosphor",weight:r="regular",defaultSize:o=24,sizes:n={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:r,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(n).map(([c,u])=>[c,`${u}px`])),spritePath:i,externalPath:s}}#_(t){let e=[];e.push(` /* Colors */
|
|
20
|
-
`);let r=(
|
|
21
|
-
`)})};return Object.entries(t).forEach(([
|
|
22
|
-
`),Object.entries(t.surfaceSmart).forEach(([
|
|
23
|
-
`),e.push(` --surface-${
|
|
24
|
-
`),e.push(` --surface-${
|
|
25
|
-
`),e.push(` --surface-${
|
|
26
|
-
`),e.push(` --surface-${
|
|
27
|
-
`),e.push(` --surface-${
|
|
28
|
-
`),e.push(` --surface-${
|
|
29
|
-
`),e.push(` --surface-${
|
|
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 at={};H(at,{deepMerge:()=>ot,fragmentFromTemplateLike:()=>Ut,isObject:()=>ne,parseHTML:()=>Dt});function ne(o){return o&&typeof o=="object"&&!Array.isArray(o)}function ot(o,t){let e={...o};return ne(o)&&ne(t)&&Object.keys(t).forEach(r=>{ne(t[r])?r in o?e[r]=ot(o[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function Ut(o){let t=Array.isArray(o?.strings)?o.strings:[],e=Array.isArray(o?.values)?o.values:[],r=new Set,a=[],n=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<t.length;l+=1){let u=t[l]??"",h=u.match(n);if(h&&l<e.length){let y=h[2].slice(1),m=`pds-val-${l}`;u=u.replace(n,`$1data-pds-prop="${y}:${m}"`),r.add(l)}a.push(u),l<e.length&&!r.has(l)&&a.push(`<!--pds-val-${l}-->`)}let i=document.createElement("template");i.innerHTML=a.join("");let s=(l,u)=>{let h=l.parentNode;if(!h)return;if(u==null){h.removeChild(l);return}let f=y=>{if(y!=null){if(y instanceof Node){h.insertBefore(y,l);return}if(Array.isArray(y)){y.forEach(m=>f(m));return}h.insertBefore(document.createTextNode(String(y)),l)}};f(u),h.removeChild(l)},p=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),c=[];for(;p.nextNode();){let l=p.currentNode;l?.nodeValue?.startsWith("pds-val-")&&c.push(l)}return c.forEach(l=>{let u=Number(l.nodeValue.replace("pds-val-",""));s(l,e[u])}),i.content.querySelectorAll("*").forEach(l=>{let u=l.getAttribute("data-pds-prop");if(!u)return;let[h,f]=u.split(":"),y=Number(String(f).replace("pds-val-",""));h&&Number.isInteger(y)&&(l[h]=e[y]),l.removeAttribute("data-pds-prop")}),i.content}function Dt(o){return new DOMParser().parseFromString(o,"text/html").body.childNodes}var nt=_(()=>{});X();var U="any",V={type:"object",allowUnknown:!1,properties:{id:{type:"string",minLength:1,maxLength:64},name:{type:"string",minLength:1,maxLength:80},tags:{type:"array",uniqueItems:!0,items:{type:"string"}},themes:{type:"array",uniqueItems:!0,items:{type:"string",oneOf:[{const:"light",title:"Light"},{const:"dark",title:"Dark"},{const:"system",title:"System"}]}},description:{type:"string",maxLength:500},options:{type:"object",allowUnknown:!0,properties:{liquidGlassEffects:{type:"boolean"},backgroundMesh:{type:"number"}}},form:{type:"object",allowUnknown:!0,properties:{options:{type:"object",allowUnknown:!0,properties:{widgets:{type:"object",allowUnknown:!1,properties:{booleans:{type:"string"},numbers:{type:"string"},selects:{type:"string"}}},layouts:{type:"object",allowUnknown:!1,properties:{fieldsets:{type:"string"},arrays:{type:"string"}}},enhancements:{type:"object",allowUnknown:!1,properties:{icons:{type:"boolean"},datalists:{type:"boolean"},rangeOutput:{type:"boolean"},colorInput:{type:"boolean"}}},validation:{type:"object",allowUnknown:!1,properties:{showErrors:{type:"boolean"},validateOnChange:{type:"boolean"}}}}}}},colors:{type:"object",allowUnknown:!1,properties:{primary:{type:"string",relations:{tokens:["--color-primary-*","--color-primary-fill","--color-primary-text","--background-mesh-*"]}},secondary:{type:"string",relations:{tokens:["--color-secondary-*","--color-gray-*","--background-mesh-*"]}},accent:{type:"string",relations:{tokens:["--color-accent-*","--background-mesh-*"]}},background:{type:"string",relations:{tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},success:{type:["string","null"],relations:{tokens:["--color-success-*"]}},warning:{type:["string","null"],relations:{tokens:["--color-warning-*"]}},danger:{type:["string","null"],relations:{tokens:["--color-danger-*"]}},info:{type:["string","null"],relations:{tokens:["--color-info-*"]}},gradientStops:{type:"number"},elevationOpacity:{type:"number",relations:{tokens:["--surface-*-shadow"]}},darkMode:{type:"object",allowUnknown:!1,properties:{background:{type:"string",relations:{theme:"dark",tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},primary:{type:"string",relations:{theme:"dark",tokens:["--color-primary-*","--color-primary-fill","--color-primary-text"]}},secondary:{type:"string",relations:{theme:"dark",tokens:["--color-secondary-*","--color-gray-*"]}},accent:{type:"string",relations:{theme:"dark",tokens:["--color-accent-*"]}}}}}},typography:{type:"object",allowUnknown:!1,properties:{fontFamilyHeadings:{type:"string",relations:{tokens:["--font-family-headings"]}},fontFamilyBody:{type:"string",relations:{tokens:["--font-family-body"]}},fontFamilyMono:{type:"string",relations:{tokens:["--font-family-mono"]}},baseFontSize:{type:"number",relations:{tokens:["--font-size-*"]}},fontScale:{type:"number",relations:{tokens:["--font-size-*"]}},fontWeightLight:{type:["string","number"],relations:{tokens:["--font-weight-light"]}},fontWeightNormal:{type:["string","number"],relations:{tokens:["--font-weight-normal"]}},fontWeightMedium:{type:["string","number"],relations:{tokens:["--font-weight-medium"]}},fontWeightSemibold:{type:["string","number"],relations:{tokens:["--font-weight-semibold"]}},fontWeightBold:{type:["string","number"],relations:{tokens:["--font-weight-bold"]}},lineHeightTight:{type:["string","number"],relations:{tokens:["--font-line-height-tight"]}},lineHeightNormal:{type:["string","number"],relations:{tokens:["--font-line-height-normal"]}},lineHeightRelaxed:{type:["string","number"],relations:{tokens:["--font-line-height-relaxed"]}},letterSpacingTight:{type:"number"},letterSpacingNormal:{type:"number"},letterSpacingWide:{type:"number"}}},spatialRhythm:{type:"object",allowUnknown:!1,properties:{baseUnit:{type:"number",relations:{tokens:["--spacing-*"]}},scaleRatio:{type:"number"},maxSpacingSteps:{type:"number",relations:{tokens:["--spacing-*"]}},containerPadding:{type:"number"},inputPadding:{type:"number",relations:{rules:[{selectors:["input","textarea","select"],properties:["padding"]}]}},buttonPadding:{type:"number",relations:{rules:[{selectors:["button",".btn"],properties:["padding"]}]}},sectionSpacing:{type:"number",relations:{rules:[{selectors:["section"],properties:["margin","padding"]}]}}}},shape:{type:"object",allowUnknown:!1,properties:{radiusSize:{type:["string","number"],relations:{tokens:["--radius-*"]}},customRadius:{type:["string","number","null"]},borderWidth:{type:["string","number"],relations:{tokens:["--border-width-*"]}}}},behavior:{type:"object",allowUnknown:!1,properties:{transitionSpeed:{type:["string","number"],relations:{tokens:["--transition-*"]}},animationEasing:{type:"string"},customTransitionSpeed:{type:["number","null"]},customEasing:{type:["string","null"]},focusRingWidth:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["outline-width","box-shadow"]}]}},focusRingOpacity:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["box-shadow","outline-color"]}]}},hoverOpacity:{type:"number"}}},layout:{type:"object",allowUnknown:!1,properties:{maxWidth:{type:["number","string"],relations:{tokens:["--layout-max-width","--layout-max-width-*"]}},maxWidths:{type:"object",allowUnknown:!1,properties:{sm:{type:["number","string"],relations:{tokens:["--layout-max-width-sm"]}},md:{type:["number","string"],relations:{tokens:["--layout-max-width-md"]}},lg:{type:["number","string"],relations:{tokens:["--layout-max-width-lg"]}},xl:{type:["number","string"],relations:{tokens:["--layout-max-width-xl"]}}}},containerPadding:{type:["number","string"],relations:{tokens:["--layout-container-padding"]}},breakpoints:{type:"object",allowUnknown:!1,properties:{sm:{type:"number"},md:{type:"number"},lg:{type:"number"},xl:{type:"number"}}},gridColumns:{type:"number"},gridGutter:{type:"number"},densityCompact:{type:"number"},densityNormal:{type:"number"},densityComfortable:{type:"number"},buttonMinHeight:{type:"number"},inputMinHeight:{type:"number"},baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},darkMode:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}},utilities:{type:"object",allowUnknown:!0,properties:{grid:{type:"boolean"},flex:{type:"boolean"},spacing:{type:"boolean"},container:{type:"boolean"}}},gridSystem:{type:"object",allowUnknown:!0,properties:{columns:{type:"array",items:{type:"number"}},autoFitBreakpoints:{type:"object",allowUnknown:!1,properties:{sm:{type:"string"},md:{type:"string"},lg:{type:"string"},xl:{type:"string"}}},enableGapUtilities:{type:"boolean"}}},containerMaxWidth:{type:["number","string"]}}},layers:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},shadowBlurMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowOffsetMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowDepth:{type:"string"},blurLight:{type:"number"},blurMedium:{type:"number"},blurHeavy:{type:"number"},baseZIndex:{type:"number",relations:{tokens:["--z-*"]}},zIndexStep:{type:"number",relations:{tokens:["--z-*"]}},zIndexBase:{type:"number"},zIndexDropdown:{type:"number"},zIndexSticky:{type:"number"},zIndexFixed:{type:"number"},zIndexModal:{type:"number"},zIndexPopover:{type:"number"},zIndexTooltip:{type:"number"},zIndexNotification:{type:"number"},darkMode:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}}}},advanced:{type:"object",allowUnknown:!0,properties:{linkStyle:{type:"string"},colorDerivation:{type:"string"}}},a11y:{type:"object",allowUnknown:!0,properties:{minTouchTarget:{type:["string","number"]},prefersReducedMotion:{type:"boolean"},focusStyle:{type:"string"}}},icons:{type:"object",allowUnknown:!1,properties:{set:{type:"string"},weight:{type:"string"},defaultSize:{type:"number",relations:{tokens:["--icon-size"]}},sizes:{type:"object",allowUnknown:!0,properties:{xs:{type:["number","string"]},sm:{type:["number","string"]},md:{type:["number","string"]},lg:{type:["number","string"]},xl:{type:["number","string"]},"2xl":{type:["number","string"]}}},spritePath:{type:"string"},externalPath:{type:"string"},include:{type:"object",allowUnknown:!0,properties:{navigation:{type:"array",items:{type:"string"}},actions:{type:"array",items:{type:"string"}},communication:{type:"array",items:{type:"string"}},content:{type:"array",items:{type:"string"}},status:{type:"array",items:{type:"string"}},time:{type:"array",items:{type:"string"}},commerce:{type:"array",items:{type:"string"}},formatting:{type:"array",items:{type:"string"}},system:{type:"array",items:{type:"string"}}}}}},components:{type:"object",allowUnknown:!0},debug:{type:"boolean"}}},lt={type:"object",allowUnknown:!0,properties:{mode:{type:"string"},preset:{type:"string"},design:V,enhancers:{type:["object","array"]},applyGlobalStyles:{type:"boolean"},manageTheme:{type:"boolean"},themeStorageKey:{type:"string"},preloadStyles:{type:"boolean"},criticalLayers:{type:"array",items:{type:"string"}},autoDefine:{type:"object",allowUnknown:!1,properties:{predefine:{type:"array",items:{type:"string"}},mapper:{type:U},enhancers:{type:["object","array"]},scanExisting:{type:"boolean"},observeShadows:{type:"boolean"},patchAttachShadow:{type:"boolean"},debounceMs:{type:"number"},onError:{type:U},baseURL:{type:"string"}}},managerURL:{type:"string"},manager:{type:U},liveEdit:{type:"boolean"},log:{type:U}}};function q(o){return o===null?"null":Array.isArray(o)?"array":typeof o}function dt(o,t){if(t===U)return!0;let e=q(o);return Array.isArray(t)?t.includes(e):e===t}function ee(o,t,e,r){if(!t)return;let a=t.type||U;if(!dt(o,a)){r.push({path:e,expected:a,actual:q(o),message:`Expected ${a} but got ${q(o)}`});return}if(a==="array"&&t.items&&Array.isArray(o)&&o.forEach((n,i)=>{ee(n,t.items,`${e}[${i}]`,r)}),a==="object"&&o&&typeof o=="object"){let n=t.properties||{};for(let[i,s]of Object.entries(o)){if(!Object.prototype.hasOwnProperty.call(n,i)){t.allowUnknown||r.push({path:`${e}.${i}`,expected:"known property",actual:"unknown",message:`Unknown property "${i}"`});continue}ee(s,n[i],`${e}.${i}`,r)}}}function se(o,t="",e={}){if(!o||typeof o!="object")return e;if(o.relations&&t&&(e[t]=o.relations),o.type==="object"&&o.properties&&Object.entries(o.properties).forEach(([r,a])=>{let n=t?`${t}.${r}`:r;se(a,n,e)}),o.type==="array"&&o.items){let r=`${t}[]`;se(o.items,r,e)}return e}var Le=se(V,""),Re=V,pt={"colors.primary":{widget:"input-color"},"colors.secondary":{widget:"input-color"},"colors.accent":{widget:"input-color"},"colors.background":{widget:"input-color"},"colors.success":{widget:"input-color"},"colors.warning":{widget:"input-color"},"colors.danger":{widget:"input-color"},"colors.info":{widget:"input-color"},"colors.gradientStops":{min:2,max:8,step:1,widget:"range"},"colors.elevationOpacity":{min:0,max:1,step:.01,widget:"range"},"colors.darkMode.background":{widget:"input-color"},"colors.darkMode.primary":{widget:"input-color"},"colors.darkMode.secondary":{widget:"input-color"},"colors.darkMode.accent":{widget:"input-color"},description:{widget:"textarea",maxLength:500,rows:4,placeholder:"Summarize the visual and interaction intent"},"typography.fontFamilyHeadings":{widget:"font-family-omnibox",icon:"text-aa",placeholder:"Heading font stack"},"typography.fontFamilyBody":{widget:"font-family-omnibox",icon:"text-aa",placeholder:"Body font stack"},"typography.fontFamilyMono":{widget:"font-family-omnibox",icon:"text-aa",placeholder:"Monospace font stack"},"typography.baseFontSize":{min:8,max:32,step:1,widget:"input-range"},"typography.fontScale":{min:1,max:2,step:.01,widget:"range"},"typography.fontWeightLight":{min:100,max:800,step:100,widget:"input-range"},"typography.fontWeightNormal":{min:100,max:800,step:100,widget:"input-range"},"typography.fontWeightMedium":{min:100,max:800,step:100,widget:"input-range"},"typography.fontWeightSemibold":{min:100,max:800,step:100,widget:"input-range"},"typography.fontWeightBold":{min:100,max:800,step:100,widget:"input-range"},"typography.lineHeightTight":{min:.75,max:3,step:.001,widget:"input-range"},"typography.lineHeightNormal":{min:.75,max:3,step:.001,widget:"input-range"},"typography.lineHeightRelaxed":{min:.75,max:3,step:.001,widget:"input-range"},"typography.letterSpacingTight":{min:-.1,max:.1,step:.001,widget:"range"},"typography.letterSpacingNormal":{min:-.1,max:.1,step:.001,widget:"range"},"typography.letterSpacingWide":{min:-.1,max:.1,step:.001,widget:"range"},"spatialRhythm.baseUnit":{min:1,max:16,step:1,widget:"range"},"spatialRhythm.scaleRatio":{min:1,max:2,step:.01,widget:"range"},"spatialRhythm.maxSpacingSteps":{min:4,max:64,step:1,widget:"range"},"spatialRhythm.containerPadding":{min:0,max:8,step:.05,widget:"range"},"spatialRhythm.inputPadding":{min:0,max:4,step:.05,widget:"range"},"spatialRhythm.buttonPadding":{min:0,max:4,step:.05,widget:"range"},"spatialRhythm.sectionSpacing":{min:0,max:8,step:.05,widget:"range"},"shape.radiusSize":{oneOf:Object.entries(g.RadiusSizes).map(([o,t])=>({const:t,title:o}))},"shape.borderWidth":{widget:"select",oneOf:Object.entries(g.BorderWidths).map(([o,t])=>({const:t,title:o}))},"shape.customRadius":{min:0,max:64,step:1,widget:"range"},"behavior.transitionSpeed":{oneOf:Object.entries(g.TransitionSpeeds).map(([o,t])=>({const:t,title:o}))},"behavior.animationEasing":{enum:Object.values(g.AnimationEasings)},"behavior.customTransitionSpeed":{min:0,max:1e3,step:10,widget:"range"},"behavior.focusRingWidth":{min:0,max:8,step:1,widget:"range"},"behavior.focusRingOpacity":{min:0,max:1,step:.01,widget:"range"},"behavior.hoverOpacity":{min:0,max:1,step:.01,widget:"range"},"layout.gridColumns":{min:1,max:24,step:1,widget:"range"},"layout.gridGutter":{min:0,max:8,step:.05,widget:"range"},"layout.maxWidth":{widget:"input-text",placeholder:"e.g. 1200 or 1200px"},"layout.maxWidths.sm":{widget:"input-text",placeholder:"e.g. 640 or 640px"},"layout.maxWidths.md":{widget:"input-text",placeholder:"e.g. 768 or 768px"},"layout.maxWidths.lg":{widget:"input-text",placeholder:"e.g. 1024 or 1024px"},"layout.maxWidths.xl":{widget:"input-text",placeholder:"e.g. 1280 or 1280px"},"layout.containerMaxWidth":{widget:"input-text",placeholder:"e.g. 1400px"},"layout.containerPadding":{widget:"input-text",placeholder:"e.g. var(--spacing-6)"},"layout.breakpoints.sm":{min:320,max:2560,step:1,widget:"input-number"},"layout.breakpoints.md":{min:480,max:3200,step:1,widget:"input-number"},"layout.breakpoints.lg":{min:640,max:3840,step:1,widget:"input-number"},"layout.breakpoints.xl":{min:768,max:5120,step:1,widget:"input-number"},"layout.baseShadowOpacity":{min:0,max:1,step:.01,widget:"range"},"layout.darkMode.baseShadowOpacity":{min:0,max:1,step:.01,widget:"range"},"layout.densityCompact":{min:.5,max:2,step:.05,widget:"range"},"layout.densityNormal":{min:.5,max:2,step:.05,widget:"range"},"layout.densityComfortable":{min:.5,max:2,step:.05,widget:"range"},"layout.buttonMinHeight":{min:24,max:96,step:1,widget:"range"},"layout.inputMinHeight":{min:24,max:96,step:1,widget:"range"},"layers.baseShadowOpacity":{min:0,max:1,step:.01,widget:"range"},"layers.shadowBlurMultiplier":{min:0,max:8,step:.1,widget:"range"},"layers.shadowOffsetMultiplier":{min:0,max:8,step:.1,widget:"range"},"layers.blurLight":{min:0,max:48,step:1,widget:"range"},"layers.blurMedium":{min:0,max:64,step:1,widget:"range"},"layers.blurHeavy":{min:0,max:96,step:1,widget:"range"},"layers.baseZIndex":{min:0,max:1e4,step:10,widget:"range"},"layers.zIndexStep":{min:1,max:100,step:1,widget:"range"},"layers.darkMode.baseShadowOpacity":{min:0,max:1,step:.01,widget:"range"},"advanced.linkStyle":{enum:Object.values(g.LinkStyles)},"a11y.minTouchTarget":{oneOf:Object.entries(g.TouchTargetSizes).map(([o,t])=>({const:t,title:o}))},"a11y.focusStyle":{enum:Object.values(g.FocusStyles)},"icons.defaultSize":{min:8,max:128,step:1,widget:"range",icon:"sparkle"}};function Ee(o=[]){return o.join(".")}function Ce(o=[]){return`/${o.join("/")}`}function ut(o,t=[]){if(!(!o||typeof o!="object"))return t.reduce((e,r)=>{if(e!=null&&typeof e=="object")return e[r]},o)}function Fe(o,t,e=[]){if(o!=null)return o;let r=ut(t,e);return r??void 0}function G(o=""){return String(o).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/^./,t=>t.toUpperCase())}function je(o,t){if(!o)return"string";let e=o.type||"string";if(Array.isArray(e)){let r=q(t);return r!=="undefined"&&e.includes(r)?r:e.includes("string")?"string":e.find(a=>a!=="null")||e[0]||"string"}return e}function ie(o,t,e=[]){return!o||!t||!Array.isArray(e)||e.forEach(r=>{t[r]!==void 0&&(o[r]=t[r])}),o}function Te(o,t){return Array.isArray(t?.oneOf)&&t.oneOf.length?t.oneOf:Array.isArray(t?.enum)&&t.enum.length?t.enum.map(e=>({const:e,title:G(e)})):Array.isArray(o?.oneOf)&&o.oneOf.length?o.oneOf:Array.isArray(o?.enum)&&o.enum.length?o.enum.map(e=>({const:e,title:G(e)})):null}function gt(o){return o&&(o==="range"?"input-range":o)}function mt(o,t){if(!Array.isArray(t)||!t.length)return o;let e=new Set;for(let r of t)!r||r.const===void 0||e.add(q(r.const));if(!e.size)return o;if(e.size===1){let r=Array.from(e)[0];if(r==="number")return"number";if(r==="string")return"string";if(r==="boolean")return"boolean"}return o}function Ae(o,t,e){let r=je(t,e),a=o.toLowerCase(),n={label:G(o.split(".").slice(-1)[0]||o)};r==="boolean"&&(n.widget="toggle"),r==="number"&&(n.widget="range",a.includes("opacity")?(n.min=0,n.max=1,n.step=.01):a.includes("lineheight")?(n.min=.75,n.max=3,n.step=.001,n.widget="input-range"):a.includes("fontweight")?(n.min=100,n.max=800,n.step=100,n.widget="input-range"):a.endsWith("basefontsize")?(n.min=8,n.max=32,n.step=1,n.widget="input-range"):a.includes("scale")||a.includes("ratio")?(n.min=1,n.max=2,n.step=.01):(n.min=0,n.max=Math.max(10,Number.isFinite(Number(e))?Number(e)*4:100),n.step=1)),r==="string"&&o.startsWith("colors.")&&(n.widget="input-color"),r==="string"&&a==="description"&&(n.widget="textarea",n.maxLength=500,n.rows=4);let i=pt[o]||{},s={...n,...i};return s.widget&&(s.widget=gt(s.widget)),s}function We(o,t,e,r,a,n){if(!o||typeof o!="object")return null;let i=Fe(t,n,e),s=je(o,i);if(s==="object"&&o.properties){let b={type:"object",properties:{}};e.length>0&&(b.title=G(e[e.length-1]));let S={};for(let[v,M]of Object.entries(o.properties)){let C=t&&typeof t=="object"&&!Array.isArray(t)?t[v]:void 0,$=We(M,C,[...e,v],r,a,n);$&&(b.properties[v]=$.schema,$.hasValue&&(S[v]=$.value))}return Object.keys(b.properties).length?{schema:b,value:S,hasValue:Object.keys(S).length>0}:null}if(s==="array"){let b=Ee(e),S=Ae(b,o,t);a[b]=S;let v=Fe(t,n,e),M=o.items?.type||"string",C=Array.isArray(M)?M[0]:M,$={type:C},T=Te(o?.items,null);if(T&&($.oneOf=T),C==="string"&&Array.isArray(v)&&v.length>0){let O=v.find(B=>typeof B=="string"&&B.trim().length>0);O&&($.examples=[O])}ie($,o?.items,["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","format","minItems","maxItems","uniqueItems","description","default"]);let z={type:"array",items:$};ie(z,o,["minItems","maxItems","uniqueItems","description","default"]);let E=Ce(e),F={},W=Array.isArray($.oneOf)&&$.oneOf.length>0;if(C==="string"&&W&&(F["ui:widget"]=z.maxItems===1?"radio":"checkbox-group"),C==="string"&&Array.isArray(v)&&v.length>0){let O=v.filter(B=>typeof B=="string"&&B.trim().length>0).slice(0,5).join(", ");O&&(F["ui:placeholder"]=O)}return Object.keys(F).length&&(r[E]={...r[E]||{},...F}),{schema:z,value:Array.isArray(t)?t:[],hasValue:Array.isArray(t)}}let p=Ee(e),c=Ae(p,o,i);a[p]=c;let d=Te(o,c),h={type:mt(s==="null"?"string":s,d),title:c.label||G(e[e.length-1]||p)};d&&(h.oneOf=d),ie(h,o,["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","minLength","maxLength","pattern","format","description","default"]),typeof c.maxLength=="number"&&h.maxLength===void 0&&(h.maxLength=c.maxLength),(h.type==="number"||h.type==="integer")&&typeof c.min=="number"&&h.minimum===void 0&&(h.minimum=c.min),(h.type==="number"||h.type==="integer")&&typeof c.max=="number"&&h.maximum===void 0&&(h.maximum=c.max),(h.type==="number"||h.type==="integer")&&typeof c.step=="number"&&h.multipleOf===void 0&&(h.multipleOf=c.step);let f=i;f!==void 0&&(h.examples=[f]);let y=Ce(e),m={};return c.widget&&(m["ui:widget"]=c.widget),c.icon&&(m["ui:icon"]=c.icon),typeof c.min=="number"&&(m["ui:min"]=c.min),typeof c.max=="number"&&(m["ui:max"]=c.max),typeof c.step=="number"&&(m["ui:step"]=c.step),c.placeholder&&(m["ui:placeholder"]=c.placeholder),typeof c.rows=="number"&&(m["ui:options"]={...m["ui:options"]||{},rows:c.rows}),c.widget==="input-range"&&f!==void 0&&(m["ui:allowUnset"]=!0),(typeof c.min=="number"||typeof c.max=="number"||typeof c.step=="number")&&(m["ui:options"]={...m["ui:options"]||{},...typeof c.min=="number"?{min:c.min}:{},...typeof c.max=="number"?{max:c.max}:{},...typeof c.step=="number"?{step:c.step}:{}}),Object.keys(m).length&&(r[y]=m),{schema:h,value:t,hasValue:t!==void 0}}function D(o={}){let t={},e={"/colors":{"ui:layout":"flex","ui:layoutOptions":{wrap:!0,gap:"sm"}},"/colors/darkMode":{"ui:layout":"flex","ui:layoutOptions":{wrap:!0,gap:"sm"}}},r=j?.default&&typeof j.default=="object"?j.default:null,a=We(V,o,[],e,t,r);return{schema:a?.schema||{type:"object",properties:{}},uiSchema:e,values:a?.value||{},metadata:t}}function J(o={}){return D(o).metadata}function ce(o,{log:t,context:e="PDS config"}={}){if(!o||typeof o!="object")return[];let r=[];return ee(o,V,"design",r),r.length&&typeof t=="function"&&r.forEach(a=>{t("warn",`[${e}] ${a.message} at ${a.path}`)}),r}function le(o,{log:t,context:e="PDS config"}={}){if(!o||typeof o!="object")return[];let r=[];return ee(o,lt,"config",r),r.length&&typeof t=="function"&&r.forEach(a=>{t("warn",`[${e}] ${a.message} at ${a.path}`)}),r}var j={"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:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.xlarge,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],themes:["light"],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:g.RadiusSizes.none,borderWidth:g.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:g.RadiusSizes.xxlarge,borderWidth:g.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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",themes:["light"],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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:g.RadiusSizes.xxlarge,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.slow,animationEasing:g.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:"#0c0c0c",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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:g.RadiusSizes.large,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:g.TouchTargetSizes.comfortable,focusStyle:g.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,sectionSpacing:2.5},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:g.TouchTargetSizes.standard,focusStyle:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,sectionSpacing:1.5},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:g.RadiusSizes.small,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};j.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,colorInput:!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:g.FontWeights.light,fontWeightNormal:g.FontWeights.normal,fontWeightMedium:g.FontWeights.medium,fontWeightSemibold:g.FontWeights.semibold,fontWeightBold:g.FontWeights.bold,lineHeightTight:g.LineHeights.tight,lineHeightNormal:g.LineHeights.normal,lineHeightRelaxed:g.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:g.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:g.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:g.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:g.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:g.IconSizes,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:"/assets/pds/icons/pds-icons.svg"},debug:!1};var Oe=J(j.default),Be=D(j.default);function de(o="log",t,...e){if(this?.debug||this?.design?.debug||!1||o==="error"||o==="warn"){let a=console[o]||console.log;e.length>0?a(t,...e):a(t)}}X();pe();var R=class o{static#m;static get instance(){return this.#m}#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),o.#m=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#Se(),typeof CSSStyleSheet<"u"?this.#Ce():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{},e=this.#E(t),r=t.layers||{},a=this.#f(r,e.light),n=this.#z(a),i=e.dark!=null?this.#z(this.#f(r,e.dark)):null;return{colors:this.#C(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#N(t.shape||{}),borderWidths:this.#P(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:n,darkShadows:i,layout:this.#U(t.layout||{}),transitions:this.#D(t.behavior||{}),zIndex:this.#_(t.layers||{}),icons:this.#H(t.icons||{})}}#E(t={}){let e=t.layout||{},r=t.layers||{};return{light:this.#h(e.baseShadowOpacity??r.baseShadowOpacity),dark:this.#h(e.darkMode?.baseShadowOpacity??r.darkMode?.baseShadowOpacity)}}#h(t){let e=Number(t);if(Number.isFinite(e))return Math.min(Math.max(e,0),1)}#f(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#C(t,e={}){let{primary:r="#3b82f6",secondary:a="#64748b",accent:n="#ec4899",background:i="#ffffff",success:s=null,warning:p="#FFBF00",danger:c=null,info:d=null,darkMode:l={}}=t,u={primary:this.#r(r),secondary:this.#r(a),accent:this.#r(n),success:this.#r(s||this.#F(r)),warning:this.#r(p||n),danger:this.#r(c||this.#T(r)),info:this.#r(d||r),gray:this.#b(a),surface:this.#y(i)};return u.surface.fieldset=this.#A(u.surface),u.surfaceSmart=this.#S(u.surface,e),u.dark=this.#R(u,i,l),u.dark&&u.dark.surface&&(u.dark.surfaceSmart=this.#S(u.dark.surface,e)),u.interactive={light:{fill:this.#k(u.primary,4.5),text:u.primary[600]},dark:{fill:this.#k(u.dark.primary,4.5),text:this.#B(u.dark.primary,u.dark.surface.base,4.5)}},u}#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))}}#F(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#T(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#b(t){let e=this.#n(t),r=e.h,a=Math.min(e.s,10);return{50:this.#t(r,a,98),100:this.#t(r,a,95),200:this.#t(r,a,88),300:this.#t(r,a,78),400:this.#t(r,a,60),500:t,600:this.#t(r,Math.min(a+5,15),45),700:this.#t(r,Math.min(a+8,18),35),800:this.#t(r,Math.min(a+10,20),20),900:this.#t(r,Math.min(a+12,22),10)}}#y(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.#v(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#A(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#L(t.sunken,.05),overlay:t.elevated}}#L(t,e=.05){let r=this.#n(t),a=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,a)}#v(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),a=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,a)}else{let r=Math.max(e.s-10,5),a=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,a)}}#R(t,e="#ffffff",r={}){let a=r.background?r.background:this.#v(e),n=this.#y(a),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...n,fieldset:this.#O(n)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#b(r.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("#",""),r=e.length===3?e.split("").map(n=>n+n).join(""):e,a=parseInt(r,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(t){let{r:e,g:r,b:a}=this.#l(t),n=[e/255,r/255,a/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*n[0]+.7152*n[1]+.0722*n[2]}#d(t,e){let r=this.#p(t),a=this.#p(e),n=Math.max(r,a),i=Math.min(r,a);return(n+.05)/(i+.05)}#x(t,e=4.5){if(!t)return"#000000";let r="#ffffff",a="#000000",n=this.#d(t,r);if(n>=e)return r;let i=this.#d(t,a);return i>=e||i>n?a:r}#w(t,e=1){let{r,g:a,b:n}=this.#l(t);return`rgba(${r}, ${a}, ${n}, ${e})`}#j(t,e,r=.5){let a=this.#l(t),n=this.#l(e),i=Math.round(a.r+(n.r-a.r)*r),s=Math.round(a.g+(n.g-a.g)*r),p=Math.round(a.b+(n.b-a.b)*r);return this.#W(i,s,p)}#W(t,e,r){let a=n=>{let i=Math.max(0,Math.min(255,Math.round(n))).toString(16);return i.length===1?"0"+i:i};return`#${a(t)}${a(e)}${a(r)}`}#O(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#$(t.elevated,.08),sunken:t.elevated,overlay:this.#$(t.overlay,.05)}}#B(t={},e="#000000",r=4.5){let a=["600","700","800","500","400","900","300","200"],n={shade:null,color:null,ratio:0};for(let i of a){let s=t?.[i];if(!s||typeof s!="string")continue;let p=this.#d(s,e);if(p>n.ratio&&(n={shade:i,color:s,ratio:p}),p>=r)return s}return n.color||t?.["600"]||t?.["500"]}#k(t={},e=4.5){let r=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let n of r){let i=t?.[n];if(!i||typeof i!="string")continue;let s=this.#d(i,"#ffffff");if(s>a.ratio&&(a={shade:n,color:i,ratio:s}),s>=e)return i}return a.color||t?.["600"]||t?.["500"]}#S(t,e={}){let r={},a=e.light??.1,n=e.dark??.25;return Object.entries(t).forEach(([i,s])=>{if(!s||typeof s!="string"||!s.startsWith("#"))return;let p=this.#p(s)<.5,c=this.#x(s,4.5),d=this.#x(s,3),l=this.#j(c,s,.4),u=c,h=l,f=p?"#ffffff":"#000000",y=p?n:a,m=this.#w(f,y),b=p?"#ffffff":"#000000",S=p?.15:.1,v=this.#w(b,S);r[i]={bg:s,text:c,textSecondary:d,textMuted:l,icon:u,iconSubtle:h,shadow:m,border:v,scheme:p?"dark":"light"}}),r}#$(t,e=.05){let r=this.#n(t),a=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,a)}#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(([a,n])=>{let i=t[n.source];e[a]=this.#I(i,n.dimFactor)}),e}#I(t,e=.8){let r=this.#n(t),a=Math.max(r.s*e,5),n=Math.max(r.l*e,5);return this.#t(r.h,a,n)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:a=12}=t,n=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(a))?Number(a):12,12),s={0:"0"};for(let p=1;p<=i;p++)s[p]=`${n*p}px`;return s}#N(t){let{radiusSize:e="medium",customRadius:r=null}=t,a;r!=null?a=r:typeof e=="number"?a=e:typeof e=="string"?a=g.RadiusSizes[e]??g.RadiusSizes.medium:a=g.RadiusSizes.medium;let n=Number.isFinite(Number(a))?Number(a):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(n*.25)?Math.round(n*.25):0}px`,sm:`${Number.isFinite(n*.5)?Math.round(n*.5):0}px`,md:`${n}px`,lg:`${Number.isFinite(n*1.5)?Math.round(n*1.5):0}px`,xl:`${Number.isFinite(n*2)?Math.round(n*2):0}px`,full:"9999px"}}#P(t){let{borderWidth:e="medium"}=t,r;typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium;let a=Number.isFinite(Number(r))?Number(r):g.BorderWidths.medium,n=i=>`${Math.max(0,Math.round(i*100)/100)}px`;return{hairline:n(a*.25),thin:n(a*.5),medium:n(a),thick:n(a*1.5)}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:a='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:n=16,fontScale:i=1.25,fontWeightLight:s=g.FontWeights.light,fontWeightNormal:p=g.FontWeights.normal,fontWeightMedium:c=g.FontWeights.medium,fontWeightSemibold:d=g.FontWeights.semibold,fontWeightBold:l=g.FontWeights.bold,lineHeightTight:u=g.LineHeights.tight,lineHeightNormal:h=g.LineHeights.normal,lineHeightRelaxed:f=g.LineHeights.relaxed}=t,y=Number.isFinite(Number(n))?Number(n):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:a},fontSize:{xs:`${Math.round(y/Math.pow(m,2))}px`,sm:`${Math.round(y/m)}px`,base:`${y}px`,lg:`${Math.round(y*m)}px`,xl:`${Math.round(y*Math.pow(m,2))}px`,"2xl":`${Math.round(y*Math.pow(m,3))}px`,"3xl":`${Math.round(y*Math.pow(m,4))}px`,"4xl":`${Math.round(y*Math.pow(m,5))}px`},fontWeight:{light:s?.toString()||"300",normal:p?.toString()||"400",medium:c?.toString()||"500",semibold:d?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:u?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:f?.toString()||"1.75"}}}#z(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:a=1}=t,n=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*a}px ${2*r}px 0 ${i}`,base:`0 ${1*a}px ${3*r}px 0 ${n}, 0 ${1*a}px ${2*r}px 0 ${i}`,md:`0 ${4*a}px ${6*r}px ${-1*a}px ${n}, 0 ${2*a}px ${4*r}px ${-1*a}px ${i}`,lg:`0 ${10*a}px ${15*r}px ${-3*a}px ${n}, 0 ${4*a}px ${6*r}px ${-2*a}px ${i}`,xl:`0 ${20*a}px ${25*r}px ${-5*a}px ${n}, 0 ${10*a}px ${10*r}px ${-5*a}px ${i}`,inner:`inset 0 ${2*a}px ${4*r}px 0 ${i}`}}#U(t){let{containerPadding:e=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t,a=this.#u(t,"maxWidth"),n=t.maxWidth,i=this.#M(t,{emitFallbacks:!1});return{maxWidth:a?this.#o(n,"1200px"):void 0,maxWidthSm:i.sm,maxWidthMd:i.md,maxWidthLg:i.lg,maxWidthXl:i.xl,minHeight:"100vh",containerPadding:this.#o(e,"16px"),breakpoints:{sm:this.#o(r.sm,"640px"),md:this.#o(r.md,"768px"),lg:this.#o(r.lg,"1024px"),xl:this.#o(r.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#M(t={},e={}){let{emitFallbacks:r=!0}=e,a={sm:640,md:768,lg:1024,xl:1280},{maxWidths:n={},containerPadding:i=16,breakpoints:s=a}=t||{},p=this.#u(t,"maxWidth"),c=["sm","md","lg","xl"].some(m=>this.#u(n,m));if(!r&&!p&&!c)return{sm:void 0,md:void 0,lg:void 0,xl:void 0};let d=t?.maxWidth,l=this.#s(i,16),u=this.#s(d,a.xl),h={sm:this.#s(s.sm,a.sm),md:this.#s(s.md,a.md),lg:this.#s(s.lg,a.lg),xl:this.#s(s.xl,a.xl)},f=m=>m?Math.max(320,m-l*2):u,y={sm:Math.min(u,f(h.sm)),md:Math.min(u,f(h.md)),lg:Math.min(u,f(h.lg)),xl:Math.max(320,u)};return{sm:this.#o(n.sm,`${y.sm}px`),md:this.#o(n.md,`${y.md}px`),lg:this.#o(n.lg,`${y.lg}px`),xl:this.#o(n.xl,`${y.xl}px`)}}#u(t,e){if(!t||typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,e))return!1;let r=t[e];return!(r==null||typeof r=="string"&&r.trim().length===0)}#o(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 r=parseFloat(t);if(Number.isFinite(r))return r}return e}#D(t){let{transitionSpeed:e=g.TransitionSpeeds.normal,animationEasing:r=g.AnimationEasings["ease-out"]}=t,a;return typeof e=="number"?a=e:typeof e=="string"&&g.TransitionSpeeds[e]?a=g.TransitionSpeeds[e]:a=g.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#_(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#H(t){let{set:e="phosphor",weight:r="regular",defaultSize:a=24,sizes:n={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:r,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(n).map(([p,c])=>[p,`${c}px`])),spritePath:i,externalPath:s}}#q(t){let e=[];e.push(` /* Colors */
|
|
20
|
+
`);let r=(a,n="")=>{Object.entries(a).forEach(([i,s])=>{typeof s=="object"&&s!==null?r(s,`${n}${i}-`):typeof s=="string"&&e.push(` --color-${n}${i}: ${s};
|
|
21
|
+
`)})};return Object.entries(t).forEach(([a,n])=>{a!=="dark"&&a!=="surfaceSmart"&&a!=="interactive"&&typeof n=="object"&&n!==null&&r(n,`${a}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
|
+
`),Object.entries(t.surfaceSmart).forEach(([a,n])=>{e.push(` --surface-${a}-bg: ${n.bg};
|
|
23
|
+
`),e.push(` --surface-${a}-text: ${n.text};
|
|
24
|
+
`),e.push(` --surface-${a}-text-secondary: ${n.textSecondary};
|
|
25
|
+
`),e.push(` --surface-${a}-text-muted: ${n.textMuted};
|
|
26
|
+
`),e.push(` --surface-${a}-icon: ${n.icon};
|
|
27
|
+
`),e.push(` --surface-${a}-icon-subtle: ${n.iconSubtle};
|
|
28
|
+
`),e.push(` --surface-${a}-shadow: ${n.shadow};
|
|
29
|
+
`),e.push(` --surface-${a}-border: ${n.border};
|
|
30
30
|
`)}),e.push(`
|
|
31
31
|
`)),e.push(` /* Semantic Text Colors */
|
|
32
32
|
`),e.push(` --color-text-primary: var(--color-gray-900);
|
|
@@ -59,73 +59,73 @@ var qe=Object.defineProperty;var D=(a,t)=>()=>(a&&(t=a(a=0)),t);var U=(a,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.#G(t)),`${e.join("")}
|
|
63
|
+
`}#G(t){let e=t.primary?.[500]||"#3b82f6",r=t.secondary?.[500]||"#8b5cf6",a=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, ${r} 22%, transparent) 0px, transparent 50%),
|
|
67
|
-
radial-gradient(at 52% 99%, color-mix(in oklab, ${
|
|
67
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
68
68
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${e} 15%, transparent) 0px, transparent 50%);
|
|
69
69
|
|
|
70
70
|
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 24%, transparent) 0px, transparent 50%),
|
|
71
71
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${e} 20%, transparent) 0px, transparent 50%),
|
|
72
|
-
radial-gradient(at 0% 50%, color-mix(in oklab, ${
|
|
72
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
73
73
|
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
74
74
|
|
|
75
|
-
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${
|
|
75
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${a} 21%, transparent) 0px, transparent 50%),
|
|
76
76
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${e} 23%, transparent) 0px, transparent 50%),
|
|
77
77
|
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
78
|
-
radial-gradient(at 90% 90%, color-mix(in oklab, ${
|
|
78
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%);
|
|
79
79
|
|
|
80
80
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${e} 19%, transparent) 0px, transparent 50%),
|
|
81
81
|
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 22%, transparent) 0px, transparent 50%),
|
|
82
|
-
radial-gradient(at 90% 60%, color-mix(in oklab, ${
|
|
82
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
83
83
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${e} 16%, transparent) 0px, transparent 50%);
|
|
84
84
|
|
|
85
85
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${e} 23%, transparent) 0px, transparent 50%),
|
|
86
|
-
radial-gradient(at 10% 10%, color-mix(in oklab, ${
|
|
86
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
87
87
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
88
|
-
radial-gradient(at 50% 90%, color-mix(in oklab, ${
|
|
89
|
-
`}#
|
|
90
|
-
`];return Object.entries(t).forEach(([r,
|
|
88
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 15%, transparent) 0px, transparent 50%);
|
|
89
|
+
`}#V(t){let e=[` /* Spacing */
|
|
90
|
+
`];return Object.entries(t).forEach(([r,a])=>{r!=null&&r!=="NaN"&&a!==void 0&&!a.includes("NaN")&&e.push(` --spacing-${r}: ${a};
|
|
91
91
|
`)}),`${e.join("")}
|
|
92
|
-
`}#
|
|
93
|
-
`];return Object.entries(t).forEach(([r,
|
|
92
|
+
`}#J(t){let e=[` /* Border Radius */
|
|
93
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --radius-${r}: ${a};
|
|
94
94
|
`)}),`${e.join("")}
|
|
95
|
-
`}#
|
|
96
|
-
`];return Object.entries(t).forEach(([r,
|
|
95
|
+
`}#Q(t){let e=[` /* Border Widths */
|
|
96
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --border-width-${r}: ${a};
|
|
97
97
|
`)}),`${e.join("")}
|
|
98
|
-
`}#
|
|
99
|
-
`];return Object.entries(t).forEach(([r,
|
|
98
|
+
`}#Z(t){let e=[` /* Typography */
|
|
99
|
+
`];return Object.entries(t).forEach(([r,a])=>{let n=r.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(a).forEach(([i,s])=>{let p=i.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(` --font-${n}-${p}: ${s};
|
|
100
100
|
`)})}),`${e.join("")}
|
|
101
|
-
`}#
|
|
102
|
-
`];return Object.entries(t).forEach(([r,
|
|
101
|
+
`}#g(t){let e=[` /* Shadows */
|
|
102
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --shadow-${r}: ${a};
|
|
103
103
|
`)}),`${e.join("")}
|
|
104
104
|
`}#Y(t){let e=[` /* Layout */
|
|
105
|
-
`];return Object.entries(t).forEach(([r,
|
|
105
|
+
`];return Object.entries(t).forEach(([r,a])=>{let n=r.replace(/([A-Z])/g,"-$1").toLowerCase();a!=null&&r!=="breakpoints"&&e.push(` --layout-${n}: ${a};
|
|
106
106
|
`)}),`${e.join("")}
|
|
107
|
-
`}#
|
|
108
|
-
`];return Object.entries(t).forEach(([r,
|
|
107
|
+
`}#K(t){let e=[` /* Transitions */
|
|
108
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --transition-${r}: ${a};
|
|
109
109
|
`)}),`${e.join("")}
|
|
110
|
-
`}#
|
|
111
|
-
`];return Object.entries(t).forEach(([r,
|
|
110
|
+
`}#X(t){let e=[` /* Z-Index */
|
|
111
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --z-${r}: ${a};
|
|
112
112
|
`)}),`${e.join("")}
|
|
113
|
-
`}#
|
|
113
|
+
`}#ee(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
|
-
`),Object.entries(t.sizes).forEach(([r,
|
|
117
|
+
`),Object.entries(t.sizes).forEach(([r,a])=>{e.push(` --icon-size-${r}: ${a};
|
|
118
118
|
`)}),`${e.join("")}
|
|
119
|
-
`}#
|
|
120
|
-
`)})};Object.entries(t.dark).forEach(([l,
|
|
121
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([l,
|
|
122
|
-
`),n.push(` --surface-${l}-text: ${
|
|
123
|
-
`),n.push(` --surface-${l}-text-secondary: ${
|
|
124
|
-
`),n.push(` --surface-${l}-text-muted: ${
|
|
125
|
-
`),n.push(` --surface-${l}-icon: ${
|
|
126
|
-
`),n.push(` --surface-${l}-icon-subtle: ${
|
|
127
|
-
`),n.push(` --surface-${l}-shadow: ${
|
|
128
|
-
`),n.push(` --surface-${l}-border: ${
|
|
119
|
+
`}#te(t,e){if(!t?.dark)return"";let r=[],a=(l,u="")=>{Object.entries(l).forEach(([h,f])=>{typeof f=="object"&&f!==null?a(f,`${u}${h}-`):typeof f=="string"&&r.push(` --color-${u}${h}: ${f};
|
|
120
|
+
`)})};Object.entries(t.dark).forEach(([l,u])=>{l!=="surfaceSmart"&&typeof u=="object"&&u!==null&&a(u,`${l}-`)});let n=[];t.dark.surfaceSmart&&(n.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
121
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([l,u])=>{n.push(` --surface-${l}-bg: ${u.bg};
|
|
122
|
+
`),n.push(` --surface-${l}-text: ${u.text};
|
|
123
|
+
`),n.push(` --surface-${l}-text-secondary: ${u.textSecondary};
|
|
124
|
+
`),n.push(` --surface-${l}-text-muted: ${u.textMuted};
|
|
125
|
+
`),n.push(` --surface-${l}-icon: ${u.icon};
|
|
126
|
+
`),n.push(` --surface-${l}-icon-subtle: ${u.iconSubtle};
|
|
127
|
+
`),n.push(` --surface-${l}-shadow: ${u.shadow};
|
|
128
|
+
`),n.push(` --surface-${l}-border: ${u.border};
|
|
129
129
|
`)}),n.push(`
|
|
130
130
|
`));let i=` --color-text-primary: var(--color-gray-100);
|
|
131
131
|
--color-text-secondary: var(--color-gray-300);
|
|
@@ -149,18 +149,18 @@ var qe=Object.defineProperty;var D=(a,t)=>()=>(a&&(t=a(a=0)),t);var U=(a,t)=>{fo
|
|
|
149
149
|
|
|
150
150
|
/* Legacy alias for backwards compatibility */
|
|
151
151
|
--backdrop-background: var(--backdrop-bg);
|
|
152
|
-
`,
|
|
153
|
-
${[...r,...n,...
|
|
154
|
-
`}#
|
|
155
|
-
`)})};Object.entries(t.dark).forEach(([
|
|
156
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([
|
|
157
|
-
`),n.push(` --surface-${
|
|
158
|
-
`),n.push(` --surface-${
|
|
159
|
-
`),n.push(` --surface-${
|
|
160
|
-
`),n.push(` --surface-${
|
|
161
|
-
`),n.push(` --surface-${
|
|
162
|
-
`),n.push(` --surface-${
|
|
163
|
-
`),n.push(` --surface-${
|
|
152
|
+
`,p=this.#ae(t),c=e?[this.#g(e)]:[];return`html[data-theme="dark"] {
|
|
153
|
+
${[...r,...n,...c,i,s,p].join("")}}
|
|
154
|
+
`}#re(t,e){if(!t?.dark)return"";let r=[],a=(u,h="")=>{Object.entries(u).forEach(([f,y])=>{typeof y=="object"&&y!==null?a(y,`${h}${f}-`):typeof y=="string"&&r.push(` --color-${h}${f}: ${y};
|
|
155
|
+
`)})};Object.entries(t.dark).forEach(([u,h])=>{u!=="surfaceSmart"&&typeof h=="object"&&h!==null&&a(h,`${u}-`)});let n=[];t.dark.surfaceSmart&&(n.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
156
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([u,h])=>{n.push(` --surface-${u}-bg: ${h.bg};
|
|
157
|
+
`),n.push(` --surface-${u}-text: ${h.text};
|
|
158
|
+
`),n.push(` --surface-${u}-text-secondary: ${h.textSecondary};
|
|
159
|
+
`),n.push(` --surface-${u}-text-muted: ${h.textMuted};
|
|
160
|
+
`),n.push(` --surface-${u}-icon: ${h.icon};
|
|
161
|
+
`),n.push(` --surface-${u}-icon-subtle: ${h.iconSubtle};
|
|
162
|
+
`),n.push(` --surface-${u}-shadow: ${h.shadow};
|
|
163
|
+
`),n.push(` --surface-${u}-border: ${h.border};
|
|
164
164
|
`)}),n.push(`
|
|
165
165
|
`));let i=[];t.interactive&&t.interactive.dark&&(i.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
166
166
|
`),i.push(` --color-primary-fill: ${t.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
@@ -173,7 +173,7 @@ ${[...r,...n,...u,i,s,c].join("")}}
|
|
|
173
173
|
`,` --color-input-disabled-bg: var(--color-gray-900);
|
|
174
174
|
`,` --color-input-disabled-text: var(--color-gray-600);
|
|
175
175
|
`,` --color-code-bg: var(--color-gray-800);
|
|
176
|
-
`,...i].join(""),
|
|
176
|
+
`,...i].join(""),p=` /* Backdrop tokens - dark mode */
|
|
177
177
|
--backdrop-bg: linear-gradient(
|
|
178
178
|
135deg,
|
|
179
179
|
rgba(0, 0, 0, 0.6),
|
|
@@ -187,61 +187,61 @@ ${[...r,...n,...u,i,s,c].join("")}}
|
|
|
187
187
|
|
|
188
188
|
/* Legacy alias for backwards compatibility */
|
|
189
189
|
--backdrop-background: var(--backdrop-bg);
|
|
190
|
-
`,
|
|
190
|
+
`,c=this.#oe(t),d=e?[this.#g(e)]:[];return`
|
|
191
191
|
html[data-theme="dark"] {
|
|
192
|
-
${[...r,...n,...d,s,c
|
|
193
|
-
`}#
|
|
192
|
+
${[...r,...n,...d,s,p,c].join("")} }
|
|
193
|
+
`}#oe(t){let e=t.dark||t,r=e.primary?.[400]||"#60a5fa",a=e.secondary?.[400]||"#a78bfa",n=e.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
194
194
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
195
|
-
radial-gradient(at 97% 21%, color-mix(in oklab, ${
|
|
195
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
196
196
|
radial-gradient(at 52% 99%, color-mix(in oklab, ${n} 13%, transparent) 0px, transparent 50%),
|
|
197
197
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
198
198
|
|
|
199
|
-
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${
|
|
199
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
200
200
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
201
201
|
radial-gradient(at 0% 50%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
202
|
-
radial-gradient(at 80% 100%, color-mix(in oklab, ${
|
|
202
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
203
203
|
|
|
204
204
|
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${n} 15%, transparent) 0px, transparent 50%),
|
|
205
205
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
206
|
-
radial-gradient(at 50% 80%, color-mix(in oklab, ${
|
|
206
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
207
207
|
radial-gradient(at 90% 90%, color-mix(in oklab, ${n} 11%, transparent) 0px, transparent 50%);
|
|
208
208
|
|
|
209
209
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
210
|
-
radial-gradient(at 20% 80%, color-mix(in oklab, ${
|
|
210
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
211
211
|
radial-gradient(at 90% 60%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
212
212
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${r} 11%, transparent) 0px, transparent 50%);
|
|
213
213
|
|
|
214
214
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
215
215
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${n} 14%, transparent) 0px, transparent 50%),
|
|
216
|
-
radial-gradient(at 90% 10%, color-mix(in oklab, ${
|
|
216
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
217
217
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${n} 10%, transparent) 0px, transparent 50%);
|
|
218
|
-
`}#
|
|
218
|
+
`}#ae(t){let e=t.dark||t,r=e.primary?.[400]||"#60a5fa",a=e.secondary?.[400]||"#a78bfa",n=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, ${r} 20%, transparent) 0px, transparent 50%),
|
|
221
|
-
radial-gradient(at 97% 21%, color-mix(in oklab, ${
|
|
221
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
222
222
|
radial-gradient(at 52% 99%, color-mix(in oklab, ${n} 13%, transparent) 0px, transparent 50%),
|
|
223
223
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
224
224
|
|
|
225
|
-
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${
|
|
225
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
226
226
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
227
227
|
radial-gradient(at 0% 50%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
228
|
-
radial-gradient(at 80% 100%, color-mix(in oklab, ${
|
|
228
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
229
229
|
|
|
230
230
|
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${n} 15%, transparent) 0px, transparent 50%),
|
|
231
231
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
232
|
-
radial-gradient(at 50% 80%, color-mix(in oklab, ${
|
|
232
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
233
233
|
radial-gradient(at 90% 90%, color-mix(in oklab, ${n} 11%, transparent) 0px, transparent 50%);
|
|
234
234
|
|
|
235
235
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
236
|
-
radial-gradient(at 20% 80%, color-mix(in oklab, ${
|
|
236
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
237
237
|
radial-gradient(at 90% 60%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
238
238
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${r} 11%, transparent) 0px, transparent 50%);
|
|
239
239
|
|
|
240
240
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
241
241
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${n} 14%, transparent) 0px, transparent 50%),
|
|
242
|
-
radial-gradient(at 90% 10%, color-mix(in oklab, ${
|
|
242
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
243
243
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${n} 10%, transparent) 0px, transparent 50%);
|
|
244
|
-
`}#
|
|
244
|
+
`}#ne(){return`/* Callout dark mode adjustments */
|
|
245
245
|
html[data-theme="dark"] {
|
|
246
246
|
.callout-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
|
|
247
247
|
.callout-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
|
.callout-danger, .callout-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
|
+
}`}#ie(){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),""}}#se(){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""}}#ce(){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
|
+
`}#le(){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
|
+
`}#de(){let{shape:t={},spatialRhythm:e={},inputPadding:r,buttonPadding:a,focusRingWidth:n,focusRingOpacity:i,borderWidthThin:s,sectionSpacing:p,buttonMinHeight:c,inputMinHeight:d}=this.options.design,l=typeof t.borderWidth=="number"?t.borderWidth:typeof t.borderWidth=="string"?g.BorderWidths[t.borderWidth]??null:null,u=e.inputPadding??r??.75,h=e.buttonPadding??a??1,f=n||3,y=s||l||g.BorderWidths.thin,m=e.sectionSpacing??p??2,b=c||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
630
|
form {
|
|
631
631
|
margin: 0;
|
|
632
632
|
width: 100%;
|
|
@@ -755,7 +755,7 @@ input, textarea, select {
|
|
|
755
755
|
input, textarea, select {
|
|
756
756
|
width: 100%;
|
|
757
757
|
min-height: ${d||40}px;
|
|
758
|
-
padding: calc(var(--spacing-1) * ${
|
|
758
|
+
padding: calc(var(--spacing-1) * ${u}) var(--spacing-4);
|
|
759
759
|
border: var(--border-width-medium) solid var(--color-border);
|
|
760
760
|
border-radius: var(--radius-md);
|
|
761
761
|
font-family: var(--font-family-body);
|
|
@@ -886,24 +886,31 @@ input[type="range"]:active::-moz-range-thumb {
|
|
|
886
886
|
|
|
887
887
|
input[type="color"] {
|
|
888
888
|
-webkit-appearance: none;
|
|
889
|
+
appearance: none;
|
|
889
890
|
padding: 0;
|
|
890
|
-
width:
|
|
891
|
-
height:
|
|
892
|
-
|
|
893
|
-
|
|
891
|
+
width: calc(var(--spacing-8) + var(--spacing-1));
|
|
892
|
+
height: calc(var(--spacing-8) + var(--spacing-1));
|
|
893
|
+
min-height: auto;
|
|
894
|
+
border-radius: var(--radius-sm);
|
|
895
|
+
border: var(--border-width-thin) solid var(--color-border);
|
|
896
|
+
overflow: hidden;
|
|
894
897
|
cursor: pointer;
|
|
898
|
+
background: transparent;
|
|
895
899
|
|
|
896
|
-
/* The wrapper */
|
|
897
900
|
&::-webkit-color-swatch-wrapper {
|
|
898
901
|
padding: 0;
|
|
899
902
|
border-radius: inherit;
|
|
900
903
|
}
|
|
901
904
|
|
|
902
|
-
/* The swatch (the actual color box) */
|
|
903
905
|
&::-webkit-color-swatch {
|
|
904
906
|
border: none;
|
|
905
907
|
border-radius: inherit;
|
|
906
908
|
}
|
|
909
|
+
|
|
910
|
+
&::-moz-color-swatch {
|
|
911
|
+
border: none;
|
|
912
|
+
border-radius: inherit;
|
|
913
|
+
}
|
|
907
914
|
}
|
|
908
915
|
|
|
909
916
|
/* Button-style checkbox inputs outside of fieldsets */
|
|
@@ -925,8 +932,8 @@ input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
|
925
932
|
display: inline-flex;
|
|
926
933
|
align-items: center;
|
|
927
934
|
justify-content: center;
|
|
928
|
-
min-height: calc(${
|
|
929
|
-
padding: calc(var(--spacing-1) * ${
|
|
935
|
+
min-height: calc(${b}px * 0.75);
|
|
936
|
+
padding: calc(var(--spacing-1) * ${h*.6}) calc(var(--spacing-4) * 0.85);
|
|
930
937
|
border: var(--border-width-medium) solid var(--color-border);
|
|
931
938
|
border-radius: var(--radius-md);
|
|
932
939
|
font-family: var(--font-family-body);
|
|
@@ -1029,8 +1036,8 @@ fieldset[role="group"].buttons {
|
|
|
1029
1036
|
display: inline-flex;
|
|
1030
1037
|
align-items: center;
|
|
1031
1038
|
justify-content: center;
|
|
1032
|
-
min-height: calc(${
|
|
1033
|
-
padding: calc(var(--spacing-1) * ${
|
|
1039
|
+
min-height: calc(${b}px * 0.75);
|
|
1040
|
+
padding: calc(var(--spacing-1) * ${h*.6}) calc(var(--spacing-4) * 0.85);
|
|
1034
1041
|
border: var(--border-width-medium) solid var(--color-border);
|
|
1035
1042
|
border-radius: var(--radius-md);
|
|
1036
1043
|
font-family: var(--font-family-body);
|
|
@@ -1198,6 +1205,114 @@ label[data-toggle] {
|
|
|
1198
1205
|
}
|
|
1199
1206
|
}
|
|
1200
1207
|
|
|
1208
|
+
/* Color input enhancement shell - applied by enhanceColorInput on label[data-color] */
|
|
1209
|
+
label[data-color] {
|
|
1210
|
+
display: grid;
|
|
1211
|
+
gap: var(--spacing-2);
|
|
1212
|
+
|
|
1213
|
+
.color-control {
|
|
1214
|
+
display: inline-flex;
|
|
1215
|
+
align-items: center;
|
|
1216
|
+
gap: var(--spacing-3);
|
|
1217
|
+
width: fit-content;
|
|
1218
|
+
min-height: var(--input-min-height, 40px);
|
|
1219
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1220
|
+
border: var(--border-width-thin) solid var(--color-border);
|
|
1221
|
+
border-radius: var(--radius-md);
|
|
1222
|
+
background: var(--color-surface-base);
|
|
1223
|
+
color: var(--color-text-primary);
|
|
1224
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.color-control .color-swatch {
|
|
1228
|
+
position: relative;
|
|
1229
|
+
display: inline-flex;
|
|
1230
|
+
width: calc(var(--spacing-8) + var(--spacing-1));
|
|
1231
|
+
height: calc(var(--spacing-8) + var(--spacing-1));
|
|
1232
|
+
border-radius: var(--radius-sm);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.color-control output {
|
|
1236
|
+
margin: 0;
|
|
1237
|
+
min-width: 8ch;
|
|
1238
|
+
font-family: var(--font-family-mono);
|
|
1239
|
+
font-size: var(--font-size-sm);
|
|
1240
|
+
line-height: var(--font-line-height-tight);
|
|
1241
|
+
color: var(--color-text-secondary);
|
|
1242
|
+
text-transform: lowercase;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.color-control[data-unset="1"] output {
|
|
1246
|
+
font-style: italic;
|
|
1247
|
+
color: var(--color-text-muted);
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.color-control input[type="color"] {
|
|
1251
|
+
width: calc(var(--spacing-8) + var(--spacing-1));
|
|
1252
|
+
height: calc(var(--spacing-8) + var(--spacing-1));
|
|
1253
|
+
border-radius: var(--radius-sm);
|
|
1254
|
+
border: var(--border-width-thin) solid var(--color-border);
|
|
1255
|
+
background: transparent;
|
|
1256
|
+
padding: 0;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.color-control input[type="color"]::-webkit-color-swatch {
|
|
1260
|
+
border: none;
|
|
1261
|
+
border-radius: calc(var(--radius-sm) - var(--border-width-thin));
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.color-control input[type="color"]::-moz-color-swatch {
|
|
1265
|
+
border: none;
|
|
1266
|
+
border-radius: calc(var(--radius-sm) - var(--border-width-thin));
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.color-control .color-swatch[data-unset="1"]::after {
|
|
1270
|
+
content: "";
|
|
1271
|
+
position: absolute;
|
|
1272
|
+
inset: 0;
|
|
1273
|
+
border-radius: var(--radius-sm);
|
|
1274
|
+
border: var(--border-width-thin) solid var(--color-border);
|
|
1275
|
+
background-color: color-mix(in oklab, var(--color-surface-subtle) 78%, var(--color-text-primary) 22%);
|
|
1276
|
+
background-image:
|
|
1277
|
+
linear-gradient(
|
|
1278
|
+
45deg,
|
|
1279
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%) 25%,
|
|
1280
|
+
transparent 25%,
|
|
1281
|
+
transparent 75%,
|
|
1282
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%) 75%,
|
|
1283
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%)
|
|
1284
|
+
),
|
|
1285
|
+
linear-gradient(
|
|
1286
|
+
45deg,
|
|
1287
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%) 25%,
|
|
1288
|
+
transparent 25%,
|
|
1289
|
+
transparent 75%,
|
|
1290
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%) 75%,
|
|
1291
|
+
color-mix(in oklab, var(--color-surface-base) 88%, var(--color-text-primary) 12%)
|
|
1292
|
+
);
|
|
1293
|
+
background-size: calc(var(--spacing-2) * 1.25) calc(var(--spacing-2) * 1.25);
|
|
1294
|
+
background-position:
|
|
1295
|
+
0 0,
|
|
1296
|
+
calc(var(--spacing-2) * 0.625) calc(var(--spacing-2) * 0.625);
|
|
1297
|
+
pointer-events: none;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
.color-control .color-swatch[data-unset="1"] input[type="color"] {
|
|
1301
|
+
opacity: 0;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
&:focus-within .color-control {
|
|
1305
|
+
border-color: var(--color-primary-500);
|
|
1306
|
+
box-shadow: 0 0 0 ${f}px color-mix(in oklab, var(--color-primary-500) ${Math.round((i||.3)*100)}%, transparent);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
&:has(input[type="color"]:disabled) .color-control {
|
|
1310
|
+
background: var(--color-input-disabled-bg);
|
|
1311
|
+
color: var(--color-input-disabled-text);
|
|
1312
|
+
cursor: not-allowed;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1201
1316
|
input[type="file"] {
|
|
1202
1317
|
padding: var(--spacing-2) var(--spacing-4);
|
|
1203
1318
|
cursor: pointer;
|
|
@@ -1227,8 +1342,8 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1227
1342
|
gap: var(--spacing-1);
|
|
1228
1343
|
align-items: center;
|
|
1229
1344
|
justify-content: center;
|
|
1230
|
-
min-height: ${
|
|
1231
|
-
padding: calc(var(--spacing-1) * ${
|
|
1345
|
+
min-height: ${b}px;
|
|
1346
|
+
padding: calc(var(--spacing-1) * ${h}) var(--spacing-6);
|
|
1232
1347
|
border: var(--border-width-medium) solid transparent;
|
|
1233
1348
|
border-radius: var(--radius-md);
|
|
1234
1349
|
font-family: var(--font-family-body);
|
|
@@ -1336,20 +1451,20 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1336
1451
|
.btn-sm {
|
|
1337
1452
|
padding: var(--spacing-2) var(--spacing-4);
|
|
1338
1453
|
font-size: var(--font-size-sm);
|
|
1339
|
-
min-height: calc(${
|
|
1454
|
+
min-height: calc(${b}px * 0.8);
|
|
1340
1455
|
}
|
|
1341
1456
|
|
|
1342
1457
|
.btn-xs {
|
|
1343
1458
|
padding: var(--spacing-1) var(--spacing-2);
|
|
1344
1459
|
font-size: var(--font-size-xs);
|
|
1345
|
-
min-height: calc(${
|
|
1460
|
+
min-height: calc(${b}px * 0.6);
|
|
1346
1461
|
}
|
|
1347
1462
|
|
|
1348
1463
|
|
|
1349
1464
|
.btn-lg {
|
|
1350
1465
|
padding: var(--spacing-4) var(--spacing-8);
|
|
1351
1466
|
font-size: var(--font-size-lg);
|
|
1352
|
-
min-height: calc(${
|
|
1467
|
+
min-height: calc(${b}px * 1.2);
|
|
1353
1468
|
}
|
|
1354
1469
|
|
|
1355
1470
|
/* Working/loading state for buttons */
|
|
@@ -1401,7 +1516,7 @@ a.btn-working {
|
|
|
1401
1516
|
color: var(--color-text-secondary);
|
|
1402
1517
|
padding: var(--spacing-6) var(--spacing-4);
|
|
1403
1518
|
background-color: var(--color-surface-subtle);
|
|
1404
|
-
max-width: var(--layout-max-width-md);
|
|
1519
|
+
max-width: var(--layout-max-width-md, 736px);
|
|
1405
1520
|
border-radius: var(--radius-md);
|
|
1406
1521
|
nav {
|
|
1407
1522
|
margin-top: var(--spacing-4);
|
|
@@ -1573,7 +1688,7 @@ a.btn-working {
|
|
|
1573
1688
|
}
|
|
1574
1689
|
}
|
|
1575
1690
|
|
|
1576
|
-
`}#
|
|
1691
|
+
`}#pe(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Table Styles - Mobile First */
|
|
1577
1692
|
|
|
1578
1693
|
table {
|
|
1579
1694
|
width: 100%;
|
|
@@ -1654,7 +1769,7 @@ tbody {
|
|
|
1654
1769
|
}
|
|
1655
1770
|
}
|
|
1656
1771
|
|
|
1657
|
-
`}#
|
|
1772
|
+
`}#ue(){return`/* Callout/Notification Styles */
|
|
1658
1773
|
|
|
1659
1774
|
.callout {
|
|
1660
1775
|
padding: var(--spacing-4);
|
|
@@ -1735,7 +1850,7 @@ tbody {
|
|
|
1735
1850
|
}
|
|
1736
1851
|
}
|
|
1737
1852
|
|
|
1738
|
-
`}#
|
|
1853
|
+
`}#ge(){return`/* Accordion (details/summary) */
|
|
1739
1854
|
|
|
1740
1855
|
:where(.accordion details) {
|
|
1741
1856
|
border: var(--border-width-thin) solid var(--color-border);
|
|
@@ -1827,7 +1942,7 @@ tbody {
|
|
|
1827
1942
|
}
|
|
1828
1943
|
}
|
|
1829
1944
|
}
|
|
1830
|
-
`}#
|
|
1945
|
+
`}#me(){return`/* Badge/Pill Styles */
|
|
1831
1946
|
|
|
1832
1947
|
.badge {
|
|
1833
1948
|
display: inline-flex;
|
|
@@ -1867,7 +1982,7 @@ tbody {
|
|
|
1867
1982
|
.badge-lg { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
|
|
1868
1983
|
.pill { padding: var(--spacing-1) var(--spacing-3); border-radius: var(--radius-full); }
|
|
1869
1984
|
|
|
1870
|
-
`}#
|
|
1985
|
+
`}#he(){let{layout:t={},behavior:e={}}=this.options.design;return`/* ============================================================================
|
|
1871
1986
|
Dialog Primitive
|
|
1872
1987
|
Native <dialog> element with PDS integration
|
|
1873
1988
|
============================================================================ */
|
|
@@ -2109,7 +2224,13 @@ dialog.dialog-full { width: calc(100vw - var(--spacing-8)); max-width: calc(100v
|
|
|
2109
2224
|
dialog, dialog::backdrop { transition-duration: 0.01s !important; }
|
|
2110
2225
|
}
|
|
2111
2226
|
|
|
2112
|
-
|
|
2227
|
+
html:has(dialog[open]:modal) {
|
|
2228
|
+
overflow: hidden;
|
|
2229
|
+
scrollbar-gutter: stable;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
`}#fe(){let{layout:t={}}=this.options.design;return`/* Tab Strip Component */
|
|
2113
2234
|
|
|
2114
2235
|
/* Tab navigation */
|
|
2115
2236
|
|
|
@@ -2206,7 +2327,7 @@ pds-tabstrip {
|
|
|
2206
2327
|
pds-tabstrip > pds-tabpanel[data-tabpanel] { padding: var(--spacing-3) 0; }
|
|
2207
2328
|
}
|
|
2208
2329
|
|
|
2209
|
-
`}#
|
|
2330
|
+
`}#be(){return`/* Custom Scrollbars */
|
|
2210
2331
|
::-webkit-scrollbar { width: 12px; height: 12px; }
|
|
2211
2332
|
::-webkit-scrollbar-track { background: transparent; }
|
|
2212
2333
|
::-webkit-scrollbar-thumb {
|
|
@@ -2232,7 +2353,7 @@ pds-tabstrip {
|
|
|
2232
2353
|
*:hover { scrollbar-color: var(--color-secondary-400) transparent; }
|
|
2233
2354
|
@media (prefers-color-scheme: dark) { *:hover { scrollbar-color: var(--color-secondary-500) transparent; } }
|
|
2234
2355
|
|
|
2235
|
-
`}#
|
|
2356
|
+
`}#ye(){let{a11y:t={}}=this.options.design,e=t.minTouchTarget||g.TouchTargetSizes.standard;return`/* Icon System */
|
|
2236
2357
|
|
|
2237
2358
|
pds-icon {
|
|
2238
2359
|
display: inline-flex;
|
|
@@ -2302,7 +2423,7 @@ button, a {
|
|
|
2302
2423
|
input { padding-left: var(--spacing-4); padding-right: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
|
|
2303
2424
|
}
|
|
2304
2425
|
|
|
2305
|
-
`}#
|
|
2426
|
+
`}#ve(){return`/* Dropdown Component */
|
|
2306
2427
|
|
|
2307
2428
|
/* Basic dropdown host */
|
|
2308
2429
|
nav[data-dropdown] {
|
|
@@ -2455,7 +2576,7 @@ nav[data-dropdown] {
|
|
|
2455
2576
|
scale: 0.95;
|
|
2456
2577
|
}
|
|
2457
2578
|
}
|
|
2458
|
-
`}#
|
|
2579
|
+
`}#xe(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=t.gridSystem||{},a=r.columns||[1,2,3,4,6],n=r.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=this.#M(t),s=[`
|
|
2459
2580
|
/* ============================================================================
|
|
2460
2581
|
Layout Utilities
|
|
2461
2582
|
Modern grid and flex system for building responsive layouts
|
|
@@ -2476,10 +2597,10 @@ nav[data-dropdown] {
|
|
|
2476
2597
|
gap: var(--spacing-4);
|
|
2477
2598
|
}
|
|
2478
2599
|
|
|
2479
|
-
`];for(let
|
|
2600
|
+
`];for(let p of a)s.push(`.grid-cols-${p} { grid-template-columns: repeat(${p}, 1fr); }
|
|
2480
2601
|
`);s.push(`
|
|
2481
2602
|
/* Auto-fit grids (responsive) */
|
|
2482
|
-
`);for(let[c
|
|
2603
|
+
`);for(let[p,c]of Object.entries(n))s.push(`.grid-auto-${p} { grid-template-columns: repeat(auto-fit, minmax(${c}, 1fr)); }
|
|
2483
2604
|
`);return s.push(`
|
|
2484
2605
|
/* Gap utilities */
|
|
2485
2606
|
.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); }
|
|
@@ -2561,7 +2682,7 @@ nav[data-dropdown] {
|
|
|
2561
2682
|
.backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
|
|
2562
2683
|
.backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
|
|
2563
2684
|
.backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
|
|
2564
|
-
`),s.join("")}#
|
|
2685
|
+
`),s.join("")}#we(){return`/* Media Element Utilities */
|
|
2565
2686
|
|
|
2566
2687
|
/* Gallery images */
|
|
2567
2688
|
.img-gallery {
|
|
@@ -2599,7 +2720,7 @@ nav[data-dropdown] {
|
|
|
2599
2720
|
height: auto;
|
|
2600
2721
|
}
|
|
2601
2722
|
|
|
2602
|
-
`}#
|
|
2723
|
+
`}#ke(){let{layout:t={},a11y:e={}}=this.options.design,r=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},a=e.minTouchTarget||g.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2603
2724
|
|
|
2604
2725
|
/* Small devices (${r.sm}px and up) */
|
|
2605
2726
|
@media (min-width: ${r.sm}px) {
|
|
@@ -2621,8 +2742,8 @@ nav[data-dropdown] {
|
|
|
2621
2742
|
/* Touch devices - larger touch targets for interactive elements */
|
|
2622
2743
|
button, a, select, textarea,
|
|
2623
2744
|
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2624
|
-
min-height: ${
|
|
2625
|
-
min-width: ${
|
|
2745
|
+
min-height: ${a}px;
|
|
2746
|
+
min-width: ${a}px;
|
|
2626
2747
|
}
|
|
2627
2748
|
|
|
2628
2749
|
/* Radio and checkbox inputs: keep reasonable size but ensure label tap area is large */
|
|
@@ -2639,7 +2760,7 @@ nav[data-dropdown] {
|
|
|
2639
2760
|
label:has(input[type="checkbox"]):not(fieldset.buttons label),
|
|
2640
2761
|
fieldset[role="radiogroup"]:not(.buttons) label,
|
|
2641
2762
|
fieldset[role="group"]:not(.buttons) label {
|
|
2642
|
-
min-height: ${
|
|
2763
|
+
min-height: ${a}px;
|
|
2643
2764
|
display: inline-flex;
|
|
2644
2765
|
align-items: center;
|
|
2645
2766
|
padding: var(--spacing-2) 0;
|
|
@@ -2703,23 +2824,23 @@ nav[data-dropdown] {
|
|
|
2703
2824
|
}
|
|
2704
2825
|
}
|
|
2705
2826
|
|
|
2706
|
-
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,
|
|
2827
|
+
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,a=parseInt(t.slice(5,7),16)/255,n=Math.max(e,r,a),i=Math.min(e,r,a),s,p,c=(n+i)/2;if(n===i)s=p=0;else{let d=n-i;switch(p=c>.5?d/(2-n-i):d/(n+i),n){case e:s=(r-a)/d+(r<a?6:0);break;case r:s=(a-e)/d+2;break;case a:s=(e-r)/d+4;break}s/=6}return{h:s*360,s:p*100,l:c*100}}#t(t,e,r){t=t/360,e=e/100,r=r/100;let a=(c,d,l)=>(l<0&&(l+=1),l>1&&(l-=1),l<1/6?c+(d-c)*6*l:l<1/2?d:l<2/3?c+(d-c)*(2/3-l)*6:c),n,i,s;if(e===0)n=i=s=r;else{let c=r<.5?r*(1+e):r+e-r*e,d=2*r-c;n=a(d,c,t+1/3),i=a(d,c,t),s=a(d,c,t-1/3)}let p=c=>{let d=Math.round(c*255).toString(16);return d.length===1?"0"+d:d};return`#${p(n)}${p(i)}${p(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#Se(){this.#e={tokens:this.#$e(),primitives:this.#ze(),components:this.#Me(),utilities:this.#Ee()},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`})}#$e(){let{colors:t,spacing:e,radius:r,borderWidths:a,typography:n,shadows:i,darkShadows:s,layout:p,transitions:c,zIndex:d,icons:l}=this.tokens,u=[`@layer tokens {
|
|
2707
2828
|
:root {
|
|
2708
|
-
${this.#
|
|
2709
|
-
${this.#
|
|
2710
|
-
${this.#
|
|
2711
|
-
${this.#
|
|
2712
|
-
${this.#
|
|
2713
|
-
${this.#
|
|
2714
|
-
${this.#Y(
|
|
2715
|
-
${this.#
|
|
2716
|
-
${this.#
|
|
2717
|
-
${this.#
|
|
2829
|
+
${this.#q(t)}
|
|
2830
|
+
${this.#V(e)}
|
|
2831
|
+
${this.#J(r)}
|
|
2832
|
+
${this.#Q(a)}
|
|
2833
|
+
${this.#Z(n)}
|
|
2834
|
+
${this.#g(i)}
|
|
2835
|
+
${this.#Y(p)}
|
|
2836
|
+
${this.#K(c)}
|
|
2837
|
+
${this.#X(d)}
|
|
2838
|
+
${this.#ee(l)}
|
|
2718
2839
|
}
|
|
2719
|
-
${this.#
|
|
2720
|
-
}`];return
|
|
2840
|
+
${this.#re(t,s)}
|
|
2841
|
+
}`];return u.push(`
|
|
2721
2842
|
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2722
|
-
`),
|
|
2843
|
+
`),u.push(this.#te(t,s)),u.join("")}#ze(){let{advanced:t={},a11y:e={},layout:r={}}=this.options.design,a=t.tabSize||g.TabSizes.standard,n=e.minTouchTarget||g.TouchTargetSizes.standard,i=r.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2723
2844
|
/* Base HTML reset */
|
|
2724
2845
|
*, *::before, *::after {
|
|
2725
2846
|
box-sizing: border-box;
|
|
@@ -2735,7 +2856,7 @@ nav[data-dropdown] {
|
|
|
2735
2856
|
-webkit-text-size-adjust: 100%;
|
|
2736
2857
|
-webkit-font-smoothing: antialiased;
|
|
2737
2858
|
-moz-osx-font-smoothing: grayscale;
|
|
2738
|
-
tab-size: ${
|
|
2859
|
+
tab-size: ${a};
|
|
2739
2860
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
2740
2861
|
}
|
|
2741
2862
|
|
|
@@ -3068,25 +3189,25 @@ nav[data-dropdown] {
|
|
|
3068
3189
|
}
|
|
3069
3190
|
}
|
|
3070
3191
|
|
|
3071
|
-
`}#
|
|
3072
|
-
|
|
3073
|
-
${this.#ce()}
|
|
3192
|
+
`}#Me(){return`@layer components {
|
|
3074
3193
|
|
|
3075
3194
|
${this.#le()}
|
|
3076
3195
|
|
|
3077
|
-
${this.#
|
|
3196
|
+
${this.#de()}
|
|
3078
3197
|
|
|
3079
|
-
${this.#
|
|
3198
|
+
${this.#ue()}
|
|
3080
3199
|
|
|
3081
3200
|
${this.#me()}
|
|
3082
3201
|
|
|
3083
|
-
${this.#
|
|
3202
|
+
${this.#he()}
|
|
3084
3203
|
|
|
3085
|
-
${this.#
|
|
3204
|
+
${this.#ge()}
|
|
3086
3205
|
|
|
3087
|
-
${this.#
|
|
3206
|
+
${this.#ve()}
|
|
3088
3207
|
|
|
3089
|
-
${this.#
|
|
3208
|
+
${this.#fe()}
|
|
3209
|
+
|
|
3210
|
+
${this.#pe()}
|
|
3090
3211
|
|
|
3091
3212
|
/* Card component */
|
|
3092
3213
|
|
|
@@ -3128,25 +3249,25 @@ ${this.#de()}
|
|
|
3128
3249
|
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
3129
3250
|
}
|
|
3130
3251
|
|
|
3131
|
-
${this.#
|
|
3252
|
+
${this.#be()}
|
|
3132
3253
|
|
|
3133
|
-
${this.#
|
|
3254
|
+
${this.#ne()}
|
|
3134
3255
|
|
|
3135
3256
|
}
|
|
3136
|
-
`}#
|
|
3257
|
+
`}#Ee(){return`@layer utilities {
|
|
3137
3258
|
|
|
3138
|
-
${this.#
|
|
3259
|
+
${this.#ye()}
|
|
3139
3260
|
|
|
3140
|
-
${this.#
|
|
3261
|
+
${this.#xe()}
|
|
3141
3262
|
|
|
3142
3263
|
/* Optional utilities/features controlled by config options */
|
|
3143
3264
|
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
3144
3265
|
/* - Liquid glass utility class */
|
|
3145
|
-
${this.#ne()}
|
|
3146
3266
|
${this.#ie()}
|
|
3147
|
-
|
|
3148
3267
|
${this.#se()}
|
|
3149
3268
|
|
|
3269
|
+
${this.#ce()}
|
|
3270
|
+
|
|
3150
3271
|
/* Surface utilities */
|
|
3151
3272
|
|
|
3152
3273
|
.surface {
|
|
@@ -3326,22 +3447,22 @@ html[data-theme="dark"] .surface-inverse {
|
|
|
3326
3447
|
}
|
|
3327
3448
|
|
|
3328
3449
|
|
|
3329
|
-
${this.#xe()}
|
|
3330
|
-
|
|
3331
3450
|
${this.#we()}
|
|
3332
3451
|
|
|
3452
|
+
${this.#ke()}
|
|
3453
|
+
|
|
3333
3454
|
}
|
|
3334
|
-
`}#
|
|
3455
|
+
`}#Ce(){this.#a={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#Fe()}#Fe(){this.#a.tokens.replaceSync(this.#e.tokens),this.#a.primitives.replaceSync(this.#e.primitives),this.#a.components.replaceSync(this.#e.components),this.#a.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}
|
|
3335
3456
|
${this.#e.primitives}
|
|
3336
3457
|
${this.#e.components}
|
|
3337
|
-
${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
|
|
3458
|
+
${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 L<"u"?L:null,enums:typeof g<"u"?g: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[r,a]of Object.entries(e))typeof a=="object"&&a!==null&&t.push({name:r,scale:a});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 r=this.options.design||{};return JSON.stringify(r).includes(e)}}}}get tokensStylesheet(){return this.#a?.tokens}get primitivesStylesheet(){return this.#a?.primitives}get componentsStylesheet(){return this.#a?.components}get utilitiesStylesheet(){return this.#a?.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 r=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${t}
|
|
3338
3459
|
// Auto-generated - do not edit directly
|
|
3339
3460
|
|
|
3340
3461
|
export const ${t} = new CSSStyleSheet();
|
|
3341
3462
|
${t}.replaceSync(\`${r}\`);
|
|
3342
3463
|
|
|
3343
3464
|
export const ${t}CSS = \`${r}\`;
|
|
3344
|
-
`}};var ne=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 r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},ie=new ne;function et(a){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(a),r._pds=!0;let o=(document.adoptedStyleSheets||[]).filter(n=>n._pds!==!0);document.adoptedStyleSheets=[...o,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=a}catch(t){console.warn("installRuntimeStyles failed:",t)}}function J(a){let t=a;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}et(e)}async function ze(a,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await ie.getStylesheet("primitives");a.adoptedStyleSheets=[r,...t]}catch(r){let o=a.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,r),a.adoptedStyleSheets=t}}async function Me(a,t=["primitives"],e=[],r=null){try{let n=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return ie.getStylesheet(i)}))).filter(i=>i!==null);a.adoptedStyleSheets=[...n,...e]}catch(o){let n=a.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${n}> failed to adopt layers:`,o),a.adoptedStyleSheets=e}}var tt=[{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:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function rt(a){a.dataset.enhancedAccordion||(a.dataset.enhancedAccordion="true",a.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===a&&a.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function ot(a){if(a.dataset.enhancedDropdown)return;a.dataset.enhancedDropdown="true";let t=a.lastElementChild;if(!t)return;let e=a.querySelector("[data-dropdown-toggle]")||a.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("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 o=()=>{let l=t.getAttribute("style");t.style.visibility="hidden",t.style.display="inline-block",t.style.pointerEvents="none";let p=t.getBoundingClientRect(),m=Math.max(t.offsetWidth||0,t.scrollWidth||0,p.width||0,1),f=Math.max(t.offsetHeight||0,t.scrollHeight||0,p.height||0,1);return l===null?t.removeAttribute("style"):t.setAttribute("style",l),{width:m,height:f}},n=()=>{let l=(a.getAttribute("data-direction")||a.getAttribute("data-dropdown-direction")||a.getAttribute("data-mode")||"auto").toLowerCase();if(l==="up"||l==="down")return l;let p=(e||a).getBoundingClientRect(),{height:m}=o(),f=Math.max(0,window.innerHeight-p.bottom),b=Math.max(0,p.top),h=f>=m,y=b>=m;return h&&!y?"down":y&&!h?"up":h&&y?"down":b>f?"up":"down"},i=()=>{let l=(a.getAttribute("data-align")||a.getAttribute("data-dropdown-align")||"auto").toLowerCase();if(l==="left"||l==="right"||l==="start"||l==="end")return l==="start"?"left":l==="end"?"right":l;let p=(e||a).getBoundingClientRect(),{width:m}=o(),f=Math.max(0,window.innerWidth-p.left),b=Math.max(0,p.right),h=f>=m,y=b>=m;return h&&!y?"left":y&&!h?"right":h&&y?"left":b>f?"right":"left"},s=null,c=()=>{a.dataset.dropdownDirection=n(),a.dataset.dropdownAlign=i(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true"),s||(s=l=>{(l.composedPath?l.composedPath():[l.target]).some(f=>f===a)||u()},setTimeout(()=>{document.addEventListener("click",s)},0))},u=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false"),s&&(document.removeEventListener("click",s),s=null)},d=()=>{t.getAttribute("aria-hidden")==="false"?u():c()};e?.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),d()}),a.addEventListener("keydown",l=>{l.key==="Escape"&&(u(),e?.focus())}),a.addEventListener("focusout",l=>{l.relatedTarget&&((l.composedPath?l.composedPath():[l.relatedTarget]).some(f=>f===a)||u())})}function at(a){if(a.dataset.enhancedToggle)return;a.dataset.enhancedToggle="true";let t=a.querySelector('input[type="checkbox"]');if(!t)return;a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),a.setAttribute("role","switch"),a.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 r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),a.insertBefore(e,t.nextSibling);let o=()=>{a.setAttribute("aria-checked",t.checked?"true":"false")},n=()=>{t.disabled||(t.checked=!t.checked,o(),t.dispatchEvent(new Event("change",{bubbles:!0})))};a.addEventListener("click",i=>{i.preventDefault(),n()}),a.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),n())}),t.addEventListener("change",o)}function nt(a){if(a.dataset.enhancedRange)return;let t=a.closest("label"),e=t?.classList.contains("range-output"),r=a.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${r}-output`;if(a.id=r,e){let n=t.querySelector("span");if(n&&!n.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=n.textContent,i.appendChild(s);let c=document.createElement("output");c.id=o,c.setAttribute("for",r),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=a.value,i.appendChild(c),n.textContent="",n.appendChild(i);let u=()=>{c.textContent=a.value};a.addEventListener("input",u)}}else{let n=a.closest(".range-container");n||(n=document.createElement("div"),n.className="range-container",a.parentNode?.insertBefore(n,a),n.appendChild(a)),n.style.position="relative";let i=document.createElement("output");i.id=o,i.setAttribute("for",r),i.className="range-bubble",i.setAttribute("aria-live","polite"),n.appendChild(i);let s=()=>{let d=parseFloat(a.min)||0,l=parseFloat(a.max)||100,p=parseFloat(a.value),m=(p-d)/(l-d);i.style.left=`calc(${m*100}% )`,i.textContent=String(p)},c=()=>i.classList.add("visible"),u=()=>i.classList.remove("visible");a.addEventListener("input",s),a.addEventListener("pointerdown",c),a.addEventListener("pointerup",u),a.addEventListener("pointerleave",u),a.addEventListener("focus",c),a.addEventListener("blur",u),s()}a.dataset.enhancedRange="1"}function it(a){if(a.dataset.enhancedRequired)return;a.dataset.enhancedRequired="true";let t=e=>{let r;if(e.closest("[role$=group]")?r=e.closest("[role$=group]").querySelector("legend"):r=e.closest("label"),!r||r.querySelector(".required-asterisk"))return;let o=document.createElement("span");o.classList.add("required-asterisk"),o.textContent="*",o.style.marginLeft="4px";let n=r.querySelector("span, [data-label]");if(n)n.appendChild(o);else{let s=r.querySelector("input, select, textarea");s?r.insertBefore(o,s):r.appendChild(o)}let i=e.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};a.querySelectorAll("[required]").forEach(e=>{t(e)})}function st(a){if(a.dataset.enhancedOpenGroup)return;a.dataset.enhancedOpenGroup="true",a.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=a.querySelector('input[type="radio"], input[type="checkbox"]');a.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let o=t.value.trim();if(o){r.preventDefault();let n=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=o;let u=document.createElement("input");u.type=n,u.name=e.name||a.getAttribute("data-name")||"open-group",u.value=o,u.id=i,s.appendChild(c),s.appendChild(u),a.insertBefore(s,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let o=a.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function ct(a){if(a.dataset.enhancedClip)return;a.dataset.enhancedClip="true",a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),a.hasAttribute("role")||a.setAttribute("role","button");let t=()=>{let r=a.getAttribute("data-clip-open")==="true";a.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=a.getAttribute("data-clip-open")==="true";a.setAttribute("data-clip-open",r?"false":"true"),t()};a.addEventListener("click",r=>{r.defaultPrevented||e()}),a.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function lt(a){if(a.dataset.enhancedBtnWorking)return;a.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(o=>{o.forEach(n=>{if(n.attributeName==="class"){let i=a.classList.contains("btn-working"),s=a.querySelector("pds-icon");if(i)if(s)t||(t=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),a.insertBefore(c,a.firstChild),e=!0}else n.oldValue?.includes("btn-working")&&s&&(e?(s.remove(),e=!1):t&&(s.setAttribute("icon",t),t=null))}})}).observe(a,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var dt=new Map([[".accordion",rt],["nav[data-dropdown]",ot],["label[data-toggle]",at],['input[type="range"]',nt],["form[data-required]",it],["fieldset[role=group][data-open]",st],["[data-clip]",ct],["button, a[class*='btn-']",lt]]),Ee=tt.map(a=>({...a,run:dt.get(a.selector)||(()=>{})}));var Fe=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3465
|
+
`}};var ue=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 r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},ge=new ue;function wt(o){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(o),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(n=>n._pds!==!0);document.adoptedStyleSheets=[...a,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=o}catch(t){console.warn("installRuntimeStyles failed:",t)}}function te(o){let t=o;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}wt(e)}async function Pe(o,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await ge.getStylesheet("primitives");o.adoptedStyleSheets=[r,...t]}catch(r){let a=o.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,r),o.adoptedStyleSheets=t}}async function Ue(o,t=["primitives"],e=[],r=null){try{let n=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return ge.getStylesheet(i)}))).filter(i=>i!==null);o.adoptedStyleSheets=[...n,...e]}catch(a){let n=o.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${n}> failed to adopt layers:`,a),o.adoptedStyleSheets=e}}var kt=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:"label[data-color]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function St(o){o.dataset.enhancedAccordion||(o.dataset.enhancedAccordion="true",o.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===o&&o.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function $t(o){if(o.dataset.enhancedDropdown)return;o.dataset.enhancedDropdown="true";let t=o.lastElementChild;if(!t)return;let e=o.querySelector("[data-dropdown-toggle]")||o.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("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 l=t.getAttribute("style");t.style.visibility="hidden",t.style.display="inline-block",t.style.pointerEvents="none";let u=t.getBoundingClientRect(),h=Math.max(t.offsetWidth||0,t.scrollWidth||0,u.width||0,1),f=Math.max(t.offsetHeight||0,t.scrollHeight||0,u.height||0,1);return l===null?t.removeAttribute("style"):t.setAttribute("style",l),{width:h,height:f}},n=()=>{let l=(o.getAttribute("data-direction")||o.getAttribute("data-dropdown-direction")||o.getAttribute("data-mode")||"auto").toLowerCase();if(l==="up"||l==="down")return l;let u=(e||o).getBoundingClientRect(),{height:h}=a(),f=Math.max(0,window.innerHeight-u.bottom),y=Math.max(0,u.top),m=f>=h,b=y>=h;return m&&!b?"down":b&&!m?"up":m&&b?"down":y>f?"up":"down"},i=()=>{let l=(o.getAttribute("data-align")||o.getAttribute("data-dropdown-align")||"auto").toLowerCase();if(l==="left"||l==="right"||l==="start"||l==="end")return l==="start"?"left":l==="end"?"right":l;let u=(e||o).getBoundingClientRect(),{width:h}=a(),f=Math.max(0,window.innerWidth-u.left),y=Math.max(0,u.right),m=f>=h,b=y>=h;return m&&!b?"left":b&&!m?"right":m&&b?"left":y>f?"right":"left"},s=null,p=()=>{o.dataset.dropdownDirection=n(),o.dataset.dropdownAlign=i(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true"),s||(s=l=>{(l.composedPath?l.composedPath():[l.target]).some(f=>f===o)||c()},setTimeout(()=>{document.addEventListener("click",s)},0))},c=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false"),s&&(document.removeEventListener("click",s),s=null)},d=()=>{t.getAttribute("aria-hidden")==="false"?c():p()};e?.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),d()}),o.addEventListener("keydown",l=>{l.key==="Escape"&&(c(),e?.focus())}),o.addEventListener("focusout",l=>{l.relatedTarget&&((l.composedPath?l.composedPath():[l.relatedTarget]).some(f=>f===o)||c())})}function zt(o){if(o.dataset.enhancedToggle)return;o.dataset.enhancedToggle="true";let t=o.querySelector('input[type="checkbox"]');if(!t)return;o.hasAttribute("tabindex")||o.setAttribute("tabindex","0"),o.setAttribute("role","switch"),o.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 r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),o.insertBefore(e,t.nextSibling);let a=()=>{o.setAttribute("aria-checked",t.checked?"true":"false")},n=()=>{t.disabled||(t.checked=!t.checked,a(),t.dispatchEvent(new Event("change",{bubbles:!0})))};o.addEventListener("click",i=>{i.preventDefault(),n()}),o.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),n())}),t.addEventListener("change",a)}function Mt(o){if(o.dataset.enhancedColorInput)return;let t=o.querySelector('input[type="color"]');if(!t)return;o.dataset.enhancedColorInput="true";let e=o.querySelector(":scope > .color-control"),r=o.querySelector(":scope > .color-control > .color-swatch"),a=o.querySelector(":scope > .color-control > output");e||(e=document.createElement("span"),e.className="color-control",t.before(e)),r||(r=document.createElement("span"),r.className="color-swatch",e.appendChild(r)),t.parentElement!==r&&r.appendChild(t),a||(a=document.createElement("output"),e.appendChild(a));let n=()=>{if(t.dataset.colorUnset==="1"){a.value="",a.textContent="not set",e.dataset.value="",e.dataset.unset="1",r.dataset.unset="1";return}a.value=t.value,a.textContent=t.value,e.dataset.value=t.value,delete e.dataset.unset,delete r.dataset.unset};n();let i=()=>{t.dataset.colorUnset==="1"&&(t.dataset.colorUnset="0"),n()};t.addEventListener("input",i,{passive:!0}),t.addEventListener("change",i,{passive:!0})}function Et(o){if(o.dataset.enhancedRange)return;let t=i=>{if(o.dataset.enhancedRangeProgrammatic)return;o.dataset.enhancedRangeProgrammatic="1";let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(o),"value")||Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");s?.get&&s?.set&&Object.defineProperty(o,"value",{configurable:!0,enumerable:s.enumerable,get(){return s.get.call(this)},set(c){s.set.call(this,c),i()}}),new MutationObserver(c=>{c.some(l=>{let u=l.attributeName;return u==="value"||u==="min"||u==="max"})&&i()}).observe(o,{attributes:!0,attributeFilter:["value","min","max"]})},e=o.closest("label"),r=e?.classList.contains("range-output"),a=o.id||`range-${Math.random().toString(36).substring(2,11)}`,n=`${a}-output`;if(o.id=a,r){let i=e.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let p=document.createElement("span");p.textContent=i.textContent,s.appendChild(p);let c=document.createElement("output");c.id=n,c.setAttribute("for",a),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=o.value,s.appendChild(c),i.textContent="",i.appendChild(s);let d=()=>{c.textContent=o.value};o.addEventListener("input",d),o.addEventListener("change",d),t(d),d()}}else{let i=o.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",o.parentNode?.insertBefore(i,o),i.appendChild(o)),i.style.position="relative";let s=document.createElement("output");s.id=n,s.setAttribute("for",a),s.className="range-bubble",s.setAttribute("aria-live","polite"),i.appendChild(s);let p=()=>{let l=parseFloat(o.min)||0,u=parseFloat(o.max)||100,h=parseFloat(o.value),f=(h-l)/(u-l);s.style.left=`calc(${f*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),d=()=>s.classList.remove("visible");o.addEventListener("input",p),o.addEventListener("pointerdown",c),o.addEventListener("pointerup",d),o.addEventListener("pointerleave",d),o.addEventListener("focus",c),o.addEventListener("blur",d),o.addEventListener("change",p),t(p),p()}o.dataset.enhancedRange="1"}function Ct(o){if(o.dataset.enhancedRequired)return;o.dataset.enhancedRequired="true";let t=e=>{let r;if(e.closest("[role$=group]")?r=e.closest("[role$=group]").querySelector("legend"):r=e.closest("label"),!r||r.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px";let n=r.querySelector("span, [data-label]");if(n)n.appendChild(a);else{let s=r.querySelector("input, select, textarea");s?r.insertBefore(a,s):r.appendChild(a)}let i=e.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};o.querySelectorAll("[required]").forEach(e=>{t(e)})}function Ft(o){if(o.dataset.enhancedOpenGroup)return;o.dataset.enhancedOpenGroup="true",o.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=()=>o.querySelector('input[type="radio"], input[type="checkbox"]');o.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let a=t.value.trim();if(a){r.preventDefault();let n=e(),i=n?.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,p=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=a;let d=document.createElement("input");d.type=i,d.name=n?.name||o.getAttribute("data-name")||"open-group",d.value=a,d.id=s,p.appendChild(c),p.appendChild(d),o.insertBefore(p,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let a=o.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function Tt(o){if(o.dataset.enhancedClip)return;o.dataset.enhancedClip="true",o.hasAttribute("tabindex")||o.setAttribute("tabindex","0"),o.hasAttribute("role")||o.setAttribute("role","button");let t=()=>{let r=o.getAttribute("data-clip-open")==="true";o.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=o.getAttribute("data-clip-open")==="true";o.setAttribute("data-clip-open",r?"false":"true"),t()};o.addEventListener("click",r=>{r.defaultPrevented||e()}),o.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function At(o){if(o.dataset.enhancedBtnWorking)return;o.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(a=>{a.forEach(n=>{if(n.attributeName==="class"){let i=o.classList.contains("btn-working"),s=o.querySelector("pds-icon");if(i)if(s)t||(t=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let p=document.createElement("pds-icon");p.setAttribute("icon","circle-notch"),p.setAttribute("size","sm"),o.insertBefore(p,o.firstChild),e=!0}else n.oldValue?.includes("btn-working")&&s&&(e?(s.remove(),e=!1):t&&(s.setAttribute("icon",t),t=null))}})}).observe(o,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Lt=new Map([[".accordion",St],["nav[data-dropdown]",$t],["label[data-toggle]",zt],["label[data-color]",Mt],['input[type="range"]',Et],["form[data-required]",Ct],["fieldset[role=group][data-open]",Ft],["[data-clip]",Tt],["button, a[class*='btn-']",At]]),De=kt.map(o=>({...o,run:Lt.get(o.selector)||(()=>{})}));var _e=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3345
3466
|
<div class="accordion">
|
|
3346
3467
|
<details>
|
|
3347
3468
|
<summary>Section 1</summary>
|
|
@@ -3372,6 +3493,11 @@ export const ${t}CSS = \`${r}\`;
|
|
|
3372
3493
|
<input type="checkbox">
|
|
3373
3494
|
<span data-label>Enable notifications</span>
|
|
3374
3495
|
</label>
|
|
3496
|
+
`.trim()},{selector:"label[data-color]",description:"Wraps color inputs with a styled control shell and synced hex output while keeping the native picker.",demoHtml:`
|
|
3497
|
+
<label data-color>
|
|
3498
|
+
<span>Brand color</span>
|
|
3499
|
+
<input type="color" value="#7c3aed">
|
|
3500
|
+
</label>
|
|
3375
3501
|
`.trim()},{selector:'input[type="range"]',description:"Enhances range inputs with an attached <output>.",demoHtml:`
|
|
3376
3502
|
<label class="range-output">
|
|
3377
3503
|
<span data-label>Volume</span>
|
|
@@ -3404,10 +3530,14 @@ export const ${t}CSS = \`${r}\`;
|
|
|
3404
3530
|
<button class="btn-primary btn-working">
|
|
3405
3531
|
<span>Saving</span>
|
|
3406
3532
|
</button>
|
|
3407
|
-
`.trim()}];var
|
|
3408
|
-
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${
|
|
3409
|
-
|
|
3533
|
+
`.trim()}];var qe="pds",Rt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,He=/^[a-z]:/i;function Q(o=""){return o.endsWith("/")?o:`${o}/`}function jt(o="",t=qe){let e=o.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function Wt(o){return o.replace(/^\.\/+/,"")}function Ot(o){return He.test(o)?o.replace(He,"").replace(/^\/+/,""):o}function Bt(o){return o.startsWith("public/")?o.substring(7):o}function Ge(o,t={}){let e=t.segment||qe,r=t.defaultRoot||`/assets/${e}/`,a=o?.public&&o.public?.root||o?.static&&o.static?.root||null;if(!a||typeof a!="string")return Q(r);let n=a.trim();return n?(n=n.replace(/\\/g,"/"),n=jt(n,e),n=Q(n),Rt.test(n)?n:(n=Wt(n),n=Ot(n),n.startsWith("/")||(n=Bt(n),n.startsWith("/")||(n=`/${n}`),n=n.replace(/\/+/g,(i,s)=>s===0?i:"/")),Q(n))):Q(r)}function Ve(o){let t=o.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 a=document.createElement("canvas").getContext("2d");if(!a)return!1;let n="mmmmmmmmmmlli",i="72px",s="monospace";a.font=`${i} ${s}`;let p=a.measureText(n).width;a.font=`${i} "${t}", ${s}`;let c=a.measureText(n).width;return p!==c}function It(o){return o?o.split(",").map(r=>r.trim())[0].replace(/['"]/g,"").trim():null}async function Je(o,t={}){if(!o)return Promise.resolve();let{weights:e=[400,500,600,700],italic:r=!1}=t,a=It(o);if(!a||Ve(a))return Promise.resolve();let n=encodeURIComponent(a);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${n}"]`)?(console.log(`Font "${a}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${a}" from Google Fonts...`),new Promise((s,p)=>{let c=document.createElement("link");c.rel="stylesheet";let d=r?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;c.href=`https://fonts.googleapis.com/css2?family=${n}:${d}&display=swap`,c.setAttribute("data-font-loader",a),c.onload=()=>{console.log(`Successfully loaded font "${a}"`),s()},c.onerror=()=>{console.warn(`Failed to load font "${a}" from Google Fonts`),p(new Error(`Failed to load font: ${a}`))},document.head.appendChild(c),setTimeout(()=>{Ve(a)||console.warn(`Font "${a}" did not load within timeout`),s()},5e3)}))}async function me(o){if(!o)return Promise.resolve();let t=new Set;o.fontFamilyHeadings&&t.add(o.fontFamilyHeadings),o.fontFamilyBody&&t.add(o.fontFamilyBody),o.fontFamilyMono&&t.add(o.fontFamilyMono);let e=Array.from(t).map(r=>Je(r).catch(a=>{console.warn(`Could not load font: ${r}`,a)}));await Promise.all(e)}var Pt=/^[a-z][a-z0-9+\-.]*:\/\//i,Z=(()=>{try{return import.meta.url}catch{return}})(),re=o=>typeof o=="string"&&o.length&&!o.endsWith("/")?`${o}/`:o;function oe(o,t={}){if(!o||Pt.test(o))return o;let{preferModule:e=!0}=t,r=()=>{if(!Z)return null;try{return new URL(o,Z).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(o,window.location.origin).href}catch{return null}};return(e?r()||a():a()||r())||o}var Ye=(()=>{if(Z)try{let o=new URL(Z);if(/\/public\/assets\/js\//.test(o.pathname))return new URL("../pds/",Z).href}catch{return}})(),Ke=!1;function Xe(o){Ke||typeof document>"u"||(Ke=!0,o.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function be(o={},t={}){if(!t||typeof t!="object")return o;let e=Array.isArray(o)?[...o]:{...o};for(let[r,a]of Object.entries(t))a&&typeof a=="object"&&!Array.isArray(a)?e[r]=be(e[r]&&typeof e[r]=="object"?e[r]:{},a):e[r]=a;return e}function fe(o=""){return String(o).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function P(o){if(o==null)return o;if(typeof o=="function")return;if(typeof o!="object")return o;if(Array.isArray(o))return o.map(e=>P(e)).filter(e=>e!==void 0);let t={};for(let e in o)if(o.hasOwnProperty(e)){let r=o[e];if(typeof r!="function"){let a=P(r);a!==void 0&&(t[e]=a)}}return t}function ye(o={},t={},{presets:e,defaultLog:r,validateDesignConfig:a,validateInitConfig:n}={}){let i=o&&typeof o.log=="function"?o.log:r,s=typeof o=="object"&&("colors"in o||"typography"in o||"spatialRhythm"in o||"shape"in o||"behavior"in o||"layout"in o||"advanced"in o||"a11y"in o||"components"in o||"icons"in o),p=o&&o.enhancers;p&&!Array.isArray(p)&&(p=Object.values(p));let c=p??t.enhancers??[],d=o&&o.preset,l=o&&o.design,u=o&&o.icons&&typeof o.icons=="object"?o.icons:null,h="preset"in(o||{})||"design"in(o||{})||"enhancers"in(o||{});o&&typeof o=="object"&&typeof n=="function"&&n(o,{log:i,context:"PDS.start"});let f,y=null;if(h){l&&typeof l=="object"&&typeof a=="function"&&a(l,{log:i,context:"PDS.start"});let m=String(d||"default").toLowerCase(),b=e?.[m]||Object.values(e||{}).find(A=>fe(A.name)===m||String(A.name||"").toLowerCase()===m);if(!b)throw new Error(`PDS preset not found: "${d||"default"}"`);y={id:b.id||fe(b.name),name:b.name||b.id||String(m)};let S=structuredClone(b);if(l&&typeof l=="object"||u){let A=l?P(l):{},I=u?P(u):null,st=I?be(A,{icons:I}):A;S=be(S,structuredClone(st))}let{mode:v,autoDefine:M,applyGlobalStyles:C,manageTheme:$,themeStorageKey:T,preloadStyles:z,criticalLayers:E,managerURL:F,manager:W,preset:O,design:B,enhancers:x,log:k,...w}=o;f={...w,design:S,preset:y.name,log:k||r}}else if(s){typeof a=="function"&&a(o,{log:i,context:"PDS.start"});let{log:m,...b}=o;f={design:structuredClone(b),log:m||r}}else{let m=e?.default||Object.values(e||{}).find(b=>fe(b.name)==="default");if(!m)throw new Error("PDS default preset not available");y={id:m.id||"default",name:m.name||"Default"},f={design:structuredClone(m),preset:y.name,log:r}}return{generatorConfig:f,enhancers:c,presetInfo:y}}function et({manageTheme:o,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:r}){let a="light",n=null;if(o&&typeof window<"u"){try{n=localStorage.getItem(t)||null}catch{n=null}try{e?.(n),r?.(n)}catch{}n?n==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=n:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:n}}function tt(o,{resolvePublicAssetURL:t}){let e=!!(o?.public?.root||o?.static?.root),r=t(o);return!e&&Ye&&(r=Ye),re(oe(r))}async function rt(o,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:r=[],autoDefineMapper:a=null,enhancers:n=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=o,p=(()=>{let d=new Map;return(t||[]).forEach(l=>d.set(l.selector,l)),(n||[]).forEach(l=>d.set(l.selector,l)),Array.from(d.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let d=null;try{let m=await Promise.resolve().then(()=>(Ze(),Qe));d=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let l=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:u,...h}=i&&typeof i=="object"?i:{},y={baseURL:e&&re(oe(e,{preferModule:s})),predefine:r,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:p,onError:(m,b)=>{if(typeof m=="string"&&m.startsWith("pds-")){let v=["pds-form","pds-drawer"].includes(m),M=b?.message?.includes("#pds/lit")||b?.message?.includes("Failed to resolve module specifier");v&&M?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
|
|
3534
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,b)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof a=="function")try{let b=a(m);return b===void 0?l(m):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),l(m)}return l(m)}};d&&(c=new d(y),r.length>0&&typeof d.define=="function"&&await d.define(...r,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:c,mergedEnhancers:p}}var ve=["light","dark"],xe=new Set(ve);function we(o){let e=(Array.isArray(o?.themes)?o.themes.map(r=>String(r).toLowerCase()):ve).filter(r=>xe.has(r));return e.length?e:ve}function ae(o,{preferDocument:t=!0}={}){let e=String(o||"").toLowerCase();if(xe.has(e))return e;if(t&&typeof document<"u"){let r=document.documentElement?.getAttribute("data-theme");if(xe.has(r))return r}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Y(o,t){let e=ae(t);return we(o).includes(e)}var it=!1,K=null;function _t(){if(typeof window>"u"||!window.localStorage)return null;try{let o=window.localStorage.getItem("pure-ds-config");if(!o)return null;let t=JSON.parse(o);if(t&&("preset"in t||"design"in t))return t}catch{return null}return null}function ze(o={},t={}){if(!t||typeof t!="object")return o;let e=Array.isArray(o)?[...o]:{...o};for(let[r,a]of Object.entries(t))a&&typeof a=="object"&&!Array.isArray(a)?e[r]=ze(e[r]&&typeof e[r]=="object"?e[r]:{},a):e[r]=a;return e}function Ht(o){let t=_t();if(!t||!o||typeof o!="object")return o;let e=t.preset,r=t.design&&typeof t.design=="object"?t.design:null;if(!e&&!r)return o;let a="preset"in o||"design"in o||"enhancers"in o,n={...o};if(e&&(n.preset=e),r)if(a){let i=o.design&&typeof o.design=="object"?o.design:{};n.design=ze(i,r)}else n=ze(o,r);return n}function qt(o,t={}){let{hideCategory:e=!0,itemGrid:r="45px 1fr",includeIncompatible:a=!0,disableIncompatible:n=!0,categoryName:i="Presets",theme:s,onSelect:p,iconHandler:c}=t||{},d=ae(s??o?.theme),l=f=>{let m=h(f?.id)?.colors||{},b=m?.primary,S=m?.secondary,v=m?.accent;return b&&S&&v?`<span style="display:flex;gap:1px;flex-shrink:0;" aria-hidden="true">
|
|
3535
|
+
<span style="display:inline-block;width:10px;height:20px;background-color:${b};"> </span>
|
|
3536
|
+
<span style="display:inline-block;width:10px;height:20px;background-color:${S};"> </span>
|
|
3537
|
+
<span style="display:inline-block;width:10px;height:20px;background-color:${v};"> </span>
|
|
3538
|
+
</span>`:f?.icon?`<pds-icon icon="${f.icon}" size="sm"></pds-icon>`:""},u=()=>{let f=o?.presets||{};return Object.values(f||{}).filter(y=>!!(y?.id||y?.name))},h=f=>f&&u().find(m=>String(m?.id||m?.name)===String(f))||null;return{hideCategory:e,itemGrid:r,iconHandler:typeof c=="function"?c:l,categories:{[i]:{trigger:()=>!0,getItems:(f={})=>{let y=String(f?.search||"").toLowerCase().trim();return u().filter(b=>{let S=String(b?.name||b?.id||"").toLowerCase(),v=String(b?.description||"").toLowerCase(),M=Array.isArray(b?.tags)?b.tags.map($=>String($).toLowerCase()):[];if(y&&!(S.includes(y)||v.includes(y)||M.some(T=>T.includes(y))))return!1;let C=Y(b,d);return!(!a&&!C)}).map(b=>{let S=b?.id||b?.name,v=Y(b,d),M=we(b),C=M.length===1?`${M[0]} only`:`Not available in ${d} mode`,$=String(b?.description||"").trim(),T=v?$:$?`${$} - ${C}`:C;return{id:S,text:b?.name||String(S),description:T,icon:"palette",class:!v&&n?"disabled":"",disabled:!v&&n,tooltip:v?"":C}}).sort((b,S)=>String(b.text||"").localeCompare(String(S.text||"")))},action:async f=>{if(!f?.id||f?.disabled)return f?.id;let y=h(f.id);return y?typeof p=="function"?await p({preset:y,selection:f,resolvedTheme:d}):(typeof o?.applyLivePreset=="function"&&await o.applyLivePreset(y.id||f.id),y.id||f.id):f?.id}}}}}async function Gt(o,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(it)return;let[r,a,n,i]=await Promise.all([Promise.resolve().then(()=>(pe(),Ne)),Promise.resolve().then(()=>(X(),Me)),Promise.resolve().then(()=>($e(),Se)),Promise.resolve().then(()=>(nt(),at))]),s=r?.default||r?.ontology,p=r?.findComponentForElement,c=a?.enums;K=n?.PDSQuery||n?.default||null,o.ontology=s,o.findComponentForElement=p,o.enums=c,o.common=i||{},o.presets=j,o.configRelations=Le,o.configSpec=Re,o.configEditorMetadata=Oe,o.configFormSchema=Be,o.buildConfigFormSchema=D,o.getConfigEditorMetadata=J,o.enhancerMetadata=_e,o.applyStyles=function(d){return te(d||R.instance)},o.adoptLayers=function(d,l,u){return Ue(d,l,u,R.instance)},o.adoptPrimitives=function(d,l){return Pe(d,l,R.instance)},o.getGenerator=async function(){return R},o.query=async function(d){if(!K){let u=await Promise.resolve().then(()=>($e(),Se));K=u?.PDSQuery||u?.default||null}return K?await new K(o).search(d):[]},o.buildPresetOmniboxSettings=function(d={}){return qt(o,d)},o.applyLivePreset=async function(d,l={}){if(!d)return!1;if(!o.registry?.isLive)return console.warn("PDS.applyLivePreset is only available in live mode."),!1;let u=o.currentConfig||{},{design:h,preset:f,...y}=u,m={...structuredClone(P(y)),preset:d},b=ye(m,{},{presets:j,defaultLog:de,validateDesignConfig:ce,validateInitConfig:le}),S=ae(o.theme);if(!Y(b.generatorConfig.design,S)){let $=b.presetInfo?.name||b.generatorConfig?.design?.name||d;console.warn(`PDS theme "${S}" not supported by preset "${$}".`)}u.theme&&!b.generatorConfig.theme&&(b.generatorConfig.theme=u.theme);let v=new R(b.generatorConfig);if(b.generatorConfig.design?.typography)try{await me(b.generatorConfig.design.typography)}catch($){b.generatorConfig?.log?.("warn","Failed to load some fonts from Google Fonts:",$)}await te(v);let M=b.presetInfo||{id:d,name:d};if(o.currentPreset=M,o.currentConfig=Object.freeze({...u,preset:b.generatorConfig.preset,design:structuredClone(b.generatorConfig.design),theme:b.generatorConfig.theme||u.theme}),o.configEditorMetadata=J(b.generatorConfig.design),o.configFormSchema=D(b.generatorConfig.design),l?.persist!==!1&&typeof window<"u"){let $="pure-ds-config";try{let T=localStorage.getItem($),z=T?JSON.parse(T):null,E={...z&&typeof z=="object"?z:{},preset:M.id||d,design:structuredClone(b.generatorConfig.design||{})};localStorage.setItem($,JSON.stringify(E))}catch(T){b.generatorConfig?.log?.("warn","Failed to store preset:",T)}}return!0},Object.getOwnPropertyDescriptor(o,"compiled")||Object.defineProperty(o,"compiled",{get(){return o.registry?.isLive&&R.instance?R.instance.compiled:null},enumerable:!0,configurable:!1}),o.preloadCritical=function(d,l={}){if(typeof window>"u"||!document.head||!d)return;let{theme:u,layers:h=["tokens"]}=l;try{let f=u||"light";(u==="system"||!u)&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",f);let y=d.design?{...d,theme:f}:{design:d,theme:f},m=new R(y),b=h.map(S=>{try{return m.css?.[S]||""}catch{return""}}).filter(S=>S.trim()).join(`
|
|
3539
|
+
`);if(b){let S=document.head.querySelector("style[data-pds-preload]");S&&S.remove();let v=document.createElement("style");v.setAttribute("data-pds-preload",""),v.textContent=b,document.head.insertBefore(v,document.head.firstChild)}}catch(f){console.warn("PDS preload failed:",f)}},it=!0}async function Vt(o,t,{emitReady:e,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(t=Ht(t),await Gt(o,{applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),Xe(o),typeof document<"u"&&document.adoptedStyleSheets){let l=`
|
|
3410
3540
|
html { opacity: 0; }
|
|
3411
3541
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3412
|
-
`;try{if(!document.adoptedStyleSheets.some(
|
|
3413
|
-
`);if(
|
|
3542
|
+
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(l),h._pdsFouc=!0,document.adoptedStyleSheets=[h,...document.adoptedStyleSheets]}}catch(u){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",u),!document.head.querySelector("style[data-pds-fouc]")){let f=document.createElement("style");f.setAttribute("data-pds-fouc",""),f.textContent=l,document.head.insertBefore(f,document.head.firstChild)}}}let n=t.applyGlobalStyles??!0,i=t.manageTheme??!0,s=t.themeStorageKey??"pure-ds-theme",p=t.preloadStyles??!1,c=t.criticalLayers??["tokens","primitives"],d=t&&t.autoDefine||null;try{let{resolvedTheme:l}=et({manageTheme:i,themeStorageKey:s,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),u=ye(t,{},{presets:j,defaultLog:de,validateDesignConfig:ce,validateInitConfig:le});if(i&&!Y(u.generatorConfig.design,l)){let z=u.presetInfo?.name||u.generatorConfig?.design?.name||u.generatorConfig?.preset||"current preset";console.warn(`PDS theme "${l}" not supported by preset "${z}".`)}let h=u.enhancers,{log:f,...y}=u.generatorConfig,m=structuredClone(y);m.log=f,i&&(m.theme=l);let b=new R(m);if(m.design?.typography)try{await me(m.design.typography)}catch(z){m?.log?.("warn","Failed to load some fonts from Google Fonts:",z)}if(p&&typeof window<"u"&&document.head)try{let z=c.map(E=>{try{return b.css?.[E]||""}catch(F){return m?.log?.("warn",`Failed to generate critical CSS for layer "${E}":`,F),""}}).filter(E=>E.trim()).join(`
|
|
3543
|
+
`);if(z){let E=document.head.querySelector("style[data-pds-critical]");E&&E.remove();let F=document.createElement("style");F.setAttribute("data-pds-critical",""),F.textContent=z;let W=document.head.querySelector('meta[charset], meta[name="viewport"]');W?W.parentNode.insertBefore(F,W.nextSibling):document.head.insertBefore(F,document.head.firstChild)}}catch(z){m?.log?.("warn","Failed to preload critical styles:",z)}o.registry.setLiveMode(),u.presetInfo?.name?m?.log?.("log",`PDS live with preset "${u.presetInfo.name}"`):m?.log?.("log","PDS live with custom config"),n&&(await te(R.instance),typeof window<"u"&&setTimeout(()=>{let z=document.head.querySelector("style[data-pds-critical]");z&&z.remove();let E=document.head.querySelector("style[data-pds-preload]");E&&E.remove();let F=document.getElementById("pds-runtime-stylesheet");F&&F.remove()},100));let S=tt(t,{resolvePublicAssetURL:Ge}),v;d&&d.baseURL?v=re(oe(d.baseURL,{preferModule:!1})):v=`${S}components/`;let M=null,C=[];try{let z=await rt({autoDefineBaseURL:v,autoDefinePreload:d&&Array.isArray(d.predefine)&&d.predefine||[],autoDefineMapper:d&&typeof d.mapper=="function"&&d.mapper||null,enhancers:h,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:De});M=z.autoDefiner,C=z.mergedEnhancers||[]}catch(z){m?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",z)}let $=b?.options||m,T=P(t);if(o.currentConfig=Object.freeze({mode:"live",...structuredClone(T),design:structuredClone(u.generatorConfig.design),preset:u.generatorConfig.preset,theme:l,enhancers:C}),o.configEditorMetadata=J(u.generatorConfig.design),o.configFormSchema=D(u.generatorConfig.design),t?.liveEdit&&typeof document<"u")try{document.querySelector("pds-live-edit")||setTimeout(()=>{let z=document.createElement("pds-live-edit");document.body.appendChild(z)},1e3)}catch(z){m?.log?.("warn","Live editor failed to start:",z)}return e({mode:"live",generator:b,config:$,theme:l,autoDefiner:M}),{generator:b,config:$,theme:l,autoDefiner:M}}catch(l){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:l}})),l}}export{Je as loadGoogleFont,Vt as startLive};
|